Cleanup: reduce usage of QDesktopWidget
This commit is contained in:
parent
bf4ba54647
commit
66df3eefdf
2 changed files with 6 additions and 3 deletions
|
@ -57,7 +57,12 @@ WorkspaceWrapper::WorkspaceWrapper(QObject* parent) : QObject(parent)
|
||||||
#endif
|
#endif
|
||||||
connect(screens(), &Screens::sizeChanged, this, &WorkspaceWrapper::virtualScreenSizeChanged);
|
connect(screens(), &Screens::sizeChanged, this, &WorkspaceWrapper::virtualScreenSizeChanged);
|
||||||
connect(screens(), &Screens::geometryChanged, this, &WorkspaceWrapper::virtualScreenGeometryChanged);
|
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)));
|
connect(QApplication::desktop(), SIGNAL(resized(int)), SIGNAL(screenResized(int)));
|
||||||
foreach (KWin::Client *client, ws->clientList()) {
|
foreach (KWin::Client *client, ws->clientList()) {
|
||||||
setupClientConnections(client);
|
setupClientConnections(client);
|
||||||
|
|
|
@ -31,9 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include "scripting/scripting.h"
|
#include "scripting/scripting.h"
|
||||||
#include "switcheritem.h"
|
#include "switcheritem.h"
|
||||||
// Qt
|
// Qt
|
||||||
#include <QApplication>
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDesktopWidget>
|
|
||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
#include <QModelIndex>
|
#include <QModelIndex>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
|
Loading…
Reference in a new issue