Commit 41f25565 authored by Friedemann Kleint's avatar Friedemann Kleint

Fix lupdate warnings in WinRT-plugin.

Fix duplicated messages and missing Q_OBJECT.

src/plugins/winrt/winrtdeployconfiguration.cpp:57: Class 'WinRt::Internal::WinRtDeployConfigurationFactory' lacks Q_OBJECT macro
src/plugins/winrt/winrtdeployconfiguration.cpp:148: Class 'WinRt::Internal::WinRtDeployStepFactory' lacks Q_OBJECT macro
src/plugins/winrt/winrtdeployconfiguration.cpp:197: Class 'WinRt::Internal::WinRtDeployConfiguration' lacks Q_OBJECT macro

Change-Id: I49756e05411330fb1cc6281da8cfc677e5e6d1af
Reviewed-by: default avatarOliver Wolff <oliver.wolff@digia.com>
parent c8027974
......@@ -37,6 +37,8 @@
#include <projectexplorer/projectexplorerconstants.h>
#include <qtsupport/qtkitinformation.h>
#include <QCoreApplication>
using namespace ProjectExplorer;
namespace WinRt {
......@@ -46,6 +48,23 @@ static const char appxDeployConfigurationC[] = "WinRTAppxDeployConfiguration";
static const char phoneDeployConfigurationC[] = "WinRTPhoneDeployConfiguration";
static const char emulatorDeployConfigurationC[] = "WinRTEmulatorDeployConfiguration";
static QString msgDeployConfigurationDisplayName(const Core::Id &id)
{
if (id == appxDeployConfigurationC) {
return QCoreApplication::translate("WinRt::Internal::WinRtDeployConfiguration",
"Deploy locally");
}
if (id == phoneDeployConfigurationC) {
return QCoreApplication::translate("WinRt::Internal::WinRtDeployConfiguration",
"Deploy to Windows Phone");
}
if (id == emulatorDeployConfigurationC) {
return QCoreApplication::translate("WinRt::Internal::WinRtDeployConfiguration",
"Deploy to Windows Phone Emulator");
}
return QString();
}
WinRtDeployConfigurationFactory::WinRtDeployConfigurationFactory(QObject *parent)
: DeployConfigurationFactory(parent)
{
......@@ -53,13 +72,7 @@ WinRtDeployConfigurationFactory::WinRtDeployConfigurationFactory(QObject *parent
QString WinRtDeployConfigurationFactory::displayNameForId(const Core::Id id) const
{
if (id == appxDeployConfigurationC)
return tr("Deploy locally");
if (id == phoneDeployConfigurationC)
return tr("Deploy to Windows Phone");
if (id == emulatorDeployConfigurationC)
return tr("Deploy to Windows Phone Emulator");
return QString();
return msgDeployConfigurationDisplayName(id);
}
QList<Core::Id> WinRtDeployConfigurationFactory::availableCreationIds(Target *parent) const
......@@ -144,8 +157,10 @@ QList<Core::Id> WinRtDeployStepFactory::availableCreationIds(BuildStepList *pare
QString WinRtDeployStepFactory::displayNameForId(const Core::Id id) const
{
if (id == Constants::WINRT_BUILD_STEP_DEPLOY)
return tr("Deploy Qt binaries and application files");
if (id == Constants::WINRT_BUILD_STEP_DEPLOY) {
return QCoreApplication::translate("WinRt::Internal::WinRtDeployStepFactory",
"Deploy Qt binaries and application files");
}
return QString();
}
......@@ -193,12 +208,7 @@ BuildStep *WinRtDeployStepFactory::clone(BuildStepList *parent, BuildStep *sourc
WinRtDeployConfiguration::WinRtDeployConfiguration(Target *target, Core::Id id)
: DeployConfiguration(target, id)
{
if (id == appxDeployConfigurationC)
setDefaultDisplayName(tr("Deploy locally"));
if (id == phoneDeployConfigurationC)
setDefaultDisplayName(tr("Deploy to Windows Phone Device"));
if (id == emulatorDeployConfigurationC)
setDefaultDisplayName(tr("Deploy to Windows Phone Emulator"));
setDefaultDisplayName(msgDeployConfigurationDisplayName(id));
stepList()->insertStep(0, new WinRtPackageDeploymentStep(stepList()));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment