mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Fixed compilation with QtWebKit < 2.2 and AKN plugin.
This commit is contained in:
parent
57d566490d
commit
dbfc09538c
13
BUILDING
13
BUILDING
@ -74,6 +74,16 @@ Available Defines
|
||||
|
||||
example:
|
||||
$ 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()
|
||||
and confirm() functions. They are shown inside page and are not
|
||||
@ -128,5 +138,4 @@ Available Defines
|
||||
|
||||
example:
|
||||
$ export QUPZILLA_PREFIX="/usr/"
|
||||
|
||||
|
||||
|
||||
|
@ -28,6 +28,7 @@ d_w7api = $$(W7API)
|
||||
d_kde = $$(KDE)
|
||||
d_portable = $$(PORTABLE_BUILD)
|
||||
d_nonblock_dialogs = $$(NONBLOCK_JS_DIALOGS)
|
||||
d_use_qtwebkit_2_2 = $$(USE_QTWEBKIT_2_2)
|
||||
|
||||
equals(d_no_system_datapath, "true") { DEFINES += NO_SYSTEM_DATAPATH }
|
||||
equals(d_use_webgl, "true") { DEFINES += USE_WEBGL }
|
||||
@ -35,6 +36,7 @@ equals(d_w7api, "true") { DEFINES += W7API }
|
||||
equals(d_kde, "true") { DEFINES += KDE }
|
||||
equals(d_portable, "true") { DEFINES += PORTABLE_BUILD }
|
||||
equals(d_nonblock_dialogs, "true") { DEFINES += NONBLOCK_JS_DIALOGS }
|
||||
equals(d_use_qtwebkit_2_2, "true") { DEFINES += USE_QTWEBKIT_2_2 }
|
||||
|
||||
!mac:unix {
|
||||
d_prefix = $$(QUPZILLA_PREFIX)
|
||||
|
@ -32,6 +32,8 @@
|
||||
#include <QInputDialog>
|
||||
#include <QWebFrame>
|
||||
|
||||
#include <QTextEdit>
|
||||
|
||||
SourceViewer::SourceViewer(QWebFrame* frame, const QString &selectedHtml)
|
||||
: QWidget(0)
|
||||
, m_frame(frame)
|
||||
@ -41,6 +43,8 @@ SourceViewer::SourceViewer(QWebFrame* frame, const QString &selectedHtml)
|
||||
m_layout = new QBoxLayout(QBoxLayout::TopToBottom, this);
|
||||
m_sourceEdit = new PlainEditWithLines(this);
|
||||
m_sourceEdit->setObjectName("sourceviewer-textedit");
|
||||
m_sourceEdit->setReadOnly(true);
|
||||
m_sourceEdit->setUndoRedoEnabled(false);
|
||||
|
||||
m_statusBar = new QStatusBar(this);
|
||||
m_statusBar->showMessage(frame->url().toString());
|
||||
@ -51,9 +55,7 @@ SourceViewer::SourceViewer(QWebFrame* frame, const QString &selectedHtml)
|
||||
m_layout->setSpacing(0);
|
||||
m_layout->setMenuBar(menuBar);
|
||||
|
||||
this->resize(650, 600);
|
||||
m_sourceEdit->setReadOnly(true);
|
||||
m_sourceEdit->moveCursor(QTextCursor::Start);
|
||||
resize(650, 600);
|
||||
|
||||
QFont font;
|
||||
font.setFamily("Tahoma");
|
||||
@ -94,18 +96,14 @@ SourceViewer::SourceViewer(QWebFrame* frame, const QString &selectedHtml)
|
||||
|
||||
qz_centerWidgetToParent(this, frame->page()->view());
|
||||
|
||||
m_sourceEdit->setUndoRedoEnabled(false);
|
||||
m_sourceEdit->insertPlainText(frame->toHtml());
|
||||
m_sourceEdit->setUndoRedoEnabled(true);
|
||||
m_sourceEdit->setPlainText(frame->toHtml());
|
||||
|
||||
//Highlight selectedHtml
|
||||
if (!selectedHtml.isEmpty()) {
|
||||
m_sourceEdit->find(selectedHtml, QTextDocument::FindWholeWords);
|
||||
}
|
||||
else {
|
||||
QTextCursor cursor = m_sourceEdit->textCursor();
|
||||
cursor.setPosition(0);
|
||||
m_sourceEdit->setTextCursor(cursor);
|
||||
m_sourceEdit->moveCursor(QTextCursor::Start);
|
||||
}
|
||||
}
|
||||
|
||||
@ -145,7 +143,7 @@ void SourceViewer::reload()
|
||||
{
|
||||
if (m_frame) {
|
||||
m_sourceEdit->clear();
|
||||
m_sourceEdit->insertPlainText(m_frame.data()->toHtml());
|
||||
m_sourceEdit->setPlainText(m_frame.data()->toHtml());
|
||||
|
||||
m_statusBar->showMessage(tr("Source reloaded"));
|
||||
}
|
||||
@ -157,6 +155,7 @@ void SourceViewer::reload()
|
||||
void SourceViewer::setTextEditable()
|
||||
{
|
||||
m_sourceEdit->setReadOnly(!m_sourceEdit->isReadOnly());
|
||||
m_sourceEdit->setUndoRedoEnabled(true);
|
||||
|
||||
m_statusBar->showMessage(tr("Editable changed"));
|
||||
}
|
||||
|
@ -18,11 +18,11 @@
|
||||
#ifndef PLUGINPROXY_H
|
||||
#define PLUGINPROXY_H
|
||||
|
||||
#include "mainapplication.h"
|
||||
#include "networkmanager.h"
|
||||
#include "plugins.h"
|
||||
#include "qz_namespace.h"
|
||||
|
||||
class QupZilla;
|
||||
|
||||
class QT_QUPZILLA_EXPORT PluginProxy : public Plugins
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -78,6 +78,7 @@ private:
|
||||
QRegExp pattern;
|
||||
QTextCharFormat format;
|
||||
};
|
||||
|
||||
QVector<HighlightingRule> highlightingRules;
|
||||
|
||||
QRegExp commentStartExpression;
|
||||
|
@ -82,7 +82,7 @@ WebPage::WebPage(QupZilla* mainClass)
|
||||
|
||||
connect(mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(addJavaScriptObject()));
|
||||
|
||||
#if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 2, 0))
|
||||
#ifdef USE_QTWEBKIT_2_2
|
||||
connect(this, SIGNAL(featurePermissionRequested(QWebFrame*, QWebPage::Feature)), this, SLOT(featurePermissionRequested(QWebFrame*, QWebPage::Feature)));
|
||||
#endif
|
||||
}
|
||||
@ -286,7 +286,7 @@ void WebPage::windowCloseRequested()
|
||||
webView->closeView();
|
||||
}
|
||||
|
||||
#if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 2, 0))
|
||||
#ifdef USE_QTWEBKIT_2_2
|
||||
void WebPage::featurePermissionRequested(QWebFrame* frame, const QWebPage::Feature &feature)
|
||||
{
|
||||
// We should probably ask user here ... -,-
|
||||
|
@ -75,7 +75,6 @@ signals:
|
||||
void privacyChanged(bool status);
|
||||
|
||||
protected slots:
|
||||
QWebPage* createWindow(QWebPage::WebWindowType type);
|
||||
void handleUnsupportedContent(QNetworkReply* url);
|
||||
|
||||
void progress(int prog);
|
||||
@ -91,10 +90,13 @@ private slots:
|
||||
void downloadRequested(const QNetworkRequest &request);
|
||||
void windowCloseRequested();
|
||||
|
||||
#if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 2, 0))
|
||||
#ifdef USE_QTWEBKIT_2_2
|
||||
void featurePermissionRequested(QWebFrame* frame, const QWebPage::Feature &feature);
|
||||
#endif
|
||||
|
||||
protected:
|
||||
QWebPage* createWindow(QWebPage::WebWindowType type);
|
||||
|
||||
private:
|
||||
virtual bool supportsExtension(Extension extension) const;
|
||||
virtual bool extension(Extension extension, const ExtensionOption* option, ExtensionReturn* output = 0);
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "akn_plugin.h"
|
||||
#include "akn_handler.h"
|
||||
#include "akn_settings.h"
|
||||
#include "mainapplication.h"
|
||||
#include "pluginproxy.h"
|
||||
#include "qupzilla.h"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
QT += network webkit
|
||||
QT += webkit
|
||||
TARGET = MouseGestures
|
||||
os2: TARGET = MouseGes
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "mousegesturesplugin.h"
|
||||
#include "pluginproxy.h"
|
||||
#include "mousegestures.h"
|
||||
#include "mainapplication.h"
|
||||
#include "qupzilla.h"
|
||||
|
||||
#include <QTranslator>
|
||||
|
@ -3,7 +3,7 @@
|
||||
# Project created by QtCreator 2011-02-13T10:23:13
|
||||
#
|
||||
#-------------------------------------------------
|
||||
QT += network webkit
|
||||
QT += webkit
|
||||
TARGET = TestPlugin
|
||||
# OS/2 allows only 8 chars in TARGET
|
||||
os2: TARGET = TestPlug
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "qupzilla.h"
|
||||
#include "webview.h"
|
||||
#include "pluginproxy.h"
|
||||
#include "mainapplication.h"
|
||||
|
||||
#include <QTranslator>
|
||||
#include <QPushButton>
|
||||
|
@ -69,4 +69,4 @@ $creators_text = "プロジェクトオーナー、メンテナー、メイン
|
||||
コーディングや翻訳、サポートで貢献のあった方のリストも<a href='https://github.com/nowrep/QupZilla/blob/master/AUTHORS'>ここ</a>から参照できます [at github].<br/><br/>IRCチャンネルにも参加できます <b>#qupzilla</b> irc.freenode.netでQupZillaにかかわる人々とチャットしましょう。";
|
||||
$share_with_friends = "Share with Friends!";
|
||||
$share_with_friends_text = "QupZillaを気に入っていただけましたか? ぜひお友達とシェアしてください!";
|
||||
?>
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user