summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-11-24 15:22:19 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-11-24 15:22:19 (GMT)
commit97aa8ad5ec6b5d23ad023518db92fa91d5fa7fe0 (patch)
treedd3645a6afc426a804e73df378c3d47906a8bcf9
parent8eea9828289b842c8a300f1f4309d059b15fd7b0 (diff)
parent792e43aa2607d21deeada4b9f14bb82dc96ad4ec (diff)
downloadQt-97aa8ad5ec6b5d23ad023518db92fa91d5fa7fe0.zip
Qt-97aa8ad5ec6b5d23ad023518db92fa91d5fa7fe0.tar.gz
Qt-97aa8ad5ec6b5d23ad023518db92fa91d5fa7fe0.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6
-rwxr-xr-xconfigure4
-rwxr-xr-xconfigure.exebin1175040 -> 1175040 bytes
-rw-r--r--demos/embedded/fluidlauncher/fluidlauncher.pro42
-rw-r--r--demos/qtdemo/xml/examples.xml1
-rw-r--r--demos/symbianpkgrules.pri2
-rw-r--r--dist/changes-4.6.02
-rw-r--r--doc/src/deployment/deployment.qdoc110
-rw-r--r--doc/src/frameworks-technologies/graphicsview.qdoc14
-rw-r--r--doc/src/getting-started/installation.qdoc73
-rw-r--r--doc/src/getting-started/known-issues.qdoc27
-rw-r--r--doc/src/howtos/exceptionsafety.qdoc2
-rw-r--r--doc/src/platforms/compiler-notes.qdoc5
-rw-r--r--doc/src/platforms/qt-embedded.qdoc9
-rw-r--r--doc/src/platforms/supported-platforms.qdoc4
-rw-r--r--doc/src/platforms/symbian-exceptionsafety.qdoc2
-rw-r--r--doc/src/platforms/symbian-introduction.qdoc (renamed from doc/src/platforms/s60-introduction.qdoc)103
-rw-r--r--doc/src/platforms/symbian-support.qdoc135
-rw-r--r--doc/src/platforms/winsystem.qdoc4
-rw-r--r--doc/src/qt4-intro.qdoc2
-rw-r--r--doc/src/snippets/code/doc_src_deployment.qdoc41
-rw-r--r--doc/src/snippets/code/doc_src_installation.qdoc7
-rw-r--r--doc/src/snippets/code/doc_src_symbian-introduction.qdoc (renamed from doc/src/snippets/code/doc_src_s60-introduction.qdoc)0
-rw-r--r--examples/effects/effects.pro6
-rw-r--r--examples/itemviews/frozencolumn/freezetablewidget.cpp9
-rw-r--r--examples/itemviews/frozencolumn/freezetablewidget.h1
-rw-r--r--examples/itemviews/frozencolumn/grades.txt3
-rw-r--r--examples/symbianpkgrules.pri2
-rw-r--r--examples/webkit/domtraversal/window.h2
-rw-r--r--examples/webkit/formextractor/formextractor.pro2
-rw-r--r--examples/webkit/framecapture/framecapture.cpp40
-rw-r--r--examples/webkit/framecapture/framecapture.h2
-rw-r--r--examples/webkit/framecapture/main.cpp2
-rw-r--r--mkspecs/features/symbian/application_icon.prf35
-rw-r--r--mkspecs/features/symbian/armcc_warnings.prf3
-rw-r--r--qmake/generators/symbian/symmake.cpp21
-rw-r--r--qmake/generators/symbian/symmake.h4
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp3
-rw-r--r--qmake/generators/symbian/symmake_abld.h2
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp7
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.h2
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp3
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h8
-rw-r--r--src/3rdparty/phonon/mmf/objectdump.cpp4
-rw-r--r--src/3rdparty/phonon/mmf/objectdump.h22
-rw-r--r--src/3rdparty/phonon/mmf/objectdump_global.h30
-rw-r--r--src/3rdparty/phonon/mmf/objectdump_symbian.cpp4
-rw-r--r--src/3rdparty/phonon/mmf/objecttree.cpp4
-rw-r--r--src/3rdparty/phonon/mmf/objecttree.h6
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog17
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp5
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog9
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog19
-rw-r--r--src/corelib/animation/qvariantanimation.cpp19
-rw-r--r--src/corelib/codecs/qtextcodec.cpp6
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp2
-rw-r--r--src/corelib/io/qiodevice.cpp6
-rw-r--r--src/corelib/kernel/qobject.cpp12
-rw-r--r--src/gui/dialogs/qcolordialog_mac.mm1
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsitemanimation.cpp1
-rw-r--r--src/gui/gui.pro2
-rw-r--r--src/gui/image/qiconloader.cpp28
-rw-r--r--src/gui/image/qnativeimage.cpp2
-rw-r--r--src/gui/image/qpixmap_s60.cpp5
-rw-r--r--src/gui/image/qpixmap_s60_p.h2
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp35
-rw-r--r--src/gui/itemviews/qabstractitemview_p.h2
-rw-r--r--src/gui/itemviews/qlistview.cpp8
-rw-r--r--src/gui/itemviews/qtableview.cpp33
-rw-r--r--src/gui/itemviews/qtreeview.cpp7
-rw-r--r--src/gui/kernel/qapplication.cpp3
-rw-r--r--src/gui/kernel/qapplication_mac.mm2
-rw-r--r--src/gui/kernel/qapplication_s60.cpp2
-rw-r--r--src/gui/kernel/qcocoaapplicationdelegate_mac.mm3
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm61
-rw-r--r--src/gui/kernel/qcocoawindowdelegate_mac.mm9
-rw-r--r--src/gui/kernel/qeventdispatcher_mac.mm10
-rw-r--r--src/gui/kernel/qt_cocoa_helpers_mac.mm8
-rw-r--r--src/gui/kernel/qwidget.cpp5
-rw-r--r--src/gui/kernel/qwidget_mac.mm25
-rw-r--r--src/gui/kernel/qwidget_x11.cpp7
-rw-r--r--src/gui/styles/qgtkstyle.cpp2
-rw-r--r--src/gui/text/qtextcontrol.cpp9
-rw-r--r--src/gui/widgets/qabstractslider.cpp45
-rw-r--r--src/gui/widgets/qabstractslider_p.h33
-rw-r--r--src/gui/widgets/qcommandlinkbutton.cpp3
-rw-r--r--src/gui/widgets/qlinecontrol.cpp8
-rw-r--r--src/gui/widgets/qmenubar.cpp3
-rw-r--r--src/gui/widgets/qsizegrip.cpp29
-rw-r--r--src/gui/widgets/qtabbar.cpp4
-rw-r--r--src/gui/widgets/qtabbar_p.h3
-rw-r--r--src/gui/widgets/qtoolbararealayout_p.h2
-rw-r--r--src/network/access/qnetworkcookiejar.cpp7
-rw-r--r--src/network/kernel/qnetworkproxy_win.cpp5
-rw-r--r--src/openvg/qpaintengine_vg.cpp28
-rw-r--r--src/openvg/qpaintengine_vg_p.h2
-rw-r--r--src/openvg/qpixmapdata_vg.cpp53
-rw-r--r--src/openvg/qpixmapdata_vg_p.h1
-rw-r--r--src/openvg/qwindowsurface_vg.cpp14
-rw-r--r--src/plugins/phonon/mmf/mmf.pro6
-rw-r--r--src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro6
-rw-r--r--src/qt3support/other/q3process_unix.cpp2
-rw-r--r--src/s60installs/bwins/QtCoreu.def11
-rw-r--r--src/s60installs/bwins/QtGuiu.def3
-rw-r--r--src/s60installs/bwins/QtWebKitu.def9
-rw-r--r--src/s60installs/eabi/QtCoreu.def14
-rw-r--r--src/s60installs/eabi/QtGuiu.def2
-rw-r--r--src/s60installs/eabi/QtWebKitu.def9
-rw-r--r--src/script/api/qscriptengineagent.cpp10
-rw-r--r--src/sql/drivers/mysql/qsql_mysql.cpp18
-rw-r--r--tests/auto/guiapplauncher/guiapplauncher.pro6
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp13
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result22
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp6
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result16
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp5
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result11
-rw-r--r--tests/auto/qcommandlinkbutton/tst_qcommandlinkbutton.cpp44
-rw-r--r--tests/auto/qftp/tst_qftp.cpp19
-rw-r--r--tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp2
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp39
-rw-r--r--tests/auto/qhttp/tst_qhttp.cpp2
-rw-r--r--tests/auto/qiodevice/tst_qiodevice.cpp112
-rw-r--r--tests/auto/qlistview/tst_qlistview.cpp2
-rw-r--r--tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp23
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp2
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp13
-rw-r--r--tests/auto/qscriptable/tst_qscriptable.cpp2
-rw-r--r--tests/auto/qscriptcontext/tst_qscriptcontext.cpp2
-rw-r--r--tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp6
-rw-r--r--tests/auto/qscriptengine/tst_qscriptengine.cpp33
-rw-r--r--tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp50
-rw-r--r--tests/auto/qstatusbar/tst_qstatusbar.cpp14
-rw-r--r--tests/auto/qtabbar/tst_qtabbar.cpp6
-rw-r--r--tests/auto/qtableview/tst_qtableview.cpp8
-rw-r--r--tests/auto/qtcpserver/tst_qtcpserver.cpp2
-rw-r--r--tests/auto/qtextedit/tst_qtextedit.cpp19
-rw-r--r--tests/auto/qtextlayout/tst_qtextlayout.cpp6
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp25
-rw-r--r--tools/assistant/lib/qhelpenginecore.cpp24
-rw-r--r--tools/configure/tools.cpp7
-rw-r--r--tools/linguist/lconvert/main.cpp6
-rw-r--r--tools/linguist/linguist/messageeditor.cpp6
-rw-r--r--tools/linguist/lupdate/cpp.cpp26
-rw-r--r--tools/linguist/lupdate/main.cpp16
-rw-r--r--tools/linguist/phrasebooks/french.qph36
-rw-r--r--tools/linguist/shared/translator.cpp11
-rw-r--r--tools/linguist/shared/translator.h7
150 files changed, 1510 insertions, 658 deletions
diff --git a/configure b/configure
index c869e0e..0b11bf3 100755
--- a/configure
+++ b/configure
@@ -460,11 +460,11 @@ elif [ $COMMERCIAL_USER = "yes" ]; then
;;
esac
case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
- X9,* | XC,* | XU,* | XW,*)
+ X9,* | XC,* | XU,* | XW,* | XM,*)
# Qt All-OS
LICENSE_EXTENSION="-ALLOS"
;;
- 8M,* | S9,* | SC,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
+ 8M,* | KM,* | S9,* | SC,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
# Qt for Embedded Linux
LICENSE_EXTENSION="-EMBEDDED"
;;
diff --git a/configure.exe b/configure.exe
index a970696..351ed04 100755
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/demos/embedded/fluidlauncher/fluidlauncher.pro b/demos/embedded/fluidlauncher/fluidlauncher.pro
index 30f59c3..b47f6a0 100644
--- a/demos/embedded/fluidlauncher/fluidlauncher.pro
+++ b/demos/embedded/fluidlauncher/fluidlauncher.pro
@@ -59,7 +59,7 @@ symbian {
load(data_caging_paths)
TARGET.UID3 = 0xA000A641
- ICON = ../../../src/s60installs/qt.svg
+ ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg
executables.sources = \
styledemo.exe \
@@ -118,42 +118,66 @@ symbian {
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/lightmaps.rsc \
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/flightinfo.rsc
-
+
resource.path = $$APP_RESOURCE_DIR
mifs.sources = \
- $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/0xA000A641.mif \ #fluidlauncher
- $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/0xA000C611.mif #desktopservices
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/fluidlauncher.mif \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/styledemo.mif \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/deform.mif \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/pathstroke.mif \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/wiggly.mif \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/qftp.mif \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/saxbookmarks.mif \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/desktopservices.mif \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/fridgemagnets.mif \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/softkeys.mif \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/raycasting.mif \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/flickable.mif \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/digiflip.mif \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/lightmaps.mif \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/flightinfo.mif
mifs.path = $$APP_RESOURCE_DIR
- contains(QT_CONFIG, svg) {
- executables.sources += \
+ contains(QT_CONFIG, svg) {
+ executables.sources += \
embeddedsvgviewer.exe \
weatherinfo.exe
-
+
reg_resource.sources += \
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/embeddedsvgviewer_reg.rsc \
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/weatherinfo_reg.rsc
-
+
resource.sources += \
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/embeddedsvgviewer.rsc \
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/weatherinfo.rsc
+
+ mifs.sources += \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/embeddedsvgviewer.mif \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/weatherinfo.mif
+
}
contains(QT_CONFIG, webkit) {
executables.sources += anomaly.exe
reg_resource.sources += $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/anomaly_reg.rsc
resource.sources += $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/anomaly.rsc
+ mifs.sources += \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/anomaly.mif
}
contains(QT_CONFIG, phonon) {
executables.sources += qmediaplayer.exe
resource.sources += $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/qmediaplayer.rsc
+ mifs.sources += \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/qmediaplayer.mif
}
contains(QT_CONFIG, script) {
- executables.sources += context2d.exe
+ executables.sources += context2d.exe
reg_resource.sources += $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/context2d_reg.rsc
resource.sources += $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/context2d.rsc
+ mifs.sources += \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/context2d.mif
}
files.sources = $$PWD/screenshots $$PWD/slides
diff --git a/demos/qtdemo/xml/examples.xml b/demos/qtdemo/xml/examples.xml
index 83bd200..e3240ab 100644
--- a/demos/qtdemo/xml/examples.xml
+++ b/demos/qtdemo/xml/examples.xml
@@ -87,6 +87,7 @@
<example filename="combowidgetmapper" name="Combo Widget Mapper" />
<example filename="dirview" name="Directory View" />
<example filename="fetchmore" name="Fetch More" />
+ <example filename="frozencolumn" name="Frozen Column" />
<example filename="pixelator" name="Pixelator" />
<example filename="puzzle" name="Puzzle " image="itemviewspuzzle-example.png"/>
<example filename="simpledommodel" name="Simple DOM Model" />
diff --git a/demos/symbianpkgrules.pri b/demos/symbianpkgrules.pri
index 7e6852b..c511836 100644
--- a/demos/symbianpkgrules.pri
+++ b/demos/symbianpkgrules.pri
@@ -11,3 +11,5 @@ vendorinfo = \
" "
default_deployment.pkg_prerules += vendorinfo
+
+isEmpty(ICON):ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg
diff --git a/dist/changes-4.6.0 b/dist/changes-4.6.0
index 736fa66..887c96f 100644
--- a/dist/changes-4.6.0
+++ b/dist/changes-4.6.0
@@ -73,6 +73,8 @@ New features
* Support for getting return arguments in remote method invocation
via QMetaMethod::invokeMethod.
+ - The QtScript module is now based on the 3rdparty JavaScriptCore library. It
+ is only available under the LGPL or a compatible license.
Optimizations
-------------
diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc
index b5b1b9c..6a1760e 100644
--- a/doc/src/deployment/deployment.qdoc
+++ b/doc/src/deployment/deployment.qdoc
@@ -187,6 +187,7 @@
\o \l{Deploying an Application on Windows}{Qt for Windows}
\o \l{Deploying an Application on Mac OS X}{Qt for Mac OS X}
\o \l{Deploying Qt for Embedded Linux Applications}{Qt for Embedded Linux}
+ \o \l{Deploying an Application on the Symbian platform}{Qt for the Symbian platform}
\endlist
\sa Installation {Platform-Specific Documentation}
@@ -1490,10 +1491,109 @@
\o Accessibility for Qt3Support is deployed if the application uses the Qt3Support module.
\endlist
- macdeployqt supports the following options:
+ \note If you want a 3rd party library to be included in your
+ application bundle, then you must add an excplicit lib entry for
+ that library to your application's .pro file. Otherwise, the
+ \c macdeployqt tool will not copy the 3rd party .dylib into the
+ bundle.
+
+ \c macdeployqt supports the following options:
\list
- \o -no-plugins: Skip plugin deployment
- \o -dmg : Create a .dmg disk image
- \o -no-strip : Don't run 'strip' on the binaries
- \endlist
+ \o -no-plugins: Skip plugin deployment
+ \o -dmg : Create a .dmg disk image
+ \o -no-strip : Don't run 'strip' on the binaries
+ \endlist
+*/
+
+/*!
+ \page deployment-symbian.html
+ \contentspage Deploying Qt Applications
+
+ \title Deploying an Application on the Symbian platform
+
+ Applications are deployed to Symbian devices in signed \c .sis package files.
+ The \c .sis file content is controlled with \c .pkg files. The \c .pkg file contains a set
+ of instructions used by tools to produce a \c .sis file. \c qmake generates a
+ default \c .pkg file for your project. The \c .pkg file generated by \c qmake is typically
+ fully functional for testing purposes but when planning to deliver your application
+ to end-users some changes are needed. This document describes what changes are
+ typically needed and how to implement them.
+
+ \section1 Static Linking
+
+ Qt for the Symbian platform does currently not support static linking of
+ Qt libraries.
+
+ \section1 Shared Libraries
+
+ When deploying the application using the shared libraries approach we must ensure that the
+ Qt runtime is correctly redistributed along with the application executable,
+ and also that all Qt dependencies are redistributed along with the application.
+
+ We will demonstrate these procedures in terms of deploying the \l {widgets/wiggly}{Wiggly}
+ application that is provided in Qt's examples directory.
+
+ \section2 Building Qt as a Shared Library
+
+ We assume that you already have installed Qt as a shared library,
+ in the \c C:\path\to\Qt directory which is the default when installing Qt for Symbian.
+ For more information on how to build Qt, see the \l {Installation} documentation.
+
+ \section1 Shared Libraries
+
+ After ensuring that Qt is built as a shared library, we can build
+ the \l {widgets/wiggly}{Wiggly} application. First, we
+ must go into the directory that contains the application:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 55
+
+ To prepare the application for deployment we must ensure that the \c .pkg file generated by
+ \c qmake contains the relevant vendor information and embeds the necessary
+ dependencies to the application deployment file (\c .sis). The content of the generated \c .pkg
+ file can be controlled with the Symbian specific \c qmake \l DEPLOYMENT keyword extensions.
+
+ First, we will change the vendor statement to something more meaningful. The application
+ vendor is visible to end-user during the installation.
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 56
+
+ Second we will tell the Symbian application installer that this application supports
+ only S60 5.0 based devices:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 57
+
+ You can find a list of platform and device indentification codes from
+ \l {http://wiki.forum.nokia.com/index.php/S60_Platform_and_device_identification_codes}{Forum Nokia Wiki}.
+ By default \c .pkg file generated by \c qmake adds support for all
+ S60 3rd edition FP1, S60 3rd edition FP2 and S60 5th edition devices.
+
+ As a last step we will embed the Open C, Open C++ and Qt \c .sis files to the Wiggly
+ deployment file:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 58
+
+ By embedding all dependencies to the application deployment file, the
+ end-user does not need to download and install all dependencies separately.
+ The drawback of \c .sis embedding is that the application \c .sis file size becomes
+ big. To address these problems Forum Nokia is planning to release a smart installer
+ which will take care of downloading and installing the necessary dependencies
+ over-the-air. The expected availability of smart installer is 1Q 2010.
+
+ Now we are ready to compile the application and create the application
+ deployment file. Run \c qmake to create Symbian specific makefiles, resources (\.rss)
+ and deployment packaging files (\c .pkg). And do build to create the
+ application binaries and resources.
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 59
+
+ If everything compiled and linked without any errors, we are now ready to create
+ an application installation file:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 60
+
+ If all binaries and dependencies were found, we should now have a self-signed
+ \c wiggly_release-gcce.sis ready to be installed on a device. For more information
+ about creating a \c .sis file and installing it to device see also
+ \l {The Symbian platform - Introduction to Qt#Installing your own applications}{here}.
+
*/
diff --git a/doc/src/frameworks-technologies/graphicsview.qdoc b/doc/src/frameworks-technologies/graphicsview.qdoc
index 1503f53..ba89c7d 100644
--- a/doc/src/frameworks-technologies/graphicsview.qdoc
+++ b/doc/src/frameworks-technologies/graphicsview.qdoc
@@ -437,13 +437,10 @@
\section2 Animation
Graphics View supports animation at several levels. You can easily
- assemble animation paths by associating a QGraphicsItemAnimation with
- your item. This allows timeline controlled animations that operate at
- a steady speed on all platforms (although the frame rate may vary
- depending on the platform's performance). QGraphicsItemAnimation
- allows you to create a path for an item's position, rotation, scale,
- shear and translation. The animation can be controlled by a QSlider,
- or more commonly by QTimeLine.
+ assemble animation by using the Animation Framework. For that you'll
+ need your items to inherit from QGraphicsObject and associate
+ QPropertyAnimation with them. QPropertyAnimation allows to animate any
+ QObject property.
Another option is to create a custom item that inherits from QObject
and QGraphicsItem. The item can the set up its own timers, and control
@@ -454,9 +451,6 @@
QGraphicsScene::advance(), which in turn calls
QGraphicsItem::advance().
- See also the \l{Drag and Drop Robot Example}{Drag and Drop Robot}
- example for an illustration of timeline-based animation techniques.
-
\section2 OpenGL Rendering
To enable OpenGL rendering, you simply set a new QGLWidget as the
diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index c8e225c..1a5cd99 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.qdoc
@@ -495,12 +495,12 @@ in the \l{Qt for Windows CE Requirements} document.
*/
/*! \page install-Symbian-installer.html
-\title Installing Qt on the Symbian Platform from a Binary Package
-\ingroup qts60
+\title Installing Qt on the Symbian platform from a Binary Package
+\ingroup qtsymbian
\brief How to install Qt on the Symbian platform from a binary package.
-\note Qt for Symbian platform has some requirements that are given in more detail
-in the \l{Qt for Symbian platform Requirements} document.
+\note Qt for the Symbian platform has some requirements that are given in more detail
+in the \l{Qt for the Symbian platform Requirements} document.
\list 1
@@ -517,13 +517,16 @@ in the \l{Qt for Symbian platform Requirements} document.
to try out. An excellent starting point is the "fluidlauncher"
demo. To run the demo on a real device, you first have to install
\c{qt.sis} and \c{fluidlauncher.sis} found in the Qt installation
- directory. Begin by connecting your phone using the USB cable and
- selecting "PC Suite mode". In Windows Explorer right click on the
- \c{.sis} files and select "Install with Nokia Application Installer"
+ directory. Also, check if the device needs additional
+ \l{Qt for the Symbian platform Requirements}{requirements}.
+ Begin 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{.sis} files, select "Install with Nokia Application Installer"
and follow the instructions.
To run the demos and examples on the emulator, you need to build them first.
- Open the "Qt for Symbian platform Command Prompt" from the Start menu and type:
+ 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
@@ -534,7 +537,7 @@ in the \l{Qt for Symbian platform Requirements} document.
For more information about building and running Qt programs on the
Symbian platform,
- see \l{Symbian platform - Introduction to Qt}.
+ see \l{The Symbian platform - Introduction to Qt}.
We hope you will enjoy using Qt.
@@ -542,25 +545,40 @@ Symbian platform,
*/
/*! \page install-Symbian.html
-\title Installing Qt on the Symbian Platform
+\title Installing Qt on the Symbian platform
\ingroup installation
-\ingroup qts60
+\ingroup qtsymbian
\brief How to install Qt on the Symbian platform.
\note Qt for the Symbian platform has some requirements that are given in more detail
-in the \l{Qt for Symbian Platform Requirements} document.
+in the \l{Qt for the Symbian platform Requirements} document.
\note \bold {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 on the Symbian Platform from a Binary Package} document.}
+\l{Installing Qt on the Symbian platform from a Binary Package} document.}
\list 1
+ \o Setup the development environment
+
+ Make sure your Symbian development environment is correctly installed and
+ patched as explained in the \l{Qt for the Symbian platform Requirements} document.
+
+ After you have finished the Symbian development environment setup, it is good
+ to verify that environment is functional for example by compiling one
+ of the pure Symbian examples for both emulator and HW. This can be done from
+ command prompt as follows:
+
+ \snippet doc/src/snippets/code/doc_src_installation.qdoc 32
+
+ If all steps pass without errors your Symbian development environment is
+ very likely installed correctly.
+
\o Install Qt
- Uncompress the package into the directory you want Qt installed,
- e.g. \c{C:\Qt\%VERSION%}.
+ Uncompress the \l{http://qt.nokia.com/downloads}{downloaded} source package into the
+ directory you want Qt installed, e.g. \c{C:\Qt\%VERSION%}.
\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.
@@ -589,10 +607,11 @@ If you are using pre-built binaries, follow the instructions given in the
to build the tools using MinGW, and the libraries using abld.
or
\snippet doc/src/snippets/code/doc_src_installation.qdoc 31
- to build the tools using MinGW, and the libraries using sbsv2.
+ to build the tools using MinGW, and the libraries using SBSv2.
- For other options, type \c{configure -help} to get a list of all available
- options.
+ SBSv2 also known as a (\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.
\o Build Qt
@@ -631,7 +650,7 @@ If you are using pre-built binaries, follow the instructions given in the
\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{Symbian platform - Introduction to Qt}.
+ Symbian platform, see \l{The Symbian platform - Introduction to Qt}.
We hope you will enjoy using Qt.
@@ -666,7 +685,7 @@ Symbian platform, see \l{Symbian platform - Introduction to Qt}.
\list
\o \l{Qt for Embedded Linux Requirements}
\o \l{Qt for Mac OS X Requirements}
- \o \l{Qt for Symbian platform Requirements}
+ \o \l{Qt for the Symbian platform Requirements}
\o \l{Qt for Windows CE Requirements}
\o \l{Qt for Windows Requirements}
\o \l{Qt for X11 Requirements}
@@ -951,12 +970,12 @@ Symbian platform, see \l{Symbian platform - Introduction to Qt}.
/*!
\page requirements-symbian.html
- \title Qt for Symbian Platform Requirements
+ \title Qt for the Symbian platform Requirements
\ingroup installation
\brief Setting up the Symbian platform environment for Qt.
\previouspage General Qt Requirements
- Qt for Symbian platform requires the following software installed on your development PC:
+ Qt for the Symbian platform requires the following software installed on your development PC:
\list
\o \l{http://www.forum.nokia.com/main/resources/tools_and_sdks/carbide_cpp/}{Carbide.c++ v2.0.0 or higher}
\list
@@ -969,7 +988,11 @@ Symbian platform, see \l{Symbian platform - Introduction to Qt}.
\o \bold{Note:} According to Symbian, version 5.6.1 build 638 is mandatory. Using later versions may result in unexplained errors.
\endlist
\o \l{http://www.forum.nokia.com/main/resources/tools_and_sdks/S60SDK/}{S60 Platform SDK 3rd Edition FP1 or higher}
- \o \l{http://www.forum.nokia.com/main/resources/technologies/openc_cpp/}{Open C/C++ v1.6.0 or higher}.
+ \list
+ \o \bold{Note:} Users of \bold{S60 Platform SDK 3rd Edition FP1} also need special update. The update can be found
+ \l{http://pepper.troll.no/s60prereleases/patches/}{here}.
+ \endlist
+ \o \l{http://www.forum.nokia.com/main/resources/technologies/openc_cpp/}{Open C/C++ v1.6.0 or higher}.
Install this to all Symbian SDKs you plan to use Qt with.
\o Building Qt tools from scratch requires \l{http://www.mingw.org/}{MinGW 3.4.5 or higher}, or another windows compiler.
\list
@@ -987,8 +1010,8 @@ Symbian platform, see \l{Symbian platform - Introduction to Qt}.
\o \c{nokia_plugin\opencpp\s60opencppsis\stdcpp_s60_<version>.sis}
\endlist
- \note Users of \bold{S60 Platform SDK 3rd Edition FP1} also need special updates. The update can be found
- \l{http://pepper.troll.no/s60prereleases/patches/}{here}.
+ We recommend you to take a look of \l{http://developer.symbian.org/wiki/index.php/Qt_Quick_Start}{Symbian Foundation - Qt Quick Start}
+ to get more information about how to setup the development environment.
\sa {Known Issues in %VERSION%}
*/
diff --git a/doc/src/getting-started/known-issues.qdoc b/doc/src/getting-started/known-issues.qdoc
index 5c8888d..b8c2192 100644
--- a/doc/src/getting-started/known-issues.qdoc
+++ b/doc/src/getting-started/known-issues.qdoc
@@ -61,27 +61,33 @@
\section2 Installing the Source Package on Unix systems
+ \list
+
\o If you download a Zip source package, you will need to convert
Windows-style line endings (CR/LF) to Unix-style line-endings (LF) when
you uncompress the package. To do this, give the "-a" option when you
run the "unzip' command.
-
- If you fail to supply the "-a" option when unzipping the package, you
+
+ \o If you fail to supply the "-a" option when unzipping the package, you
will see the following error message when you attempt to execute the
configure command:
"bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory"
+
\endlist
\section2 Installing on Mac OS X 10.6 "Snow Leopard"
+
\list
+
\o Performing a new install of the Qt 4.6 beta on Snow Leopard
triggers a bug in the installer that causes the install to fail.
Updating an existing Qt installation works fine.
- There are two workarounds, either disable spotlight for the target
+ \o There are two workarounds, either disable spotlight for the target
drive during the install, or do a custom install where you deselect
documentation and examples. Run the installer again as a full
install to get the documentation and examples installed.
+
\endlist
\section1 Issues with Third Party Software
@@ -107,6 +113,7 @@
\section2 Windows
\list
+
\o When using version 6.14.11.6921 of the NVIDIA drivers for the GeForce
6600 GT under Windows XP, Qt applications which use drag and drop will
display reduced size drag and drop icons when run alongside
@@ -122,13 +129,27 @@
\o A bug in the Firebird database can cause an application to crash when
\c{fbembed.dll} is unloaded. The bug is fixed in version 2.5.
+ \o On Windows 7, resizing windows is slower than on Vista/Xp. This is because
+ the gesture initialization process (required for native gesture support)
+ currently calls winId() on widgets, which causes whole widget hierarchies
+ to use native window handles. This slows down resizing.
+
\endlist
\section2 Mac OS X
\list
+
\o If a sheet is opened for a given window, clicking the title bar of that
window will cause it to flash. This behavior has been reported to Apple
(bug number 5827676).
+
+ \endlist
+
+ \section2 Symbian
+
+ \list
+ \o Check known issues for Symbian at
+ \l{http://qt.gitorious.org/qt/pages/Qt460KnownIssues} {Known Issues Wiki}.
\endlist
*/
diff --git a/doc/src/howtos/exceptionsafety.qdoc b/doc/src/howtos/exceptionsafety.qdoc
index fa1427b..2f561a0 100644
--- a/doc/src/howtos/exceptionsafety.qdoc
+++ b/doc/src/howtos/exceptionsafety.qdoc
@@ -147,7 +147,7 @@
\section2 The Symbian platform
The Symbian platform implements its own exception system that differs from the standard
- C++ mechanism. When using Qt for Symbian platform, and especially when writing code to
+ C++ mechanism. When using Qt for the Symbian platform, and especially when writing code to
access Symbian functionality directly, it may be necessary to know about the underlying
implementation and how it interacts with Qt.
diff --git a/doc/src/platforms/compiler-notes.qdoc b/doc/src/platforms/compiler-notes.qdoc
index 88e1e37..0ae32c3 100644
--- a/doc/src/platforms/compiler-notes.qdoc
+++ b/doc/src/platforms/compiler-notes.qdoc
@@ -303,4 +303,9 @@
Make sure you have the
\l{http://www-1.ibm.com/support/search.wss?rs=32&amp;tc=SSEP5D&amp;dc=D400}{latest upgrades}
installed.
+
+ \section2 GCCE (Symbian)
+
+ GCCE cannot be used to compile Qt libaries for the Symbian platform, but GCCE is supported
+ when compiling Qt applications for Symbian platform.
*/
diff --git a/doc/src/platforms/qt-embedded.qdoc b/doc/src/platforms/qt-embedded.qdoc
index b38c94f..afed540 100644
--- a/doc/src/platforms/qt-embedded.qdoc
+++ b/doc/src/platforms/qt-embedded.qdoc
@@ -67,10 +67,9 @@
Applications use the appropriate style for the embedded
environment and use native features, such as menus, to conform
to the native style guidelines.
- \o \l{Symbian Platform - Introduction to Qt}{Qt for the Symbian
- platform} is used to create applications running in existing Symbian
- platform environments. Applications use the appropriate style for the
- embedded environment and use native features, such as menus, to conform
- to the native style guidelines.
+ \o \l{Qt for the Symbian platform} is used to create applications running
+ in existing Symbian platform environments. Applications use the appropriate
+ style for the embedded environment and use native features, such as menus,
+ to conform to the native style guidelines.
\endtable
*/
diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc
index ca668bc..be098bc 100644
--- a/doc/src/platforms/supported-platforms.qdoc
+++ b/doc/src/platforms/supported-platforms.qdoc
@@ -89,8 +89,8 @@
\o gcc (\l{http://www.codesourcery.com/}{Codesourcery version)}
\row \o Windows CE 5.0 (ARMv4i, x86, MIPS)
\o MSVC 2005 WinCE 5.0 Standard (x86, pocket, smart, mipsii)
- \row \o \l {Qt for Symbian} {Symbian (S60 3.1, 3.2 and 5.0)}
- \o RVCT, GCCE, WINSCW
+ \row \o Symbian (Symbian/S60 3.1, 3.2 and 5.0)
+ \o RVCT 2.2 [build 686 or later], WINSCW 3.2.5 [build 482 or later], GCCE (for applications)
\endtable
\section1 Tier 2 Platforms
diff --git a/doc/src/platforms/symbian-exceptionsafety.qdoc b/doc/src/platforms/symbian-exceptionsafety.qdoc
index 88f4d03..99bd2d8 100644
--- a/doc/src/platforms/symbian-exceptionsafety.qdoc
+++ b/doc/src/platforms/symbian-exceptionsafety.qdoc
@@ -42,7 +42,7 @@
/*!
\page symbianexceptionsafety.html
\title Exception Safety with Symbian
- \ingroup qts60
+ \ingroup qtsymbian
\brief A guide to integrating exception safety in Qt with Symbian.
The following sections describe how Qt code can interoperate with Symbian's
diff --git a/doc/src/platforms/s60-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc
index 0581982..c0c4fb3 100644
--- a/doc/src/platforms/s60-introduction.qdoc
+++ b/doc/src/platforms/symbian-introduction.qdoc
@@ -40,39 +40,73 @@
****************************************************************************/
/*!
+ \group qtsymbian
+ \title Qt for the Symbian platform
+ \ingroup qt-embedded
+ \brief Documents related to Qt on the Symbian platform
+
+ Qt for Symbian is a C++ framework for GUI and application development
+ for embedded devices running Symbian. Qt for Symbian provides all
+ functionality required to develop rich end-user applications for devices
+ running S60 3.1 and later.
+
+ \table 100%
+ \header \o Getting Started \o Reference \o Development
+ \row
+ \o
+ \list
+ \o \l {Qt for the Symbian platform Requirements}
+ \o \l {Installing Qt on the Symbian platform from a Binary Package}
+ \o \l {Installing Qt on the Symbian platform}
+ \o \l {The Symbian platform - Introduction to Qt}{Introduction to using Qt}
+ \endlist
+ \o
+ \list
+ \o \l {Exception Safety with Symbian}
+ \o \l {Platform Notes - Symbian} {Qt for the Symbian platform - state of support}
+ \o \l {qmake Platform Notes#Symbian platform} {Qt for Symbian extensions for qmake}
+ \endlist
+ \o
+ \list
+ \o \l {Deploying an Application on the Symbian platform}{Deploying Applications}
+ \endlist
+ \endtable
+*/
+
+/*!
\page symbian-with-qt-introduction.html
- \title Symbian Platform - Introduction to Qt
- \brief An introduction to Qt for Symbian platform developers.
+ \title The Symbian platform - Introduction to Qt
+ \brief An introduction to Qt for the Symbian platform developers.
\ingroup howto
- \ingroup qts60
+ \ingroup qtsymbian
\tableofcontents
\section1 Required tools
- See \l{Qt for Symbian Platform Requirements} to see what tools are
- required to use Qt for Symbian platform.
+ See \l{Qt for the Symbian platform Requirements} to see what tools are
+ required to use Qt for the Symbian platform.
\section1 Installing Qt and running demos
Follow the instructions found in \l{Installing Qt on 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 on the Symbian Platform} to learn how to install Qt using
+ Follow the instructions found in \l{Installing Qt on the Symbian platform} to learn how to install Qt using
using source package and how to build and run the Qt demos.
\section1 Building your own applications
- If you are new to Qt development, have a look at \l{How to Learn Qt}.
+ If you are new to Qt development, have a look at \l{How to Learn Qt}.
In general, the difference between developing a
Qt application on the Symbian platform compared to any of the other platforms supported
by Qt is not that big.
Once you have created a \c .pro file for your project, generate the
- Carbide specific \c Bld.inf and \c .mmp files this way:
+ Symbian specific \c Bld.inf and \c .mmp files this way:
- \snippet doc/src/snippets/code/doc_src_s60-introduction.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_symbian-introduction.qdoc 0
For more information on how to use qmake have a look at the \l
{qmake Tutorial}.
@@ -97,56 +131,67 @@
The following lines perform a debug build for the emulator
and deploy all the needed files:
- \snippet doc/src/snippets/code/doc_src_s60-introduction.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_symbian-introduction.qdoc 1
To work on your project in Carbide, simply import the \c .pro file
by right clicking on the project explorer and executing "Import...".
\section1 Installing your own applications
- To install your own applications on hardware, you need signed \c .sis file.
+ To install your own applications on hardware, you need a signed \c .sis file.
+ (Refer to the \l{http://developer.symbian.org/wiki/index.php/Platform_Security_%28Fundamentals_of_Symbian_C%2B%2B%29#Self-Signed_Applications}
+ {Platform Security Article} for more informations about self-signing.)
The signed \c .sis file can be created with \c make \c sis target. \c sis target
is only supported for executables or projects with \c DEPLOYMENT statements.
By default the \c sis target will create signed \c .sis file for last build
- target. For example, the following sequence will generate the needed makefiles,
- build the project for \c debug-winscw and \c release-armv5, and create
+ target. For example, the following sequence will generate the needed makefiles,
+ build the project for \c debug-winscw and \c release-armv5, and create
self-signed \c .sis file for \c release-armv5 target:
- \snippet doc/src/snippets/code/doc_src_s60-introduction.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_symbian-introduction.qdoc 2
If you want to use different certificate information or override the default
- target for \c .sis file creation you can use the environment variables as
+ target for \c .sis file creation you can use the environment variables as
shown in the table below:
\table
- \row \o \c QT_SIS_OPTIONS \o Options accepted by \c .sis creation.
- -i, install the package right away using PC suite.
- -c=<file>, read certificate information from a file.
- Execute the \c{createpackage.pl} script without any
- parameters for more information about options.
- By default no otions are given.
+ \row \o \c QT_SIS_OPTIONS \o Options accepted by \c .sis creation. See
+ \l{Supported options for QT_SIS_OPTIONS}{Supported options}
+ below. By default no otions are given.
\row \o \c QT_SIS_TARGET \o Target for which \c .sis file is created.
- Accepted values are build targets listed in
+ Accepted values are build targets listed in
previous table. By default last build target.
\row \o \c QT_SIS_CERTIFICATE \o The certificate file used for signing.
- By default self-signed certificate.
+ By default self-signed certificate.
\row \o \c QT_SIS_KEY \o The certificate's private key file.
- By default key is associated to self-signed certificate.
+ By default key is associated to self-signed certificate.
\row \o \c QT_SIS_PASSPHRASE \o The certificate's private key file's passphrase.
- By default empty.
- \endtable
+ By default empty.
+ \endtable
+
+ The suppported options for \c QT_SIS_OPTIONS:
+
+ \target Supported options for QT_SIS_OPTIONS
+ \table
+ \row \o -i \o Install the package right away using PC suite.
+ \row \o -p \o Only preprocess the template \c .pkg file.
+ \row \o -c=<file> \o Read certificate information from a file.
+ \endtable
+
+ Execute the \c{createpackage.pl} script without any
+ parameters for detailed information about options. By default no otions are given.
For example:
- \snippet doc/src/snippets/code/doc_src_s60-introduction.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_symbian-introduction.qdoc 4
The environment variables for \c make can also be given as parameters:
- \snippet doc/src/snippets/code/doc_src_s60-introduction.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_symbian-introduction.qdoc 3
If you want to install the program immediately, make sure that the device
is connected to the computer in "PC Suite" mode, and run \c sis target
with the \c QT_SIS_OPTIONS=-i, like this:
- \snippet doc/src/snippets/code/doc_src_s60-introduction.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_symbian-introduction.qdoc 5
*/
diff --git a/doc/src/platforms/symbian-support.qdoc b/doc/src/platforms/symbian-support.qdoc
deleted file mode 100644
index 916eda5..0000000
--- a/doc/src/platforms/symbian-support.qdoc
+++ /dev/null
@@ -1,135 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \page symbian-support.html
- \title Qt for Symbian
- \ingroup platform-specific
- \brief Information about the state of support for the Symbian platform.
-
- Qt for Symbian is not yet fully on a par with other platforms with respect
- to stability and feature support. This page documents the current shortcomings
- of the Symbian port.
-
- \section1 Source Compatibility
-
- Qt for Symbian provides the same level of source compatibility guarantee as
- given for other platforms.  That is, a program which compiles against a given
- version of Qt for Symbian will also compile against all future versions of the
- same major release.
-
- \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, it is possible that minor corrections to the
- behavior and to the ABI in 4.6.1 will be required in order to ensure
- compatibility going forward. If we break the binary compatiblity promise,
- we will document such changes in the 4.6.1 release.
-
- \section1 Supported Devices
-
- Qt should generally work on any device which runs one of the following
- versions of Symbian:
-
- \table
- \header \o Symbian Version
- \row \o S60 3.1
- \row \o S60 3.2
- \row \o S60 5.0 (Symbian ^1)
- \endtable
-
- Qt has received Tier 1 testing on the following phone models:
-
- \table
- \header \o Phone
- \row \o Nokia 5800
- \row \o Nokia E71
- \row \o Nokia E72
- \row \o Nokia N78
- \row \o Nokia N95
- \row \o Nokia N97
- \row \o Samsung i8910
- \endtable
-
- \section1 Supported Functionality
-
- The following technologies and classes are not currently supported:
-
- \table
- \header \o Technology
- \o Note
- \row \o QtConcurrent
- \o
- \row \o QtDBus
- \o No current plans to support this feature.
- \row \o QtOpenGL
- \o Support for OpenGL ES planned for a future release.
- \row \o Printing support
- \o No current plans to support this feature.
- \row \o Qt3Support
- \o No current plans to support this feature.
- \endtable
-
- The following technologies have limited support:
-
- \table
- \header \o Technology
- \o Note
- \row \o QtSql
- \o The only driver supported is SQLite.
- \row \o QtMultimedia
- \o Although the module itself is supported, no backend for Symbian
- is available. However, there is a backend available for Phonon.
- \endtable
-
- \section1 Known Issues
-
- Known issues can be found by visiting the
- \l{http://qt.gitorious.org/qt/pages/Qt460KnownIssues}{wiki page} with an
- up-to-date list of known issues, and the list of bugs can be found by
- \l{http://bugreports.qt.nokia.com/browse/QTBUG/component/19171}{browsing} the
- S60 component in Qt's public task tracker, located at
- \l{http://bugreports.qt.nokia.com/}{http://bugreports.qt.nokia.com/}.
-
-*/
-
diff --git a/doc/src/platforms/winsystem.qdoc b/doc/src/platforms/winsystem.qdoc
index 72e7da6..2f43a74 100644
--- a/doc/src/platforms/winsystem.qdoc
+++ b/doc/src/platforms/winsystem.qdoc
@@ -102,9 +102,9 @@
When compiling for this platform, the macro \c{Q_WS_WINCE} is defined.
See the \l{Qt for Windows CE} documentation for more information.
- \section1 Qt for Symbian Platform
+ \section1 Qt for the Symbian platform
When compiling for this platform, the macro \c{Q_WS_S60} is defined.
- See the \l{Symbian Platform - Introduction to Qt} documentation for
+ See the \l{The Symbian platform - Introduction to Qt} documentation for
more information.
*/
diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc
index 2a1f8ff..fb1d0e4 100644
--- a/doc/src/qt4-intro.qdoc
+++ b/doc/src/qt4-intro.qdoc
@@ -491,7 +491,7 @@
rich end-user applications for devices running S60 3.1 and
later.
- See the \l{Symbian Platform - Introduction to Qt} for more information.
+ See the \l{The Symbian platform - Introduction to Qt} for more information.
\section1 Animation Framework
diff --git a/doc/src/snippets/code/doc_src_deployment.qdoc b/doc/src/snippets/code/doc_src_deployment.qdoc
index d233ec3..2d6a78f 100644
--- a/doc/src/snippets/code/doc_src_deployment.qdoc
+++ b/doc/src/snippets/code/doc_src_deployment.qdoc
@@ -453,3 +453,44 @@ CONFIG+=x86 ppc
//! [54]
qApp->addLibraryPath("C:/customPath/plugins");
//! [54]
+
+//! [55]
+cd examples\widgets\wiggly
+//! [55]
+
+//! [56]
+vendorinfo = \
+ "%{\"Example Localized Vendor\"}" \
+ ":\"Example Vendor\""
+
+default_deployment.pkg_prerules = vendorinfo
+//! [56]
+
+//! [57]
+supported_platforms = \
+ "; This demo only supports S60 5.0" \
+ "[0x1028315F],0,0,0,{\"S60ProductID\"}"
+
+default_deployment.pkg_prerules += supported_platforms
+//! [57]
+
+//! [58]
+embedded_deployments = \
+ "; Embed Open C dependencies" \
+ "@\"$${EPOCROOT}nokia_plugin/openc/s60opencsis/pips_s60_1_6_SS.sis\",(0x20013851)" \
+ "@\"$${EPOCROOT}nokia_plugin/openc/s60opencsis/openc_ssl_s60_1_6_SS.sis\",(0x200110CB)" \
+ "@\"$${EPOCROOT}nokia_plugin/opencpp/s60opencppsis/STDCPP_s60_1_6_SS.sis\",(0x2000F866)" \
+ "; Embed Qt dependencies" \
+ "@\"$$[QT_INSTALL_PREFIX]/qt_rndsigned.sis\",(0x2001E61C)"
+
+default_deployment.pkg_prerules += embedded_deployments
+//! [58]
+
+//! [59]
+qmake
+make release-gcce
+//! [59]
+
+//! [60]
+make sis
+//! [60] \ No newline at end of file
diff --git a/doc/src/snippets/code/doc_src_installation.qdoc b/doc/src/snippets/code/doc_src_installation.qdoc
index 68765ec..3563a64 100644
--- a/doc/src/snippets/code/doc_src_installation.qdoc
+++ b/doc/src/snippets/code/doc_src_installation.qdoc
@@ -209,3 +209,10 @@ make sis QT_SIS_OPTIONS=-i
cd \Qt\%VERSION%
configure -platform win32-g++ -xplatform symbian-sbsv2
//! [31]
+
+//! [32]
+cd <Your SDK path>\S60CppExamples\Note\group
+bldmake bldfiles
+abld build winscw udeb
+abld build gcce urel
+//! [32]
diff --git a/doc/src/snippets/code/doc_src_s60-introduction.qdoc b/doc/src/snippets/code/doc_src_symbian-introduction.qdoc
index 8949df6..8949df6 100644
--- a/doc/src/snippets/code/doc_src_s60-introduction.qdoc
+++ b/doc/src/snippets/code/doc_src_symbian-introduction.qdoc
diff --git a/examples/effects/effects.pro b/examples/effects/effects.pro
index 2dec8d5..0f062ee 100644
--- a/examples/effects/effects.pro
+++ b/examples/effects/effects.pro
@@ -5,12 +5,6 @@ SUBDIRS = \
lighting \
fademessage
-!contains(QT_CONFIG, opengles1):!contains(QT_CONFIG, opengles1cl) {
- contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2) {
- SUBDIRS += customshader
- }
-}
-
# install
target.path = $$[QT_INSTALL_EXAMPLES]/effects
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS effects.pro README
diff --git a/examples/itemviews/frozencolumn/freezetablewidget.cpp b/examples/itemviews/frozencolumn/freezetablewidget.cpp
index ee50ae1..72dc2a1 100644
--- a/examples/itemviews/frozencolumn/freezetablewidget.cpp
+++ b/examples/itemviews/frozencolumn/freezetablewidget.cpp
@@ -84,7 +84,8 @@ void FreezeTableWidget::init()
//! [init part2]
frozenTableView->setStyleSheet("QTableView { border: none;"
- "background-color: #8EDE21;}"); //for demo purposes
+ "background-color: #8EDE21;"
+ "selection-background-color: #999}"); //for demo purposes
frozenTableView->setSelectionModel(selectionModel());
for(int col=1; col<model()->columnCount(); col++)
frozenTableView->setColumnHidden(col, true);
@@ -146,6 +147,12 @@ QModelIndex FreezeTableWidget::moveCursor(CursorAction cursorAction,
}
//! [navigate]
+void FreezeTableWidget::scrollTo (const QModelIndex & index, ScrollHint hint){
+ if(index.column()>0)
+ QTableView::scrollTo(index, hint);
+}
+
+
//! [geometry]
void FreezeTableWidget::updateFrozenTableGeometry()
diff --git a/examples/itemviews/frozencolumn/freezetablewidget.h b/examples/itemviews/frozencolumn/freezetablewidget.h
index 403890f..d236d40 100644
--- a/examples/itemviews/frozencolumn/freezetablewidget.h
+++ b/examples/itemviews/frozencolumn/freezetablewidget.h
@@ -56,6 +56,7 @@ public:
protected:
virtual void resizeEvent(QResizeEvent *event);
virtual QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers);
+ void scrollTo (const QModelIndex & index, ScrollHint hint = EnsureVisible);
private:
QTableView *frozenTableView;
diff --git a/examples/itemviews/frozencolumn/grades.txt b/examples/itemviews/frozencolumn/grades.txt
index 4b55b473..e1c6fcc 100644
--- a/examples/itemviews/frozencolumn/grades.txt
+++ b/examples/itemviews/frozencolumn/grades.txt
@@ -32,4 +32,5 @@
9a+ , , 5.15a , , , XI+ , , , , 12a
9b , , 5.15b , , , , , , , 12b
-# Wikipedia contributors. Grade (climbing). Wikipedia, The Free Encyclopedia. May 15, 2009, 20:42 UTC. Available at: http://en.wikipedia.org/w/index.php?title=Grade_(climbing)&oldid=290165724. Accessed May 28, 2009.
+# Wikipedia contributors. Grade (climbing). Wikipedia, The Free Encyclopedia. May 15, 2009, 20:42 UTC.
+# Available at: http://en.wikipedia.org/w/index.php?title=Grade_(climbing)&oldid=290165724. Accessed May 28, 2009.
diff --git a/examples/symbianpkgrules.pri b/examples/symbianpkgrules.pri
index 59c5480..35edbfb 100644
--- a/examples/symbianpkgrules.pri
+++ b/examples/symbianpkgrules.pri
@@ -11,3 +11,5 @@ vendorinfo = \
" "
default_deployment.pkg_prerules += vendorinfo
+
+isEmpty(ICON):ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg
diff --git a/examples/webkit/domtraversal/window.h b/examples/webkit/domtraversal/window.h
index 5988df9..2795976 100644
--- a/examples/webkit/domtraversal/window.h
+++ b/examples/webkit/domtraversal/window.h
@@ -46,7 +46,9 @@
#include <QUrl>
#include <QWebElement>
+QT_BEGIN_NAMESPACE
class QTreeWidgetItem;
+QT_END_NAMESPACE
//! [Window class definition]
#include "ui_window.h"
diff --git a/examples/webkit/formextractor/formextractor.pro b/examples/webkit/formextractor/formextractor.pro
index 4364b4c..51e0c45 100644
--- a/examples/webkit/formextractor/formextractor.pro
+++ b/examples/webkit/formextractor/formextractor.pro
@@ -1,5 +1,5 @@
QT += webkit network
-TARGET = formExtractor
+TARGET = formextractor
TEMPLATE = app
SOURCES += main.cpp \
formextractor.cpp \
diff --git a/examples/webkit/framecapture/framecapture.cpp b/examples/webkit/framecapture/framecapture.cpp
index 2c2e11b..ef49e93 100644
--- a/examples/webkit/framecapture/framecapture.cpp
+++ b/examples/webkit/framecapture/framecapture.cpp
@@ -59,6 +59,7 @@ void FrameCapture::load(const QUrl &url, const QString &outputFileName)
m_page.mainFrame()->load(url);
m_page.mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
m_page.mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
+ m_page.setViewportSize(QSize(1024, 768));
}
void FrameCapture::printProgress(int percent)
@@ -81,41 +82,36 @@ void FrameCapture::saveResult(bool ok)
return;
}
- // save each internal frame in different image files
- int frameCounter = 0;
- foreach(QWebFrame *frame, m_page.mainFrame()->childFrames()) {
- QString fileName(m_fileName);
- int index = m_fileName.lastIndexOf('.');
- fileName = fileName.insert(index, "_frame" + QString::number(++frameCounter));
+ // save each frame in different image files
+ saveFrame(m_page.mainFrame());
- frame->setClipRenderToViewport(false);
+ emit finished();
+}
- QImage image(frame->contentsSize(), QImage::Format_ARGB32_Premultiplied);
- image.fill(Qt::transparent);
+void FrameCapture::saveFrame(QWebFrame *frame)
+{
+ static int frameCounter = 0;
- saveFrame(frame, image, fileName);
+ QString fileName(m_fileName);
+ if (frameCounter) {
+ int index = m_fileName.lastIndexOf('.');
+ fileName = fileName.insert(index, "_frame" + QString::number(frameCounter));
}
- // save the main frame
- m_page.setViewportSize(m_page.mainFrame()->contentsSize());
- QImage image(m_page.mainFrame()->contentsSize(), QImage::Format_ARGB32_Premultiplied);
+ QImage image(frame->contentsSize(), QImage::Format_ARGB32_Premultiplied);
image.fill(Qt::transparent);
- saveFrame(m_page.mainFrame(), image, m_fileName);
-
- emit finished();
-}
-void FrameCapture::saveFrame(QWebFrame *frame, QImage image, QString fileName)
-{
QPainter painter(&image);
painter.setRenderHint(QPainter::Antialiasing, true);
painter.setRenderHint(QPainter::TextAntialiasing, true);
painter.setRenderHint(QPainter::SmoothPixmapTransform, true);
-
- frame->render(&painter);
-
+ frame->documentElement().render(&painter);
painter.end();
image.save(fileName);
+
+ ++frameCounter;
+ foreach(QWebFrame *childFrame, frame->childFrames())
+ saveFrame(childFrame);
}
diff --git a/examples/webkit/framecapture/framecapture.h b/examples/webkit/framecapture/framecapture.h
index 9de9c43..7a6d5f3 100644
--- a/examples/webkit/framecapture/framecapture.h
+++ b/examples/webkit/framecapture/framecapture.h
@@ -64,7 +64,7 @@ private:
QString m_fileName;
int m_percent;
- void saveFrame(QWebFrame *frame, QImage image, QString fileName);
+ void saveFrame(QWebFrame *frame);
};
#endif
diff --git a/examples/webkit/framecapture/main.cpp b/examples/webkit/framecapture/main.cpp
index 050947a..65c0026 100644
--- a/examples/webkit/framecapture/main.cpp
+++ b/examples/webkit/framecapture/main.cpp
@@ -63,7 +63,7 @@ int main(int argc, char * argv[])
return 0;
}
- QUrl url = QWebView::guessUrlFromString(QString::fromLatin1(argv[1]));
+ QUrl url = QUrl::fromUserInput(QString::fromLatin1(argv[1]));
QString fileName = QString::fromLatin1(argv[2]);
QApplication a(argc, argv);
diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf
index b0c1bb1..1edbe14 100644
--- a/mkspecs/features/symbian/application_icon.prf
+++ b/mkspecs/features/symbian/application_icon.prf
@@ -3,38 +3,49 @@ load(data_caging_paths)
# If no_icon keyword exist, the S60 UI app is just made hidden. This because S60 app FW
# requires the registration resource file to exist always
contains( CONFIG, no_icon ) {
- symbian:RSS_RULES ="hidden = KAppIsHidden;"
+ symbian:RSS_RULES ="hidden = KAppIsHidden;"
CONFIG -= no_icon
} else {
# There is no point in compiling the MIF icon if no_icon CONFIGS is set
!isEmpty(ICON) {
-
- !count(ICON, $$size(TRANSLATIONS)):!count(ICON, 1) {
- message("ICON keyword must have one or the same amout of items as in TRANSLATIONS keyword")
+
+ !count(ICON, 1) {
+ ICON = $$first(ICON)
+ warning("Only first icon specified in ICON variable is used: $$ICON")
}
- # MIF files will have UID in their names, if TARGET.UID3 is not set, remind the user
- isEmpty(TARGET.UID3):error("TARGET.UID3 must be explicitly defined for ICON generation")
+ # Try to produce indentical string to fixedTarget in SymbianMakefileGenerator, replaced chars taken
+ # from SymbianMakefileGenerator::removeSpecialCharacters.
+ #
+ # Note: it is not a major problem even baseTarget is not 100% identical to fixedTarget since qmake
+ # only uses filename from RSS_RULES.icon_file when referring to icon file name.
+ baseTarget = $$basename(TARGET)
+ baseTarget = $$replace(baseTarget, /,_)
+ baseTarget = $$replace(baseTarget, \\,_)
+ baseTarget = $$replace(baseTarget, -,_)
+ baseTarget = $$replace(baseTarget, :,_)
+ baseTarget = $$replace(baseTarget, \.,_)
+ baseTarget = $$replace(baseTarget, " ",_)
# Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code
- symbian-abld {
- #Makefile: requires paths with backslash
+ symbian-abld {
+ #Makefile: requires paths with backslash
ICON = $$replace( ICON, /, \\)
# Extra compiler rules for mifconv
- mifconv.output = ${ZDIR}$$APP_RESOURCE_DIR/$${TARGET.UID3}.mif
+ mifconv.output = ${ZDIR}$$APP_RESOURCE_DIR/$${baseTarget}.mif
# Based on: http://www.forum.nokia.com/document/Cpp_Developers_Library
# svg-t icons should always use /c32 depth
- mifconv.commands = mifconv ${QMAKE_FILE_OUT} $$join(ICON, " /c32 ", "/c32 ",)
+ mifconv.commands = mifconv ${QMAKE_FILE_OUT} /c32 ${QMAKE_FILE_IN}
mifconv.input = ICON
mifconv.CONFIG = no_link combine
# target_predeps together with combine seems not to work correctly, lets define it by ourselves
PRE_TARGETDEPS += $$mifconv.output
QMAKE_EXTRA_COMPILERS += mifconv
- }
+ }
# Rules to use generated MIF file from symbian resources
RSS_RULES.number_of_icons = $$size(ICON)
- RSS_RULES.icon_file = $$replace( APP_RESOURCE_DIR, /, \\\\ )\\\\$${TARGET.UID3}.mif
+ RSS_RULES.icon_file = $$APP_RESOURCE_DIR/$${baseTarget}.mif
}
}
diff --git a/mkspecs/features/symbian/armcc_warnings.prf b/mkspecs/features/symbian/armcc_warnings.prf
index 95b3bc0..72bc996 100644
--- a/mkspecs/features/symbian/armcc_warnings.prf
+++ b/mkspecs/features/symbian/armcc_warnings.prf
@@ -8,3 +8,6 @@
# 2874: <variable> may be used before being set (this one sounds useful, but
# it's output also for class instances, making it useless in practice)
QMAKE_CFLAGS.ARMCC += --diag_suppress 111,185,191,368,1293,1294,2874
+
+# 6780: <origvis> visibility removed from symbol '<symname>' through <impexp>
+QMAKE_LFLAGS.ARMCC += --diag_suppress 6780
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 1326a49..afaf338 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -209,7 +209,7 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
generatePkgFile(iconFile);
}
- writeBldInfContent(t, generatePkg);
+ writeBldInfContent(t, generatePkg, iconFile);
// Generate empty wrapper makefile here, because wrapper makefile must exist before writeMkFile,
// but all required data is not yet available.
@@ -378,14 +378,11 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile)
.arg(installPathRegResource)
.arg(fixedTarget + "_reg.rsc") << endl;
- QString myIconFile = iconFile;
- myIconFile = myIconFile.replace("\\\\", "\\");
-
if (!iconFile.isEmpty()) {
t << QString("\"%1epoc32/data/z%2\" - \"!:%3\"")
.arg(epocRoot())
- .arg(QString(myIconFile).replace('\\','/'))
- .arg(myIconFile) << endl << endl;
+ .arg(iconFile)
+ .arg(QDir::toNativeSeparators(iconFile)) << endl << endl;
}
}
}
@@ -1120,7 +1117,7 @@ void SymbianMakefileGenerator::writeMmpFileRulesPart(QTextStream& t)
}
}
-void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploymentExtension)
+void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploymentExtension, const QString &iconFile)
{
// Read user defined bld inf rules
@@ -1242,7 +1239,7 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
// Generate extension rules
- writeBldInfExtensionRulesPart(t);
+ writeBldInfExtensionRulesPart(t, iconFile);
userItems = userBldInfRules.value(BLD_INF_TAG_EXTENSIONS);
foreach(QString item, userItems)
@@ -1320,14 +1317,17 @@ void SymbianMakefileGenerator::writeRssFile(QString &numberOfIcons, QString &ico
t << "\t\t{" << endl;
t << "\t\tcaption = STRING_r_caption;" << endl;
- if (numberOfIcons.isEmpty() || iconFile.isEmpty()) {
+ QString rssIconFile = iconFile;
+ rssIconFile = rssIconFile.replace("/", "\\\\");
+
+ if (numberOfIcons.isEmpty() || rssIconFile.isEmpty()) {
// There can be maximum one item in this tag, validated when parsed
t << "\t\tnumber_of_icons = 0;" << endl;
t << "\t\ticon_file = \"\";" << endl;
} else {
// There can be maximum one item in this tag, validated when parsed
t << "\t\tnumber_of_icons = " << numberOfIcons << ";" << endl;
- t << "\t\ticon_file = \"" << iconFile << "\";" << endl;
+ t << "\t\ticon_file = \"" << rssIconFile << "\";" << endl;
}
t << "\t\t};" << endl;
t << "\t}" << endl;
@@ -1697,6 +1697,7 @@ void SymbianMakefileGenerator::generateCleanCommands(QTextStream& t,
void SymbianMakefileGenerator::removeSpecialCharacters(QString& str)
{
+ // When modifying this method check also application_icon.prf
str.replace(QString("/"), QString("_"));
str.replace(QString("\\"), QString("_"));
str.replace(QString("-"), QString("_"));
diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h
index a3e2c17..2e78c46 100644
--- a/qmake/generators/symbian/symmake.h
+++ b/qmake/generators/symbian/symmake.h
@@ -99,7 +99,7 @@ protected:
void checkOverridability(QStringList &overridableKeywords, QString &checkString);
void writeHeader(QTextStream &t);
- void writeBldInfContent(QTextStream& t, bool addDeploymentExtension);
+ void writeBldInfContent(QTextStream& t, bool addDeploymentExtension, const QString &iconFile);
static bool removeDuplicatedStrings(QStringList& stringList);
@@ -143,7 +143,7 @@ protected:
void generateDistcleanTargets(QTextStream& t);
// Subclass implements
- virtual void writeBldInfExtensionRulesPart(QTextStream& t) = 0;
+ virtual void writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile) = 0;
virtual void writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension) = 0;
virtual void writeMkFile(const QString& wrapperFileName, bool deploymentOnly) = 0;
virtual void writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile) = 0;
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index 1b5464f..6225720 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -379,10 +379,11 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
}
}
-void SymbianAbldMakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t)
+void SymbianAbldMakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile)
{
// We don't use extensions for anything in abld
Q_UNUSED(t);
+ Q_UNUSED(iconTargetFile);
}
bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t)
diff --git a/qmake/generators/symbian/symmake_abld.h b/qmake/generators/symbian/symmake_abld.h
index 11b9cd1..56d31e1 100644
--- a/qmake/generators/symbian/symmake_abld.h
+++ b/qmake/generators/symbian/symmake_abld.h
@@ -51,7 +51,7 @@ class SymbianAbldMakefileGenerator : public SymbianMakefileGenerator
protected:
// Inherited from parent
- virtual void writeBldInfExtensionRulesPart(QTextStream& t);
+ virtual void writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile);
virtual void writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension);
virtual void writeMkFile(const QString& wrapperFileName, bool deploymentOnly);
virtual void writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile);
diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
index 5e624de..4fd5833 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -238,7 +238,7 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo
}
}
-void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t)
+void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile)
{
// Makes sure we have needed FLMs in place.
exportFlm();
@@ -379,9 +379,12 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t
QString iconPath = iconInfo.path();
QString iconFile = iconInfo.baseName();
+ QFileInfo iconTargetInfo = fileInfo(iconTargetFile);
+ QString iconTarget = iconTargetInfo.fileName();
+
t << "OPTION SOURCES -c32 " << iconFile << endl;
t << "OPTION SOURCEDIR " << iconPath << endl;
- t << "OPTION TARGETFILE " << uid3 << ".mif" << endl;
+ t << "OPTION TARGETFILE " << iconTarget << endl;
t << "OPTION SVGENCODINGVERSION 3" << endl; // Compatibility with S60 3.1 devices and up
t << "END" << endl;
}
diff --git a/qmake/generators/symbian/symmake_sbsv2.h b/qmake/generators/symbian/symmake_sbsv2.h
index 9472b68..3394908 100644
--- a/qmake/generators/symbian/symmake_sbsv2.h
+++ b/qmake/generators/symbian/symmake_sbsv2.h
@@ -51,7 +51,7 @@ class SymbianSbsv2MakefileGenerator : public SymbianMakefileGenerator
protected:
// Inherited from parent
- virtual void writeBldInfExtensionRulesPart(QTextStream& t);
+ virtual void writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile);
virtual void writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension);
virtual void writeMkFile(const QString& wrapperFileName, bool deploymentOnly);
virtual void writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile);
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp
index 073b35a..b098728 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp
@@ -561,6 +561,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
asm volatile (
".globl " SYMBOL_STRING(ctiTrampoline) "\n"
+HIDE_SYMBOL(ctiTrampoline) "\n"
SYMBOL_STRING(ctiTrampoline) ":" "\n"
"stmdb sp!, {r1-r3}" "\n"
"stmdb sp!, {r4-r8, lr}" "\n"
@@ -584,6 +585,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n"
asm volatile (
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
+HIDE_SYMBOL(ctiVMThrowTrampoline) "\n"
SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
"mov r0, sp" "\n"
"mov lr, r6" "\n"
@@ -593,6 +595,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
// Both has the same return sequence
".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
+HIDE_SYMBOL(ctiOpThrowNotCaught) "\n"
SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
"add sp, sp, #32" "\n"
"ldmia sp!, {r4-r8, lr}" "\n"
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h
index 43975ff..c2b8c02 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h
@@ -246,6 +246,10 @@ namespace JSC {
MacroAssemblerCodePtr m_ctiNativeCallThunk;
};
+#if COMPILER(GCC)
+#pragma GCC visibility push(hidden)
+#endif
+
extern "C" {
EncodedJSValue JIT_STUB cti_op_add(STUB_ARGS_DECLARATION);
EncodedJSValue JIT_STUB cti_op_bitand(STUB_ARGS_DECLARATION);
@@ -363,6 +367,10 @@ extern "C" {
void* JIT_STUB cti_vm_lazyLinkCall(STUB_ARGS_DECLARATION);
} // extern "C"
+#if COMPILER(GCC)
+#pragma GCC visibility pop
+#endif
+
} // namespace JSC
#endif // ENABLE(JIT)
diff --git a/src/3rdparty/phonon/mmf/objectdump.cpp b/src/3rdparty/phonon/mmf/objectdump.cpp
index 6b6b71e..3d10be4 100644
--- a/src/3rdparty/phonon/mmf/objectdump.cpp
+++ b/src/3rdparty/phonon/mmf/objectdump.cpp
@@ -16,8 +16,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef QT_NO_DEBUG
-
#include <QByteArray>
#include <QDebug>
#include <QHash>
@@ -525,5 +523,3 @@ void dumpAncestors(const QObject& leaf, QVisitor& visitor)
QT_END_NAMESPACE
-#endif
-
diff --git a/src/3rdparty/phonon/mmf/objectdump.h b/src/3rdparty/phonon/mmf/objectdump.h
index e94b3ac..86aeaba 100644
--- a/src/3rdparty/phonon/mmf/objectdump.h
+++ b/src/3rdparty/phonon/mmf/objectdump.h
@@ -19,8 +19,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#ifndef OBJECTDUMP_H
#define OBJECTDUMP_H
-#include "objectdump_global.h"
-
#include <QObject>
#include <QList>
#include <QByteArray>
@@ -34,7 +32,7 @@ namespace ObjectDump
/**
* Abstract base for annotator classes invoked by QVisitor.
*/
-class OBJECTDUMP_EXPORT QAnnotator : public QObject
+class QAnnotator : public QObject
{
Q_OBJECT
public:
@@ -45,7 +43,7 @@ public:
/**
* Annotator which replicates QObject::dumpObjectTree functionality.
*/
-class OBJECTDUMP_EXPORT QAnnotatorBasic : public QAnnotator
+class QAnnotatorBasic : public QAnnotator
{
Q_OBJECT
public:
@@ -55,7 +53,7 @@ public:
/**
* Annotator which returns widget information.
*/
-class OBJECTDUMP_EXPORT QAnnotatorWidget : public QAnnotator
+class QAnnotatorWidget : public QAnnotator
{
Q_OBJECT
public:
@@ -68,7 +66,7 @@ class QDumperPrivate;
/**
* Class used to dump information about individual QObjects.
*/
-class OBJECTDUMP_EXPORT QDumper : public QObject
+class QDumper : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(QDumper)
@@ -103,7 +101,7 @@ class QVisitorPrivate;
/**
* Visitor class which dumps information about nodes in the object tree.
*/
-class OBJECTDUMP_EXPORT QVisitor : public QObject
+class QVisitor : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(QVisitor)
@@ -152,12 +150,12 @@ private:
// Utility functions
//-----------------------------------------------------------------------------
-void OBJECTDUMP_EXPORT addDefaultAnnotators(QDumper& dumper);
-void OBJECTDUMP_EXPORT addDefaultAnnotators(QVisitor& visitor);
+void addDefaultAnnotators(QDumper& dumper);
+void addDefaultAnnotators(QVisitor& visitor);
-void OBJECTDUMP_EXPORT dumpTreeFromRoot(const QObject& root, QVisitor& visitor);
-void OBJECTDUMP_EXPORT dumpTreeFromLeaf(const QObject& leaf, QVisitor& visitor);
-void OBJECTDUMP_EXPORT dumpAncestors(const QObject& leaf, QVisitor& visitor);
+void dumpTreeFromRoot(const QObject& root, QVisitor& visitor);
+void dumpTreeFromLeaf(const QObject& leaf, QVisitor& visitor);
+void dumpAncestors(const QObject& leaf, QVisitor& visitor);
} // namespace ObjectDump
diff --git a/src/3rdparty/phonon/mmf/objectdump_global.h b/src/3rdparty/phonon/mmf/objectdump_global.h
deleted file mode 100644
index b8987e0..0000000
--- a/src/3rdparty/phonon/mmf/objectdump_global.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* This file is part of the KDE project.
-
-Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-
-This library is free software: you can redistribute it and/or modify
-it under the terms of the GNU Lesser General Public License as published by
-the Free Software Foundation, either version 2.1 or 3 of the License.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public License
-along with this library. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#ifndef OBJECTDUMP_GLOBAL_H
-#define OBJECTDUMP_GLOBAL_H
-
-#include <QtCore/QtGlobal>
-
-#if defined(OBJECTDUMP_LIBRARY)
-# define OBJECTDUMP_EXPORT
-#else
-# define OBJECTDUMP_EXPORT
-#endif
-
-#endif
diff --git a/src/3rdparty/phonon/mmf/objectdump_symbian.cpp b/src/3rdparty/phonon/mmf/objectdump_symbian.cpp
index 41dd240..2efebdb 100644
--- a/src/3rdparty/phonon/mmf/objectdump_symbian.cpp
+++ b/src/3rdparty/phonon/mmf/objectdump_symbian.cpp
@@ -16,8 +16,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef QT_NO_DEBUG
-
#include <QTextStream>
#include <QWidget>
#include <coecntrl.h>
@@ -160,5 +158,3 @@ void addDefaultAnnotators_sys(QVisitor& visitor)
QT_END_NAMESPACE
-#endif
-
diff --git a/src/3rdparty/phonon/mmf/objecttree.cpp b/src/3rdparty/phonon/mmf/objecttree.cpp
index 750db22..06b0ced 100644
--- a/src/3rdparty/phonon/mmf/objecttree.cpp
+++ b/src/3rdparty/phonon/mmf/objecttree.cpp
@@ -16,8 +16,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef QT_NO_DEBUG
-
#include <QTextStream>
#include <QWidget>
#include "objecttree.h"
@@ -100,5 +98,3 @@ AncestorConstIterator::AncestorConstIterator(const QObject& leaf)
QT_END_NAMESPACE
-#endif
-
diff --git a/src/3rdparty/phonon/mmf/objecttree.h b/src/3rdparty/phonon/mmf/objecttree.h
index 98bdf14..96adb6f 100644
--- a/src/3rdparty/phonon/mmf/objecttree.h
+++ b/src/3rdparty/phonon/mmf/objecttree.h
@@ -19,8 +19,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#ifndef OBJECTTREE_H
#define OBJECTTREE_H
-#include "objectdump_global.h"
-
#include <QObject>
#include <QStack>
@@ -32,7 +30,7 @@ namespace ObjectTree
/**
* Depth-first iterator for QObject tree
*/
-class OBJECTDUMP_EXPORT DepthFirstConstIterator
+class DepthFirstConstIterator
{
public:
DepthFirstConstIterator();
@@ -60,7 +58,7 @@ private:
/**
* Ancestor iterator for QObject tree
*/
-class OBJECTDUMP_EXPORT AncestorConstIterator
+class AncestorConstIterator
{
public:
AncestorConstIterator();
diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
index 304f9ef..382a8c7 100644
--- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
@@ -1,3 +1,20 @@
+2009-11-23 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Symbian] Fix lastIndexOf() for Symbian
+ https://bugs.webkit.org/show_bug.cgi?id=31773
+
+ Symbian soft floating point library has problems with operators
+ comparing NaN to numbers. Without a workaround lastIndexOf()
+ function does not work.
+
+ Patch developed by David Leong.
+
+ * runtime/StringPrototype.cpp:
+ (JSC::stringProtoFuncLastIndexOf):Add an extra test
+ to check for NaN for Symbian.
+
2009-11-18 Harald Fernengel <harald.fernengel@nokia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp
index a0713b8..a0cc9f1 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp
@@ -469,6 +469,11 @@ JSValue JSC_HOST_CALL stringProtoFuncLastIndexOf(ExecState* exec, JSObject*, JSV
dpos = 0;
else if (!(dpos <= len)) // true for NaN
dpos = len;
+#if PLATFORM(SYMBIAN)
+ // Work around for broken NaN compare operator
+ else if (isnan(dpos))
+ dpos = len;
+#endif
return jsNumber(exec, s.rfind(u2, static_cast<int>(dpos)));
}
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index f40dda4..5818e83 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -8,4 +8,4 @@ The commit imported was from the
and has the sha1 checksum
- 7bdf90f753d25fb1b5628b0980827df11110ad5a
+ efa69b6181ce5c045097351cdcf6c158da3f4888
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 6daf411..9644470 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,12 @@
+2009-11-19 Olivier Goffart <ogoffart@trolltech.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Normalize signal and slot signatures.
+
+ * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+
2009-11-18 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 457e9c2..2408dd4 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,22 @@
+2009-11-19 Olivier Goffart <ogoffart@trolltech.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Normalize signal and slot signatures.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebView::setPage):
+ * Api/qwebview.cpp:
+ (QWebView::setPage):
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::setFrame):
+ * docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp:
+ (wrapInFunction):
+ * tests/qwebframe/tst_qwebframe.cpp:
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::modified):
+ (tst_QWebPage::database):
+
2009-11-18 Paul Olav Tvete <paul.tvete@nokia.com>
Reviewed by Simon Hausmann.
diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp
index c735778..d529f67 100644
--- a/src/corelib/animation/qvariantanimation.cpp
+++ b/src/corelib/animation/qvariantanimation.cpp
@@ -104,15 +104,32 @@ QT_BEGIN_NAMESPACE
\o \l{QMetaType::}{QLine}
\o \l{QMetaType::}{QLineF}
\o \l{QMetaType::}{QPoint}
+ \o \l{QMetaType::}{QPointF}
\o \l{QMetaType::}{QSize}
\o \l{QMetaType::}{QSizeF}
\o \l{QMetaType::}{QRect}
\o \l{QMetaType::}{QRectF}
+ \o \l{QMetaType::}{QColor}
\endlist
If you need to interpolate other variant types, including custom
types, you have to implement interpolation for these yourself.
- You do this by reimplementing interpolated(), which returns
+ To do this, you can register an interpolator function for a given
+ type. This function takes 3 parameters: the start value, the end value
+ and the current progress.
+
+ Example:
+ \code
+ QVariant myColorInterpolator(const QColor &start, const QColor &end, qreal progress)
+ {
+ ...
+ return QColor(...);
+ }
+ ...
+ qRegisterAnimationInterpolator<QColor>(myColorInterpolator);
+ \endcode
+
+ Another option is to reimplement interpolated(), which returns
interpolation values for the value being interpolated.
\omit We need some snippets around here. \endomit
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index 680fcd7..5d62095 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -1573,9 +1573,6 @@ QTextCodec *QTextCodec::codecForHtml(const QByteArray &ba)
cannot be detected from the content provided, \a defaultCodec is
returned.
- The behavior of this function is undefined if \a ba is not
- encoded in unicode.
-
\sa codecForHtml()
*/
QTextCodec *QTextCodec::codecForUtfText(const QByteArray &ba, QTextCodec *defaultCodec)
@@ -1620,9 +1617,6 @@ QTextCodec *QTextCodec::codecForUtfText(const QByteArray &ba, QTextCodec *defaul
that is capable of decoding the text to unicode. If the codec
cannot be detected, this overload returns a Latin-1 QTextCodec.
- The behavior of this function is undefined if \a ba is not
- encoded in unicode.
-
\sa codecForHtml()
*/
QTextCodec *QTextCodec::codecForUtfText(const QByteArray &ba)
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index 05e6fab..35737b3 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -1254,7 +1254,7 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, QFile::MemoryMapFla
// undefined behavior. Otherwise, let mmap have its say.
if (doStat()
&& (QT_OFF_T(size) > st.st_size - QT_OFF_T(offset)))
- return 0;
+ qWarning("QFSFileEngine::map: Mapping a file beyond its size is not portable");
int access = 0;
if (openMode & QIODevice::ReadOnly) access |= PROT_READ;
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index b84961f..0e5a2de 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -1157,6 +1157,10 @@ QByteArray QIODevice::readLine(qint64 maxSize)
// If resize fails or maxSize == 0, read incrementally
if (maxSize == 0)
maxSize = INT_MAX;
+
+ // The first iteration needs to leave an extra byte for the terminating null
+ result.resize(1);
+
qint64 readResult;
do {
result.resize(int(qMin(maxSize, result.size() + QIODEVICE_BUFFERSIZE)));
@@ -1164,7 +1168,7 @@ QByteArray QIODevice::readLine(qint64 maxSize)
if (readResult > 0 || readBytes == 0)
readBytes += readResult;
} while (readResult == QIODEVICE_BUFFERSIZE
- && result[int(readBytes)] != '\n');
+ && result[int(readBytes - 1)] != '\n');
} else
readBytes = readLine(result.data(), result.size());
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 1260d47..95602d9 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -154,6 +154,15 @@ QObjectPrivate::QObjectPrivate(int version)
hasGuards = false;
}
+#ifdef Q_CC_INTEL
+/* Workaround for a bug in win32-icc where it seems to inline ~QObjectPrivate too aggressive.
+ When icc compiles QtGui, it inlines ~QObjectPrivate so that it would generate a call to
+ ~QObjectData. However, ~QObjectData is not exported from QtCore, so it does not link.
+ See also QTBUG-5145 for info on how this manifested itself.
+ */
+# pragma auto_inline(off)
+#endif
+
QObjectPrivate::~QObjectPrivate()
{
delete static_cast<QAbstractDynamicMetaObject*>(metaObject);
@@ -165,6 +174,9 @@ QObjectPrivate::~QObjectPrivate()
delete extraData;
#endif
}
+#ifdef Q_CC_INTEL
+# pragma auto_inline(on)
+#endif
int *QObjectPrivate::setDeleteWatch(QObjectPrivate *d, int *w) {
diff --git a/src/gui/dialogs/qcolordialog_mac.mm b/src/gui/dialogs/qcolordialog_mac.mm
index 5f074c0..53d2e1e 100644
--- a/src/gui/dialogs/qcolordialog_mac.mm
+++ b/src/gui/dialogs/qcolordialog_mac.mm
@@ -336,7 +336,6 @@ QT_USE_NAMESPACE
}
}
- QAbstractEventDispatcher::instance()->interrupt();
if (mResultCode == NSCancelButton)
mPriv->colorDialog()->reject();
else
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index da1c151..94a37a0 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1240,7 +1240,7 @@ void QGraphicsItemPrivate::initStyleOption(QStyleOptionGraphicsItem *option, con
const QTransform reverseMap = worldTransform.inverted();
const QVector<QRect> exposedRects(exposedRegion.rects());
for (int i = 0; i < exposedRects.size(); ++i) {
- option->exposedRect |= reverseMap.mapRect(exposedRects.at(i));
+ option->exposedRect |= reverseMap.mapRect(QRectF(exposedRects.at(i)));
if (option->exposedRect.contains(brect))
break;
}
diff --git a/src/gui/graphicsview/qgraphicsitemanimation.cpp b/src/gui/graphicsview/qgraphicsitemanimation.cpp
index be2f300..b67ee2e 100644
--- a/src/gui/graphicsview/qgraphicsitemanimation.cpp
+++ b/src/gui/graphicsview/qgraphicsitemanimation.cpp
@@ -45,6 +45,7 @@
support for QGraphicsItem.
\since 4.2
\ingroup graphicsview-api
+ \deprecated
The QGraphicsItemAnimation class animates a QGraphicsItem. You can
schedule changes to the item's transformation matrix at
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index 7c24002..4215f97 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -54,4 +54,4 @@ DEFINES += Q_INTERNAL_QAPP_SRC
symbian:TARGET.UID3=0x2001B2DD
# ro-section in gui can exceed default allocated space, so more rw-section little further
-symbian-sbsv2: MMP_RULES += "LINKEROPTION armcc --rw-base 0x800000"
+symbian-sbsv2: QMAKE_LFLAGS.ARMCC += --rw-base 0x800000"
diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp
index 15af7a2..ad9bdd0 100644
--- a/src/gui/image/qiconloader.cpp
+++ b/src/gui/image/qiconloader.cpp
@@ -249,21 +249,19 @@ QThemeIconEntries QIconLoader::findIconHelper(const QString &themeName,
const QIconDirInfo &dirInfo = subDirs.at(i);
QString subdir = dirInfo.path;
QDir currentDir(contentDir + subdir);
-
- if (dirInfo.type == QIconDirInfo::Scalable && m_supportsSvg &&
- currentDir.exists(iconName + svgext)) {
- ScalableEntry *iconEntry = new ScalableEntry;
- iconEntry->dir = dirInfo;
- iconEntry->filename = currentDir.filePath(iconName + svgext);
- entries.append(iconEntry);
-
- } else if (currentDir.exists(iconName + pngext)) {
+ if (currentDir.exists(iconName + pngext)) {
PixmapEntry *iconEntry = new PixmapEntry;
iconEntry->dir = dirInfo;
iconEntry->filename = currentDir.filePath(iconName + pngext);
// Notice we ensure that pixmap entries allways come before
// scalable to preserve search order afterwards
entries.prepend(iconEntry);
+ } else if (m_supportsSvg &&
+ currentDir.exists(iconName + svgext)) {
+ ScalableEntry *iconEntry = new ScalableEntry;
+ iconEntry->dir = dirInfo;
+ iconEntry->filename = currentDir.filePath(iconName + svgext);
+ entries.append(iconEntry);
}
}
@@ -444,10 +442,8 @@ QIconLoaderEngineEntry *QIconLoaderEngine::entryForSize(const QSize &size)
/*
* Returns the actual icon size. For scalable svg's this is equivalent
- * to the requested size. Otherwise the closest match is returned.
- *
- * todo: the spec is a bit fuzzy in this area, but we should probably
- * allow scaling down pixmap icons as well.
+ * to the requested size. Otherwise the closest match is returned but
+ * we can never return a bigger size than the requested size.
*
*/
QSize QIconLoaderEngine::actualSize(const QSize &size, QIcon::Mode mode,
@@ -460,8 +456,10 @@ QSize QIconLoaderEngine::actualSize(const QSize &size, QIcon::Mode mode,
const QIconDirInfo &dir = entry->dir;
if (dir.type == QIconDirInfo::Scalable)
return size;
- else
- return QSize(dir.size, dir.size);
+ else {
+ int result = qMin<int>(dir.size, qMin(size.width(), size.height()));
+ return QSize(result, result);
+ }
}
return QIconEngineV2::actualSize(size, mode, state);
}
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp
index e4ea2e9..3b43ab6 100644
--- a/src/gui/image/qnativeimage.cpp
+++ b/src/gui/image/qnativeimage.cpp
@@ -178,6 +178,8 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /*
if (ok) {
xshmimg->data = (char*)shmat(xshminfo.shmid, 0, 0);
xshminfo.shmaddr = xshmimg->data;
+ if (shmctl(xshminfo.shmid, IPC_RMID, 0) == -1)
+ qWarning() << "Error while marking the shared memory segment to be destroyed";
ok = (xshminfo.shmaddr != (char*)-1);
if (ok)
image = QImage((uchar *)xshmimg->data, width, height, systemFormat());
diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp
index 17baa50..dc33ade 100644
--- a/src/gui/image/qpixmap_s60.cpp
+++ b/src/gui/image/qpixmap_s60.cpp
@@ -977,4 +977,9 @@ void QS60PixmapData::fromNativeType(void* pixmap, NativeType nativeType)
}
}
+QPixmapData *QS60PixmapData::createCompatiblePixmapData() const
+{
+ return new QS60PixmapData(pixelType());
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/image/qpixmap_s60_p.h b/src/gui/image/qpixmap_s60_p.h
index b1b5824..8631ebd 100644
--- a/src/gui/image/qpixmap_s60_p.h
+++ b/src/gui/image/qpixmap_s60_p.h
@@ -87,6 +87,8 @@ public:
QS60PixmapData(PixelType type);
~QS60PixmapData();
+ QPixmapData *createCompatiblePixmapData() const;
+
void resize(int width, int height);
void fromImage(const QImage &image, Qt::ImageConversionFlags flags);
void copy(const QPixmapData *data, const QRect &rect);
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index 23bef12..c691fe2 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -138,10 +138,22 @@ void QAbstractItemViewPrivate::init()
#endif
}
+void QAbstractItemViewPrivate::setHoverIndex(const QPersistentModelIndex &index)
+{
+ Q_Q(QAbstractItemView);
+ if (hover == index)
+ return;
+
+ q->update(hover); //update the old one
+ hover = index;
+ q->update(hover); //update the new one
+}
+
void QAbstractItemViewPrivate::checkMouseMove(const QPersistentModelIndex &index)
{
//we take a persistent model index because the model might change by emitting signals
Q_Q(QAbstractItemView);
+ setHoverIndex(index);
if (viewportEnteredNeeded || enteredIndex != index) {
viewportEnteredNeeded = false;
@@ -1536,22 +1548,13 @@ bool QAbstractItemView::viewportEvent(QEvent *event)
{
Q_D(QAbstractItemView);
switch (event->type()) {
- case QEvent::HoverEnter: {
- QHoverEvent *he = static_cast<QHoverEvent*>(event);
- d->hover = indexAt(he->pos());
- update(d->hover);
- break; }
- case QEvent::HoverLeave: {
- update(d->hover); // update old
- d->hover = QModelIndex();
- break; }
- case QEvent::HoverMove: {
- QHoverEvent *he = static_cast<QHoverEvent*>(event);
- QModelIndex old = d->hover;
- d->hover = indexAt(he->pos());
- if (d->hover != old)
- d->viewport->update(visualRect(old)|visualRect(d->hover));
- break; }
+ case QEvent::HoverMove:
+ case QEvent::HoverEnter:
+ d->setHoverIndex(indexAt(static_cast<QHoverEvent*>(event)->pos()));
+ break;
+ case QEvent::HoverLeave:
+ d->setHoverIndex(QModelIndex());
+ break;
case QEvent::Enter:
d->viewportEnteredNeeded = true;
break;
diff --git a/src/gui/itemviews/qabstractitemview_p.h b/src/gui/itemviews/qabstractitemview_p.h
index c691f61..f1ba874 100644
--- a/src/gui/itemviews/qabstractitemview_p.h
+++ b/src/gui/itemviews/qabstractitemview_p.h
@@ -152,6 +152,8 @@ public:
const QEvent *event) const;
virtual void selectAll(QItemSelectionModel::SelectionFlags command);
+ void setHoverIndex(const QPersistentModelIndex &index);
+
void checkMouseMove(const QPersistentModelIndex &index);
inline void checkMouseMove(const QPoint &pos) { checkMouseMove(q_func()->indexAt(pos)); }
diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp
index 052308c..d03cdd3 100644
--- a/src/gui/itemviews/qlistview.cpp
+++ b/src/gui/itemviews/qlistview.cpp
@@ -966,15 +966,19 @@ void QListView::paintEvent(QPaintEvent *e)
bool alternateBase = false;
int previousRow = -2; // trigger the alternateBase adjustment on first pass
+ int maxSize = (flow() == TopToBottom)
+ ? qMax(viewport()->size().width(), d->contentsSize().width()) - 2 * d->spacing()
+ : qMax(viewport()->size().height(), d->contentsSize().height()) - 2 * d->spacing();
+
QVector<QModelIndex>::const_iterator end = toBeRendered.constEnd();
for (QVector<QModelIndex>::const_iterator it = toBeRendered.constBegin(); it != end; ++it) {
Q_ASSERT((*it).isValid());
option.rect = visualRect(*it);
if (flow() == TopToBottom)
- option.rect.setWidth(qMin(d->contentsSize().width() - 2 * d->spacing(), option.rect.width()));
+ option.rect.setWidth(qMin(maxSize, option.rect.width()));
else
- option.rect.setHeight(qMin(d->contentsSize().height() - 2 * d->spacing(), option.rect.height()));
+ option.rect.setHeight(qMin(maxSize, option.rect.height()));
option.state = state;
if (selections && selections->isSelected(*it))
diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp
index 02e5fff..d27e693 100644
--- a/src/gui/itemviews/qtableview.cpp
+++ b/src/gui/itemviews/qtableview.cpp
@@ -114,7 +114,7 @@ void QSpanCollection::updateSpan(QSpanCollection::Span *span, int old_height)
}
} else if (old_height > span->height()) {
//remove the span from all the subspans lists that intersect the columns not covered anymore
- Index::iterator it_y = index.lowerBound(-span->bottom());
+ Index::iterator it_y = index.lowerBound(qMin(-span->bottom(), 0));
Q_ASSERT(it_y != index.end()); //it_y must exist since the span is in the list
while (-it_y.key() <= span->top() + old_height -1) {
if (-it_y.key() > span->bottom()) {
@@ -1064,14 +1064,29 @@ QTableView::~QTableView()
void QTableView::setModel(QAbstractItemModel *model)
{
Q_D(QTableView);
- connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)),
- this, SLOT(_q_updateSpanInsertedRows(QModelIndex,int,int)));
- connect(model, SIGNAL(columnsInserted(QModelIndex,int,int)),
- this, SLOT(_q_updateSpanInsertedColumns(QModelIndex,int,int)));
- connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
- this, SLOT(_q_updateSpanRemovedRows(QModelIndex,int,int)));
- connect(model, SIGNAL(columnsRemoved(QModelIndex,int,int)),
- this, SLOT(_q_updateSpanRemovedColumns(QModelIndex,int,int)));
+ if (model == d->model)
+ return;
+ //let's disconnect from the old model
+ if (d->model && d->model != QAbstractItemModelPrivate::staticEmptyModel()) {
+ disconnect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)),
+ this, SLOT(_q_updateSpanInsertedRows(QModelIndex,int,int)));
+ disconnect(d->model, SIGNAL(columnsInserted(QModelIndex,int,int)),
+ this, SLOT(_q_updateSpanInsertedColumns(QModelIndex,int,int)));
+ disconnect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
+ this, SLOT(_q_updateSpanRemovedRows(QModelIndex,int,int)));
+ disconnect(d->model, SIGNAL(columnsRemoved(QModelIndex,int,int)),
+ this, SLOT(_q_updateSpanRemovedColumns(QModelIndex,int,int)));
+ }
+ if (model) { //and connect to the new one
+ connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)),
+ this, SLOT(_q_updateSpanInsertedRows(QModelIndex,int,int)));
+ connect(model, SIGNAL(columnsInserted(QModelIndex,int,int)),
+ this, SLOT(_q_updateSpanInsertedColumns(QModelIndex,int,int)));
+ connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
+ this, SLOT(_q_updateSpanRemovedRows(QModelIndex,int,int)));
+ connect(model, SIGNAL(columnsRemoved(QModelIndex,int,int)),
+ this, SLOT(_q_updateSpanRemovedColumns(QModelIndex,int,int)));
+ }
d->verticalHeader->setModel(model);
d->horizontalHeader->setModel(model);
QAbstractItemView::setModel(model);
diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
index 8d50870b..3ad9fbb 100644
--- a/src/gui/itemviews/qtreeview.cpp
+++ b/src/gui/itemviews/qtreeview.cpp
@@ -215,6 +215,13 @@ void QTreeView::setModel(QAbstractItemModel *model)
Q_D(QTreeView);
if (model == d->model)
return;
+ if (d->model && d->model != QAbstractItemModelPrivate::staticEmptyModel()) {
+ disconnect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
+ this, SLOT(rowsRemoved(QModelIndex,int,int)));
+
+ disconnect(d->model, SIGNAL(modelAboutToBeReset()), this, SLOT(_q_modelAboutToBeReset()));
+ }
+
if (d->selectionModel) { // support row editing
disconnect(d->selectionModel, SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
d->model, SLOT(submit()));
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 4764a2d..9f4cd0c 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -933,7 +933,8 @@ void QApplicationPrivate::initialize()
QApplicationPrivate::wheel_scroll_lines = 3;
#endif
- initializeMultitouch();
+ if (qt_is_gui_used)
+ initializeMultitouch();
}
/*!
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index 84da56e..22a0959 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -2449,7 +2449,7 @@ OSStatus QApplicationPrivate::globalAppleEventProcessor(const AppleEvent *ae, Ap
switch(aeID) {
case kAEQuitApplication: {
extern bool qt_mac_quit_menu_item_enabled; // qmenu_mac.cpp
- if(!QApplicationPrivate::modalState() && qt_mac_quit_menu_item_enabled) {
+ if (qt_mac_quit_menu_item_enabled) {
QCloseEvent ev;
QApplication::sendSpontaneousEvent(app, &ev);
if(ev.isAccepted()) {
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index c7f0c00..85b6d00 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -712,7 +712,7 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod
Qt::KeyboardModifiers mods = mapToQtModifiers(keyEvent.iModifiers);
QKeyEventEx qKeyEvent(type == EEventKeyUp ? QEvent::KeyRelease : QEvent::KeyPress, keyCode,
mods, qt_keymapper_private()->translateKeyEvent(keyCode, mods),
- false, 1, keyEvent.iScanCode, s60Keysym, keyEvent.iModifiers);
+ (keyEvent.iRepeats != 0), 1, keyEvent.iScanCode, s60Keysym, keyEvent.iModifiers);
// WId wid = reinterpret_cast<RWindowGroup *>(keyEvent.Handle())->Child();
// if (!wid)
// Could happen if window isn't shown yet.
diff --git a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
index 37dcc67..304e5d3 100644
--- a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
+++ b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
@@ -178,6 +178,9 @@ static void cleanupCocoaApplicationDelegate()
return [[qtMenuLoader retain] autorelease];
}
+// This function will only be called when NSApp is actually running. Before
+// that, the kAEQuitApplication apple event will be sendt to
+// QApplicationPrivate::globalAppleEventProcessor in qapplication_mac.mm
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
{
Q_UNUSED(sender);
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index a16d1f8..3da783f 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -64,12 +64,16 @@
#include <qdebug.h>
-@interface NSEvent (DeviceDelta)
+@interface NSEvent (Qt_Compile_Leopard_DeviceDelta)
- (CGFloat)deviceDeltaX;
- (CGFloat)deviceDeltaY;
- (CGFloat)deviceDeltaZ;
@end
+@interface NSEvent (Qt_Compile_Leopard_Gestures)
+ - (CGFloat)magnification;
+@end
+
QT_BEGIN_NAMESPACE
Q_GLOBAL_STATIC(DnDParams, qMacDnDParams);
@@ -79,6 +83,7 @@ extern bool qt_sendSpontaneousEvent(QObject *, QEvent *); // qapplication.cpp
extern OSViewRef qt_mac_nativeview_for(const QWidget *w); // qwidget_mac.mm
extern const QStringList& qEnabledDraggedTypes(); // qmime_mac.cpp
extern QPointer<QWidget> qt_mouseover; //qapplication_mac.mm
+extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp
Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum)
{
@@ -691,6 +696,9 @@ extern "C" {
- (void)mouseDown:(NSEvent *)theEvent
{
+ if (!qt_button_down)
+ qt_button_down = qwidget;
+
qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonPress, Qt::LeftButton);
// Don't call super here. This prevents us from getting the mouseUp event,
// which we need to send even if the mouseDown event was not accepted.
@@ -700,75 +708,62 @@ extern "C" {
- (void)mouseUp:(NSEvent *)theEvent
{
- bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, Qt::LeftButton);
+ qt_button_down = 0;
- if (!mouseOK)
- [super mouseUp:theEvent];
+ qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, Qt::LeftButton);
}
- (void)rightMouseDown:(NSEvent *)theEvent
{
- bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonPress, Qt::RightButton);
+ if (!qt_button_down)
+ qt_button_down = qwidget;
- if (!mouseOK)
- [super rightMouseDown:theEvent];
+ qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonPress, Qt::RightButton);
}
- (void)rightMouseUp:(NSEvent *)theEvent
{
- bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, Qt::RightButton);
+ qt_button_down = 0;
- if (!mouseOK)
- [super rightMouseUp:theEvent];
+ qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, Qt::RightButton);
}
- (void)otherMouseDown:(NSEvent *)theEvent
{
- Qt::MouseButton mouseButton = cocoaButton2QtButton([theEvent buttonNumber]);
- bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonPress, mouseButton);
+ if (!qt_button_down)
+ qt_button_down = qwidget;
- if (!mouseOK)
- [super otherMouseDown:theEvent];
+ Qt::MouseButton mouseButton = cocoaButton2QtButton([theEvent buttonNumber]);
+ qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonPress, mouseButton);
}
- (void)otherMouseUp:(NSEvent *)theEvent
{
- Qt::MouseButton mouseButton = cocoaButton2QtButton([theEvent buttonNumber]);
- bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, mouseButton);
-
- if (!mouseOK)
- [super otherMouseUp:theEvent];
+ qt_button_down = 0;
+ Qt::MouseButton mouseButton = cocoaButton2QtButton([theEvent buttonNumber]);
+ qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, mouseButton);
}
- (void)mouseDragged:(NSEvent *)theEvent
{
qMacDnDParams()->view = self;
qMacDnDParams()->theEvent = theEvent;
- bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton);
-
- if (!mouseOK)
- [super mouseDragged:theEvent];
+ qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton);
}
- (void)rightMouseDragged:(NSEvent *)theEvent
{
qMacDnDParams()->view = self;
qMacDnDParams()->theEvent = theEvent;
- bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton);
-
- if (!mouseOK)
- [super rightMouseDragged:theEvent];
+ qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton);
}
- (void)otherMouseDragged:(NSEvent *)theEvent
{
qMacDnDParams()->view = self;
qMacDnDParams()->theEvent = theEvent;
- bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton);
-
- if (!mouseOK)
- [super otherMouseDragged:theEvent];
+ qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton);
}
- (void)scrollWheel:(NSEvent *)theEvent
@@ -893,6 +888,7 @@ extern "C" {
bool all = qwidget->testAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents);
qt_translateRawTouchEvent(qwidget, QTouchEvent::TouchPad, QCocoaTouch::getCurrentTouchPointList(event, all));
}
+#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
- (void)magnifyWithEvent:(NSEvent *)event;
{
@@ -963,7 +959,6 @@ extern "C" {
qNGEvent.position = flipPoint(p).toPoint();
qt_sendSpontaneousEvent(qwidget, &qNGEvent);
}
-#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
- (void)frameDidChange:(NSNotification *)note
{
@@ -1451,7 +1446,7 @@ Qt::DropAction QDragManager::drag(QDrag *o)
[image release];
dragPrivate()->executed_action = Qt::IgnoreAction;
object = 0;
- Qt::DropAction performedAction(qt_mac_mapNSDragOperation(dndParams.performedAction));
+ Qt::DropAction performedAction(qt_mac_mapNSDragOperation(qMacDnDParams()->performedAction));
// do post drag processing, if required.
if(performedAction != Qt::IgnoreAction) {
// check if the receiver points us to a file location.
diff --git a/src/gui/kernel/qcocoawindowdelegate_mac.mm b/src/gui/kernel/qcocoawindowdelegate_mac.mm
index 9fb674e..8a22a65 100644
--- a/src/gui/kernel/qcocoawindowdelegate_mac.mm
+++ b/src/gui/kernel/qcocoawindowdelegate_mac.mm
@@ -324,8 +324,13 @@ static void cleanupCocoaWindowDelegate()
NSRect frameToReturn = defaultFrame;
QWidget *qwidget = m_windowHash->value(window);
QSizeF size = qwidget->maximumSize();
- frameToReturn.size.width = qMin<CGFloat>(frameToReturn.size.width, size.width());
- frameToReturn.size.height = qMin<CGFloat>(frameToReturn.size.height, size.height());
+ NSRect windowFrameRect = [window frame];
+ NSRect viewFrameRect = [[window contentView] frame];
+ // consider additional size required for titlebar & frame
+ frameToReturn.size.width = qMin<CGFloat>(frameToReturn.size.width,
+ size.width()+(windowFrameRect.size.width - viewFrameRect.size.width));
+ frameToReturn.size.height = qMin<CGFloat>(frameToReturn.size.height,
+ size.height()+(windowFrameRect.size.height - viewFrameRect.size.height));
return frameToReturn;
}
diff --git a/src/gui/kernel/qeventdispatcher_mac.mm b/src/gui/kernel/qeventdispatcher_mac.mm
index 427f0b0..e0eebfd 100644
--- a/src/gui/kernel/qeventdispatcher_mac.mm
+++ b/src/gui/kernel/qeventdispatcher_mac.mm
@@ -572,7 +572,7 @@ bool QEventDispatcherMac::processEvents(QEventLoop::ProcessEventsFlags flags)
while (!d->interrupt && [NSApp runModalSession:session] == NSRunContinuesResponse)
qt_mac_waitForMoreModalSessionEvents();
if (!d->interrupt && session == d->currentModalSessionCached) {
- // Someone called e.g. [NSApp stopModal:] from outside the event
+ // INVARIANT: Someone called e.g. [NSApp stopModal:] from outside the event
// dispatcher (e.g to stop a native dialog). But that call wrongly stopped
// 'session' as well. As a result, we need to restart all internal sessions:
d->temporarilyStopAllModalSessions();
@@ -596,7 +596,13 @@ bool QEventDispatcherMac::processEvents(QEventLoop::ProcessEventsFlags flags)
if (NSModalSession session = d->currentModalSession()) {
if (flags & QEventLoop::WaitForMoreEvents)
qt_mac_waitForMoreModalSessionEvents();
- [NSApp runModalSession:session];
+ NSInteger status = [NSApp runModalSession:session];
+ if (status != NSRunContinuesResponse && session == d->currentModalSessionCached) {
+ // INVARIANT: Someone called e.g. [NSApp stopModal:] from outside the event
+ // dispatcher (e.g to stop a native dialog). But that call wrongly stopped
+ // 'session' as well. As a result, we need to restart all internal sessions:
+ d->temporarilyStopAllModalSessions();
+ }
retVal = true;
break;
} else {
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm
index c0fb8aa..2bf1465 100644
--- a/src/gui/kernel/qt_cocoa_helpers_mac.mm
+++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm
@@ -899,6 +899,14 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev
widgetToGetMouse =
[static_cast<QT_MANGLE_NAMESPACE(QCocoaView) *>(tmpView) qt_qwidget];
}
+ } else {
+ extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp
+ if (!mac_mouse_grabber && qt_button_down) {
+ // if there is no explicit grabber, and the mouse was grabbed
+ // implicitely (i.e. a mousebutton was pressed)
+ widgetToGetMouse = qt_button_down;
+ tmpView = qt_mac_nativeview_for(widgetToGetMouse);
+ }
}
NSPoint localPoint = [tmpView convertPoint:windowPoint fromView:nil];
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 709f6f3..fbb9115 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -8248,7 +8248,8 @@ bool QWidget::event(QEvent *event)
QList<QObject*> childList = d->children;
for (int i = 0; i < childList.size(); ++i) {
QObject *o = childList.at(i);
- QApplication::sendEvent(o, event);
+ if (o)
+ QApplication::sendEvent(o, event);
}
}
update();
@@ -8277,7 +8278,7 @@ bool QWidget::event(QEvent *event)
QList<QObject*> childList = d->children;
for (int i = 0; i < childList.size(); ++i) {
QObject *o = childList.at(i);
- if (o != QApplication::activeModalWidget()) {
+ if (o && o != QApplication::activeModalWidget()) {
if (qobject_cast<QWidget *>(o) && static_cast<QWidget *>(o)->isWindow()) {
// do not forward the event to child windows,
// QApplication does this for us
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 71f0077..0d9f9ee 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -725,6 +725,23 @@ static OSWindowRef qt_mac_create_window(QWidget *, WindowClass wclass, WindowAtt
return window;
}
+#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
+/* We build the release package against the 10.4 SDK.
+ So, to enable gestures for applications running on
+ 10.6+, we define the missing constants here: */
+enum {
+ kEventClassGesture = 'gest',
+ kEventGestureStarted = 1,
+ kEventGestureEnded = 2,
+ kEventGestureMagnify = 4,
+ kEventGestureSwipe = 5,
+ kEventGestureRotate = 6,
+ kEventParamRotationAmount = 'rota',
+ kEventParamSwipeDirection = 'swip',
+ kEventParamMagnificationAmount = 'magn'
+};
+#endif
+
// window events
static EventTypeSpec window_events[] = {
{ kEventClassWindow, kEventWindowClose },
@@ -741,13 +758,11 @@ static EventTypeSpec window_events[] = {
{ kEventClassWindow, kEventWindowGetRegion },
{ kEventClassWindow, kEventWindowGetClickModality },
{ kEventClassWindow, kEventWindowTransitionCompleted },
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
{ kEventClassGesture, kEventGestureStarted },
{ kEventClassGesture, kEventGestureEnded },
{ kEventClassGesture, kEventGestureMagnify },
{ kEventClassGesture, kEventGestureSwipe },
{ kEventClassGesture, kEventGestureRotate },
-#endif
{ kEventClassMouse, kEventMouseDown }
};
static EventHandlerUPP mac_win_eventUPP = 0;
@@ -1036,7 +1051,6 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event,
handled_event = false;
break; }
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
case kEventClassGesture: {
// First, find the widget that was under
// the mouse when the gesture happened:
@@ -1064,7 +1078,7 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event,
break;
case kEventGestureRotate: {
CGFloat amount;
- if (GetEventParameter(event, kEventParamRotationAmount, typeCGFloat, 0,
+ if (GetEventParameter(event, kEventParamRotationAmount, 'cgfl', 0,
sizeof(amount), 0, &amount) != noErr) {
handled_event = false;
break;
@@ -1091,7 +1105,7 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event,
break; }
case kEventGestureMagnify: {
CGFloat amount;
- if (GetEventParameter(event, kEventParamMagnificationAmount, typeCGFloat, 0,
+ if (GetEventParameter(event, kEventParamMagnificationAmount, 'cgfl', 0,
sizeof(amount), 0, &amount) != noErr) {
handled_event = false;
break;
@@ -1103,7 +1117,6 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event,
QApplication::sendSpontaneousEvent(widget, &qNGEvent);
break; }
-#endif // gestures
default:
handled_event = false;
diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
index 7461637..0bc9cbc 100644
--- a/src/gui/kernel/qwidget_x11.cpp
+++ b/src/gui/kernel/qwidget_x11.cpp
@@ -527,8 +527,13 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
QX11InfoData *xd = &X11->screens[qt_x11_create_desktop_on_screen];
xinfo.setX11Data(xd);
} else if (parentXinfo && (parentXinfo->screen() != xinfo.screen()
- || parentXinfo->visual() != xinfo.visual()))
+ || (parentXinfo->visual() != xinfo.visual()
+ && !q->inherits("QGLWidget"))))
{
+ // QGLWidgets have to be excluded here as they have a
+ // specially crafted QX11Info structure which can't be swapped
+ // out with the parent widgets QX11Info. The parent visual,
+ // for instance, might not even be GL capable.
xinfo = *parentXinfo;
}
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index 5566cc6..b32c55b 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -1368,7 +1368,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
else {
gtkCachedPainter.paintFlatBox(gtkEntry, "entry_bg", contentRect,
option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE,
- GTK_SHADOW_NONE, style, entryPath + QString::number(focus));
+ GTK_SHADOW_NONE, gtkCombo->style, entryPath + QString::number(focus));
}
gtkCachedPainter.paintShadow(gtkEntry, comboBox->editable ? "entry" : "frame", frameRect, frameState,
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index be79773..f96f66b 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -1849,8 +1849,8 @@ void QTextControlPrivate::inputMethodEvent(QInputMethodEvent *e)
|| e->preeditString() != cursor.block().layout()->preeditAreaText()
|| e->replacementLength() > 0;
+ cursor.beginEditBlock();
if (isGettingInput) {
- cursor.beginEditBlock();
cursor.removeSelectedText();
}
@@ -1876,7 +1876,8 @@ void QTextControlPrivate::inputMethodEvent(QInputMethodEvent *e)
QTextBlock block = cursor.block();
QTextLayout *layout = block.layout();
- layout->setPreeditArea(cursor.position() - block.position(), e->preeditString());
+ if (isGettingInput)
+ layout->setPreeditArea(cursor.position() - block.position(), e->preeditString());
QList<QTextLayout::FormatRange> overrides;
preeditCursor = e->preeditString().length();
hideCursor = false;
@@ -1897,9 +1898,7 @@ void QTextControlPrivate::inputMethodEvent(QInputMethodEvent *e)
}
}
layout->setAdditionalFormats(overrides);
-
- if (isGettingInput)
- cursor.endEditBlock();
+ cursor.endEditBlock();
}
QVariant QTextControl::inputMethodQuery(Qt::InputMethodQuery property) const
diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp
index e0db9c2..988a7e7 100644
--- a/src/gui/widgets/qabstractslider.cpp
+++ b/src/gui/widgets/qabstractslider.cpp
@@ -219,6 +219,10 @@ QAbstractSliderPrivate::QAbstractSliderPrivate()
blocktracking(false), pressed(false),
invertedAppearance(false), invertedControls(false),
orientation(Qt::Horizontal), repeatAction(QAbstractSlider::SliderNoAction)
+#ifdef QT_KEYPAD_NAVIGATION
+ , isAutoRepeating(false)
+ , repeatMultiplier(1)
+#endif
{
}
@@ -371,6 +375,9 @@ int QAbstractSlider::maximum() const
abstract sliders provides and typically corresponds to the user
pressing an arrow key.
+ If the property is modified during an auto repeating key event, behavior
+ is undefined.
+
\sa pageStep
*/
@@ -598,10 +605,10 @@ void QAbstractSlider::triggerAction(SliderAction action)
d->blocktracking = true;
switch (action) {
case SliderSingleStepAdd:
- setSliderPosition(d->overflowSafeAdd(d->singleStep));
+ setSliderPosition(d->overflowSafeAdd(d->effectiveSingleStep()));
break;
case SliderSingleStepSub:
- setSliderPosition(d->overflowSafeAdd(-d->singleStep));
+ setSliderPosition(d->overflowSafeAdd(-d->effectiveSingleStep()));
break;
case SliderPageStepAdd:
setSliderPosition(d->overflowSafeAdd(d->pageStep));
@@ -702,7 +709,7 @@ void QAbstractSlider::wheelEvent(QWheelEvent * e)
// Calculate how many lines to scroll. Depending on what delta is (and
// offset), we might end up with a fraction (e.g. scroll 1.3 lines). We can
// only scroll whole lines, so we keep the reminder until next event.
- qreal stepsToScrollF = offset * QApplication::wheelScrollLines() * d->singleStep;
+ qreal stepsToScrollF = offset * QApplication::wheelScrollLines() * d->effectiveSingleStep();
// Check if wheel changed direction since last event:
if (d->offset_accumulated != 0 && (offset / d->offset_accumulated) < 0)
d->offset_accumulated = 0;
@@ -773,6 +780,38 @@ void QAbstractSlider::keyPressEvent(QKeyEvent *ev)
{
Q_D(QAbstractSlider);
SliderAction action = SliderNoAction;
+#ifdef QT_KEYPAD_NAVIGATION
+ if (ev->isAutoRepeat()) {
+ if (d->firstRepeat.isNull())
+ d->firstRepeat = QTime::currentTime();
+ else if (1 == d->repeatMultiplier) {
+ // This is the interval in milli seconds which one key repetition
+ // takes.
+ const int repeatMSecs = d->firstRepeat.msecsTo(QTime::currentTime());
+
+ /**
+ * The time it takes to currently navigate the whole slider.
+ */
+ const qreal currentTimeElapse = (qreal(maximum()) / singleStep()) * repeatMSecs;
+
+ /**
+ * This is an arbitrarily determined constant in msecs that
+ * specifies how long time it should take to navigate from the
+ * start to the end(excluding starting key auto repeat).
+ */
+ const int SliderRepeatElapse = 2500;
+
+ d->repeatMultiplier = currentTimeElapse / SliderRepeatElapse;
+ }
+
+ }
+ else if (!d->firstRepeat.isNull()) {
+ d->firstRepeat = QTime();
+ d->repeatMultiplier = 1;
+ }
+
+#endif
+
switch (ev->key()) {
#ifdef QT_KEYPAD_NAVIGATION
case Qt::Key_Select:
diff --git a/src/gui/widgets/qabstractslider_p.h b/src/gui/widgets/qabstractslider_p.h
index 9324d44..6591981 100644
--- a/src/gui/widgets/qabstractslider_p.h
+++ b/src/gui/widgets/qabstractslider_p.h
@@ -68,7 +68,13 @@ public:
void setSteps(int single, int page);
- int minimum, maximum, singleStep, pageStep, value, position, pressValue;
+ int minimum, maximum, pageStep, value, position, pressValue;
+
+ /**
+ * Call effectiveSingleStep() when changing the slider value.
+ */
+ int singleStep;
+
float offset_accumulated;
uint tracking : 1;
uint blocktracking :1;
@@ -83,8 +89,33 @@ public:
#ifdef QT_KEYPAD_NAVIGATION
int origValue;
+
+ /**
+ */
+ bool isAutoRepeating;
+
+ /**
+ * When we're auto repeating, we multiply singleStep with this value to
+ * get our effective step.
+ */
+ qreal repeatMultiplier;
+
+ /**
+ * The time of when the first auto repeating key press event occurs.
+ */
+ QTime firstRepeat;
+
#endif
+ inline int effectiveSingleStep() const
+ {
+ return singleStep
+#ifdef QT_KEYPAD_NAVIGATION
+ * repeatMultiplier
+#endif
+ ;
+ }
+
inline int bound(int val) const { return qMax(minimum, qMin(maximum, val)); }
inline int overflowSafeAdd(int add) const
{
diff --git a/src/gui/widgets/qcommandlinkbutton.cpp b/src/gui/widgets/qcommandlinkbutton.cpp
index 9adf280..8f47f25 100644
--- a/src/gui/widgets/qcommandlinkbutton.cpp
+++ b/src/gui/widgets/qcommandlinkbutton.cpp
@@ -326,7 +326,8 @@ int QCommandLinkButton::heightForWidth(int width) const
Q_D(const QCommandLinkButton);
int heightWithoutDescription = d->descriptionOffset() + d->bottomMargin();
// find the width available for the description area
- return heightWithoutDescription + d->descriptionHeight(width);
+ return qMax(heightWithoutDescription + d->descriptionHeight(width),
+ iconSize().height() + d->topMargin() + d->bottomMargin());
}
/*! \reimp */
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index 300a2ea..9d533ae 100644
--- a/src/gui/widgets/qlinecontrol.cpp
+++ b/src/gui/widgets/qlinecontrol.cpp
@@ -1666,6 +1666,7 @@ void QLineControl::processKeyEvent(QKeyEvent* event)
}
#endif // QT_NO_SHORTCUT
else {
+ bool handled = false;
#ifdef Q_WS_MAC
if (event->key() == Qt::Key_Up || event->key() == Qt::Key_Down) {
Qt::KeyboardModifiers myModifiers = (event->modifiers() & ~Qt::KeypadModifier);
@@ -1683,6 +1684,7 @@ void QLineControl::processKeyEvent(QKeyEvent* event)
event->key() == Qt::Key_Up ? home(0) : end(0);
}
}
+ handled = true;
}
#endif
if (event->modifiers() & Qt::ControlModifier) {
@@ -1715,7 +1717,8 @@ void QLineControl::processKeyEvent(QKeyEvent* event)
break;
#endif
default:
- unknown = true;
+ if (!handled)
+ unknown = true;
}
} else { // ### check for *no* modifier
switch (event->key()) {
@@ -1748,7 +1751,8 @@ void QLineControl::processKeyEvent(QKeyEvent* event)
#endif
default:
- unknown = true;
+ if (!handled)
+ unknown = true;
}
}
}
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
index e50de02..377b39a 100644
--- a/src/gui/widgets/qmenubar.cpp
+++ b/src/gui/widgets/qmenubar.cpp
@@ -736,6 +736,9 @@ void QMenuBarPrivate::init()
if(wce_menubar)
q->hide();
}
+ else {
+ QApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, true);
+ }
#endif
#ifdef Q_WS_S60
symbianCreateMenuBar(q->parentWidget());
diff --git a/src/gui/widgets/qsizegrip.cpp b/src/gui/widgets/qsizegrip.cpp
index cf193dc..6575dbb 100644
--- a/src/gui/widgets/qsizegrip.cpp
+++ b/src/gui/widgets/qsizegrip.cpp
@@ -99,6 +99,7 @@ public:
int dyMax;
Qt::Corner m_corner;
bool gotMousePress;
+ QWidget *tlw;
#ifdef Q_WS_MAC
void updateMacSizer(bool hide) const;
#endif
@@ -113,6 +114,19 @@ public:
return m_corner == Qt::BottomLeftCorner || m_corner == Qt::TopLeftCorner;
}
+ void updateTopLevelWidget()
+ {
+ Q_Q(QSizeGrip);
+ QWidget *w = qt_sizegrip_topLevelWidget(q);
+ if (tlw == w)
+ return;
+ if (tlw)
+ tlw->removeEventFilter(q);
+ tlw = w;
+ if (tlw)
+ tlw->installEventFilter(q);
+ }
+
// This slot is invoked by QLayout when the size grip is added to
// a layout or reparented after the tlw is shown. This re-implementation is basically
// the same as QWidgetPrivate::_q_showIfNotHidden except that it checks
@@ -121,7 +135,7 @@ public:
{
Q_Q(QSizeGrip);
bool showSizeGrip = !(q->isHidden() && q->testAttribute(Qt::WA_WState_ExplicitShowHide));
- QWidget *tlw = qt_sizegrip_topLevelWidget(q);
+ updateTopLevelWidget();
if (tlw && showSizeGrip) {
Qt::WindowStates sizeGripNotVisibleState = Qt::WindowFullScreen;
#ifndef Q_WS_MAC
@@ -232,6 +246,7 @@ void QSizeGripPrivate::init()
Q_Q(QSizeGrip);
dxMax = 0;
dyMax = 0;
+ tlw = 0;
m_corner = q->isLeftToRight() ? Qt::BottomRightCorner : Qt::BottomLeftCorner;
gotMousePress = false;
@@ -240,8 +255,7 @@ void QSizeGripPrivate::init()
? Qt::SizeFDiagCursor : Qt::SizeBDiagCursor);
#endif
q->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed));
- QWidget *tlw = qt_sizegrip_topLevelWidget(q);
- tlw->installEventFilter(q);
+ updateTopLevelWidget();
}
@@ -524,19 +538,18 @@ void QSizeGrip::setVisible(bool visible)
/*! \reimp */
bool QSizeGrip::eventFilter(QObject *o, QEvent *e)
{
+ Q_D(QSizeGrip);
if ((isHidden() && testAttribute(Qt::WA_WState_ExplicitShowHide))
- || e->type() != QEvent::WindowStateChange) {
+ || e->type() != QEvent::WindowStateChange
+ || o != d->tlw) {
return QWidget::eventFilter(o, e);
}
- QWidget *tlw = qt_sizegrip_topLevelWidget(this);
- if (o != tlw)
- return QWidget::eventFilter(o, e);
Qt::WindowStates sizeGripNotVisibleState = Qt::WindowFullScreen;
#ifndef Q_WS_MAC
sizeGripNotVisibleState |= Qt::WindowMaximized;
#endif
// Don't show the size grip if the tlw is maximized or in full screen mode.
- setVisible(!(tlw->windowState() & sizeGripNotVisibleState));
+ setVisible(!(d->tlw->windowState() & sizeGripNotVisibleState));
setAttribute(Qt::WA_WState_ExplicitShowHide, false);
return QWidget::eventFilter(o, e);
}
diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp
index 3935c55..8ef6017 100644
--- a/src/gui/widgets/qtabbar.cpp
+++ b/src/gui/widgets/qtabbar.cpp
@@ -1948,7 +1948,8 @@ void QTabBar::changeEvent(QEvent *event)
Q_D(QTabBar);
if (event->type() == QEvent::StyleChange) {
d->elideMode = Qt::TextElideMode(style()->styleHint(QStyle::SH_TabBar_ElideMode, 0, this));
- d->useScrollButtons = !style()->styleHint(QStyle::SH_TabBar_PreferNoArrows, 0, this);
+ if (!d->useScrollButtonsSetByUser)
+ d->useScrollButtons = !style()->styleHint(QStyle::SH_TabBar_PreferNoArrows, 0, this);
d->refresh();
} else if (event->type() == QEvent::FontChange) {
d->refresh();
@@ -2003,6 +2004,7 @@ bool QTabBar::usesScrollButtons() const
void QTabBar::setUsesScrollButtons(bool useButtons)
{
Q_D(QTabBar);
+ d->useScrollButtonsSetByUser = true;
if (d->useScrollButtons == useButtons)
return;
d->useScrollButtons = useButtons;
diff --git a/src/gui/widgets/qtabbar_p.h b/src/gui/widgets/qtabbar_p.h
index 9f3285b..2e8fb6d 100644
--- a/src/gui/widgets/qtabbar_p.h
+++ b/src/gui/widgets/qtabbar_p.h
@@ -75,7 +75,7 @@ class QTabBarPrivate : public QWidgetPrivate
public:
QTabBarPrivate()
:currentIndex(-1), pressedIndex(-1), shape(QTabBar::RoundedNorth), layoutDirty(false),
- drawBase(true), scrollOffset(0), expanding(true), closeButtonOnTabs(false),
+ drawBase(true), scrollOffset(0), useScrollButtonsSetByUser(false) , expanding(true), closeButtonOnTabs(false),
selectionBehaviorOnRemove(QTabBar::SelectRightTab), paintWithOffsets(true), movable(false),
dragInProgress(false), documentMode(false), movingTab(0)
#ifdef Q_WS_MAC
@@ -187,6 +187,7 @@ public:
QSize iconSize;
Qt::TextElideMode elideMode;
bool useScrollButtons;
+ bool useScrollButtonsSetByUser;
bool expanding;
bool closeButtonOnTabs;
diff --git a/src/gui/widgets/qtoolbararealayout_p.h b/src/gui/widgets/qtoolbararealayout_p.h
index f0ab80c..134e95a 100644
--- a/src/gui/widgets/qtoolbararealayout_p.h
+++ b/src/gui/widgets/qtoolbararealayout_p.h
@@ -118,7 +118,7 @@ public:
void extendSize(Qt::Orientation o, int extent)
{
- int newSize = qMax(pick(o, minimumSize()), (preferredSize > 0 ? preferredSize : size) + extent);
+ int newSize = qMax(pick(o, minimumSize()), (preferredSize > 0 ? preferredSize : pick(o, sizeHint())) + extent);
int sizeh = pick(o, sizeHint());
if (newSize == sizeh) {
preferredSize = -1;
diff --git a/src/network/access/qnetworkcookiejar.cpp b/src/network/access/qnetworkcookiejar.cpp
index 19f7217..f826115 100644
--- a/src/network/access/qnetworkcookiejar.cpp
+++ b/src/network/access/qnetworkcookiejar.cpp
@@ -192,9 +192,10 @@ bool QNetworkCookieJar::setCookiesFromUrl(const QList<QNetworkCookie> &cookieLis
// validate the cookie & set the defaults if unset
if (cookie.path().isEmpty())
cookie.setPath(defaultPath);
- else if (!isParentPath(pathAndFileName, cookie.path()))
- continue; // not accepted
-
+ // don't do path checking. See http://bugreports.qt.nokia.com/browse/QTBUG-5815
+// else if (!isParentPath(pathAndFileName, cookie.path())) {
+// continue; // not accepted
+// }
if (cookie.domain().isEmpty()) {
cookie.setDomain(defaultDomain);
} else {
diff --git a/src/network/kernel/qnetworkproxy_win.cpp b/src/network/kernel/qnetworkproxy_win.cpp
index 6f92424..0e2dd2b 100644
--- a/src/network/kernel/qnetworkproxy_win.cpp
+++ b/src/network/kernel/qnetworkproxy_win.cpp
@@ -291,7 +291,10 @@ void QWindowsSystemProxy::init()
GlobalFree(ieProxyConfig.lpszAutoConfigUrl);
}
if (ieProxyConfig.lpszProxy) {
- proxyServerList << QString::fromWCharArray(ieProxyConfig.lpszProxy);
+ // http://msdn.microsoft.com/en-us/library/aa384250%28VS.85%29.aspx speaks only about a "proxy URL",
+ // not multiple URLs. However we tested this and it can return multiple URLs. So we use splitSpaceSemicolon
+ // on it.
+ proxyServerList = splitSpaceSemicolon(QString::fromWCharArray(ieProxyConfig.lpszProxy));
GlobalFree(ieProxyConfig.lpszProxy);
}
if (ieProxyConfig.lpszProxyBypass) {
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index 75b7fa5..fda4b10 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -3407,6 +3407,34 @@ void QVGPaintEngine::restoreState(QPaintEngine::DirtyFlags dirty)
#endif
}
+void QVGPaintEngine::fillRegion
+ (const QRegion& region, const QColor& color, const QSize& surfaceSize)
+{
+ Q_D(QVGPaintEngine);
+ if (d->clearColor != color || d->clearOpacity != 1.0f) {
+ VGfloat values[4];
+ values[0] = color.redF();
+ values[1] = color.greenF();
+ values[2] = color.blueF();
+ values[3] = color.alphaF();
+ vgSetfv(VG_CLEAR_COLOR, 4, values);
+ d->clearColor = color;
+ d->clearOpacity = 1.0f;
+ }
+ if (region.rectCount() == 1) {
+ QRect r = region.boundingRect();
+ vgClear(r.x(), surfaceSize.height() - r.y() - r.height(),
+ r.width(), r.height());
+ } else {
+ const QVector<QRect> rects = region.rects();
+ for (int i = 0; i < rects.size(); ++i) {
+ QRect r = rects.at(i);
+ vgClear(r.x(), surfaceSize.height() - r.y() - r.height(),
+ r.width(), r.height());
+ }
+ }
+}
+
#if !defined(QVG_NO_SINGLE_CONTEXT) && !defined(QT_NO_EGL)
QVGCompositionHelper::QVGCompositionHelper()
diff --git a/src/openvg/qpaintengine_vg_p.h b/src/openvg/qpaintengine_vg_p.h
index 1202b55..86a522a 100644
--- a/src/openvg/qpaintengine_vg_p.h
+++ b/src/openvg/qpaintengine_vg_p.h
@@ -151,6 +151,8 @@ public:
QVGPaintEnginePrivate *vgPrivate() { Q_D(QVGPaintEngine); return d; }
+ void fillRegion(const QRegion& region, const QColor& color, const QSize& surfaceSize);
+
protected:
QVGPaintEngine(QVGPaintEnginePrivate &data);
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp
index 3254aa3..19c90ed 100644
--- a/src/openvg/qpixmapdata_vg.cpp
+++ b/src/openvg/qpixmapdata_vg.cpp
@@ -92,7 +92,6 @@ QVGPixmapData::~QVGPixmapData()
vgDestroyImage(vgImage);
if (vgImageOpacity != VG_INVALID_HANDLE)
vgDestroyImage(vgImageOpacity);
- } else {
#endif
}
#if !defined(QT_NO_EGL)
@@ -202,6 +201,14 @@ QPaintEngine* QVGPixmapData::paintEngine() const
return source.paintEngine();
}
+// This function works around QImage::bits() making a deep copy if the
+// QImage is not const. We force it to be const and then get the bits.
+// XXX: Should add a QImage::constBits() in the future to replace this.
+static inline const uchar *qt_vg_imageBits(const QImage& image)
+{
+ return image.bits();
+}
+
VGImage QVGPixmapData::toVGImage()
{
if (!isValid())
@@ -213,7 +220,7 @@ VGImage QVGPixmapData::toVGImage()
context = qt_vg_create_context(0);
#endif
- if (recreate) {
+ if (recreate && prevSize != QSize(w, h)) {
if (vgImage != VG_INVALID_HANDLE) {
vgDestroyImage(vgImage);
vgImage = VG_INVALID_HANDLE;
@@ -222,6 +229,8 @@ VGImage QVGPixmapData::toVGImage()
vgDestroyImage(vgImageOpacity);
vgImageOpacity = VG_INVALID_HANDLE;
}
+ } else if (recreate) {
+ cachedOpacity = -1.0f; // Force opacity image to be refreshed later.
}
if (vgImage == VG_INVALID_HANDLE) {
@@ -232,11 +241,12 @@ VGImage QVGPixmapData::toVGImage()
if (!source.isNull() && recreate) {
vgImageSubData
(vgImage,
- source.bits(), source.bytesPerLine(),
+ qt_vg_imageBits(source), source.bytesPerLine(),
VG_sARGB_8888_PRE, 0, 0, w, h);
}
recreate = false;
+ prevSize = QSize(w, h);
return vgImage;
}
@@ -244,43 +254,14 @@ VGImage QVGPixmapData::toVGImage()
VGImage QVGPixmapData::toVGImage(qreal opacity)
{
#if !defined(QT_SHIVAVG)
- if (!isValid())
+ // Force the primary VG image to be recreated if necessary.
+ if (toVGImage() == VG_INVALID_HANDLE)
return VG_INVALID_HANDLE;
-#if !defined(QT_NO_EGL)
- // Increase the reference count on the shared context.
- if (!context)
- context = qt_vg_create_context(0);
-#endif
-
- if (recreate) {
- if (vgImage != VG_INVALID_HANDLE) {
- vgDestroyImage(vgImage);
- vgImage = VG_INVALID_HANDLE;
- }
- if (vgImageOpacity != VG_INVALID_HANDLE) {
- vgDestroyImage(vgImageOpacity);
- vgImageOpacity = VG_INVALID_HANDLE;
- }
- }
-
- if (vgImage == VG_INVALID_HANDLE) {
- vgImage = vgCreateImage
- (VG_sARGB_8888_PRE, w, h, VG_IMAGE_QUALITY_FASTER);
- }
-
- if (!source.isNull() && recreate) {
- vgImageSubData
- (vgImage,
- source.bits(), source.bytesPerLine(),
- VG_sARGB_8888_PRE, 0, 0, w, h);
- }
-
- recreate = false;
-
if (opacity == 1.0f)
return vgImage;
+ // Create an alternative image for the selected opacity.
if (vgImageOpacity == VG_INVALID_HANDLE || cachedOpacity != opacity) {
if (vgImageOpacity == VG_INVALID_HANDLE) {
vgImageOpacity = vgCreateImage
@@ -405,6 +386,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
vgDestroyImage(vgImageOpacity);
vgImageOpacity = VG_INVALID_HANDLE;
}
+ prevSize = QSize();
TInt err = 0;
@@ -465,6 +447,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
is_null = (w <= 0 || h <= 0);
source = QImage();
recreate = false;
+ prevSize = QSize(w, h);
setSerialNumber(++qt_vg_pixmap_serial);
// release stuff
eglDestroyImageKHR(context->display(), eglImage);
diff --git a/src/openvg/qpixmapdata_vg_p.h b/src/openvg/qpixmapdata_vg_p.h
index f6fac88..fe19f35 100644
--- a/src/openvg/qpixmapdata_vg_p.h
+++ b/src/openvg/qpixmapdata_vg_p.h
@@ -109,6 +109,7 @@ protected:
#endif
protected:
+ QSize prevSize;
VGImage vgImage;
VGImage vgImageOpacity;
qreal cachedOpacity;
diff --git a/src/openvg/qwindowsurface_vg.cpp b/src/openvg/qwindowsurface_vg.cpp
index f8486a6..a1301e3 100644
--- a/src/openvg/qwindowsurface_vg.cpp
+++ b/src/openvg/qwindowsurface_vg.cpp
@@ -48,6 +48,7 @@
#if !defined(QT_NO_EGL)
#include <QtGui/private/qegl_p.h>
+#include <QtGui/private/qwidget_p.h>
QT_BEGIN_NAMESPACE
@@ -71,7 +72,6 @@ QVGWindowSurface::~QVGWindowSurface()
QPaintDevice *QVGWindowSurface::paintDevice()
{
- d_ptr->beginPaint(window());
return this;
}
@@ -94,8 +94,16 @@ bool QVGWindowSurface::scroll(const QRegion &area, int dx, int dy)
void QVGWindowSurface::beginPaint(const QRegion &region)
{
- // Nothing to do here.
- Q_UNUSED(region);
+ d_ptr->beginPaint(window());
+
+ // If the window is not opaque, then fill the region we are about
+ // to paint with the transparent color.
+ if (!qt_widget_private(window())->isOpaque &&
+ window()->testAttribute(Qt::WA_TranslucentBackground)) {
+ QVGPaintEngine *engine = static_cast<QVGPaintEngine *>
+ (d_ptr->paintEngine());
+ engine->fillRegion(region, Qt::transparent, d_ptr->surfaceSize());
+ }
}
void QVGWindowSurface::endPaint(const QRegion &region)
diff --git a/src/plugins/phonon/mmf/mmf.pro b/src/plugins/phonon/mmf/mmf.pro
index c070605..854f893 100644
--- a/src/plugins/phonon/mmf/mmf.pro
+++ b/src/plugins/phonon/mmf/mmf.pro
@@ -39,7 +39,7 @@ HEADERS += \
$$PHONON_MMF_DIR/mmf_medianode.h \
$$PHONON_MMF_DIR/mmf_videoplayer.h \
$$PHONON_MMF_DIR/objectdump.h \
- $$PHONON_MMF_DIR/objectdump_global.h \
+ $$PHONON_MMF_DIR/objectdump_symbian.h \
$$PHONON_MMF_DIR/objecttree.h \
$$PHONON_MMF_DIR/utils.h \
$$PHONON_MMF_DIR/videooutput.h \
@@ -61,14 +61,12 @@ SOURCES += \
$$PHONON_MMF_DIR/mmf_medianode.cpp \
$$PHONON_MMF_DIR/mmf_videoplayer.cpp \
$$PHONON_MMF_DIR/objectdump.cpp \
+ $$PHONON_MMF_DIR/objectdump_symbian.cpp \
$$PHONON_MMF_DIR/objecttree.cpp \
$$PHONON_MMF_DIR/utils.cpp \
$$PHONON_MMF_DIR/videooutput.cpp \
$$PHONON_MMF_DIR/videowidget.cpp
-HEADERS += $$PHONON_MMF_DIR/objectdump_symbian.h
-SOURCES += $$PHONON_MMF_DIR/objectdump_symbian.cpp
-
LIBS += -lcone
LIBS += -lws32
diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
index 158633d..9687908 100644
--- a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
+++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
@@ -2,6 +2,8 @@
TEMPLATE = subdirs
# We just want to export the sqlite3 binaries for Symbian for platforms that do not have them.
-!exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) {
- BLD_INF_RULES.prj_exports += ":zip SQLite3_v9.2.zip"
+symbian {
+ !exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) {
+ BLD_INF_RULES.prj_exports += ":zip SQLite3_v9.2.zip"
+ }
}
diff --git a/src/qt3support/other/q3process_unix.cpp b/src/qt3support/other/q3process_unix.cpp
index 955b65f..32a68e0 100644
--- a/src/qt3support/other/q3process_unix.cpp
+++ b/src/qt3support/other/q3process_unix.cpp
@@ -249,7 +249,7 @@ int qnx6SocketPairReplacement (int socketFD[2]) {
if (errno != EINPROGRESS) { BAILOUT };
// Accept connection
- socketFD[0] = accept(tmpSocket, (struct sockaddr *)NULL, (size_t *)NULL);
+ socketFD[0] = accept(tmpSocket, (struct sockaddr *)NULL, (QT_SOCKLEN_T *)NULL);
if(socketFD[0] == -1) { BAILOUT };
// We're done
diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def
index 1218b75..49c4361 100644
--- a/src/s60installs/bwins/QtCoreu.def
+++ b/src/s60installs/bwins/QtCoreu.def
@@ -4387,4 +4387,15 @@ EXPORTS
?QBasicAtomicPointer_isFetchAndAddNative@@YA_NXZ @ 4386 NONAME ; bool QBasicAtomicPointer_isFetchAndAddNative(void)
?QBasicAtomicPointer_isFetchAndStoreNative@@YA_NXZ @ 4387 NONAME ; bool QBasicAtomicPointer_isFetchAndStoreNative(void)
?QBasicAtomicPointer_isTestAndSetNative@@YA_NXZ @ 4388 NONAME ; bool QBasicAtomicPointer_isTestAndSetNative(void)
+ ??0SignalEvent@QStateMachine@@QAE@PAVQObject@@HABV?$QList@VQVariant@@@@@Z @ 4389 NONAME ; QStateMachine::SignalEvent::SignalEvent(class QObject *, int, class QList<class QVariant> const &)
+ ??0WrappedEvent@QStateMachine@@QAE@PAVQObject@@PAVQEvent@@@Z @ 4390 NONAME ; QStateMachine::WrappedEvent::WrappedEvent(class QObject *, class QEvent *)
+ ??1SignalEvent@QStateMachine@@UAE@XZ @ 4391 NONAME ; QStateMachine::SignalEvent::~SignalEvent(void)
+ ??1WrappedEvent@QStateMachine@@UAE@XZ @ 4392 NONAME ; QStateMachine::WrappedEvent::~WrappedEvent(void)
+ ??_ESignalEvent@QStateMachine@@UAE@I@Z @ 4393 NONAME ; QStateMachine::SignalEvent::~SignalEvent(unsigned int)
+ ??_EWrappedEvent@QStateMachine@@UAE@I@Z @ 4394 NONAME ; QStateMachine::WrappedEvent::~WrappedEvent(unsigned int)
+ ?arguments@SignalEvent@QStateMachine@@QBE?AV?$QList@VQVariant@@@@XZ @ 4395 NONAME ; class QList<class QVariant> QStateMachine::SignalEvent::arguments(void) const
+ ?event@WrappedEvent@QStateMachine@@QBEPAVQEvent@@XZ @ 4396 NONAME ; class QEvent * QStateMachine::WrappedEvent::event(void) const
+ ?object@WrappedEvent@QStateMachine@@QBEPAVQObject@@XZ @ 4397 NONAME ; class QObject * QStateMachine::WrappedEvent::object(void) const
+ ?sender@SignalEvent@QStateMachine@@QBEPAVQObject@@XZ @ 4398 NONAME ; class QObject * QStateMachine::SignalEvent::sender(void) const
+ ?signalIndex@SignalEvent@QStateMachine@@QBEHXZ @ 4399 NONAME ; int QStateMachine::SignalEvent::signalIndex(void) const
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index 8a43f21..166b6fe 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -12514,4 +12514,7 @@ EXPORTS
?app_compile_version@QApplicationPrivate@@2HA @ 12513 NONAME ; int QApplicationPrivate::app_compile_version
?spacerItemFactoryMethod@QLayoutPrivate@@2P6APAVQSpacerItem@@PBVQLayout@@HHW4Policy@QSizePolicy@@1@ZA @ 12514 NONAME ; class QSpacerItem * (*QLayoutPrivate::spacerItemFactoryMethod)(class QLayout const *, int, int, enum QSizePolicy::Policy, enum QSizePolicy::Policy)
?allWidgets@QWidgetPrivate@@2PAV?$QSet@PAVQWidget@@@@A @ 12515 NONAME ; class QSet<class QWidget *> * QWidgetPrivate::allWidgets
+ ?effectiveFocusWidget@QWidgetPrivate@@QAEPAVQWidget@@XZ @ 12516 NONAME ; class QWidget * QWidgetPrivate::effectiveFocusWidget(void)
+ ?ignoreUnusedNavigationEvents@QTextControl@@QBE_NXZ @ 12517 NONAME ; bool QTextControl::ignoreUnusedNavigationEvents(void) const
+ ?setIgnoreUnusedNavigationEvents@QTextControl@@QAEX_N@Z @ 12518 NONAME ; void QTextControl::setIgnoreUnusedNavigationEvents(bool)
diff --git a/src/s60installs/bwins/QtWebKitu.def b/src/s60installs/bwins/QtWebKitu.def
index c14abe2..e5631f8 100644
--- a/src/s60installs/bwins/QtWebKitu.def
+++ b/src/s60installs/bwins/QtWebKitu.def
@@ -361,8 +361,8 @@ EXPORTS
?previousSibling@QWebElement@@QBE?AV1@XZ @ 360 NONAME ; class QWebElement QWebElement::previousSibling(void) const
?print@QWebView@@QBEXPAVQPrinter@@@Z @ 361 NONAME ; void QWebView::print(class QPrinter *) const
?printRequested@QWebPage@@IAEXPAVQWebFrame@@@Z @ 362 NONAME ; void QWebPage::printRequested(class QWebFrame *)
- ?printingMaximumShrinkFactor@QWebSettings@@QBEMXZ @ 363 NONAME ; float QWebSettings::printingMaximumShrinkFactor(void) const
- ?printingMinimumShrinkFactor@QWebSettings@@QBEMXZ @ 364 NONAME ; float QWebSettings::printingMinimumShrinkFactor(void) const
+ ?printingMaximumShrinkFactor@QWebSettings@@QBEMXZ @ 363 NONAME ABSENT ; float QWebSettings::printingMaximumShrinkFactor(void) const
+ ?printingMinimumShrinkFactor@QWebSettings@@QBEMXZ @ 364 NONAME ABSENT ; float QWebSettings::printingMinimumShrinkFactor(void) const
?provisionalLoad@QWebFrame@@IAEXXZ @ 365 NONAME ; void QWebFrame::provisionalLoad(void)
?qWebKitMajorVersion@@YAHXZ @ 366 NONAME ; int qWebKitMajorVersion(void)
?qWebKitMinorVersion@@YAHXZ @ 367 NONAME ; int qWebKitMinorVersion(void)
@@ -488,8 +488,8 @@ EXPORTS
?setPluginFactory@QWebPage@@QAEXPAVQWebPluginFactory@@@Z @ 487 NONAME ; void QWebPage::setPluginFactory(class QWebPluginFactory *)
?setPreferredContentsSize@QWebPage@@QBEXABVQSize@@@Z @ 488 NONAME ; void QWebPage::setPreferredContentsSize(class QSize const &) const
?setPreferredPluginForMimeType@QWebPluginDatabase@@QAEXABVQString@@ABVQWebPluginInfo@@@Z @ 489 NONAME ; void QWebPluginDatabase::setPreferredPluginForMimeType(class QString const &, class QWebPluginInfo const &)
- ?setPrintingMaximumShrinkFactor@QWebSettings@@QAEXM@Z @ 490 NONAME ; void QWebSettings::setPrintingMaximumShrinkFactor(float)
- ?setPrintingMinimumShrinkFactor@QWebSettings@@QAEXM@Z @ 491 NONAME ; void QWebSettings::setPrintingMinimumShrinkFactor(float)
+ ?setPrintingMaximumShrinkFactor@QWebSettings@@QAEXM@Z @ 490 NONAME ABSENT ; void QWebSettings::setPrintingMaximumShrinkFactor(float)
+ ?setPrintingMinimumShrinkFactor@QWebSettings@@QAEXM@Z @ 491 NONAME ABSENT ; void QWebSettings::setPrintingMinimumShrinkFactor(float)
?setRenderHint@QWebView@@QAEXW4RenderHint@QPainter@@_N@Z @ 492 NONAME ; void QWebView::setRenderHint(enum QPainter::RenderHint, bool)
?setRenderHints@QWebView@@QAEXV?$QFlags@W4RenderHint@QPainter@@@@@Z @ 493 NONAME ; void QWebView::setRenderHints(class QFlags<enum QPainter::RenderHint>)
?setScrollBarPolicy@QWebFrame@@QAEXW4Orientation@Qt@@W4ScrollBarPolicy@3@@Z @ 494 NONAME ; void QWebFrame::setScrollBarPolicy(enum Qt::Orientation, enum Qt::ScrollBarPolicy)
@@ -619,4 +619,5 @@ EXPORTS
?staticMetaObject@QGraphicsWebView@@2UQMetaObject@@B @ 618 NONAME ; struct QMetaObject const QGraphicsWebView::staticMetaObject
?staticMetaObject@QWebPage@@2UQMetaObject@@B @ 619 NONAME ; struct QMetaObject const QWebPage::staticMetaObject
?staticMetaObject@QWebView@@2UQMetaObject@@B @ 620 NONAME ; struct QMetaObject const QWebView::staticMetaObject
+ ?attributeNames@QWebElement@@QBE?AVQStringList@@ABVQString@@@Z @ 621 NONAME ; class QStringList QWebElement::attributeNames(class QString const &) const
diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def
index 99be68e..6a4cdbd 100644
--- a/src/s60installs/eabi/QtCoreu.def
+++ b/src/s60installs/eabi/QtCoreu.def
@@ -3619,4 +3619,18 @@ EXPORTS
_ZN15QBasicAtomicInt19isFetchAndAddNativeEv @ 3618 NONAME
_ZN15QBasicAtomicInt21isFetchAndStoreNativeEv @ 3619 NONAME
_ZN15QBasicAtomicInt25isReferenceCountingNativeEv @ 3620 NONAME
+ _ZN13QStateMachine11SignalEventC1EP7QObjectiRK5QListI8QVariantE @ 3621 NONAME
+ _ZN13QStateMachine11SignalEventC2EP7QObjectiRK5QListI8QVariantE @ 3622 NONAME
+ _ZN13QStateMachine11SignalEventD0Ev @ 3623 NONAME
+ _ZN13QStateMachine11SignalEventD1Ev @ 3624 NONAME
+ _ZN13QStateMachine11SignalEventD2Ev @ 3625 NONAME
+ _ZN13QStateMachine12WrappedEventC1EP7QObjectP6QEvent @ 3626 NONAME
+ _ZN13QStateMachine12WrappedEventC2EP7QObjectP6QEvent @ 3627 NONAME
+ _ZN13QStateMachine12WrappedEventD0Ev @ 3628 NONAME
+ _ZN13QStateMachine12WrappedEventD1Ev @ 3629 NONAME
+ _ZN13QStateMachine12WrappedEventD2Ev @ 3630 NONAME
+ _ZTIN13QStateMachine11SignalEventE @ 3631 NONAME
+ _ZTIN13QStateMachine12WrappedEventE @ 3632 NONAME
+ _ZTVN13QStateMachine11SignalEventE @ 3633 NONAME
+ _ZTVN13QStateMachine12WrappedEventE @ 3634 NONAME
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index 43e291c..6c45a6e 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -11735,4 +11735,6 @@ EXPORTS
_Zls6QDebugP15QGraphicsObject @ 11734 NONAME
_Zls6QDebugRK12QStyleOption @ 11735 NONAME
_Zls6QDebugRKN12QStyleOption10OptionTypeE @ 11736 NONAME
+ _ZN12QTextControl31setIgnoreUnusedNavigationEventsEb @ 11737 NONAME
+ _ZNK12QTextControl28ignoreUnusedNavigationEventsEv @ 11738 NONAME
diff --git a/src/s60installs/eabi/QtWebKitu.def b/src/s60installs/eabi/QtWebKitu.def
index 88343c1..4aad884 100644
--- a/src/s60installs/eabi/QtWebKitu.def
+++ b/src/s60installs/eabi/QtWebKitu.def
@@ -654,8 +654,8 @@ EXPORTS
_Z34qt_drt_resetOriginAccessWhiteListsv @ 653 NONAME
_ZN11QWebElement17removeAllChildrenEv @ 654 NONAME
_ZN11QWebElement6renderEP8QPainter @ 655 NONAME
- _ZN12QWebSettings30setPrintingMaximumShrinkFactorEf @ 656 NONAME
- _ZN12QWebSettings30setPrintingMinimumShrinkFactorEf @ 657 NONAME
+ _ZN12QWebSettings30setPrintingMaximumShrinkFactorEf @ 656 NONAME ABSENT
+ _ZN12QWebSettings30setPrintingMinimumShrinkFactorEf @ 657 NONAME ABSENT
_ZN16QGraphicsWebView10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 658 NONAME
_ZN16QGraphicsWebView11linkClickedERK4QUrl @ 659 NONAME
_ZN16QGraphicsWebView12loadFinishedEb @ 660 NONAME
@@ -674,8 +674,8 @@ EXPORTS
_ZN21QWebElementCollectionD2Ev @ 673 NONAME
_ZN21QWebElementCollectionaSERKS_ @ 674 NONAME
_ZN9QWebFrame6renderEP8QPainterNS_11RenderLayerERK7QRegion @ 675 NONAME
- _ZNK12QWebSettings27printingMaximumShrinkFactorEv @ 676 NONAME
- _ZNK12QWebSettings27printingMinimumShrinkFactorEv @ 677 NONAME
+ _ZNK12QWebSettings27printingMaximumShrinkFactorEv @ 676 NONAME ABSENT
+ _ZNK12QWebSettings27printingMinimumShrinkFactorEv @ 677 NONAME ABSENT
_ZNK16QGraphicsWebView10isModifiedEv @ 678 NONAME
_ZNK16QGraphicsWebView10pageActionEN8QWebPage9WebActionE @ 679 NONAME
_ZNK16QGraphicsWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 680 NONAME
@@ -689,4 +689,5 @@ EXPORTS
_ZThn16_NK16QGraphicsWebView8sizeHintEN2Qt8SizeHintERK6QSizeF @ 688 NONAME
_ZThn8_N16QGraphicsWebView10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 689 NONAME
_ZThn8_NK16QGraphicsWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 690 NONAME
+ _ZNK11QWebElement14attributeNamesERK7QString @ 691 NONAME
diff --git a/src/script/api/qscriptengineagent.cpp b/src/script/api/qscriptengineagent.cpp
index e7998b7..a2af514 100644
--- a/src/script/api/qscriptengineagent.cpp
+++ b/src/script/api/qscriptengineagent.cpp
@@ -154,7 +154,10 @@ void QScriptEngineAgentPrivate::exceptionCatch(const JSC::DebuggerCallFrame& fra
void QScriptEngineAgentPrivate::atStatement(const JSC::DebuggerCallFrame& frame, intptr_t sourceID, int lineno, int column)
{
QScript::UStringSourceProviderWithFeedback *source = engine->loadedScripts.value(sourceID);
- Q_ASSERT(source != 0);
+ if (!source) {
+ // QTBUG-6108: We don't have the source for this script, so ignore.
+ return;
+ }
column = source->columnNumberFromOffset(column);
JSC::CallFrame *oldFrame = engine->currentFrame;
int oldAgentLineNumber = engine->agentLineNumber;
@@ -183,7 +186,10 @@ void QScriptEngineAgentPrivate::didReachBreakpoint(const JSC::DebuggerCallFrame&
{
if (q_ptr->supportsExtension(QScriptEngineAgent::DebuggerInvocationRequest)) {
QScript::UStringSourceProviderWithFeedback *source = engine->loadedScripts.value(sourceID);
- Q_ASSERT(source != 0);
+ if (!source) {
+ // QTBUG-6108: We don't have the source for this script, so ignore.
+ return;
+ }
column = source->columnNumberFromOffset(column);
JSC::CallFrame *oldFrame = engine->currentFrame;
int oldAgentLineNumber = engine->agentLineNumber;
diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp
index f368d1d..b74babc 100644
--- a/src/sql/drivers/mysql/qsql_mysql.cpp
+++ b/src/sql/drivers/mysql/qsql_mysql.cpp
@@ -509,15 +509,24 @@ bool QMYSQLResult::fetchNext()
return false;
if (d->preparedQuery) {
#if MYSQL_VERSION_ID >= 40108
- if (mysql_stmt_fetch(d->stmt))
+ int nRC = mysql_stmt_fetch(d->stmt);
+ if (nRC) {
+#ifdef MYSQL_DATA_TRUNCATED
+ if (nRC == 1 || nRC == MYSQL_DATA_TRUNCATED)
+#else
+ if (nRC == 1)
+#endif // MYSQL_DATA_TRUNCATED
+ setLastError(qMakeStmtError(QCoreApplication::translate("QMYSQLResult",
+ "Unable to fetch data"), QSqlError::StatementError, d->stmt));
return false;
+ }
#else
return false;
#endif
} else {
- d->row = mysql_fetch_row(d->result);
- if (!d->row)
- return false;
+ d->row = mysql_fetch_row(d->result);
+ if (!d->row)
+ return false;
}
setAt(at() + 1);
return true;
@@ -1365,7 +1374,6 @@ QStringList QMYSQLDriver::tables(QSql::TableType type) const
QSqlIndex QMYSQLDriver::primaryIndex(const QString& tablename) const
{
QSqlIndex idx;
- bool prepQ;
if (!isOpen())
return idx;
diff --git a/tests/auto/guiapplauncher/guiapplauncher.pro b/tests/auto/guiapplauncher/guiapplauncher.pro
index 27c3553..2f81061 100644
--- a/tests/auto/guiapplauncher/guiapplauncher.pro
+++ b/tests/auto/guiapplauncher/guiapplauncher.pro
@@ -14,7 +14,5 @@ SOURCES += tst_guiapplauncher.cpp \
windowmanager.cpp
HEADERS += windowmanager.h
-win32 {
- # process enumeration,etc.
- LIBS+=user32.lib
-}
+# process enumeration,etc.
+win32:LIBS+=-luser32
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp
index 158451a..d99723e 100644
--- a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp
@@ -47,12 +47,21 @@
int main(int argc, char **argv)
{
QApplication a(argc, argv);
+ QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
+
QWidget w;
QLabel label1(QObject::tr("abc", "ascii"), &w);
QLabel label2(QObject::tr("æøå", "utf-8"), &w);
+ QLabel label2a(QObject::tr("\303\246\303\270\303\245", "utf-8 oct"), &w);
+ QLabel label3(QObject::trUtf8("Für Élise", "trUtf8"), &w);
+ QLabel label3a(QObject::trUtf8("F\303\274r \303\211lise", "trUtf8 oct"), &w);
-// I would expect the following to work !?
-// QLabel label3(QObject::trUtf8("F\374r \310lise", "trUtf8"), &w);
+ QBoxLayout *ly = new QVBoxLayout(&w);
+ ly->addWidget(&label1);
+ ly->addWidget(&label2);
+ ly->addWidget(&label2a);
+ ly->addWidget(&label3);
+ ly->addWidget(&label3a);
w.show();
return a.exec();
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result
index bc0d9bb..711bf02 100644
--- a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result
@@ -5,16 +5,34 @@
<context>
<name>QObject</name>
<message>
- <location filename="main.cpp" line="51"/>
+ <location filename="main.cpp" line="53"/>
<source>abc</source>
<comment>ascii</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="52"/>
+ <location filename="main.cpp" line="54"/>
<source>æøå</source>
<comment>utf-8</comment>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <location filename="main.cpp" line="55"/>
+ <source>æøå</source>
+ <comment>utf-8 oct</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.cpp" line="56"/>
+ <source>Für Élise</source>
+ <comment>trUtf8</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.cpp" line="57"/>
+ <source>Für Élise</source>
+ <comment>trUtf8 oct</comment>
+ <translation type="unfinished"></translation>
+ </message>
</context>
</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result
index 91da744..6ee369a 100644
--- a/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result
@@ -6,7 +6,7 @@
<name>QObject</name>
<message>
<location filename="main.cpp" line="61"/>
- <source>Á</source>
+ <source>Б</source>
<translation type="unfinished"></translation>
</message>
</context>
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp
index abb8b89..98b491c 100644
--- a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp
@@ -49,9 +49,11 @@ public:
void doFoo()
{
tr("random ascii only");
- tr("this contains an umlaut &uuml;");
+ tr("this contains an umlaut &uuml; literally");
+ tr("this contains an umlaut \xfc &uuml; escaped");
trUtf8("random ascii only in utf8");
- trUtf8("umlaut \xfc &uuml; in utf8");
+ trUtf8("umlaut ü &uuml; in literal utf8");
+ trUtf8("umlaut \303\274 &uuml; in escaped utf8");
}
};
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result
index 26eb245..d548e24 100644
--- a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result
@@ -11,17 +11,27 @@
</message>
<message>
<location filename="main.cpp" line="52"/>
- <source>this contains an umlaut ü &amp;uuml;</source>
+ <source>this contains an umlaut ü &amp;uuml; literally</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cpp" line="53"/>
+ <source>this contains an umlaut ü &amp;uuml; escaped</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.cpp" line="54"/>
<source>random ascii only in utf8</source>
<translation type="unfinished"></translation>
</message>
<message utf8="true">
- <location filename="main.cpp" line="54"/>
- <source>umlaut ü &amp;uuml; in utf8</source>
+ <location filename="main.cpp" line="55"/>
+ <source>umlaut ü &amp;uuml; in literal utf8</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message utf8="true">
+ <location filename="main.cpp" line="56"/>
+ <source>umlaut ü &amp;uuml; in escaped utf8</source>
<translation type="unfinished"></translation>
</message>
</context>
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp
index abb8b89..cd93539 100644
--- a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp
@@ -49,9 +49,10 @@ public:
void doFoo()
{
tr("random ascii only");
- tr("this contains an umlaut &uuml;");
+ tr("this contains an umlaut &uuml; literally");
+ tr("this contains an umlaut \303\274 &uuml; escaped, really in utf-8");
trUtf8("random ascii only in utf8");
- trUtf8("umlaut \xfc &uuml; in utf8");
+ trUtf8("umlaut \303\274 &uuml; in escaped utf8");
}
};
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result
index e27c157..6728a25 100644
--- a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result
@@ -11,17 +11,22 @@
</message>
<message>
<location filename="main.cpp" line="52"/>
- <source>this contains an umlaut ü &amp;uuml;</source>
+ <source>this contains an umlaut ü &amp;uuml; literally</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cpp" line="53"/>
- <source>random ascii only in utf8</source>
+ <source>this contains an umlaut ü &amp;uuml; escaped, really in utf-8</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cpp" line="54"/>
- <source>umlaut ü &amp;uuml; in utf8</source>
+ <source>random ascii only in utf8</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.cpp" line="55"/>
+ <source>umlaut ü &amp;uuml; in escaped utf8</source>
<translation type="unfinished"></translation>
</message>
</context>
diff --git a/tests/auto/qcommandlinkbutton/tst_qcommandlinkbutton.cpp b/tests/auto/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
index 33226bf..f833196 100644
--- a/tests/auto/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
+++ b/tests/auto/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
@@ -51,6 +51,7 @@
#include <qtimer.h>
#include <QDialog>
#include <QGridLayout>
+#include <QPainter>
Q_DECLARE_METATYPE(QCommandLinkButton*)
@@ -83,7 +84,8 @@ private slots:
void clicked();
void toggled();
void defaultAndAutoDefault();
- void setAutoRepeat();
+ void setAutoRepeat();
+ void heightForWithWithIcon();
protected slots:
void resetCounters();
@@ -106,17 +108,17 @@ private:
void tst_QCommandLinkButton::getSetCheck()
{
QCommandLinkButton obj1;
-
+
QString text("mytext");
QVERIFY(obj1.description().isEmpty());
obj1.setDescription(text);
QVERIFY(obj1.description() == text);
-
+
QVERIFY(obj1.text().isEmpty());
obj1.setText(text);
QVERIFY(obj1.text() == text);
-
-
+
+
QMenu *var1 = new QMenu;
obj1.setMenu(var1);
QCOMPARE(var1, obj1.menu());
@@ -393,8 +395,8 @@ void tst_QCommandLinkButton::setAccel()
QTest::qWait(100);
}
- QVERIFY(testWidget->isActiveWindow());
-
+ QVERIFY(testWidget->isActiveWindow());
+
QTest::keyClick( testWidget, 'A', Qt::AltModifier );
QTest::qWait( 500 );
QVERIFY( click_count == 1 );
@@ -556,5 +558,33 @@ void tst_QCommandLinkButton::defaultAndAutoDefault()
}
}
+void tst_QCommandLinkButton::heightForWithWithIcon()
+{
+ QWidget mainWin;
+
+ QPixmap pixmap(64, 64);
+ {
+ pixmap.fill(Qt::white);
+ QPainter painter(&pixmap);
+ painter.setBrush(Qt::black);
+ painter.drawEllipse(0, 0, 63, 63);
+ }
+
+ QCommandLinkButton *largeIconButton = new QCommandLinkButton(QString("Large Icon"),
+ QString("Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Mauris nibh lectus, adipiscing eu."),
+ &mainWin);
+ largeIconButton->setIconSize(QSize(64, 64));
+ largeIconButton->setIcon(pixmap);
+
+ QVBoxLayout *layout = new QVBoxLayout();
+ layout->addWidget(largeIconButton);
+ layout->addStretch();
+ mainWin.setLayout(layout);
+ mainWin.showMaximized();
+ QTest::qWaitForWindowShown(&mainWin);
+ QVERIFY(largeIconButton->height() > 68); //enough room for the icon
+
+}
+
QTEST_MAIN(tst_QCommandLinkButton)
#include "tst_qcommandlinkbutton.moc"
diff --git a/tests/auto/qftp/tst_qftp.cpp b/tests/auto/qftp/tst_qftp.cpp
index 1e7f424..263c957 100644
--- a/tests/auto/qftp/tst_qftp.cpp
+++ b/tests/auto/qftp/tst_qftp.cpp
@@ -618,7 +618,7 @@ void tst_QFtp::get()
}
addCommand( QFtp::Close, ftp->close() );
- QTestEventLoop::instance().enterLoop( 30 );
+ QTestEventLoop::instance().enterLoop( 50 );
delete ftp;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -1020,7 +1020,7 @@ void tst_QFtp::renameInit( const QString &host, const QString &user, const QStri
addCommand( QFtp::Put, ftp->put( QByteArray(), createFile ) );
addCommand( QFtp::Close, ftp->close() );
- QTestEventLoop::instance().enterLoop( 30 );
+ QTestEventLoop::instance().enterLoop( 50 );
delete ftp;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -1295,14 +1295,18 @@ void tst_QFtp::abort_data()
// Qt/CE and Symbian test environment has to less memory for this test
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
QByteArray bigData( 10*1024*1024, 0 );
+#else
+ QByteArray bigData( 1*1024*1024, 0 );
+#endif
bigData.fill( 'B' );
-
QTest::newRow( "put_fluke01" ) << QtNetworkSettings::serverName() << (uint)21 << QString("qtest/upload/abort_put") << bigData;
-#endif
}
void tst_QFtp::abort()
{
+ // In case you wonder where the abort() actually happens, look into
+ // tst_QFtp::dataTransferProgress
+ //
QFETCH( QString, host );
QFETCH( uint, port );
QFETCH( QString, file );
@@ -1324,7 +1328,7 @@ void tst_QFtp::abort()
addCommand( QFtp::Close, ftp->close() );
for(int time = 0; time <= uploadData.length() / 30000; time += 30) {
- QTestEventLoop::instance().enterLoop( 30 );
+ QTestEventLoop::instance().enterLoop( 50 );
if(ftp->currentCommand() == QFtp::None)
break;
}
@@ -1493,7 +1497,7 @@ void tst_QFtp::proxy()
addCommand( QFtp::Cd, ftp->cd( dir ) );
addCommand( QFtp::List, ftp->list() );
- QTestEventLoop::instance().enterLoop( 30 );
+ QTestEventLoop::instance().enterLoop( 50 );
delete ftp;
if ( QTestEventLoop::instance().timeout() ) {
@@ -1921,7 +1925,7 @@ bool tst_QFtp::fileExists( const QString &host, quint16 port, const QString &use
delete ftp;
if ( QTestEventLoop::instance().timeout() ) {
// ### make this test work
- qWarning("Network operation timed out");
+ qWarning("tst_QFtp::fileExists: Network operation timed out");
return FALSE;
}
inFileDirExistsFunction = FALSE;
@@ -1972,6 +1976,7 @@ bool tst_QFtp::dirExists( const QString &host, quint16 port, const QString &user
if ( QTestEventLoop::instance().timeout() ) {
// ### make this test work
// QFAIL( "Network operation timed out" );
+ qWarning("tst_QFtp::dirExists: Network operation timed out");
return FALSE;
}
inFileDirExistsFunction = FALSE;
diff --git a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
index bca59c3..baa1ba1 100644
--- a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
+++ b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
@@ -167,7 +167,7 @@ public:
{
setContentsMargins( 0,0,0,0 );
if (name.isEmpty())
- setData(0, QString::fromAscii("w%1").arg(int(this)));
+ setData(0, QString::fromAscii("w%1").arg(quintptr(this)));
else
setData(0, name);
}
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
index 1ff06c2..797e1fb 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -235,6 +235,7 @@ private slots:
void task259503_scrollingArtifacts();
void QTBUG_4151_clipAndIgnore_data();
void QTBUG_4151_clipAndIgnore();
+ void QTBUG_5859_exposedRect();
};
void tst_QGraphicsView::initTestCase()
@@ -3867,5 +3868,43 @@ void tst_QGraphicsView::QTBUG_4151_clipAndIgnore()
QCOMPARE(view.items(view.rect()).size(), numItems);
}
+void tst_QGraphicsView::QTBUG_5859_exposedRect()
+{
+ class CustomScene : public QGraphicsScene
+ {
+ public:
+ CustomScene(const QRectF &rect) : QGraphicsScene(rect) { }
+ void drawBackground(QPainter *painter, const QRectF &rect)
+ { lastBackgroundExposedRect = rect; }
+ QRectF lastBackgroundExposedRect;
+ };
+
+ class CustomRectItem : public QGraphicsRectItem
+ {
+ public:
+ CustomRectItem(const QRectF &rect) : QGraphicsRectItem(rect)
+ { setFlag(QGraphicsItem::ItemUsesExtendedStyleOption); }
+ void paint(QPainter * painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0)
+ { lastExposedRect = option->exposedRect; }
+ QRectF lastExposedRect;
+ };
+
+ CustomScene scene(QRectF(0,0,50,50));
+
+ CustomRectItem item(scene.sceneRect());
+
+ scene.addItem(&item);
+
+ QGraphicsView view(&scene);
+ view.scale(4.15, 4.15);
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+
+ view.viewport()->repaint(10,10,20,20);
+ QApplication::processEvents();
+
+ QCOMPARE(item.lastExposedRect, scene.lastBackgroundExposedRect);
+}
+
QTEST_MAIN(tst_QGraphicsView)
#include "tst_qgraphicsview.moc"
diff --git a/tests/auto/qhttp/tst_qhttp.cpp b/tests/auto/qhttp/tst_qhttp.cpp
index 0ea0d15..b4b6ceb 100644
--- a/tests/auto/qhttp/tst_qhttp.cpp
+++ b/tests/auto/qhttp/tst_qhttp.cpp
@@ -363,7 +363,7 @@ void tst_QHttp::get()
}
addRequest( QHttpRequestHeader(), getId );
- QTestEventLoop::instance().enterLoop( 30 );
+ QTestEventLoop::instance().enterLoop( 50 );
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
diff --git a/tests/auto/qiodevice/tst_qiodevice.cpp b/tests/auto/qiodevice/tst_qiodevice.cpp
index 056ad6a..84fd8ad 100644
--- a/tests/auto/qiodevice/tst_qiodevice.cpp
+++ b/tests/auto/qiodevice/tst_qiodevice.cpp
@@ -77,6 +77,9 @@ private slots:
void readLine_data();
void readLine();
+
+ void readLine2_data();
+ void readLine2();
};
// Testing get/set functions
@@ -453,5 +456,114 @@ void tst_QIODevice::readLine()
QCOMPARE(line.size(), linelen);
}
+void tst_QIODevice::readLine2_data()
+{
+ QTest::addColumn<QByteArray>("line");
+
+ QTest::newRow("1024 - 4") << QByteArray(1024 - 4, 'x');
+ QTest::newRow("1024 - 3") << QByteArray(1024 - 3, 'x');
+ QTest::newRow("1024 - 2") << QByteArray(1024 - 2, 'x');
+ QTest::newRow("1024 - 1") << QByteArray(1024 - 1, 'x');
+ QTest::newRow("1024" ) << QByteArray(1024 , 'x');
+ QTest::newRow("1024 + 1") << QByteArray(1024 + 1, 'x');
+ QTest::newRow("1024 + 2") << QByteArray(1024 + 2, 'x');
+
+ QTest::newRow("4096 - 4") << QByteArray(4096 - 4, 'x');
+ QTest::newRow("4096 - 3") << QByteArray(4096 - 3, 'x');
+ QTest::newRow("4096 - 2") << QByteArray(4096 - 2, 'x');
+ QTest::newRow("4096 - 1") << QByteArray(4096 - 1, 'x');
+ QTest::newRow("4096" ) << QByteArray(4096 , 'x');
+ QTest::newRow("4096 + 1") << QByteArray(4096 + 1, 'x');
+ QTest::newRow("4096 + 2") << QByteArray(4096 + 2, 'x');
+
+ QTest::newRow("8192 - 4") << QByteArray(8192 - 4, 'x');
+ QTest::newRow("8192 - 3") << QByteArray(8192 - 3, 'x');
+ QTest::newRow("8192 - 2") << QByteArray(8192 - 2, 'x');
+ QTest::newRow("8192 - 1") << QByteArray(8192 - 1, 'x');
+ QTest::newRow("8192" ) << QByteArray(8192 , 'x');
+ QTest::newRow("8192 + 1") << QByteArray(8192 + 1, 'x');
+ QTest::newRow("8192 + 2") << QByteArray(8192 + 2, 'x');
+
+ QTest::newRow("16384 - 4") << QByteArray(16384 - 4, 'x');
+ QTest::newRow("16384 - 3") << QByteArray(16384 - 3, 'x');
+ QTest::newRow("16384 - 2") << QByteArray(16384 - 2, 'x');
+ QTest::newRow("16384 - 1") << QByteArray(16384 - 1, 'x');
+ QTest::newRow("16384" ) << QByteArray(16384 , 'x');
+ QTest::newRow("16384 + 1") << QByteArray(16384 + 1, 'x');
+ QTest::newRow("16384 + 2") << QByteArray(16384 + 2, 'x');
+
+ QTest::newRow("20000") << QByteArray(20000, 'x');
+
+ QTest::newRow("32768 - 4") << QByteArray(32768 - 4, 'x');
+ QTest::newRow("32768 - 3") << QByteArray(32768 - 3, 'x');
+ QTest::newRow("32768 - 2") << QByteArray(32768 - 2, 'x');
+ QTest::newRow("32768 - 1") << QByteArray(32768 - 1, 'x');
+ QTest::newRow("32768" ) << QByteArray(32768 , 'x');
+ QTest::newRow("32768 + 1") << QByteArray(32768 + 1, 'x');
+ QTest::newRow("32768 + 2") << QByteArray(32768 + 2, 'x');
+
+ QTest::newRow("40000") << QByteArray(40000, 'x');
+}
+
+void tst_QIODevice::readLine2()
+{
+ QFETCH(QByteArray, line);
+
+ int length = line.size();
+
+ QByteArray data("First line.\r\n");
+ data.append(line);
+ data.append("\r\n");
+ data.append(line);
+ data.append("\r\n");
+ data.append("\r\n0123456789");
+
+ {
+ QBuffer buffer(&data);
+ buffer.open(QIODevice::ReadOnly);
+
+ buffer.seek(0);
+ QByteArray temp;
+ temp.resize(64536);
+ QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(13));
+ QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(length + 2));
+ QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(length + 2));
+ QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(2));
+ QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(10));
+ QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(-1));
+
+ buffer.seek(0);
+ QCOMPARE(buffer.readLine().size(), 13);
+ QCOMPARE(buffer.readLine().size(), length + 2);
+ QCOMPARE(buffer.readLine().size(), length + 2);
+ QCOMPARE(buffer.readLine().size(), 2);
+ QCOMPARE(buffer.readLine().size(), 10);
+ QVERIFY(buffer.readLine().isNull());
+ }
+
+ {
+ QBuffer buffer(&data);
+ buffer.open(QIODevice::ReadOnly | QIODevice::Text);
+
+ buffer.seek(0);
+ QByteArray temp;
+ temp.resize(64536);
+ QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(12));
+ QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(length + 1));
+ QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(length + 1));
+ QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(1));
+ QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(10));
+ QCOMPARE(buffer.readLine(temp.data(), temp.size()), qint64(-1));
+
+ buffer.seek(0);
+ QCOMPARE(buffer.readLine().size(), 12);
+ QCOMPARE(buffer.readLine().size(), length + 1);
+ QCOMPARE(buffer.readLine().size(), length + 1);
+ QCOMPARE(buffer.readLine().size(), 1);
+ QCOMPARE(buffer.readLine().size(), 10);
+ QVERIFY(buffer.readLine().isNull());
+ }
+}
+
QTEST_MAIN(tst_QIODevice)
#include "tst_qiodevice.moc"
diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp
index 596ac9b..605b3e3 100644
--- a/tests/auto/qlistview/tst_qlistview.cpp
+++ b/tests/auto/qlistview/tst_qlistview.cpp
@@ -1895,6 +1895,8 @@ void tst_QListView::taskQTBUG_5877_skippingItemInPageDownUp()
vu.setModel(&model);
vu.show();
+ QTest::qWaitForWindowShown(&vu);
+
int itemHeight = vu.visualRect(model.index(0, 0)).height();
int visibleRowCount = vu.height() / itemHeight;
int scrolledRowCount = visibleRowCount - 1;
diff --git a/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
index ff7e78e..b52c515 100644
--- a/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
+++ b/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
@@ -168,13 +168,16 @@ void tst_QNetworkCookieJar::setCookiesFromUrl_data()
cookie.setDomain("something.completely.different");
QTest::newRow("security-domain-1") << preset << cookie << "http://www.foo.tld" << result << false;
- cookie.setDomain("www.foo.tld");
+ // we want the cookie to be accepted although the path does not match, see QTBUG-5815
+ cookie.setDomain(".foo.tld");
cookie.setPath("/something");
- QTest::newRow("security-path-1") << preset << cookie << "http://www.foo.tld" << result << false;
+ result += cookie;
+ QTest::newRow("security-path-1") << preset << cookie << "http://www.foo.tld" << result << true;
// setting the defaults:
finalCookie = cookie;
finalCookie.setPath("/something/");
+ finalCookie.setDomain("www.foo.tld");
cookie.setPath("");
cookie.setDomain("");
result.clear();
@@ -285,6 +288,22 @@ void tst_QNetworkCookieJar::cookiesForUrl_data()
QTest::newRow("exp-match-4") << allCookies << "http://qt.nokia.com/web" << result;
QTest::newRow("exp-match-4") << allCookies << "http://qt.nokia.com/web/" << result;
QTest::newRow("exp-match-6") << allCookies << "http://qt.nokia.com/web/content" << result;
+
+ // path matching
+ allCookies.clear();
+ QNetworkCookie anotherCookie;
+ anotherCookie.setName("a");
+ anotherCookie.setPath("/web");
+ anotherCookie.setDomain(".nokia.com");
+ allCookies += anotherCookie;
+ result.clear();
+ QTest::newRow("path-unmatch-1") << allCookies << "http://nokia.com/" << result;
+ QTest::newRow("path-unmatch-2") << allCookies << "http://nokia.com/something/else" << result;
+ result += anotherCookie;
+ QTest::newRow("path-match-1") << allCookies << "http://nokia.com/web" << result;
+ QTest::newRow("path-match-2") << allCookies << "http://nokia.com/web/" << result;
+ QTest::newRow("path-match-3") << allCookies << "http://nokia.com/web/content" << result;
+
}
void tst_QNetworkCookieJar::cookiesForUrl()
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index bd83c47..09456ed 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -2622,7 +2622,7 @@ void tst_QNetworkReply::ioPostToHttpFromSocket()
QSignalSpy authenticationRequiredSpy(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)));
QSignalSpy proxyAuthenticationRequiredSpy(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
- QTestEventLoop::instance().enterLoop(6);
+ QTestEventLoop::instance().enterLoop(12);
disconnect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
disconnect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index d7f042e..0effd01 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -47,6 +47,7 @@
#include <qmatrix.h>
#include <qdesktopwidget.h>
#include <qpaintengine.h>
+#include <qsplashscreen.h>
#include <private/qpixmapdata_p.h>
@@ -169,6 +170,7 @@ private slots:
void loadFromDataNullValues();
void preserveDepth();
+ void splash_crash();
};
static bool lenientCompare(const QPixmap &actual, const QPixmap &expected)
@@ -1421,6 +1423,17 @@ void tst_QPixmap::fromImage_crash()
delete img;
}
+//This is testing QPixmapData::createCompatiblePixmapData - see QTBUG-5977
+void tst_QPixmap::splash_crash()
+{
+ QPixmap pix;
+ pix = QPixmap(":/images/designer.png");
+ QSplashScreen splash(pix);
+ splash.show();
+ QCoreApplication::processEvents();
+ splash.close();
+}
+
void tst_QPixmap::fromData()
{
unsigned char bits[] = { 0xaa, 0x55 };
diff --git a/tests/auto/qscriptable/tst_qscriptable.cpp b/tests/auto/qscriptable/tst_qscriptable.cpp
index 90f1db8..c0945d8 100644
--- a/tests/auto/qscriptable/tst_qscriptable.cpp
+++ b/tests/auto/qscriptable/tst_qscriptable.cpp
@@ -332,7 +332,7 @@ void tst_QScriptable::thisObject()
{
QVERIFY(!m_scriptable.oofThisObject().isValid());
m_engine.evaluate("o.oof = 123");
- QEXPECT_FAIL("", "Setter doesn't get called when it's in the prototype", Continue);
+ QEXPECT_FAIL("", "QTBUG-5749: Setter doesn't get called when it's in the prototype", Continue);
QVERIFY(m_scriptable.oofThisObject().strictlyEquals(m_engine.evaluate("o")));
}
{
diff --git a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
index a0af214..4ecd887 100644
--- a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
+++ b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
@@ -1114,7 +1114,7 @@ void tst_QScriptContext::calledAsConstructor()
QVERIFY(!fun3.property("calledAsConstructor").toBool());
eng.evaluate("new test();");
if (qt_script_isJITEnabled())
- QEXPECT_FAIL("", "calledAsConstructor is not correctly set for JS functions when JIT is enabled", Continue);
+ QEXPECT_FAIL("", "QTBUG-6132: calledAsConstructor is not correctly set for JS functions when JIT is enabled", Continue);
QVERIFY(fun3.property("calledAsConstructor").toBool());
}
diff --git a/tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp b/tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp
index fe69c07..09ef820 100644
--- a/tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp
+++ b/tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp
@@ -249,13 +249,13 @@ void tst_QScriptContextInfo::qtFunction()
QCOMPARE(info.functionEndLineNumber(), -1);
QCOMPARE(info.functionStartLineNumber(), -1);
if (x == 0)
- QEXPECT_FAIL("", "QScriptContextInfo doesn't pick the correct meta-index for overloaded slots", Continue);
+ QEXPECT_FAIL("", "QTBUG-6133: QScriptContextInfo doesn't pick the correct meta-index for overloaded slots", Continue);
QCOMPARE(info.functionParameterNames().size(), pnames.size());
if (x == 0)
- QEXPECT_FAIL("", "QScriptContextInfo doesn't pick the correct meta-index for overloaded slots", Continue);
+ QEXPECT_FAIL("", "QTBUG-6133: QScriptContextInfo doesn't pick the correct meta-index for overloaded slots", Continue);
QCOMPARE(info.functionParameterNames(), pnames);
if (x == 0)
- QEXPECT_FAIL("", "QScriptContextInfo doesn't pick the correct meta-index for overloaded slots", Continue);
+ QEXPECT_FAIL("", "QTBUG-6133: QScriptContextInfo doesn't pick the correct meta-index for overloaded slots", Continue);
QCOMPARE(info.functionMetaIndex(), metaObject()->indexOfMethod(sig));
}
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp
index 8eaad78..3bc2443 100644
--- a/tests/auto/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp
@@ -1148,7 +1148,7 @@ void tst_QScriptEngine::globalObjectProperties()
QScriptValue::PropertyFlags flags = QScriptValue::ReadOnly | QScriptValue::SkipInEnumeration;
global.setProperty(name, val, flags);
QVERIFY(global.property(name).equals(val));
- QEXPECT_FAIL("", "custom Global Object properties don't retain attributes", Continue);
+ QEXPECT_FAIL("", "QTBUG-6134: custom Global Object properties don't retain attributes", Continue);
QCOMPARE(global.propertyFlags(name), flags);
global.setProperty(name, QScriptValue());
QVERIFY(!global.property(name).isValid());
@@ -2033,7 +2033,7 @@ void tst_QScriptEngine::valueConversion()
QScriptValue val = qScriptValueFromValue(&eng, in);
QVERIFY(val.isRegExp());
QRegExp out = val.toRegExp();
- QEXPECT_FAIL("", "JSC-based back-end doesn't preserve QRegExp::patternSyntax (always uses RegExp2)", Continue);
+ QEXPECT_FAIL("", "QTBUG-6136: JSC-based back-end doesn't preserve QRegExp::patternSyntax (always uses RegExp2)", Continue);
QCOMPARE(out.patternSyntax(), in.patternSyntax());
QCOMPARE(out.pattern(), in.pattern());
QCOMPARE(out.caseSensitivity(), in.caseSensitivity());
@@ -2050,7 +2050,7 @@ void tst_QScriptEngine::valueConversion()
in.setMinimal(true);
QScriptValue val = qScriptValueFromValue(&eng, in);
QVERIFY(val.isRegExp());
- QEXPECT_FAIL("", "JSC-based back-end doesn't preserve QRegExp::minimal (always false)", Continue);
+ QEXPECT_FAIL("", "QTBUG-6136: JSC-based back-end doesn't preserve QRegExp::minimal (always false)", Continue);
QCOMPARE(val.toRegExp().isMinimal(), in.isMinimal());
}
}
@@ -2505,7 +2505,7 @@ void tst_QScriptEngine::stacktrace()
QVERIFY(eng.hasUncaughtException());
QVERIFY(result.isError());
- QEXPECT_FAIL("", "", Abort);
+ QEXPECT_FAIL("", "QTBUG-6139: uncaughtExceptionBacktrace() doesn't give the full backtrace", Abort);
QCOMPARE(eng.uncaughtExceptionBacktrace(), backtrace);
QVERIFY(eng.hasUncaughtException());
QVERIFY(result.strictlyEquals(eng.uncaughtException()));
@@ -3045,7 +3045,7 @@ void tst_QScriptEngine::errorConstructors()
eng.clearExceptions();
QVERIFY(ret.toString().startsWith(name));
if (x != 0)
- QEXPECT_FAIL("", "JSC doesn't assign lineNumber when errors are not thrown", Continue);
+ QEXPECT_FAIL("", "QTBUG-6138: JSC doesn't assign lineNumber when errors are not thrown", Continue);
QCOMPARE(ret.property("lineNumber").toInt32(), i+2);
}
}
@@ -3063,14 +3063,19 @@ void tst_QScriptEngine::argumentsProperty()
{
{
QScriptEngine eng;
- QEXPECT_FAIL("", "", Continue);
- QVERIFY(eng.evaluate("arguments").isUndefined());
+ {
+ QScriptValue ret = eng.evaluate("arguments");
+ QVERIFY(ret.isError());
+ QCOMPARE(ret.toString(), QString::fromLatin1("ReferenceError: Can't find variable: arguments"));
+ }
eng.evaluate("arguments = 10");
- QScriptValue ret = eng.evaluate("arguments");
- QVERIFY(ret.isNumber());
- QCOMPARE(ret.toInt32(), 10);
- QEXPECT_FAIL("", "", Continue);
- QVERIFY(!eng.evaluate("delete arguments").toBoolean());
+ {
+ QScriptValue ret = eng.evaluate("arguments");
+ QVERIFY(ret.isNumber());
+ QCOMPARE(ret.toInt32(), 10);
+ }
+ QVERIFY(eng.evaluate("delete arguments").toBoolean());
+ QVERIFY(!eng.globalObject().property("arguments").isValid());
}
{
QScriptEngine eng;
@@ -3081,11 +3086,11 @@ void tst_QScriptEngine::argumentsProperty()
}
{
QScriptEngine eng;
+ QVERIFY(!eng.globalObject().property("arguments").isValid());
QScriptValue ret = eng.evaluate("(function() { arguments = 456; return arguments; })()");
QVERIFY(ret.isNumber());
QCOMPARE(ret.toInt32(), 456);
- QEXPECT_FAIL("", "", Continue);
- QVERIFY(eng.evaluate("arguments").isUndefined());
+ QVERIFY(!eng.globalObject().property("arguments").isValid());
}
{
diff --git a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
index 032c34b..b061eb2 100644
--- a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
+++ b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
@@ -114,6 +114,7 @@ private slots:
void evaluateProgram();
void evaluateProgram_SyntaxError();
void evaluateNullProgram();
+ void QTBUG6108();
private:
double m_testProperty;
@@ -475,7 +476,7 @@ void tst_QScriptEngineAgent::scriptLoadAndUnload_eval()
spy->clear();
eng.evaluate("eval('function foo() { print(123); }')");
- QEXPECT_FAIL("","Eval is threaded in different way that in old backend", Abort);
+ QEXPECT_FAIL("","QTBUG-6140 Eval is threaded in different way that in old backend", Abort);
QCOMPARE(spy->count(), 3);
QCOMPARE(spy->at(0).type, ScriptEngineEvent::ScriptLoad);
@@ -1160,16 +1161,16 @@ void tst_QScriptEngineAgent::positionChange_1()
{
spy->clear();
eng.evaluate(";");
- QEXPECT_FAIL("","JSC do not evaluate ';' to statemant",Continue);
+ QEXPECT_FAIL("","QTBUG-6142 JSC do not evaluate ';' to statemant",Continue);
QCOMPARE(spy->count(), 1);
if (spy->count()) {
- QEXPECT_FAIL("","JSC do not evaluate ';' to statemant",Continue);
+ QEXPECT_FAIL("","QTBUG-6142 JSC do not evaluate ';' to statemant",Continue);
QCOMPARE(spy->at(0).type, ScriptEngineEvent::PositionChange);
- QEXPECT_FAIL("","JSC do not evaluate ';' to statemant",Continue);
+ QEXPECT_FAIL("","QTBUG-6142 JSC do not evaluate ';' to statemant",Continue);
QVERIFY(spy->at(0).scriptId != -1);
- QEXPECT_FAIL("","JSC do not evaluate ';' to statemant",Continue);
+ QEXPECT_FAIL("","QTBUG-6142 JSC do not evaluate ';' to statemant",Continue);
QCOMPARE(spy->at(0).lineNumber, 1);
- QEXPECT_FAIL("","JSC do not evaluate ';' to statemant",Continue);
+ QEXPECT_FAIL("","QTBUG-6142 JSC do not evaluate ';' to statemant",Continue);
QCOMPARE(spy->at(0).columnNumber, 1);
}
}
@@ -1551,7 +1552,7 @@ void tst_QScriptEngineAgent::positionChange_2()
}
{
- QEXPECT_FAIL("","I believe the test is wrong. Expressions shouldn't call positionChange "
+ QEXPECT_FAIL("","QTBUG-6142 I believe the test is wrong. Expressions shouldn't call positionChange "
"because statement '1+2' will call it at least twice, why debugger have to "
"stop here so many times?", Abort);
spy->clear();
@@ -2088,8 +2089,6 @@ void tst_QScriptEngineAgent::syntaxError()
i = 2;
QCOMPARE(spy->at(i).type, ScriptEngineEvent::ContextPush);
- QEXPECT_FAIL("","The test is broken, contextPush event do not provide scriptId", Continue);
- QVERIFY(spy->at(i).scriptId == -1);
i = 3;
QCOMPARE(spy->at(i).type, ScriptEngineEvent::FunctionEntry);
QVERIFY(spy->at(i).scriptId == -1);
@@ -2098,14 +2097,12 @@ void tst_QScriptEngineAgent::syntaxError()
QVERIFY(spy->at(i).scriptId == -1);
i = 5;
QCOMPARE(spy->at(i).type, ScriptEngineEvent::ContextPop);
- QEXPECT_FAIL("","The test is broken, contextPop event do not provide scriptId", Continue);
- QVERIFY(spy->at(i).scriptId == -1);
i = 6;
QCOMPARE(spy->at(i).type, ScriptEngineEvent::ExceptionThrow);
QCOMPARE(spy->at(i).scriptId, spy->at(0).scriptId);
QVERIFY(!spy->at(i).hasExceptionHandler);
QVERIFY(spy->at(i).value.isError());
- QEXPECT_FAIL("","There are other messages in JSC",Continue);
+ QEXPECT_FAIL("","QTBUG-6137 There are other messages in JSC",Continue);
QCOMPARE(spy->at(i).value.toString(), QString("SyntaxError: Expected `}'"));
QCOMPARE(spy->at(i).scriptId, spy->at(0).scriptId);
i = 7;
@@ -2138,7 +2135,7 @@ void tst_QScriptEngineAgent::extension_invoctaion()
QCOMPARE(spy->at(1).lineNumber, lineNumber);
QCOMPARE(spy->at(1).columnNumber, 1);
- QEXPECT_FAIL("","In JSC Eval('debugger') returns undefined",Abort);
+ QEXPECT_FAIL("","QTBUG-6135 In JSC Eval('debugger') returns undefined",Abort);
QVERIFY(ret.isString());
QCOMPARE(ret.toString(), QString::fromLatin1("extension(DebuggerInvocationRequest)"));
}
@@ -2306,5 +2303,32 @@ void tst_QScriptEngineAgent::evaluateNullProgram()
QCOMPARE(spy->count(), 0);
}
+void tst_QScriptEngineAgent::QTBUG6108()
+{
+ QScriptEngine eng;
+ ScriptEngineSpy *spy = new ScriptEngineSpy(&eng);
+ eng.evaluate("eval('a = 1')");
+ QCOMPARE(spy->count(), 5);
+
+ QCOMPARE(spy->at(0).type, ScriptEngineEvent::ScriptLoad);
+ QVERIFY(spy->at(0).scriptId != -1);
+
+ QCOMPARE(spy->at(1).type, ScriptEngineEvent::FunctionEntry);
+ QVERIFY(spy->at(1).scriptId != -1);
+ QCOMPARE(spy->at(1).scriptId, spy->at(0).scriptId);
+
+ QCOMPARE(spy->at(2).type, ScriptEngineEvent::PositionChange);
+ QVERIFY(spy->at(2).scriptId != -1);
+ QCOMPARE(spy->at(2).scriptId, spy->at(0).scriptId);
+ QCOMPARE(spy->at(2).lineNumber, 1);
+
+ QCOMPARE(spy->at(3).type, ScriptEngineEvent::FunctionExit);
+ QVERIFY(spy->at(3).scriptId != -1);
+ QCOMPARE(spy->at(3).scriptId, spy->at(0).scriptId);
+
+ QCOMPARE(spy->at(4).type, ScriptEngineEvent::ScriptUnload);
+ QCOMPARE(spy->at(4).scriptId, spy->at(0).scriptId);
+}
+
QTEST_MAIN(tst_QScriptEngineAgent)
#include "tst_qscriptengineagent.moc"
diff --git a/tests/auto/qstatusbar/tst_qstatusbar.cpp b/tests/auto/qstatusbar/tst_qstatusbar.cpp
index 9774559..92d9185 100644
--- a/tests/auto/qstatusbar/tst_qstatusbar.cpp
+++ b/tests/auto/qstatusbar/tst_qstatusbar.cpp
@@ -77,6 +77,7 @@ private slots:
void insertPermanentWidget();
void setSizeGripEnabled();
void task194017_hiddenWidget();
+ void QTBUG4334_hiddenOnMaximizedWindow();
private:
QStatusBar *testWidget;
@@ -257,6 +258,19 @@ void tst_QStatusBar::task194017_hiddenWidget()
QVERIFY(!label->isVisible());
}
+void tst_QStatusBar::QTBUG4334_hiddenOnMaximizedWindow()
+{
+ QMainWindow main;
+ QStatusBar statusbar;
+ statusbar.setSizeGripEnabled(true);
+ main.setStatusBar(&statusbar);
+ main.showMaximized();
+ QTest::qWaitForWindowShown(&main);
+ QVERIFY(!statusbar.findChild<QSizeGrip*>()->isVisible());
+ main.showNormal();
+ QTest::qWaitForWindowShown(&main);
+ QVERIFY(statusbar.findChild<QSizeGrip*>()->isVisible());
+}
QTEST_MAIN(tst_QStatusBar)
#include "tst_qstatusbar.moc"
diff --git a/tests/auto/qtabbar/tst_qtabbar.cpp b/tests/auto/qtabbar/tst_qtabbar.cpp
index 2db72b9..e83312d 100644
--- a/tests/auto/qtabbar/tst_qtabbar.cpp
+++ b/tests/auto/qtabbar/tst_qtabbar.cpp
@@ -295,6 +295,10 @@ void tst_QTabBar::setUsesScrollButtons()
if (usesArrows != -128)
tabBar.setUsesScrollButtons(usesArrows);
QTEST(tabBar.usesScrollButtons(), "expectedArrows");
+
+ // Make sure style sheet does not override user set mode
+ tabBar.setStyleSheet("QWidget { background-color: #ABA8A6;}");
+ QTEST(tabBar.usesScrollButtons(), "expectedArrows");
}
void tst_QTabBar::removeLastTab()
@@ -532,7 +536,7 @@ void tst_QTabBar::task251184_removeTab()
QCOMPARE(bar.count(), 1);
QCOMPARE(bar.currentIndex(), 0);
- QCOMPARE(bar.tabText(bar.currentIndex()), QString("bar2"));
+ QCOMPARE(bar.tabText(bar.currentIndex()), QString("bar2"));
}
diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp
index 46c3fb6..50d6c67 100644
--- a/tests/auto/qtableview/tst_qtableview.cpp
+++ b/tests/auto/qtableview/tst_qtableview.cpp
@@ -3016,6 +3016,14 @@ void tst_QTableView::spans_data()
<< QPoint(2, 0)
<< 1
<< 2;
+
+ QTest::newRow("QTBUG-6004: No failing Q_ASSERT, then it passes.")
+ << 5 << 5
+ << (SpanList() << QRect(0, 0, 2, 2) << QRect(0, 0, 1, 1))
+ << false
+ << QPoint(0, 0)
+ << 1
+ << 1;
}
void tst_QTableView::spans()
diff --git a/tests/auto/qtcpserver/tst_qtcpserver.cpp b/tests/auto/qtcpserver/tst_qtcpserver.cpp
index 2540096..8b86111 100644
--- a/tests/auto/qtcpserver/tst_qtcpserver.cpp
+++ b/tests/auto/qtcpserver/tst_qtcpserver.cpp
@@ -523,7 +523,7 @@ void tst_QTcpServer::waitForConnectionTest()
QTcpSocket findLocalIpSocket;
findLocalIpSocket.connectToHost(QtNetworkSettings::serverName(), 143);
- QVERIFY(findLocalIpSocket.waitForConnected(2000));
+ QVERIFY(findLocalIpSocket.waitForConnected(5000));
QTcpServer server;
bool timeout = false;
diff --git a/tests/auto/qtextedit/tst_qtextedit.cpp b/tests/auto/qtextedit/tst_qtextedit.cpp
index fee030c..bebc4bd 100644
--- a/tests/auto/qtextedit/tst_qtextedit.cpp
+++ b/tests/auto/qtextedit/tst_qtextedit.cpp
@@ -200,6 +200,7 @@ private slots:
void pasteFromQt3RichText();
void noWrapBackgrounds();
void preserveCharFormatAfterUnchangingSetPosition();
+ void twoSameInputMethodEvents();
private:
void createSelection();
@@ -2183,5 +2184,23 @@ void tst_QTextEdit::preserveCharFormatAfterUnchangingSetPosition()
QCOMPARE(edit.textColor(), color);
}
+// Regression test for QTBUG-4696
+void tst_QTextEdit::twoSameInputMethodEvents()
+{
+ ed->setText("testLine");
+ ed->show();
+ QList<QInputMethodEvent::Attribute> attributes;
+ attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor,
+ ed->textCursor().position(),
+ 0,
+ QVariant()));
+
+ QInputMethodEvent event("PreEditText", attributes);
+ QApplication::sendEvent(ed, &event);
+ QCOMPARE(ed->document()->firstBlock().layout()->lineCount(), 1);
+ QApplication::sendEvent(ed, &event);
+ QCOMPARE(ed->document()->firstBlock().layout()->lineCount(), 1);
+}
+
QTEST_MAIN(tst_QTextEdit)
#include "tst_qtextedit.moc"
diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp
index 7c3f4f2..1df26b8 100644
--- a/tests/auto/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp
@@ -1115,14 +1115,14 @@ void tst_QTextLayout::testTabDPIScale()
QTextOption option = layout.textOption();
QList<QTextOption::Tab> tabs;
QTextOption::Tab tab;
- tab.position = 200;
+ tab.position = 300;
tabs.append(tab);
- tab.position = 400;
+ tab.position = 600;
tab.type = QTextOption::RightTab;
tabs.append(tab);
- tab.position = 600;
+ tab.position = 800;
tab.type = QTextOption::CenterTab;
tabs.append(tab);
option.setTabs(tabs);
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 9692c6e..1e3f5f8 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -384,6 +384,8 @@ private slots:
void activateWindow();
+ void openModal_taskQTBUG_5804();
+
#ifdef Q_OS_SYMBIAN
void cbaVisibility();
#endif
@@ -9583,6 +9585,29 @@ void tst_QWidget::activateWindow()
QTRY_VERIFY(!mainwindow2->isActiveWindow());
}
+void tst_QWidget::openModal_taskQTBUG_5804()
+{
+ class Widget : public QWidget
+ {
+ public:
+ Widget(QWidget *parent) : QWidget(parent)
+ {
+ }
+ ~Widget()
+ {
+ QMessageBox msgbox;
+ QTimer::singleShot(10, &msgbox, SLOT(accept()));
+ msgbox.exec(); //open a modal dialog
+ }
+ };
+
+ QWidget *win = new QWidget;
+ new Widget(win);
+ win->show();
+ QTest::qWaitForWindowShown(win);
+ delete win;
+}
+
#ifdef Q_OS_SYMBIAN
void tst_QWidget::cbaVisibility()
{
diff --git a/tools/assistant/lib/qhelpenginecore.cpp b/tools/assistant/lib/qhelpenginecore.cpp
index 640b9fd..bd150d6 100644
--- a/tools/assistant/lib/qhelpenginecore.cpp
+++ b/tools/assistant/lib/qhelpenginecore.cpp
@@ -359,19 +359,21 @@ bool QHelpEngineCore::unregisterDocumentation(const QString &namespaceName)
*/
QString QHelpEngineCore::documentationFileName(const QString &namespaceName)
{
- QString res;
- if (!d->setup())
- return res;
- const QHelpCollectionHandler::DocInfoList docList = d->collectionHandler->registeredDocumentations();
- foreach(const QHelpCollectionHandler::DocInfo info, docList) {
- if (info.namespaceName == namespaceName) {
- QFileInfo fi(d->collectionHandler->collectionFile());
- fi.setFile(fi.absolutePath() + QDir::separator() + info.fileName);
- res = QDir::cleanPath(fi.absoluteFilePath());
- break;
+ if (d->setup()) {
+ const QHelpCollectionHandler::DocInfoList docList =
+ d->collectionHandler->registeredDocumentations();
+ foreach(const QHelpCollectionHandler::DocInfo info, docList) {
+ if (info.namespaceName == namespaceName) {
+ if (QDir::isAbsolutePath(info.fileName))
+ return QDir::cleanPath(info.fileName);
+
+ QFileInfo fi(d->collectionHandler->collectionFile());
+ fi.setFile(fi.absolutePath() + QDir::separator() + info.fileName);
+ return QDir::cleanPath(fi.absoluteFilePath());
+ }
}
}
- return res;
+ return QString();
}
/*!
diff --git a/tools/configure/tools.cpp b/tools/configure/tools.cpp
index 76063e4..7412677 100644
--- a/tools/configure/tools.cpp
+++ b/tools/configure/tools.cpp
@@ -163,10 +163,13 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString
case PL('X','C'):
case PL('X','U'):
case PL('X','W'):
+ case PL('X','M'): // old license key
dictionary["LICENSE_EXTENSION"] = "-ALLOS";
break;
+
case PL('6', 'M'):
case PL('8', 'M'):
+ case PL('K', 'M'): // old license key
case PL('N', '7'):
case PL('N', '9'):
case PL('N', 'X'):
@@ -178,7 +181,7 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString
if (dictionary["PLATFORM NAME"].contains("Windows CE")
&& platformCode != PL('6', 'M') && platformCode != PL('S', '9')
&& platformCode != PL('S', 'C') && platformCode != PL('S', 'U')
- && platformCode != PL('S', 'W')) {
+ && platformCode != PL('S', 'W') && platformCode != PL('K', 'M')) {
dictionary["DONE"] = "error";
} else if (dictionary["PLATFORM NAME"].contains("Symbian")
&& platformCode != PL('N', '9') && platformCode != PL('S', '9')
@@ -196,7 +199,7 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString
break;
default:
dictionary["DONE"] = "error";
- return;
+ break;
}
#undef PL
diff --git a/tools/linguist/lconvert/main.cpp b/tools/linguist/lconvert/main.cpp
index 7807761..5f3de7b 100644
--- a/tools/linguist/lconvert/main.cpp
+++ b/tools/linguist/lconvert/main.cpp
@@ -46,6 +46,8 @@
#include <QtCore/QString>
#include <QtCore/QStringList>
+#include <iostream>
+
static int usage(const QStringList &args)
{
Q_UNUSED(args);
@@ -55,7 +57,7 @@ static int usage(const QStringList &args)
foreach (Translator::FileFormat format, Translator::registeredFileFormats())
loaders += line.arg(format.extension, -5).arg(format.description);
- qWarning("%s", qPrintable(QString(QLatin1String("\nUsage:\n"
+ std::cerr << qPrintable(QString(QLatin1String("\nUsage:\n"
" lconvert [options] <infile> [<infile>...]\n\n"
"lconvert is part of Qt's Linguist tool chain. It can be used as a\n"
"stand-alone tool to convert and filter translation data files.\n"
@@ -117,7 +119,7 @@ static int usage(const QStringList &args)
" 0 on success\n"
" 1 on command line parse failures\n"
" 2 on read failures\n"
- " 3 on write failures\n")).arg(loaders)));
+ " 3 on write failures\n")).arg(loaders));
return 1;
}
diff --git a/tools/linguist/linguist/messageeditor.cpp b/tools/linguist/linguist/messageeditor.cpp
index 616bb26..a7cc636 100644
--- a/tools/linguist/linguist/messageeditor.cpp
+++ b/tools/linguist/linguist/messageeditor.cpp
@@ -407,10 +407,12 @@ QTextEdit *MessageEditor::activeTranslation() const
{
if (m_currentNumerus < 0)
return 0;
- foreach (QTextEdit *te, m_editors[m_currentModel].transTexts[m_currentNumerus]->getEditors())
+ const QList<FormatTextEdit *> &editors =
+ m_editors[m_currentModel].transTexts[m_currentNumerus]->getEditors();
+ foreach (QTextEdit *te, editors)
if (te->hasFocus())
return te;
- return 0; // This cannot happen
+ return editors.first();
}
QTextEdit *MessageEditor::activeOr1stTranslation() const
diff --git a/tools/linguist/lupdate/cpp.cpp b/tools/linguist/lupdate/cpp.cpp
index 443abd0..857233e 100644
--- a/tools/linguist/lupdate/cpp.cpp
+++ b/tools/linguist/lupdate/cpp.cpp
@@ -306,7 +306,6 @@ private:
// the string to read from and current position in the string
QTextCodec *yySourceCodec;
- bool yySourceIsUnicode;
QString yyInStr;
const ushort *yyInPtr;
@@ -353,7 +352,6 @@ void CppParser::setInput(const QString &in)
yyInStr = in;
yyFileName = QString();
yySourceCodec = 0;
- yySourceIsUnicode = true;
yyForceUtf8 = true;
}
@@ -362,7 +360,6 @@ void CppParser::setInput(QTextStream &ts, const QString &fileName)
yyInStr = ts.readAll();
yyFileName = fileName;
yySourceCodec = ts.codec();
- yySourceIsUnicode = yySourceCodec->name().startsWith("UTF-");
yyForceUtf8 = false;
}
@@ -1430,24 +1427,24 @@ QString CppParser::transcode(const QString &str, bool utf8)
{
static const char tab[] = "abfnrtv";
static const char backTab[] = "\a\b\f\n\r\t\v";
- const QString in = (!utf8 || yySourceIsUnicode)
- ? str : QString::fromUtf8(yySourceCodec->fromUnicode(str).data());
- QString out;
+ // This function has to convert back to bytes, as C's \0* sequences work at that level.
+ const QByteArray in = yyForceUtf8 ? str.toUtf8() : tor->codec()->fromUnicode(str);
+ QByteArray out;
out.reserve(in.length());
for (int i = 0; i < in.length();) {
- ushort c = in[i++].unicode();
+ uchar c = in[i++];
if (c == '\\') {
if (i >= in.length())
break;
- c = in[i++].unicode();
+ c = in[i++];
if (c == '\n')
continue;
if (c == 'x') {
QByteArray hex;
- while (i < in.length() && isxdigit((c = in[i].unicode()))) {
+ while (i < in.length() && isxdigit((c = in[i]))) {
hex += c;
i++;
}
@@ -1456,7 +1453,7 @@ QString CppParser::transcode(const QString &str, bool utf8)
QByteArray oct;
int n = 0;
oct += c;
- while (n < 2 && i < in.length() && (c = in[i].unicode()) >= '0' && c < '8') {
+ while (n < 2 && i < in.length() && (c = in[i]) >= '0' && c < '8') {
i++;
n++;
oct += c;
@@ -1464,13 +1461,14 @@ QString CppParser::transcode(const QString &str, bool utf8)
out += oct.toUInt(0, 8);
} else {
const char *p = strchr(tab, c);
- out += QChar(QLatin1Char(!p ? c : backTab[p - tab]));
+ out += !p ? c : backTab[p - tab];
}
} else {
out += c;
}
}
- return out;
+ return (utf8 || yyForceUtf8) ? QString::fromUtf8(out.constData(), out.length())
+ : tor->codec()->toUnicode(out);
}
void CppParser::recordMessage(
@@ -2150,9 +2148,9 @@ void loadCPP(Translator &translator, const QStringList &filenames, ConversionDat
QTextStream ts(&file);
ts.setCodec(codec);
ts.setAutoDetectUnicode(true);
- if (ts.codec()->name() == "UTF-16")
- translator.setCodecName("System");
parser.setInput(ts, filename);
+ if (cd.m_outputCodec.isEmpty() && ts.codec()->name() == "UTF-16")
+ translator.setCodecName("System");
Translator *tor = new Translator;
tor->setCodecName(translator.codecName());
parser.setTranslator(tor);
diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp
index bdaec4f..9a9af68 100644
--- a/tools/linguist/lupdate/main.cpp
+++ b/tools/linguist/lupdate/main.cpp
@@ -54,13 +54,20 @@
#include <QtCore/QStringList>
#include <QtCore/QTextCodec>
+#include <iostream>
+
static QString m_defaultExtensions;
-static void printOut(const QString & out)
+static void printErr(const QString & out)
{
qWarning("%s", qPrintable(out));
}
+static void printOut(const QString & out)
+{
+ std::cerr << qPrintable(out);
+}
+
static void recursiveFileInfoList(const QDir &dir,
const QSet<QString> &nameFilters, QDir::Filters filter,
QFileInfoList *fileinfolist)
@@ -137,7 +144,7 @@ static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFil
cd.m_sortContexts = !(options & NoSort);
if (QFile(fileName).exists()) {
if (!tor.load(fileName, cd, QLatin1String("auto"))) {
- printOut(cd.error());
+ printErr(cd.error());
*fail = true;
continue;
}
@@ -197,11 +204,11 @@ static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFil
out.normalizeTranslations(cd);
if (!cd.errors().isEmpty()) {
- printOut(cd.error());
+ printErr(cd.error());
cd.clearErrors();
}
if (!out.save(fileName, cd, QLatin1String("auto"))) {
- printOut(cd.error());
+ printErr(cd.error());
*fail = true;
}
}
@@ -494,6 +501,7 @@ int main(int argc, char **argv)
if (!tmp.isEmpty() && !tmp.first().isEmpty()) {
codecForTr = tmp.first().toLatin1();
fetchedTor.setCodecName(codecForTr);
+ cd.m_outputCodec = codecForTr;
}
tmp = variables.value("CODECFORSRC");
if (!tmp.isEmpty() && !tmp.first().isEmpty()) {
diff --git a/tools/linguist/phrasebooks/french.qph b/tools/linguist/phrasebooks/french.qph
index d710abd..9e1a580 100644
--- a/tools/linguist/phrasebooks/french.qph
+++ b/tools/linguist/phrasebooks/french.qph
@@ -1402,4 +1402,40 @@
<source>&amp;Redo</source>
<target>&amp;Rétablir</target>
</phrase>
+<phrase>
+ <source>Edit</source>
+ <target>Éditer</target>
+</phrase>
+<phrase>
+ <source>PATH:</source>
+ <target>PATH :</target>
+</phrase>
+<phrase>
+ <source>Change:</source>
+ <target>Modification :</target>
+</phrase>
+<phrase>
+ <source>Edit...</source>
+ <target>Modifier...</target>
+</phrase>
+<phrase>
+ <source>&amp;Username:</source>
+ <target>&amp;Utilisateur :</target>
+</phrase>
+<phrase>
+ <source>Link</source>
+ <target>Lien</target>
+</phrase>
+<phrase>
+ <source>Paste:</source>
+ <target>Collage :</target>
+</phrase>
+<phrase>
+ <source>Label</source>
+ <target>Libellé</target>
+</phrase>
+<phrase>
+ <source>&amp;Debug</source>
+ <target>&amp;Déboguer</target>
+</phrase>
</QPH>
diff --git a/tools/linguist/shared/translator.cpp b/tools/linguist/shared/translator.cpp
index 05fc6e5..8a071d3 100644
--- a/tools/linguist/shared/translator.cpp
+++ b/tools/linguist/shared/translator.cpp
@@ -67,7 +67,7 @@ QString QObject::tr(const char *sourceText, const char *, int n)
#endif
Translator::Translator() :
- m_codecName("ISO-8859-1"),
+ m_codec(QTextCodec::codecForName("ISO-8859-1")),
m_locationsType(AbsoluteLocations)
{
}
@@ -713,12 +713,17 @@ void Translator::setCodecName(const QByteArray &name)
if (!codec) {
if (!name.isEmpty())
qWarning("No QTextCodec for %s available. Using Latin1\n", name.constData());
- m_codecName = "ISO-8859-1";
+ m_codec = QTextCodec::codecForName("ISO-8859-1");
} else {
- m_codecName = codec->name();
+ m_codec = codec;
}
}
+QByteArray Translator::codecName() const
+{
+ return m_codec->name();
+}
+
void Translator::dump() const
{
for (int i = 0; i != messageCount(); ++i)
diff --git a/tools/linguist/shared/translator.h b/tools/linguist/shared/translator.h
index f29317b..353cf9d 100644
--- a/tools/linguist/shared/translator.h
+++ b/tools/linguist/shared/translator.h
@@ -97,7 +97,7 @@ public:
public:
QString m_defaultContext;
QByteArray m_codecForSource; // CPP, PO & QM specific
- QByteArray m_outputCodec; // PO specific
+ QByteArray m_outputCodec; // CPP & PO specific
QString m_unTrPrefix; // QM specific
QString m_sourceFileName;
QString m_targetFileName;
@@ -151,7 +151,8 @@ public:
void reportDuplicates(const Duplicates &dupes, const QString &fileName, bool verbose);
void setCodecName(const QByteArray &name);
- QByteArray codecName() const { return m_codecName; }
+ QByteArray codecName() const;
+ QTextCodec *codec() const { return m_codec; }
QString languageCode() const { return m_language; }
QString sourceLanguageCode() const { return m_sourceLanguage; }
@@ -211,7 +212,7 @@ private:
typedef QList<TranslatorMessage> TMM; // int stores the sequence position.
TMM m_messages;
- QByteArray m_codecName;
+ QTextCodec *m_codec;
LocationsType m_locationsType;
// A string beginning with a 2 or 3 letter language code (ISO 639-1