summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/webpage.cpp10
-rw-r--r--src/webpage.h5
-rw-r--r--src/webview.cpp15
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);
}