diff options
Diffstat (limited to 'WebKit/qt/examples')
3 files changed, 11 insertions, 2 deletions
diff --git a/WebKit/qt/examples/platformplugin/WebNotificationPresenter.cpp b/WebKit/qt/examples/platformplugin/WebNotificationPresenter.cpp index c992236..d991ab1 100644 --- a/WebKit/qt/examples/platformplugin/WebNotificationPresenter.cpp +++ b/WebKit/qt/examples/platformplugin/WebNotificationPresenter.cpp @@ -57,7 +57,11 @@ void WebNotificationWidget::showNotification(const QWebNotificationData* data) bool WebNotificationWidget::event(QEvent* ev) { - if (ev->type() == QEvent::MouseButtonRelease || ev->type() == QEvent::Close) { + if (ev->type() == QEvent::MouseButtonRelease) { + emit notificationClicked(); + return true; + } + if (ev->type() == QEvent::Close) { emit notificationClosed(); return true; } diff --git a/WebKit/qt/examples/platformplugin/WebNotificationPresenter.h b/WebKit/qt/examples/platformplugin/WebNotificationPresenter.h index a2563b2..f46e5cb 100644 --- a/WebKit/qt/examples/platformplugin/WebNotificationPresenter.h +++ b/WebKit/qt/examples/platformplugin/WebNotificationPresenter.h @@ -36,6 +36,7 @@ public: Q_SIGNALS: void notificationClosed(); + void notificationClicked(); }; class WebNotificationPresenter : public QWebNotificationPresenter @@ -47,6 +48,7 @@ public: { m_widget = new WebNotificationWidget(); connect(m_widget, SIGNAL(notificationClosed()), this, SIGNAL(notificationClosed())); + connect(m_widget, SIGNAL(notificationClicked()), this, SIGNAL(notificationClicked())); } virtual ~WebNotificationPresenter() { m_widget->close(); delete m_widget; } diff --git a/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h b/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h index 3c56c98..76496c5 100644 --- a/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h +++ b/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h @@ -27,6 +27,7 @@ */ #include <QObject> +#include <QUrl> class QWebSelectData { @@ -66,6 +67,7 @@ public: virtual const QString title() const = 0; virtual const QString message() const = 0; virtual const QByteArray iconData() const = 0; + virtual const QUrl openerPageUrl() const = 0; }; class QWebNotificationPresenter : public QObject @@ -79,6 +81,7 @@ public: Q_SIGNALS: void notificationClosed(); + void notificationClicked(); }; class QWebHapticFeedbackPlayer @@ -113,6 +116,6 @@ public: }; -Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.3"); +Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.4"); #endif // QWEBKITPLATFORMPLUGIN_H |