Commit 2acc96c8 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

tr()-Fixes.

parent 6639da4d
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include <QtCore/QMargins> #include <QtCore/QMargins>
#include <QtCore/QTimer> #include <QtCore/QTimer>
#include <QtGui/QApplication> #include <QtCore/QCoreApplication>
#include <QtGui/QComboBox> #include <QtGui/QComboBox>
#include <QtGui/QInputDialog> #include <QtGui/QInputDialog>
#include <QtGui/QLabel> #include <QtGui/QLabel>
...@@ -62,7 +62,7 @@ QString BuildSettingsPanelFactory::id() const ...@@ -62,7 +62,7 @@ QString BuildSettingsPanelFactory::id() const
QString BuildSettingsPanelFactory::displayName() const QString BuildSettingsPanelFactory::displayName() const
{ {
return QApplication::tr("Build Settings"); return QCoreApplication::translate("BuildSettingsPanelFactory", "Build Settings");
} }
bool BuildSettingsPanelFactory::supports(Project *project) bool BuildSettingsPanelFactory::supports(Project *project)
...@@ -105,7 +105,7 @@ BuildSettingsPanel::~BuildSettingsPanel() ...@@ -105,7 +105,7 @@ BuildSettingsPanel::~BuildSettingsPanel()
QString BuildSettingsPanel::displayName() const QString BuildSettingsPanel::displayName() const
{ {
return QApplication::tr("Build Settings"); return QCoreApplication::translate("BuildSettingsPanel", "Build Settings");
} }
QWidget *BuildSettingsPanel::widget() const QWidget *BuildSettingsPanel::widget() const
......
...@@ -270,7 +270,7 @@ DependenciesPanel::~DependenciesPanel() ...@@ -270,7 +270,7 @@ DependenciesPanel::~DependenciesPanel()
QString DependenciesPanel::displayName() const QString DependenciesPanel::displayName() const
{ {
return QApplication::tr("Dependencies"); return QCoreApplication::translate("DependenciesPanel", "Dependencies");
} }
QWidget *DependenciesPanel::widget() const QWidget *DependenciesPanel::widget() const
...@@ -299,7 +299,7 @@ QString DependenciesPanelFactory::id() const ...@@ -299,7 +299,7 @@ QString DependenciesPanelFactory::id() const
QString DependenciesPanelFactory::displayName() const QString DependenciesPanelFactory::displayName() const
{ {
return QApplication::tr("Dependencies"); return QCoreApplication::translate("DependenciesPanelFactory", "Dependencies");
} }
bool DependenciesPanelFactory::supports(Project *project) bool DependenciesPanelFactory::supports(Project *project)
......
...@@ -45,7 +45,7 @@ QString EditorSettingsPanelFactory::id() const ...@@ -45,7 +45,7 @@ QString EditorSettingsPanelFactory::id() const
QString EditorSettingsPanelFactory::displayName() const QString EditorSettingsPanelFactory::displayName() const
{ {
return QApplication::tr("Editor Settings"); return QCoreApplication::translate("EditorSettingsPanelFactory", "Editor Settings");
} }
bool EditorSettingsPanelFactory::supports(Project *project) bool EditorSettingsPanelFactory::supports(Project *project)
...@@ -84,7 +84,7 @@ EditorSettingsPanel::~EditorSettingsPanel() ...@@ -84,7 +84,7 @@ EditorSettingsPanel::~EditorSettingsPanel()
QString EditorSettingsPanel::displayName() const QString EditorSettingsPanel::displayName() const
{ {
return QApplication::tr("Editor Settings"); return QCoreApplication::translate("EditorSettingsPanel", "Editor Settings");
} }
QWidget *EditorSettingsPanel::widget() const QWidget *EditorSettingsPanel::widget() const
......
...@@ -100,7 +100,7 @@ QString RunSettingsPanelFactory::id() const ...@@ -100,7 +100,7 @@ QString RunSettingsPanelFactory::id() const
QString RunSettingsPanelFactory::displayName() const QString RunSettingsPanelFactory::displayName() const
{ {
return QApplication::tr("Run Settings"); return QCoreApplication::tr("RunSettingsPanelFactory", "Run Settings");
} }
bool RunSettingsPanelFactory::supports(Project *project) bool RunSettingsPanelFactory::supports(Project *project)
...@@ -142,7 +142,7 @@ RunSettingsPanel::~RunSettingsPanel() ...@@ -142,7 +142,7 @@ RunSettingsPanel::~RunSettingsPanel()
QString RunSettingsPanel::displayName() const QString RunSettingsPanel::displayName() const
{ {
return QApplication::tr("Run Settings"); return QCoreApplication::translate("RunSettingsPanel", "Run Settings");
} }
QWidget *RunSettingsPanel::widget() const QWidget *RunSettingsPanel::widget() const
...@@ -192,7 +192,7 @@ QVariant RunConfigurationsModel::data(const QModelIndex &index, int role) const ...@@ -192,7 +192,7 @@ QVariant RunConfigurationsModel::data(const QModelIndex &index, int role) const
if (row < m_runConfigurations.size()) { if (row < m_runConfigurations.size()) {
RunConfiguration *rc = m_runConfigurations.at(row); RunConfiguration *rc = m_runConfigurations.at(row);
if (rc == m_activeRunConfiguration) if (rc == m_activeRunConfiguration)
return tr("%1 (Active)").arg(rc->displayName()); return QCoreApplication::translate("RunConfigurationsModel", "%1 (Active)").arg(rc->displayName());
return rc->displayName(); return rc->displayName();
} }
} }
......
...@@ -27,9 +27,10 @@ ...@@ -27,9 +27,10 @@
** **
**************************************************************************/ **************************************************************************/
#include <QDebug> #include <QtCore/QDebug>
#include <QtCore/QDir> #include <QtCore/QDir>
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtCore/QCoreApplication>
#include "xuifiledialog.h" #include "xuifiledialog.h"
...@@ -41,7 +42,7 @@ void XUIFileDialog::runOpenFileDialog(const QString& path, QWidget* parent, QObj ...@@ -41,7 +42,7 @@ void XUIFileDialog::runOpenFileDialog(const QString& path, QWidget* parent, QObj
if (dir.isNull()) if (dir.isNull())
dir = XUIFileDialog::defaultFolder(); dir = XUIFileDialog::defaultFolder();
QString caption = QObject::tr("Open file", "XUIFileDialog::runOpenFileDialog"); QString caption = QCoreApplication::translate("QmlDesigner::XUIFileDialog", "Open file");
QString fileName = QFileDialog::getOpenFileName(parent, caption, dir, XUIFileDialog::fileNameFilters().join(";;"), 0, QFileDialog::ReadOnly); QString fileName = QFileDialog::getOpenFileName(parent, caption, dir, XUIFileDialog::fileNameFilters().join(";;"), 0, QFileDialog::ReadOnly);
QmlDesigner::Internal::SignalEmitter emitter; QmlDesigner::Internal::SignalEmitter emitter;
...@@ -63,7 +64,7 @@ void XUIFileDialog::runSaveFileDialog(const QString& path, QWidget* parent, QObj ...@@ -63,7 +64,7 @@ void XUIFileDialog::runSaveFileDialog(const QString& path, QWidget* parent, QObj
dialog->setDirectory(dir); dialog->setDirectory(dir);
dialog->open(receiver, member); dialog->open(receiver, member);
#else // !Q_WS_MAC #else // !Q_WS_MAC
QString caption = QObject::tr("Save file", "XUIFileDialog::runSaveFileDialog"); QString caption = QCoreApplication::translate("QmlDesigner::XUIFileDialog", "Save file");
QString fileName = QFileDialog::getSaveFileName(parent, caption, dir, XUIFileDialog::fileNameFilters().join(";;")); QString fileName = QFileDialog::getSaveFileName(parent, caption, dir, XUIFileDialog::fileNameFilters().join(";;"));
QmlDesigner::Internal::SignalEmitter emitter; QmlDesigner::Internal::SignalEmitter emitter;
...@@ -77,8 +78,8 @@ QStringList XUIFileDialog::fileNameFilters() ...@@ -77,8 +78,8 @@ QStringList XUIFileDialog::fileNameFilters()
QStringList filters; QStringList filters;
filters filters
<< QObject::tr("Declarative UI files (*.qml)", "XUIFileDialog::fileNameFilters") << QCoreApplication::translate("QmlDesigner::XUIFileDialog", "Declarative UI files (*.qml)")
<< QObject::tr("All files (*)", "XUIFileDialog::fileNameFilters"); << QCoreApplication::translate("QmlDesigner::XUIFileDialog", "All files (*)");
return filters; return filters;
} }
......
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