Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-84354

Again - Call QtWebView::initialize() write Warning: QtWebEngine::initialize() called with QCoreApplication object already created and should be call before. This is depreciated and may fail in the future.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P3: Somewhat important
    • None
    • 5.13.2, 5.14.2
    • WebEngine, WebView
    • None
    • All, Linux/X11
    • d47cad5ca5c3788fedc0a53930e47efb869f9315 (qt/qtwebview/5.15)

    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.

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            michal Michal Klocek
            hansdijkema Hans Dijkema
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes