Changeset 92683 in webkit


Ignore:
Timestamp:
Aug 9, 2011 7:24:36 AM (13 years ago)
Author:
siddharth.mathur@nokia.com
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):

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r92555 r92683  
     12011-08-09  Siddharth Mathur  <siddharth.mathur@nokia.com>
     2
     3        [Qt] Simplify code by removing QT_NO_DESKTOPSERVICES and QT_NO_NETWORKDISKCACHE
     4        https://bugs.webkit.org/show_bug.cgi?id=65880
     5
     6        Reviewed by Andreas Kling.
     7
     8        QDesktopServices and QNetworkDiskCache have been around for a while now. Kill flags which
     9        check for their feature flags. Assume that any reasonable Qt build provides them.
     10
     11        * Source/WebKit.pri:
     12
    1132011-08-06  Aron Rosenberg  <arosenberg@logitech.com>
    214
  • trunk/Source/WebKit.pri

    r92555 r92683  
    170170    DEFINES *= QT_NO_CRASHHANDLER
    171171    DEFINES *= QT_NO_CURSOR
    172     DEFINES *= QT_NO_DESKTOPSERVICES
    173172    DEFINES *= QT_NO_FILEDIALOG
    174173    DEFINES *= QT_NO_GRAPHICSEFFECT
  • trunk/Source/WebKit/qt/Api/qwebsettings.cpp

    r90341 r92683  
    11371137void QWebSettings::enablePersistentStorage(const QString& path)
    11381138{
    1139 #ifndef QT_NO_DESKTOPSERVICES
    11401139    QString storagePath;
    11411140
     
    11701169    }
    11711170#endif
    1172 #endif
    11731171}
    11741172
  • trunk/Source/WebKit/qt/ChangeLog

    r92479 r92683  
     12011-08-09  Siddharth Mathur  <siddharth.mathur@nokia.com>
     2
     3        [Qt] Simplify code by removing QT_NO_DESKTOPSERVICES and QT_NO_NETWORKDISKCACHE
     4        https://bugs.webkit.org/show_bug.cgi?id=65880
     5
     6        Reviewed by Andreas Kling.
     7
     8        QDesktopServices and QNetworkDiskCache have been around for a while now. Kill flags which
     9        check for their feature flags. Assume that any reasonable Qt build provides them.
     10
     11        * Api/qwebsettings.cpp:
     12        (QWebSettings::enablePersistentStorage):
     13
    1142011-08-05  Dawit Alemayehu  <adawit@kde.org>
    215
  • trunk/Tools/ChangeLog

    r92669 r92683  
     12011-08-09  Siddharth Mathur  <siddharth.mathur@nokia.com>
     2
     3        [Qt] Simplify code by removing QT_NO_DESKTOPSERVICES and QT_NO_NETWORKDISKCACHE
     4        https://bugs.webkit.org/show_bug.cgi?id=65880
     5
     6        Reviewed by Andreas Kling.
     7
     8        QDesktopServices and QNetworkDiskCache have been around for a while now. Kill flags which
     9        check for their feature flags. Assume that any reasonable Qt build provides them.
     10        * QtTestBrowser/cookiejar.cpp:
     11        (TestBrowserCookieJar::TestBrowserCookieJar):
     12        * QtTestBrowser/launcherwindow.cpp:
     13        (LauncherWindow::createChrome):
     14        (LauncherWindow::setDiskCache):
     15        * QtTestBrowser/main.cpp:
     16        (LauncherApplication::handleUserOptions):
     17        * QtTestBrowser/webpage.cpp:
     18        (WebPage::openUrlInDefaultBrowser):
     19
    1202011-08-09  Adam Barth  <abarth@webkit.org>
    221
  • trunk/Tools/QtTestBrowser/cookiejar.cpp

    r92481 r92683  
    4242    connect(&m_timer, SIGNAL(timeout()), this, SLOT(saveToDisk()));
    4343
    44 #ifndef QT_NO_DESKTOPSERVICES
    4544    QString path = QDesktopServices::storageLocation(QDesktopServices::CacheLocation);
    46 #else
    47     QString path = QDir::homePath() + "/.QtTestBrowser";
    48 #endif
    49 
    5045    QDir().mkpath(path);
    5146    m_file.setFileName(path + "/cookieJar");
  • trunk/Tools/QtTestBrowser/launcherwindow.cpp

    r92478 r92683  
    4646#endif
    4747
    48 #if !defined(QT_NO_NETWORKDISKCACHE) && !defined(QT_NO_DESKTOPSERVICES)
    4948#include <QtGui/QDesktopServices>
    5049#include <QtNetwork/QNetworkDiskCache>
    51 #endif
    5250
    5351const int gExitClickArea = 80;
     
    436434    QMenu* settingsMenu = menuBar()->addMenu("&Settings");
    437435
    438 #if !defined(QT_NO_NETWORKDISKCACHE) && !defined(QT_NO_DESKTOPSERVICES)
    439436    QAction* toggleDiskCache = settingsMenu->addAction("Use Disk Cache", this, SLOT(setDiskCache(bool)));
    440437    toggleDiskCache->setCheckable(true);
    441438    toggleDiskCache->setChecked(m_windowOptions.useDiskCache);
    442 #endif
    443439
    444440    QAction* toggleAutoLoadImages = settingsMenu->addAction("Disable Auto Load Images", this, SLOT(toggleAutoLoadImages(bool)));
     
    823819void LauncherWindow::setDiskCache(bool enable)
    824820{
    825 #if !defined(QT_NO_NETWORKDISKCACHE) && !defined(QT_NO_DESKTOPSERVICES)
    826821    m_windowOptions.useDiskCache = enable;
    827822    QNetworkDiskCache* cache = 0;
     
    832827    }
    833828    page()->networkAccessManager()->setCache(cache);
    834 #endif
    835829}
    836830
  • trunk/Tools/QtTestBrowser/main.cpp

    r92478 r92683  
    183183#endif
    184184             << QString("[-viewport-update-mode %1]").arg(formatKeys(updateModes)).toLatin1().data()
    185 #if !defined(QT_NO_NETWORKDISKCACHE) && !defined(QT_NO_DESKTOPSERVICES)
    186185             << "[-disk-cache]"
    187 #endif
    188186             << "[-cache-webview]"
    189187             << "[-maximize]"
     
    223221
    224222    if (args.contains("-disk-cache")) {
    225 #if !defined(QT_NO_NETWORKDISKCACHE) && !defined(QT_NO_DESKTOPSERVICES)
    226223        windowOptions.useDiskCache = true;
    227 #else
    228     appQuit(1, "-disk-cache only works if QNetworkDiskCache and QDesktopServices is enabled in your Qt build.");
    229 #endif
    230224    }
    231225
  • trunk/Tools/QtTestBrowser/webpage.cpp

    r79668 r92683  
    109109void WebPage::openUrlInDefaultBrowser(const QUrl& url)
    110110{
    111 #ifndef QT_NO_DESKTOPSERVICES
    112111    if (QAction* action = qobject_cast<QAction*>(sender()))
    113112        QDesktopServices::openUrl(action->data().toUrl());
    114113    else
    115114        QDesktopServices::openUrl(url);
    116 #endif
    117115}
    118116
Note: See TracChangeset for help on using the changeset viewer.