forked from qt-creator/qt-creator
ProjectExplorer: Use Core::Id as RunMode "enum values"
This provides a way for third-party plugins to implement run modes without the need to add a value to the central enum or using manual workarounds like RunMode(*(int*)&someUniqueObject). Instead of centrally defined enum values this uses Core::Id that could be defined anywhere. Change-Id: Ic350e3d8dbb8042c61b2d4ffec993ca151f53099 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
#endif
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
namespace ProjectExplorer {
|
||||
|
||||
/*!
|
||||
\class ProjectExplorer::ProcessHandle
|
||||
@@ -515,7 +515,7 @@ IRunConfigurationAspect *IRunControlFactory::createRunConfigurationAspect(RunCon
|
||||
than it needs to be.
|
||||
*/
|
||||
|
||||
RunControl::RunControl(RunConfiguration *runConfiguration, RunMode mode)
|
||||
RunControl::RunControl(RunConfiguration *runConfiguration, Core::Id mode)
|
||||
: m_runMode(mode), m_runConfiguration(runConfiguration), m_outputFormatter(0)
|
||||
{
|
||||
if (runConfiguration) {
|
||||
@@ -537,7 +537,7 @@ Utils::OutputFormatter *RunControl::outputFormatter()
|
||||
return m_outputFormatter;
|
||||
}
|
||||
|
||||
RunMode RunControl::runMode() const
|
||||
Core::Id RunControl::runMode() const
|
||||
{
|
||||
return m_runMode;
|
||||
}
|
||||
@@ -663,3 +663,5 @@ void RunControl::appendMessage(const QString &msg, Utils::OutputFormat format)
|
||||
{
|
||||
emit appendMessage(this, msg, format);
|
||||
}
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
Reference in New Issue
Block a user