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