summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-11-12 13:25:09 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-11-12 13:25:09 (GMT)
commit05c1839531008d3cab40fb6fdaa22667c2133d7e (patch)
treed13d25325b6b34311d30b8c396ffe99b06275e3f
parentd39104d9b0ce43f872d2880baef8e1cff289adb8 (diff)
parentaeec06b844f21286fd228cbcc1cac7f5ea65e46b (diff)
downloadQt-05c1839531008d3cab40fb6fdaa22667c2133d7e.zip
Qt-05c1839531008d3cab40fb6fdaa22667c2133d7e.tar.gz
Qt-05c1839531008d3cab40fb6fdaa22667c2133d7e.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-doc-team into 4.6
Conflicts: dist/changes-4.6.0 src/corelib/tools/qscopedpointer_p.h src/gui/widgets/qlcdnumber.cpp
-rw-r--r--demos/textedit/example.html2
-rw-r--r--dist/changes-4.6.011
-rw-r--r--doc/src/diagrams/webkit-domtraversal.pngbin0 -> 108725 bytes
-rw-r--r--doc/src/diagrams/webkit-simpleselector.pngbin0 -> 82564 bytes
-rw-r--r--doc/src/external-resources.qdoc5
-rw-r--r--doc/src/getting-started/examples.qdoc87
-rw-r--r--doc/src/images/webkit-domtraversal.pngbin0 -> 91304 bytes
-rw-r--r--doc/src/images/webkit-simpleselector.pngbin0 -> 130292 bytes
-rw-r--r--doc/src/qt4-intro.qdoc6
-rw-r--r--examples/webkit/domtraversal/domtraversal.pro11
-rw-r--r--examples/webkit/domtraversal/main.cpp52
-rw-r--r--examples/webkit/domtraversal/window.cpp90
-rw-r--r--examples/webkit/domtraversal/window.h71
-rw-r--r--examples/webkit/domtraversal/window.ui89
-rw-r--r--examples/webkit/simpleselector/main.cpp54
-rw-r--r--examples/webkit/simpleselector/simpleselector.pro11
-rw-r--r--examples/webkit/simpleselector/window.cpp81
-rw-r--r--examples/webkit/simpleselector/window.h64
-rw-r--r--examples/webkit/simpleselector/window.ui72
-rw-r--r--examples/webkit/webkit.pro6
-rw-r--r--src/corelib/tools/qscopedpointer_p.h20
-rw-r--r--src/gui/kernel/qwidget.cpp11
-rw-r--r--src/gui/kernel/qwidget.h4
-rw-r--r--src/gui/painting/qpaintdevice.qdoc12
-rw-r--r--src/gui/widgets/qlcdnumber.cpp4
-rw-r--r--tools/assistant/lib/qhelpenginecore.cpp11
-rw-r--r--tools/qdoc3/codemarker.cpp4
27 files changed, 732 insertions, 46 deletions
diff --git a/demos/textedit/example.html b/demos/textedit/example.html
index 19b5520..6327b5f 100644
--- a/demos/textedit/example.html
+++ b/demos/textedit/example.html
@@ -26,7 +26,7 @@ p, li { white-space: pre-wrap; }
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"></p>
<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-size:16pt; font-weight:600;">Images</span></p>
<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:16pt; font-weight:600;"><span style=" font-size:11pt; font-weight:400;">Inline images are treated like ordinary ranges of characters in the text editor, so they flow with the surrounding text. Images can also be selected in the same way as text, making it easy to cut, copy, and paste them. </span></p>
-<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><img src=":/images/logo32.png" /><span style=" font-style:italic;"> Try to select this image by clicking and dragging over it with the mouse, or use the text cursor to select it by holding down Shift and using the arrow keys. You can then cut or copy it, and pasting it into different parts of this document.</span></p>
+<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><img src=":/images/logo32.png" /><span style=" font-style:italic;"> Try to select this image by clicking and dragging over it with the mouse, or use the text cursor to select it by holding down Shift and using the arrow keys. You can then cut or copy it, and paste it into different parts of this document.</span></p>
<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-size:16pt; font-weight:600;">Tables</span></p>
<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:16pt; font-weight:600;"><span style=" font-size:11pt; font-weight:400;">QTextEdit can arrange and format tables, supporting features such as row and column spans, text formatting within cells, and size constraints for columns. </span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"></p>
diff --git a/dist/changes-4.6.0 b/dist/changes-4.6.0
index 63822ab..a257c91 100644
--- a/dist/changes-4.6.0
+++ b/dist/changes-4.6.0
@@ -11,9 +11,9 @@ Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker, the (now obsolete) Task
Tracker, or the Merge Request queue of the public source repository.
-Each of these identifiers can be entered in the tracker to obtain more
-information about a particular change. Issue numbers for the various
-trackers have the following formats:
+Qt Bug Tracker: http://bugreports.qt.nokia.com
+Task Tracker: http://qt.nokia.com/developer/task-tracker
+Merge Request: http://qt.gitorious.org
QTBUG-1234 - Qt Bug Tracker: http://bugreports.qt.nokia.com
MR#1234 - Merge Request: http://qt.gitorious.org
@@ -57,8 +57,6 @@ MR#1234 - Merge Request: http://qt.gitorious.org
- New state machine framework added to QtCore.
- - QContiguousCache
- * New class for efficiently caching items within a scrolling view.
Third party components
----------------------
@@ -611,7 +609,8 @@ QtWebKit
* New functions for defining local URL schemes.
- QWebSettings
- * New options for text encoding and off-line web application cache (HTML5).
+ * New options for text encoding, printing shrink factor and off-line web
+ application cache (HTML5).
- QWebView
* Support for render hints.
diff --git a/doc/src/diagrams/webkit-domtraversal.png b/doc/src/diagrams/webkit-domtraversal.png
new file mode 100644
index 0000000..5cd6d1f
--- /dev/null
+++ b/doc/src/diagrams/webkit-domtraversal.png
Binary files differ
diff --git a/doc/src/diagrams/webkit-simpleselector.png b/doc/src/diagrams/webkit-simpleselector.png
new file mode 100644
index 0000000..e442f97
--- /dev/null
+++ b/doc/src/diagrams/webkit-simpleselector.png
Binary files differ
diff --git a/doc/src/external-resources.qdoc b/doc/src/external-resources.qdoc
index 4e1f3b7..f965869 100644
--- a/doc/src/external-resources.qdoc
+++ b/doc/src/external-resources.qdoc
@@ -412,3 +412,8 @@
\externalpage http://www.directfb.org/docs/DirectFB_Reference_1_4/types.html#DFBSurfaceDescription
\title DirectFB - DFBSurfaceDescription
*/
+
+/*!
+ \externalpage http://www.w3.org/TR/REC-CSS2/selector.html#q1
+ \title Standard CSS2 selector
+*/
diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc
index 79cbe89..eec0492 100644
--- a/doc/src/getting-started/examples.qdoc
+++ b/doc/src/getting-started/examples.qdoc
@@ -336,13 +336,6 @@
features is the archive of the \l {Qt Quarterly}.
\endtable
-
- \omit
- In the list below, examples marked with an asterisk (*) are fully
- documented. Eventually, all the examples will be fully documented,
- but sometimes we include an example before we have time to write
- about it.
- \endomit
*/
/*!
@@ -388,6 +381,8 @@
\o \l{widgets/wiggly}{Wiggly}\raisedaster
\o \l{widgets/windowflags}{Window Flags}\raisedaster
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -416,6 +411,8 @@
\o \l{dialogs/tabdialog}{Tab Dialog}\raisedaster
\o \l{dialogs/trivialwizard}{Trivial Wizard}
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -442,12 +439,14 @@
\o \l{mainwindows/recentfiles}{Recent Files}
\o \l{mainwindows/sdi}{SDI}
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
\page examples-layouts.html
\title Layout Examples
-
+
\previouspage Main Window Examples
\contentspage Qt Examples
\nextpage Item Views Examples
@@ -467,6 +466,8 @@
\o \l{layouts/dynamiclayouts}{Dynamic Layouts}
\o \l{layouts/flowlayout}{Flow Layout}
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -503,6 +504,8 @@
\o \l{itemviews/spinboxdelegate}{Spin Box Delegate}\raisedaster
\o \l{itemviews/stardelegate}{Star Delegate}\raisedaster
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -529,6 +532,8 @@
\o \l{graphicsview/portedasteroids}{Ported Asteroids}
\o \l{graphicsview/portedcanvas}{Ported Canvas}
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -559,6 +564,8 @@
\o \l{painting/svgviewer}{SVG Viewer}
\o \l{painting/transformations}{Transformations}\raisedaster
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -631,16 +638,18 @@
\o \l{draganddrop/fridgemagnets}{Fridge Magnets}\raisedaster
\o \l{draganddrop/puzzle}{Drag and Drop Puzzle}
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
\page examples-threadandconcurrent.html
\title Threading and Concurrent Programming Examples
-
+
\previouspage Drag and Drop Examples
\contentspage Qt Examples
\nextpage Tools Examples
-
+
\image thread-examples.png
Qt 4 makes it easier than ever to write multithreaded applications. More
@@ -669,6 +678,8 @@
\o \l{qtconcurrent/runfunction}{QtConcurrent Run Function}
\o \l{qtconcurrent/wordcount}{QtConcurrent Word Count}
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -704,6 +715,8 @@
\o \l{tools/treemodelcompleter}{Tree Model Completer}\raisedaster
\o \l{tools/undoframework}{Undo Framework}\raisedaster
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -736,6 +749,8 @@
\o \l{network/torrent}{Torrent}
\o \l{network/googlesuggest}{Google Suggest}
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -745,7 +760,7 @@
\previouspage Network Examples
\contentspage Qt Examples
\nextpage OpenGL Examples
-
+
\image ipc-examples.png
\list
@@ -784,6 +799,8 @@
\o \l{opengl/samplebuffers}{Sample Buffers}
\o \l{opengl/textures}{Textures}
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -829,6 +846,8 @@
\o \l{phonon/capabilities}{Capabilities}\raisedaster
\o \l{phonon/qmusicplayer}{Music Player}\raisedaster
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -855,6 +874,8 @@
\o \l{sql/tablemodel}{Table Model}
\o \l{sql/sqlwidgetmapper}{SQL Widget Mapper}\raisedaster
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
@@ -890,6 +911,8 @@
\o \l{xmlpatterns/trafficinfo}{Traffic Info}\raisedaster
\o \l{xmlpatterns/schema}{XML Schema Validation}\raisedaster
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -996,12 +1019,26 @@
from displaying Web pages within a Qt user interface to an implementation of
a basic function Web browser.
- \list
- \o \l{webkit/previewer}{Previewer}\raisedaster
- \o \l{webkit/formextractor}{Form Extractor}
- \o \l{webkit/googlechat}{Google Chat}
- \o \l{webkit/fancybrowser}{Fancy Browser}
- \endlist
+ \table
+ \header \o Example \o Description
+ \row \o \l{webkit/domtraversal}{DOM Traversal}\raisedaster
+ \o Shows how to use QWebElement to inspect the document structure of a Web page.
+ \row \o \l{webkit/fancybrowser}{Fancy Browser}
+ \o A more advanced browser example, showing the use of jQuery to perform effects.
+ \row \o \l{webkit/formextractor}{Form Extractor}
+ \o How to use JavaScript and C++ together to read page content.
+ \row \o \l{webkit/googlechat}{Google Chat}
+ \o A real-world example that shows how an existing Web-based service can be accessed
+ using QtWebKit.
+ \row \o \l{webkit/previewer}{Previewer}\raisedaster
+ \o Shows how to make a simple Web page previewer by using Qt's text input widgets
+ together with a QWebView widget.
+ \row \o \l{webkit/simpleselector}{Simple Selector}\raisedaster
+ \o A basic demonstration, showing how to use QWebElement to select elements in a
+ Web page.
+ \endtable
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -1021,6 +1058,8 @@
\list
\o \l{help/simpletextviewer}{Simple Text Viewer}\raisedaster
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -1060,13 +1099,15 @@
\image animation-examples.png Animation
\list
- \o \l{animation/animatedtiles}{Animated Tiles}
- \o \l{animation/appchooser}{Application Chooser}
- \o \l{animation/easing}{Easing Curves}
+ \o \l{animation/animatedtiles}{Animated Tiles}
+ \o \l{animation/appchooser}{Application Chooser}
+ \o \l{animation/easing}{Easing Curves}
\o \l{animation/moveblocks}{Move Blocks}\raisedaster
- \o \l{animation/states}{States}
+ \o \l{animation/states}{States}
\o \l{animation/stickman}{Stick man}\raisedaster
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -1100,6 +1141,8 @@
\o \l{dbus/pingpong}{Ping Pong}
\o \l{dbus/remotecontrolledcar}{Remote Controlled Car}
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -1131,7 +1174,7 @@
\previouspage Qt for Embedded Linux Examples
\contentspage Qt Examples
\nextpage Qt Quarterly
-
+
\image activeqt-examples.png ActiveQt
\list
diff --git a/doc/src/images/webkit-domtraversal.png b/doc/src/images/webkit-domtraversal.png
new file mode 100644
index 0000000..8c7b2bc
--- /dev/null
+++ b/doc/src/images/webkit-domtraversal.png
Binary files differ
diff --git a/doc/src/images/webkit-simpleselector.png b/doc/src/images/webkit-simpleselector.png
new file mode 100644
index 0000000..2c888ca
--- /dev/null
+++ b/doc/src/images/webkit-simpleselector.png
Binary files differ
diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc
index 2f74451..649ed03 100644
--- a/doc/src/qt4-intro.qdoc
+++ b/doc/src/qt4-intro.qdoc
@@ -581,11 +581,7 @@
DOM, helps reuse CSS selector knowledge, and gives little
maintenance or footprint overhead.
- \code
- QWebElement document = frame->documentElement();
- QList<QWebElement> allSpans = document.findAll("span");
- QList<QWebElement> introSpans = document.findAll("p.intro span");
- \endcode
+ \snippet webkitsnippets/webelement/main.cpp FindAll intro
See the QWebElement class documentation for more information.
diff --git a/examples/webkit/domtraversal/domtraversal.pro b/examples/webkit/domtraversal/domtraversal.pro
new file mode 100644
index 0000000..dda63ba
--- /dev/null
+++ b/examples/webkit/domtraversal/domtraversal.pro
@@ -0,0 +1,11 @@
+QT += webkit
+FORMS = window.ui
+HEADERS = window.h
+SOURCES = main.cpp \
+ window.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/webkit/domtraversal
+sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/webkit/domtraversal
+INSTALLS += target sources
diff --git a/examples/webkit/domtraversal/main.cpp b/examples/webkit/domtraversal/main.cpp
new file mode 100644
index 0000000..c8a1aec
--- /dev/null
+++ b/examples/webkit/domtraversal/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window window;
+ window.show();
+ window.setUrl(QUrl("http://qt.nokia.com/"));
+ return app.exec();
+}
diff --git a/examples/webkit/domtraversal/window.cpp b/examples/webkit/domtraversal/window.cpp
new file mode 100644
index 0000000..704a6e1
--- /dev/null
+++ b/examples/webkit/domtraversal/window.cpp
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtWebKit>
+
+#include "window.h"
+
+//! [Window constructor]
+Window::Window(QWidget *parent)
+ : QMainWindow(parent)
+{
+ setupUi(this);
+}
+//! [Window constructor]
+
+//! [set URL]
+void Window::setUrl(const QUrl &url)
+{
+ webView->setUrl(url);
+}
+//! [set URL]
+
+//! [begin document inspection]
+void Window::on_webView_loadFinished()
+{
+ treeWidget->clear();
+
+ QWebFrame *frame = webView->page()->mainFrame();
+ QWebElement document = frame->documentElement();
+
+ examineChildElements(document, treeWidget->invisibleRootItem());
+}
+//! [begin document inspection]
+
+//! [traverse document]
+void Window::examineChildElements(const QWebElement &parentElement,
+ QTreeWidgetItem *parentItem)
+{
+ QWebElement element = parentElement.firstChild();
+ while (!element.isNull()) {
+
+ QTreeWidgetItem *item = new QTreeWidgetItem();
+ item->setText(0, element.tagName());
+ parentItem->addChild(item);
+
+ examineChildElements(element, item);
+
+ element = element.nextSibling();
+ }
+}
+//! [traverse document]
diff --git a/examples/webkit/domtraversal/window.h b/examples/webkit/domtraversal/window.h
new file mode 100644
index 0000000..5988df9
--- /dev/null
+++ b/examples/webkit/domtraversal/window.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+#include <QUrl>
+#include <QWebElement>
+
+class QTreeWidgetItem;
+
+//! [Window class definition]
+#include "ui_window.h"
+
+class Window : public QMainWindow, private Ui::Window
+{
+ Q_OBJECT
+
+public:
+ Window(QWidget *parent = 0);
+ void setUrl(const QUrl &url);
+
+public slots:
+ void on_webView_loadFinished();
+
+private:
+ void examineChildElements(const QWebElement &parentElement,
+ QTreeWidgetItem *parentItem);
+};
+//! [Window class definition]
+
+#endif
diff --git a/examples/webkit/domtraversal/window.ui b/examples/webkit/domtraversal/window.ui
new file mode 100644
index 0000000..0fce035
--- /dev/null
+++ b/examples/webkit/domtraversal/window.ui
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Window</class>
+ <widget class="QMainWindow" name="Window">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>600</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Web Element DOM Traversal</string>
+ </property>
+ <widget class="QWidget" name="centralwidget">
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <property name="topMargin">
+ <number>4</number>
+ </property>
+ <property name="bottomMargin">
+ <number>4</number>
+ </property>
+ <item>
+ <widget class="QWebView" name="webView">
+ <property name="url">
+ <url>
+ <string>http://qt.nokia.com/</string>
+ </url>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menubar">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>27</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QStatusBar" name="statusbar"/>
+ <widget class="QDockWidget" name="dockWidget">
+ <property name="allowedAreas">
+ <set>Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea</set>
+ </property>
+ <property name="windowTitle">
+ <string>Document Structure</string>
+ </property>
+ <attribute name="dockWidgetArea">
+ <number>1</number>
+ </attribute>
+ <widget class="QWidget" name="dockWidgetContents">
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <property name="margin">
+ <number>4</number>
+ </property>
+ <item>
+ <widget class="QTreeWidget" name="treeWidget">
+ <attribute name="headerVisible">
+ <bool>false</bool>
+ </attribute>
+ <attribute name="headerVisible">
+ <bool>false</bool>
+ </attribute>
+ <column>
+ <property name="text">
+ <string notr="true">1</string>
+ </property>
+ </column>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>QWebView</class>
+ <extends>QWidget</extends>
+ <header>QtWebKit/QWebView</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/webkit/simpleselector/main.cpp b/examples/webkit/simpleselector/main.cpp
new file mode 100644
index 0000000..74c5469
--- /dev/null
+++ b/examples/webkit/simpleselector/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [main program]
+#include <QtGui>
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window window;
+ window.setUrl(QUrl("http://www.webkit.org"));
+ window.show();
+ return app.exec();
+}
+//! [main program]
diff --git a/examples/webkit/simpleselector/simpleselector.pro b/examples/webkit/simpleselector/simpleselector.pro
new file mode 100644
index 0000000..3f3037f
--- /dev/null
+++ b/examples/webkit/simpleselector/simpleselector.pro
@@ -0,0 +1,11 @@
+QT += webkit
+FORMS = window.ui
+HEADERS = window.h
+SOURCES = main.cpp \
+ window.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/webkit/simpleselector
+sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/webkit/simpleselector
+INSTALLS += target sources
diff --git a/examples/webkit/simpleselector/window.cpp b/examples/webkit/simpleselector/window.cpp
new file mode 100644
index 0000000..ad54487
--- /dev/null
+++ b/examples/webkit/simpleselector/window.cpp
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QWebElement>
+#include <QWebFrame>
+#include "window.h"
+
+//! [Window class constructor]
+Window::Window(QWidget *parent)
+ : QWidget(parent)
+{
+ setupUi(this);
+}
+//! [Window class constructor]
+
+//! [return pressed]
+void Window::on_elementLineEdit_returnPressed()
+{
+ QWebFrame *frame = webView->page()->mainFrame();
+
+//! [select elements]
+ QWebElement document = frame->documentElement();
+ QWebElementCollection elements = document.findAll(elementLineEdit->text());
+//! [select elements]
+
+ foreach (QWebElement element, elements)
+ element.setAttribute("style", "background-color: #f0f090");
+}
+//! [return pressed]
+
+//! [button clicked]
+void Window::on_highlightButton_clicked()
+{
+ on_elementLineEdit_returnPressed();
+}
+//! [button clicked]
+
+//! [set URL]
+void Window::setUrl(const QUrl &url)
+{
+ webView->setUrl(url);
+}
+//! [set URL]
diff --git a/examples/webkit/simpleselector/window.h b/examples/webkit/simpleselector/window.h
new file mode 100644
index 0000000..9f9344a
--- /dev/null
+++ b/examples/webkit/simpleselector/window.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QUrl>
+#include <QWidget>
+//! [Window class definition]
+#include "ui_window.h"
+
+class Window : public QWidget, private Ui::Window
+{
+ Q_OBJECT
+
+public:
+ Window(QWidget *parent = 0);
+ void setUrl(const QUrl &url);
+
+public slots:
+ void on_elementLineEdit_returnPressed();
+ void on_highlightButton_clicked();
+};
+//! [Window class definition]
+
+#endif
diff --git a/examples/webkit/simpleselector/window.ui b/examples/webkit/simpleselector/window.ui
new file mode 100644
index 0000000..aa824df
--- /dev/null
+++ b/examples/webkit/simpleselector/window.ui
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Window</class>
+ <widget class="QWidget" name="Window">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>640</width>
+ <height>480</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Web Element Selector</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QWebView" name="webView">
+ <property name="url">
+ <url>
+ <string>http://webkit.org/</string>
+ </url>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <layout class="QFormLayout" name="formLayout">
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::ExpandingFieldsGrow</enum>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="elementLabel">
+ <property name="text">
+ <string>&amp;Element:</string>
+ </property>
+ <property name="buddy">
+ <cstring>elementLineEdit</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="elementLineEdit">
+ <property name="text">
+ <string>li a</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QPushButton" name="highlightButton">
+ <property name="text">
+ <string>&amp;Highlight</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>QWebView</class>
+ <extends>QWidget</extends>
+ <header>QtWebKit/QWebView</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/webkit/webkit.pro b/examples/webkit/webkit.pro
index 0a1d6bd..c985ed5 100644
--- a/examples/webkit/webkit.pro
+++ b/examples/webkit/webkit.pro
@@ -1,7 +1,9 @@
TEMPLATE = subdirs
-SUBDIRS += formextractor \
+SUBDIRS += domtraversal \
+ formextractor \
previewer \
- fancybrowser
+ fancybrowser \
+ simpleselector
contains(QT_CONFIG, openssl):SUBDIRS += googlechat
diff --git a/src/corelib/tools/qscopedpointer_p.h b/src/corelib/tools/qscopedpointer_p.h
index b1636d5..fb627a4 100644
--- a/src/corelib/tools/qscopedpointer_p.h
+++ b/src/corelib/tools/qscopedpointer_p.h
@@ -76,6 +76,16 @@ public:
return this->d;
}
+ inline bool operator==(const QCustomScopedPointer<T, Cleanup> &other) const
+ {
+ return this->d == other.d;
+ }
+
+ inline bool operator!=(const QCustomScopedPointer<T, Cleanup> &other) const
+ {
+ return this->d != other.d;
+ }
+
private:
Q_DISABLE_COPY(QCustomScopedPointer)
};
@@ -120,6 +130,16 @@ public:
QScopedPointerSharedDeleter<T>::cleanup(oldD);
}
+ inline bool operator==(const QScopedSharedPointer<T> &other) const
+ {
+ return this->d == other.d;
+ }
+
+ inline bool operator!=(const QScopedSharedPointer<T> &other) const
+ {
+ return this->d != other.d;
+ }
+
private:
Q_DISABLE_COPY(QScopedSharedPointer)
};
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index c776c36..4aa358f 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -11462,6 +11462,17 @@ void QWidget::languageChange() { } // compat
\sa QWidget::setMaximumSize()
*/
+/*!
+ \fn QWidget::setupUi(QWidget *widget)
+
+ Sets up the user interface for the specified \a widget.
+
+ \note This function is available with widgets that derive from user
+ interface descriptions created using \l{uic}.
+
+ \sa {Using a Designer UI File in Your Application}
+*/
+
QRect QWidgetPrivate::frameStrut() const
{
Q_Q(const QWidget);
diff --git a/src/gui/kernel/qwidget.h b/src/gui/kernel/qwidget.h
index b7c55f9..5ba1d23 100644
--- a/src/gui/kernel/qwidget.h
+++ b/src/gui/kernel/qwidget.h
@@ -288,6 +288,10 @@ public:
void setMaximumWidth(int maxw);
void setMaximumHeight(int maxh);
+#ifdef Q_QDOC
+ void setupUi(QWidget *widget);
+#endif
+
QSize sizeIncrement() const;
void setSizeIncrement(const QSize &);
void setSizeIncrement(int w, int h);
diff --git a/src/gui/painting/qpaintdevice.qdoc b/src/gui/painting/qpaintdevice.qdoc
index dca7e0e..6c0b04c 100644
--- a/src/gui/painting/qpaintdevice.qdoc
+++ b/src/gui/painting/qpaintdevice.qdoc
@@ -221,6 +221,18 @@
/*!
\fn int QPaintDevice::numColors() const
+ \deprecated
+
+ Use colorCount() instead.
+
+ Returns the number of different colors available for the paint
+ device. Since this value is an int, it will not be sufficient to represent
+ the number of colors on 32 bit displays, in this case INT_MAX is
+ returned instead.
+*/
+
+/*!
+ \fn int QPaintDevice::colorCount() const
Returns the number of different colors available for the paint
device. Since this value is an int, it will not be sufficient to represent
diff --git a/src/gui/widgets/qlcdnumber.cpp b/src/gui/widgets/qlcdnumber.cpp
index 3497eba..69c52cf 100644
--- a/src/gui/widgets/qlcdnumber.cpp
+++ b/src/gui/widgets/qlcdnumber.cpp
@@ -441,10 +441,10 @@ QLCDNumber::~QLCDNumber()
/*!
- \obsolete
+ \deprecated
\property QLCDNumber::numDigits
\brief the current number of digits displayed
- \sa setDigitCount()
+ \sa digitCount
*/
void QLCDNumber::setNumDigits(int numDigits)
diff --git a/tools/assistant/lib/qhelpenginecore.cpp b/tools/assistant/lib/qhelpenginecore.cpp
index 8c6c2fe..140e99a 100644
--- a/tools/assistant/lib/qhelpenginecore.cpp
+++ b/tools/assistant/lib/qhelpenginecore.cpp
@@ -177,12 +177,11 @@ void QHelpEngineCorePrivate::errorReceived(const QString &msg)
instead.
When creating a custom help viewer the viewer can be
-configured by writing a custom collection file which could contain various
-keywords to be used to configure the help engine. These keywords and values
-and their meaning can be found in the help information for
-\l{assistant-custom-help-viewer.html#creating-a-custom-help-collection-file
-}{creating a custom help collection file} for
-Assistant.
+ configured by writing a custom collection file which could contain various
+ keywords to be used to configure the help engine. These keywords and values
+ and their meaning can be found in the help information for
+ \l{assistant-custom-help-viewer.html#creating-a-custom-help-collection-file}
+ {creating a custom help collection file} for Assistant.
*/
/*!
diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp
index a9da841..c8c92ec 100644
--- a/tools/qdoc3/codemarker.cpp
+++ b/tools/qdoc3/codemarker.cpp
@@ -602,10 +602,10 @@ QString CodeMarker::macName(const Node *node, const QString &name)
}
if (node->name().isEmpty()) {
- return QLatin1Char('/') + myName;
+ return QLatin1Char('/') + protect(myName);
}
else {
- return plainFullName(node) + QLatin1Char('/') + myName;
+ return plainFullName(node) + QLatin1Char('/') + protect(myName);
}
}