summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpptoolsplugin.cpp
diff options
context:
space:
mode:
authorDaniel Teske <daniel.teske@theqtcompany.com>2014-11-19 17:58:33 +0100
committerDaniel Teske <daniel.teske@theqtcompany.com>2014-12-03 12:36:20 +0100
commit4943510b60acc320dff8f2c31af69cfbfa331203 (patch)
treedd879a4e751f005db97e5256b8f658a2ba243013 /src/plugins/cpptools/cpptoolsplugin.cpp
parent042ef1aec0e04d2568c30ab19c1f89720ed8da3e (diff)
downloadqt-creator-4943510b60acc320dff8f2c31af69cfbfa331203.tar.gz
Completely rework currentNode/currentProject handling
Centralize the handling inside a new class ProjectTree. React to moving focus and remove most special handling. This properly fixes the linked task. Task-number: QTCREATORBUG-13357 Change-Id: I6b06aa32b1e4305ec8a6d432857b302585d8734b Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/cpptools/cpptoolsplugin.cpp')
-rw-r--r--src/plugins/cpptools/cpptoolsplugin.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp
index 3956b5629c..0ed79950c7 100644
--- a/src/plugins/cpptools/cpptoolsplugin.cpp
+++ b/src/plugins/cpptools/cpptoolsplugin.cpp
@@ -53,6 +53,7 @@
#include <coreplugin/jsexpander.h>
#include <coreplugin/vcsmanager.h>
#include <cppeditor/cppeditorconstants.h>
+#include <projectexplorer/projecttree.h>
#include <utils/fileutils.h>
#include <utils/hostosinfo.h>
@@ -431,7 +432,7 @@ QString correspondingHeaderOrSource(const QString &fileName, bool *wasHeader)
}
// Find files in the current project
- ProjectExplorer::Project *currentProject = ProjectExplorer::ProjectExplorerPlugin::currentProject();
+ ProjectExplorer::Project *currentProject = ProjectExplorer::ProjectTree::currentProject();
if (currentProject) {
const QString path = correspondingHeaderOrSourceInProject(fi, candidateFileNames,
currentProject);