summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@digia.com>2014-06-02 15:14:12 +0200
committerKarsten Heimrich <karsten.heimrich@digia.com>2014-06-03 10:51:51 +0200
commit8addcf763bc0644de1f3548a2a65876aed65a7c9 (patch)
tree12f2735f9e757d415f5200000de17b3231b9c053 /tools
parent3aaca15ef8a8dd13ba877821a3683ba86241be9b (diff)
Replace script with js engine.
Change-Id: Ic9c88e27dca1e936ba09a3776df3df7ec166c606 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/archivegen/archivegen.pro2
-rw-r--r--tools/binarycreator/binarycreator.pro2
-rw-r--r--tools/common/repositorygen.cpp10
-rw-r--r--tools/repogen/repogen.pro2
4 files changed, 8 insertions, 8 deletions
diff --git a/tools/archivegen/archivegen.pro b/tools/archivegen/archivegen.pro
index 51bccb11b..135c34010 100644
--- a/tools/archivegen/archivegen.pro
+++ b/tools/archivegen/archivegen.pro
@@ -5,7 +5,7 @@ INCLUDEPATH += . .. ../common
include(../../installerfw.pri)
QT -= gui
-QT += script xml
+QT += qml xml
CONFIG += console
DESTDIR = $$IFW_APP_PATH
diff --git a/tools/binarycreator/binarycreator.pro b/tools/binarycreator/binarycreator.pro
index 88e3464d9..674fbdbe8 100644
--- a/tools/binarycreator/binarycreator.pro
+++ b/tools/binarycreator/binarycreator.pro
@@ -5,7 +5,7 @@ INCLUDEPATH += . .. rcc ../common
include(../../installerfw.pri)
QT -= gui
-QT += script xml
+QT += qml xml
CONFIG += console
DESTDIR = $$IFW_APP_PATH
diff --git a/tools/common/repositorygen.cpp b/tools/common/repositorygen.cpp
index a5634f25f..b99b538f9 100644
--- a/tools/common/repositorygen.cpp
+++ b/tools/common/repositorygen.cpp
@@ -310,12 +310,12 @@ void QInstallerTools::copyMetaData(const QString &_targetDir, const QString &met
foundDownloadableArchives |= scriptContent.contains(QLatin1String("addDownloadableArchive"))
|| scriptContent.contains(QLatin1String("removeDownloadableArchive"));
- static QScriptEngine testScriptEngine;
- testScriptEngine.evaluate(scriptContent, scriptFile.fileName());
- if (testScriptEngine.hasUncaughtException()) {
+ static QInstaller::ScriptEngine testScriptEngine;
+ const QJSValue value = testScriptEngine.evaluate(scriptContent, scriptFile.fileName());
+ if (value.isError()) {
throw QInstaller::Error(QString::fromLatin1("Exception while loading component "
- "script: '%1'").arg(QInstaller::uncaughtExceptionString(&testScriptEngine,
- scriptFile.fileName())));
+ "script: '%1'. (%2)").arg(scriptFile.fileName(), value.toString().isEmpty() ?
+ QString::fromLatin1("Unknown error.") : value.toString()));
}
// add RequiresAdminRights tag to xml if addElevatedOperation is used somewhere
diff --git a/tools/repogen/repogen.pro b/tools/repogen/repogen.pro
index 7fad2ad96..e6ee4476a 100644
--- a/tools/repogen/repogen.pro
+++ b/tools/repogen/repogen.pro
@@ -5,7 +5,7 @@ INCLUDEPATH += . .. ../common
include(../../installerfw.pri)
QT -= gui
-QT += script xml
+QT += qml xml
CONFIG += console
DESTDIR = $$IFW_APP_PATH