forked from qt-creator/qt-creator
SessionManager: Apply 'static' pattern
Change-Id: I370f72fcf7a24216ee189979ce6b5c8bfc5f4140 Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
@@ -211,9 +211,8 @@ void SuppressionDialog::accept()
|
||||
return;
|
||||
|
||||
// Add file to project if there is a project containing this file on the file system.
|
||||
ProjectExplorer::SessionManager *session = ProjectExplorer::ProjectExplorerPlugin::instance()->session();
|
||||
if (!session->projectForFile(path)) {
|
||||
foreach (ProjectExplorer::Project *p, session->projects()) {
|
||||
if (!ProjectExplorer::SessionManager::projectForFile(path)) {
|
||||
foreach (ProjectExplorer::Project *p, ProjectExplorer::SessionManager::projects()) {
|
||||
if (path.startsWith(p->projectDirectory())) {
|
||||
p->rootProjectNode()->addFiles(QStringList() << path);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user