Details
Description
kIf I run application with call
QtWebEngine::initialize();
It generate this message in console:
QtWebEngine::initialize() called with QCoreApplication object already created and should be call before. This is depreciated and may fail in the future. Attribute Qt::AA_ShareOpenGLContexts must be set before QCoreApplication is created.
I can reproduce it on WebView Example from Qt, so it can be used as minimal code for reproducing.
Looks like WebView plugin instance init call QtWebEngine::initialize() method, but it has check in his body:
void initialize() { QCoreApplication *app = QCoreApplication::instance(); if (app) { qWarning("QtWebEngine::initialize() called with QCoreApplication object already created and should be call before. "\ "This is depreciated and may fail in the future."); QtWebEngineCore::initialize(); return; } // call initialize the same way as widgets do qAddPreRoutine(QtWebEngineCore::initialize); }
So we have inconsistency: QtWebView::initialize() must be called after application instance creation, but QtWebEngine::initialize() must be called before.