forked from qt-creator/qt-creator
Debugger: Move startupRunConfiguration to RunConfiguration
It's not really debugger-specific. Change-Id: I2246e08d896df1d625ecce9b8b5428e7ea398851 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "environmentaspect.h"
|
||||
#include "kitinformation.h"
|
||||
#include "runnables.h"
|
||||
#include "session.h"
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
|
||||
@@ -243,6 +244,20 @@ void RunConfiguration::ctor()
|
||||
[this] { return displayName(); }, false);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Returns the RunConfiguration of the currently active target
|
||||
* of the startup project, if such exists, or \c nullptr otherwise.
|
||||
*/
|
||||
|
||||
RunConfiguration *RunConfiguration::startupRunConfiguration()
|
||||
{
|
||||
if (Project *pro = SessionManager::startupProject()) {
|
||||
if (const Target *target = pro->activeTarget())
|
||||
return target->activeRunConfiguration();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/*!
|
||||
Checks whether a run configuration is enabled.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user