forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.15'
Conflicts: src/libs/sqlite/sqlitebasestatement.h src/plugins/qmldesigner/qmldesignerplugin.cpp Change-Id: I0fa0a8a7feffed24c0d2bc26eca86590f1156755
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/iversioncontrol.h>
|
||||
#include <coreplugin/vcsmanager.h>
|
||||
#include <coreplugin/editormanager/documentmodel.h>
|
||||
|
||||
#include <projectexplorer/buildmanager.h>
|
||||
#include <projectexplorer/kitmanager.h>
|
||||
@@ -1073,6 +1074,23 @@ QStringList Project::availableQmlPreviewTranslations(QString *errorMessage)
|
||||
});
|
||||
}
|
||||
|
||||
QList<Core::IDocument *> Project::modifiedDocuments() const
|
||||
{
|
||||
QList<Core::IDocument *> modifiedProjectDocuments;
|
||||
|
||||
for (Core::IDocument *doc : Core::DocumentModel::openedDocuments()) {
|
||||
if (doc->isModified() && isKnownFile(doc->filePath()))
|
||||
modifiedProjectDocuments.append(doc);
|
||||
}
|
||||
|
||||
return modifiedProjectDocuments;
|
||||
}
|
||||
|
||||
bool Project::isModified() const
|
||||
{
|
||||
return !modifiedDocuments().isEmpty();
|
||||
}
|
||||
|
||||
#if defined(WITH_TESTS)
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
Reference in New Issue
Block a user