From 8213829a830cabc2d9b44a43bba00f1dae77adc5 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 14 Feb 2009 12:06:54 +0100 Subject: Preliminary flash support --- src/CMakeLists.txt | 1 + src/webview.cpp | 13 ++++++++++++- src/webview.h | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 19355e7b..6fa9bd1c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -44,6 +44,7 @@ TARGET_LINK_LIBRARIES( rekonq ${QT_LIBRARIES} ${QT_QTNETWORK_LIBRARY} ${QT_QTWEBKIT_LIBRARY} + ${QT_QTUITOOLS_LIBRARY} ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} ) diff --git a/src/webview.cpp b/src/webview.cpp index a4ca8211..5d317597 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -42,7 +42,8 @@ #include #include #include - +// --- +#include WebPage::WebPage(QObject *parent) : QWebPage(parent) @@ -120,6 +121,16 @@ QWebPage *WebPage::createWindow(QWebPage::WebWindowType type) } +QObject *WebPage::createPlugin(const QString &classId, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues) +{ + Q_UNUSED(url); + Q_UNUSED(paramNames); + Q_UNUSED(paramValues); + QUiLoader loader; + return loader.createWidget(classId, view()); +} + + void WebPage::handleUnsupportedContent(QNetworkReply *reply) { if (reply->error() == QNetworkReply::NoError) diff --git a/src/webview.h b/src/webview.h index 6710aac4..6892fbd4 100644 --- a/src/webview.h +++ b/src/webview.h @@ -50,6 +50,7 @@ public: protected: bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type); QWebPage *createWindow(QWebPage::WebWindowType type); + QObject *createPlugin(const QString &classId, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues); private slots: void handleUnsupportedContent(QNetworkReply *reply); -- cgit v1.2.1