Skip to content
Permalink
Browse files
2009-11-23 David Boddie <dboddie@trolltech.com>
        Reviewed by Simon Hausmann.

        Updated the QWebElement documentation with links to examples and
        external resources.
        Fixed the project file for the webelement snippet and tidied up the
        markers used for quoting the code.

        * Api/qwebelement.cpp:
        * docs/webkitsnippets/webelement/main.cpp:
        (findAll):
        * docs/webkitsnippets/webelement/webelement.pro:

Canonical link: https://commits.webkit.org/42737@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51308 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eseidel committed Nov 23, 2009
1 parent 97732ea commit 5d25de6d838b28758ac63f8729164f00a91adb96
Showing with 29 additions and 6 deletions.
  1. +10 −4 WebKit/qt/Api/qwebelement.cpp
  2. +14 −0 WebKit/qt/ChangeLog
  3. +2 −2 WebKit/qt/docs/webkitsnippets/webelement/main.cpp
  4. +3 −0 WebKit/qt/docs/webkitsnippets/webelement/webelement.pro
@@ -99,6 +99,14 @@ class QWebElementPrivate {
It is possible to replace the contents of child elements using
setPlainText() and setInnerXml(). To replace the element itself and its
contents, use setOuterXml().
\section1 Examples
The \l{DOM Traversal Example} shows one way to traverse documents in a running
example.
The \l{Simple Selector Example} can be used to experiment with the searching
features of this class and provides sample code you can start working with.
*/

/*!
@@ -195,8 +203,7 @@ bool QWebElement::isNull() const
\a selectorQuery. If there are no matching elements, an empty list is
returned.
\l{http://www.w3.org/TR/REC-CSS2/selector.html#q1}{Standard CSS2 selector}
syntax is used for the query.
\l{Standard CSS2 selector} syntax is used for the query.
\note This search is performed recursively.
@@ -211,8 +218,7 @@ QWebElementCollection QWebElement::findAll(const QString &selectorQuery) const
Returns the first child element that matches the given CSS selector
\a selectorQuery.
\l{http://www.w3.org/TR/REC-CSS2/selector.html#q1}{Standard CSS2 selector}
syntax is used for the query.
\l{Standard CSS2 selector} syntax is used for the query.
\note This search is performed recursively.
@@ -1,3 +1,17 @@
2009-11-23 David Boddie <dboddie@trolltech.com>

Reviewed by Simon Hausmann.

Updated the QWebElement documentation with links to examples and
external resources.
Fixed the project file for the webelement snippet and tidied up the
markers used for quoting the code.

* Api/qwebelement.cpp:
* docs/webkitsnippets/webelement/main.cpp:
(findAll):
* docs/webkitsnippets/webelement/webelement.pro:

2009-11-23 Simon Hausmann <simon.hausmann@nokia.com>

Reviewed by Kenneth Rohde Christiansen.
@@ -22,7 +22,6 @@
#include <qwebview.h>
#include <qwebframe.h>
#include <qwebelement.h>
#include <qdebug.h>

static QWebFrame *frame;

@@ -53,9 +52,10 @@ static void findAll()
</p>
*/

//! [FindAll intro]
QList<QWebElement> allSpans = document.findAll("span");
QList<QWebElement> introSpans = document.findAll("p.intro span");
//! [FindAll]
//! [FindAll intro] //! [FindAll]
}

int main(int argc, char *argv[])
@@ -1,5 +1,8 @@
TEMPLATE = app
CONFIG -= app_bundle
CONFIG(QTDIR_build) {
QT += webkit
}
SOURCES = main.cpp
include(../../../../../WebKit.pri)
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR

0 comments on commit 5d25de6

Please sign in to comment.