Skip to content
Permalink
Browse files
[Qt] Remove the QWebPage:webInspectorTriggered signal.
User customization of the communication between QWebPage
and QWebInspector will be properly designed in the next version.
https://bugs.webkit.org/show_bug.cgi?id=30773

Patch by Jocelyn Turcotte <jocelyn.turcotte@nokia.com> on 2009-11-09
Reviewed by Simon Hausmann.

* Api/qwebinspector.cpp:
* Api/qwebpage.cpp:
(QWebPagePrivate::getOrCreateInspector):
(QWebPage::triggerAction):
* Api/qwebpage.h:
* QtLauncher/main.cpp:
(MainWindow::MainWindow):

Canonical link: https://commits.webkit.org/42086@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@50656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
jturcotte authored and tronical committed Nov 9, 2009
1 parent f434711 commit 214278b250652c7a87f02f33fdd12de25d0af4db
Showing with 19 additions and 30 deletions.
  1. +1 −5 WebKit/qt/Api/qwebinspector.cpp
  2. +1 −23 WebKit/qt/Api/qwebpage.cpp
  3. +0 −1 WebKit/qt/Api/qwebpage.h
  4. +17 −0 WebKit/qt/ChangeLog
  5. +0 −1 WebKit/qt/QtLauncher/main.cpp
@@ -50,18 +50,14 @@
\section1 Resources
This class acts mostly as a container and a controller for the inspector.
Most of the resources needed by the inspector are owned by the associated
QWebPage and are allocated the first time that:
\list
\o an element is inspected
\o the QWebInspector is shown.
\endlist
This class acts mostly as a container and a controller for the inspector.
You can defer the creation and association of the QWebInspector until
the first emission of QWebPage::webInspectorTriggered() to save additional
resources.
\section1 Inspector configuration persistence
The inspector allows the user to configure some options through its
@@ -1471,8 +1471,6 @@ QWebInspector* QWebPagePrivate::getOrCreateInspector()
if (!inspector) {
QWebInspector* insp = new QWebInspector;
insp->setPage(q);
insp->connect(q, SIGNAL(webInspectorTriggered(const QWebElement&)), SLOT(show()));
insp->show(); // The inspector is expected to be shown on inspection
inspectorIsInternalOnly = true;

Q_ASSERT(inspector); // Associated through QWebInspector::setPage(q)
@@ -2018,11 +2016,9 @@ void QWebPage::triggerAction(WebAction action, bool)
editor->setBaseWritingDirection(RightToLeftWritingDirection);
break;
case InspectElement: {
QWebElement inspectedElement(QWebElement::enclosingElement(d->hitTestResult.d->innerNonSharedNode.get()));
emit webInspectorTriggered(inspectedElement);

if (!d->hitTestResult.isNull()) {
d->getOrCreateInspector(); // Make sure the inspector is created
d->inspector->show(); // The inspector is expected to be shown on inspection
d->page->inspectorController()->inspect(d->hitTestResult.d->innerNonSharedNode.get());
}
break;
@@ -3422,24 +3418,6 @@ quint64 QWebPage::bytesReceived() const
\sa linkHovered()
*/

/*!
\fn void QWebPage::webInspectorTriggered(const QWebElement& inspectedElement);
\since 4.6
This signal is emitted when the user triggered an inspection through the
context menu. If a QWebInspector is associated to this page, it should be
visible to the user after this signal has been emitted.
If still no QWebInspector is associated to this QWebPage after the emission
of this signal, a privately owned inspector will be shown to the user.
\note \a inspectedElement contains the QWebElement under the context menu.
It is not garanteed to be the same as the focused element in the web
inspector.
\sa QWebInspector
*/

/*!
\fn void QWebPage::toolBarVisibilityChangeRequested(bool visible)
@@ -329,7 +329,6 @@ public Q_SLOTS:
void windowCloseRequested();
void printRequested(QWebFrame *frame);
void linkClicked(const QUrl &url);
void webInspectorTriggered(const QWebElement& inspectedElement);

void toolBarVisibilityChangeRequested(bool visible);
void statusBarVisibilityChangeRequested(bool visible);
@@ -1,3 +1,20 @@
2009-11-09 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>

Reviewed by Simon Hausmann.

[Qt] Remove the QWebPage:webInspectorTriggered signal.
User customization of the communication between QWebPage
and QWebInspector will be properly designed in the next version.
https://bugs.webkit.org/show_bug.cgi?id=30773

* Api/qwebinspector.cpp:
* Api/qwebpage.cpp:
(QWebPagePrivate::getOrCreateInspector):
(QWebPage::triggerAction):
* Api/qwebpage.h:
* QtLauncher/main.cpp:
(MainWindow::MainWindow):

2009-11-05 Simon Hausmann <hausmann@webkit.org>

Reviewed by Tor Arne Vestbø.
@@ -109,7 +109,6 @@ class MainWindow : public QMainWindow
inspector->setPage(page);
inspector->hide();
connect(this, SIGNAL(destroyed()), inspector, SLOT(deleteLater()));
connect(page, SIGNAL(webInspectorTriggered(const QWebElement&)), inspector, SLOT(show()));

setupUI();

0 comments on commit 214278b

Please sign in to comment.