Run clazy with qt-keywords fixit

In C++20, there will be emit() class member, which can conflict with the
emit keyword. Given that, there are plans to enable QT_NO_KEYWORDS by
default in the future.

See also
https://lists.qt-project.org/pipermail/development/2020-February/038812.html
This commit is contained in:
Vlad Zahorodnii 2021-06-08 10:02:14 +03:00
parent b5a58f83ee
commit 1b2c7b248b
168 changed files with 1006 additions and 1006 deletions

View file

@ -695,9 +695,9 @@ public:
{
Q_UNUSED(watched)
if (event->type() == QEvent::HoverMove) {
emit hoverMove();
Q_EMIT hoverMove();
} else if (event->type() == QEvent::HoverLeave) {
emit hoverLeave();
Q_EMIT hoverLeave();
}
return false;
}

View file

@ -92,7 +92,7 @@ void DontCrashCursorPhysicalSizeEmpty::testMoveCursorOverDeco()
auto output = display->outputs().first();
output->setPhysicalSize(QSize(0, 0));
// and fake a cursor theme change, so that the theme gets recreated
emit KWin::Cursors::self()->mouse()->themeChanged();
Q_EMIT KWin::Cursors::self()->mouse()->themeChanged();
KWin::Cursors::self()->mouse()->setPos(QPoint(c->frameGeometry().center().x(), c->clientPos().y() / 2));
}

View file

@ -81,13 +81,13 @@ public:
using AnimationEffect::state;
Q_INVOKABLE void sendTestResponse(const QString &out); //proxies triggers out from the tests
QList<QAction*> actions(); //returns any QActions owned by the ScriptEngine
signals:
Q_SIGNALS:
void testOutput(const QString &data);
};
void ScriptedEffectWithDebugSpy::sendTestResponse(const QString &out)
{
emit testOutput(out);
Q_EMIT testOutput(out);
}
QList<QAction *> ScriptedEffectWithDebugSpy::actions()

View file

@ -126,10 +126,10 @@ void HelperWindow::paintEvent(QPaintEvent *event)
bool HelperWindow::event(QEvent *event)
{
if (event->type() == QEvent::Enter) {
emit entered();
Q_EMIT entered();
}
if (event->type() == QEvent::Leave) {
emit left();
Q_EMIT left();
}
return QRasterWindow::event(event);
}
@ -137,39 +137,39 @@ bool HelperWindow::event(QEvent *event)
void HelperWindow::mouseMoveEvent(QMouseEvent *event)
{
m_latestGlobalMousePos = event->globalPos();
emit mouseMoved(event->globalPos());
Q_EMIT mouseMoved(event->globalPos());
}
void HelperWindow::mousePressEvent(QMouseEvent *event)
{
m_latestGlobalMousePos = event->globalPos();
m_pressedButtons = event->buttons();
emit mousePressed();
Q_EMIT mousePressed();
}
void HelperWindow::mouseReleaseEvent(QMouseEvent *event)
{
m_latestGlobalMousePos = event->globalPos();
m_pressedButtons = event->buttons();
emit mouseReleased();
Q_EMIT mouseReleased();
}
void HelperWindow::wheelEvent(QWheelEvent *event)
{
Q_UNUSED(event)
emit wheel();
Q_EMIT wheel();
}
void HelperWindow::keyPressEvent(QKeyEvent *event)
{
Q_UNUSED(event)
emit keyPressed();
Q_EMIT keyPressed();
}
void HelperWindow::keyReleaseEvent(QKeyEvent *event)
{
Q_UNUSED(event)
emit keyReleased();
Q_EMIT keyReleased();
}
void InternalWindowTest::initTestCase()

View file

@ -84,10 +84,10 @@ public:
~HelperEffect() override {}
void windowInputMouseEvent(QEvent*) override {
emit inputEvent();
Q_EMIT inputEvent();
}
void grabbedKeyboardEvent(QKeyEvent *e) override {
emit keyEvent(e->text());
Q_EMIT keyEvent(e->text());
}
Q_SIGNALS:

View file

@ -74,7 +74,7 @@ Target::~Target()
void Target::shortcut()
{
emit shortcutTriggered();
Q_EMIT shortcutTriggered();
}
void ModifierOnlyShortcutTest::initTestCase()

View file

@ -83,7 +83,7 @@ Target::~Target()
void Target::shortcut()
{
emit shortcutTriggered();
Q_EMIT shortcutTriggered();
}
void NoGlobalShortcutsTest::initTestCase()

View file

@ -64,12 +64,12 @@ LayerSurfaceV1::~LayerSurfaceV1()
void LayerSurfaceV1::zwlr_layer_surface_v1_configure(uint32_t serial, uint32_t width, uint32_t height)
{
emit configureRequested(serial, QSize(width, height));
Q_EMIT configureRequested(serial, QSize(width, height));
}
void LayerSurfaceV1::zwlr_layer_surface_v1_closed()
{
emit closeRequested();
Q_EMIT closeRequested();
}
XdgShell::~XdgShell()
@ -96,7 +96,7 @@ Surface *XdgSurface::surface() const
void XdgSurface::xdg_surface_configure(uint32_t serial)
{
emit configureRequested(serial);
Q_EMIT configureRequested(serial);
}
XdgToplevel::XdgToplevel(XdgSurface *surface, QObject *parent)
@ -140,12 +140,12 @@ void XdgToplevel::xdg_toplevel_configure(int32_t width, int32_t height, wl_array
}
}
emit configureRequested(QSize(width, height), requestedStates);
Q_EMIT configureRequested(QSize(width, height), requestedStates);
}
void XdgToplevel::xdg_toplevel_close()
{
emit closeRequested();
Q_EMIT closeRequested();
}
XdgPositioner::XdgPositioner(XdgShell *shell)
@ -177,12 +177,12 @@ XdgSurface *XdgPopup::xdgSurface() const
void XdgPopup::xdg_popup_configure(int32_t x, int32_t y, int32_t width, int32_t height)
{
emit configureRequested(QRect(x, y, width, height));
Q_EMIT configureRequested(QRect(x, y, width, height));
}
void XdgPopup::xdg_popup_popup_done()
{
emit doneReceived();
Q_EMIT doneReceived();
}
XdgDecorationManagerV1::~XdgDecorationManagerV1()
@ -204,7 +204,7 @@ XdgToplevelDecorationV1::~XdgToplevelDecorationV1()
void XdgToplevelDecorationV1::zxdg_toplevel_decoration_v1_configure(uint32_t m)
{
emit configureRequested(mode(m));
Q_EMIT configureRequested(mode(m));
}
IdleInhibitManagerV1::~IdleInhibitManagerV1()

View file

@ -107,11 +107,11 @@ void X11EventReaderHelper::processXcbEvents()
switch (eventType) {
case XCB_ENTER_NOTIFY: {
auto enterEvent = reinterpret_cast<xcb_enter_notify_event_t *>(event);
emit entered(QPoint(enterEvent->event_x, enterEvent->event_y));
Q_EMIT entered(QPoint(enterEvent->event_x, enterEvent->event_y));
break; }
case XCB_LEAVE_NOTIFY: {
auto leaveEvent = reinterpret_cast<xcb_leave_notify_event_t *>(event);
emit left(QPoint(leaveEvent->event_x, leaveEvent->event_y));
Q_EMIT left(QPoint(leaveEvent->event_x, leaveEvent->event_y));
break; }
}
free(event);

View file

@ -74,7 +74,7 @@ void AbstractClient::setHiddenInternal(bool set)
void AbstractClient::moveResize(const QRect &rect)
{
m_frameGeometry = rect;
emit geometryChanged();
Q_EMIT geometryChanged();
}
QRect AbstractClient::frameGeometry() const
@ -90,7 +90,7 @@ bool AbstractClient::keepBelow() const
void AbstractClient::setKeepBelow(bool keepBelow)
{
m_keepBelow = keepBelow;
emit keepBelowChanged();
Q_EMIT keepBelowChanged();
}
bool AbstractClient::isInteractiveResize() const

View file

@ -87,7 +87,7 @@ void MockScreens::updateCount()
{
m_geometries = m_scheduledGeometries;
setCount(m_geometries.size());
emit changed();
Q_EMIT changed();
}
void MockScreens::setGeometries(const QList< QRect > &geometries)

View file

@ -13,7 +13,7 @@
class OnScreenNotificationTest : public QObject
{
Q_OBJECT
private slots:
private Q_SLOTS:
void show();
void timeout();

View file

@ -13,7 +13,7 @@
class TestTabBoxClientModel : public QObject
{
Q_OBJECT
private slots:
private Q_SLOTS:
void initTestCase();
/**
* Tests that calculating the longest caption does not

View file

@ -17,7 +17,7 @@ using namespace KWin;
class TestTabBoxHandler : public QObject
{
Q_OBJECT
private slots:
private Q_SLOTS:
void initTestCase();
/**
* Test to verify that update outline does not crash

View file

@ -74,7 +74,7 @@ Q_SIGNALS:
bool TestObject::callback(KWin::ElectricBorder border)
{
emit gotCallback(border);
Q_EMIT gotCallback(border);
return true;
}
@ -682,7 +682,7 @@ void TestScreenEdges::testFullScreenBlocking()
QAction action;
s->reserveTouch(KWin::ElectricRight, &action);
// currently there is no active client yet, so check blocking shouldn't do anything
emit s->checkBlocking();
Q_EMIT s->checkBlocking();
for (auto e: s->findChildren<Edge*>()) {
QCOMPARE(e->activatesForTouchGesture(), e->border() == KWin::ElectricRight);
}
@ -709,7 +709,7 @@ void TestScreenEdges::testFullScreenBlocking()
client.setActive(true);
client.setFullScreen(true);
ws.setActiveClient(&client);
emit s->checkBlocking();
Q_EMIT s->checkBlocking();
// the signal doesn't trigger for corners, let's go over all windows just to be sure that it doesn't call for corners
for (auto e: s->findChildren<Edge*>()) {
e->checkBlocking();
@ -726,7 +726,7 @@ void TestScreenEdges::testFullScreenBlocking()
// let's make the client not fullscreen, which should trigger
client.setFullScreen(false);
emit s->checkBlocking();
Q_EMIT s->checkBlocking();
for (auto e: s->findChildren<Edge*>()) {
QCOMPARE(e->activatesForTouchGesture(), e->border() == KWin::ElectricRight);
}
@ -739,7 +739,7 @@ void TestScreenEdges::testFullScreenBlocking()
QTest::qWait(351);
client.setFullScreen(true);
client.moveResize(client.frameGeometry().translated(10, 0));
emit s->checkBlocking();
Q_EMIT s->checkBlocking();
spy.clear();
Cursors::self()->mouse()->setPos(0, 50);
event.time = QDateTime::currentMSecsSinceEpoch();
@ -750,7 +750,7 @@ void TestScreenEdges::testFullScreenBlocking()
// just to be sure, let's set geometry back
client.moveResize(screens()->geometry());
emit s->checkBlocking();
Q_EMIT s->checkBlocking();
Cursors::self()->mouse()->setPos(0, 50);
QVERIFY(isEntered(&event));
QVERIFY(spy.isEmpty());
@ -852,7 +852,7 @@ void TestScreenEdges::testClientEdge()
QCOMPARE(client.isHiddenInternal(), true);
// now let's emulate the removal of a Client through Workspace
emit workspace()->clientRemoved(&client);
Q_EMIT workspace()->clientRemoved(&client);
for (auto e : s->findChildren<Edge*>()) {
QVERIFY(!e->client());
}

View file

@ -89,7 +89,7 @@ AbstractClient::AbstractClient()
);
connect(ApplicationMenu::self(), &ApplicationMenu::applicationMenuEnabledChanged, this, [this] {
emit hasApplicationMenuChanged(hasApplicationMenu());
Q_EMIT hasApplicationMenuChanged(hasApplicationMenu());
});
}
@ -131,7 +131,7 @@ void AbstractClient::setSkipSwitcher(bool set)
m_skipSwitcher = set;
doSetSkipSwitcher();
updateWindowRules(Rules::SkipSwitcher);
emit skipSwitcherChanged();
Q_EMIT skipSwitcherChanged();
}
void AbstractClient::setSkipPager(bool b)
@ -142,7 +142,7 @@ void AbstractClient::setSkipPager(bool b)
m_skipPager = b;
doSetSkipPager();
updateWindowRules(Rules::SkipPager);
emit skipPagerChanged();
Q_EMIT skipPagerChanged();
}
void AbstractClient::doSetSkipPager()
@ -160,7 +160,7 @@ void AbstractClient::setSkipTaskbar(bool b)
if (was_wants_tab_focus != wantsTabFocus()) {
FocusChain::self()->update(this, isActive() ? FocusChain::MakeFirst : FocusChain::Update);
}
emit skipTaskbarChanged();
Q_EMIT skipTaskbarChanged();
}
void AbstractClient::setOriginalSkipTaskbar(bool b)
@ -182,7 +182,7 @@ void AbstractClient::doSetSkipSwitcher()
void AbstractClient::setIcon(const QIcon &icon)
{
m_icon = icon;
emit iconChanged();
Q_EMIT iconChanged();
}
void AbstractClient::setActive(bool act)
@ -216,7 +216,7 @@ void AbstractClient::setActive(bool act)
(*it)->updateLayer();
doSetActive();
emit activeChanged();
Q_EMIT activeChanged();
updateMouseGrab();
}
@ -234,7 +234,7 @@ void AbstractClient::markAsZombie()
Q_ASSERT(!m_zombie);
m_zombie = true;
addWorkspaceRepaint(visibleGeometry());
emit markedAsZombie();
Q_EMIT markedAsZombie();
}
Layer AbstractClient::layer() const
@ -339,7 +339,7 @@ void AbstractClient::setKeepAbove(bool b)
updateLayer();
updateWindowRules(Rules::Above);
emit keepAboveChanged(m_keepAbove);
Q_EMIT keepAboveChanged(m_keepAbove);
}
void AbstractClient::doSetKeepAbove()
@ -359,7 +359,7 @@ void AbstractClient::setKeepBelow(bool b)
updateLayer();
updateWindowRules(Rules::Below);
emit keepBelowChanged(m_keepBelow);
Q_EMIT keepBelowChanged(m_keepBelow);
}
void AbstractClient::doSetKeepBelow()
@ -413,7 +413,7 @@ void AbstractClient::demandAttention(bool set)
m_demandsAttention = set;
doSetDemandsAttention();
workspace()->clientAttentionChanged(this, set);
emit demandsAttentionChanged();
Q_EMIT demandsAttentionChanged();
}
void AbstractClient::doSetDemandsAttention()
@ -487,7 +487,7 @@ void AbstractClient::setDesktops(QVector<VirtualDesktop*> desktops)
// the (just moved) modal dialog will confusingly return to the mainwindow with
// the next desktop change
{
foreach (AbstractClient * c2, mainClients())
Q_FOREACH (AbstractClient * c2, mainClients())
c2->setDesktops(desktops);
}
@ -496,10 +496,10 @@ void AbstractClient::setDesktops(QVector<VirtualDesktop*> desktops)
FocusChain::self()->update(this, FocusChain::MakeFirst);
updateWindowRules(Rules::Desktop);
emit desktopChanged();
Q_EMIT desktopChanged();
if (wasOnCurrentDesktop != isOnCurrentDesktop())
emit desktopPresenceChanged(this, was_desk);
emit x11DesktopIdsChanged();
Q_EMIT desktopPresenceChanged(this, was_desk);
Q_EMIT x11DesktopIdsChanged();
}
void AbstractClient::doSetDesktop()
@ -597,7 +597,7 @@ void AbstractClient::setShade(ShadeMode mode)
if (wasShade == isShade()) {
// Decoration may want to update after e.g. hover-shade changes
emit shadeChanged();
Q_EMIT shadeChanged();
return; // No real change in shaded state
}
@ -607,7 +607,7 @@ void AbstractClient::setShade(ShadeMode mode)
doSetShade(previousShadeMode);
updateWindowRules(Rules::Shade);
emit shadeChanged();
Q_EMIT shadeChanged();
}
void AbstractClient::doSetShade(ShadeMode previousShadeMode)
@ -711,8 +711,8 @@ void AbstractClient::minimize(bool avoid_animation)
// TODO: merge signal with s_minimized
addWorkspaceRepaint(visibleGeometry());
emit clientMinimized(this, !avoid_animation);
emit minimizedChanged();
Q_EMIT clientMinimized(this, !avoid_animation);
Q_EMIT minimizedChanged();
}
void AbstractClient::unminimize(bool avoid_animation)
@ -728,8 +728,8 @@ void AbstractClient::unminimize(bool avoid_animation)
doMinimize();
updateWindowRules(Rules::Minimize);
emit clientUnminimized(this, !avoid_animation);
emit minimizedChanged();
Q_EMIT clientUnminimized(this, !avoid_animation);
Q_EMIT minimizedChanged();
}
void AbstractClient::doMinimize()
@ -797,8 +797,8 @@ void AbstractClient::setColorScheme(const QString &colorScheme)
connect(m_palette.get(), &Decoration::DecorationPalette::changed, this, &AbstractClient::handlePaletteChange);
emit paletteChanged(palette());
emit colorSchemeChanged();
Q_EMIT paletteChanged(palette());
Q_EMIT colorSchemeChanged();
}
}
@ -809,7 +809,7 @@ void AbstractClient::updateColorScheme()
void AbstractClient::handlePaletteChange()
{
emit paletteChanged(palette());
Q_EMIT paletteChanged(palette());
}
void AbstractClient::keepInArea(QRect area, bool partial)
@ -903,8 +903,8 @@ void AbstractClient::setMaximize(bool vertically, bool horizontally)
false);
const MaximizeMode newMode = maximizeMode();
if (oldMode != newMode) {
emit clientMaximizedStateChanged(this, newMode);
emit clientMaximizedStateChanged(this, vertically, horizontally);
Q_EMIT clientMaximizedStateChanged(this, newMode);
Q_EMIT clientMaximizedStateChanged(this, vertically, horizontally);
}
}
@ -940,13 +940,13 @@ bool AbstractClient::startInteractiveMoveResize()
updateQuickTileMode(QuickTileFlag::None); // Do so without restoring original geometry
setGeometryRestore(moveResizeGeometry());
doSetQuickTileMode();
emit quickTileModeChanged();
Q_EMIT quickTileModeChanged();
}
updateHaveResizeEffect();
updateInitialMoveResizeGeometry();
checkUnrestrictedInteractiveMoveResize();
emit clientStartUserMovedResized(this);
Q_EMIT clientStartUserMovedResized(this);
if (ScreenEdges::self()->isDesktopSwitchingMovingClients())
ScreenEdges::self()->reserveDesktopSwitching(true, Qt::Vertical|Qt::Horizontal);
return true;
@ -1003,7 +1003,7 @@ void AbstractClient::finishInteractiveMoveResize(bool cancel)
}
// FRAME update();
emit clientFinishUserMovedResized(this);
Q_EMIT clientFinishUserMovedResized(this);
}
// This function checks if it actually makes sense to perform a restricted move/resize.
@ -1432,7 +1432,7 @@ void AbstractClient::performInteractiveMoveResize()
resize(moveResizeGeom.size());
}
positionGeometryTip();
emit clientStepUserMovedResized(this, moveResizeGeom);
Q_EMIT clientStepUserMovedResized(this, moveResizeGeom);
}
StrutRect AbstractClient::strutRect(StrutArea area) const
@ -1920,7 +1920,7 @@ void AbstractClient::setTransientFor(AbstractClient *transientFor)
return;
}
m_transientFor = transientFor;
emit transientChanged();
Q_EMIT transientChanged();
}
const AbstractClient *AbstractClient::transientFor() const
@ -1962,7 +1962,7 @@ QList< AbstractClient* > AbstractClient::mainClients() const
QList<AbstractClient*> AbstractClient::allMainClients() const
{
auto result = mainClients();
foreach (const auto *cl, result) {
Q_FOREACH (const auto *cl, result) {
result += cl->allMainClients();
}
return result;
@ -1974,7 +1974,7 @@ void AbstractClient::setModal(bool m)
if (m_modal == m)
return;
m_modal = m;
emit modalChanged();
Q_EMIT modalChanged();
// Changing modality for a mapped window is weird (?)
// _NET_WM_STATE_MODAL should possibly rather be _NET_WM_WINDOW_TYPE_MODAL_DIALOG
}
@ -2103,7 +2103,7 @@ void AbstractClient::updateCursor()
if (c == m_interactiveMoveResize.cursor)
return;
m_interactiveMoveResize.cursor = c;
emit moveResizeCursorChanged(c);
Q_EMIT moveResizeCursorChanged(c);
}
void AbstractClient::leaveInteractiveMoveResize()
@ -2315,7 +2315,7 @@ void AbstractClient::createDecoration(const QRect &oldGeometry)
if (!isShade()) {
checkWorkspacePosition(oldGeometry);
}
emit geometryShapeChanged(this, oldGeometry);
Q_EMIT geometryShapeChanged(this, oldGeometry);
});
connect(decoratedClient()->decoratedClient(), &KDecoration2::DecoratedClient::sizeChanged,
this, &AbstractClient::updateDecorationInputShape);
@ -2324,7 +2324,7 @@ void AbstractClient::createDecoration(const QRect &oldGeometry)
moveResize(QRect(oldGeometry.topLeft(), clientSizeToFrameSize(clientSize())));
updateDecorationInputShape();
emit geometryShapeChanged(this, oldGeometry);
Q_EMIT geometryShapeChanged(this, oldGeometry);
}
void AbstractClient::destroyDecoration()
@ -2337,7 +2337,7 @@ void AbstractClient::destroyDecoration()
void AbstractClient::setDecoration(KDecoration2::Decoration *decoration)
{
m_decoration.decoration = decoration;
emit decorationChanged();
Q_EMIT decorationChanged();
}
void AbstractClient::updateDecorationInputShape()
@ -2653,7 +2653,7 @@ void AbstractClient::setDesktopFileName(QByteArray name)
}
m_desktopFileName = name;
updateWindowRules(Rules::DesktopFile);
emit desktopFileNameChanged();
Q_EMIT desktopFileNameChanged();
}
QString AbstractClient::iconFromDesktopFile() const
@ -2702,9 +2702,9 @@ void AbstractClient::updateApplicationMenuServiceName(const QString &serviceName
const bool new_hasApplicationMenu = hasApplicationMenu();
emit applicationMenuChanged();
Q_EMIT applicationMenuChanged();
if (old_hasApplicationMenu != new_hasApplicationMenu) {
emit hasApplicationMenuChanged(new_hasApplicationMenu);
Q_EMIT hasApplicationMenuChanged(new_hasApplicationMenu);
}
}
@ -2716,9 +2716,9 @@ void AbstractClient::updateApplicationMenuObjectPath(const QString &objectPath)
const bool new_hasApplicationMenu = hasApplicationMenu();
emit applicationMenuChanged();
Q_EMIT applicationMenuChanged();
if (old_hasApplicationMenu != new_hasApplicationMenu) {
emit hasApplicationMenuChanged(new_hasApplicationMenu);
Q_EMIT hasApplicationMenuChanged(new_hasApplicationMenu);
}
}
@ -2726,7 +2726,7 @@ void AbstractClient::setApplicationMenuActive(bool applicationMenuActive)
{
if (m_applicationMenuActive != applicationMenuActive) {
m_applicationMenuActive = applicationMenuActive;
emit applicationMenuActiveChanged(applicationMenuActive);
Q_EMIT applicationMenuActiveChanged(applicationMenuActive);
}
}
@ -2749,8 +2749,8 @@ void AbstractClient::setUnresponsive(bool unresponsive)
{
if (m_unresponsive != unresponsive) {
m_unresponsive = unresponsive;
emit unresponsiveChanged(m_unresponsive);
emit captionChanged();
Q_EMIT unresponsiveChanged(m_unresponsive);
Q_EMIT captionChanged();
}
}
@ -2911,7 +2911,7 @@ void AbstractClient::updateActivities(bool includeTransients)
m_blockedActivityUpdatesRequireTransients |= includeTransients;
return;
}
emit activitiesChanged(this);
Q_EMIT activitiesChanged(this);
m_blockedActivityUpdatesRequireTransients = false; // reset
FocusChain::self()->update(this, FocusChain::MakeFirst);
updateWindowRules(Rules::Activity);
@ -3103,7 +3103,7 @@ void AbstractClient::setQuickTileMode(QuickTileMode mode, bool keyboard)
setGeometryRestore(prev_geom_restore);
}
doSetQuickTileMode();
emit quickTileModeChanged();
Q_EMIT quickTileModeChanged();
return;
}
@ -3132,7 +3132,7 @@ void AbstractClient::setQuickTileMode(QuickTileMode mode, bool keyboard)
}
doSetQuickTileMode();
emit quickTileModeChanged();
Q_EMIT quickTileModeChanged();
return;
}
@ -3208,7 +3208,7 @@ void AbstractClient::setQuickTileMode(QuickTileMode mode, bool keyboard)
checkWorkspacePosition(); // Just in case it's a different screen
}
doSetQuickTileMode();
emit quickTileModeChanged();
Q_EMIT quickTileModeChanged();
}
void AbstractClient::doSetQuickTileMode()
@ -3221,7 +3221,7 @@ void AbstractClient::sendToScreen(int newScreen)
if (isActive()) {
screens()->setCurrent(newScreen);
// might impact the layer of a fullscreen window
foreach (AbstractClient *cc, workspace()->allClientList()) {
Q_FOREACH (AbstractClient *cc, workspace()->allClientList()) {
if (cc->isFullScreen() && cc->screen() == newScreen) {
cc->updateLayer();
}
@ -3365,7 +3365,7 @@ void AbstractClient::checkWorkspacePosition(QRect oldGeometry, int oldDesktop, Q
// we need to find the screen area as it was before the change
oldScreenArea = QRect( 0, 0, workspace()->oldDisplayWidth(), workspace()->oldDisplayHeight());
int distance = INT_MAX;
foreach(const QRect &r, workspace()->previousScreenSizes()) {
Q_FOREACH(const QRect &r, workspace()->previousScreenSizes()) {
int d = r.contains( oldGeometry.center()) ? 0 : ( r.center() - oldGeometry.center()).manhattanLength();
if( d < distance ) {
distance = d;

View file

@ -39,7 +39,7 @@ void AbstractWaylandOutput::setCapabilityInternal(Capability capability, bool on
{
if (static_cast<bool>(m_capabilities & capability) != on) {
m_capabilities.setFlag(capability, on);
emit capabilitiesChanged();
Q_EMIT capabilitiesChanged();
}
}
@ -77,7 +77,7 @@ void AbstractWaylandOutput::setGlobalPos(const QPoint &pos)
{
if (m_position != pos) {
m_position = pos;
emit geometryChanged();
Q_EMIT geometryChanged();
}
}
@ -130,8 +130,8 @@ void AbstractWaylandOutput::setScale(qreal scale)
{
if (m_scale != scale) {
m_scale = scale;
emit scaleChanged();
emit geometryChanged();
Q_EMIT scaleChanged();
Q_EMIT geometryChanged();
}
}
@ -186,11 +186,11 @@ void AbstractWaylandOutput::applyChanges(const KWaylandServer::OutputChangeSet *
overallSizeCheckNeeded |= emitModeChanged;
if (overallSizeCheckNeeded) {
emit screens()->changed();
Q_EMIT screens()->changed();
}
if (emitModeChanged) {
emit modeChanged();
Q_EMIT modeChanged();
}
}
@ -204,7 +204,7 @@ void AbstractWaylandOutput::setEnabled(bool enable)
if (m_isEnabled != enable) {
m_isEnabled = enable;
updateEnablement(enable);
emit enabledChanged();
Q_EMIT enabledChanged();
}
}
@ -218,7 +218,7 @@ void AbstractWaylandOutput::setCurrentModeInternal(const QSize &size, int refres
if (m_modeSize != size || m_refreshRate != refreshRate) {
m_modeSize = size;
m_refreshRate = refreshRate;
emit geometryChanged();
Q_EMIT geometryChanged();
}
}
@ -268,8 +268,8 @@ void AbstractWaylandOutput::setTransformInternal(Transform transform)
{
if (m_transform != transform) {
m_transform = transform;
emit transformChanged();
emit modeChanged();
Q_EMIT transformChanged();
Q_EMIT modeChanged();
}
}
@ -282,7 +282,7 @@ void AbstractWaylandOutput::setDpmsModeInternal(DpmsMode dpmsMode)
{
if (m_dpmsMode != dpmsMode) {
m_dpmsMode = dpmsMode;
emit dpmsModeChanged();
Q_EMIT dpmsModeChanged();
}
}
@ -358,7 +358,7 @@ void AbstractWaylandOutput::setOverscanInternal(uint32_t overscan)
{
if (m_overscan != overscan) {
m_overscan = overscan;
emit overscanChanged();
Q_EMIT overscanChanged();
}
}
@ -376,7 +376,7 @@ void AbstractWaylandOutput::setVrrPolicy(RenderLoop::VrrPolicy policy)
{
if (renderLoop()->vrrPolicy() != policy && (m_capabilities & Capability::Vrr)) {
renderLoop()->setVrrPolicy(policy);
emit vrrPolicyChanged();
Q_EMIT vrrPolicyChanged();
}
}

View file

@ -262,7 +262,7 @@ void Workspace::setActiveClient(AbstractClient* c)
rootInfo()->setActiveClient(active_client);
}
emit clientActivated(active_client);
Q_EMIT clientActivated(active_client);
--set_active_client_recursion;
}
@ -680,7 +680,7 @@ void Workspace::clientAttentionChanged(AbstractClient* c, bool set)
attention_chain.prepend(c);
} else
attention_chain.removeAll(c);
emit clientDemandsAttentionChanged(c, set);
Q_EMIT clientDemandsAttentionChanged(c, set);
}
//********************************************

View file

@ -55,7 +55,7 @@ void Activities::slotCurrentChanged(const QString &newActivity)
}
m_previous = m_current;
m_current = newActivity;
emit currentChanged(newActivity);
Q_EMIT currentChanged(newActivity);
}
void Activities::slotRemoved(const QString &activity)
@ -172,7 +172,7 @@ void Activities::reallyStop(const QString &id)
}
const QStringList activities = c->activities();
foreach (const QString & activityId, activities) {
Q_FOREACH (const QString & activityId, activities) {
if (activityId == id) {
saveSessionIds << sessionId;
} else if (running().contains(activityId)) {
@ -185,7 +185,7 @@ void Activities::reallyStop(const QString &id)
QStringList saveAndClose;
QStringList saveOnly;
foreach (const QByteArray & sessionId, saveSessionIds) {
Q_FOREACH (const QByteArray & sessionId, saveSessionIds) {
if (dontCloseSessionIds.contains(sessionId)) {
saveOnly << sessionId;
} else {

View file

@ -40,12 +40,12 @@ ApplicationMenu::ApplicationMenu(QObject *parent)
connect(m_kappMenuWatcher, &QDBusServiceWatcher::serviceRegistered,
this, [this] () {
m_applicationMenuEnabled = true;
emit applicationMenuEnabledChanged(true);
Q_EMIT applicationMenuEnabledChanged(true);
});
connect(m_kappMenuWatcher, &QDBusServiceWatcher::serviceUnregistered,
this, [this] () {
m_applicationMenuEnabled = false;
emit applicationMenuEnabledChanged(false);
Q_EMIT applicationMenuEnabledChanged(false);
});
m_applicationMenuEnabled = QDBusConnection::sessionBus().interface()->isServiceRegistered(QStringLiteral("org.kde.kappmenu"));

View file

@ -40,7 +40,7 @@ public:
void setViewEnabled(bool enabled);
signals:
Q_SIGNALS:
void applicationMenuEnabledChanged(bool enabled);
private Q_SLOTS:

View file

@ -142,7 +142,7 @@ void GetAddrInfo::compare()
ownAddress = ownAddress->ai_next;
}
if (localFound) {
emit local();
Q_EMIT local();
break;
}
}
@ -220,7 +220,7 @@ void ClientMachine::checkForLocalhost()
void ClientMachine::setLocal()
{
m_localhost = true;
emit localhostChanged();
Q_EMIT localhostChanged();
}
void ClientMachine::resolveFinished()

View file

@ -304,7 +304,7 @@ void ColorDevice::setBrightness(uint brightness)
d->brightness = brightness;
d->dirtyCurves |= ColorDevicePrivate::DirtyBrightnessToneCurve;
scheduleUpdate();
emit brightnessChanged();
Q_EMIT brightnessChanged();
}
uint ColorDevice::temperature() const
@ -324,7 +324,7 @@ void ColorDevice::setTemperature(uint temperature)
d->temperature = temperature;
d->dirtyCurves |= ColorDevicePrivate::DirtyTemperatureToneCurve;
scheduleUpdate();
emit temperatureChanged();
Q_EMIT temperatureChanged();
}
QString ColorDevice::profile() const
@ -340,7 +340,7 @@ void ColorDevice::setProfile(const QString &profile)
d->profile = profile;
d->dirtyCurves |= ColorDevicePrivate::DirtyCalibrationToneCurve;
scheduleUpdate();
emit profileChanged();
Q_EMIT profileChanged();
}
void ColorDevice::update()

View file

@ -65,7 +65,7 @@ void ColorManager::handleOutputEnabled(AbstractOutput *output)
{
ColorDevice *device = new ColorDevice(output, this);
d->devices.append(device);
emit deviceAdded(device);
Q_EMIT deviceAdded(device);
}
void ColorManager::handleOutputDisabled(AbstractOutput *output)
@ -79,7 +79,7 @@ void ColorManager::handleOutputDisabled(AbstractOutput *output)
}
ColorDevice *device = *it;
d->devices.erase(it);
emit deviceRemoved(device);
Q_EMIT deviceRemoved(device);
delete device;
}

View file

@ -152,7 +152,7 @@ Compositor::Compositor(QObject* workspace)
Compositor::~Compositor()
{
emit aboutToDestroy();
Q_EMIT aboutToDestroy();
stop();
deleteUnusedSupportProperties();
destroyCompositorSelection();
@ -183,7 +183,7 @@ bool Compositor::setupStart()
}
}
emit aboutToToggleCompositing();
Q_EMIT aboutToToggleCompositing();
auto supportedCompositors = kwinApp()->platform()->supportedCompositors();
const auto userConfigIt = std::find(supportedCompositors.begin(), supportedCompositors.end(),
@ -280,7 +280,7 @@ bool Compositor::setupStart()
}
connect(m_scene, &Scene::resetCompositing, this, &Compositor::reinitialize);
emit sceneCreated();
Q_EMIT sceneCreated();
return true;
}
@ -367,7 +367,7 @@ void Compositor::startupWithWorkspace()
}
m_state = State::On;
emit compositingToggled(true);
Q_EMIT compositingToggled(true);
if (m_releaseSelectionTimer.isActive()) {
m_releaseSelectionTimer.stop();
@ -424,7 +424,7 @@ void Compositor::stop()
return;
}
m_state = State::Stopping;
emit aboutToToggleCompositing();
Q_EMIT aboutToToggleCompositing();
m_releaseSelectionTimer.start();
@ -484,7 +484,7 @@ void Compositor::stop()
m_scene = nullptr;
m_state = State::Off;
emit compositingToggled(false);
Q_EMIT compositingToggled(false);
}
void Compositor::destroyCompositorSelection()

View file

@ -125,7 +125,7 @@ void Cursor::updateTheme(const QString &name, int size)
if (m_themeName != name || m_themeSize != size) {
m_themeName = name;
m_themeSize = size;
emit themeChanged();
Q_EMIT themeChanged();
}
}
@ -204,7 +204,7 @@ xcb_cursor_t Cursor::x11Cursor(const QByteArray &name)
void Cursor::doSetPos()
{
emit posChanged(m_pos);
Q_EMIT posChanged(m_pos);
}
void Cursor::doGetPos()
@ -217,7 +217,7 @@ void Cursor::updatePos(const QPoint &pos)
return;
}
m_pos = pos;
emit posChanged(m_pos);
Q_EMIT posChanged(m_pos);
}
void Cursor::startMousePolling()

View file

@ -369,21 +369,21 @@ VirtualDesktopManagerDBusInterface::VirtualDesktopManagerDBusInterface(VirtualDe
[this](uint previousDesktop, uint newDesktop) {
Q_UNUSED(previousDesktop);
Q_UNUSED(newDesktop);
emit currentChanged(m_manager->currentDesktop()->id());
Q_EMIT currentChanged(m_manager->currentDesktop()->id());
}
);
connect(m_manager, &VirtualDesktopManager::countChanged, this,
[this](uint previousCount, uint newCount) {
Q_UNUSED(previousCount);
emit countChanged(newCount);
emit desktopsChanged(desktops());
Q_EMIT countChanged(newCount);
Q_EMIT desktopsChanged(desktops());
}
);
connect(m_manager, &VirtualDesktopManager::navigationWrappingAroundChanged, this,
[this]() {
emit navigationWrappingAroundChanged(isNavigationWrappingAround());
Q_EMIT navigationWrappingAroundChanged(isNavigationWrappingAround());
}
);
@ -393,15 +393,15 @@ VirtualDesktopManagerDBusInterface::VirtualDesktopManagerDBusInterface(VirtualDe
connect(vd, &VirtualDesktop::x11DesktopNumberChanged, this,
[this, vd]() {
DBusDesktopDataStruct data{.position = vd->x11DesktopNumber() - 1, .id = vd->id(), .name = vd->name()};
emit desktopDataChanged(vd->id(), data);
emit desktopsChanged(desktops());
Q_EMIT desktopDataChanged(vd->id(), data);
Q_EMIT desktopsChanged(desktops());
}
);
connect(vd, &VirtualDesktop::nameChanged, this,
[this, vd]() {
DBusDesktopDataStruct data{.position = vd->x11DesktopNumber() - 1, .id = vd->id(), .name = vd->name()};
emit desktopDataChanged(vd->id(), data);
emit desktopsChanged(desktops());
Q_EMIT desktopDataChanged(vd->id(), data);
Q_EMIT desktopsChanged(desktops());
}
);
}
@ -410,26 +410,26 @@ VirtualDesktopManagerDBusInterface::VirtualDesktopManagerDBusInterface(VirtualDe
connect(vd, &VirtualDesktop::x11DesktopNumberChanged, this,
[this, vd]() {
DBusDesktopDataStruct data{.position = vd->x11DesktopNumber() - 1, .id = vd->id(), .name = vd->name()};
emit desktopDataChanged(vd->id(), data);
emit desktopsChanged(desktops());
Q_EMIT desktopDataChanged(vd->id(), data);
Q_EMIT desktopsChanged(desktops());
}
);
connect(vd, &VirtualDesktop::nameChanged, this,
[this, vd]() {
DBusDesktopDataStruct data{.position = vd->x11DesktopNumber() - 1, .id = vd->id(), .name = vd->name()};
emit desktopDataChanged(vd->id(), data);
emit desktopsChanged(desktops());
Q_EMIT desktopDataChanged(vd->id(), data);
Q_EMIT desktopsChanged(desktops());
}
);
DBusDesktopDataStruct data{.position = vd->x11DesktopNumber() - 1, .id = vd->id(), .name = vd->name()};
emit desktopCreated(vd->id(), data);
emit desktopsChanged(desktops());
Q_EMIT desktopCreated(vd->id(), data);
Q_EMIT desktopsChanged(desktops());
}
);
connect(m_manager, &VirtualDesktopManager::desktopRemoved, this,
[this](VirtualDesktop *vd) {
emit desktopRemoved(vd->id());
emit desktopsChanged(desktops());
Q_EMIT desktopRemoved(vd->id());
Q_EMIT desktopsChanged(desktops());
}
);
}

View file

@ -1531,21 +1531,21 @@ void InputDeviceModel::setupDeviceConnections(LibInput::Device *device)
[this, device] {
const QModelIndex parent = index(m_devices.indexOf(device), 0, QModelIndex());
const QModelIndex child = index(device->metaObject()->indexOfProperty("enabled"), 1, parent);
emit dataChanged(child, child, QVector<int>{Qt::DisplayRole});
Q_EMIT dataChanged(child, child, QVector<int>{Qt::DisplayRole});
}
);
connect(device, &LibInput::Device::leftHandedChanged, this,
[this, device] {
const QModelIndex parent = index(m_devices.indexOf(device), 0, QModelIndex());
const QModelIndex child = index(device->metaObject()->indexOfProperty("leftHanded"), 1, parent);
emit dataChanged(child, child, QVector<int>{Qt::DisplayRole});
Q_EMIT dataChanged(child, child, QVector<int>{Qt::DisplayRole});
}
);
connect(device, &LibInput::Device::pointerAccelerationChanged, this,
[this, device] {
const QModelIndex parent = index(m_devices.indexOf(device), 0, QModelIndex());
const QModelIndex child = index(device->metaObject()->indexOfProperty("pointerAcceleration"), 1, parent);
emit dataChanged(child, child, QVector<int>{Qt::DisplayRole});
Q_EMIT dataChanged(child, child, QVector<int>{Qt::DisplayRole});
}
);
}

View file

@ -56,7 +56,7 @@ QRegion DecorationRenderer::damage() const
void DecorationRenderer::addDamage(const QRegion &region)
{
m_damage += region;
emit damaged(region);
Q_EMIT damaged(region);
}
void DecorationRenderer::resetDamage()

View file

@ -34,7 +34,7 @@ DecoratedClientImpl::DecoratedClientImpl(AbstractClient *client, KDecoration2::D
client->setDecoratedClient(QPointer<DecoratedClientImpl>(this));
connect(client, &AbstractClient::activeChanged, this,
[decoratedClient, client]() {
emit decoratedClient->activeChanged(client->isActive());
Q_EMIT decoratedClient->activeChanged(client->isActive());
}
);
connect(client, &AbstractClient::clientGeometryChanged, this,
@ -45,27 +45,27 @@ DecoratedClientImpl::DecoratedClientImpl(AbstractClient *client, KDecoration2::D
const auto oldSize = m_clientSize;
m_clientSize = m_client->clientSize();
if (oldSize.width() != m_clientSize.width()) {
emit decoratedClient->widthChanged(m_clientSize.width());
Q_EMIT decoratedClient->widthChanged(m_clientSize.width());
}
if (oldSize.height() != m_clientSize.height()) {
emit decoratedClient->heightChanged(m_clientSize.height());
Q_EMIT decoratedClient->heightChanged(m_clientSize.height());
}
emit decoratedClient->sizeChanged(m_clientSize);
Q_EMIT decoratedClient->sizeChanged(m_clientSize);
}
);
connect(client, &AbstractClient::desktopChanged, this,
[decoratedClient, client]() {
emit decoratedClient->onAllDesktopsChanged(client->isOnAllDesktops());
Q_EMIT decoratedClient->onAllDesktopsChanged(client->isOnAllDesktops());
}
);
connect(client, &AbstractClient::captionChanged, this,
[decoratedClient, client]() {
emit decoratedClient->captionChanged(client->caption());
Q_EMIT decoratedClient->captionChanged(client->caption());
}
);
connect(client, &AbstractClient::iconChanged, this,
[decoratedClient, client]() {
emit decoratedClient->iconChanged(client->icon());
Q_EMIT decoratedClient->iconChanged(client->icon());
}
);
connect(client, &AbstractClient::shadeChanged, this,
@ -74,7 +74,7 @@ DecoratedClientImpl::DecoratedClientImpl(AbstractClient *client, KDecoration2::D
connect(client, &AbstractClient::keepBelowChanged, decoratedClient, &KDecoration2::DecoratedClient::keepBelowChanged);
connect(client, &AbstractClient::quickTileModeChanged, decoratedClient,
[this, decoratedClient]() {
emit decoratedClient->adjacentScreenEdgesChanged(adjacentScreenEdges());
Q_EMIT decoratedClient->adjacentScreenEdgesChanged(adjacentScreenEdges());
}
);
connect(client, &AbstractClient::closeableChanged, decoratedClient, &KDecoration2::DecoratedClient::closeableChanged);
@ -107,7 +107,7 @@ DecoratedClientImpl::~DecoratedClientImpl()
}
void DecoratedClientImpl::signalShadeChange() {
emit decoratedClient()->shadedChanged(m_client->isShade());
Q_EMIT decoratedClient()->shadedChanged(m_client->isShade());
}
#define DELEGATE(type, name, clientName) \

View file

@ -40,7 +40,7 @@ SettingsImpl::SettingsImpl(KDecoration2::DecorationSettings *parent)
if (previous != 1 && current != 1) {
return;
}
emit parent->onAllDesktopsAvailableChanged(current > 1);
Q_EMIT parent->onAllDesktopsAvailableChanged(current > 1);
}
);
// prevent changes in Decoration due to Compositor being destroyed
@ -151,7 +151,7 @@ void SettingsImpl::readSettings()
}));
if (left != m_leftButtons) {
m_leftButtons = left;
emit decorationSettings()->decorationButtonsLeftChanged(m_leftButtons);
Q_EMIT decorationSettings()->decorationButtonsLeftChanged(m_leftButtons);
}
const auto &right = readDecorationButtons(config, "ButtonsOnRight", QVector<KDecoration2::DecorationButtonType >({
KDecoration2::DecorationButtonType::ContextHelp,
@ -161,13 +161,13 @@ void SettingsImpl::readSettings()
}));
if (right != m_rightButtons) {
m_rightButtons = right;
emit decorationSettings()->decorationButtonsRightChanged(m_rightButtons);
Q_EMIT decorationSettings()->decorationButtonsRightChanged(m_rightButtons);
}
ApplicationMenu::self()->setViewEnabled(left.contains(KDecoration2::DecorationButtonType::ApplicationMenu) || right.contains(KDecoration2::DecorationButtonType::ApplicationMenu));
const bool close = config.readEntry("CloseOnDoubleClickOnMenu", false);
if (close != m_closeDoubleClickMenu) {
m_closeDoubleClickMenu = close;
emit decorationSettings()->closeOnDoubleClickOnMenuChanged(m_closeDoubleClickMenu);
Q_EMIT decorationSettings()->closeOnDoubleClickOnMenuChanged(m_closeDoubleClickMenu);
}
m_autoBorderSize = config.readEntry("BorderSizeAuto", true);
@ -178,15 +178,15 @@ void SettingsImpl::readSettings()
}
if (size != m_borderSize) {
m_borderSize = size;
emit decorationSettings()->borderSizeChanged(m_borderSize);
Q_EMIT decorationSettings()->borderSizeChanged(m_borderSize);
}
const QFont font = QFontDatabase::systemFont(QFontDatabase::TitleFont);
if (font != m_font) {
m_font = font;
emit decorationSettings()->fontChanged(m_font);
Q_EMIT decorationSettings()->fontChanged(m_font);
}
emit decorationSettings()->reconfigured();
Q_EMIT decorationSettings()->reconfigured();
}
}

View file

@ -91,7 +91,7 @@ void Deleted::copyToDeleted(Toplevel* c)
m_minimized = client->isMinimized();
m_modal = client->isModal();
m_mainClients = client->mainClients();
foreach (AbstractClient *c, m_mainClients) {
Q_FOREACH (AbstractClient *c, m_mainClients) {
connect(c, &AbstractClient::windowClosed, this, &Deleted::mainClientClosed);
}
m_fullscreen = client->isFullScreen();

View file

@ -158,7 +158,7 @@ bool BuiltInEffectLoader::loadEffect(const QString &name, BuiltInEffect effect,
}
);
qCDebug(KWIN_CORE) << "Successfully loaded built-in effect: " << name;
emit effectLoaded(e, name);
Q_EMIT effectLoaded(e, name);
return true;
}
@ -248,7 +248,7 @@ bool ScriptedEffectLoader::loadEffect(const KPluginMetaData &effect, LoadEffectF
);
qCDebug(KWIN_CORE) << "Successfully loaded scripted effect: " << name;
emit effectLoaded(e, name);
Q_EMIT effectLoaded(e, name);
m_loadedEffects << name;
return true;
}
@ -428,7 +428,7 @@ bool PluginEffectLoader::loadEffect(const KPluginMetaData &info, LoadEffectFlags
}
);
qCDebug(KWIN_CORE) << "Successfully loaded plugin effect: " << name;
emit effectLoaded(e, name);
Q_EMIT effectLoaded(e, name);
return true;
}

View file

@ -144,9 +144,9 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
[this](int old, AbstractClient *c) {
const int newDesktop = VirtualDesktopManager::self()->current();
if (old != 0 && newDesktop != old) {
emit desktopChanged(old, newDesktop, c ? c->effectWindow() : nullptr);
Q_EMIT desktopChanged(old, newDesktop, c ? c->effectWindow() : nullptr);
// TODO: remove in 4.10
emit desktopChanged(old, newDesktop);
Q_EMIT desktopChanged(old, newDesktop);
}
}
);
@ -155,7 +155,7 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
if (!c->effectWindow()) {
return;
}
emit desktopPresenceChanged(c->effectWindow(), old, c->desktop());
Q_EMIT desktopPresenceChanged(c->effectWindow(), old, c->desktop());
}
);
connect(ws, &Workspace::clientAdded, this,
@ -175,17 +175,17 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
connect(ws, &Workspace::internalClientAdded, this,
[this](InternalClient *client) {
setupClientConnections(client);
emit windowAdded(client->effectWindow());
Q_EMIT windowAdded(client->effectWindow());
}
);
connect(ws, &Workspace::clientActivated, this,
[this](KWin::AbstractClient *c) {
emit windowActivated(c ? c->effectWindow() : nullptr);
Q_EMIT windowActivated(c ? c->effectWindow() : nullptr);
}
);
connect(ws, &Workspace::deletedRemoved, this,
[this](KWin::Deleted *d) {
emit windowDeleted(d->effectWindow());
Q_EMIT windowDeleted(d->effectWindow());
elevated_windows.removeAll(d->effectWindow());
}
);
@ -232,7 +232,7 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
} else {
m_x11WindowPropertyNotify.reset();
}
emit xcbConnectionChanged();
Q_EMIT xcbConnectionChanged();
}
);
@ -290,17 +290,17 @@ void EffectsHandlerImpl::setupClientConnections(AbstractClient* c)
this, &EffectsHandlerImpl::slotClientMaximized);
connect(c, &AbstractClient::clientStartUserMovedResized, this,
[this](AbstractClient *c) {
emit windowStartUserMovedResized(c->effectWindow());
Q_EMIT windowStartUserMovedResized(c->effectWindow());
}
);
connect(c, &AbstractClient::clientStepUserMovedResized, this,
[this](AbstractClient *c, const QRect &geometry) {
emit windowStepUserMovedResized(c->effectWindow(), geometry);
Q_EMIT windowStepUserMovedResized(c->effectWindow(), geometry);
}
);
connect(c, &AbstractClient::clientFinishUserMovedResized, this,
[this](AbstractClient *c) {
emit windowFinishUserMovedResized(c->effectWindow());
Q_EMIT windowFinishUserMovedResized(c->effectWindow());
}
);
connect(c, &AbstractClient::opacityChanged, this, &EffectsHandlerImpl::slotOpacityChanged);
@ -308,7 +308,7 @@ void EffectsHandlerImpl::setupClientConnections(AbstractClient* c)
[this](AbstractClient *c, bool animate) {
// TODO: notify effects even if it should not animate?
if (animate) {
emit windowMinimized(c->effectWindow());
Q_EMIT windowMinimized(c->effectWindow());
}
}
);
@ -316,7 +316,7 @@ void EffectsHandlerImpl::setupClientConnections(AbstractClient* c)
[this](AbstractClient* c, bool animate) {
// TODO: notify effects even if it should not animate?
if (animate) {
emit windowUnminimized(c->effectWindow());
Q_EMIT windowUnminimized(c->effectWindow());
}
}
);
@ -326,38 +326,38 @@ void EffectsHandlerImpl::setupClientConnections(AbstractClient* c)
connect(c, &AbstractClient::damaged, this, &EffectsHandlerImpl::slotWindowDamaged);
connect(c, &AbstractClient::unresponsiveChanged, this,
[this, c](bool unresponsive) {
emit windowUnresponsiveChanged(c->effectWindow(), unresponsive);
Q_EMIT windowUnresponsiveChanged(c->effectWindow(), unresponsive);
}
);
connect(c, &AbstractClient::windowShown, this,
[this](Toplevel *c) {
emit windowShown(c->effectWindow());
Q_EMIT windowShown(c->effectWindow());
}
);
connect(c, &AbstractClient::windowHidden, this,
[this](Toplevel *c) {
emit windowHidden(c->effectWindow());
Q_EMIT windowHidden(c->effectWindow());
}
);
connect(c, &AbstractClient::keepAboveChanged, this,
[this, c](bool above) {
Q_UNUSED(above)
emit windowKeepAboveChanged(c->effectWindow());
Q_EMIT windowKeepAboveChanged(c->effectWindow());
}
);
connect(c, &AbstractClient::keepBelowChanged, this,
[this, c](bool below) {
Q_UNUSED(below)
emit windowKeepBelowChanged(c->effectWindow());
Q_EMIT windowKeepBelowChanged(c->effectWindow());
}
);
connect(c, &AbstractClient::fullScreenChanged, this,
[this, c]() {
emit windowFullScreenChanged(c->effectWindow());
Q_EMIT windowFullScreenChanged(c->effectWindow());
}
);
connect(c, &AbstractClient::visibleGeometryChanged, this, [this, c]() {
emit windowExpandedGeometryChanged(c->effectWindow());
Q_EMIT windowExpandedGeometryChanged(c->effectWindow());
});
}
@ -369,7 +369,7 @@ void EffectsHandlerImpl::setupUnmanagedConnections(Unmanaged* u)
connect(u, &Unmanaged::frameGeometryChanged, this, &EffectsHandlerImpl::slotFrameGeometryChanged);
connect(u, &Unmanaged::damaged, this, &EffectsHandlerImpl::slotWindowDamaged);
connect(u, &Unmanaged::visibleGeometryChanged, this, [this, u]() {
emit windowExpandedGeometryChanged(u->effectWindow());
Q_EMIT windowExpandedGeometryChanged(u->effectWindow());
});
}
@ -544,7 +544,7 @@ void EffectsHandlerImpl::slotClientMaximized(KWin::AbstractClient *c, MaximizeMo
break;
}
if (EffectWindowImpl *w = c->effectWindow()) {
emit windowMaximizedStateChanged(w, horizontal, vertical);
Q_EMIT windowMaximizedStateChanged(w, horizontal, vertical);
}
}
@ -553,7 +553,7 @@ void EffectsHandlerImpl::slotOpacityChanged(Toplevel *t, qreal oldOpacity)
if (t->opacity() == oldOpacity || !t->effectWindow()) {
return;
}
emit windowOpacityChanged(t->effectWindow(), oldOpacity, (qreal)t->opacity());
Q_EMIT windowOpacityChanged(t->effectWindow(), oldOpacity, (qreal)t->opacity());
}
void EffectsHandlerImpl::slotClientShown(KWin::Toplevel *t)
@ -562,7 +562,7 @@ void EffectsHandlerImpl::slotClientShown(KWin::Toplevel *t)
AbstractClient *c = static_cast<AbstractClient *>(t);
disconnect(c, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotClientShown);
setupClientConnections(c);
emit windowAdded(c->effectWindow());
Q_EMIT windowAdded(c->effectWindow());
}
void EffectsHandlerImpl::slotUnmanagedShown(KWin::Toplevel *t)
@ -570,35 +570,35 @@ void EffectsHandlerImpl::slotUnmanagedShown(KWin::Toplevel *t)
Q_ASSERT(qobject_cast<Unmanaged *>(t));
Unmanaged *u = static_cast<Unmanaged*>(t);
setupUnmanagedConnections(u);
emit windowAdded(u->effectWindow());
Q_EMIT windowAdded(u->effectWindow());
}
void EffectsHandlerImpl::slotWindowClosed(KWin::Toplevel *c, KWin::Deleted *d)
{
c->disconnect(this);
if (d) {
emit windowClosed(c->effectWindow());
Q_EMIT windowClosed(c->effectWindow());
}
}
void EffectsHandlerImpl::slotClientModalityChanged()
{
emit windowModalityChanged(static_cast<X11Client *>(sender())->effectWindow());
Q_EMIT windowModalityChanged(static_cast<X11Client *>(sender())->effectWindow());
}
void EffectsHandlerImpl::slotCurrentTabAboutToChange(EffectWindow *from, EffectWindow *to)
{
emit currentTabAboutToChange(from, to);
Q_EMIT currentTabAboutToChange(from, to);
}
void EffectsHandlerImpl::slotTabAdded(EffectWindow* w, EffectWindow* to)
{
emit tabAdded(w, to);
Q_EMIT tabAdded(w, to);
}
void EffectsHandlerImpl::slotTabRemoved(EffectWindow *w, EffectWindow* leaderOfFormerGroup)
{
emit tabRemoved(w, leaderOfFormerGroup);
Q_EMIT tabRemoved(w, leaderOfFormerGroup);
}
void EffectsHandlerImpl::slotWindowDamaged(Toplevel* t, const QRegion& r)
@ -607,7 +607,7 @@ void EffectsHandlerImpl::slotWindowDamaged(Toplevel* t, const QRegion& r)
// can happen during tear down of window
return;
}
emit windowDamaged(t->effectWindow(), r);
Q_EMIT windowDamaged(t->effectWindow(), r);
}
void EffectsHandlerImpl::slotGeometryShapeChanged(Toplevel* t, const QRect& old)
@ -616,14 +616,14 @@ void EffectsHandlerImpl::slotGeometryShapeChanged(Toplevel* t, const QRect& old)
// in some functions that may still call this
if (t == nullptr || t->effectWindow() == nullptr)
return;
emit windowGeometryShapeChanged(t->effectWindow(), old);
Q_EMIT windowGeometryShapeChanged(t->effectWindow(), old);
}
void EffectsHandlerImpl::slotFrameGeometryChanged(Toplevel *toplevel, const QRect &oldGeometry)
{
// effectWindow() might be nullptr during tear down of the client.
if (toplevel->effectWindow()) {
emit windowFrameGeometryChanged(toplevel->effectWindow(), oldGeometry);
Q_EMIT windowFrameGeometryChanged(toplevel->effectWindow(), oldGeometry);
}
}
@ -634,9 +634,9 @@ void EffectsHandlerImpl::setActiveFullScreenEffect(Effect* e)
}
const bool activeChanged = (e == nullptr || fullscreen_effect == nullptr);
fullscreen_effect = e;
emit activeFullScreenEffectChanged();
Q_EMIT activeFullScreenEffectChanged();
if (activeChanged) {
emit hasActiveFullScreenEffectChanged();
Q_EMIT hasActiveFullScreenEffectChanged();
}
}
@ -804,7 +804,7 @@ bool EffectsHandlerImpl::hasKeyboardGrab() const
void EffectsHandlerImpl::desktopResized(const QSize &size)
{
m_scene->screenGeometryChanged(size);
emit screenGeometryChanged(size);
Q_EMIT screenGeometryChanged(size);
}
void EffectsHandlerImpl::registerPropertyType(long atom, bool reg)
@ -1268,7 +1268,7 @@ bool EffectsHandlerImpl::checkInputWindowEvent(QMouseEvent *e)
if (m_grabbedMouseEffects.isEmpty()) {
return false;
}
foreach (Effect *effect, m_grabbedMouseEffects) {
Q_FOREACH (Effect *effect, m_grabbedMouseEffects) {
effect->windowInputMouseEvent(e);
}
return true;
@ -1279,7 +1279,7 @@ bool EffectsHandlerImpl::checkInputWindowEvent(QWheelEvent *e)
if (m_grabbedMouseEffects.isEmpty()) {
return false;
}
foreach (Effect *effect, m_grabbedMouseEffects) {
Q_FOREACH (Effect *effect, m_grabbedMouseEffects) {
effect->windowInputMouseEvent(e);
}
return true;
@ -1733,7 +1733,7 @@ void EffectsHandlerImpl::slotOutputEnabled(AbstractOutput *output)
{
EffectScreen *screen = new EffectScreenImpl(output, this);
m_effectScreens.append(screen);
emit screenAdded(screen);
Q_EMIT screenAdded(screen);
}
void EffectsHandlerImpl::slotOutputDisabled(AbstractOutput *output)
@ -1744,7 +1744,7 @@ void EffectsHandlerImpl::slotOutputDisabled(AbstractOutput *output)
if (it != m_effectScreens.end()) {
EffectScreen *screen = *it;
m_effectScreens.erase(it);
emit screenRemoved(screen);
Q_EMIT screenRemoved(screen);
delete screen;
}
}
@ -2122,7 +2122,7 @@ void EffectWindowImpl::setData(int role, const QVariant &data)
dataMap[ role ] = data;
else
dataMap.remove(role);
emit effects->windowDataChanged(this, role);
Q_EMIT effects->windowDataChanged(this, role);
}
QVariant EffectWindowImpl::data(int role) const

View file

@ -62,7 +62,7 @@ BlurEffect::BlurEffect()
);
// Fetch the blur regions for all windows
foreach (EffectWindow *window, effects->stackingOrder())
Q_FOREACH (EffectWindow *window, effects->stackingOrder())
updateBlurRegion(window);
}
@ -77,7 +77,7 @@ void BlurEffect::slotScreenGeometryChanged()
updateTexture();
// Fetch the blur regions for all windows
foreach (EffectWindow *window, effects->stackingOrder())
Q_FOREACH (EffectWindow *window, effects->stackingOrder())
updateBlurRegion(window);
effects->doneOpenGLContextCurrent();
}

View file

@ -141,7 +141,7 @@ void CoverSwitchEffect::paintScreen(int mask, const QRegion &region, ScreenPaint
if (index >= tempList.count())
index = index % tempList.count();
}
foreach (Direction direction, scheduled_directions) {
Q_FOREACH (Direction direction, scheduled_directions) {
if (direction == Right)
index++;
else
@ -287,7 +287,7 @@ void CoverSwitchEffect::postPaintScreen()
if (stop) {
stop = false;
effects->setActiveFullScreenEffect(nullptr);
foreach (EffectWindow * window, referrencedWindows) {
Q_FOREACH (EffectWindow * window, referrencedWindows) {
window->unrefWindow();
}
referrencedWindows.clear();

View file

@ -111,13 +111,13 @@ bool CubeEffect::supported()
void CubeEffect::reconfigure(ReconfigureFlags)
{
CubeConfig::self()->read();
foreach (ElectricBorder border, borderActivate) {
Q_FOREACH (ElectricBorder border, borderActivate) {
effects->unreserveElectricBorder(border, this);
}
foreach (ElectricBorder border, borderActivateCylinder) {
Q_FOREACH (ElectricBorder border, borderActivateCylinder) {
effects->unreserveElectricBorder(border, this);
}
foreach (ElectricBorder border, borderActivateSphere) {
Q_FOREACH (ElectricBorder border, borderActivateSphere) {
effects->unreserveElectricBorder(border, this);
}
borderActivate.clear();
@ -126,21 +126,21 @@ void CubeEffect::reconfigure(ReconfigureFlags)
QList<int> borderList = QList<int>();
borderList.append(int(ElectricNone));
borderList = CubeConfig::borderActivate();
foreach (int i, borderList) {
Q_FOREACH (int i, borderList) {
borderActivate.append(ElectricBorder(i));
effects->reserveElectricBorder(ElectricBorder(i), this);
}
borderList.clear();
borderList.append(int(ElectricNone));
borderList = CubeConfig::borderActivateCylinder();
foreach (int i, borderList) {
Q_FOREACH (int i, borderList) {
borderActivateCylinder.append(ElectricBorder(i));
effects->reserveElectricBorder(ElectricBorder(i), this);
}
borderList.clear();
borderList.append(int(ElectricNone));
borderList = CubeConfig::borderActivateSphere();
foreach (int i, borderList) {
Q_FOREACH (int i, borderList) {
borderActivateSphere.append(ElectricBorder(i));
effects->reserveElectricBorder(ElectricBorder(i), this);
}
@ -1129,7 +1129,7 @@ void CubeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPa
if (w->isOnDesktop(prev_desktop) && (mask & PAINT_WINDOW_TRANSFORMED)) {
QRect rect = effects->clientArea(FullArea, activeScreen, prev_desktop);
WindowQuadList new_quads;
foreach (const WindowQuad & quad, data.quads) {
Q_FOREACH (const WindowQuad & quad, data.quads) {
if (quad.right() > rect.width() - w->x()) {
new_quads.append(quad);
}
@ -1140,7 +1140,7 @@ void CubeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPa
if (w->isOnDesktop(next_desktop) && (mask & PAINT_WINDOW_TRANSFORMED)) {
QRect rect = effects->clientArea(FullArea, activeScreen, next_desktop);
WindowQuadList new_quads;
foreach (const WindowQuad & quad, data.quads) {
Q_FOREACH (const WindowQuad & quad, data.quads) {
if (w->x() + quad.right() <= rect.x()) {
new_quads.append(quad);
}
@ -1177,7 +1177,7 @@ void CubeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPa
if (w->isOnDesktop(painting_desktop) && w->x() < rect.x()) {
WindowQuadList new_quads;
foreach (const WindowQuad & quad, data.quads) {
Q_FOREACH (const WindowQuad & quad, data.quads) {
if (quad.right() > -w->x()) {
new_quads.append(quad);
}
@ -1186,7 +1186,7 @@ void CubeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPa
}
if (w->isOnDesktop(painting_desktop) && w->x() + w->width() > rect.x() + rect.width()) {
WindowQuadList new_quads;
foreach (const WindowQuad & quad, data.quads) {
Q_FOREACH (const WindowQuad & quad, data.quads) {
if (quad.right() <= rect.width() - w->x()) {
new_quads.append(quad);
}
@ -1195,7 +1195,7 @@ void CubeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPa
}
if (w->y() < rect.y()) {
WindowQuadList new_quads;
foreach (const WindowQuad & quad, data.quads) {
Q_FOREACH (const WindowQuad & quad, data.quads) {
if (quad.bottom() > -w->y()) {
new_quads.append(quad);
}
@ -1204,7 +1204,7 @@ void CubeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPa
}
if (w->y() + w->height() > rect.y() + rect.height()) {
WindowQuadList new_quads;
foreach (const WindowQuad & quad, data.quads) {
Q_FOREACH (const WindowQuad & quad, data.quads) {
if (quad.bottom() <= rect.height() - w->y()) {
new_quads.append(quad);
}
@ -1537,7 +1537,7 @@ void CubeEffect::rotateToDesktop(int desktop)
void CubeEffect::setActive(bool active)
{
foreach (CubeInsideEffect * inside, m_cubeInsideEffects) {
Q_FOREACH (CubeInsideEffect * inside, m_cubeInsideEffects) {
inside->setActive(true);
}
if (active) {

View file

@ -248,7 +248,7 @@ void CubeSlideEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
if (w->isOnDesktop(painting_desktop)) {
if (w->x() < rect.x()) {
WindowQuadList new_quads;
foreach (const WindowQuad & quad, data.quads) {
Q_FOREACH (const WindowQuad & quad, data.quads) {
if (quad.right() > -w->x()) {
new_quads.append(quad);
}
@ -257,7 +257,7 @@ void CubeSlideEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
}
if (w->x() + w->width() > rect.x() + rect.width()) {
WindowQuadList new_quads;
foreach (const WindowQuad & quad, data.quads) {
Q_FOREACH (const WindowQuad & quad, data.quads) {
if (quad.right() <= rect.width() - w->x()) {
new_quads.append(quad);
}
@ -266,7 +266,7 @@ void CubeSlideEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
}
if (w->y() < rect.y()) {
WindowQuadList new_quads;
foreach (const WindowQuad & quad, data.quads) {
Q_FOREACH (const WindowQuad & quad, data.quads) {
if (quad.bottom() > -w->y()) {
new_quads.append(quad);
}
@ -275,7 +275,7 @@ void CubeSlideEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
}
if (w->y() + w->height() > rect.y() + rect.height()) {
WindowQuadList new_quads;
foreach (const WindowQuad & quad, data.quads) {
Q_FOREACH (const WindowQuad & quad, data.quads) {
if (quad.bottom() <= rect.height() - w->y()) {
new_quads.append(quad);
}
@ -290,7 +290,7 @@ void CubeSlideEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
(direction == Left || direction == Right)) {
WindowQuadList new_quads;
data.setXTranslation(rect.width());
foreach (const WindowQuad & quad, data.quads) {
Q_FOREACH (const WindowQuad & quad, data.quads) {
if (quad.right() <= -w->x()) {
new_quads.append(quad);
}
@ -301,7 +301,7 @@ void CubeSlideEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
(direction == Left || direction == Right)) {
WindowQuadList new_quads;
data.setXTranslation(-rect.width());
foreach (const WindowQuad & quad, data.quads) {
Q_FOREACH (const WindowQuad & quad, data.quads) {
if (quad.right() > rect.width() - w->x()) {
new_quads.append(quad);
}
@ -312,7 +312,7 @@ void CubeSlideEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
(direction == Upwards || direction == Downwards)) {
WindowQuadList new_quads;
data.setYTranslation(rect.height());
foreach (const WindowQuad & quad, data.quads) {
Q_FOREACH (const WindowQuad & quad, data.quads) {
if (quad.bottom() <= -w->y()) {
new_quads.append(quad);
}
@ -323,7 +323,7 @@ void CubeSlideEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
(direction == Upwards || direction == Downwards)) {
WindowQuadList new_quads;
data.setYTranslation(-rect.height());
foreach (const WindowQuad & quad, data.quads) {
Q_FOREACH (const WindowQuad & quad, data.quads) {
if (quad.bottom() > rect.height() - w->y()) {
new_quads.append(quad);
}

View file

@ -107,11 +107,11 @@ void DesktopGridEffect::reconfigure(ReconfigureFlags)
{
DesktopGridConfig::self()->read();
foreach (ElectricBorder border, borderActivate) {
Q_FOREACH (ElectricBorder border, borderActivate) {
effects->unreserveElectricBorder(border, this);
}
borderActivate.clear();
foreach (int i, DesktopGridConfig::borderActivate()) {
Q_FOREACH (int i, DesktopGridConfig::borderActivate()) {
borderActivate.append(ElectricBorder(i));
effects->reserveElectricBorder(ElectricBorder(i), this);
}
@ -218,7 +218,7 @@ void DesktopGridEffect::paintScreen(int mask, const QRegion &region, ScreenPaint
for (int screen = 0; screen < effects->numScreens(); screen++) {
QRect screenGeom = effects->clientArea(ScreenArea, screen, 0);
int desktop = 1;
foreach (EffectFrame * frame, desktopNames) {
Q_FOREACH (EffectFrame * frame, desktopNames) {
QPointF posTL(scalePos(screenGeom.topLeft(), desktop, screen));
QPointF posBR(scalePos(screenGeom.bottomRight(), desktop, screen));
QRect textArea(posTL.x(), posTL.y(), posBR.x() - posTL.x(), posBR.y() - posTL.y());
@ -384,7 +384,7 @@ void DesktopGridEffect::slotWindowAdded(EffectWindow* w)
if (isUsingPresentWindows()) {
if (!isRelevantWithPresentWindows(w))
return; // don't add
foreach (const int i, desktopList(w)) {
Q_FOREACH (const int i, desktopList(w)) {
WindowMotionManager& manager = m_managers[ i*effects->numScreens()+w->screen()];
manager.manage(w);
m_proxy->calculateWindowTransformations(manager.managedWindows(), w->screen(), manager);
@ -402,7 +402,7 @@ void DesktopGridEffect::slotWindowClosed(EffectWindow* w)
windowMove = nullptr;
}
if (isUsingPresentWindows()) {
foreach (const int i, desktopList(w)) {
Q_FOREACH (const int i, desktopList(w)) {
WindowMotionManager& manager = m_managers[i*effects->numScreens()+w->screen()];
manager.unmanage(w);
m_proxy->calculateWindowTransformations(manager.managedWindows(), w->screen(), manager);
@ -431,7 +431,7 @@ void DesktopGridEffect::slotWindowFrameGeometryChanged(EffectWindow* w, const QR
if (w == windowMove && wasWindowMove)
return;
if (isUsingPresentWindows()) {
foreach (const int i, desktopList(w)) {
Q_FOREACH (const int i, desktopList(w)) {
WindowMotionManager& manager = m_managers[i*effects->numScreens()+w->screen()];
m_proxy->calculateWindowTransformations(manager.managedWindows(), w->screen(), manager);
}
@ -466,7 +466,7 @@ void DesktopGridEffect::windowInputMouseEvent(QEvent* e)
}
if (!wasWindowMove) { // Activate on move
if (isUsingPresentWindows()) {
foreach (const int i, desktopList(windowMove)) {
Q_FOREACH (const int i, desktopList(windowMove)) {
WindowMotionManager& manager = m_managers[(i)*(effects->numScreens()) + windowMove->screen()];
if ((i + 1) == sourceDesktop) {
const QRectF transformedGeo = manager.transformedGeometry(windowMove);
@ -539,7 +539,7 @@ void DesktopGridEffect::windowInputMouseEvent(QEvent* e)
for (int i = 0; i < 3; ++i ) {
if (desks[i] == desks[i+1])
continue;
foreach (EffectWindow *w, stack[i]) {
Q_FOREACH (EffectWindow *w, stack[i]) {
auto desktops = w->desktops();
desktops.removeOne(desks[i]);
desktops.append(desks[i+1]);
@ -636,7 +636,7 @@ void DesktopGridEffect::windowInputMouseEvent(QEvent* e)
if (windowMove) {
if (wasWindowMove && isUsingPresentWindows()) {
const int targetDesktop = posToDesktop(cursorPos());
foreach (const int i, desktopList(windowMove)) {
Q_FOREACH (const int i, desktopList(windowMove)) {
WindowMotionManager& manager = m_managers[(i)*(effects->numScreens()) + windowMove->screen()];
manager.manage(windowMove);
if (EffectWindow* modal = windowMove->findModal())
@ -861,12 +861,12 @@ EffectWindow* DesktopGridEffect::windowAt(QPoint pos) const
m_managers.at((desktop - 1) * (effects->numScreens()) + screen).windowAtPoint(pos, false);
if (w)
return w;
foreach (EffectWindow * w, windows) {
Q_FOREACH (EffectWindow * w, windows) {
if (w->isOnDesktop(desktop) && w->isDesktop() && w->frameGeometry().contains(pos))
return w;
}
} else {
foreach (EffectWindow * w, windows) {
Q_FOREACH (EffectWindow * w, windows) {
if (w->isOnDesktop(desktop) && w->isOnCurrentActivity() && !w->isMinimized() && w->frameGeometry().contains(pos))
return w;
}
@ -1026,7 +1026,7 @@ void DesktopGridEffect::setActive(bool active)
if (isUsingPresentWindows()) {
QList<WindowMotionManager>::iterator it;
for (it = m_managers.begin(); it != m_managers.end(); ++it) {
foreach (EffectWindow * w, (*it).managedWindows()) {
Q_FOREACH (EffectWindow * w, (*it).managedWindows()) {
(*it).moveWindow(w, w->frameGeometry());
}
}
@ -1090,7 +1090,7 @@ void DesktopGridEffect::setup()
for (int i = 1; i <= effects->numberOfDesktops(); i++) {
for (int j = 0; j < effects->numScreens(); j++) {
WindowMotionManager manager;
foreach (EffectWindow * w, effects->stackingOrder()) {
Q_FOREACH (EffectWindow * w, effects->stackingOrder()) {
if (w->isOnDesktop(i) && w->screen() == j &&isRelevantWithPresentWindows(w)) {
manager.manage(w);
}
@ -1322,7 +1322,7 @@ void DesktopGridEffect::desktopsAdded(int old)
for (int i = old+1; i <= effects->numberOfDesktops(); ++i) {
for (int j = 0; j < effects->numScreens(); ++j) {
WindowMotionManager manager;
foreach (EffectWindow * w, effects->stackingOrder()) {
Q_FOREACH (EffectWindow * w, effects->stackingOrder()) {
if (w->isOnDesktop(i) && w->screen() == j &&isRelevantWithPresentWindows(w)) {
manager.manage(w);
}
@ -1360,7 +1360,7 @@ void DesktopGridEffect::desktopsRemoved(int old)
if (isUsingPresentWindows()) {
for (int j = 0; j < effects->numScreens(); ++j) {
WindowMotionManager& manager = m_managers[(desktop-1)*(effects->numScreens())+j ];
foreach (EffectWindow * w, effects->stackingOrder()) {
Q_FOREACH (EffectWindow * w, effects->stackingOrder()) {
if (manager.isManaging(w))
continue;
if (w->isOnDesktop(desktop) && w->screen() == j && isRelevantWithPresentWindows(w)) {

View file

@ -127,7 +127,7 @@ void FlipSwitchEffect::paintScreen(int mask, const QRegion &region, ScreenPaintD
// using stacking order directly is not possible
// as not each window in stacking order is shown
// TODO: store list instead of calculating in each frame?
foreach (EffectWindow * w, effects->stackingOrder()) {
Q_FOREACH (EffectWindow * w, effects->stackingOrder()) {
if (m_windows.contains(w))
tempList.append(w);
}
@ -137,7 +137,7 @@ void FlipSwitchEffect::paintScreen(int mask, const QRegion &region, ScreenPaintD
int tabIndex = index;
if (m_mode == TabboxMode) {
foreach (SwitchingDirection direction, m_scheduledDirections) { // krazy:exclude=foreach
Q_FOREACH (SwitchingDirection direction, m_scheduledDirections) { // krazy:exclude=foreach
if (direction == DirectionBackward)
index++;
else
@ -164,7 +164,7 @@ void FlipSwitchEffect::paintScreen(int mask, const QRegion &region, ScreenPaintD
m_flipOrderedWindows.append(w);
}
} else {
foreach (SwitchingDirection direction, m_scheduledDirections) { // krazy:exclude=foreach
Q_FOREACH (SwitchingDirection direction, m_scheduledDirections) { // krazy:exclude=foreach
if (direction == DirectionForward)
index++;
else
@ -229,7 +229,7 @@ void FlipSwitchEffect::paintScreen(int mask, const QRegion &region, ScreenPaintD
}
}
foreach (EffectWindow *w, m_flipOrderedWindows) {
Q_FOREACH (EffectWindow *w, m_flipOrderedWindows) {
ItemInfo *info = m_windows.value(w,0);
if (!info)
continue;
@ -513,7 +513,7 @@ void FlipSwitchEffect::setActive(bool activate, FlipSwitchMode mode)
}
m_mode = mode;
foreach (EffectWindow * w, effects->stackingOrder()) {
Q_FOREACH (EffectWindow * w, effects->stackingOrder()) {
if (isSelectableWindow(w) && !m_windows.contains(w))
m_windows[ w ] = new ItemInfo;
}

View file

@ -67,7 +67,7 @@ void InvertEffectConfig::load()
{
KCModule::load();
emit changed(false);
Q_EMIT changed(false);
}
void InvertEffectConfig::save()
@ -76,7 +76,7 @@ void InvertEffectConfig::save()
mShortcutEditor->save(); // undo() will restore to this state from now on
emit changed(false);
Q_EMIT changed(false);
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.KWin"),
QStringLiteral("/Effects"),
QDBusConnection::sessionBus());
@ -87,7 +87,7 @@ void InvertEffectConfig::defaults()
{
mShortcutEditor->allDefault();
emit changed(true);
Q_EMIT changed(true);
}

View file

@ -129,7 +129,7 @@ void MagicLampEffect::deform(EffectWindow* w, int mask, WindowPaintData& data, W
} else {
// Assumption: there is a panel containing the icon position
EffectWindow* panel = nullptr;
foreach (EffectWindow * window, effects->stackingOrder()) {
Q_FOREACH (EffectWindow * window, effects->stackingOrder()) {
if (!window->isDock())
continue;
// we have to use intersects as there seems to be a Plasma bug

View file

@ -78,7 +78,7 @@ void MouseClickEffect::prePaintScreen(ScreenPrePaintData& data, std::chrono::mil
{
const int time = m_lastPresentTime.count() ? (presentTime - m_lastPresentTime).count() : 0;
foreach (MouseEvent* click, m_clicks) {
Q_FOREACH (MouseEvent* click, m_clicks) {
click->m_time += time;
}
@ -111,7 +111,7 @@ void MouseClickEffect::paintScreen(int mask, const QRegion &region, ScreenPaintD
effects->paintScreen(mask, region, data);
paintScreenSetup(mask, region, data);
foreach (const MouseEvent* click, m_clicks) {
Q_FOREACH (const MouseEvent* click, m_clicks) {
for (int i = 0; i < m_ringCount; ++i) {
float alpha = computeAlpha(click, i);
float size = computeRadius(click, i);
@ -196,7 +196,7 @@ void MouseClickEffect::repaint()
if (m_clicks.size() > 0) {
QRegion dirtyRegion;
const int radius = m_ringMaxSize + m_lineWidth;
foreach (MouseEvent* click, m_clicks) {
Q_FOREACH (MouseEvent* click, m_clicks) {
dirtyRegion |= QRect(click->m_pos.x() - radius, click->m_pos.y() - radius, 2*radius, 2*radius);
if (click->m_frame) {
// we grant the plasma style 32px padding for stuff like shadows...

View file

@ -120,10 +120,10 @@ void MouseMarkEffect::paintScreen(int mask, const QRegion &region, ScreenPaintDa
ShaderBinder binder(ShaderTrait::UniformColor);
binder.shader()->setUniform(GLShader::ModelViewProjectionMatrix, data.projectionMatrix());
QVector<float> verts;
foreach (const Mark & mark, marks) {
Q_FOREACH (const Mark & mark, marks) {
verts.clear();
verts.reserve(mark.size() * 2);
foreach (const QPoint & p, mark) {
Q_FOREACH (const QPoint & p, mark) {
verts << p.x() << p.y();
}
vbo->setData(verts.size() / 2, 2, verts.data(), nullptr);
@ -132,7 +132,7 @@ void MouseMarkEffect::paintScreen(int mask, const QRegion &region, ScreenPaintDa
if (!drawing.isEmpty()) {
verts.clear();
verts.reserve(drawing.size() * 2);
foreach (const QPoint & p, drawing) {
Q_FOREACH (const QPoint & p, drawing) {
verts << p.x() << p.y();
}
vbo->setData(verts.size() / 2, 2, verts.data(), nullptr);
@ -174,7 +174,7 @@ void MouseMarkEffect::paintScreen(int mask, const QRegion &region, ScreenPaintDa
QPen pen(color);
pen.setWidth(width);
painter->setPen(pen);
foreach (const Mark &mark, marks) {
Q_FOREACH (const Mark &mark, marks) {
drawMark(painter, mark);
}
drawMark(painter, drawing);

View file

@ -126,24 +126,24 @@ PresentWindowsEffect::~PresentWindowsEffect()
void PresentWindowsEffect::reconfigure(ReconfigureFlags)
{
PresentWindowsConfig::self()->read();
foreach (ElectricBorder border, m_borderActivate) {
Q_FOREACH (ElectricBorder border, m_borderActivate) {
effects->unreserveElectricBorder(border, this);
}
foreach (ElectricBorder border, m_borderActivateAll) {
Q_FOREACH (ElectricBorder border, m_borderActivateAll) {
effects->unreserveElectricBorder(border, this);
}
m_borderActivate.clear();
m_borderActivateAll.clear();
foreach (int i, PresentWindowsConfig::borderActivate()) {
Q_FOREACH (int i, PresentWindowsConfig::borderActivate()) {
m_borderActivate.append(ElectricBorder(i));
effects->reserveElectricBorder(ElectricBorder(i), this);
}
foreach (int i, PresentWindowsConfig::borderActivateAll()) {
Q_FOREACH (int i, PresentWindowsConfig::borderActivateAll()) {
m_borderActivateAll.append(ElectricBorder(i));
effects->reserveElectricBorder(ElectricBorder(i), this);
}
foreach (int i, PresentWindowsConfig::borderActivateClass()) {
Q_FOREACH (int i, PresentWindowsConfig::borderActivateClass()) {
m_borderActivateClass.append(ElectricBorder(i));
effects->reserveElectricBorder(ElectricBorder(i), this);
}
@ -265,7 +265,7 @@ void PresentWindowsEffect::postPaintScreen()
}
m_windowData.clear();
foreach (EffectWindow * w, effects->stackingOrder()) {
Q_FOREACH (EffectWindow * w, effects->stackingOrder()) {
w->setData(WindowForceBlurRole, QVariant());
w->setData(WindowForceBackgroundContrastRole, QVariant());
}
@ -530,7 +530,7 @@ void PresentWindowsEffect::slotWindowClosed(EffectWindow *w)
rearrangeWindows();
foreach (EffectWindow *w, m_motionManager.managedWindows()) {
Q_FOREACH (EffectWindow *w, m_motionManager.managedWindows()) {
winData = m_windowData.find(w);
if (winData != m_windowData.end() && !winData->deleted)
return; // found one that is not deleted? then we go on
@ -972,7 +972,7 @@ void PresentWindowsEffect::rearrangeWindows()
if (m_windowFilter.isEmpty()) {
windowlist = m_motionManager.managedWindows();
foreach (EffectWindow * w, m_motionManager.managedWindows()) {
Q_FOREACH (EffectWindow * w, m_motionManager.managedWindows()) {
DataHash::iterator winData = m_windowData.find(w);
if (winData == m_windowData.end() || winData->deleted)
continue; // don't include closed windows
@ -981,7 +981,7 @@ void PresentWindowsEffect::rearrangeWindows()
}
} else {
// Can we move this filtering somewhere else?
foreach (EffectWindow * w, m_motionManager.managedWindows()) {
Q_FOREACH (EffectWindow * w, m_motionManager.managedWindows()) {
DataHash::iterator winData = m_windowData.find(w);
if (winData == m_windowData.end() || winData->deleted)
continue; // don't include closed windows
@ -1033,7 +1033,7 @@ void PresentWindowsEffect::rearrangeWindows()
// Resize text frames if required
QFontMetrics* metrics = nullptr; // All fonts are the same
foreach (EffectWindow * w, m_motionManager.managedWindows()) {
Q_FOREACH (EffectWindow * w, m_motionManager.managedWindows()) {
DataHash::iterator winData = m_windowData.find(w);
if (winData == m_windowData.end())
continue;
@ -1312,7 +1312,7 @@ void PresentWindowsEffect::calculateWindowTransformationsNatural(EffectWindowLis
// If windows do not overlap they scale into nothingness, fix by resetting. To reproduce
// just have a single window on a Xinerama screen or have two windows that do not touch.
// TODO: Work out why this happens, is most likely a bug in the manager.
foreach (EffectWindow * w, windowlist)
Q_FOREACH (EffectWindow * w, windowlist)
if (motionManager.transformedGeometry(w) == w->frameGeometry())
motionManager.reset(w);
@ -1335,7 +1335,7 @@ void PresentWindowsEffect::calculateWindowTransformationsNatural(EffectWindowLis
int direction = 0;
QHash<EffectWindow*, QRect> targets;
QHash<EffectWindow*, int> directions;
foreach (EffectWindow * w, windowlist) {
Q_FOREACH (EffectWindow * w, windowlist) {
bounds = bounds.united(w->frameGeometry());
targets[w] = w->frameGeometry();
// Reuse the unused "slot" as a preferred direction attribute. This is used when the window
@ -1351,9 +1351,9 @@ void PresentWindowsEffect::calculateWindowTransformationsNatural(EffectWindowLis
bool overlap;
do {
overlap = false;
foreach (EffectWindow * w, windowlist) {
Q_FOREACH (EffectWindow * w, windowlist) {
QRect *target_w = &targets[w];
foreach (EffectWindow * e, windowlist) {
Q_FOREACH (EffectWindow * e, windowlist) {
if (w == e)
continue;
@ -1454,7 +1454,7 @@ void PresentWindowsEffect::calculateWindowTransformationsNatural(EffectWindowLis
bool moved;
do {
moved = false;
foreach (EffectWindow * w, windowlist) {
Q_FOREACH (EffectWindow * w, windowlist) {
QRect oldRect;
QRect *target = &targets[w];
// This may cause some slight distortion if the windows are enlarged a large amount
@ -1531,7 +1531,7 @@ void PresentWindowsEffect::calculateWindowTransformationsNatural(EffectWindowLis
// The expanding code above can actually enlarge windows over 1.0/2.0 scale, we don't like this
// We can't add this to the loop above as it would cause a never-ending loop so we have to make
// do with the less-than-optimal space usage with using this method.
foreach (EffectWindow * w, windowlist) {
Q_FOREACH (EffectWindow * w, windowlist) {
QRect *target = &targets[w];
double scale = target->width() / double(w->width());
if (scale > 2.0 || (scale > 1.0 && (w->width() > 300 || w->height() > 300))) {
@ -1546,7 +1546,7 @@ void PresentWindowsEffect::calculateWindowTransformationsNatural(EffectWindowLis
}
// Notify the motion manager of the targets
foreach (EffectWindow * w, windowlist)
Q_FOREACH (EffectWindow * w, windowlist)
motionManager.moveWindow(w, targets.value(w));
}
@ -1597,7 +1597,7 @@ void PresentWindowsEffect::setActive(bool active)
}
// Add every single window to m_windowData (Just calling [w] creates it)
foreach (EffectWindow * w, effects->stackingOrder()) {
Q_FOREACH (EffectWindow * w, effects->stackingOrder()) {
DataHash::iterator winData;
if ((winData = m_windowData.find(w)) != m_windowData.end()) {
winData->visible = isVisibleWindow(w);
@ -1627,7 +1627,7 @@ void PresentWindowsEffect::setActive(bool active)
}
// Filter out special windows such as panels and taskbars
foreach (EffectWindow * w, effects->stackingOrder()) {
Q_FOREACH (EffectWindow * w, effects->stackingOrder()) {
if (isSelectableWindow(w)) {
m_motionManager.manage(w);
}
@ -1658,7 +1658,7 @@ void PresentWindowsEffect::setActive(bool active)
rearrangeWindows();
setHighlightedWindow(effects->activeWindow());
foreach (EffectWindow * w, effects->stackingOrder()) {
Q_FOREACH (EffectWindow * w, effects->stackingOrder()) {
w->setData(WindowForceBlurRole, QVariant(true));
w->setData(WindowForceBackgroundContrastRole, QVariant(true));
}
@ -1672,7 +1672,7 @@ void PresentWindowsEffect::setActive(bool active)
int desktop = effects->currentDesktop();
if (activeWindow && !activeWindow->isOnAllDesktops())
desktop = activeWindow->desktop();
foreach (EffectWindow * w, effects->stackingOrder()) {
Q_FOREACH (EffectWindow * w, effects->stackingOrder()) {
DataHash::iterator winData = m_windowData.find(w);
if (winData != m_windowData.end())
winData->visible = (w->isOnDesktop(desktop) || w->isOnAllDesktops()) &&
@ -1682,7 +1682,7 @@ void PresentWindowsEffect::setActive(bool active)
m_closeView->hide();
// Move all windows back to their original position
foreach (EffectWindow * w, m_motionManager.managedWindows())
Q_FOREACH (EffectWindow * w, m_motionManager.managedWindows())
m_motionManager.moveWindow(w, w->frameGeometry());
if (m_filterFrame) {
m_filterFrame->free();
@ -1853,7 +1853,7 @@ EffectWindow* PresentWindowsEffect::relativeWindow(EffectWindow *w, int xdiff, i
detectRect = QRect(0, wArea.y(), area.width(), wArea.height());
next = nullptr;
foreach (EffectWindow * e, m_motionManager.managedWindows()) {
Q_FOREACH (EffectWindow * e, m_motionManager.managedWindows()) {
DataHash::const_iterator winData = m_windowData.find(e);
if (winData == m_windowData.end() || !winData->visible)
continue;
@ -1885,7 +1885,7 @@ EffectWindow* PresentWindowsEffect::relativeWindow(EffectWindow *w, int xdiff, i
detectRect = QRect(0, wArea.y(), area.width(), wArea.height());
next = nullptr;
foreach (EffectWindow * e, m_motionManager.managedWindows()) {
Q_FOREACH (EffectWindow * e, m_motionManager.managedWindows()) {
DataHash::const_iterator winData = m_windowData.find(e);
if (winData == m_windowData.end() || !winData->visible)
continue;
@ -1922,7 +1922,7 @@ EffectWindow* PresentWindowsEffect::relativeWindow(EffectWindow *w, int xdiff, i
detectRect = QRect(wArea.x(), 0, wArea.width(), area.height());
next = nullptr;
foreach (EffectWindow * e, m_motionManager.managedWindows()) {
Q_FOREACH (EffectWindow * e, m_motionManager.managedWindows()) {
DataHash::const_iterator winData = m_windowData.find(e);
if (winData == m_windowData.end() || !winData->visible)
continue;
@ -1954,7 +1954,7 @@ EffectWindow* PresentWindowsEffect::relativeWindow(EffectWindow *w, int xdiff, i
detectRect = QRect(wArea.x(), 0, wArea.width(), area.height());
next = nullptr;
foreach (EffectWindow * e, m_motionManager.managedWindows()) {
Q_FOREACH (EffectWindow * e, m_motionManager.managedWindows()) {
DataHash::const_iterator winData = m_windowData.find(e);
if (winData == m_windowData.end() || !winData->visible)
continue;
@ -1990,7 +1990,7 @@ EffectWindow* PresentWindowsEffect::findFirstWindow() const
EffectWindow *topLeft = nullptr;
QRectF topLeftGeometry;
foreach (EffectWindow * w, m_motionManager.managedWindows()) {
Q_FOREACH (EffectWindow * w, m_motionManager.managedWindows()) {
DataHash::const_iterator winData = m_windowData.find(w);
if (winData == m_windowData.end())
continue;
@ -2053,7 +2053,7 @@ void CloseWindowView::clicked()
{
// 50ms until the window is elevated (seen!) and 300ms more to be "realized" by the user.
if (m_armTimer.hasExpired(350)) {
emit requestClose();
Q_EMIT requestClose();
}
}

View file

@ -274,14 +274,14 @@ void ScreenShotSourceMulti1::marshal(ScreenShotSink1 *sink)
void ScreenShotSourceMulti1::handleSourceCancelled()
{
emit cancelled();
Q_EMIT cancelled();
}
void ScreenShotSourceMulti1::handleSourceCompleted()
{
// If all sources are complete now, emit the completed signal.
if (isCompleted()) {
emit completed();
Q_EMIT completed();
}
}
@ -446,7 +446,7 @@ static xcb_pixmap_t xpixmapFromImage(const QImage &image)
void ScreenShotSinkXpixmap1::flush(const QImage &image)
{
const xcb_pixmap_t pixmap = xpixmapFromImage(image);
emit m_interface->screenshotCreated(pixmap);
Q_EMIT m_interface->screenshotCreated(pixmap);
}
ScreenShotSinkFile1::ScreenShotSinkFile1(ScreenShotDBusInterface1 *interface,

View file

@ -392,7 +392,7 @@ void ShowFpsEffect::paintGraph(int x, int y, QList<int> values, QList<int> lines
vbo->setColor(color);
QVector<float> verts;
// First draw the lines
foreach (int h, lines) {
Q_FOREACH (int h, lines) {
verts << x << y - h;
verts << x + values.count() << y - h;
}
@ -477,7 +477,7 @@ void ShowFpsEffect::paintGraph(int x, int y, QList<int> values, QList<int> lines
// Then the lines
col.red = col.green = col.blue = 0; // black
QVector<xcb_rectangle_t> rects;
foreach (int h, lines) {
Q_FOREACH (int h, lines) {
xcb_rectangle_t rect = {0, int16_t(MAX_TIME - h), uint16_t(values.count()), 1};
rects << rect;
}
@ -492,7 +492,7 @@ void ShowFpsEffect::paintGraph(int x, int y, QList<int> values, QList<int> lines
QPainter *painter = effects->scenePainter();
painter->setPen(Qt::black);
// First draw the lines
foreach (int h, lines) {
Q_FOREACH (int h, lines) {
painter->drawLine(x, y - h, x + values.count(), y - h);
}
QColor color(0, 0, 0);

View file

@ -56,7 +56,7 @@ void SlideBackEffect::windowRaised(EffectWindow *w)
{
// Determine all windows on top of the activated one
bool currentFound = false;
foreach (EffectWindow * tmp, oldStackingOrder) {
Q_FOREACH (EffectWindow * tmp, oldStackingOrder) {
if (!currentFound) {
if (tmp == w) {
currentFound = true;
@ -75,7 +75,7 @@ void SlideBackEffect::windowRaised(EffectWindow *w)
coveringWindows.append(tmp);
} else {
//Does it intersect with a moved (elevated) window and do we have to elevate it too?
foreach (EffectWindow * elevatedWindow, elevatedList) {
Q_FOREACH (EffectWindow * elevatedWindow, elevatedList) {
if (tmp->frameGeometry().intersects(elevatedWindow->frameGeometry())) {
effects->setElevatedWindow(tmp, true);
elevatedList.append(tmp);
@ -94,7 +94,7 @@ void SlideBackEffect::windowRaised(EffectWindow *w)
// If a window is minimized it could happen that the panels stay elevated without any windows sliding.
// clear all elevation settings
if (!motionManager.managingWindows()) {
foreach (EffectWindow * tmp, elevatedList) {
Q_FOREACH (EffectWindow * tmp, elevatedList) {
effects->setElevatedWindow(tmp, false);
}
}
@ -173,7 +173,7 @@ void SlideBackEffect::paintWindow(EffectWindow *w, int mask, QRegion region, Win
if (motionManager.isManaging(w)) {
motionManager.apply(w, data);
}
foreach (const QRegion &r, clippedRegions) {
Q_FOREACH (const QRegion &r, clippedRegions) {
region = region.intersected(r);
}
effects->paintWindow(w, mask, region, data);
@ -191,7 +191,7 @@ void SlideBackEffect::postPaintWindow(EffectWindow* w)
// restore the stacking order of all windows not intersecting any more except panels
if (coveringWindows.contains(w)) {
EffectWindowList tmpList;
foreach (EffectWindow * tmp, elevatedList) {
Q_FOREACH (EffectWindow * tmp, elevatedList) {
QRect elevatedGeometry = tmp->frameGeometry();
if (motionManager.isManaging(tmp)) {
elevatedGeometry = motionManager.transformedGeometry(tmp).toAlignedRect();
@ -207,7 +207,7 @@ void SlideBackEffect::postPaintWindow(EffectWindow* w)
} else {
if (!tmp->isDock()) {
bool keepElevated = false;
foreach (EffectWindow * elevatedWindow, tmpList) {
Q_FOREACH (EffectWindow * elevatedWindow, tmpList) {
if (tmp->frameGeometry().intersects(elevatedWindow->frameGeometry())) {
keepElevated = true;
}
@ -240,7 +240,7 @@ void SlideBackEffect::postPaintWindow(EffectWindow* w)
coveringWindows.removeAll(w);
if (coveringWindows.isEmpty()) {
// Restore correct stacking order
foreach (EffectWindow * tmp, elevatedList) {
Q_FOREACH (EffectWindow * tmp, elevatedList) {
effects->setElevatedWindow(tmp, false);
}
elevatedList.clear();
@ -312,7 +312,7 @@ EffectWindowList SlideBackEffect::usableWindows(const EffectWindowList & allWind
auto isWindowVisible = [] (const EffectWindow *window) {
return window && effects->virtualScreenGeometry().intersects(window->frameGeometry());
};
foreach (EffectWindow * tmp, allWindows) {
Q_FOREACH (EffectWindow * tmp, allWindows) {
if (isWindowUsable(tmp) && isWindowVisible(tmp)) {
retList.append(tmp);
}
@ -324,7 +324,7 @@ QRect SlideBackEffect::getModalGroupGeometry(EffectWindow *w)
{
QRect modalGroupGeometry = w->frameGeometry();
if (w->isModal()) {
foreach (EffectWindow * modalWindow, w->mainWindows()) {
Q_FOREACH (EffectWindow * modalWindow, w->mainWindows()) {
modalGroupGeometry = modalGroupGeometry.united(getModalGroupGeometry(modalWindow));
}
}

View file

@ -55,7 +55,7 @@ void ThumbnailAsideEffect::paintScreen(int mask, const QRegion &region, ScreenPa
effects->paintScreen(mask, region, data);
const QMatrix4x4 projectionMatrix = data.projectionMatrix();
foreach (const Data & d, windows) {
Q_FOREACH (const Data & d, windows) {
if (painted.intersects(d.rect)) {
WindowPaintData data(d.window, projectionMatrix);
data.multiplyOpacity(opacity);
@ -75,7 +75,7 @@ void ThumbnailAsideEffect::paintWindow(EffectWindow *w, int mask, QRegion region
void ThumbnailAsideEffect::slotWindowDamaged(EffectWindow* w, const QRegion&)
{
foreach (const Data & d, windows) {
Q_FOREACH (const Data & d, windows) {
if (d.window == w)
effects->addRepaint(d.rect);
}
@ -83,7 +83,7 @@ void ThumbnailAsideEffect::slotWindowDamaged(EffectWindow* w, const QRegion&)
void ThumbnailAsideEffect::slotWindowFrameGeometryChanged(EffectWindow* w, const QRect& old)
{
foreach (const Data & d, windows) {
Q_FOREACH (const Data & d, windows) {
if (d.window == w) {
if (w->size() == old.size())
effects->addRepaint(d.rect);
@ -144,7 +144,7 @@ void ThumbnailAsideEffect::arrange()
int height = 0;
QVector< int > pos(windows.size());
int mwidth = 0;
foreach (const Data & d, windows) {
Q_FOREACH (const Data & d, windows) {
height += d.window->height();
mwidth = qMax(mwidth, d.window->width());
pos[ d.index ] = d.window->height();
@ -172,7 +172,7 @@ void ThumbnailAsideEffect::arrange()
void ThumbnailAsideEffect::repaintAll()
{
foreach (const Data & d, windows)
Q_FOREACH (const Data & d, windows)
effects->addRepaint(d.rect);
}

View file

@ -105,7 +105,7 @@ void TrackMouseEffectConfig::shortcutChanged(const QKeySequence &seq)
if (QAction *a = m_actionCollection->action(QStringLiteral("TrackMouse"))) {
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << seq, KGlobalAccel::NoAutoloading);
}
emit changed(true);
Q_EMIT changed(true);
}
} // namespace

View file

@ -77,7 +77,7 @@ void WindowGeometryConfig::save()
void WindowGeometryConfig::defaults()
{
myUi->shortcuts->allDefault();
emit changed(true);
Q_EMIT changed(true);
}
} //namespace

View file

@ -93,7 +93,7 @@ void ZoomAccessibilityIntegration::destroyAccessibilityRegistry()
void ZoomAccessibilityIntegration::slotFocusChanged(const AccessibleObject &object)
{
emit focusPointChanged(object.focusPoint());
Q_EMIT focusPointChanged(object.focusPoint());
}
} // namespace KWin

View file

@ -363,7 +363,7 @@ bool X11Client::windowEvent(xcb_generic_event_t *e)
// ### Inform the decoration
}
if (dirtyProperties2.testFlag(NET::WM2WindowRole)) {
emit windowRoleChanged();
Q_EMIT windowRoleChanged();
}
if (dirtyProperties2.testFlag(NET::WM2WindowClass)) {
getResourceClass();
@ -1191,7 +1191,7 @@ bool Unmanaged::windowEvent(xcb_generic_event_t *e)
getWmOpaqueRegion();
}
if (dirtyProperties2.testFlag(NET::WM2WindowRole)) {
emit windowRoleChanged();
Q_EMIT windowRoleChanged();
}
if (dirtyProperties2.testFlag(NET::WM2WindowClass)) {
getResourceClass();
@ -1237,7 +1237,7 @@ bool Unmanaged::windowEvent(xcb_generic_event_t *e)
detectShape(window());
addRepaintFull();
addWorkspaceRepaint(frameGeometry()); // in case shape change removes part of this window
emit geometryShapeChanged(this, frameGeometry());
Q_EMIT geometryShapeChanged(this, frameGeometry());
}
if (eventType == Xcb::Extensions::self()->damageNotifyEvent())
damageNotifyEvent();
@ -1257,10 +1257,10 @@ void Unmanaged::configureNotifyEvent(xcb_configure_notify_event_t *e)
m_clientGeometry = newgeom;
m_frameGeometry = newgeom;
m_bufferGeometry = newgeom;
emit bufferGeometryChanged(this, old);
emit clientGeometryChanged(this, old);
emit frameGeometryChanged(this, old);
emit geometryShapeChanged(this, old);
Q_EMIT bufferGeometryChanged(this, old);
Q_EMIT clientGeometryChanged(this, old);
Q_EMIT frameGeometryChanged(this, old);
Q_EMIT geometryShapeChanged(this, old);
}
}
@ -1293,7 +1293,7 @@ void Toplevel::clientMessageEvent(xcb_client_message_event_t *e)
setSurface(s);
}
}
emit surfaceIdChanged(m_surfaceId);
Q_EMIT surfaceIdChanged(m_surfaceId);
}
}

View file

@ -49,7 +49,7 @@ void FTraceLogger::setEnabled(bool enabled)
} else {
m_file.close();
}
emit enabledChanged();
Q_EMIT enabledChanged();
}
bool FTraceLogger::open()

View file

@ -86,7 +86,7 @@ void GestureRecognizer::unregisterGesture(KWin::Gesture* gesture)
}
m_gestures.removeAll(gesture);
if (m_activeSwipeGestures.removeOne(gesture)) {
emit gesture->cancelled();
Q_EMIT gesture->cancelled();
}
}
@ -134,7 +134,7 @@ int GestureRecognizer::startSwipeGesture(uint fingerCount, const QPointF &startP
// direction doesn't matter yet
m_activeSwipeGestures << swipeGesture;
count++;
emit swipeGesture->started();
Q_EMIT swipeGesture->started();
}
return count;
}
@ -166,11 +166,11 @@ void GestureRecognizer::updateSwipeGesture(const QSizeF &delta)
auto g = qobject_cast<SwipeGesture*>(*it);
if (g->direction() == direction) {
if (g->isMinimumDeltaRelevant()) {
emit g->progress(g->minimumDeltaReachedProgress(combinedDelta));
Q_EMIT g->progress(g->minimumDeltaReachedProgress(combinedDelta));
}
it++;
} else {
emit g->cancelled();
Q_EMIT g->cancelled();
it = m_activeSwipeGestures.erase(it);
}
}
@ -179,7 +179,7 @@ void GestureRecognizer::updateSwipeGesture(const QSizeF &delta)
void GestureRecognizer::cancelActiveSwipeGestures()
{
for (auto g : qAsConst(m_activeSwipeGestures)) {
emit g->cancelled();
Q_EMIT g->cancelled();
}
m_activeSwipeGestures.clear();
}
@ -195,9 +195,9 @@ void GestureRecognizer::endSwipeGesture()
const QSizeF delta = std::accumulate(m_swipeUpdates.constBegin(), m_swipeUpdates.constEnd(), QSizeF(0, 0));
for (auto g : qAsConst(m_activeSwipeGestures)) {
if (static_cast<SwipeGesture*>(g)->minimumDeltaReached(delta)) {
emit g->triggered();
Q_EMIT g->triggered();
} else {
emit g->cancelled();
Q_EMIT g->cancelled();
}
}
m_activeSwipeGestures.clear();

View file

@ -1718,7 +1718,7 @@ public:
cursor->updateCursor(cursorImage, tcursor->hotspot());
});
emit cursor->cursorChanged();
Q_EMIT cursor->cursorChanged();
return tool;
}
@ -2392,7 +2392,7 @@ void InputRedirection::setupLibInput()
return;
}
// TODO: this should update the seat, only workaround for QTBUG-54371
emit hasAlphaNumericKeyboardChanged(set);
Q_EMIT hasAlphaNumericKeyboardChanged(set);
}
);
connect(conn, &LibInput::Connection::hasTabletModeSwitchChanged, this,
@ -2400,7 +2400,7 @@ void InputRedirection::setupLibInput()
if (m_libInput->isSuspended()) {
return;
}
emit hasTabletModeSwitchChanged(set);
Q_EMIT hasTabletModeSwitchChanged(set);
}
);
connect(conn, &LibInput::Connection::hasPointerChanged, this,
@ -2578,7 +2578,7 @@ Toplevel *InputRedirection::findToplevel(const QPoint &pos)
return nullptr;
}
const QList<Unmanaged *> &unmanaged = Workspace::self()->unmanagedList();
foreach (Unmanaged *u, unmanaged) {
Q_FOREACH (Unmanaged *u, unmanaged) {
if (u->hitTest(pos)) {
return u;
}
@ -2725,7 +2725,7 @@ bool InputDeviceHandler::setAt(Toplevel *toplevel)
m_at.surfaceCreatedConnection = QMetaObject::Connection();
m_at.at = toplevel;
emit atChanged(old, toplevel);
Q_EMIT atChanged(old, toplevel);
return true;
}
@ -2740,7 +2740,7 @@ void InputDeviceHandler::setDecoration(Decoration::DecoratedClientImpl *decorati
auto oldDeco = m_focus.decoration;
m_focus.decoration = decoration;
cleanupDecoration(oldDeco.data(), m_focus.decoration.data());
emit decorationChanged();
Q_EMIT decorationChanged();
}
void InputDeviceHandler::setInternalWindow(QWindow *window)
@ -2786,7 +2786,7 @@ bool InputDeviceHandler::updateDecoration()
return false;
}
cleanupDecoration(oldDeco.data(), m_focus.decoration.data());
emit decorationChanged();
Q_EMIT decorationChanged();
return true;
}

View file

@ -301,7 +301,7 @@ void InputMethod::setEnabled(bool enabled)
return;
}
m_enabled = enabled;
emit enabledChanged(m_enabled);
Q_EMIT enabledChanged(m_enabled);
// send OSD message
QDBusMessage msg = QDBusMessage::createMethodCall(

View file

@ -94,7 +94,7 @@ void InputPanelV1Client::destroyClient()
markAsZombie();
Deleted *deleted = Deleted::create(this);
emit windowClosed(this, deleted);
Q_EMIT windowClosed(this, deleted);
StackingUpdatesBlocker blocker(workspace());
waylandServer()->removeClient(this);
deleted->unrefWindow();

View file

@ -27,7 +27,7 @@ InputPanelV1Integration::InputPanelV1Integration(QObject *parent)
void InputPanelV1Integration::createClient(InputPanelSurfaceV1Interface *shellSurface)
{
emit clientCreated(new InputPanelV1Client(shellSurface));
Q_EMIT clientCreated(new InputPanelV1Client(shellSurface));
}
} // namespace KWin

View file

@ -330,11 +330,11 @@ void InternalClient::destroyClient()
markAsZombie();
if (isInteractiveMoveResize()) {
leaveInteractiveMoveResize();
emit clientFinishUserMovedResized(this);
Q_EMIT clientFinishUserMovedResized(this);
}
Deleted *deleted = Deleted::create(this);
emit windowClosed(this, deleted);
Q_EMIT windowClosed(this, deleted);
destroyDecoration();
@ -438,7 +438,7 @@ void InternalClient::updateCaption()
} while (findClientWithSameCaption());
}
if (m_captionSuffix != oldSuffix) {
emit captionChanged();
Q_EMIT captionChanged();
}
}
@ -466,13 +466,13 @@ void InternalClient::commitGeometry(const QRect &rect)
syncGeometryToInternalWindow();
if (oldClientGeometry != m_clientGeometry) {
emit bufferGeometryChanged(this, oldClientGeometry);
emit clientGeometryChanged(this, oldClientGeometry);
Q_EMIT bufferGeometryChanged(this, oldClientGeometry);
Q_EMIT clientGeometryChanged(this, oldClientGeometry);
}
if (oldFrameGeometry != m_frameGeometry) {
emit frameGeometryChanged(this, oldFrameGeometry);
Q_EMIT frameGeometryChanged(this, oldFrameGeometry);
}
emit geometryShapeChanged(this, oldFrameGeometry);
Q_EMIT geometryShapeChanged(this, oldFrameGeometry);
}
void InternalClient::setCaption(const QString &caption)
@ -487,7 +487,7 @@ void InternalClient::setCaption(const QString &caption)
updateCaption();
if (m_captionSuffix == oldCaptionSuffix) {
emit captionChanged();
Q_EMIT captionChanged();
}
}

View file

@ -53,7 +53,7 @@ void Item::setX(int x)
m_x = x;
scheduleRepaint(boundingRect());
discardQuads();
emit xChanged();
Q_EMIT xChanged();
}
int Item::y() const
@ -70,7 +70,7 @@ void Item::setY(int y)
m_y = y;
scheduleRepaint(boundingRect());
discardQuads();
emit yChanged();
Q_EMIT yChanged();
}
int Item::width() const
@ -88,7 +88,7 @@ void Item::setWidth(int width)
updateBoundingRect();
scheduleRepaint(rect());
discardQuads();
emit widthChanged();
Q_EMIT widthChanged();
}
int Item::height() const
@ -106,7 +106,7 @@ void Item::setHeight(int height)
updateBoundingRect();
scheduleRepaint(rect());
discardQuads();
emit heightChanged();
Q_EMIT heightChanged();
}
Item *Item::parentItem() const
@ -186,10 +186,10 @@ void Item::setPosition(const QPoint &point)
discardQuads();
if (xDirty) {
emit xChanged();
Q_EMIT xChanged();
}
if (yDirty) {
emit yChanged();
Q_EMIT yChanged();
}
}
}
@ -214,10 +214,10 @@ void Item::setSize(const QSize &size)
discardQuads();
if (widthDirty) {
emit widthChanged();
Q_EMIT widthChanged();
}
if (heightDirty) {
emit heightChanged();
Q_EMIT heightChanged();
}
}
}
@ -240,7 +240,7 @@ void Item::updateBoundingRect()
}
if (m_boundingRect != boundingRect) {
m_boundingRect = boundingRect;
emit boundingRectChanged();
Q_EMIT boundingRectChanged();
}
}

View file

@ -200,7 +200,7 @@ bool EffectsModel::setData(const QModelIndex &index, const QVariant &value, int
EffectData &data = m_effects[index.row()];
data.status = Status(value.toInt());
data.changed = data.status != data.originalStatus;
emit dataChanged(index, index);
Q_EMIT dataChanged(index, index);
if (data.status == Status::Enabled && !data.exclusiveGroup.isEmpty()) {
// need to disable all other exclusive effects in the same category
@ -212,7 +212,7 @@ bool EffectsModel::setData(const QModelIndex &index, const QVariant &value, int
if (otherData.exclusiveGroup == data.exclusiveGroup) {
otherData.status = Status::Disabled;
otherData.changed = otherData.status != otherData.originalStatus;
emit dataChanged(this->index(i, 0), this->index(i, 0));
Q_EMIT dataChanged(this->index(i, 0), this->index(i, 0));
}
}
}
@ -438,7 +438,7 @@ void EffectsModel::load(LoadOptions options)
m_pendingEffects.clear();
endResetModel();
emit loaded();
Q_EMIT loaded();
};
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.KWin"),

View file

@ -76,7 +76,7 @@ void PreviewBridge::setPlugin(const QString &plugin)
return;
}
m_plugin = plugin;
emit pluginChanged();
Q_EMIT pluginChanged();
}
QString PreviewBridge::theme() const
@ -90,7 +90,7 @@ void PreviewBridge::setTheme(const QString &theme)
return;
}
m_theme = theme;
emit themeChanged();
Q_EMIT themeChanged();
}
QString PreviewBridge::plugin() const
@ -129,7 +129,7 @@ void PreviewBridge::setValid(bool valid)
return;
}
m_valid = valid;
emit validChanged();
Q_EMIT validChanged();
}
Decoration *PreviewBridge::createDecoration(QObject *parent)
@ -177,7 +177,7 @@ void PreviewBridge::configure(QQuickItem *ctx)
auto save = [this,kcm] {
kcm->save();
if (m_lastCreatedSettings) {
emit m_lastCreatedSettings->decorationSettings()->reconfigured();
Q_EMIT m_lastCreatedSettings->decorationSettings()->reconfigured();
}
// Send signal to all kwin instances
QDBusMessage message = QDBusMessage::createSignal(QStringLiteral("/KWin"),

View file

@ -36,7 +36,7 @@ void PreviewButtonItem::setType(KDecoration2::DecorationButtonType type)
return;
}
m_type = type;
emit typeChanged();
Q_EMIT typeChanged();
}
KDecoration2::DecorationButtonType PreviewButtonItem::type() const
@ -55,7 +55,7 @@ void PreviewButtonItem::setBridge(PreviewBridge *bridge)
return;
}
m_bridge = bridge;
emit bridgeChanged();
Q_EMIT bridgeChanged();
}
Settings *PreviewButtonItem::settings() const
@ -69,7 +69,7 @@ void PreviewButtonItem::setSettings(Settings *settings)
return;
}
m_settings = settings;
emit settingsChanged();
Q_EMIT settingsChanged();
}
int PreviewButtonItem::typeAsInt() const

View file

@ -68,37 +68,37 @@ PreviewClient::PreviewClient(DecoratedClient *c, Decoration *decoration)
connect(this, &PreviewClient::paletteChanged, c, &DecoratedClient::paletteChanged);
connect(this, &PreviewClient::maximizedVerticallyChanged, this,
[this]() {
emit maximizedChanged(isMaximized());
Q_EMIT maximizedChanged(isMaximized());
}
);
connect(this, &PreviewClient::maximizedHorizontallyChanged, this,
[this]() {
emit maximizedChanged(isMaximized());
Q_EMIT maximizedChanged(isMaximized());
}
);
connect(this, &PreviewClient::iconNameChanged, this,
[this]() {
m_icon = QIcon::fromTheme(m_iconName);
emit iconChanged(m_icon);
Q_EMIT iconChanged(m_icon);
}
);
connect(this, &PreviewClient::desktopChanged, this,
[this]() {
emit onAllDesktopsChanged(isOnAllDesktops());
Q_EMIT onAllDesktopsChanged(isOnAllDesktops());
}
);
connect(&m_palette, &KWin::Decoration::DecorationPalette::changed, [this]() {
emit paletteChanged(m_palette.palette());
Q_EMIT paletteChanged(m_palette.palette());
});
auto emitEdgesChanged = [this, c]() {
emit c->adjacentScreenEdgesChanged(adjacentScreenEdges());
Q_EMIT c->adjacentScreenEdgesChanged(adjacentScreenEdges());
};
connect(this, &PreviewClient::bordersTopEdgeChanged, this, emitEdgesChanged);
connect(this, &PreviewClient::bordersLeftEdgeChanged, this, emitEdgesChanged);
connect(this, &PreviewClient::bordersRightEdgeChanged, this, emitEdgesChanged);
connect(this, &PreviewClient::bordersBottomEdgeChanged, this, emitEdgesChanged);
auto emitSizeChanged = [c]() {
emit c->sizeChanged(c->size());
Q_EMIT c->sizeChanged(c->size());
};
connect(this, &PreviewClient::widthChanged, this, emitSizeChanged);
connect(this, &PreviewClient::heightChanged, this, emitSizeChanged);
@ -111,7 +111,7 @@ PreviewClient::~PreviewClient() = default;
void PreviewClient::setIcon(const QIcon &pixmap)
{
m_icon = pixmap;
emit iconChanged(m_icon);
Q_EMIT iconChanged(m_icon);
}
int PreviewClient::width() const
@ -153,7 +153,7 @@ void PreviewClient::setDesktop(int desktop)
return;
}
m_desktop = desktop;
emit desktopChanged(m_desktop);
Q_EMIT desktopChanged(m_desktop);
}
QIcon PreviewClient::icon() const
@ -315,7 +315,7 @@ void PreviewClient::setBordersBottomEdge(bool enabled)
return;
}
m_bordersBottomEdge = enabled;
emit bordersBottomEdgeChanged(enabled);
Q_EMIT bordersBottomEdgeChanged(enabled);
}
void PreviewClient::setBordersLeftEdge(bool enabled)
@ -324,7 +324,7 @@ void PreviewClient::setBordersLeftEdge(bool enabled)
return;
}
m_bordersLeftEdge = enabled;
emit bordersLeftEdgeChanged(enabled);
Q_EMIT bordersLeftEdgeChanged(enabled);
}
void PreviewClient::setBordersRightEdge(bool enabled)
@ -333,7 +333,7 @@ void PreviewClient::setBordersRightEdge(bool enabled)
return;
}
m_bordersRightEdge = enabled;
emit bordersRightEdgeChanged(enabled);
Q_EMIT bordersRightEdgeChanged(enabled);
}
void PreviewClient::setBordersTopEdge(bool enabled)
@ -342,7 +342,7 @@ void PreviewClient::setBordersTopEdge(bool enabled)
return;
}
m_bordersTopEdge = enabled;
emit bordersTopEdgeChanged(enabled);
Q_EMIT bordersTopEdgeChanged(enabled);
}
void PreviewClient::requestShowToolTip(const QString &text)
@ -356,7 +356,7 @@ void PreviewClient::requestHideToolTip()
void PreviewClient::requestClose()
{
emit closeRequested();
Q_EMIT closeRequested();
}
void PreviewClient::requestContextHelp()
@ -378,7 +378,7 @@ void PreviewClient::requestToggleMaximization(Qt::MouseButtons buttons)
void PreviewClient::requestMinimize()
{
emit minimizeRequested();
Q_EMIT minimizeRequested();
}
void PreviewClient::requestToggleKeepAbove()
@ -394,7 +394,7 @@ void PreviewClient::requestToggleKeepBelow()
void PreviewClient::requestShowWindowMenu(const QRect &rect)
{
Q_UNUSED(rect)
emit showWindowMenuRequested();
Q_EMIT showWindowMenuRequested();
}
void PreviewClient::requestShowApplicationMenu(const QRect &rect, int actionId)
@ -425,7 +425,7 @@ void PreviewClient::name(type variable) \
return; \
} \
m_##variable = variable; \
emit variable##Changed(m_##variable); \
Q_EMIT variable##Changed(m_##variable); \
}
#define SETTER2(name, variable) SETTER(bool, name, variable)

View file

@ -86,7 +86,7 @@ void PreviewItem::setDecoration(Decoration *deco)
connect(m_decoration, &Decoration::shadowChanged, this, &PreviewItem::syncSize);
connect(m_decoration, &Decoration::shadowChanged, this, &PreviewItem::shadowChanged);
connect(m_decoration, &Decoration::damaged, this, [this]() { update(); });
emit decorationChanged(m_decoration);
Q_EMIT decorationChanged(m_decoration);
}
QColor PreviewItem::windowColor() const
@ -100,7 +100,7 @@ void PreviewItem::setWindowColor(const QColor &color)
return;
}
m_windowColor = color;
emit windowColorChanged(m_windowColor);
Q_EMIT windowColorChanged(m_windowColor);
update();
}
@ -381,7 +381,7 @@ void PreviewItem::setDrawingBackground(bool set)
return;
}
m_drawBackground = set;
emit drawingBackgroundChanged(set);
Q_EMIT drawingBackgroundChanged(set);
}
PreviewBridge *PreviewItem::bridge() const
@ -401,7 +401,7 @@ void PreviewItem::setBridge(PreviewBridge *bridge)
if (m_bridge) {
m_bridge->registerPreviewItem(this);
}
emit bridgeChanged();
Q_EMIT bridgeChanged();
}
Settings *PreviewItem::settings() const
@ -415,7 +415,7 @@ void PreviewItem::setSettings(Settings *settings)
return;
}
m_settings = settings;
emit settingsChanged();
Q_EMIT settingsChanged();
}
PreviewClient *PreviewItem::client()

View file

@ -88,10 +88,10 @@ PreviewSettings::PreviewSettings(DecorationSettings *parent)
connect(this, &PreviewSettings::closeOnDoubleClickOnMenuChanged, parent, &DecorationSettings::closeOnDoubleClickOnMenuChanged);
connect(this, &PreviewSettings::fontChanged, parent, &DecorationSettings::fontChanged);
auto updateLeft = [this, parent]() {
emit parent->decorationButtonsLeftChanged(decorationButtonsLeft());
Q_EMIT parent->decorationButtonsLeftChanged(decorationButtonsLeft());
};
auto updateRight = [this, parent]() {
emit parent->decorationButtonsRightChanged(decorationButtonsRight());
Q_EMIT parent->decorationButtonsRightChanged(decorationButtonsRight());
};
connect(m_leftButtons, &QAbstractItemModel::rowsRemoved, this, updateLeft);
connect(m_leftButtons, &QAbstractItemModel::rowsMoved, this, updateLeft);
@ -134,7 +134,7 @@ void PreviewSettings::setAlphaChannelSupported(bool supported)
return;
}
m_alphaChannelSupported = supported;
emit alphaChannelSupportedChanged(m_alphaChannelSupported);
Q_EMIT alphaChannelSupportedChanged(m_alphaChannelSupported);
}
void PreviewSettings::setOnAllDesktopsAvailable(bool available)
@ -143,7 +143,7 @@ void PreviewSettings::setOnAllDesktopsAvailable(bool available)
return;
}
m_onAllDesktopsAvailable = available;
emit onAllDesktopsAvailableChanged(m_onAllDesktopsAvailable);
Q_EMIT onAllDesktopsAvailableChanged(m_onAllDesktopsAvailable);
}
void PreviewSettings::setCloseOnDoubleClickOnMenu(bool enabled)
@ -152,7 +152,7 @@ void PreviewSettings::setCloseOnDoubleClickOnMenu(bool enabled)
return;
}
m_closeOnDoubleClick = enabled;
emit closeOnDoubleClickOnMenuChanged(enabled);
Q_EMIT closeOnDoubleClickOnMenuChanged(enabled);
}
QVector< DecorationButtonType > PreviewSettings::decorationButtonsLeft() const
@ -189,8 +189,8 @@ void PreviewSettings::setBorderSizesIndex(int index)
return;
}
m_borderSize = index;
emit borderSizesIndexChanged(index);
emit decorationSettings()->borderSizeChanged(borderSize());
Q_EMIT borderSizesIndexChanged(index);
Q_EMIT decorationSettings()->borderSizeChanged(borderSize());
}
BorderSize PreviewSettings::borderSize() const
@ -204,7 +204,7 @@ void PreviewSettings::setFont(const QFont &font)
return;
}
m_font = font;
emit fontChanged(m_font);
Q_EMIT fontChanged(m_font);
}
Settings::Settings(QObject *parent)
@ -221,7 +221,7 @@ void Settings::setBridge(PreviewBridge *bridge)
return;
}
m_bridge = bridge;
emit bridgeChanged();
Q_EMIT bridgeChanged();
}
PreviewBridge *Settings::bridge() const
@ -239,7 +239,7 @@ void Settings::createSettings()
m_previewSettings->setBorderSizesIndex(m_borderSize);
connect(this, &Settings::borderSizesIndexChanged, m_previewSettings, &PreviewSettings::setBorderSizesIndex);
}
emit settingsChanged();
Q_EMIT settingsChanged();
}
QSharedPointer<DecorationSettings> Settings::settings() const
@ -258,7 +258,7 @@ void Settings::setBorderSizesIndex(int index)
return;
}
m_borderSize = index;
emit borderSizesIndexChanged(m_borderSize);
Q_EMIT borderSizesIndexChanged(m_borderSize);
}
}

View file

@ -115,7 +115,7 @@ void KCMKWinDecoration::load()
setBorderSize(borderSizeIndexFromString(settings()->borderSize()));
emit themeChanged();
Q_EMIT themeChanged();
}
void KCMKWinDecoration::save()
@ -225,7 +225,7 @@ void KCMKWinDecoration::setBorderSize(int index)
{
if (m_borderSizeIndex != index) {
m_borderSizeIndex = index;
emit borderSizeChanged();
Q_EMIT borderSizeChanged();
}
}
@ -240,7 +240,7 @@ void KCMKWinDecoration::setTheme(int index)
if (dataIndex.isValid()) {
settings()->setTheme(m_proxyThemesModel->data(dataIndex, KDecoration2::Configuration::DecorationsModel::ThemeNameRole).toString());
settings()->setPluginName(m_proxyThemesModel->data(dataIndex, KDecoration2::Configuration::DecorationsModel::PluginNameRole).toString());
emit themeChanged();
Q_EMIT themeChanged();
}
}

View file

@ -33,7 +33,7 @@ AnimationsModel::AnimationsModel(QObject *parent)
const bool configurable = index_.data(ConfigurableRole).toBool();
if (configurable != m_currentConfigurable) {
m_currentConfigurable = configurable;
emit currentConfigurableChanged();
Q_EMIT currentConfigurableChanged();
}
}
);
@ -48,7 +48,7 @@ void AnimationsModel::setAnimationEnabled(bool enabled)
{
if (m_animationEnabled != enabled) {
m_animationEnabled = enabled;
emit animationEnabledChanged();
Q_EMIT animationEnabledChanged();
}
}
@ -61,7 +61,7 @@ void AnimationsModel::setAnimationIndex(int index)
{
if (m_animationIndex != index) {
m_animationIndex = index;
emit animationIndexChanged();
Q_EMIT animationIndexChanged();
}
}
@ -98,8 +98,8 @@ void AnimationsModel::loadDefaults()
if (rowIndex.data(EnabledByDefaultRole).toBool()) {
m_defaultAnimationEnabled = true;
m_defaultAnimationIndex = i;
emit defaultAnimationEnabledChanged();
emit defaultAnimationIndexChanged();
Q_EMIT defaultAnimationEnabledChanged();
Q_EMIT defaultAnimationIndexChanged();
break;
}
}

View file

@ -171,8 +171,8 @@ void DesktopsModel::setRows(int rows)
if (m_rows != rows) {
m_rows = rows;
emit rowsChanged();
emit dataChanged(index(0, 0), index(m_desktops.count() - 1, 0), QVector<int>{DesktopRow});
Q_EMIT rowsChanged();
Q_EMIT dataChanged(index(0, 0), index(m_desktops.count() - 1, 0), QVector<int>{DesktopRow});
updateModifiedState();
}
@ -197,7 +197,7 @@ void DesktopsModel::createDesktop(const QString &name)
m_names[dummyId] = name;
endInsertRows();
emit desktopCountChanged();
Q_EMIT desktopCountChanged();
updateModifiedState();
}
@ -216,7 +216,7 @@ void DesktopsModel::removeDesktop(const QString &id)
m_names.remove(id);
endRemoveRows();
emit desktopCountChanged();
Q_EMIT desktopCountChanged();
updateModifiedState();
}
@ -231,7 +231,7 @@ void DesktopsModel::setDesktopName(const QString &id, const QString &name)
const QModelIndex &idx = index(m_desktops.indexOf(id), 0);
emit dataChanged(idx, idx, QVector<int>{Qt::DisplayRole});
Q_EMIT dataChanged(idx, idx, QVector<int>{Qt::DisplayRole});
updateModifiedState();
}
@ -308,7 +308,7 @@ void DesktopsModel::syncWithServer()
m_names[newId] = m_names.take(oldId);
}
emit dataChanged(index(0, 0), index(rowCount() - 1, 0), QVector<int>{Qt::DisplayRole});
Q_EMIT dataChanged(index(0, 0), index(rowCount() - 1, 0), QVector<int>{Qt::DisplayRole});
// Sync names.
if (m_names != m_serverSideNames) {
@ -440,7 +440,7 @@ void DesktopsModel::getAllAndConnect(const QDBusMessage &msg)
|| m_serverSideRows != newServerSideRows) {
if (!m_serverSideDesktops.isEmpty() || m_userModified) {
m_serverModified = true;
emit serverModifiedChanged();
Q_EMIT serverModifiedChanged();
}
m_serverSideDesktops = newServerSideDesktops;
@ -460,11 +460,11 @@ void DesktopsModel::getAllAndConnect(const QDBusMessage &msg)
endResetModel();
}
emit readyChanged();
Q_EMIT readyChanged();
auto handleConnectionError = [this]() {
m_error = i18n("There was an error connecting to the compositor.");
emit errorChanged();
Q_EMIT errorChanged();
};
bool connected = QDBusConnection::sessionBus().connect(
@ -544,7 +544,7 @@ void DesktopsModel::desktopCreated(const QString &id, const KWin::DBusDesktopDat
m_names.remove(dummyId);
m_names[id] = data.name;
const QModelIndex &idx = index(data.position, 0);
emit dataChanged(idx, idx, QVector<int>{Id});
Q_EMIT dataChanged(idx, idx, QVector<int>{Id});
updateModifiedState(/* server */ true);
}
@ -584,7 +584,7 @@ void DesktopsModel::desktopDataChanged(const QString &id, const KWin::DBusDeskto
const QModelIndex &idx = index(desktopIndex, 0);
emit dataChanged(idx, idx, QVector<int>{Qt::DisplayRole});
Q_EMIT dataChanged(idx, idx, QVector<int>{Qt::DisplayRole});
} else {
updateModifiedState(/* server */ true);
}
@ -603,8 +603,8 @@ void DesktopsModel::desktopRowsChanged(uint rows)
if (!m_userModified) {
m_rows = m_serverSideRows;
emit rowsChanged();
emit dataChanged(index(0, 0), index(m_desktops.count() - 1, 0), QVector<int>{DesktopRow});
Q_EMIT rowsChanged();
Q_EMIT dataChanged(index(0, 0), index(m_desktops.count() - 1, 0), QVector<int>{DesktopRow});
} else {
updateModifiedState(/* server */ true);
}
@ -627,7 +627,7 @@ void DesktopsModel::updateModifiedState(bool server)
m_names[newId] = m_names.take(oldId);
}
emit dataChanged(index(0, 0), index(rowCount() - 1, 0), QVector<int>{Qt::DisplayRole});
Q_EMIT dataChanged(index(0, 0), index(rowCount() - 1, 0), QVector<int>{Qt::DisplayRole});
}
if (m_desktops == m_serverSideDesktops
@ -635,22 +635,22 @@ void DesktopsModel::updateModifiedState(bool server)
&& m_rows == m_serverSideRows) {
m_userModified = false;
emit userModifiedChanged();
Q_EMIT userModifiedChanged();
m_serverModified = false;
emit serverModifiedChanged();
Q_EMIT serverModifiedChanged();
} else {
if (m_pendingCalls > 0) {
m_serverModified = false;
emit serverModifiedChanged();
Q_EMIT serverModifiedChanged();
syncWithServer();
} else if (server) {
m_serverModified = true;
emit serverModifiedChanged();
Q_EMIT serverModifiedChanged();
} else {
m_userModified = true;
emit userModifiedChanged();
Q_EMIT userModifiedChanged();
}
}
}
@ -660,13 +660,13 @@ void DesktopsModel::handleCallError()
if (m_pendingCalls > 0) {
m_serverModified = false;
emit serverModifiedChanged();
Q_EMIT serverModifiedChanged();
m_error = i18n("There was an error saving the settings to the compositor.");
emit errorChanged();
Q_EMIT errorChanged();
} else {
m_error = i18n("There was an error requesting information from the compositor.");
emit errorChanged();
Q_EMIT errorChanged();
}
}

View file

@ -29,7 +29,7 @@ void EffectsFilterProxyModel::setQuery(const QString &query)
{
if (m_query != query) {
m_query = query;
emit queryChanged();
Q_EMIT queryChanged();
invalidateFilter();
}
}
@ -43,7 +43,7 @@ void EffectsFilterProxyModel::setExcludeInternal(bool exclude)
{
if (m_excludeInternal != exclude) {
m_excludeInternal = exclude;
emit excludeInternalChanged();
Q_EMIT excludeInternalChanged();
invalidateFilter();
}
}
@ -57,7 +57,7 @@ void EffectsFilterProxyModel::setExcludeUnsupported(bool exclude)
{
if (m_excludeUnsupported != exclude) {
m_excludeUnsupported = exclude;
emit excludeUnsupportedChanged();
Q_EMIT excludeUnsupportedChanged();
invalidateFilter();
}
}

View file

@ -224,7 +224,7 @@ void KActionsOptions::save()
mTitleBarActions->save();
mWindowActions->save();
emit KCModule::changed(false);
Q_EMIT KCModule::changed(false);
// Send signal to all kwin instances
QDBusMessage message =
QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig");
@ -239,7 +239,7 @@ void KActionsOptions::defaults()
void KActionsOptions::moduleChanged(bool state)
{
emit KCModule::changed(state);
Q_EMIT KCModule::changed(state);
}
K_PLUGIN_FACTORY_DEFINITION(KWinOptionsFactory,

View file

@ -116,7 +116,7 @@ void KCMKWinRules::load()
createRuleFromProperties();
} else {
m_editIndex = QModelIndex();
emit editIndexChanged();
Q_EMIT editIndexChanged();
}
m_alreadyLoaded = true;
@ -136,7 +136,7 @@ void KCMKWinRules::save()
void KCMKWinRules::updateNeedsSave()
{
setNeedsSave(m_ruleBookModel->isSaveNeeded());
emit needsSaveChanged();
Q_EMIT needsSaveChanged();
}
void KCMKWinRules::createRuleFromProperties()
@ -191,7 +191,7 @@ void KCMKWinRules::editRule(int index)
}
m_editIndex = m_ruleBookModel->index(index);
emit editIndexChanged();
Q_EMIT editIndexChanged();
m_rulesModel->setSettings(m_ruleBookModel->ruleSettingsAt(m_editIndex.row()));
@ -217,7 +217,7 @@ void KCMKWinRules::removeRule(int index)
m_ruleBookModel->removeRow(index);
emit editIndexChanged();
Q_EMIT editIndexChanged();
updateNeedsSave();
}
@ -232,7 +232,7 @@ void KCMKWinRules::moveRule(int sourceIndex, int destIndex)
m_ruleBookModel->moveRow(QModelIndex(), sourceIndex, QModelIndex(), destIndex);
emit editIndexChanged();
Q_EMIT editIndexChanged();
updateNeedsSave();
}

View file

@ -38,14 +38,14 @@ public:
Q_INVOKABLE void exportToFile(const QUrl &path, const QList<int> &indexes);
Q_INVOKABLE void importFromFile(const QUrl &path);
public slots:
public Q_SLOTS:
void load() override;
void save() override;
signals:
Q_SIGNALS:
void editIndexChanged();
private slots:
private Q_SLOTS:
void updateNeedsSave();
private:

View file

@ -94,14 +94,14 @@ void OptionsModel::setValue(QVariant value)
int index = indexOf(value);
if (index >= 0 && index != m_index) {
m_index = index;
emit selectedIndexChanged(index);
Q_EMIT selectedIndexChanged(index);
}
}
void OptionsModel::resetValue()
{
m_index = 0;
emit selectedIndexChanged(m_index);
Q_EMIT selectedIndexChanged(m_index);
}
void OptionsModel::updateModelData(const QList<Data> &data) {

View file

@ -59,7 +59,7 @@ public:
Q_INVOKABLE QString textOfValue(const QVariant &value) const;
int selectedIndex() const;
signals:
Q_SIGNALS:
void selectedIndexChanged(int index);
public:

View file

@ -153,7 +153,7 @@ void RuleBookModel::setDescriptionAt(int row, const QString &description)
m_ruleBook->ruleSettingsAt(row)->setDescription(description);
emit dataChanged(index(row), index(row), {});
Q_EMIT dataChanged(index(row), index(row), {});
}
void RuleBookModel::setRuleSettingsAt(int row, const RuleSettings &settings)
@ -162,7 +162,7 @@ void RuleBookModel::setRuleSettingsAt(int row, const RuleSettings &settings)
copySettingsTo(ruleSettingsAt(row), settings);
emit dataChanged(index(row), index(row), {});
Q_EMIT dataChanged(index(row), index(row), {});
}
void RuleBookModel::load()

View file

@ -156,12 +156,12 @@ bool RulesModel::setData(const QModelIndex &index, const QVariant &value, int ro
writeToSettings(rule);
emit dataChanged(index, index, QVector<int>{role});
Q_EMIT dataChanged(index, index, QVector<int>{role});
if (rule->hasFlag(RuleItem::AffectsDescription)) {
emit descriptionChanged();
Q_EMIT descriptionChanged();
}
if (rule->hasFlag(RuleItem::AffectsWarning)) {
emit warningMessagesChanged();
Q_EMIT warningMessagesChanged();
}
return true;
@ -325,8 +325,8 @@ void RulesModel::setSettings(RuleSettings *settings)
endResetModel();
emit descriptionChanged();
emit warningMessagesChanged();
Q_EMIT descriptionChanged();
Q_EMIT warningMessagesChanged();
}
void RulesModel::writeToSettings(RuleItem *rule)
@ -704,7 +704,7 @@ void RulesModel::setSuggestedProperties(const QVariantMap &info)
m_rules[ruleKey]->setSuggestedValue(info.value(property));
}
emit dataChanged(index(0), index(rowCount()-1), {RulesModel::SuggestedValueRole});
Q_EMIT dataChanged(index(0), index(rowCount()-1), {RulesModel::SuggestedValueRole});
}
@ -836,13 +836,13 @@ void RulesModel::selectX11Window()
self->deleteLater();
if (!reply.isValid()) {
if (reply.error().name() == QLatin1String("org.kde.KWin.Error.InvalidWindow")) {
emit showErrorMessage(i18n("Could not detect window properties. The window is not managed by KWin."));
Q_EMIT showErrorMessage(i18n("Could not detect window properties. The window is not managed by KWin."));
}
return;
}
const QVariantMap windowInfo = reply.value();
setSuggestedProperties(windowInfo);
emit showSuggestions();
Q_EMIT showSuggestions();
}
);
}
@ -869,7 +869,7 @@ void RulesModel::updateVirtualDesktops()
return;
}
m_virtualDesktops = qdbus_cast<KWin::DBusDesktopDataVector>(reply.value());
emit virtualDesktopsUpdated();
Q_EMIT virtualDesktopsUpdated();
}
);
}

View file

@ -75,7 +75,7 @@ public:
Q_INVOKABLE void detectWindowProperties(int miliseconds);
signals:
Q_SIGNALS:
void descriptionChanged();
void warningMessagesChanged();
@ -105,7 +105,7 @@ private:
QList<OptionsModel::Data> focusModelData() const;
QList<OptionsModel::Data> colorSchemesModelData() const;
private slots:
private Q_SLOTS:
void selectX11Window();
private:

View file

@ -192,13 +192,13 @@ void KWinScreenEdge::onChanged()
for (auto it = m_reference.cbegin(); it != m_reference.cend(); ++it) {
needSave |= it.value() != monitor()->selectedEdgeItem(KWinScreenEdge::electricBorderToMonitorEdge(it.key()));
}
emit saveNeededChanged(needSave);
Q_EMIT saveNeededChanged(needSave);
bool defaults = isDefault();
for (auto it = m_default.cbegin(); it != m_default.cend(); ++it) {
defaults &= it.value() == monitor()->selectedEdgeItem(KWinScreenEdge::electricBorderToMonitorEdge(it.key()));
}
emit defaultChanged(defaults);
Q_EMIT defaultChanged(defaults);
}
void KWinScreenEdge::createConnection()

View file

@ -183,7 +183,7 @@ void Monitor::selectEdgeItem(int edge, int index)
int Monitor::selectedEdgeItem(int edge) const
{
foreach (QAction * act, popup_actions[ edge ])
Q_FOREACH (QAction * act, popup_actions[ edge ])
if (act->isChecked())
return popup_actions[ edge ].indexOf(act);
abort();
@ -199,8 +199,8 @@ void Monitor::popup(Corner* c, QPoint pos)
return;
if (QAction* a = popups[ i ]->exec(pos)) {
selectEdgeItem(i, popup_actions[ i ].indexOf(a));
emit changed();
emit edgeSelectionChanged(i, popup_actions[ i ].indexOf(a));
Q_EMIT changed();
Q_EMIT edgeSelectionChanged(i, popup_actions[ i ].indexOf(a));
c->setToolTip(KLocalizedString::removeAcceleratorMarker(a->text()));
}
return;

View file

@ -142,7 +142,7 @@ void ScreenPreviewWidget::dropEvent(QDropEvent *e)
if (!uris.isEmpty()) {
// TODO: Download remote file
if (uris.first().isLocalFile())
emit imageDropped(uris.first().path());
Q_EMIT imageDropped(uris.first().path());
}
}

View file

@ -137,7 +137,7 @@ void Module::importScriptInstallFinished(KJob *job)
updateListViewContents();
emit changed(true);
Q_EMIT changed(true);
}
void Module::updateListViewContents()
@ -159,7 +159,7 @@ void Module::load()
updateListViewContents();
ui->scriptSelector->load();
emit changed(false);
Q_EMIT changed(false);
}
void Module::save()
@ -189,5 +189,5 @@ void Module::save()
QDBusMessage message = QDBusMessage::createMethodCall("org.kde.KWin", "/Scripting", "org.kde.kwin.Scripting", "start");
QDBusConnection::sessionBus().asyncCall(message);
emit changed(false);
Q_EMIT changed(false);
}

View file

@ -381,37 +381,37 @@ void KWinTabBoxConfigForm::tabBoxToggled(bool on)
void KWinTabBoxConfigForm::onFilterScreen()
{
emit filterScreenChanged(filterScreen());
Q_EMIT filterScreenChanged(filterScreen());
}
void KWinTabBoxConfigForm::onFilterDesktop()
{
emit filterDesktopChanged(filterDesktop());
Q_EMIT filterDesktopChanged(filterDesktop());
}
void KWinTabBoxConfigForm::onFilterActivites()
{
emit filterActivitiesChanged(filterActivities());
Q_EMIT filterActivitiesChanged(filterActivities());
}
void KWinTabBoxConfigForm::onFilterMinimization()
{
emit filterMinimizationChanged(filterMinimization());
Q_EMIT filterMinimizationChanged(filterMinimization());
}
void KWin::KWinTabBoxConfigForm::onApplicationMode()
{
emit applicationModeChanged(applicationMode());
Q_EMIT applicationModeChanged(applicationMode());
}
void KWinTabBoxConfigForm::onShowDesktopMode()
{
emit showDesktopModeChanged(showDesktopMode());
Q_EMIT showDesktopModeChanged(showDesktopMode());
}
void KWinTabBoxConfigForm::onSwitchingMode()
{
emit switchingModeChanged(switchingMode());
Q_EMIT switchingModeChanged(switchingMode());
}
void KWinTabBoxConfigForm::onEffectCombo()
@ -423,7 +423,7 @@ void KWinTabBoxConfigForm::onEffectCombo()
}
ui->kcfg_HighlightWindows->setEnabled(isAddonEffect && m_isHighlightWindowsEnabled);
emit layoutNameChanged(layoutName());
Q_EMIT layoutNameChanged(layoutName());
}
void KWinTabBoxConfigForm::shortcutChanged(const QKeySequence &seq)

View file

@ -211,13 +211,13 @@ void SwitcherItem::setVisible(bool visible)
return;
}
m_visible = visible;
emit visibleChanged();
Q_EMIT visibleChanged();
}
void SwitcherItem::setItem(QObject *item)
{
m_item = item;
emit itemChanged();
Q_EMIT itemChanged();
}
void SwitcherItem::setCurrentIndex(int index)
@ -226,7 +226,7 @@ void SwitcherItem::setCurrentIndex(int index)
return;
}
m_currentIndex = index;
emit currentIndexChanged(m_currentIndex);
Q_EMIT currentIndexChanged(m_currentIndex);
}
QRect SwitcherItem::screenGeometry() const

View file

@ -111,7 +111,7 @@ WindowThumbnailItem::~WindowThumbnailItem()
void WindowThumbnailItem::setWId(qulonglong wId)
{
m_wId = wId;
emit wIdChanged(wId);
Q_EMIT wIdChanged(wId);
findImage();
}
@ -121,7 +121,7 @@ void WindowThumbnailItem::setClipTo(QQuickItem *clip)
return;
}
m_clipToItem = clip;
emit clipToChanged();
Q_EMIT clipToChanged();
}
void WindowThumbnailItem::findImage()
@ -192,7 +192,7 @@ void WindowThumbnailItem::setBrightness(qreal brightness)
}
m_brightness = brightness;
update();
emit brightnessChanged();
Q_EMIT brightnessChanged();
}
void WindowThumbnailItem::setSaturation(qreal saturation)
@ -202,7 +202,7 @@ void WindowThumbnailItem::setSaturation(qreal saturation)
}
m_saturation = saturation;
update();
emit saturationChanged();
Q_EMIT saturationChanged();
}
} // namespace KWin

View file

@ -57,7 +57,7 @@ public:
if (event->isAutoRepeat()) {
return;
}
emit m_input->keyStateChanged(event->nativeScanCode(), event->type() == QEvent::KeyPress ? InputRedirection::KeyboardKeyPressed : InputRedirection::KeyboardKeyReleased);
Q_EMIT m_input->keyStateChanged(event->nativeScanCode(), event->type() == QEvent::KeyPress ? InputRedirection::KeyboardKeyPressed : InputRedirection::KeyboardKeyReleased);
}
private:
@ -86,7 +86,7 @@ public:
if (mods == m_modifiers) {
return;
}
emit m_input->keyboardModifiersChanged(mods, m_modifiers);
Q_EMIT m_input->keyboardModifiersChanged(mods, m_modifiers);
m_modifiers = mods;
}

View file

@ -121,7 +121,7 @@ void KeyboardLayout::resetLayout()
loadShortcuts();
initDBusInterface();
emit layoutsReconfigured();
Q_EMIT layoutsReconfigured();
}
void KeyboardLayout::loadShortcuts()
@ -157,7 +157,7 @@ void KeyboardLayout::checkLayoutChange(uint previousLayout)
if (m_layout != currentLayout || previousLayout != currentLayout) {
m_layout = currentLayout;
notifyLayoutChange();
emit layoutChanged(currentLayout);
Q_EMIT layoutChanged(currentLayout);
}
}

View file

@ -38,7 +38,7 @@ void Policy::setLayout(uint index)
m_xkb->switchToLayout(index);
const uint currentLayout = m_xkb->currentLayout();
if (previousLayout != currentLayout) {
emit m_layout->layoutChanged(currentLayout);
Q_EMIT m_layout->layoutChanged(currentLayout);
}
}

View file

@ -36,7 +36,7 @@ void KeyboardRepeat::handleKeyRepeat()
m_timer->setInterval(1000 / waylandServer()->seat()->keyboard()->keyRepeatRate());
}
// TODO: better time
emit keyRepeat(m_key, m_time);
Q_EMIT keyRepeat(m_key, m_time);
}
void KeyboardRepeat::keyEvent(KeyEvent *event)

View file

@ -105,7 +105,7 @@ void Workspace::updateStackingOrder(bool propagate_new_clients)
if (changed || propagate_new_clients) {
propagateClients(propagate_new_clients);
markXStackingOrderAsDirty();
emit stackingOrderChanged();
Q_EMIT stackingOrderChanged();
if (m_compositor) {
m_compositor->addRepaintFull();
}
@ -255,7 +255,7 @@ AbstractClient* Workspace::findDesktop(bool topmost, int desktop) const
return c;
}
} else { // bottom-most
foreach (Toplevel * c, stacking_order) {
Q_FOREACH (Toplevel * c, stacking_order) {
AbstractClient *client = qobject_cast<AbstractClient*>(c);
if (client && c->isOnDesktop(desktop) && c->isDesktop()
&& client->isShown(true))
@ -349,7 +349,7 @@ void Workspace::raiseClient(AbstractClient* c, bool nogroup)
AbstractClient *transient_parent = c;
while ((transient_parent = transient_parent->transientFor()))
transients << transient_parent;
foreach (transient_parent, transients)
Q_FOREACH (transient_parent, transients)
raiseClient(transient_parent, true);
}
@ -726,7 +726,7 @@ void X11Client::restackWindow(xcb_window_t above, int detail, NET::RequestSource
bool X11Client::belongsToDesktop() const
{
foreach (const X11Client *c, group()->members()) {
Q_FOREACH (const X11Client *c, group()->members()) {
if (c->isDesktop())
return true;
}

View file

@ -178,7 +178,7 @@ void LayerShellV1Client::destroyClient()
markAsZombie();
cleanTabBox();
Deleted *deleted = Deleted::create(this);
emit windowClosed(this, deleted);
Q_EMIT windowClosed(this, deleted);
StackingUpdatesBlocker blocker(workspace());
cleanGrouping();
waylandServer()->removeClient(this);

View file

@ -49,7 +49,7 @@ void LayerShellV1Integration::createClient(LayerSurfaceV1Interface *shellSurface
return;
}
emit clientCreated(new LayerShellV1Client(shellSurface, output, this));
Q_EMIT clientCreated(new LayerShellV1Client(shellSurface, output, this));
}
void LayerShellV1Integration::recreateClient(LayerSurfaceV1Interface *shellSurface)

View file

@ -185,10 +185,10 @@ void Connection::setup()
void Connection::doSetup()
{
connect(s_self, &Connection::deviceAdded, s_self, [](Device* device) {
emit s_self->deviceAddedSysName(device->sysName());
Q_EMIT s_self->deviceAddedSysName(device->sysName());
});
connect(s_self, &Connection::deviceRemoved, s_self, [](Device* device) {
emit s_self->deviceRemovedSysName(device->sysName());
Q_EMIT s_self->deviceRemovedSysName(device->sysName());
});
Q_ASSERT(!m_notifier);
@ -236,7 +236,7 @@ void Connection::handleEvent()
m_eventQueue << event;
} while (true);
if (wasEmpty && !m_eventQueue.isEmpty()) {
emit eventsRead();
Q_EMIT eventsRead();
}
}
@ -340,29 +340,29 @@ void Connection::processEvents()
if (device->isAlphaNumericKeyboard()) {
m_alphaNumericKeyboard++;
if (m_alphaNumericKeyboard == 1) {
emit hasAlphaNumericKeyboardChanged(true);
Q_EMIT hasAlphaNumericKeyboardChanged(true);
}
}
if (m_keyboard == 1) {
emit hasKeyboardChanged(true);
Q_EMIT hasKeyboardChanged(true);
}
}
if (device->isPointer()) {
m_pointer++;
if (m_pointer == 1) {
emit hasPointerChanged(true);
Q_EMIT hasPointerChanged(true);
}
}
if (device->isTouch()) {
m_touch++;
if (m_touch == 1) {
emit hasTouchChanged(true);
Q_EMIT hasTouchChanged(true);
}
}
if (device->isTabletModeSwitch()) {
m_tabletModeSwitch++;
if (m_tabletModeSwitch == 1) {
emit hasTabletModeSwitchChanged(true);
Q_EMIT hasTabletModeSwitchChanged(true);
}
}
applyDeviceConfig(device);
@ -371,7 +371,7 @@ void Connection::processEvents()
// enable possible leds
libinput_device_led_update(device->device(), static_cast<libinput_led>(toLibinputLEDS(m_leds)));
emit deviceAdded(device);
Q_EMIT deviceAdded(device);
break;
}
case LIBINPUT_EVENT_DEVICE_REMOVED: {
@ -382,36 +382,36 @@ void Connection::processEvents()
}
auto device = *it;
m_devices.erase(it);
emit deviceRemoved(device);
Q_EMIT deviceRemoved(device);
if (device->isKeyboard()) {
m_keyboard--;
if (device->isAlphaNumericKeyboard()) {
m_alphaNumericKeyboard--;
if (m_alphaNumericKeyboard == 0) {
emit hasAlphaNumericKeyboardChanged(false);
Q_EMIT hasAlphaNumericKeyboardChanged(false);
}
}
if (m_keyboard == 0) {
emit hasKeyboardChanged(false);
Q_EMIT hasKeyboardChanged(false);
}
}
if (device->isPointer()) {
m_pointer--;
if (m_pointer == 0) {
emit hasPointerChanged(false);
Q_EMIT hasPointerChanged(false);
}
}
if (device->isTouch()) {
m_touch--;
if (m_touch == 0) {
emit hasTouchChanged(false);
Q_EMIT hasTouchChanged(false);
}
}
if (device->isTabletModeSwitch()) {
m_tabletModeSwitch--;
if (m_tabletModeSwitch == 0) {
emit hasTabletModeSwitchChanged(false);
Q_EMIT hasTabletModeSwitchChanged(false);
}
}
device->deleteLater();
@ -419,21 +419,21 @@ void Connection::processEvents()
}
case LIBINPUT_EVENT_KEYBOARD_KEY: {
KeyEvent *ke = static_cast<KeyEvent*>(event.data());
emit keyChanged(ke->key(), ke->state(), ke->time(), ke->device());
Q_EMIT keyChanged(ke->key(), ke->state(), ke->time(), ke->device());
break;
}
case LIBINPUT_EVENT_POINTER_AXIS: {
PointerEvent *pe = static_cast<PointerEvent*>(event.data());
const auto axes = pe->axis();
for (const InputRedirection::PointerAxis &axis : axes) {
emit pointerAxisChanged(axis, pe->axisValue(axis), pe->discreteAxisValue(axis),
Q_EMIT pointerAxisChanged(axis, pe->axisValue(axis), pe->discreteAxisValue(axis),
pe->axisSource(), pe->time(), pe->device());
}
break;
}
case LIBINPUT_EVENT_POINTER_BUTTON: {
PointerEvent *pe = static_cast<PointerEvent*>(event.data());
emit pointerButtonChanged(pe->button(), pe->buttonState(), pe->time(), pe->device());
Q_EMIT pointerButtonChanged(pe->button(), pe->buttonState(), pe->time(), pe->device());
break;
}
case LIBINPUT_EVENT_POINTER_MOTION: {
@ -455,12 +455,12 @@ void Connection::processEvents()
break;
}
}
emit pointerMotion(delta, deltaNonAccel, latestTime, latestTimeUsec, pe->device());
Q_EMIT pointerMotion(delta, deltaNonAccel, latestTime, latestTimeUsec, pe->device());
break;
}
case LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE: {
PointerEvent *pe = static_cast<PointerEvent*>(event.data());
emit pointerMotionAbsolute(pe->absolutePos(), pe->absolutePos(m_size), pe->time(), pe->device());
Q_EMIT pointerMotionAbsolute(pe->absolutePos(), pe->absolutePos(m_size), pe->time(), pe->device());
break;
}
case LIBINPUT_EVENT_TOUCH_DOWN: {
@ -471,13 +471,13 @@ void Connection::processEvents()
const QPointF globalPos =
devicePointToGlobalPosition(te->absolutePos(output->modeSize()),
output);
emit touchDown(te->id(), globalPos, te->time(), te->device());
Q_EMIT touchDown(te->id(), globalPos, te->time(), te->device());
break;
#endif
}
case LIBINPUT_EVENT_TOUCH_UP: {
TouchEvent *te = static_cast<TouchEvent*>(event.data());
emit touchUp(te->id(), te->time(), te->device());
Q_EMIT touchUp(te->id(), te->time(), te->device());
break;
}
case LIBINPUT_EVENT_TOUCH_MOTION: {
@ -488,53 +488,53 @@ void Connection::processEvents()
const QPointF globalPos =
devicePointToGlobalPosition(te->absolutePos(output->modeSize()),
output);
emit touchMotion(te->id(), globalPos, te->time(), te->device());
Q_EMIT touchMotion(te->id(), globalPos, te->time(), te->device());
break;
#endif
}
case LIBINPUT_EVENT_TOUCH_CANCEL: {
emit touchCanceled(event->device());
Q_EMIT touchCanceled(event->device());
break;
}
case LIBINPUT_EVENT_TOUCH_FRAME: {
emit touchFrame(event->device());
Q_EMIT touchFrame(event->device());
break;
}
case LIBINPUT_EVENT_GESTURE_PINCH_BEGIN: {
PinchGestureEvent *pe = static_cast<PinchGestureEvent*>(event.data());
emit pinchGestureBegin(pe->fingerCount(), pe->time(), pe->device());
Q_EMIT pinchGestureBegin(pe->fingerCount(), pe->time(), pe->device());
break;
}
case LIBINPUT_EVENT_GESTURE_PINCH_UPDATE: {
PinchGestureEvent *pe = static_cast<PinchGestureEvent*>(event.data());
emit pinchGestureUpdate(pe->scale(), pe->angleDelta(), pe->delta(), pe->time(), pe->device());
Q_EMIT pinchGestureUpdate(pe->scale(), pe->angleDelta(), pe->delta(), pe->time(), pe->device());
break;
}
case LIBINPUT_EVENT_GESTURE_PINCH_END: {
PinchGestureEvent *pe = static_cast<PinchGestureEvent*>(event.data());
if (pe->isCancelled()) {
emit pinchGestureCancelled(pe->time(), pe->device());
Q_EMIT pinchGestureCancelled(pe->time(), pe->device());
} else {
emit pinchGestureEnd(pe->time(), pe->device());
Q_EMIT pinchGestureEnd(pe->time(), pe->device());
}
break;
}
case LIBINPUT_EVENT_GESTURE_SWIPE_BEGIN: {
SwipeGestureEvent *se = static_cast<SwipeGestureEvent*>(event.data());
emit swipeGestureBegin(se->fingerCount(), se->time(), se->device());
Q_EMIT swipeGestureBegin(se->fingerCount(), se->time(), se->device());
break;
}
case LIBINPUT_EVENT_GESTURE_SWIPE_UPDATE: {
SwipeGestureEvent *se = static_cast<SwipeGestureEvent*>(event.data());
emit swipeGestureUpdate(se->delta(), se->time(), se->device());
Q_EMIT swipeGestureUpdate(se->delta(), se->time(), se->device());
break;
}
case LIBINPUT_EVENT_GESTURE_SWIPE_END: {
SwipeGestureEvent *se = static_cast<SwipeGestureEvent*>(event.data());
if (se->isCancelled()) {
emit swipeGestureCancelled(se->time(), se->device());
Q_EMIT swipeGestureCancelled(se->time(), se->device());
} else {
emit swipeGestureEnd(se->time(), se->device());
Q_EMIT swipeGestureEnd(se->time(), se->device());
}
break;
}
@ -542,10 +542,10 @@ void Connection::processEvents()
SwitchEvent *se = static_cast<SwitchEvent*>(event.data());
switch (se->state()) {
case SwitchEvent::State::Off:
emit switchToggledOff(se->time(), se->timeMicroseconds(), se->device());
Q_EMIT switchToggledOff(se->time(), se->timeMicroseconds(), se->device());
break;
case SwitchEvent::State::On:
emit switchToggledOn(se->time(), se->timeMicroseconds(), se->device());
Q_EMIT switchToggledOn(se->time(), se->timeMicroseconds(), se->device());
break;
default:
Q_UNREACHABLE();
@ -581,7 +581,7 @@ void Connection::processEvents()
#else
const QPointF globalPos;
#endif
emit tabletToolEvent(tabletEventType,
Q_EMIT tabletToolEvent(tabletEventType,
globalPos, tte->pressure(),
tte->xTilt(), tte->yTilt(), tte->rotation(),
tte->isTipDown(), tte->isNearby(), createTabletId(tte->tool(), event->device()->groupUserData()), tte->time());
@ -589,14 +589,14 @@ void Connection::processEvents()
}
case LIBINPUT_EVENT_TABLET_TOOL_BUTTON: {
auto *tabletEvent = static_cast<TabletToolButtonEvent *>(event.data());
emit tabletToolButtonEvent(tabletEvent->buttonId(),
Q_EMIT tabletToolButtonEvent(tabletEvent->buttonId(),
tabletEvent->isButtonPressed(),
createTabletId(tabletEvent->tool(), event->device()->groupUserData()));
break;
}
case LIBINPUT_EVENT_TABLET_PAD_BUTTON: {
auto *tabletEvent = static_cast<TabletPadButtonEvent *>(event.data());
emit tabletPadButtonEvent(tabletEvent->buttonId(),
Q_EMIT tabletPadButtonEvent(tabletEvent->buttonId(),
tabletEvent->isButtonPressed(),
{ event->device()->groupUserData() });
break;
@ -604,7 +604,7 @@ void Connection::processEvents()
case LIBINPUT_EVENT_TABLET_PAD_RING: {
auto *tabletEvent = static_cast<TabletPadRingEvent *>(event.data());
tabletEvent->position();
emit tabletPadRingEvent(tabletEvent->number(),
Q_EMIT tabletPadRingEvent(tabletEvent->number(),
tabletEvent->position(),
tabletEvent->source() == LIBINPUT_TABLET_PAD_RING_SOURCE_FINGER,
{ event->device()->groupUserData() });
@ -612,7 +612,7 @@ void Connection::processEvents()
}
case LIBINPUT_EVENT_TABLET_PAD_STRIP: {
auto *tabletEvent = static_cast<TabletPadStripEvent *>(event.data());
emit tabletPadStripEvent(tabletEvent->number(),
Q_EMIT tabletPadStripEvent(tabletEvent->number(),
tabletEvent->position(),
tabletEvent->source() == LIBINPUT_TABLET_PAD_STRIP_SOURCE_FINGER,
{ event->device()->groupUserData() });
@ -625,19 +625,19 @@ void Connection::processEvents()
}
if (wasSuspended) {
if (m_keyboardBeforeSuspend && !m_keyboard) {
emit hasKeyboardChanged(false);
Q_EMIT hasKeyboardChanged(false);
}
if (m_alphaNumericKeyboardBeforeSuspend && !m_alphaNumericKeyboard) {
emit hasAlphaNumericKeyboardChanged(false);
Q_EMIT hasAlphaNumericKeyboardChanged(false);
}
if (m_pointerBeforeSuspend && !m_pointer) {
emit hasPointerChanged(false);
Q_EMIT hasPointerChanged(false);
}
if (m_touchBeforeSuspend && !m_touch) {
emit hasTouchChanged(false);
Q_EMIT hasTouchChanged(false);
}
if (m_tabletModeSwitchBeforeSuspend && !m_tabletModeSwitch) {
emit hasTabletModeSwitchChanged(false);
Q_EMIT hasTabletModeSwitchChanged(false);
}
wasSuspended = false;
}
@ -809,7 +809,7 @@ void Connection::updateLEDs(Xkb::LEDs leds)
QStringList Connection::devicesSysNames() const {
QStringList sl;
foreach (Device *d, m_devices) {
Q_FOREACH (Device *d, m_devices) {
sl.append(d->sysName());
}
return sl;

View file

@ -316,7 +316,7 @@ void Device::setPointerAcceleration(qreal acceleration)
if (libinput_device_config_accel_set_speed(m_device, acceleration) == LIBINPUT_CONFIG_STATUS_SUCCESS) {
if (m_pointerAcceleration != acceleration) {
m_pointerAcceleration = acceleration;
emit pointerAccelerationChanged();
Q_EMIT pointerAccelerationChanged();
writeEntry(ConfigKey::PointerAcceleration, QString::number(acceleration, 'f', 3));
}
}
@ -331,7 +331,7 @@ void Device::setScrollButton(quint32 button)
if (m_scrollButton != button) {
m_scrollButton = button;
writeEntry(ConfigKey::ScrollButton, m_scrollButton);
emit scrollButtonChanged();
Q_EMIT scrollButtonChanged();
}
}
}
@ -351,7 +351,7 @@ void Device::setPointerAccelerationProfile(bool set, enum libinput_config_accel
if (libinput_device_config_accel_set_profile(m_device, profile) == LIBINPUT_CONFIG_STATUS_SUCCESS) {
if (m_pointerAccelerationProfile != profile) {
m_pointerAccelerationProfile = profile;
emit pointerAccelerationProfileChanged();
Q_EMIT pointerAccelerationProfileChanged();
writeEntry(ConfigKey::PointerAccelerationProfile, (quint32) profile);
}
}
@ -372,7 +372,7 @@ void Device::setClickMethod(bool set, enum libinput_config_click_method method)
if (libinput_device_config_click_set_method(m_device, method) == LIBINPUT_CONFIG_STATUS_SUCCESS) {
if (m_clickMethod != method) {
m_clickMethod = method;
emit clickMethodChanged();
Q_EMIT clickMethodChanged();
writeEntry(ConfigKey::ClickMethod, (quint32) method);
}
}
@ -397,7 +397,7 @@ void Device::setScrollMethod(bool set, enum libinput_config_scroll_method method
if (libinput_device_config_scroll_set_method(m_device, method) == LIBINPUT_CONFIG_STATUS_SUCCESS) {
if (!isCurrent) {
m_scrollMethod = method;
emit scrollMethodChanged();
Q_EMIT scrollMethodChanged();
writeEntry(ConfigKey::ScrollMethod, (quint32) method);
}
}
@ -418,7 +418,7 @@ void Device::setLmrTapButtonMap(bool set)
if (m_tapButtonMap != map) {
m_tapButtonMap = map;
writeEntry(ConfigKey::LmrTapButtonMap, set);
emit tapButtonMapChanged();
Q_EMIT tapButtonMapChanged();
}
}
}
@ -450,7 +450,7 @@ void Device::method(bool set) \
if (m_##variable != set) { \
m_##variable = set; \
writeEntry(ConfigKey::key, m_##variable); \
emit variable##Changed(); \
Q_EMIT variable##Changed(); \
}\
} \
}
@ -470,7 +470,7 @@ void Device::method(bool set) \
if (m_##variable != set) { \
m_##variable = set; \
writeEntry(ConfigKey::key, m_##variable); \
emit variable##Changed(); \
Q_EMIT variable##Changed(); \
}\
} \
}
@ -489,7 +489,7 @@ void Device::setScrollFactor(qreal factor)
if (m_scrollFactor != factor) {
m_scrollFactor = factor;
writeEntry(ConfigKey::ScrollFactor, m_scrollFactor);
emit scrollFactorChanged();
Q_EMIT scrollFactorChanged();
}
}

View file

@ -455,7 +455,7 @@ void AnimationEffect::clipWindow(const EffectWindow *w, const AniData &anim, Win
WindowQuadList filtered;
if (clip.left() != geo.left()) {
quads = quads.splitAtX(clip.left());
foreach (const WindowQuad &quad, quads) {
Q_FOREACH (const WindowQuad &quad, quads) {
if (quad.right() >= clip.left())
filtered << quad;
}
@ -464,7 +464,7 @@ void AnimationEffect::clipWindow(const EffectWindow *w, const AniData &anim, Win
}
if (clip.right() != geo.right()) {
quads = quads.splitAtX(clip.left());
foreach (const WindowQuad &quad, quads) {
Q_FOREACH (const WindowQuad &quad, quads) {
if (quad.right() <= clip.right())
filtered << quad;
}
@ -473,7 +473,7 @@ void AnimationEffect::clipWindow(const EffectWindow *w, const AniData &anim, Win
}
if (clip.top() != geo.top()) {
quads = quads.splitAtY(clip.top());
foreach (const WindowQuad &quad, quads) {
Q_FOREACH (const WindowQuad &quad, quads) {
if (quad.top() >= clip.top())
filtered << quad;
}
@ -482,7 +482,7 @@ void AnimationEffect::clipWindow(const EffectWindow *w, const AniData &anim, Win
}
if (clip.bottom() != geo.bottom()) {
quads = quads.splitAtY(clip.bottom());
foreach (const WindowQuad &quad, quads) {
Q_FOREACH (const WindowQuad &quad, quads) {
if (quad.bottom() <= clip.bottom())
filtered << quad;
}

View file

@ -182,7 +182,7 @@ void EffectQuickView::update()
QOpenGLFramebufferObject::bindDefault();
d->m_glcontext->doneCurrent();
}
emit repaintNeeded();
Q_EMIT repaintNeeded();
}
void EffectQuickView::forwardMouseEvent(QEvent *e)
@ -261,7 +261,7 @@ void EffectQuickView::setVisible(bool visible)
d->m_visible = visible;
if (visible){
emit d->m_renderControl->renderRequested();
Q_EMIT d->m_renderControl->renderRequested();
} else {
// deferred to not change GL context
QTimer::singleShot(0, this, [this]() {
@ -317,7 +317,7 @@ void EffectQuickView::setGeometry(const QRect &rect)
{
const QRect oldGeometry = d->m_view->geometry();
d->m_view->setGeometry(rect);
emit geometryChanged(oldGeometry, rect);
Q_EMIT geometryChanged(oldGeometry, rect);
}
void EffectQuickView::Private::releaseResources()

View file

@ -1011,7 +1011,7 @@ WindowQuadList WindowQuadList::makeGrid(int maxQuadSize) const
double top = first().top();
double bottom = first().bottom();
foreach (const WindowQuad &quad, *this) {
Q_FOREACH (const WindowQuad &quad, *this) {
#if !defined(QT_NO_DEBUG)
if (quad.isTransformed())
qFatal("Splitting quads is allowed only in pre-paint calls!");
@ -1269,10 +1269,10 @@ void WindowQuadList::makeArrays(float **vertices, float **texcoords, const QSize
WindowQuadList WindowQuadList::select(WindowQuadType type) const
{
foreach (const WindowQuad & q, *this) {
Q_FOREACH (const WindowQuad & q, *this) {
if (q.type() != type) { // something else than ones to select, make a copy and filter
WindowQuadList ret;
foreach (const WindowQuad & q, *this) {
Q_FOREACH (const WindowQuad & q, *this) {
if (q.type() == type)
ret.append(q);
}
@ -1287,7 +1287,7 @@ WindowQuadList WindowQuadList::filterOut(WindowQuadType type) const
for (const WindowQuad & q : *this) {
if (q.type() == type) { // something to filter out, make a copy and filter
WindowQuadList ret;
foreach (const WindowQuad & q, *this) {
Q_FOREACH (const WindowQuad & q, *this) {
if (q.type() != type)
ret.append(q);
}

View file

@ -162,7 +162,7 @@ Application::~Application()
void Application::notifyStarted()
{
emit started();
Q_EMIT started();
}
void Application::destroyAtoms()
@ -278,7 +278,7 @@ void Application::createWorkspace()
// create workspace.
(void) new Workspace();
emit workspaceCreated();
Q_EMIT workspaceCreated();
}
void Application::createInput()
@ -295,7 +295,7 @@ void Application::createScreens()
return;
}
Screens::create(this);
emit screensCreated();
Q_EMIT screensCreated();
}
void Application::createAtoms()
@ -597,7 +597,7 @@ void Application::initPlatform(const KPluginMetaData &plugin)
}
}
}
emit platformCreated();
Q_EMIT platformCreated();
}
}

View file

@ -99,7 +99,7 @@ void OnScreenNotification::setVisible(bool visible)
return;
}
m_visible = visible;
emit visibleChanged();
Q_EMIT visibleChanged();
}
QString OnScreenNotification::message() const
@ -113,7 +113,7 @@ void OnScreenNotification::setMessage(const QString &message)
return;
}
m_message = message;
emit messageChanged();
Q_EMIT messageChanged();
}
QString OnScreenNotification::iconName() const
@ -127,7 +127,7 @@ void OnScreenNotification::setIconName(const QString &iconName)
return;
}
m_iconName = iconName;
emit iconNameChanged();
Q_EMIT iconNameChanged();
}
int OnScreenNotification::timeout() const
@ -141,7 +141,7 @@ void OnScreenNotification::setTimeout(int timeout)
return;
}
m_timer->setInterval(timeout);
emit timeoutChanged();
Q_EMIT timeoutChanged();
}
void OnScreenNotification::show()

Some files were not shown because too many files have changed in this diff Show more