From e68d1ad06599eae1b0785263f3a0863701e6f1bc Mon Sep 17 00:00:00 2001
From: Kai Koehne <kai.koehne@theqtcompany.com>
Date: Fri, 20 Nov 2015 13:38:16 +0100
Subject: [PATCH] Force creation of default WebEngineProfile
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Make sure that the default QWebEngineProfile is created first. This
creates the default WebEngineContext, which in turn initializes global
things like AtExitManager.

Task-number: QTBUG-49557
Change-Id: I9e8f6bd24edd7f4c7e8bb38d91a2c09631824828
Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
---
 src/webengine/api/qquickwebengineprofile.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp
index a678fe5fa..6e734cf66 100644
--- a/src/webengine/api/qquickwebengineprofile.cpp
+++ b/src/webengine/api/qquickwebengineprofile.cpp
@@ -165,6 +165,8 @@ void QQuickWebEngineProfilePrivate::downloadUpdated(const DownloadItemInfo &info
 QQuickWebEngineProfile::QQuickWebEngineProfile()
     : d_ptr(new QQuickWebEngineProfilePrivate(new BrowserContextAdapter(false)))
 {
+    // Sets up the global WebEngineContext
+    QQuickWebEngineProfile::defaultProfile();
     d_ptr->q_ptr = this;
 }
 
-- 
GitLab