Unsolved QtWebkit : what is default path for LocalStorage
-
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.
-
@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