diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-10-15 14:12:34 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-10-16 11:07:32 +0000 |
commit | 7e6ef9548432e96deff0c8e525f5db26b301c9ec (patch) | |
tree | 4fe8cf2860a7f6ee24294fdcbdc460dd36cee666 /src | |
parent | af88b614c4161090001cbe2a34e6f991c02cb088 (diff) |
Document QtWebEngine::initialize()
Change-Id: If0dd01dadfb65cdf36f996347ef625c082057b56
Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/webengine/api/qtwebengineglobal.cpp | 25 | ||||
-rw-r--r-- | src/webengine/doc/qtwebengine.qdocconf | 2 | ||||
-rw-r--r-- | src/webengine/doc/src/qtwebengine-modules.qdoc | 3 |
3 files changed, 27 insertions, 3 deletions
diff --git a/src/webengine/api/qtwebengineglobal.cpp b/src/webengine/api/qtwebengineglobal.cpp index 1c67e710e..db9d7552d 100644 --- a/src/webengine/api/qtwebengineglobal.cpp +++ b/src/webengine/api/qtwebengineglobal.cpp @@ -47,6 +47,17 @@ Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context(); namespace QtWebEngine { +/*! + \namespace QtWebEngine + \inmodule QtWebEngine + \ingroup qtwebengine-namespaces + \keyword QtWebEngine Namespace + + \brief Helper functions for the Qt WebEngine (Qt Quick) module + + The \l[CPP]{QtWebEngine} namespace is part of the Qt WebEngine module. +*/ + static QOpenGLContext *shareContext; static void deleteShareContext() @@ -59,6 +70,16 @@ static void deleteShareContext() // QtWebEngine::initialize was introduced first and meant to be called // after the QGuiApplication creation, when AA_ShareOpenGLContexts fills // the same need but the flag has to be set earlier. + +/*! + \fn QtWebEngine::initialize() + + Sets up an OpenGL Context that can be shared between processes. This has to be done after + QGuiApplication is created, but before a Qt Quick window is created. + + This has the same effect as passing Qt::AA_ShareOpenGLContexts to the QGuiApplication + constructor. +*/ void initialize() { #ifdef Q_OS_WIN32 @@ -71,11 +92,11 @@ void initialize() QCoreApplication *app = QCoreApplication::instance(); if (!app) { - qFatal("QWebEngine(Widgets)::initialize() must be called after the construction of the application object."); + qFatal("QtWebEngine::initialize() must be called after the construction of the application object."); return; } if (app->thread() != QThread::currentThread()) { - qFatal("QWebEngine(Widgets)::initialize() must be called from the Qt gui thread."); + qFatal("QtWebEngine::initialize() must be called from the Qt gui thread."); return; } diff --git a/src/webengine/doc/qtwebengine.qdocconf b/src/webengine/doc/qtwebengine.qdocconf index e277f4190..21645527a 100644 --- a/src/webengine/doc/qtwebengine.qdocconf +++ b/src/webengine/doc/qtwebengine.qdocconf @@ -67,4 +67,4 @@ navigation.landingpage = "Qt WebEngine" navigation.cppclassespage = "Qt WebEngine C++ Classes" navigation.qmltypespage = "Qt WebEngine QML Types" -Cpp.ignoretokens += QWEBENGINEWIDGETS_EXPORT +Cpp.ignoretokens += Q_WEBENGINE_EXPORT QWEBENGINEWIDGETS_EXPORT diff --git a/src/webengine/doc/src/qtwebengine-modules.qdoc b/src/webengine/doc/src/qtwebengine-modules.qdoc index 2e1b4c947..8530f5d01 100644 --- a/src/webengine/doc/src/qtwebengine-modules.qdoc +++ b/src/webengine/doc/src/qtwebengine-modules.qdoc @@ -32,6 +32,9 @@ \e {Qt WebEngine} provides functionality for rendering regions of dynamic web content. + \section1 Namespaces + \annotatedlist qtwebengine-namespaces + \section1 Classes \section2 Qt WebEngineCore Module |