forked from qt-creator/qt-creator
CODA: Debug output added to CODA 4.0.23
Change-Id: Idd2ea3d11a5ee193205c642cc6176ec70c6ef41a Reviewed-on: http://codereview.qt-project.org/4418 Reviewed-by: Paweł Polański <jaggernod@gmail.com>
This commit is contained in:
committed by
Paweł Polański
parent
c4fb17bef9
commit
eb206dfed7
@@ -70,7 +70,6 @@ CodaRunControl::CodaRunControl(RunConfiguration *runConfiguration, const QString
|
||||
S60RunControlBase(runConfiguration, mode),
|
||||
m_port(0),
|
||||
m_state(StateUninit),
|
||||
m_codaFlags(0),
|
||||
m_stopAfterConnect(false)
|
||||
{
|
||||
const S60DeviceRunConfiguration *s60runConfig = qobject_cast<S60DeviceRunConfiguration *>(runConfiguration);
|
||||
@@ -226,10 +225,7 @@ void CodaRunControl::slotCodaEvent(const CodaEvent &event)
|
||||
|
||||
void CodaRunControl::initCommunication()
|
||||
{
|
||||
if (m_codaFlags & OptionsUseDebugSession)
|
||||
m_codaDevice->sendDebugSessionControlSessionStartCommand(CodaCallback(this, &CodaRunControl::handleDebugSessionStarted));
|
||||
else
|
||||
m_codaDevice->sendLoggingAddListenerCommand(CodaCallback(this, &CodaRunControl::handleAddListener));
|
||||
}
|
||||
|
||||
void CodaRunControl::handleConnected(const CodaEvent &event)
|
||||
@@ -241,8 +237,6 @@ void CodaRunControl::handleConnected(const CodaEvent &event)
|
||||
setProgress(maxProgress()*0.80);
|
||||
|
||||
m_codaServices = static_cast<const CodaLocatorHelloEvent &>(event).services();
|
||||
if (m_codaServices.contains(QLatin1String("DebugSessionControl")))
|
||||
m_codaFlags |= OptionsUseDebugSession;
|
||||
|
||||
emit connected();
|
||||
if (!m_stopAfterConnect)
|
||||
@@ -255,11 +249,7 @@ void CodaRunControl::handleContextRemoved(const CodaEvent &event)
|
||||
= static_cast<const CodaRunControlContextRemovedEvent &>(event).ids();
|
||||
if (!m_runningProcessId.isEmpty()
|
||||
&& removedItems.contains(m_runningProcessId.toAscii())) {
|
||||
appendMessage(tr("Process has finished.\n"), Utils::NormalMessageFormat);
|
||||
if (m_codaFlags & OptionsUseDebugSession)
|
||||
m_codaDevice->sendDebugSessionControlSessionEndCommand(CodaCallback(this, &CodaRunControl::handleDebugSessionEnded));
|
||||
else
|
||||
finishRunControl();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -355,7 +345,7 @@ void CodaRunControl::handleFindProcesses(const CodaCommandResult &result)
|
||||
executableUid(),
|
||||
commandLineArguments().split(' '),
|
||||
QString(),
|
||||
!(m_codaFlags & OptionsUseDebugSession));
|
||||
true);
|
||||
appendMessage(tr("Launching: %1\n").arg(executableName()), Utils::NormalMessageFormat);
|
||||
}
|
||||
}
|
||||
@@ -365,7 +355,6 @@ void CodaRunControl::handleCreateProcess(const CodaCommandResult &result)
|
||||
const bool ok = result.type == CodaCommandResult::SuccessReply;
|
||||
bool processCreated = false;
|
||||
if (ok) {
|
||||
if (m_codaFlags & OptionsUseDebugSession) {
|
||||
if (result.values.size()) {
|
||||
JsonValue id = result.values.at(0).findChild("ID");
|
||||
if (id.isValid()) {
|
||||
@@ -374,8 +363,6 @@ void CodaRunControl::handleCreateProcess(const CodaCommandResult &result)
|
||||
processCreated = true;
|
||||
}
|
||||
}
|
||||
} else // If no DebugSession is present the process will already be created by now
|
||||
processCreated = true;
|
||||
}
|
||||
if (processCreated) {
|
||||
setProgress(maxProgress());
|
||||
|
@@ -116,11 +116,6 @@ private:
|
||||
StateDebugSessionEnded
|
||||
};
|
||||
|
||||
enum Options {
|
||||
OptionsNone = 0,
|
||||
OptionsUseDebugSession = 1
|
||||
};
|
||||
|
||||
QSharedPointer<Coda::CodaDevice> m_codaDevice;
|
||||
|
||||
QString m_address;
|
||||
@@ -130,7 +125,6 @@ private:
|
||||
QStringList m_codaServices;
|
||||
|
||||
State m_state;
|
||||
quint32 m_codaFlags;
|
||||
bool m_stopAfterConnect;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user