diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-12-15 02:50:31 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-12-15 02:50:31 +0100 |
commit | 90c5f4150dac9029bbbdb408578df26555c5adf2 (patch) | |
tree | be6f0d54bbe5a032df56e7ae6af33ac35bd35b01 /src | |
parent | rekonq 0.3.21 (diff) | |
download | rekonq-90c5f4150dac9029bbbdb408578df26555c5adf2.tar.xz |
Simpler web classes (but no more friends :)
Moved remaining code to kdewebkit
Diffstat (limited to 'src')
-rw-r--r-- | src/webpage.cpp | 10 | ||||
-rw-r--r-- | src/webpage.h | 5 | ||||
-rw-r--r-- | src/webview.cpp | 15 |
3 files changed, 7 insertions, 23 deletions
diff --git a/src/webpage.cpp b/src/webpage.cpp index 8d605a81..1f7738ea 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -69,8 +69,6 @@ WebPage::WebPage(QObject *parent) : KWebPage(parent, KWalletIntegration) - , m_keyboardModifiers(Qt::NoModifier) - , m_pressedButtons(Qt::NoButton) { // rekonq own classes integration setNetworkAccessManager(new NetworkAccessManager(this)); @@ -101,14 +99,6 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r if(risp == KMessageBox::Cancel) return false; } - - if (m_keyboardModifiers & Qt::ControlModifier || m_pressedButtons == Qt::MidButton) - { - Application::instance()->loadUrl(request.url(), Rekonq::SettingOpenTab); - m_keyboardModifiers = Qt::NoModifier; - m_pressedButtons = Qt::NoButton; - return false; - } if (request.url().scheme() == QLatin1String("mailto")) { diff --git a/src/webpage.h b/src/webpage.h index 887a4309..79d8e8e7 100644 --- a/src/webpage.h +++ b/src/webpage.h @@ -68,13 +68,8 @@ private slots: void loadFinished(bool); private: - friend class WebView; QString errorPage(QNetworkReply *); - // keyboard/mouse modifiers - Qt::KeyboardModifiers m_keyboardModifiers; - Qt::MouseButtons m_pressedButtons; - QUrl m_requestedUrl; }; diff --git a/src/webview.cpp b/src/webview.cpp index b4b3cd70..a1033fb6 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -65,9 +65,9 @@ WebView::WebView(QWidget* parent) setPage(m_page); connect(m_page, SIGNAL(statusBarMessage(const QString&)), this, SLOT(setStatusBarText(const QString&))); + connect(this, SIGNAL(loadProgress(int)), this, SLOT(updateProgress(int))); connect(this, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished(bool))); - connect(this, SIGNAL(linkMiddleOrCtrlClicked(const KUrl &)), this, SLOT(loadInNewTab(const KUrl &)) ); // download system @@ -316,11 +316,9 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) menu.exec(mapToGlobal(event->pos())); } + void WebView::mousePressEvent(QMouseEvent *event) { - m_page->m_pressedButtons = event->buttons(); - m_page->m_keyboardModifiers = event->modifiers(); - switch(event->button()) { case Qt::XButton1: @@ -330,7 +328,8 @@ void WebView::mousePressEvent(QMouseEvent *event) triggerPageAction(KWebPage::Forward); break; default: - QWebView::mousePressEvent(event); + KWebView::mousePressEvent(event); + break; }; } @@ -338,7 +337,7 @@ void WebView::mousePressEvent(QMouseEvent *event) void WebView::mouseMoveEvent(QMouseEvent *event) { m_mousePos = event->pos(); - QWebView::mouseMoveEvent(event); + KWebView::mouseMoveEvent(event); } @@ -420,8 +419,8 @@ void WebView::keyPressEvent(QKeyEvent *event) triggerPageAction(KWebPage::SelectAll); return; } - - QWebView::keyPressEvent(event); + + KWebView::keyPressEvent(event); } |