REGRESSION (r86268): Fix for qt_networkAccessAllowed()
authorlaszlo.1.gombos@nokia.com <laszlo.1.gombos@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 4 Sep 2011 02:58:46 +0000 (02:58 +0000)
committerlaszlo.1.gombos@nokia.com <laszlo.1.gombos@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 4 Sep 2011 02:58:46 +0000 (02:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=67570

Reviewed by Noam Rosenthal.

Source/WebCore:

No new tests as this change only removes dead code.
Support for Qt 4.6 has  been removed a while back.

* WebCore.pri:
* WebCore.pro:
* features.pri:
* platform/network/NetworkStateNotifier.h:
* platform/network/qt/NetworkStateNotifierQt.cpp:

Source/WebKit/qt:

Replace the ENABLE(QT_BEARER) guard with
!defined(QT_NO_BEARERMANAGEMENT) which is true by
default in Qt 4.7 or later versions.

* Api/qwebsettings.cpp:
(qt_networkAccessAllowed):

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

Source/WebCore/ChangeLog
Source/WebCore/WebCore.pri
Source/WebCore/WebCore.pro
Source/WebCore/features.pri
Source/WebCore/platform/network/NetworkStateNotifier.h
Source/WebCore/platform/network/qt/NetworkStateNotifierQt.cpp
Source/WebKit/qt/Api/qwebsettings.cpp
Source/WebKit/qt/ChangeLog

index f21e74a..947e437 100644 (file)
@@ -1,3 +1,19 @@
+2011-09-03  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
+
+        REGRESSION (r86268): Fix for qt_networkAccessAllowed()
+        https://bugs.webkit.org/show_bug.cgi?id=67570
+
+        Reviewed by Noam Rosenthal.
+
+        No new tests as this change only removes dead code.
+        Support for Qt 4.6 has  been removed a while back.
+
+        * WebCore.pri:
+        * WebCore.pro:
+        * features.pri:
+        * platform/network/NetworkStateNotifier.h:
+        * platform/network/qt/NetworkStateNotifierQt.cpp:
+
 2011-09-03  Ryosuke Niwa  <rniwa@webkit.org>
 
         REGRESSION(r94274): selection-change-closes-typing.html fails
index 0ff4763..b5785a2 100644 (file)
@@ -245,15 +245,6 @@ contains(DEFINES, WTF_USE_QT_MOBILITY_SYSTEMINFO=1) {
      MOBILITY *= systeminfo
 }
 
-contains(DEFINES, WTF_USE_QT_BEARER=1) {
-    # Bearer management is part of Qt 4.7, so don't accidentially
-    # pull in Qt Mobility when building against >= 4.7
-    !greaterThan(QT_MINOR_VERSION, 6) {
-        CONFIG *= mobility
-        MOBILITY *= bearer
-    }
-}
-
 contains(DEFINES, ENABLE_VIDEO=1) {
     contains(DEFINES, WTF_USE_QTKIT=1) {
         INCLUDEPATH += $$PWD/platform/graphics/mac
index b680b01..34babb3 100644 (file)
@@ -2081,6 +2081,7 @@ HEADERS += \
     platform/network/ResourceRequestBase.h \
     platform/network/ResourceResponseBase.h \
     platform/network/qt/DnsPrefetchHelper.h \
+    platform/network/qt/NetworkStateNotifierPrivate.h \
     platform/PlatformTouchEvent.h \
     platform/PlatformTouchPoint.h \
     platform/PopupMenu.h \
@@ -2587,6 +2588,7 @@ SOURCES += \
     platform/network/qt/ResourceHandleQt.cpp \
     platform/network/qt/ResourceRequestQt.cpp \
     platform/network/qt/DnsPrefetchHelper.cpp \
+    platform/network/qt/NetworkStateNotifierQt.cpp \
     platform/network/qt/ProxyServerQt.cpp \
     platform/network/qt/QtMIMETypeSniffer.cpp \
     platform/network/qt/QNetworkReplyHandler.cpp \
@@ -3218,14 +3220,6 @@ contains(DEFINES, ENABLE_XHTMLMP=1) {
         html/HTMLNoScriptElement.cpp
 }
 
-contains(DEFINES, WTF_USE_QT_BEARER=1) {
-    HEADERS += \
-        platform/network/qt/NetworkStateNotifierPrivate.h
-
-    SOURCES += \
-        platform/network/qt/NetworkStateNotifierQt.cpp
-}
-
 # QRawFont feature added in Qt 4.8.0
 # 
 # If available, this is used to implement the fast path for text rendering
index dcb00f2..f21ffa5 100644 (file)
@@ -171,18 +171,6 @@ symbian|maemo5|maemo6 {
     }
 }
 
-# Bearer management is part of Qt 4.7
-# for older version, check for mobility with bearer
-!contains(DEFINES, WTF_USE_QT_BEARER=.) {
-     !lessThan(QT_MINOR_VERSION, 7) {
-        DEFINES += WTF_USE_QT_BEARER=1
-     } else {
-        contains(MOBILITY_CONFIG, bearer) {
-            DEFINES += WTF_USE_QT_BEARER=1
-        }
-    }
-}
-
 !contains(DEFINES, ENABLE_TOUCH_EVENTS=.): DEFINES += ENABLE_TOUCH_EVENTS=1
 
 # HTML5 Media Support
index a12561d..811eb8e 100644 (file)
@@ -45,16 +45,11 @@ typedef const struct __SCDynamicStore * SCDynamicStoreRef;
 
 #include <QtCore/qglobal.h>
 
-#ifdef QT_NO_BEARERMANAGEMENT
-#undef WTF_USE_QT_BEARER
-#define WTF_USE_QT_BEARER 0
-#endif
-
 #endif
 
 namespace WebCore {
 
-#if (PLATFORM(QT) && USE(QT_BEARER))
+#if (PLATFORM(QT) && !defined(QT_NO_BEARERMANAGEMENT))
 class NetworkStateNotifierPrivate;
 #endif
 
@@ -66,7 +61,7 @@ public:
 
     bool onLine() const { return m_isOnLine; }
 
-#if (PLATFORM(QT) && USE(QT_BEARER))
+#if (PLATFORM(QT) && !defined(QT_NO_BEARERMANAGEMENT))
     void setNetworkAccessAllowed(bool);
 #elif PLATFORM(CHROMIUM) || PLATFORM(EFL)
     void setOnLine(bool);
@@ -95,13 +90,13 @@ private:
     HANDLE m_waitHandle;
     OVERLAPPED m_overlapped;
 
-#elif PLATFORM(QT) && USE(QT_BEARER)
+#elif (PLATFORM(QT) && !defined(QT_NO_BEARERMANAGEMENT))
     friend class NetworkStateNotifierPrivate;
     NetworkStateNotifierPrivate* p;
 #endif
 };
 
-#if !PLATFORM(MAC) && !PLATFORM(WIN) && !(PLATFORM(QT) && USE(QT_BEARER))
+#if !PLATFORM(MAC) && !PLATFORM(WIN) && !(PLATFORM(QT) && !defined(QT_NO_BEARERMANAGEMENT))
 
 inline NetworkStateNotifier::NetworkStateNotifier()
     : m_isOnLine(true)
index ea9d856..a356b71 100644 (file)
@@ -20,7 +20,7 @@
 #include "config.h"
 #include "NetworkStateNotifier.h"
 
-#if PLATFORM(QT) && USE(QT_BEARER)
+#if (PLATFORM(QT) && !defined(QT_NO_BEARERMANAGEMENT))
 
 #include "NetworkStateNotifierPrivate.h"
 #include "qnetworkconfigmanager.h"
index fa162c1..3676f03 100644 (file)
@@ -57,7 +57,7 @@
 
 void QWEBKIT_EXPORT qt_networkAccessAllowed(bool isAllowed)
 {
-#if ENABLE(QT_BEARER)
+#ifndef QT_NO_BEARERMANAGEMENT
     WebCore::networkStateNotifier().setNetworkAccessAllowed(isAllowed);
 #endif
 }
index b20b231..7cc4477 100644 (file)
@@ -1,3 +1,17 @@
+2011-09-03  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
+
+        REGRESSION (r86268): Fix for qt_networkAccessAllowed()
+        https://bugs.webkit.org/show_bug.cgi?id=67570
+
+        Reviewed by Noam Rosenthal.
+
+        Replace the ENABLE(QT_BEARER) guard with
+        !defined(QT_NO_BEARERMANAGEMENT) which is true by
+        default in Qt 4.7 or later versions.
+
+        * Api/qwebsettings.cpp:
+        (qt_networkAccessAllowed):
+
 2011-09-02  Jade Han  <jade.han@nokia.com>
 
         [Qt][Symbian] REGRESSION(93235) Missing .def update