summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@nokia.com>2010-10-06 09:48:24 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2010-10-08 04:54:30 (GMT)
commite1568b04816465df45b7f974a1031791943bf4f0 (patch)
treeee093d85a8a4a8a9918a7b933c25d96704eaf43d
parent000540cfd13bfdb7743fc5c9e931989ba982dbc0 (diff)
downloadQt-e1568b04816465df45b7f974a1031791943bf4f0.zip
Qt-e1568b04816465df45b7f974a1031791943bf4f0.tar.gz
Qt-e1568b04816465df45b7f974a1031791943bf4f0.tar.bz2
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.cpp6
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 94f08bd..e4f70de 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);