forked from qt-creator/qt-creator
QmlPM: Use Qt5-style connects
The heavy lifting was done by clazy. Change-Id: I8fe343c8e7cfc9b0e620afe4ae947f9e997899f9 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
ca5ce834ef
commit
32ea9a644d
@@ -43,7 +43,7 @@ FileFilterBaseItem::FileFilterBaseItem(QObject *parent) :
|
||||
m_updateFileListTimer.setSingleShot(true);
|
||||
m_updateFileListTimer.setInterval(50);
|
||||
|
||||
connect(&m_updateFileListTimer, SIGNAL(timeout()), this, SLOT(updateFileListNow()));
|
||||
connect(&m_updateFileListTimer, &QTimer::timeout, this, &FileFilterBaseItem::updateFileListNow);
|
||||
}
|
||||
|
||||
Utils::FileSystemWatcher *FileFilterBaseItem::dirWatcher()
|
||||
@@ -51,7 +51,8 @@ Utils::FileSystemWatcher *FileFilterBaseItem::dirWatcher()
|
||||
if (!m_dirWatcher) {
|
||||
m_dirWatcher = new Utils::FileSystemWatcher(1, this); // Separate id, might exceed OS limits.
|
||||
m_dirWatcher->setObjectName(QLatin1String("FileFilterBaseItemWatcher"));
|
||||
connect(m_dirWatcher, SIGNAL(directoryChanged(QString)), this, SLOT(updateFileList()));
|
||||
connect(m_dirWatcher, &Utils::FileSystemWatcher::directoryChanged,
|
||||
this, &FileFilterBaseItem::updateFileList);
|
||||
}
|
||||
return m_dirWatcher;
|
||||
}
|
||||
|
||||
@@ -72,11 +72,10 @@ signals:
|
||||
void pathsChanged();
|
||||
void filesChanged(const QSet<QString> &added, const QSet<QString> &removed);
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void updateFileList();
|
||||
void updateFileListNow();
|
||||
|
||||
private:
|
||||
QString absolutePath(const QString &path) const;
|
||||
QString absoluteDir() const;
|
||||
|
||||
|
||||
@@ -94,8 +94,8 @@ void QmlProjectItem::setSourceDirectory(const QString &directoryPath)
|
||||
FileFilterBaseItem *fileFilter = qobject_cast<FileFilterBaseItem*>(contentElement);
|
||||
if (fileFilter) {
|
||||
fileFilter->setDefaultDirectory(directoryPath);
|
||||
connect(fileFilter, SIGNAL(filesChanged(QSet<QString>,QSet<QString>)),
|
||||
this, SIGNAL(qmlFilesChanged(QSet<QString>,QSet<QString>)));
|
||||
connect(fileFilter, &FileFilterBaseItem::filesChanged,
|
||||
this, &QmlProjectItem::qmlFilesChanged);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user