forked from qt-creator/qt-creator
tr()-Fixes in master.
- Add missing Q_OBJECTS - Clean up Android, fix capitalization, remove redundant translations. Change-Id: I24583b7e363ff8f90cad3b8257b676888e8a59db Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -425,9 +425,10 @@ bool AndroidConfigurations::createAVD(int minApiLevel) const
|
|||||||
QStringListModel model(sdkTargets(minApiLevel));
|
QStringListModel model(sdkTargets(minApiLevel));
|
||||||
avdDialog.targetComboBox->setModel(&model);
|
avdDialog.targetComboBox->setModel(&model);
|
||||||
if (!model.rowCount()) {
|
if (!model.rowCount()) {
|
||||||
QMessageBox::critical(0, tr("Create AVD error"),
|
QMessageBox::critical(0, tr("Create AVD Error"),
|
||||||
tr("Can't create a new AVD, not enough android SDKs available\n"
|
tr("Cannot create a new AVD, not enough android SDKs available\n"
|
||||||
"Please install one SDK with api version >=%1").arg(minApiLevel));
|
"Please install one SDK with api version >=%1").
|
||||||
|
arg(minApiLevel));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -96,7 +96,9 @@ void AndroidDeployStepWidget::setDeployLocalQtLibs()
|
|||||||
|
|
||||||
void AndroidDeployStepWidget::setQASIPackagePath()
|
void AndroidDeployStepWidget::setQASIPackagePath()
|
||||||
{
|
{
|
||||||
QString packagePath = QFileDialog::getOpenFileName(this, tr("Qt Android smart installer"), QDir::homePath(), tr("Android package (*.apk)"));
|
QString packagePath =
|
||||||
|
QFileDialog::getOpenFileName(this, tr("Qt Android Smart Installer"),
|
||||||
|
QDir::homePath(), tr("Android package (*.apk)"));
|
||||||
if (packagePath.length())
|
if (packagePath.length())
|
||||||
m_step->setDeployQASIPackagePath(packagePath);
|
m_step->setDeployQASIPackagePath(packagePath);
|
||||||
}
|
}
|
||||||
|
@@ -198,8 +198,8 @@ void AndroidPackageCreationStep::checkRequiredLibraries()
|
|||||||
QProcess readelfProc;
|
QProcess readelfProc;
|
||||||
QString appPath = androidTarget()->targetApplicationPath();
|
QString appPath = androidTarget()->targetApplicationPath();
|
||||||
if (!QFile::exists(appPath)) {
|
if (!QFile::exists(appPath)) {
|
||||||
raiseError(tr("Can't find read elf information"),
|
raiseError(tr("Cannot find read elf information"),
|
||||||
tr("Can't find '%1'.\n"
|
tr("Cannot find '%1'.\n"
|
||||||
"Please make sure your application is "
|
"Please make sure your application is "
|
||||||
"built successfully and is selected in Application tab ('Run option') ").arg(appPath));
|
"built successfully and is selected in Application tab ('Run option') ").arg(appPath));
|
||||||
return;
|
return;
|
||||||
@@ -249,7 +249,7 @@ void AndroidPackageCreationStep::checkRequiredLibrariesForRun()
|
|||||||
{
|
{
|
||||||
QProcess readelfProc;
|
QProcess readelfProc;
|
||||||
if (!QFile::exists(m_appPath)) {
|
if (!QFile::exists(m_appPath)) {
|
||||||
raiseError(tr("Can't find read elf information"),
|
raiseError(tr("Cannot find read elf information"),
|
||||||
tr("Can't find '%1'.\n"
|
tr("Can't find '%1'.\n"
|
||||||
"Please make sure your application is "
|
"Please make sure your application is "
|
||||||
"built successfully and is selected in Application tab ('Run option') ").arg(m_appPath));
|
"built successfully and is selected in Application tab ('Run option') ").arg(m_appPath));
|
||||||
@@ -386,7 +386,7 @@ bool AndroidPackageCreationStep::createPackage()
|
|||||||
if (m_debugBuild || !m_certificateAlias.length()) {
|
if (m_debugBuild || !m_certificateAlias.length()) {
|
||||||
build << QLatin1String("debug");
|
build << QLatin1String("debug");
|
||||||
if (!QFile::copy(m_gdbServerSource, m_gdbServerDestination)) {
|
if (!QFile::copy(m_gdbServerSource, m_gdbServerDestination)) {
|
||||||
raiseError(tr("Can't copy gdbserver from '%1' to '%2'").arg(m_gdbServerSource)
|
raiseError(tr("Cannot copy gdbserver from '%1' to '%2'").arg(m_gdbServerSource)
|
||||||
.arg(m_gdbServerDestination));
|
.arg(m_gdbServerDestination));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -300,7 +300,7 @@ void AndroidPackageCreationWidget::setPackageName()
|
|||||||
{
|
{
|
||||||
const QString packageName= m_ui->packageNameLineEdit->text();
|
const QString packageName= m_ui->packageNameLineEdit->text();
|
||||||
if (!checkPackageName(packageName)) {
|
if (!checkPackageName(packageName)) {
|
||||||
QMessageBox::critical(this, tr("Invalid package name") ,
|
QMessageBox::critical(this, tr("Invalid Package Name") ,
|
||||||
tr("The package name '%1' is not valid.\n"
|
tr("The package name '%1' is not valid.\n"
|
||||||
"Please choose a valid package name for your application (e.g. \"org.example.myapplication\").")
|
"Please choose a valid package name for your application (e.g. \"org.example.myapplication\").")
|
||||||
.arg(packageName));
|
.arg(packageName));
|
||||||
@@ -524,7 +524,7 @@ void AndroidPackageCreationWidget::on_KeystoreLocationPushButton_clicked()
|
|||||||
QString keystorePath = m_step->keystorePath();
|
QString keystorePath = m_step->keystorePath();
|
||||||
if (!keystorePath.length())
|
if (!keystorePath.length())
|
||||||
keystorePath = QDir::homePath();
|
keystorePath = QDir::homePath();
|
||||||
QString file = QFileDialog::getOpenFileName(this, tr("Select keystore file"), keystorePath, tr("Keystore files (*.keystore *.jks)"));
|
QString file = QFileDialog::getOpenFileName(this, tr("Select Keystore File"), keystorePath, tr("Keystore files (*.keystore *.jks)"));
|
||||||
if (!file.length())
|
if (!file.length())
|
||||||
return;
|
return;
|
||||||
m_ui->KeystoreLocationLineEdit->setText(file);
|
m_ui->KeystoreLocationLineEdit->setText(file);
|
||||||
|
@@ -41,16 +41,23 @@ using namespace Android::Internal;
|
|||||||
|
|
||||||
const Core::Id AndroidPackageInstallationStep::Id("Qt4ProjectManager.AndroidPackageInstallationStep");
|
const Core::Id AndroidPackageInstallationStep::Id("Qt4ProjectManager.AndroidPackageInstallationStep");
|
||||||
|
|
||||||
|
static inline QString stepDisplayName()
|
||||||
|
{
|
||||||
|
return AndroidPackageInstallationStep::tr("Copy application data");
|
||||||
|
}
|
||||||
|
|
||||||
AndroidPackageInstallationStep::AndroidPackageInstallationStep(ProjectExplorer::BuildStepList *bsl) : MakeStep(bsl, Id)
|
AndroidPackageInstallationStep::AndroidPackageInstallationStep(ProjectExplorer::BuildStepList *bsl) : MakeStep(bsl, Id)
|
||||||
{
|
{
|
||||||
setDefaultDisplayName(tr("Copy application data"));
|
const QString name = stepDisplayName();
|
||||||
setDisplayName(tr("Copy application data"));
|
setDefaultDisplayName(name);
|
||||||
|
setDisplayName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
AndroidPackageInstallationStep::AndroidPackageInstallationStep(ProjectExplorer::BuildStepList *bc, AndroidPackageInstallationStep *other): MakeStep(bc, other)
|
AndroidPackageInstallationStep::AndroidPackageInstallationStep(ProjectExplorer::BuildStepList *bc, AndroidPackageInstallationStep *other): MakeStep(bc, other)
|
||||||
{
|
{
|
||||||
setDefaultDisplayName(tr("Copy application data"));
|
const QString name = stepDisplayName();
|
||||||
setDisplayName(tr("Copy application data"));
|
setDefaultDisplayName(name);
|
||||||
|
setDisplayName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
AndroidPackageInstallationStep::~AndroidPackageInstallationStep()
|
AndroidPackageInstallationStep::~AndroidPackageInstallationStep()
|
||||||
@@ -61,7 +68,7 @@ bool AndroidPackageInstallationStep::init()
|
|||||||
{
|
{
|
||||||
AndroidTarget *androidTarget = qobject_cast<AndroidTarget *>(target());
|
AndroidTarget *androidTarget = qobject_cast<AndroidTarget *>(target());
|
||||||
if (!androidTarget) {
|
if (!androidTarget) {
|
||||||
emit addOutput(tr("Current target is not an android target"), BuildStep::MessageOutput);
|
emit addOutput(tr("Current target is not an Android target"), BuildStep::MessageOutput);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -40,6 +40,7 @@ namespace Internal {
|
|||||||
|
|
||||||
class AndroidPackageInstallationStep : public Qt4ProjectManager::MakeStep
|
class AndroidPackageInstallationStep : public Qt4ProjectManager::MakeStep
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
friend class AndroidPackageInstallationFactory;
|
friend class AndroidPackageInstallationFactory;
|
||||||
public:
|
public:
|
||||||
explicit AndroidPackageInstallationStep(ProjectExplorer::BuildStepList *bsl);
|
explicit AndroidPackageInstallationStep(ProjectExplorer::BuildStepList *bsl);
|
||||||
|
@@ -191,7 +191,7 @@ void AndroidRunner::asyncStart()
|
|||||||
checkPID();
|
checkPID();
|
||||||
}
|
}
|
||||||
if (m_processPID == -1) {
|
if (m_processPID == -1) {
|
||||||
emit remoteProcessFinished(tr("Can't find %1 process").arg(m_packageName));
|
emit remoteProcessFinished(tr("Cannot find %1 process").arg(m_packageName));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -312,7 +312,7 @@ void AndroidSettingsWidget::openJDKLocationEditingFinished()
|
|||||||
|
|
||||||
void AndroidSettingsWidget::browseSDKLocation()
|
void AndroidSettingsWidget::browseSDKLocation()
|
||||||
{
|
{
|
||||||
QString dir = QFileDialog::getExistingDirectory(this, tr("Select Android SDK folder"));
|
QString dir = QFileDialog::getExistingDirectory(this, tr("Select Android SDK Folder"));
|
||||||
if (!checkSDK(dir))
|
if (!checkSDK(dir))
|
||||||
return;
|
return;
|
||||||
m_ui->SDKLocationLineEdit->setText(dir);
|
m_ui->SDKLocationLineEdit->setText(dir);
|
||||||
@@ -321,7 +321,7 @@ void AndroidSettingsWidget::browseSDKLocation()
|
|||||||
|
|
||||||
void AndroidSettingsWidget::browseNDKLocation()
|
void AndroidSettingsWidget::browseNDKLocation()
|
||||||
{
|
{
|
||||||
QString dir = QFileDialog::getExistingDirectory(this, tr("Select Android NDK folder"));
|
QString dir = QFileDialog::getExistingDirectory(this, tr("Select Android NDK Folder"));
|
||||||
if (!checkNDK(dir))
|
if (!checkNDK(dir))
|
||||||
return;
|
return;
|
||||||
m_ui->NDKLocationLineEdit->setText(dir);
|
m_ui->NDKLocationLineEdit->setText(dir);
|
||||||
@@ -340,7 +340,8 @@ void AndroidSettingsWidget::browseAntLocation()
|
|||||||
dir = QLatin1String("/opt/local/bin/ant");
|
dir = QLatin1String("/opt/local/bin/ant");
|
||||||
QLatin1String antApp("ant");
|
QLatin1String antApp("ant");
|
||||||
#endif
|
#endif
|
||||||
QString file = QFileDialog::getOpenFileName(this, tr("Select ant script"),dir,antApp);
|
const QString file =
|
||||||
|
QFileDialog::getOpenFileName(this, tr("Select ant Script"), dir, antApp);
|
||||||
if (!file.length())
|
if (!file.length())
|
||||||
return;
|
return;
|
||||||
m_ui->AntLocationLineEdit->setText(file);
|
m_ui->AntLocationLineEdit->setText(file);
|
||||||
@@ -350,7 +351,7 @@ void AndroidSettingsWidget::browseAntLocation()
|
|||||||
void AndroidSettingsWidget::browseGdbLocation()
|
void AndroidSettingsWidget::browseGdbLocation()
|
||||||
{
|
{
|
||||||
QString gdbPath = AndroidConfigurations::instance().gdbPath(ProjectExplorer::Abi::ArmArchitecture);
|
QString gdbPath = AndroidConfigurations::instance().gdbPath(ProjectExplorer::Abi::ArmArchitecture);
|
||||||
QString file = QFileDialog::getOpenFileName(this, tr("Select gdb executable"),gdbPath);
|
QString file = QFileDialog::getOpenFileName(this, tr("Select gdb Executable"),gdbPath);
|
||||||
if (!file.length())
|
if (!file.length())
|
||||||
return;
|
return;
|
||||||
m_ui->GdbLocationLineEdit->setText(file);
|
m_ui->GdbLocationLineEdit->setText(file);
|
||||||
@@ -360,7 +361,8 @@ void AndroidSettingsWidget::browseGdbLocation()
|
|||||||
void AndroidSettingsWidget::browseGdbserverLocation()
|
void AndroidSettingsWidget::browseGdbserverLocation()
|
||||||
{
|
{
|
||||||
QString gdbserverPath = AndroidConfigurations::instance().gdbServerPath(ProjectExplorer::Abi::ArmArchitecture);
|
QString gdbserverPath = AndroidConfigurations::instance().gdbServerPath(ProjectExplorer::Abi::ArmArchitecture);
|
||||||
QString file = QFileDialog::getOpenFileName(this, tr("Select gdbserver android executable"),gdbserverPath);
|
const QString file =
|
||||||
|
QFileDialog::getOpenFileName(this, tr("Select gdbserver Android Executable"),gdbserverPath);
|
||||||
if (!file.length())
|
if (!file.length())
|
||||||
return;
|
return;
|
||||||
m_ui->GdbserverLocationLineEdit->setText(file);
|
m_ui->GdbserverLocationLineEdit->setText(file);
|
||||||
@@ -370,7 +372,8 @@ void AndroidSettingsWidget::browseGdbserverLocation()
|
|||||||
void AndroidSettingsWidget::browseGdbLocationX86()
|
void AndroidSettingsWidget::browseGdbLocationX86()
|
||||||
{
|
{
|
||||||
QString gdbPath = AndroidConfigurations::instance().gdbPath(ProjectExplorer::Abi::X86Architecture);
|
QString gdbPath = AndroidConfigurations::instance().gdbPath(ProjectExplorer::Abi::X86Architecture);
|
||||||
QString file = QFileDialog::getOpenFileName(this, tr("Select gdb executable"),gdbPath);
|
const QString file =
|
||||||
|
QFileDialog::getOpenFileName(this, tr("Select gdb Executable"),gdbPath);
|
||||||
if (!file.length())
|
if (!file.length())
|
||||||
return;
|
return;
|
||||||
m_ui->GdbLocationLineEditx86->setText(file);
|
m_ui->GdbLocationLineEditx86->setText(file);
|
||||||
@@ -380,7 +383,8 @@ void AndroidSettingsWidget::browseGdbLocationX86()
|
|||||||
void AndroidSettingsWidget::browseGdbserverLocationX86()
|
void AndroidSettingsWidget::browseGdbserverLocationX86()
|
||||||
{
|
{
|
||||||
QString gdbserverPath = AndroidConfigurations::instance().gdbServerPath(ProjectExplorer::Abi::X86Architecture);
|
QString gdbserverPath = AndroidConfigurations::instance().gdbServerPath(ProjectExplorer::Abi::X86Architecture);
|
||||||
QString file = QFileDialog::getOpenFileName(this, tr("Select gdbserver android executable"),gdbserverPath);
|
const QString file =
|
||||||
|
QFileDialog::getOpenFileName(this, tr("Select gdbserver Android Executable"), gdbserverPath);
|
||||||
if (!file.length())
|
if (!file.length())
|
||||||
return;
|
return;
|
||||||
m_ui->GdbserverLocationLineEditx86->setText(file);
|
m_ui->GdbserverLocationLineEditx86->setText(file);
|
||||||
@@ -390,7 +394,8 @@ void AndroidSettingsWidget::browseGdbserverLocationX86()
|
|||||||
void AndroidSettingsWidget::browseOpenJDKLocation()
|
void AndroidSettingsWidget::browseOpenJDKLocation()
|
||||||
{
|
{
|
||||||
QString openJDKPath = AndroidConfigurations::instance().openJDKPath();
|
QString openJDKPath = AndroidConfigurations::instance().openJDKPath();
|
||||||
QString file = QFileDialog::getOpenFileName(this, tr("Select OpenJDK path"),openJDKPath);
|
const QString file =
|
||||||
|
QFileDialog::getOpenFileName(this, tr("Select OpenJDK Path"), openJDKPath);
|
||||||
if (!file.length())
|
if (!file.length())
|
||||||
return;
|
return;
|
||||||
m_ui->OpenJDKLocationLineEdit->setText(file);
|
m_ui->OpenJDKLocationLineEdit->setText(file);
|
||||||
|
@@ -462,7 +462,7 @@ bool AndroidTarget::openXmlFile(QDomDocument &doc, const QString &fileName, bool
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!doc.setContent(f.readAll())) {
|
if (!doc.setContent(f.readAll())) {
|
||||||
raiseError(tr("Can't parse '%1'").arg(fileName));
|
raiseError(tr("Cannot parse '%1'").arg(fileName));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -475,7 +475,7 @@ bool AndroidTarget::saveXmlFile(QDomDocument &doc, const QString &fileName) cons
|
|||||||
|
|
||||||
QFile f(fileName);
|
QFile f(fileName);
|
||||||
if (!f.open(QIODevice::WriteOnly)) {
|
if (!f.open(QIODevice::WriteOnly)) {
|
||||||
raiseError(tr("Can't open '%1'").arg(fileName));
|
raiseError(tr("Cannot open '%1'").arg(fileName));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return f.write(doc.toByteArray(4)) >= 0;
|
return f.write(doc.toByteArray(4)) >= 0;
|
||||||
|
@@ -169,6 +169,7 @@ public:
|
|||||||
|
|
||||||
class BookmarkViewFactory : public Core::INavigationWidgetFactory
|
class BookmarkViewFactory : public Core::INavigationWidgetFactory
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
BookmarkViewFactory(BookmarkManager *bm);
|
BookmarkViewFactory(BookmarkManager *bm);
|
||||||
QString displayName() const;
|
QString displayName() const;
|
||||||
|
@@ -84,6 +84,7 @@ private:
|
|||||||
|
|
||||||
class OpenEditorsViewFactory : public Core::INavigationWidgetFactory
|
class OpenEditorsViewFactory : public Core::INavigationWidgetFactory
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
OpenEditorsViewFactory();
|
OpenEditorsViewFactory();
|
||||||
~OpenEditorsViewFactory();
|
~OpenEditorsViewFactory();
|
||||||
|
@@ -322,7 +322,6 @@ static inline QStringList parseLists(QIODevice *io)
|
|||||||
int tableColumn = 0;
|
int tableColumn = 0;
|
||||||
|
|
||||||
const QString hrefAttribute = QLatin1String("href");
|
const QString hrefAttribute = QLatin1String("href");
|
||||||
//: Unknown user of paste.
|
|
||||||
QString link;
|
QString link;
|
||||||
QString title;
|
QString title;
|
||||||
QString age;
|
QString age;
|
||||||
|
@@ -55,6 +55,7 @@ class GerritParameters;
|
|||||||
|
|
||||||
class GerritOptionsWidget : public QWidget
|
class GerritOptionsWidget : public QWidget
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit GerritOptionsWidget(QWidget *parent = 0);
|
explicit GerritOptionsWidget(QWidget *parent = 0);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user