diff options
author | BogDan Vatra <[email protected]> | 2015-06-29 10:36:29 +0300 |
---|---|---|
committer | BogDan Vatra <[email protected]> | 2015-06-30 06:20:54 +0000 |
commit | 2182ded57be0bd91ab4459e622c2ac8fbef90e65 (patch) | |
tree | 1b3941c056e883b5eaa8578b26f7bc26cbf2abe9 /src/plugins/android/androidrunner.cpp | |
parent | 7743664957f3a9e857d72530e475d13844bd4037 (diff) |
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 <[email protected]>
Reviewed-by: Eike Ziller <[email protected]>
Diffstat (limited to 'src/plugins/android/androidrunner.cpp')
-rw-r--r-- | src/plugins/android/androidrunner.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/android/androidrunner.cpp b/src/plugins/android/androidrunner.cpp index c525440c0f4..c530d008cfb 100644 --- a/src/plugins/android/androidrunner.cpp +++ b/src/plugins/android/androidrunner.cpp @@ -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) |