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?
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);
QApplication::setApplicationName(TEXTAPPLICATION);
QApplication::setApplicationVersion(TEXTAPPVERSION);
QApplication::setOrganizationName(TEXTORG);
QApplication::setOrganizationDomain(TEXTORGDOMAIN);
QSettings settings;
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);
To copy to clipboard, switch view to plain text mode
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()
Bookmarks