BlackBerry: Fixed running when only QML debugging is selected

The -debugNative parameter should only be passed to blackberry-deploy
when C++ debugging is enabled.

Task-number: QTCREATORBUG-11460
Change-Id: I3dba64bb57211f1c6d6b972e8afe5fa77451fb7c
Reviewed-by: Mehdi Fekari <mfekari@blackberry.com>
Reviewed-by: Fanda Vacek <fvacek@blackberry.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
This commit is contained in:
Tobias Nätterlund
2014-03-05 07:32:31 +01:00
committed by Tobias Nätterlund
parent 7954c19d5d
commit cb66d1ec23
3 changed files with 7 additions and 6 deletions

View File

@@ -57,9 +57,9 @@ using namespace ProjectExplorer;
using namespace Qnx; using namespace Qnx;
using namespace Qnx::Internal; using namespace Qnx::Internal;
BlackBerryApplicationRunner::BlackBerryApplicationRunner(bool debugMode, BlackBerryRunConfiguration *runConfiguration, QObject *parent) BlackBerryApplicationRunner::BlackBerryApplicationRunner(bool cppDebugMode, BlackBerryRunConfiguration *runConfiguration, QObject *parent)
: QObject(parent) : QObject(parent)
, m_debugMode(debugMode) , m_cppDebugMode(cppDebugMode)
, m_pid(-1) , m_pid(-1)
, m_appId(QString()) , m_appId(QString())
, m_running(false) , m_running(false)
@@ -246,7 +246,7 @@ void BlackBerryApplicationRunner::launchApplication()
QStringList args; QStringList args;
args << QLatin1String("-launchApp"); args << QLatin1String("-launchApp");
if (m_debugMode) if (m_cppDebugMode)
args << QLatin1String("-debugNative"); args << QLatin1String("-debugNative");
args << QLatin1String("-device") << m_sshParams.host; args << QLatin1String("-device") << m_sshParams.host;
if (!m_sshParams.password.isEmpty()) if (!m_sshParams.password.isEmpty())

View File

@@ -56,7 +56,7 @@ class BlackBerryApplicationRunner : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit BlackBerryApplicationRunner(bool debugMode, BlackBerryRunConfiguration *runConfiguration, QObject *parent = 0); explicit BlackBerryApplicationRunner(bool cppDebugMode, BlackBerryRunConfiguration *runConfiguration, QObject *parent = 0);
bool isRunning() const; bool isRunning() const;
qint64 pid() const; qint64 pid() const;
@@ -96,7 +96,7 @@ private slots:
private: private:
void reset(); void reset();
bool m_debugMode; bool m_cppDebugMode;
qint64 m_pid; qint64 m_pid;
QString m_appId; QString m_appId;

View File

@@ -44,7 +44,8 @@ BlackBerryDebugSupport::BlackBerryDebugSupport(BlackBerryRunConfiguration *runCo
: QObject(runControl->engine()) : QObject(runControl->engine())
, m_engine(runControl->engine()) , m_engine(runControl->engine())
{ {
m_runner = new BlackBerryApplicationRunner(true, runConfig, this); const bool cppDebugMode = m_engine->startParameters().languages & Debugger::CppLanguage;
m_runner = new BlackBerryApplicationRunner(cppDebugMode, runConfig, this);
connect(m_engine, SIGNAL(requestRemoteSetup()), this, SLOT(launchRemoteApplication())); connect(m_engine, SIGNAL(requestRemoteSetup()), this, SLOT(launchRemoteApplication()));
connect(m_engine, SIGNAL(stateChanged(Debugger::DebuggerState)), connect(m_engine, SIGNAL(stateChanged(Debugger::DebuggerState)),