From 66df3eefdfe74aadd81f7bc3555c436920bbd33a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 27 Nov 2014 09:32:43 +0100 Subject: [PATCH] Cleanup: reduce usage of QDesktopWidget --- scripting/workspace_wrapper.cpp | 7 ++++++- tabbox/tabboxhandler.cpp | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripting/workspace_wrapper.cpp b/scripting/workspace_wrapper.cpp index cb52a828bd..0fda6ccfcd 100644 --- a/scripting/workspace_wrapper.cpp +++ b/scripting/workspace_wrapper.cpp @@ -57,7 +57,12 @@ WorkspaceWrapper::WorkspaceWrapper(QObject* parent) : QObject(parent) #endif connect(screens(), &Screens::sizeChanged, this, &WorkspaceWrapper::virtualScreenSizeChanged); connect(screens(), &Screens::geometryChanged, this, &WorkspaceWrapper::virtualScreenGeometryChanged); - connect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), SIGNAL(numberScreensChanged(int))); + connect(screens(), &Screens::countChanged, this, + [this] (int previousCount, int currentCount) { + Q_UNUSED(previousCount) + emit numberScreensChanged(currentCount); + } + ); connect(QApplication::desktop(), SIGNAL(resized(int)), SIGNAL(screenResized(int))); foreach (KWin::Client *client, ws->clientList()) { setupClientConnections(client); diff --git a/tabbox/tabboxhandler.cpp b/tabbox/tabboxhandler.cpp index da5a45602e..11f7c30703 100644 --- a/tabbox/tabboxhandler.cpp +++ b/tabbox/tabboxhandler.cpp @@ -31,9 +31,7 @@ along with this program. If not, see . #include "scripting/scripting.h" #include "switcheritem.h" // Qt -#include #include -#include #include #include #include