[Qt] Build fix for Qt minimal after r61121
authoryael.aharon@nokia.com <yael.aharon@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Jun 2010 16:10:02 +0000 (16:10 +0000)
committeryael.aharon@nokia.com <yael.aharon@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Jun 2010 16:10:02 +0000 (16:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=40624

Reviewed by Somon Fraser.

* WebCoreSupport/NotificationPresenterClientQt.cpp:
(WebCore::NotificationIconWrapper::NotificationIconWrapper):
(WebCore::NotificationIconWrapper::close):
(WebCore::NotificationIconWrapper::title):
(WebCore::NotificationIconWrapper::message):
(WebCore::NotificationIconWrapper::iconData):
(WebCore::NotificationIconWrapper::notificationClosed):
* WebCoreSupport/NotificationPresenterClientQt.h:
(WebCore::NotificationIconWrapper::~NotificationIconWrapper):

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

WebKit/qt/ChangeLog
WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h

index 0c70800..f7a314f 100644 (file)
@@ -1,3 +1,20 @@
+2010-06-15  Yael Aharon  <yael.aharon@nokia.com>
+
+        Reviewed by Somon Fraser.
+
+        [Qt] Build fix for Qt minimal after r61121
+        https://bugs.webkit.org/show_bug.cgi?id=40624
+
+        * WebCoreSupport/NotificationPresenterClientQt.cpp:
+        (WebCore::NotificationIconWrapper::NotificationIconWrapper):
+        (WebCore::NotificationIconWrapper::close):
+        (WebCore::NotificationIconWrapper::title):
+        (WebCore::NotificationIconWrapper::message):
+        (WebCore::NotificationIconWrapper::iconData):
+        (WebCore::NotificationIconWrapper::notificationClosed):
+        * WebCoreSupport/NotificationPresenterClientQt.h:
+        (WebCore::NotificationIconWrapper::~NotificationIconWrapper):
+
 2010-06-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
         Unreviewed, Symbian build fix.
index 8bde5c4..fa8017c 100644 (file)
 #include "qwebkitglobal.h"
 #include <QtGui>
 
-#if ENABLE(NOTIFICATIONS)
-
 namespace WebCore {
 
+#if ENABLE(NOTIFICATIONS)
+
 const double notificationTimeout = 10.0;
 
 bool NotificationPresenterClientQt::dumpNotification = false;
@@ -61,51 +61,69 @@ NotificationPresenterClientQt* NotificationPresenterClientQt::notificationPresen
     return s_notificationPresenter;
 }
 
+#endif
+
 NotificationIconWrapper::NotificationIconWrapper()
     : m_closeTimer(this, &NotificationIconWrapper::close)
 {
+#if ENABLE(NOTIFICATIONS)
+
 #ifndef QT_NO_SYSTEMTRAYICON
     m_notificationIcon = 0;
 #endif
     m_presenter = 0;
-}
-
-NotificationIconWrapper::~NotificationIconWrapper()
-{
+#endif
 }
 
 void NotificationIconWrapper::close(Timer<NotificationIconWrapper>*)
 {
+#if ENABLE(NOTIFICATIONS)
     NotificationPresenterClientQt::notificationPresenter()->cancel(this);
+#endif
 }
 
 const QString NotificationIconWrapper::title() const
 {
+#if ENABLE(NOTIFICATIONS)
     Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
     if (notification)
         return notification->contents().title();
+#endif
     return QString();
 }
 
 const QString NotificationIconWrapper::message() const
 {
+#if ENABLE(NOTIFICATIONS)
     Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
     if (notification)
         return notification->contents().body();
+#endif
     return QString();
 }
 
 const QByteArray NotificationIconWrapper::iconData() const
 {
-    Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
     QByteArray iconData;
+#if ENABLE(NOTIFICATIONS)
+    Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
     if (notification) {
         if (notification->iconData())
             iconData = QByteArray::fromRawData(notification->iconData()->data(), notification->iconData()->size());
     }
+#endif
     return iconData;
 }
 
+void NotificationIconWrapper::notificationClosed()
+{
+#if ENABLE(NOTIFICATIONS)
+    NotificationPresenterClientQt::notificationPresenter()->cancel(this);
+#endif
+}
+
+#if ENABLE(NOTIFICATIONS)
+
 NotificationPresenterClientQt::NotificationPresenterClientQt() : m_clientCount(0)
 {
 }
@@ -127,11 +145,6 @@ void NotificationPresenterClientQt::removeClient()
     }
 }
 
-void NotificationIconWrapper::notificationClosed()
-{
-    NotificationPresenterClientQt::notificationPresenter()->cancel(this);
-}
-
 bool NotificationPresenterClientQt::show(Notification* notification)
 {
     // FIXME: workers based notifications are not supported yet.
@@ -341,5 +354,6 @@ void NotificationPresenterClientQt::dumpShowText(Notification* notification)
     }
 }
 
-}
 #endif // ENABLE(NOTIFICATIONS)
+}
+
index 1630cd9..98faee7 100644 (file)
@@ -51,7 +51,7 @@ class NotificationIconWrapper : public QObject, public QWebNotificationData {
     Q_OBJECT
 public:
     NotificationIconWrapper();
-    ~NotificationIconWrapper();
+    ~NotificationIconWrapper() {}
 
     void close();
     void close(Timer<NotificationIconWrapper>*);