forked from qt-creator/qt-creator
Replace QObject::tr() by tr-functions.
Change-Id: I2e3867b682db971662250c04dec609fd4e3817ea Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -39,34 +39,34 @@ QString AndroidErrorMessage::getMessage(ErrorCode errorCode, const QVariantList
|
|||||||
Q_UNUSED(parameters);
|
Q_UNUSED(parameters);
|
||||||
switch (errorCode) {
|
switch (errorCode) {
|
||||||
case SDKInstallationError:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
default:
|
||||||
return QObject::tr("Android: Unknown error 0x%1").arg(errorCode, 0, 16);
|
return tr("Android: Unknown error 0x%1").arg(errorCode, 0, 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -31,12 +31,14 @@
|
|||||||
#define ANDROIDERRORMESSAGE_H
|
#define ANDROIDERRORMESSAGE_H
|
||||||
|
|
||||||
#include <QVariantList>
|
#include <QVariantList>
|
||||||
|
#include <QCoreApplication>
|
||||||
|
|
||||||
namespace Android {
|
namespace Android {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class AndroidErrorMessage
|
class AndroidErrorMessage
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(Android::Internal::AndroidErrorMessage)
|
||||||
public:
|
public:
|
||||||
enum ErrorCode {
|
enum ErrorCode {
|
||||||
UnknownError = 0x3000,
|
UnknownError = 0x3000,
|
||||||
|
@@ -200,16 +200,16 @@ BaseQtVersion *BlackBerryConfiguration::createQtVersion(const FileName &qmakePat
|
|||||||
BaseQtVersion *version = QtVersionManager::qtVersionForQMakeBinary(qmakePath);
|
BaseQtVersion *version = QtVersionManager::qtVersionForQMakeBinary(qmakePath);
|
||||||
if (version) {
|
if (version) {
|
||||||
if (!m_isAutoDetected)
|
if (!m_isAutoDetected)
|
||||||
QMessageBox::warning(0, QObject::tr("Qt Version Already Known"),
|
QMessageBox::warning(0, tr("Qt Version Already Known"),
|
||||||
QObject::tr("This Qt version was already registered."), QMessageBox::Ok);
|
tr("This Qt version was already registered."), QMessageBox::Ok);
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
version = new BlackBerryQtVersion(QnxUtils::cpudirToArch(cpuDir), qmakePath, m_isAutoDetected, QString(), m_ndkEnvFile.toString());
|
version = new BlackBerryQtVersion(QnxUtils::cpudirToArch(cpuDir), qmakePath, m_isAutoDetected, QString(), m_ndkEnvFile.toString());
|
||||||
if (!version) {
|
if (!version) {
|
||||||
if (!m_isAutoDetected)
|
if (!m_isAutoDetected)
|
||||||
QMessageBox::warning(0, QObject::tr("Invalid Qt Version"),
|
QMessageBox::warning(0, tr("Invalid Qt Version"),
|
||||||
QObject::tr("Unable to add BlackBerry Qt version."), QMessageBox::Ok);
|
tr("Unable to add BlackBerry Qt version."), QMessageBox::Ok);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,8 +225,8 @@ GccToolChain *BlackBerryConfiguration::createGccToolChain()
|
|||||||
foreach (ToolChain *tc, ToolChainManager::toolChains()) {
|
foreach (ToolChain *tc, ToolChainManager::toolChains()) {
|
||||||
if (tc->compilerCommand() == m_gccCompiler) {
|
if (tc->compilerCommand() == m_gccCompiler) {
|
||||||
if (!m_isAutoDetected)
|
if (!m_isAutoDetected)
|
||||||
QMessageBox::warning(0, QObject::tr("Compiler Already Known"),
|
QMessageBox::warning(0, tr("Compiler Already Known"),
|
||||||
QObject::tr("This compiler was already registered."), QMessageBox::Ok);
|
tr("This compiler was already registered."), QMessageBox::Ok);
|
||||||
return dynamic_cast<GccToolChain *>(tc);
|
return dynamic_cast<GccToolChain *>(tc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -252,8 +252,8 @@ Kit *BlackBerryConfiguration::createKit(QnxArchitecture arch, BaseQtVersion *qtV
|
|||||||
&& Debugger::DebuggerKitInformation::debuggerCommand(kit) == m_simulatorDebuger)
|
&& Debugger::DebuggerKitInformation::debuggerCommand(kit) == m_simulatorDebuger)
|
||||||
|| (arch == ArmLeV7 && Debugger::DebuggerKitInformation::debuggerCommand(kit) == m_deviceDebuger)) {
|
|| (arch == ArmLeV7 && Debugger::DebuggerKitInformation::debuggerCommand(kit) == m_deviceDebuger)) {
|
||||||
if (!m_isAutoDetected)
|
if (!m_isAutoDetected)
|
||||||
QMessageBox::warning(0, QObject::tr("Kit Already Known"),
|
QMessageBox::warning(0, tr("Kit Already Known"),
|
||||||
QObject::tr("This kit was already registered."), QMessageBox::Ok);
|
tr("This kit was already registered."), QMessageBox::Ok);
|
||||||
setSticky(kit);
|
setSticky(kit);
|
||||||
return kit;
|
return kit;
|
||||||
}
|
}
|
||||||
@@ -267,10 +267,10 @@ Kit *BlackBerryConfiguration::createKit(QnxArchitecture arch, BaseQtVersion *qtV
|
|||||||
Debugger::DebuggerKitInformation::setDebuggerCommand(kit, m_simulatorDebuger);
|
Debugger::DebuggerKitInformation::setDebuggerCommand(kit, m_simulatorDebuger);
|
||||||
Qt4ProjectManager::QmakeKitInformation::setMkspec(kit, FileName::fromString(QString::fromLatin1("blackberry-x86-qcc")));
|
Qt4ProjectManager::QmakeKitInformation::setMkspec(kit, FileName::fromString(QString::fromLatin1("blackberry-x86-qcc")));
|
||||||
// TODO: Check if the name already exists(?)
|
// 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 {
|
} else {
|
||||||
Debugger::DebuggerKitInformation::setDebuggerCommand(kit, m_deviceDebuger);
|
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)
|
if (m_isAutoDetected)
|
||||||
return false;
|
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())
|
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())
|
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())
|
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())
|
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);
|
errorMessage, QMessageBox::Ok);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -43,12 +43,14 @@
|
|||||||
#include <projectexplorer/gcctoolchain.h>
|
#include <projectexplorer/gcctoolchain.h>
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include <QCoreApplication>
|
||||||
|
|
||||||
namespace Qnx {
|
namespace Qnx {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class BlackBerryConfiguration
|
class BlackBerryConfiguration
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::BlackBerryConfiguration)
|
||||||
public:
|
public:
|
||||||
BlackBerryConfiguration(const Utils::FileName &ndkEnvFile, bool isAutoDetected, const QString &displayName = QString());
|
BlackBerryConfiguration(const Utils::FileName &ndkEnvFile, bool isAutoDetected, const QString &displayName = QString());
|
||||||
bool activate();
|
bool activate();
|
||||||
|
Reference in New Issue
Block a user