From 1b4cca3a39a62d4e79540de77dd642f206e6a38f Mon Sep 17 00:00:00 2001 From: Craig Watson Date: Thu, 5 Nov 2015 15:34:34 +0100 Subject: [PATCH] Updated connect functions --- src/core/UBDisplayManager.cpp | 6 ++++-- src/core/UBDisplayManager.h | 1 + src/core/UBPreferencesController.cpp | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/core/UBDisplayManager.cpp b/src/core/UBDisplayManager.cpp index 5aacc83a..59e858af 100644 --- a/src/core/UBDisplayManager.cpp +++ b/src/core/UBDisplayManager.cpp @@ -41,6 +41,8 @@ #include "core/memcheck.h" +#include "qdesktopwidget.h" + UBDisplayManager::UBDisplayManager(QObject *parent) : QObject(parent) , mControlScreenIndex(-1) @@ -55,8 +57,8 @@ UBDisplayManager::UBDisplayManager(QObject *parent) initScreenIndexes(); - connect(mDesktop, SIGNAL(resized(int)), this, SLOT(adjustScreens(int))); - connect(mDesktop, SIGNAL(workAreaResized(int)), this, SLOT(adjustScreens(int))); + connect(mDesktop, &QDesktopWidget::resized, this, &UBDisplayManager::adjustScreens); + connect(mDesktop, &QDesktopWidget::workAreaResized, this, &UBDisplayManager::adjustScreens); } diff --git a/src/core/UBDisplayManager.h b/src/core/UBDisplayManager.h index e45044ca..a305716e 100644 --- a/src/core/UBDisplayManager.h +++ b/src/core/UBDisplayManager.h @@ -32,6 +32,7 @@ class UBBlackoutWidget; class UBBoardView; +class QDesktopWidget; class UBDisplayManager : public QObject { diff --git a/src/core/UBPreferencesController.cpp b/src/core/UBPreferencesController.cpp index 1c2dc591..f8d2ab90 100644 --- a/src/core/UBPreferencesController.cpp +++ b/src/core/UBPreferencesController.cpp @@ -44,6 +44,8 @@ #include "core/memcheck.h" +#include "qdesktopwidget.h" + qreal UBPreferencesController::sSliderRatio = 10.0; qreal UBPreferencesController::sMinPenWidth = 0.5; qreal UBPreferencesController::sMaxPenWidth = 50.0; @@ -78,7 +80,7 @@ UBPreferencesController::UBPreferencesController(QWidget *parent) mPreferencesUI = new Ui::preferencesDialog(); // deleted in mPreferencesUI->setupUi(mPreferencesWindow); adjustScreens(1); - connect(mDesktop, SIGNAL(screenCountChanged(int)), this, SLOT(adjustScreens(int))); + connect(mDesktop, &QDesktopWidget::screenCountChanged, this, &UBPreferencesController::adjustScreens); wire(); }