diff options
authorAlexandru Croitor <>2017-10-25 17:27:08 +0200
committerAlexandru Croitor <>2017-10-26 07:24:53 +0000
commitaf8039da827e2389236f9acd335648f94cfaad67 (patch)
parenta9452507f484589e15f8947d699be691dcaa4194 (diff)
Fix qwebengine_convert_dict to pick up correct ICU resources location
The conversion tool uses the QLibraryInfo::location() call to find Qt's data directory. When a qt.conf file gets picked up by the application (which is the case for official Qt packages), QLibraryInfo::location() depends on a QCoreApplication instance being available, to query the PrefixPath. If the instance is not available, it simply returns the current directory path, which results in ICU resources not being found. The fix consists in creating a QCoreApplication instance. Task-number: QTBUG-63593 Change-Id: I8f1bba14d4586c42570d309b84418eef611bab0e Reviewed-by: Allan Sandfeld Jensen <>
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/qwebengine_convert_dict/main.cpp b/src/tools/qwebengine_convert_dict/main.cpp
index e7dcc22d..3a1a1ff6 100644
--- a/src/tools/qwebengine_convert_dict/main.cpp
+++ b/src/tools/qwebengine_convert_dict/main.cpp
@@ -30,6 +30,7 @@
#include <QTextStream>
#include <QLibraryInfo>
#include <QDir>
+#include <QCoreApplication>
// see also src/core/type_conversion.h
inline base::FilePath::StringType toFilePathString(const QString &str)
@@ -117,6 +118,11 @@ QString frameworkIcuDataPath()
int main(int argc, char *argv[])
+ // Required only for making QLibraryInfo::location() return a valid path, when the application
+ // picks up a qt.conf file (which is the case for official Qt packages).
+ QCoreApplication app(argc, argv);
+ Q_UNUSED(app);
QTextStream out(stdout);
if (argc != 3) {