forked from qt-creator/qt-creator
Clang: Do not call DocumentManager::modifiedDocuments() from worker thread
This is unsafe. Change-Id: I8ac075a7289afa0d84785e37b1325d186a153000 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "cpptoolsplugin.h"
|
||||
|
||||
#include <coreplugin/documentmanager.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/idocument.h>
|
||||
#include <texteditor/convenience.h>
|
||||
@@ -287,4 +288,13 @@ bool skipFileDueToSizeLimit(const QFileInfo &fileInfo, int limitInMB)
|
||||
return false;
|
||||
}
|
||||
|
||||
Utils::FileNameList modifiedFiles()
|
||||
{
|
||||
Utils::FileNameList files;
|
||||
foreach (Core::IDocument *doc, Core::DocumentManager::modifiedDocuments())
|
||||
files.append(doc->filePath());
|
||||
files.removeDuplicates();
|
||||
return files;
|
||||
}
|
||||
|
||||
} // CppTools
|
||||
|
||||
Reference in New Issue
Block a user