summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-01-18 19:00:43 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-01-18 19:00:43 (GMT)
commitf62d047bf20cd45f78db14f1ef4f9ba7f7a7b131 (patch)
treecf7b8d64fbc94504822096314f56a4a16a66bfa1
parent7dee69caea20b189d5f4f8e27179c5abfd73a815 (diff)
parenta764519a658031ce2fb375b659ff889b5241357f (diff)
downloadQt-f62d047bf20cd45f78db14f1ef4f9ba7f7a7b131.zip
Qt-f62d047bf20cd45f78db14f1ef4f9ba7f7a7b131.tar.gz
Qt-f62d047bf20cd45f78db14f1ef4f9ba7f7a7b131.tar.bz2
Merge branch '4.6'
-rw-r--r--configure.exebin1176576 -> 1176064 bytes
-rw-r--r--dist/changes-4.6.170
-rw-r--r--doc/src/deployment/qt-conf.qdoc2
-rw-r--r--doc/src/examples/graphicsview-anchorlayout.qdoc48
-rw-r--r--doc/src/examples/graphicsview-flowlayout.qdoc50
-rw-r--r--doc/src/examples/graphicsview-simpleanchorlayout.qdoc48
-rw-r--r--doc/src/examples/graphicsview-weatheranchorlayout.qdoc48
-rw-r--r--doc/src/examples/network-download.qdoc53
-rw-r--r--doc/src/examples/network-downloadmanager.qdoc53
-rw-r--r--doc/src/examples/script-marshal.qdoc48
-rw-r--r--doc/src/examples/script-qscript.qdoc48
-rw-r--r--doc/src/examples/script-qsdbg.qdoc48
-rw-r--r--doc/src/examples/webkit-framecapture.qdoc51
-rw-r--r--doc/src/examples/widgets-softkeys.qdoc47
-rw-r--r--doc/src/examples/widgets-validators.qdoc47
-rw-r--r--doc/src/getting-started/examples.qdoc377
-rw-r--r--doc/src/getting-started/installation.qdoc33
-rw-r--r--doc/src/objectmodel/properties.qdoc19
-rw-r--r--doc/src/snippets/audio/main.cpp4
-rw-r--r--doc/src/snippets/code/doc_src_installation.qdoc18
-rw-r--r--doc/src/snippets/code/doc_src_properties.qdoc2
-rw-r--r--examples/graphicsview/graphicsview.pro1
-rw-r--r--examples/multimedia/audiodevices/audiodevices.cpp16
-rw-r--r--examples/multimedia/audioinput/audioinput.cpp4
-rw-r--r--examples/multimedia/audiooutput/audiooutput.cpp4
-rw-r--r--examples/widgets/validators/validators.ui321
-rw-r--r--mkspecs/features/symbian/platform_paths.prf2
-rw-r--r--mkspecs/linux-g++-maemo/qmake.conf2
-rw-r--r--qmake/generators/makefile.cpp14
-rw-r--r--src/3rdparty/phonon/mmf/abstractaudioeffect.h2
-rw-r--r--src/3rdparty/phonon/mmf/abstractplayer.h4
-rw-r--r--src/3rdparty/phonon/mmf/backend.h4
-rw-r--r--src/3rdparty/phonon/mmf/effectparameter.h2
-rw-r--r--src/3rdparty/phonon/mmf/mediaobject.h4
-rw-r--r--src/3rdparty/phonon/mmf/mmf_medianode.h2
-rw-r--r--src/3rdparty/phonon/mmf/videooutput.h2
-rw-r--r--src/3rdparty/phonon/mmf/videowidget.h4
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog12
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro11
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog9
-rw-r--r--src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def4
-rw-r--r--src/corelib/arch/qatomic_ia64.h2
-rw-r--r--src/corelib/global/qglobal.h4
-rw-r--r--src/corelib/io/qfile.cpp1
-rw-r--r--src/corelib/io/qfileinfo.cpp7
-rw-r--r--src/gui/dialogs/qfiledialog.cpp15
-rw-r--r--src/gui/dialogs/qfiledialog_mac.mm7
-rw-r--r--src/gui/dialogs/qmessagebox.cpp21
-rw-r--r--src/gui/effects/qgraphicseffect.cpp5
-rw-r--r--src/gui/effects/qgraphicseffect_p.h2
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp44
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h1
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp25
-rw-r--r--src/gui/image/qimage.cpp2
-rw-r--r--src/gui/image/qpixmapfilter.cpp2
-rw-r--r--src/gui/itemviews/qlistview.cpp7
-rw-r--r--src/gui/kernel/qapplication_s60.cpp11
-rw-r--r--src/gui/kernel/qdesktopwidget.cpp10
-rw-r--r--src/gui/kernel/qwidget_p.h1
-rw-r--r--src/gui/kernel/qwidget_s60.cpp9
-rw-r--r--src/gui/painting/qpaintengineex.cpp16
-rw-r--r--src/gui/painting/qpainter.cpp17
-rw-r--r--src/gui/painting/qprintengine_pdf.cpp26
-rw-r--r--src/gui/painting/qwindowsurface_s60.cpp8
-rw-r--r--src/gui/styles/qgtkstyle.cpp2
-rw-r--r--src/gui/text/qfont.cpp10
-rw-r--r--src/gui/widgets/qabstractspinbox.cpp2
-rw-r--r--src/gui/widgets/qlinecontrol.cpp10
-rw-r--r--src/gui/widgets/qstackedwidget.cpp7
-rw-r--r--src/multimedia/audio/qaudio_mac.cpp12
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo.cpp26
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo.h2
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp26
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp8
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp14
-rw-r--r--src/multimedia/audio/qaudioformat.cpp46
-rw-r--r--src/multimedia/audio/qaudioformat.h6
-rw-r--r--src/multimedia/audio/qaudioinput.cpp4
-rw-r--r--src/multimedia/audio/qaudioinput_alsa_p.cpp8
-rw-r--r--src/multimedia/audio/qaudioinput_mac_p.cpp2
-rw-r--r--src/multimedia/audio/qaudioinput_win32_p.cpp14
-rw-r--r--src/multimedia/audio/qaudiooutput.cpp4
-rw-r--r--src/multimedia/audio/qaudiooutput_alsa_p.cpp6
-rw-r--r--src/multimedia/audio/qaudiooutput_mac_p.cpp6
-rw-r--r--src/multimedia/audio/qaudiooutput_win32_p.cpp14
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp2
-rw-r--r--src/network/ssl/qsslsocket_p.h3
-rw-r--r--src/opengl/qgl.cpp97
-rw-r--r--src/opengl/qgl.h1
-rw-r--r--src/opengl/qgl_mac.mm110
-rw-r--r--src/opengl/qgl_p.h95
-rw-r--r--src/opengl/qgl_qws.cpp54
-rw-r--r--src/opengl/qgl_win.cpp100
-rw-r--r--src/opengl/qgl_wince.cpp36
-rw-r--r--src/opengl/qgl_x11.cpp138
-rw-r--r--src/opengl/qgl_x11egl.cpp194
-rw-r--r--src/opengl/qglframebufferobject.cpp12
-rw-r--r--src/opengl/qglpixelbuffer_mac.mm4
-rw-r--r--src/opengl/qglpixelbuffer_p.h1
-rw-r--r--src/opengl/qglpixelbuffer_win.cpp14
-rw-r--r--src/opengl/qpaintengine_opengl.cpp46
-rw-r--r--src/opengl/qwindowsurface_gl.cpp7
-rw-r--r--tests/auto/auto.pro10
-rw-r--r--tests/auto/maketestselftest/maketestselftest.pro9
-rw-r--r--tests/auto/maketestselftest/tst_maketestselftest.cpp100
-rw-r--r--tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp16
-rw-r--r--tests/auto/qaudioformat/tst_qaudioformat.cpp26
-rw-r--r--tests/auto/qaudioinput/tst_qaudioinput.cpp8
-rw-r--r--tests/auto/qaudiooutput/tst_qaudiooutput.cpp8
-rw-r--r--tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp25
-rw-r--r--tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp3
-rw-r--r--tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp44
-rw-r--r--tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp46
-rw-r--r--tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp57
-rw-r--r--tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp36
-rw-r--r--tests/auto/tests.xml821
-rw-r--r--tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp24
-rw-r--r--tools/configure/configureapp.cpp3
-rw-r--r--tools/qdoc3/test/macros.qdocconf2
121 files changed, 2299 insertions, 1869 deletions
diff --git a/configure.exe b/configure.exe
index a410efc..d88da13 100644
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/dist/changes-4.6.1 b/dist/changes-4.6.1
index 0971f40..6e95fd5 100644
--- a/dist/changes-4.6.1
+++ b/dist/changes-4.6.1
@@ -29,8 +29,10 @@ New features
Optimizations
-------------
- - Optimized foo in QSomeClass
- * See list of Important Behavior Changes below
+ - Optimized empty QUrl creation
+ * [QTBUG-4030] Empty QUrls no longer allocate memory now
+
+ * See list of Important Behavior Changes below
****************************************************************************
@@ -45,6 +47,17 @@ QtCore
and Symbian by using realpath() system call
* Avoid stat() when opening a file
+ - QLibrary and QPluginLoader
+ * Do not look at the Qt patch-level version embedded in plugins'
+ buildkeys when trying to determine if the plugin is compatible
+
+ - QProcessEnvironment
+ * [QTBUG-6701] Ensure we don't crash in operator==
+
+ - QTextEncoder
+ * [merge request 399] QTextEncoder::fromUnicode as QT3 support
+ member
+
- QXmlStreamreader
* [merge request 1926] Fix parsing of DTDs that contain empty markup
declarations
@@ -114,8 +127,30 @@ QtGui
QtDBus
------
- - foo
- * bar
+ - QDBusConnection
+ * [QTBUG-5979] Fixed the signal-delivery mechanism to update
+ correctly when the sender name changes/appears on the bus.
+ * [QTBUG-7041] Fixed marshalling of booleans in release mode.
+ * [QT-2307] Fixed calls with the QDBus::BlockWithGui mode.
+
+ - QDBusInterface
+ * Made it continue working even when the remote object
+ introspection fails.
+
+ - QDBusInterface and qdbuscpp2xml
+ * [QTBUG-5563] Fixed an issue with generating annotations in
+ signals
+
+ - QDBusPendingReply and QDBusReply
+ * [QTBUG-6571] Fixed a crash that would happen if you tried to
+ make a call with a disconnected QDBusConnection
+
+QtMultimedia
+------------
+
+ - QAudioOutput
+ * [Merge request 418] Fixed compilation the example provided for
+ QAudioOutput::start
QtNetwork
---------
@@ -124,6 +159,8 @@ QtNetwork
* HTTP: Smaller improvements
* HTTP: Send our locale with the HTTP request
* HTTP: Start Accept-language and Authorization header with capital letter
+ * HTTP: Fix caching algorithm, matching RFC 2612 and the documentation
+ * HTTP [QTBUG-7060]: Fix an issue with headers like "private, max-age=300"
* file: Introduce special subclass for higher performance with file:// URLs
- QTcpSocket
* [QTBUG-5799] Fix waitForConnected() on Windows
@@ -187,7 +224,7 @@ QtOpenVG
- [QTBUG-7051] Reset the OpenVG scissor after a native painting call-out.
- [QTBUG-7015] Avoid deep copies of QImage in QImage::bits() calls.
-QtwebKit
+QtWebKit
--------
- Fixed user agent string on Symbian (webkit.org/b/31961)
@@ -198,6 +235,9 @@ QtwebKit
- Fixed wrapping of QObjects with recurring identity (webkit.org/b/31681)
- Fixed compilation with ICC
- Fixed assertion when dragging SVG images (webkit.org/b/32511)
+ - Fixed crash with ACID3 test on Symbian
+ - Fixed security issue XSL stylesheets and security origins.
+ - Added the framecapture example to the default build (merge request 2235)
QtScript
--------
@@ -258,7 +298,15 @@ Third party components
Qt for Unix (X11 and Mac OS X)
------------------------------
- -
+ - [QTBUG-6755] Ensure we don't call select(2) with a negative timeout
+ if the timer expires during timeout recalculation.
+
+ - Added mkspecs for Sun CC that enable -library=stlport by default,
+ to restore STL capability with that compiler.
+
+ - [QTBUG-6576] Fixed compilation on HP-UX 11.11
+
+ - [QTBUG-6961] Fixed compilation on HURD
Qt for Linux/X11
----------------
@@ -359,5 +407,13 @@ Qt for Symbian
* Important Behavior Changes *
****************************************************************************
- -
+ - Phonon
+ * Include headers have been changed. The only official method for
+ including Phonon headers is <phonon/ClassName> or
+ <phonon/classname.h>. This change was necessary because of
+ frameworks on Mac.
+
+ Compatibility is provided for <Phonon/*> includes, but is not
+ guaranteed to work. Including <phonon> and <Phonon> is not
+ supported.
diff --git a/doc/src/deployment/qt-conf.qdoc b/doc/src/deployment/qt-conf.qdoc
index 4357c88..b195889 100644
--- a/doc/src/deployment/qt-conf.qdoc
+++ b/doc/src/deployment/qt-conf.qdoc
@@ -128,7 +128,7 @@
\list
\o 4.0.1 matches \c Paths/4
\o 4.1.5 matches \c Paths/4.1
- \o 4.6.3 matches \c Paths/4.2.5
+ \o 4.6.3 matches \c Paths/4.2.5 (because 4.2.5 is the latest version with the same major version number)
\o 5.0.0 matches \c Paths
\o 6.0.2 matches \c Paths/6
\endlist
diff --git a/doc/src/examples/graphicsview-anchorlayout.qdoc b/doc/src/examples/graphicsview-anchorlayout.qdoc
new file mode 100644
index 0000000..96a255c
--- /dev/null
+++ b/doc/src/examples/graphicsview-anchorlayout.qdoc
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example graphicsview/anchorlayout
+ \title Anchor Layout Example
+
+ The Anchor Layout example demonstrates the use of the QGraphicsAnchorLayout
+ class.
+*/
diff --git a/doc/src/examples/graphicsview-flowlayout.qdoc b/doc/src/examples/graphicsview-flowlayout.qdoc
new file mode 100644
index 0000000..5b73069
--- /dev/null
+++ b/doc/src/examples/graphicsview-flowlayout.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example graphicsview/flowlayout
+ \title Graphics View Flow Layout Example
+
+ The Graphics View Flow Layout example shows the use of a flow layout
+ in a Graphics View widget.
+
+ See the \l{Flow Layout Example} for a corresponding widget-based example.
+*/
diff --git a/doc/src/examples/graphicsview-simpleanchorlayout.qdoc b/doc/src/examples/graphicsview-simpleanchorlayout.qdoc
new file mode 100644
index 0000000..ddfc854
--- /dev/null
+++ b/doc/src/examples/graphicsview-simpleanchorlayout.qdoc
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example graphicsview/simpleanchorlayout
+ \title Simple Anchor Layout Example
+
+ The Simple Anchor Layout example shows the basic use of the
+ QGraphicsAnchorLayout class.
+*/
diff --git a/doc/src/examples/graphicsview-weatheranchorlayout.qdoc b/doc/src/examples/graphicsview-weatheranchorlayout.qdoc
new file mode 100644
index 0000000..930c5c0
--- /dev/null
+++ b/doc/src/examples/graphicsview-weatheranchorlayout.qdoc
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example graphicsview/weatheranchorlayout
+ \title Weather Anchor Layout Example
+
+ The Weather Anchor Layout example shows more complex use of the
+ QGraphicsAnchorLayout class to create a real-world window layout.
+*/
diff --git a/doc/src/examples/network-download.qdoc b/doc/src/examples/network-download.qdoc
new file mode 100644
index 0000000..3481cad
--- /dev/null
+++ b/doc/src/examples/network-download.qdoc
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example network/download
+ \title Network Download Example
+
+ The Network Download example shows how to perform multiple downloads in
+ parallel using the QNetworkAccessManager class.
+
+ This example is designed to be run from the command line.
+
+ The \l{Network Download Manager Example} implements a more complex system
+ that places files in a queue for sequential downloading.
+*/
diff --git a/doc/src/examples/network-downloadmanager.qdoc b/doc/src/examples/network-downloadmanager.qdoc
new file mode 100644
index 0000000..8040c24
--- /dev/null
+++ b/doc/src/examples/network-downloadmanager.qdoc
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example network/downloadmanager
+ \title Network Download Manager Example
+
+ The Network Download example shows how to implement a queue for multiple
+ downloads using the QNetworkAccessManager class.
+
+ This example is designed to be run from the command line.
+
+ See the \l{Network Download Example} for a simpler version of this example
+ that obtains multiple files in parallel.
+*/
diff --git a/doc/src/examples/script-marshal.qdoc b/doc/src/examples/script-marshal.qdoc
new file mode 100644
index 0000000..30c8f97
--- /dev/null
+++ b/doc/src/examples/script-marshal.qdoc
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example script/marshal
+ \title Qt Script Marshalling Example
+
+ The Qt Script Marshalling example demonstrates the marshalling of value
+ types between C++ and Qt Script.
+*/
diff --git a/doc/src/examples/script-qscript.qdoc b/doc/src/examples/script-qscript.qdoc
new file mode 100644
index 0000000..1d0d12c
--- /dev/null
+++ b/doc/src/examples/script-qscript.qdoc
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example script/qscript
+ \title Qt Script Interpreter Example
+
+ The Qt Script Interpreter example shows how to create an interactive
+ interpreter for Qt Script.
+*/
diff --git a/doc/src/examples/script-qsdbg.qdoc b/doc/src/examples/script-qsdbg.qdoc
new file mode 100644
index 0000000..332740f
--- /dev/null
+++ b/doc/src/examples/script-qsdbg.qdoc
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example script/qsdbg
+ \title Qt Script Debugger Example
+
+ The Qt Script Debugger example shows how to enable the Qt Script debugger
+ for command line debugging.
+*/
diff --git a/doc/src/examples/webkit-framecapture.qdoc b/doc/src/examples/webkit-framecapture.qdoc
new file mode 100644
index 0000000..cf4e3da
--- /dev/null
+++ b/doc/src/examples/webkit-framecapture.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example webkit/framecapture
+ \title WebKit Frame Capture Example
+
+ The Frame Capture example shows how to use the WebKit browser engine to
+ obtain images of frames in a Web page.
+
+ This example is designed to be run from the command line. Run the
+ example without arguments to obtain usage information.
+*/
diff --git a/doc/src/examples/widgets-softkeys.qdoc b/doc/src/examples/widgets-softkeys.qdoc
new file mode 100644
index 0000000..3afb930
--- /dev/null
+++ b/doc/src/examples/widgets-softkeys.qdoc
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/softkeys
+ \title Soft Keys Example
+
+ The Soft Keys example shows how to use soft key input on the Symbian platform.
+*/
diff --git a/doc/src/examples/widgets-validators.qdoc b/doc/src/examples/widgets-validators.qdoc
new file mode 100644
index 0000000..0bdd6e6
--- /dev/null
+++ b/doc/src/examples/widgets-validators.qdoc
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/validators
+ \title Validators Example
+
+ The Validators example shows the signal emission behavior of input validators.
+*/
diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc
index 3d1360d..bdc6558 100644
--- a/doc/src/getting-started/examples.qdoc
+++ b/doc/src/getting-started/examples.qdoc
@@ -74,13 +74,12 @@
\l{Qt Demonstrations}{selection of demos} that deliberately show off
Qt's features. You might want to look at these as well.
- \table
- \row
- \o{2,1} \l{Widgets Examples}{\bold Widgets}
- \o{2,1} \l{Dialog Examples}{\bold Dialogs}
- \row
- \o \image widget-examples.png
- \o
+ \section1 \l{Widgets Examples}{Widgets}
+ \beginfloatleft
+ \l{Widgets Examples}{\inlineimage widget-examples.png
+ }
+
+ \endfloat
Qt comes with a large range of standard widgets that users of modern
applications have come to expect. You can also develop your own custom
widgets and controls, and use them alongside standard widgets.
@@ -89,28 +88,39 @@
be used to change the appearance of standard widgets and appropriately
written custom widgets.
- \o \image dialog-examples.png Dialogs
- \o
+ \clearfloat
+ \section1 \l{Dialog Examples}{Dialogs}
+ \beginfloatleft
+ \l{Dialog Examples}{\inlineimage dialog-examples.png
+ }
+
+ \endfloat
Qt includes standard dialogs for many common operations, such as file
selection, printing, and color selection.
Custom dialogs can also be created for specialized modal or modeless
interactions with users.
- \row
- \o{2,1} \l{Main Window Examples}{\bold{Main Windows}}
- \o{2,1} \l{Layout Examples}{\bold Layouts}
+ \clearfloat
+ \section1 \l{Main Window Examples}{Main Windows}
+ \beginfloatleft
+ \l{Main Window Examples}{\inlineimage mainwindow-examples.png
+ }
- \row
- \o \image mainwindow-examples.png MainWindows
- \o All the standard features of application main windows are provided by Qt.
+ \endfloat
+ All the standard features of application main windows are provided by Qt.
Main windows can have pull down menus, tool bars, and dock windows. These
separate forms of user input are unified in an integrated action system that
also supports keyboard shortcuts and accelerator keys in menu items.
- \o \image layout-examples.png Layouts
- \o
+ \clearfloat
+ \section1 \l{Layout Examples}{Layouts}
+ \beginfloatleft
+ \l{Layout Examples}{\inlineimage layout-examples.png
+ }
+
+ \endfloat
Qt uses a layout-based approach to widget management. Widgets are arranged in
the optimal positions in windows based on simple layout rules, leading to a
consistent look and feel.
@@ -118,45 +128,58 @@
Custom layouts can be used to provide more control over the positions and
sizes of child widgets.
- \row
- \o{2,1} \l{Item Views Examples}{\bold{Item Views}}
- \o{2,1} \l{Graphics View Examples}{\bold{Graphics View}}
- \row
- \o \image itemview-examples.png ItemViews
- \o
+ \clearfloat
+ \section1 \l{Item Views Examples}{Item Views}
+ \beginfloatleft
+ \l{Item Views Examples}{\inlineimage itemview-examples.png
+ }
+
+ \endfloat
Item views are widgets that typically display data sets. Qt 4's model/view
framework lets you handle large data sets by separating the underlying data
from the way it is represented to the user, and provides support for
customized rendering through the use of delegates.
- \o \image graphicsview-examples.png GraphicsView
- \o
+ \clearfloat
+ \section1 \l{Graphics View Examples}{Graphics View}
+ \beginfloatleft
+ \l{Graphics View Examples}{\inlineimage graphicsview-examples.png
+ }
+
+ \endfloat
Qt is provided with a comprehensive canvas through the GraphicsView
classes.
- \row
- \o{2,1} \l{Painting Examples}{\bold{Painting}}
- \o{2,1} \l{Rich Text Examples}{\bold{Rich Text}}
- \row
- \o \image painting-examples.png Painting
- \o
+ \clearfloat
+ \section1 \l{Painting Examples}{Painting}
+ \beginfloatleft
+ \l{Painting Examples}{\inlineimage painting-examples.png
+ }
+
+ \endfloat
Qt's painting system is able to render vector graphics, images, and outline
font-based text with sub-pixel accuracy accuracy using anti-aliasing to
improve rendering quality.
- \o \image richtext-examples.png RichText
- \o
+ \clearfloat
+ \section1 \l{Rich Text Examples}{Rich Text}
+ \beginfloatleft
+ \l{Rich Text Examples}{\inlineimage richtext-examples.png
+ }
+
+ \endfloat
Qt provides powerful document-oriented rich text engine that supports Unicode
and right-to-left scripts. Documents can be manipulated using a cursor-based
API, and their contents can be imported and exported as both HTML and in a
custom XML format.
- \row
- \o{2,1} \l{Desktop Examples}{\bold Desktop}
- \o{2,1} \l{Drag and Drop Examples}{\bold{Drag and Drop}}
- \row
- \o \image desktop-examples.png
- \o
+ \clearfloat
+ \section1 \l{Desktop Examples}{Desktop}
+ \beginfloatleft
+ \l{Desktop Examples}{\inlineimage desktop-examples.png
+ }
+
+ \endfloat
Qt provides features to enable applications to integrate with the user's
preferred desktop environment.
@@ -164,20 +187,26 @@
support for desktop services can be used to improve the appearance of
applications and take advantage of underlying desktop facilities.
- \o \image draganddrop-examples.png DragAndDrop
- \o
+ \clearfloat
+ \section1 \l{Drag and Drop Examples}{Drag and Drop}
+ \beginfloatleft
+ \l{Drag and Drop Examples}{\inlineimage draganddrop-examples.png
+ }
+
+ \endfloat
Qt supports native drag and drop on all platforms via an extensible
MIME-based system that enables applications to send data to each other in the
most appropriate formats.
Drag and drop can also be implemented for internal use by applications.
- \row
- \o{2,1} \l{Threading and Concurrent Programming Examples}{\bold{Threading and Concurrent Programming}}
- \o{2,1} \l{Tools Examples}{\bold{Tools}}
- \row
- \o \image thread-examples.png
- \o
+ \clearfloat
+ \section1 \l{Threading and Concurrent Programming Examples}{Threading and Concurrent Programming}
+ \beginfloatleft
+ \l{Threading and Concurrent Programming Examples}{\inlineimage thread-examples.png
+ }
+
+ \endfloat
Qt 4 makes it easier than ever to write multithreaded applications. More
classes have been made usable from non-GUI threads, and the signals and slots
mechanism can now be used to communicate between threads.
@@ -185,32 +214,46 @@
The QtConcurrent namespace includes a collection of classes and functions
for straightforward concurrent programming.
- \o \image tool-examples.png Tools
- \o
+ \clearfloat
+ \section1 \l{Tools Examples}{Tools}
+ \beginfloatleft
+ \l{Tools Examples}{\inlineimage tool-examples.png
+ }
+
+ \endfloat
Qt is equipped with a range of capable tool classes, from containers and
iterators to classes for string handling and manipulation.
Other classes provide application infrastructure support, handling plugin
loading and managing configuration files.
- \row
- \o{2,1} \l{Network Examples}{\bold{Network}}
- \o{2,1} \l{Inter-Process Communication Examples}{\bold{Inter-Process Communication}}
- \row
- \o \image network-examples.png Network
- \o
+ \clearfloat
+ \section1 \l{Network Examples}{Network}
+ \beginfloatleft
+ \l{Network Examples}{\inlineimage network-examples.png
+ }
+
+ \endfloat
Qt is provided with an extensive set of network classes to support both
client-based and server side network programming.
- \o \image ipc-examples.png IPC
- \o
+ \clearfloat
+ \section1 \l{Inter-Process Communication Examples}{Inter-Process Communication}
+ \beginfloatleft
+ \l{Inter-Process Communication Examples}{\inlineimage ipc-examples.png
+ }
- \row
- \o{2,1} \l{OpenGL Examples}{\bold{OpenGL}}\bold{ and }\l{OpenVG Examples}{\bold{OpenVG}}\bold{ Examples}
- \o{2,1} \l{Multimedia Examples}{\bold{Multimedia Framework}}
- \row
- \o \image opengl-examples.png OpenGL
- \o
+ \endfloat
+ Simple, lightweight inter-process communication can be performed using shared
+ memory and local sockets.
+
+ \clearfloat
+ \section1 \l{OpenGL Examples}{OpenGL} and \l{OpenVG Examples}{OpenVG} Examples
+ \beginfloatleft
+ \l{OpenGL Examples}{\inlineimage opengl-examples.png
+ }
+
+ \endfloat
Qt provides support for integration with OpenGL implementations on all
platforms, giving developers the opportunity to display hardware accelerated
3D graphics alongside a more conventional user interface.
@@ -218,137 +261,191 @@
Qt provides support for integration with OpenVG implementations on
platforms with suitable drivers.
- \o \image phonon-examples.png
- \o
+ \clearfloat
+ \section1 \l{Multimedia Examples}{Multimedia Framework}
+ \beginfloatleft
+ \l{Multimedia Examples}{\inlineimage phonon-examples.png
+ }
+
+ \endfloat
Qt provides low-level audio support on linux,windows and mac platforms by default and
an audio plugin API to allow developers to implement there own audio support for
custom devices and platforms.
The Phonon Multimedia Framework brings multimedia support to Qt applications.
- \row
- \o{2,1} \l{SQL Examples}{\bold{SQL}}
- \o{2,1} \l{XML Examples}{\bold{XML}}
- \row
- \o \image sql-examples.png SQL
- \o
+ \clearfloat
+ \section1 \l{SQL Examples}{SQL}
+ \beginfloatleft
+ \l{SQL Examples}{\inlineimage sql-examples.png
+ }
+
+ \endfloat
Qt provides extensive database interoperability, with support for products
from both open source and proprietary vendors.
SQL support is integrated with Qt's model/view architecture, making it easier
to provide GUI integration for your database applications.
- \o \image xml-examples.png XML
- \o
+ \clearfloat
+ \section1 \l{XML Examples}{XML}
+ \beginfloatleft
+ \l{XML Examples}{\inlineimage xml-examples.png
+ }
+
+ \endfloat
XML parsing and handling is supported through SAX and DOM compliant APIs
as well as streaming classes.
The XQuery/XPath and XML Schema engines in the QtXmlPatterns modules
provide classes for querying XML files and custom data models.
- \row
- \o{2,1} \l{Qt Designer Examples}{\bold{Qt Designer}}
- \o{2,1} \l{UiTools Examples}{\bold UiTools}
- \row
- \o \image designer-examples.png Designer
- \o
+ \clearfloat
+ \section1 \l{Qt Designer Examples}{Qt Designer}
+ \beginfloatleft
+ \l{Qt Designer Examples}{\inlineimage designer-examples.png
+ }
+
+ \endfloat
Qt Designer is a capable graphical user interface designer that lets you
create and configure forms without writing code. GUIs created with
Qt Designer can be compiled into an application or created at run-time.
- \o \image uitools-examples.png UiTools
- \o
+ \clearfloat
+ \section1 \l{UiTools Examples}{UiTools}
+ \beginfloatleft
+ \l{UiTools Examples}{\inlineimage uitools-examples.png
+ }
+
+ \endfloat
+ User interfaces created with Qt Designer can be loaded and displayed at
+ run-time using the facilities of the QtUiTools module without the need
+ to generate code in advance.
- \row
- \o{2,1} \l{Qt Linguist Examples}{\bold{Qt Linguist}}
- \o{2,1} \l{Qt Script Examples}{\bold{Qt Script}}
- \row
- \o \image linguist-examples.png QtLinguist
- \o
+ \clearfloat
+ \section1 \l{Qt Linguist Examples}{Qt Linguist}
+ \beginfloatleft
+ \l{Qt Linguist Examples}{\inlineimage linguist-examples.png
+ }
+
+ \endfloat
Internationalization is a core feature of Qt.
- \o \image qtscript-examples.png
- \o
+ \clearfloat
+ \section1 \l{Qt Script Examples}{Qt Script}
+ \beginfloatleft
+ \l{Qt Script Examples}{\inlineimage qtscript-examples.png
+ }
+
+ \endfloat
Qt is provided with a powerful embedded scripting environment through the QtScript
classes.
- \row
- \o{2,1} \l{WebKit Examples}{\bold WebKit}
- \o{2,1} \l{Help System Examples}{\bold{Help System}}
- \row
- \o \image webkit-examples.png
- \o
+ \clearfloat
+ \section1 \l{WebKit Examples}{WebKit}
+ \beginfloatleft
+ \l{WebKit Examples}{\inlineimage webkit-examples.png
+ }
+
+ \endfloat
Qt provides an integrated Web browser component based on WebKit, the popular
open source browser engine.
- \o \image assistant-examples.png HelpSystem
- \o
+ \clearfloat
+ \section1 \l{Help System Examples}{Help System}
+ \beginfloatleft
+ \l{Help System Examples}{\inlineimage assistant-examples.png
+ }
+
+ \endfloat
Support for interactive help is provided by the Qt Assistant application.
Developers can take advantages of the facilities it offers to display
specially-prepared documentation to users of their applications.
- \row
- \o{2,1} \l{State Machine Examples}{\bold{State Machine}}
- \o{2,1} \l{Animation Framework Examples}{\bold{Animation Framework}}
- \row
- \o \image statemachine-examples.png
- \o
+ \clearfloat
+ \section1 \l{State Machine Examples}{State Machine}
+ \beginfloatleft
+ \l{State Machine Examples}{\inlineimage statemachine-examples.png
+ }
+
+ \endfloat
Qt provides a powerful hierarchical finite state machine through the Qt State
Machine classes.
- \o \image animation-examples.png
- \o
+ \clearfloat
+ \section1 \l{Animation Framework Examples}{Animation Framework}
+ \beginfloatleft
+ \l{Animation Framework Examples}{\inlineimage animation-examples.png
+ }
+
+ \endfloat
These examples show to to use the \l{The Animation Framework}{animation framework}
to build highly animated, high-performance GUIs.
- \row
- \o{2,1} \l{Multi-Touch Examples}{\bold{Multi-Touch Framework}}
- \o{2,1} \l{Gestures Examples}{\bold{Gestures}}
+ \clearfloat
+ \section1 \l{Multi-Touch Examples}{Multi-Touch Framework}
+ \beginfloatleft
+ \l{Multi-Touch Examples}{\inlineimage multitouch-examples.png
+ }
- \row
- \o \image multitouch-examples.png
- \o
+ \endfloat
Support for multi-touch input makes it possible for developers to create
extensible and intuitive user interfaces.
- \o \image gestures-examples.png
- \o
+ \clearfloat
+ \section1 \l{Gestures Examples}{Gestures}
+ \beginfloatleft
+ \l{Gestures Examples}{\inlineimage gestures-examples.png
+ }
+
+ \endfloat
Applications can be written to respond to gestures as a natural input method.
These examples show how to enable support for standard and custom gestures in
applications.
- \row
- \o{2,1} \l{D-Bus Examples}{\bold{D-Bus}}
- \o{2,1} \l{Qt for Embedded Linux Examples}{\bold{Qt for Embedded Linux}}
+ \clearfloat
+ \section1 \l{D-Bus Examples}{D-Bus}
+ \beginfloatleft
+ \l{D-Bus Examples}{\inlineimage qt-embedded-examples.png
+ }
- \row
- \o \image qt-embedded-examples.png
- \o
+ \endfloat
Systems with limited resources, specialized hardware, and small
screens require special attention.
- \o \image dbus-examples.png D-Bus
- \o
+ \clearfloat
+ \section1 \l{Qt for Embedded Linux Examples}{Qt for Embedded Linux}
+ \beginfloatleft
+ \l{Qt for Embedded Linux Examples}{\inlineimage dbus-examples.png
+ }
+
+ \endfloat
D-Bus is an inter-process communication protocol for Unix/Linux systems.
These examples demonstrate how to write application that communicate with
each other.
- \row
- \o{2,1} \l{ActiveQt Examples}{\bold ActiveQt}
- \o{2,1} \l{Qt Quarterly}{\bold{Qt Quarterly}}
+ \clearfloat
+ \section1 \l{ActiveQt Examples}{ActiveQt}
+ \beginfloatleft
+ \l{ActiveQt Examples}{\inlineimage activeqt-examples.png
+ }
- \row
- \o \image activeqt-examples.png ActiveQt
- \o
+ \endfloat
These examples demonstrate how to write ActiveX controls and control servers
with Qt, and how to use ActiveX controls and COM objects in a Qt application.
- \o \image qq-thumbnail.png QtQuarterly
- \o
+ \clearfloat
+ \section1 \l{Qt Quarterly}{Qt Quarterly}
+ \beginfloatleft
+ \l{Qt Quarterly}{\inlineimage qq-thumbnail.png
+ }
+
+ \endfloat
One more valuable source for examples and explanations of Qt
- features is the archive of the \l {Qt Quarterly}.
+ features is the archive of \l{Qt Quarterly}, a newsletter for
+ Qt developers.
- \endtable
+ \clearfloat
*/
/*!
@@ -385,12 +482,14 @@
\o \l{widgets/scribble}{Scribble}\raisedaster
\o \l{widgets/shapedclock}{Shaped Clock}\raisedaster
\o \l{widgets/sliders}{Sliders}\raisedaster
+ \o \l{widgets/softkeys}{Soft Keys}
\o \l{widgets/spinboxes}{Spin Boxes}\raisedaster
\o \l{widgets/styles}{Styles}\raisedaster
\o \l{widgets/stylesheet}{Style Sheet}\raisedaster
\o \l{widgets/tablet}{Tablet}\raisedaster
\o \l{widgets/tetrix}{Tetrix}\raisedaster
\o \l{widgets/tooltips}{Tooltips}\raisedaster
+ \o \l{widgets/validators}{Validators}
\o \l{widgets/wiggly}{Wiggly}\raisedaster
\o \l{widgets/windowflags}{Window Flags}\raisedaster
\endlist
@@ -546,6 +645,15 @@
\o \l{graphicsview/portedcanvas}{Ported Canvas}
\endlist
+ These examples show the use of graphics widgets and layouts.
+
+ \list
+ \o \l{graphicsview/anchorlayouts}{Anchor Layouts}
+ \o \l{graphicsview/flowlayout}{Flow Layout}
+ \o \l{graphicsview/simpleanchorlayouts}{Simple Anchor Layouts}
+ \o \l{graphicsview/weatheranchorlayouts}{Weather Anchor Layouts}
+ \endlist
+
Some examples demonstrate the use of graphics effects with canvas items.
\list
@@ -761,6 +869,8 @@
\o \l{network/blockingfortuneclient}{Blocking Fortune Client}\raisedaster
\o \l{network/broadcastreceiver}{Broadcast Receiver}
\o \l{network/broadcastsender}{Broadcast Sender}
+ \o \l{network/download}{Download}
+ \o \l{network/downloadmanager}{Download Manager}
\o \l{network/network-chat}{Network Chat}
\o \l{network/fortuneclient}{Fortune Client}\raisedaster
\o \l{network/fortuneserver}{Fortune Server}\raisedaster
@@ -1043,6 +1153,9 @@
\o \l{script/context2d}{Context2D}\raisedaster
\o \l{script/defaultprototypes}{Default Prototypes}\raisedaster
\o \l{script/helloscript}{Hello Script}\raisedaster
+ \o \l{script/marshal}{Qt Script Marshalling}
+ \o \l{script/qscript}{Qt Script Interpreter}
+ \o \l{script/qsdbg}{Qt Script Debugging}
\o \l{script/qstetrix}{Qt Script Tetrix}\raisedaster
\o \l{script/customclass}{Custom Script Class}\raisedaster
\endlist
@@ -1073,6 +1186,8 @@
\o A more advanced browser example, showing the use of jQuery to perform effects.
\row \o \l{webkit/formextractor}{Form Extractor}
\o How to use JavaScript and C++ together to read page content.
+ \row \o \l{webkit/framecapture}{Frame Capture}
+ \o How to use the WebKit browser engine to obtain images of Web pages.
\row \o \l{webkit/googlechat}{Google Chat}
\o A real-world example that shows how an existing Web-based service can be accessed
using QtWebKit.
diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index 3867b3b..5f95c5a 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.qdoc
@@ -640,17 +640,38 @@ If you are using pre-built binaries, follow the instructions given in the
Congratulations, Qt is now ready to use.
- \o Running Qt demos
+ \o Installing Qt libraries on the device
- We've included a subset of the Qt demos in this package for you
- to try out. An excellent starting point is the "fluidlauncher"
- demo. To run the demo on a real device, you first have to install
+ To run the demo on a real device, you first have to install
the Qt libraries on the device:
\snippet doc/src/snippets/code/doc_src_installation.qdoc 29
- \note You will need to supply certificate that allows installation
- of binaries with "All -Tcb" capability to your device.
+ The Qt libraries are built with "All -Tcb" capability, so that
+ they can support all types of application.
+ If you don't have a suitable certificate, it is possible to patch
+ the binaries as follows:
+
+ \list A
+ \o Installing Qt without a certificate
+
+ If you have no certificate, build a self signed Qt:
+
+ \snippet doc/src/snippets/code/doc_src_installation.qdoc 34
+
+ \o Installing Qt with a Symbian developer certificate
+
+ If you have a symbian-signed developer certificate, specify the
+ capabilities you can sign for, for example:
+
+ \snippet doc/src/snippets/code/doc_src_installation.qdoc 35
+ \endlist
+
+ \o Running Qt demos
+
+ We've included a subset of the Qt demos in this package for you
+ to try out. An excellent starting point is the "fluidlauncher"
+ demo.
Similarly, install fluidlauncher to the device:
diff --git a/doc/src/objectmodel/properties.qdoc b/doc/src/objectmodel/properties.qdoc
index 076c544..a807caf 100644
--- a/doc/src/objectmodel/properties.qdoc
+++ b/doc/src/objectmodel/properties.qdoc
@@ -208,17 +208,20 @@
the property type. The meta-object compiler enforces these
requirements.
- Given a pointer to an instance of MyClass or a pointer to an
- instance of QObject that happens to be an instance of MyClass, we
- have two ways to set its priority property.
+ Given a pointer to an instance of MyClass or a pointer to a
+ QObject that is an instance of MyClass, we have two ways to set
+ its priority property:
\snippet doc/src/snippets/code/doc_src_properties.qdoc 6
- In the example, the enumeration type used for the property type
- was locally declared in MyClass. Had it been declared in another
- class, its fully qualified name (i.e., OtherClass::Priority) would
- be required. In addition, that other class must also inherit
- QObject and register the enum type using Q_ENUMS().
+ In the example, the enumeration type that is the property type is
+ declared in MyClass and registered with the \l{Meta-Object System}
+ using the Q_ENUMS() macro. This makes the enumeration values
+ available as strings for use as in the call to setProperty(). Had
+ the enumeration type been declared in another class, its fully
+ qualified name (i.e., OtherClass::Priority) would be required, and
+ that other class would also have to inherit QObject and register
+ the enumeration type there using the Q_ENUMS() macro.
A similar macro, Q_FLAGS(), is also available. Like Q_ENUMS(), it
registers an enumeration type, but it marks the type as being a
diff --git a/doc/src/snippets/audio/main.cpp b/doc/src/snippets/audio/main.cpp
index f000075..019f208 100644
--- a/doc/src/snippets/audio/main.cpp
+++ b/doc/src/snippets/audio/main.cpp
@@ -89,9 +89,9 @@ private:
{
//![1]
QAudioFormat format;
- format.setSampleRate(44100);
+ format.setFrequency(44100);
//![1]
- format.setChannelCount(2);
+ format.setChannels(2);
format.setSampleSize(16);
format.setCodec("audio/pcm");
format.setByteOrder(QAudioFormat::LittleEndian);
diff --git a/doc/src/snippets/code/doc_src_installation.qdoc b/doc/src/snippets/code/doc_src_installation.qdoc
index 7680ec8..b3c9903 100644
--- a/doc/src/snippets/code/doc_src_installation.qdoc
+++ b/doc/src/snippets/code/doc_src_installation.qdoc
@@ -222,3 +222,21 @@ abld build gcce urel
//! [33]
SYMBIANBUILD_DEPENDENCYOFF=1
//! [33]
+
+//! [34]
+cd src\s60installs
+patch_capabilities.pl Qt_template.pkg release-armv5
+make sis QT_SIS_OPTIONS=-i
+cd ..\3rdparty\webkit\WebCore
+patch_capabilities.pl QtWebkit_template.pkg release-armv5
+make sis QT_SIS_OPTIONS=-i
+//! [34]
+
+//! [35]
+cd src\s60installs
+patch_capabilities.pl Qt_template.pkg release-armv5 "ALL -Tcb -AllFiles -DRM"
+make sis QT_SIS_OPTIONS=-i QT_SIS_CERTIFICATE=<certificate file> QT_SIS_KEY=<certificate key file>
+cd ..\3rdparty\webkit\WebCore
+patch_capabilities.pl QtWebKit_template.pkg release-armv5 "ALL -Tcb -AllFiles -DRM"
+make sis QT_SIS_OPTIONS=-i QT_SIS_CERTIFICATE=<certificate file> QT_SIS_KEY=<certificate key file>
+//! [35]
diff --git a/doc/src/snippets/code/doc_src_properties.qdoc b/doc/src/snippets/code/doc_src_properties.qdoc
index 38cc139..962d930 100644
--- a/doc/src/snippets/code/doc_src_properties.qdoc
+++ b/doc/src/snippets/code/doc_src_properties.qdoc
@@ -112,7 +112,7 @@ MyClass *myinstance = new MyClass;
QObject *object = myinstance;
myinstance->setPriority(MyClass::VeryHigh);
-object->setProperty("priority", (int)MyClass::VeryHigh);
+object->setProperty("priority", "VeryHigh");
//! [6]
diff --git a/examples/graphicsview/graphicsview.pro b/examples/graphicsview/graphicsview.pro
index 210ab1f..8f65d51 100644
--- a/examples/graphicsview/graphicsview.pro
+++ b/examples/graphicsview/graphicsview.pro
@@ -10,6 +10,7 @@ SUBDIRS = \
dragdroprobot \
flowlayout \
anchorlayout \
+ simpleanchorlayout \
weatheranchorlayout
contains(QT_CONFIG, qt3support):SUBDIRS += portedcanvas portedasteroids
diff --git a/examples/multimedia/audiodevices/audiodevices.cpp b/examples/multimedia/audiodevices/audiodevices.cpp
index 6373d57..7d09c38 100644
--- a/examples/multimedia/audiodevices/audiodevices.cpp
+++ b/examples/multimedia/audiodevices/audiodevices.cpp
@@ -96,8 +96,8 @@ void AudioTest::test()
} else {
QAudioFormat nearest = deviceInfo.nearestFormat(settings);
logOutput->append(tr("Failed"));
- nearestFreq->setText(QString("%1").arg(nearest.sampleRate()));
- nearestChannel->setText(QString("%1").arg(nearest.channelCount()));
+ nearestFreq->setText(QString("%1").arg(nearest.frequency()));
+ nearestChannel->setText(QString("%1").arg(nearest.channels()));
nearestCodec->setText(nearest.codec());
nearestSampleSize->setText(QString("%1").arg(nearest.sampleSize()));
@@ -149,18 +149,18 @@ void AudioTest::deviceChanged(int idx)
deviceInfo = deviceBox->itemData(idx).value<QAudioDeviceInfo>();
frequencyBox->clear();
- QList<int> freqz = deviceInfo.supportedSampleRates();
+ QList<int> freqz = deviceInfo.supportedFrequencies();
for(int i = 0; i < freqz.size(); ++i)
frequencyBox->addItem(QString("%1").arg(freqz.at(i)));
if(freqz.size())
- settings.setSampleRate(freqz.at(0));
+ settings.setFrequency(freqz.at(0));
channelsBox->clear();
- QList<int> chz = deviceInfo.supportedChannelCounts();
+ QList<int> chz = deviceInfo.supportedChannels();
for(int i = 0; i < chz.size(); ++i)
channelsBox->addItem(QString("%1").arg(chz.at(i)));
if(chz.size())
- settings.setChannelCount(chz.at(0));
+ settings.setChannels(chz.at(0));
codecsBox->clear();
QStringList codecz = deviceInfo.supportedCodecs();
@@ -217,12 +217,12 @@ void AudioTest::deviceChanged(int idx)
void AudioTest::freqChanged(int idx)
{
// freq has changed
- settings.setSampleRate(frequencyBox->itemText(idx).toInt());
+ settings.setFrequency(frequencyBox->itemText(idx).toInt());
}
void AudioTest::channelChanged(int idx)
{
- settings.setChannelCount(channelsBox->itemText(idx).toInt());
+ settings.setChannels(channelsBox->itemText(idx).toInt());
}
void AudioTest::codecChanged(int idx)
diff --git a/examples/multimedia/audioinput/audioinput.cpp b/examples/multimedia/audioinput/audioinput.cpp
index 86650da..8cc9948 100644
--- a/examples/multimedia/audioinput/audioinput.cpp
+++ b/examples/multimedia/audioinput/audioinput.cpp
@@ -198,8 +198,8 @@ InputTest::InputTest()
pullMode = true;
- format.setSampleRate(8000);
- format.setChannelCount(1);
+ format.setFrequency(8000);
+ format.setChannels(1);
format.setSampleSize(16);
format.setSampleType(QAudioFormat::SignedInt);
format.setByteOrder(QAudioFormat::LittleEndian);
diff --git a/examples/multimedia/audiooutput/audiooutput.cpp b/examples/multimedia/audiooutput/audiooutput.cpp
index 58dbbaf..0c57f4d 100644
--- a/examples/multimedia/audiooutput/audiooutput.cpp
+++ b/examples/multimedia/audiooutput/audiooutput.cpp
@@ -164,8 +164,8 @@ AudioTest::AudioTest()
gen->start();
- settings.setSampleRate(SYSTEM_FREQ);
- settings.setChannelCount(1);
+ settings.setFrequency(SYSTEM_FREQ);
+ settings.setChannels(1);
settings.setSampleSize(16);
settings.setCodec("audio/pcm");
settings.setByteOrder(QAudioFormat::LittleEndian);
diff --git a/examples/widgets/validators/validators.ui b/examples/widgets/validators/validators.ui
index f05b96f..cd984e6 100644
--- a/examples/widgets/validators/validators.ui
+++ b/examples/widgets/validators/validators.ui
@@ -1,41 +1,42 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>ValidatorsForm</class>
- <widget class="QWidget" name="ValidatorsForm" >
- <property name="geometry" >
+ <widget class="QWidget" name="ValidatorsForm">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>526</width>
- <height>668</height>
+ <height>443</height>
</rect>
</property>
- <property name="windowTitle" >
- <string>Form</string>
+ <property name="windowTitle">
+ <string>Validators</string>
</property>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
+ <layout class="QVBoxLayout">
+ <property name="spacing">
<number>6</number>
</property>
+ <property name="margin">
+ <number>9</number>
+ </property>
<item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
+ <layout class="QHBoxLayout">
+ <property name="spacing">
<number>6</number>
</property>
+ <property name="margin">
+ <number>0</number>
+ </property>
<item>
- <widget class="LocaleSelector" name="localeSelector" />
+ <widget class="LocaleSelector" name="localeSelector"/>
</item>
<item>
<spacer>
- <property name="orientation" >
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
@@ -46,84 +47,84 @@
</layout>
</item>
<item>
- <widget class="QGroupBox" name="groupBox" >
- <property name="title" >
+ <widget class="QGroupBox" name="groupBox">
+ <property name="title">
<string>QIntValidator</string>
</property>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
+ <layout class="QVBoxLayout">
+ <property name="spacing">
<number>6</number>
</property>
+ <property name="margin">
+ <number>9</number>
+ </property>
<item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
+ <layout class="QHBoxLayout">
+ <property name="spacing">
<number>6</number>
</property>
+ <property name="margin">
+ <number>0</number>
+ </property>
<item>
- <layout class="QGridLayout" >
- <property name="margin" >
+ <layout class="QGridLayout">
+ <property name="margin">
<number>0</number>
</property>
- <property name="spacing" >
+ <property name="spacing">
<number>6</number>
</property>
- <item row="0" column="0" >
- <widget class="QLabel" name="label" >
- <property name="text" >
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
<string>Min:</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QSpinBox" name="minVal" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
+ <item row="0" column="1">
+ <widget class="QSpinBox" name="minVal">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimum" >
+ <property name="minimum">
<number>-1000000</number>
</property>
- <property name="maximum" >
+ <property name="maximum">
<number>1000000</number>
</property>
</widget>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="label_2" >
- <property name="text" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
<string>Max:</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="1" column="1" >
- <widget class="QSpinBox" name="maxVal" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
+ <item row="1" column="1">
+ <widget class="QSpinBox" name="maxVal">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimum" >
+ <property name="minimum">
<number>-1000000</number>
</property>
- <property name="maximum" >
+ <property name="maximum">
<number>1000000</number>
</property>
- <property name="value" >
+ <property name="value">
<number>1000</number>
</property>
</widget>
@@ -131,39 +132,39 @@
</layout>
</item>
<item>
- <widget class="QFrame" name="frame" >
- <property name="frameShape" >
+ <widget class="QFrame" name="frame">
+ <property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
- <property name="frameShadow" >
+ <property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
+ <layout class="QVBoxLayout">
+ <property name="spacing">
<number>6</number>
</property>
+ <property name="margin">
+ <number>9</number>
+ </property>
<item>
- <widget class="LEDWidget" name="ledWidget" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <widget class="LEDWidget" name="ledWidget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="pixmap" >
- <pixmap resource="validators.qrc" >:/ledoff.png</pixmap>
+ <property name="pixmap">
+ <pixmap resource="validators.qrc">:/ledoff.png</pixmap>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
- <widget class="QLabel" name="label_7" >
- <property name="text" >
+ <widget class="QLabel" name="label_7">
+ <property name="text">
<string>editingFinished()</string>
</property>
</widget>
@@ -175,13 +176,13 @@
</item>
<item>
<spacer>
- <property name="orientation" >
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeType" >
+ <property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
@@ -190,134 +191,134 @@
</spacer>
</item>
<item>
- <widget class="QLineEdit" name="editor" />
+ <widget class="QLineEdit" name="editor"/>
</item>
</layout>
</widget>
</item>
<item>
- <widget class="QGroupBox" name="groupBox_2" >
- <property name="title" >
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="title">
<string>QDoubleValidator</string>
</property>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
+ <layout class="QVBoxLayout">
+ <property name="spacing">
<number>6</number>
</property>
+ <property name="margin">
+ <number>9</number>
+ </property>
<item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
+ <layout class="QHBoxLayout">
+ <property name="spacing">
<number>6</number>
</property>
+ <property name="margin">
+ <number>0</number>
+ </property>
<item>
- <layout class="QGridLayout" >
- <property name="margin" >
+ <layout class="QGridLayout">
+ <property name="margin">
<number>0</number>
</property>
- <property name="spacing" >
+ <property name="spacing">
<number>6</number>
</property>
- <item row="0" column="0" >
- <widget class="QLabel" name="label_3" >
- <property name="text" >
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
<string>Min:</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QDoubleSpinBox" name="doubleMinVal" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
+ <item row="0" column="1">
+ <widget class="QDoubleSpinBox" name="doubleMinVal">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimum" >
+ <property name="minimum">
<double>-100000.000000000000000</double>
</property>
- <property name="maximum" >
+ <property name="maximum">
<double>100000.000000000000000</double>
</property>
- <property name="value" >
+ <property name="value">
<double>0.000000000000000</double>
</property>
</widget>
</item>
- <item row="0" column="2" >
- <widget class="QLabel" name="label_5" >
- <property name="text" >
+ <item row="0" column="2">
+ <widget class="QLabel" name="label_5">
+ <property name="text">
<string>Format:</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="0" column="3" >
- <widget class="QComboBox" name="doubleFormat" >
+ <item row="0" column="3">
+ <widget class="QComboBox" name="doubleFormat">
<item>
- <property name="text" >
+ <property name="text">
<string>Standard</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Scientific</string>
</property>
</item>
</widget>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="label_4" >
- <property name="text" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_4">
+ <property name="text">
<string>Max:</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="1" column="1" >
- <widget class="QDoubleSpinBox" name="doubleMaxVal" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
+ <item row="1" column="1">
+ <widget class="QDoubleSpinBox" name="doubleMaxVal">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimum" >
+ <property name="minimum">
<double>-100000.000000000000000</double>
</property>
- <property name="maximum" >
+ <property name="maximum">
<double>100000.000000000000000</double>
</property>
- <property name="value" >
+ <property name="value">
<double>1000.000000000000000</double>
</property>
</widget>
</item>
- <item row="1" column="2" >
- <widget class="QLabel" name="label_6" >
- <property name="text" >
+ <item row="1" column="2">
+ <widget class="QLabel" name="label_6">
+ <property name="text">
<string>Decimals:</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="1" column="3" >
- <widget class="QSpinBox" name="doubleDecimals" >
- <property name="value" >
+ <item row="1" column="3">
+ <widget class="QSpinBox" name="doubleDecimals">
+ <property name="value">
<number>2</number>
</property>
</widget>
@@ -325,36 +326,36 @@
</layout>
</item>
<item>
- <widget class="QFrame" name="frame_2" >
- <property name="frameShape" >
+ <widget class="QFrame" name="frame_2">
+ <property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
- <property name="frameShadow" >
+ <property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
+ <layout class="QVBoxLayout">
+ <property name="spacing">
<number>6</number>
</property>
+ <property name="margin">
+ <number>9</number>
+ </property>
<item>
- <widget class="LEDWidget" name="doubleLedWidget" >
- <property name="text" >
+ <widget class="LEDWidget" name="doubleLedWidget">
+ <property name="text">
<string/>
</property>
- <property name="pixmap" >
- <pixmap resource="validators.qrc" >:/ledoff.png</pixmap>
+ <property name="pixmap">
+ <pixmap resource="validators.qrc">:/ledoff.png</pixmap>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
- <widget class="QLabel" name="label_8" >
- <property name="text" >
+ <widget class="QLabel" name="label_8">
+ <property name="text">
<string>editingFinished()</string>
</property>
</widget>
@@ -366,13 +367,13 @@
</item>
<item>
<spacer>
- <property name="orientation" >
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeType" >
+ <property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
@@ -381,17 +382,17 @@
</spacer>
</item>
<item>
- <widget class="QLineEdit" name="doubleEditor" />
+ <widget class="QLineEdit" name="doubleEditor"/>
</item>
</layout>
</widget>
</item>
<item>
<spacer>
- <property name="orientation" >
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>111</height>
@@ -400,19 +401,19 @@
</spacer>
</item>
<item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
+ <layout class="QHBoxLayout">
+ <property name="spacing">
<number>6</number>
</property>
+ <property name="margin">
+ <number>0</number>
+ </property>
<item>
<spacer>
- <property name="orientation" >
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
@@ -421,8 +422,8 @@
</spacer>
</item>
<item>
- <widget class="QPushButton" name="pushButton" >
- <property name="text" >
+ <widget class="QPushButton" name="pushButton">
+ <property name="text">
<string>Quit</string>
</property>
</widget>
@@ -444,7 +445,7 @@
</customwidget>
</customwidgets>
<resources>
- <include location="validators.qrc" />
+ <include location="validators.qrc"/>
</resources>
<connections>
<connection>
@@ -453,11 +454,11 @@
<receiver>ValidatorsForm</receiver>
<slot>close()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>94</x>
<y>274</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>131</x>
<y>260</y>
</hint>
diff --git a/mkspecs/features/symbian/platform_paths.prf b/mkspecs/features/symbian/platform_paths.prf
index f5caae0..c723d8c 100644
--- a/mkspecs/features/symbian/platform_paths.prf
+++ b/mkspecs/features/symbian/platform_paths.prf
@@ -59,7 +59,7 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# No platform specific paths provided, use default paths
- exists($${EPOCROOT}epoc32/include/platform) { # New SF structure
+ exists($${EPOCROOT}epoc32/include/mw) { # New SF structure
# ---------------------------------------
# Location, where the applications layer specific public headers are exported
diff --git a/mkspecs/linux-g++-maemo/qmake.conf b/mkspecs/linux-g++-maemo/qmake.conf
index b0f3ca3..38c26a6 100644
--- a/mkspecs/linux-g++-maemo/qmake.conf
+++ b/mkspecs/linux-g++-maemo/qmake.conf
@@ -29,5 +29,7 @@ QMAKE_CXXFLAGS_RELEASE += -g -fno-omit-frame-pointer -fno-optimize-sibling-call
# Work round PowerVR SGX 1.3 driver bug with glScissor & FBOs:
DEFINES += QT_GL_NO_SCISSOR_TEST
+# Work round SGX 1.4 driver bug (text corrupted), modify glyph cache width:
+DEFINES += QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024
load(qt_config)
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 4a01a89..7424d1d 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -2411,16 +2411,14 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
//qmake it
if(!subtarget->profile.isEmpty()) {
- QString out = out_directory + subtarget->makefile,
- in = fileFixify(in_directory + subtarget->profile, in_directory);
- if(in.startsWith(in_directory))
- in = in.mid(in_directory.length());
+ QString out = subtarget->makefile;
+ QString in = fileFixify(in_directory + subtarget->profile, out_directory, QString(), FileFixifyAbsolute);
if(out.startsWith(in_directory))
out = out.mid(in_directory.length());
t << mkfile << ": " << "\n\t";
if(!in_directory.isEmpty()) {
- t << mkdir_p_asstring(in_directory)
- << in_directory_cdin
+ t << mkdir_p_asstring(out_directory)
+ << out_directory_cdin
<< "$(QMAKE) " << in << buildArgs(in_directory) << " -o " << out
<< in_directory_cdout << endl;
} else {
@@ -2431,8 +2429,8 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
t << " FORCE";
t << "\n\t";
if(!in_directory.isEmpty()) {
- t << mkdir_p_asstring(in_directory)
- << in_directory_cdin
+ t << mkdir_p_asstring(out_directory)
+ << out_directory_cdin
<< "$(QMAKE) " << in << buildArgs(in_directory) << " -o " << out
<< in_directory_cdout << endl;
} else {
diff --git a/src/3rdparty/phonon/mmf/abstractaudioeffect.h b/src/3rdparty/phonon/mmf/abstractaudioeffect.h
index 9878472..436e8e4 100644
--- a/src/3rdparty/phonon/mmf/abstractaudioeffect.h
+++ b/src/3rdparty/phonon/mmf/abstractaudioeffect.h
@@ -23,7 +23,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <AudioEffectBase.h>
-#include <Phonon/EffectInterface>
+#include <phonon/effectinterface.h>
#include "audioplayer.h"
#include "effectparameter.h"
diff --git a/src/3rdparty/phonon/mmf/abstractplayer.h b/src/3rdparty/phonon/mmf/abstractplayer.h
index dbcbe63..cec5568 100644
--- a/src/3rdparty/phonon/mmf/abstractplayer.h
+++ b/src/3rdparty/phonon/mmf/abstractplayer.h
@@ -19,8 +19,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#ifndef PHONON_MMF_ABSTRACTPLAYER_H
#define PHONON_MMF_ABSTRACTPLAYER_H
-#include <Phonon/phononnamespace.h>
-#include <Phonon/MediaSource.h>
+#include <phonon/phononnamespace.h>
+#include <phonon/mediasource.h>
#include <QObject>
diff --git a/src/3rdparty/phonon/mmf/backend.h b/src/3rdparty/phonon/mmf/backend.h
index 6b85625..9361544 100644
--- a/src/3rdparty/phonon/mmf/backend.h
+++ b/src/3rdparty/phonon/mmf/backend.h
@@ -22,8 +22,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include "ancestormovemonitor.h"
#include "effectfactory.h"
-#include <Phonon/MediaSource>
-#include <Phonon/BackendInterface>
+#include <phonon/mediasource.h>
+#include <phonon/backendinterface.h>
#include <QScopedPointer>
QT_BEGIN_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/effectparameter.h b/src/3rdparty/phonon/mmf/effectparameter.h
index 27cc018..892ed4d 100644
--- a/src/3rdparty/phonon/mmf/effectparameter.h
+++ b/src/3rdparty/phonon/mmf/effectparameter.h
@@ -19,7 +19,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#ifndef PHONON_MMF_EFFECTPARAMETER_H
#define PHONON_MMF_EFFECTPARAMETER_H
-#include <Phonon/EffectParameter>
+#include <phonon/effectparameter.h>
QT_BEGIN_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/mediaobject.h b/src/3rdparty/phonon/mmf/mediaobject.h
index c87d755..d6248e2 100644
--- a/src/3rdparty/phonon/mmf/mediaobject.h
+++ b/src/3rdparty/phonon/mmf/mediaobject.h
@@ -19,8 +19,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#ifndef PHONON_MMF_MEDIAOBJECT_H
#define PHONON_MMF_MEDIAOBJECT_H
-#include <Phonon/MediaSource>
-#include <Phonon/MediaObjectInterface>
+#include <phonon/mediasource.h>
+#include <phonon/mediaobjectinterface.h>
#include <QScopedPointer>
#include <QTimer>
diff --git a/src/3rdparty/phonon/mmf/mmf_medianode.h b/src/3rdparty/phonon/mmf/mmf_medianode.h
index 0ed21c4..f2f64e0 100644
--- a/src/3rdparty/phonon/mmf/mmf_medianode.h
+++ b/src/3rdparty/phonon/mmf/mmf_medianode.h
@@ -20,7 +20,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#define PHONON_MMF_MEDIANODE_H
#include <QObject>
-#include <Phonon/EffectInterface>
+#include <phonon/effectinterface.h>
#include "audioplayer.h"
QT_BEGIN_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/videooutput.h b/src/3rdparty/phonon/mmf/videooutput.h
index 2788401..3e9c036 100644
--- a/src/3rdparty/phonon/mmf/videooutput.h
+++ b/src/3rdparty/phonon/mmf/videooutput.h
@@ -24,7 +24,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <QRect>
#include "defs.h"
-#include <Phonon/VideoWidget>
+#include <phonon/videowidget.h>
#include <e32std.h>
class RWindowBase;
diff --git a/src/3rdparty/phonon/mmf/videowidget.h b/src/3rdparty/phonon/mmf/videowidget.h
index a876748..899dca6 100644
--- a/src/3rdparty/phonon/mmf/videowidget.h
+++ b/src/3rdparty/phonon/mmf/videowidget.h
@@ -23,8 +23,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include "videooutput.h"
#include <QtGui/QWidget>
-#include <Phonon/VideoWidget>
-#include <Phonon/VideoWidgetInterface>
+#include <phonon/videowidget.h>
+#include <phonon/videowidgetinterface.h>
QT_BEGIN_NAMESPACE
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index b69ac98..4f33e22 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -8,4 +8,4 @@ The commit imported was from the
and has the sha1 checksum
- bd6591b4acaf2172ab05702153ef539c0ac89cbb
+ 8f6992f4e8f027818429d428393b08068eca9ffa
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index ab5b131..02daf86 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-01-13 Miikka Heikkinen <miikka.heikkinen@digia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt/Symbian] Added missing vendor information to qtwebkit.sis
+
+ This information is necessary to Symbian sign the package.
+
+ http://bugreports.qt.nokia.com/browse/QTBUG-7290
+
+ * WebCore.pro:
+
2010-01-12 Jakub Wieczorek <faw217@gmail.com>
Reviewed by Adam Barth.
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index 3eba696..1489fa0 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -9,12 +9,21 @@ symbian: {
webkitlibs.sources = QtWebKit.dll
webkitlibs.path = /sys/bin
+ vendorinfo = \
+ "; Localised Vendor name" \
+ "%{\"Nokia, Qt\"}" \
+ " " \
+ "; Unique Vendor name" \
+ ":\"Nokia, Qt\"" \
+ " "
+ webkitlibs.pkg_prerules = vendorinfo
+
DEPLOYMENT += webkitlibs
TARGET.UID3 = 0x200267C2
# RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target.
# Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000.
- MMP_RULES += "LINKEROPTION armcc --rw-base 0xE00000"
+ QMAKE_LFLAGS.ARMCC += --rw-base 0xE00000
}
include($$PWD/../WebKit.pri)
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 357b787..cd47982 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,12 @@
+2010-01-14 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Update Symbian .def symbol export files after private API additions.
+
+ * symbian/bwins/QtWebKitu.def:
+ * symbian/eabi/QtWebKitu.def:
+
2009-12-18 Joe Ligman <joseph.ligman@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def b/src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def
index e5631f8..086e986 100644
--- a/src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def
+++ b/src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def
@@ -620,4 +620,8 @@ EXPORTS
?staticMetaObject@QWebPage@@2UQMetaObject@@B @ 619 NONAME ; struct QMetaObject const QWebPage::staticMetaObject
?staticMetaObject@QWebView@@2UQMetaObject@@B @ 620 NONAME ; struct QMetaObject const QWebView::staticMetaObject
?attributeNames@QWebElement@@QBE?AVQStringList@@ABVQString@@@Z @ 621 NONAME ; class QStringList QWebElement::attributeNames(class QString const &) const
+ ?qt_networkAccessAllowed@@YAX_N@Z @ 622 NONAME ; void qt_networkAccessAllowed(bool)
+ ?qt_resumeActiveDOMObjects@@YAXPAVQWebFrame@@@Z @ 623 NONAME ; void qt_resumeActiveDOMObjects(class QWebFrame *)
+ ?qt_suspendActiveDOMObjects@@YAXPAVQWebFrame@@@Z @ 624 NONAME ; void qt_suspendActiveDOMObjects(class QWebFrame *)
+ ?qtwebkit_webframe_scrollRecursively@@YA_NPAVQWebFrame@@HH@Z @ 625 NONAME ; bool qtwebkit_webframe_scrollRecursively(class QWebFrame *, int, int)
diff --git a/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def b/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def
index 4aad884..5dd2e20 100644
--- a/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def
+++ b/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def
@@ -690,4 +690,8 @@ EXPORTS
_ZThn8_N16QGraphicsWebView10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 689 NONAME
_ZThn8_NK16QGraphicsWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 690 NONAME
_ZNK11QWebElement14attributeNamesERK7QString @ 691 NONAME
+ _Z23qt_networkAccessAllowedb @ 692 NONAME
+ _Z25qt_resumeActiveDOMObjectsP9QWebFrame @ 693 NONAME
+ _Z26qt_suspendActiveDOMObjectsP9QWebFrame @ 694 NONAME
+ _Z35qtwebkit_webframe_scrollRecursivelyP9QWebFrameii @ 695 NONAME
diff --git a/src/corelib/arch/qatomic_ia64.h b/src/corelib/arch/qatomic_ia64.h
index e015863..8c824f3 100644
--- a/src/corelib/arch/qatomic_ia64.h
+++ b/src/corelib/arch/qatomic_ia64.h
@@ -205,7 +205,7 @@ inline bool QBasicAtomicInt::deref()
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
{
- return (T *)_InterlockedExchangePointer(&_q_value, newValue);
+ return (T *)_InterlockedExchangePointer(reinterpret_cast<void * volatile*>(&_q_value), newValue);
}
template <typename T>
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index d5cee07..c4cf3f0 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -2420,6 +2420,10 @@ QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathSysconf();
//enabling new graphics resources
#define QT_SYMBIAN_SUPPORTS_SGIMAGE
#define QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER
+
+#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS
+#define Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
+#endif
#endif
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index 6395cc7..4c7f3f0 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -643,6 +643,7 @@ QFile::remove()
qWarning("QFile::remove: Empty or null file name");
return false;
}
+ unsetError();
close();
if(error() == QFile::NoError) {
if(fileEngine()->remove()) {
diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp
index b4437db..e90529e 100644
--- a/src/corelib/io/qfileinfo.cpp
+++ b/src/corelib/io/qfileinfo.cpp
@@ -573,10 +573,13 @@ QString QFileInfo::canonicalFilePath() const
QString QFileInfo::absolutePath() const
{
Q_D(const QFileInfo);
- if (d->data->fileName.isEmpty())
+
+ if (!d->data->fileEngine) {
+ return QLatin1String("");
+ } else if (d->data->fileName.isEmpty()) {
qWarning("QFileInfo::absolutePath: Constructed with empty filename");
- if(!d->data->fileEngine)
return QLatin1String("");
+ }
return d->getFileName(QAbstractFileEngine::AbsolutePathName);
}
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp
index 3d59463..21650bb 100644
--- a/src/gui/dialogs/qfiledialog.cpp
+++ b/src/gui/dialogs/qfiledialog.cpp
@@ -1222,12 +1222,6 @@ QFileDialog::ViewMode QFileDialog::viewMode() const
void QFileDialog::setFileMode(QFileDialog::FileMode mode)
{
Q_D(QFileDialog);
- if (d->nativeDialogInUse){
- d->model->setFilter(d->filterForMode(filter()));
- d->setFilter_sys();
- return;
- }
-
d->fileMode = mode;
d->retranslateWindowTitle();
@@ -1263,6 +1257,11 @@ void QFileDialog::setFileMode(QFileDialog::FileMode mode)
}
}
setLabelText(Accept, buttonText);
+ if (d->nativeDialogInUse){
+ d->setFilter_sys();
+ return;
+ }
+
d->qFileDialogUi->fileTypeCombo->setEnabled(!testOption(ShowDirsOnly));
d->_q_updateOkButton();
}
@@ -1300,6 +1299,10 @@ void QFileDialog::setAcceptMode(QFileDialog::AcceptMode mode)
d->qFileDialogUi->lookInCombo->setEditable(false);
}
d->retranslateWindowTitle();
+#if defined(Q_WS_MAC)
+ d->deleteNativeDialog_sys();
+ setAttribute(Qt::WA_DontShowOnScreen, false);
+#endif
}
/*
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm
index db5c356..67daced 100644
--- a/src/gui/dialogs/qfiledialog_mac.mm
+++ b/src/gui/dialogs/qfiledialog_mac.mm
@@ -639,9 +639,16 @@ void QFileDialogPrivate::setFilter_sys()
{
#ifndef QT_MAC_USE_COCOA
#else
+ Q_Q(QFileDialog);
QMacCocoaAutoReleasePool pool;
QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
*(delegate->mQDirFilter) = model->filter();
+ delegate->mFileMode = fileMode;
+ [delegate->mSavePanel setTitle:qt_mac_QStringToNSString(q->windowTitle())];
+ [delegate->mSavePanel setPrompt:[delegate strip:acceptLabel]];
+ if (fileNameLabelExplicitlySat)
+ [delegate->mSavePanel setNameFieldLabel:[delegate strip:qFileDialogUi->fileNameLabel->text()]];
+
[delegate updateProperties];
#endif
}
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp
index 30892f2..d1b2e3f 100644
--- a/src/gui/dialogs/qmessagebox.cpp
+++ b/src/gui/dialogs/qmessagebox.cpp
@@ -58,6 +58,7 @@
#include <QtGui/qtextdocument.h>
#include <QtGui/qapplication.h>
#include <QtGui/qtextedit.h>
+#include <QtGui/qtextbrowser.h>
#include <QtGui/qmenu.h>
#include "qdialog_p.h"
#include <QtGui/qfont.h>
@@ -188,8 +189,8 @@ public:
bool autoAddOkButton;
QAbstractButton *detectedEscapeButton;
QLabel *informativeLabel;
-#ifdef Q_OS_SYMBIAN
- QTextEdit *textEdit;
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
+ QTextBrowser *textBrowser;
#endif
QPointer<QObject> receiverToDisconnectOnClose;
QByteArray memberToDisconnectOnClose;
@@ -2462,12 +2463,12 @@ void QMessageBox::setInformativeText(const QString &text)
#endif
label->setWordWrap(true);
QGridLayout *grid = static_cast<QGridLayout *>(layout());
-#ifdef Q_OS_SYMBIAN
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
label->hide();
- QTextEdit *textEdit = new QTextEdit(this);
- textEdit->setReadOnly(true);
- grid->addWidget(textEdit, 1, 1, 1, 1);
- d->textEdit = textEdit;
+ QTextBrowser *textBrowser = new QTextBrowser(this);
+ textBrowser->setOpenExternalLinks(true);
+ grid->addWidget(textBrowser, 1, 1, 1, 1);
+ d->textBrowser = textBrowser;
#else
grid->addWidget(label, 1, 1, 1, 1);
#endif
@@ -2475,9 +2476,9 @@ void QMessageBox::setInformativeText(const QString &text)
}
d->informativeLabel->setText(text);
-#ifdef Q_OS_SYMBIAN
- //We need to put the informative label inside textEdit to enable scrolling of long texts.
- d->textEdit->setText(d->informativeLabel->text());
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
+ //We need to put the informative label inside textBrowser to enable scrolling of long texts.
+ d->textBrowser->setText(d->informativeLabel->text());
#endif
d->updateSize();
diff --git a/src/gui/effects/qgraphicseffect.cpp b/src/gui/effects/qgraphicseffect.cpp
index 90145fe..ad23df3 100644
--- a/src/gui/effects/qgraphicseffect.cpp
+++ b/src/gui/effects/qgraphicseffect.cpp
@@ -374,6 +374,11 @@ QGraphicsEffectSourcePrivate::~QGraphicsEffectSourcePrivate()
invalidateCache();
}
+void QGraphicsEffectSourcePrivate::setCachedOffset(const QPoint &offset)
+{
+ m_cachedOffset = offset;
+}
+
void QGraphicsEffectSourcePrivate::invalidateCache(InvalidateReason reason) const
{
if (m_cachedMode != QGraphicsEffect::PadToEffectiveBoundingRect
diff --git a/src/gui/effects/qgraphicseffect_p.h b/src/gui/effects/qgraphicseffect_p.h
index 91ad74a..e34dbf9 100644
--- a/src/gui/effects/qgraphicseffect_p.h
+++ b/src/gui/effects/qgraphicseffect_p.h
@@ -129,8 +129,10 @@ public:
QGraphicsEffect::PixmapPadMode mode = QGraphicsEffect::PadToTransparentBorder) const = 0;
virtual void effectBoundingRectChanged() = 0;
+ void setCachedOffset(const QPoint &offset);
void invalidateCache(InvalidateReason reason = SourceChanged) const;
Qt::CoordinateSystem currentCachedSystem() const { return m_cachedSystem; }
+ QGraphicsEffect::PixmapPadMode currentCachedMode() const { return m_cachedMode; }
friend class QGraphicsScenePrivate;
friend class QGraphicsItem;
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 168a9a3..cae9660 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -10715,27 +10715,18 @@ void QGraphicsItemEffectSourcePrivate::draw(QPainter *painter)
}
}
-QPixmap QGraphicsItemEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QPoint *offset,
- QGraphicsEffect::PixmapPadMode mode) const
+QRect QGraphicsItemEffectSourcePrivate::paddedEffectRect(Qt::CoordinateSystem system, QGraphicsEffect::PixmapPadMode mode, const QRectF &sourceRect, bool *unpadded) const
{
- const bool deviceCoordinates = (system == Qt::DeviceCoordinates);
- if (!info && deviceCoordinates) {
- // Device coordinates without info not yet supported.
- qWarning("QGraphicsEffectSource::pixmap: Not yet implemented, lacking device context");
- return QPixmap();
- }
- if (!item->d_ptr->scene)
- return QPixmap();
- QGraphicsScenePrivate *scened = item->d_ptr->scene->d_func();
-
- const QRectF sourceRect = boundingRect(system);
QRectF effectRectF;
- bool unpadded = false;
+ if (unpadded)
+ *unpadded = false;
+
if (mode == QGraphicsEffect::PadToEffectiveBoundingRect) {
if (info) {
effectRectF = item->graphicsEffect()->boundingRectFor(boundingRect(Qt::DeviceCoordinates));
- unpadded = (effectRectF.size() == sourceRect.size());
+ if (unpadded)
+ *unpadded = (effectRectF.size() == sourceRect.size());
if (info && system == Qt::LogicalCoordinates)
effectRectF = info->painter->worldTransform().inverted().mapRect(effectRectF);
} else {
@@ -10747,10 +10738,29 @@ QPixmap QGraphicsItemEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QP
effectRectF = sourceRect.adjusted(-1.5, -1.5, 1.5, 1.5);
} else {
effectRectF = sourceRect;
- unpadded = true;
+ if (unpadded)
+ *unpadded = true;
+ }
+
+ return effectRectF.toAlignedRect();
+}
+
+QPixmap QGraphicsItemEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QPoint *offset,
+ QGraphicsEffect::PixmapPadMode mode) const
+{
+ const bool deviceCoordinates = (system == Qt::DeviceCoordinates);
+ if (!info && deviceCoordinates) {
+ // Device coordinates without info not yet supported.
+ qWarning("QGraphicsEffectSource::pixmap: Not yet implemented, lacking device context");
+ return QPixmap();
}
+ if (!item->d_ptr->scene)
+ return QPixmap();
+ QGraphicsScenePrivate *scened = item->d_ptr->scene->d_func();
- QRect effectRect = effectRectF.toAlignedRect();
+ bool unpadded;
+ const QRectF sourceRect = boundingRect(system);
+ QRect effectRect = paddedEffectRect(system, mode, sourceRect, &unpadded);
if (offset)
*offset = effectRect.topLeft();
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index c8d2061..2d34b80 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -609,6 +609,7 @@ public:
QPixmap pixmap(Qt::CoordinateSystem system,
QPoint *offset,
QGraphicsEffect::PixmapPadMode mode) const;
+ QRect paddedEffectRect(Qt::CoordinateSystem system, QGraphicsEffect::PixmapPadMode mode, const QRectF &sourceRect, bool *unpadded = 0) const;
QGraphicsItem *item;
QGraphicsItemPaintInfo *info;
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 5504803..83a6b9c 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -4688,8 +4688,31 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter *
if (sourced->currentCachedSystem() != Qt::LogicalCoordinates
&& sourced->lastEffectTransform != painter->worldTransform())
{
+ bool unclipped = false;
+ if (sourced->lastEffectTransform.type() <= QTransform::TxTranslate
+ && painter->worldTransform().type() <= QTransform::TxTranslate)
+ {
+ QRectF itemRect = item->boundingRect();
+ if (!item->d_ptr->children.isEmpty())
+ itemRect |= item->childrenBoundingRect();
+
+ QRectF oldSourceRect = sourced->lastEffectTransform.mapRect(itemRect);
+ QRectF newSourceRect = painter->worldTransform().mapRect(itemRect);
+
+ QRect oldEffectRect = sourced->paddedEffectRect(sourced->currentCachedSystem(), sourced->currentCachedMode(), oldSourceRect);
+ QRect newEffectRect = sourced->paddedEffectRect(sourced->currentCachedSystem(), sourced->currentCachedMode(), newSourceRect);
+
+ QRect deviceRect(0, 0, painter->device()->width(), painter->device()->height());
+ if (deviceRect.contains(oldEffectRect) && deviceRect.contains(newEffectRect)) {
+ sourced->setCachedOffset(newEffectRect.topLeft());
+ unclipped = true;
+ }
+ }
+
sourced->lastEffectTransform = painter->worldTransform();
- sourced->invalidateCache(QGraphicsEffectSourcePrivate::TransformChanged);
+
+ if (!unclipped)
+ sourced->invalidateCache(QGraphicsEffectSourcePrivate::TransformChanged);
}
item->d_ptr->graphicsEffect->draw(painter);
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index eaaf137..6bcf72b 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -4028,7 +4028,7 @@ QImage QImage::scaled(const QSize& s, Qt::AspectRatioMode aspectMode, Qt::Transf
QSize newSize = size();
newSize.scale(s, aspectMode);
if (newSize == size())
- return copy();
+ return *this;
QTransform wm = QTransform::fromScale((qreal)newSize.width() / width(), (qreal)newSize.height() / height());
QImage img = transformed(wm, mode);
diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp
index 30fb7a3..37a6a18 100644
--- a/src/gui/image/qpixmapfilter.cpp
+++ b/src/gui/image/qpixmapfilter.cpp
@@ -953,7 +953,7 @@ static void grayscale(const QImage &image, QImage &dest, const QRect& rect = QRe
srcRect = dest.rect();
destRect = dest.rect();
}
- if (image != dest) {
+ if (&image != &dest) {
destRect.moveTo(QPoint(0, 0));
}
diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp
index f289c7d..19b1e8c 100644
--- a/src/gui/itemviews/qlistview.cpp
+++ b/src/gui/itemviews/qlistview.cpp
@@ -2621,6 +2621,13 @@ bool QIconModeViewBase::filterDropEvent(QDropEvent *e)
const QSize contents = contentsSize;
QPoint offset(horizontalOffset(), verticalOffset());
QPoint end = e->pos() + offset;
+ if (qq->acceptDrops()) {
+ const Qt::ItemFlags dropableFlags = Qt::ItemIsDropEnabled|Qt::ItemIsEnabled;
+ const QVector<QModelIndex> &dropIndices = intersectingSet(QRect(end, QSize(1, 1)));
+ foreach (const QModelIndex &index, dropIndices)
+ if ((index.flags() & dropableFlags) == dropableFlags)
+ return false;
+ }
QPoint start = dd->pressedPosition;
QPoint delta = (dd->movement == QListView::Snap ? snapToGrid(end) - snapToGrid(start) : end - start);
QList<QModelIndex> indexes = dd->selectionModel->selectedIndexes();
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 3ee0a71..8c77728 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -807,6 +807,15 @@ TCoeInputCapabilities QSymbianControl::InputCapabilities() const
void QSymbianControl::Draw(const TRect& controlRect) const
{
+ // Set flag to avoid calling DrawNow in window surface
+ QWExtra *extra = qwidget->d_func()->extraData();
+ if (extra && !extra->inExpose) {
+ extra->inExpose = true;
+ QRect exposeRect = qt_TRect2QRect(controlRect);
+ qwidget->d_func()->syncBackingStore(exposeRect);
+ extra->inExpose = false;
+ }
+
QWindowSurface *surface = qwidget->windowSurface();
QPaintEngine *engine = surface ? surface->paintDevice()->paintEngine() : NULL;
@@ -855,8 +864,6 @@ void QSymbianControl::Draw(const TRect& controlRect) const
default:
Q_ASSERT(false);
}
- } else {
- surface->flush(qwidget, QRegion(qt_TRect2QRect(backingStoreRect)), QPoint());
}
if (sendNativePaintEvents) {
diff --git a/src/gui/kernel/qdesktopwidget.cpp b/src/gui/kernel/qdesktopwidget.cpp
index c8a4373..24b4e57 100644
--- a/src/gui/kernel/qdesktopwidget.cpp
+++ b/src/gui/kernel/qdesktopwidget.cpp
@@ -47,6 +47,11 @@ QT_BEGIN_NAMESPACE
const QRect QDesktopWidget::screenGeometry(const QWidget *widget) const
{
+ if (!widget) {
+ qWarning("QDesktopWidget::screenGeometry(): Attempt "
+ "to get the screen geometry of a null widget");
+ return QRect();
+ }
QRect rect = QWidgetPrivate::screenGeometry(widget);
if (rect.isNull())
return screenGeometry(screenNumber(widget));
@@ -55,6 +60,11 @@ const QRect QDesktopWidget::screenGeometry(const QWidget *widget) const
const QRect QDesktopWidget::availableGeometry(const QWidget *widget) const
{
+ if (!widget) {
+ qWarning("QDesktopWidget::availableGeometry(): Attempt "
+ "to get the available geometry of a null widget");
+ return QRect();
+ }
QRect rect = QWidgetPrivate::screenGeometry(widget);
if (rect.isNull())
return availableGeometry(screenNumber(widget));
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index 4b98478..d3bc2d8 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -229,6 +229,7 @@ struct QWExtra {
#endif
#elif defined(Q_OS_SYMBIAN) // <----------------------------------------------------- Symbian
uint activated : 1; // RWindowBase::Activated has been called
+ uint inExpose : 1; // Prevents drawing recursion
/**
* Defines the behaviour of QSymbianControl::Draw.
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index c65a162..00f2213 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -389,9 +389,13 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de
if (!isOpaque) {
RWindow *const window = static_cast<RWindow *>(drawableWindow);
+#ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
+ window->SetSurfaceTransparency(true);
+#else
const TDisplayMode displayMode = static_cast<TDisplayMode>(window->SetRequiredDisplayMode(EColor16MA));
if (window->SetTransparencyAlphaChannel() == KErrNone)
window->SetBackgroundColor(TRgb(255, 255, 255, 0));
+#endif
}
}
@@ -707,12 +711,16 @@ void QWidgetPrivate::s60UpdateIsOpaque()
RWindow *const window = static_cast<RWindow *>(q->effectiveWinId()->DrawableWindow());
+#ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
+ window->SetSurfaceTransparency(!isOpaque);
+#else
if (!isOpaque) {
const TDisplayMode displayMode = static_cast<TDisplayMode>(window->SetRequiredDisplayMode(EColor16MA));
if (window->SetTransparencyAlphaChannel() == KErrNone)
window->SetBackgroundColor(TRgb(255, 255, 255, 0));
} else
window->SetTransparentRegion(TRegionFix<1>());
+#endif
}
void QWidgetPrivate::setWindowIcon_sys(bool forceReset)
@@ -883,6 +891,7 @@ void QWidgetPrivate::createSysExtra()
extra->activated = 0;
extra->nativePaintMode = QWExtra::Default;
extra->receiveNativePaintEvents = 0;
+ extra->inExpose = 0;
}
void QWidgetPrivate::deleteSysExtra()
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index 058f226..4f2fffa 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -417,13 +417,6 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
} else if (style == Qt::NoPen) {
d->activeStroker = 0;
} else {
- // ### re-enable...
- if (pen.isCosmetic()) {
- d->dasher.setClipRect(d->exDeviceRect);
- } else {
- QRectF clipRect = state()->matrix.inverted().mapRect(QRectF(d->exDeviceRect));
- d->dasher.setClipRect(clipRect);
- }
d->dasher.setDashPattern(pen.dashPattern());
d->dasher.setDashOffset(pen.dashOffset());
d->activeStroker = &d->dasher;
@@ -434,6 +427,15 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
return;
}
+ if (pen.style() > Qt::SolidLine) {
+ if (pen.isCosmetic()) {
+ d->activeStroker->setClipRect(d->exDeviceRect);
+ } else {
+ QRectF clipRect = state()->matrix.inverted().mapRect(QRectF(d->exDeviceRect));
+ d->activeStroker->setClipRect(clipRect);
+ }
+ }
+
const QPainterPath::ElementType *types = path.elements();
const qreal *points = path.points();
int pointCount = path.elementCount();
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index a98ac10..a9dcea0 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -1984,9 +1984,14 @@ QPaintEngine *QPainter::paintEngine() const
/*!
\since 4.6
- Flushes the painting pipeline and prepares for the user issuing
- commands directly to the underlying graphics context. Must be
- followed by a call to endNativePainting().
+ Flushes the painting pipeline and prepares for the user issuing commands
+ directly to the underlying graphics context. Must be followed by a call to
+ endNativePainting().
+
+ Note that only the states the underlying paint engine changes will be reset
+ to their respective default states. If, for example, the OpenGL polygon
+ mode is changed by the user inside a beginNativePaint()/endNativePainting()
+ block, it will not be reset to the default state by endNativePainting().
Here is an example that shows intermixing of painter commands
and raw OpenGL commands:
@@ -2010,9 +2015,9 @@ void QPainter::beginNativePainting()
/*!
\since 4.6
- Restores the painter after manually issuing native painting commands.
- Lets the painter restore any native state that it relies on before
- calling any other painter commands.
+ Restores the painter after manually issuing native painting commands. Lets
+ the painter restore any native state that it relies on before calling any
+ other painter commands.
\sa beginNativePainting()
*/
diff --git a/src/gui/painting/qprintengine_pdf.cpp b/src/gui/painting/qprintengine_pdf.cpp
index e3a2461..b8bf15e 100644
--- a/src/gui/painting/qprintengine_pdf.cpp
+++ b/src/gui/painting/qprintengine_pdf.cpp
@@ -931,14 +931,24 @@ void QPdfEnginePrivate::writeHeader()
void QPdfEnginePrivate::writeInfo()
{
info = addXrefEntry(-1);
- xprintf("<<\n"
- "/Title (%s)\n"
-// "/Author (%s)\n"
- "/Creator (%s)\n"
- "/Producer (Qt " QT_VERSION_STR " (C) 2009 Nokia Corporation and/or its subsidiary(-ies))\n",
- title.toUtf8().constData(),
-// author.toUtf8().constData(),
- creator.toUtf8().constData());
+
+ // The 'text string' type in PDF is encoded either as PDFDocEncoding, or
+ // Unicode UTF-16 with a Unicode byte order mark as the first character
+ // (0xfeff), with the high-order byte first.
+ QByteArray array("<<\n/Title (\xfe\xff");
+ const ushort *utf16Title = title.utf16();
+ for (int i=0; i < title.size(); ++i) {
+ array.append((*(utf16Title + i)) >> 8);
+ array.append((*(utf16Title + i)) & 0xff);
+ }
+ array.append(")\n/Creator (\xfe\xff");
+ const ushort *utf16Creator = creator.utf16();
+ for (int i=0; i < creator.size(); ++i) {
+ array.append((*(utf16Creator + i)) >> 8);
+ array.append((*(utf16Creator + i)) & 0xff);
+ }
+ array.append(")\n/Producer (Qt " QT_VERSION_STR " (C) 2010 Nokia Corporation and/or its subsidiary(-ies))\n");
+ write(array);
QDateTime now = QDateTime::currentDateTime().toUTC();
QTime t = now.time();
diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp
index b8eaead..b41dc2c 100644
--- a/src/gui/painting/qwindowsurface_s60.cpp
+++ b/src/gui/painting/qwindowsurface_s60.cpp
@@ -145,10 +145,12 @@ QImage* QS60WindowSurface::buffer(const QWidget *widget)
void QS60WindowSurface::flush(QWidget *widget, const QRegion &region, const QPoint &)
{
- const QVector<QRect> subRects = region.rects();
- for (int i = 0; i < subRects.count(); ++i) {
- TRect tr = qt_QRect2TRect(subRects[i]);
+ QWExtra *extra = widget->d_func()->extraData();
+ if (extra && !extra->inExpose) {
+ extra->inExpose = true; // Prevent DrawNow() from calling syncBackingStore() again
+ TRect tr = qt_QRect2TRect(region.boundingRect());
widget->winId()->DrawNow(tr);
+ extra->inExpose = false;
}
}
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index abb9e1e..211f4ce 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -1377,7 +1377,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
else {
gtkCachedPainter.paintFlatBox(gtkEntry, "entry_bg", contentRect,
option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE,
- GTK_SHADOW_NONE, gtkCombo->style, entryPath + QString::number(focus));
+ GTK_SHADOW_NONE, gtkEntry->style, entryPath + QString::number(focus));
}
gtkCachedPainter.paintShadow(gtkEntry, comboBox->editable ? "entry" : "frame", frameRect, frameState,
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 4c57dff..bbd35f1 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -1614,7 +1614,11 @@ bool QFont::operator==(const QFont &f) const
&& f.d->overline == d->overline
&& f.d->strikeOut == d->strikeOut
&& f.d->kerning == d->kerning
- && f.d->capital == d->capital));
+ && f.d->capital == d->capital
+ && f.d->letterSpacingIsAbsolute == d->letterSpacingIsAbsolute
+ && f.d->letterSpacing == d->letterSpacing
+ && f.d->wordSpacing == d->wordSpacing
+ ));
}
@@ -1648,6 +1652,10 @@ bool QFont::operator<(const QFont &f) const
#endif // Q_WS_X11
if (f.d->capital != d->capital) return f.d->capital < d->capital;
+ if (f.d->letterSpacingIsAbsolute != d->letterSpacingIsAbsolute) return f.d->letterSpacingIsAbsolute < d->letterSpacingIsAbsolute;
+ if (f.d->letterSpacing != d->letterSpacing) return f.d->letterSpacing < d->letterSpacing;
+ if (f.d->wordSpacing != d->wordSpacing) return f.d->wordSpacing < d->wordSpacing;
+
int f1attrs = (f.d->underline << 3) + (f.d->overline << 2) + (f.d->strikeOut<<1) + f.d->kerning;
int f2attrs = (d->underline << 3) + (d->overline << 2) + (d->strikeOut<<1) + d->kerning;
return f1attrs < f2attrs;
diff --git a/src/gui/widgets/qabstractspinbox.cpp b/src/gui/widgets/qabstractspinbox.cpp
index 13e67e9..4a6235c 100644
--- a/src/gui/widgets/qabstractspinbox.cpp
+++ b/src/gui/widgets/qabstractspinbox.cpp
@@ -66,7 +66,7 @@
#endif
#if defined(Q_OS_SYMBIAN)
-#include <W32STD.H>
+#include <w32std.h>
#include <private/qt_s60_p.h>
#endif
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index 070091a..414c2ed 100644
--- a/src/gui/widgets/qlinecontrol.cpp
+++ b/src/gui/widgets/qlinecontrol.cpp
@@ -510,10 +510,12 @@ void QLineControl::draw(QPainter *painter, const QPoint &offset, const QRect &cl
o.format.setForeground(m_palette.brush(QPalette::HighlightedText));
} else {
// mask selection
- o.start = m_cursor;
- o.length = 1;
- o.format.setBackground(m_palette.brush(QPalette::Text));
- o.format.setForeground(m_palette.brush(QPalette::Window));
+ if(!m_blinkPeriod || m_blinkStatus){
+ o.start = m_cursor;
+ o.length = 1;
+ o.format.setBackground(m_palette.brush(QPalette::Text));
+ o.format.setForeground(m_palette.brush(QPalette::Window));
+ }
}
selections.append(o);
}
diff --git a/src/gui/widgets/qstackedwidget.cpp b/src/gui/widgets/qstackedwidget.cpp
index 396e233..2509a21 100644
--- a/src/gui/widgets/qstackedwidget.cpp
+++ b/src/gui/widgets/qstackedwidget.cpp
@@ -186,8 +186,11 @@ int QStackedWidget::insertWidget(int index, QWidget *widget)
}
/*!
- Removes the given \a widget from the QStackedWidget. The widget
- is \e not deleted.
+ Removes the given \a widget from the QStackedWidget.
+
+ \bold{Note:} The ownership of \a widget remains the same.
+ The widget is \e not deleted, but simply removed from the widget's
+ stacked layout, causing it to be hidden.
\sa addWidget(), insertWidget(), currentWidget()
*/
diff --git a/src/multimedia/audio/qaudio_mac.cpp b/src/multimedia/audio/qaudio_mac.cpp
index 61a00ce..14fee8b 100644
--- a/src/multimedia/audio/qaudio_mac.cpp
+++ b/src/multimedia/audio/qaudio_mac.cpp
@@ -48,8 +48,8 @@ QT_BEGIN_NAMESPACE
QDebug operator<<(QDebug dbg, const QAudioFormat& audioFormat)
{
dbg.nospace() << "QAudioFormat(" <<
- audioFormat.sampleRate() << "," <<
- audioFormat.channelCount() << "," <<
+ audioFormat.frequency() << "," <<
+ audioFormat.channels() << "," <<
audioFormat.sampleSize()<< "," <<
audioFormat.codec() << "," <<
audioFormat.byteOrder() << "," <<
@@ -64,8 +64,8 @@ QAudioFormat toQAudioFormat(AudioStreamBasicDescription const& sf)
{
QAudioFormat audioFormat;
- audioFormat.setSampleRate(sf.mSampleRate);
- audioFormat.setChannelCount(sf.mChannelsPerFrame);
+ audioFormat.setFrequency(sf.mSampleRate);
+ audioFormat.setChannels(sf.mChannelsPerFrame);
audioFormat.setSampleSize(sf.mBitsPerChannel);
audioFormat.setCodec(QString::fromLatin1("audio/pcm"));
audioFormat.setByteOrder(sf.mFormatFlags & kLinearPCMFormatFlagIsBigEndian != 0 ? QAudioFormat::BigEndian : QAudioFormat::LittleEndian);
@@ -84,9 +84,9 @@ AudioStreamBasicDescription toAudioStreamBasicDescription(QAudioFormat const& au
AudioStreamBasicDescription sf;
sf.mFormatFlags = kAudioFormatFlagIsPacked;
- sf.mSampleRate = audioFormat.sampleRate();
+ sf.mSampleRate = audioFormat.frequency();
sf.mFramesPerPacket = 1;
- sf.mChannelsPerFrame = audioFormat.channelCount();
+ sf.mChannelsPerFrame = audioFormat.channels();
sf.mBitsPerChannel = audioFormat.sampleSize();
sf.mBytesPerFrame = sf.mChannelsPerFrame * (sf.mBitsPerChannel / 8);
sf.mBytesPerPacket = sf.mFramesPerPacket * sf.mBytesPerFrame;
diff --git a/src/multimedia/audio/qaudiodeviceinfo.cpp b/src/multimedia/audio/qaudiodeviceinfo.cpp
index ca20eda..092efc5 100644
--- a/src/multimedia/audio/qaudiodeviceinfo.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo.cpp
@@ -100,13 +100,13 @@ public:
You can also query each device for the formats it supports. A
format in this context is a set consisting of a specific byte
- order, channel, codec, sample rate, sample size and sample type. A
+ order, channel, codec, frequency, sample rate, and sample type. A
format is represented by the QAudioFormat class.
The values supported by the the device for each of these
parameters can be fetched with
supportedByteOrders(), supportedChannels(), supportedCodecs(),
- supportedSampleRates(), supportedSampleSizes(), and
+ supportedFrequencies(), supportedSampleSizes(), and
supportedSampleTypes(). The combinations supported are dependent on the platform,
audio plugins installed and the audio device capabilities. If you need a specific format, you can check if
the device supports it with isFormatSupported(), or fetch a
@@ -259,16 +259,7 @@ QStringList QAudioDeviceInfo::supportedCodecs() const
}
/*!
- Returns a list of supported sample rates.
-*/
-
-QList<int> QAudioDeviceInfo::supportedSampleRates() const
-{
- return supportedFrequencies();
-}
-
-/*!
- \internal
+ Returns a list of supported frequencies.
*/
QList<int> QAudioDeviceInfo::supportedFrequencies() const
@@ -277,16 +268,7 @@ QList<int> QAudioDeviceInfo::supportedFrequencies() const
}
/*!
- Returns a list of supported channel counts.
-*/
-
-QList<int> QAudioDeviceInfo::supportedChannelCounts() const
-{
- return supportedChannels();
-}
-
-/*!
- \internal
+ Returns a list of supported channels.
*/
QList<int> QAudioDeviceInfo::supportedChannels() const
diff --git a/src/multimedia/audio/qaudiodeviceinfo.h b/src/multimedia/audio/qaudiodeviceinfo.h
index 1cc0731..62dc8a2 100644
--- a/src/multimedia/audio/qaudiodeviceinfo.h
+++ b/src/multimedia/audio/qaudiodeviceinfo.h
@@ -84,9 +84,7 @@ public:
QStringList supportedCodecs() const;
QList<int> supportedFrequencies() const;
- QList<int> supportedSampleRates() const;
QList<int> supportedChannels() const;
- QList<int> supportedChannelCounts() const;
QList<int> supportedSampleSizes() const;
QList<QAudioFormat::Endian> supportedByteOrders() const;
QList<QAudioFormat::SampleType> supportedSampleTypes() const;
diff --git a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
index a77a428..36270a7 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
@@ -78,20 +78,20 @@ QAudioFormat QAudioDeviceInfoInternal::preferredFormat() const
{
QAudioFormat nearest;
if(mode == QAudio::AudioOutput) {
- nearest.setSampleRate(44100);
- nearest.setChannelCount(2);
+ nearest.setFrequency(44100);
+ nearest.setChannels(2);
nearest.setByteOrder(QAudioFormat::LittleEndian);
nearest.setSampleType(QAudioFormat::SignedInt);
nearest.setSampleSize(16);
nearest.setCodec(QLatin1String("audio/pcm"));
} else {
- nearest.setSampleRate(8000);
- nearest.setChannelCount(1);
+ nearest.setFrequency(8000);
+ nearest.setChannels(1);
nearest.setSampleType(QAudioFormat::UnSignedInt);
nearest.setSampleSize(8);
nearest.setCodec(QLatin1String("audio/pcm"));
if(!testSettings(nearest)) {
- nearest.setChannelCount(2);
+ nearest.setChannels(2);
nearest.setSampleSize(16);
nearest.setSampleType(QAudioFormat::SignedInt);
}
@@ -253,8 +253,8 @@ bool QAudioDeviceInfoInternal::testSettings(const QAudioFormat& format) const
snd_pcm_hw_params_any( handle, params );
// set the values!
- snd_pcm_hw_params_set_channels(handle,params,format.channelCount());
- snd_pcm_hw_params_set_rate(handle,params,format.sampleRate(),dir);
+ snd_pcm_hw_params_set_channels(handle,params,format.channels());
+ snd_pcm_hw_params_set_rate(handle,params,format.frequency(),dir);
switch(format.sampleSize()) {
case 8:
if(format.sampleType() == QAudioFormat::SignedInt)
@@ -295,18 +295,18 @@ bool QAudioDeviceInfoInternal::testSettings(const QAudioFormat& format) const
} else
testCodec = true;
- if(err>=0 && format.channelCount() != -1) {
- err = snd_pcm_hw_params_test_channels(handle,params,format.channelCount());
+ if(err>=0 && format.channels() != -1) {
+ err = snd_pcm_hw_params_test_channels(handle,params,format.channels());
if(err>=0)
- err = snd_pcm_hw_params_set_channels(handle,params,format.channelCount());
+ err = snd_pcm_hw_params_set_channels(handle,params,format.channels());
if(err>=0)
testChannel = true;
}
- if(err>=0 && format.sampleRate() != -1) {
- err = snd_pcm_hw_params_test_rate(handle,params,format.sampleRate(),0);
+ if(err>=0 && format.frequency() != -1) {
+ err = snd_pcm_hw_params_test_rate(handle,params,format.frequency(),0);
if(err>=0)
- err = snd_pcm_hw_params_set_rate(handle,params,format.sampleRate(),dir);
+ err = snd_pcm_hw_params_set_rate(handle,params,format.frequency(),dir);
if(err>=0)
testFreq = true;
}
diff --git a/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp
index 9334069..ecd03e5 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp
@@ -144,10 +144,10 @@ QAudioFormat QAudioDeviceInfoInternal::nearestFormat(const QAudioFormat& format)
rc.setCodec(QString::fromLatin1("audio/pcm"));
- if (rc.sampleRate() != target.sampleRate())
- rc.setSampleRate(target.sampleRate());
- if (rc.channelCount() != target.channelCount())
- rc.setChannelCount(target.channelCount());
+ if (rc.frequency() != target.frequency())
+ rc.setFrequency(target.frequency());
+ if (rc.channels() != target.channels())
+ rc.setChannels(target.channels());
if (rc.sampleSize() != target.sampleSize())
rc.setSampleSize(target.sampleSize());
if (rc.byteOrder() != target.byteOrder())
diff --git a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
index 373e23d..f6b8154 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
@@ -94,15 +94,15 @@ QAudioFormat QAudioDeviceInfoInternal::preferredFormat() const
{
QAudioFormat nearest;
if(mode == QAudio::AudioOutput) {
- nearest.setSampleRate(44100);
- nearest.setChannelCount(2);
+ nearest.setFrequency(44100);
+ nearest.setChannels(2);
nearest.setByteOrder(QAudioFormat::LittleEndian);
nearest.setSampleType(QAudioFormat::SignedInt);
nearest.setSampleSize(16);
nearest.setCodec(QLatin1String("audio/pcm"));
} else {
- nearest.setSampleRate(11025);
- nearest.setChannelCount(1);
+ nearest.setFrequency(11025);
+ nearest.setChannels(1);
nearest.setByteOrder(QAudioFormat::LittleEndian);
nearest.setSampleType(QAudioFormat::SignedInt);
nearest.setSampleSize(8);
@@ -181,12 +181,12 @@ bool QAudioDeviceInfoInternal::testSettings(const QAudioFormat& format) const
if(!format.codec().startsWith(QLatin1String("audio/pcm")))
failed = true;
- if(!failed && !(format.channelCount() == 1 || format.channelCount() == 2))
+ if(!failed && !(format.channels() == 1 || format.channels() == 2))
failed = true;
if(!failed) {
- if(!(format.sampleRate() == 8000 || format.sampleRate() == 11025 || format.sampleRate() == 22050 ||
- format.sampleRate() == 44100 || format.sampleRate() == 48000 || format.sampleRate() == 96000))
+ if(!(format.frequency() == 8000 || format.frequency() == 11025 || format.frequency() == 22050 ||
+ format.frequency() == 44100 || format.frequency() == 48000 || format.frequency() == 96000))
failed = true;
}
diff --git a/src/multimedia/audio/qaudioformat.cpp b/src/multimedia/audio/qaudioformat.cpp
index 58bb571..89ae0ff 100644
--- a/src/multimedia/audio/qaudioformat.cpp
+++ b/src/multimedia/audio/qaudioformat.cpp
@@ -144,7 +144,7 @@ public:
Values are initialized as follows:
\list
\o frequency() = -1
- \o channelCount() = -1
+ \o channels() = -1
\o sampleSize() = -1
\o byteOrder() = QAudioFormat::Endian(QSysInfo::ByteOrder)
\o sampleType() = QAudioFormat::Unknown
@@ -224,16 +224,7 @@ bool QAudioFormat::isValid() const
}
/*!
- Sets the sample rate to \a samplerate Hertz.
-*/
-
-void QAudioFormat::setSampleRate(int samplerate)
-{
- d->frequency = samplerate;
-}
-
-/*!
- \internal
+ Sets the frequency to \a frequency.
*/
void QAudioFormat::setFrequency(int frequency)
@@ -242,16 +233,7 @@ void QAudioFormat::setFrequency(int frequency)
}
/*!
- Returns the current sample rate in Hertz.
-*/
-
-int QAudioFormat::sampleRate() const
-{
- return d->frequency;
-}
-
-/*!
- \internal
+ Returns the current frequency value.
*/
int QAudioFormat::frequency() const
@@ -260,16 +242,7 @@ int QAudioFormat::frequency() const
}
/*!
- Sets the channel count to \a channels.
-*/
-
-void QAudioFormat::setChannelCount(int channels)
-{
- d->channels = channels;
-}
-
-/*!
- \internal
+ Sets the channels to \a channels.
*/
void QAudioFormat::setChannels(int channels)
@@ -278,16 +251,7 @@ void QAudioFormat::setChannels(int channels)
}
/*!
- Returns the current channel count value.
-*/
-
-int QAudioFormat::channelCount() const
-{
- return d->channels;
-}
-
-/*!
- \internal
+ Returns the current channel value.
*/
int QAudioFormat::channels() const
diff --git a/src/multimedia/audio/qaudioformat.h b/src/multimedia/audio/qaudioformat.h
index b255907..cb58d1c 100644
--- a/src/multimedia/audio/qaudioformat.h
+++ b/src/multimedia/audio/qaudioformat.h
@@ -76,12 +76,6 @@ public:
void setFrequency(int frequency);
int frequency() const;
- void setSampleRate(int samplerate);
- int sampleRate() const;
-
- void setChannelCount(int channels);
- int channelCount() const;
-
void setChannels(int channels);
int channels() const;
diff --git a/src/multimedia/audio/qaudioinput.cpp b/src/multimedia/audio/qaudioinput.cpp
index da39c4a..45cafc1 100644
--- a/src/multimedia/audio/qaudioinput.cpp
+++ b/src/multimedia/audio/qaudioinput.cpp
@@ -88,8 +88,8 @@ QT_BEGIN_NAMESPACE
QAudioFormat format;
// set up the format you want, eg.
- format.setSampleRate(8000);
- format.setChannelCount(1);
+ format.setFrequency(8000);
+ format.setChannels(1);
format.setSampleSize(8);
format.setCodec("audio/pcm");
format.setByteOrder(QAudioFormat::LittleEndian);
diff --git a/src/multimedia/audio/qaudioinput_alsa_p.cpp b/src/multimedia/audio/qaudioinput_alsa_p.cpp
index ea68c8d6..26e46b3 100644
--- a/src/multimedia/audio/qaudioinput_alsa_p.cpp
+++ b/src/multimedia/audio/qaudioinput_alsa_p.cpp
@@ -256,7 +256,7 @@ bool QAudioInputPrivate::open()
int dir;
int err=-1;
int count=0;
- unsigned int freakuency=settings.sampleRate();
+ unsigned int freakuency=settings.frequency();
QString dev = QString(QLatin1String(m_device.constData()));
QList<QByteArray> devices = QAudioDeviceInfoInternal::availableDevices(QAudio::AudioInput);
@@ -332,7 +332,7 @@ bool QAudioInputPrivate::open()
}
}
if ( !fatal ) {
- err = snd_pcm_hw_params_set_channels( handle, hwparams, (unsigned int)settings.channelCount() );
+ err = snd_pcm_hw_params_set_channels( handle, hwparams, (unsigned int)settings.channels() );
if ( err < 0 ) {
fatal = true;
errMessage = QString::fromLatin1("QAudioInput: snd_pcm_hw_params_set_channels: err = %1").arg(err);
@@ -505,7 +505,7 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len)
errorState = QAudio::NoError;
deviceState = QAudio::IdleState;
} else {
- totalTimeValue += snd_pcm_bytes_to_frames(handle, err)*1000000/settings.sampleRate();
+ totalTimeValue += snd_pcm_bytes_to_frames(handle, err)*1000000/settings.frequency();
resuming = false;
errorState = QAudio::NoError;
deviceState = QAudio::ActiveState;
@@ -702,7 +702,7 @@ qint64 InputPrivate::readData( char* data, qint64 len)
count++;
}
if(err > 0 && readFrames > 0) {
- audioDevice->totalTimeValue += readFrames*1000/audioDevice->settings.sampleRate()*1000;
+ audioDevice->totalTimeValue += readFrames*1000/audioDevice->settings.frequency()*1000;
audioDevice->deviceState = QAudio::ActiveState;
return err;
}
diff --git a/src/multimedia/audio/qaudioinput_mac_p.cpp b/src/multimedia/audio/qaudioinput_mac_p.cpp
index f5be8ee..7251513 100644
--- a/src/multimedia/audio/qaudioinput_mac_p.cpp
+++ b/src/multimedia/audio/qaudioinput_mac_p.cpp
@@ -814,7 +814,7 @@ int QAudioInputPrivate::notifyInterval() const
qint64 QAudioInputPrivate::processedUSecs() const
{
- return totalFrames * 1000000 / audioFormat.sampleRate();
+ return totalFrames * 1000000 / audioFormat.frequency();
}
qint64 QAudioInputPrivate::elapsedUSecs() const
diff --git a/src/multimedia/audio/qaudioinput_win32_p.cpp b/src/multimedia/audio/qaudioinput_win32_p.cpp
index 5c597ef..17e8bfb 100644
--- a/src/multimedia/audio/qaudioinput_win32_p.cpp
+++ b/src/multimedia/audio/qaudioinput_win32_p.cpp
@@ -225,16 +225,16 @@ bool QAudioInputPrivate::open()
header = 0;
if(buffer_size == 0) {
// Default buffer size, 100ms, default period size is 20ms
- buffer_size = settings.sampleRate()*settings.channelCount()*(settings.sampleSize()/8)*0.1;
+ buffer_size = settings.frequency()*settings.channels()*(settings.sampleSize()/8)*0.1;
period_size = buffer_size/5;
} else {
period_size = buffer_size/5;
}
timeStamp.restart();
elapsedTimeOffset = 0;
- wfx.nSamplesPerSec = settings.sampleRate();
+ wfx.nSamplesPerSec = settings.frequency();
wfx.wBitsPerSample = settings.sampleSize();
- wfx.nChannels = settings.channelCount();
+ wfx.nChannels = settings.channels();
wfx.cbSize = 0;
wfx.wFormatTag = WAVE_FORMAT_PCM;
@@ -374,8 +374,8 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len)
} else {
totalTimeValue += waveBlocks[header].dwBytesRecorded
- /((settings.channelCount()*settings.sampleSize()/8))
- *10000/settings.sampleRate()*100;
+ /((settings.channels()*settings.sampleSize()/8))
+ *10000/settings.frequency()*100;
errorState = QAudio::NoError;
deviceState = QAudio::ActiveState;
resuming = false;
@@ -388,8 +388,8 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len)
qDebug()<<"IN: "<<waveBlocks[header].dwBytesRecorded<<", OUT: "<<l;
#endif
totalTimeValue += waveBlocks[header].dwBytesRecorded
- /((settings.channelCount()*settings.sampleSize()/8))
- *10000/settings.sampleRate()*100;
+ /((settings.channels()*settings.sampleSize()/8))
+ *10000/settings.frequency()*100;
errorState = QAudio::NoError;
deviceState = QAudio::ActiveState;
resuming = false;
diff --git a/src/multimedia/audio/qaudiooutput.cpp b/src/multimedia/audio/qaudiooutput.cpp
index b61aa4f..afd8a84 100644
--- a/src/multimedia/audio/qaudiooutput.cpp
+++ b/src/multimedia/audio/qaudiooutput.cpp
@@ -83,8 +83,8 @@ QT_BEGIN_NAMESPACE
QAudioFormat format;
// Set up the format, eg.
- format.setSampleRate(8000);
- format.setChannelCount(1);
+ format.setFrequency(8000);
+ format.setChannels(1);
format.setSampleSize(8);
format.setCodec("audio/pcm");
format.setByteOrder(QAudioFormat::LittleEndian);
diff --git a/src/multimedia/audio/qaudiooutput_alsa_p.cpp b/src/multimedia/audio/qaudiooutput_alsa_p.cpp
index 43b65ec..7b89cef 100644
--- a/src/multimedia/audio/qaudiooutput_alsa_p.cpp
+++ b/src/multimedia/audio/qaudiooutput_alsa_p.cpp
@@ -279,7 +279,7 @@ bool QAudioOutputPrivate::open()
int dir;
int err=-1;
int count=0;
- unsigned int freakuency=settings.sampleRate();
+ unsigned int freakuency=settings.frequency();
QString dev = QLatin1String(m_device.constData());
QList<QByteArray> devices = QAudioDeviceInfoInternal::availableDevices(QAudio::AudioOutput);
@@ -354,7 +354,7 @@ bool QAudioOutputPrivate::open()
}
}
if ( !fatal ) {
- err = snd_pcm_hw_params_set_channels( handle, hwparams, (unsigned int)settings.channelCount() );
+ err = snd_pcm_hw_params_set_channels( handle, hwparams, (unsigned int)settings.channels() );
if ( err < 0 ) {
fatal = true;
errMessage = QString::fromLatin1("QAudioOutput: snd_pcm_hw_params_set_channels: err = %1").arg(err);
@@ -494,7 +494,7 @@ qint64 QAudioOutputPrivate::write( const char *data, qint64 len )
err = snd_pcm_writei( handle, data, frames );
}
if(err > 0) {
- totalTimeValue += err*1000000/settings.sampleRate();
+ totalTimeValue += err*1000000/settings.frequency();
resuming = false;
errorState = QAudio::NoError;
deviceState = QAudio::ActiveState;
diff --git a/src/multimedia/audio/qaudiooutput_mac_p.cpp b/src/multimedia/audio/qaudiooutput_mac_p.cpp
index 4367ee7..518f78f 100644
--- a/src/multimedia/audio/qaudiooutput_mac_p.cpp
+++ b/src/multimedia/audio/qaudiooutput_mac_p.cpp
@@ -87,8 +87,8 @@ public:
m_device(0)
{
m_buffer = new QAudioRingBuffer(bufferSize + (bufferSize % maxPeriodSize == 0 ? 0 : maxPeriodSize - (bufferSize % maxPeriodSize)));
- m_bytesPerFrame = (audioFormat.sampleSize() / 8) * audioFormat.channelCount();
- m_periodTime = m_maxPeriodSize / m_bytesPerFrame * 1000 / audioFormat.sampleRate();
+ m_bytesPerFrame = (audioFormat.sampleSize() / 8) * audioFormat.channels();
+ m_periodTime = m_maxPeriodSize / m_bytesPerFrame * 1000 / audioFormat.frequency();
m_fillTimer = new QTimer(this);
connect(m_fillTimer, SIGNAL(timeout()), SLOT(fillBuffer()));
@@ -546,7 +546,7 @@ int QAudioOutputPrivate::notifyInterval() const
qint64 QAudioOutputPrivate::processedUSecs() const
{
- return totalFrames * 1000000 / audioFormat.sampleRate();
+ return totalFrames * 1000000 / audioFormat.frequency();
}
qint64 QAudioOutputPrivate::elapsedUSecs() const
diff --git a/src/multimedia/audio/qaudiooutput_win32_p.cpp b/src/multimedia/audio/qaudiooutput_win32_p.cpp
index b6e9762..c31e048 100644
--- a/src/multimedia/audio/qaudiooutput_win32_p.cpp
+++ b/src/multimedia/audio/qaudiooutput_win32_p.cpp
@@ -213,7 +213,7 @@ bool QAudioOutputPrivate::open()
#endif
if(buffer_size == 0) {
// Default buffer size, 200ms, default period size is 40ms
- buffer_size = settings.sampleRate()*settings.channelCount()*(settings.sampleSize()/8)*0.2;
+ buffer_size = settings.frequency()*settings.channels()*(settings.sampleSize()/8)*0.2;
period_size = buffer_size/5;
} else {
period_size = buffer_size/5;
@@ -232,9 +232,9 @@ bool QAudioOutputPrivate::open()
timeStamp.restart();
elapsedTimeOffset = 0;
- wfx.nSamplesPerSec = settings.sampleRate();
+ wfx.nSamplesPerSec = settings.frequency();
wfx.wBitsPerSample = settings.sampleSize();
- wfx.nChannels = settings.channelCount();
+ wfx.nChannels = settings.channels();
wfx.cbSize = 0;
wfx.wFormatTag = WAVE_FORMAT_PCM;
@@ -289,8 +289,8 @@ void QAudioOutputPrivate::close()
return;
deviceState = QAudio::StoppedState;
- int delay = (buffer_size-bytesFree())*1000/(settings.sampleRate()
- *settings.channelCount()*(settings.sampleSize()/8));
+ int delay = (buffer_size-bytesFree())*1000/(settings.frequency()
+ *settings.channels()*(settings.sampleSize()/8));
waveOutReset(hWaveOut);
Sleep(delay+10);
@@ -386,8 +386,8 @@ qint64 QAudioOutputPrivate::write( const char *data, qint64 len )
LeaveCriticalSection(&waveOutCriticalSection);
#endif
totalTimeValue += current->dwBufferLength
- /(settings.channelCount()*(settings.sampleSize()/8))
- *1000000/settings.sampleRate();;
+ /(settings.channels()*(settings.sampleSize()/8))
+ *1000000/settings.frequency();;
waveCurrentBlock++;
waveCurrentBlock %= buffer_size/period_size;
current = &waveBlocks[waveCurrentBlock];
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 39d09aa..1955dba 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -260,7 +260,7 @@ bool QHttpNetworkConnectionChannel::sendRequest()
// ensure we try to receive a reply in all cases, even if _q_readyRead_ hat not been called
// this is needed if the sends an reply before we have finished sending the request. In that
// case receiveReply had been called before but ignored the server reply
- QMetaObject::invokeMethod(connection, "_q_receiveReply", Qt::QueuedConnection);
+ QMetaObject::invokeMethod(this, "_q_receiveReply", Qt::QueuedConnection);
break;
}
case QHttpNetworkConnectionChannel::ReadingState:
diff --git a/src/network/ssl/qsslsocket_p.h b/src/network/ssl/qsslsocket_p.h
index 5615685..8e22664 100644
--- a/src/network/ssl/qsslsocket_p.h
+++ b/src/network/ssl/qsslsocket_p.h
@@ -83,9 +83,6 @@ public:
QList<QSslError> ignoreErrorsList;
bool* readyReadEmittedPointer;
- QRingBuffer readBuffer;
- QRingBuffer writeBuffer;
-
QSslConfigurationPrivate configuration;
QList<QSslError> sslErrors;
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 1105028..b7139a2 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -124,9 +124,6 @@ public:
};
Q_GLOBAL_STATIC(QGLDefaultOverlayFormat, defaultOverlayFormatInstance)
-QGLExtensions::Extensions QGLExtensions::glExtensions = 0;
-bool QGLExtensions::nvidiaFboNeedsFinish = false;
-
Q_GLOBAL_STATIC(QGLSignalProxy, theSignalProxy)
QGLSignalProxy *QGLSignalProxy::instance()
{
@@ -154,11 +151,9 @@ public:
// falling back to the GL 1 engine..
static bool mac_x1600_check_done = false;
if (!mac_x1600_check_done) {
- QGLWidget *tmp = 0;
- if (!QGLContext::currentContext()) {
- tmp = new QGLWidget();
- tmp->makeCurrent();
- }
+ QGLTemporaryContext *tmp = 0;
+ if (!QGLContext::currentContext())
+ tmp = new QGLTemporaryContext();
if (strstr((char *) glGetString(GL_RENDERER), "X1600"))
engineType = QPaintEngine::OpenGL;
if (tmp)
@@ -178,7 +173,7 @@ public:
// from an old GL 1.1 server to a GL 2.x client. In that case we can't
// use GL 2.0.
if ((QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_2_0)
- && (QGLExtensions::glExtensions & QGLExtensions::FragmentShader)
+ && (QGLExtensions::glExtensions() & QGLExtensions::FragmentShader)
&& qgetenv("QT_GL_USE_OPENGL1ENGINE").isEmpty())
engineType = QPaintEngine::OpenGL2;
else
@@ -1345,7 +1340,7 @@ QGLFormat::OpenGLVersionFlags QGLFormat::openGLVersionFlags()
static bool cachedDefault = false;
static OpenGLVersionFlags defaultVersionFlags = OpenGL_Version_None;
QGLContext *currentCtx = const_cast<QGLContext *>(QGLContext::currentContext());
- QGLWidget *dummy = 0;
+ QGLTemporaryContext *tmpContext = 0;
if (currentCtx && currentCtx->d_func()->version_flags_cached)
return currentCtx->d_func()->version_flags;
@@ -1356,8 +1351,7 @@ QGLFormat::OpenGLVersionFlags QGLFormat::openGLVersionFlags()
} else {
if (!hasOpenGL())
return defaultVersionFlags;
- dummy = new QGLWidget;
- dummy->makeCurrent(); // glGetString() needs a current context
+ tmpContext = new QGLTemporaryContext;
cachedDefault = true;
}
}
@@ -1368,9 +1362,9 @@ QGLFormat::OpenGLVersionFlags QGLFormat::openGLVersionFlags()
currentCtx->d_func()->version_flags_cached = true;
currentCtx->d_func()->version_flags = versionFlags;
}
- if (dummy) {
+ if (tmpContext) {
defaultVersionFlags = versionFlags;
- delete dummy;
+ delete tmpContext;
}
return versionFlags;
@@ -1594,6 +1588,8 @@ void QGLContextPrivate::init(QPaintDevice *dev, const QGLFormat &format)
max_texture_size = -1;
version_flags_cached = false;
version_flags = QGLFormat::OpenGL_Version_None;
+ extension_flags_cached = false;
+ extension_flags = 0;
current_fbo = 0;
default_fbo = 0;
active_engine = 0;
@@ -2248,7 +2244,7 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G
int tx_h = qt_next_power_of_two(image.height());
QImage img = image;
- if (!(QGLExtensions::glExtensions & QGLExtensions::NPOTTextures)
+ if (!(QGLExtensions::glExtensions() & QGLExtensions::NPOTTextures)
&& !(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0)
&& (target == GL_TEXTURE_2D && (tx_w != image.width() || tx_h != image.height())))
{
@@ -2270,7 +2266,7 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G
bool genMipmap = false;
#endif
if (glFormat.directRendering()
- && (QGLExtensions::glExtensions & QGLExtensions::GenerateMipmap)
+ && (QGLExtensions::glExtensions() & QGLExtensions::GenerateMipmap)
&& target == GL_TEXTURE_2D
&& (options & QGLContext::MipmapBindOption))
{
@@ -2298,9 +2294,12 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G
bool premul = options & QGLContext::PremultipliedAlphaBindOption;
GLenum externalFormat;
GLuint pixel_type;
- if (QGLExtensions::glExtensions & QGLExtensions::BGRATextureFormat) {
+ if (QGLExtensions::glExtensions() & QGLExtensions::BGRATextureFormat) {
externalFormat = GL_BGRA;
- pixel_type = GL_UNSIGNED_INT_8_8_8_8_REV;
+ if (QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_1_2)
+ pixel_type = GL_UNSIGNED_INT_8_8_8_8_REV;
+ else
+ pixel_type = GL_UNSIGNED_BYTE;
} else {
externalFormat = GL_RGBA;
pixel_type = GL_UNSIGNED_BYTE;
@@ -2379,12 +2378,9 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G
qgl_byteSwapImage(img, pixel_type);
}
#ifdef QT_OPENGL_ES
- // OpenGL/ES requires that the internal and external formats be identical.
- // This is typically used to convert GL_RGBA into GL_BGRA.
- // Also, we need to use GL_UNSIGNED_BYTE when the format is GL_BGRA.
+ // OpenGL/ES requires that the internal and external formats be
+ // identical.
internalFormat = externalFormat;
- if (pixel_type == GL_UNSIGNED_INT_8_8_8_8_REV)
- pixel_type = GL_UNSIGNED_BYTE;
#endif
#ifdef QGL_BIND_TEXTURE_DEBUG
printf(" - uploading, image.format=%d, externalFormat=0x%x, internalFormat=0x%x, pixel_type=0x%x\n",
@@ -4969,9 +4965,13 @@ QGLWidget::QGLWidget(QGLContext *context, QWidget *parent,
#endif // QT3_SUPPORT
-void QGLExtensions::init_extensions()
+/*
+ Returns the GL extensions for the current context.
+*/
+QGLExtensions::Extensions QGLExtensions::currentContextExtensions()
{
QGLExtensionMatcher extensions(reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS)));
+ Extensions glExtensions;
if (extensions.match("GL_ARB_texture_rectangle"))
glExtensions |= TextureRectangle;
@@ -5032,6 +5032,46 @@ void QGLExtensions::init_extensions()
if (extensions.match("GL_EXT_bgra"))
glExtensions |= BGRATextureFormat;
+
+ return glExtensions;
+}
+
+/*
+ Returns the GL extensions for the current QGLContext. If there is no
+ current QGLContext, a default context will be created and the extensions
+ for that context will be returned instead.
+*/
+QGLExtensions::Extensions QGLExtensions::glExtensions()
+{
+ QGLTemporaryContext *tmpContext = 0;
+ static bool cachedDefault = false;
+ static Extensions defaultExtensions = 0;
+ QGLContext *currentCtx = const_cast<QGLContext *>(QGLContext::currentContext());
+
+ if (currentCtx && currentCtx->d_func()->extension_flags_cached)
+ return currentCtx->d_func()->extension_flags;
+
+ if (!currentCtx) {
+ if (cachedDefault) {
+ return defaultExtensions;
+ } else {
+ tmpContext = new QGLTemporaryContext;
+ cachedDefault = true;
+ }
+ }
+
+ Extensions extensionFlags = currentContextExtensions();
+ if (currentCtx) {
+ currentCtx->d_func()->extension_flags_cached = true;
+ currentCtx->d_func()->extension_flags = extensionFlags;
+ } else {
+ defaultExtensions = extensionFlags;
+ }
+
+ if (tmpContext)
+ delete tmpContext;
+
+ return extensionFlags;
}
/*
@@ -5043,7 +5083,6 @@ void QGLWidgetPrivate::initContext(QGLContext *context, const QGLWidget* shareWi
glDevice.setWidget(q);
- QGLExtensions::init();
glcx = 0;
autoSwap = true;
@@ -5292,7 +5331,7 @@ QSize QGLTexture::bindCompressedTexture
}
#if !defined(QT_OPENGL_ES)
if (!glCompressedTexImage2D) {
- if (!(QGLExtensions::glExtensions & QGLExtensions::TextureCompression)) {
+ if (!(QGLExtensions::glExtensions() & QGLExtensions::TextureCompression)) {
qWarning("QGLContext::bindTexture(): The GL implementation does "
"not support texture compression extensions.");
return QSize();
@@ -5331,7 +5370,7 @@ QSize QGLTexture::bindCompressedTextureDDS(const char *buf, int len)
return QSize();
// Bail out if the necessary extension is not present.
- if (!(QGLExtensions::glExtensions & QGLExtensions::DDSTextureCompression)) {
+ if (!(QGLExtensions::glExtensions() & QGLExtensions::DDSTextureCompression)) {
qWarning("QGLContext::bindTexture(): DDS texture compression is not supported.");
return QSize();
}
@@ -5441,13 +5480,13 @@ QSize QGLTexture::bindCompressedTexturePVR(const char *buf, int len)
// Bail out if the necessary extension is not present.
if (textureFormat == GL_ETC1_RGB8_OES) {
- if (!(QGLExtensions::glExtensions &
+ if (!(QGLExtensions::glExtensions() &
QGLExtensions::ETC1TextureCompression)) {
qWarning("QGLContext::bindTexture(): ETC1 texture compression is not supported.");
return QSize();
}
} else {
- if (!(QGLExtensions::glExtensions &
+ if (!(QGLExtensions::glExtensions() &
QGLExtensions::PVRTCTextureCompression)) {
qWarning("QGLContext::bindTexture(): PVRTC texture compression is not supported.");
return QSize();
diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h
index e7142fd..8ada8ce 100644
--- a/src/opengl/qgl.h
+++ b/src/opengl/qgl.h
@@ -418,6 +418,7 @@ private:
friend class QGLContextGroup;
friend class QGLSharedResourceGuard;
friend class QGLPixmapBlurFilter;
+ friend class QGLExtensions;
friend QGLFormat::OpenGLVersionFlags QGLFormat::openGLVersionFlags();
#ifdef Q_WS_MAC
public:
diff --git a/src/opengl/qgl_mac.mm b/src/opengl/qgl_mac.mm
index 6ed07e5..c01575b 100644
--- a/src/opengl/qgl_mac.mm
+++ b/src/opengl/qgl_mac.mm
@@ -116,6 +116,68 @@ extern void qt_mac_dispose_rgn(RgnHandle); //qregion_mac.cpp
extern QRegion qt_mac_convert_mac_region(RgnHandle); //qregion_mac.cpp
extern void qt_mac_to_pascal_string(QString s, Str255 str, TextEncoding encoding=0, int len=-1); //qglobal.cpp
+/*
+ QGLTemporaryContext implementation
+*/
+
+class QGLTemporaryContextPrivate
+{
+public:
+#ifndef QT_MAC_USE_COCOA
+ AGLContext ctx;
+#else
+ NSOpenGLContext *ctx;
+#endif
+};
+
+QGLTemporaryContext::QGLTemporaryContext(bool, QWidget *)
+ : d(new QGLTemporaryContextPrivate)
+{
+ d->ctx = 0;
+#ifndef QT_MAC_USE_COCOA
+ GLint attribs[] = {AGL_RGBA, AGL_NONE};
+ AGLPixelFormat fmt = aglChoosePixelFormat(0, 0, attribs);
+ if (!fmt) {
+ qDebug("QGLTemporaryContext: Couldn't find any RGB visuals");
+ return;
+ }
+ d->ctx = aglCreateContext(fmt, 0);
+ if (!d->ctx)
+ qDebug("QGLTemporaryContext: Unable to create context");
+ else
+ aglSetCurrentContext(d->ctx);
+ aglDestroyPixelFormat(fmt);
+#else
+ QMacCocoaAutoReleasePool pool;
+ NSOpenGLPixelFormatAttribute attribs[] = { 0 };
+ NSOpenGLPixelFormat *fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs];
+ if (!fmt) {
+ qWarning("QGLTemporaryContext: Cannot find any visuals");
+ return;
+ }
+
+ d->ctx = [[NSOpenGLContext alloc] initWithFormat:fmt shareContext:0];
+ if (!d->ctx)
+ qWarning("QGLTemporaryContext: Cannot create context");
+ else
+ [d->ctx makeCurrentContext];
+ [fmt release];
+#endif
+}
+
+QGLTemporaryContext::~QGLTemporaryContext()
+{
+ if (d->ctx) {
+#ifndef QT_MAC_USE_COCOA
+ aglSetCurrentContext(0);
+ aglDestroyContext(d->ctx);
+#else
+ [NSOpenGLContext clearCurrentContext];
+ [d->ctx release];
+#endif
+ }
+}
+
bool QGLFormat::hasOpenGL()
{
return true;
@@ -918,54 +980,6 @@ void QGLWidgetPrivate::updatePaintDevice()
q->update();
}
-
-void QGLExtensions::init()
-{
- static bool init_done = false;
-
- if (init_done)
- return;
- init_done = true;
-
-#ifndef QT_MAC_USE_COCOA
- GLint attribs[] = { AGL_RGBA, AGL_NONE };
- AGLPixelFormat fmt = aglChoosePixelFormat(0, 0, attribs);
- if (!fmt) {
- qDebug("QGLExtensions: Couldn't find any RGB visuals");
- return;
- }
- AGLContext ctx = aglCreateContext(fmt, 0);
- if (!ctx) {
- qDebug("QGLExtensions: Unable to create context");
- } else {
- aglSetCurrentContext(ctx);
- init_extensions();
- aglSetCurrentContext(0);
- aglDestroyContext(ctx);
- }
- aglDestroyPixelFormat(fmt);
-#else
- QMacCocoaAutoReleasePool pool;
- NSOpenGLPixelFormatAttribute attribs[] = { 0 };
- NSOpenGLPixelFormat *fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs];
- if (!fmt) {
- qWarning("QGLExtensions: Cannot find any visuals");
- return;
- }
-
- NSOpenGLContext *ctx = [[NSOpenGLContext alloc] initWithFormat:fmt shareContext:0];
- if (!ctx) {
- qWarning("QGLExtensions: Cannot create context");
- } else {
- [ctx makeCurrentContext];
- init_extensions();
- [NSOpenGLContext clearCurrentContext];
- [ctx release];
- }
- [fmt release];
-#endif
-}
-
#endif
QT_END_NAMESPACE
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index f07a1f1..9e8e335 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -271,6 +271,60 @@ private:
// "ctx" is destroyed. Returns null if nothing is sharing with ctx.
Q_OPENGL_EXPORT const QGLContext *qt_gl_transfer_context(const QGLContext *);
+// GL extension definitions
+class QGLExtensions {
+public:
+ enum Extension {
+ TextureRectangle = 0x00000001,
+ SampleBuffers = 0x00000002,
+ GenerateMipmap = 0x00000004,
+ TextureCompression = 0x00000008,
+ FragmentProgram = 0x00000010,
+ MirroredRepeat = 0x00000020,
+ FramebufferObject = 0x00000040,
+ StencilTwoSide = 0x00000080,
+ StencilWrap = 0x00000100,
+ PackedDepthStencil = 0x00000200,
+ NVFloatBuffer = 0x00000400,
+ PixelBufferObject = 0x00000800,
+ FramebufferBlit = 0x00001000,
+ NPOTTextures = 0x00002000,
+ BGRATextureFormat = 0x00004000,
+ DDSTextureCompression = 0x00008000,
+ ETC1TextureCompression = 0x00010000,
+ PVRTCTextureCompression = 0x00020000,
+ FragmentShader = 0x00040000
+ };
+ Q_DECLARE_FLAGS(Extensions, Extension)
+
+ static Extensions glExtensions();
+
+private:
+ static Extensions currentContextExtensions();
+};
+
+/*
+ QGLTemporaryContext - the main objective of this class is to have a way of
+ creating a GL context and making it current, without going via QGLWidget
+ and friends. At certain points during GL initialization we need a current
+ context in order decide what GL features are available, and to resolve GL
+ extensions. Having a light-weight way of creating such a context saves
+ initial application startup time, and it doesn't wind up creating recursive
+ conflicts.
+ The class currently uses a private d pointer to hide the platform specific
+ types. This could possibly been done inline with #ifdef'ery, but it causes
+ major headaches on e.g. X11 due to namespace pollution.
+*/
+class QGLTemporaryContextPrivate;
+class QGLTemporaryContext {
+public:
+ QGLTemporaryContext(bool directRendering = true, QWidget *parent = 0);
+ ~QGLTemporaryContext();
+
+private:
+ QScopedPointer<QGLTemporaryContextPrivate> d;
+};
+
class QGLTexture;
// This probably needs to grow to GL_MAX_VERTEX_ATTRIBS, but 3 is ok for now as that's
@@ -347,10 +401,12 @@ public:
uint crWin : 1;
uint internal_context : 1;
uint version_flags_cached : 1;
+ uint extension_flags_cached : 1;
QPaintDevice *paintDevice;
QColor transpColor;
QGLContext *q_ptr;
QGLFormat::OpenGLVersionFlags version_flags;
+ QGLExtensions::Extensions extension_flags;
QGLContextGroup *group;
GLint max_texture_size;
@@ -389,41 +445,8 @@ Q_SIGNALS:
void aboutToDestroyContext(const QGLContext *context);
};
-// GL extension definitions
-class QGLExtensions {
-public:
- enum Extension {
- TextureRectangle = 0x00000001,
- SampleBuffers = 0x00000002,
- GenerateMipmap = 0x00000004,
- TextureCompression = 0x00000008,
- FragmentProgram = 0x00000010,
- MirroredRepeat = 0x00000020,
- FramebufferObject = 0x00000040,
- StencilTwoSide = 0x00000080,
- StencilWrap = 0x00000100,
- PackedDepthStencil = 0x00000200,
- NVFloatBuffer = 0x00000400,
- PixelBufferObject = 0x00000800,
- FramebufferBlit = 0x00001000,
- NPOTTextures = 0x00002000,
- BGRATextureFormat = 0x00004000,
- DDSTextureCompression = 0x00008000,
- ETC1TextureCompression = 0x00010000,
- PVRTCTextureCompression = 0x00020000,
- FragmentShader = 0x00040000
- };
- Q_DECLARE_FLAGS(Extensions, Extension)
-
- static Extensions glExtensions;
- static bool nvidiaFboNeedsFinish;
- static void init(); // sys dependent
- static void init_extensions(); // general: called by init()
-};
-
Q_DECLARE_OPERATORS_FOR_FLAGS(QGLExtensions::Extensions)
-
// Temporarily make a context current if not already current or
// shared with the current contex. The previous context is made
// current when the object goes out of scope.
@@ -547,7 +570,7 @@ bool qt_gl_preferGL2Engine();
inline GLenum qt_gl_preferredTextureFormat()
{
- return (QGLExtensions::glExtensions & QGLExtensions::BGRATextureFormat) && QSysInfo::ByteOrder == QSysInfo::LittleEndian
+ return (QGLExtensions::glExtensions() & QGLExtensions::BGRATextureFormat) && QSysInfo::ByteOrder == QSysInfo::LittleEndian
? GL_BGRA : GL_RGBA;
}
@@ -556,7 +579,7 @@ inline GLenum qt_gl_preferredTextureTarget()
#if defined(QT_OPENGL_ES_2)
return GL_TEXTURE_2D;
#else
- return (QGLExtensions::glExtensions & QGLExtensions::TextureRectangle)
+ return (QGLExtensions::glExtensions() & QGLExtensions::TextureRectangle)
&& !qt_gl_preferGL2Engine()
? GL_TEXTURE_RECTANGLE_NV
: GL_TEXTURE_2D;
@@ -628,7 +651,7 @@ private:
};
-// This class can be used to match GL extensions with doing any mallocs. The
+// This class can be used to match GL extensions without doing any mallocs. The
// class assumes that the GL extension string ends with a space character,
// which it should do on all conformant platforms. Create the object and pass
// in a pointer to the extension string, then call match() on each extension
diff --git a/src/opengl/qgl_qws.cpp b/src/opengl/qgl_qws.cpp
index f69ad7b..d4adc8b 100644
--- a/src/opengl/qgl_qws.cpp
+++ b/src/opengl/qgl_qws.cpp
@@ -83,6 +83,28 @@ static QGLScreen *glScreenForDevice(QPaintDevice *device)
return 0;
}
+/*
+ QGLTemporaryContext implementation
+*/
+
+class QGLTemporaryContextPrivate
+{
+public:
+ QGLWidget *widget;
+};
+
+QGLTemporaryContext::QGLTemporaryContext(bool, QWidget *)
+ : d(new QGLTemporaryContextPrivate)
+{
+ d->widget = new QGLWidget;
+ d->widget->makeCurrent();
+}
+
+QGLTemporaryContext::~QGLTemporaryContext()
+{
+ delete d->widget;
+}
+
/*****************************************************************************
QOpenGL debug facilities
*****************************************************************************/
@@ -311,36 +333,4 @@ void QGLWidget::setColormap(const QGLColormap &)
{
}
-void QGLExtensions::init()
-{
- static bool init_done = false;
-
- if (init_done)
- return;
- init_done = true;
-
- // We need a context current to initialize the extensions,
- // but getting a valid EGLNativeWindowType this early can be
- // problematic under QWS. So use a pbuffer instead.
- //
- // Unfortunately OpenGL/ES 2.0 systems don't normally
- // support pbuffers, so we have no choice but to try
- // our luck with a window on those systems.
-#if defined(QT_OPENGL_ES_2)
- QGLWidget tmpWidget;
- tmpWidget.makeCurrent();
-
- init_extensions();
-
- tmpWidget.doneCurrent();
-#else
- QGLPixelBuffer pbuffer(16, 16);
- pbuffer.makeCurrent();
-
- init_extensions();
-
- pbuffer.doneCurrent();
-#endif
-}
-
QT_END_NAMESPACE
diff --git a/src/opengl/qgl_win.cpp b/src/opengl/qgl_win.cpp
index c1132b5..b5f952e 100644
--- a/src/opengl/qgl_win.cpp
+++ b/src/opengl/qgl_win.cpp
@@ -575,7 +575,7 @@ QGLFormat pfiToQGLFormat(HDC hdc, int pfi)
QVarLengthArray<int> iAttributes(40);
QVarLengthArray<int> iValues(40);
int i = 0;
- bool has_sample_buffers = QGLExtensions::glExtensions & QGLExtensions::SampleBuffers;
+ bool has_sample_buffers = QGLExtensions::glExtensions() & QGLExtensions::SampleBuffers;
iAttributes[i++] = WGL_DOUBLE_BUFFER_ARB; // 0
iAttributes[i++] = WGL_DEPTH_BITS_ARB; // 1
@@ -652,52 +652,14 @@ QGLFormat pfiToQGLFormat(HDC hdc, int pfi)
/*
- Creates a temporary GL context and makes it current
- - cleans up when the object is destructed.
+ QGLTemporaryContext implementation
*/
Q_GUI_EXPORT const QString qt_getRegisteredWndClass();
-class QGLTempContext
+class QGLTemporaryContextPrivate
{
public:
- QGLTempContext(bool directRendering, QWidget *parent = 0)
- {
- QString windowClassName = qt_getRegisteredWndClass();
- if (parent && !parent->internalWinId())
- parent = parent->nativeParentWidget();
-
- dmy_id = CreateWindow((const wchar_t *)windowClassName.utf16(),
- 0, 0, 0, 0, 1, 1,
- parent ? parent->winId() : 0, 0, qWinAppInst(), 0);
-
- dmy_pdc = GetDC(dmy_id);
- PIXELFORMATDESCRIPTOR dmy_pfd;
- memset(&dmy_pfd, 0, sizeof(PIXELFORMATDESCRIPTOR));
- dmy_pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR);
- dmy_pfd.nVersion = 1;
- dmy_pfd.dwFlags = PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW;
- dmy_pfd.iPixelType = PFD_TYPE_RGBA;
- if (!directRendering)
- dmy_pfd.dwFlags |= PFD_GENERIC_FORMAT;
-
- int dmy_pf = ChoosePixelFormat(dmy_pdc, &dmy_pfd);
- SetPixelFormat(dmy_pdc, dmy_pf, &dmy_pfd);
- dmy_rc = wglCreateContext(dmy_pdc);
- old_dc = wglGetCurrentDC();
- old_context = wglGetCurrentContext();
- wglMakeCurrent(dmy_pdc, dmy_rc);
- }
-
- ~QGLTempContext() {
- wglMakeCurrent(dmy_pdc, 0);
- wglDeleteContext(dmy_rc);
- ReleaseDC(dmy_id, dmy_pdc);
- DestroyWindow(dmy_id);
- if (old_dc && old_context)
- wglMakeCurrent(old_dc, old_context);
- }
-
HDC dmy_pdc;
HGLRC dmy_rc;
HDC old_dc;
@@ -705,6 +667,45 @@ public:
WId dmy_id;
};
+QGLTemporaryContext::QGLTemporaryContext(bool directRendering, QWidget *parent)
+ : d(new QGLTemporaryContextPrivate)
+{
+ QString windowClassName = qt_getRegisteredWndClass();
+ if (parent && !parent->internalWinId())
+ parent = parent->nativeParentWidget();
+
+ d->dmy_id = CreateWindow((const wchar_t *)windowClassName.utf16(),
+ 0, 0, 0, 0, 1, 1,
+ parent ? parent->winId() : 0, 0, qWinAppInst(), 0);
+
+ d->dmy_pdc = GetDC(d->dmy_id);
+ PIXELFORMATDESCRIPTOR dmy_pfd;
+ memset(&dmy_pfd, 0, sizeof(PIXELFORMATDESCRIPTOR));
+ dmy_pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR);
+ dmy_pfd.nVersion = 1;
+ dmy_pfd.dwFlags = PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW;
+ dmy_pfd.iPixelType = PFD_TYPE_RGBA;
+ if (!directRendering)
+ dmy_pfd.dwFlags |= PFD_GENERIC_FORMAT;
+
+ int dmy_pf = ChoosePixelFormat(d->dmy_pdc, &dmy_pfd);
+ SetPixelFormat(d->dmy_pdc, dmy_pf, &dmy_pfd);
+ d->dmy_rc = wglCreateContext(d->dmy_pdc);
+ d->old_dc = wglGetCurrentDC();
+ d->old_context = wglGetCurrentContext();
+ wglMakeCurrent(d->dmy_pdc, d->dmy_rc);
+}
+
+QGLTemporaryContext::~QGLTemporaryContext()
+{
+ wglMakeCurrent(d->dmy_pdc, 0);
+ wglDeleteContext(d->dmy_rc);
+ ReleaseDC(d->dmy_id, d->dmy_pdc);
+ DestroyWindow(d->dmy_id);
+ if (d->old_dc && d->old_context)
+ wglMakeCurrent(d->old_dc, d->old_context);
+}
+
static bool qgl_create_context(HDC hdc, QGLContextPrivate *d, QGLContextPrivate *shareContext)
{
d->rc = 0;
@@ -855,10 +856,10 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
myDc = GetDC(d->win);
}
- // NB! the QGLTempContext object is needed for the
+ // NB! the QGLTemporaryContext object is needed for the
// wglGetProcAddress() calls to succeed and are absolutely
// necessary - don't remove!
- QGLTempContext tmp_ctx(d->glFormat.directRendering(), widget);
+ QGLTemporaryContext tmp_ctx(d->glFormat.directRendering(), widget);
if (!myDc) {
qWarning("QGLContext::chooseContext(): Paint device cannot be null");
@@ -1087,7 +1088,7 @@ int QGLContext::choosePixelFormat(void* dummyPfd, HDC pdc)
iAttributes[i++] = 1;
}
int si = 0;
- bool trySampleBuffers = QGLExtensions::glExtensions & QGLExtensions::SampleBuffers;
+ bool trySampleBuffers = QGLExtensions::glExtensions() & QGLExtensions::SampleBuffers;
if (trySampleBuffers && d->glFormat.sampleBuffers()) {
iAttributes[i++] = WGL_SAMPLE_BUFFERS_ARB;
iAttributes[i++] = TRUE;
@@ -1593,15 +1594,4 @@ void QGLWidget::setColormap(const QGLColormap & c)
}
}
-void QGLExtensions::init()
-{
- static bool init_done = false;
-
- if (init_done)
- return;
- init_done = true;
- QGLTempContext temp_ctx(QGLFormat::defaultFormat().directRendering());
- init_extensions();
-}
-
QT_END_NAMESPACE
diff --git a/src/opengl/qgl_wince.cpp b/src/opengl/qgl_wince.cpp
index 460f10d..00a125a 100644
--- a/src/opengl/qgl_wince.cpp
+++ b/src/opengl/qgl_wince.cpp
@@ -95,8 +95,27 @@ public:
#include <qcolor.h>
+/*
+ QGLTemporaryContext implementation
+*/
+class QGLTemporaryContextPrivate
+{
+public:
+ QGLWidget *widget;
+};
+QGLTemporaryContext::QGLTemporaryContext(bool, QWidget *)
+ : d(new QGLTemporaryContextPrivate)
+{
+ d->widget = new QGLWidget;
+ d->widget->makeCurrent();
+}
+
+QGLTemporaryContext::~QGLTemporaryContext()
+{
+ delete d->widget;
+}
/*****************************************************************************
QGLFormat Win32/WGL-specific code
@@ -627,21 +646,4 @@ void QGLWidget::setColormap(const QGLColormap & c)
}
}
-void QGLExtensions::init()
-{
- static bool init_done = false;
-
- if (init_done)
- return;
- init_done = true;
-
- // We need a context current to initialize the extensions.
- QGLWidget tmpWidget;
- tmpWidget.makeCurrent();
-
- init_extensions();
-
- tmpWidget.doneCurrent();
-}
-
QT_END_NAMESPACE
diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp
index e883ddc..f4cc7c7 100644
--- a/src/opengl/qgl_x11.cpp
+++ b/src/opengl/qgl_x11.cpp
@@ -549,7 +549,7 @@ void *QGLContext::chooseVisual()
bool triedDouble = false;
bool triedSample = false;
if (fmt.sampleBuffers())
- fmt.setSampleBuffers(QGLExtensions::glExtensions & QGLExtensions::SampleBuffers);
+ fmt.setSampleBuffers(QGLExtensions::glExtensions() & QGLExtensions::SampleBuffers);
while(!fail && !(vis = tryVisual(fmt, bufDepths[i]))) {
if (!fmt.rgba() && bufDepths[i] > 1) {
i++;
@@ -1132,71 +1132,70 @@ void *QGLContext::getProcAddress(const QString &proc) const
return glXGetProcAddressARB(reinterpret_cast<const GLubyte *>(proc.toLatin1().data()));
}
-//
-// This class is used to create a temporary, minimal GL context, which is used
-// to retrive GL version and extension info. It's significantly faster to
-// construct than a QGLWidget, and it doesn't have the recursive creation
-// problem that QGLWidget would have. E.g. creating a temporary QGLWidget to
-// retrieve GL info as part of the QGLWidget initialization.
-//
-class QGLTempContext
-{
+/*
+ QGLTemporaryContext implementation
+*/
+
+class QGLTemporaryContextPrivate {
public:
- QGLTempContext(int screen = 0) :
- initialized(false),
- old_drawable(0),
- old_context(0)
- {
- int attribs[] = {GLX_RGBA, XNone};
- XVisualInfo *vi = glXChooseVisual(X11->display, screen, attribs);
- if (!vi) {
- qWarning("QGLTempContext: No GL capable X visuals available.");
- return;
- }
+ bool initialized;
+ Window drawable;
+ GLXContext context;
+ GLXDrawable oldDrawable;
+ GLXContext oldContext;
+};
- int useGL;
- glXGetConfig(X11->display, vi, GLX_USE_GL, &useGL);
- if (!useGL) {
- XFree(vi);
- return;
- }
+QGLTemporaryContext::QGLTemporaryContext(bool, QWidget *)
+ : d(new QGLTemporaryContextPrivate)
+{
+ d->initialized = false;
+ d->oldDrawable = 0;
+ d->oldContext = 0;
+ int screen = 0;
+
+ int attribs[] = {GLX_RGBA, XNone};
+ XVisualInfo *vi = glXChooseVisual(X11->display, screen, attribs);
+ if (!vi) {
+ qWarning("QGLTempContext: No GL capable X visuals available.");
+ return;
+ }
- old_drawable = glXGetCurrentDrawable();
- old_context = glXGetCurrentContext();
-
- XSetWindowAttributes a;
- a.colormap = qt_gl_choose_cmap(X11->display, vi);
- drawable = XCreateWindow(X11->display, RootWindow(X11->display, screen),
- 0, 0, 1, 1, 0,
- vi->depth, InputOutput, vi->visual,
- CWColormap, &a);
- context = glXCreateContext(X11->display, vi, 0, True);
- if (context && glXMakeCurrent(X11->display, drawable, context)) {
- initialized = true;
- } else {
- qWarning("QGLTempContext: Unable to create GL context.");
- XDestroyWindow(X11->display, drawable);
- }
+ int useGL;
+ glXGetConfig(X11->display, vi, GLX_USE_GL, &useGL);
+ if (!useGL) {
XFree(vi);
+ return;
}
- ~QGLTempContext() {
- if (initialized) {
- glXMakeCurrent(X11->display, 0, 0);
- glXDestroyContext(X11->display, context);
- XDestroyWindow(X11->display, drawable);
- }
- if (old_drawable && old_context)
- glXMakeCurrent(X11->display, old_drawable, old_context);
+ d->oldDrawable = glXGetCurrentDrawable();
+ d->oldContext = glXGetCurrentContext();
+
+ XSetWindowAttributes a;
+ a.colormap = qt_gl_choose_cmap(X11->display, vi);
+ d->drawable = XCreateWindow(X11->display, RootWindow(X11->display, screen),
+ 0, 0, 1, 1, 0,
+ vi->depth, InputOutput, vi->visual,
+ CWColormap, &a);
+ d->context = glXCreateContext(X11->display, vi, 0, True);
+ if (d->context && glXMakeCurrent(X11->display, d->drawable, d->context)) {
+ d->initialized = true;
+ } else {
+ qWarning("QGLTempContext: Unable to create GL context.");
+ XDestroyWindow(X11->display, d->drawable);
}
+ XFree(vi);
+}
-private:
- bool initialized;
- Window drawable;
- GLXContext context;
- GLXDrawable old_drawable;
- GLXContext old_context;
-};
+QGLTemporaryContext::~QGLTemporaryContext()
+{
+ if (d->initialized) {
+ glXMakeCurrent(X11->display, 0, 0);
+ glXDestroyContext(X11->display, d->context);
+ XDestroyWindow(X11->display, d->drawable);
+ }
+ if (d->oldDrawable && d->oldContext)
+ glXMakeCurrent(X11->display, d->oldDrawable, d->oldContext);
+}
/*****************************************************************************
QGLOverlayWidget (Internal overlay class for X11)
@@ -1632,27 +1631,6 @@ void QGLWidget::setColormap(const QGLColormap & c)
delete [] cmw;
}
-void QGLExtensions::init()
-{
- static bool init_done = false;
-
- if (init_done)
- return;
- init_done = true;
-
- QGLTempContext context;
- init_extensions();
-
- // nvidia 9x.xx unix drivers contain a bug which requires us to call glFinish before releasing an fbo
- // to avoid painting artifacts
- const QByteArray versionString(reinterpret_cast<const char*>(glGetString(GL_VERSION)));
- const int pos = versionString.indexOf("NVIDIA");
- if (pos >= 0) {
- const float nvidiaDriverVersion = versionString.mid(pos + strlen("NVIDIA")).toFloat();
- nvidiaFboNeedsFinish = nvidiaDriverVersion >= 90.0 && nvidiaDriverVersion < 100.0;
- }
-}
-
// Solaris defines glXBindTexImageEXT as part of the GL library
#if defined(GLX_VERSION_1_3) && !defined(Q_OS_HPUX)
typedef void (*qt_glXBindTexImageEXT)(Display*, GLXDrawable, int, const int*);
@@ -1668,7 +1646,7 @@ static bool qt_resolveTextureFromPixmap(QPaintDevice *paintDevice)
resolvedTextureFromPixmap = true;
// Check to see if we have NPOT texture support
- if ( !(QGLExtensions::glExtensions & QGLExtensions::NPOTTextures) &&
+ if ( !(QGLExtensions::glExtensions() & QGLExtensions::NPOTTextures) &&
!(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_2_0))
{
return false; // Can't use TFP without NPOT
diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp
index 85daf95..572834b 100644
--- a/src/opengl/qgl_x11egl.cpp
+++ b/src/opengl/qgl_x11egl.cpp
@@ -55,112 +55,115 @@ QT_BEGIN_NAMESPACE
bool qt_egl_setup_x11_visual(XVisualInfo &vi, EGLDisplay display, EGLConfig config,
const QX11Info &x11Info, bool useArgbVisual);
-//
-// QGLTempContext is a class for creating a temporary GL context
-// (which is needed during QGLWidget initialization to retrieve GL
-// extension info). Faster to construct than a full QGLWidget.
-//
-class QGLTempContext
+
+/*
+ QGLTemporaryContext implementation
+*/
+
+class QGLTemporaryContextPrivate
{
public:
- QGLTempContext(int screen = 0) :
- initialized(false),
- window(0),
- context(0),
- surface(0)
- {
- display = eglGetDisplay(EGLNativeDisplayType(X11->display));
+ bool initialized;
+ Window window;
+ EGLContext context;
+ EGLSurface surface;
+ EGLDisplay display;
+};
- if (!eglInitialize(display, NULL, NULL)) {
- qWarning("QGLTempContext: Unable to initialize EGL display.");
- return;
- }
+QGLTemporaryContext::QGLTemporaryContext(bool, QWidget *)
+ : d(new QGLTemporaryContextPrivate)
+{
+ d->initialized = false;
+ d->window = 0;
+ d->context = 0;
+ d->surface = 0;
+ int screen = 0;
+
+ d->display = eglGetDisplay(EGLNativeDisplayType(X11->display));
- EGLConfig config;
- int numConfigs = 0;
- EGLint attribs[] = {
- EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
+ if (!eglInitialize(d->display, NULL, NULL)) {
+ qWarning("QGLTemporaryContext: Unable to initialize EGL display.");
+ return;
+ }
+
+ EGLConfig config;
+ int numConfigs = 0;
+ EGLint attribs[] = {
+ EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
#ifdef QT_OPENGL_ES_2
- EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
+ EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
#endif
- EGL_NONE
- };
+ EGL_NONE
+ };
- eglChooseConfig(display, attribs, &config, 1, &numConfigs);
- if (!numConfigs) {
- qWarning("QGLTempContext: No EGL configurations available.");
- return;
- }
+ eglChooseConfig(d->display, attribs, &config, 1, &numConfigs);
+ if (!numConfigs) {
+ qWarning("QGLTemporaryContext: No EGL configurations available.");
+ return;
+ }
- XVisualInfo visualInfo;
- XVisualInfo *vi;
- int numVisuals;
- EGLint id = 0;
-
- eglGetConfigAttrib(display, config, EGL_NATIVE_VISUAL_ID, &id);
- if (id == 0) {
- // EGL_NATIVE_VISUAL_ID is optional and might not be supported
- // on some implementations - we'll have to do it the hard way
- QX11Info xinfo;
- qt_egl_setup_x11_visual(visualInfo, display, config, xinfo, false);
- } else {
- visualInfo.visualid = id;
- }
- vi = XGetVisualInfo(X11->display, VisualIDMask, &visualInfo, &numVisuals);
- if (!vi || numVisuals < 1) {
- qWarning("QGLTempContext: Unable to get X11 visual info id.");
- return;
- }
+ XVisualInfo visualInfo;
+ XVisualInfo *vi;
+ int numVisuals;
+ EGLint id = 0;
+
+ eglGetConfigAttrib(d->display, config, EGL_NATIVE_VISUAL_ID, &id);
+ if (id == 0) {
+ // EGL_NATIVE_VISUAL_ID is optional and might not be supported
+ // on some implementations - we'll have to do it the hard way
+ QX11Info xinfo;
+ qt_egl_setup_x11_visual(visualInfo, d->display, config, xinfo, false);
+ } else {
+ visualInfo.visualid = id;
+ }
+ vi = XGetVisualInfo(X11->display, VisualIDMask, &visualInfo, &numVisuals);
+ if (!vi || numVisuals < 1) {
+ qWarning("QGLTemporaryContext: Unable to get X11 visual info id.");
+ return;
+ }
- window = XCreateWindow(X11->display, RootWindow(X11->display, screen),
- 0, 0, 1, 1, 0,
- vi->depth, InputOutput, vi->visual,
- 0, 0);
+ d->window = XCreateWindow(X11->display, RootWindow(X11->display, screen),
+ 0, 0, 1, 1, 0,
+ vi->depth, InputOutput, vi->visual,
+ 0, 0);
- surface = eglCreateWindowSurface(display, config, (EGLNativeWindowType) window, NULL);
+ d->surface = eglCreateWindowSurface(d->display, config, (EGLNativeWindowType) d->window, NULL);
- if (surface == EGL_NO_SURFACE) {
- qWarning("QGLTempContext: Error creating EGL surface.");
- XFree(vi);
- XDestroyWindow(X11->display, window);
- return;
- }
+ if (d->surface == EGL_NO_SURFACE) {
+ qWarning("QGLTemporaryContext: Error creating EGL surface.");
+ XFree(vi);
+ XDestroyWindow(X11->display, d->window);
+ return;
+ }
- EGLint contextAttribs[] = {
+ EGLint contextAttribs[] = {
#ifdef QT_OPENGL_ES_2
- EGL_CONTEXT_CLIENT_VERSION, 2,
+ EGL_CONTEXT_CLIENT_VERSION, 2,
#endif
- EGL_NONE
- };
- context = eglCreateContext(display, config, 0, contextAttribs);
- if (context != EGL_NO_CONTEXT
- && eglMakeCurrent(display, surface, surface, context))
- {
- initialized = true;
- } else {
- qWarning("QGLTempContext: Error creating EGL context.");
- eglDestroySurface(display, surface);
- XDestroyWindow(X11->display, window);
- }
- XFree(vi);
+ EGL_NONE
+ };
+ d->context = eglCreateContext(d->display, config, 0, contextAttribs);
+ if (d->context != EGL_NO_CONTEXT
+ && eglMakeCurrent(d->display, d->surface, d->surface, d->context))
+ {
+ d->initialized = true;
+ } else {
+ qWarning("QGLTemporaryContext: Error creating EGL context.");
+ eglDestroySurface(d->display, d->surface);
+ XDestroyWindow(X11->display, d->window);
}
+ XFree(vi);
+}
- ~QGLTempContext() {
- if (initialized) {
- eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
- eglDestroyContext(display, context);
- eglDestroySurface(display, surface);
- XDestroyWindow(X11->display, window);
- }
+QGLTemporaryContext::~QGLTemporaryContext()
+{
+ if (d->initialized) {
+ eglMakeCurrent(d->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+ eglDestroyContext(d->display, d->context);
+ eglDestroySurface(d->display, d->surface);
+ XDestroyWindow(X11->display, d->window);
}
-
-private:
- bool initialized;
- Window window;
- EGLContext context;
- EGLSurface surface;
- EGLDisplay display;
-};
+}
bool QGLFormat::hasOpenGLOverlays()
{
@@ -547,19 +550,6 @@ void QGLWidget::setColormap(const QGLColormap &)
{
}
-void QGLExtensions::init()
-{
- static bool init_done = false;
-
- if (init_done)
- return;
- init_done = true;
-
- // We need a context current to initialize the extensions.
- QGLTempContext context;
- init_extensions();
-}
-
// Re-creates the EGL surface if the window ID has changed or if force is true
void QGLWidgetPrivate::recreateEglSurface(bool force)
{
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index ed21923..ce80796 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -396,7 +396,7 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
QGLContext *ctx = const_cast<QGLContext *>(QGLContext::currentContext());
fbo_guard.setContext(ctx);
- bool ext_detected = (QGLExtensions::glExtensions & QGLExtensions::FramebufferObject);
+ bool ext_detected = (QGLExtensions::glExtensions() & QGLExtensions::FramebufferObject);
if (!ext_detected || (ext_detected && !qt_resolve_framebufferobject_extensions(ctx)))
return;
@@ -466,7 +466,7 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
}
if (attachment == QGLFramebufferObject::CombinedDepthStencil
- && (QGLExtensions::glExtensions & QGLExtensions::PackedDepthStencil)) {
+ && (QGLExtensions::glExtensions() & QGLExtensions::PackedDepthStencil)) {
// depth and stencil buffer needs another extension
glGenRenderbuffers(1, &depth_stencil_buffer);
Q_ASSERT(!glIsRenderbuffer(depth_stencil_buffer));
@@ -1028,8 +1028,7 @@ QPaintEngine *QGLFramebufferObject::paintEngine() const
*/
bool QGLFramebufferObject::hasOpenGLFramebufferObjects()
{
- QGLExtensions::init();
- return (QGLExtensions::glExtensions & QGLExtensions::FramebufferObject);
+ return (QGLExtensions::glExtensions() & QGLExtensions::FramebufferObject);
}
/*!
@@ -1188,8 +1187,7 @@ bool QGLFramebufferObject::isBound() const
*/
bool QGLFramebufferObject::hasOpenGLFramebufferBlit()
{
- QGLExtensions::init();
- return (QGLExtensions::glExtensions & QGLExtensions::FramebufferBlit);
+ return (QGLExtensions::glExtensions() & QGLExtensions::FramebufferBlit);
}
/*!
@@ -1229,7 +1227,7 @@ void QGLFramebufferObject::blitFramebuffer(QGLFramebufferObject *target, const Q
GLbitfield buffers,
GLenum filter)
{
- if (!(QGLExtensions::glExtensions & QGLExtensions::FramebufferBlit))
+ if (!(QGLExtensions::glExtensions() & QGLExtensions::FramebufferBlit))
return;
const QGLContext *ctx = QGLContext::currentContext();
diff --git a/src/opengl/qglpixelbuffer_mac.mm b/src/opengl/qglpixelbuffer_mac.mm
index 49c1845..6731dd8 100644
--- a/src/opengl/qglpixelbuffer_mac.mm
+++ b/src/opengl/qglpixelbuffer_mac.mm
@@ -92,7 +92,7 @@ bool QGLPixelBufferPrivate::init(const QSize &size, const QGLFormat &f, QGLWidge
GLenum target = GL_TEXTURE_2D;
- if ((QGLExtensions::glExtensions & QGLExtensions::TextureRectangle)
+ if ((QGLExtensions::glExtensions() & QGLExtensions::TextureRectangle)
&& (size.width() != nearest_gl_texture_size(size.width())
|| size.height() != nearest_gl_texture_size(size.height())))
{
@@ -223,7 +223,7 @@ bool QGLPixelBufferPrivate::init(const QSize &size, const QGLFormat &f, QGLWidge
GLenum target = GL_TEXTURE_2D;
- if ((QGLExtensions::glExtensions & QGLExtensions::TextureRectangle)
+ if ((QGLExtensions::glExtensions() & QGLExtensions::TextureRectangle)
&& (size.width() != nearest_gl_texture_size(size.width())
|| size.height() != nearest_gl_texture_size(size.height())))
{
diff --git a/src/opengl/qglpixelbuffer_p.h b/src/opengl/qglpixelbuffer_p.h
index f40b7c5..c85dc5a 100644
--- a/src/opengl/qglpixelbuffer_p.h
+++ b/src/opengl/qglpixelbuffer_p.h
@@ -154,7 +154,6 @@ class QGLPixelBufferPrivate {
public:
QGLPixelBufferPrivate(QGLPixelBuffer *q) : q_ptr(q), invalid(true), qctx(0), pbuf(0), ctx(0)
{
- QGLExtensions::init();
#ifdef Q_WS_WIN
dc = 0;
#elif defined(Q_WS_MACX)
diff --git a/src/opengl/qglpixelbuffer_win.cpp b/src/opengl/qglpixelbuffer_win.cpp
index a986ccf..8d0d105 100644
--- a/src/opengl/qglpixelbuffer_win.cpp
+++ b/src/opengl/qglpixelbuffer_win.cpp
@@ -221,7 +221,7 @@ static void qt_format_to_attrib_list(bool has_render_texture, const QGLFormat &f
}
if ((f.redBufferSize() > 8 || f.greenBufferSize() > 8
|| f.blueBufferSize() > 8 || f.alphaBufferSize() > 8)
- && (QGLExtensions::glExtensions & QGLExtensions::NVFloatBuffer))
+ && (QGLExtensions::glExtensions() & QGLExtensions::NVFloatBuffer))
{
attribs[i++] = WGL_FLOAT_COMPONENTS_NV;
attribs[i++] = TRUE;
@@ -368,11 +368,9 @@ void QGLPixelBuffer::releaseFromDynamicTexture()
bool QGLPixelBuffer::hasOpenGLPbuffers()
{
bool ret = false;
- QGLWidget *dmy = 0;
- if (!QGLContext::currentContext()) {
- dmy = new QGLWidget;
- dmy->makeCurrent();
- }
+ QGLTemporaryContext *tmpContext = 0;
+ if (!QGLContext::currentContext())
+ tmpContext = new QGLTemporaryContext;
PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB =
(PFNWGLGETEXTENSIONSSTRINGARBPROC) wglGetProcAddress("wglGetExtensionsStringARB");
if (wglGetExtensionsStringARB) {
@@ -382,8 +380,8 @@ bool QGLPixelBuffer::hasOpenGLPbuffers()
ret = true;
}
}
- if (dmy)
- delete dmy;
+ if (tmpContext)
+ delete tmpContext;
return ret;
}
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index c823187..57918d0 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -108,6 +108,10 @@ static bool DEBUG_TEMP_FLAG;
#define DEBUG_ONCE_STR(str) DEBUG_ONCE qDebug() << (str);
#endif
+#ifdef Q_WS_X11
+static bool qt_nvidiaFboNeedsFinish = false;
+#endif
+
static inline void qt_glColor4ubv(unsigned char *col)
{
glColor4f(col[0]/255.0f, col[1]/255.0f, col[2]/255.0f, col[3]/255.0f);
@@ -423,7 +427,7 @@ inline void QGLOffscreen::release()
#ifdef Q_WS_X11
// workaround for bug in nvidia driver versions 9x.xx
- if (QGLExtensions::nvidiaFboNeedsFinish)
+ if (qt_nvidiaFboNeedsFinish)
glFinish();
#endif
@@ -477,7 +481,7 @@ inline QGLContext *QGLOffscreen::context() const
bool QGLOffscreen::isSupported()
{
- return (QGLExtensions::glExtensions & QGLExtensions::FramebufferObject); // for fbo
+ return (QGLExtensions::glExtensions() & QGLExtensions::FramebufferObject); // for fbo
}
struct QDrawQueueItem
@@ -1266,7 +1270,7 @@ bool QOpenGLPaintEngine::begin(QPaintDevice *pdev)
for (int j = 0; j < 4; ++j)
d->mv_matrix[i][j] = (i == j ? qreal(1) : qreal(0));
- bool has_frag_program = (QGLExtensions::glExtensions & QGLExtensions::FragmentProgram)
+ bool has_frag_program = (QGLExtensions::glExtensions() & QGLExtensions::FragmentProgram)
&& (pdev->devType() != QInternal::Pixmap);
QGLContext *ctx = const_cast<QGLContext *>(d->device->context());
@@ -1279,11 +1283,27 @@ bool QOpenGLPaintEngine::begin(QPaintDevice *pdev)
has_frag_program = qt_resolve_frag_program_extensions(ctx) && qt_resolve_version_1_3_functions(ctx);
d->use_stencil_method = d->device->format().stencil()
- && (QGLExtensions::glExtensions & QGLExtensions::StencilWrap);
+ && (QGLExtensions::glExtensions() & QGLExtensions::StencilWrap);
if (d->device->format().directRendering()
- && (d->use_stencil_method && QGLExtensions::glExtensions & QGLExtensions::StencilTwoSide))
+ && (d->use_stencil_method && QGLExtensions::glExtensions() & QGLExtensions::StencilTwoSide))
d->has_stencil_face_ext = qt_resolve_stencil_face_extension(ctx);
+#ifdef Q_WS_X11
+ static bool nvidia_workaround_needs_init = true;
+ if (nvidia_workaround_needs_init) {
+ // nvidia 9x.xx unix drivers contain a bug which requires us to
+ // call glFinish before releasing an fbo to avoid painting
+ // artifacts
+ const QByteArray versionString(reinterpret_cast<const char*>(glGetString(GL_VERSION)));
+ const int pos = versionString.indexOf("NVIDIA");
+ if (pos >= 0) {
+ const float nvidiaDriverVersion = versionString.mid(pos + strlen("NVIDIA")).toFloat();
+ qt_nvidiaFboNeedsFinish = nvidiaDriverVersion >= 90.0 && nvidiaDriverVersion < 100.0;
+ }
+ nvidia_workaround_needs_init = false;
+ }
+#endif
+
#ifndef QT_OPENGL_ES
if (!ctx->d_ptr->internal_context) {
glGetDoublev(GL_PROJECTION_MATRIX, &d->projection_matrix[0][0]);
@@ -1333,10 +1353,10 @@ bool QOpenGLPaintEngine::begin(QPaintDevice *pdev)
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_VERTEX_ARRAY);
- if (QGLExtensions::glExtensions & QGLExtensions::SampleBuffers)
+ if (QGLExtensions::glExtensions() & QGLExtensions::SampleBuffers)
glDisable(GL_MULTISAMPLE);
glDisable(GL_TEXTURE_2D);
- if (QGLExtensions::glExtensions & QGLExtensions::TextureRectangle)
+ if (QGLExtensions::glExtensions() & QGLExtensions::TextureRectangle)
glDisable(GL_TEXTURE_RECTANGLE_NV);
glDisable(GL_STENCIL_TEST);
glDisable(GL_CULL_FACE);
@@ -1534,7 +1554,7 @@ void QOpenGLPaintEnginePrivate::updateGradient(const QBrush &brush, const QRectF
#ifdef QT_OPENGL_ES
Q_UNUSED(brush);
#else
- bool has_mirrored_repeat = QGLExtensions::glExtensions & QGLExtensions::MirroredRepeat;
+ bool has_mirrored_repeat = QGLExtensions::glExtensions() & QGLExtensions::MirroredRepeat;
Qt::BrushStyle style = brush.style();
QTransform m = brush.transform();
@@ -2098,7 +2118,7 @@ static inline bool needsEmulation(Qt::BrushStyle style)
{
return !(style == Qt::SolidPattern
|| (style == Qt::LinearGradientPattern
- && (QGLExtensions::glExtensions & QGLExtensions::MirroredRepeat)));
+ && (QGLExtensions::glExtensions() & QGLExtensions::MirroredRepeat)));
}
void QOpenGLPaintEnginePrivate::updateUseEmulation()
@@ -2420,12 +2440,12 @@ void QOpenGLPaintEngine::updateRenderHints(QPainter::RenderHints hints)
d->high_quality_antialiasing = true;
} else {
d->high_quality_antialiasing = false;
- if (QGLExtensions::glExtensions & QGLExtensions::SampleBuffers)
+ if (QGLExtensions::glExtensions() & QGLExtensions::SampleBuffers)
glEnable(GL_MULTISAMPLE);
}
} else {
d->high_quality_antialiasing = false;
- if (QGLExtensions::glExtensions & QGLExtensions::SampleBuffers)
+ if (QGLExtensions::glExtensions() & QGLExtensions::SampleBuffers)
glDisable(GL_MULTISAMPLE);
}
@@ -2435,14 +2455,14 @@ void QOpenGLPaintEngine::updateRenderHints(QPainter::RenderHints hints)
if (!d->offscreen.isValid()) {
DEBUG_ONCE_STR("Unable to initialize offscreen, disabling high quality antialiasing");
d->high_quality_antialiasing = false;
- if (QGLExtensions::glExtensions & QGLExtensions::SampleBuffers)
+ if (QGLExtensions::glExtensions() & QGLExtensions::SampleBuffers)
glEnable(GL_MULTISAMPLE);
}
}
d->has_antialiasing = d->high_quality_antialiasing
|| ((hints & QPainter::Antialiasing)
- && (QGLExtensions::glExtensions & QGLExtensions::SampleBuffers));
+ && (QGLExtensions::glExtensions() & QGLExtensions::SampleBuffers));
}
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index 8ee4361..7a565e6 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -295,7 +295,6 @@ QGLWindowSurface::QGLWindowSurface(QWidget *window)
: QWindowSurface(window), d_ptr(new QGLWindowSurfacePrivate)
{
Q_ASSERT(window->isTopLevel());
- QGLExtensions::init();
d_ptr->pb = 0;
d_ptr->fbo = 0;
d_ptr->ctx = 0;
@@ -520,7 +519,7 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint &
glDisable(GL_SCISSOR_TEST);
- if (d_ptr->fbo && (QGLExtensions::glExtensions & QGLExtensions::FramebufferBlit)) {
+ if (d_ptr->fbo && (QGLExtensions::glExtensions() & QGLExtensions::FramebufferBlit)) {
const int h = d_ptr->fbo->height();
const int sx0 = br.left();
@@ -698,7 +697,7 @@ void QGLWindowSurface::updateGeometry() {
}
if (d_ptr->destructive_swap_buffers
- && (QGLExtensions::glExtensions & QGLExtensions::FramebufferObject)
+ && (QGLExtensions::glExtensions() & QGLExtensions::FramebufferObject)
&& (d_ptr->fbo || !d_ptr->tried_fbo)
&& qt_gl_preferGL2Engine())
{
@@ -712,7 +711,7 @@ void QGLWindowSurface::updateGeometry() {
format.setInternalTextureFormat(GLenum(GL_RGBA));
format.setTextureTarget(target);
- if (QGLExtensions::glExtensions & QGLExtensions::FramebufferBlit)
+ if (QGLExtensions::glExtensions() & QGLExtensions::FramebufferBlit)
format.setSamples(8);
d_ptr->fbo = new QGLFramebufferObject(rect.size(), format);
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 4215e97..9b91c7d 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -8,10 +8,14 @@ TEMPLATE = subdirs
compiler \
compilerwarnings \
linguist \
+ maketestselftest \
moc \
uic \
uic3 \
- guiapplauncher
+ guiapplauncher \
+ #atwrapper \ # These tests need significant updating,
+ #uiloader \ # they have hardcoded machine names etc.
+
Q3SUBDIRS += \
q3accel \
q3action \
@@ -130,6 +134,7 @@ SUBDIRS += \
qdoublevalidator \
qdrag \
qerrormessage \
+ qevent \
qeventloop \
qexplicitlyshareddatapointer \
qfile \
@@ -478,7 +483,8 @@ embedded:!wince* {
}
symbian {
- SUBDIRS += qsoftkeymanager
+ SUBDIRS += qsoftkeymanager \
+ qs60mainapplication
}
# Enable the tests specific to QtXmlPatterns. If you add a test, remember to
diff --git a/tests/auto/maketestselftest/maketestselftest.pro b/tests/auto/maketestselftest/maketestselftest.pro
new file mode 100644
index 0000000..6cc1744
--- /dev/null
+++ b/tests/auto/maketestselftest/maketestselftest.pro
@@ -0,0 +1,9 @@
+load(qttest_p4)
+
+SOURCES += tst_maketestselftest.cpp
+QT = core
+
+DEFINES += SRCDIR=\\\"$$PWD/\\\"
+
+requires(!cross_compile)
+
diff --git a/tests/auto/maketestselftest/tst_maketestselftest.cpp b/tests/auto/maketestselftest/tst_maketestselftest.cpp
new file mode 100644
index 0000000..ea7f36c
--- /dev/null
+++ b/tests/auto/maketestselftest/tst_maketestselftest.cpp
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QDir>
+#include <QFile>
+#include <QRegExp>
+#include <QStringList>
+#include <QTest>
+
+class tst_MakeTestSelfTest: public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void auto_dot_pro();
+ void auto_dot_pro_data();
+};
+
+/* Verify that all tests are listed somewhere in auto.pro */
+void tst_MakeTestSelfTest::auto_dot_pro()
+{
+ static QStringList lines;
+
+ if (lines.isEmpty()) {
+ QString filename = QString::fromLatin1(SRCDIR "/../auto.pro");
+ QFile file(filename);
+ if (!file.open(QIODevice::ReadOnly)) {
+ QFAIL(qPrintable(QString("open %1: %2").arg(filename).arg(file.errorString())));
+ }
+ while (!file.atEnd()) {
+ lines << file.readLine().trimmed();
+ }
+ }
+
+ QFETCH(QString, subdir);
+ QRegExp re(QString("( |=|^|#)%1( |\\\\|$)").arg(QRegExp::escape(subdir)));
+ foreach (const QString& line, lines) {
+ if (re.indexIn(line) != -1) {
+ return;
+ }
+ }
+
+ QFAIL(qPrintable(QString(
+ "Subdir `%1' is missing from tests/auto/auto.pro\n"
+ "This means the test won't be compiled or run on any platform.\n"
+ "If this is intentional, please put the test name in a comment in auto.pro.").arg(subdir))
+ );
+}
+
+void tst_MakeTestSelfTest::auto_dot_pro_data()
+{
+ QTest::addColumn<QString>("subdir");
+ QDir dir(SRCDIR "/..");
+ QStringList subdirs = dir.entryList(QDir::AllDirs|QDir::NoDotAndDotDot);
+
+ foreach (const QString& subdir, subdirs) {
+ QTest::newRow(qPrintable(subdir)) << subdir;
+ }
+}
+
+QTEST_MAIN(tst_MakeTestSelfTest)
+#include "tst_maketestselftest.moc"
diff --git a/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp b/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp
index e332e11..d3d81e6 100644
--- a/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp
+++ b/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp
@@ -128,7 +128,7 @@ void tst_QAudioDeviceInfo::codecs()
void tst_QAudioDeviceInfo::channels()
{
if(available) {
- QList<int> avail = device->supportedChannelCounts();
+ QList<int> avail = device->supportedChannels();
QVERIFY(avail.size() > 0);
}
}
@@ -160,7 +160,7 @@ void tst_QAudioDeviceInfo::sampleTypes()
void tst_QAudioDeviceInfo::frequencies()
{
if(available) {
- QList<int> avail = device->supportedSampleRates();
+ QList<int> avail = device->supportedFrequencies();
QVERIFY(avail.size() > 0);
}
}
@@ -169,8 +169,8 @@ void tst_QAudioDeviceInfo::isformat()
{
if(available) {
QAudioFormat format;
- format.setSampleRate(44100);
- format.setChannelCount(2);
+ format.setFrequency(44100);
+ format.setChannels(2);
format.setSampleType(QAudioFormat::SignedInt);
format.setByteOrder(QAudioFormat::LittleEndian);
format.setSampleSize(16);
@@ -185,8 +185,8 @@ void tst_QAudioDeviceInfo::preferred()
{
if(available) {
QAudioFormat format = device->preferredFormat();
- QVERIFY(format.sampleRate() == 44100);
- QVERIFY(format.channelCount() == 2);
+ QVERIFY(format.frequency() == 44100);
+ QVERIFY(format.channels() == 2);
}
}
@@ -194,9 +194,9 @@ void tst_QAudioDeviceInfo::nearest()
{
if(available) {
QAudioFormat format1, format2;
- format1.setSampleRate(8000);
+ format1.setFrequency(8000);
format2 = device->nearestFormat(format1);
- QVERIFY(format2.sampleRate() == 44100);
+ QVERIFY(format2.frequency() == 44100);
}
}
diff --git a/tests/auto/qaudioformat/tst_qaudioformat.cpp b/tests/auto/qaudioformat/tst_qaudioformat.cpp
index a7200c4..0206798 100644
--- a/tests/auto/qaudioformat/tst_qaudioformat.cpp
+++ b/tests/auto/qaudioformat/tst_qaudioformat.cpp
@@ -77,8 +77,8 @@ void tst_QAudioFormat::checkNull()
QAudioFormat audioFormat1(audioFormat0);
QVERIFY(!audioFormat1.isValid());
- audioFormat0.setSampleRate(44100);
- audioFormat0.setChannelCount(2);
+ audioFormat0.setFrequency(44100);
+ audioFormat0.setChannels(2);
audioFormat0.setSampleSize(16);
audioFormat0.setCodec("audio/pcm");
audioFormat0.setSampleType(QAudioFormat::SignedInt);
@@ -88,15 +88,15 @@ void tst_QAudioFormat::checkNull()
void tst_QAudioFormat::checkFrequency()
{
QAudioFormat audioFormat;
- audioFormat.setSampleRate(44100);
- QVERIFY(audioFormat.sampleRate() == 44100);
+ audioFormat.setFrequency(44100);
+ QVERIFY(audioFormat.frequency() == 44100);
}
void tst_QAudioFormat::checkChannels()
{
QAudioFormat audioFormat;
- audioFormat.setChannelCount(2);
- QVERIFY(audioFormat.channelCount() == 2);
+ audioFormat.setChannels(2);
+ QVERIFY(audioFormat.channels() == 2);
}
void tst_QAudioFormat::checkSampleSize()
@@ -137,15 +137,15 @@ void tst_QAudioFormat::checkEquality()
QVERIFY(!(audioFormat0 != audioFormat1));
// on filled formats
- audioFormat0.setSampleRate(8000);
- audioFormat0.setChannelCount(1);
+ audioFormat0.setFrequency(8000);
+ audioFormat0.setChannels(1);
audioFormat0.setSampleSize(8);
audioFormat0.setCodec("audio/pcm");
audioFormat0.setByteOrder(QAudioFormat::LittleEndian);
audioFormat0.setSampleType(QAudioFormat::UnSignedInt);
- audioFormat1.setSampleRate(8000);
- audioFormat1.setChannelCount(1);
+ audioFormat1.setFrequency(8000);
+ audioFormat1.setChannels(1);
audioFormat1.setSampleSize(8);
audioFormat1.setCodec("audio/pcm");
audioFormat1.setByteOrder(QAudioFormat::LittleEndian);
@@ -154,7 +154,7 @@ void tst_QAudioFormat::checkEquality()
QVERIFY(audioFormat0 == audioFormat1);
QVERIFY(!(audioFormat0 != audioFormat1));
- audioFormat0.setSampleRate(44100);
+ audioFormat0.setFrequency(44100);
QVERIFY(audioFormat0 != audioFormat1);
QVERIFY(!(audioFormat0 == audioFormat1));
}
@@ -164,8 +164,8 @@ void tst_QAudioFormat::checkAssignment()
QAudioFormat audioFormat0;
QAudioFormat audioFormat1;
- audioFormat0.setSampleRate(8000);
- audioFormat0.setChannelCount(1);
+ audioFormat0.setFrequency(8000);
+ audioFormat0.setChannels(1);
audioFormat0.setSampleSize(8);
audioFormat0.setCodec("audio/pcm");
audioFormat0.setByteOrder(QAudioFormat::LittleEndian);
diff --git a/tests/auto/qaudioinput/tst_qaudioinput.cpp b/tests/auto/qaudioinput/tst_qaudioinput.cpp
index 9468413..40b7fbb 100644
--- a/tests/auto/qaudioinput/tst_qaudioinput.cpp
+++ b/tests/auto/qaudioinput/tst_qaudioinput.cpp
@@ -68,8 +68,8 @@ private:
void tst_QAudioInput::initTestCase()
{
- format.setSampleRate(8000);
- format.setChannelCount(1);
+ format.setFrequency(8000);
+ format.setChannels(1);
format.setSampleSize(8);
format.setCodec("audio/pcm");
format.setByteOrder(QAudioFormat::LittleEndian);
@@ -94,8 +94,8 @@ void tst_QAudioInput::settings()
// Confirm the setting we added in the init function.
QAudioFormat f = audio->format();
- QVERIFY(format.channelCount() == f.channelCount());
- QVERIFY(format.sampleRate() == f.sampleRate());
+ QVERIFY(format.channels() == f.channels());
+ QVERIFY(format.frequency() == f.frequency());
QVERIFY(format.sampleSize() == f.sampleSize());
QVERIFY(format.codec() == f.codec());
QVERIFY(format.byteOrder() == f.byteOrder());
diff --git a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp
index 5005838..aeb2286 100644
--- a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp
+++ b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp
@@ -71,8 +71,8 @@ private:
void tst_QAudioOutput::initTestCase()
{
- format.setSampleRate(8000);
- format.setChannelCount(1);
+ format.setFrequency(8000);
+ format.setChannels(1);
format.setSampleSize(8);
format.setCodec("audio/pcm");
format.setByteOrder(QAudioFormat::LittleEndian);
@@ -95,8 +95,8 @@ void tst_QAudioOutput::settings()
// Confirm the setting we added in the init function.
QAudioFormat f = audio->format();
- QVERIFY(format.channelCount() == f.channelCount());
- QVERIFY(format.sampleRate() == f.sampleRate());
+ QVERIFY(format.channels() == f.channels());
+ QVERIFY(format.frequency() == f.frequency());
QVERIFY(format.sampleSize() == f.sampleSize());
QVERIFY(format.codec() == f.codec());
QVERIFY(format.byteOrder() == f.byteOrder());
diff --git a/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp b/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp
index b9d9d7e..d846615 100644
--- a/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp
+++ b/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp
@@ -64,6 +64,7 @@ private slots:
void screenNumberForQWidget();
void screenNumberForQPoint();
void availableGeometry();
+ void screenGeometry();
};
tst_QDesktopWidget::tst_QDesktopWidget()
@@ -98,6 +99,9 @@ void tst_QDesktopWidget::primaryScreen()
void tst_QDesktopWidget::availableGeometry()
{
QDesktopWidget desktop;
+ QTest::ignoreMessage(QtWarningMsg, "QDesktopWidget::availableGeometry(): Attempt "
+ "to get the available geometry of a null widget");
+ desktop.availableGeometry((QWidget *)0);
QRect total;
QRect available;
@@ -158,6 +162,27 @@ void tst_QDesktopWidget::screenNumberForQPoint()
QVERIFY(screen >= 0 && screen < desktopWidget->numScreens());
}
+void tst_QDesktopWidget::screenGeometry()
+{
+ QDesktopWidget *desktopWidget = QApplication::desktop();
+ QTest::ignoreMessage(QtWarningMsg, "QDesktopWidget::screenGeometry(): Attempt "
+ "to get the screen geometry of a null widget");
+ QRect r = desktopWidget->screenGeometry((QWidget *)0);
+ QVERIFY(r.isNull());
+ QWidget widget;
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+ r = desktopWidget->screenGeometry(&widget);
+
+ QRect total;
+ QRect available;
+ for (int i = 0; i < desktopWidget->screenCount(); ++i) {
+ total = desktopWidget->screenGeometry(i);
+ available = desktopWidget->availableGeometry(i);
+ }
+ QVERIFY(total.contains(r));
+}
+
QTEST_MAIN(tst_QDesktopWidget)
#include "tst_qdesktopwidget.moc"
diff --git a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
index 8c8ab81..16a621a 100644
--- a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
+++ b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
@@ -1669,6 +1669,9 @@ void tst_QGraphicsAnchorLayout::floatConflict()
void tst_QGraphicsAnchorLayout::infiniteMaxSizes()
{
+ if (sizeof(qreal) <= 4) {
+ QSKIP("qreal has too little precision, result will be wrong", SkipAll);
+ }
QGraphicsAnchorLayout *l = new QGraphicsAnchorLayout;
l->setContentsMargins(0, 0, 0, 0);
l->setSpacing(0);
diff --git a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
index e3d1bbe..7880d2d 100644
--- a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
+++ b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
@@ -1525,7 +1525,11 @@ void tst_QGraphicsAnchorLayout1::testMulti_data()
}
- QTest::newRow("Linear multi") << QSizeF(width, height) << theData << theResult;
+ if (sizeof(qreal) == 4) {
+ qDebug("Linear multi: Skipping! (qreal has too little precision, result will be wrong)");
+ } else {
+ QTest::newRow("Linear multi") << QSizeF(width, height) << theData << theResult;
+ }
}
// Multiple widgets, V shape
@@ -1595,7 +1599,11 @@ void tst_QGraphicsAnchorLayout1::testMulti_data()
}
}
- QTest::newRow("V multi") << QSizeF(width, height) << theData << theResult;
+ if (sizeof(qreal) == 4) {
+ qDebug("V multi: Skipping! (qreal has too little precision, result will be wrong)");
+ } else {
+ QTest::newRow("V multi") << QSizeF(width, height) << theData << theResult;
+ }
}
// Multiple widgets, grid
@@ -1653,7 +1661,11 @@ void tst_QGraphicsAnchorLayout1::testMulti_data()
<< BasicResult(i, QRectF(((i%d)+1)*horizontalStep, ((i/d)+1)*verticalStep, horizontalStep, verticalStep) );
}
- QTest::newRow("Grid multi") << QSizeF(200, 100) << theData << theResult;
+ if (sizeof(qreal) == 4) {
+ qDebug("Grid multi: Skipping! (qreal has too little precision, result will be wrong)");
+ } else {
+ QTest::newRow("Grid multi") << QSizeF(200, 100) << theData << theResult;
+ }
}
}
@@ -1669,16 +1681,16 @@ inline QGraphicsLayoutItem *getItem(
return widgets[index];
}
-static QRectF truncate(QRectF original)
+static bool fuzzierCompare(qreal a, qreal b)
{
- QRectF result;
+ return qAbs(a - b) <= qreal(0.0001);
+}
- result.setX(qRound(original.x() * 1000000) / 1000000.0);
- result.setY(qRound(original.y() * 1000000) / 1000000.0);
- result.setWidth(qRound(original.width() * 1000000) / 1000000.0);
- result.setHeight(qRound(original.height() * 1000000) / 1000000.0);
+static bool fuzzierCompare(const QRectF &r1, const QRectF &r2)
+{
- return result;
+ return fuzzierCompare(r1.x(), r2.x()) && fuzzierCompare(r1.y(), r2.y())
+ && fuzzierCompare(r1.width(), r2.width()) && fuzzierCompare(r1.height(), r2.height());
}
void tst_QGraphicsAnchorLayout1::testBasicLayout()
@@ -1727,10 +1739,10 @@ void tst_QGraphicsAnchorLayout1::testBasicLayout()
// Validate
for (int i = 0; i < result.count(); ++i) {
const BasicLayoutTestResult item = result[i];
- QRectF expected = truncate(item.rect);
- QRectF actual = truncate(widgets[item.index]->geometry());
+ QRectF expected = item.rect;
+ QRectF actual = widgets[item.index]->geometry();
- QCOMPARE(actual, expected);
+ QVERIFY(fuzzierCompare(actual, expected));
}
// Test mirrored mode
@@ -1744,10 +1756,10 @@ void tst_QGraphicsAnchorLayout1::testBasicLayout()
if (mirroredRect.isValid()){
mirroredRect.moveLeft(size.width()-item.rect.width()-item.rect.left());
}
- QRectF expected = truncate(mirroredRect);
- QRectF actual = truncate(widgets[item.index]->geometry());
+ QRectF expected = mirroredRect;
+ QRectF actual = widgets[item.index]->geometry();
- QCOMPARE(actual, expected);
+ QVERIFY(fuzzierCompare(actual, expected));
}
qDeleteAll(widgets);
diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
index 95de70e..51e2a57 100644
--- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
+++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
@@ -70,6 +70,7 @@ private slots:
void grayscale();
void colorize();
void drawPixmapItem();
+ void deviceCoordinateTranslateCaching();
};
void tst_QGraphicsEffect::initTestCase()
@@ -514,6 +515,51 @@ void tst_QGraphicsEffect::drawPixmapItem()
QTRY_VERIFY(effect->repaints >= 2);
}
+class DeviceEffect : public QGraphicsEffect
+{
+public:
+ QRectF boundingRectFor(const QRectF &rect) const
+ { return rect; }
+
+ void draw(QPainter *painter)
+ {
+ QPoint offset;
+ QPixmap pixmap = sourcePixmap(Qt::DeviceCoordinates, &offset, QGraphicsEffect::NoPad);
+
+ if (pixmap.isNull())
+ return;
+
+ painter->save();
+ painter->setWorldTransform(QTransform());
+ painter->drawPixmap(offset, pixmap);
+ painter->restore();
+ }
+};
+
+void tst_QGraphicsEffect::deviceCoordinateTranslateCaching()
+{
+ QGraphicsScene scene;
+ CustomItem *item = new CustomItem(0, 0, 10, 10);
+ scene.addItem(item);
+ scene.setSceneRect(0, 0, 50, 0);
+
+ item->setGraphicsEffect(new DeviceEffect);
+ item->setPen(Qt::NoPen);
+ item->setBrush(Qt::red);
+
+ QGraphicsView view(&scene);
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+
+ QTRY_VERIFY(item->numRepaints >= 1);
+ int numRepaints = item->numRepaints;
+
+ item->translate(10, 0);
+ QTest::qWait(50);
+
+ QVERIFY(item->numRepaints == numRepaints);
+}
+
QTEST_MAIN(tst_QGraphicsEffect)
#include "tst_qgraphicseffect.moc"
diff --git a/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp b/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp
index 73e4fb6..3415163 100644
--- a/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp
+++ b/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp
@@ -112,6 +112,7 @@ class MyQObject : public QObject
Q_PROPERTY(QKeySequence shortcut READ shortcut WRITE setShortcut)
Q_PROPERTY(CustomType propWithCustomType READ propWithCustomType WRITE setPropWithCustomType)
Q_PROPERTY(Policy enumProperty READ enumProperty WRITE setEnumProperty)
+ Q_PROPERTY(Ability flagsProperty READ flagsProperty WRITE setFlagsProperty)
Q_ENUMS(Policy Strategy)
Q_FLAGS(Ability)
@@ -150,6 +151,7 @@ public:
m_writeOnlyValue(789),
m_readOnlyValue(987),
m_enumValue(BarPolicy),
+ m_flagsValue(FooAbility),
m_qtFunctionInvoked(-1)
{ }
@@ -216,6 +218,11 @@ public:
void setEnumProperty(Policy policy)
{ m_enumValue = policy; }
+ Ability flagsProperty() const
+ { return m_flagsValue; }
+ void setFlagsProperty(Ability ability)
+ { m_flagsValue = ability; }
+
int qtFunctionInvoked() const
{ return m_qtFunctionInvoked; }
@@ -316,6 +323,10 @@ public:
{ m_qtFunctionInvoked = 56; return arg; }
Q_INVOKABLE QObject* myInvokableReturningMyQObjectAsQObject()
{ m_qtFunctionInvoked = 57; return this; }
+ Q_INVOKABLE Ability myInvokableWithFlagsArg(Ability arg)
+ { m_qtFunctionInvoked = 58; m_actuals << int(arg); return arg; }
+ Q_INVOKABLE MyQObject::Ability myInvokableWithQualifiedFlagsArg(MyQObject::Ability arg)
+ { m_qtFunctionInvoked = 59; m_actuals << int(arg); return arg; }
Q_INVOKABLE QObjectList findObjects() const
{ return findChildren<QObject *>(); }
@@ -433,6 +444,7 @@ protected:
QKeySequence m_shortcut;
CustomType m_customType;
Policy m_enumValue;
+ Ability m_flagsValue;
int m_qtFunctionInvoked;
QVariantList m_actuals;
QByteArray m_connectedSignal;
@@ -826,7 +838,7 @@ void tst_QScriptExtQObject::getSetStaticProperty()
{
QScriptValue val = m_engine->evaluate("myObject.enumProperty");
QVERIFY(val.isNumber());
- QCOMPARE(val.toInt32(), (int)MyQObject::BarPolicy);
+ QCOMPARE(val.toInt32(), int(MyQObject::BarPolicy));
}
m_engine->evaluate("myObject.enumProperty = 2");
QCOMPARE(m_myObject->enumProperty(), MyQObject::BazPolicy);
@@ -846,6 +858,25 @@ void tst_QScriptExtQObject::getSetStaticProperty()
m_engine->evaluate("myObject.enumProperty = 'nada'");
QCOMPARE(m_myObject->enumProperty(), (MyQObject::Policy)-1);
+ // flags property
+ QCOMPARE(m_myObject->flagsProperty(), MyQObject::FooAbility);
+ {
+ QScriptValue val = m_engine->evaluate("myObject.flagsProperty");
+ QVERIFY(val.isNumber());
+ QCOMPARE(val.toInt32(), int(MyQObject::FooAbility));
+ }
+ m_engine->evaluate("myObject.flagsProperty = 0x80");
+ QCOMPARE(m_myObject->flagsProperty(), MyQObject::BarAbility);
+ m_engine->evaluate("myObject.flagsProperty = 0x81");
+ QCOMPARE(m_myObject->flagsProperty(), MyQObject::Ability(MyQObject::FooAbility | MyQObject::BarAbility));
+ m_engine->evaluate("myObject.flagsProperty = 123"); // bogus values are accepted
+ QCOMPARE(int(m_myObject->flagsProperty()), 123);
+ m_engine->evaluate("myObject.flagsProperty = 'BazAbility'");
+ QCOMPARE(m_myObject->flagsProperty(), MyQObject::BazAbility);
+ m_engine->evaluate("myObject.flagsProperty = 'ScoobyDoo'");
+ // ### ouch! Shouldn't QMetaProperty::write() rather not change the value...?
+ QCOMPARE(m_myObject->flagsProperty(), (MyQObject::Ability)-1);
+
// auto-dereferencing of pointers
{
QBrush b = QColor(0xCA, 0xFE, 0xBA, 0xBE);
@@ -2017,6 +2048,7 @@ void tst_QScriptExtQObject::classEnums()
QScriptValue myClass = m_engine->newQMetaObject(m_myObject->metaObject(), m_engine->undefinedValue());
m_engine->globalObject().setProperty("MyQObject", myClass);
+ QVERIFY(m_engine->evaluate("MyQObject.FooPolicy").isNumber()); // no strong typing
QCOMPARE(static_cast<MyQObject::Policy>(m_engine->evaluate("MyQObject.FooPolicy").toInt32()),
MyQObject::FooPolicy);
QCOMPARE(static_cast<MyQObject::Policy>(m_engine->evaluate("MyQObject.BarPolicy").toInt32()),
@@ -2031,6 +2063,7 @@ void tst_QScriptExtQObject::classEnums()
QCOMPARE(static_cast<MyQObject::Strategy>(m_engine->evaluate("MyQObject.BazStrategy").toInt32()),
MyQObject::BazStrategy);
+ QVERIFY(m_engine->evaluate("MyQObject.NoAbility").isNumber()); // no strong typing
QCOMPARE(MyQObject::Ability(m_engine->evaluate("MyQObject.NoAbility").toInt32()),
MyQObject::NoAbility);
QCOMPARE(MyQObject::Ability(m_engine->evaluate("MyQObject.FooAbility").toInt32()),
@@ -2042,6 +2075,9 @@ void tst_QScriptExtQObject::classEnums()
QCOMPARE(MyQObject::Ability(m_engine->evaluate("MyQObject.AllAbility").toInt32()),
MyQObject::AllAbility);
+ // Constructors for flags are not provided
+ QVERIFY(m_engine->evaluate("MyQObject.Ability").isUndefined());
+
QScriptValue::PropertyFlags expectedEnumFlags = QScriptValue::ReadOnly | QScriptValue::Undeletable;
QCOMPARE(myClass.propertyFlags("FooPolicy"), expectedEnumFlags);
QCOMPARE(myClass.propertyFlags("BarPolicy"), expectedEnumFlags);
@@ -2094,6 +2130,25 @@ void tst_QScriptExtQObject::classEnums()
QCOMPARE(ret.isNumber(), true);
}
+ m_myObject->resetQtFunctionInvoked();
+ {
+ QScriptValue ret = m_engine->evaluate("myObject.myInvokableWithFlagsArg(MyQObject.FooAbility)");
+ QCOMPARE(m_myObject->qtFunctionInvoked(), 58);
+ QCOMPARE(m_myObject->qtFunctionActuals().size(), 1);
+ QCOMPARE(m_myObject->qtFunctionActuals().at(0).toInt(), int(MyQObject::FooAbility));
+ QCOMPARE(ret.isNumber(), true);
+ QCOMPARE(ret.toInt32(), int(MyQObject::FooAbility));
+ }
+ m_myObject->resetQtFunctionInvoked();
+ {
+ QScriptValue ret = m_engine->evaluate("myObject.myInvokableWithQualifiedFlagsArg(MyQObject.BarAbility)");
+ QCOMPARE(m_myObject->qtFunctionInvoked(), 59);
+ QCOMPARE(m_myObject->qtFunctionActuals().size(), 1);
+ QCOMPARE(m_myObject->qtFunctionActuals().at(0).toInt(), int(MyQObject::BarAbility));
+ QCOMPARE(ret.isNumber(), true);
+ QCOMPARE(ret.toInt32(), int(MyQObject::BarAbility));
+ }
+
// enum properties are not deletable or writable
QVERIFY(!m_engine->evaluate("delete MyQObject.BazPolicy").toBool());
myClass.setProperty("BazPolicy", QScriptValue());
diff --git a/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp
index c781108..1304f4e 100644
--- a/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp
+++ b/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp
@@ -95,6 +95,7 @@ private slots:
void keepOpenMode();
void resetTemplateAfterError();
void setTemplateAfterOpen();
+ void autoRemoveAfterFailedRename();
public:
};
@@ -558,5 +559,40 @@ void tst_QTemporaryFile::setTemplateAfterOpen()
QCOMPARE( temp.fileTemplate(), newTemplate );
}
+void tst_QTemporaryFile::autoRemoveAfterFailedRename()
+{
+ struct CleanOnReturn
+ {
+ ~CleanOnReturn()
+ {
+ if (!tempName.isEmpty())
+ QFile::remove(tempName);
+ }
+
+ void reset()
+ {
+ tempName.clear();
+ }
+
+ QString tempName;
+ };
+
+ CleanOnReturn cleaner;
+
+ {
+ QTemporaryFile file;
+ QVERIFY( file.open() );
+ cleaner.tempName = file.fileName();
+
+ QVERIFY( QFile::exists(cleaner.tempName) );
+ QVERIFY( !QFileInfo("i-do-not-exist").isDir() );
+ QVERIFY( !file.rename("i-do-not-exist/file.txt") );
+ QVERIFY( QFile::exists(cleaner.tempName) );
+ }
+
+ QVERIFY( !QFile::exists(cleaner.tempName) );
+ cleaner.reset();
+}
+
QTEST_MAIN(tst_QTemporaryFile)
#include "tst_qtemporaryfile.moc"
diff --git a/tests/auto/tests.xml b/tests/auto/tests.xml
deleted file mode 100644
index f197de0..0000000
--- a/tests/auto/tests.xml
+++ /dev/null
@@ -1,821 +0,0 @@
-<Configuration>
- <Tests>
- <Test name="atwrapper" location="tests/auto/atwrapper/tst_atwrapper" />
- <Test name="bic" location="tests/auto/bic/tst_bic" />
- <Test name="checkxmlfiles" location="tests/auto/checkxmlfiles/tst_checkxmlfiles" />
- <Test name="collections" location="tests/auto/collections/tst_collections" />
- <Test name="compile" location="tests/auto/compile/tst_compile" />
- <Test name="compilerwarnings" location="tests/auto/compilerwarnings/tst_compilerwarnings" />
- <Test name="exceptionsafety" location="tests/auto/exceptionsafety/tst_exceptionsafety" />
- <Test name="headers" location="tests/auto/headers/tst_headers" />
- <Test name="languagechange" location="tests/auto/languagechange/tst_languagechange" />
- <Test name="lrelease" location="tests/auto/linguist/lrelease/tst_lrelease" />
- <Test name="lconvert" location="tests/auto/linguist/lconvert/tst_convert" />
- <Test name="lupdate" location="tests/auto/linguist/lupdate/tst_lupdate" />
- <Test name="macgui" location="tests/auto/macgui/tst_macgui" platforms="macx-g++" />
- <Test name="mediaobject" location="tests/auto/mediaobject/tst_mediaobject" />
- <Test name="moc" location="tests/auto/moc/tst_moc" />
- <Test name="patternistexamplefiletree" location="tests/auto/patternistexamplefiletree/tst_patternistexamplefiletree" />
- <Test name="patternistexamples" location="tests/auto/patternistexamples/tst_patternistexamples" />
- <Test name="patternistheaders" location="tests/auto/patternistheaders/tst_patternistheaders" />
- <Test name="qabstractbutton" location="tests/auto/qabstractbutton/tst_qabstractbutton" />
- <Test name="qabstractitemmodel" location="tests/auto/qabstractitemmodel/tst_qabstractitemmodel" />
- <Test name="qabstractitemview" location="tests/auto/qabstractitemmodel/tst_qabstractitemmodel" />
- <Test name="qabstractmessagehandler" location="tests/auto/qabstractmessagehandler/tst_qabstractmessagehandler" />
- <Test name="qabstractprintdialog" location="tests/auto/qabstractprintdialog/tst_qabstractprintdialog" />
- <Test name="qabstractproxymodel" location="tests/auto/qabstractproxymodel/tst_qabstractproxymodel" />
- <Test name="qabstractscrollarea" location="tests/auto/qabstractscrollarea/tst_qabstractscrollarea" />
- <Test name="qabstractslider" location="tests/auto/qabstractslider/tst_qabstractslider" />
- <Test name="qabstractsocket" location="tests/auto/qabstractsocket/tst_qabstractsocket" />
- <Test name="qabstractspinbox" location="tests/auto/qabstractspinbox/tst_qabstractspinbox" />
- <Test name="qabstracttextdocumentlayout" location="tests/auto/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout" />
- <Test name="qabstracturiresolver" location="tests/auto/qabstracturiresolver/tst_qabstracturiresolver" />
- <Test name="qabstractxmlforwarditerator" location="tests/auto/qabstractxmlforwarditerator/tst_qabstractxmlforwarditerator" />
- <Test name="qabstractxmlnodemodel" location="tests/auto/qabstractxmlnodemodel/tst_qabstractxmlnodemodel" />
- <Test name="qabstractxmlreceiver" location="tests/auto/qabstractxmlreceiver/tst_qabstractxmlreceiver" />
- <Test name="qaccessibility" location="tests/auto/qaccessibility/tst_qaccessibility" />
- <Test name="qaccessibility_mac" location="tests/auto/qaccessibility_mac/tst_qaccessibility_mac" />
- <Test name="qaction" location="tests/auto/qaction/tst_qaction" />
- <Test name="qactiongroup" location="tests/auto/qactiongroup/tst_qactiongroup" />
- <Test name="qalgorithms" location="tests/auto/qalgorithms/tst_qalgorithms" />
- <Test name="qapplication" location="tests/auto/qapplication/tst_qapplication" />
- <Test name="qatomicint" location="tests/auto/qatomicint/tst_qatomicint" />
- <Test name="qatomicpointer" location="tests/auto/qatomicpointer/tst_qatomicpointer" />
- <Test name="qautoptr" location="tests/auto/qautoptr/tst_qautoptr" />
- <Test name="qbitarray" location="tests/auto/qbitarray/tst_qbitarray" />
- <Test name="qboxlayout" location="tests/auto/qboxlayout/tst_qboxlayout" />
- <Test name="qbrush" location="tests/auto/qbrush/tst_qbrush" />
- <Test name="qbuffer" location="tests/auto/qbuffer/tst_qbuffer" />
- <Test name="qbuttongroup" location="tests/auto/qbuttongroup/tst_qbuttongroup" />
- <Test name="qbytearray" location="tests/auto/qbytearray/tst_qbytearray" />
- <Test name="qcache" location="tests/auto/qcache/tst_qcache" />
- <Test name="qcalendarwidget" location="tests/auto/qcalendarwidget/tst_qcalendarwidget" />
- <Test name="qchar" location="tests/auto/qchar/tst_qchar" />
- <Test name="qcheckbox" location="tests/auto/qcheckbox/tst_qcheckbox" />
- <Test name="qclipboard" location="tests/auto/qclipboard/tst_qclipboard" />
- <Test name="qcolor" location="tests/auto/qcolor/tst_qcolor" />
- <Test name="qcolordialog" location="tests/auto/qcolordialog/tst_qcolordialog" />
- <Test name="qcolumnview" location="tests/auto/qcolumnview/tst_qcolumnview" />
- <Test name="qcombobox" location="tests/auto/qcombobox/tst_qcombobox" />
- <Test name="qcommandlinkbutton" location="tests/auto/qcommandlinkbutton/tst_qcommandlinkbutton" />
- <Test name="qcompleter" location="tests/auto/qcompleter/tst_qcompleter" />
- <Test name="qcomplextext" location="tests/auto/qcomplextext/tst_qcomplextext" />
- <Test name="qcopchannel" location="tests/auto/qcopchannel/tst_qcopchannel" />
- <Test name="qcoreapplication" location="tests/auto/qcoreapplication/tst_qcoreapplication" />
- <Test name="qcryptographichash" location="tests/auto/qcryptographichash/tst_qcryptographichash" />
- <Test name="qcssparser" location="tests/auto/qcssparser/tst_qcssparser" />
- <Test name="qdatastream" location="tests/auto/qdatastream/tst_qdatastream" />
- <Test name="qdatawidgetmapper" location="tests/auto/qdatawidgetmapper/tst_qdatawidgetmapper" />
- <Test name="qdate" location="tests/auto/qdate/tst_qdate" />
- <Test name="qdatetime" location="tests/auto/qdatetime/tst_qdatetime" />
- <Test name="qdatetimeedit" location="tests/auto/qdatetimeedit/tst_qdatetimeedit" />
- <Test name="qdbusabstractadaptor" location="tests/auto/qdbusabstractadaptor/tst_qdbusabstractadaptor" />
- <Test name="qdbusconnection" location="tests/auto/qdbusconnection/tst_qdbusconnection" />
- <Test name="qdbuscontext" location="tests/auto/qdbuscontext/tst_qdbuscontext" />
- <Test name="qdbusinterface" location="tests/auto/qdbusinterface/tst_qdbusinterface" />
- <Test name="qdbuslocalcalls" location="tests/auto/qdbuslocalcalls/tst_qdbuslocalcalls" />
- <Test name="qdbusmarshall" location="tests/auto/qdbusmarshall/tst_qdbusmarshall" />
- <Test name="qdbusmetaobject" location="tests/auto/qdbusmetaobject/tst_qdbusmetaobject" />
- <Test name="qdbusmetatype" location="tests/auto/qdbusmetatype/tst_qdbusmetatype" />
- <Test name="qdbusperformance" location="tests/auto/qdbusperformance/tst_qdbusperformance" />
- <Test name="qdbusreply" location="tests/auto/qdbusreply/tst_qdbusreply" />
- <Test name="qdbusserver" location="tests/auto/qdbusserver/tst_qdbusserver" />
- <Test name="qdbusthreading" location="tests/auto/qdbusthreading/tst_qdbusthreading" />
- <Test name="qdbusxmlparser" location="tests/auto/qdbusxmlparser/tst_qdbusxmlparser" />
- <Test name="qdebug" location="tests/auto/qdebug/tst_qdebug" />
- <Test name="qdesktopservices" location="tests/auto/qdesktopservices/tst_qdesktopservices" />
- <Test name="qdesktopwidget" location="tests/auto/qdesktopwidget/tst_qdesktopwidget" />
- <Test name="qdial" location="tests/auto/qdial/tst_qdial" />
- <Test name="qdialog" location="tests/auto/qdialog/tst_qdialog" />
- <Test name="qdialogbuttonbox" location="tests/auto/qdialogbuttonbox/tst_qdialogbuttonbox" />
- <Test name="qdir" location="tests/auto/qdir/tst_qdir" />
- <Test name="qdirectpainter" location="tests/auto/qdirectpainter/tst_qdirectpainter" />
- <Test name="qdiriterator" location="tests/auto/qdiriterator/tst_qdiriterator" />
- <Test name="qdirmodel" location="tests/auto/qdirmodel/tst_qdirmodel" />
- <Test name="qdockwidget" location="tests/auto/qdockwidget/tst_qdockwidget" />
- <Test name="qdom" location="tests/auto/qdom/tst_qdom" />
- <Test name="qdoublespinbox" location="tests/auto/qdoublespinbox/tst_qdoublespinbox" />
- <Test name="qdoublevalidator" location="tests/auto/qdoublevalidator/tst_qdoublevalidator" />
- <Test name="qdrag" location="tests/auto/qdrag/tst_qdrag" />
- <Test name="qerrormessage" location="tests/auto/qerrormessage/tst_qerrormessage" />
- <Test name="qevent" location="tests/auto/qevent/tst_qevent" />
- <Test name="qeventloop" location="tests/auto/qeventloop/tst_qeventloop" />
- <Test name="qexplicitlyshareddatapointer" location="tests/auto/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer" />
- <Test name="qfile" location="tests/auto/qfile/tst_qfile" />
- <Test name="qfiledialog" location="tests/auto/qfiledialog/tst_qfiledialog" />
- <Test name="qfileinfo" location="tests/auto/qfileinfo/tst_qfileinfo" />
- <Test name="qfilesystemmodel" location="tests/auto/qfilesystemmodel/tst_qfilesystemmodel" />
- <Test name="qfilesystemwatcher" location="tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher" />
- <Test name="qflags" location="tests/auto/qflags/tst_qflags" />
- <Test name="qfocusevent" location="tests/auto/qfocusevent/tst_qfocusevent" />
- <Test name="qfocusframe" location="tests/auto/qfocusframe/tst_qfocusframe" />
- <Test name="qfont" location="tests/auto/qfont/tst_qfont" />
- <Test name="qfontcombobox" location="tests/auto/qfontcombobox/tst_qfontcombobox" />
- <Test name="qfontdatabase" location="tests/auto/qfontdatabase/tst_qfontdatabase" />
- <Test name="qfontdialog" location="tests/auto/qfontdialog/tst_qfontdialog" />
- <Test name="qfontmetrics" location="tests/auto/qfontmetrics/tst_qfontmetrics" />
- <Test name="qformlayout" location="tests/auto/qformlayout/tst_qformlayout" />
- <Test name="qftp" location="tests/auto/qftp/tst_qftp" />
- <Test name="q_func_info" location="tests/auto/q_func_info/tst_q_func_info" />
- <Test name="qfuture" location="tests/auto/qfuture/tst_qfuture" />
- <Test name="qfuturewatcher" location="tests/auto/qfuturewatcher/tst_qfuturewatcher" />
- <Test name="qgetputenv" location="tests/auto/qgetputenv/tst_qgetputenv" />
- <Test name="qgl" location="tests/auto/qgl/tst_qgl" />
- <Test name="qglobal" location="tests/auto/qglobal/tst_qglobal" />
- <Test name="qgraphicsgridlayout" location="tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout" />
- <Test name="qgraphicsitem" location="tests/auto/qgraphicsitem/tst_qgraphicsitem" />
- <Test name="qgraphicsitemanimation" location="tests/auto/qgraphicsitemanimation/tst_qgraphicsitemanimation" />
- <Test name="qgraphicslayout" location="tests/auto/qgraphicslayout/tst_qgraphicslayout" />
- <Test name="qgraphicslayoutitem" location="tests/auto/qgraphicslayoutitem/tst_qgraphicslayoutitem" />
- <Test name="qgraphicslinearlayout" location="tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout" />
- <Test name="qgraphicsanchorlayout" location="tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout" />
- <Test name="qgraphicspixmapitem" location="tests/auto/qgraphicspixmapitem/tst_qgraphicspixmapitem" />
- <Test name="qgraphicspolygonitem" location="tests/auto/qgraphicspolygonitem/tst_qgraphicspolygonitem" />
- <Test name="qgraphicsproxywidget" location="tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget" />
- <Test name="qgraphicsscene" location="tests/auto/qgraphicsscene/tst_qgraphicsscene" />
- <Test name="qgraphicsview" location="tests/auto/qgraphicsview/tst_qgraphicsview" />
- <Test name="qgraphicswidget" location="tests/auto/qgraphicswidget/tst_qgraphicswidget" />
- <Test name="qgridlayout" location="tests/auto/qgridlayout/tst_qgridlayout" />
- <Test name="qgroupbox" location="tests/auto/qgroupbox/tst_qgroupbox" />
- <Test name="qguivariant" location="tests/auto/qguivariant/tst_qguivariant" />
- <Test name="qhash" location="tests/auto/qhash/tst_qhash" />
- <Test name="qheaderview" location="tests/auto/qheaderview/tst_qheaderview" />
- <Test name="qhelpcontentmodel" location="tests/auto/qhelpcontentmodel/tst_qhelpcontentmodel" />
- <Test name="qhelpenginecore" location="tests/auto/qhelpenginecore/tst_qhelpenginecore" />
- <Test name="qhelpgenerator" location="tests/auto/qhelpgenerator/tst_qhelpgenerator" />
- <Test name="qhelpindexmodel" location="tests/auto/qhelpindexmodel/tst_qhelpindexmodel" />
- <Test name="qhelpprojectdata" location="tests/auto/qhelpprojectdata/tst_qhelpprojectdata" />
- <Test name="qhostaddress" location="tests/auto/qhostaddress/tst_qhostaddress" />
- <Test name="qhostinfo" location="tests/auto/qhostinfo/tst_qhostinfo" />
- <Test name="qhttp" location="tests/auto/qhttp/tst_qhttp" />
- <Test name="qhttpnetworkconnection" location="tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection" />
- <Test name="qhttpnetworkreply" location="tests/auto/qhttpnetworkreply/tst_qhttpnetworkreply" />
- <Test name="qhttpsocketengine" location="tests/auto/qhttpsocketengine/tst_qhttpsocketengine" />
- <Test name="qicoimageformat" location="tests/auto/qicoimageformat/tst_qicoimageformat" />
- <Test name="qicon" location="tests/auto/qicon/tst_qicon" />
- <Test name="qimage" location="tests/auto/qimage/tst_qimage" />
- <Test name="qimageiohandler" location="tests/auto/qimageiohandler/tst_qimageiohandler" />
- <Test name="qimagereader" location="tests/auto/qimagereader/tst_qimagereader" />
- <Test name="qimagewriter" location="tests/auto/qimagewriter/tst_qimagewriter" />
- <Test name="qinputdialog" location="tests/auto/qinputdialog/tst_qinputdialog" />
- <Test name="qintvalidator" location="tests/auto/qintvalidator/tst_qintvalidator" />
- <Test name="qiodevice" location="tests/auto/qiodevice/tst_qiodevice" />
- <Test name="qitemdelegate" location="tests/auto/qitemdelegate/tst_qitemdelegate" />
- <Test name="qitemeditorfactory" location="tests/auto/qitemeditorfactory/tst_qitemeditorfactory" />
- <Test name="qitemmodel" location="tests/auto/qitemmodel/tst_qitemmodel" />
- <Test name="qitemselectionmodel" location="tests/auto/qitemselectionmodel/tst_qitemselectionmodel" />
- <Test name="qitemview" location="tests/auto/qitemview/tst_qitemview" />
- <Test name="qkeyevent" location="tests/auto/qkeyevent/tst_qkeyevent" />
- <Test name="qkeysequence" location="tests/auto/qkeysequence/tst_qkeysequence" />
- <Test name="qlabel" location="tests/auto/qlabel/tst_qlabel" />
- <Test name="qlayout" location="tests/auto/qlayout/tst_qlayout" />
- <Test name="qlcdnumber" location="tests/auto/qlcdnumber/tst_qlcdnumber" />
- <Test name="qlibrary" location="tests/auto/qlibrary/tst_qlibrary" />
- <Test name="qline" location="tests/auto/qline/tst_qline" />
- <Test name="qlineedit" location="tests/auto/qlineedit/tst_qlineedit" />
- <Test name="qlistbox" location="tests/auto/qlistbox/tst_qlistbox" />
- <Test name="qlistview" location="tests/auto/qlistview/tst_qlistview" />
- <Test name="qlistwidget" location="tests/auto/qlistwidget/tst_qlistwidget" />
- <Test name="qlocale" location="tests/auto/qlocale/tst_qlocale" />
- <Test name="qlocalsocket" location="tests/auto/qlocalsocket/tst_qlocalsocket" />
- <Test name="qmacstyle" location="tests/auto/qmacstyle/tst_qmacstyle" />
- <Test name="qmainwindow" location="tests/auto/qmainwindow/tst_qmainwindow" />
- <Test name="qmake" location="tests/auto/qmake/tst_qmake" />
- <Test name="qmap" location="tests/auto/qmap/tst_qmap" />
- <Test name="qmdiarea" location="tests/auto/qmdiarea/tst_qmdiarea" />
- <Test name="qmdisubwindow" location="tests/auto/qmdisubwindow/tst_qmdisubwindow" />
- <Test name="qmenu" location="tests/auto/qmenu/tst_qmenu" />
- <Test name="qmenubar" location="tests/auto/qmenubar/tst_qmenubar" />
- <Test name="qmessagebox" location="tests/auto/qmessagebox/tst_qmessagebox" />
- <Test name="qmetaobject" location="tests/auto/qmetaobject/tst_qmetaobject" />
- <Test name="qmetatype" location="tests/auto/qmetatype/tst_qmetatype" />
- <Test name="qmouseevent" location="tests/auto/qmouseevent/tst_qmouseevent" />
- <Test name="qmouseevent_modal" location="tests/auto/qmouseevent_modal/tst_qmousevent_modal" />
- <Test name="qmovie" location="tests/auto/qmovie/tst_qmovie" />
- <Test name="qmultiscreen" location="tests/auto/qmultiscreen/tst_qmultiscreen" />
- <Test name="qmutex" location="tests/auto/qmutex/tst_qmutex" />
- <Test name="qmutexlocker" location="tests/auto/qmutexlocker/tst_qmutexlocker" />
- <Test name="qnativesocketengine" location="tests/auto/qnativesocketengine/tst_qnativesocketengine" />
- <Test name="qnetworkcookie" location="tests/auto/qnetworkcookie/tst_qnetworkcookie" />
- <Test name="qnetworkcookiejar" location="tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar" />
- <Test name="qnetworkinterface" location="tests/auto/qnetworkinterface/tst_qnetworkinterface" />
- <Test name="qnetworkproxy" location="tests/auto/qnetworkproxy/tst_qnetworkproxy" />
- <Test name="qnetworkreply" location="tests/auto/qnetworkreply/tst_qnetworkreply" />
- <Test name="qnetworkrequest" location="tests/auto/qnetworkrequest/tst_qnetworkrequest" />
- <Test name="qnumeric" location="tests/auto/qnumeric/tst_qnumeric" />
- <Test name="qobject" location="tests/auto/qobject/tst_qobject" />
- <Test name="qobjectperformance" location="tests/auto/qobjectperformance/tst_qobjectperformance" />
- <Test name="qobjectrace" location="tests/auto/qobjectrace/tst_qobjectrace" />
- <Test name="qpaintengine" location="tests/auto/qpaintengine/tst_qpaintengine" />
- <Test name="qpainter" location="tests/auto/qpainter/tst_qpainter" />
- <Test name="qpainterpath" location="tests/auto/qpainterpath/tst_qpainterpath" />
- <Test name="qpainterpathstroker" location="tests/auto/qpainterpathstroker/tst_qpainterpathstroker" />
- <Test name="qpalette" location="tests/auto/qpalette/tst_qpalette" />
- <Test name="qpathclipper" location="tests/auto/qpathclipper/tst_qpathclipper" />
- <Test name="qpen" location="tests/auto/qpen/tst_qpen" />
- <Test name="qpicture" location="tests/auto/qpicture/tst_qpicture" />
- <Test name="qpixmap" location="tests/auto/qpixmap/tst_qpixmap" />
- <Test name="qpixmapcache" location="tests/auto/qpixmapcache/tst_qpixmapcache" />
- <Test name="qpixmapfilter" location="tests/auto/qpixmapfilter/tst_qpixmapfilter" />
- <Test name="qplaintextedit" location="tests/auto/qplaintextedit/tst_qplaintextedit" />
- <Test name="qplugin" location="tests/auto/qplugin/tst_qplugin" />
- <Test name="qpluginloader" location="tests/auto/qpluginloader/tst_qpluginloader" />
- <Test name="qpoint" location="tests/auto/qpoint/tst_qpoint" />
- <Test name="qpointarray" location="tests/auto/qpointarray/tst_qpointarray" />
- <Test name="qpointer" location="tests/auto/qpointer/tst_qpointer" />
- <Test name="qpopmenu" location="tests/auto/qpopmenu/tst_qpopmenu" />
- <Test name="qprinter" location="tests/auto/qprinter/tst_qprinter" />
- <Test name="qprinterinfo" location="tests/auto/qprinterinfo/tst_qprinterinfo" />
- <Test name="qprocess" location="tests/auto/qprocess/tst_qprocess" />
- <Test name="qprogressbar" location="tests/auto/qprogressbar/tst_qprogressbar" />
- <Test name="qprogressdialog" location="tests/auto/qprogressdialog/tst_qprogressdialog" />
- <Test name="qpushbutton" location="tests/auto/qpushbutton/tst_qpushbutton" />
- <Test name="qqueue" location="tests/auto/qqueue/tst_qqueue" />
- <Test name="qradiobutton" location="tests/auto/qradiobutton/tst_qradiobutton" />
- <Test name="qrand" location="tests/auto/qrand/tst_qrand" />
- <Test name="qreadlocker" location="tests/auto/qreadlocker/tst_qreadlocker" />
- <Test name="qreadwritelock" location="tests/auto/qreadwritelock/tst_qreadwritelock" />
- <Test name="qrect" location="tests/auto/qrect/tst_qrect" />
- <Test name="qregexp" location="tests/auto/qregexp/tst_qregexp" />
- <Test name="qregexpvalidator" location="tests/auto/qregexpvalidator/tst_qregexpvalidator" />
- <Test name="qregion" location="tests/auto/qregion/tst_qregion" />
- <Test name="qresourceengine" location="tests/auto/qresourceengine/tst_qresourceengine" />
- <Test name="qscriptable" location="tests/auto/qscriptable/tst_qscriptable" />
- <Test name="qscriptclass" location="tests/auto/qscriptclass/tst_qscriptclass" />
- <Test name="qscriptcontext" location="tests/auto/qscriptcontext/tst_qscriptcontext" />
- <Test name="qscriptcontextinfo" location="tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo" />
- <Test name="qscriptengine" location="tests/auto/qscriptengine/tst_qscriptengine" />
- <Test name="qscriptengineagent" location="tests/auto/qscriptengineagent/tst_qscriptengineagent" />
- <Test name="qscriptjstestsuite" location="tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite" />
- <Test name="qscriptobject" location="tests/auto/qscriptobject/tst_qscriptobject" />
- <Test name="qscriptstring" location="tests/auto/qscriptstring/tst_qscriptstring" />
- <Test name="qscriptvalue" location="tests/auto/qscriptvalue/tst_qscriptvalue" />
- <Test name="qscriptvalueiterator" location="tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator" />
- <Test name="qscrollarea" location="tests/auto/qscrollarea/tst_qscrollarea" />
- <Test name="qscrollbar" location="tests/auto/qscrollbar/tst_qscrollbar" />
- <Test name="qscrollview" location="tests/auto/qscrollview/tst_qscrollview" />
- <Test name="qsemaphore" location="tests/auto/qsemaphore/tst_qsemaphore" />
- <Test name="qset" location="tests/auto/qset/tst_qset" />
- <Test name="qsettings" location="tests/auto/qsettings/tst_qsettings" />
- <Test name="qsharedmemory" location="tests/auto/qsharedmemory/tst_qsharedmemory" />
- <Test name="qshortcut" location="tests/auto/qshortcut/tst_qshortcut" />
- <Test name="qsidebar" location="tests/auto/qsidebar/tst_qsidebar" />
- <Test name="qsignalmapper" location="tests/auto/qsignalmapper/tst_qsignalmapper" />
- <Test name="qsignalspy" location="tests/auto/qsignalspy/tst_qsignalspy" />
- <Test name="qsimplexmlnodemodel" location="tests/auto/qsimplexmlnodemodel/tst_qsimplexmlnodemodel" />
- <Test name="qsize" location="tests/auto/qsize/tst_qsize" />
- <Test name="qsizef" location="tests/auto/qsizef/tst_qsizef" />
- <Test name="qsizegrip" location="tests/auto/qsizegrip/tst_qsizegrip" />
- <Test name="qslider" location="tests/auto/qslider/tst_qslider" />
- <Test name="qsocket" location="tests/auto/qsocket/tst_qsocket" />
- <Test name="qsocketnotifier" location="tests/auto/qsocketnotifier/tst_qsocketnotifier" />
- <Test name="qsocks5socketengine" location="tests/auto/qsocks5socketengine/tst_qsocks5socketengine" />
- <Test name="qsortfilterproxymodel" location="tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel" />
- <Test name="qsound" location="tests/auto/qsound/tst_qsound" />
- <Test name="qaudiodeviceid" location="tests/auto/qaudiodeviceid/tst_qaudiodeviceid" />
- <Test name="qaudioformat" location="tests/auto/qaudioformat/tst_qaudioformat" />
- <Test name="qaudiooutput" location="tests/auto/qaudiooutput/tst_qaudiooutput" />
- <Test name="qaudioinput" location="tests/auto/qaudioinput/tst_qaudioinput" />
- <Test name="qsourcelocation" location="tests/auto/qsourcelocation/tst_qsourcelocation" />
- <Test name="qspinbox" location="tests/auto/qspinbox/tst_qspinbox" />
- <Test name="qsplitter" location="tests/auto/qsplitter/tst_qsplitter" />
- <Test name="qsql" location="tests/auto/qsql/tst_qsql" />
- <Test name="qsqlbatch" location="tests/auto/qsqlbatch/tst_qsqlbatch" />
- <Test name="qsqlcursor" location="tests/auto/qsqlcursor/tst_qsqlcursor" />
- <Test name="qsqldatabase" location="tests/auto/qsqldatabase/tst_qsqldatabase" />
- <Test name="qsqlerror" location="tests/auto/qsqlerror/tst_qsqlerror" />
- <Test name="qsqlfield" location="tests/auto/qsqlfield/tst_qsqlfield" />
- <Test name="qsqlquery" location="tests/auto/qsqlquery/tst_qsqlquery" />
- <Test name="qsqlquerymodel" location="tests/auto/qsqlquerymodel/tst_qsqlquerymodel" />
- <Test name="qsqlrecord" location="tests/auto/qsqlrecord/tst_qsqlrecord" />
- <Test name="qsqlrelationaltablemodel" location="tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel" />
- <Test name="qsqlselectcursor" location="tests/auto/qsqlselectcursor/tst_qsqlselectcursor" />
- <Test name="qsqltablemodel" location="tests/auto/qsqltablemodel/tst_qsqltablemodel" />
- <Test name="qsqlthread" location="tests/auto/qsqlthread/tst_qsqlthread" />
- <Test name="qsslcertificate" location="tests/auto/qsslcertificate/tst_qsslcertificate" />
- <Test name="qsslcipher" location="tests/auto/qsslcipher/tst_qsslcipher" />
- <Test name="qsslerror" location="tests/auto/qsslerror/tst_qsslerror" />
- <Test name="qsslkey" location="tests/auto/qsslkey/tst_qsslkey" />
- <Test name="qsslsocket" location="tests/auto/qsslsocket/tst_qsslsocket" />
- <Test name="qstackedlayout" location="tests/auto/qstackedlayout/tst_qstackedlayout" />
- <Test name="qstackedwidget" location="tests/auto/qstackedwidget/tst_qstackedwidget" />
- <Test name="qstandarditem" location="tests/auto/qstandarditem/tst_qstandarditem" />
- <Test name="qstandarditemmodel" location="tests/auto/qstandarditemmodel/tst_qstandarditemmodel" />
- <Test name="qstatusbar" location="tests/auto/qstatusbar/tst_qstatusbar" />
- <Test name="qstl" location="tests/auto/qstl/tst_qstl" />
- <Test name="qstring" location="tests/auto/qstring/tst_qstring" />
- <Test name="qstringlist" location="tests/auto/qstringlist/tst_qstringlist" />
- <Test name="qstringlistmodel" location="tests/auto/qstringlistmodel/tst_qstringlistmodel" />
- <Test name="qstyle" location="tests/auto/qstyle/tst_qstyle" />
- <Test name="qstyleoption" location="tests/auto/qstyleoption/tst_qstyleoption" />
- <Test name="qstylesheetstyle" location="tests/auto/qstylesheetstyle/tst_qstylesheetstyle" />
- <Test name="qsvgdevice" location="tests/auto/qsvgdevice/tst_qsvgdevice" />
- <Test name="qsvggenerator" location="tests/auto/qsvggenerator/tst_qsvggenerator" />
- <Test name="qsvgrenderer" location="tests/auto/qsvgrenderer/tst_qsvgrenderer" />
- <Test name="qsyntaxhighlighter" location="tests/auto/qsyntaxhighlighter/tst_qsyntaxhighlighter" />
- <Test name="qsysinfo" location="tests/auto/qsysinfo/tst_qsysinfo" />
- <Test name="qsystemsemaphore" location="tests/auto/qsystemsemaphore/tst_qsystemsemaphore" />
- <Test name="qsystemtrayicon" location="tests/auto/qsystemtrayicon/tst_qsystemtrayicon" />
- <Test name="qtabbar" location="tests/auto/qtabbar/tst_qtabbar" />
- <Test name="qtableview" location="tests/auto/qtableview/tst_qtableview" />
- <Test name="qtablewidget" location="tests/auto/qtablewidget/tst_qtablewidget" />
- <Test name="qtabwidget" location="tests/auto/qtabwidget/tst_qtabwidget" />
- <Test name="qtconcurrentfilter" location="tests/auto/qtconcurrentfilter/tst_qtconcurrentfilter" />
- <Test name="qtconcurrentiteratekernel" location="tests/auto/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel" />
- <Test name="qtconcurrentmap" location="tests/auto/qtconcurrentmap/tst_qtconcurrentmap" />
- <Test name="qtconcurrentrun" location="tests/auto/qtconcurrentrun/tst_qtconcurrentrun" />
- <Test name="qtconcurrentthreadengine" location="tests/auto/qtconcurrentthreadengine/tst_qtconcurrentthreadengine" />
- <Test name="qtcpserver" location="tests/auto/qtcpserver/tst_qtcpserver" />
- <Test name="qtcpsocket" location="tests/auto/qtcpsocket/tst_qtcpsocket" />
- <Test name="qtemporaryfile" location="tests/auto/qtemporaryfile/tst_qtemporaryfile" />
- <Test name="qtessellator" location="tests/auto/qtessellator/tst_qtessellator" />
- <Test name="qtextblock" location="tests/auto/qtextblock/tst_qtextblock" />
- <Test name="qtextboundaryfinder" location="tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder" />
- <Test name="qtextbrowser" location="tests/auto/qtextbrowser/tst_qtextbrowser" />
- <Test name="qtextcodec" location="tests/auto/qtextcodec/tst_qtextcodec" />
- <Test name="qtextcursor" location="tests/auto/qtextcursor/tst_qtextcursor" />
- <Test name="qtextdocument" location="tests/auto/qtextdocument/tst_qtextdocument" />
- <Test name="qtextdocumentfragment" location="tests/auto/qtextdocumentfragment/tst_qtextdocumentfragment" />
- <Test name="qtextdocumentlayout" location="tests/auto/qtextdocumentlayout/tst_qtextdocumentlayout" />
- <Test name="qtextedit" location="tests/auto/qtextedit/tst_qtextedit" />
- <Test name="qtextformat" location="tests/auto/qtextformat/tst_qtextformat" />
- <Test name="qtextlayout" location="tests/auto/qtextlayout/tst_qtextlayout" />
- <Test name="qtextlist" location="tests/auto/qtextlist/tst_qtextlist" />
- <Test name="qtextobject" location="tests/auto/qtextobject/tst_qtextobject" />
- <Test name="qtextpiecetable" location="tests/auto/qtextpiecetable/tst_qtextpiecetable" />
- <Test name="qtextscriptengine" location="tests/auto/qtextscriptengine/tst_qtextscriptengine" />
- <Test name="qtextstream" location="tests/auto/qtextstream/tst_qtextstream" />
- <Test name="qtexttable" location="tests/auto/qtexttable/tst_qtexttable" />
- <Test name="qthread" location="tests/auto/qthread/tst_qthread" />
- <Test name="qthreadpool" location="tests/auto/qthreadpool/tst_qthreadpool" />
- <Test name="qthreadstorage" location="tests/auto/qthreadstorage/tst_qthreadstorage" />
- <Test name="qtime" location="tests/auto/qtime/tst_qtime" />
- <Test name="qtimeline" location="tests/auto/qtimeline/tst_qtimeline" />
- <Test name="qtimer" location="tests/auto/qtimer/tst_qtimer" />
- <Test name="qtmd5" location="tests/auto/qtmd5/tst_qtmd5" />
- <Test name="qtoolbar" location="tests/auto/qtoolbar/tst_qtoolbar" />
- <Test name="qtoolbox" location="tests/auto/qtoolbox/tst_qtoolbox" />
- <Test name="qtoolbutton" location="tests/auto/qtoolbutton/tst_qtoolbutton" />
- <Test name="qtooltip" location="tests/auto/qtooltip/tst_qtooltip" />
- <Test name="qtransform" location="tests/auto/qtransform/tst_qtransform" />
- <Test name="qtransformedscreen" location="tests/auto/qtransformedscreen/tst_qtransformedscreen" />
- <Test name="qtranslator" location="tests/auto/qtranslator/tst_qtranslator" />
- <Test name="qtreeview" location="tests/auto/qtreeview/tst_qtreeview" />
- <Test name="qtreewidget" location="tests/auto/qtreewidget/tst_qtreewidget" />
- <Test name="qtreewidgetitemiterator" location="tests/auto/qtreewidgetitemiterator/tst_qtreewidgetitemiterator" />
- <Test name="qtwidgets" location="tests/auto/qtwidgets/tst_qtwidgets" />
- <Test name="qudpsocket" location="tests/auto/qudpsocket/tst_qudpsocket" />
- <Test name="qundogroup" location="tests/auto/qundogroup/tst_qundogroup" />
- <Test name="qundostack" location="tests/auto/qundostack/tst_qundostack" />
- <Test name="quridrag" location="tests/auto/quridrag/tst_quridrag" />
- <Test name="qurl" location="tests/auto/qurl/tst_qurl" />
- <Test name="quuid" location="tests/auto/quuid/tst_quuid" />
- <Test name="qvariant" location="tests/auto/qvariant/tst_qvariant" />
- <Test name="qvarlengtharray" location="tests/auto/qvarlengtharray/tst_qvarlengtharray" />
- <Test name="qvector" location="tests/auto/qvector/tst_qvector" />
- <Test name="qwaitcondition" location="tests/auto/qwaitcondition/tst_qwaitcondition" />
- <Test name="qwebframe" location="tests/auto/qwebframe/tst_qwebframe" />
- <Test name="qwebpage" location="tests/auto/qwebpage/tst_qwebpage" />
- <Test name="qwidget" location="tests/auto/qwidget/tst_qwidget" />
- <Test name="qwidgetaction" location="tests/auto/qwidgetaction/tst_qwidgetaction" />
- <Test name="qwidgetstack" location="tests/auto/qwidgetstack/tst_qwidgetstack" />
- <Test name="qwidget_window" location="tests/auto/qwidget_window/tst_qwidget_window" />
- <Test name="qwindowsurface" location="tests/auto/qwindowsurface/tst_qwindowsurface" />
- <Test name="qwineventnotifier" location="tests/auto/qwineventnotifier/tst_qwineventnotifier" />
- <Test name="qwizard" location="tests/auto/qwizard/tst_qwizard" />
- <Test name="qwmatrix" location="tests/auto/qwmatrix/tst_qwmatrix" />
- <Test name="qworkspace" location="tests/auto/qworkspace/tst_qworkspace" />
- <Test name="qwritelocker" location="tests/auto/qwritelocker/tst_qwritelocker" />
- <Test name="qwsembedwidget" location="tests/auto/qwsembedwidget/tst_qwsembedwidget" />
- <Test name="qwsinputmethod" location="tests/auto/qwsinputmethod/tst_qwsinputmethod" />
- <Test name="qwswindowsystem" location="tests/auto/qwswindowsystem/tst_qwswindowsystem" />
- <Test name="qx11info" location="tests/auto/qx11info/tst_qx11info" />
- <Test name="qxml" location="tests/auto/qxml/tst_qxml" />
- <Test name="qxmlformatter" location="tests/auto/qxmlformatter/tst_qxmlformatter" />
- <Test name="qxmlinputsource" location="tests/auto/qxmlinputsource/tst_qxmlinputsource" />
- <Test name="qxmlitem" location="tests/auto/qxmlitem/tst_qxmlitem" />
- <Test name="qxmlname" location="tests/auto/qxmlname/tst_qxmlname" />
- <Test name="qxmlnamepool" location="tests/auto/qxmlnamepool/tst_qxmlnamepool" />
- <Test name="qxmlnodemodelindex" location="tests/auto/qxmlnodemodelindex/tst_qxmlnodemodelindex" />
- <Test name="qxmlquery" location="tests/auto/qxmlquery/tst_qxmlquery" />
- <Test name="qxmlresultitems" location="tests/auto/qxmlresultitems/tst_qxmlresultitems" />
- <Test name="qxmlserializer" location="tests/auto/qxmlserializer/tst_qxmlserializer" />
- <Test name="qxmlsimplereader" location="tests/auto/qxmlsimplereader/tst_qxmlsimplereader" />
- <Test name="qxmlstream" location="tests/auto/qxmlstream/tst_qxmlstream" />
- <Test name="selftests" location="tests/auto/selftests/tst_selftests" />
- <Test name="symbols" location="tests/auto/symbols/tst_symbols" />
- <Test name="tests" location="tests/auto/tests/tst_tests" />
- <Test name="uic" location="tests/auto/uic/tst_uic" />
- <Test name="xmlpatterns" location="tests/auto/xmlpatterns/tst_xmlpatterns" />
- <Test name="xmlpatternsxqts" location="tests/auto/xmlpatternsxqts/tst_xmlpatternsxqts" />
- </Tests>
- <TestSuites>
- <TestSuite name="qt-4.4">
- <Test id="atwrapper" />
- <Test id="bic" />
- <Test id="checkxmlfiles" />
- <Test id="collections" />
- <Test id="compile" />
- <Test id="compilerwarnings" />
- <Test id="exceptionsafety" />
- <Test id="headers" />
- <Test id="languagechange" />
- <Test id="lrelease" />
- <Test id="lconvert" />
- <Test id="lupdate" />
- <Test id="macgui" />
- <Test id="mediaobject" />
- <Test id="moc" />
- <Test id="patternistexamplefiletree" />
- <Test id="patternistexamples" />
- <Test id="patternistheaders" />
- <Test id="qabstractbutton" />
- <Test id="qabstractitemmodel" />
- <Test id="qabstractitemview" />
- <Test id="qabstractmessagehandler" />
- <Test id="qabstractprintdialog" />
- <Test id="qabstractproxymodel" />
- <Test id="qabstractscrollarea" />
- <Test id="qabstractslider" />
- <Test id="qabstractsocket" />
- <Test id="qabstractspinbox" />
- <Test id="qabstracttextdocumentlayout" />
- <Test id="qabstracturiresolver" />
- <Test id="qabstractxmlforwarditerator" />
- <Test id="qabstractxmlnodemodel" />
- <Test id="qabstractxmlreceiver" />
- <Test id="qaccessibility" />
- <Test id="qaccessibility_mac" />
- <Test id="qaction" />
- <Test id="qactiongroup" />
- <Test id="qalgorithms" />
- <Test id="qapplication" />
- <Test id="qatomicint" />
- <Test id="qatomicpointer" />
- <Test id="qautoptr" />
- <Test id="qbitarray" />
- <Test id="qboxlayout" />
- <Test id="qbrush" />
- <Test id="qbuffer" />
- <Test id="qbuttongroup" />
- <Test id="qbytearray" />
- <Test id="qcache" />
- <Test id="qcalendarwidget" />
- <Test id="qchar" />
- <Test id="qcheckbox" />
- <Test id="qclipboard" />
- <Test id="qcolor" />
- <Test id="qcolordialog" />
- <Test id="qcolumnview" />
- <Test id="qcombobox" />
- <Test id="qcommandlinkbutton" />
- <Test id="qcompleter" />
- <Test id="qcomplextext" />
- <Test id="qcopchannel" />
- <Test id="qcoreapplication" />
- <Test id="qcryptographichash" />
- <Test id="qcssparser" />
- <Test id="qdatastream" />
- <Test id="qdatawidgetmapper" />
- <Test id="qdate" />
- <Test id="qdatetime" />
- <Test id="qdatetimeedit" />
- <Test id="qdbusabstractadaptor" />
- <Test id="qdbusconnection" />
- <Test id="qdbuscontext" />
- <Test id="qdbusinterface" />
- <Test id="qdbuslocalcalls" />
- <Test id="qdbusmarshall" />
- <Test id="qdbusmetaobject" />
- <Test id="qdbusmetatype" />
- <Test id="qdbusperformance" />
- <Test id="qdbusreply" />
- <Test id="qdbusserver" />
- <Test id="qdbusthreading" />
- <Test id="qdbusxmlparser" />
- <Test id="qdebug" />
- <Test id="qdesktopservices" />
- <Test id="qdesktopwidget" />
- <Test id="qdial" />
- <Test id="qdialog" />
- <Test id="qdialogbuttonbox" />
- <Test id="qdir" />
- <Test id="qdirectpainter" />
- <Test id="qdiriterator" />
- <Test id="qdirmodel" />
- <Test id="qdockwidget" />
- <Test id="qdom" />
- <Test id="qdoublespinbox" />
- <Test id="qdoublevalidator" />
- <Test id="qdrag" />
- <Test id="qerrormessage" />
- <Test id="qevent" />
- <Test id="qeventloop" />
- <Test id="qexplicitlyshareddatapointer" />
- <Test id="qfile" />
- <Test id="qfiledialog" />
- <Test id="qfileinfo" />
- <Test id="qfilesystemmodel" />
- <Test id="qfilesystemwatcher" />
- <Test id="qflags" />
- <Test id ="qfocusevent" />
- <Test id="qfocusframe" />
- <Test id="qfont" />
- <Test id="qfontcombobox" />
- <Test id="qfontdatabase" />
- <Test id="qfontdialog" />
- <Test id="qfontmetrics" />
- <Test id="qformlayout" />
- <Test id="qftp" />
- <Test id="q_func_info" />
- <Test id="qfuture" />
- <Test id="qfuturewatcher" />
- <Test id="qgetputenv" />
- <Test id="qgl" />
- <Test id="qglobal" />
- <Test id="qgraphicsgridlayout" />
- <Test id="qgraphicsitem" />
- <Test id="qgraphicsitemanimation" />
- <Test id="qgraphicslayout" />
- <Test id="qgraphicslayoutitem" />
- <Test id="qgraphicslinearlayout" />
- <Test id="qgraphicsanchorlayout" />
- <Test id="qgraphicspixmapitem" />
- <Test id="qgraphicspolygonitem" />
- <Test id="qgraphicsproxywidget" />
- <Test id="qgraphicsscene" />
- <Test id="qgraphicsview" />
- <Test id="qgraphicswidget" />
- <Test id="qgridlayout" />
- <Test id="qgroupbox" />
- <Test id="qguivariant" />
- <Test id="qhash" />
- <Test id="qheaderview" />
- <Test id="qhelpcontentmodel" />
- <Test id="qhelpenginecore" />
- <Test id="qhelpgenerator" />
- <Test id="qhelpindexmodel" />
- <Test id="qhelpprojectdata" />
- <Test id="qhostaddress" />
- <Test id="qhostinfo" />
- <Test id="qhttp" />
- <Test id="qhttpnetworkconnection" />
- <Test id="qhttpnetworkreply" />
- <Test id="qhttpsocketengine" />
- <Test id="qicoimageformat" />
- <Test id="qicon" />
- <Test id="qimage" />
- <Test id="qimageiohandler" />
- <Test id="qimagereader" />
- <Test id="qimagewriter" />
- <Test id="qinputdialog" />
- <Test id="qintvalidator" />
- <Test id="qiodevice" />
- <Test id="qitemdelegate" />
- <Test id="qitemeditorfactory" />
- <Test id="qitemmodel" />
- <Test id="qitemselectionmodel" />
- <Test id="qitemview" />
- <Test id="qkeyevent" />
- <Test id="qkeysequence" />
- <Test id="qlabel" />
- <Test id="qlayout" />
- <Test id="qlcdnumber" />
- <Test id="qlibrary" />
- <Test id="qline" />
- <Test id="qlineedit" />
- <Test id="qlistbox" />
- <Test id="qlistview" />
- <Test id="qlistwidget" />
- <Test id="qlocale" />
- <Test id="qlocalsocket" />
- <Test id="qmacstyle" />
- <Test id="qmainwindow" />
- <Test id="qmake" />
- <Test id="qmap" />
- <Test id="qmdiarea" />
- <Test id="qmdisubwindow" />
- <Test id="qmenu" />
- <Test id="qmenubar" />
- <Test id="qmessagebox" />
- <Test id="qmetaobject" />
- <Test id="qmetatype" />
- <Test id="qmouseevent" />
- <Test id="qmouseevent_modal" />
- <Test id="qmovie" />
- <Test id="qmultiscreen" />
- <Test id="qmutex" />
- <Test id="qmutexlocker" />
- <Test id="qnativesocketengine" />
- <Test id="qnetworkcookie" />
- <Test id="qnetworkcookiejar" />
- <Test id="qnetworkinterface" />
- <Test id="qnetworkproxy" />
- <Test id="qnetworkreply" />
- <Test id="qnetworkrequest" />
- <Test id="qnumeric" />
- <Test id="qobject" />
- <Test id="qobjectperformance" />
- <Test id="qobjectrace" />
- <Test id="qpaintengine" />
- <Test id="qpainter" />
- <Test id="qpainterpath" />
- <Test id="qpainterpathstroker" />
- <Test id="qpalette" />
- <Test id="qpathclipper" />
- <Test id="qpen" />
- <Test id="qpicture" />
- <Test id="qpixmap" />
- <Test id="qpixmapcache" />
- <Test id="qplaintextedit" />
- <Test id="qplugin" />
- <Test id="qpluginloader" />
- <Test id="qpoint" />
- <Test id="qpointarray" />
- <Test id="qpointer" />
- <Test id="qpopmenu" />
- <Test id="qprinter" />
- <Test id="qprinterinfo" />
- <Test id="qprocess" />
- <Test id="qprogressbar" />
- <Test id="qprogressdialog" />
- <Test id="qpushbutton" />
- <Test id="qqueue" />
- <Test id="qradiobutton" />
- <Test id="qrand" />
- <Test id="qreadlocker" />
- <Test id="qreadwritelock" />
- <Test id="qrect" />
- <Test id="qregexp" />
- <Test id="qregexpvalidator" />
- <Test id="qregion" />
- <Test id="qresourceengine" />
- <Test id="qscriptable" />
- <Test id="qscriptclass" />
- <Test id="qscriptcontext" />
- <Test id="qscriptcontextinfo" />
- <Test id="qscriptengine" />
- <Test id="qscriptengineagent" />
- <Test id="qscriptjstestsuite" />
- <Test id="qscriptobject" />
- <Test id="qscriptstring" />
- <Test id="qscriptvalue" />
- <Test id="qscriptvalueiterator" />
- <Test id="qscrollarea" />
- <Test id="qscrollbar" />
- <Test id="qscrollview" />
- <Test id="qsemaphore" />
- <Test id="qset" />
- <Test id="qsettings" />
- <Test id="qsharedmemory" />
- <Test id="qshortcut" />
- <Test id="qsidebar" />
- <Test id="qsignalmapper" />
- <Test id="qsignalspy" />
- <Test id="qsimplexmlnodemodel" />
- <Test id="qsize" />
- <Test id="qsizef" />
- <Test id="qsizegrip" />
- <Test id="qslider" />
- <Test id="qsocket" />
- <Test id="qsocketnotifier" />
- <Test id="qsocks5socketengine" />
- <Test id="qsortfilterproxymodel" />
- <Test id="qsound" />
- <Test id="qaudiodeviceid" />
- <Test id="qaudioformat" />
- <Test id="qaudiooutput" />
- <Test id="qaudioinput" />
- <Test id="qsourcelocation" />
- <Test id="qspinbox" />
- <Test id="qsplitter" />
- <Test id="qsql" />
- <Test id="qsqlbatch" />
- <Test id="qsqlcursor" />
- <Test id="qsqldatabase" />
- <Test id="qsqlerror" />
- <Test id="qsqlfield" />
- <Test id="qsqlquery" />
- <Test id="qsqlquerymodel" />
- <Test id="qsqlrecord" />
- <Test id="qsqlrelationaltablemodel" />
- <Test id="qsqlselectcursor" />
- <Test id="qsqltablemodel" />
- <Test id="qsqlthread" />
- <Test id="qsslcertificate" />
- <Test id="qsslcipher" />
- <Test id="qsslerror" />
- <Test id="qsslkey" />
- <Test id="qsslsocket" />
- <Test id="qstackedlayout" />
- <Test id="qstackedwidget" />
- <Test id="qstandarditem" />
- <Test id="qstandarditemmodel" />
- <Test id="qstatusbar" />
- <Test id="qstl" />
- <Test id="qstring" />
- <Test id="qstringlist" />
- <Test id="qstringlistmodel" />
- <Test id="qstyle" />
- <Test id="qstyleoption" />
- <Test id="qstylesheetstyle" />
- <Test id="qsvgdevice" />
- <Test id="qsvggenerator" />
- <Test id="qsvgrenderer" />
- <Test id="qsyntaxhighlighter" />
- <Test id="qsysinfo" />
- <Test id="qsystemsemaphore" />
- <Test id="qsystemtrayicon" />
- <Test id="qtabbar" />
- <Test id="qtableview" />
- <Test id="qtablewidget" />
- <Test id="qtabwidget" />
- <Test id="qtconcurrentfilter" />
- <Test id="qtconcurrentiteratekernel" />
- <Test id="qtconcurrentmap" />
- <Test id="qtconcurrentrun" />
- <Test id="qtconcurrentthreadengine" />
- <Test id="qtcpserver" />
- <Test id="qtcpsocket" />
- <Test id="qtemporaryfile" />
- <Test id="qtessellator" />
- <Test id="qtextblock" />
- <Test id="qtextboundaryfinder" />
- <Test id="qtextbrowser" />
- <Test id="qtextcodec" />
- <Test id="qtextcursor" />
- <Test id="qtextdocument" />
- <Test id="qtextdocumentfragment" />
- <Test id="qtextdocumentlayout" />
- <Test id="qtextedit" />
- <Test id="qtextformat" />
- <Test id="qtextlayout" />
- <Test id="qtextlist" />
- <Test id="qtextobject" />
- <Test id="qtextpiecetable" />
- <Test id="qtextscriptengine" />
- <Test id="qtextstream" />
- <Test id="qtexttable" />
- <Test id="qthread" />
- <Test id="qthreadpool" />
- <Test id="qthreadstorage" />
- <Test id="qtime" />
- <Test id="qtimeline" />
- <Test id="qtimer" />
- <Test id="qtmd5" />
- <Test id="qtoolbar" />
- <Test id="qtoolbox" />
- <Test id="qtoolbutton" />
- <Test id="qtooltip" />
- <Test id="qtransform" />
- <Test id="qtransformedscreen" />
- <Test id="qtranslator" />
- <Test id="qtreeview" />
- <Test id="qtreewidget" />
- <Test id="qtreewidgetitemiterator" />
- <Test id="qtwidgets" />
- <Test id="qudpsocket" />
- <Test id="qundogroup" />
- <Test id="qundostack" />
- <Test id="quridrag" />
- <Test id="qurl" />
- <Test id="quuid" />
- <Test id="qvariant" />
- <Test id="qvarlengtharray" />
- <Test id="qvector" />
- <Test id="qwaitcondition" />
- <Test id="qwebframe" />
- <Test id="qwebpage" />
- <Test id="qwidget" />
- <Test id="qwidgetaction" />
- <Test id="qwidgetstack" />
- <Test id="qwidget_window" />
- <Test id="qwindowsurface" />
- <Test id="qwineventnotifier" />
- <Test id="qwizard" />
- <Test id="qwmatrix" />
- <Test id="qworkspace" />
- <Test id="qwritelocker" />
- <Test id="qwsembedwidget" />
- <Test id="qwsinputmethod" />
- <Test id="qwswindowsystem" />
- <Test id="qx11info" />
- <Test id="qxml" />
- <Test id="qxmlformatter" />
- <Test id="qxmlinputsource" />
- <Test id="qxmlitem" />
- <Test id="qxmlname" />
- <Test id="qxmlnamepool" />
- <Test id="qxmlnodemodelindex" />
- <Test id="qxmlquery" />
- <Test id="qxmlresultitems" />
- <Test id="qxmlserializer" />
- <Test id="qxmlsimplereader" />
- <Test id="qxmlstream" />
- </TestSuite>
- </TestSuites>
- <Testruns>
- <Testrun name="qt-4.4-macx-g++" suite="qt-4.4" results="/Users/pulse/results" qt="4.4" qtest="4.4" hostname="macbuilder" makespec="macx-g++" timeout="300000" os="osx" />
- <Testrun name="qt-4.4-linux-g++" suite="qt-4.4" results="/home/pulse/results" qt="4.4" qtest="4.4" hostname="sv-linux-g++" makespec="linux-g++" timeout="300000" os="unix" />
- </Testruns>
-</Configuration>
diff --git a/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp
index edaf545..a92359f 100644
--- a/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp
@@ -262,8 +262,22 @@ protected:
port = server.serverPort();
ready.release();
- server.waitForNewConnection(-1);
+ QVERIFY(server.waitForNewConnection(10*1000));
client = server.nextPendingConnection();
+
+ // read lines until we read the empty line seperating HTTP request from HTTP request body
+ do {
+ if (client->canReadLine()) {
+ QString line = client->readLine();
+ if (line == "\n" || line == "\r\n")
+ break; // empty line
+ }
+ if (!client->waitForReadyRead(10*1000)) {
+ client->close();
+ return;
+ }
+ } while (client->state() == QAbstractSocket::ConnectedState);
+
client->write("HTTP/1.0 200 OK\r\n");
client->write("Content-length: 0\r\n");
client->write("\r\n");
@@ -561,15 +575,15 @@ void tst_qnetworkreply::httpUploadPerformance()
generator.start();
time.start();
QTestEventLoop::instance().enterLoop(40);
+ qint64 elapsed = time.elapsed();
+ reader.exit();
+ reader.wait();
+ QVERIFY(reply->isFinished());
QCOMPARE(reply->error(), QNetworkReply::NoError);
QVERIFY(!QTestEventLoop::instance().timeout());
- qint64 elapsed = time.elapsed();
qDebug() << "tst_QNetworkReply::httpUploadPerformance" << elapsed << "msec, "
<< ((UploadSize/1024.0)/(elapsed/1000.0)) << " kB/sec";
-
- reader.exit();
- reader.wait();
}
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 0e5ec88..3defeab 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -2778,8 +2778,9 @@ void Configure::generateCachefile()
if (!dictionary["QT_LIBINFIX"].isEmpty())
configStream << "QT_LIBINFIX = " << dictionary["QT_LIBINFIX"] << endl;
+ configStream << "#Qt for Symbian FPU settings" << endl;
if(!dictionary["ARM_FPU_TYPE"].isEmpty()) {
- configStream<<"QMAKE_CXXFLAGS.ARMCC += --fpu "<< dictionary["ARM_FPU_TYPE"];
+ configStream<<"MMP_RULES += \"ARMFPU "<< dictionary["ARM_FPU_TYPE"]<< "\"";
}
configStream.flush();
diff --git a/tools/qdoc3/test/macros.qdocconf b/tools/qdoc3/test/macros.qdocconf
index dbb8ab8..22db23e 100644
--- a/tools/qdoc3/test/macros.qdocconf
+++ b/tools/qdoc3/test/macros.qdocconf
@@ -32,4 +32,4 @@ macro.mdash.HTML = "&mdash;"
macro.beginfloatleft.HTML = "<div style=\"float: left; margin-right: 2em\">"
macro.beginfloatright.HTML = "<div style=\"float: right; margin-left: 2em\">"
macro.endfloat.HTML = "</div>"
-macro.clearfloat.HTML = "<div style=\"clear: both\">"
+macro.clearfloat.HTML = "<br style=\"clear: both\" />"