Remove most trailing newlines from translated messages.

They are a hassle for translators and reviewers alike.

Change-Id: I07c1b61e8b6719e54fdc1f69cf63f573119a6776
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Friedemann Kleint
2013-10-17 13:48:04 +02:00
parent 10f42df8b3
commit 50f522b2f7
34 changed files with 92 additions and 76 deletions

View File

@@ -1079,11 +1079,13 @@ bool PluginManagerPrivate::loadQueue(PluginSpec *spec, QList<PluginSpec *> &queu
// check for circular dependencies // check for circular dependencies
if (circularityCheckQueue.contains(spec)) { if (circularityCheckQueue.contains(spec)) {
spec->d->hasError = true; 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); int index = circularityCheckQueue.indexOf(spec);
for (int i = index; i < circularityCheckQueue.size(); ++i) { 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())); .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())); spec->d->errorString.append(PluginManager::tr("%1(%2)").arg(spec->name()).arg(spec->version()));
return false; return false;

View File

@@ -126,9 +126,8 @@ public:
if (logger) { if (logger) {
QByteArray logBA = oldLog.readAll(); QByteArray logBA = oldLog.readAll();
logger->appendError(ErrorMessage::NoteLevel, logger->appendError(ErrorMessage::NoteLevel,
ZConfLib::tr("%1: log of previous daemon run is: '%2'.\n") ZConfLib::tr("%1: log of previous daemon run is: '%2'.")
.arg(name()) .arg(name(), QString::fromLatin1(logBA.constData(), logBA.size())) + QLatin1Char('\n'));
.arg(QString::fromLatin1(logBA.constData(), logBA.size())));
qDebug()<<logBA.size()<<oldLog.error()<<oldLog.errorString(); qDebug()<<logBA.size()<<oldLog.error()<<oldLog.errorString();
} }
oldLog.close(); oldLog.close();

View File

@@ -195,29 +195,33 @@ void ReadOnlyFilesDialog::promptFailWarning(const QStringList &files, ReadOnlyRe
if (IVersionControl *vc = d->versionControls[file]) { if (IVersionControl *vc = d->versionControls[file]) {
const QString openText = vc->vcsOpenText().remove(QLatin1Char('&')); const QString openText = vc->vcsOpenText().remove(QLatin1Char('&'));
title = tr("Failed to %1 File").arg(openText); 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(openText)
.arg(QDir::toNativeSeparators(file)) .arg(QDir::toNativeSeparators(file))
.arg(vc->displayName()); .arg(vc->displayName());
message += QLatin1Char('\n');
message += d->failWarning; message += d->failWarning;
} else { } else {
title = tr("No Version Control System Found"); title = tr("No Version Control System Found");
message = tr("Cannot open file %1 from version control system.\n" 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)); .arg(QDir::toNativeSeparators(file));
message += QLatin1Char('\n');
message += d->failWarning; message += d->failWarning;
} }
break; break;
} }
case RO_MakeWritable: case RO_MakeWritable:
title = tr("Cannot Set Permissions"); 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)); .arg(QDir::toNativeSeparators(file));
message += QLatin1Char('\n');
message += d->failWarning; message += d->failWarning;
break; break;
case RO_SaveAs: case RO_SaveAs:
title = tr("Cannot Save File"); 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; message += d->failWarning;
break; break;
default: default:
@@ -240,6 +244,7 @@ void ReadOnlyFilesDialog::promptFailWarning(const QStringList &files, ReadOnlyRe
* Executes the ReadOnlyFilesDialog dialog. * Executes the ReadOnlyFilesDialog dialog.
* Returns ReadOnlyResult to provide information about the operation that was * Returns ReadOnlyResult to provide information about the operation that was
* used to make the files writable. * used to make the files writable.
*
* \internal * \internal
* *
* Also displays an error dialog when some operations cannot be executed and the * Also displays an error dialog when some operations cannot be executed and the

View File

@@ -561,9 +561,10 @@ bool ExternalToolRunner::resolve()
if (m_resolvedExecutable.isEmpty()) { if (m_resolvedExecutable.isEmpty()) {
m_hasError = true; m_hasError = true;
for (int i = 0; i < expandedExecutables.size(); ++i) { 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(m_tool->executables().at(i))
.arg(expandedExecutables.at(i)); .arg(expandedExecutables.at(i));
m_errorString += QLatin1Char('\n');
} }
if (!m_errorString.isEmpty()) if (!m_errorString.isEmpty())
m_errorString.chop(1); m_errorString.chop(1);

View File

@@ -264,7 +264,7 @@ void OutputWindow::appendText(const QString &textIn, const QTextCharFormat &form
if (m_maxLineCount > 0 && document()->blockCount() >= m_maxLineCount) { if (m_maxLineCount > 0 && document()->blockCount() >= m_maxLineCount) {
QTextCharFormat tmp; QTextCharFormat tmp;
tmp.setFontWeight(QFont::Bold); 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(); cursor.endEditBlock();

View File

@@ -404,8 +404,8 @@ QString VcsManager::msgAddToVcsFailedTitle()
QString VcsManager::msgToAddToVcsFailed(const QStringList &files, const IVersionControl *vc) QString VcsManager::msgToAddToVcsFailed(const QStringList &files, const IVersionControl *vc)
{ {
return files.size() == 1 return files.size() == 1
? tr("Could not add the file\n%1\nto version control (%2)\n") ? tr("Could not add the file\n%1\nto version control (%2)")
.arg(files.front(), vc->displayName()) .arg(files.front(), vc->displayName()) + QLatin1Char('\n')
: tr("Could not add the following files to version control (%1)\n%2") : tr("Could not add the following files to version control (%1)\n%2")
.arg(vc->displayName(), files.join(QString(QLatin1Char('\n')))); .arg(vc->displayName(), files.join(QString(QLatin1Char('\n'))));
} }

View File

@@ -1810,7 +1810,8 @@ void DebuggerEngine::checkForReleaseBuild(const DebuggerStartParameters &sp)
} }
showMessageBox(QMessageBox::Information, tr("Warning"), showMessageBox(QMessageBox::Information, tr("Warning"),
tr("This does not seem to be a \"Debug\" build.\n" 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 } // namespace Debugger

View File

@@ -192,7 +192,7 @@ void DebuggerRunControl::start()
// User canceled input dialog asking for executable when working on library project. // User canceled input dialog asking for executable when working on library project.
if (d->m_engine->startParameters().startMode == StartInternal if (d->m_engine->startParameters().startMode == StartInternal
&& d->m_engine->startParameters().executable.isEmpty()) { && d->m_engine->startParameters().executable.isEmpty()) {
appendMessage(tr("No executable specified.\n"), ErrorMessageFormat); appendMessage(tr("No executable specified.") + QLatin1Char('\n'), ErrorMessageFormat);
emit started(); emit started();
emit finished(); emit finished();
return; return;
@@ -232,12 +232,12 @@ void DebuggerRunControl::start()
d->m_engine->startDebugger(this); d->m_engine->startDebugger(this);
if (d->m_running) if (d->m_running)
appendMessage(tr("Debugging starts\n"), NormalMessageFormat); appendMessage(tr("Debugging starts") + QLatin1Char('\n'), NormalMessageFormat);
} }
void DebuggerRunControl::startFailed() void DebuggerRunControl::startFailed()
{ {
appendMessage(tr("Debugging has failed\n"), NormalMessageFormat); appendMessage(tr("Debugging has failed") + QLatin1Char('\n'), NormalMessageFormat);
d->m_running = false; d->m_running = false;
emit finished(); emit finished();
d->m_engine->handleStartFailed(); d->m_engine->handleStartFailed();
@@ -245,7 +245,7 @@ void DebuggerRunControl::startFailed()
void DebuggerRunControl::handleFinished() void DebuggerRunControl::handleFinished()
{ {
appendMessage(tr("Debugging has finished\n"), NormalMessageFormat); appendMessage(tr("Debugging has finished") + QLatin1Char('\n'), NormalMessageFormat);
if (d->m_engine) if (d->m_engine)
d->m_engine->handleFinished(); d->m_engine->handleFinished();
debuggerCore()->runControlFinished(d->m_engine); debuggerCore()->runControlFinished(d->m_engine);

View File

@@ -211,8 +211,9 @@ void GdbCoreEngine::handleTargetCore(const GdbResponse &response)
postCommand("p 5", CB(handleRoundTrip)); postCommand("p 5", CB(handleRoundTrip));
return; return;
} }
QString msg = tr("Attach to core \"%1\" failed:\n") QString msg = tr("Attach to core \"%1\" failed:")
.arg(startParameters().coreFile) .arg(startParameters().coreFile)
+ QLatin1Char('\n')
+ QString::fromLocal8Bit(response.data["msg"].data()); + QString::fromLocal8Bit(response.data["msg"].data());
notifyInferiorSetupFailed(msg); notifyInferiorSetupFailed(msg);
} }

View File

@@ -1893,7 +1893,7 @@ void GdbEngine::pythonDumpersFailed()
void GdbEngine::showExecutionError(const QString &message) void GdbEngine::showExecutionError(const QString &message)
{ {
showMessageBox(QMessageBox::Critical, tr("Execution Error"), 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) void GdbEngine::handleExecuteContinue(const GdbResponse &response)
@@ -2296,7 +2296,7 @@ void GdbEngine::handleExecuteNext(const GdbResponse &response)
notifyInferiorRunFailed(); notifyInferiorRunFailed();
} else { } else {
showMessageBox(QMessageBox::Critical, tr("Execution Error"), 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(); notifyInferiorIll();
} }
} }
@@ -3848,7 +3848,7 @@ void GdbEngine::handleMakeSnapshot(const GdbResponse &response)
} else { } else {
QByteArray msg = response.data["msg"].data(); QByteArray msg = response.data["msg"].data();
showMessageBox(QMessageBox::Critical, tr("Snapshot Creation Error"), showMessageBox(QMessageBox::Critical, tr("Snapshot Creation Error"),
tr("Cannot create snapshot:\n") + QString::fromLocal8Bit(msg)); tr("Cannot create snapshot:") + QLatin1Char('\n') + QString::fromLocal8Bit(msg));
} }
} }

View File

@@ -78,7 +78,7 @@ void GdbPlainEngine::handleFileExecAndSymbols(const GdbResponse &response)
QString msg = fromLocalEncoding(ba); QString msg = fromLocalEncoding(ba);
// Extend the message a bit in unknown cases. // Extend the message a bit in unknown cases.
if (!ba.endsWith("File format not recognized")) if (!ba.endsWith("File format not recognized"))
msg = tr("Starting executable failed:\n") + msg; msg = tr("Starting executable failed:") + QLatin1Char('\n') + msg;
notifyInferiorSetupFailed(msg); notifyInferiorSetupFailed(msg);
} }
} }

View File

@@ -252,7 +252,8 @@ void GdbRemoteServerEngine::handleFileExecAndSymbols(const GdbResponse &response
callTargetRemote(); callTargetRemote();
} else { } else {
QByteArray reason = response.data["msg"].data(); 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); msg += QString::fromLocal8Bit(reason);
if (reason.endsWith("No such file or directory.")) { if (reason.endsWith("No such file or directory.")) {
showMessage(_("INFERIOR STARTUP: BINARY NOT FOUND")); showMessage(_("INFERIOR STARTUP: BINARY NOT FOUND"));

View File

@@ -141,7 +141,7 @@ void QmlAdapter::connectionStateChanged()
switch (m_conn->state()) { switch (m_conn->state()) {
case QAbstractSocket::UnconnectedState: case QAbstractSocket::UnconnectedState:
{ {
showConnectionStatusMessage(tr("Disconnected.\n\n")); showConnectionStatusMessage(tr("Disconnected.") + QLatin1String("\n\n"));
emit disconnected(); emit disconnected();
break; break;
@@ -154,7 +154,7 @@ void QmlAdapter::connectionStateChanged()
break; break;
case QAbstractSocket::ConnectedState: case QAbstractSocket::ConnectedState:
{ {
showConnectionStatusMessage(tr("Connected.\n")); showConnectionStatusMessage(tr("Connected.") + QLatin1Char('\n'));
m_connectionTimer.stop(); m_connectionTimer.stop();

View File

@@ -3027,9 +3027,9 @@ bool GitClient::getCommitData(const QString &workingDirectory,
static inline QString msgCommitted(const QString &amendSHA1, int fileCount) static inline QString msgCommitted(const QString &amendSHA1, int fileCount)
{ {
if (amendSHA1.isEmpty()) 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) 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); return GitClient::tr("Amended \"%1\".").arg(amendSHA1);
} }

View File

@@ -64,7 +64,7 @@ void IosRunControl::start()
SLOT(handleRemoteOutput(QString))); SLOT(handleRemoteOutput(QString)));
connect(m_runner, SIGNAL(finished(bool)), connect(m_runner, SIGNAL(finished(bool)),
SLOT(handleRemoteProcessFinished(bool))); SLOT(handleRemoteProcessFinished(bool)));
appendMessage(tr("Starting remote process.\n"), Utils::NormalMessageFormat); appendMessage(tr("Starting remote process.") + QLatin1Char('\n'), Utils::NormalMessageFormat);
m_runner->start(); m_runner->start();
} }

View File

@@ -285,7 +285,7 @@ void ApplicationLauncher::bringToForeground()
QString ApplicationLauncher::msgWinCannotRetrieveDebuggingOutput() QString ApplicationLauncher::msgWinCannotRetrieveDebuggingOutput()
{ {
return tr("Cannot retrieve debugging output.\n"); return tr("Cannot retrieve debugging output.") + QLatin1Char('\n');
} }
} // namespace ProjectExplorer } // namespace ProjectExplorer

View File

@@ -98,15 +98,15 @@ void LocalApplicationRunControl::start()
{ {
emit started(); emit started();
if (m_executable.isEmpty()) { if (m_executable.isEmpty()) {
appendMessage(tr("No executable specified.\n"), Utils::ErrorMessageFormat); appendMessage(tr("No executable specified.") + QLatin1Char('\n'), Utils::ErrorMessageFormat);
emit finished(); emit finished();
} else if (!QFileInfo(m_executable).exists()){ } 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); Utils::ErrorMessageFormat);
emit finished(); emit finished();
} else { } else {
m_running = true; 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); appendMessage(msg, Utils::NormalMessageFormat);
m_applicationLauncher.start(m_runMode, m_executable, m_commandLineArguments); m_applicationLauncher.start(m_runMode, m_executable, m_commandLineArguments);
setApplicationProcessHandle(ProcessHandle(m_applicationLauncher.applicationPID())); setApplicationProcessHandle(ProcessHandle(m_applicationLauncher.applicationPID()));
@@ -147,13 +147,13 @@ void LocalApplicationRunControl::processExited(int exitCode, QProcess::ExitStatu
setApplicationProcessHandle(ProcessHandle()); setApplicationProcessHandle(ProcessHandle());
QString msg; QString msg;
if (status == QProcess::CrashExit) { if (status == QProcess::CrashExit) {
msg = tr("%1 crashed\n") msg = tr("%1 crashed")
.arg(QDir::toNativeSeparators(m_executable)); .arg(QDir::toNativeSeparators(m_executable));
} else { } else {
msg = tr("%1 exited with code %2\n") msg = tr("%1 exited with code %2")
.arg(QDir::toNativeSeparators(m_executable)).arg(exitCode); .arg(QDir::toNativeSeparators(m_executable)).arg(exitCode);
} }
appendMessage(msg, Utils::NormalMessageFormat); appendMessage(msg + QLatin1Char('\n'), Utils::NormalMessageFormat);
emit finished(); emit finished();
} }

View File

@@ -1985,8 +1985,8 @@ int ProjectExplorerPlugin::queue(QList<Project *> projects, QList<Id> stepIds)
foreach (Project *pro, projects) foreach (Project *pro, projects)
if (pro && pro->needsConfiguration()) if (pro && pro->needsConfiguration())
preambleMessage.append(tr("The project %1 is not configured, skipping it.\n") preambleMessage.append(tr("The project %1 is not configured, skipping it.")
.arg(pro->displayName())); .arg(pro->displayName()) + QLatin1Char('\n'));
foreach (Id id, stepIds) { foreach (Id id, stepIds) {
foreach (Project *pro, projects) { foreach (Project *pro, projects) {
if (!pro || !pro->activeTarget()) if (!pro || !pro->activeTarget())
@@ -2204,9 +2204,10 @@ QPair<bool, QString> ProjectExplorerPlugin::buildSettingsEnabledForSession()
&& project->activeTarget()->activeBuildConfiguration() && project->activeTarget()->activeBuildConfiguration()
&& !project->activeTarget()->activeBuildConfiguration()->isEnabled()) { && !project->activeTarget()->activeBuildConfiguration()->isEnabled()) {
result.first = false; result.first = false;
result.second += tr("Building '%1' is disabled: %2\n") result.second += tr("Building '%1' is disabled: %2")
.arg(project->displayName(), .arg(project->displayName(),
project->activeTarget()->activeBuildConfiguration()->disabledReason()); project->activeTarget()->activeBuildConfiguration()->disabledReason());
result.second += QLatin1Char('\n');
} }
} }
} }
@@ -2788,7 +2789,8 @@ void ProjectExplorerPlugin::addExistingFiles(ProjectNode *projectNode, const QSt
projectNode->addFiles(fileNames, &notAdded); projectNode->addFiles(fileNames, &notAdded);
if (!notAdded.isEmpty()) { 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'))); QString files = notAdded.join(QString(QLatin1Char('\n')));
QMessageBox::warning(ICore::mainWindow(), tr("Adding Files to Project Failed"), QMessageBox::warning(ICore::mainWindow(), tr("Adding Files to Project Failed"),
message + files); message + files);

View File

@@ -303,7 +303,8 @@ void ProjectFileWizardExtension::firstExtensionPageShown(
// <Implicitly Add> // <Implicitly Add>
m_context->page->setNoneLabel(tr("<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) { foreach (const ProjectEntry &project, deployingProjects) {
text += project.fileName; text += project.fileName;
text += QLatin1Char('\n'); text += QLatin1Char('\n');

View File

@@ -403,13 +403,15 @@ Target *TargetSettingsPanelWidget::cloneTarget(Target *sourceTarget, Kit *k)
QString error; QString error;
if (!buildconfigurationError.isEmpty()) if (!buildconfigurationError.isEmpty())
error += tr("Build configurations:\n") error += tr("Build configurations:")
+ QLatin1Char('\n')
+ buildconfigurationError.join(QLatin1String("\n")); + buildconfigurationError.join(QLatin1String("\n"));
if (!deployconfigurationError.isEmpty()) { if (!deployconfigurationError.isEmpty()) {
if (!error.isEmpty()) if (!error.isEmpty())
error.append(QLatin1Char('\n')); error.append(QLatin1Char('\n'));
error += tr("Deploy configurations:\n") error += tr("Deploy configurations:")
+ QLatin1Char('\n')
+ deployconfigurationError.join(QLatin1String("\n")); + deployconfigurationError.join(QLatin1String("\n"));
} }

View File

@@ -132,10 +132,11 @@ public:
innerIds.remove(id); innerIds.remove(id);
QString comment = tr("// TODO: Move position bindings from the component to the Loader.\n" 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) { if (idBinding) {
comment += tr("// Rename all outer uses of the id '%1' to '%2.item'.\n").arg( comment += tr("// Rename all outer uses of the id '%1' to '%2.item'.").arg(
id, loaderId); id, loaderId) + QLatin1Char('\n');
} }
// handle inner ids // handle inner ids

View File

@@ -233,8 +233,8 @@ static QString noTypeinfoError(const QString &libraryPath)
static QString qmldumpErrorMessage(const QString &libraryPath, const QString &error) static QString qmldumpErrorMessage(const QString &libraryPath, const QString &error)
{ {
return noTypeinfoError(libraryPath) + QLatin1String("\n\n") + return noTypeinfoError(libraryPath) + QLatin1String("\n\n") +
PluginDumper::tr("Automatic type dump of QML module failed.\nErrors:\n%1\n"). PluginDumper::tr("Automatic type dump of QML module failed.\nErrors:\n%1").
arg(error); arg(error) + QLatin1Char('\n');
} }
static QString qmldumpFailedMessage(const QString &libraryPath, const QString &error) static QString qmldumpFailedMessage(const QString &libraryPath, const QString &error)

View File

@@ -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 { } 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 // m_targetProcess could be running
if (m_targetProcess->state() == QProcess::Running) { if (m_targetProcess->state() == QProcess::Running) {

View File

@@ -54,10 +54,10 @@ bool ImportLogConverter::convertFile(Core::GeneratedFile &file, QString &errorMe
Q_UNUSED(errorMessage); Q_UNUSED(errorMessage);
QString content; QString content;
content += QLatin1String("========================================================\n"); 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(QLatin1String(Qnx::Constants::QNX_BLACKBERRY_CASCADESIMPORTER_VERSION))
.arg(QDateTime::currentDateTime().toString(Qt::ISODate)); .arg(QDateTime::currentDateTime().toString(Qt::ISODate));
content += QLatin1String("========================================================\n\n"); content += QLatin1String("\n========================================================\n\n");
content += convertedProjectContext().importLog().toString(); content += convertedProjectContext().importLog().toString();
file.setContents(content); file.setContents(content);
file.setAttributes(file.attributes() | Core::GeneratedFile::OpenEditorAttribute); file.setAttributes(file.attributes() | Core::GeneratedFile::OpenEditorAttribute);

View File

@@ -65,7 +65,7 @@ void QnxAnalyzeSupport::handleAdapterSetupRequested()
{ {
QTC_ASSERT(state() == Inactive, return); QTC_ASSERT(state() == Inactive, return);
showMessage(tr("Preparing remote side...\n"), Utils::NormalMessageFormat); showMessage(tr("Preparing remote side...") + QLatin1Char('\n'), Utils::NormalMessageFormat);
QnxAbstractRunSupport::handleAdapterSetupRequested(); QnxAbstractRunSupport::handleAdapterSetupRequested();
} }

View File

@@ -73,7 +73,7 @@ void QnxDebugSupport::handleAdapterSetupRequested()
QTC_ASSERT(state() == Inactive, return); QTC_ASSERT(state() == Inactive, return);
if (m_engine) 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(); QnxAbstractRunSupport::handleAdapterSetupRequested();
} }

View File

@@ -117,13 +117,13 @@ void QnxDeviceTester::handleProcessFinished(int exitStatus)
const QString command = m_commandsToTest[m_currentCommandIndex]; const QString command = m_commandsToTest[m_currentCommandIndex];
if (exitStatus == QSsh::SshRemoteProcess::NormalExit) { if (exitStatus == QSsh::SshRemoteProcess::NormalExit) {
if (m_processRunner->processExitCode() == 0) { if (m_processRunner->processExitCode() == 0) {
emit progressMessage(tr("%1 found.\n").arg(command)); emit progressMessage(tr("%1 found.").arg(command) + QLatin1Char('\n'));
} else { } else {
emit errorMessage(tr("%1 not found.\n").arg(command)); emit errorMessage(tr("%1 not found.").arg(command) + QLatin1Char('\n'));
m_result = TestFailure; m_result = TestFailure;
} }
} else { } 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; m_result = TestFailure;
} }
testNextCommand(); testNextCommand();
@@ -134,7 +134,7 @@ void QnxDeviceTester::handleConnectionError()
QTC_ASSERT(m_state == CommandsTest, return); QTC_ASSERT(m_state == CommandsTest, return);
m_result = TestFailure; 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(); setFinished();
} }

View File

@@ -128,7 +128,7 @@ void GenericLinuxDeviceTester::handleConnectionFailure()
{ {
QTC_ASSERT(d->state != Inactive, return); 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); setFinished(TestFailure);
} }
@@ -139,9 +139,9 @@ void GenericLinuxDeviceTester::handleProcessFinished(int exitStatus)
if (exitStatus != SshRemoteProcess::NormalExit || d->process->exitCode() != 0) { if (exitStatus != SshRemoteProcess::NormalExit || d->process->exitCode() != 0) {
const QByteArray stderrOutput = d->process->readAllStandardError(); const QByteArray stderrOutput = d->process->readAllStandardError();
if (!stderrOutput.isEmpty()) 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 else
emit errorMessage(tr("uname failed.\n")); emit errorMessage(tr("uname failed.") + QLatin1Char('\n'));
} else { } else {
emit progressMessage(QString::fromUtf8(d->process->readAllStandardOutput())); emit progressMessage(QString::fromUtf8(d->process->readAllStandardOutput()));
} }
@@ -158,7 +158,7 @@ void GenericLinuxDeviceTester::handlePortsGatheringError(const QString &message)
{ {
QTC_ASSERT(d->state == TestingPorts, return); 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); setFinished(TestFailure);
} }
@@ -167,14 +167,14 @@ void GenericLinuxDeviceTester::handlePortListReady()
QTC_ASSERT(d->state == TestingPorts, return); QTC_ASSERT(d->state == TestingPorts, return);
if (d->portsGatherer.usedPorts().isEmpty()) { 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 { } else {
QString portList; QString portList;
foreach (const int port, d->portsGatherer.usedPorts()) foreach (const int port, d->portsGatherer.usedPorts())
portList += QString::number(port) + QLatin1String(", "); portList += QString::number(port) + QLatin1String(", ");
portList.remove(portList.count() - 2, 2); portList.remove(portList.count() - 2, 2);
emit errorMessage(tr("The following specified ports are currently in use: %1\n") emit errorMessage(tr("The following specified ports are currently in use: %1")
.arg(portList)); .arg(portList) + QLatin1Char('\n'));
} }
setFinished(TestSuccess); setFinished(TestSuccess);
} }

View File

@@ -115,7 +115,7 @@ void RemoteLinuxAnalyzeSupport::handleRemoteSetupRequested()
{ {
QTC_ASSERT(state() == Inactive, return); QTC_ASSERT(state() == Inactive, return);
showMessage(tr("Checking available ports...\n"), Utils::NormalMessageFormat); showMessage(tr("Checking available ports...") + QLatin1Char('\n'), Utils::NormalMessageFormat);
AbstractRemoteLinuxRunSupport::handleRemoteSetupRequested(); AbstractRemoteLinuxRunSupport::handleRemoteSetupRequested();
} }

View File

@@ -141,7 +141,7 @@ void LinuxDeviceDebugSupport::handleRemoteSetupRequested()
{ {
QTC_ASSERT(state() == Inactive, return); QTC_ASSERT(state() == Inactive, return);
showMessage(tr("Checking available ports...\n"), LogStatus); showMessage(tr("Checking available ports...") + QLatin1Char('\n'), LogStatus);
AbstractRemoteLinuxRunSupport::handleRemoteSetupRequested(); AbstractRemoteLinuxRunSupport::handleRemoteSetupRequested();
} }

View File

@@ -100,7 +100,7 @@ Valgrind::ValgrindRunner * CallgrindRunControl::runner()
bool CallgrindRunControl::startEngine() 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(); return ValgrindRunControl::startEngine();
} }

View File

@@ -80,7 +80,7 @@ bool MemcheckRunControl::startEngine()
// Clear about-to-be-outdated tasks. // Clear about-to-be-outdated tasks.
TaskHub::clearTasks(Analyzer::Constants::ANALYZERTASK_ID); 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); Utils::NormalMessageFormat);
return ValgrindRunControl::startEngine(); return ValgrindRunControl::startEngine();
} }

View File

@@ -173,7 +173,7 @@ void ValgrindRunControl::handleProgressFinished()
void ValgrindRunControl::runnerFinished() void ValgrindRunControl::runnerFinished()
{ {
appendMessage(tr("Analyzing finished.\n"), NormalMessageFormat); appendMessage(tr("Analyzing finished.") + QLatin1Char('\n'), NormalMessageFormat);
emit finished(); emit finished();
m_progress->reportFinished(); m_progress->reportFinished();
@@ -200,11 +200,11 @@ void ValgrindRunControl::receiveProcessError(const QString &message, QProcess::P
if (error == QProcess::FailedToStart) { if (error == QProcess::FailedToStart) {
const QString valgrind = m_settings->valgrindExecutable(); const QString valgrind = m_settings->valgrindExecutable();
if (!valgrind.isEmpty()) 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 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 } 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 { } else {
appendMessage(QString::fromLatin1("** %1 **\n").arg(message), ErrorMessageFormat); appendMessage(QString::fromLatin1("** %1 **\n").arg(message), ErrorMessageFormat);
} }

View File

@@ -429,9 +429,9 @@ QString VcsBaseOutputWindow::msgExecutionLogEntry(const QString &workingDir,
const QString args = formatArguments(arguments); const QString args = formatArguments(arguments);
const QString nativeExecutable = QDir::toNativeSeparators(executable); const QString nativeExecutable = QDir::toNativeSeparators(executable);
if (workingDir.isEmpty()) if (workingDir.isEmpty())
return tr("Executing: %1 %2\n").arg(nativeExecutable, args); return tr("Executing: %1 %2").arg(nativeExecutable, args) + QLatin1Char('\n');
return tr("Executing in %1: %2 %3\n"). return tr("Executing in %1: %2 %3").
arg(QDir::toNativeSeparators(workingDir), nativeExecutable, args); arg(QDir::toNativeSeparators(workingDir), nativeExecutable, args) + QLatin1Char('\n');
} }
void VcsBaseOutputWindow::appendCommand(const QString &text) void VcsBaseOutputWindow::appendCommand(const QString &text)