Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved QtWebkit : what is default path for LocalStorage

    Qt WebKit
    2
    2
    1338
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      Raju Nimbalkar last edited by

      I am using Qt 5.5. I have enabled Qt LocalStorage attribute using
      mpWebView->settings()->setAttribute(QWebSettings::LocalStorageEnabled, true);

      What will be the default local storage path.
      Note that I have not set offline Storage Path (setOfflineStoragePath) and also did not enable persistent cookie (enablePersistentStorage).
      When I get storage path on settings I get empty string.
      QString testStoragePath = settings->localStoragePath();
      // testStoragePath is empty.

      What will be the default local storage path.? and where cookies will be shared in local storage on disk.

      K 1 Reply Last reply Reply Quote 0
      • K
        Konstantin Tokarev @Raju Nimbalkar last edited by

        @Raju-Nimbalkar said in QtWebkit : what is default path for LocalStorage:

        What will be the default local storage path.?

        It will be empty. This may result in using current working directory, or break feature, I cannot say without trying. Please try it and report what happens.

        and where cookies will be shared in local storage on disk

        QtWebKit (more precisely, widgets API of QtWebKit that you are using) does not store cookies on disk. You should do it yourself by installing your QNetworkCookieJar subclass that serialize and deserialize cookies. You can find (quite advanced) example of persistent cookie jar at https://github.com/annulen/webkit/blob/qtwebkit-stable/Tools/QtTestBrowser/cookiejar.cpp

        1 Reply Last reply Reply Quote 0
        • First post
          Last post