mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Removed USE_QTWEBKIT_2_2 build variable.
It will now be automatically detected. It assume that if you are building with Qt 4.8 and higher, you have QtWebKit 2.2 and higher.
This commit is contained in:
parent
81ac819746
commit
ef4cfad805
10
BUILDING
10
BUILDING
@ -89,16 +89,6 @@ Available Defines
|
|||||||
example:
|
example:
|
||||||
$ export USE_WEBGL="true"
|
$ export USE_WEBGL="true"
|
||||||
|
|
||||||
USE_QTWEBKIT_2_2 Enable support for Geolocation and Notifications API.
|
|
||||||
You need to have QtWebKit version at least 2.2 to pass compilation
|
|
||||||
with this define.
|
|
||||||
Note: In order to get support for Geolocation and Notifications,
|
|
||||||
your QtWebKit has to be compiled with its support.
|
|
||||||
(disabled by default)
|
|
||||||
|
|
||||||
example:
|
|
||||||
$ export USE_QTWEBKIT_2_2="true"
|
|
||||||
|
|
||||||
NONBLOCK_JS_DIALOGS Enable non-blocking JavaScript dialogs from alert() prompt()
|
NONBLOCK_JS_DIALOGS Enable non-blocking JavaScript dialogs from alert() prompt()
|
||||||
and confirm() functions. They are shown inside page and are not
|
and confirm() functions. They are shown inside page and are not
|
||||||
blocking application window.
|
blocking application window.
|
||||||
|
@ -15,6 +15,10 @@ win32-msvc* {
|
|||||||
LIBS += User32.lib Ole32.lib Shell32.lib ShlWapi.lib Gdi32.lib ComCtl32.lib
|
LIBS += User32.lib Ole32.lib Shell32.lib ShlWapi.lib Gdi32.lib ComCtl32.lib
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isEqual(QT_VERSION, 4.8.0)|greaterThan(QT_VERSION, 4.8.0) {
|
||||||
|
DEFINES *= USE_QTWEBKIT_2_2
|
||||||
|
}
|
||||||
|
|
||||||
DEFINES *= QT_NO_URL_CAST_FROM_STRING
|
DEFINES *= QT_NO_URL_CAST_FROM_STRING
|
||||||
DEFINES *= QT_USE_QSTRINGBUILDER
|
DEFINES *= QT_USE_QSTRINGBUILDER
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include "html5permissionsmanager.h"
|
#include "html5permissionsmanager.h"
|
||||||
#include "html5permissionsnotification.h"
|
#include "html5permissionsnotification.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "webpage.h"
|
|
||||||
#include "webview.h"
|
#include "webview.h"
|
||||||
|
|
||||||
#include <QWebFrame>
|
#include <QWebFrame>
|
||||||
@ -13,6 +12,7 @@ HTML5PermissionsManager::HTML5PermissionsManager(QObject *parent)
|
|||||||
loadSettings();
|
loadSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 2, 0))
|
||||||
void HTML5PermissionsManager::requestPermissions(WebPage* page, QWebFrame *frame, const QWebPage::Feature &feature)
|
void HTML5PermissionsManager::requestPermissions(WebPage* page, QWebFrame *frame, const QWebPage::Feature &feature)
|
||||||
{
|
{
|
||||||
if (!frame || !page) {
|
if (!frame || !page) {
|
||||||
@ -98,6 +98,7 @@ void HTML5PermissionsManager::rememberPermissions(const QString &host, const QWe
|
|||||||
|
|
||||||
saveSettings();
|
saveSettings();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void HTML5PermissionsManager::loadSettings()
|
void HTML5PermissionsManager::loadSettings()
|
||||||
{
|
{
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QWebPage>
|
|
||||||
|
|
||||||
#include "qz_namespace.h"
|
#include "qz_namespace.h"
|
||||||
|
#include "webpage.h"
|
||||||
|
|
||||||
class QUrl;
|
class QUrl;
|
||||||
class WebPage;
|
class WebPage;
|
||||||
@ -15,9 +15,11 @@ class QT_QUPZILLA_EXPORT HTML5PermissionsManager : public QObject
|
|||||||
public:
|
public:
|
||||||
explicit HTML5PermissionsManager(QObject* parent);
|
explicit HTML5PermissionsManager(QObject* parent);
|
||||||
|
|
||||||
|
#ifdef USE_QTWEBKIT_2_2
|
||||||
void requestPermissions(WebPage* page, QWebFrame* frame, const QWebPage::Feature &feature);
|
void requestPermissions(WebPage* page, QWebFrame* frame, const QWebPage::Feature &feature);
|
||||||
void rememberPermissions(const QString &host, const QWebPage::Feature &feature,
|
void rememberPermissions(const QString &host, const QWebPage::Feature &feature,
|
||||||
const QWebPage::PermissionPolicy &policy);
|
const QWebPage::PermissionPolicy &policy);
|
||||||
|
#endif
|
||||||
|
|
||||||
void loadSettings();
|
void loadSettings();
|
||||||
void showSettingsDialog();
|
void showSettingsDialog();
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include <QWebFrame>
|
#include <QWebFrame>
|
||||||
|
|
||||||
|
#if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 2, 0))
|
||||||
HTML5PermissionsNotification::HTML5PermissionsNotification(const QString &host, QWebFrame *frame, const QWebPage::Feature &feature)
|
HTML5PermissionsNotification::HTML5PermissionsNotification(const QString &host, QWebFrame *frame, const QWebPage::Feature &feature)
|
||||||
: AnimatedWidget(AnimatedWidget::Down, 300, 0)
|
: AnimatedWidget(AnimatedWidget::Down, 300, 0)
|
||||||
, ui(new Ui::HTML5PermissionsNotification)
|
, ui(new Ui::HTML5PermissionsNotification)
|
||||||
@ -74,3 +75,4 @@ HTML5PermissionsNotification::~HTML5PermissionsNotification()
|
|||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
#endif // (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 2, 0))
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#ifndef HTML5PERMISSIONSNOTIFICATION_H
|
#ifndef HTML5PERMISSIONSNOTIFICATION_H
|
||||||
#define HTML5PERMISSIONSNOTIFICATION_H
|
#define HTML5PERMISSIONSNOTIFICATION_H
|
||||||
|
|
||||||
#include <QWebPage>
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#include "animatedwidget.h"
|
#include "animatedwidget.h"
|
||||||
|
#include "webpage.h"
|
||||||
|
|
||||||
namespace Ui
|
namespace Ui
|
||||||
{
|
{
|
||||||
@ -15,6 +15,7 @@ class HTML5PermissionsNotification : public AnimatedWidget
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
#ifdef USE_QTWEBKIT_2_2
|
||||||
public:
|
public:
|
||||||
explicit HTML5PermissionsNotification(const QString &host, QWebFrame* frame, const QWebPage::Feature &feature);
|
explicit HTML5PermissionsNotification(const QString &host, QWebFrame* frame, const QWebPage::Feature &feature);
|
||||||
~HTML5PermissionsNotification();
|
~HTML5PermissionsNotification();
|
||||||
@ -29,6 +30,7 @@ private:
|
|||||||
QString m_host;
|
QString m_host;
|
||||||
QWebFrame* m_frame;
|
QWebFrame* m_frame;
|
||||||
QWebPage::Feature m_feature;
|
QWebPage::Feature m_feature;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // HTML5PERMISSIONSNOTIFICATION_H
|
#endif // HTML5PERMISSIONSNOTIFICATION_H
|
||||||
|
@ -94,7 +94,7 @@ WebPage::WebPage(QupZilla* mainClass)
|
|||||||
|
|
||||||
connect(mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(addJavaScriptObject()));
|
connect(mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(addJavaScriptObject()));
|
||||||
|
|
||||||
#ifdef USE_QTWEBKIT_2_2
|
#if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 2, 0))
|
||||||
connect(this, SIGNAL(featurePermissionRequested(QWebFrame*, QWebPage::Feature)), this, SLOT(featurePermissionRequested(QWebFrame*, QWebPage::Feature)));
|
connect(this, SIGNAL(featurePermissionRequested(QWebFrame*, QWebPage::Feature)), this, SLOT(featurePermissionRequested(QWebFrame*, QWebPage::Feature)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -392,7 +392,7 @@ void WebPage::windowCloseRequested()
|
|||||||
webView->closeView();
|
webView->closeView();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_QTWEBKIT_2_2
|
#if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 2, 0))
|
||||||
void WebPage::featurePermissionRequested(QWebFrame* frame, const QWebPage::Feature &feature)
|
void WebPage::featurePermissionRequested(QWebFrame* frame, const QWebPage::Feature &feature)
|
||||||
{
|
{
|
||||||
mApp->html5permissions()->requestPermissions(this, frame, feature);
|
mApp->html5permissions()->requestPermissions(this, frame, feature);
|
||||||
|
Loading…
Reference in New Issue
Block a user