diff --git a/src/plugins/coreplugin/generalsettings.ui b/src/plugins/coreplugin/generalsettings.ui index dd680aa10cfaeff4c858841c100603518d3cbd01..b33497825c7cb867c95b9d33215c787b617fa0d7 100644 --- a/src/plugins/coreplugin/generalsettings.ui +++ b/src/plugins/coreplugin/generalsettings.ui @@ -59,7 +59,7 @@ <height>0</height> </size> </property> - <property name="alphaAllowed" stdset="0"> + <property name="alphaAllowed"> <bool>false</bool> </property> </widget> @@ -163,6 +163,9 @@ <property name="text"> <string>When files are externally modified:</string> </property> + <property name="wordWrap"> + <bool>true</bool> + </property> </widget> </item> <item> @@ -193,19 +196,6 @@ </item> </widget> </item> - <item> - <spacer name="horizontalSpacer_3"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> </layout> </item> </layout> diff --git a/src/plugins/debugger/gdb/abstractgdbadapter.cpp b/src/plugins/debugger/gdb/abstractgdbadapter.cpp index 1a523f8d1cad5791e1b21108b006e80d43ad4c4b..52c76107606ece581a43ca7a3f820c8745445620 100644 --- a/src/plugins/debugger/gdb/abstractgdbadapter.cpp +++ b/src/plugins/debugger/gdb/abstractgdbadapter.cpp @@ -83,5 +83,35 @@ bool AbstractGdbAdapter::isTrkAdapter() const return false; } +QString AbstractGdbAdapter::msgGdbStopFailed(const QString &why) +{ + return tr("The Gdb process could not be stopped:\n%1").arg(why); +} + +QString AbstractGdbAdapter::msgInferiorStopFailed(const QString &why) +{ + return tr("Inferior process could not be stopped:\n%1").arg(why); +} + +QString AbstractGdbAdapter::msgInferiorStarted() +{ + return tr("Inferior started."); +} + +QString AbstractGdbAdapter::msgInferiorRunning() +{ + return tr("Inferior running."); +} + +QString AbstractGdbAdapter::msgAttachedToStoppedInferior() +{ + return tr("Attached to stopped inferior."); +} + +QString AbstractGdbAdapter::msgConnectRemoteServerFailed(const QString &why) +{ + return tr("Connecting to remote server failed:\n%1").arg(why); +} + } // namespace Internal } // namespace Debugger diff --git a/src/plugins/debugger/gdb/abstractgdbadapter.h b/src/plugins/debugger/gdb/abstractgdbadapter.h index cafc03d491dee4234973146bbcd23c96d834b668..ecb52f9316e78214cf435f0b1882f7bd17064b6a 100644 --- a/src/plugins/debugger/gdb/abstractgdbadapter.h +++ b/src/plugins/debugger/gdb/abstractgdbadapter.h @@ -93,6 +93,13 @@ protected: void showStatusMessage(const QString &msg) const { m_engine->showStatusMessage(msg); } + static QString msgGdbStopFailed(const QString &why); + static QString msgInferiorStopFailed(const QString &why); + static QString msgAttachedToStoppedInferior(); + static QString msgInferiorStarted(); + static QString msgInferiorRunning(); + static QString msgConnectRemoteServerFailed(const QString &why); + GdbEngine * const m_engine; QProcess m_gdbProc; diff --git a/src/plugins/debugger/gdb/attachgdbadapter.cpp b/src/plugins/debugger/gdb/attachgdbadapter.cpp index a43947129b7a9cbe88f14fb6e3ab43ee2691f1f1..e06790e0ab403de7527ba013129d6802a170ae85 100644 --- a/src/plugins/debugger/gdb/attachgdbadapter.cpp +++ b/src/plugins/debugger/gdb/attachgdbadapter.cpp @@ -107,7 +107,7 @@ void AttachGdbAdapter::handleAttach(const GdbResponse &response) if (response.resultClass == GdbResultDone) { setState(InferiorStopped); debugMessage(_("INFERIOR STARTED")); - showStatusMessage(tr("Attached to stopped inferior.")); + showStatusMessage(msgAttachedToStoppedInferior()); m_engine->updateAll(); } else if (response.resultClass == GdbResultError) { QString msg = __(response.data.findChild("msg").data()); @@ -155,8 +155,7 @@ void AttachGdbAdapter::handleDetach(const GdbResponse &response) emit inferiorShutDown(); shutdown(); // re-iterate... } else if (response.resultClass == GdbResultError) { - QString msg = tr("Inferior process could not be stopped:\n") + - __(response.data.findChild("msg").data()); + const QString msg = msgInferiorStopFailed(__(response.data.findChild("msg").data())); setState(InferiorShutdownFailed); emit inferiorShutdownFailed(msg); } @@ -167,8 +166,7 @@ void AttachGdbAdapter::handleExit(const GdbResponse &response) if (response.resultClass == GdbResultDone) { // don't set state here, this will be handled in handleGdbFinished() } else if (response.resultClass == GdbResultError) { - QString msg = tr("Gdb process could not be stopped:\n") + - __(response.data.findChild("msg").data()); + const QString msg = msgGdbStopFailed(__(response.data.findChild("msg").data())); emit adapterShutdownFailed(msg); } } diff --git a/src/plugins/debugger/gdb/coregdbadapter.cpp b/src/plugins/debugger/gdb/coregdbadapter.cpp index d51963606e3be7cf1a00861584a221241978bf89..dd4d5725e8ea53a5cae16b197c1ba3d45fa84fc0 100644 --- a/src/plugins/debugger/gdb/coregdbadapter.cpp +++ b/src/plugins/debugger/gdb/coregdbadapter.cpp @@ -221,8 +221,7 @@ void CoreGdbAdapter::handleExit(const GdbResponse &response) if (response.resultClass == GdbResultDone) { // don't set state here, this will be handled in handleGdbFinished() } else if (response.resultClass == GdbResultError) { - QString msg = tr("Gdb process could not be stopped:\n") + - __(response.data.findChild("msg").data()); + const QString msg = msgGdbStopFailed(__(response.data.findChild("msg").data())); emit adapterShutdownFailed(msg); } } diff --git a/src/plugins/debugger/gdb/plaingdbadapter.cpp b/src/plugins/debugger/gdb/plaingdbadapter.cpp index 5d679527aa45ba8c417325815187a4de79b9d074..c0fdea894874dc920c0059bd02e48a29d266943f 100644 --- a/src/plugins/debugger/gdb/plaingdbadapter.cpp +++ b/src/plugins/debugger/gdb/plaingdbadapter.cpp @@ -135,7 +135,7 @@ void PlainGdbAdapter::handleExecRun(const GdbResponse &response) if (response.resultClass == GdbResultRunning) { QTC_ASSERT(state() == InferiorRunning, qDebug() << state()); debugMessage(_("INFERIOR STARTED")); - showStatusMessage(tr("Inferior started.")); + showStatusMessage(msgInferiorStarted()); } else { QTC_ASSERT(state() == InferiorRunningRequested, qDebug() << state()); QTC_ASSERT(response.resultClass == GdbResultError, /**/); @@ -219,8 +219,7 @@ void PlainGdbAdapter::handleKill(const GdbResponse &response) emit inferiorShutDown(); shutdown(); // re-iterate... } else if (response.resultClass == GdbResultError) { - QString msg = tr("Inferior process could not be stopped:\n") + - __(response.data.findChild("msg").data()); + const QString msg = msgInferiorStopFailed(__(response.data.findChild("msg").data())); setState(InferiorShutdownFailed); emit inferiorShutdownFailed(msg); } @@ -231,8 +230,7 @@ void PlainGdbAdapter::handleExit(const GdbResponse &response) if (response.resultClass == GdbResultDone) { // don't set state here, this will be handled in handleGdbFinished() } else if (response.resultClass == GdbResultError) { - QString msg = tr("Gdb process could not be stopped:\n") + - __(response.data.findChild("msg").data()); + const QString msg = msgGdbStopFailed(__(response.data.findChild("msg").data())); emit adapterShutdownFailed(msg); } } diff --git a/src/plugins/debugger/gdb/remotegdbadapter.cpp b/src/plugins/debugger/gdb/remotegdbadapter.cpp index 71ee7852b279c93b08b2881766ecdde816d39807..0b386f8b0f60e473a1c032c9a90c00700c88b55e 100644 --- a/src/plugins/debugger/gdb/remotegdbadapter.cpp +++ b/src/plugins/debugger/gdb/remotegdbadapter.cpp @@ -212,13 +212,12 @@ void RemoteGdbAdapter::handleTargetRemote(const GdbResponse &record) if (record.resultClass == GdbResultDone) { // gdb server will stop the remote application itself. debugMessage(_("INFERIOR STARTED")); - showStatusMessage(tr("Attached to stopped inferior.")); + showStatusMessage(msgAttachedToStoppedInferior()); setState(InferiorStopped); m_engine->continueInferior(); } else if (record.resultClass == GdbResultError) { // 16^error,msg="hd:5555: Connection timed out." - QString msg = tr("Connecting to remote server failed:\n"); - msg += __(record.data.findChild("msg").data()); + QString msg = msgConnectRemoteServerFailed(__(record.data.findChild("msg").data())); setState(InferiorPreparationFailed); emit inferiorStartFailed(msg); } @@ -273,8 +272,7 @@ void RemoteGdbAdapter::handleKill(const GdbResponse &response) emit inferiorShutDown(); shutdown(); // re-iterate... } else if (response.resultClass == GdbResultError) { - QString msg = tr("Inferior process could not be stopped:\n") + - __(response.data.findChild("msg").data()); + QString msg = msgInferiorStopFailed(__(response.data.findChild("msg").data())); setState(InferiorShutdownFailed); emit inferiorShutdownFailed(msg); } @@ -285,8 +283,7 @@ void RemoteGdbAdapter::handleExit(const GdbResponse &response) if (response.resultClass == GdbResultDone) { // don't set state here, this will be handled in handleGdbFinished() } else if (response.resultClass == GdbResultError) { - QString msg = tr("Gdb process could not be stopped:\n") + - __(response.data.findChild("msg").data()); + QString msg = msgGdbStopFailed(__(response.data.findChild("msg").data())); emit adapterShutdownFailed(msg); } } diff --git a/src/plugins/debugger/gdb/trkgdbadapter.cpp b/src/plugins/debugger/gdb/trkgdbadapter.cpp index a2b735777c4bb3f4a1279889769f35d934b226fb..1db8f66ff087d197cfb3e899cfc4f458374992bd 100644 --- a/src/plugins/debugger/gdb/trkgdbadapter.cpp +++ b/src/plugins/debugger/gdb/trkgdbadapter.cpp @@ -1702,11 +1702,9 @@ void TrkGdbAdapter::handleFirstContinue(const GdbResponse &record) QTC_ASSERT(state() == InferiorRunning, qDebug() << state()); if (record.resultClass == GdbResultDone) { debugMessage(_("INFERIOR STARTED")); - showStatusMessage(tr("Inferior running.")); + showStatusMessage(msgInferiorRunning()); } else if (record.resultClass == GdbResultError) { - //QString msg = __(record.data.findChild("msg").data()); - QString msg1 = tr("Connecting to remote server failed:"); - emit inferiorStartFailed(msg1 + record.toString()); + emit inferiorStartFailed(msgConnectRemoteServerFailed(record.toString())); } } @@ -2083,8 +2081,7 @@ void TrkGdbAdapter::handleKill(const GdbResponse &response) emit inferiorShutDown(); shutdown(); // re-iterate... } else if (response.resultClass == GdbResultError) { - QString msg = tr("Inferior process could not be stopped:\n") + - __(response.data.findChild("msg").data()); + const QString msg = msgInferiorStopFailed(__(response.data.findChild("msg").data())); setState(InferiorShutdownFailed); emit inferiorShutdownFailed(msg); } @@ -2096,8 +2093,7 @@ void TrkGdbAdapter::handleExit(const GdbResponse &response) qDebug() << "EXITED, NO MESSAGE..."; // don't set state here, this will be handled in handleGdbFinished() } else if (response.resultClass == GdbResultError) { - QString msg = tr("Gdb process could not be stopped:\n") + - __(response.data.findChild("msg").data()); + const QString msg = msgGdbStopFailed(__(response.data.findChild("msg").data())); emit adapterShutdownFailed(msg); } } diff --git a/src/plugins/find/searchresultwindow.cpp b/src/plugins/find/searchresultwindow.cpp index a995dfc5b7bbb17c018851f00878c0f1f1cdd813..c60e2d6c9ee1e283c20d8603cb24413a6cab5e5b 100644 --- a/src/plugins/find/searchresultwindow.cpp +++ b/src/plugins/find/searchresultwindow.cpp @@ -78,7 +78,7 @@ SearchResultWindow::SearchResultWindow() m_replaceLabel->setContentsMargins(12, 0, 5, 0); m_replaceTextEdit = new QLineEdit(m_widget); m_replaceButton = new QToolButton(m_widget); - m_replaceButton->setToolTip(tr("Replace all occurances")); + m_replaceButton->setToolTip(tr("Replace all occurrences")); m_replaceButton->setText(tr("Replace")); m_replaceButton->setToolButtonStyle(Qt::ToolButtonTextOnly); m_replaceButton->setAutoRaise(true); @@ -234,7 +234,7 @@ void SearchResultWindow::setTextEditorFont(const QFont &font) m_searchResultTreeView->setTextEditorFont(font); } -void SearchResultWindow::handleJumpToSearchResult(int index, bool checked) +void SearchResultWindow::handleJumpToSearchResult(int index, bool /* checked */) { QTC_ASSERT(m_currentSearch, return); m_currentSearch->activated(m_items.at(index)); diff --git a/src/plugins/qt4projectmanager/qt4runconfiguration.cpp b/src/plugins/qt4projectmanager/qt4runconfiguration.cpp index 2c4083ad46f9bfe9c4a556374f61beafa4f6e680..4c7a31e13bcbd807795ce877216809bc75c07c7a 100644 --- a/src/plugins/qt4projectmanager/qt4runconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt4runconfiguration.cpp @@ -241,10 +241,10 @@ void Qt4RunConfigurationWidget::updateSummary() { const QString &filename = QFileInfo(m_qt4RunConfiguration->executable()).fileName(); const QString &arguments = ProjectExplorer::Environment::joinArgumentList(m_qt4RunConfiguration->commandLineArguments()); - QString text = tr("Running executable: <b>%1</b> %2 %3").arg( - filename, - arguments, - m_qt4RunConfiguration->runMode() == LocalApplicationRunConfiguration::Console ? tr("(in terminal)") : ""); + const bool terminal = m_qt4RunConfiguration->runMode() == LocalApplicationRunConfiguration::Console; + const QString text = terminal ? + tr("Running executable: <b>%1</b> %2 (in terminal)").arg(filename, arguments) : + tr("Running executable: <b>%1</b> %2").arg(filename, arguments); m_detailsContainer->setSummaryText(text); }