Title: [92683] trunk
Revision
92683
Author
[email protected]
Date
2011-08-09 07:24:36 -0700 (Tue, 09 Aug 2011)

Log Message

[Qt] Simplify code by removing QT_NO_DESKTOPSERVICES and QT_NO_NETWORKDISKCACHE
https://bugs.webkit.org/show_bug.cgi?id=65880

Reviewed by Andreas Kling.

.:

QDesktopServices and QNetworkDiskCache have been around for a while now. Kill flags which
check for their feature flags. Assume that any reasonable Qt build provides them.

* Source/WebKit.pri:

Source/WebKit/qt:

QDesktopServices and QNetworkDiskCache have been around for a while now. Kill flags which
check for their feature flags. Assume that any reasonable Qt build provides them.

* Api/qwebsettings.cpp:
(QWebSettings::enablePersistentStorage):

Tools:

QDesktopServices and QNetworkDiskCache have been around for a while now. Kill flags which
check for their feature flags. Assume that any reasonable Qt build provides them.
* QtTestBrowser/cookiejar.cpp:
(TestBrowserCookieJar::TestBrowserCookieJar):
* QtTestBrowser/launcherwindow.cpp:
(LauncherWindow::createChrome):
(LauncherWindow::setDiskCache):
* QtTestBrowser/main.cpp:
(LauncherApplication::handleUserOptions):
* QtTestBrowser/webpage.cpp:
(WebPage::openUrlInDefaultBrowser):

Modified Paths

Diff

Modified: trunk/ChangeLog (92682 => 92683)


--- trunk/ChangeLog	2011-08-09 14:24:15 UTC (rev 92682)
+++ trunk/ChangeLog	2011-08-09 14:24:36 UTC (rev 92683)
@@ -1,3 +1,15 @@
+2011-08-09  Siddharth Mathur  <[email protected]>
+
+        [Qt] Simplify code by removing QT_NO_DESKTOPSERVICES and QT_NO_NETWORKDISKCACHE
+        https://bugs.webkit.org/show_bug.cgi?id=65880
+
+        Reviewed by Andreas Kling.
+
+        QDesktopServices and QNetworkDiskCache have been around for a while now. Kill flags which 
+        check for their feature flags. Assume that any reasonable Qt build provides them. 
+
+        * Source/WebKit.pri:
+
 2011-08-06  Aron Rosenberg  <[email protected]>
 
         Reviewed by Benjamin Poulain.

Modified: trunk/Source/WebKit/qt/Api/qwebsettings.cpp (92682 => 92683)


--- trunk/Source/WebKit/qt/Api/qwebsettings.cpp	2011-08-09 14:24:15 UTC (rev 92682)
+++ trunk/Source/WebKit/qt/Api/qwebsettings.cpp	2011-08-09 14:24:36 UTC (rev 92683)
@@ -1136,7 +1136,6 @@
 */
 void QWebSettings::enablePersistentStorage(const QString& path)
 {
-#ifndef QT_NO_DESKTOPSERVICES
     QString storagePath;
 
     if (path.isEmpty()) {
@@ -1169,7 +1168,6 @@
         WebCore::PluginDatabase::setPersistentMetadataCachePath(cachePath);
     }
 #endif
-#endif
 }
 
 /*!

Modified: trunk/Source/WebKit/qt/ChangeLog (92682 => 92683)


--- trunk/Source/WebKit/qt/ChangeLog	2011-08-09 14:24:15 UTC (rev 92682)
+++ trunk/Source/WebKit/qt/ChangeLog	2011-08-09 14:24:36 UTC (rev 92683)
@@ -1,3 +1,16 @@
+2011-08-09  Siddharth Mathur  <[email protected]>
+
+        [Qt] Simplify code by removing QT_NO_DESKTOPSERVICES and QT_NO_NETWORKDISKCACHE
+        https://bugs.webkit.org/show_bug.cgi?id=65880
+
+        Reviewed by Andreas Kling.
+
+        QDesktopServices and QNetworkDiskCache have been around for a while now. Kill flags which 
+        check for their feature flags. Assume that any reasonable Qt build provides them. 
+
+        * Api/qwebsettings.cpp:
+        (QWebSettings::enablePersistentStorage):
+
 2011-08-05  Dawit Alemayehu  <[email protected]>
 
         Reviewed by Andreas Kling.

Modified: trunk/Source/WebKit.pri (92682 => 92683)


--- trunk/Source/WebKit.pri	2011-08-09 14:24:15 UTC (rev 92682)
+++ trunk/Source/WebKit.pri	2011-08-09 14:24:36 UTC (rev 92683)
@@ -169,7 +169,6 @@
     DEFINES *= QT_NO_CONCURRENT
     DEFINES *= QT_NO_CRASHHANDLER
     DEFINES *= QT_NO_CURSOR
-    DEFINES *= QT_NO_DESKTOPSERVICES
     DEFINES *= QT_NO_FILEDIALOG
     DEFINES *= QT_NO_GRAPHICSEFFECT
     DEFINES *= QT_NO_IM

Modified: trunk/Tools/ChangeLog (92682 => 92683)


--- trunk/Tools/ChangeLog	2011-08-09 14:24:15 UTC (rev 92682)
+++ trunk/Tools/ChangeLog	2011-08-09 14:24:36 UTC (rev 92683)
@@ -1,3 +1,22 @@
+2011-08-09  Siddharth Mathur  <[email protected]>
+
+        [Qt] Simplify code by removing QT_NO_DESKTOPSERVICES and QT_NO_NETWORKDISKCACHE
+        https://bugs.webkit.org/show_bug.cgi?id=65880
+
+        Reviewed by Andreas Kling.
+
+        QDesktopServices and QNetworkDiskCache have been around for a while now. Kill flags which 
+        check for their feature flags. Assume that any reasonable Qt build provides them. 
+        * QtTestBrowser/cookiejar.cpp:
+        (TestBrowserCookieJar::TestBrowserCookieJar):
+        * QtTestBrowser/launcherwindow.cpp:
+        (LauncherWindow::createChrome):
+        (LauncherWindow::setDiskCache):
+        * QtTestBrowser/main.cpp:
+        (LauncherApplication::handleUserOptions):
+        * QtTestBrowser/webpage.cpp:
+        (WebPage::openUrlInDefaultBrowser):
+
 2011-08-09  Adam Barth  <[email protected]>
 
         BaselineOptimizer created the wrong baseline for fast/js/regexp-overflow.html

Modified: trunk/Tools/QtTestBrowser/cookiejar.cpp (92682 => 92683)


--- trunk/Tools/QtTestBrowser/cookiejar.cpp	2011-08-09 14:24:15 UTC (rev 92682)
+++ trunk/Tools/QtTestBrowser/cookiejar.cpp	2011-08-09 14:24:36 UTC (rev 92683)
@@ -41,12 +41,7 @@
     m_timer.setSingleShot(true);
     connect(&m_timer, SIGNAL(timeout()), this, SLOT(saveToDisk()));
 
-#ifndef QT_NO_DESKTOPSERVICES
     QString path = QDesktopServices::storageLocation(QDesktopServices::CacheLocation);
-#else
-    QString path = QDir::homePath() + "/.QtTestBrowser";
-#endif
-
     QDir().mkpath(path);
     m_file.setFileName(path + "/cookieJar");
 }

Modified: trunk/Tools/QtTestBrowser/launcherwindow.cpp (92682 => 92683)


--- trunk/Tools/QtTestBrowser/launcherwindow.cpp	2011-08-09 14:24:15 UTC (rev 92682)
+++ trunk/Tools/QtTestBrowser/launcherwindow.cpp	2011-08-09 14:24:36 UTC (rev 92683)
@@ -45,10 +45,8 @@
 #include <QNetworkReply>
 #endif
 
-#if !defined(QT_NO_NETWORKDISKCACHE) && !defined(QT_NO_DESKTOPSERVICES)
 #include <QtGui/QDesktopServices>
 #include <QtNetwork/QNetworkDiskCache>
-#endif
 
 const int gExitClickArea = 80;
 QVector<int> LauncherWindow::m_zoomLevels;
@@ -435,11 +433,9 @@
 
     QMenu* settingsMenu = menuBar()->addMenu("&Settings");
 
-#if !defined(QT_NO_NETWORKDISKCACHE) && !defined(QT_NO_DESKTOPSERVICES)
     QAction* toggleDiskCache = settingsMenu->addAction("Use Disk Cache", this, SLOT(setDiskCache(bool)));
     toggleDiskCache->setCheckable(true);
     toggleDiskCache->setChecked(m_windowOptions.useDiskCache);
-#endif
 
     QAction* toggleAutoLoadImages = settingsMenu->addAction("Disable Auto Load Images", this, SLOT(toggleAutoLoadImages(bool)));
     toggleAutoLoadImages->setCheckable(true);
@@ -822,7 +818,6 @@
 
 void LauncherWindow::setDiskCache(bool enable)
 {
-#if !defined(QT_NO_NETWORKDISKCACHE) && !defined(QT_NO_DESKTOPSERVICES)
     m_windowOptions.useDiskCache = enable;
     QNetworkDiskCache* cache = 0;
     if (enable) {
@@ -831,7 +826,6 @@
         cache->setCacheDirectory(cacheLocation);
     }
     page()->networkAccessManager()->setCache(cache);
-#endif
 }
 
 void LauncherWindow::setTouchMocking(bool on)

Modified: trunk/Tools/QtTestBrowser/main.cpp (92682 => 92683)


--- trunk/Tools/QtTestBrowser/main.cpp	2011-08-09 14:24:15 UTC (rev 92682)
+++ trunk/Tools/QtTestBrowser/main.cpp	2011-08-09 14:24:36 UTC (rev 92683)
@@ -182,9 +182,7 @@
              << "[-webgl]"
 #endif
              << QString("[-viewport-update-mode %1]").arg(formatKeys(updateModes)).toLatin1().data()
-#if !defined(QT_NO_NETWORKDISKCACHE) && !defined(QT_NO_DESKTOPSERVICES)
              << "[-disk-cache]"
-#endif
              << "[-cache-webview]"
              << "[-maximize]"
              << "[-show-fps]"
@@ -222,11 +220,7 @@
     }
 
     if (args.contains("-disk-cache")) {
-#if !defined(QT_NO_NETWORKDISKCACHE) && !defined(QT_NO_DESKTOPSERVICES)
         windowOptions.useDiskCache = true;
-#else
-    appQuit(1, "-disk-cache only works if QNetworkDiskCache and QDesktopServices is enabled in your Qt build.");
-#endif
     }
 
     if (args.contains("-cache-webview") || defaultForAnimations) {

Modified: trunk/Tools/QtTestBrowser/webpage.cpp (92682 => 92683)


--- trunk/Tools/QtTestBrowser/webpage.cpp	2011-08-09 14:24:15 UTC (rev 92682)
+++ trunk/Tools/QtTestBrowser/webpage.cpp	2011-08-09 14:24:36 UTC (rev 92683)
@@ -108,12 +108,10 @@
 
 void WebPage::openUrlInDefaultBrowser(const QUrl& url)
 {
-#ifndef QT_NO_DESKTOPSERVICES
     if (QAction* action = ""
         QDesktopServices::openUrl(action->data().toUrl());
     else
         QDesktopServices::openUrl(url);
-#endif
 }
 
 QString WebPage::userAgentForUrl(const QUrl& url) const
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to