From 753acdcf82d3371dc6de12b8c5980486b74658c6 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 25 May 2012 16:21:19 +0200 Subject: tr()-Fixes in master. - Add missing Q_OBJECTS - Clean up Android, fix capitalization, remove redundant translations. Change-Id: I24583b7e363ff8f90cad3b8257b676888e8a59db Reviewed-by: hjk --- src/plugins/android/androidconfigurations.cpp | 7 ++++--- src/plugins/android/androiddeploystepwidget.cpp | 4 +++- src/plugins/android/androidpackagecreationstep.cpp | 8 ++++---- .../android/androidpackagecreationwidget.cpp | 4 ++-- .../android/androidpackageinstallationstep.cpp | 17 ++++++++++++----- .../android/androidpackageinstallationstep.h | 1 + src/plugins/android/androidrunner.cpp | 2 +- src/plugins/android/androidsettingswidget.cpp | 21 +++++++++++++-------- src/plugins/android/androidtarget.cpp | 4 ++-- src/plugins/bookmarks/bookmarkmanager.h | 1 + .../coreplugin/editormanager/openeditorsview.h | 1 + src/plugins/cpaster/pastebindotcomprotocol.cpp | 1 - src/plugins/git/gerrit/gerritoptionspage.h | 1 + 13 files changed, 45 insertions(+), 27 deletions(-) (limited to 'src') diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp index 96b4b17c8a..2427756d5d 100644 --- a/src/plugins/android/androidconfigurations.cpp +++ b/src/plugins/android/androidconfigurations.cpp @@ -425,9 +425,10 @@ bool AndroidConfigurations::createAVD(int minApiLevel) const QStringListModel model(sdkTargets(minApiLevel)); avdDialog.targetComboBox->setModel(&model); if (!model.rowCount()) { - QMessageBox::critical(0, tr("Create AVD error"), - tr("Can't create a new AVD, not enough android SDKs available\n" - "Please install one SDK with api version >=%1").arg(minApiLevel)); + QMessageBox::critical(0, tr("Create AVD Error"), + tr("Cannot create a new AVD, not enough android SDKs available\n" + "Please install one SDK with api version >=%1"). + arg(minApiLevel)); return false; } diff --git a/src/plugins/android/androiddeploystepwidget.cpp b/src/plugins/android/androiddeploystepwidget.cpp index 3eafae6e54..9dce27ce61 100644 --- a/src/plugins/android/androiddeploystepwidget.cpp +++ b/src/plugins/android/androiddeploystepwidget.cpp @@ -96,7 +96,9 @@ void AndroidDeployStepWidget::setDeployLocalQtLibs() 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()) m_step->setDeployQASIPackagePath(packagePath); } diff --git a/src/plugins/android/androidpackagecreationstep.cpp b/src/plugins/android/androidpackagecreationstep.cpp index 12a772a3c8..f42a4e834f 100644 --- a/src/plugins/android/androidpackagecreationstep.cpp +++ b/src/plugins/android/androidpackagecreationstep.cpp @@ -198,8 +198,8 @@ void AndroidPackageCreationStep::checkRequiredLibraries() QProcess readelfProc; QString appPath = androidTarget()->targetApplicationPath(); if (!QFile::exists(appPath)) { - raiseError(tr("Can't find read elf information"), - tr("Can't find '%1'.\n" + raiseError(tr("Cannot find read elf information"), + tr("Cannot find '%1'.\n" "Please make sure your application is " "built successfully and is selected in Application tab ('Run option') ").arg(appPath)); return; @@ -249,7 +249,7 @@ void AndroidPackageCreationStep::checkRequiredLibrariesForRun() { QProcess readelfProc; 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" "Please make sure your application is " "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()) { build << QLatin1String("debug"); 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)); return false; } diff --git a/src/plugins/android/androidpackagecreationwidget.cpp b/src/plugins/android/androidpackagecreationwidget.cpp index 1b0c31743b..e1d62e0fe6 100644 --- a/src/plugins/android/androidpackagecreationwidget.cpp +++ b/src/plugins/android/androidpackagecreationwidget.cpp @@ -300,7 +300,7 @@ void AndroidPackageCreationWidget::setPackageName() { const QString packageName= m_ui->packageNameLineEdit->text(); 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" "Please choose a valid package name for your application (e.g. \"org.example.myapplication\").") .arg(packageName)); @@ -524,7 +524,7 @@ void AndroidPackageCreationWidget::on_KeystoreLocationPushButton_clicked() QString keystorePath = m_step->keystorePath(); if (!keystorePath.length()) 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()) return; m_ui->KeystoreLocationLineEdit->setText(file); diff --git a/src/plugins/android/androidpackageinstallationstep.cpp b/src/plugins/android/androidpackageinstallationstep.cpp index 2d3fb6eeb4..f1a1efc4ca 100644 --- a/src/plugins/android/androidpackageinstallationstep.cpp +++ b/src/plugins/android/androidpackageinstallationstep.cpp @@ -41,16 +41,23 @@ using namespace Android::Internal; 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) { - setDefaultDisplayName(tr("Copy application data")); - setDisplayName(tr("Copy application data")); + const QString name = stepDisplayName(); + setDefaultDisplayName(name); + setDisplayName(name); } AndroidPackageInstallationStep::AndroidPackageInstallationStep(ProjectExplorer::BuildStepList *bc, AndroidPackageInstallationStep *other): MakeStep(bc, other) { - setDefaultDisplayName(tr("Copy application data")); - setDisplayName(tr("Copy application data")); + const QString name = stepDisplayName(); + setDefaultDisplayName(name); + setDisplayName(name); } AndroidPackageInstallationStep::~AndroidPackageInstallationStep() @@ -61,7 +68,7 @@ bool AndroidPackageInstallationStep::init() { AndroidTarget *androidTarget = qobject_cast(target()); 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; } diff --git a/src/plugins/android/androidpackageinstallationstep.h b/src/plugins/android/androidpackageinstallationstep.h index 8b0b269d4a..7433359aa6 100644 --- a/src/plugins/android/androidpackageinstallationstep.h +++ b/src/plugins/android/androidpackageinstallationstep.h @@ -40,6 +40,7 @@ namespace Internal { class AndroidPackageInstallationStep : public Qt4ProjectManager::MakeStep { + Q_OBJECT friend class AndroidPackageInstallationFactory; public: explicit AndroidPackageInstallationStep(ProjectExplorer::BuildStepList *bsl); diff --git a/src/plugins/android/androidrunner.cpp b/src/plugins/android/androidrunner.cpp index 4b30bee178..fe578c4ff8 100644 --- a/src/plugins/android/androidrunner.cpp +++ b/src/plugins/android/androidrunner.cpp @@ -191,7 +191,7 @@ void AndroidRunner::asyncStart() checkPID(); } 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; } diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp index 73e259f374..48fa82af5e 100644 --- a/src/plugins/android/androidsettingswidget.cpp +++ b/src/plugins/android/androidsettingswidget.cpp @@ -312,7 +312,7 @@ void AndroidSettingsWidget::openJDKLocationEditingFinished() 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)) return; m_ui->SDKLocationLineEdit->setText(dir); @@ -321,7 +321,7 @@ void AndroidSettingsWidget::browseSDKLocation() 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)) return; m_ui->NDKLocationLineEdit->setText(dir); @@ -340,7 +340,8 @@ void AndroidSettingsWidget::browseAntLocation() dir = QLatin1String("/opt/local/bin/ant"); QLatin1String antApp("ant"); #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()) return; m_ui->AntLocationLineEdit->setText(file); @@ -350,7 +351,7 @@ void AndroidSettingsWidget::browseAntLocation() void AndroidSettingsWidget::browseGdbLocation() { 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()) return; m_ui->GdbLocationLineEdit->setText(file); @@ -360,7 +361,8 @@ void AndroidSettingsWidget::browseGdbLocation() void AndroidSettingsWidget::browseGdbserverLocation() { 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()) return; m_ui->GdbserverLocationLineEdit->setText(file); @@ -370,7 +372,8 @@ void AndroidSettingsWidget::browseGdbserverLocation() void AndroidSettingsWidget::browseGdbLocationX86() { 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()) return; m_ui->GdbLocationLineEditx86->setText(file); @@ -380,7 +383,8 @@ void AndroidSettingsWidget::browseGdbLocationX86() void AndroidSettingsWidget::browseGdbserverLocationX86() { 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()) return; m_ui->GdbserverLocationLineEditx86->setText(file); @@ -390,7 +394,8 @@ void AndroidSettingsWidget::browseGdbserverLocationX86() void AndroidSettingsWidget::browseOpenJDKLocation() { 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()) return; m_ui->OpenJDKLocationLineEdit->setText(file); diff --git a/src/plugins/android/androidtarget.cpp b/src/plugins/android/androidtarget.cpp index 292b4ceaf3..7367c9645c 100644 --- a/src/plugins/android/androidtarget.cpp +++ b/src/plugins/android/androidtarget.cpp @@ -462,7 +462,7 @@ bool AndroidTarget::openXmlFile(QDomDocument &doc, const QString &fileName, bool return false; if (!doc.setContent(f.readAll())) { - raiseError(tr("Can't parse '%1'").arg(fileName)); + raiseError(tr("Cannot parse '%1'").arg(fileName)); return false; } return true; @@ -475,7 +475,7 @@ bool AndroidTarget::saveXmlFile(QDomDocument &doc, const QString &fileName) cons QFile f(fileName); if (!f.open(QIODevice::WriteOnly)) { - raiseError(tr("Can't open '%1'").arg(fileName)); + raiseError(tr("Cannot open '%1'").arg(fileName)); return false; } return f.write(doc.toByteArray(4)) >= 0; diff --git a/src/plugins/bookmarks/bookmarkmanager.h b/src/plugins/bookmarks/bookmarkmanager.h index c772e8836f..50273002b4 100644 --- a/src/plugins/bookmarks/bookmarkmanager.h +++ b/src/plugins/bookmarks/bookmarkmanager.h @@ -169,6 +169,7 @@ public: class BookmarkViewFactory : public Core::INavigationWidgetFactory { + Q_OBJECT public: BookmarkViewFactory(BookmarkManager *bm); QString displayName() const; diff --git a/src/plugins/coreplugin/editormanager/openeditorsview.h b/src/plugins/coreplugin/editormanager/openeditorsview.h index 9bb4ac4bfd..e69e96624f 100644 --- a/src/plugins/coreplugin/editormanager/openeditorsview.h +++ b/src/plugins/coreplugin/editormanager/openeditorsview.h @@ -84,6 +84,7 @@ private: class OpenEditorsViewFactory : public Core::INavigationWidgetFactory { + Q_OBJECT public: OpenEditorsViewFactory(); ~OpenEditorsViewFactory(); diff --git a/src/plugins/cpaster/pastebindotcomprotocol.cpp b/src/plugins/cpaster/pastebindotcomprotocol.cpp index 9cd8dc6ed0..6914dc4a16 100644 --- a/src/plugins/cpaster/pastebindotcomprotocol.cpp +++ b/src/plugins/cpaster/pastebindotcomprotocol.cpp @@ -322,7 +322,6 @@ static inline QStringList parseLists(QIODevice *io) int tableColumn = 0; const QString hrefAttribute = QLatin1String("href"); - //: Unknown user of paste. QString link; QString title; QString age; diff --git a/src/plugins/git/gerrit/gerritoptionspage.h b/src/plugins/git/gerrit/gerritoptionspage.h index 37486dfb71..fc0fdaee02 100644 --- a/src/plugins/git/gerrit/gerritoptionspage.h +++ b/src/plugins/git/gerrit/gerritoptionspage.h @@ -55,6 +55,7 @@ class GerritParameters; class GerritOptionsWidget : public QWidget { + Q_OBJECT public: explicit GerritOptionsWidget(QWidget *parent = 0); -- cgit v1.2.1