Maemo: Fix application output.

This commit is contained in:
ck
2010-04-20 08:57:44 +02:00
parent a7534ff402
commit ace402f0cb
3 changed files with 17 additions and 15 deletions

View File

@@ -368,9 +368,9 @@ void MaemoRunControl::stopInternal()
AbstractMaemoRunControl::stopRunning(false); AbstractMaemoRunControl::stopRunning(false);
} }
void MaemoRunControl::handleRemoteOutput(const QString &output, bool onStdErr) void MaemoRunControl::handleRemoteOutput(const QString &output)
{ {
emit addToOutputWindowInline(this, output, onStdErr); emit addToOutputWindowInline(this, output, false);
} }
@@ -396,13 +396,13 @@ MaemoDebugRunControl::MaemoDebugRunControl(RunConfiguration *runConfiguration)
connect(m_debuggerManager, SIGNAL(debuggingFinished()), this, connect(m_debuggerManager, SIGNAL(debuggingFinished()), this,
SLOT(debuggingFinished()), Qt::QueuedConnection); SLOT(debuggingFinished()), Qt::QueuedConnection);
connect(m_debuggerManager, SIGNAL(applicationOutputAvailable(QString, bool)), connect(m_debuggerManager, SIGNAL(applicationOutputAvailable(QString, bool)),
this, SLOT(debuggerOutput(QString, bool)), Qt::QueuedConnection); this, SLOT(debuggerOutput(QString)), Qt::QueuedConnection);
} }
MaemoDebugRunControl::~MaemoDebugRunControl() MaemoDebugRunControl::~MaemoDebugRunControl()
{ {
disconnect(SIGNAL(addToOutputWindow(RunControl*,QString))); disconnect(SIGNAL(addToOutputWindow(RunControl*,QString, bool)));
disconnect(SIGNAL(addToOutputWindowInline(RunControl*,QString))); disconnect(SIGNAL(addToOutputWindowInline(RunControl*,QString, bool)));
stop(); stop();
debuggingFinished(); debuggingFinished();
} }
@@ -420,13 +420,13 @@ QString MaemoDebugRunControl::remoteCall() const
.arg(executableFilePathOnTarget()).arg(targetCmdLineSuffix()); .arg(executableFilePathOnTarget()).arg(targetCmdLineSuffix());
} }
void MaemoDebugRunControl::handleRemoteOutput(const QString &output, bool onStdErr) void MaemoDebugRunControl::handleRemoteOutput(const QString &output)
{ {
if (!m_debuggingStarted) { if (!m_debuggingStarted) {
m_debuggingStarted = true; m_debuggingStarted = true;
startDebugging(); startDebugging();
} }
emit addToOutputWindowInline(this, output, onStdErr); emit addToOutputWindowInline(this, output, false);
} }
void MaemoDebugRunControl::startDebugging() void MaemoDebugRunControl::startDebugging()
@@ -450,9 +450,9 @@ void MaemoDebugRunControl::debuggingFinished()
AbstractMaemoRunControl::stopRunning(true); AbstractMaemoRunControl::stopRunning(true);
} }
void MaemoDebugRunControl::debuggerOutput(const QString &output, bool onStdErr) void MaemoDebugRunControl::debuggerOutput(const QString &output)
{ {
emit appendMessage(this, QLatin1String("[gdb says:] ") + output, onStdErr); emit appendMessage(this, QLatin1String("[gdb says:] ") + output, true);
} }
QString MaemoDebugRunControl::gdbServerPort() const QString MaemoDebugRunControl::gdbServerPort() const

View File

@@ -86,7 +86,7 @@ protected:
QString executableFilePathOnTarget() const; QString executableFilePathOnTarget() const;
private slots: private slots:
virtual void handleRemoteOutput(const QString &output, bool onStdErr)=0; virtual void handleRemoteOutput(const QString &output)=0;
void handleInitialCleanupFinished(); void handleInitialCleanupFinished();
void handleDeployThreadFinished(); void handleDeployThreadFinished();
void handleRunThreadFinished(); void handleRunThreadFinished();
@@ -135,10 +135,12 @@ public:
explicit MaemoRunControl(ProjectExplorer::RunConfiguration *runConfiguration); explicit MaemoRunControl(ProjectExplorer::RunConfiguration *runConfiguration);
~MaemoRunControl(); ~MaemoRunControl();
private slots:
virtual void handleRemoteOutput(const QString &output);
private: private:
virtual void startInternal(); virtual void startInternal();
virtual void stopInternal(); virtual void stopInternal();
virtual void handleRemoteOutput(const QString &output, bool onStdErr);
virtual QString remoteCall() const; virtual QString remoteCall() const;
}; };
@@ -151,13 +153,13 @@ public:
bool isRunning() const; bool isRunning() const;
private slots: private slots:
void debuggerOutput(const QString &output, bool onStdErr); virtual void handleRemoteOutput(const QString &output);
void debuggerOutput(const QString &output);
void debuggingFinished(); void debuggingFinished();
private: private:
virtual void startInternal(); virtual void startInternal();
virtual void stopInternal(); virtual void stopInternal();
virtual void handleRemoteOutput(const QString &output, bool onStdErr);
virtual QString remoteCall() const; virtual QString remoteCall() const;
QString gdbServerPort() const; QString gdbServerPort() const;

View File

@@ -165,7 +165,7 @@ void MaemoInteractiveSshConnection::runCommand(const QString &command)
= strstr(output.data(), endMarker.toUtf8()); = strstr(output.data(), endMarker.toUtf8());
if (endMarkerPos) { if (endMarkerPos) {
if (endMarkerCount++ == 0) { if (endMarkerCount++ == 0) {
emit remoteOutput(QLatin1String("========== Remote output starts now. ==========")); emit remoteOutput(QLatin1String("========== Remote output starts now. ==========\n"));
firstCharToEmit = endMarkerPos + endMarkerLen + 1; firstCharToEmit = endMarkerPos + endMarkerLen + 1;
const char * const endMarkerPos2 const char * const endMarkerPos2
= strstr(firstCharToEmit, endMarker.toUtf8()); = strstr(firstCharToEmit, endMarker.toUtf8());
@@ -192,7 +192,7 @@ void MaemoInteractiveSshConnection::runCommand(const QString &command)
emit remoteOutput(QString::fromUtf8(firstCharToEmit, charsToEmitCount)); emit remoteOutput(QString::fromUtf8(firstCharToEmit, charsToEmitCount));
} }
} while (endMarkerCount < 2 && !stopRequested()); } while (endMarkerCount < 2 && !stopRequested());
emit remoteOutput(QLatin1String("========== Remote output ends now. ==========")); emit remoteOutput(QLatin1String("========== Remote output ends now. ==========\n"));
} }
MaemoInteractiveSshConnection::Ptr MaemoInteractiveSshConnection::create(const MaemoDeviceConfig &devConf) MaemoInteractiveSshConnection::Ptr MaemoInteractiveSshConnection::create(const MaemoDeviceConfig &devConf)