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:
Sergey Belyashov
2015-07-23 14:31:43 +03:00
parent ac7f32e4c2
commit 007daabff5
5 changed files with 21 additions and 2 deletions

View File

@@ -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")));