forked from qt-creator/qt-creator
Fix i18n problems
In the QmlEngine, a few tr() have been replaced by QCoreApplication::translate(). In other files, Q_OBJECT has been added to the class definitions. Change-Id: Ia0505c19934dc691cd3d67f4946293290c2fec68 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -109,6 +109,7 @@ private:
|
||||
|
||||
class AndroidDeviceModelDelegate : public QStyledItemDelegate
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AndroidDeviceModelDelegate(QObject * parent = 0)
|
||||
: QStyledItemDelegate(parent)
|
||||
@@ -239,6 +240,7 @@ public:
|
||||
|
||||
class AndroidDeviceModel : public QAbstractItemModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AndroidDeviceModel(int apiLevel, const QString &abi, AndroidConfigurations::Options options);
|
||||
QModelIndex index(int row, int column,
|
||||
@@ -663,3 +665,5 @@ void AndroidDeviceDialog::defaultDeviceClear()
|
||||
m_ui->lookingForDeviceCancel->setVisible(false);
|
||||
m_defaultDevice.clear();
|
||||
}
|
||||
|
||||
#include "androiddevicedialog.moc"
|
||||
|
||||
@@ -378,6 +378,7 @@ void CMakeToolItemConfigWidget::load(const CMakeToolTreeItem *item)
|
||||
|
||||
class CMakeToolConfigWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CMakeToolConfigWidget() : m_currentItem(0)
|
||||
{
|
||||
@@ -572,3 +573,5 @@ void CMakeSettingsPage::finish()
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace CMakeProjectManager
|
||||
|
||||
#include "cmakesettingspage.moc"
|
||||
|
||||
@@ -63,6 +63,7 @@ namespace Internal {
|
||||
|
||||
class GdbOptionsPageWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GdbOptionsPageWidget();
|
||||
Utils::SavedActionSet group;
|
||||
@@ -70,6 +71,7 @@ public:
|
||||
|
||||
class GdbOptionsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GdbOptionsPage();
|
||||
|
||||
@@ -337,6 +339,7 @@ void GdbOptionsPage::finish()
|
||||
|
||||
class GdbOptionsPageWidget2 : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GdbOptionsPageWidget2();
|
||||
|
||||
@@ -437,6 +440,7 @@ GdbOptionsPageWidget2::GdbOptionsPageWidget2()
|
||||
// The "Dangerous" options.
|
||||
class GdbOptionsPage2 : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GdbOptionsPage2();
|
||||
|
||||
@@ -488,3 +492,5 @@ void addGdbOptionPages(QList<IOptionsPage *> *opts)
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Debugger
|
||||
|
||||
#include "gdboptionspage.moc"
|
||||
|
||||
@@ -1214,7 +1214,7 @@ void QmlEnginePrivate::updateScriptSource(const QString &fileName, int lineOffse
|
||||
}
|
||||
|
||||
//update open editors
|
||||
QString titlePattern = tr("JS Source for %1").arg(fileName);
|
||||
QString titlePattern = QCoreApplication::translate("QmlEngine", "JS Source for %1").arg(fileName);
|
||||
//Check if there are open editors with the same title
|
||||
foreach (IDocument *doc, DocumentModel::openedDocuments()) {
|
||||
if (doc->displayName() == titlePattern) {
|
||||
@@ -2135,7 +2135,7 @@ StackFrame QmlEnginePrivate::extractStackFrame(const QVariant &bodyVal)
|
||||
QmlV8ObjectData objectData = extractData(body.value(_("func")));
|
||||
QString functionName = objectData.value.toString();
|
||||
if (functionName.isEmpty())
|
||||
functionName = tr("Anonymous Function");
|
||||
functionName = QCoreApplication::translate("QmlEngine", "Anonymous Function");
|
||||
stackFrame.function = functionName;
|
||||
|
||||
objectData = extractData(body.value(_("script")));
|
||||
|
||||
@@ -228,6 +228,7 @@ static Core::Id idFromScript(const QString &target)
|
||||
|
||||
class PythonProjectManager : public IProjectManager
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
PythonProjectManager() {}
|
||||
|
||||
@@ -366,6 +367,7 @@ private:
|
||||
|
||||
class PythonRunConfigurationWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
PythonRunConfigurationWidget(PythonRunConfiguration *runConfiguration, QWidget *parent = 0);
|
||||
void setInterpreter(const QString &interpreter);
|
||||
@@ -379,6 +381,7 @@ private:
|
||||
|
||||
class PythonRunConfiguration : public RunConfiguration
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
PythonRunConfiguration(Target *parent, Core::Id id);
|
||||
|
||||
@@ -405,6 +408,7 @@ private:
|
||||
|
||||
class PythonRunControl : public RunControl
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
PythonRunControl(PythonRunConfiguration *runConfiguration, Core::Id mode);
|
||||
|
||||
@@ -1270,3 +1274,5 @@ QSet<QString> PythonEditorPlugin::builtins()
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace PythonEditor
|
||||
|
||||
#include "pythoneditorplugin.moc"
|
||||
|
||||
Reference in New Issue
Block a user