aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Teske <daniel.teske@theqtcompany.com>2015-02-12 16:35:34 +0100
committerTobias Hunger <tobias.hunger@theqtcompany.com>2015-02-16 14:19:39 +0000
commitf9130866b8a144fb9d96999c8e573e5084ceaaf5 (patch)
treec399f185451796d51ca8b13cf0874244b1bb6546
parent1d14dbf1aa65291018dae61d8654e871f80d8f79 (diff)
CurrentProjectFilter: Fix if no file is open
Task-number: QTCREATORBUG-13876 Change-Id: I8ff9c7c8eecd1e6c8da21ac7794a571905b538c2 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
-rw-r--r--src/plugins/projectexplorer/currentprojectfilter.cpp6
-rw-r--r--src/plugins/projectexplorer/currentprojectfilter.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/currentprojectfilter.cpp b/src/plugins/projectexplorer/currentprojectfilter.cpp
index d2a06cc6d1..12383cd452 100644
--- a/src/plugins/projectexplorer/currentprojectfilter.cpp
+++ b/src/plugins/projectexplorer/currentprojectfilter.cpp
@@ -75,8 +75,12 @@ void CurrentProjectFilter::prepareSearch(const QString &entry)
BaseFileFilter::prepareSearch(entry);
}
-void CurrentProjectFilter::currentProjectChanged(Project *project)
+void CurrentProjectFilter::currentProjectChanged()
{
+ Project *project = ProjectTree::currentProject();
+ if (!project)
+ project = SessionManager::startupProject();
+
if (project == m_project)
return;
if (m_project)
diff --git a/src/plugins/projectexplorer/currentprojectfilter.h b/src/plugins/projectexplorer/currentprojectfilter.h
index c903e48b94..2b1c150f2e 100644
--- a/src/plugins/projectexplorer/currentprojectfilter.h
+++ b/src/plugins/projectexplorer/currentprojectfilter.h
@@ -52,7 +52,7 @@ public:
void prepareSearch(const QString &entry);
private slots:
- void currentProjectChanged(ProjectExplorer::Project *project);
+ void currentProjectChanged();
void markFilesAsOutOfDate();
private: