Commit 5915b66f authored by Tobias Hunger's avatar Tobias Hunger Committed by hjk

qmake project: Use Qt5-style connects

Change-Id: Ie82f4a0228a672fd7da35e35d2a000c0cc3c533a
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent b17fbfcd
...@@ -121,16 +121,15 @@ class CentralizedFolderWatcher : public QObject ...@@ -121,16 +121,15 @@ class CentralizedFolderWatcher : public QObject
Q_OBJECT Q_OBJECT
public: public:
CentralizedFolderWatcher(QmakeProject *parent); CentralizedFolderWatcher(QmakeProject *parent);
~CentralizedFolderWatcher();
void watchFolders(const QList<QString> &folders, QmakePriFileNode *node); void watchFolders(const QList<QString> &folders, QmakePriFileNode *node);
void unwatchFolders(const QList<QString> &folders, QmakePriFileNode *node); void unwatchFolders(const QList<QString> &folders, QmakePriFileNode *node);
private slots: private:
void folderChanged(const QString &folder); void folderChanged(const QString &folder);
void onTimer(); void onTimer();
void delayedFolderChanged(const QString &folder); void delayedFolderChanged(const QString &folder);
private:
QmakeProject *m_project; QmakeProject *m_project;
QSet<QString> recursiveDirs(const QString &folder); QSet<QString> recursiveDirs(const QString &folder);
QFileSystemWatcher m_watcher; QFileSystemWatcher m_watcher;
...@@ -322,10 +321,10 @@ QmakeProject::QmakeProject(QmakeManager *manager, const QString &fileName) : ...@@ -322,10 +321,10 @@ QmakeProject::QmakeProject(QmakeManager *manager, const QString &fileName) :
m_asyncUpdateTimer.setSingleShot(true); m_asyncUpdateTimer.setSingleShot(true);
m_asyncUpdateTimer.setInterval(3000); 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)), connect(BuildManager::instance(), &BuildManager::buildQueueFinished,
SLOT(buildFinished(bool))); this, &QmakeProject::buildFinished);
setPreferredKitMatcher(KitMatcher([this](const Kit *kit) -> bool { setPreferredKitMatcher(KitMatcher([this](const Kit *kit) -> bool {
return matchesKit(kit); return matchesKit(kit);
...@@ -1166,15 +1165,9 @@ CentralizedFolderWatcher::CentralizedFolderWatcher(QmakeProject *parent) ...@@ -1166,15 +1165,9 @@ CentralizedFolderWatcher::CentralizedFolderWatcher(QmakeProject *parent)
{ {
m_compressTimer.setSingleShot(true); m_compressTimer.setSingleShot(true);
m_compressTimer.setInterval(200); m_compressTimer.setInterval(200);
connect(&m_compressTimer, SIGNAL(timeout()), connect(&m_compressTimer, &QTimer::timeout, this, &CentralizedFolderWatcher::onTimer);
this, SLOT(onTimer())); connect(&m_watcher, &QFileSystemWatcher::directoryChanged,
connect (&m_watcher, SIGNAL(directoryChanged(QString)), this, &CentralizedFolderWatcher::folderChanged);
this, SLOT(folderChanged(QString)));
}
CentralizedFolderWatcher::~CentralizedFolderWatcher()
{
} }
QSet<QString> CentralizedFolderWatcher::recursiveDirs(const QString &folder) QSet<QString> CentralizedFolderWatcher::recursiveDirs(const QString &folder)
......
...@@ -155,13 +155,11 @@ public slots: ...@@ -155,13 +155,11 @@ public slots:
protected: protected:
RestoreResult fromMap(const QVariantMap &map, QString *errorMessage); RestoreResult fromMap(const QVariantMap &map, QString *errorMessage);
private slots: private:
void asyncUpdate(); void asyncUpdate();
void buildFinished(bool success); void buildFinished(bool success);
void activeTargetWasChanged(); void activeTargetWasChanged();
private:
QString executableFor(const QmakeProFileNode *node); QString executableFor(const QmakeProFileNode *node);
void updateRunConfigurations(); void updateRunConfigurations();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment