summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-09-04 16:20:40 +0200
committerFriedemann Kleint <Friedemann.Kleint@digia.com>2013-09-04 16:30:42 +0200
commitdc108bc31fe63e539fd0aaf47739dbd9ad18d9f3 (patch)
tree8b2e80504c5b35ea101c0d61bf819fd2d4a78c12 /src/plugins
parentcc80b92bb68bc35e964acdddefb42edbfe83ee28 (diff)
downloadqt-creator-dc108bc31fe63e539fd0aaf47739dbd9ad18d9f3.tar.gz
Replace QObject::tr() by tr-functions.
Change-Id: I2e3867b682db971662250c04dec609fd4e3817ea Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/android/androiderrormessage.cpp20
-rw-r--r--src/plugins/android/androiderrormessage.h2
-rw-r--r--src/plugins/qnx/blackberryconfiguration.cpp32
-rw-r--r--src/plugins/qnx/blackberryconfiguration.h2
4 files changed, 30 insertions, 26 deletions
diff --git a/src/plugins/android/androiderrormessage.cpp b/src/plugins/android/androiderrormessage.cpp
index 86016c4635..cbbd06b21a 100644
--- a/src/plugins/android/androiderrormessage.cpp
+++ b/src/plugins/android/androiderrormessage.cpp
@@ -39,34 +39,34 @@ QString AndroidErrorMessage::getMessage(ErrorCode errorCode, const QVariantList
Q_UNUSED(parameters);
switch (errorCode) {
case SDKInstallationError:
- return QObject::tr("Android: SDK installation error 0x%1").arg(errorCode, 0, 16);
+ return tr("Android: SDK installation error 0x%1").arg(errorCode, 0, 16);
case NDKInstallationError:
- return QObject::tr("Android: NDK installation error 0x%1").arg(errorCode, 0, 16);
+ return tr("Android: NDK installation error 0x%1").arg(errorCode, 0, 16);
case JavaInstallationError:
- return QObject::tr("Android: Java installation error 0x%1").arg(errorCode, 0, 16);
+ return tr("Android: Java installation error 0x%1").arg(errorCode, 0, 16);
case AntInstallationError:
- return QObject::tr("Android: ant installation error 0x%1").arg(errorCode, 0, 16);
+ return tr("Android: ant installation error 0x%1").arg(errorCode, 0, 16);
case AdbInstallationError:
- return QObject::tr("Android: adb installation error 0x%1").arg(errorCode, 0, 16);
+ return tr("Android: adb installation error 0x%1").arg(errorCode, 0, 16);
case DeviceConnectionError:
- return QObject::tr("Android: Device connection error 0x%1").arg(errorCode, 0, 16);
+ return tr("Android: Device connection error 0x%1").arg(errorCode, 0, 16);
case DevicePermissionError:
- return QObject::tr("Android: Device permission error 0x%1").arg(errorCode, 0, 16);
+ return tr("Android: Device permission error 0x%1").arg(errorCode, 0, 16);
case DeviceAuthorizationError:
- return QObject::tr("Android: Device authorization error 0x%1").arg(errorCode, 0, 16);
+ return tr("Android: Device authorization error 0x%1").arg(errorCode, 0, 16);
case DeviceAPILevelError:
- return QObject::tr("Android: Device API level not supported: error 0x%1").arg(errorCode, 0, 16);
+ return tr("Android: Device API level not supported: error 0x%1").arg(errorCode, 0, 16);
default:
- return QObject::tr("Android: Unknown error 0x%1").arg(errorCode, 0, 16);
+ return tr("Android: Unknown error 0x%1").arg(errorCode, 0, 16);
}
}
diff --git a/src/plugins/android/androiderrormessage.h b/src/plugins/android/androiderrormessage.h
index 0e061389a3..fc7cf9be11 100644
--- a/src/plugins/android/androiderrormessage.h
+++ b/src/plugins/android/androiderrormessage.h
@@ -31,12 +31,14 @@
#define ANDROIDERRORMESSAGE_H
#include <QVariantList>
+#include <QCoreApplication>
namespace Android {
namespace Internal {
class AndroidErrorMessage
{
+ Q_DECLARE_TR_FUNCTIONS(Android::Internal::AndroidErrorMessage)
public:
enum ErrorCode {
UnknownError = 0x3000,
diff --git a/src/plugins/qnx/blackberryconfiguration.cpp b/src/plugins/qnx/blackberryconfiguration.cpp
index 4010940647..189bc7d192 100644
--- a/src/plugins/qnx/blackberryconfiguration.cpp
+++ b/src/plugins/qnx/blackberryconfiguration.cpp
@@ -200,16 +200,16 @@ BaseQtVersion *BlackBerryConfiguration::createQtVersion(const FileName &qmakePat
BaseQtVersion *version = QtVersionManager::qtVersionForQMakeBinary(qmakePath);
if (version) {
if (!m_isAutoDetected)
- QMessageBox::warning(0, QObject::tr("Qt Version Already Known"),
- QObject::tr("This Qt version was already registered."), QMessageBox::Ok);
+ QMessageBox::warning(0, tr("Qt Version Already Known"),
+ tr("This Qt version was already registered."), QMessageBox::Ok);
return version;
}
version = new BlackBerryQtVersion(QnxUtils::cpudirToArch(cpuDir), qmakePath, m_isAutoDetected, QString(), m_ndkEnvFile.toString());
if (!version) {
if (!m_isAutoDetected)
- QMessageBox::warning(0, QObject::tr("Invalid Qt Version"),
- QObject::tr("Unable to add BlackBerry Qt version."), QMessageBox::Ok);
+ QMessageBox::warning(0, tr("Invalid Qt Version"),
+ tr("Unable to add BlackBerry Qt version."), QMessageBox::Ok);
return 0;
}
@@ -225,8 +225,8 @@ GccToolChain *BlackBerryConfiguration::createGccToolChain()
foreach (ToolChain *tc, ToolChainManager::toolChains()) {
if (tc->compilerCommand() == m_gccCompiler) {
if (!m_isAutoDetected)
- QMessageBox::warning(0, QObject::tr("Compiler Already Known"),
- QObject::tr("This compiler was already registered."), QMessageBox::Ok);
+ QMessageBox::warning(0, tr("Compiler Already Known"),
+ tr("This compiler was already registered."), QMessageBox::Ok);
return dynamic_cast<GccToolChain *>(tc);
}
}
@@ -252,8 +252,8 @@ Kit *BlackBerryConfiguration::createKit(QnxArchitecture arch, BaseQtVersion *qtV
&& Debugger::DebuggerKitInformation::debuggerCommand(kit) == m_simulatorDebuger)
|| (arch == ArmLeV7 && Debugger::DebuggerKitInformation::debuggerCommand(kit) == m_deviceDebuger)) {
if (!m_isAutoDetected)
- QMessageBox::warning(0, QObject::tr("Kit Already Known"),
- QObject::tr("This kit was already registered."), QMessageBox::Ok);
+ QMessageBox::warning(0, tr("Kit Already Known"),
+ tr("This kit was already registered."), QMessageBox::Ok);
setSticky(kit);
return kit;
}
@@ -267,10 +267,10 @@ Kit *BlackBerryConfiguration::createKit(QnxArchitecture arch, BaseQtVersion *qtV
Debugger::DebuggerKitInformation::setDebuggerCommand(kit, m_simulatorDebuger);
Qt4ProjectManager::QmakeKitInformation::setMkspec(kit, FileName::fromString(QString::fromLatin1("blackberry-x86-qcc")));
// TODO: Check if the name already exists(?)
- kit->setDisplayName(QObject::tr("BlackBerry 10 (%1 - %2) - Simulator").arg(qtVersion->qtVersionString(), m_targetName));
+ kit->setDisplayName(tr("BlackBerry 10 (%1 - %2) - Simulator").arg(qtVersion->qtVersionString(), m_targetName));
} else {
Debugger::DebuggerKitInformation::setDebuggerCommand(kit, m_deviceDebuger);
- kit->setDisplayName(QObject::tr("BlackBerry 10 (%1 - %2)").arg(qtVersion->qtVersionString(), m_targetName));
+ kit->setDisplayName(tr("BlackBerry 10 (%1 - %2)").arg(qtVersion->qtVersionString(), m_targetName));
}
@@ -299,20 +299,20 @@ bool BlackBerryConfiguration::activate()
if (m_isAutoDetected)
return false;
- QString errorMessage = QObject::tr("The following errors occurred while activating Target: %1").arg(m_targetName);
+ QString errorMessage = tr("The following errors occurred while activating Target: %1").arg(m_targetName);
if (m_qmake4BinaryFile.isEmpty() && m_qmake4BinaryFile.isEmpty())
- errorMessage += QLatin1Char('\n') + QObject::tr("- No Qt version found.");
+ errorMessage += QLatin1Char('\n') + tr("- No Qt version found.");
if (m_gccCompiler.isEmpty())
- errorMessage += QLatin1Char('\n') + QObject::tr("- No GCC compiler found.");
+ errorMessage += QLatin1Char('\n') + tr("- No GCC compiler found.");
if (m_deviceDebuger.isEmpty())
- errorMessage += QLatin1Char('\n') + QObject::tr("- No GDB debugger found for BB10 Device.");
+ errorMessage += QLatin1Char('\n') + tr("- No GDB debugger found for BB10 Device.");
if (!m_simulatorDebuger.isEmpty())
- errorMessage += QLatin1Char('\n') + QObject::tr("- No GDB debugger found for BB10 Simulator.");
+ errorMessage += QLatin1Char('\n') + tr("- No GDB debugger found for BB10 Simulator.");
- QMessageBox::warning(0, QObject::tr("Cannot Set up BB10 Configuration"),
+ QMessageBox::warning(0, tr("Cannot Set up BB10 Configuration"),
errorMessage, QMessageBox::Ok);
return false;
}
diff --git a/src/plugins/qnx/blackberryconfiguration.h b/src/plugins/qnx/blackberryconfiguration.h
index 115ec5d7ff..32961201ce 100644
--- a/src/plugins/qnx/blackberryconfiguration.h
+++ b/src/plugins/qnx/blackberryconfiguration.h
@@ -43,12 +43,14 @@
#include <projectexplorer/gcctoolchain.h>
#include <QObject>
+#include <QCoreApplication>
namespace Qnx {
namespace Internal {
class BlackBerryConfiguration
{
+ Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::BlackBerryConfiguration)
public:
BlackBerryConfiguration(const Utils::FileName &ndkEnvFile, bool isAutoDetected, const QString &displayName = QString());
bool activate();