forked from qt-creator/qt-creator
Suppress "file outside the project" warning when there is no project
Change-Id: I46f6e38ba167a85b17ae9f7ac89d5fbbc75abfcd Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
9007d2cb33
commit
384641d798
@@ -334,7 +334,10 @@ void ProjectTree::updateExternalFileWarning()
|
||||
if (!infoBar->canInfoBeAdded(externalFileId))
|
||||
return;
|
||||
Utils::FileName fileName = Utils::FileName::fromString(document->filePath());
|
||||
foreach (Project *project, SessionManager::projects()) {
|
||||
const QList<Project *> projects = SessionManager::projects();
|
||||
if (projects.isEmpty())
|
||||
return;
|
||||
foreach (Project *project, projects) {
|
||||
Utils::FileName projectDir = project->projectDirectory();
|
||||
if (projectDir.isEmpty())
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user