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

QWebEngineProfile: Using custom persistent storage path still produces empty folder at default storage path location

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.5.8, 6.8.2
    • WebEngine
    • Windows 10 22H2

      Code

      int main(int argc, char* argv[])
      {
          QApplication app(argc, argv);
      
          QWebEngineProfile p("MyBrowser");
          p.setHttpCacheType(QWebEngineProfile::DiskHttpCache);
          p.setCachePath("D:/MyBrowser");
          p.setPersistentStoragePath("D:/MyBrowser");
      
          QWebEngineView view(&p);
          view.setUrl(QUrl{"chrome://qt"});
          view.show();
      
          app.exec();
      }
      

       

      Outcomes
      The following folder is created, but it shouldn't:

      C:\Users\<USERNAME>\AppData\Roaming\<PROJECTNAME>\QtWebEngine\MyBrowser
      

       

      Workaround
      Manually delete the folder after the QWebEngineView opens

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

            qt_webengine_team Qt WebEngine Team
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes