diff options
author | Thomas Hartmann <Thomas.Hartmann@nokia.com> | 2010-10-06 11:48:24 +0200 |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2010-10-08 14:54:30 +1000 |
commit | e1568b04816465df45b7f974a1031791943bf4f0 (patch) | |
tree | ee093d85a8a4a8a9918a7b933c25d96704eaf43d | |
parent | 000540cfd13bfdb7743fc5c9e931989ba982dbc0 (diff) |
Fixes assert in QDeclarativeWebView
If QDeclarativeWebView was instantiated twice
an assert was triggered by QWebSettings::enablePersistentStorage();
This patch is crtical for tooling (Bauhaus)
Task-number: QTBUG-14278
Reviewed-by: Aaron Kennedy
(cherry picked from commit f532679ca11914b453e22342f2ae5e9f790ce47a)
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp index 94f08bdf02..e4f70deb76 100644 --- a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp @@ -249,7 +249,11 @@ void QDeclarativeWebView::init() { d = new QDeclarativeWebViewPrivate(this); - QWebSettings::enablePersistentStorage(); + if (QWebSettings::iconDatabasePath().isNull() && + QWebSettings::globalSettings()->localStoragePath().isNull() && + QWebSettings::offlineStoragePath().isNull() && + QWebSettings::offlineWebApplicationCachePath().isNull()) + QWebSettings::enablePersistentStorage(); setAcceptedMouseButtons(Qt::LeftButton); setFlag(QGraphicsItem::ItemHasNoContents, true); |