diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp index 4cf8fd98611..b5e81d30b0e 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp @@ -121,16 +121,15 @@ class CentralizedFolderWatcher : public QObject Q_OBJECT public: CentralizedFolderWatcher(QmakeProject *parent); - ~CentralizedFolderWatcher(); + void watchFolders(const QList &folders, QmakePriFileNode *node); void unwatchFolders(const QList &folders, QmakePriFileNode *node); -private slots: +private: void folderChanged(const QString &folder); void onTimer(); void delayedFolderChanged(const QString &folder); -private: QmakeProject *m_project; QSet recursiveDirs(const QString &folder); QFileSystemWatcher m_watcher; @@ -322,10 +321,10 @@ QmakeProject::QmakeProject(QmakeManager *manager, const QString &fileName) : m_asyncUpdateTimer.setSingleShot(true); m_asyncUpdateTimer.setInterval(3000); - connect(&m_asyncUpdateTimer, SIGNAL(timeout()), this, SLOT(asyncUpdate())); + connect(&m_asyncUpdateTimer, &QTimer::timeout, this, &QmakeProject::asyncUpdate); - connect(BuildManager::instance(), SIGNAL(buildQueueFinished(bool)), - SLOT(buildFinished(bool))); + connect(BuildManager::instance(), &BuildManager::buildQueueFinished, + this, &QmakeProject::buildFinished); setPreferredKitMatcher(KitMatcher([this](const Kit *kit) -> bool { return matchesKit(kit); @@ -1166,15 +1165,9 @@ CentralizedFolderWatcher::CentralizedFolderWatcher(QmakeProject *parent) { m_compressTimer.setSingleShot(true); m_compressTimer.setInterval(200); - connect(&m_compressTimer, SIGNAL(timeout()), - this, SLOT(onTimer())); - connect (&m_watcher, SIGNAL(directoryChanged(QString)), - this, SLOT(folderChanged(QString))); -} - -CentralizedFolderWatcher::~CentralizedFolderWatcher() -{ - + connect(&m_compressTimer, &QTimer::timeout, this, &CentralizedFolderWatcher::onTimer); + connect(&m_watcher, &QFileSystemWatcher::directoryChanged, + this, &CentralizedFolderWatcher::folderChanged); } QSet CentralizedFolderWatcher::recursiveDirs(const QString &folder) diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.h b/src/plugins/qmakeprojectmanager/qmakeproject.h index fc3b2b75919..a363d6766e7 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.h +++ b/src/plugins/qmakeprojectmanager/qmakeproject.h @@ -155,13 +155,11 @@ public slots: protected: RestoreResult fromMap(const QVariantMap &map, QString *errorMessage); -private slots: +private: void asyncUpdate(); void buildFinished(bool success); - void activeTargetWasChanged(); -private: QString executableFor(const QmakeProFileNode *node); void updateRunConfigurations();