summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-10-21 19:43:04 +1000
committerQt Continuous Integration System <qt-info@nokia.com>2011-10-21 19:43:04 +1000
commit2cf3c7e47f9f4963989f5270b7930fc9382670a6 (patch)
tree8a035b339590e8d9cee1d6d8956800e0a4d5c3cd
parent41bb458f095bf796d3a083eaa1c9d547f3fed745 (diff)
parent67dd642ca7cd7f61ba5de83218a3933ffe12f10e (diff)
Merge branch '4.7' of git://scm.dev.nokia.troll.no/qt/qt-doc-team
* '4.7' of git://scm.dev.nokia.troll.no/qt/qt-doc-team: (40 commits) Doc: adding link to the Qt Quick Components for Symbian page. Fixes: the png_handle_cHRM crash bug in bundled libpng 1.5.4 Workaround to VideoCore III scissor bug. Fix to QGLWidget crash Update def files Fix crash on exit when overriding signal handlers in states. Typo fix Add new signals to indicate GPU resource usage. symbian - search drives for translation files symbian - search drives for translation files Cannot flick to the end of a horizontal list view width LayoutMirroring Backport more imports directory caching changes. Symbian - fix deleteLater not working from RunL Doc updates to installation, platform notes and symbian introduction. Do not let QGLContext get out of sync when doing mixed VG-GL rendering Fix more test DEPLOYMENT statements for Symbian Create auto test for http HEAD request QNAM - fix poor performance of HEAD request with authentication Fix deployment for declarative tests, examples on Symbian symbian - add support for ELangKazakh and ELangEnglish_India ...
-rw-r--r--doc/src/declarative/declarativeui.qdoc1
-rw-r--r--doc/src/getting-started/installation.qdoc626
-rw-r--r--doc/src/mainpage.qdoc1
-rw-r--r--doc/src/platforms/platform-notes.qdoc221
-rw-r--r--doc/src/platforms/supported-platforms.qdoc5
-rw-r--r--doc/src/platforms/symbian-introduction.qdoc8
-rw-r--r--doc/src/qt-webpages.qdoc118
-rw-r--r--examples/declarative/cppextensions/imageprovider/imageprovider.pro2
-rw-r--r--examples/declarative/cppextensions/qwidgets/qwidgets.pro2
-rw-r--r--src/3rdparty/libpng/pngrutil.c14
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian.cpp29
-rw-r--r--src/corelib/kernel/qtranslator.cpp40
-rw-r--r--src/corelib/tools/qlocale_symbian.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp35
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp21
-rw-r--r--src/declarative/qml/qdeclarativedirparser.cpp40
-rw-r--r--src/declarative/qml/qdeclarativedirparser_p.h6
-rw-r--r--src/declarative/qml/qdeclarativeimport.cpp122
-rw-r--r--src/declarative/qml/qdeclarativeimport_p.h2
-rw-r--r--src/declarative/qml/qdeclarativepropertycache_p.h2
-rw-r--r--src/declarative/qml/qdeclarativetypeloader.cpp94
-rw-r--r--src/declarative/qml/qdeclarativetypeloader_p.h9
-rw-r--r--src/declarative/util/qdeclarativepropertychanges.cpp5
-rw-r--r--src/gui/egl/qegl.cpp32
-rw-r--r--src/gui/image/qpnghandler.cpp1
-rw-r--r--src/gui/kernel/qapplication.cpp28
-rw-r--r--src/gui/kernel/qapplication.h4
-rw-r--r--src/gui/kernel/qapplication_p.h3
-rw-r--r--src/gui/kernel/qapplication_s60.cpp24
-rw-r--r--src/gui/kernel/qcursor_win.cpp2
-rw-r--r--src/gui/kernel/qwidget.cpp24
-rw-r--r--src/gui/kernel/qwidget_p.h1
-rw-r--r--src/gui/kernel/qwidget_s60.cpp58
-rw-r--r--src/gui/painting/qgraphicssystemex_symbian.cpp107
-rw-r--r--src/gui/text/qtextengine.cpp12
-rw-r--r--src/gui/text/qtextengine_p.h1
-rw-r--r--src/gui/text/qtextlayout.cpp4
-rw-r--r--src/gui/widgets/qlinecontrol.cpp4
-rw-r--r--src/imports/folderlistmodel/folderlistmodel.pro4
-rw-r--r--src/imports/gestures/gestures.pro6
-rw-r--r--src/imports/particles/particles.pro6
-rw-r--r--src/imports/shaders/shaders.pro2
-rw-r--r--src/network/access/qhttpnetworkreply.cpp2
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp7
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp23
-rw-r--r--src/network/access/qnetworkreplyimpl_p.h2
-rw-r--r--src/network/kernel/qauthenticator.cpp2
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp2
-rw-r--r--src/opengl/qgl.cpp30
-rw-r--r--src/opengl/qgl_egl.cpp11
-rw-r--r--src/opengl/qgl_p.h4
-rw-r--r--src/opengl/qgl_symbian.cpp18
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp176
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.h30
-rw-r--r--src/s60installs/bwins/QtGuiu.def6
-rw-r--r--src/s60installs/eabi/QtGuiu.def4
-rw-r--r--tests/auto/declarative/examples/examples.pro2
-rw-r--r--tests/auto/declarative/moduleqt47/moduleqt47.pro2
-rw-r--r--tests/auto/declarative/parserstress/parserstress.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro2
-rw-r--r--tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro2
-rw-r--r--tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro2
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro2
-rw-r--r--tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro2
-rw-r--r--tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro2
-rw-r--r--tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro2
-rw-r--r--tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro2
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro2
-rw-r--r--tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro2
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp25
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro2
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro2
-rw-r--r--tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro2
-rw-r--r--tests/auto/declarative/qdeclarativepincharea/qdeclarativepincharea.pro2
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro2
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro2
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro2
-rw-r--r--tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro2
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro2
-rw-r--r--tests/auto/declarative/qdeclarativespringanimation/qdeclarativespringanimation.pro2
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash3.qml27
-rw-r--r--tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro2
-rw-r--r--tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp17
-rw-r--r--tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro2
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro2
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp115
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro2
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp117
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro2
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro2
-rw-r--r--tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro2
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro2
-rw-r--r--tests/auto/declarative/qmlvisual/qmlvisual.pro2
-rw-r--r--tests/auto/qapplication/test/test.pro2
-rw-r--r--tests/auto/qaudioinput/qaudioinput.pro2
-rw-r--r--tests/auto/qaudiooutput/qaudiooutput.pro2
-rw-r--r--tests/auto/qchar/qchar.pro4
-rw-r--r--tests/auto/qclipboard/test/test.pro6
-rw-r--r--tests/auto/qfile/test/test.pro2
-rw-r--r--tests/auto/qfileinfo/qfileinfo.pro4
-rw-r--r--tests/auto/qhttp/qhttp.pro4
-rw-r--r--tests/auto/qlocalsocket/test/test.pro4
-rw-r--r--tests/auto/qnetworkreply/.gitattributes1
-rw-r--r--tests/auto/qnetworkreply/index.html3
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp61
-rw-r--r--tests/auto/qsound/qsound.pro2
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp45
-rw-r--r--tests/benchmarks/declarative/binding/binding.pro2
-rw-r--r--tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro2
-rw-r--r--tests/benchmarks/declarative/script/script.pro2
-rw-r--r--translations/qt_ko.ts8
132 files changed, 1892 insertions, 716 deletions
diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc
index d1d82d897f..bddd05b431 100644
--- a/doc/src/declarative/declarativeui.qdoc
+++ b/doc/src/declarative/declarativeui.qdoc
@@ -82,6 +82,7 @@ Qt applications.
\section1 QML Add-Ons
\list
+\o \l{Qt Quick Components for Symbian}{Qt Quick Components for Symbian} - a native component set for the Symbian^3 platform
\o \l{QtWebKit QML Module}
\o \l{http://doc.qt.nokia.com/qtmobility-1.1.0/qml-plugins.html}{Mobility QML Plugins}
\endlist
diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index ef010b43b6..c166794772 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.qdoc
@@ -79,6 +79,8 @@ for your platform from the following list.
\snippet doc/src/snippets/code/doc_src_installation.qdoc 1
Type \c{./configure -help} to get a list of all available options.
+ The \l{Configuration Options for Qt} page gives a brief overview
+ of these.
To create the library and compile all the demos, examples, tools,
and tutorials, type:
@@ -218,7 +220,8 @@ for your platform from the following list.
\snippet doc/src/snippets/code/doc_src_installation.qdoc 8
- Type \c{configure -help} to get a list of all available options.
+ Type \c{configure -help} to get a list of all available options. The
+ \l{Configuration Options for Qt} page gives a brief overview of these.
If you have multiple compilers installed, and want to build the Qt library
using a specific compiler, you must specify a \c qmake specification.
@@ -433,7 +436,9 @@ in the \l{Qt for Windows CE Requirements} document.
If you want to configure Qt for another platform or with other
options, type \c{configure -help} to get a list of all available
- options. See the \c README file for the list of supported platforms.
+ options. The \l{Configuration Options for Qt} page gives a brief
+ overview of these. See the \c README file for the list of supported
+ platforms.
\section1 Step 4: Build Qt Library
@@ -499,72 +504,27 @@ in the \l{Qt for Windows CE Requirements} document.
\tableofcontents
-Qt for the Symbian platform has some requirements that are given in more detail
-in the \l{Qt for the Symbian platform Requirements} document.
-
-
-\section1 Step 1: Install Qt
-
- Run \c{qt-symbian-opensource-%VERSION%.exe} and follow the instructions.
-
- \note Qt must be installed on the same drive as the Symbian SDK you are
- using, and the install path must not contain any spaces.
-
-\section1 Step 2: Install Qt into a device
-
- To run Qt applications on a device, \c{qt_installer.sis} found
- in the Qt installation directory must be first installed into the device.
- \c{Qt_installer.sis} contains Qt libraries and Open C libraries all in one
- convenient package.
- Begin installation by connecting your device via USB cable to a computer that
- has the \l{http://www.nokia.com/pcsuite}{Nokia PC Suite} installed.
- On the device, select "PC Suite mode". In Windows Explorer right click
- on the \c{qt_installer.sis} file, select "Install with Nokia Application
- Installer" and follow the instructions.
-
-\section1 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.
-
- To run the demo on a real device, install \c{fluidlauncher.sis}
- found in the Qt installation directory to a device that already has Qt installed.
- After installation, you can find fluidlauncher in the applications folder of the device.
-
- To run the demos and examples on the emulator, you need to build them first.
- Open the "Qt for the Symbian platform Command Prompt" from the Start menu and type:
-
- \snippet doc/src/snippets/code/doc_src_installation.qdoc 25
-
- To run the demos on the emulator simply navigate to the directory of the demo
- you want to see and run:
-
- \snippet doc/src/snippets/code/doc_src_installation.qdoc 27
-
- For more information about building and running Qt programs on the
-Symbian platform,
- see \l{The Symbian platform - Introduction to Qt}.
-
-\bold{We hope you will enjoy using Qt.}
-
+ Qt for Symbian binary packages (SIS files) are available from the \l
+ {http://qt.nokia.com/downloads}{Qt SDK}.
*/
/*! \page install-Symbian.html
-\title Installing Qt for the Symbian platform
+\title Installing Qt for the Symbian Platform
\ingroup installation
\ingroup qtsymbian
\brief How to install Qt for the Symbian platform.
\previouspage Installation
\tableofcontents
+ \l {http://qt.nokia.com/downloads}{Qt SDK} provides all the necessary tools
+ and libraries for developing Qt applications. However, if you want to build
+ Qt itself for Symbian, follow the instructions below.
+
Qt for the Symbian platform has some requirements that are given in more detail
in the \l{Qt for the Symbian platform Requirements} document.
This document describes how to install and configure Qt for
-the Symbian platform from scratch. If you are using pre-built binaries, follow
-the instructions given in the \l{Installing Qt for the Symbian platform from a
-Binary Package} document.
+the Symbian platform from scratch.
\section1 Step 1: Set Up the Development Environment
@@ -626,6 +586,10 @@ Binary Package} document.
\snippet doc/src/snippets/code/doc_src_installation.qdoc 31
(to build the tools using MinGW, and the libraries using SBSv2)
+ Type \c{./configure -help} to get a list of all available options.
+ The \l{Configuration Options for Qt} page gives a brief overview
+ of these.
+
SBSv2 (also known as \l{http://developer.symbian.org/wiki/index.php/Introduction_to_RAPTOR} {Raptor})
is a next-generation Symbian build system. SBSv2 is not officially supported
by any of the S60 SDKs currently available from Forum Nokia.
@@ -643,23 +607,39 @@ Binary Package} document.
Congratulations, Qt is now ready to use.
\section1 Step 7: Installing Qt Libraries on the Device
-
- To run the demo on a real device, you first have to install
- the Qt libraries on the device:
+
+ To run a Qt application on a device, it must have Qt libraries installed.
+
+ Symbian devices have a pre-installed Qt as follows:
+ \list
+ \o Symbian Anna devices have the pre-installed Qt, Qt Mobility, and Qt Webkit.
+ \o Symbian Belle and later devices have the pre-installed Qt on the device firmware.
+ \endlist
+
+ \l {http://www.developer.nokia.com/Community/Wiki/Nokia_Smart_Installer_for_Symbian}
+ {Nokia Smart Installer for Symbian} deploys the required Qt libraries to supported S60
+ and Symbian devices if the libraries are not pre-installed.
+
+ Nokia Developer site's \l {http://www.developer.nokia.com/Devices/Device_specifications/?filter1=qt}
+ {Device specifications} provide information on which devices have a
+ pre-installed Qt and the used Qt version.
+
+ To create your own Qt installation package, do as follows:
\snippet doc/src/snippets/code/doc_src_installation.qdoc 29
- 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:
-
- If you have no certificate, build a self signed Qt:
-\snippet doc/src/snippets/code/doc_src_installation.qdoc 34
+ The Qt libraries are built with "All -Tcb" capability, so they can support
+ all types of applications. If you don't have a suitable certificate, you can
+ patch the binaries in either of the following ways:
+
+ \list
+ \o If you have no certificate, build a self-signed Qt:
+ \snippet doc/src/snippets/code/doc_src_installation.qdoc 34
- If you have a symbian-signed developer certificate, specify the
+ \o 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
+ \snippet doc/src/snippets/code/doc_src_installation.qdoc 35
+ \endlist
\section1 Running Qt demos
@@ -740,6 +720,9 @@ to build the libraries using RVCT or
to build the libraries using GCCE.
+Type \c{./configure -help} to get a list of all available options.
+The \l{Configuration Options for Qt} page gives a brief overview
+of these.
\section1 Step 5: Build Qt
@@ -1303,7 +1286,12 @@ We hope you will enjoy using Qt.
\brief Setting up the Symbian platform environment for Qt.
\previouspage General Qt Requirements
- Qt for the Symbian platform requires the following software installed on your development PC:
+ \l {http://qt.nokia.com/downloads}{Qt SDK} provides all the necessary tools
+ and libraries for developing Qt applications. However, if you want to build
+ Qt itself for Symbian, follow the instructions below.
+
+ Qt for the Symbian platform requires the following software installed on
+ your development PC:
\list
\o \l{http://www.forum.nokia.com/Library/Tools_and_downloads/Other/Carbide.c++/}{Carbide.c++ v2.3.0 or higher recommended}.
\list
@@ -1368,253 +1356,263 @@ We hope you will enjoy using Qt.
/*!
\page configure-options.html
- \title Configure options for Qt
+ \title Configuration Options for Qt
\ingroup installation
- \brief Brief description of available options building Qt.
-
- This page gives a brief description of the different options
- available when building Qt using configure. To build Qt using
- default options, just call configure from the command line like
- showed below. If you would like to customize your build, please
- use the options listed in the following tables.
-
- \c {.\configure.exe}
-
- \section2 Cross platform options:
-
- \table
- \header \o Option \o Description \o Note
- \row \o \c {-buildkey } <key> \o Build the Qt library and plugins
- using the specified \o
- \row \o \c {<key>} \o When the library loads plugins, it will only
- load those that have a matching <key>. \o
- \row \o \c {-release } \o Compile and link Qt with debugging turned off. \o
- \row \o \c {-debug } \o Compile and link Qt with debugging turned on.
- \o Default value.
- \row \o \c {-debug-and-release} \o Compile and link two Qt libraries,
- with and without debugging turned on. \o This option denotes a default
- value and needs to be evaluated. If the evaluation succeeds, the
- feature is included.
- \row \o \c {-opensource} \o Compile and link the Open-Source Edition
- of Qt. \o
- \row \o \c {-commercial } \o Compile and link the Commercial Edition
- of Qt. \o
- \row \o \c {-developer-build} \o Compile and link Qt with Qt developer
- options including auto-tests exporting) \o
- \row \o \c {-shared} \o Create and use shared Qt libraries. \o Default
- value.
- \row \o \c {-static} \o Create and use static Qt libraries. \o
- \row \o \c {-ltcg} \o Use Link Time Code Generation. \o Apply to release
- builds only.
- \row \o \c {-no-ltcg} \o Do not use Link Time Code Generation. \o Default
- value.
- \row \o \c {-no-fast} \o Configure Qt normally by generating Makefiles for
- all project files. \o Default value.
- \row \o \c {-fast} \o Configure Qt quickly by generating Makefiles only for
- library and subdirectory targets. \o All other Makefiles are created as
- wrappers which will in turn run qmake.
- \row \o \c {-no-exceptions} \o Disable exceptions on platforms that support
- it. \o
- \row \o \c {-exceptions} \o Enable exceptions on platforms that support it.
- \o Default value.
- \row \o \c {-no-accessibility} \o Do not compile Windows Active
- Accessibility support. \o
- \row \o \c {-accessibility} \o Compile Windows Active Accessibility
- support. \o Default value.
- \row \o \c {-no-stl} \o Do not compile STL support. \o
- \row \o \c {-stl} \o Compile STL support. \o Default value.
- \row \o \c {-no-sql-<driver>} \o Disable SQL <driver> entirely, by default
- none are turned on. \o
- \row \o \c {-qt-sql-<driver>} \o Enable a SQL <driver> in the Qt Library.
- \o
- \row \o \c {-plugin-sql-<driver>} \o Enable SQL <driver> as a plugin to be
- linked to at run time. \o Available values for <driver>: mysql, psql,
- oci, odbc, tds, db2, sqlite, sqlite2, ibase. Drivers marked with a
- '+' during configure have been detected as available on this system.
- \row \o \c {-system-sqlite} \o Use sqlite from the operating system. \o
- \row \o \c {-no-qt3support} \o Disables the Qt 3 support functionality. \o
- \row \o \c {-no-opengl} \o Disables OpenGL functionality \o
- \row \o \c {-opengl <api>} \o Enable OpenGL support with specified API
- version. \o Available values for <api>: desktop - Enable support for
- Desktop OpenGL (Default), es1 - Enable support for OpenGL ES Common
- Profile, es2 - Enable support for OpenGL ES 2.0.
- \row \o \c {-no-openvg} \o Disables OpenVG functionality \o Default value.
- \row \o \c {-openvg} \o Enables OpenVG functionality \o Requires EGL
- support, typically supplied by an OpenGL or other graphics
- implementation.
- \row \o \c {-platform <spec> } \o The operating system and compiler you
- are building on. \o The default value is %QMAKESPEC%.
- \row \o \c {-xplatform <spec> } \o The operating system and compiler you
- are cross compiling for. \o See the README file for a list of supported
- operating systems and compilers.
- \row \o \c {-qtnamespace <namespace>} \o Wraps all Qt library code in
- 'namespace name {..} \o
- \row \o \c {-qtlibinfix <infix>} \o Renames all Qt* libs to Qt*<infix>
- \o
- \row \o \c {-D <define>} \o Add an explicit define to the preprocessor.
- \o
- \row \o \c {-I <includepath>} \o Add an explicit include path. \o
- \row \o \c {-L <librarypath>} \o Add an explicit library path. \o
- \row \o \c {-l <libraryname>} \o Add an explicit library name, residing
- in a librarypath. \o
- \row \o \c {-graphicssystem <sys>} \o Specify which graphics system should
- be used. \o Available values for <sys>: * raster - Software rasterizer,
- opengl - Using OpenGL acceleration, experimental!, openvg - Using
- OpenVG acceleration, experimental!
- \row \o \c {-help, -h, -?} \o Display this information. \o
- \endtable
-
- \section2 Third Party Libraries:
- \table
- \header \o Option \o Description \o Note
- \row \o \c {-qt-zlib} \o Use the zlib bundled with Qt. \o
- \row \o \c {-system-zlib} \o Use zlib from the operating system.
- \o See http://www.gzip.org/zlib
- \row \o \c {-no-gif} \o Do not compile GIF reading support.
- \o This option denotes a default value and needs to be evaluated.
- If the evaluation succeeds, the feature is included.
- \row \o \c {-qt-gif} \o Compile GIF reading support. \o See also
- src/gui/image/qgifhandler_p.h
- \row \o \c {-no-libpng} \o Do not compile PNG support. \o
- \row \o \c {-qt-libpng} \o Use the libpng bundled with Qt.
- \o This option denotes a default value and needs to be evaluated.
- If the evaluation succeeds, the feature is included.
- \row \o \c {-system-libpng} \o Use libpng from the operating system.
- \o See http://www.libpng.org/pub/png
- \row \o \c {-no-libmng} \o Do not compile MNG support. \o This option
- denotes a default value and needs to be evaluated. If the evaluation
- succeeds, the feature is included.
- \row \o \c {-qt-libmng} \o Use the libmng bundled with Qt. \o
- \row \o \c {-system-libmng} \o Use libmng from the operating system.
- \o See http://www.libmng.com
- \row \o \c {-no-libtiff} \o Do not compile TIFF support. \o This option
- denotes a default value and needs to be evaluated. If the evaluation
- succeeds, the feature is included.
- \row \o \c {-qt-libtiff} \o Use the libtiff bundled with Qt. \o
- \row \o \c {-system-libtiff} \o Use libtiff from the operating system.
- \o See http://www.libtiff.org
- \row \o \c {-no-libjpeg} \o Do not compile JPEG support. \o This option
- denotes a default value and needs to be evaluated. If the evaluation
- succeeds, the feature is included.
- \row \o \c {-qt-libjpeg} \o Use the libjpeg bundled with Qt. \o
- \row \o \c {-system-libjpeg} \o Use libjpeg from the operating system.
- \o See http://www.ijg.org. This option denotes a default value and
- needs to be evaluated. If the evaluation succeeds, the feature is
- included.
- \endtable
-
- \section2 Qt for Windows only:
- \table
- \header \o Option \o Description \o Note
- \row \o \c {-no-dsp} \o Do not generate VC++ .dsp files. \o
- \row \o \c {-dsp} \o Generate VC++ .dsp files, only if spec "win32-msvc".
- \o Default value.
- \row \o \c {-no-vcproj} \o Do not generate VC++ .vcproj files. \o
- \row \o \c {-vcproj} \o Generate VC++ .vcproj files, only if platform
- "win32-msvc.net". \o Default value.
- \row \o \c {-no-incredibuild-xge} \o Do not add IncrediBuild XGE distribution
- commands to custom build steps. \o
- \row \o \c {-incredibuild-xge} \o Add IncrediBuild XGE distribution commands
- to custom build steps. This will distribute MOC and UIC steps, and other
- custom buildsteps which are added to the INCREDIBUILD_XGE variable.
- \o The IncrediBuild distribution commands are only added to Visual Studio
- projects. This option denotes a default value and needs to be evaluated.
- If the evaluation succeeds, the feature is included.
- \row \o \c {-no-plugin-manifests} \o Do not embed manifests in plugins. \o
- \row \o \c {-plugin-manifests} \o Embed manifests in plugins.
- \o Default value.
- \row \o \c {-no-qmake} \o Do not compile qmake. \o
- \row \o \c {-qmake} \o Compile qmake. \o Default value
- \row \o \c {-dont-process} \o Do not generate Makefiles/Project files. This
- will override -no-fast if specified. \o
- \row \o \c {-process} \o Generate Makefiles/Project files. \o Default value.
- \row \o \c {-no-rtti} \o Do not compile runtime type information. \o
- \row \o \c {-rtti} \o Compile runtime type information. \o Default value.
- \row \o \c {-no-mmx} \o Do not compile with use of MMX instructions \o
- \row \o \c {-mmx} \o Compile with use of MMX instructions \o This option
- denotes a default value and needs to be evaluated. If the evaluation
- succeeds, the feature is included.
- \row \o \c {-no-3dnow} \o Do not compile with use of 3DNOW instructions \o
- \row \o \c {-3dnow} \o Compile with use of 3DNOW instructions \o This
- option denotes a default value and needs to be evaluated. If the
- evaluation succeeds, the feature is included.
- \row \o \c {-no-sse} \o Do not compile with use of SSE instructions \o
- \row \o \c {-sse} \o Compile with use of SSE instructions \o This option
- denotes a default value and needs to be evaluated. If the evaluation
- succeeds, the feature is included.
- \row \o \c {-no-sse2} \o Do not compile with use of SSE2 instructions \o
- \row \o \c {-sse2} \o Compile with use of SSE2 instructions \o This option
- denotes a default value and needs to be evaluated. If the evaluation
- succeeds, the feature is included.
- \row \o \c {-no-openssl} \o Do not compile in OpenSSL support \o
- \row \o \c {-openssl} \o Compile in run-time OpenSSL support \o This option
- denotes a default value and needs to be evaluated. If the evaluation
- succeeds, the feature is included.
- \row \o \c {-openssl-linked} \o Compile in linked OpenSSL support \o
- \row \o \c {-no-dbus} \o Do not compile in D-Bus support \o
- \row \o \c {-dbus} \o Compile in D-Bus support and load libdbus-1 dynamically.
- \o This option denotes a default value and needs to be evaluated.
- If the evaluation succeeds, the feature is included.
- \row \o \c {-dbus-linked} \o Compile in D-Bus support and link to
- libdbus-1 \o
- \row \o \c {-no-phonon} \o Do not compile in the Phonon module \o
- \row \o \c {-phonon} \o Compile the Phonon module. \o Phonon is built if a
- decent C++ compiler is used. This option denotes a default value and needs
- to be evaluated. If the evaluation succeeds, the feature is included.
- \row \o \c {-no-phonon-backend} \o Do not compile the platform-specific
- Phonon backend-plugin \o
- \row \o \c {-phonon-backend} \o Compile in the platform-specific Phonon
- backend-plugin \o Default value.
- \row \o \c {-no-multimedia} \o Do not compile the multimedia module \o
- \row \o \c {-multimedia} \o Compile in multimedia module \o Default value.
- \row \o \c {-no-audio-backend} \o Do not compile in the platform audio
- backend into QtMultimedia \o
- \row \o \c {-audio-backend} \o Compile in the platform audio backend into
- QtMultimedia \o This option denotes a default value and needs to be
- evaluated. If the evaluation succeeds, the feature is included.
- \row \o \c {-no-webkit} \o Do not compile in the WebKit module \o
- \row \o \c {-webkit} \o Compile in the WebKit module \o WebKit is built
- if a decent C++ compiler is used. This option denotes a default value
- and needs to be evaluated. If the evaluation succeeds, the feature is
- included.
- \row \o \c {-webkit-debug} \o Compile in the WebKit module with debug
- symbols. \o
- \row \o \c {-no-script} \o Do not build the QtScript module. \o
- \row \o \c {-script} \o Build the QtScript module. \o This option
- denotes a default value and needs to be evaluated. If the evaluation
- succeeds, the feature is included.
- \row \o \c {-no-scripttools} \o Do not build the QtScriptTools module. \o
- \row \o \c {-scripttools} \o Build the QtScriptTools module. \o This
- option denotes a default value and needs to be evaluated. If the
- evaluation succeeds, the feature is included.
- \row \o \c {-no-declarative} \o Do not build the declarative module \o
- \row \o \c {-declarative} \o Build the declarative module \o This option
- denotes a default value and needs to be evaluated. If the evaluation
- succeeds, the feature is included.
- \row \o \c {-no-declarative-debug} \o Do not build the declarative debugging
- support \o
- \row \o \c {-declarative-debug} \o Build the declarative debugging support
- \o Default value.
- \row \o \c {-arch <arch>} \o Specify an architecture. \o Available values for
- <arch>: * windows, windowsce, symbian, boundschecker, generic.
- \row \o \c {-no-style-<style>} \o Disable <style> entirely. \o
- \row \o \c {-qt-style-<style>} \o Enable <style> in the Qt Library.
- \o Available styles: * windows, + windowsxp, + windowsvista,
- * plastique, * cleanlooks, * motif, * cde, windowsce, windowsmobile,
- s60
- \row \o \c {-no-native-gestures} \o Do not use native gestures on Windows 7.
- \o
- \row \o \c {-native-gestures} \o Use native gestures on Windows 7.
- \o Default value.
- \row \o \c {-no-mp} \o Do not use multiple processors for compiling with MSVC
- \o Default value.
- \row \o \c {-mp} \o Use multiple processors for compiling with MSVC (-MP) \o
- \row \o \c {-loadconfig <config>} \o Run configure with the parameters from file
- configure_<config>.cache. \o
- \row \o \c {-saveconfig <config>} \o Run configure and save the parameters in
- file configure_<config>.cache. \o
- \row \o \c {-redo} \o Run configure with the same parameters as last time. \o
-\endtable
+ \brief Brief description of available options for building Qt.
+
+ This page gives a brief description of the different options available when
+ building Qt using the \c configure script or \c configure.exe binary.
+ To build Qt using the default options, just call configure from the command
+ line as shown below.
+
+ When building on Linux, Mac OS X and Unix platforms:
+
+ \c{./configure}
+
+ On Windows, run the corresponding executable:
+
+ \c{.\configure.exe}
+
+ If you would like to customize your build, please use the options listed in
+ the following tables. To see the full list of options, invoke the configure
+ tool with the \c -help command line option.
+
+ \section2 Cross platform options:
+
+ \table
+ \header \o Option \o Description \o Note
+ \row \o \c {-buildkey} <key> \o Build the Qt library and plugins
+ using the specified \o
+ \row \o \c {<key>} \o When the library loads plugins, it will only
+ load those that have a matching <key>. \o
+ \row \o \c {-release} \o Compile and link Qt with debugging turned off. \o
+ \row \o \c {-debug} \o Compile and link Qt with debugging turned on.
+ \o Default value.
+ \row \o \c {-debug-and-release} \o Compile and link two Qt libraries,
+ with and without debugging turned on. \o This option denotes a default
+ value and needs to be evaluated. If the evaluation succeeds, the
+ feature is included.
+ \row \o \c {-opensource} \o Compile and link the Open-Source Edition
+ of Qt. \o
+ \row \o \c {-commercial} \o Compile and link the Commercial Edition
+ of Qt. \o
+ \row \o \c {-developer-build} \o Compile and link Qt with Qt developer
+ options including auto-tests exporting) \o
+ \row \o \c {-shared} \o Create and use shared Qt libraries. \o Default
+ value.
+ \row \o \c {-static} \o Create and use static Qt libraries. \o
+ \row \o \c {-ltcg} \o Use Link Time Code Generation. \o Apply to release
+ builds only.
+ \row \o \c {-no-ltcg} \o Do not use Link Time Code Generation. \o Default
+ value.
+ \row \o \c {-no-fast} \o Configure Qt normally by generating Makefiles for
+ all project files. \o Default value.
+ \row \o \c {-fast} \o Configure Qt quickly by generating Makefiles only for
+ library and subdirectory targets. \o All other Makefiles are created as
+ wrappers which will in turn run qmake.
+ \row \o \c {-no-exceptions} \o Disable exceptions on platforms that support
+ it. \o
+ \row \o \c {-exceptions} \o Enable exceptions on platforms that support it.
+ \o Default value.
+ \row \o \c {-no-accessibility} \o Do not compile Windows Active
+ Accessibility support. \o
+ \row \o \c {-accessibility} \o Compile Windows Active Accessibility
+ support. \o Default value.
+ \row \o \c {-no-stl} \o Do not compile STL support. \o
+ \row \o \c {-stl} \o Compile STL support. \o Default value.
+ \row \o \c {-no-sql-<driver>} \o Disable SQL <driver> entirely, by default
+ none are turned on. \o
+ \row \o \c {-qt-sql-<driver>} \o Enable a SQL <driver> in the Qt Library.
+ \o
+ \row \o \c {-plugin-sql-<driver>} \o Enable SQL <driver> as a plugin to be
+ linked to at run time. \o Available values for <driver>: mysql, psql,
+ oci, odbc, tds, db2, sqlite, sqlite2, ibase. Drivers marked with a
+ '+' during configure have been detected as available on this system.
+ \row \o \c {-system-sqlite} \o Use sqlite from the operating system. \o
+ \row \o \c {-no-qt3support} \o Disables the Qt 3 support functionality. \o
+ \row \o \c {-no-opengl} \o Disables OpenGL functionality \o
+ \row \o \c {-opengl <api>} \o Enable OpenGL support with specified API
+ version. \o Available values for <api>: desktop - Enable support for
+ Desktop OpenGL (Default), es1 - Enable support for OpenGL ES Common
+ Profile, es2 - Enable support for OpenGL ES 2.0.
+ \row \o \c {-no-openvg} \o Disables OpenVG functionality \o Default value.
+ \row \o \c {-openvg} \o Enables OpenVG functionality \o Requires EGL
+ support, typically supplied by an OpenGL or other graphics
+ implementation.
+ \row \o \c {-platform <spec>} \o The operating system and compiler you
+ are building on. \o The default value is %QMAKESPEC%.
+ \row \o \c {-xplatform <spec>} \o The operating system and compiler you
+ are cross compiling for. \o See the README file for a list of supported
+ operating systems and compilers.
+ \row \o \c {-qtnamespace <namespace>} \o Wraps all Qt library code in
+ 'namespace name {..} \o
+ \row \o \c {-qtlibinfix <infix>} \o Renames all Qt* libs to Qt*<infix>
+ \o
+ \row \o \c {-D <define>} \o Add an explicit define to the preprocessor.
+ \o
+ \row \o \c {-I <includepath>} \o Add an explicit include path. \o
+ \row \o \c {-L <librarypath>} \o Add an explicit library path. \o
+ \row \o \c {-l <libraryname>} \o Add an explicit library name, residing
+ in a librarypath. \o
+ \row \o \c {-graphicssystem <sys>} \o Specify which graphics system should
+ be used. \o Available values for <sys>: * raster - Software rasterizer,
+ opengl - Using OpenGL acceleration, experimental!, openvg - Using
+ OpenVG acceleration, experimental!
+ \row \o \c {-help, -h, -?} \o Display this information. \o
+ \endtable
+
+ \section2 Third Party Libraries
+
+ \table
+ \header \o Option \o Description \o Note
+ \row \o \c {-qt-zlib} \o Use the zlib bundled with Qt. \o
+ \row \o \c {-system-zlib} \o Use zlib from the operating system.
+ \o See http://www.gzip.org/zlib
+ \row \o \c {-no-gif} \o Do not compile GIF reading support.
+ \o This option denotes a default value and needs to be evaluated.
+ If the evaluation succeeds, the feature is included.
+ \row \o \c {-qt-gif} \o Compile GIF reading support. \o See also
+ src/gui/image/qgifhandler_p.h
+ \row \o \c {-no-libpng} \o Do not compile PNG support. \o
+ \row \o \c {-qt-libpng} \o Use the libpng bundled with Qt.
+ \o This option denotes a default value and needs to be evaluated.
+ If the evaluation succeeds, the feature is included.
+ \row \o \c {-system-libpng} \o Use libpng from the operating system.
+ \o See http://www.libpng.org/pub/png
+ \row \o \c {-no-libmng} \o Do not compile MNG support. \o This option
+ denotes a default value and needs to be evaluated. If the evaluation
+ succeeds, the feature is included.
+ \row \o \c {-qt-libmng} \o Use the libmng bundled with Qt. \o
+ \row \o \c {-system-libmng} \o Use libmng from the operating system.
+ \o See http://www.libmng.com
+ \row \o \c {-no-libtiff} \o Do not compile TIFF support. \o This option
+ denotes a default value and needs to be evaluated. If the evaluation
+ succeeds, the feature is included.
+ \row \o \c {-qt-libtiff} \o Use the libtiff bundled with Qt. \o
+ \row \o \c {-system-libtiff} \o Use libtiff from the operating system.
+ \o See http://www.libtiff.org
+ \row \o \c {-no-libjpeg} \o Do not compile JPEG support. \o This option
+ denotes a default value and needs to be evaluated. If the evaluation
+ succeeds, the feature is included.
+ \row \o \c {-qt-libjpeg} \o Use the libjpeg bundled with Qt. \o
+ \row \o \c {-system-libjpeg} \o Use libjpeg from the operating system.
+ \o See http://www.ijg.org. This option denotes a default value and
+ needs to be evaluated. If the evaluation succeeds, the feature is
+ included.
+ \endtable
+
+ \section2 Qt for Windows only:
+ \table
+ \header \o Option \o Description \o Note
+ \row \o \c {-no-dsp} \o Do not generate VC++ .dsp files. \o
+ \row \o \c {-dsp} \o Generate VC++ .dsp files, only if spec "win32-msvc".
+ \o Default value.
+ \row \o \c {-no-vcproj} \o Do not generate VC++ .vcproj files. \o
+ \row \o \c {-vcproj} \o Generate VC++ .vcproj files, only if platform
+ "win32-msvc.net". \o Default value.
+ \row \o \c {-no-incredibuild-xge} \o Do not add IncrediBuild XGE distribution
+ commands to custom build steps. \o
+ \row \o \c {-incredibuild-xge} \o Add IncrediBuild XGE distribution commands
+ to custom build steps. This will distribute MOC and UIC steps, and other
+ custom buildsteps which are added to the INCREDIBUILD_XGE variable.
+ \o The IncrediBuild distribution commands are only added to Visual Studio
+ projects. This option denotes a default value and needs to be evaluated.
+ If the evaluation succeeds, the feature is included.
+ \row \o \c {-no-plugin-manifests} \o Do not embed manifests in plugins. \o
+ \row \o \c {-plugin-manifests} \o Embed manifests in plugins.
+ \o Default value.
+ \row \o \c {-no-qmake} \o Do not compile qmake. \o
+ \row \o \c {-qmake} \o Compile qmake. \o Default value
+ \row \o \c {-dont-process} \o Do not generate Makefiles/Project files. This
+ will override -no-fast if specified. \o
+ \row \o \c {-process} \o Generate Makefiles/Project files. \o Default value.
+ \row \o \c {-no-rtti} \o Do not compile runtime type information. \o
+ \row \o \c {-rtti} \o Compile runtime type information. \o Default value.
+ \row \o \c {-no-mmx} \o Do not compile with use of MMX instructions \o
+ \row \o \c {-mmx} \o Compile with use of MMX instructions \o This option
+ denotes a default value and needs to be evaluated. If the evaluation
+ succeeds, the feature is included.
+ \row \o \c {-no-3dnow} \o Do not compile with use of 3DNOW instructions \o
+ \row \o \c {-3dnow} \o Compile with use of 3DNOW instructions \o This
+ option denotes a default value and needs to be evaluated. If the
+ evaluation succeeds, the feature is included.
+ \row \o \c {-no-sse} \o Do not compile with use of SSE instructions \o
+ \row \o \c {-sse} \o Compile with use of SSE instructions \o This option
+ denotes a default value and needs to be evaluated. If the evaluation
+ succeeds, the feature is included.
+ \row \o \c {-no-sse2} \o Do not compile with use of SSE2 instructions \o
+ \row \o \c {-sse2} \o Compile with use of SSE2 instructions \o This option
+ denotes a default value and needs to be evaluated. If the evaluation
+ succeeds, the feature is included.
+ \row \o \c {-no-openssl} \o Do not compile in OpenSSL support \o
+ \row \o \c {-openssl} \o Compile in run-time OpenSSL support \o This option
+ denotes a default value and needs to be evaluated. If the evaluation
+ succeeds, the feature is included.
+ \row \o \c {-openssl-linked} \o Compile in linked OpenSSL support \o
+ \row \o \c {-no-dbus} \o Do not compile in D-Bus support \o
+ \row \o \c {-dbus} \o Compile in D-Bus support and load libdbus-1 dynamically.
+ \o This option denotes a default value and needs to be evaluated.
+ If the evaluation succeeds, the feature is included.
+ \row \o \c {-dbus-linked} \o Compile in D-Bus support and link to
+ libdbus-1 \o
+ \row \o \c {-no-phonon} \o Do not compile in the Phonon module \o
+ \row \o \c {-phonon} \o Compile the Phonon module. \o Phonon is built if a
+ decent C++ compiler is used. This option denotes a default value and needs
+ to be evaluated. If the evaluation succeeds, the feature is included.
+ \row \o \c {-no-phonon-backend} \o Do not compile the platform-specific
+ Phonon backend-plugin \o
+ \row \o \c {-phonon-backend} \o Compile in the platform-specific Phonon
+ backend-plugin \o Default value.
+ \row \o \c {-no-multimedia} \o Do not compile the multimedia module \o
+ \row \o \c {-multimedia} \o Compile in multimedia module \o Default value.
+ \row \o \c {-no-audio-backend} \o Do not compile in the platform audio
+ backend into QtMultimedia \o
+ \row \o \c {-audio-backend} \o Compile in the platform audio backend into
+ QtMultimedia \o This option denotes a default value and needs to be
+ evaluated. If the evaluation succeeds, the feature is included.
+ \row \o \c {-no-webkit} \o Do not compile in the WebKit module \o
+ \row \o \c {-webkit} \o Compile in the WebKit module \o WebKit is built
+ if a decent C++ compiler is used. This option denotes a default value
+ and needs to be evaluated. If the evaluation succeeds, the feature is
+ included.
+ \row \o \c {-webkit-debug} \o Compile in the WebKit module with debug
+ symbols. \o
+ \row \o \c {-no-script} \o Do not build the QtScript module. \o
+ \row \o \c {-script} \o Build the QtScript module. \o This option
+ denotes a default value and needs to be evaluated. If the evaluation
+ succeeds, the feature is included.
+ \row \o \c {-no-scripttools} \o Do not build the QtScriptTools module. \o
+ \row \o \c {-scripttools} \o Build the QtScriptTools module. \o This
+ option denotes a default value and needs to be evaluated. If the
+ evaluation succeeds, the feature is included.
+ \row \o \c {-no-declarative} \o Do not build the declarative module \o
+ \row \o \c {-declarative} \o Build the declarative module \o This option
+ denotes a default value and needs to be evaluated. If the evaluation
+ succeeds, the feature is included.
+ \row \o \c {-no-declarative-debug} \o Do not build the declarative debugging
+ support \o
+ \row \o \c {-declarative-debug} \o Build the declarative debugging support
+ \o Default value.
+ \row \o \c {-arch <arch>} \o Specify an architecture. \o Available values for
+ <arch>: * windows, windowsce, symbian, boundschecker, generic.
+ \row \o \c {-no-style-<style>} \o Disable <style> entirely. \o
+ \row \o \c {-qt-style-<style>} \o Enable <style> in the Qt Library.
+ \o Available styles: * windows, + windowsxp, + windowsvista,
+ * plastique, * cleanlooks, * motif, * cde, windowsce, windowsmobile,
+ s60
+ \row \o \c {-no-native-gestures} \o Do not use native gestures on Windows 7.
+ \o
+ \row \o \c {-native-gestures} \o Use native gestures on Windows 7.
+ \o Default value.
+ \row \o \c {-no-mp} \o Do not use multiple processors for compiling with MSVC
+ \o Default value.
+ \row \o \c {-mp} \o Use multiple processors for compiling with MSVC (-MP) \o
+ \row \o \c {-loadconfig <config>} \o Run configure with the parameters from file
+ configure_<config>.cache. \o
+ \row \o \c {-saveconfig <config>} \o Run configure and save the parameters in
+ file configure_<config>.cache. \o
+ \row \o \c {-redo} \o Run configure with the same parameters as last time. \o
+ \endtable
\section2 Qt for Windows CE only:
\table
diff --git a/doc/src/mainpage.qdoc b/doc/src/mainpage.qdoc
index 41818eea3d..6865f10b82 100644
--- a/doc/src/mainpage.qdoc
+++ b/doc/src/mainpage.qdoc
@@ -110,6 +110,7 @@ applications using layouts and Qt Quick interfaces with QML.
\o \l{Qt Quick} - create UIs using QML
\list
\o \l{external: Developing Qt Quick Applications}{Creator's QML Design Mode} - design Qt Quick interfaces using Creator's design mode
+ \o \l{Qt Quick Components for Symbian}{Qt Quick Components for Symbian} - a native QML component set for the Symbian^3 platform
\endlist
\o \l{Widgets and Layouts} - primary elements for C++ based interfaces
\list
diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc
index 231c58af90..fbb66b12aa 100644
--- a/doc/src/platforms/platform-notes.qdoc
+++ b/doc/src/platforms/platform-notes.qdoc
@@ -622,9 +622,10 @@
\ingroup platform-specific
\brief Information about the state of support for the Symbian platform.
- As with any port, the maturity for Qt for Symbian has not yet reached the
- same level as other established Qt ports. This page documents the current
- notes for the Symbian port.
+ This page describes implementation details regarding the Qt for Symbian port. To get
+ started with application development for Symbian devices, read the \l
+ {http://doc.qt.nokia.com/qtcreator/creator-developing-symbian.html}
+ {Connecting Symbian Devices} document.
\section1 Source Compatibility
@@ -635,55 +636,108 @@
\section1 Binary Compatibility
- As with every supported platform, we will strive to maintain
- application behavior and binary compatibility throughout the lifetime of
- the Qt 4.x series. However, due to the fact that Symbian support is newly
- added in 4.6.0, there is a slight possibility that minor corrections to the
- application binary interface (ABI) might be required in 4.6.1, in order to
- ensure compatibility going forward. Any such change will be clearly
- documented in the release notes for 4.6.1.
-
+ As with every supported platform, Qt strives to maintain application
+ behavior and binary compatibility throughout the lifetime of the Qt 4.x
+ major version and on the \l {Supported Devices}{Symbian devices that support Qt}.
+ Symbian support in Qt SDK and Ovi Store were introduced with Qt 4.6. Each Qt
+ release contains bug fixes that might change the API behavior and thereby
+ affect application compatibility.
+
+ In addition, Symbian devices have different input methods, such as different
+ keyboard styles or touch input, screen sizes, memory, and CPU and GPU
+ capabilities. Therefore, you must test applications on specific target
+ devices to ensure compatibility. In order to build applications that are
+ supported also on earlier devices, select the target in Qt SDK carefully.
+ Generally, an earlier target (such as S60 5th Edition) is supported on a
+ larger number of devices than a later target (such as Symbian Belle).
+
+ \target Supported Devices
\section1 Supported Devices
+
+ The \l {http://developer.qt.nokia.com/wiki/support_for_Symbian}{Support for Symbian} document
+ details the Qt support on different Symbian devices.
- See the list of supported devices at
- http://wiki.forum.nokia.com/index.php/Nokia_Smart_Installer_for_Symbian#Supported_Devices
+ The \l {http://www.developer.nokia.com/Community/Wiki/Nokia_Smart_Installer_for_Symbian#Supported_Devices}
+ {Nokia Smart Installer for Symbian} document lists how Qt is supported on
+ different Symbian devices through Smart Installer.
- \section1 Supported Functionality
+ Qt versions are supported by Symbian devices as follows:
+ \list
+ \o Qt 4.6 is supported by S60 3rd Edition feature pack 1 and newer devices
+ through \l {http://www.developer.nokia.com/Community/Wiki/Nokia_Smart_Installer_for_Symbian}{Smart Installer}.
+ \o Qt 4.7.3 is supported by S60 5th Edition and newer devices
+ through \l {http://www.developer.nokia.com/Community/Wiki/Nokia_Smart_Installer_for_Symbian}{Smart Installer}.
+ \endlist
+
+ Symbian devices have a pre-installed Qt support as follows:
+ \list
+ \o Symbian Anna: Qt 4.7.3 in C: drive. Note that Qt 4.7.4 is supported in Symbian Anna
+ through \l {http://www.developer.nokia.com/Community/Wiki/Nokia_Smart_Installer_for_Symbian}{Smart Installer}.
+ \o Symbian Belle: Qt 4.7.4 in device firmware (ROM).
+ \endlist
+
- The following technologies and classes are not currently supported:
-
- \table
- \header \o Technology
- \o Note
- \row \o QtConcurrent
- \o Planned for future release.
- \row \o QtDBus
- \o No current plans to support this feature.
- \row \o Printing support
- \o No current plans to support this feature.
- \row \o Qt3Support
- \o No current plans to support this feature.
- \endtable
+ \section1 Functionality Support
+ The following technologies and classes are not supported:
+ \list
+ \o QtConcurrent
+ \o QtDBus
+ \o \l {http://doc.qt.nokia.com/4.8/printing.html}{Printing support}
+ \o Qt3Support
+ \endlist
+
The following technologies have limited support:
\table
- \header \o Technology
+ \header \o Module
\o Note
\row \o QtSql
- \o The only driver supported is SQLite.
+ \o The only supported driver is SQLite.
\row \o QtMultimedia
- \o Although the module itself is supported, no backend for Symbian
- is currently available. However, there is a backend available
- for Phonon.
+ \o For support details see \l {Multimedia Support} section.
+ \row \o QtGui
+ \o QtGui's widgets are deprecated (i.e. they are available but not
+ recommended to use) in the Symbian port. It is recommended to use \l
+ {http://doc.qt.nokia.com/qt-components-symbian-1.1/symbian-components-functional.html}
+ {Qt Quick Components for Symbian} instead, because they provide
+ better look and feel on Symbian devices.
+
+ Moreover, the following classes of QtGui \bold {should not
+ be used} in a Symbian application:
+
+ \list
+ \o QFileDialog with the \c DontUseNativeDialog option
+ \o QColorDialog with the \c DontUseNativeDialog option
+ \o QFontDialog
+ \o QWizard
+ \o QCalendarWidget
+ \o QDateTimeEdit
+ \o QMdiArea
+ \o QDockWidget
+ \o QMdiSubWindow
+ \o QPrintPreviewWidget
+ \endlist
+
+ QScrollArea: The scrolling and focus handling of QScrollArea's all
+ scrollable widgets, for example QListView, differs from native Avkon
+ list widgets' one. Native Avkon scrollable components support
+ touch-gesture-based scrolling by dragging and flicking the UI
+ component but this functionality is not implemented in Qt widgets.
+ Scrolling by dragging and flicking works also in Qt Quick Components
+ that implements the \l
+ {http://www.developer.nokia.com/Resources/Library/Symbian_Design_Guidelines/}
+ {Symbian design guidelines}.
+
\endtable
\section1 Compiler Notes
-
- \section2 GCCE (Symbian)
-
- GCCE cannot be used to compile Qt libaries for the Symbian platform, but GCCE is supported
- when compiling Qt applications for the Symbian platform.
+
+ For the application development the necessary compiler toolchain is included in \l
+ {http://qt.nokia.com/downloads}{Qt SDK}. For instructions compiling Qt
+ itself see the \l
+ {http://doc.qt.nokia.com/stable/install-symbian.html}
+ {Installing Qt for the Symbian platform} document.
\section1 Known Issues
@@ -699,11 +753,14 @@
\section1 Required Capabilities
- The Qt libraries are typically signed with \c{All -TCB} capabilites, but
+ The Qt libraries are typically signed with \c{All -TCB} capabilites but
that does not mean your Qt application needs to be signed with the same
capabilities to function properly. The capabilities your application needs
- to function properly depends on which parts of Qt you use, here is an
- overview:
+ to function properly depends on which parts of Qt you use.
+ In a Qt application Symbian capabilities are defined in the
+ \l {http://doc.qt.nokia.com/4.8/qmake-variable-reference.html#target-capability}
+ {TARGET.CAPABILITY} qmake variable in the project file.
+ Here is an overview for which capabilities may be needed when using different modules:
\table
\header \o Module
@@ -711,7 +768,7 @@
\row \o QtCore
\o \c PowerMgmt if QProcess::kill(...) or QProcess::terminate(...) is called.
\row \o QtCore
- \o \c AllFiles when \l{http://developer.symbian.org/wiki/index.php/Capabilities_%28Symbian_Signed%29/AllFiles_Capability}{accessing specific areas.}
+ \o \c AllFiles when \l{http://wiki.forum.nokia.com/index.php/Capabilities_%28Symbian_Signed%29/AllFiles_Capability}{accessing specific areas.}
\row \o QtDeclarative
\o \c NetworkServices is automatically added for this module if no capabilities are explicitly specified.
\row \o QtNetwork
@@ -720,9 +777,9 @@
\o \c ReadUserData is required to include all the phone's SSL certificates in the system's default CA certificate list
(for example those added by the user or stored in the SIM card),
without this capability only the CA certs built into the phone are used.
- \row \o QtMultiMedia
+ \row \o QtMultimedia
\o \c UserEnvironment if QAudioInput is used.
- \row \o QtWebkit
+ \row \o QtWebKit
\o \c NetworkServices is automatically added for this module if no capabilities are explicitly specified.
\endtable
@@ -733,28 +790,45 @@
For more information see the documentation of the individual Qt classes. If
a class does not mention Symbian capabilities, it requires none.
- \section1 Multimedia and Phonon Support
+ \target Multimedia Support
+ \section1 Multimedia Support
- Qt provides a backend for Qt's Phonon module, which supports
- video and sound playback through Symbian's Multimedia Framework, MMF.
+ Qt Mobility provides a high-level API for multimedia functionality with
+ \l{http://doc.qt.nokia.com/qtmobility/multimedia.html}{QtMultimediaKit}.
+ In addition, Qt provides the low-level \l {QtMultimedia}{QtMultimedia}
+ module that is internally used by the QtMultimediaKit. For more information
+ on developing multimedia applications for Symbian devices, see
+ \l {http://www.developer.nokia.com/info/sw.nokia.com/id/4abf12e7-72d8-45ef-b1a2-46184abe18ba/Guide_for_Qt_Multimedia_Developers.html}
+ {Guide for Qt Multimedia Developers}.
- In this release the support is experimental. Video playback may have
- flickering issues, and support for effects and playback queueing is
- incomplete.
+ Moreover, there is a third multimedia-related module called Phonon. Qt
+ provides two backends for the Phonon module in Symbian: \i MMF and \i Helix.
- The audio and video formats that Phonon supports depends on what support
+ Note that Phonon is a legacy module and the QtMultimediaKit module is
+ replacing Phonon in Qt 5. Although Phonon is supported in Symbian for
+ backwards compatibility and there is no plan to remove Phonon from Symbian
+ any new applications should use QtMultimediaKit in Symbian using Qt 4.7
+ bundle. The QtMultimediaKit feature set is comparable to that in Phonon.
+
+ The following applies to Phonon:
+ \list
+ \o MMF Phonon backend supports video and sound playback through Symbian's
+ Multimedia Framework, MMF. Phonon's video playback may show artifacts when
+ the video is moved or resized (for instance, during device orientation
+ changes from portrait to landscape and vice versa). This problem is present
+ on S60 5th Edition and earlier versions, as well as in Symbian Anna devices.
+ \o The audio and video formats that Phonon supports depends on what support
the platform provides for MMF. The emulator is known to have limited
codec support.
-
- In addition, there exists a backend for the Helix framework. However, due
- to it not shipping with Qt, its availability depends on the Symbian
- platform in use. If available, it is loaded in preference over the MMF
- plugin. If the Helix plugin fails to load, the MMF plugin, if present on
- the device, will be loaded instead.
+ \o In addition, there exists a backend for the Helix framework. However, since
+ it is not shipped with Qt, its availability depends on the Symbian platform
+ in use. If the MFF plugin fails to load, the Helix plugin, if present on the
+ device, will be loaded instead.
+ \endlist
\section1 Hardware Accelerated Rendering
- The default graphics system on Symbian^3 is OpenVG, which uses OpenVG
+ The default graphics system on Symbian Anna is OpenVG, which uses OpenVG
hardware to accelerate \l QPainter functions. There are a few exceptions,
where Qt will use software rendering fallback.
@@ -769,17 +843,18 @@
\o Popups
\endlist
- \section1 QtOpenGL Support in Symbian
+ \section1 OpenGL Support in Symbian
- Qt 4.7 introduces the \l {QtOpenGL} module to Symbian^3. QtOpenGL is
+ Qt 4.7 introduces the \l {QtOpenGL} module. QtOpenGL is
supported on devices which support OpenGL ES 2.0. Symbian platforms prior
- to Symbian^3 are not supported.
+ to Symbian Anna (and Symbian^3) are not supported.
\l QGLWidget usage as a \l QGraphicsView viewport is not recommended on
Symbian. The OpenVG graphics system is not able to manage OpenGL graphics
resources. Also, a QGLWidget object is not able to release its GPU resources
when the application goes to the background. If OpenGL functionality is
- needed, OpenGL graphics system usage is recommended. If an application
+ needed, \l { http://doc.qt.nokia.com/4.7-snapshot/qapplication.html#setGraphicsSystem}
+ {OpenGL graphics system} usage is recommended. If an application
decides to use QGLWidget, then it is the application's responsibility to
destroy and release QGLWidget and related OpenGL resources when the
application goes to the background. Otherwise, the \l{Graphics Out Of Memory monitor}
@@ -790,7 +865,7 @@
QGLShader, and \l QGLShaderProgram are direct GPU resources and it is the
application's responsibility to manage them.
- \section1 UI Performance in devices prior to Symbian^3
+ \section1 UI Performance in S60 3rd and 5th Edition Devices
Qt uses the QPainter class to perform low-level painting on widgets and
other paint devices. QPainter provides functions to draw complex shapes,
@@ -798,11 +873,18 @@
transformations and Porter-Duff composition. If the underlying graphics
architecture does not support all of these operations then Qt uses the
raster graphics system for rendering.
-
- Most of the Symbian devices prior to Symbian^3 use a non-ScreenPlay
- graphics architecture which does not have native support for all functions
- provided by QPainter. In non-ScreenPlay devices Qt uses the raster
- graphics system by default which has a performance penalty when compared
+
+ In Symbian Anna (and Symbian^3) Qt uses hardware accelerated graphics as explained above.
+ This is enabled by \l
+ {http://library.developer.nokia.com/index.jsp?topic=/GUID-E35887BB-7E58-438C-AA27-97B2CDE7E069/GUID-D93978BE-11A3-5CE3-B110-1DEAA5AD566C.html}
+ {ScreenPlay Graphics Architecture} in these devices.
+
+ Most of the Symbian S60 3rd and 5th Edition devices have a
+ graphics architecture that does not have native support for all functions
+ provided by QPainter. In these \l
+ {http://library.developer.nokia.com/index.jsp?topic=/GUID-E35887BB-7E58-438C-AA27-97B2CDE7E069/GUID-D93978BE-11A3-5CE3-B110-1DEAA5AD566C.html}
+ {non-ScreenPlay} devices Qt uses the raster
+ graphics system by default that has a performance penalty compared
to native Symbian rendering.
In order to be able to perform all functions provided by QPainter, the
@@ -813,7 +895,8 @@
offscreen buffer is blitted to the framebuffer via Symbian Window Server.
The following table shows the rendering stacks of native Symbian and Qt in
- non-ScreenPlay devices.
+ \l {http://library.developer.nokia.com/index.jsp?topic=/GUID-E35887BB-7E58-438C-AA27-97B2CDE7E069/GUID-D93978BE-11A3-5CE3-B110-1DEAA5AD566C.html}
+ {non-ScreenPlay devices}.
\table
\header \o Symbian
diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc
index ba59c375f4..eee6555006 100644
--- a/doc/src/platforms/supported-platforms.qdoc
+++ b/doc/src/platforms/supported-platforms.qdoc
@@ -465,6 +465,8 @@
\o \l{Platform and Compiler Notes - Symbian}{Platform Notes - Symbian}
- Platform specific notes.
\o \l{Getting Started Guides}{Getting started}
+ \o \l{Qt Quick Components for Symbian}{Qt Quick Components for Symbian}
+ - provides a QML component set for the Symbian^3 platform
\endlist
\section1 Key Features for Symbian Development
@@ -481,6 +483,9 @@
time and lines of code required for traditional UI styling with
Qt Style Sheets.
+ The \l{Qt Quick Components for Symbian}{Qt Quick Components for Symbian}
+ provides a native QML component set.
+
\section2 Graphics Features
Qt for Symbian contains a powerful paint engine that provides
diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc
index 2a5d5b16bb..82d39f32a4 100644
--- a/doc/src/platforms/symbian-introduction.qdoc
+++ b/doc/src/platforms/symbian-introduction.qdoc
@@ -42,7 +42,6 @@
\o
\list
\o \l {Qt for the Symbian platform Requirements}
- \o \l {Installing Qt for the Symbian platform from a Binary Package}
\o \l {Installing Qt for the Symbian platform}
\o \l {The Symbian platform - Introduction to Qt}{Introduction to using Qt}
\endlist
@@ -55,7 +54,7 @@
\endlist
\o
\list
- \o \l {Deploying an Application on the Symbian platform}{Deploying Applications}
+ \o \l {Deploying an Application on the Symbian Platform}{Deploying Applications}
\endlist
\endtable
*/
@@ -74,6 +73,8 @@
Platform security capabilities are added via the
\l{qmake-variable-reference.html#target-capability}{TARGET.CAPABILITY}
qmake variable.
+
+ \sa {platform-notes-symbian.html#required-capabilities}{Required Capabilities}
*/
/*!
@@ -93,9 +94,6 @@
\section1 Installing Qt and Running Demos
- Follow the instructions found in \l{Installing Qt for the Symbian platform from a Binary Package}
- to learn how to install Qt using a binary package and how to build and run Qt demos.
-
Follow the instructions found in \l{Installing Qt for the Symbian platform} to learn how to install Qt using
using source package and how to build and run the Qt demos.
diff --git a/doc/src/qt-webpages.qdoc b/doc/src/qt-webpages.qdoc
index 742de7324b..16bc6657cd 100644
--- a/doc/src/qt-webpages.qdoc
+++ b/doc/src/qt-webpages.qdoc
@@ -318,3 +318,121 @@
\title Qt Developer Days 2010
*/
+/*!
+ \externalpage http://developer.qt.nokia.com/elearning/watch/qt_essentials_widget_edition_fundamentals_of_qt_part_2_hello_world_in_qtcre
+ \title Qt Essentials - Fundamentals of Qt part 1
+*/
+/*!
+ \externalpage http://developer.qt.nokia.com/elearning/watch/qt_essentials_widget_edition_fundamentals_of_qt_part_1_your_first_qt_applic
+ \title Qt Essentials - Fundamentals of Qt part 2
+*/
+/*!
+ \externalpage http://developer.qt.nokia.com/elearning/watch/qt_essentials_widget_edition_application_creation_part_1_mainwindows
+ \title Qt Essentials - Application Creation part 1
+*/
+/*!
+ \externalpage http://developer.qt.nokia.com/elearning/watch/application_creation_part_2_settings_resources_and_application_deployment
+ \title Qt Essentials - Application Creation part 2
+*/
+/*!
+ \externalpage http://developer.qt.nokia.com/elearning/watch/application_creation_part_3_translation_for_developers
+ \title Qt Essentials - Application Creation part 3
+*/
+/*!
+ \externalpage http://developer.qt.nokia.com/elearning/watch/widgets_part_1_common_widgets
+ \title Qt Essentials - Widgets part 1
+*/
+/*!
+ \externalpage http://developer.qt.nokia.com/elearning/watch/widgets_part_2_layout_management
+ \title Qt Essentials - Widgets part 2
+*/
+/*!
+ \externalpage http://developer.qt.nokia.com/elearning/watch/widgets_part_3_guidelines_for_custom_widgets
+ \title Qt Essentials - Widgets part 3
+*/
+/*!
+ \externalpage http://developer.qt.nokia.com/elearning/watch/graphics_view_part_1_using_graphicsview_classes
+ \title Qt Essentials - Graphics View part 1
+*/
+/*!
+ \externalpage http://developer.qt.nokia.com/elearning/watch/graphics_view_part_2_transformations_and_coordinate_systems
+ \title Qt Essentials - Graphics View part 2
+*/
+/*!
+ \externalpage http://developer.qt.nokia.com/elearning/watch/graphics_view_part_3_creating_custom_items
+ \title Qt Essentials - Graphics View part 3
+*/
+/*!
+ \externalpage http://developer.qt.nokia.com/elearning/watch/model_view_part_1_model_view_concept
+ \title Qt Essentials - Model/View I part 1
+*/
+/*!
+ \externalpage http://developer.qt.nokia.com/elearning/watch/model_view_part_2_showing_simple_data
+ \title Qt Essentials - Model/View I part 2
+*/
+/*!
+ \externalpage http://developer.qt.nokia.com/elearning/watch/model_view_part_3_proxy_models
+ \title Qt Essentials - Model/View I part 3
+*/
+/*!
+ \externalpage http://developer.qt.nokia.com/elearning/watch/model_view_part_4_custom_models
+ \title Qt Essentials - Model/View I part 4
+*/
+/*!
+ \externalpage http://developer.qt.nokia.com/elearning/watch/model_view_ii_part_1_editing_item_data
+ \title Qt Essentials - Model/View II part 1
+*/
+/*!
+ \externalpage
+ \title Qt Essentials - Model/View II part 2
+*/
+/*!
+ \externalpage http://developer.qt.nokia.com/elearning/watch/model_view_ii_part_3_data_widget_mapper
+ \title Qt Essentials - Model/View II part 3
+*/
+/*!
+ \externalpage http://developer.qt.nokia.com/elearning/watch/model_view_ii_part_4_custom_tree_model
+ \title Qt Essentials - Model/View II part 4
+*/
+/*!
+ \externalpage http://developer.qt.nokia.com/elearning/watch/model_view_ii_part_5_drag_and_drop
+ \title Qt Essentials - Model/View II part 5
+*/
+/*!
+ \externalpage http://qt.nokia.com/certification
+ \title Qt Certification
+*/
+/*!
+ \externalpage http://qt.nokia.com/developer/learning/certification/exams/preparation-prerequisites
+ \title Qt Certification Exam Preparation and Prerequisites
+*/
+
+/*!
+ \externalpage http://qt.nokia.com/developer/learning/online/training/materials
+ \title Download Qt training materials
+*/
+
+/*!
+ \externalpage http://qt.nokia.com/partners/qt-in-education/qt-in-education-course-material/
+ \title Qt in Education Course Material
+*/
+
+/*!
+ \externalpage http://developer.qt.nokia.com/
+ \title Qt Developer Network
+*/
+
+/*!
+ \externalpage http://developer.qt.nokia.com/wiki/Qt_Modules_Maturity_Level
+ \title Qt Modules' Maturity Levels - Modules List
+*/
+
+/*!
+ \externalpage http://labs.qt.nokia.com/2011/05/03/qt-modules-maturity-level/
+ \title Qt Modules' Maturity Level - Description
+*/
+
+/*!
+ \externalpage http://doc.qt.nokia.com/qtquick-components-symbian-latest/index.html
+ \title Qt Quick Components for Symbian
+*/
diff --git a/examples/declarative/cppextensions/imageprovider/imageprovider.pro b/examples/declarative/cppextensions/imageprovider/imageprovider.pro
index 7149986f23..9797a3ff0a 100644
--- a/examples/declarative/cppextensions/imageprovider/imageprovider.pro
+++ b/examples/declarative/cppextensions/imageprovider/imageprovider.pro
@@ -24,5 +24,5 @@ symbian:{
importFiles.sources = ImageProviderCore/qmlimageproviderplugin.dll ImageProviderCore/qmldir
importFiles.path = ImageProviderCore
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
}
diff --git a/examples/declarative/cppextensions/qwidgets/qwidgets.pro b/examples/declarative/cppextensions/qwidgets/qwidgets.pro
index 2e610f9914..3353a8daeb 100644
--- a/examples/declarative/cppextensions/qwidgets/qwidgets.pro
+++ b/examples/declarative/cppextensions/qwidgets/qwidgets.pro
@@ -20,5 +20,5 @@ symbian:{
importFiles.sources = QWidgets/qmlqwidgetsplugin.dll QWidgets/qmldir
importFiles.path = QWidgets
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
}
diff --git a/src/3rdparty/libpng/pngrutil.c b/src/3rdparty/libpng/pngrutil.c
index 07e46e2fed..daf3c5e099 100644
--- a/src/3rdparty/libpng/pngrutil.c
+++ b/src/3rdparty/libpng/pngrutil.c
@@ -1037,12 +1037,14 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
*/
png_uint_32 w = y_red + y_green + y_blue;
- png_ptr->rgb_to_gray_red_coeff = (png_uint_16)(((png_uint_32)y_red *
- 32768)/w);
- png_ptr->rgb_to_gray_green_coeff = (png_uint_16)(((png_uint_32)y_green
- * 32768)/w);
- png_ptr->rgb_to_gray_blue_coeff = (png_uint_16)(((png_uint_32)y_blue *
- 32768)/w);
+ if (w != 0) {
+ png_ptr->rgb_to_gray_red_coeff = (png_uint_16)(((png_uint_32)y_red *
+ 32768)/w);
+ png_ptr->rgb_to_gray_green_coeff = (png_uint_16)(((png_uint_32)y_green
+ * 32768)/w);
+ png_ptr->rgb_to_gray_blue_coeff = (png_uint_16)(((png_uint_32)y_blue *
+ 32768)/w);
+ }
}
}
#endif
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
index 5e2bc4fbe7..b796728c7f 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
+++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp
@@ -61,6 +61,24 @@ QT_BEGIN_NAMESPACE
#define NULLTIMER_PRIORITY CActive::EPriorityLow
#define COMPLETE_DEFERRED_ACTIVE_OBJECTS_PRIORITY CActive::EPriorityIdle
+class Incrementer {
+ int &variable;
+public:
+ inline Incrementer(int &variable) : variable(variable)
+ { ++variable; }
+ inline ~Incrementer()
+ { --variable; }
+};
+
+class Decrementer {
+ int &variable;
+public:
+ inline Decrementer(int &variable) : variable(variable)
+ { --variable; }
+ inline ~Decrementer()
+ { ++variable; }
+};
+
static inline int qt_pipe_write(int socket, const char *data, qint64 len)
{
return ::write(socket, data, len);
@@ -830,6 +848,8 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla
#endif
while (1) {
+ //native active object callbacks are logically part of the event loop, so inc nesting level
+ Incrementer inc(d->threadData->loopLevel);
if (block) {
// This is where Qt will spend most of its time.
CActiveScheduler::Current()->WaitForAnyRequest();
@@ -894,6 +914,7 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla
void QEventDispatcherSymbian::timerFired(int timerId)
{
+ Q_D(QAbstractEventDispatcher);
QHash<int, SymbianTimerInfoPtr>::iterator i = m_timerList.find(timerId);
if (i == m_timerList.end()) {
// The timer has been deleted. Ignore this event.
@@ -912,6 +933,8 @@ void QEventDispatcherSymbian::timerFired(int timerId)
m_insideTimerEvent = true;
QTimerEvent event(timerInfo->timerId);
+ //undo the added nesting level around RunIfReady, since Qt's event system also nests
+ Decrementer dec(d->threadData->loopLevel);
QCoreApplication::sendEvent(timerInfo->receiver, &event);
m_insideTimerEvent = oldInsideTimerEventValue;
@@ -922,6 +945,7 @@ void QEventDispatcherSymbian::timerFired(int timerId)
void QEventDispatcherSymbian::socketFired(QSocketActiveObject *socketAO)
{
+ Q_D(QAbstractEventDispatcher);
if (m_noSocketEvents) {
m_deferredSocketEvents.append(socketAO);
return;
@@ -929,6 +953,8 @@ void QEventDispatcherSymbian::socketFired(QSocketActiveObject *socketAO)
QEvent e(QEvent::SockAct);
socketAO->m_inSocketEvent = true;
+ //undo the added nesting level around RunIfReady, since Qt's event system also nests
+ Decrementer dec(d->threadData->loopLevel);
QCoreApplication::sendEvent(socketAO->m_notifier, &e);
socketAO->m_inSocketEvent = false;
@@ -943,6 +969,7 @@ void QEventDispatcherSymbian::socketFired(QSocketActiveObject *socketAO)
void QEventDispatcherSymbian::wakeUpWasCalled()
{
+ Q_D(QAbstractEventDispatcher);
// The reactivation should happen in RunL, right before the call to this function.
// This is because m_wakeUpDone is the "signal" that the object can be completed
// once more.
@@ -952,6 +979,8 @@ void QEventDispatcherSymbian::wakeUpWasCalled()
// the sendPostedEvents was done, but before the object was ready to be completed
// again. This could deadlock the application if there are no other posted events.
m_wakeUpDone.fetchAndStoreOrdered(0);
+ //undo the added nesting level around RunIfReady, since Qt's event system also nests
+ Decrementer dec(d->threadData->loopLevel);
sendPostedEvents();
}
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp
index 367284615c..8c08760599 100644
--- a/src/corelib/kernel/qtranslator.cpp
+++ b/src/corelib/kernel/qtranslator.cpp
@@ -50,6 +50,7 @@
#include "qcoreapplication.h"
#include "qcoreapplication_p.h"
#include "qdatastream.h"
+#include "qdir.h"
#include "qfile.h"
#include "qmap.h"
#include "qalgorithms.h"
@@ -61,6 +62,10 @@
#include "private/qcore_unix_p.h"
#endif
+#ifdef Q_OS_SYMBIAN
+#include "private/qcore_symbian_p.h"
+#endif
+
// most of the headers below are already included in qplatformdefs.h
// also this lacks Large File support but that's probably irrelevant
#if defined(QT_USE_MMAP)
@@ -402,11 +407,24 @@ bool QTranslator::load(const QString & filename, const QString & directory,
QString prefix;
if (QFileInfo(filename).isRelative()) {
+#ifdef Q_OS_SYMBIAN
+ if (directory.isEmpty())
+ prefix = QCoreApplication::applicationDirPath();
+ else
+ prefix = QFileInfo(directory).absoluteFilePath(); //TFindFile doesn't like dirty paths
+ if (prefix.length() > 2 && prefix.at(1) == QLatin1Char(':') && prefix.at(0).isLetter())
+ prefix[0] = QLatin1Char('Y');
+#else
prefix = directory;
- if (prefix.length() && !prefix.endsWith(QLatin1Char('/')))
- prefix += QLatin1Char('/');
+#endif
+ if (prefix.length() && !prefix.endsWith(QLatin1Char('/')))
+ prefix += QLatin1Char('/');
}
+#ifdef Q_OS_SYMBIAN
+ QString nativePrefix = QDir::toNativeSeparators(prefix);
+#endif
+
QString fname = filename;
QString realname;
QString delims;
@@ -415,6 +433,24 @@ bool QTranslator::load(const QString & filename, const QString & directory,
for (;;) {
QFileInfo fi;
+#ifdef Q_OS_SYMBIAN
+ //search for translations on other drives, e.g. Qt may be in Z, while app is in C
+ //note this uses symbian search rules, i.e. y:->a:, followed by z:
+ TFindFile finder(qt_s60GetRFs());
+ QString fname2 = fname + (suffix.isNull() ? QString::fromLatin1(".qm") : suffix);
+ TInt err = finder.FindByDir(
+ qt_QString2TPtrC(fname2),
+ qt_QString2TPtrC(nativePrefix));
+ if (err != KErrNone)
+ err = finder.FindByDir(qt_QString2TPtrC(fname), qt_QString2TPtrC(nativePrefix));
+ if (err == KErrNone) {
+ fi.setFile(qt_TDesC2QString(finder.File()));
+ realname = fi.canonicalFilePath();
+ if (fi.isReadable() && fi.isFile())
+ break;
+ }
+#endif
+
realname = prefix + fname + (suffix.isNull() ? QString::fromLatin1(".qm") : suffix);
fi.setFile(realname);
if (fi.isReadable() && fi.isFile())
diff --git a/src/corelib/tools/qlocale_symbian.cpp b/src/corelib/tools/qlocale_symbian.cpp
index 2742c45a03..367017bdf9 100644
--- a/src/corelib/tools/qlocale_symbian.cpp
+++ b/src/corelib/tools/qlocale_symbian.cpp
@@ -135,6 +135,7 @@ static const symbianToISO symbian_to_iso_list[] = {
{ ELangHebrew, "he_IL" }, // 57
{ ELangHindi, "hi_IN" }, // 58
{ ELangIndonesian, "id_ID" }, // 59
+ { ELangKazakh, "kk_KZ" }, // 63
{ ELangKorean, "ko_KO" }, // 65
{ ELangLatvian, "lv_LV" }, // 67
{ ELangLithuanian, "lt_LT" }, // 68
@@ -159,6 +160,7 @@ static const symbianToISO symbian_to_iso_list[] = {
{ ELangEnglish_Prc, "en_CN" }, // 159 ### Not supported by CLDR
{ ELangEnglish_Japan, "en_JP"}, // 160 ### Not supported by CLDR
{ ELangEnglish_Thailand, "en_TH" }, // 161 ### Not supported by CLDR
+ { 230/*ELangEnglish_India*/,"en_IN" }, // 230 - appeared in Symbian^3
{ ELangMalay_Apac, "ms" }, // 326
#endif
{ 327/*ELangIndonesian_Apac*/,"id_ID" } // 327 - appeared in Symbian^3
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 20410ab2e3..29c714dc56 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -1064,6 +1064,8 @@ void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m
highlightEnd = highlightRangeEnd;
}
+ bool strictHighlightRange = haveHighlightRange && highlightRange == QDeclarativeGridView::StrictlyEnforceRange;
+
if (snapMode != QDeclarativeGridView::NoSnap) {
qreal tempPosition = isRightToLeftTopToBottom() ? -position()-size() : position();
if (snapMode == QDeclarativeGridView::SnapOneRow && moveReason == Mouse) {
@@ -1079,25 +1081,29 @@ void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m
tempPosition -= bias;
}
FxGridItem *topItem = snapItemAt(tempPosition+highlightStart);
+ if (!topItem && strictHighlightRange && currentItem) {
+ // StrictlyEnforceRange always keeps an item in range
+ updateHighlight();
+ topItem = currentItem;
+ }
FxGridItem *bottomItem = snapItemAt(tempPosition+highlightEnd);
+ if (!bottomItem && strictHighlightRange && currentItem) {
+ // StrictlyEnforceRange always keeps an item in range
+ updateHighlight();
+ bottomItem = currentItem;
+ }
qreal pos;
- if (topItem && bottomItem && haveHighlightRange && highlightRange == QDeclarativeGridView::StrictlyEnforceRange) {
- qreal topPos = qMin(topItem->rowPos() - highlightStart, -maxExtent);
- qreal bottomPos = qMax(bottomItem->rowPos() - highlightEnd, -minExtent);
- pos = qAbs(data.move + topPos) < qAbs(data.move + bottomPos) ? topPos : bottomPos;
- } else if (topItem) {
- qreal headerPos = 0;
- if (header)
- headerPos = isRightToLeftTopToBottom() ? header->rowPos() + cellWidth - headerSize() : header->rowPos();
- if (topItem->index == 0 && header && tempPosition+highlightStart < headerPos+headerSize()/2) {
- pos = isRightToLeftTopToBottom() ? - headerPos + highlightStart - size() : headerPos - highlightStart;
+ bool isInBounds = -position() > maxExtent && -position() <= minExtent;
+ if (topItem && (isInBounds || strictHighlightRange)) {
+ if (topItem->index == 0 && header && tempPosition+highlightStart < header->rowPos()+headerSize()/2 && !strictHighlightRange) {
+ pos = isRightToLeftTopToBottom() ? - header->rowPos() + highlightStart - size() : header->rowPos() - highlightStart;
} else {
if (isRightToLeftTopToBottom())
pos = qMax(qMin(-topItem->rowPos() + highlightStart - size(), -maxExtent), -minExtent);
else
pos = qMax(qMin(topItem->rowPos() - highlightStart, -maxExtent), -minExtent);
}
- } else if (bottomItem) {
+ } else if (bottomItem && isInBounds) {
if (isRightToLeftTopToBottom())
pos = qMax(qMin(-bottomItem->rowPos() + highlightEnd - size(), -maxExtent), -minExtent);
else
@@ -2243,9 +2249,10 @@ qreal QDeclarativeGridView::minXExtent() const
qreal extent = -d->startPosition();
qreal highlightStart;
qreal highlightEnd;
- qreal endPositionFirstItem;
+ qreal endPositionFirstItem = 0;
if (d->isRightToLeftTopToBottom()) {
- endPositionFirstItem = d->rowPosAt(d->model->count()-1);
+ if (d->model && d->model->count())
+ endPositionFirstItem = d->rowPosAt(d->model->count()-1);
highlightStart = d->highlightRangeStartValid
? d->highlightRangeStart - (d->lastPosition()-endPositionFirstItem)
: d->size() - (d->lastPosition()-endPositionFirstItem);
@@ -2260,7 +2267,7 @@ qreal QDeclarativeGridView::minXExtent() const
extent += d->header->item->width();
}
if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) {
- extent += highlightStart;
+ extent += d->isRightToLeftTopToBottom() ? -highlightStart : highlightStart;
extent = qMax(extent, -(endPositionFirstItem - highlightEnd));
}
return extent;
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index e75189c839..920b6ae5f9 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -1293,6 +1293,7 @@ void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m
correctFlick = false;
fixupMode = moveReason == Mouse ? fixupMode : Immediate;
+ bool strictHighlightRange = haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange;
qreal highlightStart;
qreal highlightEnd;
@@ -1323,11 +1324,21 @@ void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m
tempPosition -= bias;
}
FxListItem *topItem = snapItemAt(tempPosition+highlightStart);
+ if (!topItem && strictHighlightRange && currentItem) {
+ // StrictlyEnforceRange always keeps an item in range
+ updateHighlight();
+ topItem = currentItem;
+ }
FxListItem *bottomItem = snapItemAt(tempPosition+highlightEnd);
+ if (!bottomItem && strictHighlightRange && currentItem) {
+ // StrictlyEnforceRange always keeps an item in range
+ updateHighlight();
+ bottomItem = currentItem;
+ }
qreal pos;
- bool isInBounds = -position() > maxExtent && -position() < minExtent;
- if (topItem && isInBounds) {
- if (topItem->index == 0 && header && tempPosition+highlightStart < header->position()+header->size()/2) {
+ bool isInBounds = -position() > maxExtent && -position() <= minExtent;
+ if (topItem && (isInBounds || strictHighlightRange)) {
+ if (topItem->index == 0 && header && tempPosition+highlightStart < header->position()+header->size()/2 && !strictHighlightRange) {
pos = isRightToLeft() ? - header->position() + highlightStart - size() : header->position() - highlightStart;
} else {
if (isRightToLeft())
@@ -1356,7 +1367,7 @@ void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m
}
vTime = timeline.time();
}
- } else if (currentItem && haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange
+ } else if (currentItem && strictHighlightRange
&& moveReason != QDeclarativeListViewPrivate::SetIndex) {
updateHighlight();
qreal pos = currentItem->itemPosition();
@@ -2751,7 +2762,7 @@ qreal QDeclarativeListView::minXExtent() const
d->minExtent += d->header->size();
}
if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) {
- d->minExtent += highlightStart;
+ d->minExtent += d->isRightToLeft() ? -highlightStart : highlightStart;
d->minExtent = qMax(d->minExtent, -(endPositionFirstItem - highlightEnd + 1));
}
d->minExtentDirty = false;
diff --git a/src/declarative/qml/qdeclarativedirparser.cpp b/src/declarative/qml/qdeclarativedirparser.cpp
index 0a7a749c43..fcc74dac0a 100644
--- a/src/declarative/qml/qdeclarativedirparser.cpp
+++ b/src/declarative/qml/qdeclarativedirparser.cpp
@@ -41,8 +41,10 @@
#include "private/qdeclarativedirparser_p.h"
#include "qdeclarativeerror.h"
+#include <private/qdeclarativeglobal_p.h>
#include <QtCore/QTextStream>
+#include <QtCore/QFile>
#include <QtCore/QtDebug>
QT_BEGIN_NAMESPACE
@@ -66,6 +68,16 @@ void QDeclarativeDirParser::setUrl(const QUrl &url)
_url = url;
}
+QString QDeclarativeDirParser::fileSource() const
+{
+ return _filePathSouce;
+}
+
+void QDeclarativeDirParser::setFileSource(const QString &filePath)
+{
+ _filePathSouce = filePath;
+}
+
QString QDeclarativeDirParser::source() const
{
return _source;
@@ -92,6 +104,23 @@ bool QDeclarativeDirParser::parse()
_plugins.clear();
_components.clear();
+ if (_source.isEmpty() && !_filePathSouce.isEmpty()) {
+ QFile file(_filePathSouce);
+ if (!QDeclarative_isFileCaseCorrect(_filePathSouce)) {
+ QDeclarativeError error;
+ error.setDescription(QString::fromUtf8("cannot load module \"$$URI$$\": File name case mismatch for \"%1\"").arg(_filePathSouce));
+ _errors.prepend(error);
+ return false;
+ } else if (file.open(QFile::ReadOnly)) {
+ _source = QString::fromUtf8(file.readAll());
+ } else {
+ QDeclarativeError error;
+ error.setDescription(QString::fromUtf8("module \"$$URI$$\" definition \"%1\" not readable").arg(_filePathSouce));
+ _errors.prepend(error);
+ return false;
+ }
+ }
+
QTextStream stream(&_source);
int lineNumber = 0;
@@ -214,9 +243,16 @@ bool QDeclarativeDirParser::hasError() const
return false;
}
-QList<QDeclarativeError> QDeclarativeDirParser::errors() const
+QList<QDeclarativeError> QDeclarativeDirParser::errors(const QString &uri) const
{
- return _errors;
+ QList<QDeclarativeError> errors = _errors;
+ for (int i = 0; i < errors.size(); ++i) {
+ QDeclarativeError &e = errors[i];
+ QString description = e.description();
+ description.replace(QLatin1String("$$URI$$"), uri);
+ e.setDescription(description);
+ }
+ return errors;
}
QList<QDeclarativeDirParser::Plugin> QDeclarativeDirParser::plugins() const
diff --git a/src/declarative/qml/qdeclarativedirparser_p.h b/src/declarative/qml/qdeclarativedirparser_p.h
index 7db7d8cd46..bc84a42274 100644
--- a/src/declarative/qml/qdeclarativedirparser_p.h
+++ b/src/declarative/qml/qdeclarativedirparser_p.h
@@ -73,11 +73,14 @@ public:
QString source() const;
void setSource(const QString &source);
+ QString fileSource() const;
+ void setFileSource(const QString &filePath);
+
bool isParsed() const;
bool parse();
bool hasError() const;
- QList<QDeclarativeError> errors() const;
+ QList<QDeclarativeError> errors(const QString &uri) const;
struct Plugin
{
@@ -116,6 +119,7 @@ private:
QList<QDeclarativeError> _errors;
QUrl _url;
QString _source;
+ QString _filePathSouce;
QList<Component> _components;
QList<Plugin> _plugins;
unsigned _isParsed: 1;
diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp
index 6e0b348aa8..e2cb06273c 100644
--- a/src/declarative/qml/qdeclarativeimport.cpp
+++ b/src/declarative/qml/qdeclarativeimport.cpp
@@ -46,6 +46,7 @@
#include <QtCore/qfileinfo.h>
#include <QtCore/qpluginloader.h>
#include <QtCore/qlibraryinfo.h>
+#include <QtCore/qalgorithms.h>
#include <QtDeclarative/qdeclarativeextensioninterface.h>
#include <private/qdeclarativeglobal_p.h>
#include <private/qdeclarativetypenamecache_p.h>
@@ -79,16 +80,16 @@ public:
QList<QDeclarativeDirComponents> qmlDirComponents;
- bool find_helper(int i, const QByteArray& type, int *vmajor, int *vminor,
+ bool find_helper(QDeclarativeTypeLoader *typeLoader, int i, const QByteArray& type, int *vmajor, int *vminor,
QDeclarativeType** type_return, QUrl* url_return,
QUrl *base = 0, bool *typeRecursionDetected = 0);
- bool find(const QByteArray& type, int *vmajor, int *vminor, QDeclarativeType** type_return,
+ bool find(QDeclarativeTypeLoader *typeLoader, const QByteArray& type, int *vmajor, int *vminor, QDeclarativeType** type_return,
QUrl* url_return, QUrl *base = 0, QString *errorString = 0);
};
class QDeclarativeImportsPrivate {
public:
- QDeclarativeImportsPrivate();
+ QDeclarativeImportsPrivate(QDeclarativeTypeLoader *loader);
~QDeclarativeImportsPrivate();
bool importExtension(const QString &absoluteFilePath, const QString &uri,
@@ -111,6 +112,7 @@ public:
QSet<QString> qmlDirFilesForWhichPluginsHaveBeenLoaded;
QDeclarativeImportedNamespace unqualifiedset;
QHash<QString,QDeclarativeImportedNamespace* > set;
+ QDeclarativeTypeLoader *typeLoader;
};
/*!
@@ -134,9 +136,12 @@ QDeclarativeImports::operator =(const QDeclarativeImports &copy)
return *this;
}
-QDeclarativeImports::QDeclarativeImports()
-: d(new QDeclarativeImportsPrivate)
-{
+QDeclarativeImports::QDeclarativeImports()
+ : d(new QDeclarativeImportsPrivate(0)){
+}
+
+QDeclarativeImports::QDeclarativeImports(QDeclarativeTypeLoader *typeLoader)
+ : d(new QDeclarativeImportsPrivate(typeLoader)){
}
QDeclarativeImports::~QDeclarativeImports()
@@ -268,10 +273,11 @@ bool QDeclarativeImports::resolveType(QDeclarativeImportedNamespace* ns, const Q
QDeclarativeType** type_return, QUrl* url_return,
int *vmaj, int *vmin) const
{
- return ns->find(type,vmaj,vmin,type_return,url_return);
+ Q_ASSERT(d->typeLoader);
+ return ns->find(d->typeLoader,type,vmaj,vmin,type_return,url_return);
}
-bool QDeclarativeImportedNamespace::find_helper(int i, const QByteArray& type, int *vmajor, int *vminor,
+bool QDeclarativeImportedNamespace::find_helper(QDeclarativeTypeLoader *typeLoader, int i, const QByteArray& type, int *vmajor, int *vminor,
QDeclarativeType** type_return, QUrl* url_return,
QUrl *base, bool *typeRecursionDetected)
{
@@ -291,7 +297,6 @@ bool QDeclarativeImportedNamespace::find_helper(int i, const QByteArray& type, i
return true;
}
- QUrl url = QUrl(urls.at(i) + QLatin1Char('/') + QString::fromUtf8(type) + QLatin1String(".qml"));
QDeclarativeDirComponents qmldircomponents = qmlDirComponents.at(i);
bool typeWasDeclaredInQmldir = false;
@@ -303,6 +308,7 @@ bool QDeclarativeImportedNamespace::find_helper(int i, const QByteArray& type, i
// importing version -1 means import ALL versions
if ((vmaj == -1) || (c.majorVersion < vmaj || (c.majorVersion == vmaj && vmin >= c.minorVersion))) {
+ QUrl url = QUrl(urls.at(i) + QLatin1Char('/') + QString::fromUtf8(type) + QLatin1String(".qml"));
QUrl candidate = url.resolved(QUrl(c.fileName));
if (c.internal && base) {
if (base->resolved(QUrl(c.fileName)) != candidate)
@@ -323,8 +329,9 @@ bool QDeclarativeImportedNamespace::find_helper(int i, const QByteArray& type, i
if (!typeWasDeclaredInQmldir && !isLibrary.at(i)) {
// XXX search non-files too! (eg. zip files, see QT-524)
- QFileInfo f(QDeclarativeEnginePrivate::urlToLocalFileOrQrc(url));
- if (f.exists()) {
+ QUrl url = QUrl(urls.at(i) + QLatin1Char('/') + QString::fromUtf8(type) + QLatin1String(".qml"));
+ QString file = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(url);
+ if (!typeLoader->absoluteFilePath(file).isEmpty()) {
if (base && *base == url) { // no recursion
if (typeRecursionDetected)
*typeRecursionDetected = true;
@@ -338,9 +345,8 @@ bool QDeclarativeImportedNamespace::find_helper(int i, const QByteArray& type, i
return false;
}
-QDeclarativeImportsPrivate::QDeclarativeImportsPrivate()
-: ref(1)
-{
+QDeclarativeImportsPrivate::QDeclarativeImportsPrivate(QDeclarativeTypeLoader *loader)
+ : ref(1), typeLoader(loader){
}
QDeclarativeImportsPrivate::~QDeclarativeImportsPrivate()
@@ -353,33 +359,22 @@ bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath
QDeclarativeImportDatabase *database,
QDeclarativeDirComponents* components, QString *errorString)
{
- QFile file(absoluteFilePath);
- QString filecontent;
- if (!QDeclarative_isFileCaseCorrect(absoluteFilePath)) {
- if (errorString)
- *errorString = QDeclarativeImportDatabase::tr("cannot load module \"%1\": File name case mismatch for \"%2\"").arg(uri).arg(absoluteFilePath);
- return false;
- } else if (file.open(QFile::ReadOnly)) {
- filecontent = QString::fromUtf8(file.readAll());
- if (qmlImportTrace())
- qDebug().nospace() << "QDeclarativeImports(" << qPrintable(base.toString()) << "::importExtension: "
- << "loaded " << absoluteFilePath;
- } else {
- if (errorString)
- *errorString = QDeclarativeImportDatabase::tr("module \"%1\" definition \"%2\" not readable").arg(uri).arg(absoluteFilePath);
+ Q_ASSERT(typeLoader);
+ const QDeclarativeDirParser *qmldirParser = typeLoader->qmlDirParser(absoluteFilePath);
+ if (qmldirParser->hasError()) {
+ if (errorString) {
+ const QList<QDeclarativeError> qmldirErrors = qmldirParser->errors(uri);
+ for (int i = 0; i < qmldirErrors.size(); ++i)
+ *errorString += qmldirErrors.at(i).description();
+ }
return false;
}
- QDir dir = QFileInfo(file).dir();
-
- QDeclarativeDirParser qmldirParser;
- qmldirParser.setSource(filecontent);
- qmldirParser.parse();
if (! qmlDirFilesForWhichPluginsHaveBeenLoaded.contains(absoluteFilePath)) {
qmlDirFilesForWhichPluginsHaveBeenLoaded.insert(absoluteFilePath);
-
- foreach (const QDeclarativeDirParser::Plugin &plugin, qmldirParser.plugins()) {
+ QDir dir = QFileInfo(absoluteFilePath).dir();
+ foreach (const QDeclarativeDirParser::Plugin &plugin, qmldirParser->plugins()) {
QString resolvedFilePath = database->resolvePlugin(dir, plugin.path, plugin.name);
#if defined(QT_LIBINFIX) && defined(Q_OS_SYMBIAN)
@@ -404,7 +399,7 @@ bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath
}
if (components)
- *components = qmldirParser.components();
+ *components = qmldirParser->components();
return true;
}
@@ -445,6 +440,7 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
QDeclarativeScriptParser::Import::Type importType,
QDeclarativeImportDatabase *database, QString *errorString)
{
+ Q_ASSERT(typeLoader);
QDeclarativeDirComponents qmldircomponents = qmldircomponentsnetwork;
QString uri = uri_arg;
QDeclarativeImportedNamespace *s;
@@ -462,20 +458,20 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
url.replace(QLatin1Char('.'), QLatin1Char('/'));
bool found = false;
QString dir;
-
+ QString qmldir;
// step 1: search for extension with fully encoded version number
if (vmaj >= 0 && vmin >= 0) {
foreach (const QString &p, database->fileImportPath) {
dir = p+QLatin1Char('/')+url;
+ qmldir = dir+QString(QLatin1String(".%1.%2")).arg(vmaj).arg(vmin)+QLatin1String("/qmldir");
- QFileInfo fi(dir+QString(QLatin1String(".%1.%2")).arg(vmaj).arg(vmin)+QLatin1String("/qmldir"));
- const QString absoluteFilePath = fi.absoluteFilePath();
-
- if (fi.isFile()) {
+ QString absoluteFilePath = typeLoader->absoluteFilePath(qmldir);
+ if (!absoluteFilePath.isEmpty()) {
found = true;
- url = QUrl::fromLocalFile(fi.absolutePath()).toString();
+ QString absolutePath = absoluteFilePath.left(absoluteFilePath.lastIndexOf(QLatin1Char('/')));
+ url = QUrl::fromLocalFile(absolutePath).toString();
uri = resolvedUri(dir, database);
if (!importExtension(absoluteFilePath, uri, database, &qmldircomponents, errorString))
return false;
@@ -487,14 +483,14 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
if (vmaj >= 0 && vmin >= 0) {
foreach (const QString &p, database->fileImportPath) {
dir = p+QLatin1Char('/')+url;
+ qmldir = dir+QString(QLatin1String(".%1")).arg(vmaj)+QLatin1String("/qmldir");
- QFileInfo fi(dir+QString(QLatin1String(".%1")).arg(vmaj)+QLatin1String("/qmldir"));
- const QString absoluteFilePath = fi.absoluteFilePath();
-
- if (fi.isFile()) {
+ QString absoluteFilePath = typeLoader->absoluteFilePath(qmldir);
+ if (!absoluteFilePath.isEmpty()) {
found = true;
- url = QUrl::fromLocalFile(fi.absolutePath()).toString();
+ QString absolutePath = absoluteFilePath.left(absoluteFilePath.lastIndexOf(QLatin1Char('/')));
+ url = QUrl::fromLocalFile(absolutePath).toString();
uri = resolvedUri(dir, database);
if (!importExtension(absoluteFilePath, uri, database, &qmldircomponents, errorString))
return false;
@@ -507,14 +503,14 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
foreach (const QString &p, database->fileImportPath) {
dir = p+QLatin1Char('/')+url;
+ qmldir = dir+QLatin1String("/qmldir");
- QFileInfo fi(dir+QLatin1String("/qmldir"));
- const QString absoluteFilePath = fi.absoluteFilePath();
-
- if (fi.isFile()) {
+ QString absoluteFilePath = typeLoader->absoluteFilePath(qmldir);
+ if (!absoluteFilePath.isEmpty()) {
found = true;
- url = QUrl::fromLocalFile(fi.absolutePath()).toString();
+ QString absolutePath = absoluteFilePath.left(absoluteFilePath.lastIndexOf(QLatin1Char('/')));
+ url = QUrl::fromLocalFile(absolutePath).toString();
uri = resolvedUri(dir, database);
if (!importExtension(absoluteFilePath, uri, database, &qmldircomponents, errorString))
return false;
@@ -552,7 +548,7 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
uri = resolvedUri(QDeclarativeEnginePrivate::urlToLocalFileOrQrc(base.resolved(QUrl(uri))), database);
if (uri.endsWith(QLatin1Char('/')))
uri.chop(1);
- if (QFile::exists(localFileOrQrc)) {
+ if (!typeLoader->absoluteFilePath(localFileOrQrc).isEmpty()) {
if (!importExtension(localFileOrQrc,uri,database,&qmldircomponents,errorString))
return false;
}
@@ -615,6 +611,7 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
bool QDeclarativeImportsPrivate::find(const QByteArray& type, int *vmajor, int *vminor, QDeclarativeType** type_return,
QUrl* url_return, QString *errorString)
{
+ Q_ASSERT(typeLoader);
QDeclarativeImportedNamespace *s = 0;
int slash = type.indexOf('/');
if (slash >= 0) {
@@ -636,7 +633,7 @@ bool QDeclarativeImportsPrivate::find(const QByteArray& type, int *vmajor, int *
}
QByteArray unqualifiedtype = slash < 0 ? type : type.mid(slash+1); // common-case opt (QString::mid works fine, but slower)
if (s) {
- if (s->find(unqualifiedtype,vmajor,vminor,type_return,url_return, &base, errorString))
+ if (s->find(typeLoader, unqualifiedtype,vmajor,vminor,type_return,url_return, &base, errorString))
return true;
if (s->urls.count() == 1 && !s->isLibrary[0] && url_return && s != &unqualifiedset) {
// qualified, and only 1 url
@@ -653,16 +650,16 @@ QDeclarativeImportedNamespace *QDeclarativeImportsPrivate::findNamespace(const Q
return set.value(type);
}
-bool QDeclarativeImportedNamespace::find(const QByteArray& type, int *vmajor, int *vminor, QDeclarativeType** type_return,
+bool QDeclarativeImportedNamespace::find(QDeclarativeTypeLoader *typeLoader, const QByteArray& type, int *vmajor, int *vminor, QDeclarativeType** type_return,
QUrl* url_return, QUrl *base, QString *errorString)
{
bool typeRecursionDetected = false;
for (int i=0; i<urls.count(); ++i) {
- if (find_helper(i, type, vmajor, vminor, type_return, url_return, base, &typeRecursionDetected)) {
+ if (find_helper(typeLoader, i, type, vmajor, vminor, type_return, url_return, base, &typeRecursionDetected)) {
if (qmlCheckTypes()) {
// check for type clashes
for (int j = i+1; j<urls.count(); ++j) {
- if (find_helper(j, type, vmajor, vminor, 0, 0, base)) {
+ if (find_helper(typeLoader, j, type, vmajor, vminor, 0, 0, base)) {
if (errorString) {
QString u1 = urls.at(i);
QString u2 = urls.at(j);
@@ -733,8 +730,12 @@ QDeclarativeImportDatabase::QDeclarativeImportDatabase(QDeclarativeEngine *e)
}
RFs& fs = qt_s60GetRFs();
TPtrC tempPathPtr(reinterpret_cast<const TText*> (tempPath.constData()));
+ // Symbian searches should start from Y:. Fix start drive otherwise TFindFile starts from the session drive
+ _LIT(KStartDir, "Y:");
+ TFileName dirPath(KStartDir);
+ dirPath.Append(tempPathPtr);
TFindFile finder(fs);
- TInt err = finder.FindByDir(tempPathPtr, tempPathPtr);
+ TInt err = finder.FindByDir(tempPathPtr, dirPath);
while (err == KErrNone) {
QString foundDir(reinterpret_cast<const QChar *>(finder.File().Ptr()),
finder.File().Length());
@@ -742,6 +743,9 @@ QDeclarativeImportDatabase::QDeclarativeImportDatabase(QDeclarativeEngine *e)
addImportPath(foundDir);
err = finder.Find();
}
+ // TFindFile found the directories in the order we want, but addImportPath reverses it.
+ // Reverse the order again to get it right.
+ QAlgorithmsPrivate::qReverse(fileImportPath.begin(), fileImportPath.end());
} else {
addImportPath(installImportsPath);
}
@@ -1029,7 +1033,7 @@ bool QDeclarativeImportDatabase::importPlugin(const QString &filePath, const QSt
if (!engineInitialized || !typesRegistered) {
if (!QDeclarative_isFileCaseCorrect(absoluteFilePath)) {
if (errorString)
- *errorString = tr("File name case mismatch for \"%2\"").arg(absoluteFilePath);
+ *errorString = tr("File name case mismatch for \"%1\"").arg(absoluteFilePath);
return false;
}
QPluginLoader loader(absoluteFilePath);
diff --git a/src/declarative/qml/qdeclarativeimport_p.h b/src/declarative/qml/qdeclarativeimport_p.h
index 319e76ce98..d2ae9cc790 100644
--- a/src/declarative/qml/qdeclarativeimport_p.h
+++ b/src/declarative/qml/qdeclarativeimport_p.h
@@ -68,11 +68,13 @@ class QDir;
class QDeclarativeImportedNamespace;
class QDeclarativeImportsPrivate;
class QDeclarativeImportDatabase;
+class QDeclarativeTypeLoader;
class QDeclarativeImports
{
public:
QDeclarativeImports();
+ QDeclarativeImports(QDeclarativeTypeLoader *);
QDeclarativeImports(const QDeclarativeImports &);
~QDeclarativeImports();
QDeclarativeImports &operator=(const QDeclarativeImports &);
diff --git a/src/declarative/qml/qdeclarativepropertycache_p.h b/src/declarative/qml/qdeclarativepropertycache_p.h
index 581f5197f4..c648d25cb7 100644
--- a/src/declarative/qml/qdeclarativepropertycache_p.h
+++ b/src/declarative/qml/qdeclarativepropertycache_p.h
@@ -111,7 +111,7 @@ public:
int relatedIndex; // When IsFunction
};
uint overrideIndexIsProperty : 1;
- int overrideIndex : 31;
+ signed int overrideIndex : 31;
int revision;
int metaObjectOffset;
diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp
index 77587a4faa..5e2061727c 100644
--- a/src/declarative/qml/qdeclarativetypeloader.cpp
+++ b/src/declarative/qml/qdeclarativetypeloader.cpp
@@ -50,10 +50,37 @@
#include <QtDeclarative/qdeclarativecomponent.h>
#include <QtCore/qdebug.h>
#include <QtCore/qdir.h>
+#include <QtCore/qdiriterator.h>
#include <QtCore/qfile.h>
QT_BEGIN_NAMESPACE
+/*
+Returns the set of QML files in path (qmldir, *.qml, *.js). The caller
+is responsible for deleting the returned data.
+*/
+static QSet<QString> *qmlFilesInDirectory(const QString &path)
+{
+ QDirIterator dir(path, QDir::Files);
+ if (!dir.hasNext())
+ return 0;
+ QSet<QString> *files = new QSet<QString>;
+ while (dir.hasNext()) {
+ dir.next();
+ QString fileName = dir.fileName();
+ if (fileName == QLatin1String("qmldir")
+ || fileName.endsWith(QLatin1String(".qml"))
+ || fileName.endsWith(QLatin1String(".js"))) {
+#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) || defined(Q_OS_DARWIN) || defined(Q_OS_SYMBIAN)
+ fileName = fileName.toLower();
+#endif
+ files->insert(fileName);
+ }
+ }
+ return files;
+}
+
+
/*!
\class QDeclarativeDataBlob
\brief The QDeclarativeDataBlob encapsulates a data request that can be issued to a QDeclarativeDataLoader.
@@ -715,6 +742,67 @@ QDeclarativeQmldirData *QDeclarativeTypeLoader::getQmldir(const QUrl &url)
return qmldirData;
}
+/*!
+Returns the absolute filename of path via a directory cache for files named
+"qmldir", "*.qml", "*.js"
+Returns a empty string if the path does not exist.
+*/
+QString QDeclarativeTypeLoader::absoluteFilePath(const QString &path)
+{
+ if (path.isEmpty())
+ return QString();
+ if (path.at(0) == QLatin1Char(':')) {
+ // qrc resource
+ QFileInfo fileInfo(path);
+ return fileInfo.isFile() ? fileInfo.absoluteFilePath() : QString();
+ }
+#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) || defined(Q_OS_DARWIN) || defined(Q_OS_SYMBIAN)
+ QString lowPath(path.toLower());
+#else
+ QString lowPath(path);
+#endif
+ int lastSlash = lowPath.lastIndexOf(QLatin1Char('/'));
+ QString dirPath = lowPath.left(lastSlash);
+
+ StringSet *fileSet = 0;
+ QHash<QString,StringSet*>::const_iterator it = m_importDirCache.find(dirPath);
+ if (it == m_importDirCache.end()) {
+ StringSet *files = qmlFilesInDirectory(path.left(lastSlash));
+ m_importDirCache.insert(dirPath, files);
+ fileSet = files;
+ } else {
+ fileSet = *it;
+ }
+ if (!fileSet)
+ return QString();
+
+ QString absoluteFilePath = fileSet->contains(QString(lowPath.constData()+lastSlash+1, lowPath.length()-lastSlash-1)) ? path : QString();
+ if (absoluteFilePath.length() > 2 && absoluteFilePath.at(0) != QLatin1Char('/') && absoluteFilePath.at(1) != QLatin1Char(':'))
+ absoluteFilePath = QFileInfo(absoluteFilePath).absoluteFilePath();
+
+ return absoluteFilePath;
+}
+
+/*!
+Return a QDeclarativeDirParser for absoluteFilePath. The QDeclarativeDirParser may be cached.
+*/
+const QDeclarativeDirParser *QDeclarativeTypeLoader::qmlDirParser(const QString &absoluteFilePath)
+{
+ QDeclarativeDirParser *qmldirParser;
+ QHash<QString,QDeclarativeDirParser*>::const_iterator it = m_importQmlDirCache.find(absoluteFilePath);
+ if (it == m_importQmlDirCache.end()) {
+ qmldirParser = new QDeclarativeDirParser;
+ qmldirParser->setFileSource(absoluteFilePath);
+ qmldirParser->setUrl(QUrl::fromLocalFile(absoluteFilePath));
+ qmldirParser->parse();
+ m_importQmlDirCache.insert(absoluteFilePath, qmldirParser);
+ } else {
+ qmldirParser = *it;
+ }
+
+ return qmldirParser;
+}
+
void QDeclarativeTypeLoader::clearCache()
{
for (TypeCache::Iterator iter = m_typeCache.begin(); iter != m_typeCache.end(); ++iter)
@@ -723,16 +811,20 @@ void QDeclarativeTypeLoader::clearCache()
(*iter)->release();
for (QmldirCache::Iterator iter = m_qmldirCache.begin(); iter != m_qmldirCache.end(); ++iter)
(*iter)->release();
+ qDeleteAll(m_importDirCache);
+ qDeleteAll(m_importQmlDirCache);
m_typeCache.clear();
m_scriptCache.clear();
m_qmldirCache.clear();
+ m_importDirCache.clear();
+ m_importQmlDirCache.clear();
}
QDeclarativeTypeData::QDeclarativeTypeData(const QUrl &url, QDeclarativeTypeLoader::Options options,
QDeclarativeTypeLoader *manager)
-: QDeclarativeDataBlob(url, QmlFile), m_options(options), m_typesResolved(false),
+: QDeclarativeDataBlob(url, QmlFile), m_options(options), m_imports(manager), m_typesResolved(false),
m_compiledData(0), m_typeLoader(manager)
{
}
diff --git a/src/declarative/qml/qdeclarativetypeloader_p.h b/src/declarative/qml/qdeclarativetypeloader_p.h
index 56b663689e..c0dce3e909 100644
--- a/src/declarative/qml/qdeclarativetypeloader_p.h
+++ b/src/declarative/qml/qdeclarativetypeloader_p.h
@@ -198,14 +198,23 @@ public:
QDeclarativeScriptData *getScript(const QUrl &);
QDeclarativeQmldirData *getQmldir(const QUrl &);
+
+ QString absoluteFilePath(const QString &path);
+ const QDeclarativeDirParser *qmlDirParser(const QString &absoluteFilePath);
+
private:
typedef QHash<QUrl, QDeclarativeTypeData *> TypeCache;
typedef QHash<QUrl, QDeclarativeScriptData *> ScriptCache;
typedef QHash<QUrl, QDeclarativeQmldirData *> QmldirCache;
+ typedef QSet<QString> StringSet;
+ typedef QHash<QString, StringSet*> ImportDirCache;
+ typedef QHash<QString, QDeclarativeDirParser*> ImportQmlDirCache;
TypeCache m_typeCache;
ScriptCache m_scriptCache;
QmldirCache m_qmldirCache;
+ ImportDirCache m_importDirCache;
+ ImportQmlDirCache m_importQmlDirCache;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeTypeLoader::Options)
diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp
index 5cdf785ccd..f86274f91d 100644
--- a/src/declarative/util/qdeclarativepropertychanges.cpp
+++ b/src/declarative/util/qdeclarativepropertychanges.cpp
@@ -171,7 +171,8 @@ public:
reverseExpression = rewindExpression;
}
- /*virtual void copyOriginals(QDeclarativeActionEvent *other)
+ virtual bool needsCopy() { return true; }
+ virtual void copyOriginals(QDeclarativeActionEvent *other)
{
QDeclarativeReplaceSignalHandler *rsh = static_cast<QDeclarativeReplaceSignalHandler*>(other);
saveCurrentValues();
@@ -182,7 +183,7 @@ public:
ownedExpression = rsh->ownedExpression;
rsh->ownedExpression = 0;
}
- }*/
+ }
virtual void rewind() {
ownedExpression = QDeclarativePropertyPrivate::setSignalExpression(property, rewindExpression);
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp
index 4db4a6aa1f..02adef8142 100644
--- a/src/gui/egl/qegl.cpp
+++ b/src/gui/egl/qegl.cpp
@@ -684,6 +684,37 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig cfg, const QEglPr
else
props = 0;
EGLSurface surf;
+#ifdef Q_OS_SYMBIAN
+ // On Symbian there might be situations (especially on 32MB GPU devices)
+ // where Qt is trying to create EGL surface while some other application
+ // is still holding all available GPU memory but is about to release it
+ // soon. For an example when exiting native video recorder and going back to
+ // Qt application behind it. Video stack tear down takes some time and Qt
+ // app might be too quick in reserving its EGL surface and thus running out
+ // of GPU memory right away. So if EGL surface creation fails due to bad
+ // alloc, let's try recreating it four times within ~1 second if needed.
+ // This strategy gives some time for video recorder to tear down its stack
+ // and a chance to Qt for creating a valid surface.
+ int tries = 4;
+ while(tries--) {
+ if (devType == QInternal::Widget)
+ surf = eglCreateWindowSurface(QEgl::display(), cfg, windowDrawable, props);
+ else
+ surf = eglCreatePixmapSurface(QEgl::display(), cfg, pixmapDrawable, props);
+ if (surf == EGL_NO_SURFACE) {
+ EGLint error = eglGetError();
+ if (error == EGL_BAD_ALLOC) {
+ if (tries) {
+ User::After(1000 * 250); // 250ms
+ continue;
+ }
+ }
+ qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", error);
+ } else {
+ break;
+ }
+ }
+#else
if (devType == QInternal::Widget)
surf = eglCreateWindowSurface(QEgl::display(), cfg, windowDrawable, props);
else
@@ -691,6 +722,7 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig cfg, const QEglPr
if (surf == EGL_NO_SURFACE) {
qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError());
}
+#endif
return surf;
}
#endif
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index 7f5cbe8e1b..c0cebf908b 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -217,6 +217,7 @@ void setup_qt(QImage& image, png_structp png_ptr, png_infop info_ptr, float scre
png_colorp palette = 0;
int num_palette;
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, 0, 0, 0);
+ png_set_interlace_handling(png_ptr);
if (color_type == PNG_COLOR_TYPE_GRAY) {
// Black & White or 8-bit grayscale
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 34ce9a8213..9d8b5909e0 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -3389,7 +3389,35 @@ QString QApplication::sessionKey() const
}
#endif
+/*!
+ \since 4.7.4
+ \fn void QApplication::aboutToReleaseGpuResources()
+
+ This signal is emitted when application is about to release all
+ GPU resources associated to contexts owned by application.
+
+ The signal is particularly useful if your application has allocated
+ GPU resources directly apart from Qt and needs to do some last-second
+ cleanup.
+
+ \warning This signal is only emitted on Symbian.
+
+ \sa aboutToUseGpuResources()
+*/
+/*!
+ \since 4.7.4
+ \fn void QApplication::aboutToUseGpuResources()
+
+ This signal is emitted when application is about to use GPU resources.
+
+ The signal is particularly useful if your application needs to know
+ when GPU resources are be available.
+
+ \warning This signal is only emitted on Symbian.
+
+ \sa aboutToFreeGpuResources()
+*/
/*!
\since 4.2
diff --git a/src/gui/kernel/qapplication.h b/src/gui/kernel/qapplication.h
index cbf0117f5b..32ff91bbb1 100644
--- a/src/gui/kernel/qapplication.h
+++ b/src/gui/kernel/qapplication.h
@@ -298,6 +298,10 @@ Q_SIGNALS:
void commitDataRequest(QSessionManager &sessionManager);
void saveStateRequest(QSessionManager &sessionManager);
#endif
+#ifdef Q_OS_SYMBIAN
+ void aboutToReleaseGpuResources();
+ void aboutToUseGpuResources();
+#endif
public:
QString styleSheet() const;
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index 99822e27d1..abdee49966 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -523,6 +523,9 @@ public:
int symbianResourceChange(const QSymbianEvent *symbianEvent);
void _q_aboutToQuit();
+
+ void emitAboutToReleaseGpuResources();
+ void emitAboutToUseGpuResources();
#endif
#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC)
void sendSyntheticEnterLeave(QWidget *widget);
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index a53d273ec4..5c657a43a4 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -207,6 +207,9 @@ void QS60Data::controlVisibilityChanged(CCoeControl *control, bool visible)
if (QTLWExtra *topData = qt_widget_private(window)->maybeTopData()) {
QWidgetBackingStoreTracker &backingStore = topData->backingStore;
if (visible) {
+ QApplicationPrivate *d = QApplicationPrivate::instance();
+ d->emitAboutToUseGpuResources();
+
if (backingStore.data()) {
backingStore.registerWidget(widget);
} else {
@@ -216,6 +219,9 @@ void QS60Data::controlVisibilityChanged(CCoeControl *control, bool visible)
widget->repaint();
}
} else {
+ QApplicationPrivate *d = QApplicationPrivate::instance();
+ d->emitAboutToReleaseGpuResources();
+
// In certain special scenarios we may get an ENotVisible event
// without a previous EPartiallyVisible. The backingstore must
// still be destroyed, hence the registerWidget() call below.
@@ -2704,6 +2710,24 @@ void QApplicationPrivate::_q_aboutToQuit()
#endif
}
+void QApplicationPrivate::emitAboutToReleaseGpuResources()
+{
+#ifdef Q_SYMBIAN_SUPPORTS_SURFACES
+ Q_Q(QApplication);
+ QPointer<QApplication> guard(q);
+ emit q->aboutToReleaseGpuResources();
+#endif
+}
+
+void QApplicationPrivate::emitAboutToUseGpuResources()
+{
+#ifdef Q_SYMBIAN_SUPPORTS_SURFACES
+ Q_Q(QApplication);
+ QPointer<QApplication> guard(q);
+ emit q->aboutToUseGpuResources();
+#endif
+}
+
QS60ThreadLocalData::QS60ThreadLocalData()
{
CCoeEnv *env = CCoeEnv::Static();
diff --git a/src/gui/kernel/qcursor_win.cpp b/src/gui/kernel/qcursor_win.cpp
index cef83f5a1b..a68472c584 100644
--- a/src/gui/kernel/qcursor_win.cpp
+++ b/src/gui/kernel/qcursor_win.cpp
@@ -477,7 +477,7 @@ void QCursorData::update()
QPixmap pixmap = QApplicationPrivate::instance()->getPixmapCursor(cshape);
hcurs = create32BitCursor(pixmap, hx, hy);
}
- break;
+ return;
default:
qWarning("QCursor::update: Invalid cursor shape %d", cshape);
return;
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 8e8266cd4a..bda088550c 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -2238,10 +2238,16 @@ void QWidgetPrivate::updateIsOpaque()
#endif
#ifdef Q_WS_S60
- if (q->windowType() == Qt::Dialog && q->testAttribute(Qt::WA_TranslucentBackground)
- && S60->avkonComponentsSupportTransparency) {
- setOpaque(false);
- return;
+ if (q->testAttribute(Qt::WA_TranslucentBackground)) {
+ if (q->windowType() & Qt::Dialog || q->windowType() & Qt::Popup) {
+ if (S60->avkonComponentsSupportTransparency) {
+ setOpaque(false);
+ return;
+ }
+ } else {
+ setOpaque(false);
+ return;
+ }
}
#endif
@@ -2261,11 +2267,16 @@ void QWidgetPrivate::updateIsOpaque()
}
if (q->isWindow() && !q->testAttribute(Qt::WA_NoSystemBackground)) {
+#ifdef Q_WS_S60
+ setOpaque(true);
+ return;
+#else
const QBrush &windowBrush = q->palette().brush(QPalette::Window);
if (windowBrush.style() != Qt::NoBrush && windowBrush.isOpaque()) {
setOpaque(true);
return;
}
+#endif
}
setOpaque(false);
}
@@ -10845,11 +10856,14 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
}
break;
case Qt::WA_TranslucentBackground:
+#if defined(Q_OS_SYMBIAN)
+ setAttribute(Qt::WA_NoSystemBackground, on);
+#else
if (on) {
setAttribute(Qt::WA_NoSystemBackground);
d->updateIsTranslucent();
}
-
+#endif
break;
case Qt::WA_AcceptTouchEvents:
#if defined(Q_WS_WIN) || defined(Q_WS_MAC) || defined(Q_OS_SYMBIAN)
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index e30497c59b..caa64549cd 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -228,6 +228,7 @@ struct QTLWExtra {
uint inExpose : 1; // Prevents drawing recursion
uint nativeWindowTransparencyEnabled : 1; // Tracks native window transparency
uint forcedToRaster : 1;
+ uint noSystemRotationDisabled : 1;
#endif
};
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index e80ecedc16..e12dfa73e5 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -820,19 +820,12 @@ void QWidgetPrivate::setConstraints_sys()
void QWidgetPrivate::s60UpdateIsOpaque()
{
Q_Q(QWidget);
-
if (!q->testAttribute(Qt::WA_WState_Created))
return;
-
const bool writeAlpha = extraData()->nativePaintMode == QWExtra::BlitWriteAlpha;
- if (!q->testAttribute(Qt::WA_TranslucentBackground) && !writeAlpha)
- return;
const bool requireAlphaChannel = !isOpaque || writeAlpha;
-
createTLExtra();
-
RWindow *const window = static_cast<RWindow *>(q->effectiveWinId()->DrawableWindow());
-
#ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
if (QApplicationPrivate::instance()->useTranslucentEGLSurfaces
&& !extra->topextra->forcedToRaster) {
@@ -841,25 +834,47 @@ void QWidgetPrivate::s60UpdateIsOpaque()
return;
}
#endif
+ const bool recreateBackingStore = extra->topextra->backingStore.data() && (
+ QApplicationPrivate::graphics_system_name == QLatin1String("openvg") ||
+ QApplicationPrivate::graphics_system_name == QLatin1String("opengl")
+ );
if (requireAlphaChannel) {
- const TDisplayMode displayMode = static_cast<TDisplayMode>(window->SetRequiredDisplayMode(EColor16MA));
- if (window->SetTransparencyAlphaChannel() == KErrNone) {
+ window->SetRequiredDisplayMode(EColor16MA);
+ if (window->SetTransparencyAlphaChannel() == KErrNone)
window->SetBackgroundColor(TRgb(255, 255, 255, 0));
- extra->topextra->nativeWindowTransparencyEnabled = 1;
- if (extra->topextra->backingStore.data() && (
- QApplicationPrivate::graphics_system_name == QLatin1String("openvg")
- || QApplicationPrivate::graphics_system_name == QLatin1String("opengl"))) {
- // Semi-transparent EGL surfaces aren't supported. We need to
- // recreate backing store to get translucent surface (raster surface).
- extra->topextra->backingStore.create(q);
- extra->topextra->backingStore.registerWidget(q);
- // FixNativeOrientation() will not work without an EGL surface.
+ } else {
+ if (recreateBackingStore) {
+ // Clear the UI surface to ensure that the EGL surface content is visible
+ CWsScreenDevice *screenDevice = S60->screenDevice(q);
+ QScopedPointer<CWindowGc> gc(new CWindowGc(screenDevice));
+ const int err = gc->Construct();
+ if (!err) {
+ gc->Activate(*window);
+ window->BeginRedraw();
+ gc->SetDrawMode(CWindowGc::EDrawModeWriteAlpha);
+ gc->SetBrushColor(TRgb(0, 0, 0, 0));
+ gc->Clear(TRect(0, 0, q->width(), q->height()));
+ window->EndRedraw();
+ }
+ }
+ if (extra->topextra->nativeWindowTransparencyEnabled)
+ window->SetTransparentRegion(TRegionFix<1>());
+ }
+ extra->topextra->nativeWindowTransparencyEnabled = requireAlphaChannel;
+ if (recreateBackingStore) {
+ extra->topextra->backingStore.create(q);
+ extra->topextra->backingStore.registerWidget(q);
+ bool noSystemRotationDisabled = false;
+ if (requireAlphaChannel) {
+ if (q->testAttribute(Qt::WA_SymbianNoSystemRotation)) {
+ // FixNativeOrientation() will not work without an EGL surface
q->setAttribute(Qt::WA_SymbianNoSystemRotation, false);
+ noSystemRotationDisabled = true;
}
+ } else {
+ q->setAttribute(Qt::WA_SymbianNoSystemRotation, extra->topextra->noSystemRotationDisabled);
}
- } else if (extra->topextra->nativeWindowTransparencyEnabled) {
- window->SetTransparentRegion(TRegionFix<1>());
- extra->topextra->nativeWindowTransparencyEnabled = 0;
+ extra->topextra->noSystemRotationDisabled = noSystemRotationDisabled;
}
}
@@ -1020,6 +1035,7 @@ void QWidgetPrivate::createTLSysExtra()
extra->topextra->inExpose = 0;
extra->topextra->nativeWindowTransparencyEnabled = 0;
extra->topextra->forcedToRaster = 0;
+ extra->topextra->noSystemRotationDisabled = 0;
}
void QWidgetPrivate::deleteTLSysExtra()
diff --git a/src/gui/painting/qgraphicssystemex_symbian.cpp b/src/gui/painting/qgraphicssystemex_symbian.cpp
index 4469704668..32e040fdc8 100644
--- a/src/gui/painting/qgraphicssystemex_symbian.cpp
+++ b/src/gui/painting/qgraphicssystemex_symbian.cpp
@@ -46,31 +46,108 @@
#include <e32property.h>
+#ifdef Q_SYMBIAN_SUPPORTS_SURFACES
+#include "private/qegl_p.h"
+#endif
+
QT_BEGIN_NAMESPACE
static bool bcm2727Initialized = false;
static bool bcm2727 = false;
+#ifdef Q_SYMBIAN_SUPPORTS_SURFACES
+typedef EGLBoolean (*NOK_resource_profiling)(EGLDisplay, EGLint, EGLint*, EGLint, EGLint*);
+#define EGL_PROF_TOTAL_MEMORY_NOK 0x3070
+#endif
+
+// Detect if Qt is running on BCM2727 chip.
+// BCM2727 is a special case on Symbian because
+// it has only 32MB GPU memory which exposes
+// significant limitations to hw accelerated UI.
bool QSymbianGraphicsSystemEx::hasBCM2727()
{
if (bcm2727Initialized)
return bcm2727;
- const TUid KIvePropertyCat = {0x2726beef};
- enum TIvePropertyChipType {
- EVCBCM2727B1 = 0x00000000,
- EVCBCM2763A0 = 0x04000100,
- EVCBCM2763B0 = 0x04000102,
- EVCBCM2763C0 = 0x04000103,
- EVCBCM2763C1 = 0x04000104,
- EVCBCMUnknown = 0x7fffffff
- };
-
- TInt chipType = EVCBCMUnknown;
- if (RProperty::Get(KIvePropertyCat, 0, chipType) == KErrNone) {
- if (chipType == EVCBCM2727B1)
+#ifdef Q_SYMBIAN_SUPPORTS_SURFACES
+ EGLDisplay display = QEgl::display();
+#if 1
+ // Hacky but fast ~0ms.
+ const char* vendor = eglQueryString(display, EGL_VENDOR);
+ if (strstr(vendor, "Broadcom")) {
+ const TUid KIvePropertyCat = {0x2726beef};
+ enum TIvePropertyChipType {
+ EVCBCM2727B1 = 0x00000000,
+ EVCBCM2763A0 = 0x04000100,
+ EVCBCM2763B0 = 0x04000102,
+ EVCBCM2763C0 = 0x04000103,
+ EVCBCM2763C1 = 0x04000104,
+ EVCBCMUnknown = 0x7fffffff
+ };
+
+ // Broadcom driver publishes KIvePropertyCat PS key on
+ // devices which are running on BCM2727 chip and post Anna Symbian.
+ TInt chipType = EVCBCMUnknown;
+ if (RProperty::Get(KIvePropertyCat, 0, chipType) == KErrNone) {
+ if (chipType == EVCBCM2727B1)
+ bcm2727 = true;
+ } else if (QSysInfo::symbianVersion() <= QSysInfo::SV_SF_3) {
+ // Device is running on Symbian Anna or older Symbian^3 in which
+ // KIvePropertyCat is not published. These ones are always 32MB devices.
+ bcm2727 = true;
+ } else {
+ // We have some other Broadcom chip on post Anna Symbian.
+ // Should have > 32MB GPU memory.
+ }
+ }
+#else
+ // Fool proof but takes 15-20ms and we don't want this delay on app startup...
+
+ // All devices with <= 32MB GPU memory should be
+ // dealed in similar manner to BCM2727
+ // So let's query max GPU memory amount.
+ NOK_resource_profiling eglQueryProfilingData = (NOK_resource_profiling)eglGetProcAddress("eglQueryProfilingDataNOK");
+ if (eglQueryProfilingData) {
+ EGLint dataCount;
+ eglQueryProfilingData(display,
+ EGL_PROF_QUERY_GLOBAL_BIT_NOK |
+ EGL_PROF_QUERY_MEMORY_USAGE_BIT_NOK,
+ NULL,
+ 0,
+ (EGLint*)&dataCount);
+
+ // Allocate room for the profiling data
+ EGLint* profData = (EGLint*)malloc(dataCount * sizeof(EGLint));
+ memset(profData,0,dataCount * sizeof(EGLint));
+
+ // Retrieve the profiling data
+ eglQueryProfilingData(display,
+ EGL_PROF_QUERY_GLOBAL_BIT_NOK |
+ EGL_PROF_QUERY_MEMORY_USAGE_BIT_NOK,
+ profData,
+ dataCount,
+ (EGLint*)&dataCount);
+
+ int totalMemory;
+ EGLint i = 0;
+ while (profData && i < dataCount) {
+ switch (profData[i++]) {
+ case EGL_PROF_TOTAL_MEMORY_NOK:
+ totalMemory = profData[i++];
+ break;
+ default:
+ i++;
+ }
+ }
+
+ // ok, hasBCM2727() naming is a bit misleading but Qt must
+ // behave the same on all chips like BCM2727 (<= 32MB GPU memory)
+ // and our code (and others) are already using this function.
+ if (totalMemory <= 33554432)
bcm2727 = true;
}
+#endif
+#endif // Q_SYMBIAN_SUPPORTS_SURFACES
bcm2727Initialized = true;
@@ -80,7 +157,9 @@ bool QSymbianGraphicsSystemEx::hasBCM2727()
void QSymbianGraphicsSystemEx::releaseCachedGpuResources()
{
// Do nothing here
- // This is implemented in graphics system specific plugin
+
+ // This virtual function should be implemented in graphics system specific
+ // plugin
}
void QSymbianGraphicsSystemEx::releaseAllGpuResources()
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index cff3641708..ee2eef62a7 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -1334,6 +1334,7 @@ QTextEngine::~QTextEngine()
if (!stackEngine)
delete layoutData;
delete specialData;
+ resetFontEngineCache();
}
const HB_CharAttributes *QTextEngine::attributes() const
@@ -1394,6 +1395,13 @@ static inline void releaseCachedFontEngine(QFontEngine *fontEngine)
}
}
+void QTextEngine::resetFontEngineCache()
+{
+ releaseCachedFontEngine(feCache.prevFontEngine);
+ releaseCachedFontEngine(feCache.prevScaledFontEngine);
+ feCache.reset();
+}
+
void QTextEngine::invalidate()
{
freeMemory();
@@ -1402,9 +1410,7 @@ void QTextEngine::invalidate()
if (specialData)
specialData->resolvedFormatIndices.clear();
- releaseCachedFontEngine(feCache.prevFontEngine);
- releaseCachedFontEngine(feCache.prevScaledFontEngine);
- feCache.reset();
+ resetFontEngineCache();
}
void QTextEngine::clearLineData()
diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h
index c920c7ba6e..2b6db674a4 100644
--- a/src/gui/text/qtextengine_p.h
+++ b/src/gui/text/qtextengine_p.h
@@ -614,6 +614,7 @@ public:
QFixed leadingSpaceWidth(const QScriptLine &line);
int positionInLigature(const QScriptItem *si, int end, QFixed x, QFixed edge, int glyph_pos, bool cursorOnCharacter);
+ void resetFontEngineCache();
private:
void setBoundary(int strPos) const;
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index d180f0edc5..f2d3de1519 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -386,7 +386,7 @@ QTextLayout::~QTextLayout()
void QTextLayout::setFont(const QFont &font)
{
d->fnt = font;
- d->feCache.reset();
+ d->resetFontEngineCache();
}
/*!
@@ -519,7 +519,7 @@ void QTextLayout::setAdditionalFormats(const QList<FormatRange> &formatList)
}
if (d->block.docHandle())
d->block.docHandle()->documentChange(d->block.position(), d->block.length());
- d->feCache.reset();
+ d->resetFontEngineCache();
}
/*!
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index 198bc045aa..c5232ad749 100644
--- a/src/gui/widgets/qlinecontrol.cpp
+++ b/src/gui/widgets/qlinecontrol.cpp
@@ -447,6 +447,8 @@ void QLineControl::moveCursor(int pos, bool mark)
void QLineControl::processInputMethodEvent(QInputMethodEvent *event)
{
int priorState = 0;
+ int originalSelectionStart = m_selstart;
+ int originalSelectionEnd = m_selend;
bool isGettingInput = !event->commitString().isEmpty()
|| event->preeditString() != preeditAreaText()
|| event->replacementLength() > 0;
@@ -525,6 +527,8 @@ void QLineControl::processInputMethodEvent(QInputMethodEvent *event)
}
m_textLayout.setAdditionalFormats(formats);
updateDisplayText(/*force*/ true);
+ if (originalSelectionStart != m_selstart || originalSelectionEnd != m_selend)
+ emit selectionChanged();
if (cursorPositionChanged)
emitCursorPositionChanged();
else if (m_preeditCursor != oldPreeditCursor)
diff --git a/src/imports/folderlistmodel/folderlistmodel.pro b/src/imports/folderlistmodel/folderlistmodel.pro
index 8964ab058b..d369ed1883 100644
--- a/src/imports/folderlistmodel/folderlistmodel.pro
+++ b/src/imports/folderlistmodel/folderlistmodel.pro
@@ -19,8 +19,8 @@ symbian:{
isEmpty(DESTDIR):importFiles.sources = qmlfolderlistmodelplugin$${QT_LIBINFIX}.dll qmldir
else:importFiles.sources = $$DESTDIR/qmlfolderlistmodelplugin$${QT_LIBINFIX}.dll qmldir
importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
-
- DEPLOYMENT = importFiles
+
+ DEPLOYMENT += importFiles
}
INSTALLS += target qmldir
diff --git a/src/imports/gestures/gestures.pro b/src/imports/gestures/gestures.pro
index a4c914df0c..f9e71fa593 100644
--- a/src/imports/gestures/gestures.pro
+++ b/src/imports/gestures/gestures.pro
@@ -15,12 +15,12 @@ qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
symbian:{
TARGET.UID3 = 0x2002131F
-
+
isEmpty(DESTDIR):importFiles.sources = qmlgesturesplugin$${QT_LIBINFIX}.dll qmldir
else:importFiles.sources = $$DESTDIR/qmlgesturesplugin$${QT_LIBINFIX}.dll qmldir
importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
-
- DEPLOYMENT = importFiles
+
+ DEPLOYMENT += importFiles
}
INSTALLS += target qmldir
diff --git a/src/imports/particles/particles.pro b/src/imports/particles/particles.pro
index bb9da015b9..59cc16a11d 100644
--- a/src/imports/particles/particles.pro
+++ b/src/imports/particles/particles.pro
@@ -19,12 +19,12 @@ qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
symbian:{
TARGET.UID3 = 0x2002131E
-
+
isEmpty(DESTDIR):importFiles.sources = qmlparticlesplugin$${QT_LIBINFIX}.dll qmldir
else:importFiles.sources = $$DESTDIR/qmlparticlesplugin$${QT_LIBINFIX}.dll qmldir
importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
-
- DEPLOYMENT = importFiles
+
+ DEPLOYMENT += importFiles
}
INSTALLS += target qmldir
diff --git a/src/imports/shaders/shaders.pro b/src/imports/shaders/shaders.pro
index d7a6275af5..51a9a918f9 100644
--- a/src/imports/shaders/shaders.pro
+++ b/src/imports/shaders/shaders.pro
@@ -32,7 +32,7 @@ symbian:{
isEmpty(DESTDIR):importFiles.sources = qmlparticlesplugin$${QT_LIBINFIX}.dll qmldir
else:importFiles.sources = $$DESTDIR/qmlparticlesplugin$${QT_LIBINFIX}.dll qmldir
importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
}
INSTALLS += target qmldir
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index 0f2fcbaa92..129e2c64bc 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -816,7 +816,7 @@ bool QHttpNetworkReplyPrivate::expectContent()
|| statusCode == 204 || statusCode == 304)
return false;
if (request.operation() == QHttpNetworkRequest::Head)
- return !shouldEmitSignals();
+ return false; // no body expected for HEAD request
qint64 expectedContentLength = contentLength();
if (expectedContentLength == 0)
return false;
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index abef8ab56a..aa477fbd4d 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -737,7 +737,7 @@ void QNetworkAccessHttpBackend::readFromHttp()
void QNetworkAccessHttpBackend::replyFinished()
{
- if (httpReply->bytesAvailable())
+ if (!httpReply || httpReply->bytesAvailable())
// we haven't read everything yet. Wait some more.
return;
@@ -788,6 +788,9 @@ void QNetworkAccessHttpBackend::checkForRedirect(const int statusCode)
void QNetworkAccessHttpBackend::replyHeaderChanged()
{
+ if (!httpReply)
+ return;
+
setAttribute(QNetworkRequest::HttpPipeliningWasUsedAttribute, httpReply->isPipeliningUsed());
// reconstruct the HTTP header
@@ -1128,7 +1131,7 @@ bool QNetworkAccessHttpBackend::canResume() const
return false;
// Can only resume if server/resource supports Range header.
- if (httpReply->headerField("Accept-Ranges", "none") == "none")
+ if (!httpReply || httpReply->headerField("Accept-Ranges", "none") == "none")
return false;
// We only support resuming for byte ranges.
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index a7a62876b2..209d06469e 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -451,6 +451,7 @@ bool QNetworkReplyImplPrivate::isCachingEnabled() const
void QNetworkReplyImplPrivate::setCachingEnabled(bool enable)
{
+ Q_Q(QNetworkReplyImpl);
if (!enable && !cacheEnabled)
return; // nothing to do
if (enable && cacheEnabled)
@@ -473,15 +474,27 @@ void QNetworkReplyImplPrivate::setCachingEnabled(bool enable)
networkCache()->remove(url);
cacheSaveDevice = 0;
cacheEnabled = false;
+ QObject::disconnect(networkCache(), SIGNAL(destroyed()), q, SLOT(_q_cacheDestroyed()));
}
}
+void QNetworkReplyImplPrivate::_q_cacheDestroyed()
+{
+ //destruction of cache invalidates cacheSaveDevice
+ cacheSaveDevice = 0;
+ cacheEnabled = false;
+}
+
void QNetworkReplyImplPrivate::completeCacheSave()
{
- if (cacheEnabled && errorCode != QNetworkReplyImpl::NoError) {
- networkCache()->remove(url);
- } else if (cacheEnabled && cacheSaveDevice) {
- networkCache()->insert(cacheSaveDevice);
+ Q_Q(QNetworkReplyImpl);
+ if (cacheEnabled) {
+ if (errorCode != QNetworkReplyImpl::NoError) {
+ networkCache()->remove(url);
+ } else if (cacheSaveDevice) {
+ networkCache()->insert(cacheSaveDevice);
+ }
+ QObject::disconnect(networkCache(), SIGNAL(destroyed()), q, SLOT(_q_cacheDestroyed()));
}
cacheSaveDevice = 0;
cacheEnabled = false;
@@ -541,6 +554,8 @@ void QNetworkReplyImplPrivate::initCacheSaveDevice()
networkCache()->remove(url);
cacheSaveDevice = 0;
cacheEnabled = false;
+ } else {
+ q->connect(networkCache(), SIGNAL(destroyed()), SLOT(_q_cacheDestroyed()));
}
}
diff --git a/src/network/access/qnetworkreplyimpl_p.h b/src/network/access/qnetworkreplyimpl_p.h
index 31da297b79..0e4ff8f5ce 100644
--- a/src/network/access/qnetworkreplyimpl_p.h
+++ b/src/network/access/qnetworkreplyimpl_p.h
@@ -103,6 +103,7 @@ public:
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionConnected())
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionFailed())
#endif
+ Q_PRIVATE_SLOT(d_func(), void _q_cacheDestroyed())
};
class QNetworkReplyImplPrivate: public QNetworkReplyPrivate
@@ -139,6 +140,7 @@ public:
void _q_networkSessionConnected();
void _q_networkSessionFailed();
#endif
+ void _q_cacheDestroyed();
void setup(QNetworkAccessManager::Operation op, const QNetworkRequest &request,
QIODevice *outgoingData);
diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp
index 818aab73a5..4f7f4ed80d 100644
--- a/src/network/kernel/qauthenticator.cpp
+++ b/src/network/kernel/qauthenticator.cpp
@@ -223,7 +223,7 @@ void QAuthenticator::setUser(const QString &user)
} else if((separatorPosn = user.indexOf(QLatin1String("@"))) != -1) {
//domain name is present
d->realm.clear();
- d->userDomain = user.left(separatorPosn);
+ d->userDomain = user.mid(separatorPosn + 1);
d->extractedUser = user.left(separatorPosn);
d->user = user;
} else {
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 047d5890e4..999a0746f8 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -2059,6 +2059,8 @@ void QGL2PaintEngineExPrivate::updateClipScissorTest()
currentScissorBounds = bounds;
if (bounds == QRect(0, 0, width, height)) {
+ if (ctx->d_func()->workaround_brokenScissor)
+ clearClip(0);
glDisable(GL_SCISSOR_TEST);
} else {
glEnable(GL_SCISSOR_TEST);
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 161e099feb..af160d8c41 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -95,9 +95,9 @@
#ifdef Q_OS_SYMBIAN
#include <private/qgltexturepool_p.h>
+#include <private/qeglcontext_p.h>
#endif
-
QT_BEGIN_NAMESPACE
#if defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)
@@ -1716,6 +1716,8 @@ void QGLContextPrivate::init(QPaintDevice *dev, const QGLFormat &format)
workaround_brokenTextureFromPixmap = false;
workaround_brokenTextureFromPixmap_init = false;
+ workaround_brokenScissor = false;
+
for (int i = 0; i < QT_GL_VERTEX_ARRAY_TRACKED_COUNT; ++i)
vertexAttributeArraysEnabledState[i] = false;
}
@@ -3426,8 +3428,25 @@ void QGLContext::setInitialized(bool on)
const QGLContext* QGLContext::currentContext()
{
QGLThreadContext *threadContext = qgl_context_storage.localData();
- if (threadContext)
+ if (threadContext) {
+#ifdef Q_OS_SYMBIAN
+ // Query the current context and return null if it is different.
+ // This is needed to support mixed VG-GL rendering.
+ // QtOpenVG is free to make a QEglContext current at any time and
+ // QGLContext gets no notification that its underlying QEglContext is
+ // not current anymore. We query directly from EGL to be thread-safe.
+ // QEglContext does not store all the contexts per-thread.
+ if (threadContext->context) {
+ QEglContext *eglcontext = threadContext->context->d_func()->eglContext;
+ if (eglcontext) {
+ EGLContext ctx = eglcontext->context();
+ if (ctx != eglGetCurrentContext())
+ return 0;
+ }
+ }
+#endif
return threadContext->context;
+ }
return 0;
}
@@ -4280,7 +4299,7 @@ bool QGLWidget::event(QEvent *e)
// if we've reparented a window that has the current context
// bound, we need to rebind that context to the new window id
if (d->glcx == QGLContext::currentContext())
- makeCurrent();
+ makeCurrent(); // Shouldn't happen but keep it here just for sure
if (testAttribute(Qt::WA_TranslucentBackground))
setContext(new QGLContext(d->glcx->requestedFormat(), this));
@@ -4288,8 +4307,11 @@ bool QGLWidget::event(QEvent *e)
// A re-parent is likely to destroy the Symbian window and re-create it. It is important
// that we free the EGL surface _before_ the winID changes - otherwise we can leak.
- if (e->type() == QEvent::ParentAboutToChange)
+ if (e->type() == QEvent::ParentAboutToChange) {
+ if (d->glcx == QGLContext::currentContext())
+ d->glcx->doneCurrent();
d->glcx->d_func()->destroyEglSurfaceForDevice();
+ }
if ((e->type() == QEvent::ParentChange) || (e->type() == QEvent::WindowStateChange)) {
// The window may have been re-created during re-parent or state change - if so, the EGL
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp
index a5891180f4..07134cf9e7 100644
--- a/src/opengl/qgl_egl.cpp
+++ b/src/opengl/qgl_egl.cpp
@@ -192,7 +192,9 @@ void QGLContext::makeCurrent()
if (!d->workaroundsCached) {
d->workaroundsCached = true;
const char *renderer = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
- if (renderer && (strstr(renderer, "SGX") || strstr(renderer, "MBX"))) {
+ if (!renderer)
+ return;
+ if ((strstr(renderer, "SGX") || strstr(renderer, "MBX"))) {
// PowerVR MBX/SGX chips needs to clear all buffers when starting to render
// a new frame, otherwise there will be a performance penalty to pay for
// each frame.
@@ -229,6 +231,13 @@ void QGLContext::makeCurrent()
d->workaround_brokenFBOReadBack = true;
}
}
+ } else if (strstr(renderer, "VideoCore III")) {
+ // Some versions of VideoCore III drivers seem to pollute and use
+ // stencil buffer when using glScissors even if stencil test is disabled.
+ // Workaround is to clear stencil buffer before disabling scissoring.
+
+ // qDebug() << "Found VideoCore III driver, enabling brokenDisableScissorTest";
+ d->workaround_brokenScissor = true;
}
}
}
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 2ca8dc9539..d76f0b042a 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -175,6 +175,7 @@ public:
#endif
#if defined(Q_OS_SYMBIAN)
, eglSurfaceWindowId(0)
+ , surfaceSizeInitialized(false)
#endif
{
isGLWidget = 1;
@@ -220,6 +221,7 @@ public:
#ifdef Q_OS_SYMBIAN
void recreateEglSurface();
WId eglSurfaceWindowId;
+ bool surfaceSizeInitialized : 1;
#endif
};
@@ -413,6 +415,8 @@ public:
uint workaround_brokenTextureFromPixmap : 1;
uint workaround_brokenTextureFromPixmap_init : 1;
+ uint workaround_brokenScissor : 1;
+
QPaintDevice *paintDevice;
QColor transpColor;
QGLContext *q_ptr;
diff --git a/src/opengl/qgl_symbian.cpp b/src/opengl/qgl_symbian.cpp
index b8e5c22a09..94c63fc2d8 100644
--- a/src/opengl/qgl_symbian.cpp
+++ b/src/opengl/qgl_symbian.cpp
@@ -259,7 +259,7 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) // almost same as
return true;
}
-void QGLWidget::resizeEvent(QResizeEvent *)
+void QGLWidget::resizeEvent(QResizeEvent *e)
{
Q_D(QGLWidget);
if (!isValid())
@@ -270,17 +270,18 @@ void QGLWidget::resizeEvent(QResizeEvent *)
if (this == qt_gl_share_widget())
return;
- if (QGLContext::currentContext())
- doneCurrent();
-
- // Symbian needs to recreate the surface on resize.
- d->recreateEglSurface();
+ if (!d->surfaceSizeInitialized || e->oldSize() != e->size()) {
+ // On Symbian we need to recreate the surface on resize.
+ d->recreateEglSurface();
+ d->surfaceSizeInitialized = true;
+ }
makeCurrent();
+
if (!d->glcx->initialized())
glInit();
+
resizeGL(width(), height());
- //handle overlay
}
const QGLContext* QGLWidget::overlayContext() const
@@ -363,6 +364,9 @@ void QGLWidgetPrivate::recreateEglSurface()
WId currentId = q->winId();
if (glcx->d_func()->eglSurface != EGL_NO_SURFACE) {
+ if (glcx == QGLContext::currentContext())
+ glcx->doneCurrent();
+
eglDestroySurface(glcx->d_func()->eglContext->display(),
glcx->d_func()->eglSurface);
}
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
index 5639c4f43e..29f06374a3 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
@@ -61,13 +61,12 @@
QT_BEGIN_NAMESPACE
QNetworkSessionPrivateImpl::QNetworkSessionPrivateImpl(SymbianEngine *engine)
-: CActive(CActive::EPriorityUserInput), engine(engine),
- iDynamicUnSetdefaultif(0), ipConnectionNotifier(0),
+: engine(engine),
+ ipConnectionNotifier(0), ipConnectionStarter(0),
iHandleStateNotificationsFromManager(false), iFirstSync(true), iStoppedByUser(false),
iClosedByUser(false), iError(QNetworkSession::UnknownSessionError), iALREnabled(0),
iConnectInBackground(false), isOpening(false)
{
- CActiveScheduler::Add(this);
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
iMobility = NULL;
@@ -89,33 +88,44 @@ QNetworkSessionPrivateImpl::QNetworkSessionPrivateImpl(SymbianEngine *engine)
TRAP_IGNORE(iConnectionMonitor.ConnectL());
}
-QNetworkSessionPrivateImpl::~QNetworkSessionPrivateImpl()
+void QNetworkSessionPrivateImpl::closeHandles()
{
- isOpen = false;
- isOpening = false;
-
// Cancel Connection Progress Notifications first.
- // Note: ConnectionNotifier must be destroyed before Canceling RConnection::Start()
+ // Note: ConnectionNotifier must be destroyed before RConnection::Close()
// => deleting ipConnectionNotifier results RConnection::CancelProgressNotification()
delete ipConnectionNotifier;
ipConnectionNotifier = NULL;
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
- if (iMobility) {
- delete iMobility;
- iMobility = NULL;
- }
+ // mobility monitor must be deleted before RConnection is closed
+ delete iMobility;
+ iMobility = NULL;
#endif
- // Cancel possible RConnection::Start()
- Cancel();
- iSocketServ.Close();
+ // Cancel possible RConnection::Start() - may call RConnection::Close if Start was in progress
+ delete ipConnectionStarter;
+ ipConnectionStarter = 0;
+ //close any open connection (note Close twice is safe in case Cancel did it above)
+ iConnection.Close();
// Close global 'Open C' RConnection
// Clears also possible unsetdefaultif() flags.
setdefaultif(0);
iConnectionMonitor.Close();
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this)
+ << " - handles closed";
+#endif
+ iSocketServ.Close();
+}
+
+QNetworkSessionPrivateImpl::~QNetworkSessionPrivateImpl()
+{
+ isOpen = false;
+ isOpening = false;
+
+ closeHandles();
iOpenCLibrary.Close();
#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
qDebug() << "QNS this : " << QString::number((uint)this)
@@ -166,7 +176,7 @@ void QNetworkSessionPrivateImpl::configurationAdded(QNetworkConfigurationPrivate
#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
qDebug() << "QNS this : " << QString::number((uint)this) << " - "
<< "configurationAdded IAP: "
- << toSymbianConfig(privateConfiguration(config))->numericIdentifier();
+ << toSymbianConfig(config)->numericIdentifier();
#endif
syncStateWithInterface();
@@ -372,7 +382,8 @@ void QNetworkSessionPrivateImpl::open()
syncStateWithInterface();
return;
}
-
+
+ Q_ASSERT(!iConnection.SubSessionHandle());
error = iConnection.Open(iSocketServ);
if (error != KErrNone) {
// Could not open RConnection
@@ -414,9 +425,9 @@ void QNetworkSessionPrivateImpl::open()
pref.SetIapId(symbianConfig->numericIdentifier());
#endif
- iConnection.Start(pref, iStatus);
- if (!IsActive()) {
- SetActive();
+ if (!ipConnectionStarter) {
+ ipConnectionStarter = new ConnectionStarter(*this, iConnection);
+ ipConnectionStarter->Start(pref);
}
// Avoid flip flop of states if the configuration is already
// active. IsOpen/opened() will indicate when ready.
@@ -442,9 +453,9 @@ void QNetworkSessionPrivateImpl::open()
#else
TConnSnapPref snapPref(symbianConfig->numericIdentifier());
#endif
- iConnection.Start(snapPref, iStatus);
- if (!IsActive()) {
- SetActive();
+ if (!ipConnectionStarter) {
+ ipConnectionStarter = new ConnectionStarter(*this, iConnection);
+ ipConnectionStarter->Start(snapPref);
}
// Avoid flip flop of states if the configuration is already
// active. IsOpen/opened() will indicate when ready.
@@ -453,9 +464,9 @@ void QNetworkSessionPrivateImpl::open()
}
} else if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
iKnownConfigsBeforeConnectionStart = engine->accessPointConfigurationIdentifiers();
- iConnection.Start(iStatus);
- if (!IsActive()) {
- SetActive();
+ if (!ipConnectionStarter) {
+ ipConnectionStarter = new ConnectionStarter(*this, iConnection);
+ ipConnectionStarter->Start();
}
newState(QNetworkSession::Connecting);
}
@@ -465,9 +476,7 @@ void QNetworkSessionPrivateImpl::open()
isOpening = false;
iError = QNetworkSession::UnknownSessionError;
emit QNetworkSessionPrivate::error(iError);
- if (ipConnectionNotifier) {
- ipConnectionNotifier->StopNotifications();
- }
+ closeHandles();
syncStateWithInterface();
}
}
@@ -521,21 +530,10 @@ void QNetworkSessionPrivateImpl::close(bool allowSignals)
serviceConfig = QNetworkConfiguration();
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
- if (iMobility) {
- delete iMobility;
- iMobility = NULL;
- }
-#endif
+ closeHandles();
- if (ipConnectionNotifier && !iHandleStateNotificationsFromManager) {
- ipConnectionNotifier->StopNotifications();
- // Start handling IAP state change signals from QNetworkConfigurationManagerPrivate
- iHandleStateNotificationsFromManager = true;
- }
-
- Cancel(); // closes iConnection
- iSocketServ.Close();
+ // Start handling IAP state change signals from QNetworkConfigurationManagerPrivate
+ iHandleStateNotificationsFromManager = true;
// Close global 'Open C' RConnection. If OpenC supports,
// close the defaultif for good to avoid difficult timing
@@ -759,12 +757,14 @@ void QNetworkSessionPrivateImpl::NewCarrierActive(TAccessPointInfo /*aNewAPInfo*
}
}
-void QNetworkSessionPrivateImpl::Error(TInt /*aError*/)
+void QNetworkSessionPrivateImpl::Error(TInt aError)
{
#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
qDebug() << "QNS this : " << QString::number((uint)this) << " - "
- << "roaming Error() occurred, isOpen is: " << isOpen;
+ << "roaming Error() occurred" << aError << ", isOpen is: " << isOpen;
#endif
+ if (aError == KErrCancel)
+ return; //avoid recursive deletion
if (isOpen) {
isOpen = false;
isOpening = false;
@@ -772,10 +772,7 @@ void QNetworkSessionPrivateImpl::Error(TInt /*aError*/)
serviceConfig = QNetworkConfiguration();
iError = QNetworkSession::RoamingError;
emit QNetworkSessionPrivate::error(iError);
- Cancel();
- if (ipConnectionNotifier) {
- ipConnectionNotifier->StopNotifications();
- }
+ closeHandles();
QT_TRY {
syncStateWithInterface();
// In some cases IAP is still in Connected state when
@@ -1069,13 +1066,14 @@ QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 ia
return publicConfig;
}
-void QNetworkSessionPrivateImpl::RunL()
+void QNetworkSessionPrivateImpl::ConnectionStartComplete(TInt statusCode)
{
#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
qDebug() << "QNS this : " << QString::number((uint)this) << " - "
- << "RConnection::RunL with status code: " << iStatus.Int();
+ << "RConnection::Start completed with status code: " << statusCode;
#endif
- TInt statusCode = iStatus.Int();
+ delete ipConnectionStarter;
+ ipConnectionStarter = 0;
switch (statusCode) {
case KErrNone: // Connection created successfully
@@ -1102,18 +1100,13 @@ void QNetworkSessionPrivateImpl::RunL()
isOpening = false;
iError = QNetworkSession::UnknownSessionError;
QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError));
- if (ipConnectionNotifier) {
- ipConnectionNotifier->StopNotifications();
- }
+ closeHandles();
if (!newActiveConfig.isValid()) {
// No valid configuration, bail out.
// Status updates from QNCM won't be received correctly
// because there is no configuration to associate them with so transit here.
- iConnection.Close();
newState(QNetworkSession::Closing);
newState(QNetworkSession::Disconnected);
- } else {
- Cancel();
}
QT_TRYCATCH_LEAVING(syncStateWithInterface());
return;
@@ -1156,10 +1149,7 @@ void QNetworkSessionPrivateImpl::RunL()
serviceConfig = QNetworkConfiguration();
iError = QNetworkSession::InvalidConfigurationError;
QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError));
- if (ipConnectionNotifier) {
- ipConnectionNotifier->StopNotifications();
- }
- Cancel();
+ closeHandles();
QT_TRYCATCH_LEAVING(syncStateWithInterface());
break;
case KErrCancel: // Connection attempt cancelled
@@ -1178,20 +1168,12 @@ void QNetworkSessionPrivateImpl::RunL()
iError = QNetworkSession::UnknownSessionError;
}
QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError));
- if (ipConnectionNotifier) {
- ipConnectionNotifier->StopNotifications();
- }
- Cancel();
+ closeHandles();
QT_TRYCATCH_LEAVING(syncStateWithInterface());
break;
}
}
-void QNetworkSessionPrivateImpl::DoCancel()
-{
- iConnection.Close();
-}
-
// Enters newState if feasible according to current state.
// AccessPointId may be given as parameter. If it is zero, state-change is assumed to
// concern this session's configuration. If non-zero, the configuration is looked up
@@ -1273,10 +1255,7 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint
serviceConfig = QNetworkConfiguration();
iError = QNetworkSession::SessionAbortedError;
emit QNetworkSessionPrivate::error(iError);
- if (ipConnectionNotifier) {
- ipConnectionNotifier->StopNotifications();
- }
- Cancel();
+ closeHandles();
// Start handling IAP state change signals from QNetworkConfigurationManagerPrivate
iHandleStateNotificationsFromManager = true;
emitSessionClosed = true; // Emit SessionClosed after state change has been reported
@@ -1459,6 +1438,9 @@ void QNetworkSessionPrivateImpl::handleSymbianConnectionStatusChange(TInt aConne
newState(QNetworkSession::Closing,accessPointId);
break;
+ // Connection stopped
+ case KConfigDaemonFinishedDeregistrationStop: //this comes if this is the last session, instead of KLinkLayerClosed
+ case KConfigDaemonFinishedDeregistrationPreserve:
// Connection closed
case KConnectionClosed:
case KLinkLayerClosed:
@@ -1583,6 +1565,50 @@ void ConnectionProgressNotifier::RunL()
}
}
+ConnectionStarter::ConnectionStarter(QNetworkSessionPrivateImpl &owner, RConnection &connection)
+ : CActive(CActive::EPriorityUserInput), iOwner(owner), iConnection(connection)
+{
+ CActiveScheduler::Add(this);
+}
+
+ConnectionStarter::~ConnectionStarter()
+{
+ Cancel();
+}
+
+void ConnectionStarter::Start()
+{
+ if (!IsActive()) {
+ iConnection.Start(iStatus);
+ SetActive();
+ }
+}
+
+void ConnectionStarter::Start(TConnPref &pref)
+{
+ if (!IsActive()) {
+ iConnection.Start(pref, iStatus);
+ SetActive();
+ }
+}
+
+void ConnectionStarter::RunL()
+{
+ iOwner.ConnectionStartComplete(iStatus.Int());
+ //note owner deletes on callback
+}
+
+TInt ConnectionStarter::RunError(TInt err)
+{
+ qWarning() << "ConnectionStarter::RunError" << err;
+ return KErrNone;
+}
+
+void ConnectionStarter::DoCancel()
+{
+ iConnection.Close();
+}
+
QT_END_NAMESPACE
#endif //QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.h b/src/plugins/bearer/symbian/qnetworksession_impl.h
index 774b988f59..a5a4f8791e 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.h
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.h
@@ -68,11 +68,12 @@
QT_BEGIN_NAMESPACE
class ConnectionProgressNotifier;
+class ConnectionStarter;
class SymbianEngine;
typedef void (*TOpenCUnSetdefaultifFunction)();
-class QNetworkSessionPrivateImpl : public QNetworkSessionPrivate, public CActive
+class QNetworkSessionPrivateImpl : public QNetworkSessionPrivate
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
, public MMobilityProtocolResp
#endif
@@ -125,7 +126,7 @@ public: // From MMobilityProtocolResp
#endif
protected: // From CActive
- void RunL();
+ void ConnectionStartComplete(TInt statusCode);
void DoCancel();
private Q_SLOTS:
@@ -149,6 +150,7 @@ private:
bool easyWlanTrueIapId(TUint32 &trueIapId) const;
#endif
+ void closeHandles();
private: // data
SymbianEngine *engine;
@@ -166,12 +168,13 @@ private: // data
mutable RConnection iConnection;
mutable RConnectionMonitor iConnectionMonitor;
ConnectionProgressNotifier* ipConnectionNotifier;
-
+ ConnectionStarter* ipConnectionStarter;
+
bool iHandleStateNotificationsFromManager;
bool iFirstSync;
bool iStoppedByUser;
bool iClosedByUser;
-
+
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
CActiveCommsMobilityApiExt* iMobility;
#endif
@@ -189,6 +192,7 @@ private: // data
bool isOpening;
friend class ConnectionProgressNotifier;
+ friend class ConnectionStarter;
};
class ConnectionProgressNotifier : public CActive
@@ -211,6 +215,24 @@ private: // Data
};
+class ConnectionStarter : public CActive
+{
+public:
+ ConnectionStarter(QNetworkSessionPrivateImpl &owner, RConnection &connection);
+ ~ConnectionStarter();
+
+ void Start();
+ void Start(TConnPref &pref);
+protected:
+ void RunL();
+ TInt RunError(TInt err);
+ void DoCancel();
+
+private: // Data
+ QNetworkSessionPrivateImpl &iOwner;
+ RConnection& iConnection;
+};
+
QT_END_NAMESPACE
#endif //QNETWORKSESSION_IMPL_H
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index 40cdcdedf3..c66bb89d9e 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -13113,5 +13113,9 @@ EXPORTS
?hasBCM2727@QSymbianGraphicsSystemEx@@SA_NXZ @ 13112 NONAME ; bool QSymbianGraphicsSystemEx::hasBCM2727(void)
?constImageRef@QVolatileImage@@QBEABVQImage@@XZ @ 13113 NONAME ; class QImage const & QVolatileImage::constImageRef(void) const
?toVolatileImage@QPixmapData@@UBE?AVQVolatileImage@@XZ @ 13114 NONAME ; class QVolatileImage QPixmapData::toVolatileImage(void) const
- ?qt_s60_setPartialScreenAutomaticTranslation@@YAX_N@Z @ 13115 NONAME ; void qt_s60_setPartialScreenAutomaticTranslation(bool)
+ ?qt_s60_setPartialScreenAutomaticTranslation@@YAX_N@Z @ 13115 NONAME ; void qt_s60_setPartialScreenAutomaticTranslation(bool)
+ ?aboutToUseGpuResources@QApplication@@IAEXXZ @ 13116 NONAME ; void QApplication::aboutToUseGpuResources(void)
+ ?aboutToReleaseGpuResources@QApplication@@IAEXXZ @ 13117 NONAME ; void QApplication::aboutToReleaseGpuResources(void)
+ ?emitAboutToUseGpuResources@QApplicationPrivate@@QAEXXZ @ 13118 NONAME ; void QApplicationPrivate::emitAboutToUseGpuResources(void)
+ ?emitAboutToReleaseGpuResources@QApplicationPrivate@@QAEXXZ @ 13119 NONAME ; void QApplicationPrivate::emitAboutToReleaseGpuResources(void)
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index 6028a6df6e..9d39b905b7 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -12198,4 +12198,8 @@ EXPORTS
_ZNK11QPixmapData15toVolatileImageEv @ 12197 NONAME
_ZNK14QVolatileImage13constImageRefEv @ 12198 NONAME
_Z43qt_s60_setPartialScreenAutomaticTranslationb @ 12199 NONAME
+ _ZN12QApplication22aboutToUseGpuResourcesEv @ 12200 NONAME
+ _ZN12QApplication26aboutToReleaseGpuResourcesEv @ 12201 NONAME
+ _ZN19QApplicationPrivate26emitAboutToUseGpuResourcesEv @ 12202 NONAME
+ _ZN19QApplicationPrivate30emitAboutToReleaseGpuResourcesEv @ 12203 NONAME
diff --git a/tests/auto/declarative/examples/examples.pro b/tests/auto/declarative/examples/examples.pro
index 2e243b4957..1a0dc55799 100644
--- a/tests/auto/declarative/examples/examples.pro
+++ b/tests/auto/declarative/examples/examples.pro
@@ -9,7 +9,7 @@ include(../../../../tools/qml/qml.pri)
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/moduleqt47/moduleqt47.pro b/tests/auto/declarative/moduleqt47/moduleqt47.pro
index 4ee634e188..711e24ce2c 100644
--- a/tests/auto/declarative/moduleqt47/moduleqt47.pro
+++ b/tests/auto/declarative/moduleqt47/moduleqt47.pro
@@ -7,7 +7,7 @@ SOURCES += tst_moduleqt47.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/parserstress/parserstress.pro b/tests/auto/declarative/parserstress/parserstress.pro
index bb1d69ff9d..17f297b236 100644
--- a/tests/auto/declarative/parserstress/parserstress.pro
+++ b/tests/auto/declarative/parserstress/parserstress.pro
@@ -7,7 +7,7 @@ SOURCES += tst_parserstress.cpp
symbian: {
importFiles.sources = ..\\..\\qscriptjstestsuite\\tests
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro b/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro
index 9798bb6a62..62950792ff 100644
--- a/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro
+++ b/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro
@@ -6,7 +6,7 @@ macx:CONFIG -= app_bundle
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro b/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro
index 0a2f0f29b7..8c2259ab69 100644
--- a/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro
@@ -7,7 +7,7 @@ macx:CONFIG -= app_bundle
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro b/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro
index ed47dcafa2..578f37b938 100644
--- a/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro
+++ b/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro
@@ -6,7 +6,7 @@ macx:CONFIG -= app_bundle
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro b/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro
index cfb59ef458..7ba3a7df14 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro
+++ b/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro
@@ -6,7 +6,7 @@ macx:CONFIG -= app_bundle
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro b/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro
index a7ba2a8bd8..0cdaada98c 100644
--- a/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro
+++ b/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativebinding.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro b/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro
index a21761b87a..0e41c13622 100644
--- a/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro
+++ b/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro
@@ -8,7 +8,7 @@ SOURCES += tst_qdeclarativeborderimage.cpp ../shared/testhttpserver.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro b/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro
index d06ce4f7ba..33d81bae60 100644
--- a/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro
+++ b/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativeconnection.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro b/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro
index 415d4e2d50..1866a437eb 100644
--- a/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro
+++ b/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativedom.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro b/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro
index 58cad34d28..2eb333a349 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro
+++ b/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro
@@ -15,7 +15,7 @@ INCLUDEPATH += ../shared
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro b/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro
index be0ba6c36f..3f8b5e9818 100644
--- a/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro
+++ b/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativeflickable.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro b/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro
index 759e80b321..cb42418bed 100644
--- a/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro
+++ b/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativeflipable.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro b/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro
index 24749c61c5..3724a78c00 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro
+++ b/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro
@@ -6,7 +6,7 @@ macx:CONFIG -= app_bundle
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro b/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro
index 91bf4a764f..3299786ec3 100644
--- a/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro
+++ b/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativefolderlistmodel.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro b/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro
index 01dca2668c..fbd2550a9d 100644
--- a/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro
+++ b/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro
@@ -8,7 +8,7 @@ SOURCES += tst_qdeclarativefontloader.cpp ../shared/testhttpserver.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro b/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro
index a99a1b9c3b..4ea1e47677 100644
--- a/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro
+++ b/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativegridview.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro b/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro
index 244a1e1e90..e5db298f39 100644
--- a/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro
+++ b/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro
@@ -8,7 +8,7 @@ SOURCES += tst_qdeclarativeimage.cpp ../shared/testhttpserver.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro b/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro
index 2c20e7ef09..188ea23335 100644
--- a/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro
+++ b/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativeinfo.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro b/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro
index f4901c4428..26bd6247f0 100644
--- a/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro
+++ b/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativeitem.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro b/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro
index 43c451fb32..d702082701 100644
--- a/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro
+++ b/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro
@@ -14,7 +14,7 @@ SOURCES += ../shared/testhttpserver.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro b/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro
index 5076e5150f..b74ea98b8a 100644
--- a/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro
+++ b/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativelayoutitem.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro b/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro
index e90db499ce..d1146b1d1e 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro
+++ b/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro
@@ -8,7 +8,7 @@ SOURCES += tst_qdeclarativelistmodel.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro b/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro
index 8c99f0895f..e3df2c338f 100644
--- a/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro
+++ b/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro
@@ -8,7 +8,7 @@ SOURCES += tst_qdeclarativelistview.cpp incrementalmodel.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro b/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro
index b07bf9e903..29b9eb94b6 100644
--- a/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro
+++ b/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro
@@ -10,7 +10,7 @@ SOURCES += tst_qdeclarativeloader.cpp \
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
index 2cc297171c..96bea68fca 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
@@ -43,6 +43,7 @@
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativecomponent.h>
#include <QDebug>
+#include <QtCore/qlibraryinfo.h>
#include "../shared/testhttpserver.h"
#include "../../../shared/util.h"
@@ -70,6 +71,7 @@ private slots:
void remoteImportWithUnquotedUri();
void versionNotInstalled();
void versionNotInstalled_data();
+ void importPath();
};
#ifdef Q_OS_SYMBIAN
@@ -308,6 +310,29 @@ void tst_qdeclarativemoduleplugin::versionNotInstalled()
VERIFY_ERRORS(errorFile.toLatin1().constData());
}
+void tst_qdeclarativemoduleplugin::importPath()
+{
+#ifndef Q_OS_SYMBIAN
+ QSKIP("Import path order testing for Symbian only", SkipAll);
+#else
+ QDeclarativeEngine engine;
+ QStringList imports = engine.importPathList();
+ QString installImportsPath = QDir::cleanPath(QLibraryInfo::location(QLibraryInfo::ImportsPath));
+ QString driveOrder(QLatin1String("ZABCDEFGHIJKLMNOPQRSTUVWXY"));
+ int lastOrder = 30;
+ foreach(QString import, imports)
+ {
+ if (import.endsWith(installImportsPath))
+ {
+ int order = driveOrder.indexOf(import[0]);
+ QVERIFY(order < lastOrder);
+ lastOrder = order;
+ }
+ }
+ QVERIFY(lastOrder != 30);
+#endif
+}
+
QTEST_MAIN(tst_qdeclarativemoduleplugin)
#include "tst_qdeclarativemoduleplugin.moc"
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro
index a92d3a256f..2716a8bdf5 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro
@@ -9,7 +9,7 @@ CONFIG -= app_bundle
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro b/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro
index 3d39aa8ab0..fec73c54a0 100644
--- a/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro
+++ b/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro
@@ -8,7 +8,7 @@ SOURCES += tst_qdeclarativemousearea.cpp ../shared/testhttpserver.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro b/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro
index f9ca90fe7e..9762b7c13d 100644
--- a/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro
+++ b/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativeparticles.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro b/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro
index 04fd26b125..3270c5e2f3 100644
--- a/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro
+++ b/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativepathview.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativepincharea/qdeclarativepincharea.pro b/tests/auto/declarative/qdeclarativepincharea/qdeclarativepincharea.pro
index 2c1364411a..3bdb3fcc0f 100644
--- a/tests/auto/declarative/qdeclarativepincharea/qdeclarativepincharea.pro
+++ b/tests/auto/declarative/qdeclarativepincharea/qdeclarativepincharea.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativepincharea.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro b/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro
index 31303640ec..2e2c6bcb77 100644
--- a/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro
+++ b/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro
@@ -12,7 +12,7 @@ SOURCES += ../shared/testhttpserver.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro b/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro
index 5dc7bb810a..f2c9eee9be 100644
--- a/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro
+++ b/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro
@@ -6,7 +6,7 @@ macx:CONFIG -= app_bundle
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro
index 4121a335b6..504a371094 100644
--- a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro
+++ b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativeproperty.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro
index 9e698feb40..a963140969 100644
--- a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro
+++ b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro
@@ -6,7 +6,7 @@ macx:CONFIG -= app_bundle
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro b/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro
index f3ff9ed5c9..0f3773c334 100644
--- a/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro
+++ b/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativerepeater.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro b/tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro
index c2d30a0c11..8a633559db 100644
--- a/tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro
+++ b/tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro
@@ -11,7 +11,7 @@ INCLUDEPATH += ../shared
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro b/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro
index 872aeb9888..e770d464a3 100644
--- a/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro
+++ b/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativesmoothedanimation.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativespringanimation/qdeclarativespringanimation.pro b/tests/auto/declarative/qdeclarativespringanimation/qdeclarativespringanimation.pro
index 213b262fce..07bcbe7c48 100644
--- a/tests/auto/declarative/qdeclarativespringanimation/qdeclarativespringanimation.pro
+++ b/tests/auto/declarative/qdeclarativespringanimation/qdeclarativespringanimation.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativespringanimation.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro b/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro
index 1462c9a28b..400512d095 100644
--- a/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro
+++ b/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro
@@ -8,7 +8,7 @@ SOURCES += tst_qdeclarativesqldatabase.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash3.qml b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash3.qml
new file mode 100644
index 0000000000..ed1f22f39a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash3.qml
@@ -0,0 +1,27 @@
+import QtQuick 1.0
+
+Rectangle {
+ id: myRect
+ width: 400
+ height: 400
+
+ onHeightChanged: console.log("base state")
+
+ states: [
+ State {
+ name: "state1"
+ PropertyChanges {
+ target: myRect
+ onHeightChanged: console.log("state1")
+ color: "green"
+ }
+ },
+ State {
+ name: "state2";
+ PropertyChanges {
+ target: myRect
+ onHeightChanged: console.log("state2")
+ color: "red"
+ }
+ }]
+}
diff --git a/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro b/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
index 2bae041398..cb3e0fe854 100644
--- a/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
+++ b/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativestates.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
index 9fafa7d1fd..e90e6fb926 100644
--- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
+++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
@@ -113,6 +113,7 @@ private slots:
void signalOverride();
void signalOverrideCrash();
void signalOverrideCrash2();
+ void signalOverrideCrash3();
void parentChange();
void parentChangeErrors();
void anchorChanges();
@@ -520,6 +521,22 @@ void tst_qdeclarativestates::signalOverrideCrash2()
delete rect;
}
+void tst_qdeclarativestates::signalOverrideCrash3()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/signalOverrideCrash3.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QDeclarativeItemPrivate::get(rect)->setState("state1");
+ QDeclarativeItemPrivate::get(rect)->setState("");
+ QDeclarativeItemPrivate::get(rect)->setState("state2");
+ QDeclarativeItemPrivate::get(rect)->setState("");
+
+ delete rect;
+}
+
void tst_qdeclarativestates::parentChange()
{
QDeclarativeEngine engine;
diff --git a/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro b/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro
index c1a36fdcbb..28a9fcd5d6 100644
--- a/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro
+++ b/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro
@@ -12,7 +12,7 @@ SOURCES += ../shared/testhttpserver.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro b/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro
index 4b6bd49de2..8606eb0589 100644
--- a/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro
+++ b/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro
@@ -8,7 +8,7 @@ HEADERS += ../shared/testhttpserver.h
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
index 33f74a9adf..4d8bd0b6e4 100644
--- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
+++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
@@ -156,6 +156,7 @@ private slots:
void inputContextMouseHandler();
void inputMethodComposing();
void cursorRectangleSize();
+ void deselect();
private:
void simulateKey(QDeclarativeView *, int key, Qt::KeyboardModifiers modifiers = 0);
@@ -2699,6 +2700,120 @@ void tst_qdeclarativetextedit::cursorRectangleSize()
QCOMPARE(microFocusFromScene.size(), cursorRect.size());
QCOMPARE(microFocusFromApp.size(), cursorRect.size());
}
+
+void tst_qdeclarativetextedit::deselect()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/CursorRect.qml");
+ QVERIFY(canvas->rootObject() != 0);
+ canvas->show();
+ canvas->setFocus();
+ QApplication::setActiveWindow(canvas);
+ QTest::qWaitForWindowShown(canvas);
+
+ QDeclarativeTextEdit *textEdit = qobject_cast<QDeclarativeTextEdit *>(canvas->rootObject());
+ QVERIFY(textEdit != 0);
+
+ textEdit->setText("Select");
+
+ QSignalSpy selectionStartSpy(textEdit, SIGNAL(selectionStartChanged()));
+ QSignalSpy selectionEndSpy(textEdit, SIGNAL(selectionEndChanged()));
+ QSignalSpy selectionSpy(textEdit, SIGNAL(selectionChanged()));
+
+ textEdit->select(5, 6);
+
+ QCOMPARE(selectionStartSpy.count(), 1);
+ QCOMPARE(selectionEndSpy.count(), 1);
+ QCOMPARE(selectionSpy.count(), 1);
+ QCOMPARE(textEdit->selectionStart(), 5);
+ QCOMPARE(textEdit->selectionEnd(), 6);
+ QCOMPARE(textEdit->selectedText(), QLatin1String("t"));
+ QCOMPARE(textEdit->cursorPosition(), 6);
+
+ textEdit->deselect();
+
+ QCOMPARE(selectionStartSpy.count(), 2);
+ QCOMPARE(selectionEndSpy.count(), 1);
+ QCOMPARE(selectionSpy.count(), 2);
+ QCOMPARE(textEdit->selectionStart(), textEdit->cursorPosition());
+ QCOMPARE(textEdit->selectionEnd(), textEdit->cursorPosition());
+ QCOMPARE(textEdit->selectedText(), QLatin1String(""));
+ QCOMPARE(textEdit->cursorPosition(), 6);
+
+ textEdit->select(5, 6);
+
+ QCOMPARE(selectionStartSpy.count(), 3);
+ QCOMPARE(selectionEndSpy.count(), 1);
+ QCOMPARE(selectionSpy.count(), 3);
+ QCOMPARE(textEdit->selectionStart(), 5);
+ QCOMPARE(textEdit->selectionEnd(), 6);
+ QCOMPARE(textEdit->selectedText(), QLatin1String("t"));
+ QCOMPARE(textEdit->cursorPosition(), 6);
+
+ QKeyEvent leftArrowPress(QEvent::KeyPress, Qt::Key_Left, Qt::NoModifier);
+ QKeyEvent leftArrowRelese(QEvent::KeyRelease, Qt::Key_Left, Qt::NoModifier);
+ QApplication::sendEvent(canvas, &leftArrowPress);
+ QApplication::sendEvent(canvas, &leftArrowRelese);
+
+ QCOMPARE(selectionStartSpy.count(), 3);
+ QCOMPARE(selectionEndSpy.count(), 2);
+ QCOMPARE(selectionSpy.count(), 4);
+ QCOMPARE(textEdit->selectionStart(), textEdit->cursorPosition());
+ QCOMPARE(textEdit->selectionEnd(), textEdit->cursorPosition());
+ QCOMPARE(textEdit->selectedText(), QLatin1String(""));
+ QCOMPARE(textEdit->cursorPosition(), 5);
+
+ textEdit->select(5, 6);
+
+ QCOMPARE(selectionStartSpy.count(), 3);
+ QCOMPARE(selectionEndSpy.count(), 3);
+ QCOMPARE(selectionSpy.count(), 5);
+ QCOMPARE(textEdit->selectionStart(), 5);
+ QCOMPARE(textEdit->selectionEnd(), 6);
+ QCOMPARE(textEdit->selectedText(), QLatin1String("t"));
+ QCOMPARE(textEdit->cursorPosition(), 6);
+
+ QList<QInputMethodEvent::Attribute> attributes;
+ attributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 0, 0, QVariant());
+ QInputMethodEvent event(QLatin1String(""), attributes);
+ QApplication::sendEvent(canvas, &event);
+
+ QCOMPARE(selectionStartSpy.count(), 4);
+ QCOMPARE(selectionEndSpy.count(), 4);
+ QCOMPARE(selectionSpy.count(), 6);
+ QCOMPARE(textEdit->selectionStart(), textEdit->cursorPosition());
+ QCOMPARE(textEdit->selectionEnd(), textEdit->cursorPosition());
+ QCOMPARE(textEdit->selectedText(), QLatin1String(""));
+ QCOMPARE(textEdit->cursorPosition(), 0);
+
+ textEdit->setCursorPosition(1);
+
+ QCOMPARE(selectionStartSpy.count(), 5);
+ QCOMPARE(selectionEndSpy.count(), 5);
+ QCOMPARE(selectionSpy.count(), 6);
+
+ QKeyEvent leftArrowShiftPress(QEvent::KeyPress, Qt::Key_Left, Qt::ShiftModifier);
+ QKeyEvent leftArrowShiftRelese(QEvent::KeyRelease, Qt::Key_Left, Qt::ShiftModifier);
+ QApplication::sendEvent(canvas, &leftArrowShiftPress);
+ QApplication::sendEvent(canvas, &leftArrowShiftRelese);
+
+ QCOMPARE(selectionStartSpy.count(), 6);
+ QCOMPARE(selectionEndSpy.count(), 5);
+ QCOMPARE(selectionSpy.count(), 7);
+ QCOMPARE(textEdit->selectionStart(), 0);
+ QCOMPARE(textEdit->selectionEnd(), 1);
+ QCOMPARE(textEdit->selectedText(), QLatin1String("S"));
+ QCOMPARE(textEdit->cursorPosition(), 0);
+
+ QApplication::sendEvent(canvas, &event);
+
+ QCOMPARE(selectionStartSpy.count(), 6);
+ QCOMPARE(selectionEndSpy.count(), 6);
+ QCOMPARE(selectionSpy.count(), 8);
+ QCOMPARE(textEdit->selectionStart(), textEdit->cursorPosition());
+ QCOMPARE(textEdit->selectionEnd(), textEdit->cursorPosition());
+ QCOMPARE(textEdit->selectedText(), QLatin1String(""));
+ QCOMPARE(textEdit->cursorPosition(), 0);
+}
QTEST_MAIN(tst_qdeclarativetextedit)
#include "tst_qdeclarativetextedit.moc"
diff --git a/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro b/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro
index 8f42448587..7d178d707c 100644
--- a/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro
+++ b/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativetextinput.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index bb895bfbbf..b077670fcd 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -147,6 +147,7 @@ private slots:
void inputContextMouseHandler();
void inputMethodComposing();
void cursorRectangleSize();
+ void deselect();
private:
void simulateKey(QDeclarativeView *, int key);
@@ -2367,7 +2368,7 @@ void tst_qdeclarativetextinput::openInputPanelOnFocus()
QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled));
// input method should not be enabled
- // if TextEdit is read only.
+ // if TextInput is read only.
input.setReadOnly(true);
ic.openInputPanelReceived = false;
input.setFocus(true);
@@ -2815,6 +2816,120 @@ void tst_qdeclarativetextinput::cursorRectangleSize()
QCOMPARE(microFocusFromApp.size(), cursorRect.size());
}
+void tst_qdeclarativetextinput::deselect()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/positionAt.qml");
+ QVERIFY(canvas->rootObject() != 0);
+ canvas->show();
+ canvas->setFocus();
+ QApplication::setActiveWindow(canvas);
+ QTest::qWaitForWindowShown(canvas);
+
+ QDeclarativeTextInput *textInput = qobject_cast<QDeclarativeTextInput *>(canvas->rootObject());
+ QVERIFY(textInput != 0);
+
+ textInput->setText("Select");
+
+ QSignalSpy selectionStartSpy(textInput, SIGNAL(selectionStartChanged()));
+ QSignalSpy selectionEndSpy(textInput, SIGNAL(selectionEndChanged()));
+ QSignalSpy selectedTextSpy(textInput, SIGNAL(selectedTextChanged()));
+
+ textInput->select(5, 6);
+
+ QCOMPARE(selectionStartSpy.count(), 1);
+ QCOMPARE(selectionEndSpy.count(), 0);
+ QCOMPARE(selectedTextSpy.count(), 1);
+ QCOMPARE(textInput->selectionStart(), 5);
+ QCOMPARE(textInput->selectionEnd(), 6);
+ QCOMPARE(textInput->selectedText(), QLatin1String("t"));
+ QCOMPARE(textInput->cursorPosition(), 6);
+
+ textInput->deselect();
+
+ QCOMPARE(selectionStartSpy.count(), 2);
+ QCOMPARE(selectionEndSpy.count(), 1);
+ QCOMPARE(selectedTextSpy.count(), 2);
+ QCOMPARE(textInput->selectionStart(), textInput->cursorPosition());
+ QCOMPARE(textInput->selectionEnd(), textInput->cursorPosition());
+ QCOMPARE(textInput->selectedText(), QLatin1String(""));
+ QCOMPARE(textInput->cursorPosition(), 6);
+
+ textInput->select(5, 6);
+
+ QCOMPARE(selectionStartSpy.count(), 3);
+ QCOMPARE(selectionEndSpy.count(), 1);
+ QCOMPARE(selectedTextSpy.count(), 3);
+ QCOMPARE(textInput->selectionStart(), 5);
+ QCOMPARE(textInput->selectionEnd(), 6);
+ QCOMPARE(textInput->selectedText(), QLatin1String("t"));
+ QCOMPARE(textInput->cursorPosition(), 6);
+
+ QKeyEvent leftArrowPress(QEvent::KeyPress, Qt::Key_Left, Qt::NoModifier);
+ QKeyEvent leftArrowRelese(QEvent::KeyRelease, Qt::Key_Left, Qt::NoModifier);
+ QApplication::sendEvent(canvas, &leftArrowPress);
+ QApplication::sendEvent(canvas, &leftArrowRelese);
+
+ QCOMPARE(selectionStartSpy.count(), 4);
+ QCOMPARE(selectionEndSpy.count(), 2);
+ QCOMPARE(selectedTextSpy.count(), 4);
+ QCOMPARE(textInput->selectionStart(), textInput->cursorPosition());
+ QCOMPARE(textInput->selectionEnd(), textInput->cursorPosition());
+ QCOMPARE(textInput->selectedText(), QLatin1String(""));
+ QCOMPARE(textInput->cursorPosition(), 5);
+
+ textInput->select(5, 6);
+
+ QCOMPARE(selectionStartSpy.count(), 4);
+ QCOMPARE(selectionEndSpy.count(), 3);
+ QCOMPARE(selectedTextSpy.count(), 5);
+ QCOMPARE(textInput->selectionStart(), 5);
+ QCOMPARE(textInput->selectionEnd(), 6);
+ QCOMPARE(textInput->selectedText(), QLatin1String("t"));
+ QCOMPARE(textInput->cursorPosition(), 6);
+
+ QList<QInputMethodEvent::Attribute> attributes;
+ attributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 0, 0, QVariant());
+ QInputMethodEvent event(QLatin1String(""), attributes);
+ QApplication::sendEvent(canvas, &event);
+
+ QCOMPARE(selectionStartSpy.count(), 5);
+ QCOMPARE(selectionEndSpy.count(), 4);
+ QCOMPARE(selectedTextSpy.count(), 6);
+ QCOMPARE(textInput->selectionStart(), textInput->cursorPosition());
+ QCOMPARE(textInput->selectionEnd(), textInput->cursorPosition());
+ QCOMPARE(textInput->selectedText(), QLatin1String(""));
+ QCOMPARE(textInput->cursorPosition(), 0);
+
+ textInput->setCursorPosition(1);
+
+ QCOMPARE(selectionStartSpy.count(), 6);
+ QCOMPARE(selectionEndSpy.count(), 5);
+ QCOMPARE(selectedTextSpy.count(), 6);
+
+ QKeyEvent leftArrowShiftPress(QEvent::KeyPress, Qt::Key_Left, Qt::ShiftModifier);
+ QKeyEvent leftArrowShiftRelese(QEvent::KeyRelease, Qt::Key_Left, Qt::ShiftModifier);
+ QApplication::sendEvent(canvas, &leftArrowShiftPress);
+ QApplication::sendEvent(canvas, &leftArrowShiftRelese);
+
+ QCOMPARE(selectionStartSpy.count(), 7);
+ QCOMPARE(selectionEndSpy.count(), 5);
+ QCOMPARE(selectedTextSpy.count(), 7);
+ QCOMPARE(textInput->selectionStart(), 0);
+ QCOMPARE(textInput->selectionEnd(), 1);
+ QCOMPARE(textInput->selectedText(), QLatin1String("S"));
+ QCOMPARE(textInput->cursorPosition(), 0);
+
+ QApplication::sendEvent(canvas, &event);
+
+ QCOMPARE(selectionStartSpy.count(), 8);
+ QCOMPARE(selectionEndSpy.count(), 6);
+ QCOMPARE(selectedTextSpy.count(), 8);
+ QCOMPARE(textInput->selectionStart(), textInput->cursorPosition());
+ QCOMPARE(textInput->selectionEnd(), textInput->cursorPosition());
+ QCOMPARE(textInput->selectedText(), QLatin1String(""));
+ QCOMPARE(textInput->cursorPosition(), 0);
+}
+
QTEST_MAIN(tst_qdeclarativetextinput)
#include "tst_qdeclarativetextinput.moc"
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro b/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro
index 90e46d3967..56c3cd409c 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro
+++ b/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro
@@ -10,7 +10,7 @@ SOURCES += tst_qdeclarativevaluetypes.cpp \
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro b/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro
index 21a9195606..2f0a4749e8 100644
--- a/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro
+++ b/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativeview.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro b/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro
index 6189916a43..08adf26da7 100644
--- a/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro
+++ b/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro
@@ -9,7 +9,7 @@ SOURCES += tst_qdeclarativeviewer.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro b/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro
index 92e5f605b7..d0d9b36ca3 100644
--- a/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro
+++ b/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativevisualdatamodel.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro b/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro
index 562a9fbf3f..2ab27a19ab 100644
--- a/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro
+++ b/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro
@@ -8,7 +8,7 @@ SOURCES += tst_qdeclarativewebview.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro
index 2f8f23db35..9d4e0ed5fb 100644
--- a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro
+++ b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qdeclarativeworkerscript.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro b/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro
index 619b239174..bfd47c5340 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro
@@ -11,7 +11,7 @@ SOURCES += tst_qdeclarativexmlhttprequest.cpp \
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro
index efcea12675..80c57115d3 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro
@@ -11,7 +11,7 @@ SOURCES += tst_qdeclarativexmllistmodel.cpp
symbian: {
importFiles.sources = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qmlvisual/qmlvisual.pro b/tests/auto/declarative/qmlvisual/qmlvisual.pro
index b2c5b4f52b..0977fe41b0 100644
--- a/tests/auto/declarative/qmlvisual/qmlvisual.pro
+++ b/tests/auto/declarative/qmlvisual/qmlvisual.pro
@@ -27,7 +27,7 @@ symbian: {
repeater \
selftest_noimages \
webview
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += QT_TEST_SOURCE_DIR=\"\\\"$$PWD\\\"\"
}
diff --git a/tests/auto/qapplication/test/test.pro b/tests/auto/qapplication/test/test.pro
index d946e7e4ae..e1193c2c35 100644
--- a/tests/auto/qapplication/test/test.pro
+++ b/tests/auto/qapplication/test/test.pro
@@ -8,7 +8,7 @@ wince* {
additional.path = desktopsettingsaware
someTest.sources = test.pro
someTest.path = test
- DEPLOYMENT = additional deploy someTest
+ DEPLOYMENT += additional deploy someTest
}
symbian: {
diff --git a/tests/auto/qaudioinput/qaudioinput.pro b/tests/auto/qaudioinput/qaudioinput.pro
index 5eb1613d5d..0bbbb19c75 100644
--- a/tests/auto/qaudioinput/qaudioinput.pro
+++ b/tests/auto/qaudioinput/qaudioinput.pro
@@ -6,7 +6,7 @@ QT = core multimedia
wince* {
deploy.sources += 4.wav
- DEPLOYMENT = deploy
+ DEPLOYMENT += deploy
DEFINES += SRCDIR=\\\"\\\"
QT += gui
} else {
diff --git a/tests/auto/qaudiooutput/qaudiooutput.pro b/tests/auto/qaudiooutput/qaudiooutput.pro
index e1734e0b07..09d7ae3ae4 100644
--- a/tests/auto/qaudiooutput/qaudiooutput.pro
+++ b/tests/auto/qaudiooutput/qaudiooutput.pro
@@ -6,7 +6,7 @@ QT = core multimedia
wince*|symbian: {
deploy.sources += 4.wav
- DEPLOYMENT = deploy
+ DEPLOYMENT += deploy
!symbian {
DEFINES += SRCDIR=\\\"\\\"
QT += gui
diff --git a/tests/auto/qchar/qchar.pro b/tests/auto/qchar/qchar.pro
index 3813e4e3f2..2cb5201b92 100644
--- a/tests/auto/qchar/qchar.pro
+++ b/tests/auto/qchar/qchar.pro
@@ -4,8 +4,8 @@ SOURCES += tst_qchar.cpp
QT = core
wince*|symbian: {
-deploy.sources += NormalizationTest.txt
-DEPLOYMENT = deploy
+ deploy.sources += NormalizationTest.txt
+ DEPLOYMENT += deploy
}
symbian: {
diff --git a/tests/auto/qclipboard/test/test.pro b/tests/auto/qclipboard/test/test.pro
index 97b0c9c320..9043f6938c 100644
--- a/tests/auto/qclipboard/test/test.pro
+++ b/tests/auto/qclipboard/test/test.pro
@@ -15,7 +15,7 @@ wince*|symbian: {
copier.path = copier
paster.sources = ../paster/paster.exe
paster.path = paster
-
+
symbian: {
LIBS += -lbafl -lestor -letext
@@ -27,6 +27,6 @@ wince*|symbian: {
reg_resource.sources += $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/paster_reg.rsc
reg_resource.path = $$REG_RESOURCE_IMPORT_DIR
}
-
- DEPLOYMENT = copier paster rsc reg_resource
+
+ DEPLOYMENT += copier paster rsc reg_resource
} \ No newline at end of file
diff --git a/tests/auto/qfile/test/test.pro b/tests/auto/qfile/test/test.pro
index 70c93ce2fb..9a2d84706d 100644
--- a/tests/auto/qfile/test/test.pro
+++ b/tests/auto/qfile/test/test.pro
@@ -10,7 +10,7 @@ wince*|symbian {
resour.sources += ..\\resources\\file1.ext1
resour.path = resources
- DEPLOYMENT = files resour
+ DEPLOYMENT += files resour
}
wince* {
diff --git a/tests/auto/qfileinfo/qfileinfo.pro b/tests/auto/qfileinfo/qfileinfo.pro
index 30656e25da..8f04178032 100644
--- a/tests/auto/qfileinfo/qfileinfo.pro
+++ b/tests/auto/qfileinfo/qfileinfo.pro
@@ -10,14 +10,14 @@ wince*:|symbian: {
deploy.sources += qfileinfo.qrc tst_qfileinfo.cpp
res.sources = resources\\file1 resources\\file1.ext1 resources\\file1.ext1.ext2
res.path = resources
- DEPLOYMENT = deploy res
+ DEPLOYMENT += deploy res
}
symbian {
TARGET.CAPABILITY=AllFiles
LIBS *= -lefsrv
INCLUDEPATH *= $$MW_LAYER_SYSTEMINCLUDE # Needed for e32svr.h in S^3 envs
- }
+}
# support for running test from shadow build directory
wince* {
diff --git a/tests/auto/qhttp/qhttp.pro b/tests/auto/qhttp/qhttp.pro
index c0be51810d..b7b78f1f37 100644
--- a/tests/auto/qhttp/qhttp.pro
+++ b/tests/auto/qhttp/qhttp.pro
@@ -11,7 +11,7 @@ wince*: {
cgi.path = webserver/cgi-bin
addFiles.sources = rfc3252.txt trolltech
addFiles.path = .
- DEPLOYMENT = addFiles webFiles cgi
+ DEPLOYMENT += addFiles webFiles cgi
DEFINES += SRCDIR=\\\"\\\"
} else:symbian {
webFiles.sources = webserver/*
@@ -20,7 +20,7 @@ wince*: {
cgi.path = webserver/cgi-bin
addFiles.sources = rfc3252.txt trolltech
addFiles.path = .
- DEPLOYMENT = addFiles webFiles cgi
+ DEPLOYMENT += addFiles webFiles cgi
TARGET.CAPABILITY = NetworkServices
} else:vxworks*: {
DEFINES += SRCDIR=\\\"\\\"
diff --git a/tests/auto/qlocalsocket/test/test.pro b/tests/auto/qlocalsocket/test/test.pro
index 687aae2b56..ffdadd3337 100644
--- a/tests/auto/qlocalsocket/test/test.pro
+++ b/tests/auto/qlocalsocket/test/test.pro
@@ -42,9 +42,9 @@ symbian {
wince*|symbian {
scriptFiles.sources = ../lackey/scripts/*.js
scriptFiles.path = lackey/scripts
- DEPLOYMENT = additionalFiles scriptFiles
+ DEPLOYMENT += additionalFiles scriptFiles
QT += script # for easy deployment of QtScript
-
+
requires(contains(QT_CONFIG,script))
}
diff --git a/tests/auto/qnetworkreply/.gitattributes b/tests/auto/qnetworkreply/.gitattributes
index 80252cfd34..7fa30e3f99 100644
--- a/tests/auto/qnetworkreply/.gitattributes
+++ b/tests/auto/qnetworkreply/.gitattributes
@@ -1,3 +1,4 @@
rfc3252.txt -crlf
bigfile -crlf
resource -crlf
+index.html -crlf
diff --git a/tests/auto/qnetworkreply/index.html b/tests/auto/qnetworkreply/index.html
new file mode 100644
index 0000000000..135db790a9
--- /dev/null
+++ b/tests/auto/qnetworkreply/index.html
@@ -0,0 +1,3 @@
+<h1>Welcome to qt-test-server</h1>
+<img src="gif/fluke.gif" alt="fluke">
+<p>This is a network test server. It serves as a cacheing ftp and http proxy, transparent http/socks5 proxy, imap, ftp and http server, plus more.</p>
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index ebf82959f8..7e5b3651af 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -178,6 +178,8 @@ private Q_SLOTS:
void getFromHttp();
void getErrors_data();
void getErrors();
+ void headFromHttp_data();
+ void headFromHttp();
void putToFile_data();
void putToFile();
void putToFtp_data();
@@ -1484,6 +1486,65 @@ void tst_QNetworkReply::getFromHttp()
QCOMPARE(reply->readAll(), reference.readAll());
}
+void tst_QNetworkReply::headFromHttp_data()
+{
+ QTest::addColumn<qint64>("referenceSize");
+ QTest::addColumn<QUrl>("url");
+ QTest::addColumn<QString>("contentType");
+ QTest::addColumn<QNetworkProxy>("proxy");
+
+ qint64 rfcsize = QFileInfo(SRCDIR "/rfc3252.txt").size();
+ qint64 bigfilesize = QFileInfo(SRCDIR "/bigfile").size();
+ qint64 indexsize = QFileInfo(SRCDIR "/index.html").size();
+
+ //testing proxies, mainly for the 407 response from http proxy
+ for (int i = 0; i < proxies.count(); ++i) {
+ QTest::newRow("rfc" + proxies.at(i).tag) << rfcsize << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt") << "text/plain" << proxies.at(i).proxy;
+ QTest::newRow("bigfile" + proxies.at(i).tag) << bigfilesize << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/bigfile") << "text/plain" << proxies.at(i).proxy;
+ QTest::newRow("index" + proxies.at(i).tag) << indexsize << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/") << "text/html" << proxies.at(i).proxy;
+ QTest::newRow("with-authentication" + proxies.at(i).tag) << rfcsize << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfcs-auth/rfc3252.txt") << "text/plain" << proxies.at(i).proxy;
+ QTest::newRow("cgi" + proxies.at(i).tag) << (qint64)-1 << QUrl("http://qt-test-server/qtest/cgi-bin/httpcachetest_expires500.cgi") << "text/html" << proxies.at(i).proxy;
+ }
+}
+
+void tst_QNetworkReply::headFromHttp()
+{
+ QFETCH(qint64, referenceSize);
+ QFETCH(QUrl, url);
+ QFETCH(QString, contentType);
+ QFETCH(QNetworkProxy, proxy);
+
+ QNetworkRequest request(url);
+ QNetworkReplyPtr reply;
+
+ QElapsedTimer time;
+ time.start();
+
+ manager.setProxy(proxy);
+ connect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
+ SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
+ connect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
+ SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
+
+ RUN_REQUEST(runSimpleRequest(QNetworkAccessManager::HeadOperation, request, reply));
+
+ manager.disconnect(SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
+ this, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
+ manager.disconnect(SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
+ this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
+
+ QVERIFY(time.elapsed() < 8000); //check authentication didn't wait for the server to timeout the http connection (15s on qt test server)
+
+ QCOMPARE(reply->url(), request.url());
+ QCOMPARE(reply->error(), QNetworkReply::NoError);
+ QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200);
+ // only compare when the header is set.
+ if (reply->header(QNetworkRequest::ContentLengthHeader).isValid() && referenceSize >= 0)
+ QCOMPARE(reply->header(QNetworkRequest::ContentLengthHeader).toLongLong(), referenceSize);
+ if (reply->header(QNetworkRequest::ContentTypeHeader).isValid())
+ QCOMPARE(reply->header(QNetworkRequest::ContentTypeHeader).toString(), contentType);
+}
+
void tst_QNetworkReply::getErrors_data()
{
QTest::addColumn<QString>("url");
diff --git a/tests/auto/qsound/qsound.pro b/tests/auto/qsound/qsound.pro
index bb1981c2b4..e3279f36f7 100644
--- a/tests/auto/qsound/qsound.pro
+++ b/tests/auto/qsound/qsound.pro
@@ -3,7 +3,7 @@ SOURCES += tst_qsound.cpp
wince*|symbian: {
deploy.sources += 4.wav
- DEPLOYMENT = deploy
+ DEPLOYMENT += deploy
!symbian:DEFINES += SRCDIR=\\\"\\\"
} else {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 43dd07796c..2161f99038 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -397,6 +397,9 @@ private slots:
void minimizedWindowModeTransitions();
void normalWindowModeTransitions();
void focusSwitchClosesPopupMenu();
+#if !defined(Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE)
+ void opacityChangeCausesBackingStoreRecreation();
+#endif
#endif
void focusProxyAndInputMethods();
@@ -10336,7 +10339,47 @@ void tst_QWidget::focusSwitchClosesPopupMenu()
mainWindow.activateWindow();
QVERIFY(!CEikonEnv::Static()->AppUiFactory()->MenuBar()->IsDisplayed());
}
-#endif
+
+#if !defined(Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE)
+class OpacityChangeWidget : public QWidget
+{
+public:
+ OpacityChangeWidget() : m_paintEngineType(QPaintEngine::MaxUser) { }
+ void paintEvent(QPaintEvent *)
+ {
+ QPainter painter(this);
+ m_paintEngineType = painter.paintEngine()->type();
+ }
+ QPaintEngine::Type paintEngineType() const { return m_paintEngineType; }
+private:
+ QPaintEngine::Type m_paintEngineType;
+};
+
+void tst_QWidget::opacityChangeCausesBackingStoreRecreation()
+{
+ OpacityChangeWidget w;
+ w.show();
+ QTest::qWaitForWindowShown(&w);
+ const QPaintEngine::Type type = w.paintEngineType();
+ if (QPaintEngine::OpenGL != type && QPaintEngine::OpenVG != type) {
+ QSKIP("Test case is only valid when using opengl or openvg graphics system", SkipAll);
+ } else {
+ if (QApplicationPrivate::instance()->useTranslucentEGLSurfaces) {
+ QSKIP("Test case is only valid when EGL surface transparency is not supported", SkipAll);
+ } else {
+ // Making window transparent should force switch to raster graphics system
+ w.setAttribute(Qt::WA_TranslucentBackground, true);
+ w.repaint();
+ QCOMPARE(w.paintEngineType(), QPaintEngine::Raster);
+ // Making window opaque should cause switch back to previous graphics system
+ w.setAttribute(Qt::WA_TranslucentBackground, false);
+ w.repaint();
+ QCOMPARE(w.paintEngineType(), type);
+ }
+ }
+}
+#endif // !Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
+#endif // Q_OS_SYMBIAN
class InputContextTester : public QInputContext
{
diff --git a/tests/benchmarks/declarative/binding/binding.pro b/tests/benchmarks/declarative/binding/binding.pro
index c1a8223c09..b93977a53c 100644
--- a/tests/benchmarks/declarative/binding/binding.pro
+++ b/tests/benchmarks/declarative/binding/binding.pro
@@ -10,7 +10,7 @@ HEADERS += testtypes.h
symbian {
data.sources = data
data.path = .
- DEPLOYMENT = data
+ DEPLOYMENT += data
} else {
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro b/tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro
index a68792b981..313282bc11 100644
--- a/tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro
+++ b/tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro
@@ -10,7 +10,7 @@ SOURCES += tst_qdeclarativeimage.cpp
symbian {
importFiles.sources = image.png
importFiles.path =
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/benchmarks/declarative/script/script.pro b/tests/benchmarks/declarative/script/script.pro
index 685ba03dcb..759c6dd4e9 100644
--- a/tests/benchmarks/declarative/script/script.pro
+++ b/tests/benchmarks/declarative/script/script.pro
@@ -10,7 +10,7 @@ SOURCES += tst_script.cpp
symbian {
importFiles.sources = data
importFiles.path =
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/translations/qt_ko.ts b/translations/qt_ko.ts
index c7ab8e3638..b9e30f5b5e 100644
--- a/translations/qt_ko.ts
+++ b/translations/qt_ko.ts
@@ -6328,11 +6328,11 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>Touroku</source>
- <translation type="unfinished"></translation>
+ <translation>단어 등록</translation>
</message>
<message>
<source>Massyo</source>
- <translation type="unfinished"></translation>
+ <translation>단어 지움</translation>
</message>
<message>
<source>Kana Lock</source>
@@ -6344,11 +6344,11 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>Eisu Shift</source>
- <translation type="unfinished"></translation>
+ <translation>한자 Shift</translation>
</message>
<message>
<source>Eisu toggle</source>
- <translation type="unfinished"></translation>
+ <translation>한자 반전</translation>
</message>
<message>
<source>Code input</source>