Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. QtWebkit : what is default path for LocalStorage
Forum Updated to NodeBB v4.3 + New Features

QtWebkit : what is default path for LocalStorage

Scheduled Pinned Locked Moved Unsolved Qt WebKit
2 Posts 2 Posters 1.7k Views 1 Watching
  • 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 Offline
    R Offline
    Raju Nimbalkar
    wrote on last edited by
    #1

    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
    0
    • R Raju Nimbalkar

      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 Offline
      K Offline
      Konstantin Tokarev
      wrote on last edited by
      #2

      @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
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved