diff options
author | kh1 <karsten.heimrich@digia.com> | 2014-04-10 11:07:09 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@digia.com> | 2014-04-23 13:35:53 +0200 |
commit | f91f630fa2294d70f27c4c88dfa331a9f81f5387 (patch) | |
tree | 88c4bb900f0bbe58d7179e6de8936ed9819af314 /tools | |
parent | b138cbfed60815b26b417a308a8fee824dab5228 (diff) |
Make sure we read the script content as UTF8.
Task-number: QTIFW-485
Change-Id: Id09365207c6f5b1312fb85ad67443f7e51a1944e
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/common/repositorygen.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/common/repositorygen.cpp b/tools/common/repositorygen.cpp index 11063e789..a5634f25f 100644 --- a/tools/common/repositorygen.cpp +++ b/tools/common/repositorygen.cpp @@ -299,12 +299,12 @@ void QInstallerTools::copyMetaData(const QString &_targetDir, const QString &met .arg(scriptFile.fileName())); } - QString scriptContent = QString::fromLatin1( - "(function() {" - " %1;" + const QString scriptContent = QLatin1String("(function() {") + + QString::fromUtf8(scriptFile.readAll()) + + QLatin1String(";" " if (typeof Component == \"undefined\")" " throw \"Missing Component constructor. Please check your script.\";" - "})();").arg(QTextStream(&scriptFile).readAll()); + "})();"); // if the user isn't aware of the downloadable archives value we will add it automatically later foundDownloadableArchives |= scriptContent.contains(QLatin1String("addDownloadableArchive")) |