on xenial help sign in
Move connect() to new syntax
commit479eddc44562538e0e8be4655843caa55ee35c8a authorAlbert Astals Cid <albert.astals@canonical.com> dateWed 19 Aug 2015, 15:56 (11 years ago) parent2ef5ca5
35 files changed+143−165
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/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+3−3 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/LightDM/liblightdm/Greeter.cpp+1−1 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/Unity/Indicators/UnityMenuModelStackTest.cpp+3−3 tests/plugins/Utils/ModelTest.cpp+22−40 tests/plugins/Utils/QLimitProxyModelTest.cpp+3−3 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/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+3−3
@@ -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/*
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/LightDM/liblightdm/Greeter.cpp+1−1
@@ -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()
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
@@ -96,7 +96,7 @@ void ApplicationInfo::setSession(Session* session)
9696 this, &ApplicationInfo::onSessionSurfaceChanged);
9797
9898 if (!m_manualSurfaceCreation) {
99− QTimer::singleShot(500, m_session, SLOT(createSurface()));
99+ QTimer::singleShot(500, m_session, &Session::createSurface);
100100 }
101101 }
102102
@@ -165,7 +165,7 @@ void ApplicationInfo::setState(State value)
165165 Q_EMIT stateChanged(value);
166166
167167 if (!m_manualSurfaceCreation && !m_session && m_state == ApplicationInfo::Starting) {
168− QTimer::singleShot(500, this, SLOT(createSession()));
168+ QTimer::singleShot(500, this, &ApplicationInfo::createSession);
169169 } else if (m_state == ApplicationInfo::Stopped) {
170170 Session *session = m_session;
171171 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/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/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+3−3
@@ -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()
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