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:
@@ -125,21 +125,21 @@ static int socketHandShakePort = MIN_SOCKET_HANDSHAKE_PORT;
|
||||
|
||||
AndroidRunner::AndroidRunner(QObject *parent,
|
||||
AndroidRunConfiguration *runConfig,
|
||||
ProjectExplorer::RunMode runMode)
|
||||
Core::Id runMode)
|
||||
: QThread(parent), m_handShakeMethod(SocketHandShake), m_socket(0),
|
||||
m_customPort(false)
|
||||
{
|
||||
m_tries = 0;
|
||||
Debugger::DebuggerRunConfigurationAspect *aspect
|
||||
= runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
|
||||
const bool debuggingMode = runMode == ProjectExplorer::DebugRunMode;
|
||||
const bool debuggingMode = (runMode == ProjectExplorer::Constants::DEBUG_RUN_MODE || runMode == ProjectExplorer::Constants::DEBUG_RUN_MODE_WITH_BREAK_ON_MAIN);
|
||||
m_useCppDebugger = debuggingMode && aspect->useCppDebugger();
|
||||
m_useQmlDebugger = debuggingMode && aspect->useQmlDebugger();
|
||||
QString channel = runConfig->remoteChannel();
|
||||
QTC_CHECK(channel.startsWith(QLatin1Char(':')));
|
||||
m_localGdbServerPort = channel.mid(1).toUShort();
|
||||
QTC_CHECK(m_localGdbServerPort);
|
||||
m_useQmlProfiler = runMode == ProjectExplorer::QmlProfilerRunMode;
|
||||
m_useQmlProfiler = runMode == ProjectExplorer::Constants::QML_PROFILER_RUN_MODE;
|
||||
if (m_useQmlDebugger || m_useQmlProfiler) {
|
||||
QTcpServer server;
|
||||
QTC_ASSERT(server.listen(QHostAddress::LocalHost)
|
||||
|
||||
Reference in New Issue
Block a user