forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -93,6 +93,7 @@
|
||||
#include <projectexplorer/devicesupport/deviceprocesslist.h>
|
||||
#include <projectexplorer/devicesupport/deviceprocessesdialog.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/projecttree.h>
|
||||
#include <projectexplorer/projectexplorersettings.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/session.h>
|
||||
@@ -481,7 +482,7 @@ public:
|
||||
bool DummyEngine::hasCapability(unsigned cap) const
|
||||
{
|
||||
// This can only be a first approximation of what to expect when running.
|
||||
Project *project = ProjectExplorerPlugin::currentProject();
|
||||
Project *project = ProjectTree::currentProject();
|
||||
if (!project)
|
||||
return 0;
|
||||
Target *target = project->activeTarget();
|
||||
@@ -3437,7 +3438,7 @@ void DebuggerPlugin::extensionsInitialized()
|
||||
|
||||
void DebuggerPluginPrivate::testLoadProject(const QString &proFile, const TestCallBack &cb)
|
||||
{
|
||||
connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::currentProjectChanged,
|
||||
connect(ProjectTree::instance(), &ProjectTree::currentProjectChanged,
|
||||
this, &DebuggerPluginPrivate::testProjectLoaded);
|
||||
|
||||
m_testCallbacks.append(cb);
|
||||
|
||||
Reference in New Issue
Block a user