diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2012-11-28 22:47:42 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-12-10 02:48:06 +0100 |
commit | 66edb6d66102e2ae7c0fd234f932b515fe101635 (patch) | |
tree | 8959057e403502301683c01b8aac6eb18e675464 /src/webtab/webview.cpp | |
parent | Open focused link when launched from web app (diff) | |
download | rekonq-66edb6d66102e2ae7c0fd234f932b515fe101635.tar.xz |
Restoring inspector, part 1
restored action and code to activate/deactivate it
Diffstat (limited to 'src/webtab/webview.cpp')
-rw-r--r-- | src/webtab/webview.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/webtab/webview.cpp b/src/webtab/webview.cpp index 0cc09574..ec74be1e 100644 --- a/src/webtab/webview.cpp +++ b/src/webtab/webview.cpp @@ -274,9 +274,6 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) KMenu menu(this); QAction *a; - KAction *inspectAction = new KAction(KIcon("layer-visible-on"), i18n("Inspect Element"), this); - connect(inspectAction, SIGNAL(triggered(bool)), this, SLOT(inspect())); - KAction *sendByMailAction = new KAction(this); sendByMailAction->setIcon(KIcon("mail-send")); connect(sendByMailAction, SIGNAL(triggered(bool)), this, SLOT(sendByMail())); @@ -359,7 +356,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) if (webwin) { menu.addAction(webwin->actionByName("page_source")); - menu.addAction(inspectAction); + menu.addAction(webwin->actionByName("web_inspector")); } } @@ -542,7 +539,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) menu.addAction(sendByMailAction); if (webwin) - menu.addAction(inspectAction); + menu.addAction(webwin->actionByName("web_inspector")); // SPELL CHECK Actions if (m_contextMenuHitResult.isContentEditable()) @@ -1045,17 +1042,6 @@ void WebView::wheelEvent(QWheelEvent *event) } -void WebView::inspect() -{ - WebTab *tab = qobject_cast<WebTab *>(parent()); - WebWindow *webwin = tab->webWindow(); - QAction *a = webwin->actionByName("web_inspector"); - if (a && !a->isChecked()) - a->trigger(); - pageAction(QWebPage::InspectElement)->trigger(); -} - - void WebView::scrollFrameChanged() { // do the scrolling |