Commit a3b7290f authored by Jens Bache-Wiig's avatar Jens Bache-Wiig

Improved statusbar output for the debugger mode

* We now consistently avoid punctuation when possible
* Renamed usage of "Inferior" and "Program" to "Application" for
  increased readability
* Fixed inconsistent spacing in front of statusbar label

Reviewed-by:hjk
parent 59af7939
......@@ -266,6 +266,7 @@ struct DebuggerManagerPrivate
/// Views
DebuggerMainWindow *m_mainWindow;
QLabel *m_statusLabel;
QDockWidget *m_breakDock;
......@@ -769,7 +770,7 @@ void DebuggerManager::showStatusMessage(const QString &msg0, int timeout)
showDebuggerOutput(LogStatus, msg0);
QString msg = msg0;
msg.replace(QLatin1Char('\n'), QString());
d->m_statusLabel->setText(QLatin1String(" ") + msg);
d->m_statusLabel->setText(msg);
if (timeout > 0) {
d->m_statusTimer->setSingleShot(true);
d->m_statusTimer->start(timeout);
......@@ -782,7 +783,7 @@ void DebuggerManager::showStatusMessage(const QString &msg0, int timeout)
void DebuggerManager::notifyInferiorStopped()
{
setState(InferiorStopped);
showStatusMessage(tr("Stopped."), 5000);
showStatusMessage(tr("Stopped"), 5000);
}
void DebuggerManager::notifyInferiorRunning()
......@@ -794,7 +795,7 @@ void DebuggerManager::notifyInferiorRunning()
void DebuggerManager::notifyInferiorExited()
{
setState(DebuggerNotReady);
showStatusMessage(tr("Exited."), 5000);
showStatusMessage(tr("Exited"), 5000);
}
void DebuggerManager::notifyInferiorPidChanged(qint64 pid)
......
......@@ -1006,6 +1006,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
m_manager->threadsWindow(), SIGNAL(threadSelected(int)));
hbox->addWidget(threadBox);
hbox->addSpacerItem(new QSpacerItem(4, 0));
hbox->addWidget(m_manager->statusLabel(), 10);
......
......@@ -76,22 +76,22 @@ QString AbstractGdbAdapter::msgGdbStopFailed(const QString &why)
QString AbstractGdbAdapter::msgInferiorStopFailed(const QString &why)
{
return tr("Inferior process could not be stopped:\n%1").arg(why);
return tr("Application process could not be stopped:\n%1").arg(why);
}
QString AbstractGdbAdapter::msgInferiorStarted()
{
return tr("Inferior started.");
return tr("Application started");
}
QString AbstractGdbAdapter::msgInferiorRunning()
{
return tr("Inferior running.");
return tr("Application running");
}
QString AbstractGdbAdapter::msgAttachedToStoppedInferior()
{
return tr("Attached to stopped inferior.");
return tr("Attached to stopped application");
}
QString AbstractGdbAdapter::msgConnectRemoteServerFailed(const QString &why)
......
......@@ -423,7 +423,7 @@ void GdbEngine::handleResponse(const QByteArray &buff)
// symbols-loaded="0"
QByteArray id = result.findChild("id").data();
if (!id.isEmpty())
showStatusMessage(tr("Library %1 loaded.").arg(_(id)), 1000);
showStatusMessage(tr("Library %1 loaded").arg(_(id)), 1000);
int progress = m_progress->progressValue();
m_progress->setProgressValue(qMin(70, progress + 1));
invalidateSourcesList();
......@@ -432,7 +432,7 @@ void GdbEngine::handleResponse(const QByteArray &buff)
// target-name="/usr/lib/libdrm.so.2",
// host-name="/usr/lib/libdrm.so.2"
QByteArray id = result.findChild("id").data();
showStatusMessage(tr("Library %1 unloaded.").arg(_(id)), 1000);
showStatusMessage(tr("Library %1 unloaded").arg(_(id)), 1000);
invalidateSourcesList();
} else if (asyncClass == "thread-group-created") {
// Archer has "{id="28902"}"
......@@ -446,20 +446,20 @@ void GdbEngine::handleResponse(const QByteArray &buff)
} else if (asyncClass == "thread-created") {
//"{id="1",group-id="28902"}"
QByteArray id = result.findChild("id").data();
showStatusMessage(tr("Thread %1 created.").arg(_(id)), 1000);
showStatusMessage(tr("Thread %1 created").arg(_(id)), 1000);
} else if (asyncClass == "thread-group-exited") {
// Archer has "{id="28902"}"
QByteArray id = result.findChild("id").data();
showStatusMessage(tr("Thread group %1 exited.").arg(_(id)), 1000);
showStatusMessage(tr("Thread group %1 exited").arg(_(id)), 1000);
} else if (asyncClass == "thread-exited") {
//"{id="1",group-id="28902"}"
QByteArray id = result.findChild("id").data();
QByteArray groupid = result.findChild("group-id").data();
showStatusMessage(tr("Thread %1 in group %2 exited.")
showStatusMessage(tr("Thread %1 in group %2 exited")
.arg(_(id)).arg(_(groupid)), 1000);
} else if (asyncClass == "thread-selected") {
QByteArray id = result.findChild("id").data();
showStatusMessage(tr("Thread %1 selected.").arg(_(id)), 1000);
showStatusMessage(tr("Thread %1 selected").arg(_(id)), 1000);
//"{id="2"}"
#if defined(Q_OS_MAC)
} else if (asyncClass == "shlibs-updated") {
......@@ -1161,13 +1161,13 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
setState(InferiorStopped);
QString msg;
if (reason == "exited") {
msg = tr("Program exited with exit code %1.")
msg = tr("Application exited with exit code %1")
.arg(_(data.findChild("exit-code").toString()));
} else if (reason == "exited-signalled" || reason == "signal-received") {
msg = tr("Program exited after receiving signal %1.")
msg = tr("Application exited after receiving signal %1")
.arg(_(data.findChild("signal-name").toString()));
} else {
msg = tr("Program exited normally.");
msg = tr("Application exited normally");
}
showStatusMessage(msg);
setState(InferiorShuttingDown);
......@@ -1380,7 +1380,7 @@ void GdbEngine::handleStop1(const GdbMi &data)
showMessageBox(QMessageBox::Information,
tr("Signal received"), msg);
if (!name.isEmpty() && !meaning.isEmpty())
reasontr = tr("Stopped: %1 by signal %2.")
reasontr = tr("Stopped: %1 by signal %2")
.arg(_(meaning)).arg(_(name));
}
}
......@@ -3288,7 +3288,7 @@ void GdbEngine::rebuildWatchModel()
if (theDebuggerBoolSetting(LogTimeStamps))
showDebuggerInput(LogMisc, currentTime());
showDebuggerInput(LogStatus, _("<Rebuild Watchmodel %1>").arg(count));
showStatusMessage(tr("Finished retrieving data."), 400);
showStatusMessage(tr("Finished retrieving data"), 400);
manager()->watchHandler()->endCycle();
showToolTip();
}
......
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