Commit 8eee28d8 authored by hjk's avatar hjk

debugger: shorten startup failure message a bit

parent 128ed085
......@@ -760,10 +760,12 @@ void DebuggerManager::clearStatusMessage()
d->m_statusLabel->setText(d->m_lastPermanentStatusMessage);
}
void DebuggerManager::showStatusMessage(const QString &msg, int timeout)
void DebuggerManager::showStatusMessage(const QString &msg0, int timeout)
{
Q_UNUSED(timeout)
showDebuggerOutput(LogStatus, msg);
showDebuggerOutput(LogStatus, msg0);
QString msg = msg0;
msg.replace(QLatin1Char('\n'), QString());
d->m_statusLabel->setText(QLatin1String(" ") + msg);
if (timeout > 0) {
d->m_statusTimer->setSingleShot(true);
......
......@@ -123,8 +123,11 @@ void PlainGdbAdapter::handleFileExecAndSymbols(const GdbResponse &response)
#endif
emit inferiorPrepared();
} else {
QString msg = tr("Starting executable failed:\n") +
QString::fromLocal8Bit(response.data.findChild("msg").data());
QByteArray ba = response.data.findChild("msg").data();
QString msg = QString::fromLocal8Bit(ba);
// Extend the message a bit in unknown cases.
if (!ba.endsWith("File format not recognized"))
msg = tr("Starting executable failed:\n") + msg;
emit inferiorStartFailed(msg);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment