summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/scriptengine.cpp
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@digia.com>2014-06-06 13:05:18 +0200
committerKarsten Heimrich <karsten.heimrich@digia.com>2014-06-06 14:09:32 +0200
commitc777742754885c876ebc82f1e49be1a825446657 (patch)
tree3610da77901a8873e2c014240b49467330d78c2a /src/libs/installer/scriptengine.cpp
parent598901e70bc5bbba60055a2b867994a94494c759 (diff)
Expose qsTr to the scripts, makes component error example work.
Change-Id: I73be2490182af8582b3e56b177e8ca26c950fa97 Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
Diffstat (limited to 'src/libs/installer/scriptengine.cpp')
-rw-r--r--src/libs/installer/scriptengine.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libs/installer/scriptengine.cpp b/src/libs/installer/scriptengine.cpp
index 0c7b3a77c..37610cfc9 100644
--- a/src/libs/installer/scriptengine.cpp
+++ b/src/libs/installer/scriptengine.cpp
@@ -65,7 +65,12 @@ ScriptEngine::ScriptEngine(PackageManagerCore *core)
global.setProperty(QLatin1String("InstallerProxy"), proxy);
global.setProperty(QLatin1String("print"), m_engine.newQObject(new ConsoleProxy)
.property(QLatin1String("log")));
-
+#if QT_VERSION < 0x050400
+ global.setProperty(QLatin1String("qsTr"), m_engine.newQObject(new QCoreApplicationProxy)
+ .property(QStringLiteral("qsTr")));
+#else
+ m_engine.installTranslatorFunctions();
+#endif
global.setProperty(QLatin1String("QInstaller"), generateQInstallerObject());
global.setProperty(QLatin1String("buttons"), generateWizardButtonsObject());
global.setProperty(QLatin1String("QMessageBox"), generateMessageBoxObject());