path: root/src/process/main.cpp
diff options
authorMichael BrĂ¼ning <>2014-09-11 17:17:11 +0200
committerMichael Bruning <>2014-09-30 19:20:18 +0200
commit485e4965f355d96bd257d754dc28abc75c6be841 (patch)
tree3287764ae76f1aa6795ddc506f45f8faae48072f /src/process/main.cpp
parentfa05ae77ded8c5ddc109bf7acfcb8b833b6b80f9 (diff)
Create a QCoreApplication in QtWebEngineProcess as well.
A QCoreApplication is needed in order to correctly load the configuration from qt.conf and setup the Qt environment variables accordingly. This is important to be able to deploy applications. This patch creates a dummy QCoreApplication in process main to have the environment setup correctly. Change-Id: If536b9edf357d5925fee02f2528872101139f87e Reviewed-by: Simon Hausmann <>
Diffstat (limited to 'src/process/main.cpp')
1 files changed, 5 insertions, 0 deletions
diff --git a/src/process/main.cpp b/src/process/main.cpp
index ec523ad9b..c340b1965 100644
--- a/src/process/main.cpp
+++ b/src/process/main.cpp
@@ -36,6 +36,7 @@
#include "process_main.h"
+#include <QCoreApplication>
#include <stdio.h>
#if defined(OS_LINUX)
@@ -147,6 +148,10 @@ int stat64_proxy(const char *path, struct stat64 *buf)
int main(int argc, const char **argv)
+ // QCoreApplication needs a non-const pointer, while the
+ // ContentMain in Chromium needs the pointer to be const.
+ QCoreApplication qtApplication(argc, const_cast<char**>(argv));
return QtWebEngine::processMain(argc, argv);