diff options
author | dt <qtc-committer@nokia.com> | 2010-05-10 15:09:54 +0200 |
---|---|---|
committer | dt <qtc-committer@nokia.com> | 2010-05-10 15:09:54 +0200 |
commit | 910b86b9a417289332027c69ab0f8b456b764de1 (patch) | |
tree | 955cec986664789cd2615f905ca2f68165933c5e /src/plugins/cmakeprojectmanager/cmaketarget.cpp | |
parent | e4113aa813ede62db0a6dcad27bf8b71a0e90a8f (diff) | |
download | qt-creator-910b86b9a417289332027c69ab0f8b456b764de1.tar.gz |
Add a custom executable runconfiguration for cmake projects
That is for projects that don't have a runnable target otherwise.
Task-Nr: QTCREATORBUG-1363
Diffstat (limited to 'src/plugins/cmakeprojectmanager/cmaketarget.cpp')
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmaketarget.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmaketarget.cpp b/src/plugins/cmakeprojectmanager/cmaketarget.cpp index 8a89c76a04..9e45ee2cdc 100644 --- a/src/plugins/cmakeprojectmanager/cmaketarget.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketarget.cpp @@ -34,6 +34,8 @@ #include "cmakerunconfiguration.h" #include "cmakebuildconfiguration.h" +#include <projectexplorer/customexecutablerunconfiguration.h> + #include <QtGui/QApplication> #include <QtGui/QStyle> @@ -131,6 +133,12 @@ void CMakeTarget::updateRunConfigurations() CMakeRunConfiguration *rc = it.value(); removeRunConfiguration(rc); } + if (runConfigurations().isEmpty()) { + // Oh no, no run configuration, + // create a custom executable run configuration + ProjectExplorer::CustomExecutableRunConfiguration *rc = new ProjectExplorer::CustomExecutableRunConfiguration(this); + addRunConfiguration(rc); + } } // ------------------------------------------------------------------------- |