From 119548a0ffadee65fe6798cf4ed249b6cfcaab09 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint <Friedemann.Kleint@digia.com> Date: Thu, 17 Oct 2013 14:52:10 +0200 Subject: [PATCH] Remove most leading/trailing blanks from translated messages. They are a hassle for translators and reviewers alike. Change-Id: I363138212b692cf75fe1605df8af3721315d37e1 Reviewed-by: hjk <hjk121@nokiamail.com> --- src/plugins/android/androiddeployqtstep.cpp | 2 +- src/plugins/android/androiddeploystep.cpp | 2 +- src/plugins/android/androidpackagecreationstep.cpp | 2 +- src/plugins/clearcase/settingspage.cpp | 3 ++- .../cmakeprojectmanager/cmakeopenprojectwizard.cpp | 9 +++++---- .../cmakeprojectmanager/cmakerunconfiguration.cpp | 7 ++++++- src/plugins/coreplugin/basefilewizard.cpp | 12 ++++++------ src/plugins/cppeditor/cppincludehierarchymodel.cpp | 4 ++-- src/plugins/debugger/debuggerdialogs.cpp | 2 +- src/plugins/debugger/debuggerengine.cpp | 4 ++-- src/plugins/debugger/debuggerrunner.cpp | 2 +- src/plugins/debugger/gdb/gdbengine.cpp | 6 +++--- src/plugins/debugger/lldb/lldbengine.cpp | 2 +- src/plugins/debugger/pdb/pdbengine.cpp | 2 +- src/plugins/debugger/qml/qmlengine.cpp | 2 +- src/plugins/debugger/qml/qmlinspectoragent.cpp | 3 ++- src/plugins/debugger/watchdata.cpp | 3 ++- src/plugins/debugger/watchwindow.cpp | 2 +- src/plugins/fakevim/fakevimhandler.cpp | 2 +- src/plugins/git/gerrit/gerritdialog.cpp | 2 +- src/plugins/git/gitclient.cpp | 4 ++-- src/plugins/projectexplorer/copytaskhandler.cpp | 4 ++-- .../projectexplorer/customparserconfigdialog.cpp | 2 +- .../devicesupport/desktopprocesssignaloperation.cpp | 12 +++++++----- src/plugins/projectexplorer/targetsettingspanel.cpp | 2 +- .../qmldesigner/components/debugview/debugview.cpp | 4 ++-- src/plugins/qmlprofiler/qmlprofilereventview.cpp | 2 +- .../qnx/blackberrydebugtokenrequestdialog.cpp | 2 +- .../qnx/blackberrydeviceconfigurationwidget.cpp | 2 +- .../qnx/blackberrydeviceconfigurationwizardpages.cpp | 6 ++++-- src/plugins/qnx/blackberrysetupwizard.cpp | 4 ++-- .../remotelinuxrunconfigurationfactory.cpp | 2 +- .../remotelinux/remotelinuxsignaloperation.cpp | 3 ++- src/plugins/valgrind/memcheck/memcheckrunner.cpp | 4 ++-- .../qtcreatorcrashhandler/crashhandlerdialog.cpp | 2 +- 35 files changed, 71 insertions(+), 57 deletions(-) diff --git a/src/plugins/android/androiddeployqtstep.cpp b/src/plugins/android/androiddeployqtstep.cpp index 405f317ef50..75e39a6f9ec 100644 --- a/src/plugins/android/androiddeployqtstep.cpp +++ b/src/plugins/android/androiddeployqtstep.cpp @@ -336,7 +336,7 @@ void AndroidDeployQtStep::runCommand(const QString &program, const QStringList & QString mainMessage = tr("Packaging Error: Command '%1 %2' failed.") .arg(program).arg(arguments.join(QLatin1String(" "))); if (buildProc.error() != QProcess::UnknownError) - mainMessage += tr(" Reason: %1").arg(buildProc.errorString()); + mainMessage += QLatin1Char(' ') + tr("Reason: %1").arg(buildProc.errorString()); else mainMessage += tr("Exit code: %1").arg(buildProc.exitCode()); emit addOutput(mainMessage, BuildStep::ErrorMessageOutput); diff --git a/src/plugins/android/androiddeploystep.cpp b/src/plugins/android/androiddeploystep.cpp index d8264898d87..dcdb8968ffc 100644 --- a/src/plugins/android/androiddeploystep.cpp +++ b/src/plugins/android/androiddeploystep.cpp @@ -239,7 +239,7 @@ bool AndroidDeployStep::runCommand(QProcess *buildProc, QString mainMessage = tr("Packaging Error: Command '%1 %2' failed.") .arg(program).arg(arguments.join(QLatin1String(" "))); if (buildProc->error() != QProcess::UnknownError) - mainMessage += tr(" Reason: %1").arg(buildProc->errorString()); + mainMessage += QLatin1Char(' ') + tr("Reason: %1").arg(buildProc->errorString()); else mainMessage += tr("Exit code: %1").arg(buildProc->exitCode()); writeOutput(mainMessage, BuildStep::ErrorMessageOutput); diff --git a/src/plugins/android/androidpackagecreationstep.cpp b/src/plugins/android/androidpackagecreationstep.cpp index 285f7b3ee56..6f4a068ea58 100644 --- a/src/plugins/android/androidpackagecreationstep.cpp +++ b/src/plugins/android/androidpackagecreationstep.cpp @@ -803,7 +803,7 @@ bool AndroidPackageCreationStep::runCommand(QProcess *buildProc QString mainMessage = tr("Packaging Error: Command '%1 %2' failed.") .arg(program).arg(arguments.join(QLatin1String(" "))); if (buildProc->error() != QProcess::UnknownError) - mainMessage += tr(" Reason: %1").arg(buildProc->errorString()); + mainMessage += QLatin1Char(' ') + tr("Reason: %1").arg(buildProc->errorString()); else mainMessage += tr("Exit code: %1").arg(buildProc->exitCode()); raiseError(mainMessage); diff --git a/src/plugins/clearcase/settingspage.cpp b/src/plugins/clearcase/settingspage.cpp index 983dac4845f..2dc0ad0019b 100644 --- a/src/plugins/clearcase/settingspage.cpp +++ b/src/plugins/clearcase/settingspage.cpp @@ -86,7 +86,8 @@ void SettingsPageWidget::setSettings(const ClearCaseSettings &s) } else { QString diffWarning = tr("In order to use External diff, 'diff' command needs to be accessible."); if (HostOsInfo::isWindowsHost()) { - diffWarning.append(tr(" DiffUtils is available for free download " + diffWarning += QLatin1Char(' '); + diffWarning.append(tr("DiffUtils is available for free download " "<a href=\"http://gnuwin32.sourceforge.net/packages/diffutils.htm\">here</a>. " "Please extract it to a directory in your PATH.")); } diff --git a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp index a68a919c1d3..f3a49624e9d 100644 --- a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp @@ -455,7 +455,7 @@ ShadowBuildPage::ShadowBuildPage(CMakeOpenProjectWizard *cmakeWizard, bool chang QLabel *label = new QLabel(this); label->setWordWrap(true); if (change) - label->setText(tr("Please enter the directory in which you want to build your project. ")); + label->setText(tr("Please enter the directory in which you want to build your project.") + QLatin1Char(' ')); else label->setText(tr("Please enter the directory in which you want to build your project. " "Qt Creator recommends to not use the source directory for building. " @@ -507,13 +507,14 @@ void ChooseCMakePage::updateErrorText() } else { QString text = tr("Specify the path to the CMake executable. No CMake executable was found in the path."); if (!cmakeExecutable.isEmpty()) { + text += QLatin1Char(' '); QFileInfo fi(cmakeExecutable); if (!fi.exists()) - text += tr(" The CMake executable (%1) does not exist.").arg(cmakeExecutable); + text += tr("The CMake executable (%1) does not exist.").arg(cmakeExecutable); else if (!fi.isExecutable()) - text += tr(" The path %1 is not an executable.").arg(cmakeExecutable); + text += tr("The path %1 is not an executable.").arg(cmakeExecutable); else - text += tr(" The path %1 is not a valid CMake executable.").arg(cmakeExecutable); + text += tr("The path %1 is not a valid CMake executable.").arg(cmakeExecutable); } m_cmakeLabel->setText(text); } diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp index e256fbe4f0c..50e5a4d6afe 100644 --- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp @@ -193,7 +193,12 @@ QString CMakeRunConfiguration::defaultDisplayName() const { if (m_title.isEmpty()) return tr("Run CMake kit"); - return m_title + (m_enabled ? QString() : tr(" (disabled)")); + QString result = m_title; + if (!m_enabled) { + result += QLatin1Char(' '); + result += tr("(disabled)"); + } + return result; } QWidget *CMakeRunConfiguration::createConfigurationWidget() diff --git a/src/plugins/coreplugin/basefilewizard.cpp b/src/plugins/coreplugin/basefilewizard.cpp index bb26839348f..9ba83657a57 100644 --- a/src/plugins/coreplugin/basefilewizard.cpp +++ b/src/plugins/coreplugin/basefilewizard.cpp @@ -407,9 +407,9 @@ BaseFileWizard::OverwriteResult BaseFileWizard::promptOverwrite(GeneratedFiles * QStringList existingFiles; bool oddStuffFound = false; - static const QString readOnlyMsg = tr(" [read only]"); - static const QString directoryMsg = tr(" [folder]"); - static const QString symLinkMsg = tr(" [symbolic link]"); + static const QString readOnlyMsg = tr("[read only]"); + static const QString directoryMsg = tr("[folder]"); + static const QString symLinkMsg = tr("[symbolic link]"); foreach (const GeneratedFile &file, *files) { const QFileInfo fi(file.path()); @@ -432,17 +432,17 @@ BaseFileWizard::OverwriteResult BaseFileWizard::promptOverwrite(GeneratedFiles * do { if (fi.isDir()) { oddStuffFound = true; - fileNamesMsgPart += directoryMsg; + fileNamesMsgPart += QLatin1Char(' ') + directoryMsg; break; } if (fi.isSymLink()) { oddStuffFound = true; - fileNamesMsgPart += symLinkMsg; + fileNamesMsgPart += QLatin1Char(' ') + symLinkMsg; break; } if (!fi.isWritable()) { oddStuffFound = true; - fileNamesMsgPart += readOnlyMsg; + fileNamesMsgPart += QLatin1Char(' ') + readOnlyMsg; } } while (false); } diff --git a/src/plugins/cppeditor/cppincludehierarchymodel.cpp b/src/plugins/cppeditor/cppincludehierarchymodel.cpp index 7b6909f6179..7709bed2d57 100644 --- a/src/plugins/cppeditor/cppincludehierarchymodel.cpp +++ b/src/plugins/cppeditor/cppincludehierarchymodel.cpp @@ -117,11 +117,11 @@ QVariant CppIncludeHierarchyModel::data(const QModelIndex &index, int role) cons if (role == Qt::DisplayRole) { if ((item == m_includesItem && m_includesItem->childCount() == 0) || (item == m_includedByItem && m_includedByItem->childCount() == 0)) { - return QString(item->fileName() + tr(" (none)")); + return QString(item->fileName() + QLatin1Char(' ') + tr("(none)")); } if (item->isCyclic()) - return QString(item->fileName() + tr(" (cyclic)")); + return QString(item->fileName() + QLatin1Char(' ') + tr("(cyclic)")); return item->fileName(); } diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp index 13f292de991..8f80194ce8d 100644 --- a/src/plugins/debugger/debuggerdialogs.cpp +++ b/src/plugins/debugger/debuggerdialogs.cpp @@ -633,7 +633,7 @@ AddressDialog::AddressDialog(QWidget *parent) : setWindowTitle(tr("Select Start Address")); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); QHBoxLayout *hLayout = new QHBoxLayout; - hLayout->addWidget(new QLabel(tr("Enter an address: "))); + hLayout->addWidget(new QLabel(tr("Enter an address:") + QLatin1Char(' '))); hLayout->addWidget(m_lineEdit); QVBoxLayout *vLayout = new QVBoxLayout; vLayout->addLayout(hLayout); diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index 59058769bf4..b473866ac05 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -1676,9 +1676,9 @@ QString DebuggerEngine::msgInterrupted() void DebuggerEngine::showStoppedBySignalMessageBox(QString meaning, QString name) { if (name.isEmpty()) - name = tr(" <Unknown> ", "name"); + name = QLatin1Char(' ') + tr("<Unknown>", "name") + QLatin1Char(' '); if (meaning.isEmpty()) - meaning = tr(" <Unknown> ", "meaning"); + meaning = QLatin1Char(' ') + tr("<Unknown>", "meaning") + QLatin1Char(' '); const QString msg = tr("<p>The inferior stopped because it received a " "signal from the Operating System.<p>" "<table><tr><td>Signal name : </td><td>%1</td></tr>" diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp index 74a1d7efbf8..59c2158dcff 100644 --- a/src/plugins/debugger/debuggerrunner.cpp +++ b/src/plugins/debugger/debuggerrunner.cpp @@ -382,7 +382,7 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu || server.listen(QHostAddress::LocalHostIPv6); if (!canListen) { if (errorMessage) - *errorMessage = DebuggerPlugin::tr("Not enough free ports for QML debugging. "); + *errorMessage = DebuggerPlugin::tr("Not enough free ports for QML debugging.") + QLatin1Char(' '); return sp; } sp.qmlServerAddress = server.serverAddress().toString(); diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 7e8febf779c..f3755adcce2 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -296,7 +296,7 @@ QString GdbEngine::errorMessage(QProcess::ProcessError error) return tr("An error occurred when attempting to read from " "the gdb process. For example, the process may not be running."); default: - return tr("An unknown error in the gdb process occurred. "); + return tr("An unknown error in the gdb process occurred."); } } @@ -338,7 +338,7 @@ static inline QString msgWinException(const QByteArray &data, unsigned *exCodeIn const quint64 address = data.mid(addressPos).trimmed().toULongLong(0, 0); QString rc; QTextStream str(&rc); - str << GdbEngine::tr("An exception was triggered: "); + str << GdbEngine::tr("An exception was triggered:") << ' '; formatWindowsException(exCode, address, 0, 0, 0, str); str << '.'; return rc; @@ -5215,7 +5215,7 @@ void GdbEngine::handleBreakOnQFatal(const GdbResponse &response) void GdbEngine::notifyInferiorSetupFailed(const QString &msg) { - showStatusMessage(tr("Failed to start application: ") + msg); + showStatusMessage(tr("Failed to start application:") + QLatin1Char(' ') + msg); if (state() == EngineSetupFailed) { showMessage(_("INFERIOR START FAILED, BUT ADAPTER DIED ALREADY")); return; // Adapter crashed meanwhile, so this notification is meaningless. diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index 9526e5e6081..f6316631232 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -812,7 +812,7 @@ QString LldbEngine::errorMessage(QProcess::ProcessError error) const return tr("An error occurred when attempting to read from " "the Lldb process. For example, the process may not be running."); default: - return tr("An unknown error in the Lldb process occurred. "); + return tr("An unknown error in the Lldb process occurred.") + QLatin1Char(' '); } } diff --git a/src/plugins/debugger/pdb/pdbengine.cpp b/src/plugins/debugger/pdb/pdbengine.cpp index 702bd1cefa9..71453f46f05 100644 --- a/src/plugins/debugger/pdb/pdbengine.cpp +++ b/src/plugins/debugger/pdb/pdbengine.cpp @@ -596,7 +596,7 @@ QString PdbEngine::errorMessage(QProcess::ProcessError error) const return tr("An error occurred when attempting to read from " "the Pdb process. For example, the process may not be running."); default: - return tr("An unknown error in the Pdb process occurred. "); + return tr("An unknown error in the Pdb process occurred.") + QLatin1Char(' '); } } diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index 89929350c73..4308c42c48c 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -1167,7 +1167,7 @@ void QmlEngine::updateCurrentContext() QmlJS::ConsoleManagerInterface *consoleManager = qmlConsoleManager(); if (consoleManager) - consoleManager->setContext(tr("Context: ").append(context)); + consoleManager->setContext(tr("Context:") + QLatin1Char(' ') + context); } void QmlEngine::appendDebugOutput(QtMsgType type, const QString &message, diff --git a/src/plugins/debugger/qml/qmlinspectoragent.cpp b/src/plugins/debugger/qml/qmlinspectoragent.cpp index 68974bf9d46..c1e4f41b4f4 100644 --- a/src/plugins/debugger/qml/qmlinspectoragent.cpp +++ b/src/plugins/debugger/qml/qmlinspectoragent.cpp @@ -454,7 +454,8 @@ void QmlInspectorAgent::onResult(quint32 queryId, const QVariant &value, } else if (type == "SET_BINDING_R" || type == "RESET_BINDING_R" || type == "SET_METHOD_BODY_R") { - QString msg = QLatin1String(type) + tr("Success: "); + QString msg = QLatin1String(type) + tr("Success:"); + msg += QLatin1Char(' '); msg += value.toBool() ? QLatin1Char('1') : QLatin1Char('0'); if (!value.toBool()) emit automaticUpdateFailed(); diff --git a/src/plugins/debugger/watchdata.cpp b/src/plugins/debugger/watchdata.cpp index 8cad1a3c13c..cead6220a3d 100644 --- a/src/plugins/debugger/watchdata.cpp +++ b/src/plugins/debugger/watchdata.cpp @@ -392,7 +392,8 @@ QString WatchData::toToolTip() const } if (val.size() > 1000) { val.truncate(1000); - val += tr(" ... <cut off>"); + val += QLatin1Char(' '); + val += tr("... <cut off>"); } formatToolTipRow(str, tr("Value"), val); if (address) diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp index 1619cfeb2fc..7539387542f 100644 --- a/src/plugins/debugger/watchwindow.cpp +++ b/src/plugins/debugger/watchwindow.cpp @@ -649,7 +649,7 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev) QString msg = (individualFormat == -1 && typeFormat != -1) ? tr("Use Format for Type (Currently %1)") .arg(alternativeFormats.at(typeFormat)) - : tr("Use Display Format Based on Type "); + : tr("Use Display Format Based on Type") + QLatin1Char(' '); clearIndividualFormatAction = formatMenu.addAction(spacer + msg); clearIndividualFormatAction->setCheckable(true); clearIndividualFormatAction->setChecked(individualFormat == -1); diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index ec71ccc050b..a2fa1f83093 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -5396,7 +5396,7 @@ bool FakeVimHandler::Private::handleExSetCommand(const ExCommand &cmd) if (!error.isEmpty()) showMessage(MessageError, error); } else { - showMessage(MessageError, FakeVimHandler::tr("Unknown option: ") + cmd.args); + showMessage(MessageError, FakeVimHandler::tr("Unknown option:") + QLatin1Char(' ') + cmd.args); } updateMiniBuffer(); updateEditor(); diff --git a/src/plugins/git/gerrit/gerritdialog.cpp b/src/plugins/git/gerrit/gerritdialog.cpp index 27f84d55beb..8859af24e7c 100644 --- a/src/plugins/git/gerrit/gerritdialog.cpp +++ b/src/plugins/git/gerrit/gerritdialog.cpp @@ -101,7 +101,7 @@ GerritDialog::GerritDialog(const QSharedPointer<GerritParameters> &p, , m_filterLineEdit(new Utils::FilterLineEdit) , m_repositoryChooser(new Utils::PathChooser) , m_buttonBox(new QDialogButtonBox(QDialogButtonBox::Close)) - , m_repositoryChooserLabel(new QLabel(tr("Apply in: "), this)) + , m_repositoryChooserLabel(new QLabel(tr("Apply in:") + QLatin1Char(' '), this)) , m_fetchRunning(false) { setWindowTitle(tr("Gerrit %1@%2").arg(p->user, p->host)); diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 70abaa0f6f1..ac047f0ac76 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -2706,7 +2706,7 @@ void GitClient::continuePreviousGitCommand(const QString &workingDirectory, == GitClient::StatusChanged; } if (!hasChanges) - msgBoxText.prepend(tr("No changes found. ")); + msgBoxText.prepend(tr("No changes found.") + QLatin1Char(' ')); QMessageBox msgBox(QMessageBox::Question, msgBoxTitle, msgBoxText, QMessageBox::NoButton, Core::ICore::mainWindow()); if (hasChanges || isRebase) @@ -2747,7 +2747,7 @@ QString GitClient::extendedShowDescription(const QString &workingDirectory, cons if (branchCount > 20) { const int leave = 10; //: Displayed after the untranslated message "Branches: branch1, branch2 'and %n more'" in git show. - moreBranches = tr(" and %n more", 0, branchCount - leave); + moreBranches = QLatin1Char(' ') + tr("and %n more", 0, branchCount - leave); branches.erase(branches.begin() + leave, branches.end()); } if (!branches.isEmpty()) { diff --git a/src/plugins/projectexplorer/copytaskhandler.cpp b/src/plugins/projectexplorer/copytaskhandler.cpp index 58c3f691ad2..1b641a7ce17 100644 --- a/src/plugins/projectexplorer/copytaskhandler.cpp +++ b/src/plugins/projectexplorer/copytaskhandler.cpp @@ -45,11 +45,11 @@ void CopyTaskHandler::handle(const ProjectExplorer::Task &task) switch (task.type) { case Task::Error: //: Task is of type: error - type = tr("error: "); + type = tr("error:") + QLatin1Char(' '); break; case Task::Warning: //: Task is of type: warning - type = tr("warning: "); + type = tr("warning:") + QLatin1Char(' '); break; default: break; diff --git a/src/plugins/projectexplorer/customparserconfigdialog.cpp b/src/plugins/projectexplorer/customparserconfigdialog.cpp index b45c745c8f9..2a6c0f72024 100644 --- a/src/plugins/projectexplorer/customparserconfigdialog.cpp +++ b/src/plugins/projectexplorer/customparserconfigdialog.cpp @@ -147,7 +147,7 @@ void CustomParserConfigDialog::changed() int pos = rx.indexIn(ui->errorMessage->text()); if (rx.isEmpty() || !rx.isValid() || pos < 0) { - QString error = QLatin1String("<font color=\"red\">") + tr("Not applicable: "); + QString error = QLatin1String("<font color=\"red\">") + tr("Not applicable:") + QLatin1Char(' '); if (rx.isEmpty()) error += tr("Pattern is empty."); else if (!rx.isValid()) diff --git a/src/plugins/projectexplorer/devicesupport/desktopprocesssignaloperation.cpp b/src/plugins/projectexplorer/devicesupport/desktopprocesssignaloperation.cpp index c2d736b3f51..719739bce28 100644 --- a/src/plugins/projectexplorer/devicesupport/desktopprocesssignaloperation.cpp +++ b/src/plugins/projectexplorer/devicesupport/desktopprocesssignaloperation.cpp @@ -85,14 +85,16 @@ void DesktopProcessSignalOperation::appendMsgCannotKill(int pid, const QString & { if (!m_errorMessage.isEmpty()) m_errorMessage += QChar::fromLatin1('\n'); - m_errorMessage += tr("Cannot kill process with pid %1: %3 ").arg(pid).arg(why); + m_errorMessage += tr("Cannot kill process with pid %1: %3").arg(pid).arg(why); + m_errorMessage += QLatin1Char(' '); } void DesktopProcessSignalOperation::appendMsgCannotInterrupt(int pid, const QString &why) { if (!m_errorMessage.isEmpty()) m_errorMessage += QChar::fromLatin1('\n'); - m_errorMessage += tr("Cannot interrupt process with pid %1: %3 ").arg(pid).arg(why); + m_errorMessage += tr("Cannot interrupt process with pid %1: %3").arg(pid).arg(why); + m_errorMessage += QLatin1Char(' '); } void DesktopProcessSignalOperation::killProcessSilently(int pid) @@ -165,8 +167,8 @@ GDB 32bit | Api | Api | N/A | Win32 m_specialInterrupt == Win64Interrupt && creatorIs64Bit || m_specialInterrupt == Win32Interrupt && !creatorIs64Bit) { if (!DebugBreakProcess(inferior)) { - appendMsgCannotInterrupt(pid, tr("DebugBreakProcess failed: ") - + Utils::winErrorMessage(GetLastError())); + appendMsgCannotInterrupt(pid, tr("DebugBreakProcess failed:") + + QLatin1Char(' ') + Utils::winErrorMessage(GetLastError())); } } else if (m_specialInterrupt == Win32Interrupt || m_specialInterrupt == Win64Interrupt) { QString executable = QCoreApplication::applicationDirPath(); @@ -189,7 +191,7 @@ GDB 32bit | Api | Api | N/A | Win32 break; default: appendMsgCannotInterrupt(pid, QDir::toNativeSeparators(executable) - + tr(" could not break the process.")); + + QLatin1Char(' ') + tr("could not break the process.")); break; } } diff --git a/src/plugins/projectexplorer/targetsettingspanel.cpp b/src/plugins/projectexplorer/targetsettingspanel.cpp index 504871cb5b6..95a99377a0e 100644 --- a/src/plugins/projectexplorer/targetsettingspanel.cpp +++ b/src/plugins/projectexplorer/targetsettingspanel.cpp @@ -418,7 +418,7 @@ Target *TargetSettingsPanelWidget::cloneTarget(Target *sourceTarget, Kit *k) if (!runconfigurationError.isEmpty()) { if (!error.isEmpty()) error.append(QLatin1Char('\n')); - error += tr("Run configurations ") + error += tr("Run configurations") + QLatin1Char(' ') + runconfigurationError.join(QLatin1String("\n")); } diff --git a/src/plugins/qmldesigner/components/debugview/debugview.cpp b/src/plugins/qmldesigner/components/debugview/debugview.cpp index 2b7823ccbe2..013b4a2f567 100644 --- a/src/plugins/qmldesigner/components/debugview/debugview.cpp +++ b/src/plugins/qmldesigner/components/debugview/debugview.cpp @@ -147,8 +147,8 @@ void DebugView::nodeIdChanged(const ModelNode &node, const QString &newId, const QString string; message.setString(&string); message << node; - message << tr("New Id: ") << newId << lineBreak; - message << tr("Old Id: ") << oldId << lineBreak; + message << tr("New Id:") << ' ' << newId << lineBreak; + message << tr("Old Id:") << ' ' << oldId << lineBreak; log(tr("Node id changed:"), string); } } diff --git a/src/plugins/qmlprofiler/qmlprofilereventview.cpp b/src/plugins/qmlprofiler/qmlprofilereventview.cpp index 01d8504510a..6790478a52a 100644 --- a/src/plugins/qmlprofiler/qmlprofilereventview.cpp +++ b/src/plugins/qmlprofiler/qmlprofilereventview.cpp @@ -524,7 +524,7 @@ void QmlProfilerEventsMainView::parseModelProxy() QString toolTipText; if (event.eventType == Binding) { if (event.bindingType == (int)OptimizedBinding) { - typeString = typeString + tr(" (Opt)"); + typeString = typeString + QLatin1Char(' ') + tr("(Opt)"); toolTipText = tr("Binding is evaluated by the optimized engine."); } else if (event.bindingType == (int)V8Binding) { toolTipText = tr("Binding not optimized (e.g. has side effects or assignments,\n" diff --git a/src/plugins/qnx/blackberrydebugtokenrequestdialog.cpp b/src/plugins/qnx/blackberrydebugtokenrequestdialog.cpp index d4011d246b6..37d8a199e26 100644 --- a/src/plugins/qnx/blackberrydebugtokenrequestdialog.cpp +++ b/src/plugins/qnx/blackberrydebugtokenrequestdialog.cpp @@ -191,7 +191,7 @@ void BlackBerryDebugTokenRequestDialog::expandPath() void BlackBerryDebugTokenRequestDialog::debugTokenArrived(int status) { - QString errorString = tr("Failed to request debug token: "); + QString errorString = tr("Failed to request debug token:") + QLatin1Char(' '); switch (status) { case BlackBerryDebugTokenRequester::Success: diff --git a/src/plugins/qnx/blackberrydeviceconfigurationwidget.cpp b/src/plugins/qnx/blackberrydeviceconfigurationwidget.cpp index 76c02a33031..cb762f41de0 100644 --- a/src/plugins/qnx/blackberrydeviceconfigurationwidget.cpp +++ b/src/plugins/qnx/blackberrydeviceconfigurationwidget.cpp @@ -165,7 +165,7 @@ void BlackBerryDeviceConfigurationWidget::uploadFinished(int status) { progressDialog->hide(); - QString errorString = tr("Failed to upload debug token: "); + QString errorString = tr("Failed to upload debug token:") + QLatin1Char(' '); switch (status) { case BlackBerryDebugTokenUploader::Success: diff --git a/src/plugins/qnx/blackberrydeviceconfigurationwizardpages.cpp b/src/plugins/qnx/blackberrydeviceconfigurationwizardpages.cpp index 342a2bd93f3..96b4c48687c 100644 --- a/src/plugins/qnx/blackberrydeviceconfigurationwizardpages.cpp +++ b/src/plugins/qnx/blackberrydeviceconfigurationwizardpages.cpp @@ -290,7 +290,8 @@ void BlackBerryDeviceConfigurationWizardQueryPage::sshKeysGenerationFailed(const if (m_state != GeneratingSshKey) return; - QString message = tr("Failed generating SSH key needed for securing connection to a device. Error: "); + QString message = tr("Failed generating SSH key needed for securing connection to a device. Error:"); + message += QLatin1Char(' '); message.append(error); setState(Done, message); } @@ -310,7 +311,8 @@ void BlackBerryDeviceConfigurationWizardQueryPage::processSshKeys(const QByteArr if (! BlackBerryDeviceConnectionManager::instance()->hasValidSSHKeys()) { QString error; if (!BlackBerryDeviceConnectionManager::instance()->setSSHKeys(privateKey, publicKey, &error)) { - QString message = tr("Failed saving SSH key needed for securing connection to a device. Error: "); + QString message = tr("Failed saving SSH key needed for securing connection to a device. Error:"); + message += QLatin1Char(' '); message.append(error); setState(Done, message); return; diff --git a/src/plugins/qnx/blackberrysetupwizard.cpp b/src/plugins/qnx/blackberrysetupwizard.cpp index 43cc73a7c04..e5214b0a0f3 100644 --- a/src/plugins/qnx/blackberrysetupwizard.cpp +++ b/src/plugins/qnx/blackberrysetupwizard.cpp @@ -176,7 +176,7 @@ void BlackBerrySetupWizard::certificateCreated(int status) void BlackBerrySetupWizard::debugTokenArrived(int status) { - QString errorString = tr("Failed to request debug token: "); + QString errorString = tr("Failed to request debug token:") + QLatin1Char(' '); switch (status) { case BlackBerryDebugTokenRequester::Success: @@ -222,7 +222,7 @@ void BlackBerrySetupWizard::debugTokenArrived(int status) void BlackBerrySetupWizard::uploaderFinished(int status) { - QString errorString = tr("Failed to upload debug token: "); + QString errorString = tr("Failed to upload debug token:") + QLatin1Char(' '); switch (status) { case BlackBerryDebugTokenUploader::Success: diff --git a/src/plugins/remotelinux/remotelinuxrunconfigurationfactory.cpp b/src/plugins/remotelinux/remotelinuxrunconfigurationfactory.cpp index 015a2ea6d05..a4b26fef313 100644 --- a/src/plugins/remotelinux/remotelinuxrunconfigurationfactory.cpp +++ b/src/plugins/remotelinux/remotelinuxrunconfigurationfactory.cpp @@ -102,7 +102,7 @@ QList<Core::Id> RemoteLinuxRunConfigurationFactory::availableCreationIds(Target QString RemoteLinuxRunConfigurationFactory::displayNameForId(const Core::Id id) const { return QFileInfo(pathFromId(id)).completeBaseName() - + tr(" (on Remote Generic Linux Host)"); + + QLatin1Char(' ') + tr("(on Remote Generic Linux Host)"); } RunConfiguration *RemoteLinuxRunConfigurationFactory::doCreate(Target *parent, const Core::Id id) diff --git a/src/plugins/remotelinux/remotelinuxsignaloperation.cpp b/src/plugins/remotelinux/remotelinuxsignaloperation.cpp index bdfb67a787e..e3f96e27131 100644 --- a/src/plugins/remotelinux/remotelinuxsignaloperation.cpp +++ b/src/plugins/remotelinux/remotelinuxsignaloperation.cpp @@ -120,7 +120,8 @@ void RemoteLinuxSignalOperation::runnerProcessFinished() if (m_runner->processExitStatus() != QSsh::SshRemoteProcess::NormalExit) { m_errorMessage = m_runner->processErrorString(); } else if (m_runner->processExitCode() != 0) { - m_errorMessage = tr("Exit code is %1. stderr: ").arg(m_runner->processExitCode()) + m_errorMessage = tr("Exit code is %1. stderr:").arg(m_runner->processExitCode()) + + QLatin1Char(' ') + QString::fromLatin1(m_runner->readAllStandardError()); } finish(); diff --git a/src/plugins/valgrind/memcheck/memcheckrunner.cpp b/src/plugins/valgrind/memcheck/memcheckrunner.cpp index 6827f6b47d7..91033203f6d 100644 --- a/src/plugins/valgrind/memcheck/memcheckrunner.cpp +++ b/src/plugins/valgrind/memcheck/memcheckrunner.cpp @@ -168,14 +168,14 @@ bool MemcheckRunner::start() } bool check = d->xmlServer.listen(hostAddr); - if (!check) emit processErrorReceived( tr("XmlServer on %1: ").arg(ip) + d->xmlServer.errorString(), QProcess::FailedToStart ); + if (!check) emit processErrorReceived( tr("XmlServer on %1:").arg(ip) + QLatin1Char(' ') + d->xmlServer.errorString(), QProcess::FailedToStart ); QTC_ASSERT(check, return false); d->xmlServer.setMaxPendingConnections(1); const quint16 xmlPortNumber = d->xmlServer.serverPort(); connect(&d->xmlServer, SIGNAL(newConnection()), SLOT(xmlSocketConnected())); check = d->logServer.listen(hostAddr); - if (!check) emit processErrorReceived( tr("LogServer on %1: ").arg(ip) + d->logServer.errorString(), QProcess::FailedToStart ); + if (!check) emit processErrorReceived( tr("LogServer on %1:").arg(ip) + QLatin1Char(' ') + d->logServer.errorString(), QProcess::FailedToStart ); QTC_ASSERT(check, return false); d->logServer.setMaxPendingConnections(1); const quint16 logPortNumber = d->logServer.serverPort(); diff --git a/src/tools/qtcreatorcrashhandler/crashhandlerdialog.cpp b/src/tools/qtcreatorcrashhandler/crashhandlerdialog.cpp index 90b131f3139..f95755bbdd2 100644 --- a/src/tools/qtcreatorcrashhandler/crashhandlerdialog.cpp +++ b/src/tools/qtcreatorcrashhandler/crashhandlerdialog.cpp @@ -134,7 +134,7 @@ void CrashHandlerDialog::setApplicationInfo(const QString &signalName) QString revision; #ifdef IDE_REVISION - revision = tr(" from revision %1").arg(QString::fromLatin1(Core::Constants::IDE_REVISION_STR).left(10)); + revision = QLatin1Char(' ') + tr("from revision %1").arg(QString::fromLatin1(Core::Constants::IDE_REVISION_STR).left(10)); #endif const QString versionInformation = tr( "%1 %2%3, built on %4 at %5, based on Qt %6 (%7 bit)\n") -- GitLab