diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index 338681ce854..b51b238118b 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -538,6 +538,19 @@ IRunConfigurationAspect *IRunControlFactory::createRunConfigurationAspect(RunCon than it needs to be. */ + +const char PRIORITY_KEY[] = "RunControlFactoryPriority"; + +int ProjectExplorer::IRunControlFactory::priority() const +{ + return property(PRIORITY_KEY).toInt(); // 0 by default. +} + +void IRunControlFactory::setPriority(int priority) +{ + setProperty(PRIORITY_KEY, priority); +} + namespace Internal { enum class RunWorkerState diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h index 4d7f927f81b..891c17a57e4 100644 --- a/src/plugins/projectexplorer/runconfiguration.h +++ b/src/plugins/projectexplorer/runconfiguration.h @@ -341,6 +341,10 @@ public: virtual RunControl *create(RunConfiguration *runConfiguration, Core::Id runMode, QString *errorMessage); virtual IRunConfigurationAspect *createRunConfigurationAspect(RunConfiguration *rc); + + int priority() const; +protected: + void setPriority(int priority); // Higher values will be preferred. }; class PROJECTEXPLORER_EXPORT RunConfigWidget : public QWidget