on xenial help sign in
Move connect() to new syntax

Approved by: Michael Zanetti

commit868f568d73432f20b86d20e90b74a4426dd24a9c authorAlbert Astals Cid <albert.astals@canonical.com> dateMon 31 Aug 2015, 10:25 (11 years ago) parenta2ecab03f43349
46 files changed+199−221
plugins/Dash/abstractdashview.cpp+5−5 plugins/Dash/listviewwithpageheader.cpp+8−8 plugins/LightDM/DBusGreeter.cpp+1−1 plugins/LightDM/DBusGreeterList.cpp+2−2 plugins/LightDM/Greeter.cpp+6−6 plugins/LightDM/liblightdm/Greeter.cpp+1−1 plugins/LightDM/liblightdm/GreeterPrivate.cpp+2−2 plugins/Ubuntu/DownloadDaemonListener/DownloadTracker.cpp+7−7 plugins/Unity/Indicators/indicatorsmanager.cpp+3−3 plugins/Unity/Indicators/indicatorsmodel.cpp+8−8 plugins/Unity/Indicators/modelactionrootstate.cpp+4−4 plugins/Unity/Indicators/modelprinter.cpp+6−6 plugins/Unity/Indicators/unitymenumodelstack.cpp+4−4 plugins/Unity/InputInfo/linux/qinputdeviceinfo_linux.cpp+2−2 plugins/Unity/InputInfo/qdeclarativeinputdeviceinfo.cpp+1−1 plugins/Unity/InputInfo/qinputinfo.cpp+1−1 plugins/Unity/Launcher/launchermodel.cpp+6−6 plugins/Utils/qlimitproxymodelqml.cpp+15−15 plugins/Utils/unitysortfilterproxymodelqml.cpp+6−6 plugins/Wizard/System.cpp+1−2 src/libunity8-private/unitydbusobject.cpp+1−1 src/libunity8-private/unitydbusvirtualobject.cpp+1−1 src/main.cpp+1−1 tests/mocks/GSettings.1.0/fake_gsettings.cpp+4−4 tests/mocks/LightDM/liblightdm/Greeter.cpp+2−2 tests/mocks/MeeGo/QOfono/MockQOfonoManager.cpp+7−7 tests/mocks/QtMultimedia/audio.cpp+1−1 tests/mocks/Unity/Application/ApplicationInfo.cpp+2−2 tests/mocks/Unity/Indicators/fakeindicatorsmodel.cpp+3−3 tests/mocks/Unity/fake_navigation.cpp+3−3 tests/mocks/Unity/fake_previewmodel.cpp+1−2 tests/mocks/Unity/fake_scopes.cpp+4−4 tests/mocks/libusermetrics/UserMetrics.cpp+2−4 tests/plugins/Dash/listviewwithpageheadersectiontest.cpp+1−1 tests/plugins/Dash/listviewwithpageheadertest.cpp+1−1 tests/plugins/LightDM/dbus.cpp+5−5 tests/plugins/Ubuntu/Gestures/tst_DirectionalDragArea.cpp+4−4 tests/plugins/Ubuntu/Gestures/tst_PressedOutsideNotifier.cpp+5−5 tests/plugins/Unity/Indicators/UnityMenuModelStackTest.cpp+3−3 tests/plugins/Unity/Launcher/launchermodeltest.cpp+3−3 tests/plugins/Utils/HomeKeyWatcherTest.cpp+2−2 tests/plugins/Utils/ModelTest.cpp+22−40 tests/plugins/Utils/QLimitProxyModelTest.cpp+24−24 tests/plugins/Utils/UnitySortFilterProxyModelTest.cpp+4−4 tests/qmltests/Components/tst_DragHandle.cpp+1−1 tests/uqmlscene/main.cpp+3−3
plugins/Dash/abstractdashview.cpp+5−5
@@ -28,8 +28,8 @@ AbstractDashView::AbstractDashView()
2828 , m_delegateValidated(false)
2929 , m_implicitHeightDirty(false)
3030{
31− connect(this, SIGNAL(widthChanged()), this, SLOT(relayout()));
32− connect(this, SIGNAL(heightChanged()), this, SLOT(onHeightChanged()));
31+ connect(this, &AbstractDashView::widthChanged, this, &AbstractDashView::relayout);
32+ connect(this, &AbstractDashView::heightChanged, this, &AbstractDashView::onHeightChanged);
3333}
3434
3535QAbstractItemModel *AbstractDashView::model() const
@@ -43,10 +43,10 @@ void AbstractDashView::setModel(QAbstractItemModel *model)
4343 if (!m_delegateModel) {
4444 createDelegateModel();
4545 } else {
46− disconnect(m_delegateModel, SIGNAL(modelUpdated(QQmlChangeSet,bool)), this, SLOT(onModelUpdated(QQmlChangeSet,bool)));
46+ disconnect(m_delegateModel, &QQmlDelegateModel::modelUpdated, this, &AbstractDashView::onModelUpdated);
4747 }
4848 m_delegateModel->setModel(QVariant::fromValue<QAbstractItemModel *>(model));
49− connect(m_delegateModel, SIGNAL(modelUpdated(QQmlChangeSet,bool)), this, SLOT(onModelUpdated(QQmlChangeSet,bool)));
49+ connect(m_delegateModel, &QQmlDelegateModel::modelUpdated, this, &AbstractDashView::onModelUpdated);
5050
5151 cleanupExistingItems();
5252
@@ -167,7 +167,7 @@ void AbstractDashView::setDisplayMarginEnd(qreal end)
167167void AbstractDashView::createDelegateModel()
168168{
169169 m_delegateModel = new QQmlDelegateModel(qmlContext(this), this);
170− connect(m_delegateModel, SIGNAL(createdItem(int,QObject*)), this, SLOT(itemCreated(int,QObject*)));
170+ connect(m_delegateModel, &QQmlDelegateModel::createdItem, this, &AbstractDashView::itemCreated);
171171 if (isComponentComplete())
172172 m_delegateModel->componentComplete();
173173}
plugins/Dash/listviewwithpageheader.cpp+8−8
@@ -168,10 +168,10 @@ ListViewWithPageHeader::ListViewWithPageHeader()
168168 m_contentYAnimation->setDuration(200);
169169 m_contentYAnimation->setTargetObject(this);
170170
171− connect(this, SIGNAL(contentWidthChanged()), this, SLOT(onContentWidthChanged()));
172− connect(this, SIGNAL(contentHeightChanged()), this, SLOT(onContentHeightChanged()));
173− connect(this, SIGNAL(heightChanged()), this, SLOT(onHeightChanged()));
174− connect(m_contentYAnimation, SIGNAL(runningChanged(bool)), this, SLOT(contentYAnimationRunningChanged(bool)));
171+ connect(this, &ListViewWithPageHeader::contentWidthChanged, this, &ListViewWithPageHeader::onContentWidthChanged);
172+ connect(this, &ListViewWithPageHeader::contentHeightChanged, this, &ListViewWithPageHeader::onContentHeightChanged);
173+ connect(this, &ListViewWithPageHeader::heightChanged, this, &ListViewWithPageHeader::onHeightChanged);
174+ connect(m_contentYAnimation, &QQuickNumberAnimation::runningChanged, this, &ListViewWithPageHeader::contentYAnimationRunningChanged);
175175
176176 setFlickableDirection(VerticalFlick);
177177}
@@ -191,10 +191,10 @@ void ListViewWithPageHeader::setModel(QAbstractItemModel *model)
191191 if (!m_delegateModel) {
192192 createDelegateModel();
193193 } else {
194− disconnect(m_delegateModel, SIGNAL(modelUpdated(QQmlChangeSet,bool)), this, SLOT(onModelUpdated(QQmlChangeSet,bool)));
194+ disconnect(m_delegateModel, &QQmlDelegateModel::modelUpdated, this, &ListViewWithPageHeader::onModelUpdated);
195195 }
196196 m_delegateModel->setModel(QVariant::fromValue<QAbstractItemModel *>(model));
197− connect(m_delegateModel, SIGNAL(modelUpdated(QQmlChangeSet,bool)), this, SLOT(onModelUpdated(QQmlChangeSet,bool)));
197+ connect(m_delegateModel, &QQmlDelegateModel::modelUpdated, this, &ListViewWithPageHeader::onModelUpdated);
198198 Q_EMIT modelChanged();
199199 polish();
200200 // TODO?
@@ -283,7 +283,7 @@ void ListViewWithPageHeader::setSectionDelegate(QQmlComponent *delegate)
283283 m_topSectionItem = getSectionItem(QString());
284284 m_topSectionItem->setZ(3);
285285 QQuickItemPrivate::get(m_topSectionItem)->setCulled(true);
286− connect(m_topSectionItem, SIGNAL(heightChanged()), SIGNAL(stickyHeaderHeightChanged()));
286+ connect(m_topSectionItem, &QQuickItem::heightChanged, this, &ListViewWithPageHeader::stickyHeaderHeightChanged);
287287
288288 // TODO create sections for existing items
289289
@@ -605,7 +605,7 @@ void ListViewWithPageHeader::adjustHeader(qreal diff)
605605void ListViewWithPageHeader::createDelegateModel()
606606{
607607 m_delegateModel = new QQmlDelegateModel(qmlContext(this), this);
608− connect(m_delegateModel, SIGNAL(createdItem(int,QObject*)), this, SLOT(itemCreated(int,QObject*)));
608+ connect(m_delegateModel, &QQmlDelegateModel::createdItem, this, &ListViewWithPageHeader::itemCreated);
609609 if (isComponentComplete())
610610 m_delegateModel->componentComplete();
611611 updateWatchedRoles();
plugins/LightDM/DBusGreeter.cpp+1−1
@@ -24,7 +24,7 @@ DBusGreeter::DBusGreeter(Greeter *greeter, const QString &path)
2424 : UnityDBusObject(path, "com.canonical.UnityGreeter", true, greeter),
2525 m_greeter(greeter)
2626{
27− connect(m_greeter, SIGNAL(isActiveChanged()), this, SLOT(isActiveChangedHandler()));
27+ connect(m_greeter, &Greeter::isActiveChanged, this, &DBusGreeter::isActiveChangedHandler);
2828}
2929
3030bool DBusGreeter::isActive() const
plugins/LightDM/DBusGreeterList.cpp+2−2
@@ -24,8 +24,8 @@ DBusGreeterList::DBusGreeterList(Greeter *greeter, const QString &path)
2424 : UnityDBusObject(path, "com.canonical.UnityGreeter", true, greeter),
2525 m_greeter(greeter)
2626{
27− connect(m_greeter, SIGNAL(authenticationUserChanged(const QString &)), this, SLOT(authenticationUserChangedHandler(const QString &)));
28− connect(m_greeter, SIGNAL(promptlessChanged()), this, SLOT(promptlessChangedHandler()));
27+ connect(m_greeter, &Greeter::authenticationUserChanged, this, &DBusGreeterList::authenticationUserChangedHandler);
28+ connect(m_greeter, &Greeter::promptlessChanged, this, &DBusGreeterList::promptlessChangedHandler);
2929}
3030
3131QString DBusGreeterList::GetActiveEntry() const
plugins/LightDM/Greeter.cpp+6−6
@@ -35,12 +35,12 @@ Greeter::Greeter(QObject* parent)
3535{
3636 Q_D(Greeter);
3737
38− connect(d->m_greeter, SIGNAL(showMessage(QString, QLightDM::Greeter::MessageType)),
39− this, SLOT(showMessageFilter(QString, QLightDM::Greeter::MessageType)));
40− connect(d->m_greeter, SIGNAL(showPrompt(QString, QLightDM::Greeter::PromptType)),
41− this, SLOT(showPromptFilter(QString, QLightDM::Greeter::PromptType)));
42− connect(d->m_greeter, SIGNAL(authenticationComplete()),
43− this, SLOT(authenticationCompleteFilter()));
38+ connect(d->m_greeter, &QLightDM::Greeter::showMessage,
39+ this, &Greeter::showMessageFilter);
40+ connect(d->m_greeter, &QLightDM::Greeter::showPrompt,
41+ this, &Greeter::showPromptFilter);
42+ connect(d->m_greeter, &QLightDM::Greeter::authenticationComplete,
43+ this, &Greeter::authenticationCompleteFilter);
4444
4545 d->m_greeter->connectSync();
4646}
plugins/LightDM/liblightdm/Greeter.cpp+1−1
@@ -175,7 +175,7 @@ void Greeter::sendAuthenticationComplete()
175175{
176176 if (qgetenv("UNITY_TESTING").isEmpty()) {
177177 // simulate PAM's delay
178− QTimer::singleShot(1000, this, SIGNAL(authenticationComplete()));
178+ QTimer::singleShot(1000, this, &Greeter::authenticationComplete);
179179 } else {
180180 Q_EMIT authenticationComplete();
181181 }
plugins/LightDM/liblightdm/GreeterPrivate.cpp+2−2
@@ -50,8 +50,8 @@ public:
5050 {
5151 qRegisterMetaType<QLightDM::GreeterImpl::ResponseFuture>("QLightDM::GreeterImpl::ResponseFuture");
5252
53− connect(&futureWatcher, SIGNAL(finished()),
54− this, SLOT(finishPam()));
53+ connect(&futureWatcher, &QFutureWatcher<int>::finished,
54+ this, &GreeterImpl::finishPam);
5555 connect(this, SIGNAL(showMessage(pam_handle *, QString, QLightDM::Greeter::MessageType)),
5656 this, SLOT(handleMessage(pam_handle *, QString, QLightDM::Greeter::MessageType)));
5757 // This next connect is how we pass ResponseFutures between threads
plugins/Ubuntu/DownloadDaemonListener/DownloadTracker.cpp+7−7
@@ -71,13 +71,13 @@ void DownloadTracker::startService()
7171 if(!m_service.isEmpty() && !m_dbusPath.isEmpty()) {
7272 m_adaptor = new DownloadTrackerAdaptor(m_service, m_dbusPath, QDBusConnection::sessionBus(), this);
7373
74− connect(m_adaptor, SIGNAL(canceled(bool)), this, SIGNAL(canceled(bool)));
75− connect(m_adaptor, SIGNAL(error(const QString &)), this, SIGNAL(error(const QString &)));
76− connect(m_adaptor, SIGNAL(finished(const QString &)), this, SIGNAL(finished(const QString &)));
77− connect(m_adaptor, SIGNAL(paused(bool)), this, SIGNAL(paused(bool)));
78− connect(m_adaptor, SIGNAL(progress(qulonglong, qulonglong)), this, SIGNAL(progress(qulonglong, qulonglong)));
79− connect(m_adaptor, SIGNAL(resumed(bool)), this, SIGNAL(resumed(bool)));
80− connect(m_adaptor, SIGNAL(started(bool)), this, SIGNAL(started(bool)));
74+ connect(m_adaptor, &DownloadTrackerAdaptor::canceled, this, &DownloadTracker::canceled);
75+ connect(m_adaptor, &DownloadTrackerAdaptor::error, this, &DownloadTracker::error);
76+ connect(m_adaptor, &DownloadTrackerAdaptor::finished, this, &DownloadTracker::finished);
77+ connect(m_adaptor, &DownloadTrackerAdaptor::paused, this, &DownloadTracker::paused);
78+ connect(m_adaptor, static_cast<void (DownloadTrackerAdaptor::*)(qulonglong, qulonglong)>(&DownloadTrackerAdaptor::progress), this, &DownloadTracker::progress);
79+ connect(m_adaptor, &DownloadTrackerAdaptor::resumed, this, &DownloadTracker::resumed);
80+ connect(m_adaptor, &DownloadTrackerAdaptor::started, this, &DownloadTracker::started);
8181 }
8282 // FIXME find a better way of determining if the service is ready
8383 Q_EMIT serviceReadyChanged(m_adaptor && m_adaptor->isValid());
plugins/Unity/Indicators/indicatorsmanager.cpp+3−3
@@ -75,8 +75,8 @@ void IndicatorsManager::load()
7575 }
7676 }
7777
78− QObject::connect(m_fsWatcher.data(), SIGNAL(directoryChanged(const QString&)), this, SLOT(onDirectoryChanged(const QString&)));
79− QObject::connect(m_fsWatcher.data(), SIGNAL(fileChanged(const QString&)), this, SLOT(onFileChanged(const QString&)));
78+ QObject::connect(m_fsWatcher.data(), &QFileSystemWatcher::directoryChanged, this, &IndicatorsManager::onDirectoryChanged);
79+ QObject::connect(m_fsWatcher.data(), &QFileSystemWatcher::fileChanged, this, &IndicatorsManager::onFileChanged);
8080 setLoaded(true);
8181}
8282
@@ -282,7 +282,7 @@ Indicator::Ptr IndicatorsManager::indicator(const QString& indicator_name)
282282 QSettings settings(data->m_fileInfo.absoluteFilePath(), QSettings::IniFormat, this);
283283 new_indicator->init(data->m_fileInfo.fileName(), settings);
284284 new_indicator->setProfile(m_profile);
285− QObject::connect(this, SIGNAL(profileChanged(const QString&)), new_indicator.data(), SLOT(setProfile(const QString&)));
285+ QObject::connect(this, &IndicatorsManager::profileChanged, new_indicator.data(), &Indicator::setProfile);
286286 return new_indicator;
287287}
288288
plugins/Unity/Indicators/indicatorsmodel.cpp+8−8
@@ -54,13 +54,13 @@ IndicatorsModel::IndicatorsModel(QObject *parent)
5454 : QAbstractListModel(parent)
5555{
5656 m_manager = new IndicatorsManager(this);
57− QObject::connect(m_manager, SIGNAL(indicatorLoaded(const QString&)), this, SLOT(onIndicatorLoaded(const QString&)));
58− QObject::connect(m_manager, SIGNAL(indicatorAboutToBeUnloaded(const QString&)), this, SLOT(onIndicatorAboutToBeUnloaded(const QString&)));
59− QObject::connect(m_manager, SIGNAL(profileChanged(const QString&)), this, SIGNAL(profileChanged()));
57+ QObject::connect(m_manager, &IndicatorsManager::indicatorLoaded, this, &IndicatorsModel::onIndicatorLoaded);
58+ QObject::connect(m_manager, &IndicatorsManager::indicatorAboutToBeUnloaded, this, &IndicatorsModel::onIndicatorAboutToBeUnloaded);
59+ QObject::connect(m_manager, &IndicatorsManager::profileChanged, this, &IndicatorsModel::profileChanged);
6060
61− QObject::connect(this, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SIGNAL(countChanged()));
62− QObject::connect(this, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), this, SIGNAL(countChanged()));
63− QObject::connect(this, SIGNAL(modelReset()), this, SIGNAL(countChanged()));
61+ QObject::connect(this, &IndicatorsModel::rowsInserted, this, &IndicatorsModel::countChanged);
62+ QObject::connect(this, &IndicatorsModel::rowsRemoved, this, &IndicatorsModel::countChanged);
63+ QObject::connect(this, &IndicatorsModel::modelReset, this, &IndicatorsModel::countChanged);
6464}
6565
6666/*! \internal */
@@ -148,8 +148,8 @@ void IndicatorsModel::onIndicatorLoaded(const QString& indicator_name)
148148 pos++;
149149 }
150150
151− QObject::connect(indicator.data(), SIGNAL(identifierChanged(const QString&)), this, SLOT(onIdentifierChanged()));
152− QObject::connect(indicator.data(), SIGNAL(indicatorPropertiesChanged(const QVariant&)), this, SLOT(onIndicatorPropertiesChanged()));
151+ QObject::connect(indicator.data(), &Indicator::identifierChanged, this, &IndicatorsModel::onIdentifierChanged);
152+ QObject::connect(indicator.data(), &Indicator::indicatorPropertiesChanged, this, &IndicatorsModel::onIndicatorPropertiesChanged);
153153
154154 beginInsertRows(QModelIndex(), pos, pos);
155155
plugins/Unity/Indicators/modelactionrootstate.cpp+4−4
@@ -55,11 +55,11 @@ void ModelActionRootState::setMenu(UnityMenuModel* menu)
5555 m_menu = menu;
5656
5757 if (m_menu) {
58− connect(m_menu, SIGNAL(rowsInserted(const QModelIndex&, int, int)), SLOT(onModelRowsAdded(const QModelIndex&, int, int)));
59− connect(m_menu, SIGNAL(rowsRemoved(const QModelIndex&, int, int)), SLOT(onModelRowsRemoved(const QModelIndex&, int, int)));
60− connect(m_menu, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&, const QVector<int>&)), SLOT(onModelDataChanged(const QModelIndex&, const QModelIndex&, const QVector<int>&)));
58+ connect(m_menu, &UnityMenuModel::rowsInserted, this, &ModelActionRootState::onModelRowsAdded);
59+ connect(m_menu, &UnityMenuModel::rowsRemoved, this, &ModelActionRootState::onModelRowsRemoved);
60+ connect(m_menu, &UnityMenuModel::dataChanged, this, &ModelActionRootState::onModelDataChanged);
6161
62− connect(m_menu, SIGNAL(destroyed()), SLOT(reset()));
62+ connect(m_menu, &UnityMenuModel::destroyed, this, &ModelActionRootState::reset);
6363 }
6464 updateActionState();
6565 Q_EMIT menuChanged();
plugins/Unity/Indicators/modelprinter.cpp+6−6
@@ -42,9 +42,9 @@ void ModelPrinter::setSourceModel(UnityMenuModel * sourceModel)
4242 Q_EMIT textChanged();
4343 }
4444 if (m_model != nullptr) {
45− connect(m_model, SIGNAL(rowsInserted(QModelIndex,int,int)), SIGNAL(textChanged()));
46− connect(m_model, SIGNAL(rowsRemoved(QModelIndex,int,int)), SIGNAL(textChanged()));
47− connect(m_model, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&, const QVector<int>&)), SIGNAL(textChanged()));
45+ connect(m_model, &UnityMenuModel::rowsInserted, this, &ModelPrinter::textChanged);
46+ connect(m_model, &UnityMenuModel::rowsRemoved, this, &ModelPrinter::textChanged);
47+ connect(m_model, &UnityMenuModel::dataChanged, this, &ModelPrinter::textChanged);
4848 }
4949}
5050
@@ -83,9 +83,9 @@ QString ModelPrinter::getModelDataString(UnityMenuModel* sourceModel, int level)
8383
8484 if (!m_children.contains(childMenuModel)) {
8585 m_children << childMenuModel;
86− connect(childMenuModel, SIGNAL(rowsInserted(QModelIndex,int,int)), SIGNAL(textChanged()));
87− connect(childMenuModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), SIGNAL(textChanged()));
88− connect(childMenuModel, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&, const QVector<int>&)), SIGNAL(textChanged()));
86+ connect(childMenuModel, &UnityMenuModel::rowsInserted, this, &ModelPrinter::textChanged);
87+ connect(childMenuModel, &UnityMenuModel::rowsRemoved, this, &ModelPrinter::textChanged);
88+ connect(childMenuModel, &UnityMenuModel::dataChanged, this, &ModelPrinter::textChanged);
8989 }
9090 stream << getModelDataString(childMenuModel, level+1);
9191 }
plugins/Unity/Indicators/unitymenumodelstack.cpp+4−4
@@ -31,9 +31,9 @@ public:
3131 m_index(index)
3232 {
3333 if (m_parentModel) {
34− QObject::connect(m_parentModel, SIGNAL(rowsInserted(QModelIndex, int, int)), this, SLOT(onRowsInserted(QModelIndex, int, int)));
35− QObject::connect(m_parentModel, SIGNAL(rowsRemoved(QModelIndex, int, int)), this, SLOT(onRowsRemoved(QModelIndex, int, int)));
36− QObject::connect(m_parentModel, SIGNAL(modelReset()), this, SLOT(onModelReset()));
34+ QObject::connect(m_parentModel, &UnityMenuModel::rowsInserted, this, &UnityMenuModelEntry::onRowsInserted);
35+ QObject::connect(m_parentModel, &UnityMenuModel::rowsRemoved, this, &UnityMenuModelEntry::onRowsRemoved);
36+ QObject::connect(m_parentModel, &UnityMenuModel::modelReset, this, &UnityMenuModelEntry::onModelReset);
3737 }
3838 }
3939
@@ -117,7 +117,7 @@ int UnityMenuModelStack::count() const
117117void UnityMenuModelStack::push(UnityMenuModel* model, int index)
118118{
119119 UnityMenuModelEntry* entry = new UnityMenuModelEntry(model, tail(), index);
120− QObject::connect(entry, SIGNAL(remove()), SLOT(onRemove()));
120+ QObject::connect(entry, &UnityMenuModelEntry::remove, this, &UnityMenuModelStack::onRemove);
121121
122122 m_menuModels << entry;
123123 Q_EMIT tailChanged(model);
plugins/Unity/InputInfo/linux/qinputdeviceinfo_linux.cpp+2−2
@@ -52,7 +52,7 @@ QInputDeviceInfoPrivate::QInputDeviceInfoPrivate(QObject *parent) :
5252 QObject(parent)
5353 , udev(0)
5454{
55− QTimer::singleShot(250,this,SLOT(init()));
55+ QTimer::singleShot(250, this, &QInputDeviceInfoPrivate::init);
5656}
5757
5858void QInputDeviceInfoPrivate::init()
@@ -78,7 +78,7 @@ void QInputDeviceInfoPrivate::init()
7878 notifierFd = udev_monitor_get_fd(udevMonitor);
7979
8080 notifier = new QSocketNotifier(notifierFd, QSocketNotifier::Read, this);
81− connect(notifier, SIGNAL(activated(int)), this, SLOT(onUDevChanges()));
81+ connect(notifier, &QSocketNotifier::activated, this, &QInputDeviceInfoPrivate::onUDevChanges);
8282
8383
8484 udev_enumerate_scan_devices(enumerate);
plugins/Unity/InputInfo/qdeclarativeinputdeviceinfo.cpp+1−1
@@ -44,7 +44,7 @@ QDeclarativeInputDeviceInfo::QDeclarativeInputDeviceInfo(QObject *parent) :
4444 QAbstractListModel(parent),
4545 deviceInfo(new QInputDeviceInfo)
4646{
47− connect(deviceInfo,SIGNAL(ready()),this,SLOT(updateDeviceList()));
47+ connect(deviceInfo, &QInputDeviceInfo::ready, this, &QDeclarativeInputDeviceInfo::updateDeviceList);
4848 connect(deviceInfo, &QInputDeviceInfo::deviceAdded,this,&QDeclarativeInputDeviceInfo::addedDevice);
4949 connect(deviceInfo, &QInputDeviceInfo::deviceRemoved,this,&QDeclarativeInputDeviceInfo::removedDevice);
5050}
plugins/Unity/InputInfo/qinputinfo.cpp+1−1
@@ -138,7 +138,7 @@ QInputDeviceInfo::QInputDeviceInfo(QObject *parent) :
138138 connect(d_ptr, &QInputDeviceInfoPrivate::newDevice,this,&QInputDeviceInfo::addedDevice);
139139 connect(d_ptr, &QInputDeviceInfoPrivate::deviceRemoved,this,&QInputDeviceInfo::deviceRemoved);
140140
141− connect(d_ptr,SIGNAL(ready()),this,SIGNAL(ready()));
141+ connect(d_ptr, &QInputDeviceInfoPrivate::ready, this, &QInputDeviceInfo::ready);
142142}
143143
144144QVector <QInputDevice *> QInputDeviceInfo::deviceList()
plugins/Unity/Launcher/launchermodel.cpp+6−6
@@ -256,9 +256,9 @@ void LauncherModel::setApplicationManager(unity::shell::application::Application
256256 // Is there already another appmanager set?
257257 if (m_appManager) {
258258 // Disconnect any signals
259− disconnect(this, SLOT(applicationAdded(QModelIndex,int)));
260− disconnect(this, SLOT(applicationRemoved(QModelIndex,int)));
261− disconnect(this, SLOT(focusedAppIdChanged()));
259+ disconnect(this, &LauncherModel::applicationAdded, 0, nullptr);
260+ disconnect(this, &LauncherModel::applicationRemoved, 0, nullptr);
261+ disconnect(this, &LauncherModel::focusedAppIdChanged, 0, nullptr);
262262
263263 // remove any recent/running apps from the launcher
264264 QList<int> recentAppIndices;
@@ -278,9 +278,9 @@ void LauncherModel::setApplicationManager(unity::shell::application::Application
278278 }
279279
280280 m_appManager = appManager;
281− connect(m_appManager, SIGNAL(rowsInserted(QModelIndex, int, int)), SLOT(applicationAdded(QModelIndex,int)));
282− connect(m_appManager, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), SLOT(applicationRemoved(QModelIndex,int)));
283− connect(m_appManager, SIGNAL(focusedApplicationIdChanged()), SLOT(focusedAppIdChanged()));
281+ connect(m_appManager, &ApplicationManagerInterface::rowsInserted, this, &LauncherModel::applicationAdded);
282+ connect(m_appManager, &ApplicationManagerInterface::rowsAboutToBeRemoved, this, &LauncherModel::applicationRemoved);
283+ connect(m_appManager, &ApplicationManagerInterface::focusedApplicationIdChanged, this, &LauncherModel::focusedAppIdChanged);
284284
285285 Q_EMIT applicationManagerChanged();
286286
plugins/Utils/qlimitproxymodelqml.cpp+15−15
@@ -28,9 +28,9 @@ QLimitProxyModelQML::QLimitProxyModelQML(QObject *parent)
2828 , m_dataChangedBegin(-1)
2929 , m_dataChangedEnd(-1)
3030{
31− connect(this, SIGNAL(modelReset()), SIGNAL(countChanged()));
32− connect(this, SIGNAL(rowsInserted(QModelIndex,int,int)), SIGNAL(countChanged()));
33− connect(this, SIGNAL(rowsRemoved(QModelIndex,int,int)), SIGNAL(countChanged()));
31+ connect(this, &QLimitProxyModelQML::modelReset, this, &QLimitProxyModelQML::countChanged);
32+ connect(this, &QLimitProxyModelQML::rowsInserted, this, &QLimitProxyModelQML::countChanged);
33+ connect(this, &QLimitProxyModelQML::rowsRemoved, this, &QLimitProxyModelQML::countChanged);
3434}
3535
3636QHash<int, QByteArray> QLimitProxyModelQML::roleNames() const
@@ -50,20 +50,20 @@ QLimitProxyModelQML::setModel(QAbstractItemModel *itemModel)
5050
5151 if (sourceModel() != nullptr) {
5252 // Disconnect the QIdentityProxyModel handling for rows removed/added...
53− disconnect(sourceModel(), SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)), this, nullptr);
54− disconnect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), this, nullptr);
55− disconnect(sourceModel(), SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), this, nullptr);
56− disconnect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), this, nullptr);
53+ disconnect(sourceModel(), &QAbstractItemModel::rowsAboutToBeInserted, this, nullptr);
54+ disconnect(sourceModel(), &QAbstractItemModel::rowsInserted, this, nullptr);
55+ disconnect(sourceModel(), &QAbstractItemModel::rowsAboutToBeRemoved, this, nullptr);
56+ disconnect(sourceModel(), &QAbstractItemModel::rowsRemoved, this, nullptr);
5757
5858 // ... and use our own
59− connect(sourceModel(), SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
60− this, SLOT(sourceRowsAboutToBeInserted(QModelIndex,int,int)));
61− connect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)),
62− this, SLOT(sourceRowsInserted(QModelIndex,int,int)));
63− connect(sourceModel(), SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
64− this, SLOT(sourceRowsAboutToBeRemoved(QModelIndex,int,int)));
65− connect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)),
66− this, SLOT(sourceRowsRemoved(QModelIndex,int,int)));
59+ connect(sourceModel(), &QAbstractItemModel::rowsAboutToBeInserted,
60+ this, &QLimitProxyModelQML::sourceRowsAboutToBeInserted);
61+ connect(sourceModel(), &QAbstractItemModel::rowsInserted,
62+ this, &QLimitProxyModelQML::sourceRowsInserted);
63+ connect(sourceModel(), &QAbstractItemModel::rowsAboutToBeRemoved,
64+ this, &QLimitProxyModelQML::sourceRowsAboutToBeRemoved);
65+ connect(sourceModel(), &QAbstractItemModel::rowsRemoved,
66+ this, &QLimitProxyModelQML::sourceRowsRemoved);
6767 }
6868 Q_EMIT modelChanged();
6969 }
plugins/Utils/unitysortfilterproxymodelqml.cpp+6−6
@@ -24,9 +24,9 @@ UnitySortFilterProxyModelQML::UnitySortFilterProxyModelQML(QObject *parent)
2424 : QSortFilterProxyModel(parent)
2525 , m_invertMatch(false)
2626{
27− connect(this, SIGNAL(modelReset()), SIGNAL(countChanged()));
28− connect(this, SIGNAL(rowsInserted(QModelIndex,int,int)), SIGNAL(countChanged()));
29− connect(this, SIGNAL(rowsRemoved(QModelIndex,int,int)), SIGNAL(countChanged()));
27+ connect(this, &UnitySortFilterProxyModelQML::modelReset, this, &UnitySortFilterProxyModelQML::countChanged);
28+ connect(this, &UnitySortFilterProxyModelQML::rowsInserted, this, &UnitySortFilterProxyModelQML::countChanged);
29+ connect(this, &UnitySortFilterProxyModelQML::rowsRemoved, this, &UnitySortFilterProxyModelQML::countChanged);
3030}
3131
3232/*
@@ -59,9 +59,9 @@ UnitySortFilterProxyModelQML::setModel(QAbstractItemModel *itemModel)
5959
6060 setSourceModel(itemModel);
6161
62− connect(itemModel, SIGNAL(modelReset()), SIGNAL(totalCountChanged()));
63− connect(itemModel, SIGNAL(rowsInserted(QModelIndex,int,int)), SIGNAL(totalCountChanged()));
64− connect(itemModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), SIGNAL(totalCountChanged()));
62+ connect(itemModel, &QAbstractItemModel::modelReset, this, &UnitySortFilterProxyModelQML::totalCountChanged);
63+ connect(itemModel, &QAbstractItemModel::rowsInserted, this, &UnitySortFilterProxyModelQML::totalCountChanged);
64+ connect(itemModel, &QAbstractItemModel::rowsRemoved, this, &UnitySortFilterProxyModelQML::totalCountChanged);
6565
6666 Q_EMIT totalCountChanged();
6767 Q_EMIT modelChanged();
plugins/Wizard/System.cpp+1−2
@@ -34,8 +34,7 @@ System::System()
3434 qDBusRegisterMetaType<QMap<QString,QString>>();
3535
3636 m_fsWatcher.addPath(wizardEnabledPath());
37− connect(&m_fsWatcher, SIGNAL(fileChanged(const QString &)),
38− this, SIGNAL(wizardEnabledChanged()));
37+ connect(&m_fsWatcher, &QFileSystemWatcher::fileChanged, this, &System::wizardEnabledChanged);
3938}
4039
4140QString System::wizardEnabledPath()
src/libunity8-private/unitydbusobject.cpp+1−1
@@ -29,7 +29,7 @@ UnityDBusObject::UnityDBusObject(const QString &path, const QString &service, bo
2929{
3030 if (async) {
3131 // Use a zero-timer to let Qml finish loading before we announce on DBus
32− QTimer::singleShot(0, this, SLOT(registerObject()));
32+ QTimer::singleShot(0, this, &UnityDBusObject::registerObject);
3333 } else {
3434 registerObject();
3535 }
src/libunity8-private/unitydbusvirtualobject.cpp+1−1
@@ -28,7 +28,7 @@ UnityDBusVirtualObject::UnityDBusVirtualObject(const QString &path, const QStrin
2828{
2929 if (async) {
3030 // Use a zero-timer to let Qml finish loading before we announce on DBus
31− QTimer::singleShot(0, this, SLOT(registerObject()));
31+ QTimer::singleShot(0, this, &UnityDBusVirtualObject::registerObject);
3232 } else {
3333 registerObject();
3434 }
src/main.cpp+1−1
@@ -116,7 +116,7 @@ int main(int argc, const char *argv[])
116116 view->engine()->setNetworkAccessManagerFactory(managerFactory);
117117
118118 view->setSource(source);
119− QObject::connect(view->engine(), SIGNAL(quit()), application, SLOT(quit()));
119+ QObject::connect(view->engine(), &QQmlEngine::quit, application, &QGuiApplication::quit);
120120
121121 if (isMirServer || parser.hasFullscreen()) {
122122 view->showFullScreen();
tests/mocks/GSettings.1.0/fake_gsettings.cpp+4−4
@@ -95,10 +95,10 @@ GSettingsQml::GSettingsQml(QObject *parent)
9595 : QObject(parent)
9696{
9797 m_schema = new GSettingsSchemaQml(this);
98− connect(GSettingsControllerQml::instance(), SIGNAL(pictureUriChanged(const QString &)),
99− this, SIGNAL(pictureUriChanged(const QString &)));
100− connect(GSettingsControllerQml::instance(), SIGNAL(usageModeChanged(const QString &)),
101− this, SIGNAL(usageModeChanged(const QString &)));
98+ connect(GSettingsControllerQml::instance(), &GSettingsControllerQml::pictureUriChanged,
99+ this, &GSettingsQml::pictureUriChanged);
100+ connect(GSettingsControllerQml::instance(), &GSettingsControllerQml::usageModeChanged,
101+ this, &GSettingsQml::usageModeChanged);
102102}
103103
104104GSettingsSchemaQml * GSettingsQml::schema() const {
tests/mocks/LightDM/liblightdm/Greeter.cpp+2−2
@@ -127,7 +127,7 @@ void Greeter::authenticate(const QString &username)
127127 d->authenticated = false;
128128 d->authenticationUser = username;
129129 d->twoFactorDone = false;
130− QTimer::singleShot(0, this, SLOT(delayedAuthentication()));
130+ QTimer::singleShot(0, this, &Greeter::delayedAuthentication);
131131}
132132
133133void Greeter::delayedAuthentication()
@@ -173,7 +173,7 @@ void Greeter::sendAuthenticationComplete()
173173{
174174 if (qgetenv("UNITY_TESTING").isEmpty()) {
175175 // simulate PAM's delay
176− QTimer::singleShot(1000, this, SIGNAL(authenticationComplete()));
176+ QTimer::singleShot(1000, this, &Greeter::authenticationComplete);
177177 } else {
178178 Q_EMIT authenticationComplete();
179179 }
tests/mocks/MeeGo/QOfono/MockQOfonoManager.cpp+7−7
@@ -23,12 +23,12 @@ MockQOfonoManager::MockQOfonoManager(QObject *parent)
2323 m_modemsSet(false),
2424 m_startedSet(false)
2525{
26− connect(MockQOfono::instance(), SIGNAL(availableChanged()),
27− this, SIGNAL(availableChanged()));
28− connect(MockQOfono::instance(), SIGNAL(readyChanged()),
29− this, SLOT(checkReady()));
30− connect(MockQOfono::instance(), SIGNAL(modemsChanged()),
31− this, SLOT(maybeModemsChanged()));
26+ connect(MockQOfono::instance(), &MockQOfono::availableChanged,
27+ this, &MockQOfonoManager::availableChanged);
28+ connect(MockQOfono::instance(), &MockQOfono::readyChanged,
29+ this, &MockQOfonoManager::checkReady);
30+ connect(MockQOfono::instance(), &MockQOfono::modemsChanged,
31+ this, &MockQOfonoManager::maybeModemsChanged);
3232
3333 checkReady();
3434}
@@ -55,7 +55,7 @@ void MockQOfonoManager::checkReady()
5555 if (!m_startedSet && MockQOfono::instance()->ready()) {
5656 m_startedSet = true;
5757 // Simulate QOfono's asynchronous initialization
58− QTimer::singleShot(1, this, SLOT(setModems()));
58+ QTimer::singleShot(1, this, &MockQOfonoManager::setModems);
5959 }
6060}
6161
tests/mocks/QtMultimedia/audio.cpp+1−1
@@ -24,7 +24,7 @@ Audio::Audio(QObject* parent):
2424{
2525 qsrand(time(nullptr));
2626 m_timer.setInterval(1000);
27− connect(&m_timer, SIGNAL(timeout()), SLOT(timerEvent()));
27+ connect(&m_timer, &QTimer::timeout, this, &Audio::timerEvent);
2828}
2929
3030QUrl Audio::source() const
tests/mocks/Unity/Application/ApplicationInfo.cpp+2−2
@@ -104,7 +104,7 @@ void ApplicationInfo::setSession(Session* session)
104104 this, &ApplicationInfo::onSessionSurfaceChanged);
105105
106106 if (!m_manualSurfaceCreation) {
107− QTimer::singleShot(500, m_session, SLOT(createSurface()));
107+ QTimer::singleShot(500, m_session, &Session::createSurface);
108108 }
109109 }
110110
@@ -173,7 +173,7 @@ void ApplicationInfo::setState(State value)
173173 Q_EMIT stateChanged(value);
174174
175175 if (!m_manualSurfaceCreation && !m_session && m_state == ApplicationInfo::Starting) {
176− QTimer::singleShot(500, this, SLOT(createSession()));
176+ QTimer::singleShot(500, this, &ApplicationInfo::createSession);
177177 } else if (m_state == ApplicationInfo::Stopped) {
178178 Session *session = m_session;
179179 setSession(nullptr);
tests/mocks/Unity/Indicators/fakeindicatorsmodel.cpp+3−3
@@ -24,9 +24,9 @@ FakeIndicatorsModel::FakeIndicatorsModel(QObject *parent)
2424 : QAbstractListModel(parent),
2525 m_profile("phone")
2626{
27− QObject::connect(this, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SIGNAL(countChanged()));
28− QObject::connect(this, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), this, SIGNAL(countChanged()));
29− QObject::connect(this, SIGNAL(modelReset()), this, SIGNAL(countChanged()));
27+ QObject::connect(this, &FakeIndicatorsModel::rowsInserted, this, &FakeIndicatorsModel::countChanged);
28+ QObject::connect(this, &FakeIndicatorsModel::rowsRemoved, this, &FakeIndicatorsModel::countChanged);
29+ QObject::connect(this, &FakeIndicatorsModel::modelReset, this, &FakeIndicatorsModel::countChanged);
3030}
3131
3232/*! \internal */
tests/mocks/Unity/fake_navigation.cpp+3−3
@@ -30,9 +30,9 @@ Navigation::Navigation(const QString& navigationId, const QString& label, const
3030 , m_loaded(false)
3131 , m_scope(scope)
3232{
33− QTimer::singleShot(1500, this, SLOT(slotLoaded()));
34− connect(scope, SIGNAL(currentNavigationIdChanged()), this, SLOT(slotCurrentNavigationChanged()));
35− connect(scope, SIGNAL(currentAltNavigationIdChanged()), this, SLOT(slotCurrentNavigationChanged()));
33+ QTimer::singleShot(1500, this, &Navigation::slotLoaded);
34+ connect(scope, &Scope::currentNavigationIdChanged, this, &Navigation::slotCurrentNavigationChanged);
35+ connect(scope, &Scope::currentAltNavigationIdChanged, this, &Navigation::slotCurrentNavigationChanged);
3636}
3737
3838QString Navigation::navigationId() const
tests/mocks/Unity/fake_previewmodel.cpp+1−2
@@ -37,8 +37,7 @@ PreviewModel::PreviewModel(QObject* parent, Scope* scope)
3737 // we have one column by default
3838 PreviewWidgetModel* columnModel = new PreviewWidgetModel(this);
3939 m_previewWidgetModels.append(columnModel);
40− connect(this, SIGNAL(triggered(QString const&, QString const&, QVariantMap const&)),
41− this, SLOT(triggeredSlot(QString const&, QString const&, QVariantMap const&)));
40+ connect(this, &PreviewModel::triggered, this, &PreviewModel::triggeredSlot);
4241}
4342
4443void PreviewModel::setWidgetColumnCount(int count)
tests/mocks/Unity/fake_scopes.cpp+4−4
@@ -34,11 +34,11 @@ Scopes::Scopes(QObject *parent)
3434{
3535 timer.setSingleShot(true);
3636 timer.setInterval(100);
37− QObject::connect(&timer, SIGNAL(timeout()), this, SLOT(updateScopes()));
37+ QObject::connect(&timer, &QTimer::timeout, this, &Scopes::updateScopes);
3838
39− QObject::connect(this, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SIGNAL(countChanged()));
40− QObject::connect(this, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), this, SIGNAL(countChanged()));
41− QObject::connect(this, SIGNAL(modelReset()), this, SIGNAL(countChanged()));
39+ QObject::connect(this, &Scopes::rowsInserted, this, &Scopes::countChanged);
40+ QObject::connect(this, &Scopes::rowsRemoved, this, &Scopes::countChanged);
41+ QObject::connect(this, &Scopes::modelReset, this, &Scopes::countChanged);
4242
4343 load();
4444}
tests/mocks/libusermetrics/UserMetrics.cpp+2−4
@@ -405,10 +405,8 @@ UserMetrics::UserMetrics(QObject *parent) :
405405 d_ptr->generateFakeData();
406406 setUsername("");
407407
408− connect(this, SIGNAL(nextDataSource()), this, SLOT(nextDataSourceSlot()),
409− Qt::QueuedConnection);
410− connect(this, SIGNAL(readyForDataChange()), this,
411− SLOT(readyForDataChangeSlot()), Qt::QueuedConnection);
408+ connect(this, &UserMetrics::nextDataSource, this, &UserMetrics::nextDataSourceSlot, Qt::QueuedConnection);
409+ connect(this, &UserMetrics::readyForDataChange, this, &UserMetrics::readyForDataChangeSlot, Qt::QueuedConnection);
412410}
413411
414412UserMetrics::~UserMetrics()
tests/plugins/Dash/listviewwithpageheadersectiontest.cpp+1−1
@@ -2069,7 +2069,7 @@ private Q_SLOTS:
20692069
20702070 void addingRemoveItemsShouldNotChangeContentY()
20712071 {
2072− QSignalSpy spy(lvwph, SIGNAL(contentYChanged()));
2072+ QSignalSpy spy(lvwph, &ListViewWithPageHeader::contentYChanged);
20732073 QMetaObject::invokeMethod(model, "insertItem", Q_ARG(QVariant, 0), Q_ARG(QVariant, 150), Q_ARG(QVariant, "Agressive"));
20742074 QMetaObject::invokeMethod(model, "removeItems", Q_ARG(QVariant, 1), Q_ARG(QVariant, 6));
20752075
tests/plugins/Dash/listviewwithpageheadertest.cpp+1−1
@@ -1660,7 +1660,7 @@ private Q_SLOTS:
16601660
16611661 void addingRemoveItemsShouldNotChangeContentY()
16621662 {
1663− QSignalSpy spy(lvwph, SIGNAL(contentYChanged()));
1663+ QSignalSpy spy(lvwph, &ListViewWithPageHeader::contentYChanged);
16641664 QMetaObject::invokeMethod(model, "insertItem", Q_ARG(QVariant, 0), Q_ARG(QVariant, 150));
16651665 QMetaObject::invokeMethod(model, "removeItems", Q_ARG(QVariant, 1), Q_ARG(QVariant, 6));
16661666
tests/plugins/LightDM/dbus.cpp+5−5
@@ -94,7 +94,7 @@ private Q_SLOTS:
9494
9595 void testSetActiveEntry()
9696 {
97− QSignalSpy spy(greeter, SIGNAL(requestAuthenticationUser(QString)));
97+ QSignalSpy spy(greeter, &Greeter::requestAuthenticationUser);
9898 QDBusReply<void> reply = dbusList->call("SetActiveEntry", "has-password");
9999 QVERIFY(reply.isValid());
100100 spy.wait();
@@ -123,7 +123,7 @@ private Q_SLOTS:
123123
124124 void testActiveEntrySet()
125125 {
126− QSignalSpy spy(greeter, SIGNAL(requestAuthenticationUser(QString)));
126+ QSignalSpy spy(greeter, &Greeter::requestAuthenticationUser);
127127 QVERIFY(dbusList->setProperty("ActiveEntry", "has-password"));
128128 spy.wait();
129129
@@ -134,7 +134,7 @@ private Q_SLOTS:
134134
135135 void testActiveEntryChanged()
136136 {
137− QSignalSpy spy(this, SIGNAL(PropertiesChangedRelay(QString, QVariantMap, QStringList)));
137+ QSignalSpy spy(this, &GreeterDBusTest::PropertiesChangedRelay);
138138 greeter->authenticate("has-password");
139139 spy.wait();
140140
@@ -160,7 +160,7 @@ private Q_SLOTS:
160160
161161 void testEntryIsLockedChanged()
162162 {
163− QSignalSpy spy(this, SIGNAL(PropertiesChangedRelay(QString, QVariantMap, QStringList)));
163+ QSignalSpy spy(this, &GreeterDBusTest::PropertiesChangedRelay);
164164 greeter->authenticate("no-password");
165165
166166 // Two property changed signals will be emitted, one for the IsLocked
@@ -182,7 +182,7 @@ private Q_SLOTS:
182182 QVERIFY(!greeter->isActive());
183183 QVERIFY(!dbusMain->property("IsActive").toBool());
184184
185− QSignalSpy spy(this, SIGNAL(PropertiesChangedRelay(QString, QVariantMap, QStringList)));
185+ QSignalSpy spy(this, &GreeterDBusTest::PropertiesChangedRelay);
186186 greeter->setIsActive(true);
187187 spy.wait();
188188
tests/plugins/Ubuntu/Gestures/tst_DirectionalDragArea.cpp+4−4
@@ -305,8 +305,8 @@ void tst_DirectionalDragArea::sceneXAndX()
305305
306306 sendTouchPress(0 /* timestamp */, 0 /* id */, touchScenePos);
307307
308− QSignalSpy touchXSpy(edgeDragArea, SIGNAL(touchXChanged(qreal)));
309− QSignalSpy touchSceneXSpy(edgeDragArea, SIGNAL(touchSceneXChanged(qreal)));
308+ QSignalSpy touchXSpy(edgeDragArea, &DirectionalDragArea::touchXChanged);
309+ QSignalSpy touchSceneXSpy(edgeDragArea, &DirectionalDragArea::touchSceneXChanged);
310310
311311 touchScenePos.rx() = m_view->width() / 2;
312312 sendTouchUpdate(50 /* timestamp */, 0 /* id */, touchScenePos);
@@ -334,8 +334,8 @@ void tst_DirectionalDragArea::sceneYAndY()
334334
335335 sendTouchPress(0 /* timestamp */, 0 /* id */, touchScenePos);
336336
337− QSignalSpy touchYSpy(edgeDragArea, SIGNAL(touchYChanged(qreal)));
338− QSignalSpy touchSceneYSpy(edgeDragArea, SIGNAL(touchSceneYChanged(qreal)));
337+ QSignalSpy touchYSpy(edgeDragArea, &DirectionalDragArea::touchYChanged);
338+ QSignalSpy touchSceneYSpy(edgeDragArea, &DirectionalDragArea::touchSceneYChanged);
339339
340340 touchScenePos.ry() = m_view->height() / 2;
341341 sendTouchUpdate(50 /* timestamp */, 0 /* id */, touchScenePos);
tests/plugins/Ubuntu/Gestures/tst_PressedOutsideNotifier.cpp+5−5
@@ -64,7 +64,7 @@ void tst_PressedOutsideNotifier::touchOutsideAreaTriggersSignal()
6464 // Therefore, still outside it.
6565 QPoint touch0 = QPoint(m_blueRect->x() * 0.5, m_blueRect->y() * 0.5);
6666
67− QSignalSpy pressedOutsideSpy(m_notifier, SIGNAL(pressedOutside()));
67+ QSignalSpy pressedOutsideSpy(m_notifier, &PressedOutsideNotifier::pressedOutside);
6868
6969 QTest::touchEvent(m_view, m_device)
7070 .press(0, touch0);
@@ -82,7 +82,7 @@ void tst_PressedOutsideNotifier::touchInsideAreaHasNoEffect()
8282 QPoint touch0 = QPoint(m_blueRect->x() + m_blueRect->width()*0.5,
8383 m_blueRect->y() + m_blueRect->height()*0.5);
8484
85− QSignalSpy pressedOutsideSpy(m_notifier, SIGNAL(pressedOutside()));
85+ QSignalSpy pressedOutsideSpy(m_notifier, &PressedOutsideNotifier::pressedOutside);
8686
8787 QTest::touchEvent(m_view, m_device)
8888 .press(0, touch0);
@@ -99,7 +99,7 @@ void tst_PressedOutsideNotifier::mousePressOutsideAreaTriggersSignal()
9999{
100100 QPoint mousePos= QPoint(m_blueRect->x() * 0.5, m_blueRect->y() * 0.5);
101101
102− QSignalSpy pressedOutsideSpy(m_notifier, SIGNAL(pressedOutside()));
102+ QSignalSpy pressedOutsideSpy(m_notifier, &PressedOutsideNotifier::pressedOutside);
103103
104104 QTest::mousePress(m_view, Qt::LeftButton, 0 /*modifiers*/, mousePos);
105105
@@ -115,7 +115,7 @@ void tst_PressedOutsideNotifier::mousePresssInsideAreaHasNoEffect()
115115 QPoint mousePos = QPoint(m_blueRect->x() + m_blueRect->width()*0.5,
116116 m_blueRect->y() + m_blueRect->height()*0.5);
117117
118− QSignalSpy pressedOutsideSpy(m_notifier, SIGNAL(pressedOutside()));
118+ QSignalSpy pressedOutsideSpy(m_notifier, &PressedOutsideNotifier::pressedOutside);
119119
120120 QTest::mousePress(m_view, Qt::LeftButton, 0 /*modifiers*/, mousePos);
121121
@@ -130,7 +130,7 @@ void tst_PressedOutsideNotifier::nothingHappensWhileDisabled()
130130{
131131 QPoint touch0 = QPoint(m_blueRect->x() * 0.5, m_blueRect->y() * 0.5);
132132
133− QSignalSpy pressedOutsideSpy(m_notifier, SIGNAL(pressedOutside()));
133+ QSignalSpy pressedOutsideSpy(m_notifier, &PressedOutsideNotifier::pressedOutside);
134134
135135 m_notifier->setEnabled(false);
136136
tests/plugins/Unity/Indicators/UnityMenuModelStackTest.cpp+3−3
@@ -48,7 +48,7 @@ private Q_SLOTS:
4848 void testHeadOnSetHead()
4949 {
5050 UnityMenuModelStack stack;
51− connect(&stack, SIGNAL(headChanged(UnityMenuModel*)), this, SLOT(onHeadChanged()));
51+ connect(&stack, &UnityMenuModelStack::headChanged, this, &UnityMenuModelStackTest::onHeadChanged);
5252 stack.setHead(m_model);
5353
5454 QCOMPARE(stack.head(), m_model);
@@ -58,7 +58,7 @@ private Q_SLOTS:
5858 void testTailOnSetHead()
5959 {
6060 UnityMenuModelStack stack;
61− connect(&stack, SIGNAL(tailChanged(UnityMenuModel*)), this, SLOT(onTailChanged()));
61+ connect(&stack, &UnityMenuModelStack::tailChanged, this, &UnityMenuModelStackTest::onTailChanged);
6262 stack.setHead(m_model);
6363
6464 QCOMPARE(stack.tail(), m_model);
@@ -84,7 +84,7 @@ private Q_SLOTS:
8484 m_model->setModelData(recuseAddMenu(subMenuCount, menuDepth));
8585
8686 UnityMenuModelStack stack;
87− connect(&stack, SIGNAL(tailChanged(UnityMenuModel*)), this, SLOT(onTailChanged()));
87+ connect(&stack, &UnityMenuModelStack::tailChanged, this, &UnityMenuModelStackTest::onTailChanged);
8888
8989 QList<UnityMenuModel*> models;
9090
tests/plugins/Unity/Launcher/launchermodeltest.cpp+3−3
@@ -187,7 +187,7 @@ private Q_SLOTS:
187187 }
188188
189189 void testPinning() {
190− QSignalSpy spy(launcherModel, SIGNAL(dataChanged(QModelIndex,QModelIndex,QVector<int>)));
190+ QSignalSpy spy(launcherModel, &LauncherModel::dataChanged);
191191 QCOMPARE(launcherModel->get(0)->pinned(), false);
192192 QCOMPARE(launcherModel->get(1)->pinned(), false);
193193 launcherModel->pin(launcherModel->get(0)->appId());
@@ -424,7 +424,7 @@ private Q_SLOTS:
424424 }
425425
426426 void testCountEmblems() {
427− QSignalSpy spy(launcherModel, SIGNAL(dataChanged(QModelIndex,QModelIndex,QVector<int>)));
427+ QSignalSpy spy(launcherModel, &LauncherModel::dataChanged);
428428
429429 // Call GetAll on abs-icon
430430 QDBusInterface interface("com.canonical.Unity.Launcher", "/com/canonical/Unity/Launcher/abs_2Dicon", "org.freedesktop.DBus.Properties");
@@ -570,7 +570,7 @@ private Q_SLOTS:
570570
571571 void testSettings() {
572572 GSettings *settings = launcherModel->m_settings;
573− QSignalSpy spy(launcherModel, SIGNAL(hint()));
573+ QSignalSpy spy(launcherModel, &LauncherModel::hint);
574574
575575 // Nothing pinned at startup
576576 QCOMPARE(settings->storedApplications().count(), 0);
tests/plugins/Utils/HomeKeyWatcherTest.cpp+2−2
@@ -128,7 +128,7 @@ void HomeKeyWatcherTest::touchTapTouch()
128128 QFETCH(int, silenceAfterTap);
129129 QFETCH(int, expectedActivatedCount);
130130 HomeKeyWatcher homeKeyWatcher(m_fakeTimerFactory->create(), new FakeElapsedTimer);
131− QSignalSpy activatedSpy(&homeKeyWatcher, SIGNAL(activated()));
131+ QSignalSpy activatedSpy(&homeKeyWatcher, &HomeKeyWatcher::activated);
132132 QVERIFY(activatedSpy.isValid());
133133
134134 {
@@ -189,7 +189,7 @@ void HomeKeyWatcherTest::touchTapTouch()
189189void HomeKeyWatcherTest::tapWhileTouching()
190190{
191191 HomeKeyWatcher homeKeyWatcher(m_fakeTimerFactory->create(), new FakeElapsedTimer);
192− QSignalSpy activatedSpy(&homeKeyWatcher, SIGNAL(activated()));
192+ QSignalSpy activatedSpy(&homeKeyWatcher, &HomeKeyWatcher::activated);
193193 QVERIFY(activatedSpy.isValid());
194194
195195 {
tests/plugins/Utils/ModelTest.cpp+22−40
@@ -59,48 +59,30 @@ ModelTest::ModelTest ( QAbstractItemModel *_model, QObject *parent ) : QObject (
5959 if (!model)
6060 qFatal("%s: model must not be null", Q_FUNC_INFO);
6161
62− connect(model, SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)),
63− this, SLOT(runAllTests()) );
64− connect(model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)),
65− this, SLOT(runAllTests()) );
66− connect(model, SIGNAL(columnsInserted(QModelIndex,int,int)),
67− this, SLOT(runAllTests()) );
68− connect(model, SIGNAL(columnsRemoved(QModelIndex,int,int)),
69− this, SLOT(runAllTests()) );
70− connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
71− this, SLOT(runAllTests()) );
72− connect(model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)),
73− this, SLOT(runAllTests()) );
74− connect(model, SIGNAL(layoutAboutToBeChanged()), this, SLOT(runAllTests()) );
75− connect(model, SIGNAL(layoutChanged()), this, SLOT(runAllTests()) );
76− connect(model, SIGNAL(modelReset()), this, SLOT(runAllTests()) );
77− connect(model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
78− this, SLOT(runAllTests()) );
79− connect(model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
80− this, SLOT(runAllTests()) );
81− connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)),
82− this, SLOT(runAllTests()) );
83− connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
84− this, SLOT(runAllTests()) );
62+ connect(model, &QAbstractItemModel::columnsAboutToBeInserted, this, &ModelTest::runAllTests);
63+ connect(model, &QAbstractItemModel::columnsAboutToBeRemoved, this, &ModelTest::runAllTests);
64+ connect(model, &QAbstractItemModel::columnsInserted, this, &ModelTest::runAllTests);
65+ connect(model, &QAbstractItemModel::columnsRemoved, this, &ModelTest::runAllTests);
66+ connect(model, &QAbstractItemModel::dataChanged, this, &ModelTest::runAllTests);
67+ connect(model, &QAbstractItemModel::headerDataChanged, this, &ModelTest::runAllTests);
68+ connect(model, &QAbstractItemModel::layoutAboutToBeChanged, this, &ModelTest::runAllTests);
69+ connect(model, &QAbstractItemModel::layoutChanged, this, &ModelTest::runAllTests);
70+ connect(model, &QAbstractItemModel::modelReset, this, &ModelTest::runAllTests);
71+ connect(model, &QAbstractItemModel::rowsAboutToBeInserted, this, &ModelTest::runAllTests);
72+ connect(model, &QAbstractItemModel::rowsAboutToBeRemoved, this, &ModelTest::runAllTests);
73+ connect(model, &QAbstractItemModel::rowsInserted, this, &ModelTest::runAllTests);
74+ connect(model, &QAbstractItemModel::rowsRemoved, this, &ModelTest::runAllTests);
8575
8676 // Special checks for changes
87− connect(model, SIGNAL(layoutAboutToBeChanged()),
88− this, SLOT(layoutAboutToBeChanged()) );
89− connect(model, SIGNAL(layoutChanged()),
90− this, SLOT(layoutChanged()) );
91−
92− connect(model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
93− this, SLOT(rowsAboutToBeInserted(QModelIndex,int,int)) );
94− connect(model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
95− this, SLOT(rowsAboutToBeRemoved(QModelIndex,int,int)) );
96− connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)),
97− this, SLOT(rowsInserted(QModelIndex,int,int)) );
98− connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
99− this, SLOT(rowsRemoved(QModelIndex,int,int)) );
100− connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
101− this, SLOT(dataChanged(QModelIndex,QModelIndex)) );
102− connect(model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)),
103− this, SLOT(headerDataChanged(Qt::Orientation,int,int)) );
77+ connect(model, &QAbstractItemModel::layoutAboutToBeChanged, this, &ModelTest::layoutAboutToBeChanged);
78+ connect(model, &QAbstractItemModel::layoutChanged, this, &ModelTest::layoutChanged);
79+
80+ connect(model, &QAbstractItemModel::rowsAboutToBeInserted, this, &ModelTest::rowsAboutToBeInserted);
81+ connect(model, &QAbstractItemModel::rowsAboutToBeRemoved, this, &ModelTest::rowsAboutToBeRemoved);
82+ connect(model, &QAbstractItemModel::rowsInserted, this, &ModelTest::rowsInserted);
83+ connect(model, &QAbstractItemModel::rowsRemoved, this, &ModelTest::rowsRemoved);
84+ connect(model, &QAbstractItemModel::dataChanged, this, &ModelTest::dataChanged);
85+ connect(model, &QAbstractItemModel::headerDataChanged, this, &ModelTest::headerDataChanged);
10486
10587 runAllTests();
10688}
tests/plugins/Utils/QLimitProxyModelTest.cpp+24−24
@@ -102,9 +102,9 @@ class MirrorModel : public QObject
102102public:
103103 MirrorModel(QAbstractItemModel *model) : m_mirror(model)
104104 {
105− connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(rowsInserted(QModelIndex,int,int)));
106− connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(rowsRemoved(QModelIndex,int,int)));
107− connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(dataChanged(QModelIndex,QModelIndex)));
105+ connect(model, &QAbstractItemModel::rowsInserted, this, &MirrorModel::rowsInserted);
106+ connect(model, &QAbstractItemModel::rowsRemoved, this, &MirrorModel::rowsRemoved);
107+ connect(model, &QAbstractItemModel::dataChanged, this, &MirrorModel::dataChanged);
108108 }
109109
110110 void check()
@@ -193,7 +193,7 @@ private Q_SLOTS:
193193 MockListModel model;
194194 model.insertRows(0, 5);
195195
196− QSignalSpy spyOnCountChanged(&proxy, SIGNAL(countChanged()));
196+ QSignalSpy spyOnCountChanged(&proxy, &QLimitProxyModelQML::countChanged);
197197
198198 proxy.setModel(&model);
199199 QCOMPARE(proxy.rowCount(), 5);
@@ -207,7 +207,7 @@ private Q_SLOTS:
207207
208208 proxy.setModel(&model);
209209
210− QSignalSpy spyOnCountChanged(&proxy, SIGNAL(countChanged()));
210+ QSignalSpy spyOnCountChanged(&proxy, &QLimitProxyModelQML::countChanged);
211211
212212 model.insertRows(0, 5);
213213 QCOMPARE(proxy.rowCount(), 5);
@@ -222,7 +222,7 @@ private Q_SLOTS:
222222
223223 proxy.setModel(&model);
224224
225− QSignalSpy spyOnCountChanged(&proxy, SIGNAL(countChanged()));
225+ QSignalSpy spyOnCountChanged(&proxy, &QLimitProxyModelQML::countChanged);
226226
227227 model.removeRows(0, 3);
228228 QCOMPARE(proxy.rowCount(), 2);
@@ -237,7 +237,7 @@ private Q_SLOTS:
237237 proxy.setModel(&model);
238238 proxy.setLimit(3);
239239
240− QSignalSpy spyOnCountChanged(&proxy, SIGNAL(countChanged()));
240+ QSignalSpy spyOnCountChanged(&proxy, &QLimitProxyModelQML::countChanged);
241241
242242 model.insertRows(0, 5);
243243 QCOMPARE(proxy.rowCount(), 3);
@@ -253,9 +253,9 @@ private Q_SLOTS:
253253
254254 proxy.setModel(&model);
255255
256− QSignalSpy spyOnRowsRemoved(&proxy, SIGNAL(rowsRemoved(const QModelIndex &, int, int)));
257− QSignalSpy spyOnRowsInserted(&proxy, SIGNAL(rowsInserted(const QModelIndex &, int, int)));
258− QSignalSpy spyOnCountChanged(&proxy, SIGNAL(countChanged()));
256+ QSignalSpy spyOnRowsRemoved(&proxy, &QLimitProxyModelQML::rowsRemoved);
257+ QSignalSpy spyOnRowsInserted(&proxy, &QLimitProxyModelQML::rowsInserted);
258+ QSignalSpy spyOnCountChanged(&proxy, &QLimitProxyModelQML::countChanged);
259259
260260 proxy.setLimit(5);
261261 QCOMPARE(spyOnRowsInserted.count(), 0);
@@ -300,9 +300,9 @@ private Q_SLOTS:
300300
301301 proxy.setModel(&model);
302302
303− QSignalSpy spyOnRowsRemoved(&proxy, SIGNAL(rowsRemoved(const QModelIndex &, int, int)));
304− QSignalSpy spyOnRowsInserted(&proxy, SIGNAL(rowsInserted(const QModelIndex &, int, int)));
305− QSignalSpy spyOnCountChanged(&proxy, SIGNAL(countChanged()));
303+ QSignalSpy spyOnRowsRemoved(&proxy, &QLimitProxyModelQML::rowsRemoved);
304+ QSignalSpy spyOnRowsInserted(&proxy, &QLimitProxyModelQML::rowsInserted);
305+ QSignalSpy spyOnCountChanged(&proxy, &QLimitProxyModelQML::countChanged);
306306
307307 proxy.setLimit(7);
308308 QCOMPARE(spyOnRowsRemoved.count(), 0);
@@ -359,9 +359,9 @@ private Q_SLOTS:
359359
360360 proxy.setModel(&model);
361361
362− QSignalSpy spyOnRowsRemoved(&proxy, SIGNAL(rowsRemoved(const QModelIndex &, int, int)));
363− QSignalSpy spyOnRowsInserted(&proxy, SIGNAL(rowsInserted(const QModelIndex &, int, int)));
364− QSignalSpy spyOnCountChanged(&proxy, SIGNAL(countChanged()));
362+ QSignalSpy spyOnRowsRemoved(&proxy, &QLimitProxyModelQML::rowsRemoved);
363+ QSignalSpy spyOnRowsInserted(&proxy, &QLimitProxyModelQML::rowsInserted);
364+ QSignalSpy spyOnCountChanged(&proxy, &QLimitProxyModelQML::countChanged);
365365
366366 proxy.setLimit(7);
367367 QCOMPARE(spyOnRowsRemoved.count(), 0);
@@ -406,9 +406,9 @@ private Q_SLOTS:
406406 proxy.setModel(&model);
407407 proxy.setLimit(7);
408408
409− QSignalSpy spyOnRowsRemoved(&proxy, SIGNAL(rowsRemoved(const QModelIndex &, int, int)));
410− QSignalSpy spyOnRowsInserted(&proxy, SIGNAL(rowsInserted(const QModelIndex &, int, int)));
411− QSignalSpy spyOnCountChanged(&proxy, SIGNAL(countChanged()));
409+ QSignalSpy spyOnRowsRemoved(&proxy, &QLimitProxyModelQML::rowsRemoved);
410+ QSignalSpy spyOnRowsInserted(&proxy, &QLimitProxyModelQML::rowsInserted);
411+ QSignalSpy spyOnCountChanged(&proxy, &QLimitProxyModelQML::countChanged);
412412
413413 model.insertRows(0, 5);
414414 QCOMPARE(spyOnRowsRemoved.count(), 0);
@@ -451,9 +451,9 @@ private Q_SLOTS:
451451
452452 QCOMPARE(proxy.rowCount(), 7);
453453
454− QSignalSpy spyOnRowsRemoved(&proxy, SIGNAL(rowsRemoved(const QModelIndex &, int, int)));
455− QSignalSpy spyOnRowsInserted(&proxy, SIGNAL(rowsInserted(const QModelIndex &, int, int)));
456− QSignalSpy spyOnCountChanged(&proxy, SIGNAL(countChanged()));
454+ QSignalSpy spyOnRowsRemoved(&proxy, &QLimitProxyModelQML::rowsRemoved);
455+ QSignalSpy spyOnRowsInserted(&proxy, &QLimitProxyModelQML::rowsInserted);
456+ QSignalSpy spyOnCountChanged(&proxy, &QLimitProxyModelQML::countChanged);
457457
458458 model.removeRows(7, 3);
459459 QCOMPARE(proxy.rowCount(), 7);
@@ -507,7 +507,7 @@ private Q_SLOTS:
507507 QLimitProxyModelQML proxy;
508508 MockListModel model, model2;
509509
510− QSignalSpy spyOnModelChanged(&proxy, SIGNAL(modelChanged()));
510+ QSignalSpy spyOnModelChanged(&proxy, &QLimitProxyModelQML::modelChanged);
511511
512512 proxy.setModel(&model);
513513 QCOMPARE(spyOnModelChanged.count(), 1);
@@ -529,7 +529,7 @@ private Q_SLOTS:
529529 proxy.setModel(&model);
530530 proxy.setModel(&model);
531531
532− QSignalSpy spyOnCountChanged(&proxy, SIGNAL(countChanged()));
532+ QSignalSpy spyOnCountChanged(&proxy, &QLimitProxyModelQML::countChanged);
533533
534534 model.insertRows(0, 5);
535535 QCOMPARE(proxy.rowCount(), 5);
tests/plugins/Utils/UnitySortFilterProxyModelTest.cpp+4−4
@@ -135,7 +135,7 @@ private Q_SLOTS:
135135 MockListModel model;
136136 model.insertRows(0, 5);
137137
138− QSignalSpy spyOnCountChanged(&proxy, SIGNAL(countChanged()));
138+ QSignalSpy spyOnCountChanged(&proxy, &UnitySortFilterProxyModelQML::countChanged);
139139
140140 proxy.setModel(&model);
141141 QCOMPARE(proxy.count(), 5);
@@ -149,7 +149,7 @@ private Q_SLOTS:
149149
150150 proxy.setModel(&model);
151151
152− QSignalSpy spyOnCountChanged(&proxy, SIGNAL(countChanged()));
152+ QSignalSpy spyOnCountChanged(&proxy, &UnitySortFilterProxyModelQML::countChanged);
153153
154154 model.insertRows(0, 5);
155155 QCOMPARE(proxy.count(), 5);
@@ -165,7 +165,7 @@ private Q_SLOTS:
165165 proxy.setModel(&model);
166166 QCOMPARE(proxy.count(), 5);
167167
168− QSignalSpy spyOnCountChanged(&proxy, SIGNAL(countChanged()));
168+ QSignalSpy spyOnCountChanged(&proxy, &UnitySortFilterProxyModelQML::countChanged);
169169
170170 model.removeRows(0, 3);
171171 QCOMPARE(proxy.count(), 2);
@@ -249,7 +249,7 @@ private Q_SLOTS:
249249 UnitySortFilterProxyModelQML proxy;
250250 MockListModel model, model2;
251251
252− QSignalSpy spyOnModelChanged(&proxy, SIGNAL(modelChanged()));
252+ QSignalSpy spyOnModelChanged(&proxy, &UnitySortFilterProxyModelQML::modelChanged);
253253
254254 proxy.setModel(&model);
255255 QCOMPARE(spyOnModelChanged.count(), 1);
tests/qmltests/Components/tst_DragHandle.cpp+1−1
@@ -467,7 +467,7 @@ void tst_DragHandle::hintingAnimation_dontRestartAfterFinishedAndStillPressed()
467467 tryCompare([&](){ return parentItem->height(); }, hintDisplacement);
468468
469469
470− QSignalSpy parentHeightChangedSpy(parentItem, SIGNAL(heightChanged()));
470+ QSignalSpy parentHeightChangedSpy(parentItem, &QQuickItem::heightChanged);
471471
472472 drag(touchPoint, QPointF(0.0, -1.0) /*dragDirectionVector*/, 15 /*distance*/, 3 /*numSteps*/);
473473
tests/uqmlscene/main.cpp+3−3
@@ -222,8 +222,8 @@ static int displayOptionsDialog(Options *options)
222222 QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel,
223223 Qt::Horizontal,
224224 &dialog);
225− QObject::connect(buttonBox, SIGNAL(accepted()), &dialog, SLOT(accept()));
226− QObject::connect(buttonBox, SIGNAL(rejected()), &dialog, SLOT(reject()));
225+ QObject::connect(buttonBox, &QDialogButtonBox::accepted, &dialog, &QDialog::accept);
226+ QObject::connect(buttonBox, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);
227227
228228 layout->addRow("Qml file:", qmlFileComboBox);
229229 layout->addWidget(originalCheckBox);
@@ -498,7 +498,7 @@ int main(int argc, char ** argv)
498498#endif
499499 loadDummyDataFiles(engine, fi.path());
500500 }
501− QObject::connect(&engine, SIGNAL(quit()), QCoreApplication::instance(), SLOT(quit()));
501+ QObject::connect(&engine, &QQmlEngine::quit, QCoreApplication::instance(), &QCoreApplication::quit);
502502
503503 qmlRegisterSingletonType<QObject>("Qt.test.qtestroot", 1, 0, "QTestRootObject", testRootObject);
504504