Project: Add signal triggered by project files becoming dirty

Add a signal triggered by project files becoming dirty and add
a way to register more project files than just the default with the
project.

This change enables getting rid of filesystemwatchers in derived
classes.

Change-Id: If985b46edf7cb88dd49f1c574f35cf13b5ce82d4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Tobias Hunger
2019-08-15 12:42:26 +02:00
parent 087396fe00
commit d13307b5bf
3 changed files with 59 additions and 14 deletions

View File

@@ -1272,7 +1272,21 @@ QSet<T> toSet(const QList<T> &list)
#endif
}
template <class T>
template<class T>
QSet<T> toSet(const QVector<T> &vec)
{
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
QSet<T> result;
for (const T &p : vec) {
result.insert(p);
}
return result;
#else
return QSet<T>(vec.begin(), vec.end());
#endif
}
template<class T>
QList<T> toList(const QSet<T> &set)
{
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))