2011-02-10 Ademar de Souza Reis Jr <ademar.reis@openbossa.org>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Feb 2011 22:17:28 +0000 (22:17 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Feb 2011 22:17:28 +0000 (22:17 +0000)
        Reviewed by Andreas Kling.

        [Qt] Fix assert in QDeclarativeWebView
        https://bugs.webkit.org/show_bug.cgi?id=54240

        As reported in:
        http://bugreports.qt.nokia.com/browse/QTBUG-14278

        Instantiating a QDeclarativeWebView twice will trigger an assertion
        when in debug mode.

        Original patch from Thomas Hartmann <Thomas.Hartmann@nokia.com>,
        reviewed (there) by Aaron Kennedy
        f532679ca11914b453e22342f2ae5e9f790ce47a

        * declarative/qdeclarativewebview.cpp:
        (QDeclarativeWebView::init):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@78269 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/qt/ChangeLog
Source/WebKit/qt/declarative/qdeclarativewebview.cpp

index f0dc116..dfafe02 100644 (file)
@@ -2,6 +2,26 @@
 
         Reviewed by Andreas Kling.
 
+        [Qt] Fix assert in QDeclarativeWebView
+        https://bugs.webkit.org/show_bug.cgi?id=54240
+
+        As reported in:
+        http://bugreports.qt.nokia.com/browse/QTBUG-14278
+
+        Instantiating a QDeclarativeWebView twice will trigger an assertion
+        when in debug mode.
+
+        Original patch from Thomas Hartmann <Thomas.Hartmann@nokia.com>,
+        reviewed (there) by Aaron Kennedy
+        f532679ca11914b453e22342f2ae5e9f790ce47a
+
+        * declarative/qdeclarativewebview.cpp:
+        (QDeclarativeWebView::init):
+
+2011-02-10  Ademar de Souza Reis Jr  <ademar.reis@openbossa.org>
+
+        Reviewed by Andreas Kling.
+
         [Qt] Misc documentation fixes/updates
         https://bugs.webkit.org/show_bug.cgi?id=54236
 
index 73fe661..d74fb9a 100644 (file)
@@ -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);