diff options
author | Tobias Hunger <tobias.hunger@nokia.com> | 2010-02-08 15:50:06 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@nokia.com> | 2010-02-09 16:57:37 +0100 |
commit | d1bdfcc363970eca53077cdab79de2d3cf24218a (patch) | |
tree | 100cc0dc41f660b72277fa018c8a46454d0686b4 /src/plugins/qt4projectmanager/externaleditors.cpp | |
parent | 8ee2521fe53cec55534b079b0d5b21b6b028676f (diff) | |
download | qt-creator-d1bdfcc363970eca53077cdab79de2d3cf24218a.tar.gz |
Integrate target support
* Ease cross device development by introducing 'targets' which
group build- and runsettings that are valid for this one target
Most of the kudos for the code review go to dt. Con, thorbjorn,
ckandler and others did also review parts of this patch.
Reviewed-by: dt
Diffstat (limited to 'src/plugins/qt4projectmanager/externaleditors.cpp')
-rw-r--r-- | src/plugins/qt4projectmanager/externaleditors.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/qt4projectmanager/externaleditors.cpp b/src/plugins/qt4projectmanager/externaleditors.cpp index 0f113175d7..225e9a0639 100644 --- a/src/plugins/qt4projectmanager/externaleditors.cpp +++ b/src/plugins/qt4projectmanager/externaleditors.cpp @@ -30,6 +30,7 @@ #include "externaleditors.h" #include "qt4project.h" #include "qt4projectmanagerconstants.h" +#include "qt4target.h" #include "qtversionmanager.h" #include "qt4buildconfiguration.h" @@ -139,8 +140,11 @@ bool ExternalQtEditor::getEditorLaunchData(const QString &fileName, const Qt4Project *project = qt4ProjectFor(fileName); // Get the binary either from the current Qt version of the project or Path if (project) { - Qt4BuildConfiguration *qt4bc = project->activeQt4BuildConfiguration(); - const QtVersion *qtVersion= qt4bc->qtVersion(); + if (!project->activeTarget() || + !project->activeTarget()->activeBuildConfiguration()) + return false; + Qt4BuildConfiguration *qt4bc = project->activeTarget()->activeBuildConfiguration(); + const QtVersion *qtVersion = qt4bc->qtVersion(); data->binary = (qtVersion->*commandAccessor)(); data->workingDirectory = QFileInfo(project->file()->fileName()).absolutePath(); } else { |