diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-05-28 01:55:25 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-05-28 01:55:25 +0200 |
commit | 8c5f265d22bd4590612b426ebb9d984b8e49f24c (patch) | |
tree | aaa821c74a49f4f23806209844a9d22c129e05ef /src/webview.cpp | |
parent | Lot of work to do in mainview. Removed status/tool/geometry change view signals (diff) | |
download | rekonq-8c5f265d22bd4590612b426ebb9d984b8e49f24c.tar.xz |
working on error messages & openLinkInNewTab slot
Diffstat (limited to 'src/webview.cpp')
-rw-r--r-- | src/webview.cpp | 42 |
1 files changed, 6 insertions, 36 deletions
diff --git a/src/webview.cpp b/src/webview.cpp index 16f7b6e5..4f6ba097 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -75,7 +75,7 @@ WebView::WebView(QWidget* parent) connect(this, SIGNAL(loadProgress(int)), this, SLOT(setProgress(int))); connect(this, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished())); - connect(this, SIGNAL(openUrlInNewTab(const KUrl &)), this, SLOT(load(const KUrl &))); + connect(this, SIGNAL(openUrlInNewTab(const KUrl &)), this, SLOT(openLinkInNewTab(const KUrl &))); } @@ -218,10 +218,11 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) } -// void WebView::openLinkInNewTab() -// { -// pageAction(QWebPage::OpenLinkInNewWindow)->trigger(); -// } +void WebView::openLinkInNewTab(const KUrl &url) +{ + Application::instance()->newWebView(); + load(url); +} void WebView::loadFinished() @@ -235,37 +236,6 @@ void WebView::loadFinished() } -// void WebView::mousePressEvent(QMouseEvent *event) -// { -// m_page->m_pressedButtons = event->buttons(); -// m_page->m_keyboardModifiers = event->modifiers(); -// QWebView::mousePressEvent(event); -// } -// -// -// void WebView::mouseReleaseEvent(QMouseEvent *event) -// { -// QWebView::mouseReleaseEvent(event); -// if (!event->isAccepted() && (m_page->m_pressedButtons & Qt::MidButton)) -// { -// KUrl url(QApplication::clipboard()->text(QClipboard::Selection)); -// if (!url.isEmpty() && url.isValid() && !url.scheme().isEmpty()) -// { -// setUrl(url); -// } -// } -// } - - -// void WebView::downloadRequested(const QNetworkRequest &request) -// { -// KUrl srcUrl = request.url(); -// QString path = ReKonfig::downloadDir() + QString("/") + srcUrl.fileName(); -// KUrl destUrl = KUrl(path); -// Application::downloadManager()->newDownload(srcUrl); -// } - - void WebView::keyPressEvent(QKeyEvent *event) { if ((event->modifiers() == Qt::ControlModifier) && (event->key() == Qt::Key_Tab)) |