summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Yard <peter.yard@nokia.com>2010-12-22 06:04:57 (GMT)
committerPeter Yard <peter.yard@nokia.com>2010-12-22 06:04:57 (GMT)
commit53b018a42813e44787aa1edc35d59feaa86cf9d7 (patch)
tree7cce8f18faf26a87cfb5f27d1417c2a2ec86470c
parent55c32b91a298d52bd7c29968d21b4b7a5ee741e4 (diff)
parentafa22a20c1b89960b647b0e3a9dc390fe6f87eae (diff)
downloadQt-53b018a42813e44787aa1edc35d59feaa86cf9d7.zip
Qt-53b018a42813e44787aa1edc35d59feaa86cf9d7.tar.gz
Qt-53b018a42813e44787aa1edc35d59feaa86cf9d7.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
-rwxr-xr-xconfigure2
-rw-r--r--demos/declarative/minehunt/minehunt.pro2
-rw-r--r--demos/textedit/textedit.cpp6
-rw-r--r--doc/src/declarative/codingconventions.qdoc18
-rw-r--r--doc/src/declarative/declarativeui.qdoc2
-rw-r--r--doc/src/declarative/extending.qdoc2
-rw-r--r--doc/src/declarative/focus.qdoc339
-rw-r--r--doc/src/declarative/javascriptblocks.qdoc4
-rw-r--r--doc/src/declarative/modules.qdoc66
-rw-r--r--doc/src/development/qtestlib.qdoc31
-rw-r--r--doc/src/examples/diagramscene.qdoc2
-rw-r--r--doc/src/external-resources.qdoc5
-rw-r--r--doc/src/frameworks-technologies/threads.qdoc20
-rw-r--r--doc/src/getting-started/gettingstartedqml.qdoc2
-rw-r--r--doc/src/getting-started/installation.qdoc3
-rw-r--r--doc/src/images/declarative-qmlfocus1.pngbin0 -> 1890 bytes
-rw-r--r--doc/src/images/declarative-qmlfocus2.pngbin0 -> 2756 bytes
-rw-r--r--doc/src/images/declarative-qmlfocus3.pngbin0 -> 2743 bytes
-rw-r--r--doc/src/images/declarative-qmlfocus4.pngbin0 -> 4137 bytes
-rw-r--r--doc/src/images/declarative-qmlfocus5.pngbin0 -> 1376 bytes
-rw-r--r--doc/src/legal/3rdparty.qdoc81
-rw-r--r--doc/src/network-programming/bearermanagement.qdoc8
-rw-r--r--doc/src/platforms/platform-notes.qdoc3
-rw-r--r--doc/src/qt-webpages.qdoc15
-rw-r--r--doc/src/qt4-intro.qdoc62
-rw-r--r--doc/src/snippets/declarative/codingconventions/private.qml49
-rw-r--r--doc/src/snippets/declarative/comments.qml1
-rw-r--r--doc/src/snippets/declarative/focus/advancedFocus.qml67
-rw-r--r--doc/src/snippets/declarative/focus/basicwidget.qml59
-rw-r--r--doc/src/snippets/declarative/focus/clickablewidget.qml61
-rw-r--r--doc/src/snippets/declarative/focus/focusColumn.qml64
-rw-r--r--doc/src/snippets/declarative/focus/focusscopewidget.qml61
-rw-r--r--doc/src/snippets/declarative/focus/myclickablewidget.qml69
-rw-r--r--doc/src/snippets/declarative/focus/myfocusscopewidget.qml66
-rw-r--r--doc/src/snippets/declarative/focus/mywidget.qml58
-rw-r--r--doc/src/snippets/declarative/focus/qmldir4
-rw-r--r--doc/src/snippets/declarative/focus/rectangle.qml62
-rw-r--r--doc/src/snippets/declarative/focus/widget.qml61
-rw-r--r--doc/src/widgets-and-layouts/gallery-cde.qdoc427
-rw-r--r--doc/src/widgets-and-layouts/gallery-cleanlooks.qdoc432
-rw-r--r--doc/src/widgets-and-layouts/gallery-gtk.qdoc436
-rw-r--r--doc/src/widgets-and-layouts/gallery-macintosh.qdoc432
-rw-r--r--doc/src/widgets-and-layouts/gallery-motif.qdoc432
-rw-r--r--doc/src/widgets-and-layouts/gallery-plastique.qdoc432
-rw-r--r--doc/src/widgets-and-layouts/gallery-windows.qdoc432
-rw-r--r--doc/src/widgets-and-layouts/gallery-windowsvista.qdoc432
-rw-r--r--doc/src/widgets-and-layouts/gallery-windowsxp.qdoc432
-rw-r--r--doc/src/widgets-and-layouts/gallery.qdoc112
-rw-r--r--examples/network/bearermonitor/bearermonitor.cpp2
-rw-r--r--examples/tools/echoplugin/echowindow/echowindow.pro4
-rw-r--r--examples/tools/styleplugin/plugin/plugin.pro4
-rw-r--r--mkspecs/common/symbian/symbian.conf8
-rw-r--r--mkspecs/linux-icc/qmake.conf2
-rw-r--r--src/3rdparty/phonon/mmf/abstractaudioeffect.h2
-rw-r--r--src/3rdparty/phonon/mmf/audioequalizer.cpp2
-rw-r--r--src/3rdparty/phonon/mmf/bassboost.cpp2
-rw-r--r--src/3rdparty/phonon/mmf/environmentalreverb.cpp2
-rw-r--r--src/3rdparty/phonon/mmf/loudness.cpp2
-rw-r--r--src/3rdparty/phonon/mmf/stereowidening.cpp2
-rw-r--r--src/corelib/io/qdiriterator.cpp6
-rw-r--r--src/corelib/io/qresource.cpp2
-rw-r--r--src/corelib/kernel/qabstracteventdispatcher.cpp52
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix.cpp1
-rw-r--r--src/corelib/tools/qlocale.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp24
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp12
-rw-r--r--src/declarative/qml/qdeclarativeenginedebug.cpp5
-rw-r--r--src/declarative/qml/qdeclarativeimageprovider.cpp16
-rw-r--r--src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp53
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp8
-rw-r--r--src/declarative/util/qdeclarativeview.cpp7
-rw-r--r--src/declarative/util/qdeclarativexmllistmodel.cpp4
-rw-r--r--src/gui/dialogs/qdialog.cpp13
-rw-r--r--src/gui/dialogs/qfiledialog_mac.mm8
-rw-r--r--src/gui/dialogs/qfiledialog_symbian.cpp73
-rw-r--r--src/gui/dialogs/qinputdialog.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicslayoutitem.cpp3
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp2
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp10
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp2
-rw-r--r--src/gui/kernel/qapplication.cpp6
-rw-r--r--src/gui/kernel/qapplication_s60.cpp19
-rw-r--r--src/gui/kernel/qcocoasharedwindowmethods_mac_p.h2
-rw-r--r--src/gui/kernel/qeventdispatcher_mac.mm3
-rw-r--r--src/gui/kernel/qwidget_mac.mm16
-rw-r--r--src/gui/kernel/qwidget_s60.cpp4
-rw-r--r--src/gui/painting/qdrawhelper.cpp11
-rw-r--r--src/gui/painting/qdrawhelper_p.h4
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp33
-rw-r--r--src/gui/painting/qpaintengine_raster_p.h2
-rw-r--r--src/gui/styles/qs60style.cpp38
-rw-r--r--src/gui/widgets/qcombobox.cpp2
-rw-r--r--src/gui/widgets/qdockwidget.cpp17
-rw-r--r--src/gui/widgets/qstatusbar.cpp2
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp20
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel_p.h1
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp4
-rw-r--r--src/network/bearer/qnetworksession.cpp3
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp13
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp52
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp16
-rw-r--r--src/opengl/qgl.cpp1
-rw-r--r--src/opengl/qgl_egl.cpp2
-rw-r--r--src/opengl/qgl_p.h1
-rw-r--r--src/opengl/qwindowsurface_gl.cpp13
-rw-r--r--src/plugins/bearer/icd/qicdengine.cpp96
-rw-r--r--src/plugins/bearer/icd/qicdengine.h6
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp8
-rw-r--r--src/plugins/phonon/mmf/mmf.pro4
-rw-r--r--src/s60installs/s60installs.pro2
-rw-r--r--tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp37
-rw-r--r--tests/auto/declarative/qdeclarativeimage/data/heart-win32.pngbin12457 -> 12621 bytes
-rw-r--r--tests/auto/declarative/qdeclarativeimage/data/heart.pngbin12424 -> 12577 bytes
-rw-r--r--tests/auto/declarative/qdeclarativeimage/data/heart200-win32.pngbin7939 -> 8062 bytes
-rw-r--r--tests/auto/declarative/qdeclarativeimage/data/heart200.pngbin7943 -> 8063 bytes
-rw-r--r--tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp46
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml40
-rw-r--r--tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/qtbug16037.qml37
-rw-r--r--tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp53
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/image.pngbin0 -> 173 bytes
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/reset.qml9
-rw-r--r--tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp13
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp13
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp13
-rw-r--r--tests/auto/headers/tst_headers.cpp6
-rw-r--r--tests/auto/qapplication/modal/main.cpp1
-rw-r--r--tests/auto/qapplication/test/test.pro2
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp39
-rw-r--r--tests/auto/qinputcontext/qinputcontext.pro2
-rw-r--r--tests/auto/qinputcontext/tst_qinputcontext.cpp141
-rw-r--r--tests/auto/qprocess/tst_qprocess.cpp8
-rw-r--r--tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp10
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp32
-rw-r--r--tests/auto/symbian/orientationchange/orientationchange.pro1
-rw-r--r--tests/auto/symbian/orientationchange/tst_orientationchange.cpp43
-rw-r--r--tools/configure/configureapp.cpp8
-rw-r--r--tools/runonphone/serenum_unix.cpp29
144 files changed, 2965 insertions, 3733 deletions
diff --git a/configure b/configure
index 7141880..aa8d047 100755
--- a/configure
+++ b/configure
@@ -480,7 +480,7 @@ elif [ $COMMERCIAL_USER = "yes" ]; then
# Qt All-OS
LICENSE_EXTENSION="-ALLOS"
;;
- 8M,* | KM,* | S9,* | SC,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
+ 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
# Qt for Embedded Linux
LICENSE_EXTENSION="-EMBEDDED"
;;
diff --git a/demos/declarative/minehunt/minehunt.pro b/demos/declarative/minehunt/minehunt.pro
index 8a7fdc5..5929ecf 100644
--- a/demos/declarative/minehunt/minehunt.pro
+++ b/demos/declarative/minehunt/minehunt.pro
@@ -18,6 +18,6 @@ symbian:{
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
qmlminehuntfiles.sources = MinehuntCore minehunt.qml
- DEPLOYMENT = qmlminehuntfiles
+ DEPLOYMENT += qmlminehuntfiles
}
diff --git a/demos/textedit/textedit.cpp b/demos/textedit/textedit.cpp
index 165c97c..9fa1949 100644
--- a/demos/textedit/textedit.cpp
+++ b/demos/textedit/textedit.cpp
@@ -262,7 +262,8 @@ void TextEdit::setupEditActions()
tb->addAction(a);
menu->addAction(a);
#ifndef QT_NO_CLIPBOARD
- actionPaste->setEnabled(QApplication::clipboard()->mimeData()->hasText());
+ if (const QMimeData *md = QApplication::clipboard()->mimeData())
+ actionPaste->setEnabled(md->hasText());
#endif
}
@@ -681,7 +682,8 @@ void TextEdit::cursorPositionChanged()
void TextEdit::clipboardDataChanged()
{
#ifndef QT_NO_CLIPBOARD
- actionPaste->setEnabled(QApplication::clipboard()->mimeData()->hasText());
+ if (const QMimeData *md = QApplication::clipboard()->mimeData())
+ actionPaste->setEnabled(md->hasText());
#endif
}
diff --git a/doc/src/declarative/codingconventions.qdoc b/doc/src/declarative/codingconventions.qdoc
index ba789e0..3f92d46 100644
--- a/doc/src/declarative/codingconventions.qdoc
+++ b/doc/src/declarative/codingconventions.qdoc
@@ -35,7 +35,7 @@ This page assumes that you are already familiar with the QML language.
If you need an introduction to the language, please read \l {Introduction to the QML language}{the QML introduction} first.
-\section1 QML objects
+\section1 QML Objects
Through our documentation and examples, QML objects are always structured in the following order:
@@ -58,7 +58,7 @@ For example, a hypothetical \e photo QML object would look like this:
\snippet doc/src/snippets/declarative/codingconventions/photo.qml 0
-\section1 Grouped properties
+\section1 Grouped Properties
If using multiple properties from a group of properties,
we use the \e {group notation} rather than the \e {dot notation} to improve readability.
@@ -72,6 +72,18 @@ can be written like this:
\snippet doc/src/snippets/declarative/codingconventions/dotproperties.qml 1
+\section1 Private Properties
+
+QML and JavaScript do not enforce private properties like C++. There is a need
+to hide these private properties, for example, when the properties are part of
+the implementation. As a convention, private properties begin with two
+\e underscore characters. For example, \c __area, is a property that is
+accessible but is not meant for public use. Note that QML and JavaScript will
+grant the user access to these properties.
+
+\snippet doc/src/snippets/declarative/codingconventions/private.qml 0
+
+
\section1 Lists
If a list contains only one element, we generally omit the square brackets.
@@ -87,7 +99,7 @@ we will write this:
\snippet doc/src/snippets/declarative/codingconventions/lists.qml 1
-\section1 JavaScript code
+\section1 JavaScript Code
If the script is a single expression, we recommend writing it inline:
diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc
index 5d9eaaf..41b9952 100644
--- a/doc/src/declarative/declarativeui.qdoc
+++ b/doc/src/declarative/declarativeui.qdoc
@@ -108,6 +108,7 @@ Module.
\section1 Handling Data
\list
+\o \l{QML Basic Types}{QML Basic Data Types}
\o \l{Using QML Positioner and Repeater Items}
\o \l{QML Data Models}
\o \l{Presenting Data with QML}
@@ -136,6 +137,7 @@ Module.
\list
\o \l{QML Elements}
+\o \l{QML Basic Types}
\o \l{QML Global Object}
\o \l{QML Internationalization}
\o \l{QML Security}
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
index e23ca91..748ec6c 100644
--- a/doc/src/declarative/extending.qdoc
+++ b/doc/src/declarative/extending.qdoc
@@ -461,7 +461,7 @@ constructing an animation object and manually setting the animation's "target"
property, a property value source can be assigned directly to a property of any
type and automatically set up this association.
-The example shown here is rather contrived: the \c announcment property of the
+The example shown here is rather contrived: the \c announcement property of the
\c BirthdayParty object is a string that is printed every time it is assigned and
the \c HappyBirthdaySong value source generates the lyrics of the song
"Happy Birthday".
diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc
index 2e74fe0..ae72c3c 100644
--- a/doc/src/declarative/focus.qdoc
+++ b/doc/src/declarative/focus.qdoc
@@ -31,7 +31,7 @@
\title Keyboard Focus in QML
When a key is pressed or released, a key event is generated and delivered to the
-focused QML \l Item. To facilitate the construction of reusable components
+focused QML \l Item. To facilitate the construction of reusable components
and to address some of the cases unique to fluid user interfaces, the QML items add a
\e scope based extension to Qt's traditional keyboard focus model.
@@ -42,27 +42,21 @@ and to address some of the cases unique to fluid user interfaces, the QML items
When the user presses or releases a key, the following occurs:
\list 1
\o Qt receives the key action and generates a key event.
-\o If the Qt widget containing the \l QDeclarativeView has focus, the key event is delivered to it. Otherwise, regular Qt key handling continues.
-\o The key event is delivered by the scene to the QML \l Item with \e {active focus}. If no \l Item has \e {active focus}, the key event is \l {QEvent::ignore()}{ignored} and regular Qt key handling continues.
-\o If the QML \l Item with \e {active focus} accepts the key event, propagation stops. Otherwise the event is "bubbled up", by recursively passing it to each \l Item's parent until either the event is accepted, or the root \l Item is reached.
-
-If the \c {Rectangle} element in the following example has active focus and the \e A key is pressed,
-it will bubble up to its parent. However, pressing the \e B key will bubble up to the root
-item and thus subsequently be \l {QEvent::ignore()}{ignored}.
-
-\code
-Item {
- Item {
- Keys.onPressed: {
- if (event.key == Qt.Key_A) {
- console.log('Key A was pressed');
- event.accepted = true;
- }
- }
- Rectangle {}
- }
-}
-\endcode
+\o If the Qt widget containing the \l QDeclarativeView has focus, the key event
+is delivered to it. Otherwise, regular Qt key handling continues.
+\o The key event is delivered by the scene to the QML \l Item with
+\e {active focus}. If no Item has active focus, the key event is
+\l {QEvent::ignore()}{ignored} and regular Qt key handling continues.
+\o If the QML Item with active focus accepts the key event, propagation
+stops. Otherwise the event is "bubbled up", by recursively passing it to each
+Item's parent until either the event is accepted, or the root Item is reached.
+
+If the \c {Rectangle} element in the following example has active focus and the \c A key is pressed,
+it will bubble up to its parent. However, pressing the \c B key will bubble up to the root
+item and thus subsequently be ignored.
+
+\snippet doc/src/snippets/declarative/focus/rectangle.qml simple key event
+\snippet doc/src/snippets/declarative/focus/rectangle.qml simple key event end
\o If the root \l Item is reached, the key event is \l {QEvent::ignore()}{ignored} and regular Qt key handling continues.
@@ -72,232 +66,139 @@ See also the \l {Keys}{Keys attached property} and \l {KeyNavigation}{KeyNavigat
\section1 Querying the Active Focus Item
-Whether or not an \l Item has \e {active focus} can be queried through the
-property \c {Item::activeFocus}. For example, here we have a \l Text
-element whose text is determined by whether or not it has \e {active focus}.
+Whether or not an \l Item has active focus can be queried through the
+property \c {Item::activeFocus} property. For example, here we have a \l Text
+element whose text is determined by whether or not it has active focus.
-\code
-Text {
- text: activeFocus ? "I have active focus!" : "I do not have active focus"
-}
-\endcode
+\snippet doc/src/snippets/declarative/focus/rectangle.qml active focus
\section1 Acquiring Focus and Focus Scopes
-An \l Item requests focus by setting the \c {Item::focus} property to true.
-
-For very simple cases simply setting the \c {Item::focus} property is sometimes
-sufficient. If we run the following example with the \l {QML Viewer}, we see that
-the \c {keyHandler} element has \e {active focus} and pressing the 'A', 'B'
-or 'C' keys modifies the text appropriately.
-
-\table
-\row
-\o \code
- Rectangle {
- color: "lightsteelblue"; width: 240; height: 25
- Text { id: myText }
- Item {
- id: keyHandler
- focus: true
- Keys.onPressed: {
- if (event.key == Qt.Key_A)
- myText.text = 'Key A was pressed'
- else if (event.key == Qt.Key_B)
- myText.text = 'Key B was pressed'
- else if (event.key == Qt.Key_C)
- myText.text = 'Key C was pressed'
- }
- }
- }
-\endcode
-\o \image declarative-qmlfocus1.png
-\endtable
-
-However, were the above example to be used as a self-contained component, this
-simple use of the \c {Item::focus} property is no longer sufficient. The left
-hand side of the following table shows what we would like to be able to write.
-Here we create two instances of our previously defined component, and set the
-second one to have focus. The intention is that when the \e A, \e B, or \e C
-keys are pressed, the second of the two components receives the event and
+An \l Item requests focus by setting the \c focus property to \c true.
+
+For very simple cases simply setting the \c focus property is sometimes
+sufficient. If we run the following example with the \l {QML Viewer}, we see that
+the \c {keyHandler} element has active focus and pressing the \c A, \c B,
+or \c C keys modifies the text appropriately.
+
+\snippet doc/src/snippets/declarative/focus/basicwidget.qml focus true
+
+\image declarative-qmlfocus1.png
+
+However, were the above example to be used as a reusable or imported component,
+this simple use of the \c focus property is no longer sufficient.
+
+To demonstrate, we create two instances of our previously defined component and
+set the first one to have focus. The intention is that when the \c A, \c B, or
+\c C keys are pressed, the first of the two components receives the event and
responds accordingly.
-\table
-\row
-\o \code
-Rectangle {
- color: "red"; width: 240; height: 55
- MyWidget {}
- MyWidget { y: 30; focus: true }
-}
-\endcode
-\o \code
-Rectangle {
- color: "red"; width: 240; height: 55
- Rectangle {
- color: "lightsteelblue"; width: 240; height: 25
- Text { id: myText }
- Item {
- id: keyHandler
- focus: true
- Keys.onPressed: {
- if (event.key == Qt.Key_A)
- myText.text = 'Key A was pressed'
- else if (event.key == Qt.Key_B)
- myText.text = 'Key B was pressed'
- else if (event.key == Qt.Key_C)
- myText.text = 'Key C was pressed'
- }
- }
- }
- Rectangle {
- y: 30; focus: true
- color: "lightsteelblue"; width: 240; height: 25
- Text { id: myText }
- Item {
- id: keyHandler
- focus: true
- Keys.onPressed: {
- if (event.key == Qt.Key_A)
- myText.text = 'Key A was pressed'
- else if (event.key == Qt.Key_B)
- myText.text = 'Key B was pressed'
- else if (event.key == Qt.Key_C)
- myText.text = 'Key C was pressed'
- }
- }
- }
-}
-\endcode
-\endtable
-
-The right hand side of the example shows the expanded code - the equivalent QML
-without the use of the component \c {MyWidget}. From this, the problem is
-evident - there are no less than three elements that have the \c {Item::focus}
-property set to true. Ultimately only one element can have keyboard focus, and the
-system has to decide which on. In this case the first appearance of the
-\c {Item::focus} property being set to true on line 4 is selected, and the value
-of \c {Item::focus} in the other two instances is reverted back to false. This
-is exactly the opposite of what was wanted!
-
-This problem is fundamentally one of visibility. The \c {MyWidget}
-components each set their \c {keyHandler} Items as focused as that is all they can
-do - they don't know how they are going to be used, but they do know that when
-they're in use their \c {keyHandler} element is what needs focus. Likewise
-the code that uses the two \c {MyWidgets} sets the second \c {MyWidget} as
-focused. While it doesn't know exactly how the \c {MyWidget} is
-implemented, it knows that it wants the second one to be focused. This allows us
-to achieve encapsulation, allowing each widget to focus on it's appropriate behaviour
-itself.
-
-To solve this problem - allowing components to care about what they know about
-and ignore everything else - the QML items introduce a concept known as a
-\e {focus scope}. For existing Qt users, a \e {focus scope} is like an
-automatic focus proxy. A \e {focus scope} is created using the \l FocusScope
-element.
-
-In the next example, a \l FocusScope is added to the component, and the visual
-result shown.
-
-\table
-\row
-\o \code
-FocusScope {
- width: 240; height: 25
- Rectangle {
- color: "lightsteelblue"; width: 240; height: 25
- Text { id: myText }
- Item {
- id: keyHandler
- focus: true
- Keys.onPressed: {
- if (event.key == Qt.Key_A)
- myText.text = 'Key A was pressed'
- else if (event.key == Qt.Key_B)
- myText.text = 'Key B was pressed'
- else if (event.key == Qt.Key_C)
- myText.text = 'Key C was pressed'
- }
- }
- }
-}
-\endcode
-\o \image declarative-qmlfocus2.png
-\endtable
+The code that imports and creates two MyWidget instances:
+\snippet doc/src/snippets/declarative/focus/widget.qml window
+
+The MyWidget code:
+\snippet doc/src/snippets/declarative/focus/mywidget.qml mywidget
+
+We would like to have the first MyWidget object to have the focus by setting its
+\c focus property to \c true. However, by running the code, we can confirm that
+the second widget receives the focus.
+
+\image declarative-qmlfocus2.png
+
+Looking at both \c MyWidget and \c window code, the problem is evident - there
+are three elements that set the \c focus property set to \c true. The two
+MyWidget sets the \c focus to \c true and the \c window component also sets the
+focus. Ultimately, only one element can have keyboard focus, and the system has
+to decide which element receives the focus. When the second MyWidget is created,
+it receives the focus because it is the last element to set its \c focus
+property to \c true.
+
+This problem is due to visibility. The \c MyWidget component would like to have
+the focus, but it cannot control the focus when it is imported or reused.
+Likewise, the \c window component does not have the ability to know if its
+imported components are requesting the focus.
+
+To solve this problem, the QML introduces a concept known as a \e {focus scope}.
+For existing Qt users, a focus scope is like an automatic focus proxy.
+A focus scope is created by declaring the \l FocusScope element.
+
+In the next example, a \l FocusScope element is added to the component, and the
+visual result shown.
+
+\snippet doc/src/snippets/declarative/focus/myfocusscopewidget.qml widget in focusscope
+
+\image declarative-qmlfocus3.png
+
Conceptually \e {focus scopes} are quite simple.
\list
-\o Within each \e {focus scope} one element may have \c {Item::focus} set to true.
-If more than one \l Item has the \c {Item::focus} property set, the first is selected
-and the others are unset, just like when there are no \e {focus scopes}.
-\o When a \e {focus scope} receives \e {active focus}, the contained element with
-\c {Item::focus} set (if any) also gets \e {active focus}. If this element is
-also a \l FocusScope, the proxying behaviour continues. Both the
-\e {focus scope} and the sub-focused item will have \c {Item::activeFocus} set.
+\o Within each focus scope one element may have \c {Item::focus} set to
+\c true. If more than one \l Item has the \c focus property set, the
+last element to set the \c focus will have the focus and the others are unset,
+similar to when there are no focus scopes.
+\o When a focus scope receives active focus, the contained element with
+\c focus set (if any) also gets the active focus. If this element is
+also a \l FocusScope, the proxying behavior continues. Both the
+focus scope and the sub-focused item will have \c activeFocus property set.
\endlist
-So far the example has the second component statically selected. It is trivial
+Note that, since the FocusScope element is not a visual element, the properties
+of its children need to be exposed to the parent item of the FocusScope. Layouts
+and positioning elements will use these visual and styling properties to create
+the layout. In our example, the \c Column element cannot display the two widgets
+properly because the FocusScope lacks visual properties of its own. The MyWidget
+component directly binds to the \c rectangle properties to allow the \c Column
+element to create the layout containing the children of the FocusScope.
+
+So far, the example has the second component statically selected. It is trivial
now to extend this component to make it clickable, and add it to the original
-application. We still set a one of the widgets as focused by default, but from
-then on clicking the either one gives it focus.
-
-\table
-\row
-\o \code
-Rectangle {
- color: "red"; width: 240; height: 55
- MyClickableWidget {}
- MyClickableWidget { y: 30; focus: true }
-}
-\endcode
-\o \code
-FocusScope {
- id: page; width: 240; height: 25
- MyWidget { focus: true }
- MouseArea { anchors.fill: parent; onClicked: { page.focus = true } }
-}
-\endcode
-\endtable
+application. We still set one of the widgets as focused by default.
+Now, clicking either MyClickableWidget gives it focus and the other widget
+loses the focus.
-\image declarative-qmlfocus3.png
+The code that imports and creates two MyClickableWidget instances:
+\snippet doc/src/snippets/declarative/focus/clickablewidget.qml clickable window
+
+The MyClickableWidget code:
+\snippet doc/src/snippets/declarative/focus/myclickablewidget.qml clickable in focusscope
-When a QML item explicitly relinquishes focus (by setting its
-\c {Item::focus} property to false while it has \e {active focus}), the system
-does not automatically select another element to receive focus. That is, it
-is possible for there to be no currently \e {active focus}.
+\image declarative-qmlfocus4.png
-See the \l{declarative/keyinteraction/focus}{Keyboard Focus example} for a
+When a QML \l Item explicitly relinquishes focus (by setting its
+\c focus property to \c false while it has active focus), the
+system does not automatically select another element to receive focus. That is,
+it is possible for there to be no currently active focus.
+
+See the \l{declarative/keyinteraction/focus}{Keyboard Focus example} for a
demonstration of moving keyboard focus between multiple areas using FocusScope
elements.
\section1 Advanced uses of Focus Scopes
-Focus scopes allow focus to allocation to be easily partitioned. Several
+Focus scopes allow focus to allocation to be easily partitioned. Several
QML items use it to this effect.
-\l ListView, for example, is itself a focus scope. Generally this isn't
+\l ListView, for example, is itself a focus scope. Generally this isn't
noticeable as \l ListView doesn't usually have manually added visual children.
By being a focus scope, \l ListView can focus the current list item without
-worrying about how that will effect the rest of the application. This allows
-the current item delegate to react to key presses.
+worrying about how that will effect the rest of the application. This allows the
+current item delegate to react to key presses.
-This contrived example shows how this works. Pressing the \c Return key will
+This contrived example shows how this works. Pressing the \c Return key will
print the name of the current list item.
-\table
-\row
-\o \snippet doc/src/snippets/declarative/focusscopes.qml 0
-\o \image declarative-qmlfocus4.png
-\endtable
+\snippet doc/src/snippets/declarative/focus/advancedFocus.qml FocusScope delegate
+
+\image declarative-qmlfocus5.png
-While the example is simple, there's a lot going on behind the scenes. Whenever
+While the example is simple, there are a lot going on behind the scenes. Whenever
the current item changes, the \l ListView sets the delegate's \c {Item::focus}
-property. As the \l ListView is a \e {focus scope}, this doesn't effect the
-rest of the application. However, if the \l ListView itself has
-\e {active focus} this causes the delegate itself to receive \e {active focus}.
-In this example, the root element of the delegate is also a \e {focus scope},
-which in turn gives \e {active focus} to the \c {Text} element that
-actually performs the work of handling the \e {Return} key.
+property. As the \l ListView is a focus scope, this doesn't affect the
+rest of the application. However, if the \l ListView itself has
+active focus this causes the delegate itself to receive active focus.
+In this example, the root element of the delegate is also a focus scope,
+which in turn gives active focus to the \c {Text} element that actually performs
+the work of handling the \c {Return} key.
All of the QML view classes, such as \l PathView and \l GridView, behave
in a similar manner to allow key handling in their respective delegates.
diff --git a/doc/src/declarative/javascriptblocks.qdoc b/doc/src/declarative/javascriptblocks.qdoc
index 155bd6e..68cb392 100644
--- a/doc/src/declarative/javascriptblocks.qdoc
+++ b/doc/src/declarative/javascriptblocks.qdoc
@@ -99,7 +99,9 @@ resource, the component's \l {QDeclarativeComponent::status()}{status} is set to
Imported JavaScript files are always qualified using the "as" keyword. The
qualifier for JavaScript files must be unique, so there is always a one-to-one
-mapping between qualifiers and JavaScript files.
+mapping between qualifiers and JavaScript files. (This also means qualifiers cannot
+be named the same as built-in JavaScript objects such as \c Date and \c Math).
+
\section2 Code-Behind Implementation Files
diff --git a/doc/src/declarative/modules.qdoc b/doc/src/declarative/modules.qdoc
index 011eb63..8d23170 100644
--- a/doc/src/declarative/modules.qdoc
+++ b/doc/src/declarative/modules.qdoc
@@ -31,14 +31,14 @@
\section1 QML Modules
-A module is a set of QML content files that can be imported as a unit into a QML
+A module is a set of QML content files that can be imported as a unit into a QML
application. Modules can be used to organize QML content into independent units,
-and they can use a versioning mechanism that allows for independent
+and they can use a versioning mechanism that allows for independent
upgradability of the modules.
While QML component files within the same directory are automatically accessible
-within the global namespace, components defined elsewhere must be imported
-explicitly using the \c import statement to import them as modules. For
+within the global namespace, components defined elsewhere must be imported
+explicitly using the \c import statement to import them as modules. For
example, an \c import statement is required to use:
\list
@@ -54,13 +54,13 @@ This can be seen in the snippet commonly found at the top of QML files:
\qml
import QtQuick 1.0
\endqml
-
-This imports version 4.7 of the "Qt" module into the global namespace. (The QML
+
+This imports version 1.0 of the "QtQuick" module into the global namespace. (The QML
library itself must be imported to use any of the \l {QML Elements}, as they
are not included in the global namespace by default.)
-The \c Qt module is an \e installed module; it is found in the
-\l{The QML import path}{import path}. There are two types of QML modules:
+The \c Qt module is an \e installed module; it is found in the
+\l{The QML import path}{import path}. There are two types of QML modules:
location modules (defined by a URL) and installed modules (defined by a URI).
@@ -87,8 +87,8 @@ directory using a relative or absolute path, like this:
MyQMLProject
|- MyComponents
|- Slider.qml
- |- CheckBox.qml
- |- Main
+ |- CheckBox.qml
+ |- Main
|- application.qml
\endcode
@@ -112,7 +112,7 @@ be imported like this:
Remote location modules must have a \l{Writing a qmldir file}{qmldir file} in the
same directory to specify which QML files should be made available. See the
-\l {#qmldirexample}{example} below. The qmldir file is optional for modules on
+\l {#qmldirexample}{example} below. The qmldir file is optional for modules on
the local filesystem.
@@ -121,8 +121,8 @@ the local filesystem.
Installed modules are modules that are installed on the
-local filesystem within the QML import path, or modules defined in C++
-application code. When importing an installed module, an un-quoted URI is
+local filesystem within the QML import path, or modules defined in C++
+application code. When importing an installed module, an un-quoted URI is
used, with a mandatory version number:
\code
@@ -131,7 +131,7 @@ used, with a mandatory version number:
\endcode
Installed modules that are installed into the import path or created
-as a \l{QDeclarativeExtensionPlugin}{QML C++ plugin} must define a
+as a \l{QDeclarativeExtensionPlugin}{QML C++ plugin} must define a
\l{Writing a qmldir file}{qmldir file}.
@@ -142,7 +142,7 @@ The default import path includes:
\list
\o The directory of the current file
-\o The location specified by QLibraryInfo::ImportsPath
+\o The location specified by QLibraryInfo::ImportsPath
\o Paths specified by the \c QML_IMPORT_PATH environment variable
\endlist
@@ -153,10 +153,10 @@ When running the \l {QML Viewer}, use the \c -I option to add paths to the impor
\section2 Creating installed modules in C++
-C++ applications can dynamically define installed modules using
-qmlRegisterType().
+C++ applications can dynamically define installed modules using
+qmlRegisterType().
-For \l{QDeclarativeExtensionPlugin}{QML C++ plugins}, the
+For \l{QDeclarativeExtensionPlugin}{QML C++ plugins}, the
module URI is automatically passed to QDeclarativeExtensionPlugin::registerTypes().
The QDeclarativeExtensionPlugin documentation shows how to use this URI
to call qmlRegisterType() to enable the plugin library to be built as
@@ -167,7 +167,7 @@ in QML, like this:
import com.nokia.TimeExample 1.0
\endcode
-A \l{QDeclarativeExtensionPlugin}{QML C++ plugin} also requires a
+A \l{QDeclarativeExtensionPlugin}{QML C++ plugin} also requires a
\l{Writing a qmldir file}{qmldir file} to make it available to the
QML engine.
@@ -190,9 +190,9 @@ Types from these modules can then only be used when qualified by the namespace:
\qml
QtLibrary.Rectangle { ... }
-
+
MyComponents.Slider { ... }
-
+
MyModule.SomeComponent { ... }
\endqml
@@ -209,19 +209,21 @@ JavaScript files must always be imported with a named import:
\qml
import "somescript.js" as MyScript
-
+
Item {
//...
Component.onCompleted: MyScript.doSomething()
}
\endqml
+The qualifier ("MyScript" in the above example) must be unique within the QML document.
+Unlike ordinary modules, multiple scripts cannot be imported into the same namespace.
\section1 Writing a qmldir file
-A \c qmldir file is a metadata file for a module that maps all type names in
-the module to versioned QML files. It is required for installed modules, and
+A \c qmldir file is a metadata file for a module that maps all type names in
+the module to versioned QML files. It is required for installed modules, and
location modules that are loaded from a network source.
It is defined by a plain text file named "qmldir" that contains one or more lines of the form:
@@ -237,7 +239,7 @@ plugin <Name> [<Path>]
\bold {<TypeName> [<InitialVersion>] <File>} lines are used to add QML files as types.
<TypeName> is the type being made available, the optional <InitialVersion> is a version
-number, and <File> is the (relative) file name of the QML file defining the type.
+number, and <File> is the (relative) file name of the QML file defining the type.
Installed files do not need to import the module of which they are a part, as they can refer
to the other QML files in the module as relative (local) files, but
@@ -264,10 +266,10 @@ provide those identifiers.
\bold {plugin <Name> [<Path>]} lines are used to add \l{QDeclarativeExtensionPlugin}{QML C++ plugins} to the module. <Name> is the name of the library. It is usually not the same as the file name
of the plugin binary, which is platform dependent; e.g. the library \c MyAppTypes would produce
-\c libMyAppTypes.so on Linux and \c MyAppTypes.dll on Windows.
+\c libMyAppTypes.so on Linux and \c MyAppTypes.dll on Windows.
<Path> is an optional argument specifying either an absolute path to the directory containing the
-plugin file, or a relative path from the directory containing the \c qmldir file to the directory
+plugin file, or a relative path from the directory containing the \c qmldir file to the directory
containing the plugin file. By default the engine searches for the plugin library in the directory that contains the \c qmldir
file. The plugin search path can be queried with QDeclarativeEngine::pluginPathList() and modified using QDeclarativeEngine::addPluginPath(). When running the \l {QML Viewer}, use the \c -P option to add paths to the plugin search path.
@@ -275,7 +277,7 @@ file. The plugin search path can be queried with QDeclarativeEngine::pluginPathL
\target qmldirexample
\section2 Example
-If the components in the \c MyComponents directory from the
+If the components in the \c MyComponents directory from the
\l{Location Modules}{earlier example} were to be made available as a network resource,
the directory would need to contain a \c qmldir file similar to this:
@@ -284,7 +286,7 @@ ComponentA 1.0 ComponentA.qml
ComponentB 1.0 ComponentB.qml
\endcode
-The \c MyComponents directory could then be imported as a module using:
+The \c MyComponents directory could then be imported as a module using:
\code
import "http://the-server-name.com/MyComponents"
@@ -298,15 +300,15 @@ a later version is used, as the \c qmldir file specifies that these elements
are only available in the 1.0 version.
-For examples of \c qmldir files for plugins, see the
-\l {declarative/cppextensions/plugins}{Plugins} example and
+For examples of \c qmldir files for plugins, see the
+\l {declarative/cppextensions/plugins}{Plugins} example and
\l {Tutorial: Writing QML extensions with C++}.
\section1 Debugging
The \c QML_IMPORT_TRACE environment variable can be useful for debugging
-when there are problems with finding and loading modules. See
+when there are problems with finding and loading modules. See
\l{Debugging module imports} for more information.
diff --git a/doc/src/development/qtestlib.qdoc b/doc/src/development/qtestlib.qdoc
index e53957f..afe6e34 100644
--- a/doc/src/development/qtestlib.qdoc
+++ b/doc/src/development/qtestlib.qdoc
@@ -245,10 +245,10 @@
\endtable
In short, walltime is always available but requires many repetitions to
- get a useful result.
- Tick counters are usually available and can provide
- results with fewer repetitions, but can be susceptible to CPU frequency
- scaling issues.
+ get a useful result.
+ Tick counters are usually available and can provide
+ results with fewer repetitions, but can be susceptible to CPU frequency
+ scaling issues.
Valgrind provides exact results, but does not take
I/O waits into account, and is only available on a limited number of
platforms.
@@ -264,7 +264,7 @@
See the chapter 5 in the \l{QTestLib Tutorial} for more benchmarking examples.
\section1 Using QTestLib remotely on Windows CE
- \c cetest is a convenience application which helps the user to launch an
+ \c cetest is a convenience application which helps the user to launch an
application remotely on a Windows CE device or emulator.
It needs to be executed after the unit test has been successfully compiled.
@@ -370,7 +370,7 @@
\title QTestLib Tutorial
This tutorial gives a short introduction to how to use some of the
- features of the QTestLib framework. It is divided into four
+ features of the QTestLib framework. It is divided into five
chapters:
\list 1
@@ -717,15 +717,15 @@
\section1 Writing a Benchmark
To create a benchmark we extend a test function with a QBENCHMARK macro.
- A benchmark test function will then typically consist of setup code and
+ A benchmark test function will then typically consist of setup code and
a QBENCHMARK macro that contains the code to be measured. This test
function benchmarks QString::localeAwareCompare().
\snippet examples/qtestlib/tutorial5/benchmarking.cpp 0
- Setup can be done at the beginning of the function, the clock is not
+ Setup can be done at the beginning of the function, the clock is not
running at this point. The code inside the QBENCHMARK macro will be
- measured, and possibly repeated several times in order to get an
+ measured, and possibly repeated several times in order to get an
accurate measurement.
Several \l {testlib-benchmarking-measurement}{back-ends} are available
@@ -733,7 +733,7 @@
\section1 Data Functions
- Data functions are useful for creating benchmarks that compare
+ Data functions are useful for creating benchmarks that compare
multiple data inputs, for example locale aware compare against standard
compare.
@@ -743,20 +743,19 @@
\snippet examples/qtestlib/tutorial5/benchmarking.cpp 2
- The "if(useLocaleCompare)" switch is placed outside the QBENCHMARK
+ The "if(useLocaleCompare)" switch is placed outside the QBENCHMARK
macro to avoid measuring its overhead. Each benchmark test function
- can have one active QBENCHMARK macro.
+ can have one active QBENCHMARK macro.
\section1 External Tools
Tools for handling and visualizing test data are available as part of
- the qtestlib-tools project on the
- \l{http://labs.qt.nokia.com/}{http://labs.qt.nokia.com/}Qt Labs Web site.
+ the \l {qtestlib-tools} project in the \l{Qt Labs} web site.
These include a tool for comparing performance data obtained from test
runs and a utility to generate Web-based graphs of performance data.
- See the \l{qtestlib-tools Announcement} for more information on these
- tools and a simple graphing example.
+ See the \l{qtestlib-tools Announcement}{qtestlib-tools announcement}
+ for more information on these tools and a simple graphing example.
*/
diff --git a/doc/src/examples/diagramscene.qdoc b/doc/src/examples/diagramscene.qdoc
index 98bc983..d5cc4e3 100644
--- a/doc/src/examples/diagramscene.qdoc
+++ b/doc/src/examples/diagramscene.qdoc
@@ -195,7 +195,7 @@
This function returns a QWidget containing a QToolButton with
an image of one of the \c DiagramItems, i.e., flowchart shapes.
The image is created by the \c DiagramItem through the \c image()
- function. The QButtonGroup class lets us attach a QVariant with
+ function. The QButtonGroup class lets us attach an id (int) with
each button; we store the diagram's type, i.e., the
DiagramItem::DiagramType enum. We use the stored diagram type when
we create new diagram items for the scene. The widgets created
diff --git a/doc/src/external-resources.qdoc b/doc/src/external-resources.qdoc
index 8eeaeb1..9bc3b1c 100644
--- a/doc/src/external-resources.qdoc
+++ b/doc/src/external-resources.qdoc
@@ -448,3 +448,8 @@
\externalpage https://developer.mozilla.org/en/JavaScript/About_JavaScript
\title About JavaScript
*/
+
+/*!
+ \externalpage http://www.libusb.org/
+ \title libusb
+*/
diff --git a/doc/src/frameworks-technologies/threads.qdoc b/doc/src/frameworks-technologies/threads.qdoc
index 001b29d..2a0cc1a 100644
--- a/doc/src/frameworks-technologies/threads.qdoc
+++ b/doc/src/frameworks-technologies/threads.qdoc
@@ -213,10 +213,10 @@
/*!
\page threads-reentrancy.html
\title Reentrancy and Thread-Safety
-
+
\keyword reentrant
\keyword thread-safe
-
+
\previouspage Synchronizing Threads
\contentspage Thread Support in Qt
\nextpage Threads and QObjects
@@ -243,6 +243,15 @@
from multiple threads, even if all the threads use the \e{same}
instance of the class.
+ \note Qt classes are only documented as \e{thread-safe} if they
+ are intended to be used by multiple threads. If a function is not
+ marked as thread-safe or reentrant, it should not be used from
+ different threads. If a class is not marked as thread-safe or
+ reentrant then a specific instance of that class should not be
+ accessed from different threads.
+
+ \section1 Reentrancy
+
C++ classes are often reentrant, simply because they only access
their own member data. Any thread can call a member function on an
instance of a reentrant class, as long as no other thread can call
@@ -268,6 +277,8 @@
end up overwriting each other, and the variable is incremented
only once!
+ \section1 Thread-Safety
+
Clearly, the access must be serialized: Thread A must perform
steps 1, 2, 3 without interruption (atomically) before thread B
can perform the same steps; or vice versa. An easy way to make
@@ -284,6 +295,8 @@
declared with the \c mutable qualifier because we need to lock
and unlock the mutex in \c value(), which is a const function.
+ \section1 Notes on Qt Classes
+
Many Qt classes are \e{reentrant}, but they are not made
\e{thread-safe}, because making them thread-safe would incur the
extra overhead of repeatedly locking and unlocking a QMutex. For
@@ -297,9 +310,6 @@
the thread-related classes (e.g. QMutex) and fundamental functions
(e.g. QCoreApplication::postEvent()).
- \note Qt Classes are only documented as \e{thread-safe} if they
- are intended to be used by multiple threads.
-
\note Terminology in the multithreading domain isn't entirely
standardized. POSIX uses definitions of reentrant and thread-safe
that are somewhat different for its C APIs. When using other
diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc
index b767587..e3977bb 100644
--- a/doc/src/getting-started/gettingstartedqml.qdoc
+++ b/doc/src/getting-started/gettingstartedqml.qdoc
@@ -148,7 +148,7 @@
\code
Rectangle {
- id:Button
+ id: button
...
property color buttonColor: "lightblue"
diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index a68310c..4941325 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.qdoc
@@ -684,7 +684,7 @@ Binary Package} document.
We hope you will enjoy using Qt.
*/
-/*! \page install-Symbian-linux.html
+/*! \page install-symbian-linux.html
\title Installing Qt for the Symbian platform using Linux (experimental)
\ingroup installation
\ingroup qtsymbian
@@ -963,6 +963,7 @@ We hope you will enjoy using Qt.
first install the Visual Studio Service Pack 1 available
\l{http://www.microsoft.com/downloads/details.aspx?FamilyId=BB4A75AB-E2D4-4C96-B39D-37BAF6B5B1DC&amp;displaylang=en}{here}
to avoid runtime conflicts.
+ Additionally, you must use the Check for Updates feature in the Help menu of the Visual Studio 2005 IDE to apply at least the following security updates: KB937061, KB971023, KB971090, KB973673.
If you are using a source edition of Qt, you must first install Perl so
that the syncqt script invoked by configure can be executed. You can download
diff --git a/doc/src/images/declarative-qmlfocus1.png b/doc/src/images/declarative-qmlfocus1.png
new file mode 100644
index 0000000..317b34b
--- /dev/null
+++ b/doc/src/images/declarative-qmlfocus1.png
Binary files differ
diff --git a/doc/src/images/declarative-qmlfocus2.png b/doc/src/images/declarative-qmlfocus2.png
new file mode 100644
index 0000000..e3f9643
--- /dev/null
+++ b/doc/src/images/declarative-qmlfocus2.png
Binary files differ
diff --git a/doc/src/images/declarative-qmlfocus3.png b/doc/src/images/declarative-qmlfocus3.png
new file mode 100644
index 0000000..a5897ce
--- /dev/null
+++ b/doc/src/images/declarative-qmlfocus3.png
Binary files differ
diff --git a/doc/src/images/declarative-qmlfocus4.png b/doc/src/images/declarative-qmlfocus4.png
new file mode 100644
index 0000000..f2e64cd
--- /dev/null
+++ b/doc/src/images/declarative-qmlfocus4.png
Binary files differ
diff --git a/doc/src/images/declarative-qmlfocus5.png b/doc/src/images/declarative-qmlfocus5.png
new file mode 100644
index 0000000..ec7307b
--- /dev/null
+++ b/doc/src/images/declarative-qmlfocus5.png
Binary files differ
diff --git a/doc/src/legal/3rdparty.qdoc b/doc/src/legal/3rdparty.qdoc
index 8b3d5f2..9cc83a6 100644
--- a/doc/src/legal/3rdparty.qdoc
+++ b/doc/src/legal/3rdparty.qdoc
@@ -683,36 +683,57 @@
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+
\hr
- jquery 1.4.2.js Copyright 2010 John Resig
- This software is dual licensed under the MIT or GPL version 2 licenses.
- Nokia has used the software herein under the MIT license.
-
- jquery includes Sizzle.js Copyright 2010 The Dojo Foundaton and is
- licensed under the MIT, BSD and GPL licenses. Nokia has used this
- software herein under the MIT license.
-
- The MIT License
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-
-
+ jquery 1.4.2.js Copyright 2010 John Resig
+ This software is dual licensed under the MIT or GPL version 2 licenses.
+ Nokia has used the software herein under the MIT license.
+
+ jquery includes Sizzle.js Copyright 2010 The Dojo Foundaton and is
+ licensed under the MIT, BSD and GPL licenses. Nokia has used this
+ software herein under the MIT license.
+
+ The MIT License
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+
+ \section1 The Public Suffix List
+
+ \e{The Public Suffix List is an initiative of the Mozilla Project, but is
+ maintained as a community resource. It is available for use in any
+ software, but was originally created to meet the needs of browser
+ manufacturers. It allows browsers to, for example:}
+ \list
+ \o \e{Avoid privacy-damaging "supercookies" being set for high-level
+ domain name suffixes}
+ \o \e{Highlight the most important part of a domain name in the user
+ interface}
+ \o \e{Accurately sort history entries by site}
+ \endlist
+ -- quoted from \l{publicsuffix.org}.
+
+ The public suffix list is used inside Qt to avoid such "supercookies"
+ mentioned above being set in the cookie jar supported by Qt (by the
+ QNetworkCookieJar class).
+
+ See \c src/network/access/qnetworkcookiejartlds_p.h.INFO for more
+ information about how the list is used.
*/
diff --git a/doc/src/network-programming/bearermanagement.qdoc b/doc/src/network-programming/bearermanagement.qdoc
index 98de5bf..12da55b 100644
--- a/doc/src/network-programming/bearermanagement.qdoc
+++ b/doc/src/network-programming/bearermanagement.qdoc
@@ -26,11 +26,11 @@
****************************************************************************/
/*!
- \page bearer-management.html
+\page bearer-management.html
- \title Bearer Management
- \ingroup qt-network
- \brief An API to control the system's connectivity state.
+\title Bearer Management
+\ingroup qt-network
+\brief An API to control the system's connectivity state.
Bearer Management controls the connectivity state of the system so that
the user can start or stop interfaces or roam transparently between
diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc
index 177d3f6..b745867 100644
--- a/doc/src/platforms/platform-notes.qdoc
+++ b/doc/src/platforms/platform-notes.qdoc
@@ -81,14 +81,11 @@
\header \o \o Concurrent \o XmlPatterns \o WebKit(*) \o CLucene \o Phonon
\row \o g++ 3.3 \o \o \bold{X} \o \o \bold{X} \o \bold{X}
\row \o g++ 3.4 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X}
- \row
\row \o SunCC 5.5 \o \o \o \o \bold{X} \o \bold{X}
- \row
\row \o aCC series 3 \o \o \o \o \bold{X} \o \bold{X}
\row \o aCC series 6 \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X}
\row \o xlC 6 \o \o \o \o \bold{X} \o \bold{X}
\row \o Intel CC 10 \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X}
- \row
\row \o MSVC 2003 \o \bold{X} \o \bold{X} \o \o \bold{X} \o \bold{X}
\row \o MSVC 2005 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X}
\endtable
diff --git a/doc/src/qt-webpages.qdoc b/doc/src/qt-webpages.qdoc
index 05817df..0a03157 100644
--- a/doc/src/qt-webpages.qdoc
+++ b/doc/src/qt-webpages.qdoc
@@ -201,11 +201,6 @@
*/
/*!
- \externalpage http://labs.qt.nokia.com/gitweb?p=qtestlib-tools;a=summary
- \title qtestlib-tools
-*/
-
-/*!
\externalpage http://qt.nokia.com/products/library/modular-class-library#info_scripting
\title Qt Script for Applications (QSA)
*/
@@ -239,3 +234,13 @@
\externalpage http://get.qt.nokia.com/nokiasmartinstaller/
\title Smart Installer
*/
+
+/*!
+ \externalpage http://qt.gitorious.org/qt-labs/qtestlib-tools
+ \title qtestlib-tools
+*/
+
+/*!
+ \externalpage http://labs.qt.nokia.com
+ \title Qt Labs
+*/
diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc
index 62decbb..7325e27 100644
--- a/doc/src/qt4-intro.qdoc
+++ b/doc/src/qt4-intro.qdoc
@@ -60,7 +60,53 @@
\section1 Recent Additions to Qt 4
- The following features have been added to Qt since the first release of Qt 4:
+ The following features have been added to Qt since the first release of Qt 4.
+
+ In Qt 4.7:
+ \list
+ \o Declarative UI Development with \l{Qt Quick}, technologies for creating
+ fluid, dynamic user interfaces.
+ \o Support for \l{Bearer Management}{network bearer management}, enabling
+ features such as control over network interfaces and support for roaming
+ between networks.
+ \o Feature and performance improvements in QtWebKit, including a new tiled
+ backing store, control over scroll bars used in frames and framesets,
+ accelerated compositing and \l{The QtWebKit Bridge}{support for hybrid
+ development}.
+ \o General performance improvements, including the use of "alien widgets"
+ on Mac OS X, the QStaticText class for optimized text rendering, a new
+ \l{QPainter::drawPixmapFragments()}{API for rendering pixmap fragments}
+ and an updated version of the JavaScriptCore engine for the QtScript
+ module with improved performance.
+ \endlist
+
+ In Qt 4.6:
+ \list
+ \o Support for \l{The Symbian platform - Introduction to Qt}{the Symbian Platform}
+ as a mainstream Qt platform, with integration into the S60 framework.
+ \o The \l{The Animation Framework}{animation framework} allows animations to be
+ created using both widgets and graphics items.
+ \o The \l{The State Machine Framework}{state machine framework} provides a robust
+ state chart implementation based on Harel statecharts and SCXML.
+ \o Support for \l{QTouchEvent}{touch input} and \l{Gestures Programming}{gestures}
+ enable developers to create intuitive user interfaces for touch-based devices.
+ \o A \l{QWebElement}{DOM access API} for QtWebKit provides a cleaner and safer way
+ to access elements and structures of Web pages without the use of JavaScript.
+ \o A collection of performance improvements, covering QGraphicsView, QPixmapCache,
+ QNetworkAccessManager, QContiguousCache class, hardware-accelerated rendering
+ support through \l{OpenVG Rendering in Qt}{OpenVG}, and the removal of Win9x
+ support.
+ \o A collection of \l{QGraphicsEffect}{graphics effects} make it easy to apply
+ and simple effects to graphics items and combine them to produce more complex
+ effects.
+ \o Support for XML schema validation in the QtXmlPatterns module covering
+ large parts of version 1.0 of the specification.
+ \o Qt3D enablers, including math primitives for \l{QMatrix4x4}{matrix multiplication},
+ \l{QVector3D}{vectors}, \l{QQuaternion}{quaternions} (client-side), and an API
+ for \l{QGLShader}{vertex and fragment shaders}, GLSL/ES.
+ \o \l{QtMultimedia Module}{Multimedia services} providing low-level access to the
+ system's audio system.
+ \endlist
In Qt 4.5:
\list
@@ -209,7 +255,7 @@
\row \o \l{Qt3Support} \o Qt 3 support classes
\row \o \l{QAxContainer} \o ActiveQt client extension
\row \o \l{QAxServer} \o ActiveQt server extension
- \row \o \l{QtHelp} \o Classes for integrating online documentation
+ \row \o \l{QtHelp} \o Classes for integrating online documentation
\row \o \l{QtDesigner} \o Classes for extending and embedding Qt Designer
\row \o \l{QtUiTools} \o Classes for dynamic GUI generation
\row \o \l{QtTest} \o Tool classes for unit testing
@@ -451,7 +497,7 @@
A list of other Qt 4 features can be found on the \bold{\l{What's
New in Qt 4}} page.
- \section1 Declarative UI development with Qt Quick
+ \section1 Declarative UI Development with Qt Quick
\image quick_screens.png
@@ -508,7 +554,7 @@
For hybrid QtWebKit and C++ projects, Qt 4.7 has added support for
transporting \l{QPixmap}s between Qt C++ and WebKit. We have also
- improved the documentation hybrid development. Read more here:
+ improved the documentation for hybrid development. Read more here:
\l{The QtWebKit Bridge}.
\section1 QtWebKit Performance Benchmarks
@@ -680,7 +726,7 @@
See the QTouchEvent class documentation for more information on touch
input and QGestureEvent for gestures.
- \section1 DOM access API
+ \section1 DOM Access API
Web pages and XML both have very complex document object models.
The W3C selector API provides a very simple way to access and
@@ -699,7 +745,7 @@
\list
\o Rewritten the QGraphicsView rendering algorithm.
- \o Made QPixmapCache support efficient Key datastructure.
+ \o Made QPixmapCache support efficient Key data structure.
\o Reduced overhead in QNetworkAccessManager.
\o Added the QContiguousCache class, which provides efficient caching of
contiguous data.
@@ -740,7 +786,7 @@
See the \l{XML Processing} and QXmlSchema class documentation for more
information.
- \section1 Qt3D enablers
+ \section1 Qt3D Enablers
As more of Qt, and more of the applications built on Qt go 3D,
API's should be provided to simplify this. Mainly, the new API
@@ -750,7 +796,7 @@
The main features of the Qt3D enablers are currently: Math
primitives for matrix multiplication, vectors, quaternions
- (client-side), and API for vertex and fragment shaders, GLSL/ES.
+ (client-side), and an API for vertex and fragment shaders, GLSL/ES.
Future research will, among other things include stencils,
scissors, vertex buffers and arrays, texture manipulation, and
geometry shaders.
diff --git a/doc/src/snippets/declarative/codingconventions/private.qml b/doc/src/snippets/declarative/codingconventions/private.qml
new file mode 100644
index 0000000..1d3dda8
--- /dev/null
+++ b/doc/src/snippets/declarative/codingconventions/private.qml
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+
+//! [0]
+Item {
+ id: component
+ width: 40; height: 50
+ property real __area: width * height * 0.5 //not meant for outside use
+}
+//! [0]
diff --git a/doc/src/snippets/declarative/comments.qml b/doc/src/snippets/declarative/comments.qml
index a8e47ad..97659a5 100644
--- a/doc/src/snippets/declarative/comments.qml
+++ b/doc/src/snippets/declarative/comments.qml
@@ -38,7 +38,6 @@
**
****************************************************************************/
-//![0]
import QtQuick 1.0
//![0]
diff --git a/doc/src/snippets/declarative/focus/advancedFocus.qml b/doc/src/snippets/declarative/focus/advancedFocus.qml
new file mode 100644
index 0000000..274f54f
--- /dev/null
+++ b/doc/src/snippets/declarative/focus/advancedFocus.qml
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+import QtQuick 1.0
+
+//! [FocusScope delegate]
+Rectangle {
+ color: "lightsteelblue"; width: 100; height: 50
+
+ ListView {
+ anchors.fill: parent
+ focus: true
+
+ model: ListModel {
+ ListElement { name: "Bob" }
+ ListElement { name: "John" }
+ ListElement { name: "Michael" }
+ }
+
+ delegate: FocusScope {
+ width: childrenRect.width; height: childrenRect.height
+ x:childrenRect.x; y: childrenRect.y
+ TextInput {
+ focus: true
+ text: name
+ Keys.onReturnPressed: console.log(name)
+ }
+ }
+ }
+}
+//! [FocusScope delegate]
diff --git a/doc/src/snippets/declarative/focus/basicwidget.qml b/doc/src/snippets/declarative/focus/basicwidget.qml
new file mode 100644
index 0000000..71e75ff
--- /dev/null
+++ b/doc/src/snippets/declarative/focus/basicwidget.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+import QtQuick 1.0
+
+//! [focus true]
+Rectangle {
+ color: "lightsteelblue"; width: 240; height: 25
+ Text { id: myText }
+ Item {
+ id: keyHandler
+ focus: true
+ Keys.onPressed: {
+ if (event.key == Qt.Key_A)
+ myText.text = 'Key A was pressed'
+ else if (event.key == Qt.Key_B)
+ myText.text = 'Key B was pressed'
+ else if (event.key == Qt.Key_C)
+ myText.text = 'Key C was pressed'
+ }
+ }
+}
+//! [focus true]
diff --git a/doc/src/snippets/declarative/focus/clickablewidget.qml b/doc/src/snippets/declarative/focus/clickablewidget.qml
new file mode 100644
index 0000000..34b0d87
--- /dev/null
+++ b/doc/src/snippets/declarative/focus/clickablewidget.qml
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+import QtQuick 1.0
+
+//! [clickable window]
+Rectangle {
+ id: window
+
+ color: "white"; width: 240; height: 150
+
+ Column {
+ anchors.centerIn: parent; spacing: 15
+
+ MyClickableWidget {
+ focus: true //set this MyWidget to receive the focus
+ color: "lightblue"
+ }
+ MyClickableWidget {
+ color: "palegreen"
+ }
+ }
+
+}
+//! [clickable window]
diff --git a/doc/src/snippets/declarative/focus/focusColumn.qml b/doc/src/snippets/declarative/focus/focusColumn.qml
new file mode 100644
index 0000000..42ee3da
--- /dev/null
+++ b/doc/src/snippets/declarative/focus/focusColumn.qml
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+import QtQuick 1.0
+
+Rectangle {
+ width: 200; height: 200
+
+ // Column {
+ FocusScope {
+ x: rect1.x; y:rect1.y; width: rect1.width; height: rect1.height
+ Rectangle {id: rect1; width: 50; height: 50; focus:true
+ color: focus ? "red":"blue"
+ }
+ Rectangle {id: rect2; width: 50; height: 50; focus:true
+ color: focus ? "red":"blue"
+ y: 75
+ }
+// }
+/*
+ FocusScope {
+ x: rect2.x; y:rect2.y; width: rect2.width; height: rect2.height
+ Rectangle {id: rect2; width: 50; height: 50; color: "red"}
+ }
+*/
+ }
+
+}
diff --git a/doc/src/snippets/declarative/focus/focusscopewidget.qml b/doc/src/snippets/declarative/focus/focusscopewidget.qml
new file mode 100644
index 0000000..48e5750
--- /dev/null
+++ b/doc/src/snippets/declarative/focus/focusscopewidget.qml
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+import QtQuick 1.0
+
+//! [focusscope window]
+Rectangle {
+ id: window
+
+ color: "white"; width: 240; height: 150
+
+ Column {
+ anchors.centerIn: parent; spacing: 15
+
+ MyFocusScopeWidget {
+ focus: true //set this MyWidget to receive the focus
+ color: "lightblue"
+ }
+ MyFocusScopeWidget {
+ color: "palegreen"
+ }
+ }
+
+}
+//! [focusscope window]
diff --git a/doc/src/snippets/declarative/focus/myclickablewidget.qml b/doc/src/snippets/declarative/focus/myclickablewidget.qml
new file mode 100644
index 0000000..3294662
--- /dev/null
+++ b/doc/src/snippets/declarative/focus/myclickablewidget.qml
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+import QtQuick 1.0
+
+//! [clickable in focusscope]
+FocusScope {
+
+ id: scope
+
+ //FocusScope needs to bind to visual properties of the children
+ property alias color: rectangle.color
+ x: rectangle.x; y: rectangle.y
+ width: rectangle.width; height: rectangle.height
+
+ Rectangle {
+ id: rectangle
+ anchors.centerIn: parent
+ color: "lightsteelblue"; width: 175; height: 25; radius: 10; smooth: true
+ Text { id: label; anchors.centerIn: parent }
+ focus: true
+ Keys.onPressed: {
+ if (event.key == Qt.Key_A)
+ label.text = 'Key A was pressed'
+ else if (event.key == Qt.Key_B)
+ label.text = 'Key B was pressed'
+ else if (event.key == Qt.Key_C)
+ label.text = 'Key C was pressed'
+ }
+ }
+ MouseArea { anchors.fill: parent; onClicked: { scope.focus = true } }
+}
+//! [clickable in focusscope]
diff --git a/doc/src/snippets/declarative/focus/myfocusscopewidget.qml b/doc/src/snippets/declarative/focus/myfocusscopewidget.qml
new file mode 100644
index 0000000..231ae3a
--- /dev/null
+++ b/doc/src/snippets/declarative/focus/myfocusscopewidget.qml
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+import QtQuick 1.0
+
+//! [widget in focusscope]
+FocusScope {
+
+ //FocusScope needs to bind to visual properties of the children
+ property alias color: rectangle.color
+ x: rectangle.x; y: rectangle.y
+ width: rectangle.width; height: rectangle.height
+
+ Rectangle {
+ id: rectangle
+ anchors.centerIn: parent
+ color: "lightsteelblue"; width: 175; height: 25; radius: 10; smooth: true
+ Text { id: label; anchors.centerIn: parent }
+ focus: true
+ Keys.onPressed: {
+ if (event.key == Qt.Key_A)
+ label.text = 'Key A was pressed'
+ else if (event.key == Qt.Key_B)
+ label.text = 'Key B was pressed'
+ else if (event.key == Qt.Key_C)
+ label.text = 'Key C was pressed'
+ }
+ }
+}
+//! [widget in focusscope]
diff --git a/doc/src/snippets/declarative/focus/mywidget.qml b/doc/src/snippets/declarative/focus/mywidget.qml
new file mode 100644
index 0000000..bea723d
--- /dev/null
+++ b/doc/src/snippets/declarative/focus/mywidget.qml
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+import QtQuick 1.0
+
+//! [mywidget]
+//MyWidget code
+Rectangle {
+ id: widget
+ color: "lightsteelblue"; width: 175; height: 25; radius: 10; smooth: true
+ Text { id: label; anchors.centerIn: parent}
+ focus: true
+ Keys.onPressed: {
+ if (event.key == Qt.Key_A)
+ label.text = 'Key A was pressed'
+ else if (event.key == Qt.Key_B)
+ label.text = 'Key B was pressed'
+ else if (event.key == Qt.Key_C)
+ label.text = 'Key C was pressed'
+ }
+}
+//! [mywidget]
diff --git a/doc/src/snippets/declarative/focus/qmldir b/doc/src/snippets/declarative/focus/qmldir
new file mode 100644
index 0000000..d0683b2
--- /dev/null
+++ b/doc/src/snippets/declarative/focus/qmldir
@@ -0,0 +1,4 @@
+MyWidget 1.0 mywidget.qml
+MyFocusScopeWidget 1.0 myfocusscopewidget.qml
+MyClickableWidget 1.0 myclickablewidget.qml
+
diff --git a/doc/src/snippets/declarative/focus/rectangle.qml b/doc/src/snippets/declarative/focus/rectangle.qml
new file mode 100644
index 0000000..01d1f0c
--- /dev/null
+++ b/doc/src/snippets/declarative/focus/rectangle.qml
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+import QtQuick 1.0
+
+//! [simple key event]
+Rectangle {
+ width: 100; height: 100
+ focus: true
+ Keys.onPressed: {
+ if (event.key == Qt.Key_A) {
+ console.log('Key A was pressed');
+ event.accepted = true;
+ }
+ }
+//! [simple key event]
+
+//! [active focus]
+ Text {
+ text: activeFocus ? "I have active focus!" : "I do not have active focus"
+ }
+//! [active focus]
+
+//! [simple key event end]
+}
+//! [simple key event end]
diff --git a/doc/src/snippets/declarative/focus/widget.qml b/doc/src/snippets/declarative/focus/widget.qml
new file mode 100644
index 0000000..cef34c5
--- /dev/null
+++ b/doc/src/snippets/declarative/focus/widget.qml
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+import QtQuick 1.0
+
+//! [window]
+
+//Window code that imports MyWidget
+Rectangle {
+ id: window
+ color: "white"; width: 240; height: 150
+
+ Column {
+ anchors.centerIn: parent; spacing: 15
+
+ MyWidget {
+ focus: true //set this MyWidget to receive the focus
+ color: "lightblue"
+ }
+ MyWidget {
+ color: "palegreen"
+ }
+ }
+}
+//! [window]
diff --git a/doc/src/widgets-and-layouts/gallery-cde.qdoc b/doc/src/widgets-and-layouts/gallery-cde.qdoc
index c783399..69287b9 100644
--- a/doc/src/widgets-and-layouts/gallery-cde.qdoc
+++ b/doc/src/widgets-and-layouts/gallery-cde.qdoc
@@ -34,345 +34,100 @@
This page shows some of the widgets available in Qt
when configured to use the "cde" style.
-\raw HTML
-<h2 align="center">Buttons</h2>
+\section2 Buttons
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cde-pushbutton.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cde-toolbutton.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QPushButton widget provides a command button.
-\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cde-checkbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cde-radiobutton.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QCheckBox widget provides a checkbox with a text label.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Containers</h2>
+\table 100%
+\row
+\o \image cde-checkbox.png
+ \caption The QCheckBox widget provides a checkbox with a text label.
+\o \image cde-radiobutton.png
+ \caption The QRadioButton widget provides a radio button with a text or pixmap label.
+\o \image cde-pushbutton.png
+ \image cde-toolbutton.png
+ \caption The QPushButton widget provides a command button.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cde-groupbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cde-tabwidget.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QGroupBox widget provides a group box frame with a title.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTabWidget class provides a stack of tabbed widgets.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cde-frame.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cde-toolbox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QFrame widget provides a simple decorated container for other widgets.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QToolBox class provides a column of tabbed widget items.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Item Views</h2>
+\section2 Containers
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cde-listview.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cde-treeview.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cde-tableview.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Display Widgets</h2>
+\table 100%
+\row
+\o \image cde-groupbox.png
+ The The QGroupBox widget provides a group box frame with a title.
+\o \image cde-tabwidget.png
+ The QTabWidget class provides a stack of tabbed widgets.
+\o \image cde-frame.png
+ The QFrame widget provides a simple decorated container for other widgets.
+\o \image cde-toolbox.png
+ The QToolBox class provides a column of tabbed widget items.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cde-progressbar.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cde-lcdnumber.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QProgressBar widget provides a horizontal progress bar.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QLCDNumber widget displays a number with LCD-like digits.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cde-label.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QLabel widget provides a text or image display.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Input Widgets</h2>
+\section2 Item Views
+
+\table 100%
+\row
+\o \image cde-listview.png
+ The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.
+\o \image cde-treeview.png
+ The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.
+\o \image cde-tableview.png
+ The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\o
+\o
+\endtable
+
+\section2 Display Widgets
+
+\table 100%
+\row
+\o \image cde-progressbar.png
+ The QProgressBar widget provides a horizontal progress bar.
+\o \image cde-label.png
+ The QLabel widget provides a text or image display.
+\o \image cde-lcdnumber.png
+ The QLCDNumber widget displays a number with LCD-like digits.
+\endtable
+
+\section2 Input Widgets
+
+\table 100%
+\row
+\o \image cde-lineedit.png
+ The QLineEdit widget is a one-line text editor.
+\o \image cde-dateedit.png
+ The QDateEdit class provides a widget for editing dates.
+\o \image cde-timeedit.png
+ The QTimeEdit class provides a widget for editing times.
+\o \image cde-datetimeedit.png
+ The QDateTimeEdit class provides a widget for editing dates and times.
+\endtable
+
+\table 100%
+\row
+\o \image cde-slider.png
+ The QSlider widget provides a vertical or horizontal slider.
+\o \image cde-combobox.png
+ The QComboBox widget is a combined button and pop-up list.
+\o \image cde-spinbox.png
+ The QSpinBox class provides a spin box widget.
+\endtable
+
+\table 100%
+\row
+\o \image cde-fontcombobox.png
+ The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.
+\o \image cde-doublespinbox.png
+ The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.
+\o \image cde-horizontalscrollbar.png
+ The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.
+\endtable
+
+\table 100%
+\row
+\o \image cde-dial.png
+ The QDial class provides a rounded range control (like a speedometer or potentiometer).
+\o \image cde-textedit.png
+ The QTextEdit class provides a widget that is used to edit and display both plain and rich text.
+\o \image cde-calendarwidget.png
+ The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cde-slider.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cde-lineedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QSlider widget provides a vertical or horizontal slider.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QLineEdit widget is a one-line text editor.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cde-combobox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cde-doublespinbox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QComboBox widget is a combined button and pop-up list.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cde-spinbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cde-timeedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QSpinBox class provides a spin box widget.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTimeEdit class provides a widget for editing times.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cde-dateedit.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cde-datetimeedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QDateEdit class provides a widget for editing dates.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cde-textedit.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cde-horizontalscrollbar.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QTextEdit class provides a widget that is used to edit and
- display both plain and rich text.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cde-dial.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cde-calendarwidget.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QDial class provides a rounded range control (like a
- speedometer or potentiometer).\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cde-fontcombobox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
*/
diff --git a/doc/src/widgets-and-layouts/gallery-cleanlooks.qdoc b/doc/src/widgets-and-layouts/gallery-cleanlooks.qdoc
index d03adc8..59e2934 100644
--- a/doc/src/widgets-and-layouts/gallery-cleanlooks.qdoc
+++ b/doc/src/widgets-and-layouts/gallery-cleanlooks.qdoc
@@ -34,345 +34,105 @@
This page shows some of the widgets available in Qt
when configured to use the "cleanlooks" style.
-\raw HTML
-<h2 align="center">Buttons</h2>
+\section2 Buttons
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-pushbutton.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-toolbutton.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QPushButton widget provides a command button.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QToolButton class provides a quick-access button to commands
- or options, usually used inside a QToolBar.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-checkbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-radiobutton.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QCheckBox widget provides a checkbox with a text label.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Containers</h2>
+\table 100%
+\row
+\o \image cleanlooks-pushbutton.png
+ \caption The QPushButton widget provides a command button.
+\o \image cleanlooks-toolbutton.png
+ \caption The QToolButton class provides a quick-access button to commands
+ or options, usually used inside a QToolBar.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-groupbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-tabwidget.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QGroupBox widget provides a group box frame with a title.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTabWidget class provides a stack of tabbed widgets.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-frame.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-toolbox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QFrame widget provides a simple decorated container for other widgets.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QToolBox class provides a column of tabbed widget items.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Item Views</h2>
+\table 100%
+\row
+\o \image cleanlooks-checkbox.png
+ \caption The QCheckBox widget provides a checkbox with a text label.
+\o \image cleanlooks-radiobutton.png
+ \caption The QRadioButton widget provides a radio button with a text or pixmap label.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-listview.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-treeview.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-tableview.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Display Widgets</h2>
+\section2 Containers
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-progressbar.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-lcdnumber.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QProgressBar widget provides a horizontal progress bar.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QLCDNumber widget displays a number with LCD-like digits.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-label.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QLabel widget provides a text or image display.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Input Widgets</h2>
+\table 100%
+\row
+\o \image cleanlooks-groupbox.png
+ The The QGroupBox widget provides a group box frame with a title.
+\o \image cleanlooks-tabwidget.png
+ The QTabWidget class provides a stack of tabbed widgets.
+\o \image cleanlooks-frame.png
+ The QFrame widget provides a simple decorated container for other widgets.
+\o \image cleanlooks-toolbox.png
+ The QToolBox class provides a column of tabbed widget items.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-slider.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-lineedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QSlider widget provides a vertical or horizontal slider.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QLineEdit widget is a one-line text editor.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-combobox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-doublespinbox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QComboBox widget is a combined button and pop-up list.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-spinbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-timeedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QSpinBox class provides a spin box widget.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTimeEdit class provides a widget for editing times.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-dateedit.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-datetimeedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QDateEdit class provides a widget for editing dates.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-textedit.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-horizontalscrollbar.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QTextEdit class provides a widget that is used to edit and
- display both plain and rich text.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-dial.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-calendarwidget.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QDial class provides a rounded range control (like a
- speedometer or potentiometer).\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage cleanlooks-fontcombobox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
+\section2 Item Views
+
+\table 100%
+\row
+\o \image cleanlooks-listview.png
+ The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.
+\o \image cleanlooks-treeview.png
+ The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.
+\o \image cleanlooks-tableview.png
+ The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\o
+\o
+\endtable
+
+\section2 Display Widgets
+
+\table 100%
+\row
+\o \image cleanlooks-progressbar.png
+ The QProgressBar widget provides a horizontal progress bar.
+\o \image cleanlooks-label.png
+ The QLabel widget provides a text or image display.
+\o \image cleanlooks-lcdnumber.png
+ The QLCDNumber widget displays a number with LCD-like digits.
+\endtable
+
+\section2 Input Widgets
+
+\table 100%
+\row
+\o \image cleanlooks-lineedit.png
+ The QLineEdit widget is a one-line text editor.
+\o \image cleanlooks-dateedit.png
+ The QDateEdit class provides a widget for editing dates.
+\o \image cleanlooks-timeedit.png
+ The QTimeEdit class provides a widget for editing times.
+\o \image cleanlooks-datetimeedit.png
+ The QDateTimeEdit class provides a widget for editing dates and times.
+\endtable
+
+\table 100%
+\row
+\o \image cleanlooks-slider.png
+ The QSlider widget provides a vertical or horizontal slider.
+\o \image cleanlooks-combobox.png
+ The QComboBox widget is a combined button and pop-up list.
+\o \image cleanlooks-spinbox.png
+ The QSpinBox class provides a spin box widget.
+\endtable
+
+\table 100%
+\row
+\o \image cleanlooks-fontcombobox.png
+ The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.
+\o \image cleanlooks-doublespinbox.png
+ The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.
+\o \image cleanlooks-horizontalscrollbar.png
+ The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.
+\endtable
+
+\table 100%
+\row
+\o \image cleanlooks-dial.png
+ The QDial class provides a rounded range control (like a speedometer or potentiometer).
+\o \image cleanlooks-textedit.png
+ The QTextEdit class provides a widget that is used to edit and display both plain and rich text.
+\o \image cleanlooks-calendarwidget.png
+ The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.
+\endtable
*/
diff --git a/doc/src/widgets-and-layouts/gallery-gtk.qdoc b/doc/src/widgets-and-layouts/gallery-gtk.qdoc
index b3a6372..b2f8458 100644
--- a/doc/src/widgets-and-layouts/gallery-gtk.qdoc
+++ b/doc/src/widgets-and-layouts/gallery-gtk.qdoc
@@ -37,349 +37,105 @@
Take a look at the \l{Qt Widget Gallery} to see how Qt
applications appear in other styles.
-\raw HTML
-<h2 align="center">Buttons</h2>
+\section2 Buttons
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage gtk-pushbutton.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage gtk-toolbutton.png
-\raw HTML
-</td>
-</tr><tr>
-<td align="justify" valign="top">
-\endraw
-The QPushButton widget provides a command button.\raw HTML
-</td>
-<td align="justify" valign="top">
-\endraw
-The QToolButton class provides a quick-access button to commands
- or options, usually used inside a QToolBar.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage gtk-checkbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage gtk-radiobutton.png
-\raw HTML
-</td>
-</tr><tr>
-<td align="justify" valign="top">
-\endraw
-The QCheckBox widget provides a checkbox with a text label.\raw HTML
-</td>
-<td align="justify" valign="top">
-\endraw
-The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Containers</h2>
+\table 100%
+\row
+\o \image gtk-pushbutton.png
+ \caption The QPushButton widget provides a command button.
+\o \image gtk-toolbutton.png
+ \caption The QToolButton class provides a quick-access button to commands
+ or options, usually used inside a QToolBar.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage gtk-groupbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage gtk-tabwidget.png
-\raw HTML
-</td>
-</tr><tr>
-<td align="justify" valign="top">
-\endraw
-The QGroupBox widget provides a group box frame with a title.\raw HTML
-</td>
-<td align="justify" valign="top">
-\endraw
-The QTabWidget class provides a stack of tabbed widgets.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage gtk-toolbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage gtk-frame.png
-\raw HTML
-</td>
-</tr><tr>
-<td align="justify" valign="top">
-\endraw
-The QToolBox class provides a column of tabbed widget items.\raw HTML
-</td>
-<td align="justify" valign="top">
-\endraw
-The QFrame widget provides a simple decorated container for other widgets.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Item Views</h2>
+\table 100%
+\row
+\o \image gtk-checkbox.png
+ \caption The QCheckBox widget provides a checkbox with a text label.
+\o \image gtk-radiobutton.png
+ \caption The QRadioButton widget provides a radio button with a text or pixmap label.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage gtk-listview.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage gtk-treeview.png
-\raw HTML
-</td>
-</tr><tr>
-<td align="justify" valign="top">
-\endraw
-The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML
-</td>
-<td align="justify" valign="top">
-\endraw
-The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage gtk-tableview.png
-\raw HTML
-</td>
-</tr><tr>
-<td align="justify" valign="top">
-\endraw
-The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML
-</td>
-<td align="justify" valign="top">
-\endraw
-\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Display Widgets</h2>
+\section2 Containers
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage gtk-progressbar.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage gtk-lcdnumber.png
-\raw HTML
-</td>
-</tr><tr>
-<td align="justify" valign="top">
-\endraw
-The QProgressBar widget provides a horizontal progress bar.\raw HTML
-</td>
-<td align="justify" valign="top">
-\endraw
-The QLCDNumber widget displays a number with LCD-like digits.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage gtk-label.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QLabel widget provides a text or image display.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Input Widgets</h2>
+\table 100%
+\row
+\o \image gtk-groupbox.png
+ The The QGroupBox widget provides a group box frame with a title.
+\o \image gtk-tabwidget.png
+ The QTabWidget class provides a stack of tabbed widgets.
+\o \image gtk-frame.png
+ The QFrame widget provides a simple decorated container for other widgets.
+\o \image gtk-toolbox.png
+ The QToolBox class provides a column of tabbed widget items.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage gtk-slider.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage gtk-lineedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td align="justify" valign="top">
-\endraw
-The QSlider widget provides a vertical or horizontal slider.\raw HTML
-</td>
-<td align="justify" valign="top">
-\endraw
-The QLineEdit widget is a one-line text editor.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage gtk-combobox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage gtk-doublespinbox.png
-\raw HTML
-</td>
-</tr><tr>
-<td align="justify" valign="top">
-\endraw
-The QComboBox widget is a combined button and pop-up list.\raw HTML
-</td>
-<td align="justify" valign="top">
-\endraw
-The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage gtk-spinbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage gtk-timeedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td align="justify" valign="top">
-\endraw
-The QSpinBox class provides a spin box widget.\raw HTML
-</td>
-<td align="justify" valign="top">
-\endraw
-The QTimeEdit class provides a widget for editing times.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage gtk-dateedit.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage gtk-datetimeedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td align="justify" valign="top">
-\endraw
-The QDateEdit class provides a widget for editing dates.\raw HTML
-</td>
-<td align="justify" valign="top">
-\endraw
-The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage gtk-textedit.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage gtk-horizontalscrollbar.png
-\raw HTML
-</td>
-</tr><tr>
-<td align="justify" valign="top">
-\endraw
-The QTextEdit class provides a widget that is used to edit and
- display both plain and rich text.\raw HTML
-</td>
-<td align="justify" valign="top">
-\endraw
-The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage gtk-dial.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage gtk-calendarwidget.png
-\raw HTML
-</td>
-</tr><tr>
-<td align="justify" valign="top">
-\endraw
-The QDial class provides a rounded range control (like a
- speedometer or potentiometer).\raw HTML
-</td>
-<td align="justify" valign="top">
-\endraw
-The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage gtk-fontcombobox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
+\section2 Item Views
+
+\table 100%
+\row
+\o \image gtk-listview.png
+ The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.
+\o \image gtk-treeview.png
+ The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.
+\o \image gtk-tableview.png
+ The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\o
+\o
+\endtable
+
+\section2 Display Widgets
+
+\table 100%
+\row
+\o \image gtk-progressbar.png
+ The QProgressBar widget provides a horizontal progress bar.
+\o \image gtk-label.png
+ The QLabel widget provides a text or image display.
+\o \image gtk-lcdnumber.png
+ The QLCDNumber widget displays a number with LCD-like digits.
+\endtable
+
+\section2 Input Widgets
+
+\table 100%
+\row
+\o \image gtk-lineedit.png
+ The QLineEdit widget is a one-line text editor.
+\o \image gtk-dateedit.png
+ The QDateEdit class provides a widget for editing dates.
+\o \image gtk-timeedit.png
+ The QTimeEdit class provides a widget for editing times.
+\o \image gtk-datetimeedit.png
+ The QDateTimeEdit class provides a widget for editing dates and times.
+\endtable
+
+\table 100%
+\row
+\o \image gtk-slider.png
+ The QSlider widget provides a vertical or horizontal slider.
+\o \image gtk-combobox.png
+ The QComboBox widget is a combined button and pop-up list.
+\o \image gtk-spinbox.png
+ The QSpinBox class provides a spin box widget.
+\endtable
+
+\table 100%
+\row
+\o \image gtk-fontcombobox.png
+ The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.
+\o \image gtk-doublespinbox.png
+ The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.
+\o \image gtk-horizontalscrollbar.png
+ The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.
+\endtable
+
+\table 100%
+\row
+\o \image gtk-dial.png
+ The QDial class provides a rounded range control (like a speedometer or potentiometer).
+\o \image gtk-textedit.png
+ The QTextEdit class provides a widget that is used to edit and display both plain and rich text.
+\o \image gtk-calendarwidget.png
+ The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.
+\endtable
*/
diff --git a/doc/src/widgets-and-layouts/gallery-macintosh.qdoc b/doc/src/widgets-and-layouts/gallery-macintosh.qdoc
index 30a78ca..44d7eb9 100644
--- a/doc/src/widgets-and-layouts/gallery-macintosh.qdoc
+++ b/doc/src/widgets-and-layouts/gallery-macintosh.qdoc
@@ -34,345 +34,105 @@
This page shows some of the widgets available in Qt
when configured to use the "macintosh" style.
-\raw HTML
-<h2 align="center">Buttons</h2>
+\section2 Buttons
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage macintosh-pushbutton.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage macintosh-toolbutton.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QPushButton widget provides a command button.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QToolButton class provides a quick-access button to commands
- or options, usually used inside a QToolBar.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage macintosh-checkbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage macintosh-radiobutton.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QCheckBox widget provides a checkbox with a text label.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Containers</h2>
+\table 100%
+\row
+\o \image macintosh-pushbutton.png
+ \caption The QPushButton widget provides a command button.
+\o \image macintosh-toolbutton.png
+ \caption The QToolButton class provides a quick-access button to commands
+ or options, usually used inside a QToolBar.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage macintosh-groupbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage macintosh-tabwidget.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QGroupBox widget provides a group box frame with a title.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTabWidget class provides a stack of tabbed widgets.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage macintosh-frame.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage macintosh-toolbox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QFrame widget provides a simple decorated container for other widgets.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QToolBox class provides a column of tabbed widget items.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Item Views</h2>
+\table 100%
+\row
+\o \image macintosh-checkbox.png
+ \caption The QCheckBox widget provides a checkbox with a text label.
+\o \image macintosh-radiobutton.png
+ \caption The QRadioButton widget provides a radio button with a text or pixmap label.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage macintosh-listview.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage macintosh-treeview.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage macintosh-tableview.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Display Widgets</h2>
+\section2 Containers
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage macintosh-progressbar.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage macintosh-lcdnumber.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QProgressBar widget provides a horizontal progress bar.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QLCDNumber widget displays a number with LCD-like digits.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage macintosh-label.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QLabel widget provides a text or image display.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Input Widgets</h2>
+\table 100%
+\row
+\o \image macintosh-groupbox.png
+ The The QGroupBox widget provides a group box frame with a title.
+\o \image macintosh-tabwidget.png
+ The QTabWidget class provides a stack of tabbed widgets.
+\o \image macintosh-frame.png
+ The QFrame widget provides a simple decorated container for other widgets.
+\o \image macintosh-toolbox.png
+ The QToolBox class provides a column of tabbed widget items.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage macintosh-slider.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage macintosh-lineedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QSlider widget provides a vertical or horizontal slider.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QLineEdit widget is a one-line text editor.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage macintosh-combobox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage macintosh-doublespinbox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QComboBox widget is a combined button and pop-up list.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage macintosh-spinbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage macintosh-timeedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QSpinBox class provides a spin box widget.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTimeEdit class provides a widget for editing times.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage macintosh-dateedit.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage macintosh-datetimeedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QDateEdit class provides a widget for editing dates.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage macintosh-textedit.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage macintosh-horizontalscrollbar.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QTextEdit class provides a widget that is used to edit and
- display both plain and rich text.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage macintosh-dial.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage macintosh-calendarwidget.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QDial class provides a rounded range control (like a
- speedometer or potentiometer).\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage macintosh-fontcombobox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
+\section2 Item Views
+
+\table 100%
+\row
+\o \image macintosh-listview.png
+ The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.
+\o \image macintosh-treeview.png
+ The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.
+\o \image macintosh-tableview.png
+ The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\o
+\o
+\endtable
+
+\section2 Display Widgets
+
+\table 100%
+\row
+\o \image macintosh-progressbar.png
+ The QProgressBar widget provides a horizontal progress bar.
+\o \image macintosh-label.png
+ The QLabel widget provides a text or image display.
+\o \image macintosh-lcdnumber.png
+ The QLCDNumber widget displays a number with LCD-like digits.
+\endtable
+
+\section2 Input Widgets
+
+\table 100%
+\row
+\o \image macintosh-lineedit.png
+ The QLineEdit widget is a one-line text editor.
+\o \image macintosh-dateedit.png
+ The QDateEdit class provides a widget for editing dates.
+\o \image macintosh-timeedit.png
+ The QTimeEdit class provides a widget for editing times.
+\o \image macintosh-datetimeedit.png
+ The QDateTimeEdit class provides a widget for editing dates and times.
+\endtable
+
+\table 100%
+\row
+\o \image macintosh-slider.png
+ The QSlider widget provides a vertical or horizontal slider.
+\o \image macintosh-combobox.png
+ The QComboBox widget is a combined button and pop-up list.
+\o \image macintosh-spinbox.png
+ The QSpinBox class provides a spin box widget.
+\endtable
+
+\table 100%
+\row
+\o \image macintosh-fontcombobox.png
+ The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.
+\o \image macintosh-doublespinbox.png
+ The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.
+\o \image macintosh-horizontalscrollbar.png
+ The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.
+\endtable
+
+\table 100%
+\row
+\o \image macintosh-dial.png
+ The QDial class provides a rounded range control (like a speedometer or potentiometer).
+\o \image macintosh-textedit.png
+ The QTextEdit class provides a widget that is used to edit and display both plain and rich text.
+\o \image macintosh-calendarwidget.png
+ The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.
+\endtable
*/
diff --git a/doc/src/widgets-and-layouts/gallery-motif.qdoc b/doc/src/widgets-and-layouts/gallery-motif.qdoc
index 861c22a..b9c95c8 100644
--- a/doc/src/widgets-and-layouts/gallery-motif.qdoc
+++ b/doc/src/widgets-and-layouts/gallery-motif.qdoc
@@ -34,345 +34,105 @@
This page shows some of the widgets available in Qt
when configured to use the "motif" style.
-\raw HTML
-<h2 align="center">Buttons</h2>
+\section2 Buttons
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage motif-pushbutton.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage motif-toolbutton.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QPushButton widget provides a command button.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QToolButton class provides a quick-access button to commands
- or options, usually used inside a QToolBar.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage motif-checkbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage motif-radiobutton.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QCheckBox widget provides a checkbox with a text label.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Containers</h2>
+\table 100%
+\row
+\o \image motif-pushbutton.png
+ \caption The QPushButton widget provides a command button.
+\o \image motif-toolbutton.png
+ \caption The QToolButton class provides a quick-access button to commands
+ or options, usually used inside a QToolBar.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage motif-groupbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage motif-tabwidget.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QGroupBox widget provides a group box frame with a title.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTabWidget class provides a stack of tabbed widgets.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage motif-frame.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage motif-toolbox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QFrame widget provides a simple decorated container for other widgets.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QToolBox class provides a column of tabbed widget items.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Item Views</h2>
+\table 100%
+\row
+\o \image motif-checkbox.png
+ \caption The QCheckBox widget provides a checkbox with a text label.
+\o \image motif-radiobutton.png
+ \caption The QRadioButton widget provides a radio button with a text or pixmap label.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage motif-listview.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage motif-treeview.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage motif-tableview.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Display Widgets</h2>
+\section2 Containers
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage motif-progressbar.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage motif-lcdnumber.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QProgressBar widget provides a horizontal progress bar.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QLCDNumber widget displays a number with LCD-like digits.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage motif-label.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QLabel widget provides a text or image display.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Input Widgets</h2>
+\table 100%
+\row
+\o \image motif-groupbox.png
+ The The QGroupBox widget provides a group box frame with a title.
+\o \image motif-tabwidget.png
+ The QTabWidget class provides a stack of tabbed widgets.
+\o \image motif-frame.png
+ The QFrame widget provides a simple decorated container for other widgets.
+\o \image motif-toolbox.png
+ The QToolBox class provides a column of tabbed widget items.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage motif-slider.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage motif-lineedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QSlider widget provides a vertical or horizontal slider.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QLineEdit widget is a one-line text editor.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage motif-combobox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage motif-doublespinbox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QComboBox widget is a combined button and pop-up list.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage motif-spinbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage motif-timeedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QSpinBox class provides a spin box widget.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTimeEdit class provides a widget for editing times.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage motif-dateedit.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage motif-datetimeedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QDateEdit class provides a widget for editing dates.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage motif-textedit.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage motif-horizontalscrollbar.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QTextEdit class provides a widget that is used to edit and
- display both plain and rich text.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage motif-dial.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage motif-calendarwidget.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QDial class provides a rounded range control (like a
- speedometer or potentiometer).\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage motif-fontcombobox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
+\section2 Item Views
+
+\table 100%
+\row
+\o \image motif-listview.png
+ The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.
+\o \image motif-treeview.png
+ The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.
+\o \image motif-tableview.png
+ The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\o
+\o
+\endtable
+
+\section2 Display Widgets
+
+\table 100%
+\row
+\o \image motif-progressbar.png
+ The QProgressBar widget provides a horizontal progress bar.
+\o \image motif-label.png
+ The QLabel widget provides a text or image display.
+\o \image motif-lcdnumber.png
+ The QLCDNumber widget displays a number with LCD-like digits.
+\endtable
+
+\section2 Input Widgets
+
+\table 100%
+\row
+\o \image motif-lineedit.png
+ The QLineEdit widget is a one-line text editor.
+\o \image motif-dateedit.png
+ The QDateEdit class provides a widget for editing dates.
+\o \image motif-timeedit.png
+ The QTimeEdit class provides a widget for editing times.
+\o \image motif-datetimeedit.png
+ The QDateTimeEdit class provides a widget for editing dates and times.
+\endtable
+
+\table 100%
+\row
+\o \image motif-slider.png
+ The QSlider widget provides a vertical or horizontal slider.
+\o \image motif-combobox.png
+ The QComboBox widget is a combined button and pop-up list.
+\o \image motif-spinbox.png
+ The QSpinBox class provides a spin box widget.
+\endtable
+
+\table 100%
+\row
+\o \image motif-fontcombobox.png
+ The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.
+\o \image motif-doublespinbox.png
+ The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.
+\o \image motif-horizontalscrollbar.png
+ The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.
+\endtable
+
+\table 100%
+\row
+\o \image motif-dial.png
+ The QDial class provides a rounded range control (like a speedometer or potentiometer).
+\o \image motif-textedit.png
+ The QTextEdit class provides a widget that is used to edit and display both plain and rich text.
+\o \image motif-calendarwidget.png
+ The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.
+\endtable
*/
diff --git a/doc/src/widgets-and-layouts/gallery-plastique.qdoc b/doc/src/widgets-and-layouts/gallery-plastique.qdoc
index 0ea62ee..5f2a1ec 100644
--- a/doc/src/widgets-and-layouts/gallery-plastique.qdoc
+++ b/doc/src/widgets-and-layouts/gallery-plastique.qdoc
@@ -34,345 +34,105 @@
This page shows some of the widgets available in Qt
when configured to use the "plastique" style.
-\raw HTML
-<h2 align="center">Buttons</h2>
+\section2 Buttons
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage plastique-pushbutton.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage plastique-toolbutton.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QPushButton widget provides a command button.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QToolButton class provides a quick-access button to commands
- or options, usually used inside a QToolBar.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage plastique-checkbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage plastique-radiobutton.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QCheckBox widget provides a checkbox with a text label.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Containers</h2>
+\table 100%
+\row
+\o \image plastique-pushbutton.png
+ \caption The QPushButton widget provides a command button.
+\o \image plastique-toolbutton.png
+ \caption The QToolButton class provides a quick-access button to commands
+ or options, usually used inside a QToolBar.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage plastique-groupbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage plastique-tabwidget.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QGroupBox widget provides a group box frame with a title.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTabWidget class provides a stack of tabbed widgets.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage plastique-frame.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage plastique-toolbox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QFrame widget provides a simple decorated container for other widgets.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QToolBox class provides a column of tabbed widget items.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Item Views</h2>
+\table 100%
+\row
+\o \image plastique-checkbox.png
+ \caption The QCheckBox widget provides a checkbox with a text label.
+\o \image plastique-radiobutton.png
+ \caption The QRadioButton widget provides a radio button with a text or pixmap label.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage plastique-listview.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage plastique-treeview.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage plastique-tableview.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Display Widgets</h2>
+\section2 Containers
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage plastique-progressbar.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage plastique-lcdnumber.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QProgressBar widget provides a horizontal progress bar.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QLCDNumber widget displays a number with LCD-like digits.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage plastique-label.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QLabel widget provides a text or image display.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Input Widgets</h2>
+\table 100%
+\row
+\o \image plastique-groupbox.png
+ The The QGroupBox widget provides a group box frame with a title.
+\o \image plastique-tabwidget.png
+ The QTabWidget class provides a stack of tabbed widgets.
+\o \image plastique-frame.png
+ The QFrame widget provides a simple decorated container for other widgets.
+\o \image plastique-toolbox.png
+ The QToolBox class provides a column of tabbed widget items.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage plastique-slider.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage plastique-lineedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QSlider widget provides a vertical or horizontal slider.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QLineEdit widget is a one-line text editor.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage plastique-combobox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage plastique-doublespinbox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QComboBox widget is a combined button and pop-up list.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage plastique-spinbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage plastique-timeedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QSpinBox class provides a spin box widget.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTimeEdit class provides a widget for editing times.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage plastique-dateedit.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage plastique-datetimeedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QDateEdit class provides a widget for editing dates.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage plastique-textedit.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage plastique-horizontalscrollbar.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QTextEdit class provides a widget that is used to edit and
- display both plain and rich text.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage plastique-dial.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage plastique-calendarwidget.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QDial class provides a rounded range control (like a
- speedometer or potentiometer).\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage plastique-fontcombobox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
+\section2 Item Views
+
+\table 100%
+\row
+\o \image plastique-listview.png
+ The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.
+\o \image plastique-treeview.png
+ The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.
+\o \image plastique-tableview.png
+ The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\o
+\o
+\endtable
+
+\section2 Display Widgets
+
+\table 100%
+\row
+\o \image plastique-progressbar.png
+ The QProgressBar widget provides a horizontal progress bar.
+\o \image plastique-label.png
+ The QLabel widget provides a text or image display.
+\o \image plastique-lcdnumber.png
+ The QLCDNumber widget displays a number with LCD-like digits.
+\endtable
+
+\section2 Input Widgets
+
+\table 100%
+\row
+\o \image plastique-lineedit.png
+ The QLineEdit widget is a one-line text editor.
+\o \image plastique-dateedit.png
+ The QDateEdit class provides a widget for editing dates.
+\o \image plastique-timeedit.png
+ The QTimeEdit class provides a widget for editing times.
+\o \image plastique-datetimeedit.png
+ The QDateTimeEdit class provides a widget for editing dates and times.
+\endtable
+
+\table 100%
+\row
+\o \image plastique-slider.png
+ The QSlider widget provides a vertical or horizontal slider.
+\o \image plastique-combobox.png
+ The QComboBox widget is a combined button and pop-up list.
+\o \image plastique-spinbox.png
+ The QSpinBox class provides a spin box widget.
+\endtable
+
+\table 100%
+\row
+\o \image plastique-fontcombobox.png
+ The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.
+\o \image plastique-doublespinbox.png
+ The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.
+\o \image plastique-horizontalscrollbar.png
+ The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.
+\endtable
+
+\table 100%
+\row
+\o \image plastique-dial.png
+ The QDial class provides a rounded range control (like a speedometer or potentiometer).
+\o \image plastique-textedit.png
+ The QTextEdit class provides a widget that is used to edit and display both plain and rich text.
+\o \image plastique-calendarwidget.png
+ The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.
+\endtable
*/
diff --git a/doc/src/widgets-and-layouts/gallery-windows.qdoc b/doc/src/widgets-and-layouts/gallery-windows.qdoc
index d3464a0..fe38745 100644
--- a/doc/src/widgets-and-layouts/gallery-windows.qdoc
+++ b/doc/src/widgets-and-layouts/gallery-windows.qdoc
@@ -34,345 +34,105 @@
This page shows some of the widgets available in Qt
when configured to use the "windows" style.
-\raw HTML
-<h2 align="center">Buttons</h2>
+\section2 Buttons
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windows-pushbutton.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windows-toolbutton.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QPushButton widget provides a command button.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QToolButton class provides a quick-access button to commands
- or options, usually used inside a QToolBar.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windows-checkbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windows-radiobutton.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QCheckBox widget provides a checkbox with a text label.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Containers</h2>
+\table 100%
+\row
+\o \image windows-pushbutton.png
+ \caption The QPushButton widget provides a command button.
+\o \image windows-toolbutton.png
+ \caption The QToolButton class provides a quick-access button to commands
+ or options, usually used inside a QToolBar.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windows-groupbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windows-tabwidget.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QGroupBox widget provides a group box frame with a title.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTabWidget class provides a stack of tabbed widgets.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windows-frame.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windows-toolbox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QFrame widget provides a simple decorated container for other widgets.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QToolBox class provides a column of tabbed widget items.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Item Views</h2>
+\table 100%
+\row
+\o \image windows-checkbox.png
+ \caption The QCheckBox widget provides a checkbox with a text label.
+\o \image windows-radiobutton.png
+ \caption The QRadioButton widget provides a radio button with a text or pixmap label.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windows-listview.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windows-treeview.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windows-tableview.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Display Widgets</h2>
+\section2 Containers
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windows-progressbar.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windows-lcdnumber.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QProgressBar widget provides a horizontal progress bar.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QLCDNumber widget displays a number with LCD-like digits.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windows-label.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QLabel widget provides a text or image display.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Input Widgets</h2>
+\table 100%
+\row
+\o \image windows-groupbox.png
+ The The QGroupBox widget provides a group box frame with a title.
+\o \image windows-tabwidget.png
+ The QTabWidget class provides a stack of tabbed widgets.
+\o \image windows-frame.png
+ The QFrame widget provides a simple decorated container for other widgets.
+\o \image windows-toolbox.png
+ The QToolBox class provides a column of tabbed widget items.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windows-slider.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windows-lineedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QSlider widget provides a vertical or horizontal slider.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QLineEdit widget is a one-line text editor.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windows-combobox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windows-doublespinbox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QComboBox widget is a combined button and pop-up list.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windows-spinbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windows-timeedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QSpinBox class provides a spin box widget.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTimeEdit class provides a widget for editing times.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windows-dateedit.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windows-datetimeedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QDateEdit class provides a widget for editing dates.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windows-textedit.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windows-horizontalscrollbar.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QTextEdit class provides a widget that is used to edit and
- display both plain and rich text.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windows-dial.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windows-calendarwidget.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QDial class provides a rounded range control (like a
- speedometer or potentiometer).\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windows-fontcombobox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
+\section2 Item Views
+
+\table 100%
+\row
+\o \image windows-listview.png
+ The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.
+\o \image windows-treeview.png
+ The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.
+\o \image windows-tableview.png
+ The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\o
+\o
+\endtable
+
+\section2 Display Widgets
+
+\table 100%
+\row
+\o \image windows-progressbar.png
+ The QProgressBar widget provides a horizontal progress bar.
+\o \image windows-label.png
+ The QLabel widget provides a text or image display.
+\o \image windows-lcdnumber.png
+ The QLCDNumber widget displays a number with LCD-like digits.
+\endtable
+
+\section2 Input Widgets
+
+\table 100%
+\row
+\o \image windows-lineedit.png
+ The QLineEdit widget is a one-line text editor.
+\o \image windows-dateedit.png
+ The QDateEdit class provides a widget for editing dates.
+\o \image windows-timeedit.png
+ The QTimeEdit class provides a widget for editing times.
+\o \image windows-datetimeedit.png
+ The QDateTimeEdit class provides a widget for editing dates and times.
+\endtable
+
+\table 100%
+\row
+\o \image windows-slider.png
+ The QSlider widget provides a vertical or horizontal slider.
+\o \image windows-combobox.png
+ The QComboBox widget is a combined button and pop-up list.
+\o \image windows-spinbox.png
+ The QSpinBox class provides a spin box widget.
+\endtable
+
+\table 100%
+\row
+\o \image windows-fontcombobox.png
+ The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.
+\o \image windows-doublespinbox.png
+ The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.
+\o \image windows-horizontalscrollbar.png
+ The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.
+\endtable
+
+\table 100%
+\row
+\o \image windows-dial.png
+ The QDial class provides a rounded range control (like a speedometer or potentiometer).
+\o \image windows-textedit.png
+ The QTextEdit class provides a widget that is used to edit and display both plain and rich text.
+\o \image windows-calendarwidget.png
+ The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.
+\endtable
*/
diff --git a/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc b/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc
index 00afd52..e017a2c 100644
--- a/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc
+++ b/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc
@@ -34,345 +34,105 @@
This page shows some of the widgets available in Qt
when configured to use the "windowsvista" style.
-\raw HTML
-<h2 align="center">Buttons</h2>
+\section2 Buttons
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsvista-pushbutton.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsvista-toolbutton.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QPushButton widget provides a command button.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QToolButton class provides a quick-access button to commands
- or options, usually used inside a QToolBar.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsvista-checkbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsvista-radiobutton.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QCheckBox widget provides a checkbox with a text label.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Containers</h2>
+\table 100%
+\row
+\o \image windowsvista-pushbutton.png
+ \caption The QPushButton widget provides a command button.
+\o \image windowsvista-toolbutton.png
+ \caption The QToolButton class provides a quick-access button to commands
+ or options, usually used inside a QToolBar.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsvista-groupbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsvista-tabwidget.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QGroupBox widget provides a group box frame with a title.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTabWidget class provides a stack of tabbed widgets.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsvista-frame.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsvista-toolbox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QFrame widget provides a simple decorated container for other widgets.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QToolBox class provides a column of tabbed widget items.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Item Views</h2>
+\table 100%
+\row
+\o \image windowsvista-checkbox.png
+ \caption The QCheckBox widget provides a checkbox with a text label.
+\o \image windowsvista-radiobutton.png
+ \caption The QRadioButton widget provides a radio button with a text or pixmap label.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsvista-listview.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsvista-treeview.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsvista-tableview.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Display Widgets</h2>
+\section2 Containers
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsvista-progressbar.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsvista-lcdnumber.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QProgressBar widget provides a horizontal progress bar.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QLCDNumber widget displays a number with LCD-like digits.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsvista-label.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QLabel widget provides a text or image display.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Input Widgets</h2>
+\table 100%
+\row
+\o \image windowsvista-groupbox.png
+ The The QGroupBox widget provides a group box frame with a title.
+\o \image windowsvista-tabwidget.png
+ The QTabWidget class provides a stack of tabbed widgets.
+\o \image windowsvista-frame.png
+ The QFrame widget provides a simple decorated container for other widgets.
+\o \image windowsvista-toolbox.png
+ The QToolBox class provides a column of tabbed widget items.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsvista-slider.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsvista-lineedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QSlider widget provides a vertical or horizontal slider.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QLineEdit widget is a one-line text editor.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsvista-combobox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsvista-doublespinbox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QComboBox widget is a combined button and pop-up list.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsvista-spinbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsvista-timeedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QSpinBox class provides a spin box widget.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTimeEdit class provides a widget for editing times.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsvista-dateedit.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsvista-datetimeedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QDateEdit class provides a widget for editing dates.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsvista-textedit.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsvista-horizontalscrollbar.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QTextEdit class provides a widget that is used to edit and
- display both plain and rich text.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsvista-dial.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsvista-calendarwidget.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QDial class provides a rounded range control (like a
- speedometer or potentiometer).\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsvista-fontcombobox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
+\section2 Item Views
+
+\table 100%
+\row
+\o \image windowsvista-listview.png
+ The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.
+\o \image windowsvista-treeview.png
+ The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.
+\o \image windowsvista-tableview.png
+ The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\o
+\o
+\endtable
+
+\section2 Display Widgets
+
+\table 100%
+\row
+\o \image windowsvista-progressbar.png
+ The QProgressBar widget provides a horizontal progress bar.
+\o \image windowsvista-label.png
+ The QLabel widget provides a text or image display.
+\o \image windowsvista-lcdnumber.png
+ The QLCDNumber widget displays a number with LCD-like digits.
+\endtable
+
+\section2 Input Widgets
+
+\table 100%
+\row
+\o \image windowsvista-lineedit.png
+ The QLineEdit widget is a one-line text editor.
+\o \image windowsvista-dateedit.png
+ The QDateEdit class provides a widget for editing dates.
+\o \image windowsvista-timeedit.png
+ The QTimeEdit class provides a widget for editing times.
+\o \image windowsvista-datetimeedit.png
+ The QDateTimeEdit class provides a widget for editing dates and times.
+\endtable
+
+\table 100%
+\row
+\o \image windowsvista-slider.png
+ The QSlider widget provides a vertical or horizontal slider.
+\o \image windowsvista-combobox.png
+ The QComboBox widget is a combined button and pop-up list.
+\o \image windowsvista-spinbox.png
+ The QSpinBox class provides a spin box widget.
+\endtable
+
+\table 100%
+\row
+\o \image windowsvista-fontcombobox.png
+ The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.
+\o \image windowsvista-doublespinbox.png
+ The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.
+\o \image windowsvista-horizontalscrollbar.png
+ The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.
+\endtable
+
+\table 100%
+\row
+\o \image windowsvista-dial.png
+ The QDial class provides a rounded range control (like a speedometer or potentiometer).
+\o \image windowsvista-textedit.png
+ The QTextEdit class provides a widget that is used to edit and display both plain and rich text.
+\o \image windowsvista-calendarwidget.png
+ The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.
+\endtable
*/
diff --git a/doc/src/widgets-and-layouts/gallery-windowsxp.qdoc b/doc/src/widgets-and-layouts/gallery-windowsxp.qdoc
index 60c8ff0..f3c53ee 100644
--- a/doc/src/widgets-and-layouts/gallery-windowsxp.qdoc
+++ b/doc/src/widgets-and-layouts/gallery-windowsxp.qdoc
@@ -34,345 +34,105 @@
This page shows some of the widgets available in Qt
when configured to use the "windowsxp" style.
-\raw HTML
-<h2 align="center">Buttons</h2>
+\section2 Buttons
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsxp-pushbutton.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsxp-toolbutton.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QPushButton widget provides a command button.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QToolButton class provides a quick-access button to commands
- or options, usually used inside a QToolBar.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsxp-checkbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsxp-radiobutton.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QCheckBox widget provides a checkbox with a text label.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Containers</h2>
+\table 100%
+\row
+\o \image windowsxp-pushbutton.png
+ \caption The QPushButton widget provides a command button.
+\o \image windowsxp-toolbutton.png
+ \caption The QToolButton class provides a quick-access button to commands
+ or options, usually used inside a QToolBar.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsxp-groupbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsxp-tabwidget.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QGroupBox widget provides a group box frame with a title.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTabWidget class provides a stack of tabbed widgets.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsxp-frame.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsxp-toolbox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QFrame widget provides a simple decorated container for other widgets.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QToolBox class provides a column of tabbed widget items.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Item Views</h2>
+\table 100%
+\row
+\o \image windowsxp-checkbox.png
+ \caption The QCheckBox widget provides a checkbox with a text label.
+\o \image windowsxp-radiobutton.png
+ \caption The QRadioButton widget provides a radio button with a text or pixmap label.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsxp-listview.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsxp-treeview.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsxp-tableview.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Display Widgets</h2>
+\section2 Containers
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsxp-progressbar.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsxp-lcdnumber.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QProgressBar widget provides a horizontal progress bar.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QLCDNumber widget displays a number with LCD-like digits.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsxp-label.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QLabel widget provides a text or image display.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
-\raw HTML
-<h2 align="center">Input Widgets</h2>
+\table 100%
+\row
+\o \image windowsxp-groupbox.png
+ The The QGroupBox widget provides a group box frame with a title.
+\o \image windowsxp-tabwidget.png
+ The QTabWidget class provides a stack of tabbed widgets.
+\o \image windowsxp-frame.png
+ The QFrame widget provides a simple decorated container for other widgets.
+\o \image windowsxp-toolbox.png
+ The QToolBox class provides a column of tabbed widget items.
+\endtable
-<table align="center" cellspacing="20%" width="100%">
-<colgroup span="2">
- <col width="40%" />
- <col width="40%" />
-</colgroup>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsxp-slider.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsxp-lineedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QSlider widget provides a vertical or horizontal slider.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QLineEdit widget is a one-line text editor.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsxp-combobox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsxp-doublespinbox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QComboBox widget is a combined button and pop-up list.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsxp-spinbox.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsxp-timeedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QSpinBox class provides a spin box widget.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QTimeEdit class provides a widget for editing times.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsxp-dateedit.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsxp-datetimeedit.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QDateEdit class provides a widget for editing dates.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsxp-textedit.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsxp-horizontalscrollbar.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QTextEdit class provides a widget that is used to edit and
- display both plain and rich text.\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsxp-dial.png
-\raw HTML
-</td>
-<td align="center">
-\endraw
-\inlineimage windowsxp-calendarwidget.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QDial class provides a rounded range control (like a
- speedometer or potentiometer).\raw HTML
-</td>
-<td halign="justify" valign="top">
-\endraw
-The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML
-</td>
-</tr>
-<tr>
-<td align="center">
-\endraw
-\inlineimage windowsxp-fontcombobox.png
-\raw HTML
-</td>
-</tr><tr>
-<td halign="justify" valign="top">
-\endraw
-The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML
-</td>
-</tr>
-</table>
-\endraw
+\section2 Item Views
+
+\table 100%
+\row
+\o \image windowsxp-listview.png
+ The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.
+\o \image windowsxp-treeview.png
+ The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.
+\o \image windowsxp-tableview.png
+ The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\o
+\o
+\endtable
+
+\section2 Display Widgets
+
+\table 100%
+\row
+\o \image windowsxp-progressbar.png
+ The QProgressBar widget provides a horizontal progress bar.
+\o \image windowsxp-label.png
+ The QLabel widget provides a text or image display.
+\o \image windowsxp-lcdnumber.png
+ The QLCDNumber widget displays a number with LCD-like digits.
+\endtable
+
+\section2 Input Widgets
+
+\table 100%
+\row
+\o \image windowsxp-lineedit.png
+ The QLineEdit widget is a one-line text editor.
+\o \image windowsxp-dateedit.png
+ The QDateEdit class provides a widget for editing dates.
+\o \image windowsxp-timeedit.png
+ The QTimeEdit class provides a widget for editing times.
+\o \image windowsxp-datetimeedit.png
+ The QDateTimeEdit class provides a widget for editing dates and times.
+\endtable
+
+\table 100%
+\row
+\o \image windowsxp-slider.png
+ The QSlider widget provides a vertical or horizontal slider.
+\o \image windowsxp-combobox.png
+ The QComboBox widget is a combined button and pop-up list.
+\o \image windowsxp-spinbox.png
+ The QSpinBox class provides a spin box widget.
+\endtable
+
+\table 100%
+\row
+\o \image windowsxp-fontcombobox.png
+ The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.
+\o \image windowsxp-doublespinbox.png
+ The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.
+\o \image windowsxp-horizontalscrollbar.png
+ The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.
+\endtable
+
+\table 100%
+\row
+\o \image windowsxp-dial.png
+ The QDial class provides a rounded range control (like a speedometer or potentiometer).
+\o \image windowsxp-textedit.png
+ The QTextEdit class provides a widget that is used to edit and display both plain and rich text.
+\o \image windowsxp-calendarwidget.png
+ The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.
+\endtable
*/
diff --git a/doc/src/widgets-and-layouts/gallery.qdoc b/doc/src/widgets-and-layouts/gallery.qdoc
index 201817b..d11d9c8 100644
--- a/doc/src/widgets-and-layouts/gallery.qdoc
+++ b/doc/src/widgets-and-layouts/gallery.qdoc
@@ -34,103 +34,51 @@
with the native desktop enviroment. Below, you can find links to the various
widget styles that are supplied with Qt 4.
- \raw HTML
- <table align="center" cellspacing="20%" width="100%">
- <colgroup span="2">
- <col width="40%" />
- <col width="40%" />
- </colgroup>
- <tr>
- <td align="center">
- \endraw
- \image plastique-tabwidget.png Plastique Style Widget Gallery
-
- \bold{\l{Plastique Style Widget Gallery}}
+ \table
+ \row
+ \o \image plastique-tabwidget.png Plastique Style Widget Gallery
+ \caption \l{Plastique Style Widget Gallery}
The Plastique style is provided by QPlastiqueStyle.
- \raw HTML
- </td>
- <td align="center">
- \endraw
- \image windowsxp-tabwidget.png Windows XP Style Widget Gallery
-
- \bold{\l{Windows XP Style Widget Gallery}}
+ \o \image windowsxp-tabwidget.png Windows XP Style Widget Gallery
+ \caption \l{Windows XP Style Widget Gallery}
The Windows XP style is provided by QWindowsXPStyle.
- \raw HTML
- </td>
- </tr>
- <tr>
- <td align="center">
- \endraw
- \image gtk-tabwidget.png GTK Style Widget Gallery
+ \o \image windows-tabwidget.png Windows Style Widget Gallery
+ \caption \l{Windows Style Widget Gallery}
- \bold{\l{GTK Style Widget Gallery}}
-
- The GTK style is provided by QGtkStyle.
- \raw HTML
- </td>
- <td align="center">
- \endraw
- \image macintosh-tabwidget.png Macintosh Style Widget Gallery
+ The Windows style is provided by QWindowsStyle.
+ \endtable
- \bold{\l{Macintosh Style Widget Gallery}}
+ \table
+ \row
+ \o \image macintosh-tabwidget.png Macintosh Style Widget Gallery
+ \caption \l{Macintosh Style Widget Gallery}
The Macintosh style is provided by QMacStyle.
- \raw HTML
- </td>
- </tr>
- <tr>
- <td align="center">
- \endraw
- \image cleanlooks-tabwidget.png Cleanlooks Style Widget Gallery
-
- \bold{\l{Cleanlooks Style Widget Gallery}}
+ \o \image cleanlooks-tabwidget.png Cleanlooks Style Widget Gallery
+ \caption \l{Cleanlooks Style Widget Gallery}
The Cleanlooks style is provided by QCleanlooksStyle.
- \raw HTML
- </td>
- <td align="center">
- \endraw
- \image windowsvista-tabwidget.png Windows Vista Style Widget Gallery
-
- \bold{\l{Windows Vista Style Widget Gallery}}
+ \o \image windowsvista-tabwidget.png Windows Vista Style Widget Gallery
+ \caption \l{Windows Vista Style Widget Gallery}
The Windows Vista style is provided by QWindowsVistaStyle.
- \raw HTML
- </td>
- </tr>
- <tr>
- <td align="center">
- \endraw
- \image motif-tabwidget.png Motif Style Widget Gallery
+ \endtable
- \bold{\l{Motif Style Widget Gallery}}
+ \table
+ \row
+ \o \image gtk-tabwidget.png GTK Style Widget Gallery
+ \caption \l{GTK Style Widget Gallery}
- The Motif style is provided by QMotifStyle.
- \raw HTML
- </td>
- <td align="center">
- \endraw
- \image windows-tabwidget.png Windows Style Widget Gallery
-
- \bold{\l{Windows Style Widget Gallery}}
-
- The Windows style is provided by QWindowsStyle.
- \raw HTML
- </td>
- </tr>
- <tr>
- <td align="center">
- \endraw
- \image cde-tabwidget.png CDE Style Widget Gallery
+ The GTK style is provided by QGtkStyle.
+ \o \image motif-tabwidget.png Motif Style Widget Gallery
+ \caption \l{Motif Style Widget Gallery}
- \bold{\l{CDE Style Widget Gallery}}
+ The Motif style is provided by QMotifStyle.
+ \o \image cde-tabwidget.png CDE Style Widget Gallery
+ \caption \l{CDE Style Widget Gallery}
The Common Desktop Environment style is provided by QCDEStyle.
- \raw HTML
- </td>
- </tr>
- </table>
- \endraw
+ \endtable
*/
diff --git a/examples/network/bearermonitor/bearermonitor.cpp b/examples/network/bearermonitor/bearermonitor.cpp
index 75ffb01..bfa3d1f 100644
--- a/examples/network/bearermonitor/bearermonitor.cpp
+++ b/examples/network/bearermonitor/bearermonitor.cpp
@@ -226,7 +226,7 @@ void BearerMonitor::updateConfigurations()
if (defaultConfiguration.type() == QNetworkConfiguration::ServiceNetwork)
updateSnapConfiguration(defaultItem, defaultConfiguration);
- } else {
+ } else if (defaultConfiguration.isValid()) {
configurationAdded(defaultConfiguration);
}
diff --git a/examples/tools/echoplugin/echowindow/echowindow.pro b/examples/tools/echoplugin/echowindow/echowindow.pro
index bdf8c41..d56961c 100644
--- a/examples/tools/echoplugin/echowindow/echowindow.pro
+++ b/examples/tools/echoplugin/echowindow/echowindow.pro
@@ -5,8 +5,8 @@ SOURCES = echowindow.cpp \
TARGET = echoplugin
win32 {
- debug:DESTDIR = ../debug/
- release:DESTDIR = ../release/
+ CONFIG(debug, release|debug):DESTDIR = ../debug/
+ CONFIG(release, release|debug):DESTDIR = ../release/
} else {
DESTDIR = ../
}
diff --git a/examples/tools/styleplugin/plugin/plugin.pro b/examples/tools/styleplugin/plugin/plugin.pro
index 7cb0c97..54e266c 100644
--- a/examples/tools/styleplugin/plugin/plugin.pro
+++ b/examples/tools/styleplugin/plugin/plugin.pro
@@ -8,8 +8,8 @@ SOURCES = simplestyle.cpp \
TARGET = simplestyleplugin
#! [0]
win32 {
- debug:DESTDIR = ../debug/styles/
- release:DESTDIR = ../release/styles/
+ CONFIG(debug, release|debug):DESTDIR = ../debug/styles/
+ CONFIG(release, release|debug):DESTDIR = ../release/styles/
} else {
DESTDIR = ../styles/
}
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index 707335c..00cf0d7 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -70,12 +70,12 @@ QMAKE_LIBS_CORE = $$QMAKE_LIBS -lefsrv -lhal -lbafl
QMAKE_LIBS_GUI = $$QMAKE_LIBS_CORE -lfbscli -lbitgdi -lgdi -lws32 -lapgrfx -lcone -leikcore -lmediaclientaudio -lapparc -lcentralrepository
QMAKE_LIBS_NETWORK =
QMAKE_LIBS_EGL = -llibEGL
-QMAKE_LIBS_OPENGL = -llibglesv2
+QMAKE_LIBS_OPENGL = -llibGLESv2
QMAKE_LIBS_OPENGL_ES1 = -llibGLESv1_CM
-QMAKE_LIBS_OPENGL_ES2 = -llibglesv2
-QMAKE_LIBS_OPENGL_QT = -llibglesv2 -lcone -lws32
+QMAKE_LIBS_OPENGL_ES2 = -llibGLESv2
+QMAKE_LIBS_OPENGL_QT = -llibGLESv2 -lcone -lws32
QMAKE_LIBS_OPENGL_ES1_QT = -llibGLESv1_CM -lcone -lws32
-QMAKE_LIBS_OPENGL_ES2_QT = -llibglesv2 -lcone -lws32
+QMAKE_LIBS_OPENGL_ES2_QT = -llibGLESv2 -lcone -lws32
QMAKE_LIBS_OPENVG = -llibOpenVG -lfbscli -lbitgdi -lgdi
QMAKE_LIBS_THREAD = -llibpthread
QMAKE_LIBS_COMPAT =
diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf
index af56a9a..ba707e23 100644
--- a/mkspecs/linux-icc/qmake.conf
+++ b/mkspecs/linux-icc/qmake.conf
@@ -23,7 +23,7 @@ QMAKE_YACC = yacc
QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -falign-stack=maintain-16-byte
QMAKE_CFLAGS_DEPS = -M
-QMAKE_CFLAGS_WARN_ON = -w1 -Wcheck -wd654,1572,411,873,1125
+QMAKE_CFLAGS_WARN_ON = -w1 -Wcheck -wd654,1572,411,873,1125,2259
QMAKE_CFLAGS_WARN_OFF = -w
QMAKE_CFLAGS_RELEASE = -O2 -falign-functions=16 -ansi-alias -fstrict-aliasing
QMAKE_CFLAGS_DEBUG = -O0 -g
diff --git a/src/3rdparty/phonon/mmf/abstractaudioeffect.h b/src/3rdparty/phonon/mmf/abstractaudioeffect.h
index 8879636..70adcf6 100644
--- a/src/3rdparty/phonon/mmf/abstractaudioeffect.h
+++ b/src/3rdparty/phonon/mmf/abstractaudioeffect.h
@@ -21,7 +21,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <QScopedPointer>
-#include <audioeffectbase.h>
+#include <AudioEffectBase.h>
#include <phonon/effectinterface.h>
diff --git a/src/3rdparty/phonon/mmf/audioequalizer.cpp b/src/3rdparty/phonon/mmf/audioequalizer.cpp
index 28433f6..1d2bbd4 100644
--- a/src/3rdparty/phonon/mmf/audioequalizer.cpp
+++ b/src/3rdparty/phonon/mmf/audioequalizer.cpp
@@ -16,7 +16,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <audioequalizerbase.h>
+#include <AudioEqualizerBase.h>
#include "audioequalizer.h"
QT_BEGIN_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/bassboost.cpp b/src/3rdparty/phonon/mmf/bassboost.cpp
index 81d9208..67076f6 100644
--- a/src/3rdparty/phonon/mmf/bassboost.cpp
+++ b/src/3rdparty/phonon/mmf/bassboost.cpp
@@ -16,7 +16,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <bassboostbase.h>
+#include <BassBoostBase.h>
#include "bassboost.h"
QT_BEGIN_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/environmentalreverb.cpp b/src/3rdparty/phonon/mmf/environmentalreverb.cpp
index c500385..d4f5223 100644
--- a/src/3rdparty/phonon/mmf/environmentalreverb.cpp
+++ b/src/3rdparty/phonon/mmf/environmentalreverb.cpp
@@ -16,7 +16,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <environmentalreverbbase.h>
+#include <EnvironmentalReverbBase.h>
#include "environmentalreverb.h"
QT_BEGIN_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/loudness.cpp b/src/3rdparty/phonon/mmf/loudness.cpp
index 22d7518..ca05ab0 100644
--- a/src/3rdparty/phonon/mmf/loudness.cpp
+++ b/src/3rdparty/phonon/mmf/loudness.cpp
@@ -16,7 +16,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <loudnessbase.h>
+#include <LoudnessBase.h>
#include "loudness.h"
QT_BEGIN_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/stereowidening.cpp b/src/3rdparty/phonon/mmf/stereowidening.cpp
index e452160..f90651b 100644
--- a/src/3rdparty/phonon/mmf/stereowidening.cpp
+++ b/src/3rdparty/phonon/mmf/stereowidening.cpp
@@ -16,7 +16,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stereowideningbase.h>
+#include <StereoWideningBase.h>
#include "stereowidening.h"
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp
index fd4b9c1..dbb333f 100644
--- a/src/corelib/io/qdiriterator.cpp
+++ b/src/corelib/io/qdiriterator.cpp
@@ -389,9 +389,6 @@ QDirIterator::QDirIterator(const QDir &dir, IteratorFlags flags)
\note To list symlinks that point to non existing files, QDir::System must be
passed to the flags.
- \warning This constructor expects \a flags to be left at its default value. Use
- the constructors that do not take the \a filters argument instead.
-
\sa hasNext(), next(), IteratorFlags
*/
QDirIterator::QDirIterator(const QString &path, QDir::Filters filters, IteratorFlags flags)
@@ -429,9 +426,6 @@ QDirIterator::QDirIterator(const QString &path, IteratorFlags flags)
\note To list symlinks that point to non existing files, QDir::System must be
passed to the flags.
- \warning This constructor expects \c flags to be left at its default value. Use the
- constructors that do not take the \a filters argument instead.
-
\sa hasNext(), next(), IteratorFlags
*/
QDirIterator::QDirIterator(const QString &path, const QStringList &nameFilters,
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index ce9c57e..b45710c 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -187,7 +187,7 @@ Q_GLOBAL_STATIC(QStringList, resourceSearchPaths)
A QResource can either be loaded with an absolute path, either treated
as a file system rooted with a \c{/} character, or in resource notation
rooted with a \c{:} character. A relative resource can also be opened
- which will be found through the searchPaths().
+ which will be found in the list of paths returned by QDir::searchPaths().
A QResource that is representing a file will have data backing it, this
data can possibly be compressed, in which case qUncompress() must be
diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp
index bcf4477..bf675a7 100644
--- a/src/corelib/kernel/qabstracteventdispatcher.cpp
+++ b/src/corelib/kernel/qabstracteventdispatcher.cpp
@@ -77,10 +77,14 @@ Q_DESTRUCTOR_FUNCTION(timerIdsDestructorFunction)
static QBasicAtomicInt nextFreeTimerId = Q_BASIC_ATOMIC_INITIALIZER(1);
+static const int TimerIdMask = 0x00ffffff;
+static const int TimerSerialMask = ~TimerIdMask & ~0x80000000;
+static const int TimerSerialCounter = TimerIdMask + 1;
+
// avoid the ABA-problem by using 7 of the top 8 bits of the timerId as a serial number
static inline int prepareNewValueWithSerialNumber(int oldId, int newId)
{
- return (newId & 0x00FFFFFF) | ((oldId + 0x01000000) & 0x7f000000);
+ return (newId & TimerIdMask) | ((oldId + TimerSerialCounter) & TimerSerialMask);
}
static inline int bucketOffset(int timerId)
@@ -120,17 +124,32 @@ void QAbstractEventDispatcherPrivate::init()
}
}
+// Timer IDs are implemented using a free-list;
+// there's a vector initialized with:
+// X[i] = i + 1
+// and nextFreeTimerId starts with 1.
+//
+// Allocating a timer ID involves taking the ID from
+// X[nextFreeTimerId]
+// updating nextFreeTimerId to this value and returning the old value
+//
+// When the timer ID is allocated, its cell in the vector is unused (it's a
+// free list). As an added protection, we use the cell to store an invalid
+// (negative) value that we can later check for integrity.
+//
+// (continues below).
int QAbstractEventDispatcherPrivate::allocateTimerId()
{
int timerId, newTimerId;
+ int at, *b;
do {
- timerId = nextFreeTimerId;
+ timerId = nextFreeTimerId; //.loadAcquire(); // ### FIXME Proper memory ordering semantics
// which bucket are we looking in?
- int which = timerId & 0x00ffffff;
+ int which = timerId & TimerIdMask;
int bucket = bucketOffset(which);
- int at = bucketIndex(bucket, which);
- int *b = timerIds[bucket];
+ at = bucketIndex(bucket, which);
+ b = timerIds[bucket];
if (!b) {
// allocate a new bucket
@@ -142,23 +161,38 @@ int QAbstractEventDispatcherPrivate::allocateTimerId()
}
}
- newTimerId = b[at];
+ newTimerId = prepareNewValueWithSerialNumber(timerId, b[at]);
} while (!nextFreeTimerId.testAndSetRelaxed(timerId, newTimerId));
+ b[at] = -timerId;
+
return timerId;
}
+// Releasing a timer ID requires putting the current ID back in the vector;
+// we do it by setting:
+// X[timerId] = nextFreeTimerId;
+// then we update nextFreeTimerId to the timer we've just released
+//
+// The extra code in allocateTimerId and releaseTimerId are ABA prevention
+// and bucket memory. The buckets are simply to make sure we allocate only
+// the necessary number of timers. See above.
+//
+// ABA prevention simply adds a value to 7 of the top 8 bits when resetting
+// nextFreeTimerId.
void QAbstractEventDispatcherPrivate::releaseTimerId(int timerId)
{
- int which = timerId & 0x00ffffff;
+ int which = timerId & TimerIdMask;
int bucket = bucketOffset(which);
int at = bucketIndex(bucket, which);
int *b = timerIds[bucket];
+ Q_ASSERT(b[at] == -timerId);
+
int freeId, newTimerId;
do {
- freeId = nextFreeTimerId;
- b[at] = freeId & 0x00ffffff;
+ freeId = nextFreeTimerId;//.loadAcquire(); // ### FIXME Proper memory ordering semantics
+ b[at] = freeId & TimerIdMask;
newTimerId = prepareNewValueWithSerialNumber(freeId, timerId);
} while (!nextFreeTimerId.testAndSetRelease(freeId, newTimerId));
diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp
index f50994c..b2ccc68 100644
--- a/src/corelib/kernel/qeventdispatcher_unix.cpp
+++ b/src/corelib/kernel/qeventdispatcher_unix.cpp
@@ -501,6 +501,7 @@ bool QTimerInfoList::unregisterTimer(int timerId)
}
}
// id not found
+ qWarning("Application asked to unregister timer 0x%x which is not registered in this thread. Fix application.", timerId);
return false;
}
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 83d6dcd..b817eb2 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -1576,8 +1576,6 @@ QDataStream &operator>>(QDataStream &ds, QLocale &l)
defaults to the default locale (see setDefault()).
\endlist
- The "C" locale is identical in behavior to \l{English}/\l{UnitedStates}.
-
Use language() and country() to determine the actual language and
country values used.
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index 377f3b5..f1d92c5 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -700,8 +700,8 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
bool rejectY = false;
bool rejectX = false;
- bool stealY = false;
- bool stealX = false;
+ bool stealY = stealMouse;
+ bool stealX = stealMouse;
if (q->yflick()) {
int dy = int(event->pos().y() - pressPos.y());
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 75e4a0b..24d9b03 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -454,10 +454,18 @@ void QDeclarativeItemKeyFilter::componentComplete()
\qmlproperty Item KeyNavigation::down
These properties hold the item to assign focus to
- when Key_Left, Key_Right, Key_Up or Key_Down are
+ when the left, right, up or down cursor keys are
pressed.
*/
+/*!
+ \qmlproperty Item KeyNavigation::tab
+ \qmlproperty Item KeyNavigation::backtab
+
+ These properties hold the item to assign focus to
+ when the Tab key or Shift+Tab key combination (Backtab) are pressed.
+*/
+
QDeclarativeKeyNavigationAttached::QDeclarativeKeyNavigationAttached(QObject *parent)
: QObject(*(new QDeclarativeKeyNavigationAttachedPrivate), parent),
QDeclarativeItemKeyFilter(qobject_cast<QDeclarativeItem*>(parent))
@@ -911,6 +919,20 @@ void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event, bool post)
*/
/*!
+ \qmlsignal Keys::onTabPressed(KeyEvent event)
+
+ This handler is called when the Tab key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onBacktabPressed(KeyEvent event)
+
+ This handler is called when the Shift+Tab key combination (Backtab) has
+ been pressed. The \a event parameter provides information about the event.
+*/
+
+/*!
\qmlsignal Keys::onAsteriskPressed(KeyEvent event)
This handler is called when the Asterisk '*' has been pressed. The \a event
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index d008f91..2a7f508 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -265,6 +265,8 @@ public:
}
}
pos = (*(--visibleItems.constEnd()))->endPosition() + invisibleCount * (averageSize + spacing);
+ } else if (model && model->count()) {
+ pos = model->count() * averageSize + (model->count()-1) * spacing;
}
return pos;
}
@@ -1050,6 +1052,8 @@ void QDeclarativeListViewPrivate::updateCurrent(int modelIndex)
// This is slightly sub-optimal, but section heading caching minimizes the impact.
if (currentItem->section)
currentItem->section->setVisible(false);
+ if (visibleItems.isEmpty())
+ averageSize = currentItem->size();
}
updateHighlight();
emit q->currentIndexChanged();
@@ -1576,6 +1580,7 @@ void QDeclarativeListView::setModel(const QVariant &model)
d->updateTrackedItem();
}
}
+ d->updateViewport();
}
connect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
connect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
@@ -1647,6 +1652,7 @@ void QDeclarativeListView::setDelegate(QDeclarativeComponent *delegate)
d->highlight->setPosition(d->currentItem->position());
d->updateTrackedItem();
}
+ d->updateViewport();
}
}
emit delegateChanged();
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index e05f4e4..4e16d24 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -643,6 +643,8 @@ int QDeclarativeTextEdit::cursorPosition() const
void QDeclarativeTextEdit::setCursorPosition(int pos)
{
Q_D(QDeclarativeTextEdit);
+ if (pos < 0 || pos > d->text.length())
+ return;
QTextCursor cursor = d->control->textCursor();
if (cursor.position() == pos)
return;
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index df103de..521e4ab 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -437,6 +437,8 @@ int QDeclarativeTextInput::cursorPosition() const
void QDeclarativeTextInput::setCursorPosition(int cp)
{
Q_D(QDeclarativeTextInput);
+ if (cp < 0 || cp > d->control->text().length())
+ return;
d->control->moveCursor(cp);
}
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index 4fe6c4c..4f5213a 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -1367,7 +1367,7 @@ void QDeclarativeVisualDataModel::_q_rowsMoved(const QModelIndex &sourceParent,
Q_D(QDeclarativeVisualDataModel);
const int count = sourceEnd - sourceStart + 1;
if (destinationParent == d->m_root && sourceParent == d->m_root) {
- _q_itemsMoved(sourceStart, destinationRow, count);
+ _q_itemsMoved(sourceStart, sourceStart > destinationRow ? destinationRow : destinationRow-1, count);
} else if (sourceParent == d->m_root) {
_q_itemsRemoved(sourceStart, count);
} else if (destinationParent == d->m_root) {
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 201e675..cf3ea42 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -760,8 +760,10 @@ QImage QDeclarativeEnginePrivate::getImageFromProvider(const QUrl &url, QSize *s
QImage image;
QSharedPointer<QDeclarativeImageProvider> provider = imageProviders.value(url.host());
locker.unlock();
- if (provider)
- image = provider->requestImage(url.path().mid(1), size, req_size);
+ if (provider) {
+ QString imageId = url.toString(QUrl::RemoveScheme | QUrl::RemoveAuthority).mid(1);
+ image = provider->requestImage(imageId, size, req_size);
+ }
return image;
}
@@ -771,8 +773,10 @@ QPixmap QDeclarativeEnginePrivate::getPixmapFromProvider(const QUrl &url, QSize
QPixmap pixmap;
QSharedPointer<QDeclarativeImageProvider> provider = imageProviders.value(url.host());
locker.unlock();
- if (provider)
- pixmap = provider->requestPixmap(url.path().mid(1), size, req_size);
+ if (provider) {
+ QString imageId = url.toString(QUrl::RemoveScheme | QUrl::RemoveAuthority).mid(1);
+ pixmap = provider->requestPixmap(imageId, size, req_size);
+ }
return pixmap;
}
diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp
index bffe681..e54f7d6 100644
--- a/src/declarative/qml/qdeclarativeenginedebug.cpp
+++ b/src/declarative/qml/qdeclarativeenginedebug.cpp
@@ -146,7 +146,10 @@ QDeclarativeEngineDebugServer::propertyData(QObject *obj, int propIdx)
if (binding)
rv.binding = binding->expression();
- QVariant value = prop.read(obj);
+ QVariant value;
+ if (prop.userType() != 0) {
+ value = prop.read(obj);
+ }
rv.value = valueContents(value);
if (QDeclarativeValueTypeFactory::isValueType(prop.userType())) {
diff --git a/src/declarative/qml/qdeclarativeimageprovider.cpp b/src/declarative/qml/qdeclarativeimageprovider.cpp
index ef31be7..e3da645 100644
--- a/src/declarative/qml/qdeclarativeimageprovider.cpp
+++ b/src/declarative/qml/qdeclarativeimageprovider.cpp
@@ -182,13 +182,17 @@ QDeclarativeImageProvider::ImageType QDeclarativeImageProvider::imageType() cons
Implement this method to return the image with \a id. The default
implementation returns an empty image.
+ The \a id is the requested image source, with the "image:" scheme and
+ provider identifier removed. For example, if the image \l{Image::}{source}
+ was "image://myprovider/icons/home", the given \a id would be "icons/home".
+
The \a requestedSize corresponds to the \l {Image::sourceSize} requested by
an Image element. If \a requestedSize is a valid size, the image
returned should be of that size.
In all cases, \a size must be set to the original size of the image. This
- is used to set the \l {Item::}{width} and \l {Item::}{height} of image
- elements that should be automatically sized to the loaded image.
+ is used to set the \l {Item::}{width} and \l {Item::}{height} of the
+ relevant \l Image if these values have not been set explicitly.
\note this method may be called by multiple threads, so ensure the
implementation of this method is reentrant.
@@ -207,13 +211,17 @@ QImage QDeclarativeImageProvider::requestImage(const QString &id, QSize *size, c
Implement this method to return the pixmap with \a id. The default
implementation returns an empty pixmap.
+ The \a id is the requested image source, with the "image:" scheme and
+ provider identifier removed. For example, if the image \l{Image::}{source}
+ was "image://myprovider/icons/home", the given \a id would be "icons/home".
+
The \a requestedSize corresponds to the \l {Image::sourceSize} requested by
an Image element. If \a requestedSize is a valid size, the image
returned should be of that size.
In all cases, \a size must be set to the original size of the image. This
- is used to set the \l {Item::}{width} and \l {Item::}{height} of image
- elements that should be automatically sized to the loaded image.
+ is used to set the \l {Item::}{width} and \l {Item::}{height} of the
+ relevant \l Image if these values have not been set explicitly.
*/
QPixmap QDeclarativeImageProvider::requestPixmap(const QString &id, QSize *size, const QSize& requestedSize)
{
diff --git a/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp b/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp
index d22798d..36e9721 100644
--- a/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp
+++ b/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp
@@ -46,27 +46,44 @@ QT_BEGIN_NAMESPACE
/*!
\class QDeclarativeNetworkAccessManagerFactory
\since 4.7
- \brief The QDeclarativeNetworkAccessManagerFactory class provides a factory for QNetworkAccessManager for use by a Qt Declarative engine.
+ \brief The QDeclarativeNetworkAccessManagerFactory class creates QNetworkAccessManager instances for a QML engine.
- QNetworkAccessManager is used for all network access by QML.
- By implementing a factory it is possible to create custom
- QNetworkAccessManager with specialized caching, proxy and
- cookie support.
+ A QML engine uses QNetworkAccessManager for all network access.
+ By implementing a factory, it is possible to provide the QML engine
+ with custom QNetworkAccessManager instances with specialized caching,
+ proxy and cookies support.
- To implement a factory, subclass QDeclarativeNetworkAccessManagerFactory and implement
- the create() method.
+ To implement a factory, subclass QDeclarativeNetworkAccessManagerFactory and
+ implement the virtual create() method, then assign it to the relevant QML
+ engine using QDeclarativeEngine::setNetworkAccessManagerFactory().
- To use a factory, assign it to the relevant QDeclarativeEngine using
- QDeclarativeEngine::setNetworkAccessManagerFactory().
+ Note the QML engine may create QNetworkAccessManager instances
+ from multiple threads. Because of this, the implementation of the create()
+ method must be \l{Reentrancy and Thread-Safety}{reentrant}. In addition,
+ the developer should be careful if the signals of the object to be
+ returned from create() are connected to the slots of an object that may
+ be created in a different thread:
- Note: the create() method may be called by multiple threads, so ensure the
- implementation of this method is reentrant.
+ \list
+ \o The QML engine internally handles all requests, and cleans up any
+ QNetworkReply objects it creates. Receiving the
+ QNetworkAccessManager::finished() signal in another thread may not
+ provide the receiver with a valid reply object if it has already
+ been deleted.
+ \o Authentication details provided to QNetworkAccessManager::authenticationRequired()
+ must be provided immediately, so this signal cannot be connected as a
+ Qt::QueuedConnection (or as the default Qt::AutoConnection from another
+ thread).
+ \endlist
+
+ For more information about signals and threads, see
+ \l {Threads and QObjects} and \l {Signals and Slots Across Threads}.
- \sa QDeclarativeEngine::setNetworkAccessManagerFactory(), {declarative/cppextensions/networkaccessmanagerfactory}{NetworkAccessManagerFactory example}
+ \sa {declarative/cppextensions/networkaccessmanagerfactory}{NetworkAccessManagerFactory example}
*/
/*!
- The destructor is empty.
+ Destroys the factory. The default implementation does nothing.
*/
QDeclarativeNetworkAccessManagerFactory::~QDeclarativeNetworkAccessManagerFactory()
{
@@ -75,13 +92,9 @@ QDeclarativeNetworkAccessManagerFactory::~QDeclarativeNetworkAccessManagerFactor
/*!
\fn QNetworkAccessManager *QDeclarativeNetworkAccessManagerFactory::create(QObject *parent)
- Implement this method to create a QNetworkAccessManager with \a parent.
- This allows proxies, caching and cookie support to be setup appropriately.
-
- This method must return a new QNetworkAccessManager each time it is called.
- The parent of the QNetworkAccessManager must be the \a parent provided.
- The QNetworkAccessManager(s) created by this
- function will be destroyed automatically when their parent is destroyed.
+ Creates and returns a network access manager with the specified \a parent.
+ This method must return a new QNetworkAccessManager instance each time
+ it is called.
Note: this method may be called by multiple threads, so ensure the
implementation of this method is reentrant.
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index f2e6217..dd7e5fd 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -1324,7 +1324,7 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
/*!
\qmlclass RotationAnimation QDeclarativeRotationAnimation
- \ingroup qml-animation-transition
+ \ingroup qml-animation-transition
\since 4.7
\inherits PropertyAnimation
\brief The RotationAnimation element animates changes in rotation values.
@@ -1333,8 +1333,8 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
over the direction of rotation during an animation.
By default, it rotates in the direction
- of the numerical change; a rotation from 0 to 240 will rotate 220 degrees
- clockwise, while a rotation from 240 to 0 will rotate 220 degrees
+ of the numerical change; a rotation from 0 to 240 will rotate 240 degrees
+ clockwise, while a rotation from 240 to 0 will rotate 240 degrees
counterclockwise. The \l direction property can be set to specify the
direction in which the rotation should occur.
@@ -1342,7 +1342,7 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
between states via the shortest path:
\snippet doc/src/snippets/declarative/rotationanimation.qml 0
-
+
Notice the RotationAnimation did not need to set a \l target
value. As a convenience, when used in a transition, RotationAnimation will rotate all
properties named "rotation" or "angle". You can override this by providing
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp
index 0e31a20..c22f200 100644
--- a/src/declarative/util/qdeclarativeview.cpp
+++ b/src/declarative/util/qdeclarativeview.cpp
@@ -192,7 +192,7 @@ void QDeclarativeViewPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem,
/*!
\class QDeclarativeView
- \since 4.7
+ \since 4.7
\brief The QDeclarativeView class provides a widget for displaying a Qt Declarative user interface.
QDeclarativeItem objects can be placed on a standard QGraphicsScene and
@@ -360,13 +360,14 @@ QDeclarativeContext* QDeclarativeView::rootContext() const
}
/*!
- \enum QDeclarativeView::Status
+ \enum QDeclarativeView::Status
Specifies the loading status of the QDeclarativeView.
\value Null This QDeclarativeView has no source set.
\value Ready This QDeclarativeView has loaded and created the QML component.
\value Loading This QDeclarativeView is loading network data.
- \value Error An error has occurred. Call errorDescription() to retrieve a description.
+ \value Error One or more errors has occurred. Call errors() to retrieve a list
+ of errors.
*/
/*! \enum QDeclarativeView::ResizeMode
diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp
index ce5b483..49a12b1 100644
--- a/src/declarative/util/qdeclarativexmllistmodel.cpp
+++ b/src/declarative/util/qdeclarativexmllistmodel.cpp
@@ -503,9 +503,9 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla
\qmlclass XmlListModel QDeclarativeXmlListModel
\ingroup qml-working-with-data
\since 4.7
- \brief The XmlListModel element is used to specify a model using XPath expressions.
+ \brief The XmlListModel element is used to specify a read-only model using XPath expressions.
- XmlListModel is used to create a model from XML data. It can be used as a data source
+ XmlListModel is used to create a read-only model from XML data. It can be used as a data source
for view elements (such as ListView, PathView, GridView) and other elements that interact with model
data (such as \l Repeater).
diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp
index fbdc522..16ea045 100644
--- a/src/gui/dialogs/qdialog.cpp
+++ b/src/gui/dialogs/qdialog.cpp
@@ -901,15 +901,13 @@ bool QDialog::symbianAdjustedPosition()
QPoint p;
const bool doS60Positioning = !(isFullScreen()||isMaximized());
if (doS60Positioning) {
+ QPoint oldPos = pos();
// naive way to deduce screen orientation
if (S60->screenHeightInPixels > S60->screenWidthInPixels) {
int cbaHeight;
- const CEikButtonGroupContainer* bgContainer = S60->buttonGroupContainer();
- if (!bgContainer) {
- cbaHeight = 0;
- } else {
- cbaHeight = qt_TSize2QSize(bgContainer->Size()).height();
- }
+ TRect rect;
+ AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EControlPane, rect);
+ cbaHeight = rect.Height();
p.setY(S60->screenHeightInPixels - height() - cbaHeight);
p.setX(0);
} else {
@@ -939,7 +937,8 @@ bool QDialog::symbianAdjustedPosition()
p.setX(qMax(0,S60->screenWidthInPixels - width()));
}
}
- move(p);
+ if (oldPos != p || p.y() < 0)
+ move(p);
}
return doS60Positioning;
#else
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm
index 87850a7..1e13113 100644
--- a/src/gui/dialogs/qfiledialog_mac.mm
+++ b/src/gui/dialogs/qfiledialog_mac.mm
@@ -719,6 +719,14 @@ bool QFileDialogPrivate::setVisible_sys(bool visible)
if (!visible == q->isHidden())
return false;
+ if (q->windowFlags() & Qt::WindowStaysOnTopHint) {
+ // The native file dialog tries all it can to stay
+ // on the NSModalPanel level. And it might also show
+ // its own "create directory" dialog that we cannot control.
+ // So we need to use the non-native version in this case...
+ return false;
+ }
+
#ifndef QT_MAC_USE_COCOA
return visible ? showCarbonNavServicesDialog() : hideCarbonNavServicesDialog();
#else
diff --git a/src/gui/dialogs/qfiledialog_symbian.cpp b/src/gui/dialogs/qfiledialog_symbian.cpp
index 1f70305..1fc5f5e 100644
--- a/src/gui/dialogs/qfiledialog_symbian.cpp
+++ b/src/gui/dialogs/qfiledialog_symbian.cpp
@@ -64,7 +64,7 @@ public:
filterList.clear();
if (filter.left(2) == QLatin1String("*.")) {
//Filter has only extensions
- filterList << filter.split(" ");
+ filterList << filter.split(QLatin1String(" "));
return;
} else {
//Extensions are in parenthesis and there may be several filters
@@ -75,7 +75,7 @@ public:
return;
}
}
- QRegExp rx("\\(([^\\)]*)\\)");
+ QRegExp rx(QLatin1String("\\(([^\\)]*)\\)"));
int pos = 0;
while ((pos = rx.indexIn(filter, pos)) != -1) {
filterList << rx.cap(1).split(QLatin1String(" "));
@@ -119,36 +119,49 @@ static QString launchSymbianDialog(const QString dialogCaption, const QString st
{
QString selection;
#if defined(Q_WS_S60) && defined(SYMBIAN_VERSION_SYMBIAN3)
- QT_TRAP_THROWING(
- TFileName startFolder;
- if (!startDirectory.isEmpty()) {
- QString dir = QDir::toNativeSeparators(startDirectory);
+ TFileName startFolder;
+ if (!startDirectory.isEmpty()) {
+ QString dir = QDir::toNativeSeparators(QFileDialogPrivate::workingDirectory(startDirectory));
+ startFolder = qt_QString2TPtrC(dir);
+ }
+ TInt types = AknCommonDialogsDynMem::EMemoryTypeMMCExternal|
+ AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage|
+ AknCommonDialogsDynMem::EMemoryTypePhone;
+
+ TPtrC titlePtr(qt_QString2TPtrC(dialogCaption));
+ TFileName target;
+ bool select = false;
+ int tryCount = 2;
+ while (tryCount--) {
+ TInt err(KErrNone);
+ TRAP(err,
+ if (dialogMode == DialogOpen) {
+ CExtensionFilter* extensionFilter = new (ELeave) CExtensionFilter;
+ CleanupStack::PushL(extensionFilter);
+ extensionFilter->setFilter(filter);
+ select = AknCommonDialogsDynMem::RunSelectDlgLD(types, target,
+ startFolder, NULL, NULL, titlePtr, extensionFilter);
+ CleanupStack::Pop(extensionFilter);
+ } else if (dialogMode == DialogSave) {
+ select = AknCommonDialogsDynMem::RunSaveDlgLD(types, target,
+ startFolder, NULL, NULL, titlePtr);
+ } else if (dialogMode == DialogFolder) {
+ select = AknCommonDialogsDynMem::RunFolderSelectDlgLD(types, target, startFolder,
+ 0, 0, titlePtr, NULL, NULL);
+ }
+ );
+
+ if (err == KErrNone) {
+ tryCount = 0;
+ } else {
+ // Symbian native file dialog doesn't allow accessing files outside C:/Data
+ // It will always leave in that case, so default into QDir::rootPath() in error cases.
+ QString dir = QDir::toNativeSeparators(QDir::rootPath());
startFolder = qt_QString2TPtrC(dir);
}
- TInt types = AknCommonDialogsDynMem::EMemoryTypeMMCExternal|
- AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage|
- AknCommonDialogsDynMem::EMemoryTypePhone;
-
- TPtrC titlePtr(qt_QString2TPtrC(dialogCaption));
- TFileName target;
- bool select = false;
- if (dialogMode == DialogOpen) {
- CExtensionFilter* extensionFilter = new (ELeave) CExtensionFilter;
- CleanupStack::PushL(extensionFilter);
- extensionFilter->setFilter(filter);
- select = AknCommonDialogsDynMem::RunSelectDlgLD(types, target,
- startFolder, NULL, NULL, titlePtr, extensionFilter);
- CleanupStack::Pop(extensionFilter);
- } else if (dialogMode == DialogSave) {
- select = AknCommonDialogsDynMem::RunSaveDlgLD(types, target,
- startFolder, NULL, NULL, titlePtr);
- } else if (dialogMode == DialogFolder) {
- select = AknCommonDialogsDynMem::RunFolderSelectDlgLD(types, target, startFolder,
- 0, 0, titlePtr, NULL, NULL);
- }
- if (select)
- selection.append(qt_TDesC2QString(target));
- );
+ }
+ if (select)
+ selection.append(qt_TDesC2QString(target));
#endif
return selection;
}
diff --git a/src/gui/dialogs/qinputdialog.cpp b/src/gui/dialogs/qinputdialog.cpp
index ce27bd3..a29376a 100644
--- a/src/gui/dialogs/qinputdialog.cpp
+++ b/src/gui/dialogs/qinputdialog.cpp
@@ -234,6 +234,8 @@ void QInputDialogPrivate::ensureLayout()
//we want to let the input dialog grow to available size on Symbian.
#ifndef Q_OS_SYMBIAN
mainLayout->setSizeConstraint(QLayout::SetMinAndMaxSize);
+#else
+ label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
#endif
mainLayout->addWidget(label);
mainLayout->addWidget(inputWidget);
diff --git a/src/gui/graphicsview/qgraphicslayoutitem.cpp b/src/gui/graphicsview/qgraphicslayoutitem.cpp
index df13039..0a24aae 100644
--- a/src/gui/graphicsview/qgraphicslayoutitem.cpp
+++ b/src/gui/graphicsview/qgraphicslayoutitem.cpp
@@ -129,7 +129,6 @@ void QGraphicsLayoutItemPrivate::init()
{
sizeHintCacheDirty = true;
sizeHintWithConstraintCacheDirty = true;
- sizePolicy = QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
}
/*!
@@ -400,6 +399,7 @@ QGraphicsLayoutItem::QGraphicsLayoutItem(QGraphicsLayoutItem *parent, bool isLay
{
Q_D(QGraphicsLayoutItem);
d->init();
+ d->sizePolicy = QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
d->q_ptr = this;
}
@@ -410,6 +410,7 @@ QGraphicsLayoutItem::QGraphicsLayoutItem(QGraphicsLayoutItemPrivate &dd)
: d_ptr(&dd)
{
Q_D(QGraphicsLayoutItem);
+ d->init();
d->q_ptr = this;
}
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index a566c8e..2acea8a 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -2494,7 +2494,7 @@ QVariant QGraphicsView::inputMethodQuery(Qt::InputMethodQuery query) const
QVariant value = d->scene->inputMethodQuery(query);
if (value.type() == QVariant::RectF)
- value = mapFromScene(value.toRectF()).boundingRect();
+ value = d->mapRectFromScene(value.toRectF());
else if (value.type() == QVariant::PointF)
value = mapFromScene(value.toPointF());
else if (value.type() == QVariant::Rect)
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 4a1b9b9..d48d63d 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -89,7 +89,7 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent)
m_fepState->SetFlags(EAknEditorFlagDefault);
m_fepState->SetDefaultInputMode( EAknEditorTextInputMode );
m_fepState->SetPermittedInputModes( EAknEditorAllInputModes );
- m_fepState->SetDefaultCase( EAknEditorLowerCase );
+ m_fepState->SetDefaultCase( EAknEditorTextCase );
m_fepState->SetPermittedCases( EAknEditorAllCaseModes );
m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG);
m_fepState->SetNumericKeymap( EAknEditorStandardNumberModeKeymap );
@@ -657,6 +657,8 @@ void QCoeFepInputContext::UpdateFepInlineTextL(const TDesC& aNewInlineText,
if (!w)
return;
+ commitTemporaryPreeditString();
+
m_inlinePosition = aPositionOfInsertionPointInInlineText;
QList<QInputMethodEvent::Attribute> attributes;
@@ -694,6 +696,12 @@ void QCoeFepInputContext::SetInlineEditingCursorVisibilityL(TBool aCursorVisibil
void QCoeFepInputContext::CancelFepInlineEdit()
{
+ // We are not supposed to ever have a tempPreeditString and a real preedit string
+ // from S60 at the same time, so it should be safe to rely on this test to determine
+ // whether we should honor S60's request to clear the text or not.
+ if (m_hasTempPreeditString)
+ return;
+
QList<QInputMethodEvent::Attribute> attributes;
QInputMethodEvent event(QLatin1String(""), attributes);
event.setCommitString(QLatin1String(""), 0, 0);
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index acc8deb..177b088 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -595,6 +595,8 @@ QAbstractItemView::QAbstractItemView(QAbstractItemViewPrivate &dd, QWidget *pare
*/
QAbstractItemView::~QAbstractItemView()
{
+ // stop this timer here before ~QObject
+ d_func()->delayedReset.stop();
}
/*!
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index a4ae46b..b4ff7c4 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -1101,6 +1101,9 @@ QApplication::~QApplication()
QApplicationPrivate::is_app_closing = true;
QApplicationPrivate::is_app_running = false;
+ delete QWidgetPrivate::mapper;
+ QWidgetPrivate::mapper = 0;
+
// delete all widgets
if (QWidgetPrivate::allWidgets) {
QWidgetSet *mySet = QWidgetPrivate::allWidgets;
@@ -1130,9 +1133,6 @@ QApplication::~QApplication()
delete d->ignore_cursor; d->ignore_cursor = 0;
#endif
- delete QWidgetPrivate::mapper;
- QWidgetPrivate::mapper = 0;
-
delete QApplicationPrivate::app_pal;
QApplicationPrivate::app_pal = 0;
delete QApplicationPrivate::sys_pal;
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 8596563..181fcc7 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -667,9 +667,6 @@ void QSymbianControl::HandleStatusPaneSizeChange()
{
QS60MainAppUi *s60AppUi = static_cast<QS60MainAppUi *>(S60->appUi());
s60AppUi->HandleStatusPaneSizeChange();
- // Send resize event to trigger desktopwidget workAreaResized signal
- QResizeEvent e(qt_desktopWidget->size(), qt_desktopWidget->size());
- QApplication::sendEvent(qt_desktopWidget, &e);
}
#endif
@@ -1177,8 +1174,10 @@ void QSymbianControl::SizeChanged()
if (!slowResize && tlwExtra)
tlwExtra->inTopLevelResize = false;
} else {
- QResizeEvent *e = new QResizeEvent(newSize, oldSize);
- QApplication::postEvent(qwidget, e);
+ if (!qwidget->testAttribute(Qt::WA_PendingResizeEvent)) {
+ QResizeEvent *e = new QResizeEvent(newSize, oldSize);
+ QApplication::postEvent(qwidget, e);
+ }
}
}
@@ -1310,6 +1309,9 @@ void QSymbianControl::HandleResourceChange(int resourceType)
case KEikDynamicLayoutVariantSwitch:
{
handleClientAreaChange();
+ // Send resize event to trigger desktopwidget workAreaResized signal
+ QResizeEvent e(qt_desktopWidget->size(), qt_desktopWidget->size());
+ QApplication::sendEvent(qt_desktopWidget, &e);
break;
}
#endif
@@ -1633,6 +1635,13 @@ void qt_cleanup()
//Change mouse pointer back
S60->wsSession().SetPointerCursorMode(EPointerCursorNone);
+#ifdef Q_WS_S60
+ // Clear CBA
+ CEikonEnv::Static()->AppUiFactory()->SwapButtonGroup(0);
+ delete S60->buttonGroupContainer();
+ S60->setButtonGroupContainer(0);
+#endif
+
if (S60->qtOwnsS60Environment) {
// Restore the S60 framework trap handler. See qt_init().
User::SetTrapHandler(S60->s60InstalledTrapHandler);
diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
index ddf1a27..1e2e71b 100644
--- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
+++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
@@ -182,7 +182,7 @@ QT_END_NAMESPACE
bool handled = false;
// sometimes need to redirect mouse events to the popup.
QWidget *popup = qAppInstance()->activePopupWidget();
- if (popup) {
+ if (popup && popup != widget) {
switch([event type])
{
case NSLeftMouseDown:
diff --git a/src/gui/kernel/qeventdispatcher_mac.mm b/src/gui/kernel/qeventdispatcher_mac.mm
index 515c6d3..dc926e0 100644
--- a/src/gui/kernel/qeventdispatcher_mac.mm
+++ b/src/gui/kernel/qeventdispatcher_mac.mm
@@ -844,7 +844,7 @@ static void setChildrenWorksWhenModal(QWidget *widget, bool worksWhenModal)
NSWindow *window = qt_mac_window_for(dialogs[i]);
if (window && [window isKindOfClass:[NSPanel class]]) {
[static_cast<NSPanel *>(window) setWorksWhenModal:worksWhenModal];
- if (worksWhenModal && dialogs[i]->isVisible()){
+ if (worksWhenModal && [window isVisible]){
[window orderFront:window];
}
}
@@ -856,6 +856,7 @@ void QEventDispatcherMacPrivate::updateChildrenWorksWhenModal()
// Make the dialog children of the widget
// active. And make the dialog children of
// the previous modal dialog unactive again:
+ QMacCocoaAutoReleasePool pool;
int size = cocoaModalSessionStack.size();
if (size > 0){
if (QWidget *prevModal = cocoaModalSessionStack[size-1].widget)
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 997419b..b89cb88 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -2822,23 +2822,31 @@ void QWidgetPrivate::setSubWindowStacking(bool set)
if (NSWindow *pwin = [qt_mac_nativeview_for(parent) window]) {
if (set) {
Qt::WindowType ptype = parent->window()->windowType();
- if ([pwin isVisible] && (ptype == Qt::Window || ptype == Qt::Dialog) && ![qwin parentWindow])
+ if ([pwin isVisible] && (ptype == Qt::Window || ptype == Qt::Dialog) && ![qwin parentWindow]) {
+ NSInteger level = [qwin level];
[pwin addChildWindow:qwin ordered:NSWindowAbove];
+ if ([qwin level] < level)
+ [qwin setLevel:level];
+ }
} else {
[pwin removeChildWindow:qwin];
}
}
}
- QList<QWidget *> widgets = q->findChildren<QWidget *>();
+ QObjectList widgets = q->children();
for (int i=0; i<widgets.size(); ++i) {
- QWidget *child = widgets.at(i);
+ QWidget *child = qobject_cast<QWidget *>(widgets.at(i));
if (child && child->isWindow()) {
if (NSWindow *cwin = [qt_mac_nativeview_for(child) window]) {
if (set) {
Qt::WindowType ctype = child->window()->windowType();
- if ([cwin isVisible] && (ctype == Qt::Window || ctype == Qt::Dialog) && ![cwin parentWindow])
+ if ([cwin isVisible] && (ctype == Qt::Window || ctype == Qt::Dialog) && ![cwin parentWindow]) {
+ NSInteger level = [cwin level];
[qwin addChildWindow:cwin ordered:NSWindowAbove];
+ if ([cwin level] < level)
+ [cwin setLevel:level];
+ }
} else {
[qwin removeChildWindow:qt_mac_window_for(child)];
}
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 609307c..d6ad3c3 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -504,7 +504,7 @@ void QWidgetPrivate::show_sys()
CEikButtonGroupContainer *cba = CEikButtonGroupContainer::NewL(CEikButtonGroupContainer::ECba,
CEikButtonGroupContainer::EHorizontal,ui,R_AVKON_SOFTKEYS_EMPTY_WITH_IDS);
- CEikButtonGroupContainer *oldCba = CEikonEnv::Static()->AppUiFactory()->SwapButtonGroup(cba);
+ CEikButtonGroupContainer *oldCba = factory->SwapButtonGroup(cba);
Q_ASSERT(!oldCba);
S60->setButtonGroupContainer(cba);
@@ -513,7 +513,7 @@ void QWidgetPrivate::show_sys()
menuBar->SetMenuType(CEikMenuBar::EMenuOptions);
S60->appUi()->AddToStackL(menuBar,ECoeStackPriorityMenu,ECoeStackFlagRefusesFocus);
- CEikMenuBar *oldMenu = CEikonEnv::Static()->AppUiFactory()->SwapMenuBar(menuBar);
+ CEikMenuBar *oldMenu = factory->SwapMenuBar(menuBar);
Q_ASSERT(!oldMenu);
)
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 024a69d..62af212 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -7711,17 +7711,6 @@ void qInitDrawhelperAsm()
}
#endif
#endif // SSE
-#if defined(QT_HAVE_MMXEXT) && defined(QT_HAVE_SSE)
- } else if (features & MMXEXT) {
- qt_memfill32 = qt_memfill32_sse;
- qDrawHelper[QImage::Format_RGB16].bitmapBlit = qt_bitmapblit16_sse;
-# ifdef QT_HAVE_3DNOW
- if (features & MMX3DNOW) {
- qt_memfill32 = qt_memfill32_sse3dnow;
- qDrawHelper[QImage::Format_RGB16].bitmapBlit = qt_bitmapblit16_sse3dnow;
- }
-# endif // 3DNOW
-#endif // MMXEXT
}
#ifdef QT_HAVE_MMX
if (features & MMX) {
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index 0cc2e40..33fd21e 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -1684,9 +1684,7 @@ QT_TRIVIAL_MEMCONVERT_IMPL(qrgb888)
QT_TRIVIAL_MEMCONVERT_IMPL(qargb6666)
QT_TRIVIAL_MEMCONVERT_IMPL(qrgb666)
QT_TRIVIAL_MEMCONVERT_IMPL(quint16)
-#ifdef Q_WS_QWS
QT_TRIVIAL_MEMCONVERT_IMPL(qrgb565)
-#endif
QT_TRIVIAL_MEMCONVERT_IMPL(qargb8565)
QT_TRIVIAL_MEMCONVERT_IMPL(qargb8555)
QT_TRIVIAL_MEMCONVERT_IMPL(qrgb555)
@@ -1783,9 +1781,7 @@ QT_RECTCONVERT_TRIVIAL_IMPL(quint32)
QT_RECTCONVERT_TRIVIAL_IMPL(qrgb888)
QT_RECTCONVERT_TRIVIAL_IMPL(qargb6666)
QT_RECTCONVERT_TRIVIAL_IMPL(qrgb666)
-#ifdef Q_WS_QWS
QT_RECTCONVERT_TRIVIAL_IMPL(qrgb565)
-#endif
QT_RECTCONVERT_TRIVIAL_IMPL(qargb8565)
QT_RECTCONVERT_TRIVIAL_IMPL(quint16)
QT_RECTCONVERT_TRIVIAL_IMPL(qargb8555)
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 89202ac..4d06c9f 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -1212,7 +1212,7 @@ void QRasterPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op)
// There are some cases that are not supported by clip(QRect)
if (op != Qt::UniteClip && (op != Qt::IntersectClip || !s->clip
|| s->clip->hasRectClip || s->clip->hasRegionClip)) {
- if (s->matrix.type() <= QTransform::TxTranslate
+ if (s->matrix.type() <= QTransform::TxScale
&& ((path.shape() == QVectorPath::RectangleHint)
|| (isRect(points, path.elementCount())
&& (!types || (types[0] == QPainterPath::MoveToElement
@@ -1224,8 +1224,8 @@ void QRasterPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op)
#endif
QRectF r(points[0], points[1], points[4]-points[0], points[5]-points[1]);
- clip(r.toRect(), op);
- return;
+ if (setClipRectInDeviceCoords(s->matrix.mapRect(r).toRect(), op))
+ return;
}
}
@@ -1286,7 +1286,6 @@ void QRasterPaintEngine::clip(const QRect &rect, Qt::ClipOperation op)
qDebug() << "QRasterPaintEngine::clip(): " << rect << op;
#endif
- Q_D(QRasterPaintEngine);
QRasterPaintEngineState *s = state();
if (op == Qt::NoClip) {
@@ -1296,11 +1295,23 @@ void QRasterPaintEngine::clip(const QRect &rect, Qt::ClipOperation op)
QPaintEngineEx::clip(rect, op);
return;
- } else if (op == Qt::ReplaceClip || s->clip == 0) {
+ } else if (!setClipRectInDeviceCoords(s->matrix.mapRect(rect), op)) {
+ QPaintEngineEx::clip(rect, op);
+ return;
+ }
+}
+
+
+bool QRasterPaintEngine::setClipRectInDeviceCoords(const QRect &r, Qt::ClipOperation op)
+{
+ Q_D(QRasterPaintEngine);
+ QRect clipRect = r & d->deviceRect;
+ QRasterPaintEngineState *s = state();
+
+ if (op == Qt::ReplaceClip || s->clip == 0) {
// No current clip, hence we intersect with sysclip and be
// done with it...
- QRect clipRect = s->matrix.mapRect(rect) & d->deviceRect;
QRegion clipRegion = systemClip();
QClipData *clip = new QClipData(d->rasterBuffer->height());
@@ -1316,12 +1327,11 @@ void QRasterPaintEngine::clip(const QRect &rect, Qt::ClipOperation op)
s->clip->enabled = true;
s->flags.has_clip_ownership = true;
- } else { // intersect clip with current clip
+ } else if (op == Qt::IntersectClip){ // intersect clip with current clip
QClipData *base = s->clip;
Q_ASSERT(base);
if (base->hasRectClip || base->hasRegionClip) {
- QRect clipRect = s->matrix.mapRect(rect) & d->deviceRect;
if (!s->flags.has_clip_ownership) {
s->clip = new QClipData(d->rasterBuffer->height());
s->flags.has_clip_ownership = true;
@@ -1332,11 +1342,14 @@ void QRasterPaintEngine::clip(const QRect &rect, Qt::ClipOperation op)
s->clip->setClipRegion(base->clipRegion & clipRect);
s->clip->enabled = true;
} else {
- QPaintEngineEx::clip(rect, op);
- return;
+ return false;
}
+ } else {
+ return false;
}
+
qrasterpaintengine_dirty_clip(d, s);
+ return true;
}
diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h
index 1016f8d..7d4d3b6 100644
--- a/src/gui/painting/qpaintengine_raster_p.h
+++ b/src/gui/painting/qpaintengine_raster_p.h
@@ -266,6 +266,8 @@ private:
void drawGlyphsS60(const QPointF &p, const QTextItemInt &ti);
#endif // Q_OS_SYMBIAN && QT_NO_FREETYPE
+ bool setClipRectInDeviceCoords(const QRect &r, Qt::ClipOperation op);
+
inline void ensureBrush(const QBrush &brush) {
if (!qbrush_fast_equals(state()->lastBrush, brush) || (brush.style() != Qt::NoBrush && state()->fillFlags))
updateBrush(brush);
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 2f09529..56d2d19 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -104,11 +104,11 @@ const int QS60StylePrivate::m_numberOfLayouts =
const short QS60StylePrivate::data[][MAX_PIXELMETRICS] = {
// *** generated pixel metrics ***
-{5,0,-909,0,0,2,0,0,-1,7,12,22,15,15,7,198,-909,-909,-909,20,13,2,0,0,21,7,18,30,3,3,1,-909,-909,0,1,0,0,12,20,15,15,18,18,1,115,18,0,-909,-909,-909,-909,0,0,16,2,-909,0,0,-909,16,-909,-909,-909,-909,32,18,55,24,55,4,4,4,9,13,-909,5,51,11,5,0,3,3,6,8,3,3,-909,2,-909,-909,-909,-909,5,5,3,1,106},
-{5,0,-909,0,0,1,0,0,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,28,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,3,3,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1,106},
-{7,0,-909,0,0,2,0,0,-1,25,69,46,37,37,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,44,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,3,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135},
-{7,0,-909,0,0,2,0,0,-1,25,68,46,37,37,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,52,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,3,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135},
-{7,0,-909,0,0,2,0,0,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,30,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1,106}
+{5,0,-909,0,0,2,0,2,-1,7,12,22,15,15,7,198,-909,-909,-909,20,13,2,0,0,21,7,18,30,3,3,1,-909,-909,0,1,0,0,12,20,15,15,18,18,1,115,18,0,-909,-909,-909,-909,0,0,16,2,-909,0,0,-909,16,-909,-909,-909,-909,32,18,55,24,55,4,4,4,9,13,-909,5,51,11,5,0,3,3,6,8,3,3,-909,2,-909,-909,-909,-909,5,5,3,1,106},
+{5,0,-909,0,0,1,0,2,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,28,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,3,3,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1,106},
+{7,0,-909,0,0,2,0,5,-1,25,69,46,37,37,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,44,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,3,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135},
+{7,0,-909,0,0,2,0,5,-1,25,68,46,37,37,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,52,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,3,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135},
+{7,0,-909,0,0,2,0,2,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,30,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1,106}
// *** End of generated data ***
};
@@ -1071,11 +1071,11 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom
// Button frame
QStyleOptionFrame buttonOption;
buttonOption.QStyleOption::operator=(*cmb);
- const int maxHeight = cmbxFrame.height();
- const int maxWidth = cmbxFrame.width() - cmbxEditField.width();
+ const int maxButtonSide = cmbxFrame.width() - cmbxEditField.width();
+ const int newTop = cmbxEditField.center().y() - maxButtonSide / 2;
const int topLeftPoint = direction ?
- (cmbxEditField.right() + 1) : (cmbxEditField.left() + 1 - maxWidth);
- const QRect buttonRect(topLeftPoint, cmbxEditField.top(), maxWidth, maxHeight);
+ (cmbxEditField.right() + 1) : (cmbxEditField.left() + 1 - maxButtonSide);
+ const QRect buttonRect(topLeftPoint, newTop, maxButtonSide, maxButtonSide);
buttonOption.rect = buttonRect;
buttonOption.state = cmb->state;
drawPrimitive(PE_PanelButtonCommand, &buttonOption, painter, widget);
@@ -2884,30 +2884,24 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple
ret = cmb->rect;
const int width = cmb->rect.width();
const int height = cmb->rect.height();
- const int buttonIconSize = QS60StylePrivate::pixelMetric(PM_ButtonIconSize);
const int buttonMargin = cmb->frame ? 2 : 0;
// lets use spinbox frame here as well, as no combobox specific value available.
const int frameThickness = cmb->frame ? pixelMetric(PM_SpinBoxFrameWidth, cmb, widget) : 0;
- const int buttonWidth = qMax(cmb->rect.height(), buttonIconSize);
-
+ const int buttonMinSize = QS60StylePrivate::pixelMetric(PM_ButtonIconSize) + 2 * buttonMargin;
QSize buttonSize;
- buttonSize.setWidth(buttonWidth + 2 * buttonMargin);
- buttonSize.setHeight(qMax(8, (cmb->rect.height() >> 1) - frameThickness)); //buttons should be squares
+ //allow button to grow to one fourth of the frame height, if the frame is really tall
+ buttonSize.setHeight(qMin(height, qMax(width / 4, buttonMinSize)));
+ buttonSize.setWidth(buttonSize.height());
buttonSize = buttonSize.expandedTo(QApplication::globalStrut());
switch (scontrol) {
case SC_ComboBoxArrow: {
- const int xposMod = cmb->rect.x() + width - buttonMargin - buttonWidth;
+ const int xposMod = cmb->rect.x() + width - buttonMargin - buttonSize.width();
const int ypos = cmb->rect.y();
- ret.setRect(xposMod, ypos + buttonMargin, buttonWidth, height - 2 * buttonMargin);
+ ret.setRect(xposMod, ypos + buttonMargin, buttonSize.width(), height - 2 * buttonMargin);
}
break;
case SC_ComboBoxEditField: {
- const int withFrameX = cmb->rect.x() + width - frameThickness - buttonSize.width();
- ret = QRect(
- frameThickness,
- frameThickness,
- withFrameX - frameThickness,
- height - 2 * frameThickness);
+ ret = QRect(0, 0, cmb->rect.x() + width - buttonSize.width(), height);
}
break;
case SC_ComboBoxListBoxPopup: {
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index 7859bdc..5a4e507 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -398,7 +398,7 @@ void QComboBoxPrivateContainer::leaveEvent(QEvent *)
#ifdef Q_WS_MAC
QStyleOptionComboBox opt = comboStyleOption();
if (combo->style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, combo))
- view->clearSelection();
+ view->setCurrentIndex(QModelIndex());
#endif
}
diff --git a/src/gui/widgets/qdockwidget.cpp b/src/gui/widgets/qdockwidget.cpp
index df9b171..0a6269d 100644
--- a/src/gui/widgets/qdockwidget.cpp
+++ b/src/gui/widgets/qdockwidget.cpp
@@ -1531,8 +1531,11 @@ QAction * QDockWidget::toggleViewAction() const
/*!
\since 4.3
+
Sets an arbitrary \a widget as the dock widget's title bar. If \a widget
- is 0, the title bar widget is removed, but not deleted.
+ is 0, any custom title bar widget previously set on the dock widget is
+ removed, but not deleted, and the default title bar will be used
+ instead.
If a title bar widget is set, QDockWidget will not use native window
decorations when it is floated.
@@ -1540,23 +1543,27 @@ QAction * QDockWidget::toggleViewAction() const
Here are some tips for implementing custom title bars:
\list
- \i Mouse events that are not explicitly handled by the title bar widget
+ \o Mouse events that are not explicitly handled by the title bar widget
must be ignored by calling QMouseEvent::ignore(). These events then
propagate to the QDockWidget parent, which handles them in the usual
manner, moving when the title bar is dragged, docking and undocking
when it is double-clicked, etc.
- \i When DockWidgetVerticalTitleBar is set on QDockWidget, the title
+ \o When DockWidgetVerticalTitleBar is set on QDockWidget, the title
bar widget is repositioned accordingly. In resizeEvent(), the title
bar should check what orientation it should assume:
\snippet doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp 0
- \i The title bar widget must have a valid QWidget::sizeHint() and
+ \o The title bar widget must have a valid QWidget::sizeHint() and
QWidget::minimumSizeHint(). These functions should take into account
the current orientation of the title bar.
+
+ \o It is not possible to remove a title bar from a dock widget. However,
+ a similar effect can be achieved by setting a default constructed
+ QWidget as the title bar widget.
\endlist
- Using qobject_cast as shown above, the title bar widget has full access
+ Using qobject_cast() as shown above, the title bar widget has full access
to its parent QDockWidget. Hence it can perform such operations as docking
and hiding in response to user actions.
diff --git a/src/gui/widgets/qstatusbar.cpp b/src/gui/widgets/qstatusbar.cpp
index c88d2a1..c60913e 100644
--- a/src/gui/widgets/qstatusbar.cpp
+++ b/src/gui/widgets/qstatusbar.cpp
@@ -575,7 +575,7 @@ void QStatusBar::reformat()
d->savedStrut = maxH;
vbox->addSpacing(2);
d->box->activate();
- repaint();
+ update();
}
/*!
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index c8caad4..c4471eb 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -66,6 +66,7 @@ QHttpNetworkConnectionChannel::QHttpNetworkConnectionChannel()
, bytesTotal(0)
, resendCurrent(false)
, lastStatus(0)
+ , unhandledError(QNetworkReply::NoError)
, pendingEncrypt(false)
, reconnectAttempts(2)
, authMethod(QAuthenticatorPrivate::None)
@@ -642,7 +643,23 @@ void QHttpNetworkConnectionChannel::allDone()
// slot connected to it. The socket will not fire readyRead signal, if we are already
// in the slot connected to readyRead
if (emitFinished)
- QMetaObject::invokeMethod(reply, "finished", Qt::QueuedConnection);
+ {
+ // Check whether _q_error was invoked previously and if it left a socket
+ // error unhandled AND that there are no http errors.
+ // In case there are both socket errors and http errors, the socket error is suppressed.
+ // Http errors are handled in the QNetworkAccessHttpBackend.
+ if(unhandledError != QNetworkReply::NoError && reply->statusCode() == 200) {
+ QString errorString = connection->d_func()->errorDetail(unhandledError, socket, socket->errorString());
+ qRegisterMetaType<QNetworkReply::NetworkError>("QNetworkReply::NetworkError");
+ QMetaObject::invokeMethod(reply, "finishedWithError",
+ Qt::QueuedConnection,
+ Q_ARG(QNetworkReply::NetworkError, unhandledError),
+ Q_ARG(QString, errorString));
+ } else {
+ QMetaObject::invokeMethod(reply, "finished", Qt::QueuedConnection);
+ }
+ unhandledError = QNetworkReply::NoError; // Reset the value
+ }
// reset the reconnection attempts after we receive a complete reply.
// in case of failures, each channel will attempt two reconnects before emitting error.
reconnectAttempts = 2;
@@ -964,6 +981,7 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket
errorCode = QNetworkReply::RemoteHostClosedError;
}
} else {
+ unhandledError = QNetworkReply::RemoteHostClosedError;
return;
}
break;
diff --git a/src/network/access/qhttpnetworkconnectionchannel_p.h b/src/network/access/qhttpnetworkconnectionchannel_p.h
index fd18042..e1d42fb 100644
--- a/src/network/access/qhttpnetworkconnectionchannel_p.h
+++ b/src/network/access/qhttpnetworkconnectionchannel_p.h
@@ -105,6 +105,7 @@ public:
qint64 bytesTotal;
bool resendCurrent;
int lastStatus; // last status received on this channel
+ QNetworkReply::NetworkError unhandledError; // Stored code of an unhandled error.
bool pendingEncrypt; // for https (send after encrypted)
int reconnectAttempts; // maximum 2 reconnection attempts
QAuthenticatorPrivate::Method authMethod;
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index cf6e674..3d1df06 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -271,8 +271,8 @@ void QNetworkReplyImplPrivate::_q_networkSessionConnected()
void QNetworkReplyImplPrivate::_q_networkSessionFailed()
{
- // Abort waiting replies.
- if (state == WaitingForSession) {
+ // Abort waiting and working replies.
+ if (state == WaitingForSession || state == Working) {
state = Working;
error(QNetworkReplyImpl::UnknownNetworkError,
QCoreApplication::translate("QNetworkReply", "Network session error."));
diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp
index 226c3c5..db1a37c 100644
--- a/src/network/bearer/qnetworksession.cpp
+++ b/src/network/bearer/qnetworksession.cpp
@@ -310,8 +310,9 @@ bool QNetworkSession::waitForOpened(int msecs)
if (d->isOpen)
return true;
- if (d->state != Connecting)
+ if (!(d->state == Connecting || d->state == Connected)) {
return false;
+ }
QEventLoop* loop = new QEventLoop(this);
QObject::connect(d, SIGNAL(quitPendingWaitsForOpened()),
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp
index f6bfbac..021acd0 100644
--- a/src/network/socket/qnativesocketengine_unix.cpp
+++ b/src/network/socket/qnativesocketengine_unix.cpp
@@ -202,9 +202,6 @@ bool QNativeSocketEnginePrivate::createNewSocket(QAbstractSocket::SocketType soc
return false;
}
- // Ensure that the socket is closed on exec*().
- ::fcntl(socket, F_SETFD, FD_CLOEXEC);
-
socketDescriptor = socket;
return true;
}
@@ -565,16 +562,6 @@ int QNativeSocketEnginePrivate::nativeAccept()
#else
int acceptedDescriptor = qt_safe_accept(socketDescriptor, 0, 0);
#endif
- //check if we have valid descriptor at all
- if(acceptedDescriptor > 0) {
- // Ensure that the socket is closed on exec*()
- ::fcntl(acceptedDescriptor, F_SETFD, FD_CLOEXEC);
- }
-#ifdef Q_OS_SYMBIAN
- else {
- qWarning("QNativeSocketEnginePrivate::nativeAccept() - acceptedDescriptor <= 0");
- }
-#endif
return acceptedDescriptor;
}
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 4a64f39..668a3f0 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -163,6 +163,8 @@ void QGL2PaintEngineExPrivate::setBrush(const QBrush& brush)
Q_ASSERT(newStyle != Qt::NoBrush);
currentBrush = brush;
+ if (!currentBrushPixmap.isNull())
+ currentBrushPixmap = QPixmap();
brushUniformsDirty = true; // All brushes have at least one uniform
if (newStyle > Qt::SolidPattern)
@@ -221,10 +223,14 @@ void QGL2PaintEngineExPrivate::updateBrushTexture()
updateTextureFilter(GL_TEXTURE_2D, GL_CLAMP_TO_EDGE, q->state()->renderHints & QPainter::SmoothPixmapTransform);
}
else if (style == Qt::TexturePattern) {
- const QPixmap& texPixmap = currentBrush.texture();
+ currentBrushPixmap = currentBrush.texture();
+
+ int max_texture_size = ctx->d_func()->maxTextureSize();
+ if (currentBrushPixmap.width() > max_texture_size || currentBrushPixmap.height() > max_texture_size)
+ currentBrushPixmap = currentBrushPixmap.scaled(max_texture_size, max_texture_size, Qt::KeepAspectRatio);
glActiveTexture(GL_TEXTURE0 + QT_BRUSH_TEXTURE_UNIT);
- QGLTexture *tex = ctx->d_func()->bindTexture(texPixmap, GL_TEXTURE_2D, GL_RGBA,
+ QGLTexture *tex = ctx->d_func()->bindTexture(currentBrushPixmap, GL_TEXTURE_2D, GL_RGBA,
QGLContext::InternalBindOption |
QGLContext::CanFlipNativePixmapBindOption);
updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, q->state()->renderHints & QPainter::SmoothPixmapTransform);
@@ -1305,13 +1311,30 @@ void QGL2PaintEngineEx::transformChanged()
}
+static const QRectF scaleRect(const QRectF &r, qreal sx, qreal sy)
+{
+ return QRectF(r.x() * sx, r.y() * sy, r.width() * sx, r.height() * sy);
+}
+
void QGL2PaintEngineEx::drawPixmap(const QRectF& dest, const QPixmap & pixmap, const QRectF & src)
{
Q_D(QGL2PaintEngineEx);
+ QGLContext *ctx = d->ctx;
+
+ int max_texture_size = ctx->d_func()->maxTextureSize();
+ if (pixmap.width() > max_texture_size || pixmap.height() > max_texture_size) {
+ QPixmap scaled = pixmap.scaled(max_texture_size, max_texture_size, Qt::KeepAspectRatio);
+
+ const qreal sx = scaled.width() / qreal(pixmap.width());
+ const qreal sy = scaled.height() / qreal(pixmap.height());
+
+ drawPixmap(dest, scaled, scaleRect(src, sx, sy));
+ return;
+ }
+
ensureActive();
d->transferMode(ImageDrawingMode);
- QGLContext *ctx = d->ctx;
glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT);
QGLTexture *texture =
ctx->d_func()->bindTexture(pixmap, GL_TEXTURE_2D, GL_RGBA,
@@ -1334,11 +1357,24 @@ void QGL2PaintEngineEx::drawImage(const QRectF& dest, const QImage& image, const
Qt::ImageConversionFlags)
{
Q_D(QGL2PaintEngineEx);
+ QGLContext *ctx = d->ctx;
+
+ int max_texture_size = ctx->d_func()->maxTextureSize();
+ if (image.width() > max_texture_size || image.height() > max_texture_size) {
+ QImage scaled = image.scaled(max_texture_size, max_texture_size, Qt::KeepAspectRatio);
+
+ const qreal sx = scaled.width() / qreal(image.width());
+ const qreal sy = scaled.height() / qreal(image.height());
+
+ drawImage(dest, scaled, scaleRect(src, sx, sy));
+ return;
+ }
+
ensureActive();
d->transferMode(ImageDrawingMode);
- QGLContext *ctx = d->ctx;
glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT);
+
QGLTexture *texture = ctx->d_func()->bindTexture(image, GL_TEXTURE_2D, GL_RGBA, QGLContext::InternalBindOption);
GLuint id = texture->id;
@@ -1737,7 +1773,13 @@ void QGL2PaintEngineEx::drawPixmapFragments(const QPainter::PixmapFragment *frag
}
ensureActive();
- d->drawPixmapFragments(fragments, fragmentCount, pixmap, hints);
+ int max_texture_size = d->ctx->d_func()->maxTextureSize();
+ if (pixmap.width() > max_texture_size || pixmap.height() > max_texture_size) {
+ QPixmap scaled = pixmap.scaled(max_texture_size, max_texture_size, Qt::KeepAspectRatio);
+ d->drawPixmapFragments(fragments, fragmentCount, scaled, hints);
+ } else {
+ d->drawPixmapFragments(fragments, fragmentCount, pixmap, hints);
+ }
}
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index b255e75..02b737b 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -274,6 +274,8 @@ public:
QBrush currentBrush; // May not be the state's brush!
const QBrush noBrush;
+ QPixmap currentBrushPixmap;
+
QGL2PEXVertexArray vertexCoordinateArray;
QGL2PEXVertexArray textureCoordinateArray;
QVector<GLushort> elementIndices;
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index 66445cd..ba311c3 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -83,13 +83,9 @@ void QGLTextureGlyphCache::clear()
if (ctx) {
QGLShareContextScope scope(ctx);
- if (!ctx->d_ptr->workaround_brokenFBOReadBack)
- glDeleteFramebuffers(1, &m_fbo);
-
if (m_width || m_height)
glDeleteTextures(1, &m_texture);
- m_fbo = 0;
m_texture = 0;
m_width = 0;
m_height = 0;
@@ -105,6 +101,13 @@ void QGLTextureGlyphCache::clear()
QGLTextureGlyphCache::~QGLTextureGlyphCache()
{
+ if (ctx) {
+ QGLShareContextScope scope(ctx);
+
+ if (!ctx->d_ptr->workaround_brokenFBOReadBack)
+ glDeleteFramebuffers(1, &m_fbo);
+ }
+
clear();
}
@@ -320,6 +323,9 @@ int QGLTextureGlyphCache::maxTextureWidth() const
int QGLTextureGlyphCache::maxTextureHeight() const
{
- return ctx->d_ptr->maxTextureSize();
+ if (ctx->d_ptr->workaround_brokenTexSubImage)
+ return qMin(1024, ctx->d_ptr->maxTextureSize());
+ else
+ return ctx->d_ptr->maxTextureSize();
}
QT_END_NAMESPACE
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 18f1203..9bf879a 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -1706,6 +1706,7 @@ void QGLContextPrivate::init(QPaintDevice *dev, const QGLFormat &format)
active_engine = 0;
workaround_needsFullClearOnEveryFrame = false;
workaround_brokenFBOReadBack = false;
+ workaround_brokenTexSubImage = false;
workaroundsCached = false;
workaround_brokenTextureFromPixmap = false;
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp
index 8902099..6f9e39c 100644
--- a/src/opengl/qgl_egl.cpp
+++ b/src/opengl/qgl_egl.cpp
@@ -204,6 +204,8 @@ void QGLContext::makeCurrent()
const char *egl_version = eglQueryString(d->eglContext->display(), EGL_VERSION);
if (egl_version && strstr(egl_version, "1.3"))
d->workaround_brokenFBOReadBack = true;
+ else if (egl_version && strstr(egl_version, "1.4"))
+ d->workaround_brokenTexSubImage = true;
}
}
}
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index b46d428..bf830ba 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -401,6 +401,7 @@ public:
// workarounds for driver/hw bugs on different platforms
uint workaround_needsFullClearOnEveryFrame : 1;
uint workaround_brokenFBOReadBack : 1;
+ uint workaround_brokenTexSubImage : 1;
uint workaroundsCached : 1;
uint workaround_brokenTextureFromPixmap : 1;
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index f64b93c..7dc7dc7 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -267,6 +267,7 @@ struct QGLWindowSurfacePrivate
int tried_pb : 1;
int destructive_swap_buffers : 1;
int geometry_updated : 1;
+ int did_paint : 1;
QGLContext *ctx;
@@ -330,6 +331,7 @@ QGLWindowSurface::QGLWindowSurface(QWidget *window)
d_ptr->glDevice.d = d_ptr;
d_ptr->q_ptr = this;
d_ptr->geometry_updated = false;
+ d_ptr->did_paint = false;
}
QGLWindowSurface::~QGLWindowSurface()
@@ -461,6 +463,8 @@ void QGLWindowSurface::beginPaint(const QRegion &)
glClearColor(0.0, 0.0, 0.0, 0.0);
glClear(clearFlags);
}
+
+ d_ptr->did_paint = true;
}
void QGLWindowSurface::endPaint(const QRegion &rgn)
@@ -513,6 +517,13 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint &
if (d_ptr->geometry_updated)
return;
+ // did_paint is set to true in ::beginPaint. ::beginPaint means that we
+ // at least cleared the background (= painted something). In EGL API it's a
+ // mistakte to call swapBuffers if nothing was painted. This check protects
+ // the flush func from being executed if it's for nothing.
+ if (!d_ptr->did_paint)
+ return;
+
QWidget *parent = widget->internalWinId() ? widget : widget->nativeParentWidget();
Q_ASSERT(parent);
@@ -736,6 +747,8 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint &
ctx->swapBuffers();
else
glFlush();
+
+ d_ptr->did_paint = false;
}
diff --git a/src/plugins/bearer/icd/qicdengine.cpp b/src/plugins/bearer/icd/qicdengine.cpp
index bdf4e2e..96827f3 100644
--- a/src/plugins/bearer/icd/qicdengine.cpp
+++ b/src/plugins/bearer/icd/qicdengine.cpp
@@ -229,7 +229,7 @@ void IapMonitor::iapRemoved(const QString &iap_id)
/******************************************************************************/
QIcdEngine::QIcdEngine(QObject *parent)
-: QBearerEngine(parent), iapMonitor(0), m_dbusInterface(0),
+: QBearerEngine(parent), iapMonitor(0), m_dbusInterface(0), m_icdServiceWatcher(0),
firstUpdate(true), m_scanGoingOn(false)
{
}
@@ -248,9 +248,10 @@ QNetworkConfigurationManager::Capabilities QIcdEngine::capabilities() const
QNetworkConfigurationManager::NetworkSessionRequired;
}
-void QIcdEngine::initialize()
+bool QIcdEngine::ensureDBusConnection()
{
- QMutexLocker locker(&mutex);
+ if (m_dbusInterface)
+ return true;
// Setup DBus Interface for ICD
m_dbusInterface = new QDBusInterface(ICD_DBUS_API_INTERFACE,
@@ -259,9 +260,22 @@ void QIcdEngine::initialize()
QDBusConnection::systemBus(),
this);
- // abort if cannot connect to DBus.
- if (!m_dbusInterface->isValid())
- return;
+ if (!m_dbusInterface->isValid()) {
+ delete m_dbusInterface;
+ m_dbusInterface = 0;
+
+ if (!m_icdServiceWatcher) {
+ m_icdServiceWatcher = new QDBusServiceWatcher(ICD_DBUS_API_INTERFACE,
+ QDBusConnection::systemBus(),
+ QDBusServiceWatcher::WatchForOwnerChange,
+ this);
+
+ connect(m_icdServiceWatcher, SIGNAL(serviceOwnerChanged(QString,QString,QString)),
+ this, SLOT(icdServiceOwnerChanged(QString,QString,QString)));
+ }
+
+ return false;
+ }
connect(&m_scanTimer, SIGNAL(timeout()), this, SLOT(finishAsyncConfigurationUpdate()));
m_scanTimer.setSingleShot(true);
@@ -289,6 +303,19 @@ void QIcdEngine::initialize()
doRequestUpdate();
getIcdInitialState();
+
+ return true;
+}
+
+void QIcdEngine::initialize()
+{
+ QMutexLocker locker(&mutex);
+
+ if (!ensureDBusConnection()) {
+ locker.unlock();
+ emit updateCompleted();
+ locker.relock();
+ }
}
static inline QString network_attrs_to_security(uint network_attrs)
@@ -792,6 +819,9 @@ QNetworkConfigurationPrivatePointer QIcdEngine::defaultConfiguration()
{
QMutexLocker locker(&mutex);
+ if (!ensureDBusConnection())
+ return QNetworkConfigurationPrivatePointer();
+
// Here we just return [ANY] request to icd and let the icd decide which IAP to connect.
return userChoiceConfigurations.value(OSSO_IAP_ANY);
}
@@ -933,13 +963,55 @@ void QIcdEngine::connectionStateSignalsSlot(QDBusMessage msg)
locker.relock();
}
+void QIcdEngine::icdServiceOwnerChanged(const QString &serviceName, const QString &oldOwner,
+ const QString &newOwner)
+{
+ Q_UNUSED(serviceName);
+ Q_UNUSED(oldOwner);
+
+ QMutexLocker locker(&mutex);
+
+ if (newOwner.isEmpty()) {
+ // Disconnected from ICD, remove all configurations
+ cleanup();
+ delete iapMonitor;
+ iapMonitor = 0;
+ delete m_dbusInterface;
+ m_dbusInterface = 0;
+
+ QMutableHashIterator<QString, QNetworkConfigurationPrivatePointer> i(accessPointConfigurations);
+ while (i.hasNext()) {
+ i.next();
+
+ QNetworkConfigurationPrivatePointer ptr = i.value();
+ i.remove();
+
+ locker.unlock();
+ emit configurationRemoved(ptr);
+ locker.relock();
+ }
+
+ userChoiceConfigurations.clear();
+ } else {
+ // Connected to ICD ensure connection.
+ ensureDBusConnection();
+ }
+}
+
void QIcdEngine::requestUpdate()
{
QMutexLocker locker(&mutex);
- if (m_scanGoingOn) {
+ if (!ensureDBusConnection()) {
+ locker.unlock();
+ emit updateCompleted();
+ locker.relock();
return;
}
+
+ if (m_scanGoingOn)
+ return;
+
m_scanGoingOn = true;
m_dbusInterface->connection().connect(ICD_DBUS_API_INTERFACE,
@@ -956,14 +1028,16 @@ void QIcdEngine::requestUpdate()
void QIcdEngine::cancelAsyncConfigurationUpdate()
{
- if (!m_scanGoingOn) {
+ if (!ensureDBusConnection())
return;
- }
+
+ if (!m_scanGoingOn)
+ return;
+
m_scanGoingOn = false;
- if (m_scanTimer.isActive()) {
+ if (m_scanTimer.isActive())
m_scanTimer.stop();
- }
m_dbusInterface->connection().disconnect(ICD_DBUS_API_INTERFACE,
ICD_DBUS_API_PATH,
diff --git a/src/plugins/bearer/icd/qicdengine.h b/src/plugins/bearer/icd/qicdengine.h
index d528f15..d5b4fb3 100644
--- a/src/plugins/bearer/icd/qicdengine.h
+++ b/src/plugins/bearer/icd/qicdengine.h
@@ -53,6 +53,7 @@ QT_BEGIN_NAMESPACE
class QNetworkConfigurationPrivate;
class IapMonitor;
class QDBusInterface;
+class QDBusServiceWatcher;
inline QNetworkConfiguration::BearerType bearerTypeFromIapType(const QString &iapType)
{
@@ -147,12 +148,15 @@ private Q_SLOTS:
void finishAsyncConfigurationUpdate();
void asyncUpdateConfigurationsSlot(QDBusMessage msg);
void connectionStateSignalsSlot(QDBusMessage msg);
+ void icdServiceOwnerChanged(const QString &serviceName, const QString &oldOwner,
+ const QString &newOwner);
private:
void startListeningStateSignalsForAllConnections();
void doRequestUpdate(QList<Maemo::IcdScanResult> scanned = QList<Maemo::IcdScanResult>());
void cancelAsyncConfigurationUpdate();
void getIcdInitialState();
+ bool ensureDBusConnection();
private:
IapMonitor *iapMonitor;
@@ -162,6 +166,8 @@ private:
QStringList m_typesToBeScanned;
QList<Maemo::IcdScanResult> m_scanResult;
+ QDBusServiceWatcher *m_icdServiceWatcher;
+
bool firstUpdate;
bool m_scanGoingOn;
};
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
index 554f9b7..f93b605 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
@@ -743,9 +743,11 @@ QNetworkConfigurationPrivate *QNetworkManagerEngine::parseConnection(const QStri
QNetworkConfigurationPrivatePointer ptr =
accessPointConfigurations.take(accessPointId);
- mutex.unlock();
- emit configurationRemoved(ptr);
- mutex.lock();
+ if (ptr) {
+ mutex.unlock();
+ emit configurationRemoved(ptr);
+ mutex.lock();
+ }
}
break;
}
diff --git a/src/plugins/phonon/mmf/mmf.pro b/src/plugins/phonon/mmf/mmf.pro
index 691fc80..5d7b61d 100644
--- a/src/plugins/phonon/mmf/mmf.pro
+++ b/src/plugins/phonon/mmf/mmf.pro
@@ -103,7 +103,7 @@ symbian {
exists($${EPOCROOT}epoc32/include/mw/downloadmgrclient.h) {
HEADERS += $$PHONON_MMF_DIR/download.h
SOURCES += $$PHONON_MMF_DIR/download.cpp
- LIBS += -ldownloadmgr
+ LIBS += -lDownloadMgr
DEFINES += PHONON_MMF_PROGRESSIVE_DOWNLOAD
}
}
@@ -125,7 +125,7 @@ symbian {
LIBS += -lmediaclientaudiostream # For CMdaAudioOutputStream
# These are for effects.
- LIBS += -lAudioEqualizerEffect -lBassBoostEffect -lDistanceAttenuationEffect -lDopplerBase -lEffectBase -lEnvironmentalReverbEffect -lListenerDopplerEffect -lListenerLocationEffect -lListenerOrientationEffect -lLocationBase -lLoudnessEffect -lOrientationBase -lSourceDopplerEffect -lSourceLocationEffect -lSourceOrientationEffect -lStereoWideningEffect
+ LIBS += -lAudioEqualizerEffect -lBassBoostEffect -lDistanceAttenuationEffect -lDopplerbase -lEffectBase -lEnvironmentalReverbEffect -lListenerDopplerEffect -lListenerLocationEffect -lListenerOrientationEffect -lLocationBase -lLoudnessEffect -lOrientationBase -lSourceDopplerEffect -lSourceLocationEffect -lSourceOrientationEffect -lStereoWideningEffect
# This is needed for having the .qtplugin file properly created on Symbian.
QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/phonon_backend
diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro
index ff67bcf..5a435cd 100644
--- a/src/s60installs/s60installs.pro
+++ b/src/s60installs/s60installs.pro
@@ -132,7 +132,7 @@ symbian: {
codecs_plugins.path = c:$$QT_PLUGINS_BASE_DIR/codecs
contains(QT_CONFIG, phonon-backend) {
- phonon_backend_plugins.sources += $$QMAKE_LIBDIR_QT/phonon_mmf$${QT_LIBINFIX}.dll
+ phonon_backend_plugins.sources += $$QT_BUILD_TREE/plugins/phonon_backend/phonon_mmf$${QT_LIBINFIX}.dll
phonon_backend_plugins.path = c:$$QT_PLUGINS_BASE_DIR/phonon_backend
DEPLOYMENT += phonon_backend_plugins
diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
index fd5d140..a2dcf1c 100644
--- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
+++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
@@ -84,6 +84,7 @@ private slots:
void manualHighlight();
void footer();
void header();
+ void indexAt();
private:
QDeclarativeView *createView();
@@ -1299,6 +1300,42 @@ void tst_QDeclarativeGridView::header()
QTRY_COMPARE(header->y(), 0.0);
}
+void tst_QDeclarativeGridView::indexAt()
+{
+ QDeclarativeView *canvas = createView();
+
+ TestModel model;
+ model.addItem("Fred", "12345");
+ model.addItem("John", "2345");
+ model.addItem("Bob", "54321");
+ model.addItem("Billy", "22345");
+ model.addItem("Sam", "2945");
+ model.addItem("Ben", "04321");
+ model.addItem("Jim", "0780");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+ ctxt->setContextProperty("testTopToBottom", QVariant(false));
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/gridview1.qml"));
+ qApp->processEvents();
+
+ QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
+ QTRY_VERIFY(gridview != 0);
+
+ QDeclarativeItem *contentItem = gridview->contentItem();
+ QTRY_VERIFY(contentItem != 0);
+
+ QTRY_COMPARE(gridview->count(), model.count());
+
+ QCOMPARE(gridview->indexAt(0, 0), 0);
+ QCOMPARE(gridview->indexAt(79, 59), 0);
+ QCOMPARE(gridview->indexAt(80, 0), 1);
+ QCOMPARE(gridview->indexAt(0, 60), 3);
+ QCOMPARE(gridview->indexAt(240, 0), -1);
+
+ delete canvas;
+}
QDeclarativeView *tst_QDeclarativeGridView::createView()
{
diff --git a/tests/auto/declarative/qdeclarativeimage/data/heart-win32.png b/tests/auto/declarative/qdeclarativeimage/data/heart-win32.png
index 5992e79..351da13 100644
--- a/tests/auto/declarative/qdeclarativeimage/data/heart-win32.png
+++ b/tests/auto/declarative/qdeclarativeimage/data/heart-win32.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativeimage/data/heart.png b/tests/auto/declarative/qdeclarativeimage/data/heart.png
index ff93f6c..abe97fe 100644
--- a/tests/auto/declarative/qdeclarativeimage/data/heart.png
+++ b/tests/auto/declarative/qdeclarativeimage/data/heart.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativeimage/data/heart200-win32.png b/tests/auto/declarative/qdeclarativeimage/data/heart200-win32.png
index 19b20a8..4976ff9 100644
--- a/tests/auto/declarative/qdeclarativeimage/data/heart200-win32.png
+++ b/tests/auto/declarative/qdeclarativeimage/data/heart200-win32.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativeimage/data/heart200.png b/tests/auto/declarative/qdeclarativeimage/data/heart200.png
index 5a31ae8..7fbb13c 100644
--- a/tests/auto/declarative/qdeclarativeimage/data/heart200.png
+++ b/tests/auto/declarative/qdeclarativeimage/data/heart200.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
index cd12e3a..5b214e6 100644
--- a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
+++ b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
@@ -100,6 +100,8 @@ public:
QImage requestImage(const QString &id, QSize *size, const QSize& requestedSize)
{
+ lastImageId = id;
+
if (id == QLatin1String("no-such-file.png"))
return QImage();
@@ -114,6 +116,7 @@ public:
}
bool *deleteWatch;
+ QString lastImageId;
};
Q_DECLARE_METATYPE(TestQImageProvider*);
@@ -134,6 +137,8 @@ public:
QPixmap requestPixmap(const QString &id, QSize *size, const QSize& requestedSize)
{
+ lastImageId = id;
+
if (id == QLatin1String("no-such-file.png"))
return QPixmap();
@@ -148,6 +153,7 @@ public:
}
bool *deleteWatch;
+ QString lastImageId;
};
Q_DECLARE_METATYPE(TestQPixmapProvider*);
@@ -164,22 +170,49 @@ QString tst_qdeclarativeimageprovider::newImageFileName() const
void tst_qdeclarativeimageprovider::fillRequestTestsData(const QString &id)
{
QTest::addColumn<QString>("source");
+ QTest::addColumn<QString>("imageId");
QTest::addColumn<QString>("properties");
QTest::addColumn<QSize>("size");
QTest::addColumn<QString>("error");
- QTest::newRow(QTest::toString(id + " exists")) << newImageFileName() << "" << QSize(100,100) << "";
- QTest::newRow(QTest::toString(id + " scaled")) << newImageFileName() << "sourceSize: \"80x30\"" << QSize(80,30) << "";
+ QString fileName = newImageFileName();
+ QTest::newRow(QTest::toString(id + " simple test"))
+ << "image://test/" + fileName << fileName << "" << QSize(100,100) << "";
+
+ fileName = newImageFileName();
+ QTest::newRow(QTest::toString(id + " url with no id"))
+ << "image://test/" + fileName << "" + fileName << "" << QSize(100,100) << "";
+
+ fileName = newImageFileName();
+ QTest::newRow(QTest::toString(id + " url with path"))
+ << "image://test/test/path" + fileName << "test/path" + fileName << "" << QSize(100,100) << "";
+
+ fileName = newImageFileName();
+ QTest::newRow(QTest::toString(id + " url with fragment"))
+ << "image://test/faq.html?#question13" + fileName << "faq.html?#question13" + fileName << "" << QSize(100,100) << "";
- QTest::newRow(QTest::toString(id + " missing")) << "image://test/no-such-file.png" << "" << QSize()
+ fileName = newImageFileName();
+ QTest::newRow(QTest::toString(id + " url with query"))
+ << "image://test/cgi-bin/drawgraph.cgi?type=pie&color=green" + fileName << "cgi-bin/drawgraph.cgi?type=pie&color=green" + fileName
+ << "" << QSize(100,100) << "";
+
+ fileName = newImageFileName();
+ QTest::newRow(QTest::toString(id + " scaled image"))
+ << "image://test/" + fileName << fileName << "sourceSize: \"80x30\"" << QSize(80,30) << "";
+
+ QTest::newRow(QTest::toString(id + " missing"))
+ << "image://test/no-such-file.png" << "no-such-file.png" << "" << QSize(100,100)
<< "file::2:1: QML Image: Failed to get image from provider: image://test/no-such-file.png";
- QTest::newRow(QTest::toString(id + " unknown provider")) << "image://bogus/exists.png" << "" << QSize()
+
+ QTest::newRow(QTest::toString(id + " unknown provider"))
+ << "image://bogus/exists.png" << "" << "" << QSize()
<< "file::2:1: QML Image: Failed to get image from provider: image://bogus/exists.png";
}
void tst_qdeclarativeimageprovider::runTest(bool async, QDeclarativeImageProvider *provider)
{
QFETCH(QString, source);
+ QFETCH(QString, imageId);
QFETCH(QString, properties);
QFETCH(QSize, size);
QFETCH(QString, error);
@@ -210,6 +243,11 @@ void tst_qdeclarativeimageprovider::runTest(bool async, QDeclarativeImageProvide
QTRY_VERIFY(obj->status() == QDeclarativeImage::Ready);
else
QVERIFY(obj->status() == QDeclarativeImage::Ready);
+ if (QByteArray(QTest::currentDataTag()).startsWith("qimage"))
+ QCOMPARE(static_cast<TestQImageProvider*>(provider)->lastImageId, imageId);
+ else
+ QCOMPARE(static_cast<TestQPixmapProvider*>(provider)->lastImageId, imageId);
+
QCOMPARE(obj->width(), qreal(size.width()));
QCOMPARE(obj->height(), qreal(size.height()));
QCOMPARE(obj->pixmap().width(), size.width());
diff --git a/tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml b/tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml
index 229f969..f614a12 100644
--- a/tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml
+++ b/tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml
@@ -3,6 +3,46 @@ import QtQuick 1.0
Grid {
columns: 2
width: 100; height: 100
+ function verify() {
+ if (item1.KeyNavigation.right != item2)
+ return false;
+ if (item1.KeyNavigation.down != item3)
+ return false;
+ if (item1.KeyNavigation.tab != item2)
+ return false;
+ if (item1.KeyNavigation.backtab != item4)
+ return false;
+
+ if (item2.KeyNavigation.left != item1)
+ return false;
+ if (item2.KeyNavigation.down != item4)
+ return false;
+ if (item2.KeyNavigation.tab != item3)
+ return false;
+ if (item2.KeyNavigation.backtab != item1)
+ return false;
+
+ if (item3.KeyNavigation.right != item4)
+ return false;
+ if (item3.KeyNavigation.up != item1)
+ return false;
+ if (item3.KeyNavigation.tab != item4)
+ return false;
+ if (item3.KeyNavigation.backtab != item2)
+ return false;
+
+ if (item4.KeyNavigation.left != item3)
+ return false;
+ if (item4.KeyNavigation.up != item2)
+ return false;
+ if (item4.KeyNavigation.tab != item1)
+ return false;
+ if (item4.KeyNavigation.backtab != item3)
+ return false;
+
+ return true;
+ }
+
Rectangle {
id: item1
objectName: "item1"
diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
index 711bf00..0ebb8b7 100644
--- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
+++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
@@ -393,6 +393,11 @@ void tst_QDeclarativeItem::keyNavigation()
QVERIFY(item);
QVERIFY(item->hasActiveFocus());
+ QVariant result;
+ QVERIFY(QMetaObject::invokeMethod(canvas->rootObject(), "verify",
+ Q_RETURN_ARG(QVariant, result)));
+ QVERIFY(result.toBool());
+
// right
QKeyEvent key(QEvent::KeyPress, Qt::Key_Right, Qt::NoModifier, "", false, 1);
QApplication::sendEvent(canvas, &key);
diff --git a/tests/auto/declarative/qdeclarativelistview/data/qtbug16037.qml b/tests/auto/declarative/qdeclarativelistview/data/qtbug16037.qml
new file mode 100644
index 0000000..0756618
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelistview/data/qtbug16037.qml
@@ -0,0 +1,37 @@
+import QtQuick 1.0
+
+Item {
+ width: 640
+ height: 480
+
+ function setModel() {
+ listView.model = listModel1
+ }
+
+ ListModel {
+ id: listModel1
+ ListElement { text: "Apple" }
+ ListElement { text: "Banana" }
+ ListElement { text: "Orange" }
+ ListElement { text: "Coconut" }
+ }
+
+ Rectangle {
+ width: 200
+ height: listView.contentHeight
+ color: "yellow"
+ anchors.centerIn: parent
+
+ ListView {
+ id: listView
+ objectName: "listview"
+ anchors.fill: parent
+
+ delegate: Item {
+ width: 200
+ height: 20
+ Text { text: model.text; anchors.centerIn: parent }
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
index ff90d32..3df10a9 100644
--- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
+++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
@@ -104,6 +104,8 @@ private slots:
void sizeLessThan1();
void QTBUG_14821();
void resizeDelegate();
+ void QTBUG_16037();
+ void indexAt();
private:
template <class T> void items();
@@ -1944,6 +1946,57 @@ void tst_QDeclarativeListView::resizeDelegate()
delete canvas;
}
+void tst_QDeclarativeListView::QTBUG_16037()
+{
+ QDeclarativeView *canvas = createView();
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/qtbug16037.qml"));
+ qApp->processEvents();
+
+ QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "listview");
+ QTRY_VERIFY(listview != 0);
+
+ QVERIFY(listview->contentHeight() <= 0.0);
+
+ QMetaObject::invokeMethod(canvas->rootObject(), "setModel");
+
+ QTRY_COMPARE(listview->contentHeight(), 80.0);
+
+ delete canvas;
+}
+
+void tst_QDeclarativeListView::indexAt()
+{
+ QDeclarativeView *canvas = createView();
+
+ TestModel model;
+ for (int i = 0; i < 30; i++)
+ model.addItem("Item" + QString::number(i), "");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ TestObject *testObject = new TestObject;
+ ctxt->setContextProperty("testObject", testObject);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/listviewtest.qml"));
+ qApp->processEvents();
+
+ QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
+ QTRY_VERIFY(listview != 0);
+
+ QDeclarativeItem *contentItem = listview->contentItem();
+ QTRY_VERIFY(contentItem != 0);
+
+ QCOMPARE(listview->indexAt(0,0), 0);
+ QCOMPARE(listview->indexAt(0,19), 0);
+ QCOMPARE(listview->indexAt(239,19), 0);
+ QCOMPARE(listview->indexAt(0,20), 1);
+ QCOMPARE(listview->indexAt(240,20), -1);
+
+ delete canvas;
+}
+
void tst_QDeclarativeListView::qListModelInterface_items()
{
items<TestModel>();
diff --git a/tests/auto/declarative/qdeclarativestates/data/image.png b/tests/auto/declarative/qdeclarativestates/data/image.png
new file mode 100644
index 0000000..ed1833c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/image.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativestates/data/reset.qml b/tests/auto/declarative/qdeclarativestates/data/reset.qml
index 8799c97..a140ffa 100644
--- a/tests/auto/declarative/qdeclarativestates/data/reset.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/reset.qml
@@ -3,17 +3,16 @@ import QtQuick 1.0
Rectangle {
width: 640
height: 480
- Text {
- id: theText
+ Image {
+ id: image
width: 40
- wrapMode: Text.WordWrap
- text: "a text string that is longer than 40 pixels"
+ source: "image.png"
}
states: State {
name: "state1"
PropertyChanges {
- target: theText
+ target: image
width: undefined
}
}
diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
index b8409a5..870842c 100644
--- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
+++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
@@ -44,7 +44,6 @@
#include <private/qdeclarativeanchors_p_p.h>
#include <private/qdeclarativerectangle_p.h>
#include <private/qdeclarativeimage_p.h>
-#include <private/qdeclarativetext_p.h>
#include <private/qdeclarativepropertychanges_p.h>
#include <private/qdeclarativestategroup_p.h>
#include <private/qdeclarativeitem_p.h>
@@ -1126,15 +1125,15 @@ void tst_qdeclarativestates::reset()
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
QVERIFY(rect != 0);
- QDeclarativeText *text = rect->findChild<QDeclarativeText*>();
- QVERIFY(text != 0);
- QCOMPARE(text->width(), qreal(40.));
- QVERIFY(text->width() < text->height());
+ QDeclarativeImage *image = rect->findChild<QDeclarativeImage*>();
+ QVERIFY(image != 0);
+ QCOMPARE(image->width(), qreal(40.));
+ QCOMPARE(image->height(), qreal(20.));
QDeclarativeItemPrivate::get(rect)->setState("state1");
- QVERIFY(text->width() > 41);
- QVERIFY(text->width() > text->height());
+ QCOMPARE(image->width(), 20.0);
+ QCOMPARE(image->height(), qreal(20.));
}
void tst_qdeclarativestates::illegalObjectCreation()
diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
index a7971cc..c7a51f7 100644
--- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
+++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
@@ -652,6 +652,19 @@ void tst_qdeclarativetextedit::selection()
QVERIFY(textEditObject->selectionEnd() == 0);
QVERIFY(textEditObject->selectedText().isNull());
+ // Verify invalid positions are ignored.
+ textEditObject->setCursorPosition(-1);
+ QVERIFY(textEditObject->cursorPosition() == 0);
+ QVERIFY(textEditObject->selectionStart() == 0);
+ QVERIFY(textEditObject->selectionEnd() == 0);
+ QVERIFY(textEditObject->selectedText().isNull());
+
+ textEditObject->setCursorPosition(textEditObject->text().count()+1);
+ QVERIFY(textEditObject->cursorPosition() == 0);
+ QVERIFY(textEditObject->selectionStart() == 0);
+ QVERIFY(textEditObject->selectionEnd() == 0);
+ QVERIFY(textEditObject->selectedText().isNull());
+
//Test selection
for(int i=0; i<= testStr.size(); i++) {
textEditObject->select(0,i);
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index 76e0102..7b2310a 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -354,6 +354,19 @@ void tst_qdeclarativetextinput::selection()
QVERIFY(textinputObject->selectionEnd() == 0);
QVERIFY(textinputObject->selectedText().isNull());
+ // Verify invalid positions are ignored.
+ textinputObject->setCursorPosition(-1);
+ QVERIFY(textinputObject->cursorPosition() == 0);
+ QVERIFY(textinputObject->selectionStart() == 0);
+ QVERIFY(textinputObject->selectionEnd() == 0);
+ QVERIFY(textinputObject->selectedText().isNull());
+
+ textinputObject->setCursorPosition(textinputObject->text().count()+1);
+ QVERIFY(textinputObject->cursorPosition() == 0);
+ QVERIFY(textinputObject->selectionStart() == 0);
+ QVERIFY(textinputObject->selectionEnd() == 0);
+ QVERIFY(textinputObject->selectedText().isNull());
+
//Test selection
for(int i=0; i<= testStr.size(); i++) {
textinputObject->select(0,i);
diff --git a/tests/auto/headers/tst_headers.cpp b/tests/auto/headers/tst_headers.cpp
index 7ccf058..8c8bc2c 100644
--- a/tests/auto/headers/tst_headers.cpp
+++ b/tests/auto/headers/tst_headers.cpp
@@ -203,7 +203,7 @@ void tst_Headers::licenseCheck()
QFETCH(QString, sourceFile);
QFile f(sourceFile);
- QVERIFY(f.open(QIODevice::ReadOnly));
+ QVERIFY2(f.open(QIODevice::ReadOnly), qPrintable(f.errorString()));
QByteArray data = f.readAll();
data.replace("\r\n", "\n"); // Windows
data.replace('\r', '\n'); // Mac OS9
@@ -264,7 +264,7 @@ void tst_Headers::privateSlots()
return;
QFile f(header);
- QVERIFY(f.open(QIODevice::ReadOnly));
+ QVERIFY2(f.open(QIODevice::ReadOnly), qPrintable(f.errorString()));
QStringList content = QString::fromLocal8Bit(f.readAll()).split("\n");
foreach (QString line, content) {
@@ -286,7 +286,7 @@ void tst_Headers::macros()
return;
QFile f(header);
- QVERIFY(f.open(QIODevice::ReadOnly));
+ QVERIFY2(f.open(QIODevice::ReadOnly), qPrintable(f.errorString()));
QByteArray data = f.readAll();
QStringList content = QString::fromLocal8Bit(data.replace('\r', "")).split("\n");
diff --git a/tests/auto/qapplication/modal/main.cpp b/tests/auto/qapplication/modal/main.cpp
index f9d8fb4..3eaaa0d 100644
--- a/tests/auto/qapplication/modal/main.cpp
+++ b/tests/auto/qapplication/modal/main.cpp
@@ -47,6 +47,7 @@
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
+ QApplication::setAttribute(Qt::AA_NativeWindows); //QTBUG-15774
base *b = new base();
return app.exec();
}
diff --git a/tests/auto/qapplication/test/test.pro b/tests/auto/qapplication/test/test.pro
index 2c54c37..d946e7e 100644
--- a/tests/auto/qapplication/test/test.pro
+++ b/tests/auto/qapplication/test/test.pro
@@ -17,7 +17,7 @@ symbian: {
someTest.sources = test.pro
someTest.path = test
windowIcon.sources = ../heart.svg
- DEPLOYMENT = additional deploy someTest windowIcon
+ DEPLOYMENT += additional deploy someTest windowIcon
LIBS += -lcone -lavkon
}
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
index 0a9633f..e259177 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -246,6 +246,7 @@ private slots:
void QTBUG_4151_clipAndIgnore();
void QTBUG_5859_exposedRect();
void QTBUG_7438_cursor();
+ void QTBUG_16063_microFocusRect();
public slots:
void dummySlot() {}
@@ -4450,5 +4451,43 @@ void tst_QGraphicsView::QTBUG_7438_cursor()
#endif
}
+class IMItem : public QGraphicsRectItem
+{
+public:
+ IMItem(QGraphicsItem *parent = 0):
+ QGraphicsRectItem(QRectF(0, 0, 20, 20), parent)
+ {
+ setFlag(QGraphicsItem::ItemIsFocusable, true);
+ setFlag(QGraphicsItem::ItemAcceptsInputMethod, true);
+ }
+
+ QVariant inputMethodQuery(Qt::InputMethodQuery query) const
+ {
+ return mf;
+ }
+
+ static QRectF mf;
+};
+
+QRectF IMItem::mf(1.5, 1.6, 10, 10);
+
+void tst_QGraphicsView::QTBUG_16063_microFocusRect()
+{
+ QGraphicsScene scene;
+ IMItem *item = new IMItem();
+ scene.addItem(item);
+
+ QGraphicsView view(&scene);
+
+ view.setFixedSize(40, 40);
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+
+ scene.setFocusItem(item);
+ view.setFocus();
+ QRectF mfv = view.inputMethodQuery(Qt::ImMicroFocus).toRectF();
+ QCOMPARE(mfv, IMItem::mf.translated(-view.mapToScene(view.sceneRect().toRect()).boundingRect().topLeft()));
+}
+
QTEST_MAIN(tst_QGraphicsView)
#include "tst_qgraphicsview.moc"
diff --git a/tests/auto/qinputcontext/qinputcontext.pro b/tests/auto/qinputcontext/qinputcontext.pro
index ec6831e..4b3ab96 100644
--- a/tests/auto/qinputcontext/qinputcontext.pro
+++ b/tests/auto/qinputcontext/qinputcontext.pro
@@ -1,6 +1,8 @@
load(qttest_p4)
SOURCES += tst_qinputcontext.cpp
+contains(QT_CONFIG, webkit):QT += webkit
+
symbian {
LIBS += -lws32 -lcone
}
diff --git a/tests/auto/qinputcontext/tst_qinputcontext.cpp b/tests/auto/qinputcontext/tst_qinputcontext.cpp
index 5a258a9..020f177 100644
--- a/tests/auto/qinputcontext/tst_qinputcontext.cpp
+++ b/tests/auto/qinputcontext/tst_qinputcontext.cpp
@@ -50,6 +50,13 @@
#include <qwindowsstyle.h>
#include <qdesktopwidget.h>
#include <qpushbutton.h>
+#include <qgraphicsview.h>
+#include <qgraphicsscene.h>
+
+#ifdef QT_WEBKIT_LIB
+#include <qwebview.h>
+#include <qgraphicswebview.h>
+#endif
#ifdef Q_OS_SYMBIAN
#include <private/qt_s60_p.h>
@@ -466,6 +473,115 @@ void tst_QInputContext::focusProxy()
QCOMPARE(gic->focusWidget(), &proxy);
}
+#ifdef QT_WEBKIT_LIB
+class AutoWebView : public QWebView
+{
+ Q_OBJECT
+
+public:
+ AutoWebView()
+ : m_length(0)
+ , m_mode(QLineEdit::Normal)
+ {
+ updatePage();
+ }
+ ~AutoWebView() {}
+
+ void updatePage()
+ {
+ // The update might reset the input method parameters.
+ bool imEnabled = testAttribute(Qt::WA_InputMethodEnabled);
+ Qt::InputMethodHints hints = inputMethodHints();
+
+ QString page = "<html><body onLoad=\"document.forms.testform.testinput.focus()\">"
+ "<form name=\"testform\"><input name=\"testinput\" type=\"%1\" %2></form></body></html>";
+ if (m_mode == QLineEdit::Password)
+ page = page.arg("password");
+ else
+ page = page.arg("text");
+
+ if (m_length == 0)
+ page = page.arg("");
+ else
+ page = page.arg("maxlength=\"" + QString::number(m_length) + "\"");
+
+ setHtml(page);
+
+ setAttribute(Qt::WA_InputMethodEnabled, imEnabled);
+ setInputMethodHints(hints);
+ }
+ void setMaxLength(int length)
+ {
+ m_length = length;
+ updatePage();
+ }
+ void setEchoMode(QLineEdit::EchoMode mode)
+ {
+ m_mode = mode;
+ updatePage();
+ }
+
+ int m_length;
+ QLineEdit::EchoMode m_mode;
+};
+
+class AutoGraphicsWebView : public QGraphicsView
+{
+ Q_OBJECT
+
+public:
+ AutoGraphicsWebView()
+ : m_length(0)
+ , m_mode(QLineEdit::Normal)
+ {
+ m_scene.addItem(&m_view);
+ setScene(&m_scene);
+ m_view.setFocus();
+ updatePage();
+ }
+ ~AutoGraphicsWebView() {}
+
+ void updatePage()
+ {
+ // The update might reset the input method parameters.
+ bool imEnabled = testAttribute(Qt::WA_InputMethodEnabled);
+ Qt::InputMethodHints hints = inputMethodHints();
+
+ QString page = "<html><body onLoad=\"document.forms.testform.testinput.focus()\">"
+ "<form name=\"testform\"><input name=\"testinput\" type=\"%1\" %2></form></body></html>";
+ if (m_mode == QLineEdit::Password)
+ page = page.arg("password");
+ else
+ page = page.arg("text");
+
+ if (m_length == 0)
+ page = page.arg("");
+ else
+ page = page.arg("maxlength=\"" + QString::number(m_length) + "\"");
+
+ m_view.setHtml(page);
+
+ setAttribute(Qt::WA_InputMethodEnabled, imEnabled);
+ setInputMethodHints(hints);
+ }
+ void setMaxLength(int length)
+ {
+ m_length = length;
+ updatePage();
+ }
+ void setEchoMode(QLineEdit::EchoMode mode)
+ {
+ m_mode = mode;
+ updatePage();
+ }
+
+ int m_length;
+ QLineEdit::EchoMode m_mode;
+ QGraphicsScene m_scene;
+ QGraphicsWebView m_view;
+};
+#endif // QT_WEBKIT_LIB
+
void tst_QInputContext::symbianTestCoeFepInputContext_data()
{
#ifdef Q_OS_SYMBIAN
@@ -481,6 +597,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data()
symbianTestCoeFepInputContext_addData<QLineEdit>();
symbianTestCoeFepInputContext_addData<QPlainTextEdit>();
symbianTestCoeFepInputContext_addData<QTextEdit>();
+# ifdef QT_WEBKIT_LIB
+ symbianTestCoeFepInputContext_addData<AutoWebView>();
+ symbianTestCoeFepInputContext_addData<AutoGraphicsWebView>();
+# endif
#endif
}
@@ -1087,13 +1207,28 @@ void tst_QInputContext::symbianTestCoeFepInputContext()
editwidget->setAttribute(Qt::WA_InputMethodEnabled, inputMethodEnabled);
editwidget->setInputMethodHints(inputMethodHints);
- QLineEdit *lineedit = qobject_cast<QLineEdit *>(editwidget);
- if (lineedit) {
+ if (QLineEdit *lineedit = qobject_cast<QLineEdit *>(editwidget)) {
if (maxLength > 0)
lineedit->setMaxLength(maxLength);
lineedit->setEchoMode(echoMode);
+#ifdef QT_WEBKIT_LIB
+ } else if (AutoWebView *webView = qobject_cast<AutoWebView *>(editwidget)) {
+ if (maxLength > 0)
+ webView->setMaxLength(maxLength);
+ webView->setEchoMode(echoMode);
+ // WebKit disables T9 everywhere.
+ if (inputMethodEnabled && !(inputMethodHints & Qt::ImhNoPredictiveText))
+ return;
+ } else if (AutoGraphicsWebView *webView = qobject_cast<AutoGraphicsWebView *>(editwidget)) {
+ if (maxLength > 0)
+ webView->setMaxLength(maxLength);
+ webView->setEchoMode(echoMode);
+ // WebKit disables T9 everywhere.
+ if (inputMethodEnabled && !(inputMethodHints & Qt::ImhNoPredictiveText))
+ return;
+#endif
} else if (maxLength > 0 || echoMode != QLineEdit::Normal) {
- // Only QLineEdits support these features so don't attempt any tests using those
+ // Only some widgets support these features so don't attempt any tests using those
// on other widgets.
return;
}
diff --git a/tests/auto/qprocess/tst_qprocess.cpp b/tests/auto/qprocess/tst_qprocess.cpp
index fd310f4..13f1d26 100644
--- a/tests/auto/qprocess/tst_qprocess.cpp
+++ b/tests/auto/qprocess/tst_qprocess.cpp
@@ -1999,11 +1999,15 @@ void tst_QProcess::spaceInName()
void tst_QProcess::lockupsInStartDetached()
{
#if !defined(Q_OS_SYMBIAN)
- // What exactly is this call supposed to achieve anyway?
+ // Check that QProcess doesn't cause a lock up at this program's
+ // exit if a thread was started and we tried to run a program that
+ // doesn't exist. Before Qt 4.2, this used to lock up on Unix due
+ // to calling ::exit instead of ::_exit if execve failed.
+
QHostInfo::lookupHost(QString("something.invalid"), 0, 0);
-#endif
QProcess::execute("yjhbrty");
QProcess::startDetached("yjhbrty");
+#endif
}
//-----------------------------------------------------------------------------
diff --git a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
index a280256..4b14cc9 100644
--- a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
+++ b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
@@ -745,6 +745,16 @@ tst_Suite::tst_Suite()
addExpectedFailure("ecma/TypeConversion/9.3.1-3.js", "1/-1e-2000", willFixInNextReleaseMessage);
#endif
+#ifdef Q_OS_SYMBIAN
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(-1, 0.5)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(-1, -0.5)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma_3/Operators/order-01.js", "operator evaluation order: 11.5.1 *", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma_3/Operators/order-01.js", "operator evaluation order: 11.5.2 /", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma_3/Operators/order-01.js", "operator evaluation order: 11.6.2 -", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma_3/Operators/order-01.js", "operator evaluation order: 11.13.2 *=", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma_3/Operators/order-01.js", "operator evaluation order: 11.13.2 /=", willFixInNextReleaseMessage);
+#endif
+
static const char klass[] = "tst_QScriptJsTestSuite";
QVector<uint> *data = qt_meta_data_tst_Suite();
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 6069383..d611225 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -10029,28 +10029,6 @@ void tst_QWidget::openModal_taskQTBUG_5804()
}
#ifdef Q_OS_SYMBIAN
-
-static CEikButtonGroupContainer* cba()
-{
- CEikButtonGroupContainer *oldCba = NULL;
-
- // Due to convoluted/buggy implementation of MEikAppUiFactory interface in Symbian,
- // the only way to get the correct cba is to use SwapButtonGroup function.
- // Calling SwapButtonGroup doesn't trigger anything, it only changes the value of iToolbar
- // member variable, so this double switching should not cause any interference for test.
- QT_TRAP_THROWING(
- CEikButtonGroupContainer *dummyCba = CEikButtonGroupContainer::NewL(
- CEikButtonGroupContainer::ECba, CEikButtonGroupContainer::EHorizontal, NULL, 0);
-
- oldCba = CEikonEnv::Static()->AppUiFactory()->SwapButtonGroup(dummyCba);
- CEikonEnv::Static()->AppUiFactory()->SwapButtonGroup(oldCba);
-
- delete dummyCba;
- )
-
- return oldCba;
-}
-
void tst_QWidget::cbaVisibility()
{
// Test case for task 261048
@@ -10083,7 +10061,7 @@ void tst_QWidget::cbaVisibility()
// Verify window decorations i.e. status pane and CBA are visible.
CEikStatusPane* statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane();
QVERIFY(statusPane->IsVisible());
- CEikButtonGroupContainer* buttonGroup = cba();
+ CEikButtonGroupContainer* buttonGroup = CEikButtonGroupContainer::Current();
QVERIFY(buttonGroup->IsVisible());
}
@@ -10100,7 +10078,7 @@ void tst_QWidget::fullScreenWindowModeTransitions()
const QRect fullScreenGeometry = qApp->desktop()->screenGeometry(&widget);
const QRect maximumScreenGeometry = qApp->desktop()->availableGeometry(&widget);
CEikStatusPane *statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane();
- CEikButtonGroupContainer *buttonGroup = cba();
+ CEikButtonGroupContainer *buttonGroup = CEikButtonGroupContainer::Current();
//Enter
widget.showNormal();
@@ -10154,7 +10132,7 @@ void tst_QWidget::maximizedWindowModeTransitions()
const QRect fullScreenGeometry = qApp->desktop()->screenGeometry(&widget);
const QRect maximumScreenGeometry = qApp->desktop()->availableGeometry(&widget);
CEikStatusPane *statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane();
- CEikButtonGroupContainer *buttonGroup = cba();
+ CEikButtonGroupContainer *buttonGroup = CEikButtonGroupContainer::Current();
//Enter
widget.showNormal();
@@ -10210,7 +10188,7 @@ void tst_QWidget::minimizedWindowModeTransitions()
const QRect fullScreenGeometry = qApp->desktop()->screenGeometry(&widget);
const QRect maximumScreenGeometry = qApp->desktop()->availableGeometry(&widget);
CEikStatusPane *statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane();
- CEikButtonGroupContainer *buttonGroup = cba();
+ CEikButtonGroupContainer *buttonGroup = CEikButtonGroupContainer::Current();
//Enter
widget.showNormal();
@@ -10266,7 +10244,7 @@ void tst_QWidget::normalWindowModeTransitions()
const QRect fullScreenGeometry = qApp->desktop()->screenGeometry(&widget);
const QRect maximumScreenGeometry = qApp->desktop()->availableGeometry(&widget);
CEikStatusPane *statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane();
- CEikButtonGroupContainer *buttonGroup = cba();
+ CEikButtonGroupContainer *buttonGroup = CEikButtonGroupContainer::Current();
//Enter
widget.showMaximized();
diff --git a/tests/auto/symbian/orientationchange/orientationchange.pro b/tests/auto/symbian/orientationchange/orientationchange.pro
index 08b34f9..98aa2ad 100644
--- a/tests/auto/symbian/orientationchange/orientationchange.pro
+++ b/tests/auto/symbian/orientationchange/orientationchange.pro
@@ -4,4 +4,5 @@ SOURCES += tst_orientationchange.cpp
symbian {
INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+ LIBS += -lcone -leikcore -lavkon # Screen orientation
}
diff --git a/tests/auto/symbian/orientationchange/tst_orientationchange.cpp b/tests/auto/symbian/orientationchange/tst_orientationchange.cpp
index eb3709d..2ac2f7f 100644
--- a/tests/auto/symbian/orientationchange/tst_orientationchange.cpp
+++ b/tests/auto/symbian/orientationchange/tst_orientationchange.cpp
@@ -45,6 +45,8 @@
#include <eikenv.h>
#include <aknappui.h>
+#include <private/qcore_symbian_p.h>
+#include <QDesktopWidget>
class tst_orientationchange : public QObject
{
@@ -151,6 +153,47 @@ void tst_orientationchange::resizeEventOnOrientationChange()
}
QCOMPARE(normalWidget->resizeEventCount, 0);
+ QDesktopWidget desktop;
+ QRect qtAvail = desktop.availableGeometry(normalWidget);
+ TRect clientRect = static_cast<CEikAppUi*>(CCoeEnv::Static()-> AppUi())->ClientRect();
+ QRect symbianAvail = qt_TRect2QRect(clientRect);
+ QCOMPARE(qtAvail, symbianAvail);
+
+ // Switch orientation back to original
+ orientation = orientation == CAknAppUi::EAppUiOrientationPortrait
+ ? CAknAppUi::EAppUiOrientationLandscape
+ : CAknAppUi::EAppUiOrientationPortrait;
+
+
+ fullScreenWidget->reset();
+ maximizedWidget->reset();
+ normalWidget->reset();
+
+ TRAP(err, appUi->SetOrientationL(orientation));
+
+ QCoreApplication::sendPostedEvents();
+ QCoreApplication::sendPostedEvents();
+
+ // setOrientationL is not guaranteed to change orientation
+ // (if emulator configured to support just portrait or landscape, then
+ // setOrientationL call shouldn't do anything).
+ // So let's ensure that we do not get resize event twice.
+
+ QVERIFY(fullScreenWidget->resizeEventCount <= 1);
+ if (fullScreenWidget->resizeEventCount) {
+ QCOMPARE(fullScreenWidget->size(), fullScreenWidget->resizeEventSize);
+ }
+ QVERIFY(maximizedWidget->resizeEventCount <= 1);
+ if (fullScreenWidget->resizeEventCount) {
+ QCOMPARE(maximizedWidget->size(), maximizedWidget->resizeEventSize);
+ }
+ QCOMPARE(normalWidget->resizeEventCount, 0);
+
+ qtAvail = desktop.availableGeometry(normalWidget);
+ clientRect = static_cast<CEikAppUi*>(CCoeEnv::Static()-> AppUi())->ClientRect();
+ symbianAvail = qt_TRect2QRect(clientRect);
+ QCOMPARE(qtAvail, symbianAvail);
+
TRAP(err, appUi->SetOrientationL(CAknAppUi::EAppUiOrientationUnspecified));
delete normalWidget;
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index c967dad..915a56d 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -3267,8 +3267,14 @@ void Configure::generateConfigfiles()
if (qmakeConfFile.open(QFile::WriteOnly | QFile::Text)) {
QTextStream qmakeConfStream;
qmakeConfStream.setDevice(&qmakeConfFile);
+ // While QMAKESPEC_ORIGINAL being relative or absolute doesn't matter for the
+ // primary use of this variable by qmake to identify the original mkspec, the
+ // variable is also used for few special cases where the absolute path is required.
+ // Conversely, the include of the original qmake.conf must be done using relative path,
+ // as some Qt binary deployments are done in a manner that doesn't allow for patching
+ // the paths at the installation time.
qmakeConfStream << "QMAKESPEC_ORIGINAL=" << pltSpec << endl << endl;
- qmakeConfStream << "include(" << pltSpec << "/qmake.conf)" << endl;
+ qmakeConfStream << "include(" << "../" << spec << "/qmake.conf)" << endl << endl;
qmakeConfStream.flush();
qmakeConfFile.close();
}
diff --git a/tools/runonphone/serenum_unix.cpp b/tools/runonphone/serenum_unix.cpp
index db6375e..86e797b 100644
--- a/tools/runonphone/serenum_unix.cpp
+++ b/tools/runonphone/serenum_unix.cpp
@@ -82,7 +82,7 @@ QList<SerialPortId> enumerateSerialPorts(int loglevel)
for (struct usb_bus *bus = usb_get_busses(); bus; bus = bus->next) {
for (struct usb_device *device = bus->devices; device; device = device->next) {
- for (int n = 0; n < device->descriptor.bNumConfigurations; ++n) {
+ for (int n = 0; n < device->descriptor.bNumConfigurations && device->config; ++n) {
struct usb_config_descriptor &usbConfig =device->config[n];
QList<int> usableInterfaces;
for (int m = 0; m < usbConfig.bNumInterfaces; ++m) {
@@ -158,6 +158,10 @@ QList<SerialPortId> enumerateSerialPorts(int loglevel)
<< "device" << device->filename
<< "interface" << descriptor.bInterfaceNumber;
}
+#ifdef Q_OS_MAC
+ eligibleInterfaces << QString("^cu\\.usbmodem.*%1$")
+ .arg(QString("%1").arg(descriptor.bInterfaceNumber, 1, 16).toUpper());
+#else
// ### manufacturer and product strings are only readable as root :(
if (!manufacturerString.isEmpty() && !productString.isEmpty()) {
eligibleInterfaces << QString("usb-%1_%2-if%3")
@@ -167,6 +171,7 @@ QList<SerialPortId> enumerateSerialPorts(int loglevel)
} else {
eligibleInterfaces << QString("if%1").arg(i, 2, 16, QChar('0')); // fix!
}
+#endif
eligibleInterfacesInfo << InterfaceInfo(manufacturerString, productString, device->descriptor.idVendor, device->descriptor.idProduct);
}
}
@@ -179,14 +184,24 @@ QList<SerialPortId> enumerateSerialPorts(int loglevel)
if (loglevel > 1)
qDebug() << " searching for interfaces:" << eligibleInterfaces;
+#ifdef Q_OS_MAC
+ QDir dir("/dev/");
+ bool allowAny = false;
+#else
QDir dir("/dev/serial/by-id/");
- foreach (const QFileInfo &info, dir.entryInfoList()) {
+ bool allowAny = eligibleInterfaces.isEmpty();
+#endif
+ foreach (const QFileInfo &info, dir.entryInfoList(QDir::System)) {
if (!info.isDir()) {
- bool usable = eligibleInterfaces.isEmpty();
+ bool usable = allowAny;
+ QString friendlyName = info.fileName();
foreach (const QString &iface, eligibleInterfaces) {
- if (info.fileName().contains(iface)) {
+ if (info.fileName().contains(QRegExp(iface))) {
if (loglevel > 1)
qDebug() << " found device file:" << info.fileName() << endl;
+#ifdef Q_OS_MAC
+ friendlyName = eligibleInterfacesInfo[eligibleInterfaces.indexOf(iface)].product;
+#endif
usable = true;
break;
}
@@ -195,7 +210,7 @@ QList<SerialPortId> enumerateSerialPorts(int loglevel)
continue;
SerialPortId id;
- id.friendlyName = info.fileName();
+ id.friendlyName = friendlyName;
id.portName = info.canonicalFilePath();
list << id;
}
@@ -208,11 +223,15 @@ QList<SerialPortId> enumerateSerialPorts(int loglevel)
<< iface.manufacturer
<< "Product:"
<< iface.product
+#ifdef Q_OS_LINUX
<< endl
<< " Load generic driver using:"
<< QString("sudo modprobe usbserial vendor=0x%1 product=0x%2")
.arg(iface.manufacturerid, 4, 16, QChar('0'))
.arg(iface.productid, 4, 16, QChar('0'));
+#else
+ ;
+#endif
}
}
return list;