From d47cad5ca5c3788fedc0a53930e47efb869f9315 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Tue, 14 Apr 2020 12:37:14 +0200 Subject: Fix WebView::initialize() call order MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QWebEngine should be initialized before QGuiApplication. The other way around is deprecated. Update docs and example. Initialize call is also used by darwin plugin but it should not matter in this case. Fixes: QTBUG-80912 Task-number: QTBUG-76391 Change-Id: I1037346707a3f4e24286ccaba25f8e5c3301ef36 Reviewed-by: Christian Strømme Reviewed-by: Leena Miettinen --- examples/webview/minibrowser/doc/src/minibrowser.qdoc | 2 +- examples/webview/minibrowser/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/webview/minibrowser/doc/src/minibrowser.qdoc b/examples/webview/minibrowser/doc/src/minibrowser.qdoc index 3532861..20f03b0 100644 --- a/examples/webview/minibrowser/doc/src/minibrowser.qdoc +++ b/examples/webview/minibrowser/doc/src/minibrowser.qdoc @@ -37,7 +37,7 @@ couple of controls to navigate through the browsing history. \note When using the Qt WebView module it is necessary to call QtWebView::initialize() - right after creating the QGuiApplication instance. Calling QtWebView::initialize() will + before creating the QGuiApplication instance. Calling QtWebView::initialize() will ensure that the necessary pre-setup steps are run. \snippet minibrowser/main.cpp 0 diff --git a/examples/webview/minibrowser/main.cpp b/examples/webview/minibrowser/main.cpp index 8f56731..8b4718f 100644 --- a/examples/webview/minibrowser/main.cpp +++ b/examples/webview/minibrowser/main.cpp @@ -79,8 +79,8 @@ QUrl Utils::fromUserInput(const QString& userInput) int main(int argc, char *argv[]) { //! [0] - QGuiApplication app(argc, argv); QtWebView::initialize(); + QGuiApplication app(argc, argv); //! [0] QGuiApplication::setApplicationDisplayName(QCoreApplication::translate("main", "QtWebView Example")); -- cgit v1.2.3