diff --git a/src/plugins/winrt/winrtdevicefactory.cpp b/src/plugins/winrt/winrtdevicefactory.cpp index 08231298ba206ea0df3ef1d248bc914221968703..8d2490dd55f4836ad0d4f06ca9d8ca6af0a9bf4f 100644 --- a/src/plugins/winrt/winrtdevicefactory.cpp +++ b/src/plugins/winrt/winrtdevicefactory.cpp @@ -130,7 +130,7 @@ void WinRtDeviceFactory::onProcessFinished(int exitCode, QProcess::ExitStatus ex } if (exitCode != 0) { - MessageManager::write(tr("winrtrunner.exe returned with exit code %1.") + MessageManager::write(tr("winrtrunner returned with exit code %1.") .arg(exitCode), MessageManager::Flash); return; } @@ -238,8 +238,12 @@ void WinRtDeviceFactory::parseRunnerOutput(const QByteArray &output) const deviceManager->addDevice(ProjectExplorer::IDevice::ConstPtr(device)); } } - MessageManager::write(tr("Found %1 Windows Runtime devices. %2 of them are new.").arg(numFound) - .arg(numFound - numSkipped)); + QString message = tr("Found %n Windows Runtime devices.", 0, numFound); + if (const int numNew = numFound - numSkipped) { + message += QLatin1Char(' '); + message += tr("%n of them are new.", 0, numNew); + } + MessageManager::write(message); } } // Internal diff --git a/src/plugins/winrt/winrtruncontrol.cpp b/src/plugins/winrt/winrtruncontrol.cpp index 85b01b9425eef094b9c657b4c4c4ae465351f757..436c221941fb021639a414e36fff9cdb783321af 100644 --- a/src/plugins/winrt/winrtruncontrol.cpp +++ b/src/plugins/winrt/winrtruncontrol.cpp @@ -69,7 +69,7 @@ WinRtRunControl::WinRtRunControl(WinRtRunConfiguration *runConfiguration, RunMod m_isWinPhone = (qt->type() == QLatin1String(Constants::WINRT_WINPHONEQT)); m_runnerFilePath = qt->binPath().toString() + QStringLiteral("/winrtrunner.exe"); if (!QFile::exists(m_runnerFilePath)) { - appendMessage(tr("Cannot find winrtrunner.exe in '%1'.").arg( + appendMessage(tr("Cannot find winrtrunner.exe in \"%1\".").arg( QDir::toNativeSeparators(qt->binPath().toString())), Utils::ErrorMessageFormat); return; @@ -127,12 +127,13 @@ void WinRtRunControl::onProcessFinished(int exitCode, QProcess::ExitStatus exitS QTC_CHECK(m_state == StartedState); if (exitStatus == QProcess::CrashExit) { - appendMessage(tr("winrtrunner crashed\n"), Utils::ErrorMessageFormat); + appendMessage(tr("winrtrunner crashed.") + QLatin1Char('\n'), Utils::ErrorMessageFormat); } else if (exitCode != 0) { - appendMessage(tr("winrtrunner returned with exit code %1\n").arg(exitCode), - Utils::ErrorMessageFormat); + appendMessage(tr("winrtrunner returned with exit code %1.").arg(exitCode) + + QLatin1Char('\n'), Utils::ErrorMessageFormat); } else { - appendMessage(tr("winrtrunner finished successfully.\n"), Utils::NormalMessageFormat); + appendMessage(tr("winrtrunner finished successfully.") + + QLatin1Char('\n'), Utils::NormalMessageFormat); } m_process->disconnect();