Commit 50f522b2 authored by Friedemann Kleint's avatar Friedemann Kleint

Remove most trailing newlines from translated messages.

They are a hassle for translators and reviewers alike.

Change-Id: I07c1b61e8b6719e54fdc1f69cf63f573119a6776
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 10f42df8
......@@ -1079,11 +1079,13 @@ bool PluginManagerPrivate::loadQueue(PluginSpec *spec, QList<PluginSpec *> &queu
// check for circular dependencies
if (circularityCheckQueue.contains(spec)) {
spec->d->hasError = true;
spec->d->errorString = PluginManager::tr("Circular dependency detected:\n");
spec->d->errorString = PluginManager::tr("Circular dependency detected:");
spec->d->errorString += QLatin1Char('\n');
int index = circularityCheckQueue.indexOf(spec);
for (int i = index; i < circularityCheckQueue.size(); ++i) {
spec->d->errorString.append(PluginManager::tr("%1(%2) depends on\n")
spec->d->errorString.append(PluginManager::tr("%1(%2) depends on")
.arg(circularityCheckQueue.at(i)->name()).arg(circularityCheckQueue.at(i)->version()));
spec->d->errorString += QLatin1Char('\n');
}
spec->d->errorString.append(PluginManager::tr("%1(%2)").arg(spec->name()).arg(spec->version()));
return false;
......
......@@ -126,9 +126,8 @@ public:
if (logger) {
QByteArray logBA = oldLog.readAll();
logger->appendError(ErrorMessage::NoteLevel,
ZConfLib::tr("%1: log of previous daemon run is: '%2'.\n")
.arg(name())
.arg(QString::fromLatin1(logBA.constData(), logBA.size())));
ZConfLib::tr("%1: log of previous daemon run is: '%2'.")
.arg(name(), QString::fromLatin1(logBA.constData(), logBA.size())) + QLatin1Char('\n'));
qDebug()<<logBA.size()<<oldLog.error()<<oldLog.errorString();
}
oldLog.close();
......
......@@ -195,29 +195,33 @@ void ReadOnlyFilesDialog::promptFailWarning(const QStringList &files, ReadOnlyRe
if (IVersionControl *vc = d->versionControls[file]) {
const QString openText = vc->vcsOpenText().remove(QLatin1Char('&'));
title = tr("Failed to %1 File").arg(openText);
message = tr("%1 file %2 from version control system %3 failed.\n")
message = tr("%1 file %2 from version control system %3 failed.")
.arg(openText)
.arg(QDir::toNativeSeparators(file))
.arg(vc->displayName());
message += QLatin1Char('\n');
message += d->failWarning;
} else {
title = tr("No Version Control System Found");
message = tr("Cannot open file %1 from version control system.\n"
"No version control system found.\n")
"No version control system found.")
.arg(QDir::toNativeSeparators(file));
message += QLatin1Char('\n');
message += d->failWarning;
}
break;
}
case RO_MakeWritable:
title = tr("Cannot Set Permissions");
message = tr("Cannot set permissions for %1 to writable.\n")
message = tr("Cannot set permissions for %1 to writable.")
.arg(QDir::toNativeSeparators(file));
message += QLatin1Char('\n');
message += d->failWarning;
break;
case RO_SaveAs:
title = tr("Cannot Save File");
message = tr("Cannot save file %1\n").arg(QDir::toNativeSeparators(file));
message = tr("Cannot save file %1").arg(QDir::toNativeSeparators(file));
message += QLatin1Char('\n');
message += d->failWarning;
break;
default:
......@@ -240,6 +244,7 @@ void ReadOnlyFilesDialog::promptFailWarning(const QStringList &files, ReadOnlyRe
* Executes the ReadOnlyFilesDialog dialog.
* Returns ReadOnlyResult to provide information about the operation that was
* used to make the files writable.
*
* \internal
*
* Also displays an error dialog when some operations cannot be executed and the
......
......@@ -561,9 +561,10 @@ bool ExternalToolRunner::resolve()
if (m_resolvedExecutable.isEmpty()) {
m_hasError = true;
for (int i = 0; i < expandedExecutables.size(); ++i) {
m_errorString += tr("Could not find executable for '%1' (expanded '%2')\n")
m_errorString += tr("Could not find executable for '%1' (expanded '%2')")
.arg(m_tool->executables().at(i))
.arg(expandedExecutables.at(i));
m_errorString += QLatin1Char('\n');
}
if (!m_errorString.isEmpty())
m_errorString.chop(1);
......
......@@ -264,7 +264,7 @@ void OutputWindow::appendText(const QString &textIn, const QTextCharFormat &form
if (m_maxLineCount > 0 && document()->blockCount() >= m_maxLineCount) {
QTextCharFormat tmp;
tmp.setFontWeight(QFont::Bold);
cursor.insertText(doNewlineEnforcement(tr("Additional output omitted\n")), tmp);
cursor.insertText(doNewlineEnforcement(tr("Additional output omitted") + QLatin1Char('\n')), tmp);
}
cursor.endEditBlock();
......
......@@ -404,8 +404,8 @@ QString VcsManager::msgAddToVcsFailedTitle()
QString VcsManager::msgToAddToVcsFailed(const QStringList &files, const IVersionControl *vc)
{
return files.size() == 1
? tr("Could not add the file\n%1\nto version control (%2)\n")
.arg(files.front(), vc->displayName())
? tr("Could not add the file\n%1\nto version control (%2)")
.arg(files.front(), vc->displayName()) + QLatin1Char('\n')
: tr("Could not add the following files to version control (%1)\n%2")
.arg(vc->displayName(), files.join(QString(QLatin1Char('\n'))));
}
......
......@@ -1810,7 +1810,8 @@ void DebuggerEngine::checkForReleaseBuild(const DebuggerStartParameters &sp)
}
showMessageBox(QMessageBox::Information, tr("Warning"),
tr("This does not seem to be a \"Debug\" build.\n"
"Setting breakpoints by file name and line number may fail.\n").append(detailedWarning));
"Setting breakpoints by file name and line number may fail.")
+ QLatin1Char('\n') + detailedWarning);
}
} // namespace Debugger
......
......@@ -192,7 +192,7 @@ void DebuggerRunControl::start()
// User canceled input dialog asking for executable when working on library project.
if (d->m_engine->startParameters().startMode == StartInternal
&& d->m_engine->startParameters().executable.isEmpty()) {
appendMessage(tr("No executable specified.\n"), ErrorMessageFormat);
appendMessage(tr("No executable specified.") + QLatin1Char('\n'), ErrorMessageFormat);
emit started();
emit finished();
return;
......@@ -232,12 +232,12 @@ void DebuggerRunControl::start()
d->m_engine->startDebugger(this);
if (d->m_running)
appendMessage(tr("Debugging starts\n"), NormalMessageFormat);
appendMessage(tr("Debugging starts") + QLatin1Char('\n'), NormalMessageFormat);
}
void DebuggerRunControl::startFailed()
{
appendMessage(tr("Debugging has failed\n"), NormalMessageFormat);
appendMessage(tr("Debugging has failed") + QLatin1Char('\n'), NormalMessageFormat);
d->m_running = false;
emit finished();
d->m_engine->handleStartFailed();
......@@ -245,7 +245,7 @@ void DebuggerRunControl::startFailed()
void DebuggerRunControl::handleFinished()
{
appendMessage(tr("Debugging has finished\n"), NormalMessageFormat);
appendMessage(tr("Debugging has finished") + QLatin1Char('\n'), NormalMessageFormat);
if (d->m_engine)
d->m_engine->handleFinished();
debuggerCore()->runControlFinished(d->m_engine);
......
......@@ -211,8 +211,9 @@ void GdbCoreEngine::handleTargetCore(const GdbResponse &response)
postCommand("p 5", CB(handleRoundTrip));
return;
}
QString msg = tr("Attach to core \"%1\" failed:\n")
QString msg = tr("Attach to core \"%1\" failed:")
.arg(startParameters().coreFile)
+ QLatin1Char('\n')
+ QString::fromLocal8Bit(response.data["msg"].data());
notifyInferiorSetupFailed(msg);
}
......
......@@ -1893,7 +1893,7 @@ void GdbEngine::pythonDumpersFailed()
void GdbEngine::showExecutionError(const QString &message)
{
showMessageBox(QMessageBox::Critical, tr("Execution Error"),
tr("Cannot continue debugged process:\n") + message);
tr("Cannot continue debugged process:") + QLatin1Char('\n') + message);
}
void GdbEngine::handleExecuteContinue(const GdbResponse &response)
......@@ -2296,7 +2296,7 @@ void GdbEngine::handleExecuteNext(const GdbResponse &response)
notifyInferiorRunFailed();
} else {
showMessageBox(QMessageBox::Critical, tr("Execution Error"),
tr("Cannot continue debugged process:\n") + QString::fromLocal8Bit(msg));
tr("Cannot continue debugged process:") + QLatin1Char('\n') + QString::fromLocal8Bit(msg));
notifyInferiorIll();
}
}
......@@ -3848,7 +3848,7 @@ void GdbEngine::handleMakeSnapshot(const GdbResponse &response)
} else {
QByteArray msg = response.data["msg"].data();
showMessageBox(QMessageBox::Critical, tr("Snapshot Creation Error"),
tr("Cannot create snapshot:\n") + QString::fromLocal8Bit(msg));
tr("Cannot create snapshot:") + QLatin1Char('\n') + QString::fromLocal8Bit(msg));
}
}
......
......@@ -78,7 +78,7 @@ void GdbPlainEngine::handleFileExecAndSymbols(const GdbResponse &response)
QString msg = fromLocalEncoding(ba);
// Extend the message a bit in unknown cases.
if (!ba.endsWith("File format not recognized"))
msg = tr("Starting executable failed:\n") + msg;
msg = tr("Starting executable failed:") + QLatin1Char('\n') + msg;
notifyInferiorSetupFailed(msg);
}
}
......
......@@ -252,7 +252,8 @@ void GdbRemoteServerEngine::handleFileExecAndSymbols(const GdbResponse &response
callTargetRemote();
} else {
QByteArray reason = response.data["msg"].data();
QString msg = tr("Reading debug information failed:\n");
QString msg = tr("Reading debug information failed:");
msg += QLatin1Char('\n');
msg += QString::fromLocal8Bit(reason);
if (reason.endsWith("No such file or directory.")) {
showMessage(_("INFERIOR STARTUP: BINARY NOT FOUND"));
......
......@@ -141,7 +141,7 @@ void QmlAdapter::connectionStateChanged()
switch (m_conn->state()) {
case QAbstractSocket::UnconnectedState:
{
showConnectionStatusMessage(tr("Disconnected.\n\n"));
showConnectionStatusMessage(tr("Disconnected.") + QLatin1String("\n\n"));
emit disconnected();
break;
......@@ -154,7 +154,7 @@ void QmlAdapter::connectionStateChanged()
break;
case QAbstractSocket::ConnectedState:
{
showConnectionStatusMessage(tr("Connected.\n"));
showConnectionStatusMessage(tr("Connected.") + QLatin1Char('\n'));
m_connectionTimer.stop();
......
......@@ -3027,9 +3027,9 @@ bool GitClient::getCommitData(const QString &workingDirectory,
static inline QString msgCommitted(const QString &amendSHA1, int fileCount)
{
if (amendSHA1.isEmpty())
return GitClient::tr("Committed %n file(s).\n", 0, fileCount);
return GitClient::tr("Committed %n file(s).", 0, fileCount) + QLatin1Char('\n');
if (fileCount)
return GitClient::tr("Amended \"%1\" (%n file(s)).\n", 0, fileCount).arg(amendSHA1);
return GitClient::tr("Amended \"%1\" (%n file(s)).", 0, fileCount).arg(amendSHA1) + QLatin1Char('\n');
return GitClient::tr("Amended \"%1\".").arg(amendSHA1);
}
......
......@@ -64,7 +64,7 @@ void IosRunControl::start()
SLOT(handleRemoteOutput(QString)));
connect(m_runner, SIGNAL(finished(bool)),
SLOT(handleRemoteProcessFinished(bool)));
appendMessage(tr("Starting remote process.\n"), Utils::NormalMessageFormat);
appendMessage(tr("Starting remote process.") + QLatin1Char('\n'), Utils::NormalMessageFormat);
m_runner->start();
}
......
......@@ -285,7 +285,7 @@ void ApplicationLauncher::bringToForeground()
QString ApplicationLauncher::msgWinCannotRetrieveDebuggingOutput()
{
return tr("Cannot retrieve debugging output.\n");
return tr("Cannot retrieve debugging output.") + QLatin1Char('\n');
}
} // namespace ProjectExplorer
......@@ -98,15 +98,15 @@ void LocalApplicationRunControl::start()
{
emit started();
if (m_executable.isEmpty()) {
appendMessage(tr("No executable specified.\n"), Utils::ErrorMessageFormat);
appendMessage(tr("No executable specified.") + QLatin1Char('\n'), Utils::ErrorMessageFormat);
emit finished();
} else if (!QFileInfo(m_executable).exists()){
appendMessage(tr("Executable %1 does not exist.\n").arg(m_executable),
appendMessage(tr("Executable %1 does not exist.").arg(m_executable) + QLatin1Char('\n'),
Utils::ErrorMessageFormat);
emit finished();
} else {
m_running = true;
QString msg = tr("Starting %1...\n").arg(QDir::toNativeSeparators(m_executable));
QString msg = tr("Starting %1...").arg(QDir::toNativeSeparators(m_executable)) + QLatin1Char('\n');
appendMessage(msg, Utils::NormalMessageFormat);
m_applicationLauncher.start(m_runMode, m_executable, m_commandLineArguments);
setApplicationProcessHandle(ProcessHandle(m_applicationLauncher.applicationPID()));
......@@ -147,13 +147,13 @@ void LocalApplicationRunControl::processExited(int exitCode, QProcess::ExitStatu
setApplicationProcessHandle(ProcessHandle());
QString msg;
if (status == QProcess::CrashExit) {
msg = tr("%1 crashed\n")
msg = tr("%1 crashed")
.arg(QDir::toNativeSeparators(m_executable));
} else {
msg = tr("%1 exited with code %2\n")
msg = tr("%1 exited with code %2")
.arg(QDir::toNativeSeparators(m_executable)).arg(exitCode);
}
appendMessage(msg, Utils::NormalMessageFormat);
appendMessage(msg + QLatin1Char('\n'), Utils::NormalMessageFormat);
emit finished();
}
......
......@@ -1985,8 +1985,8 @@ int ProjectExplorerPlugin::queue(QList<Project *> projects, QList<Id> stepIds)
foreach (Project *pro, projects)
if (pro && pro->needsConfiguration())
preambleMessage.append(tr("The project %1 is not configured, skipping it.\n")
.arg(pro->displayName()));
preambleMessage.append(tr("The project %1 is not configured, skipping it.")
.arg(pro->displayName()) + QLatin1Char('\n'));
foreach (Id id, stepIds) {
foreach (Project *pro, projects) {
if (!pro || !pro->activeTarget())
......@@ -2204,9 +2204,10 @@ QPair<bool, QString> ProjectExplorerPlugin::buildSettingsEnabledForSession()
&& project->activeTarget()->activeBuildConfiguration()
&& !project->activeTarget()->activeBuildConfiguration()->isEnabled()) {
result.first = false;
result.second += tr("Building '%1' is disabled: %2\n")
result.second += tr("Building '%1' is disabled: %2")
.arg(project->displayName(),
project->activeTarget()->activeBuildConfiguration()->disabledReason());
result.second += QLatin1Char('\n');
}
}
}
......@@ -2788,7 +2789,8 @@ void ProjectExplorerPlugin::addExistingFiles(ProjectNode *projectNode, const QSt
projectNode->addFiles(fileNames, &notAdded);
if (!notAdded.isEmpty()) {
QString message = tr("Could not add following files to project %1:\n").arg(projectNode->displayName());
QString message = tr("Could not add following files to project %1:").arg(projectNode->displayName());
message += QLatin1Char('\n');
QString files = notAdded.join(QString(QLatin1Char('\n')));
QMessageBox::warning(ICore::mainWindow(), tr("Adding Files to Project Failed"),
message + files);
......
......@@ -303,7 +303,8 @@ void ProjectFileWizardExtension::firstExtensionPageShown(
// <Implicitly Add>
m_context->page->setNoneLabel(tr("<Implicitly Add>"));
QString text = tr("The files are implicitly added to the projects:\n");
QString text = tr("The files are implicitly added to the projects:");
text += QLatin1Char('\n');
foreach (const ProjectEntry &project, deployingProjects) {
text += project.fileName;
text += QLatin1Char('\n');
......
......@@ -403,13 +403,15 @@ Target *TargetSettingsPanelWidget::cloneTarget(Target *sourceTarget, Kit *k)
QString error;
if (!buildconfigurationError.isEmpty())
error += tr("Build configurations:\n")
error += tr("Build configurations:")
+ QLatin1Char('\n')
+ buildconfigurationError.join(QLatin1String("\n"));
if (!deployconfigurationError.isEmpty()) {
if (!error.isEmpty())
error.append(QLatin1Char('\n'));
error += tr("Deploy configurations:\n")
error += tr("Deploy configurations:")
+ QLatin1Char('\n')
+ deployconfigurationError.join(QLatin1String("\n"));
}
......
......@@ -132,10 +132,11 @@ public:
innerIds.remove(id);
QString comment = tr("// TODO: Move position bindings from the component to the Loader.\n"
"// Check all uses of 'parent' inside the root element of the component.\n");
"// Check all uses of 'parent' inside the root element of the component.")
+ QLatin1Char('\n');
if (idBinding) {
comment += tr("// Rename all outer uses of the id '%1' to '%2.item'.\n").arg(
id, loaderId);
comment += tr("// Rename all outer uses of the id '%1' to '%2.item'.").arg(
id, loaderId) + QLatin1Char('\n');
}
// handle inner ids
......
......@@ -233,8 +233,8 @@ static QString noTypeinfoError(const QString &libraryPath)
static QString qmldumpErrorMessage(const QString &libraryPath, const QString &error)
{
return noTypeinfoError(libraryPath) + QLatin1String("\n\n") +
PluginDumper::tr("Automatic type dump of QML module failed.\nErrors:\n%1\n").
arg(error);
PluginDumper::tr("Automatic type dump of QML module failed.\nErrors:\n%1").
arg(error) + QLatin1Char('\n');
}
static QString qmldumpFailedMessage(const QString &libraryPath, const QString &error)
......
......@@ -385,9 +385,9 @@ void BlackBerryInstallWizardProcessPage::initializePage()
}
}
m_ui->label->setText(tr("Uninstalling target:\n") + m_data.target);
m_ui->label->setText(tr("Uninstalling target:") + QLatin1Char('\n') + m_data.target);
} else {
m_ui->label->setText(tr("Installing target:\n") + m_data.target);
m_ui->label->setText(tr("Installing target:") + QLatin1Char('\n') + m_data.target);
}
// m_targetProcess could be running
if (m_targetProcess->state() == QProcess::Running) {
......
......@@ -54,10 +54,10 @@ bool ImportLogConverter::convertFile(Core::GeneratedFile &file, QString &errorMe
Q_UNUSED(errorMessage);
QString content;
content += QLatin1String("========================================================\n");
content += tr("Generated by cascades importer ver: %1, %2\n")
content += tr("Generated by cascades importer ver: %1, %2")
.arg(QLatin1String(Qnx::Constants::QNX_BLACKBERRY_CASCADESIMPORTER_VERSION))
.arg(QDateTime::currentDateTime().toString(Qt::ISODate));
content += QLatin1String("========================================================\n\n");
content += QLatin1String("\n========================================================\n\n");
content += convertedProjectContext().importLog().toString();
file.setContents(content);
file.setAttributes(file.attributes() | Core::GeneratedFile::OpenEditorAttribute);
......
......@@ -65,7 +65,7 @@ void QnxAnalyzeSupport::handleAdapterSetupRequested()
{
QTC_ASSERT(state() == Inactive, return);
showMessage(tr("Preparing remote side...\n"), Utils::NormalMessageFormat);
showMessage(tr("Preparing remote side...") + QLatin1Char('\n'), Utils::NormalMessageFormat);
QnxAbstractRunSupport::handleAdapterSetupRequested();
}
......
......@@ -73,7 +73,7 @@ void QnxDebugSupport::handleAdapterSetupRequested()
QTC_ASSERT(state() == Inactive, return);
if (m_engine)
m_engine->showMessage(tr("Preparing remote side...\n"), Debugger::AppStuff);
m_engine->showMessage(tr("Preparing remote side...") + QLatin1Char('\n'), Debugger::AppStuff);
QnxAbstractRunSupport::handleAdapterSetupRequested();
}
......
......@@ -117,13 +117,13 @@ void QnxDeviceTester::handleProcessFinished(int exitStatus)
const QString command = m_commandsToTest[m_currentCommandIndex];
if (exitStatus == QSsh::SshRemoteProcess::NormalExit) {
if (m_processRunner->processExitCode() == 0) {
emit progressMessage(tr("%1 found.\n").arg(command));
emit progressMessage(tr("%1 found.").arg(command) + QLatin1Char('\n'));
} else {
emit errorMessage(tr("%1 not found.\n").arg(command));
emit errorMessage(tr("%1 not found.").arg(command) + QLatin1Char('\n'));
m_result = TestFailure;
}
} else {
emit errorMessage(tr("An error occurred checking for %1.\n").arg(command));
emit errorMessage(tr("An error occurred checking for %1.").arg(command) + QLatin1Char('\n'));
m_result = TestFailure;
}
testNextCommand();
......@@ -134,7 +134,7 @@ void QnxDeviceTester::handleConnectionError()
QTC_ASSERT(m_state == CommandsTest, return);
m_result = TestFailure;
emit errorMessage(tr("SSH connection error: %1\n").arg(m_processRunner->lastConnectionErrorString()));
emit errorMessage(tr("SSH connection error: %1").arg(m_processRunner->lastConnectionErrorString()) + QLatin1Char('\n'));
setFinished();
}
......
......@@ -128,7 +128,7 @@ void GenericLinuxDeviceTester::handleConnectionFailure()
{
QTC_ASSERT(d->state != Inactive, return);
emit errorMessage(tr("SSH connection failure: %1\n").arg(d->connection->errorString()));
emit errorMessage(tr("SSH connection failure: %1").arg(d->connection->errorString()) + QLatin1Char('\n'));
setFinished(TestFailure);
}
......@@ -139,9 +139,9 @@ void GenericLinuxDeviceTester::handleProcessFinished(int exitStatus)
if (exitStatus != SshRemoteProcess::NormalExit || d->process->exitCode() != 0) {
const QByteArray stderrOutput = d->process->readAllStandardError();
if (!stderrOutput.isEmpty())
emit errorMessage(tr("uname failed: %1\n").arg(QString::fromUtf8(stderrOutput)));
emit errorMessage(tr("uname failed: %1").arg(QString::fromUtf8(stderrOutput)) + QLatin1Char('\n'));
else
emit errorMessage(tr("uname failed.\n"));
emit errorMessage(tr("uname failed.") + QLatin1Char('\n'));
} else {
emit progressMessage(QString::fromUtf8(d->process->readAllStandardOutput()));
}
......@@ -158,7 +158,7 @@ void GenericLinuxDeviceTester::handlePortsGatheringError(const QString &message)
{
QTC_ASSERT(d->state == TestingPorts, return);
emit errorMessage(tr("Error gathering ports: %1\n").arg(message));
emit errorMessage(tr("Error gathering ports: %1").arg(message) + QLatin1Char('\n'));
setFinished(TestFailure);
}
......@@ -167,14 +167,14 @@ void GenericLinuxDeviceTester::handlePortListReady()
QTC_ASSERT(d->state == TestingPorts, return);
if (d->portsGatherer.usedPorts().isEmpty()) {
emit progressMessage(tr("All specified ports are available.\n"));
emit progressMessage(tr("All specified ports are available.") + QLatin1Char('\n'));
} else {
QString portList;
foreach (const int port, d->portsGatherer.usedPorts())
portList += QString::number(port) + QLatin1String(", ");
portList.remove(portList.count() - 2, 2);
emit errorMessage(tr("The following specified ports are currently in use: %1\n")
.arg(portList));
emit errorMessage(tr("The following specified ports are currently in use: %1")
.arg(portList) + QLatin1Char('\n'));
}
setFinished(TestSuccess);
}
......
......@@ -115,7 +115,7 @@ void RemoteLinuxAnalyzeSupport::handleRemoteSetupRequested()
{
QTC_ASSERT(state() == Inactive, return);
showMessage(tr("Checking available ports...\n"), Utils::NormalMessageFormat);
showMessage(tr("Checking available ports...") + QLatin1Char('\n'), Utils::NormalMessageFormat);
AbstractRemoteLinuxRunSupport::handleRemoteSetupRequested();
}
......
......@@ -141,7 +141,7 @@ void LinuxDeviceDebugSupport::handleRemoteSetupRequested()
{
QTC_ASSERT(state() == Inactive, return);
showMessage(tr("Checking available ports...\n"), LogStatus);
showMessage(tr("Checking available ports...") + QLatin1Char('\n'), LogStatus);
AbstractRemoteLinuxRunSupport::handleRemoteSetupRequested();
}
......
......@@ -100,7 +100,7 @@ Valgrind::ValgrindRunner * CallgrindRunControl::runner()
bool CallgrindRunControl::startEngine()
{
appendMessage(tr("Profiling %1\n").arg(executable()), Utils::NormalMessageFormat);
appendMessage(tr("Profiling %1").arg(executable()) + QLatin1Char('\n'), Utils::NormalMessageFormat);
return ValgrindRunControl::startEngine();
}
......
......@@ -80,7 +80,7 @@ bool MemcheckRunControl::startEngine()
// Clear about-to-be-outdated tasks.
TaskHub::clearTasks(Analyzer::Constants::ANALYZERTASK_ID);
appendMessage(tr("Analyzing memory of %1\n").arg(executable()),
appendMessage(tr("Analyzing memory of %1").arg(executable()) + QLatin1Char('\n'),
Utils::NormalMessageFormat);
return ValgrindRunControl::startEngine();
}
......
......@@ -173,7 +173,7 @@ void ValgrindRunControl::handleProgressFinished()
void ValgrindRunControl::runnerFinished()
{
appendMessage(tr("Analyzing finished.\n"), NormalMessageFormat);
appendMessage(tr("Analyzing finished.") + QLatin1Char('\n'), NormalMessageFormat);
emit finished();
m_progress->reportFinished();
......@@ -200,11 +200,11 @@ void ValgrindRunControl::receiveProcessError(const QString &message, QProcess::P
if (error == QProcess::FailedToStart) {
const QString valgrind = m_settings->valgrindExecutable();
if (!valgrind.isEmpty())
appendMessage(tr("Error: \"%1\" could not be started: %2\n").arg(valgrind).arg(message), ErrorMessageFormat);
appendMessage(tr("Error: \"%1\" could not be started: %2").arg(valgrind, message) + QLatin1Char('\n'), ErrorMessageFormat);
else
appendMessage(tr("Error: no Valgrind executable set.\n"), ErrorMessageFormat);
appendMessage(tr("Error: no Valgrind executable set.") + QLatin1Char('\n'), ErrorMessageFormat);
} else if (m_isStopping && error == QProcess::Crashed) { // process gets killed on stop
appendMessage(tr("Process terminated.\n"), ErrorMessageFormat);
appendMessage(tr("Process terminated.") + QLatin1Char('\n'), ErrorMessageFormat);
} else {
appendMessage(QString::fromLatin1("** %1 **\n").arg(message), ErrorMessageFormat);
}
......
......@@ -429,9 +429,9 @@ QString VcsBaseOutputWindow::msgExecutionLogEntry(const QString &workingDir,
const QString args = formatArguments(arguments);
const QString nativeExecutable = QDir::toNativeSeparators(executable);
if (workingDir.isEmpty())
return tr("Executing: %1 %2\n").arg(nativeExecutable, args);
return tr("Executing in %1: %2 %3\n").
arg(QDir::toNativeSeparators(workingDir), nativeExecutable, args);
return tr("Executing: %1 %2").arg(nativeExecutable, args) + QLatin1Char('\n');
return tr("Executing in %1: %2 %3").
arg(QDir::toNativeSeparators(workingDir), nativeExecutable, args) + QLatin1Char('\n');
}
void VcsBaseOutputWindow::appendCommand(const QString &text)
......