Webkit and Client Side Storage
Hello people.
I been having trouble getting the client side storage working with webkit.
Here is code i'm using can anyone see what i'm doing wrong?
Code:
QWebSettings::enablePersistentStorage(TEXTDATAPATH);
QWebSettings::setOfflineStorageDefaultQuota(MAXQUOTA);
QWebSettings::setOfflineWebApplicationCacheQuota(MAXQUOTA);
QString url
= "http://webkit.org/demos/sticky-notes/index.html";
ui->setupUi(this);
this->setWindowTitle(TEXTAPPLICATION); //set application windows title
ui->webView->settings()->globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
ui->webView->settings()->globalSettings()->setAttribute(QWebSettings::LocalContentCanAccessRemoteUrls, true);
ui->webView->settings()->globalSettings()->setAttribute(QWebSettings::LocalStorageEnabled, true);
ui->webView->settings()->globalSettings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true);
ui->webView->setUrl(url);
I worked out that i'm getting this error in the inspector.
INVALID_STATE_ERR: DOM Exception 11: An attempt was made to use an object that is not, or is no longer, usable.
Seems to have something to do with window.openDatabase()
Re: Webkit and Client Side Storage
I'm having the same issue. I get that exact error in the inspector. I can't figure it out... Could it be a bug in Qt? Because it works just fine in Safari.
Re: Webkit and Client Side Storage
I know it's been a while since this question was posted.. I had the same issue and there is very little information about this error around web.
Indeed, error happens when calling openDatabase within JS and I managed to eliminate it with
Code:
QWebSettings::globalSettings()->setOfflineStoragePath("/some/writable/path/here");