summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2009-11-10 13:01:07 +1000
committerKurt Korbatits <kurt.korbatits@nokia.com>2009-11-10 13:01:07 +1000
commit8df98549a4d84b5877e50318140c2041e17632fb (patch)
tree0c55d5ef4d8380ec45c6457a40b033dc45cbd579
parentf55c317e377aaf0b3e24904e88dc1c4a6e15a20a (diff)
parent9a6de1fa0db0da8c4fa5eb904ef6d78cc619e332 (diff)
Merge branch '4.6' of ../qt into 4.6
-rw-r--r--INSTALL156
-rw-r--r--README.s60184
-rw-r--r--README.wince44
-rw-r--r--config.tests/x11/xsync/xsync.cpp4
-rwxr-xr-xconfigure19
-rwxr-xr-xconfigure.exebin1172480 -> 1173504 bytes
-rw-r--r--demos/boxes/scene.cpp34
-rw-r--r--demos/composition/composition.cpp2
-rw-r--r--demos/qmediaplayer/mediaplayer.h2
-rw-r--r--demos/sub-attaq/boat.cpp2
-rw-r--r--dist/README33
-rw-r--r--dist/changes-4.6.0357
-rw-r--r--doc/src/examples/googlesuggest.qdoc148
-rw-r--r--doc/src/external-resources.qdoc45
-rw-r--r--doc/src/getting-started/installation.qdoc37
-rw-r--r--doc/src/howtos/guibooks.qdoc6
-rw-r--r--doc/src/images/googlesuggest-example.pngbin18809 -> 9006 bytes
-rw-r--r--doc/src/images/platformHWAcc.pngbin0 -> 11068 bytes
-rw-r--r--doc/src/internationalization/i18n.qdoc5
-rw-r--r--doc/src/modules.qdoc5
-rw-r--r--doc/src/platforms/emb-HwAcc-LinuxEmbedded.qdoc71
-rw-r--r--doc/src/platforms/emb-HwAcc-WinCE.qdoc69
-rw-r--r--doc/src/platforms/emb-directfb-EmbLinux.qdoc330
-rw-r--r--doc/src/platforms/emb-hardwareacceleration.qdocinc129
-rw-r--r--doc/src/platforms/emb-opengl-EmbLinux.qdoc (renamed from doc/src/platforms/emb-opengl.qdoc)112
-rw-r--r--doc/src/platforms/emb-opengl.qdocinc85
-rw-r--r--doc/src/platforms/emb-openvg-EmbLinux.qdoc53
-rw-r--r--doc/src/platforms/emb-openvg.qdocinc288
-rw-r--r--doc/src/platforms/qt-embedded-linux.qdoc2
-rw-r--r--doc/src/platforms/qt-embedded.qdoc2
-rw-r--r--doc/src/platforms/s60-introduction.qdoc10
-rw-r--r--doc/src/platforms/wince-introduction.qdoc2
-rw-r--r--doc/src/platforms/wince-opengl.qdoc70
-rw-r--r--doc/src/platforms/wince-openvg.qdoc65
-rw-r--r--doc/src/platforms/wince-signing.qdoc96
-rw-r--r--doc/src/platforms/winsystem.qdoc12
-rw-r--r--doc/src/qt4-intro.qdoc2
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qbytearray.cpp2
-rw-r--r--doc/src/snippets/code/src_opengl_qglshaderprogram.cpp15
-rw-r--r--examples/gestures/imagegestures/imagewidget.cpp32
-rw-r--r--examples/gestures/imagegestures/imagewidget.h1
-rw-r--r--examples/graphicsview/graphicsview.pro3
-rw-r--r--examples/graphicsview/weatheranchorlayout/images/5days.jpgbin0 -> 5748 bytes
-rw-r--r--examples/graphicsview/weatheranchorlayout/images/details.jpgbin0 -> 5323 bytes
-rw-r--r--examples/graphicsview/weatheranchorlayout/images/place.jpgbin0 -> 62438 bytes
-rw-r--r--examples/graphicsview/weatheranchorlayout/images/tabbar.jpgbin0 -> 849 bytes
-rw-r--r--examples/graphicsview/weatheranchorlayout/images/title.jpgbin0 -> 3472 bytes
-rw-r--r--examples/graphicsview/weatheranchorlayout/images/weather-few-clouds.pngbin0 -> 18976 bytes
-rw-r--r--examples/graphicsview/weatheranchorlayout/main.cpp275
-rw-r--r--examples/graphicsview/weatheranchorlayout/weatheranchorlayout.pro14
-rw-r--r--examples/graphicsview/weatheranchorlayout/weatheranchorlayout.qrc10
-rw-r--r--examples/network/googlesuggest/googlesuggest.cpp58
-rw-r--r--examples/network/googlesuggest/googlesuggest.h6
-rw-r--r--examples/network/googlesuggest/searchbox.cpp7
-rw-r--r--examples/network/googlesuggest/searchbox.h2
-rw-r--r--examples/opengl/hellogl_es2/glwidget.cpp30
-rw-r--r--examples/opengl/textures/glwidget.cpp12
-rw-r--r--examples/painting/svggenerator/svggenerator.pro5
-rw-r--r--examples/tools/regexp/regexpdialog.cpp4
-rw-r--r--examples/webkit/fancybrowser/mainwindow.cpp7
-rw-r--r--examples/xmlpatterns/filetree/filetree.pro5
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.pro5
-rw-r--r--examples/xmlpatterns/recipes/recipes.pro5
-rw-r--r--examples/xmlpatterns/schema/schema.pro5
-rw-r--r--examples/xmlpatterns/trafficinfo/trafficinfo.pro5
-rw-r--r--mkspecs/aix-g++-64/qplatformdefs.h2
-rw-r--r--mkspecs/aix-g++/qplatformdefs.h2
-rw-r--r--mkspecs/aix-xlc-64/qplatformdefs.h2
-rw-r--r--mkspecs/aix-xlc/qplatformdefs.h2
-rw-r--r--mkspecs/common/symbian/qplatformdefs.h3
-rw-r--r--mkspecs/common/symbian/symbian.conf21
-rw-r--r--mkspecs/common/wince/qplatformdefs.h2
-rw-r--r--mkspecs/cygwin-g++/qplatformdefs.h1
-rw-r--r--mkspecs/darwin-g++/qplatformdefs.h1
-rw-r--r--mkspecs/freebsd-g++/qplatformdefs.h1
-rw-r--r--mkspecs/hpux-acc-64/qplatformdefs.h2
-rw-r--r--mkspecs/hpux-acc-o64/qplatformdefs.h2
-rw-r--r--mkspecs/hpux-acc/qplatformdefs.h2
-rw-r--r--mkspecs/hpux-g++-64/qplatformdefs.h2
-rw-r--r--mkspecs/hpux-g++/qplatformdefs.h2
-rw-r--r--mkspecs/hpuxi-acc-32/qplatformdefs.h2
-rw-r--r--mkspecs/hpuxi-acc-64/qplatformdefs.h2
-rw-r--r--mkspecs/hpuxi-g++-64/qplatformdefs.h2
-rw-r--r--mkspecs/hurd-g++/qplatformdefs.h1
-rw-r--r--mkspecs/irix-cc-64/qplatformdefs.h2
-rw-r--r--mkspecs/irix-cc/qplatformdefs.h2
-rw-r--r--mkspecs/irix-g++/qplatformdefs.h2
-rw-r--r--mkspecs/linux-cxx/qplatformdefs.h2
-rw-r--r--mkspecs/linux-ecc-64/qplatformdefs.h2
-rw-r--r--mkspecs/linux-g++-gles2-experimental/qplatformdefs.h2
-rw-r--r--mkspecs/linux-g++/qplatformdefs.h2
-rw-r--r--mkspecs/linux-kcc/qplatformdefs.h2
-rw-r--r--mkspecs/linux-llvm/qplatformdefs.h2
-rw-r--r--mkspecs/linux-lsb-g++/qplatformdefs.h2
-rw-r--r--mkspecs/linux-pgcc/qplatformdefs.h2
-rw-r--r--mkspecs/lynxos-g++/qplatformdefs.h1
-rw-r--r--mkspecs/macx-g++/qplatformdefs.h1
-rw-r--r--mkspecs/macx-g++40/qplatformdefs.h1
-rw-r--r--mkspecs/macx-g++42/qplatformdefs.h1
-rw-r--r--mkspecs/macx-llvm/qplatformdefs.h1
-rw-r--r--mkspecs/macx-pbuilder/qplatformdefs.h1
-rw-r--r--mkspecs/macx-xcode/qplatformdefs.h1
-rw-r--r--mkspecs/macx-xlc/qplatformdefs.h1
-rw-r--r--mkspecs/netbsd-g++/qplatformdefs.h1
-rw-r--r--mkspecs/openbsd-g++/qplatformdefs.h1
-rw-r--r--mkspecs/sco-cc/qplatformdefs.h1
-rw-r--r--mkspecs/sco-g++/qplatformdefs.h1
-rw-r--r--mkspecs/solaris-cc-64/qplatformdefs.h2
-rw-r--r--mkspecs/solaris-cc/qplatformdefs.h2
-rw-r--r--mkspecs/solaris-g++-64/qplatformdefs.h2
-rw-r--r--mkspecs/solaris-g++/qplatformdefs.h2
-rw-r--r--mkspecs/tru64-cxx/qplatformdefs.h1
-rw-r--r--mkspecs/tru64-g++/qplatformdefs.h1
-rw-r--r--mkspecs/unixware-cc/qplatformdefs.h1
-rw-r--r--mkspecs/unixware-g++/qplatformdefs.h1
-rw-r--r--mkspecs/unsupported/qnx-g++/qplatformdefs.h2
-rw-r--r--mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h2
-rw-r--r--mkspecs/win32-msvc.net/qplatformdefs.h4
-rw-r--r--qmake/generators/symbian/symmake.cpp44
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-arabic.c60
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp10
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp8
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper.h2
-rw-r--r--src/3rdparty/harfbuzz/tests/shaping/main.cpp49
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_soft.cpp7
-rw-r--r--src/3rdparty/phonon/mmf/abstractmediaplayer.cpp58
-rw-r--r--src/3rdparty/phonon/mmf/abstractmediaplayer.h10
-rw-r--r--src/3rdparty/phonon/mmf/abstractplayer.cpp32
-rw-r--r--src/3rdparty/phonon/mmf/abstractplayer.h12
-rw-r--r--src/3rdparty/phonon/mmf/ancestormovemonitor.cpp175
-rw-r--r--src/3rdparty/phonon/mmf/ancestormovemonitor.h95
-rw-r--r--src/3rdparty/phonon/mmf/audioplayer.cpp21
-rw-r--r--src/3rdparty/phonon/mmf/audioplayer.h4
-rw-r--r--src/3rdparty/phonon/mmf/backend.cpp7
-rw-r--r--src/3rdparty/phonon/mmf/backend.h7
-rw-r--r--src/3rdparty/phonon/mmf/dummyplayer.cpp9
-rw-r--r--src/3rdparty/phonon/mmf/dummyplayer.h4
-rw-r--r--src/3rdparty/phonon/mmf/mediaobject.cpp15
-rw-r--r--src/3rdparty/phonon/mmf/mmf_videoplayer.cpp16
-rw-r--r--src/3rdparty/phonon/mmf/mmf_videoplayer.h4
-rw-r--r--src/3rdparty/phonon/mmf/videooutput.cpp32
-rw-r--r--src/3rdparty/phonon/mmf/videooutput.h15
-rw-r--r--src/3rdparty/phonon/mmf/videowidget.cpp5
-rw-r--r--src/3rdparty/phonon/mmf/videowidget.h3
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/PlatformScreenQt.cpp2
-rw-r--r--src/corelib/animation/qabstractanimation.cpp105
-rw-r--r--src/corelib/animation/qabstractanimation.h10
-rw-r--r--src/corelib/animation/qabstractanimation_p.h4
-rw-r--r--src/corelib/animation/qanimationgroup.cpp28
-rw-r--r--src/corelib/animation/qanimationgroup.h6
-rw-r--r--src/corelib/animation/qparallelanimationgroup.cpp6
-rw-r--r--src/corelib/animation/qparallelanimationgroup.h2
-rw-r--r--src/corelib/animation/qpauseanimation.cpp2
-rw-r--r--src/corelib/animation/qpropertyanimation.cpp6
-rw-r--r--src/corelib/animation/qpropertyanimation.h2
-rw-r--r--src/corelib/animation/qsequentialanimationgroup.cpp22
-rw-r--r--src/corelib/animation/qsequentialanimationgroup.h4
-rw-r--r--src/corelib/animation/qvariantanimation.cpp4
-rw-r--r--src/corelib/animation/qvariantanimation.h2
-rw-r--r--src/corelib/global/qfeatures.h5
-rw-r--r--src/corelib/global/qfeatures.txt7
-rw-r--r--src/corelib/global/qglobal.cpp6
-rw-r--r--src/corelib/global/qlibraryinfo.cpp2
-rw-r--r--src/corelib/global/qlibraryinfo.h2
-rw-r--r--src/corelib/io/qfile.cpp29
-rw-r--r--src/corelib/io/qfsfileengine.cpp185
-rw-r--r--src/corelib/io/qfsfileengine_p.h10
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp37
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp153
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp13
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp5
-rw-r--r--src/corelib/tools/qbytearraymatcher.h8
-rw-r--r--src/corelib/tools/qmap.h2
-rw-r--r--src/corelib/tools/qregexp.cpp18
-rw-r--r--src/corelib/tools/qregexp.h3
-rw-r--r--src/corelib/tools/qringbuffer_p.h27
-rw-r--r--src/corelib/tools/qstring.cpp2
-rw-r--r--src/corelib/tools/qstring.h1
-rw-r--r--src/corelib/tools/qstringbuilder.cpp24
-rw-r--r--src/corelib/tools/qstringbuilder.h58
-rw-r--r--src/corelib/tools/qstringmatcher.h6
-rw-r--r--src/corelib/tools/qunicodetables_p.h4
-rw-r--r--src/corelib/tools/qvector.h2
-rw-r--r--src/dbus/qdbusintegrator.cpp2
-rw-r--r--src/dbus/qdbusservicewatcher.cpp4
-rw-r--r--src/gui/accessible/qaccessible.h7
-rw-r--r--src/gui/accessible/qaccessible2.cpp12
-rw-r--r--src/gui/accessible/qaccessible2.h13
-rw-r--r--src/gui/accessible/qaccessible_mac.mm5
-rw-r--r--src/gui/dialogs/qcolordialog_mac.mm30
-rw-r--r--src/gui/dialogs/qfiledialog_mac.mm2
-rw-r--r--src/gui/dialogs/qprintpreviewdialog.cpp6
-rw-r--r--src/gui/effects/qgraphicseffect.cpp25
-rw-r--r--src/gui/effects/qgraphicseffect.h2
-rw-r--r--src/gui/effects/qgraphicseffect_p.h4
-rw-r--r--src/gui/embedded/qscreen_qws.cpp18
-rw-r--r--src/gui/embedded/qscreen_qws.h3
-rw-r--r--src/gui/embedded/qwscursor_qws.cpp2
-rw-r--r--src/gui/graphicsview/qgraph_p.h16
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout.cpp21
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout_p.cpp937
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout_p.h198
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp107
-rw-r--r--src/gui/graphicsview/qgraphicsitem.h8
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h13
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp80
-rw-r--r--src/gui/graphicsview/qgraphicsscene.h1
-rw-r--r--src/gui/graphicsview/qgraphicsscene_p.h11
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp28
-rw-r--r--src/gui/graphicsview/qgraphicswidget.cpp27
-rw-r--r--src/gui/graphicsview/qgraphicswidget.h4
-rw-r--r--src/gui/graphicsview/qsimplex_p.cpp2
-rw-r--r--src/gui/graphicsview/qsimplex_p.h2
-rw-r--r--src/gui/image/qbmphandler.cpp22
-rw-r--r--src/gui/image/qimage.cpp134
-rw-r--r--src/gui/image/qimage.h9
-rw-r--r--src/gui/image/qpixmap.cpp11
-rw-r--r--src/gui/image/qpixmap.h3
-rw-r--r--src/gui/image/qpixmap_mac.cpp14
-rw-r--r--src/gui/image/qpixmap_qws.cpp7
-rw-r--r--src/gui/image/qpixmap_raster.cpp2
-rw-r--r--src/gui/image/qpixmap_s60.cpp8
-rw-r--r--src/gui/image/qpixmap_x11.cpp22
-rw-r--r--src/gui/image/qpixmapdata.cpp2
-rw-r--r--src/gui/image/qpixmapdata_p.h3
-rw-r--r--src/gui/image/qpixmapfilter.cpp3
-rw-r--r--src/gui/image/qpixmapfilter_p.h2
-rw-r--r--src/gui/image/qpnghandler.cpp12
-rw-r--r--src/gui/image/qppmhandler.cpp6
-rw-r--r--src/gui/image/qxbmhandler.cpp2
-rw-r--r--src/gui/image/qxpmhandler.cpp2
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_p.h9
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp43
-rw-r--r--src/gui/itemviews/qitemdelegate.cpp2
-rw-r--r--src/gui/itemviews/qlistview.cpp10
-rw-r--r--src/gui/itemviews/qtreeview.cpp6
-rw-r--r--src/gui/itemviews/qtreeview_p.h2
-rw-r--r--src/gui/kernel/qaction.cpp2
-rw-r--r--src/gui/kernel/qapplication_mac.mm26
-rw-r--r--src/gui/kernel/qapplication_p.h2
-rw-r--r--src/gui/kernel/qapplication_s60.cpp12
-rw-r--r--src/gui/kernel/qapplication_win.cpp2
-rw-r--r--src/gui/kernel/qcocoaapplicationdelegate_mac.mm11
-rw-r--r--src/gui/kernel/qcocoaapplicationdelegate_mac_p.h1
-rw-r--r--src/gui/kernel/qcocoawindowdelegate_mac.mm12
-rw-r--r--src/gui/kernel/qcocoawindowdelegate_mac_p.h1
-rw-r--r--src/gui/kernel/qcursor_win.cpp8
-rw-r--r--src/gui/kernel/qdesktopwidget_mac.mm13
-rw-r--r--src/gui/kernel/qevent.cpp33
-rw-r--r--src/gui/kernel/qevent.h2
-rw-r--r--src/gui/kernel/qevent_p.h13
-rw-r--r--src/gui/kernel/qgesture.cpp75
-rw-r--r--src/gui/kernel/qgesture.h34
-rw-r--r--src/gui/kernel/qgesture_p.h34
-rw-r--r--src/gui/kernel/qgesturemanager.cpp12
-rw-r--r--src/gui/kernel/qlayout.cpp32
-rw-r--r--src/gui/kernel/qlayout.h3
-rw-r--r--src/gui/kernel/qmacgesturerecognizer_mac.mm2
-rw-r--r--src/gui/kernel/qsoftkeymanager.cpp12
-rw-r--r--src/gui/kernel/qstandardgestures.cpp323
-rw-r--r--src/gui/kernel/qstandardgestures_p.h29
-rw-r--r--src/gui/kernel/qt_s60_p.h23
-rw-r--r--src/gui/kernel/qwidget.cpp24
-rw-r--r--src/gui/kernel/qwidget.h2
-rw-r--r--src/gui/kernel/qwidget_mac.mm16
-rw-r--r--src/gui/kernel/qwidget_p.h6
-rw-r--r--src/gui/kernel/qwidget_s60.cpp4
-rw-r--r--src/gui/kernel/qwidget_win.cpp33
-rw-r--r--src/gui/kernel/qwidget_x11.cpp2
-rw-r--r--src/gui/kernel/qwinnativepangesturerecognizer_win.cpp4
-rw-r--r--src/gui/kernel/qwinnativepangesturerecognizer_win_p.h4
-rw-r--r--src/gui/painting/qbackingstore.cpp8
-rw-r--r--src/gui/painting/qbackingstore_p.h2
-rw-r--r--src/gui/painting/qblendfunctions.cpp40
-rw-r--r--src/gui/painting/qbrush.cpp24
-rw-r--r--src/gui/painting/qcolormap_qws.cpp2
-rw-r--r--src/gui/painting/qdrawhelper.cpp22
-rw-r--r--src/gui/painting/qmatrix.cpp18
-rw-r--r--src/gui/painting/qmatrix.h3
-rw-r--r--src/gui/painting/qpaintbuffer.cpp95
-rw-r--r--src/gui/painting/qpaintbuffer_p.h5
-rw-r--r--src/gui/painting/qpaintdevice.h3
-rw-r--r--src/gui/painting/qpaintengine_mac.cpp2
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp4
-rw-r--r--src/gui/painting/qpaintengineex.cpp6
-rw-r--r--src/gui/painting/qpainter.cpp25
-rw-r--r--src/gui/painting/qpen.cpp33
-rw-r--r--src/gui/painting/qregion.cpp20
-rw-r--r--src/gui/painting/qregion.h3
-rw-r--r--src/gui/painting/qtransform.cpp11
-rw-r--r--src/gui/painting/qwindowsurface_raster.cpp6
-rw-r--r--src/gui/s60framework/qs60mainappui.cpp2
-rw-r--r--src/gui/statemachine/qguistatemachine.cpp16
-rw-r--r--src/gui/styles/qs60style.cpp40
-rw-r--r--src/gui/styles/qs60style_p.h1
-rw-r--r--src/gui/styles/qs60style_s60.cpp14
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp68
-rw-r--r--src/gui/styles/qstylesheetstyle_default.cpp43
-rw-r--r--src/gui/styles/qwindowsmobilestyle.cpp21
-rw-r--r--src/gui/styles/qwindowsmobilestyle_p.h4
-rw-r--r--src/gui/styles/qwindowsstyle.cpp39
-rw-r--r--src/gui/styles/qwindowsstyle_p.h10
-rw-r--r--src/gui/text/qcssparser.cpp7
-rw-r--r--src/gui/text/qfontdatabase.cpp25
-rw-r--r--src/gui/text/qfontdatabase.h1
-rw-r--r--src/gui/text/qfontdatabase_x11.cpp93
-rw-r--r--src/gui/text/qfontengine_qpf.cpp4
-rw-r--r--src/gui/text/qtextcontrol.cpp28
-rw-r--r--src/gui/text/qtextcontrol_p_p.h4
-rw-r--r--src/gui/util/qdesktopservices.cpp2
-rw-r--r--src/gui/widgets/qabstractscrollarea.cpp19
-rw-r--r--src/gui/widgets/qabstractscrollarea.h2
-rw-r--r--src/gui/widgets/qcombobox.cpp37
-rw-r--r--src/gui/widgets/qcombobox.h1
-rw-r--r--src/gui/widgets/qcombobox_p.h2
-rw-r--r--src/gui/widgets/qlcdnumber.cpp41
-rw-r--r--src/gui/widgets/qlcdnumber.h7
-rw-r--r--src/gui/widgets/qlinecontrol.cpp23
-rw-r--r--src/gui/widgets/qlineedit.cpp23
-rw-r--r--src/gui/widgets/qlineedit.h3
-rw-r--r--src/gui/widgets/qmenu.cpp43
-rw-r--r--src/gui/widgets/qmenu_mac.mm2
-rw-r--r--src/gui/widgets/qmenu_p.h2
-rw-r--r--src/gui/widgets/qplaintextedit.cpp2
-rw-r--r--src/gui/widgets/qprintpreviewwidget.cpp12
-rw-r--r--src/gui/widgets/qprintpreviewwidget.h3
-rw-r--r--src/gui/widgets/qwidgetanimator.cpp7
-rw-r--r--src/gui/widgets/qwidgetanimator_p.h1
-rw-r--r--src/multimedia/video/qimagevideobuffer.cpp2
-rw-r--r--src/network/access/qnetworkaccessdebugpipebackend.cpp4
-rw-r--r--src/network/access/qnetworkcookie.cpp8
-rw-r--r--src/network/access/qnetworkcookiejar.cpp7
-rw-r--r--src/network/kernel/qhostinfo_p.h6
-rw-r--r--src/network/socket/qlocalsocket_win.cpp3
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager.cpp26
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp28
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h1
-rw-r--r--src/opengl/gl2paintengineex/qtriangulatingstroker_p.h6
-rw-r--r--src/opengl/qgl.cpp2
-rw-r--r--src/opengl/qglframebufferobject.cpp86
-rw-r--r--src/opengl/qglframebufferobject_p.h7
-rw-r--r--src/opengl/qglshaderprogram.cpp298
-rw-r--r--src/opengl/qglshaderprogram.h43
-rw-r--r--src/opengl/qpixmapdata_gl.cpp2
-rw-r--r--src/opengl/qwindowsurface_gl.cpp2
-rw-r--r--src/opengl/util/composition_mode_softlight.glsl24
-rw-r--r--src/opengl/util/fragmentprograms_p.h676
-rw-r--r--src/openvg/qpaintengine_vg.cpp16
-rw-r--r--src/plugins/accessible/widgets/simplewidgets.cpp44
-rw-r--r--src/plugins/accessible/widgets/simplewidgets.h7
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp2
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp82
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp14
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp2
-rw-r--r--src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.cpp2
-rw-r--r--src/plugins/graphicssystems/openvg/openvg.pro2
-rw-r--r--src/plugins/imageformats/gif/qgifhandler.cpp4
-rw-r--r--src/plugins/imageformats/ico/qicohandler.cpp4
-rw-r--r--src/plugins/imageformats/jpeg/qjpeghandler.cpp6
-rw-r--r--src/plugins/phonon/mmf/plugin/plugin.pro13
-rw-r--r--src/qt3support/painting/q3paintdevicemetrics.h2
-rw-r--r--src/qt3support/widgets/q3dockarea.cpp2
-rw-r--r--src/s60installs/bwins/QtCoreu.def25
-rw-r--r--src/s60installs/bwins/QtGuiu.def282
-rw-r--r--src/s60installs/bwins/QtScriptu.def15
-rw-r--r--src/s60installs/bwins/QtXmlPatternsu.def280
-rw-r--r--src/s60installs/eabi/QtCoreu.def25
-rw-r--r--src/s60installs/eabi/QtGuiu.def275
-rw-r--r--src/s60installs/eabi/QtScriptu.def17
-rw-r--r--src/s60installs/eabi/QtXmlPatternsu.def253
-rw-r--r--src/sql/drivers/psql/qsql_psql.cpp2
-rw-r--r--src/sql/models/qsqlquerymodel.cpp9
-rw-r--r--src/sql/models/qsqltablemodel.cpp2
-rw-r--r--src/src.pro33
-rw-r--r--src/testlib/qbenchmarkvalgrind.cpp2
-rw-r--r--src/tools/tools.pro70
-rw-r--r--src/tools/uic3/embed.cpp4
-rw-r--r--src/xmlpatterns/functions/qpatternmatchingfns.cpp2
-rw-r--r--src/xmlpatterns/functions/qpatternplatform_p.h2
-rw-r--r--tests/arthur/common/paintcommands.cpp20
-rw-r--r--tests/arthur/common/paintcommands.h2
-rw-r--r--tests/auto/linguist/lrelease/tst_lrelease.cpp13
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp49
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.h51
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result24
-rw-r--r--tests/auto/qaccessibility/tst_qaccessibility.cpp21
-rw-r--r--tests/auto/qanimationgroup/tst_qanimationgroup.cpp84
-rw-r--r--tests/auto/qcombobox/tst_qcombobox.cpp31
-rw-r--r--tests/auto/qcssparser/tst_qcssparser.cpp3
-rw-r--r--tests/auto/qdatastream/tst_qdatastream.cpp2
-rw-r--r--tests/auto/qfile/largefile/largefile.pro4
-rw-r--r--tests/auto/qfile/largefile/tst_largefile.cpp537
-rw-r--r--tests/auto/qfile/qfile.pro2
-rw-r--r--tests/auto/qfile/tst_qfile.cpp284
-rw-r--r--tests/auto/qgl/tst_qgl.cpp105
-rw-r--r--tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp326
-rw-r--r--tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp64
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp74
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp220
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp72
-rw-r--r--tests/auto/qgridlayout/tst_qgridlayout.cpp4
-rw-r--r--tests/auto/qimage/tst_qimage.cpp24
-rw-r--r--tests/auto/qimagewriter/tst_qimagewriter.cpp2
-rw-r--r--tests/auto/qitemdelegate/tst_qitemdelegate.cpp2
-rw-r--r--tests/auto/qlabel/tst_qlabel.cpp8
-rw-r--r--tests/auto/qlcdnumber/tst_qlcdnumber.cpp16
-rw-r--r--tests/auto/qlineedit/tst_qlineedit.cpp16
-rw-r--r--tests/auto/qlistview/tst_qlistview.cpp27
-rw-r--r--tests/auto/qlocalsocket/tst_qlocalsocket.cpp10
-rw-r--r--tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp39
-rw-r--r--tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp18
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp479
-rw-r--r--tests/auto/qpainter/tst_qpainter.cpp63
-rw-r--r--tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp136
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp6
-rw-r--r--tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp20
-rw-r--r--tests/auto/qregexp/tst_qregexp.cpp28
-rw-r--r--tests/auto/qregion/tst_qregion.cpp20
-rw-r--r--tests/auto/qscriptengine/tst_qscriptengine.cpp2
-rw-r--r--tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp506
-rw-r--r--tests/auto/qsqlquery/tst_qsqlquery.cpp34
-rw-r--r--tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp4
-rw-r--r--tests/auto/qstatemachine/tst_qstatemachine.cpp31
-rw-r--r--tests/auto/qstringbuilder1/stringbuilder.cpp26
-rw-r--r--tests/auto/qtableview/tst_qtableview.cpp19
-rw-r--r--tests/auto/qtextdocument/tst_qtextdocument.cpp10
-rw-r--r--tests/auto/qtextdocumentfragment/tst_qtextdocumentfragment.cpp10
-rw-r--r--tests/auto/qtreeview/tst_qtreeview.cpp4
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp5
-rw-r--r--tests/auto/qwidgetaction/tst_qwidgetaction.cpp2
-rw-r--r--tests/auto/uiloader/baseline/css_itemview_task258382.ui179
-rw-r--r--tests/auto/xmlpatternsxqts/test/test.pro2
-rw-r--r--tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro2
-rw-r--r--tests/benchmarks/qanimation/rectanimation.cpp5
-rw-r--r--tests/benchmarks/qanimation/rectanimation.h1
-rw-r--r--tests/benchmarks/qapplication/main.cpp30
-rw-r--r--tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp530
-rw-r--r--tools/assistant/lib/lib.pro3
-rw-r--r--tools/assistant/lib/qhelp_global.cpp112
-rw-r--r--tools/assistant/lib/qhelp_global.h58
-rw-r--r--tools/assistant/lib/qhelpgenerator.cpp2
-rw-r--r--tools/assistant/lib/qhelpsearchengine.cpp18
-rw-r--r--tools/assistant/lib/qhelpsearchengine.h3
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader.cpp2
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_p.h2
-rw-r--r--tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp4
-rw-r--r--tools/assistant/lib/qhelpsearchindexwriter_default.cpp2
-rw-r--r--tools/assistant/lib/qhelpsearchresultwidget.cpp10
-rw-r--r--tools/assistant/tools/assistant/assistant.pro2
-rw-r--r--tools/assistant/tools/assistant/helpviewer.cpp32
-rw-r--r--tools/assistant/tools/assistant/main.cpp10
-rw-r--r--tools/assistant/tools/assistant/searchwidget.cpp3
-rw-r--r--tools/configure/configureapp.cpp22
-rw-r--r--tools/designer/src/designer/qdesigner_formwindow.cpp2
-rw-r--r--tools/linguist/lrelease/main.cpp83
-rw-r--r--tools/linguist/lupdate/cpp.cpp76
-rw-r--r--tools/linguist/shared/qm.cpp35
-rw-r--r--tools/linguist/shared/translator.h1
-rw-r--r--tools/makeqpf/mainwindow.cpp2
-rw-r--r--tools/makeqpf/qpf2.cpp4
-rw-r--r--tools/qtestlib/wince/cetest/main.cpp36
-rw-r--r--tools/qvfb/qvfbview.cpp6
-rw-r--r--tools/xmlpatterns/xmlpatterns.pro3
-rw-r--r--tools/xmlpatternsvalidator/xmlpatternsvalidator.pro2
464 files changed, 11221 insertions, 4690 deletions
diff --git a/INSTALL b/INSTALL
index 092dea00f0..b62f21da41 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,148 +1,14 @@
INSTALLING Qt Source Package Version %VERSION%.
-1. If you have the commercial edition of Qt, install your license
- file as $HOME/.qt-license if you are on Unix. If you are on
- Windows, copy the license file into your home directory
- (this may be known as the userprofile environment variable) and
- rename it to .qt-license. For example on Windows XP,
- %USERPROFILE% should be something like C:\Documents and
- Settings\username.
+For full installation instructions for each supported platform, please
+see http://qt.nokia.com/doc/%VERSION%/installation.html, the file
+doc/html/installation.html in this package, or follow one of the following
+links:
+
+Embedded Linux: http://qt.nokia.com/doc/%VERSION%/qt-embedded-install.html
+Mac OS X: http://qt.nokia.com/doc/%VERSION%/install-mac.html
+Windows: http://qt.nokia.com/doc/%VERSION%/install-win.html
+Windows CE: http://qt.nokia.com/doc/%VERSION%/install-wince.html
+X11 Platforms: http://qt.nokia.com/doc/%VERSION%/install-x11.html
+Symbian Platform: http://qt.nokia.com/doc/%VERSION%/install-symbian.html
- For the open source version you do not need a license file.
-
-2. Unpack the archive if you have not done so already:
-
- On Unix (X11 and Mac):
- cd /tmp
- gunzip %DISTNAME%.tar.gz # uncompress the archive
- tar xvf %DISTNAME%.tar # unpack it
-
- This creates the directory /tmp/%DISTNAME% containing the files
- from the archive. We only support the GNU version of the tar
- archiving utility. Note that on some systems it is called gtar.
-
- On Windows, uncompress the files into the directory you want Qt
- installed, e.g. C:\Qt\%VERSION%.
-
- NOTE: The install path must not contain any spaces.
-
-4. Environment variables
-
- In order to build and use Qt, the PATH environment variable needs
- to be extended to locate qmake, moc and other Qt tools
-
- On Windows, this is done by adding C:\Qt\%VERSION%\bin
- to the PATH variable. On Unix, this is done by adding
- /tmp/%DISTNAME%.
-
- For newer versions of Windows, PATH can be extended through
- "Control Panel->System->Advanced->Environment variables" and for
- older versions by editing C:\autoexec.bat.
-
- In .profile (if your Unix shell is bash), add the following lines:
-
- PATH=/usr/local/Trolltech/Qt-%VERSION%/bin:$PATH
- export PATH
-
- In .login (in case your Unix shell is csh or tcsh), add the following line:
-
- setenv PATH /usr/local/Trolltech/Qt-%VERSION%/bin:$PATH
-
- If you use a different Unix shell, please modify your environment
- variables accordingly.
-
- For some X11 compilers that do not support rpath you must also
- extended the LD_LIBRARY_PATH environment variable to include
- /usr/local/Trolltech/Qt-%VERSION%/lib. On Linux or Mac with GCC
- this step is not needed.
-
-4. Building
-
-4.1 Building on Unix
-
- To configure the Qt library for your machine type, run the
- ./configure script in the package directory.
-
- By default, Qt is configured for installation in the
- /usr/local/Trolltech/Qt-%VERSION% directory, but this can be
- changed by using the -prefix option.
-
- cd /tmp/%DISTNAME%
- ./configure
-
- Type "./configure -help" to get a list of all available options.
-
- To create the library and compile all the demos, examples, tools,
- and tutorials, type:
-
- make
-
- If you did not configure Qt using the -prefix-install option,
- you need to install the library, demos, examples, tools, and
- tutorials in the appropriate place. To do this, type:
-
- su -c "make install"
-
- and enter the root password. On some systems, you have to use the
- sudo command as follows:
-
- sudo make install
-
- and enter your password, this requires that you have administrator access
- to your machine.
-
- Note that on some systems the make utility is named differently,
- e.g. gmake. The configure script tells you which make utility to
- use.
-
- If you need to reconfigure and rebuild Qt from the same location,
- ensure that all traces of the previous configuration are removed
- by entering the build directory and typing
-
- make confclean
-
- before running the configure script again.
-
-4.2 Building on Windows
-
- To configure the Qt library for your machine type:
-
- C:
- cd \Qt\%VERSION%
- configure
-
- Type "configure -help" to get a list of all available options.
-
- If you are using the "-direct3d" option, make sure that you have
- the Direct3D SDK installed, and that you have run the
- %DXSDK_DIR%\Utilities\Bin\dx_setenv.cmd command, before attempting
- to run configure.
-
- The actual commands needed to build Qt depends on your development
- system. For Microsoft Visual Studio to create the library and
- compile all the demos, examples, tools and tutorials type:
-
- nmake
-
- If you need to reconfigure and rebuild Qt from the same location,
- ensure that all traces of the previous configuration are removed
- by entering the build directory and typing
-
- nmake confclean
-
- before running the configure script again.
-
-5. That's all. Qt is now installed.
-
- If you are new to Qt, we suggest that you take a look at the demos
- and examples to see Qt in action. Run the Qt Examples and Demos
- either by typing 'qtdemo' on the command line or through the
- desktop's Start menu.
-
- You might also want to try the following links:
-
- http://qt.nokia.com/doc/%VERSION%/how-to-learn-qt.html
- http://qt.nokia.com/doc/%VERSION%/tutorial.html
- http://qt.nokia.com/developer
-
- We hope you will enjoy using Qt. Good luck!
diff --git a/README.s60 b/README.s60
deleted file mode 100644
index 2137135d03..0000000000
--- a/README.s60
+++ /dev/null
@@ -1,184 +0,0 @@
-This is Qt version %VERSION%.
-
-Qt is a comprehensive cross-platform C++ application framework. With
-this pre-release you can make advanced graphical applications and
-utilize TCP/IP connections. More specifically, these modules are now
-available for S60:
-
-QtCore - http://doc.trolltech.com/4.6-snapshot/qtcore.html
-QtGui - http://doc.trolltech.com/4.6-snapshot/qtgui.html
-QtNetwork - http://doc.trolltech.com/4.6-snapshot/qtnetwork.html
-QtScript - http://doc.trolltech.com/4.6-snapshot/qtscript.html
-QtSql - http://doc.trolltech.com/4.6-snapshot/qtsql.html
-QtSvg - http://doc.trolltech.com/4.6-snapshot/qtsvg.html
-QtTest - http://doc.trolltech.com/4.6-snapshot/qttest.html
-QtWebKit - http://doc.trolltech.com/4.6-snapshot/qtwebkit.html
-QtXml - http://doc.trolltech.com/4.6-snapshot/qtxml.html
-Phonon - http://doc.trolltech.com/4.6-snapshot/phonon-module.html
-
-INSTALLING Qt
-
-Follow the instructions in the INSTALL file.
-
-REFERENCE DOCUMENTATION
-
-The Qt reference documentation is available locally in Qt's doc/html
-directory or at http://doc.trolltech.com/4.6-snapshot/index.html
-
-SUPPORTED PLATFORMS
-
-For this release, the following platforms have been tested:
-
- S60 3.1, 3.2 and 5.0
-
-with these compilers:
-
- WINSCW (Emulator, X86)
- RVCT (Hardware, ARM)
- GCCE (Hardware, ARM)*
-
-The current version of GCCE cannot compile the Qt libraries
-themselves as it has issues with global static data in DLLs.
-However, we supply precompiled Qt libraries compiled with RVCT
-that can be used instead. This makes it possible to write and
-compile Qt applications using GCCE by linking to these
-precompiled binaries. For more information on this issue see:
-http://www3.symbian.com/faq.nsf/0/B8542F039C193CCC802573DA0011DFA7
-
-HOW TO REPORT A BUG
-
-We have set up a special mailinglist for feedback on the S60 port.
-Bug-reports, feedback or questions all go to this list.
-Please go to http://pepper.troll.no/s60prereleases/
-for details on how to subscribe to the list.
-
-Before posting, please consult the FAQ and the list of known issues:
-http://labs.trolltech.com/page/QtforS60FAQ
-http://labs.trolltech.com/page/QtforS60KnownIssues
-
-Always include the following information in your bug report: the name
-and version number of your compiler; the name and version number of
-your operating system; the version of Qt you are using, and what
-configure options it was compiled with.
-
-If the problem you are reporting is only visible at run-time, try to
-create a small test program that shows the problem when run. Often,
-such a program can be created with some minor changes to one of the
-many example programs in Qt's examples directory.
-
-
- INSTALLING Qt for S60 Version %VERSION%
-
-1. Install needed IDE and SDKs
-
- Make sure you have the following installed:
-
- - Carbide.c++ v2.0.0 or higher:
- http://www.forum.nokia.com/main/resources/tools_and_sdks/carbide_cpp/
-
- Note: It may be necessary to update the Carbide compiler.
- See http://pepper.troll.no/s60prereleases/patches/ for instructions
- how to check your compiler version and how to patch it, if needed.
-
- - S60 Platform SDK 3rd Edition FP1 or higher:
- http://www.forum.nokia.com/main/resources/tools_and_sdks/S60SDK/
-
- - Open C/C++ v1.6.0 or higher. Install this to all S60 SDKs you plan to use Qt with:
- http://www.forum.nokia.com/main/resources/technologies/openc_cpp/
-
- - Building Qt tools requires a windows compiler, e.g. MinGW 3.4.5 or higher.
- http://www.mingw.org/
-
- - Building Qt libraries for real device requires RVCT 2.2 [build 686] or later:
- http://www.arm.com/products/DevTools/RVCT.html
-
- Make sure you have the following packages installed on any device you want to use to
- run Qt applications. These packages can be found under nokia_plugin directory in any
- S60 SDK where you have installed Open C/C++:
-
- - nokia_plugin\openc\s60opencsis\pips_s60_<version>.sis
- - nokia_plugin\openc\s60opencsis\openc_ssl_s60_<version>.sis
- - nokia_plugin\opencpp\s60opencppsis\stdcpp_s60_<version>.sis
-
- These instructions assume the above tools are installed and
- that the enviroment variables for your compiler are set correctly.
-
- Note: Users of S60 Platform SDK 3rd Edition FP1 also need special updates:
- http://pepper.troll.no/s60prereleases/patches/
-
-2. Install Qt
-
- Uncompress the package into the directory you want Qt installed,
- e.g. C:\Qt\%VERSION%.
-
- Note: Qt must be installed on the same drive as the S60 SDK you are
- using, and the install path must not contain any whitespaces.
-
-3. Environment variables
-
- In order to build and use Qt, the PATH environment variable needs
- to be extended:
-
- PATH - to locate qmake, moc and other Qt tools
-
- This is done by adding c:\Qt\%VERSION%\bin to the PATH variable.
-
- On Windows the PATH can be extended by navigating to
- "Control Panel->System->Advanced->Environment variables".
-
- In addition, you must configure the environment for use with the S60
- emulator. This is done by locating the Carbide.c++ submenu on the Start
- menu, and choosing "Configure environment for WINSCW command line".
-
-4. Configure Qt
-
- To configure Qt for S60, do:
-
- cd \Qt\%VERSION%
- configure -platform win32-g++ -xplatform symbian-abld
-
- For other options, type "configure -help" to get a list of all available
- options.
-
-5. Build Qt
-
- To build Qt for the emulator, type:
-
- make debug-winscw
-
- To build Qt for the device, type:
-
- make release-armv5
-
- Congratulations, Qt is now ready to use.
-
-6. Running Qt demos
-
- We've included a subset of the Qt demos in this package for you to try out.
- An excellent starting point is the "fluidlauncher" demo. To run the demo on
- a real device, you first have to install the Qt libraries on the device:
-
- cd src\s60installs
- createpackage -i Qt_for_S60_template.pkg release-armv5 <certificate file> <certificate key file>
-
- Note: You will need to supply certificate that allows installation of
- binaries with "All -Tcb" capability to your device.
-
- Similarly, install fluidlauncher to the device:
-
- cd embedded\fluidlauncher
- createpackage -i fluidlauncher_template.pkg release-armv5
-
- This will create a self-signed fluidlauncher_release-armv5.sis and install it to your device.
-
- To run the demos on the emulator simply navigate to the directory of the demo and run:
-
- make run
-
- Or, if you need to supply arguments to the program, navigate to
- %EPOCROOT%\Epoc32\release\winscw\udeb\ and start any of the Qt demos located there,
- for example:
-
- wiggly.exe -small-screen
-
- We hope you will enjoy using Qt.
diff --git a/README.wince b/README.wince
deleted file mode 100644
index 27dfd60354..0000000000
--- a/README.wince
+++ /dev/null
@@ -1,44 +0,0 @@
- Signing on Windows CE.
-
-Windows CE provides a security mechanism to ask the user to confirm
-that he wants to use an application/library, which is unknown to the
-system. This process gets repeated for each dependency of an
-application, meaning each library the application links to, which is
-not recognized yet.
-
-To simplify this process you can use signatures and certificates. A
-certificate gets installed on the device and each file which is
-signed with the according certificate can be launched without the
-security warning.
-
-In case you want to use signatures for your project written in Qt,
-configure provides the -signature option. You need to specify the
-location of the .pfx file and qmake adds the signing step to the
-build rules.
-
-If you need to select a separate signature for a specific project,
-or you only want to sign this single project, you can use the
-"SIGNATURE_FILE = foo.pfx" rule inside the project file.
-
-The above decribed rules apply for command line makefiles as well as
-Visual Studio projects generated by qmake.
-
-Microsoft usually ships development signatures inside the SDK packages.
-You can find them in the Tools subdirectory of the SDK root folder.
-
-Example:
-
-1. calling configure with signing enabled:
-configure.exe -platform win32-msvc2005 -xplatform wincewm50pocket-msvc2005
--signature C:\some\path\SDKSamplePrivDeveloper.pfx
-
-2. using pro file to specify signature
-[inside .pro file]
-...
-TARGET = foo
-
-wince*: {
- SIGNATURE_FILE = somepath\customSignature.pfx
-}
-...
-
diff --git a/config.tests/x11/xsync/xsync.cpp b/config.tests/x11/xsync/xsync.cpp
index a7175deb76..ed3ecf5177 100644
--- a/config.tests/x11/xsync/xsync.cpp
+++ b/config.tests/x11/xsync/xsync.cpp
@@ -48,5 +48,7 @@ int main(int, char **)
XSyncValue value;
(void*)&XSyncIntToValue;
(void*)&XSyncCreateCounter;
- return 0;
+ int a, b;
+ Status ret = XSyncInitialize(NULL, &a, &b);
+ return ret;
}
diff --git a/configure b/configure
index 611f4bfad2..b6ce9e6e21 100755
--- a/configure
+++ b/configure
@@ -362,7 +362,7 @@ elif [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes"
elif [ $COMMERCIAL_USER = "yes" ]; then
# one of commercial editions
[ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
- [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=yes
+ [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=no
# read in the license file
if [ -f "$LICENSE_FILE" ]; then
@@ -914,7 +914,7 @@ while [ "$#" -gt 0 ]; do
VAL=no
;;
#Qt style yes options
- -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config)
+ -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
VAL=yes
;;
@@ -3022,6 +3022,18 @@ else
CFG_FRAMEWORK=no
fi
+# Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
+# with the default mkspec. The 10.4u SDK does not support gcc 4.2.
+if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
+ # get the darwin version. 10.0.0 and up means snow leopard.
+ VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
+ if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
+ echo
+ echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
+ echo
+ fi
+fi
+
# x11 tests are done after qmake is built
@@ -4183,9 +4195,10 @@ elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
fi
if [ -n "$EVALKEY" ]; then
+ rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
/* Evaluation license key */
-static const char qt_eval_key_data [512 + 12] = "qt_qevalkey=$EVALKEY";
+static const char qt_eval_key_data [512 + 12] = "$EVALKEY";
EOF
chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
fi
diff --git a/configure.exe b/configure.exe
index 13d0673fd4..7fe4a93e9f 100755
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/demos/boxes/scene.cpp b/demos/boxes/scene.cpp
index a06e8a1015..06dc0f9aab 100644
--- a/demos/boxes/scene.cpp
+++ b/demos/boxes/scene.cpp
@@ -552,14 +552,15 @@ void Scene::initGL()
{
m_box = new GLRoundedBox(0.25f, 1.0f, 10);
- m_vertexShader = new QGLShader(":/res/boxes/basic.vsh", QGLShader::VertexShader);
+ m_vertexShader = new QGLShader(QGLShader::Vertex);
+ m_vertexShader->compileSourceFile(QLatin1String(":/res/boxes/basic.vsh"));
QStringList list;
list << ":/res/boxes/cubemap_posx.jpg" << ":/res/boxes/cubemap_negx.jpg" << ":/res/boxes/cubemap_posy.jpg"
<< ":/res/boxes/cubemap_negy.jpg" << ":/res/boxes/cubemap_posz.jpg" << ":/res/boxes/cubemap_negz.jpg";
m_environment = new GLTextureCube(list, qMin(1024, m_maxTextureSize));
- m_environmentShader = new QGLShader(QGLShader::FragmentShader);
- m_environmentShader->compile(environmentShaderText);
+ m_environmentShader = new QGLShader(QGLShader::Fragment);
+ m_environmentShader->compileSourceCode(environmentShaderText);
m_environmentProgram = new QGLShaderProgram;
m_environmentProgram->addShader(m_vertexShader);
m_environmentProgram->addShader(m_environmentShader);
@@ -616,7 +617,8 @@ void Scene::initGL()
files = QDir(":/res/boxes/").entryInfoList(filter, QDir::Files | QDir::Readable);
foreach (QFileInfo file, files) {
QGLShaderProgram *program = new QGLShaderProgram;
- QGLShader* shader = new QGLShader(file.absoluteFilePath(), QGLShader::FragmentShader);
+ QGLShader* shader = new QGLShader(QGLShader::Fragment);
+ shader->compileSourceFile(file.absoluteFilePath());
// The program does not take ownership over the shaders, so store them in a vector so they can be deleted afterwards.
program->addShader(m_vertexShader);
program->addShader(shader);
@@ -638,9 +640,9 @@ void Scene::initGL()
m_programs << program;
m_renderOptions->addShader(file.baseName());
- program->enable();
+ program->bind();
m_cubemaps << ((program->uniformLocation("env") != -1) ? new GLRenderTargetCube(qMin(256, m_maxTextureSize)) : 0);
- program->disable();
+ program->release();
}
if (m_programs.size() == 0)
@@ -697,12 +699,12 @@ void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox)
// Don't render the environment if the environment texture can't be set for the correct sampler.
if (glActiveTexture) {
m_environment->bind();
- m_environmentProgram->enable();
+ m_environmentProgram->bind();
m_environmentProgram->setUniformValue("tex", GLint(0));
m_environmentProgram->setUniformValue("env", GLint(1));
m_environmentProgram->setUniformValue("noise", GLint(2));
m_box->draw();
- m_environmentProgram->disable();
+ m_environmentProgram->release();
m_environment->unbind();
}
@@ -730,14 +732,14 @@ void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox)
else
m_environment->bind();
}
- m_programs[i]->enable();
+ m_programs[i]->bind();
m_programs[i]->setUniformValue("tex", GLint(0));
m_programs[i]->setUniformValue("env", GLint(1));
m_programs[i]->setUniformValue("noise", GLint(2));
m_programs[i]->setUniformValue("view", view);
m_programs[i]->setUniformValue("invView", invView);
m_box->draw();
- m_programs[i]->disable();
+ m_programs[i]->release();
if (glActiveTexture) {
if (m_dynamicCubemap && m_cubemaps[i])
@@ -760,14 +762,14 @@ void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox)
m_environment->bind();
}
- m_programs[m_currentShader]->enable();
+ m_programs[m_currentShader]->bind();
m_programs[m_currentShader]->setUniformValue("tex", GLint(0));
m_programs[m_currentShader]->setUniformValue("env", GLint(1));
m_programs[m_currentShader]->setUniformValue("noise", GLint(2));
m_programs[m_currentShader]->setUniformValue("view", view);
m_programs[m_currentShader]->setUniformValue("invView", invView);
m_box->draw();
- m_programs[m_currentShader]->disable();
+ m_programs[m_currentShader]->release();
if (glActiveTexture) {
if (m_dynamicCubemap)
@@ -1046,9 +1048,9 @@ void Scene::setColorParameter(const QString &name, QRgb color)
{
// set the color in all programs
foreach (QGLShaderProgram *program, m_programs) {
- program->enable();
+ program->bind();
program->setUniformValue(program->uniformLocation(name), QColor(color));
- program->disable();
+ program->release();
}
}
@@ -1056,9 +1058,9 @@ void Scene::setFloatParameter(const QString &name, float value)
{
// set the color in all programs
foreach (QGLShaderProgram *program, m_programs) {
- program->enable();
+ program->bind();
program->setUniformValue(program->uniformLocation(name), value);
- program->disable();
+ program->release();
}
}
diff --git a/demos/composition/composition.cpp b/demos/composition/composition.cpp
index 24e91877ea..1025d3c48f 100644
--- a/demos/composition/composition.cpp
+++ b/demos/composition/composition.cpp
@@ -457,7 +457,7 @@ void CompositionRenderer::paint(QPainter *painter)
#ifdef Q_WS_QWS
m_buffer = m_base_buffer;
#else
- memcpy(m_buffer.bits(), m_base_buffer.bits(), m_buffer.numBytes());
+ memcpy(m_buffer.bits(), m_base_buffer.bits(), m_buffer.byteCount());
#endif
{
diff --git a/demos/qmediaplayer/mediaplayer.h b/demos/qmediaplayer/mediaplayer.h
index 83f14e8782..08db0e5de6 100644
--- a/demos/qmediaplayer/mediaplayer.h
+++ b/demos/qmediaplayer/mediaplayer.h
@@ -93,7 +93,6 @@ public slots:
void playPause();
void scaleChanged(QAction *);
void aspectChanged(QAction *);
- void hasVideoChanged(bool);
private slots:
void setAspect(int);
@@ -109,6 +108,7 @@ private slots:
void bufferStatus(int percent);
void openUrl();
void configureEffect();
+ void hasVideoChanged(bool);
private:
QIcon playIcon;
diff --git a/demos/sub-attaq/boat.cpp b/demos/sub-attaq/boat.cpp
index cb40329788..0ad31b1246 100644
--- a/demos/sub-attaq/boat.cpp
+++ b/demos/sub-attaq/boat.cpp
@@ -68,7 +68,7 @@ static QAbstractAnimation *setupDestroyAnimation(Boat *boat)
QPropertyAnimation *anim = new QPropertyAnimation(step, "opacity");
anim->setEndValue(1);
anim->setDuration(100);
- group->insertAnimationAt(i-1, anim);
+ group->insertAnimation(i-1, anim);
//and then fade-out
QPropertyAnimation *anim2 = new QPropertyAnimation(step, "opacity");
diff --git a/dist/README b/dist/README
index 05475e70a9..1c52eb31fb 100644
--- a/dist/README
+++ b/dist/README
@@ -19,17 +19,22 @@ On Mac OS X, the binary package requires Mac OS X 10.4.x (Tiger) or
later and GCC 4.0.1 to develop applications. Its applications will run
on Mac OS X 10.3.9 and above.
-If you have a source package (a .tar.gz, .tar.bz2, or .zip file),
-follow the instructions in the INSTALL file.
+If you have a source package (a .tar.gz, or .zip file), follow the
+instructions in the INSTALL file.
DEMOS AND EXAMPLES
Once Qt is installed, we suggest that you take a look at the demos and
-examples to see Qt in action. Run the Qt Examples and Demos either by
+examples to see Qt in action.
+
+For desktop computers, run the Qt Examples and Demos either by
typing 'qtdemo' on the command line or through the desktop's Start
menu. On Mac OS X, you can find it in /Developers/Applications/Qt.
+For embedded devices, launch the Qt 'fluidlauncher' demo, either through
+the platforms filebrowser or the built in menu system.
+
REFERENCE DOCUMENTATION
@@ -43,7 +48,7 @@ documentation is available at http://qt.nokia.com/doc/.
SUPPORTED PLATFORMS
For a complete list of supported platforms, see
-http://qt.nokia.com/doc/latest/supported-platforms.html.
+http://qt.nokia.com/doc/%VERSION%/supported-platforms.html.
COMMERCIAL EDITIONS
@@ -56,16 +61,18 @@ the QtCore, QtGui (except QGraphicsView), QtTest, QtDBus and
Qt3Support modules.
For a full listing of the contents of each module, please refer to
-http://qt.nokia.com/doc/latest/modules.html
+http://qt.nokia.com/doc/%VERSION%/modules.html
HOW TO REPORT A BUG
If you think you have found a bug in Qt, we would like to hear about
-it so that we can fix it. Before reporting a bug, please check
-http://qt.nokia.com/developer/faqs/ and
-http://qt.nokia.com/products/appdev/platform/platforms/ to see if
-the issue is already known.
+it so that we can fix it. The Qt bug tracking system is open to the
+public at http://bugreports.qt.nokia.com/.
+
+Before reporting a bug, please use the bug-tracker's search functions
+and consult http://qt.nokia.com/developer/faqs/ to see if the issue is
+already known.
Always include the following information in your bug report: the name
and version number of your compiler; the name and version number of
@@ -74,11 +81,9 @@ configure options it was compiled with.
If the problem you are reporting is only visible at run-time, try to
create a small test program that shows the problem when run. Often,
-such a program can be created with some minor changes to one of the
-many example programs in Qt's examples directory. Please submit the
-bug report using the Task Tracker on the Qt website:
-
-http://qt.nokia.com/developer/task-tracker
+such a program can be created with some minor changes to one of the many
+example programs in Qt's examples directory, or to the autotests that
+are available in the public source repository on http://qt.gitorious.org/.
Qt is a trademark of Nokia Corporation and/or its subsidiary(-ies).
diff --git a/dist/changes-4.6.0 b/dist/changes-4.6.0
index 627760ac6b..f90777deb3 100644
--- a/dist/changes-4.6.0
+++ b/dist/changes-4.6.0
@@ -23,6 +23,21 @@ information about a particular change.
* The minimum required version of the D-Bus reference library is
now 0.93.
+ - [MR#1742] Added new multimedia keys to the Qt::Key enum.
+
+ - QMatrix4x4, QGenericMatrix, QVector2D, QVector3D, QVector4D, QQuaternion
+ * New classes to support 3D applications.
+
+ - QGLShaderProgram, QGLShader
+ * New classes for using shader programs written in the GL Shading Language.
+
+ - Boxes demo ported to use new 3D math and shader program classes.
+
+ - OpenVG graphics system added.
+
+ - Add 800x480 screen mode to qvfb configuration dialog.
+
+ - Improved support for input methods in graphics view.
Third party components
----------------------
@@ -39,14 +54,26 @@ Third party components
* Since the 4.6 beta Qt::RenderHint has been moved to
QGraphicsBlurEffect::BlurHint.
+ * Input contexts are not activated for disabled widgets anymore.
+
+ * [250555] Data copied from Mozilla Firefox can now be pasted correctly to
+ a Qt application.
+
QtCore
+ - QByteArray
+ * New overloads for QByteArray::insert() and QByteArray::prepend()
+
+ - QObject
+ * [259514] fixed a possible dead-lock in the destructor
+
- QVariant
* Many optimisations
* Added QVariant::toFloat() and QVariant::toReal()
* Added QVariant(float) constructor
* qvariant_cast<QVariant> and qVariantFromValue<QVariant> are now
identify functions
+ * Added support for math3d types.
- Qt::escape
* now escape the double quote (&quot;)
@@ -62,14 +89,106 @@ QtCore
* Added the possibility to pass the flag Qt::UniqueConnection to QObject::connect
* Fixed race conditions that occured when moving object to threads while connecting
+ - QPluginLoader
+ * Improved performance of plugin loading by reusing the plugin cache instead of loading
+ it every time.
+
- QTextStream
* [221316] Fixed crash on large input.
+ * Improved reading utf8/utf16/utf32 data by correctly skipping the
+ ByteOrderMark when reading data by one character at a time.
+
+- QXmlStreamWriter
+ * [256468] fix comment indentation
QtGui
+- QGraphicsAnchorLayout
+ * Support for expanding size policy has been removed. (The Qt 4.6 Beta had support for it).
+
+ - QCompleter
+ * [246056] Fixed a possible assertion when setting the completer prefix
+
+ - QFontDialog
+ * [256466] fixed the dialog not always returning the selected style.
+
+ - QGraphicsItem
+ * Fixed bug and improved accuracy of QGraphicsItem::childrenBoundingRect().
+ * Many optimizations.
+ * Introduced QGraphicsItem::ItemHasNoContents
+ * Introduced QGraphicsItem::ItemSendsGeometryChanges (see Behavioral Changes)
+ * Introduced QGraphicsItem::focusProxy(), focus proxy support
+ * Introduced QGraphicsItem::ItemNegativeZStacksBehindParent
+ * Introduced QGraphicsItem::ItemIsPanel, light-weight window support
+ * Introduced activation support.
+ * Introduced QGraphicsItem::stackBefore()
+ * Cached items are now always invalidated when update() is called.
+ * Added input hints.
+
+- QGraphicsLayout
+ * Introduced QGraphicsLayout::addChildLayoutItem()
+
+ - QGraphicsObject
+ * New class; inherits QGraphicsItem and adds notification signals and property declarations.
+
+ - QGraphicsProxyWidget
+ * [251407] Fixed window flag handling. Now QGraphicsProxyWidget's flags win.
+ * Fix Qt::ClickFocus policy
+
+ - QGraphicsScene
+ * [245317] Fixes to mouse grabbing behavior.
+ * Fixed delivery of double-click events after explicit grab and then ungrab.
+ * Rewrote the internal rendering to use a recursive instead of an iterative approach.
+ * Many optimizations.
+ * Ensure hover enter events are delivered when an item is pressed.
+ * Introduced activation support.
+ * Fixed bugs in initial focus support.
+
+ - QGraphicsTextItem
+ * Now inherits from QGraphicsObject instead
+
+ - QGraphicsTransform
+ * New class; eases animation of transformations for QGraphicsItem.
+
+ - QGraphicsView
+ * Fix mapToScene(QRect) to avoid extra unnecessary adjustments.
+ * Many optimizations.
+ * Introduced QGraphicsView::isTransformed()
+ * [QTBUG-4151] Items with parent that sets ItemClipsChildrenToShape were sometimes invisible.
+
+ - QGraphicsWidget
+ * Now inherits from QGraphicsObject instead
+ * Interactive resizing of top level windows now respects height-for-width constraints.
+ * Reduced memory footprint.
+
+ - QHeaderView
+ * [208320] Make sure the sort indicator s taken into account for the size hint
+ * [255574] Make sure the sizehint for the section depend on visible sections
+
+ - QMainWindow
+ * [226060] Adding actions to a toolbar would always make the next toolbar move
+
+ - QMenuBar
+ * [260873] Fix mouse interaction while undocking a widget from the main window
+ * dock areas don't get a splitter if their dock widgets are not resizable
+
+ - QColumnView
+ * [246999] Fixed view not updating when the model is changed dynamically
+
+ - QLineEdit
+ * [248948] Clear selection when redoing a delete operation.
+
+ - QListView
+ * [243335] Fixed the visualRect to return correct values when the widget is not yet show
- QTreeView
* [234930] Be able to use :has-children and :has-sibillings in a stylesheet
* [252616] Set QStyleOptionViewItemV4::OnlyOne flag when painting spanning columns
+ * [245654] Fixed expandAll when deleting and recreating a mode for the tree
+ * [239271] Fixed missing update when adding a row when the first column is hidden
+ * [258225] Fixed scrollTo with center and bottom
+
+ - QTreeWidget
+ * [253109] Shows the widget when calling setItemWidget
- QTableView
* [191545] Selections work more similarly to well-known spreadsheets
@@ -78,6 +197,9 @@ QtGui
speed-up, support for rows/columns insertion/removal, and better keyboard
navigation
+ - QTableWidget
+ * [234641] Fixed takeItem to cause the view to be updated.
+
- QTabBar
* [196326] Fixed having a stylesheet on a QTabBar resulted in some tab names
to be slightly clipped.
@@ -86,12 +208,22 @@ QtGui
- QComboBox
* [220195] Fixed keyboard search when current index is -1
+ - QPixmap
+ * Optimized width(), height(), isNull() and depth().
+
+ - QRegion
+ * Minor optimizations.
+
- QSpinBox
* [259226] Fixed setting a stylesheet on a QSpinBox to change the arrow possition
+ * [255051] Fixed sizeHint update bug.
- QStandardItemModel
* [255652] Fixed crash while using takeRow with a QSortFilterProxyModel
+ - QToolTip
+ * Fixed a bug where tooltips were not shown in popups. (Windows only).
+
- QGraphicsItem
* Added a new set of properties to set a transformation on a item
@@ -106,7 +238,94 @@ QtGui
- QWidget
* [201649] Added QWidget::previousInFocusChain
+ * [254563] Fixed a crash when setting a focus in a widget tree that
+ contains invisible widgets
+
+ - QFontEngineQPF
+ * Make alphaMapForGlyph() generate the correct color table for
+ Indexed8 and Mono glyph images. Fixed the "all glyphs are white
+ boxes" problem in OpenGL1 paint engine.
+
+ - QPaintDevice
+ * New qt_paint_device_metric() function to replace the friend
+ declarations for window surface classes that need to access metric().
+
+ - QPushButton
+ * [255581] Fixed sizeHint recalculation bug.
+
+ - QApplication
+ * [QTBUG-739] Removed internal widgets from QApplication::topLevelWidgets().
+
+QtNetwork
+
+ - QAbstractSocket
+ * only disconnect from host when all bytes have been written
+ * New setSocketOption method.
+
+ - QHttp
+ * Do not buffer the complete POST data anymore when HTTPS is used.
+ * QHttp is now obsolete and replaced by QNetworkAccessManager.
+
+ - QLocalServer
+ * fix timeout when waiting for a connection on Unix
+
+ - QNativeSocketEngine
+ * Do not set the OS socket send and receive buffer size. The OS
+ should auto tune these values for us.
+
+ - QNetworkAcessManager
+ * [242916] add possibility to send HTTP DELETE requests
+ * Connection count per HTTP server increased to 6 on Desktop, 3 on Symbian.
+ * Optional HTTP pipelining support.
+ * General HTTP performance improvements.
+ - QNetworkReply
+ * [257322] add possibility to ignore specific SSL errors
+ * New isFinished() method.
+
+ - QSslCertificate
+ * [251830] fix version() and serialNumber() methods
+
+ - QSslSocket
+ * [257322] add possibility to ignore specific SSL errors
+ * Fix build with openssl 1.0.0 betas
+ * Trigger a SSL transmission when reading from the socket. In certain
+ cases the connection stalled when a buffer limit was used.
+
+QtOpenGL
+
+ - QGLFormat
+ * Increase unit test coverage and fix some long-standing issues.
+ * Improve performance of code that tests QGLFormat options.
+ * operator==() now tests for equality on all fields.
+
+ - QGLColormap
+ * setEntry() was inserting entries instead of replacing them.
+ * Clarified documentation for isEmpty().
+
+ - QGLFramebufferObject
+ * Add support for the ARB_framebuffer_object, OES_framebuffer_object,
+ and OES_packed_depth_stencil extensions.
+ * Unbind the texture after it is initialized.
+ * Don't destroy the texture target on cleanup if one wasn't created.
+
+ - QGLFramebufferObjectFormat
+ * New class for controlling fbo options.
+
+ - Improvements to context sharing and object cleanup logic.
+
+ - QGLContext
+ * Fix RGB565 mode in bindTexture().
+ * Map mipmaps work on OpenGL/ES 2.0 systems in bindTexture().
+ * Improve performance of QGLContext::currentContext().
+
+ - QGLGradientCache
+ * [249919] Clean up the gradient cache in the right context.
+
+QtXml
+
+- QDomDocument
+ * set the codec to UTF-8 if codec not present or unknown
****************************************************************************
* Platform Specific Changes *
@@ -115,6 +334,29 @@ QtGui
- Added community supported Qt ports for QNX and VxWorks. See platform
notes in the Qt documentation for details.
+Qt for Linux/X11
+----------------
+
+ - KDE Integration: Improved the integration into KDE desktop (loading of KDE
+ palette, usage of KColorDialog and KFileDialog) using the GuiPlatformPlugin
+
+ - Fixed pasting the clipboard content to non-Qt application on X11 when the
+ requested format is image/ppm. Patch by Ritt.K
+
+ - On X11 Qt now supports the _NET_WM_SYNC protocol.
+
+ - On X11 Qt now supports the SAVE_TARGET protocol that allows to keep
+ clipboard contents if the application that owns the clipboards exits
+
+ - [QTBUG-4652] On X11 clipboard content can be properly retrieved even when an
+ application asks the unsupported target. This fixes copying and pasting data
+ when using Synergy.
+ - [MR#797] Fixed a crash when using QX11EmbedContainer/Widget on x86_64.
+ - [MR#1111] Emit workAreaResized when _NET_WORKAREA is changed on X11.
+
+Qt for Windows
+--------------
+
- Significant external contribution from Milan Burda for planned removal
of (non-unicode) Windows 9x/ME support.
@@ -125,21 +367,98 @@ QtGui
QRegion. The native handle is for reading out only. Any GDI calls
made on the HRGN handle will not affect the QRegion.
- - [259221] QFileInfo::symLinkTarget() now supports NTFS symbolic links
- thanks to Konstantin Ritt (merge request 1217).
-
- The reading code of QLocalSocket on Windows has been rewritten to improve
reading performance.
- - On Windows CE the link time code geration has been disabled by default to
- be consistent with win32-msvc200x.
-
- - Added QMAKE_LIBS_OPENGL_ES1, QMAKE_LIBS_OPENGL_ES1CL and
- QMAKE_LIBS_OPENGL_ES2 qmake variables for specifying OpenGL ES
- specific libraries.
+ - On Windows when a file cannot be accessed (stat()ed), we are now restoring
+ the error mode to the original value.
- - KDE Integration: Improved the integration into KDE desktop (loading of KDE
- palette, usage of KColorDialog and KFileDialog) using the GuiPlatformPlugin
+ - [259221] QFileInfo::symLinkTarget() now supports NTFS symbolic links
+ thanks to Konstantin Ritt (merge request 1217).
+ - [251554] Fixed openUrl("mailto:") with Thunderbird on Windows.
+ - [254501] QDestopServices now supports cyrillic file names.
+ - Fixed an issue which prevents moving fixed size windows using titlebar.
+ - [258087] Fixed an issue on Vista which returns incorrect file paths when using
+ QFileDialog::getOpenFileNames()
+ - [253763] Fixed a focus issue when using out-of-process ActiveQt controls.
+ - [255912] Mouse move events will not be delivered to a blocked widget.
+ - [225588] Enabled IME reconversion support.
+
+ - Phonon on Windows
+ * Now much more reliable when reading a file through a QIODevice.
+ * If Video Mixing Renderer 9 is not available, falls back to software
+ rendering.
+ * Fixed a flicker issue when switching source with a transition time of 0
+
+Qt for Mac OS X
+---------------
+
+ - Add support for GetURL events on Mac OS X
+ - [123740] Fixed an issue with dead keys on Mac (cocoa) on French keyboard layout.
+ - [252088] Drag Leave events will be delivered correctly on Cocoa.
+ - [257661] Cocoa now uses the correct line ending for clipboard plain text.
+ - [258438] Enabled Emacs style keyboard shortcuts.
+ - [258173] Fixed an issue which caused "whatsthis" pointer to flicked on Cocoa.
+ - [QTBUG-4418] Fixed maximizing and restoring a window on Mac.
+
+General changes on Mac OS X:
+ - Mac OS X version support: Support for 10.3(Panther) has been dropped, support for
+ 10.6(Snow Leopard) has been added.
+ - The Cocoa port now supports static linking.
+ - The Cocoa port now supports the Qt3Support library (with the exception of Q3FileDialog)
+ to ease the transition from Carbon to Cocoa.
+ - The Cocoa binary packages are now Intel only (universal i386 and x86_64).
+ - Snow Leopard notes:
+ - Gcc 4.2 is used by default. Configure with -platform macx-g++40 to select 4.0.
+ - Using the 10.4u SDK requires gcc 4.0.
+ - Configuring for the Cocoa port (-cocoa) produces 64-bit binaries by default.
+ Use the -arch flags to override.
+ - Building for ppc64 is no longer supported by the gcc tool chain.
+ - Building for ppc is still supported.
+
+Qt for Embedded Linux
+---------------------
+
+- Added QMAKE_LIBS_OPENGL_ES1, QMAKE_LIBS_OPENGL_ES1CL and
+ QMAKE_LIBS_OPENGL_ES2 qmake variables for specifying OpenGL ES
+ specific libraries.
+
+- Compilation fixes for OpenGL/ES 1.0 and OpenGL/ES 1.1 Common Lite.
+
+- EGL and OpenGL/ES
+ * Protect the use of version-specific EGL symbols with #ifdef's.
+ * Make sure an EGL context is current when resolving GL extensions.
+ * Introduce "lazyDoneCurrent" for optimizing context switching in
+ paint engines.
+ * Separate EGLSurface from QEglContext so that the same context can
+ be used with multiple surfaces.
+ * Move common functions from system-specific files to qgl_egl.cpp.
+ * Fix a memory leak of EGLSurface's in QGLContext.
+ * Fix detection of pbuffers on OpenGL/ES systems.
+ * EGL_SAMPLES was being set to the wrong value for multisampled surfaces.
+
+- PowerVR
+ * Make the code better at detecting MBX vs SGX header files.
+ * Fix 32-bit screen support - some code was still assuming 16-bit.
+ * Stop GL window surfaces double-flushing their contents.
+ * Remove surface holder, which never worked all that well.
+ * Implement screen rotations.
+
+- Remove obsolete OpenGL/ES screen drivers: hybrid, ahigl.
+
+Qt for Windows CE
+-----------------
+ - On Windows CE the link time code generation has been disabled by default to
+ be consistent with win32-msvc200x.
+ - The default button size has been reduced in the Windows mobile style.
+ - [QTBUG-3613] QWizard issues have been fixed on Windows mobile.
+ - [254673] Restoring minimized widgets fixed for Windows mobile and
+ Windows CE.
+ - [255242] Seeking within large files (bigger than 0x80000000 bytes) fixed
+ on Windows CE.
+ - [257352] When configuring Qt for Windows CE, configure points the user to
+ setcepaths, when its done.
+ - [259850] Added a makespec template for Windows CE 6.
****************************************************************************
* Tools *
@@ -164,6 +483,9 @@ QtGui
- [128859] Fixed code generation of QLabel's wordWrap property.
+ - lupdate
+ - Fixed a bug in the java source code parser.
+
****************************************************************************
* DirectFB *
****************************************************************************
@@ -313,3 +635,16 @@ QtGui
QCoreApplication::organizationName() and QCoreApplication::applicationName()
if those are set. This matches the behavior on the other platforms.
+ - The Animation Framework
+ * currentTime() now returns the complete current time including previous loops
+ * currentLoopTime() returns the time inside the current loop
+ * stateChanged signal sends the new state as first parameter and old state as
+ the second
+ * QAnimationGroup::clearAnimations() has been renames to clear()
+ * QAnimationGroup::insertAnimationAt() has been renames to insertAnimation()
+ * QAnimationGroup::takeAnimationAt() has been renames to takeAnimation()
+ * QSequentialAnimationGroup::insertPauseAt() has been renames to insertPause()
+
+- Refactoring in OpenGL examples to improve portability and utilize the
+ Animation framework for animation. The hellogl and overpainting examples
+ now compile on OpenGL/ES 1.1. Also common code is factored.
diff --git a/doc/src/examples/googlesuggest.qdoc b/doc/src/examples/googlesuggest.qdoc
index bec242dec3..ab8ab57a94 100644
--- a/doc/src/examples/googlesuggest.qdoc
+++ b/doc/src/examples/googlesuggest.qdoc
@@ -43,10 +43,152 @@
\example network/googlesuggest
\title Google Suggest Example
- The Google Suggest example shows how to use the network access manager
- to get the list of suggested search terms from Google.
+ The Google Suggest example demonstrates how to use the QNetworkAccessManager
+ class to obtain a list of suggestions from the Google search engine as the
+ user types into a QLineEdit.
\image googlesuggest-example.png
- \note The Google Suggest suggestion service is a registered trademark of Google Inc.
+ The application makes use of the \c get function in
+ QNetworkAccessManager to post a request and obtain the result of the search
+ query sent to the Google search engine. The results returned are listed as
+ clickable links appearing below the search box as a drop-down menu.
+
+ The widget is built up by a QLineEdit as the search box, and a QTreeView
+ used as a popup menu below the search box.
+
+ \section1 GSuggestCompletion Class Declaration
+
+ This class implements an event filter and a number of functions to display
+ the search results and to determent when and how to perform the search.
+
+ \snippet examples/network/googlesuggest/googlesuggest.h 1
+
+ The class connects to a QLineEdit and uses a QTreeWidget to display the
+ results. A QTimer controls the start of the network requests that are
+ executed using a QNetworkAccessManager.
+
+ \section1 GSuggestCompletion Class Implementation
+
+ We start by defining a constant containing the URL to be used in the Google
+ queries. This is the basis for the query. The letters typed into the search
+ box will be added to the query to perform the search itself.
+
+ \snippet examples/network/googlesuggest/googlesuggest.cpp 1
+
+ In the constructor, we set the parent of this GSuggestCompletion instance
+ to be the QLineEdit passed in. For simplicity, the QLineEdit is also stored
+ in the explicit \c editor member variable.
+
+ We then create a QTreeWidget as a toplevel widget and configure the various
+ properties to give it the look of a popup widget.
+
+ The popup will be populated by the results returned from Google. We set
+ the number of columns to be two, since we want to display both the
+ suggested search term and the number of hits it will trigger in the search
+ engine.
+
+ Furthermore, we install the GSuggestCompletion instance as an event filter
+ on the QTreeWidget, and connect the \c itemClicked() signal with the \c
+ doneCompletion() slot.
+
+ A single-shot QTimer is used to start the request when the user has stopped
+ typing for 500 ms.
+
+ Finally, we connect the networkManagers \c finished() signal with the \c
+ handleNetworkData() slot to handle the incoming data.
+
+ \snippet examples/network/googlesuggest/googlesuggest.cpp 2
+
+ Since the QTreeWidget popup has been instantiated as a toplevel widget, the
+ destructor has to delete it explicitly from memory to avoid a memory leak.
+
+ \snippet examples/network/googlesuggest/googlesuggest.cpp 3
+
+ The event filter handles mouse press and key press events that are
+ delivered to the popup. For mouse press events we just hide the popup and
+ return focus to the editor widget, and then return true to prevent further
+ event processing.
+
+ Key event handling is implemented so that Enter and Return execute the
+ selected link, while the Escape key hides the popup. Sine we want to be
+ able to navigate the list of suggestions using the different navigation
+ keys on the keyboard we let Qt continue regular event processing for those
+ by returning false from the eventFilter reimplementation.
+
+ For all other keys, the event will be passed on to the editor widget and the
+ popup is hidden. This way the user's typing will not be interrupted by the
+ popping up of the completion list.
+
+ \snippet examples/network/googlesuggest/googlesuggest.cpp 4
+
+ The \c showCompletion() function populates the QTreeWidget with the results
+ returned from the query. It takes two QStringLists, one with the suggested
+ search terms and the other with the corresponding number of hits.
+
+ \snippet examples/network/googlesuggest/googlesuggest.cpp 5
+
+ A QTreeWidgetItem is created for each index in the list and inserted into
+ the QTreeWidget. Finally, we adjust position and size of the popup to make
+ sure that it pops up in the correct position below the editor, and show it.
+
+ The \c doneCompletion() function, which is called by the event filter when
+ either Enter or Return keys are pressed, stops the timer to prevent further
+ requests and passes the text of the selected item to the editor. We then
+ make the \c editor QLineEdit emit the returnPressed() signal, to which the
+ application can connect to open the respective web page.
+
+ \snippet examples/network/googlesuggest/googlesuggest.cpp 6
+
+ The \c autoSuggest() slot is called when the timer times out, and uses the
+ text in the editor to build the complete search query. The query is then
+ passed to the QNetworkAccessManager's \c get() function to start the
+ request.
+
+ \snippet examples/network/googlesuggest/googlesuggest.cpp 7
+
+ The function \c preventSuggest() stops the timer to prevent further
+ requests from being started.
+
+ \snippet examples/network/googlesuggest/googlesuggest.cpp 8
+
+ When the network request is finished, the QNetworkAccessManager delivers the
+ data received from the server through the networkReply object.
+
+ \snippet examples/network/googlesuggest/googlesuggest.cpp 9
+
+ To extract the data from the reply we use the \c readAll() function, which
+ is inherited from QIODevice and returns a QByteArray. Since this data is
+ encoded in XML we can use a QXmlStreamReader to traverse the data and
+ extract the search result as QStrings, which we can stream into two
+ QStringLists used to populate the popup.
+
+ Finally, we schedule the QNetworkReply object for deletion using the \c
+ deleteLater function.
+
+ \section1 SearchBox Class Declaration
+
+ The SearchBox class inherits QLineEdit and adds the protected slot \c
+ doSearch().
+
+ A \c GSuggestCompletion member provides the SearchBox with the request
+ functionality and the suggestions returned from the Google search engine.
+
+ \snippet examples/network/googlesuggest/searchbox.h 1
+
+ \section1 SearchBox Class Implementation
+
+ The search box constructor instantiates the GSuggestCompletion object and
+ connects the returnPressed() signal to the doSearch() slot.
+
+ \snippet examples/network/googlesuggest/searchbox.cpp 1
+
+ The function \c doSearch() stops the completer from sending any further
+ queries to the search engine.
+
+ Further, the function extracts the selected search phrase and opens it
+ in the default web browser using QDesktopServices.
+
+ \snippet examples/network/googlesuggest/searchbox.cpp 2
+
*/
diff --git a/doc/src/external-resources.qdoc b/doc/src/external-resources.qdoc
index ad6731bd4f..4e1f3b7d72 100644
--- a/doc/src/external-resources.qdoc
+++ b/doc/src/external-resources.qdoc
@@ -367,3 +367,48 @@
\externalpage http://www.kde.org
\title KDE
*/
+
+/*!
+ \externalpage http://www.directfb.org/index.php?path=Main%2FDownloads&amp;page=1
+ \title DirectFB - df_window example
+*/
+
+/*!
+ \externalpage http://www.directfb.org/docs/DirectFB_Reference_1_4/IDirectFBPalette.html
+ \title DirectFB - IDirectFBPalette
+*/
+
+/*!
+ \externalpage http://www.cplusplus.com/reference/clibrary/cstring/memcpy/
+ \title C++ Reference - memcpy
+*/
+
+/*!
+ \externalpage http://www.directfb.org/docs/DirectFB_Reference_1_4/IDirectFB_CreateInputEventBuffer.html
+ \title DirectFB - CreateInputEventBuffer
+*/
+
+/*!
+ \externalpage http://www.directfb.org/docs/DirectFB_Reference_1_4/types.html#DFBSurfaceBlittingFlags
+ \title DirectFB - DFBSurfaceBlittingFlags
+*/
+
+/*!
+ \externalpage http://directfb.org/docs/DirectFB_Reference_1_4/IDirectFBImageProvider.html
+ \title DirectFB - IDirectFBImageProvider
+*/
+
+/*!
+ \externalpage http://www.directfb.org/docs/DirectFB_Reference_1_4/IDirectFBSurface.html
+ \title DirectFB - IDirectFBSurface
+*/
+
+/*!
+ \externalpage http://www.directfb.org/docs/DirectFB_Reference_1_4/IDirectFBWindow
+ \title DirectFB - IDirectFBWindow
+*/
+
+/*!
+ \externalpage http://www.directfb.org/docs/DirectFB_Reference_1_4/types.html#DFBSurfaceDescription
+ \title DirectFB - DFBSurfaceDescription
+*/
diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index e127429910..c8e225c3bb 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.qdoc
@@ -39,10 +39,6 @@
**
****************************************************************************/
-/****************************************************************************
-** Please remember to update the corresponding INSTALL files.
-****************************************************************************/
-
/*!
\group installation
\title Installation
@@ -484,6 +480,7 @@ in the \l{Qt for Windows CE Requirements} document.
\o \l{Windows CE - Introduction to using Qt}
\o \l{Windows CE - Working with Custom SDKs}
\o \l{Windows CE - Using shadow builds}
+ \o \l{Windows CE - Signing}
\endlist
Information on feature and performance tuning for embedded builds can
@@ -498,10 +495,9 @@ in the \l{Qt for Windows CE Requirements} document.
*/
/*! \page install-Symbian-installer.html
-
-\title Installing Qt on the Symbian platform using binary package
+\title Installing Qt on the Symbian Platform from a Binary Package
\ingroup qts60
-\brief How to install Qt on the Symbian platform using the binary package.
+\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.
@@ -528,9 +524,9 @@ in the \l{Qt for Symbian platform Requirements} document.
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:
-
+
\snippet doc/src/snippets/code/doc_src_installation.qdoc 25
-
+
To run the demos on the emulator simply navigate to the directory of the demo
you want to see and run:
@@ -538,7 +534,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 using Qt}.
+ see \l{Symbian platform - Introduction to Qt}.
We hope you will enjoy using Qt.
@@ -546,19 +542,18 @@ Symbian platform,
*/
/*! \page install-Symbian.html
-
-\title Installing Qt on the Symbian platform
+\title Installing Qt on the Symbian Platform
\ingroup installation
\ingroup qts60
-\brief How to install Qt for the Symbian platform
+\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 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
-\l{Installing Qt on the Symbian platform using binary package}{here}.}
+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.}
\list 1
@@ -608,7 +603,7 @@ If you are using pre-built binaries, follow the instructions
To build Qt for the device, type:
\snippet doc/src/snippets/code/doc_src_installation.qdoc 28
-
+
Congratulations, Qt is now ready to use.
\o Running Qt demos
@@ -617,7 +612,7 @@ If you are using pre-built binaries, follow the instructions
to try out. An excellent starting point is the "fluidlauncher"
demo. To run the demo on a real device, you first have to install
the Qt libraries on the device:
-
+
\snippet doc/src/snippets/code/doc_src_installation.qdoc 29
\note You will need to supply certificate that allows installation
@@ -629,14 +624,14 @@ If you are using pre-built binaries, follow the instructions
This will create a self-signed \c fluidlauncher_armv5_urel.sis and
install it to your device.
-
+
To run the demos on the emulator simply navigate to the directory of the demo
you want to see and run:
\snippet doc/src/snippets/code/doc_src_installation.qdoc 27
For more information about building and running Qt programs on the
-Symbian platform, see \l{Symbian platform - Introduction to using Qt}.
+Symbian platform, see \l{Symbian platform - Introduction to Qt}.
We hope you will enjoy using Qt.
@@ -956,7 +951,7 @@ Symbian platform, see \l{Symbian platform - Introduction to using Qt}.
/*!
\page requirements-symbian.html
- \title Qt for Symbian platform Requirements
+ \title Qt for Symbian Platform Requirements
\ingroup installation
\brief Setting up the Symbian platform environment for Qt.
\previouspage General Qt Requirements
diff --git a/doc/src/howtos/guibooks.qdoc b/doc/src/howtos/guibooks.qdoc
index c41d8fa78b..6e64c09aa3 100644
--- a/doc/src/howtos/guibooks.qdoc
+++ b/doc/src/howtos/guibooks.qdoc
@@ -52,8 +52,10 @@
GUI Programming with Qt 4, Second Edition}}
by Jasmin Blanchette and Mark
Summerfield, ISBN 0-13-235416-0. This is the official Qt book written
- by two veteran Trolls. The first edition, which is based on Qt 4.1, is available
- \l{http://www.qtrac.eu/C++-GUI-Programming-with-Qt-4-1st-ed.zip}{online}.
+ by two veteran Trolls. The first edition, which is based on Qt 4.1, is
+ \l{http://www.qtrac.eu/C++-GUI-Programming-with-Qt-4-1st-ed.zip}{available online}.
+ The second edition, based on Qt 4.3, is
+ \l{http://www.informit.com/store/product.aspx?isbn=0132354160}{also available online}.
\bold{\l{http://www.amazon.com/exec/obidos/ASIN/0385267746/trolltech/t}{The Design of Everyday Things}}
by Donald Norman, ISBN 0-38526774-6, is one of the classics of human
diff --git a/doc/src/images/googlesuggest-example.png b/doc/src/images/googlesuggest-example.png
index 4ef072afb5..477d444cbd 100644
--- a/doc/src/images/googlesuggest-example.png
+++ b/doc/src/images/googlesuggest-example.png
Binary files differ
diff --git a/doc/src/images/platformHWAcc.png b/doc/src/images/platformHWAcc.png
new file mode 100644
index 0000000000..76a5a48de0
--- /dev/null
+++ b/doc/src/images/platformHWAcc.png
Binary files differ
diff --git a/doc/src/internationalization/i18n.qdoc b/doc/src/internationalization/i18n.qdoc
index 2d1b8ccbfd..ecc25fe0e3 100644
--- a/doc/src/internationalization/i18n.qdoc
+++ b/doc/src/internationalization/i18n.qdoc
@@ -93,7 +93,7 @@
\o Greek
\o Hebrew
\o Thai and Lao
- \o All scripts in Unicode 4.0 that do not require special processing
+ \o All scripts in Unicode 5.1 that do not require special processing
\endlist
On Windows, Unix/X11 with FontConfig (client side font support)
@@ -112,6 +112,7 @@
\o Tamil
\o Telugu
\o Tibetan
+ \o N'Ko
\endlist
Many of these writing systems exhibit special features:
@@ -181,7 +182,7 @@
\section2 Use QString for All User-Visible Text
- Since QString uses the Unicode 4.0 encoding internally, every
+ Since QString uses the Unicode 5.1 encoding internally, every
language in the world can be processed transparently using
familiar text processing operations. Also, since all Qt functions
that present text to the user take a QString as a parameter,
diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc
index ea5a9dccbf..3abcf7c611 100644
--- a/doc/src/modules.qdoc
+++ b/doc/src/modules.qdoc
@@ -226,10 +226,11 @@
The QtOpenGL module is part of the \l{Qt Full Framework Edition} and the
\l{Open Source Versions of Qt}. It is available on Windows, X11, and Mac OS X.
- \l{Qt for Embedded Linux} supports OpenGL ES (OpenGL for Embedded Systems).
- To be able to use the OpenGL API in \l{Qt for Embedded Linux}, it must be
+ \l{Qt for Embedded Linux and OpenGL} supports OpenGL ES (OpenGL for Embedded Systems).
+ \note To be able to use the OpenGL API in \l{Qt for Embedded Linux}, it must be
integrated with the Q Window System (QWS). See the
\l{Qt for Embedded Linux and OpenGL} documentation for details.
+
*/
/*!
diff --git a/doc/src/platforms/emb-HwAcc-LinuxEmbedded.qdoc b/doc/src/platforms/emb-HwAcc-LinuxEmbedded.qdoc
new file mode 100644
index 0000000000..9c18d873c9
--- /dev/null
+++ b/doc/src/platforms/emb-HwAcc-LinuxEmbedded.qdoc
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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 qt-embeddedLinux-accel.html
+
+ \target Hardware Acceleration with Qt for Embedded Linux
+
+ \title Qt for Embedded Linux Hardware Accelerated Graphics
+ \ingroup qt-embedded-linux
+
+
+ \input platforms/emb-hardwareacceleration.qdocinc
+
+\section1 Supported Hardware Accelerated Graphics APIs
+
+This list shows which Hardware Accelerated Graphics APIs currently
+supported by Qt.
+
+ \table
+ \header
+ \o Supported Hardware Accelerated Graphics APIs
+ \row
+ \o \l {Qt for Embedded Linux and OpenGL}{OpenGL ES}
+ \row
+ \o \l {Qt for Embedded Linux and OpenVG}{OpenVG}
+ \row
+ \o \l {Qt for Embedded Linux and DirectFB}{DirectFB}
+ \endtable
+
+
+*/
diff --git a/doc/src/platforms/emb-HwAcc-WinCE.qdoc b/doc/src/platforms/emb-HwAcc-WinCE.qdoc
new file mode 100644
index 0000000000..66b6948d78
--- /dev/null
+++ b/doc/src/platforms/emb-HwAcc-WinCE.qdoc
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** 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 qt-embeddedWinCE-accel.html
+
+ \target Hardware Acceleration with Qt for Windows CE
+
+ \title Qt for Windows CE Hardware Accelerated Graphics
+ \ingroup qtce
+
+
+ \input platforms/emb-hardwareacceleration.qdocinc
+
+ \section1 Supported Hardware Accelerated Graphics APIs
+
+ This list shows which Hardware Accelerated Graphics APIs currently
+supported by Qt.
+
+ \table
+ \header
+ \o Supported Hardware Accelerated Graphics APIs
+ \row
+ \o \l {Qt for Windows CE and OpenGL ES}{OpenGL ES}
+ \row
+ \o \l {Qt for Windows CE and OpenVG}{OpenVG}
+ \endtable
+
+
+
+*/
diff --git a/doc/src/platforms/emb-directfb-EmbLinux.qdoc b/doc/src/platforms/emb-directfb-EmbLinux.qdoc
new file mode 100644
index 0000000000..38782be412
--- /dev/null
+++ b/doc/src/platforms/emb-directfb-EmbLinux.qdoc
@@ -0,0 +1,330 @@
+/****************************************************************************
+**
+** 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 qt-embeddedLinux-directfb.html
+
+\title Qt for Embedded Linux and DirectFB
+
+\ingroup qt-embedded-linux
+
+\section1 Introduction
+
+DirectFB is an open source LGPL licensed project founded by Denis Oliver Kropp
+and generally chip vendors start out with the official version and
+implement their own plugins to optimize the operations their hardware
+supports.
+
+We recommend using Qt 4.6 with DirectFB. DirectFB support was introduced
+already into Qt for Embedded Linux as a labs project for Qt 4.3 and folded
+into Qt as a screen driver for Qt 4.4, but not supported fully. In Qt 4.5,
+major changes were made to make it work with the optimized raster paint
+engine. And in Qt 4.6 these have been further improved.
+
+\tableofcontents
+
+\section1 Using DirectFB with Qt
+DirectFB is centered around \l{DirectFB - IDirectFBSurface}{Surfaces}
+which is the equivalent of a QPaintDevice. In the Qt/DirectFB plugin,
+DirectFB maps onto either a QPixmap or a QWindowSurface which essentially
+means that drawing onto QPixmap or a QWidget can be accelerated and drawing
+onto any other paint device (e.g. QImage) cannot.
+
+\section2 Configure
+
+When configuring Qt there are two options, from which you can choose:
+
+\code
+ ./configure -plugin-gfx-directfb
+ ./configure -qt-gfx-directfb
+
+\endcode
+
+With either mode, Qt will try the following to look for the DirectFB
+includes/libs.
+
+\list
+ \o Use pkg-config
+ \o Use directfb-config
+ \o Check in your qmake.conf
+\endlist
+
+Often the values returned from pkg-config/directfb-config indicates the
+locations of the libs/headers on the target rootfs, rather than their
+location on your host. The safest option is usually to explicitly populate
+these variables in your qmake.conf like this:
+
+\code
+QT_CFLAGS_DIRECTFB =
+/opt/toolchain/gcc4.3_mipsel_linux/usr/include/directfb -D_REENTRANT
+QT_LIBS_DIRECTFB = -L/opt/toolchain/gcc4.3_mipsel_linux/usr/lib/-ldirect
+-ldirectfb -lfusion
+\endcode
+
+\note While DirectFB supports a multi-process setup through a
+kernel-extension called Fusion this setup is not well tested with Qt.
+
+\section2 Supported graphics operations
+
+IDirectFBSurface supports blitting, filling, drawing lines rects etc, but
+it does not support everything Qt allows you to do. E.g. painter paths,
+polygons, complex transformations, antialiasing, gradients. Some of these
+things are handled in newer versions of DirectFB and could be supported by
+Qt. They are seemingly optional at the driver level, so you need to have
+fall back code paths for older drivers and drivers on which this is not
+implemented.
+
+The QDirectFBPaintEngine is a subclass of the QRasterPaintEngine, thus
+essentially supporting everything QRasterPaintEngine supports. This means
+that it supports all graphical operations that Qt supports, but certain
+operations will have to fall back to software rendering and that should be
+avoided due to performance issues. Instead, these operations should be
+rendered into a QPixmap once, and then reuse the pixmap.
+
+Note: Fallbacks to software rendering should be avoided. If unsupported
+operations are used, the paint engine must fallback to the
+QRasterPaintEngine engine. A good debugging tip is to make Qt warn you when
+such fall backs occur, and to disable the fall back and only return.
+Debugging options are listed below.
+
+\section2 DirectFB driver
+DirectFB also provides an abstraction for keyboard and mouse drivers. This
+simplifies the process of getting the target hardware up and running. It
+also brings us to a feature fragmentation issue between different versions
+of DirectFB.
+
+The Qt DirectFB driver currently supports DirectFB versions >= 0.9. Still,
+there are large differences in what each actual implementation handles
+correctly. It is relatively common not to properly support
+\l{DirectFB - IDirectFBWindow}{DirectFB windows}, so Qt needs to handle
+this case with a different code path. In addition, certain drivers do not
+properly support DirectFB's cursor handling. This means Qt has to have a
+code path for rendering the cursor itself when this is the case.
+Some drivers do not let us create
+\l{DirectFB - DFBSurfaceDescription}{preallocated surfaces} which means we
+have to have a conditional code path for that case.
+
+\section2 Optimize performance using define options
+
+Qt/DirectFB comes with a number of defines that can be either
+uncommented in directfb.pri or added to the QT_DEFINES_DIRECTFB variable in
+your qmake.conf.
+
+\note The defines have been moved from
+\e{src/plugins/gfxdrivers/directfb/directfb.pro} to
+\e{src/gui/embedded/directfb.pri}
+
+\code
+#DIRECTFB_DRAWINGOPERATIONS=DRAW_RECTS|DRAW_LINES|DRAW_IMAGE|DRAW_PIXMAP|
+ DRAW_TILED_PIXMAP|STROKE_PATH|DRAW_PATH|DRAW_POINTS|DRAW_ELLIPSE|DRAW_POLYGON|
+ DRAW_TEXT|FILL_PATH|FILL_RECT|DRAW_COLORSPANS|DRAW_ROUNDED_RECT
+
+ #DEFINES += \"QT_DIRECTFB_WARN_ON_RASTERFALLBACKS=$$DIRECTFB_DRAWINGOPERATIONS\"
+ #DEFINES += \"QT_DIRECTFB_DISABLE_RASTERFALLBACKS=$$DIRECTFB_DRAWINGOPERATIONS\"
+\endcode
+
+As demonstrated above, you need to Qt which drawing operations you want to
+warn/disable. Since there are varying implementations of DirectFB from
+manufacturer to manufacture, different operations will be optimized. This
+require you to define the operations you want to warn about or disable.
+These are listed above in the DIRECTFB_DRAWINGOPERATIONS variable.
+
+Following is a table showing which options you have.
+
+\table
+ \header
+ \o Define option
+ \o Description
+ \row
+ \o QT_DIRECTFB_IMAGECACHE
+ \o Defining this means that Qt will cache an IDirectFBSurface per
+QImage you draw based on its \l{QImage::}{cacheKey()}.
+Use this define if your application draws many QImages that
+remain the same. Note that if you in this situation draw an image and then
+change it, by calling bits() or opening a QPainter on it, the cache will
+not benefit you. You can control the cache size with the imageCacheSize
+connect option.
+
+ \row
+ \o QT_NO_DIRECTFB_WM
+ \o If your DirectFB implementation does not support windows, you
+have to define this to make Qt work properly. You can test this by checking
+if the \l{DirectFB - df_window example}{df_window example} runs well.
+This means that all drawing operations onto a QWidget involves
+an extra blitting step since Qt essentially first has to draw into an
+off-screen buffer and then blit this buffer to the back buffer of the
+primary surface. Finally, Qt must flip the back buffer to the front buffer,
+which usually involves another blit. Still, blits are usually very fast
+with DirectFB.
+
+To work around this you can make your widget paint on screen, \l
+Qt::WA_PaintOnScreen but this comes with other limitations. This should be
+avoided if you want more than one full-screen window in your application.
+In addition, it will not work without proper DirectFB mouse support from the
+layer. Also, see QT_NO_DIRECTFB_LAYER for more.
+
+ \row
+ \o QT_NO_DIRECTFB_LAYER
+ \o If your DirectFB display layer cannot be used for e.g. drawing
+mouse cursor, creating windows you have to define this. Defining this also
+requires defining QT_NO_DIRECTFB_WM and involves making Qt render the
+cursor rather than letting DirectFB do it.
+
+ \row
+ \o QT_NO_DIRECTFB_PALETTE
+ \o Define this if your DirectFB driver does not support surfaces
+with \l{DirectFB - IDirectFBPalette}{color tables}.
+The effect of defining this is that Qt will have to convert
+images with \l QImage::Format_Indexed8 format to another format before
+rendering them.
+
+ \row
+ \o QT_NO_DIRECTFB_PREALLOCATED
+ \o Define this if your DirectFB driver does not support creating a
+surface with preallocated data. This will make a more frequent use of
+\l{C++ Reference - memcpy}{memcpy()}
+when drawing images. If you define this, you might want to consider
+defining QT_DIRECTFB_IMAGECACHE for better image rendering performance.
+
+ \row
+ \o QT_NO_DIRECTFB_MOUSE and QT_NO_DIRECTFB_KEYBOARD
+ \o Define this if your driver does not provide keyboard/mouse
+events through \l{DirectFB - CreateInputEventBuffer}{CreateInputEventBuffer}.
+This means that Qt cannot use DirectFB to receive keyboard/mouse events and
+if you want such events in your application, you will have to provide
+another driver. For more info see \l {Qt for Embedded Linux Pointer
+Handling}{Qt for Embedded Linux Pointer Handling} and \l{Qt for Embedded
+Linux Character Input}{Qt for Embedded Linux Character Input}
+
+ \row
+ \o QT_DIRECTFB_TIMING
+ \o Define this when debugging to get output on stderr about the
+frames per second.
+
+ \row
+ \o QT_NO_DIRECTFB_OPAQUE_DETECTION
+ \o When blitting a surface Qt has to decide whether to set the
+\l{DirectFB - DFBSurfaceBlittingFlags}{DSBLIT_BLEND_ALPHACHANNEL}
+flag. If you load an image from file or network data that has a format that
+includes an alpha channel, the image might still be completely opaque.
+Normally Qt runs through every pixel to check if there really is an alpha
+channel there. This involves some overhead but usually pays off in the end
+because blitting is cheaper than blending. If you define this Qt will
+assume that an image with a format that has alpha channel contains at least
+one pixel with an alpha value != 255.
+
+ \row
+ \o QT_DIRECTFB_SUBSURFACE
+ \o Defining this enables a mode that tries to minimize overhead from
+locking/unlocking surfaces. Note that this currently is experimental.
+
+ \row
+ \o QT_DIRECTFB_WINDOW_AS_CURSOR
+ \o Define this if your DirectFB implementation supports windows but
+can not render the cursor properly. This involves creating a small top level
+window and moving it around when the cursor moves. It does not always
+perform well.
+
+ \row
+ \o QT_NO_DIRECTFB_IMAGEPROVIDER
+ \o By default Qt will use DirectFB to load QPixmaps from disk/memory. If
+your DirectFB implementation does not support this it might make sense to
+define this.
+
+ \row
+ \o QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE
+ \o Define this to make sure Qt always keeps at least one
+\l{DirectFB - IDirectFBImageProvider}{IDirectFBImageProvider}
+object alive. This is to avoid considerable overhead when the first
+IDirectFBImageProvider is created, the last IDirectFBImageProvider is
+removed.
+
+\endtable
+
+\section2 Unsupported graphics operations
+
+There are a number of unsupported operations causing fallbacks. DirectFB
+does not support the following functions.
+
+
+
+\table
+ \header
+ \o Functions
+ \row
+ \o QPainter::strokePath(const QPainterPath & path, const QPen & pen)
+ \row
+ \o QPainter::drawPath(const QPainterPath & path)
+ \row
+ \o QPainter::fillPath(const QPainterPath & path, const QBrush & brush)
+ \row
+ \o QPainter::drawPoints(const QPointF * points, int pointCount)
+ \row
+ \o QPainter::drawEllipse(const QRectF & rectangle)
+ \row
+ \o QPainter::drawPolygon(const QPointF * points, int pointCount,
+ Qt::FillRule fillRule = Qt::OddEvenFill)
+ \row
+ \o QPainter::drawText(const QPointF & position, const QString & text)
+ \row
+ \o QGradient
+ \endtable
+
+\section2 Avoiding fallbacks
+To avoid fallbacks make sure that the following points are true:
+
+\list
+ \o QPen::isSolid() returns true and uses a color with a one pixel
+width. (QPen::width() returns 1.
+ \o QTransform::TransformationType() <= QTransform::TxScale are not
+supported.
+ \o Clipping must be a simple rectangle or a QRegion.
+\endlist
+
+\section2 When painting images
+\note You should use QPixmap instead of QImage. QImages are drawn by
+the QRasterPaintEngine. To get a warning for every fallback to the
+QRasterPaintEngine, use QT_DIRECTFB_WARN_ON_RASTERFALLBACKS. If
+QT_DIRECTFB_DISABLE_RASTERFALLBACKS is defined, DirectFB will only return
+instead of falling back to QRasterPaintEngine. Please note that these
+defines should only be used when optimizing the application.
+
+*/
diff --git a/doc/src/platforms/emb-hardwareacceleration.qdocinc b/doc/src/platforms/emb-hardwareacceleration.qdocinc
new file mode 100644
index 0000000000..3851628155
--- /dev/null
+++ b/doc/src/platforms/emb-hardwareacceleration.qdocinc
@@ -0,0 +1,129 @@
+
+\section1 Hardware Acceleration
+
+When designing applications for embedded devices the choice often stands
+between graphics effects and performance. On most devices, you cannot have
+both simply because the hardware needed for such operations just is not
+there. Still a growing number of devices use hardware dedicated to graphics
+operations to improve performance.
+
+Using graphics acceleration hardware is more power efficient than using the
+CPU. The reason for this is that the CPU might require a clock speed that
+is up to 20 times higher than the GPU, achieving the same results. E.g. a
+typical hardware accelerated mobile graphics unit can rasterize one or two
+bilinear texture fetches in one cycle, while a software implementation
+takes easily more than 20 cycles. Graphics hardware generally have a much
+lower clock speed and memory bandwidth and different level of acceleration
+than desktop GPUs. One example is that many GPUs leave out transformation
+and lighting from the graphics pipeline and only implements rasterization.
+
+So the key to write good applications for devices is therefore to limit the
+wow factor down to what the target hardware can handle, and to take
+advantage of any graphics dedicated hardware. Qt provides several ways to
+both render advanced effects on the screen and speed up your application
+using hardware accelerated graphics.
+
+\tableofcontents
+
+\section2 Qt for Embedded Graphics pipeline
+
+Qt uses QPainter for all graphics operations. By using the same API
+regardless of platform, the code can be reused on different devices.
+QPainter use different paint engines implemented in the QPaintEngine API to
+do the actual painting.
+
+The QPaintEngine API provides paint engines for each window system and
+painting framework supported by Qt. In regards to Qt for Embedded, this
+also includes implementations for OpenGL ES versions 1.1 and 2.0, as well
+as OpenVG and DirectFB(Embedded Linux only).
+
+By using one of these paint engines, you will be able to improve the
+graphics performance of your Qt application. However, if the graphics
+operations used are not supported, this might as well be a trap, slowing
+down your application significantly. This all depends on what kind of
+graphics operations that are supported by the target devices hardware
+configuration.
+
+\image platformHWAcc.png
+
+The paint engine will direct all graphics operations supported by the
+devices hardware to the GPU, and from there they are sent to the
+framebuffer. Unsupported graphics operations falls back to the
+QRasterPaintEngine and are handled by the CPU before sent to the
+framebuffer. In the end, the operating system sends the paint updates off
+to the screen/display. The fallback operation is quite expensive in regards
+to memory consumption, and should be avoided.
+
+\section2 Hardware configuration requirements
+
+Before implementing any application using hardware acceleration, it is wise
+to get an overview of what kind of hardware accelerated graphics operations
+that are available for the target device.
+
+\note On devices with no hardware acceleration, Qt will use
+QRasterPaintEngine, which handles the acceleration using software. On
+devices supporting OpenGL ES, OpenVG or DirectFB(not supported by Windows
+CE), Qt will use the
+respective paint engines to accelerate painting. However, hardware
+configurations that only support a limited set of hardware acceleration
+features, might slow the application graphics down rather than speeding it
+up when using unsupported operations that must fall back to the raster
+engine.
+
+\section3 Different architectures
+
+Based on the architecture used in a device we can make a recommendation on
+which hardware acceleration techniques to use. There are mainly two
+different architectures on embedded devices. These are devices with a
+Unified Memory Architecture (UMA), and devices with dedicated graphics
+memory. Generally, high-end devices will have dedicated graphics memory.
+Low-end devices will just use system memory, sometimes reserving a memory
+region and sometimes not.
+
+In addition to this, we can categorize the devices into five types based on
+the different graphics operations supported by their hardware.
+
+\list 1
+ \o No support for graphics acceleration.
+ \o Support for blitter and alpha blending.
+ \o Support for path based 2D vector graphics.
+ \o Support for fixed function 3D graphics.
+ \o Support for programmable 3D graphics.
+\endlist
+
+Based on these characteristics the table below recommends which paint
+engines to use with the different types of hardware configurations.
+
+\section3 Recommended use of hardware acceleration based on hardware
+
+ \table
+ \header
+ \o Type
+ \o UMA
+ \o Non-UMA
+ \row
+ \o \bold {None}
+ \o Qt Raster Engine
+ \o Qt Raster Engine
+ \row
+ \o \bold {Blitter}
+ \o DirectFB
+ \o DirectFB
+ \row
+ \o \bold {2D Vector}
+ \o OpenVG
+ \o OpenVG
+ \row
+ \o \bold {Fixed 3D}
+ \o OpenGL (ES) 1.x
+ \o OpenGL (ES) 1.x
+ \row
+ \o \bold {Programmable 3D}
+ \o OpenGL (ES) 2.x
+ \o OpenGL (ES) 2.x
+
+ \endtable
+
+\note Since the DirectFB API is quite primitive, the raster paint engine
+handles most of the operations.
+\note Blitter and Alpha blending is currently not supported on Windows CE.
diff --git a/doc/src/platforms/emb-opengl.qdoc b/doc/src/platforms/emb-opengl-EmbLinux.qdoc
index 2ed5d041e9..bede2ca460 100644
--- a/doc/src/platforms/emb-opengl.qdoc
+++ b/doc/src/platforms/emb-opengl-EmbLinux.qdoc
@@ -40,31 +40,24 @@
****************************************************************************/
/*!
-\page qt-embedded-opengl.html
+\page qt-embeddedLinux-opengl.html
\title Qt for Embedded Linux and OpenGL
-\ingroup qt-embedded-linux
-\section1 Introduction
+\ingroup qt-embedded-linux
-\l {http://www.opengl.org}{OpenGL} is an industry standard API for
-2D/3D graphics. It provides a powerful, low-level interface between
-software and acceleration hardware, and it is operating system and
-window system independent.
+\input platforms/emb-opengl.qdocinc
-\l {http://www.khronos.org/opengles}{OpenGL ES} is a subset
-of the \l {http://www.opengl.org}{OpenGL} standard.
-Because it is meant for use in embedded systems, it has a smaller,
-more constrained API.
+\section1 Using OpenGL with Qt for Embedded Linux
+Qt for Embedded Linux provides support for integrating OpenGL ES for
+drawing into a QGLWidget. The current implementation supports OpenGL and 2D
+painting within a QGLWidget. Using OpenGL to accelerate regular widgets and
+compositing top-level windows with OpenGL are not currently supported.
-For reference, Nokia provides support for integrating \l
-{http://www.khronos.org/opengles}{OpenGL ES} with Qt for Embedded Linux
-for drawing into a QGLWidget.
+\note OpenGL rendering only works with QGLWidget under QWS. Regular
+widgets cannot currently support it.
-The current implementation supports OpenGL and 2D painting within a
-QGLWidget. Using OpenGL to accelerate regular widgets and compositing
-top-level windows with OpenGL are not currently supported. These issues
-will be addressed in future versions of Qt.
+\section2 Configure
It is recommended that Qt for Embedded Linux is configured with the
\c{-DQT_QWS_CLIENTBLIT} and \c{-DQT_NO_QWS_CURSOR} options for optimum
@@ -72,58 +65,11 @@ performance. OpenGL is rendered direct to the screen and these options
prevent Qt for Embedded Linux from trying to do its own non-OpenGL
compositing on the QGLWidget contents.
-\section2 Using OpenGL 3D Graphics in Applications
-
-The \l {QtOpenGL module} offers classes that make it easy to draw 3D
-graphics in GUI applications. The module API is cross-platform, so it
-is also available on Windows, X11, and Mac OS X.
-
-To use OpenGL-enabled widgets in a Qt for Embedded Linux application,
-all that is required is to subclass the QGLWidget and draw into instances of
-the subclass with standard OpenGL functions.
-
-Note that on most embedded hardware, the OpenGL implementation is
-actually \l{http://www.khronos.org/opengles/1_X/}{OpenGL/ES 1.1} or
-\l{http://www.khronos.org/opengles/2_X/}{OpenGL/ES 2.0}. When painting
-within a QGLWidget::paintGL() override, it is necessary to limit the
-application to only the features that are present in the OpenGL/ES
-implementation.
-
-\section2 Using OpenGL to Accelerate Normal 2D Painting
-
-Qt provides a subclass of QPaintEngine that translates QPainter operations
-into OpenGL calls (there are actually two subclasses, one for OpenGL/ES 1.1
-and another for OpenGL/ES 2.0). This specialized paint engine can be used
-to improve 2D rendering performance on appropriate hardware. It can also
-overlay controls and decorations onto 3D scenes drawn using OpenGL.
-
-As mentioned above, the OpenGL paint engine is not currently supported
-in regular widgets. However, any application that uses QGraphicsView
-can set a QGLWidget as the viewport and obtain access to the
-OpenGL paint engine that way:
-
-\code
-QGraphicsView view(&scene);
-view.setViewport(new QGLWidget);
-view.setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
-view.showFullScreen();
-\endcode
-
-It is recommended that the QGraphicsView::FullViewportUpdate flag
-be set because the default double-buffered behavior of QGLWidget
-does not support partial updates. It is also recommended that the
-window be shown full-screen because that usually has the best
-performance on current OpenGL/ES implementations.
-
-Once a QGraphicsView has been initialized as above, regular widgets
-can be added to the canvas using QGraphicsProxyWidget if the
-application requires them.
-
\section2 Using OpenGL to Implement Window Compositing and Effects
-Compositing effects can be simulated by adjusting the opacity and
-other parameters of the items within a QGraphicsView canvas on a
-QGLWidget viewport.
+Compositing effects can be simulated by adjusting the opacity and other
+parameters of the items within a QGraphicsView canvas on a QGLWidget
+viewport.
While Qt for Embedded Linux does include a complete windowing system,
using OpenGL to composite regular window surfaces can be quite difficult.
@@ -135,23 +81,20 @@ which is why we do not recommend implementing that form of compositing.
We intend to address this problem in future versions of Qt.
\section1 Integrating OpenGL/ES into Qt for Embedded Linux
-
\section2 Reference Integration
-
-The reference integration for OpenGL into Qt for Embedded Linux
-is for the PowerVR chipset from \l{http://www.imgtec.com/}{Imagination
-Technologies}. It consists of two components: \c{pvreglscreen} which
-provides the Qt for Embedded Linux screen driver, and \c{QWSWSEGL}
-which implements a plug-in to the PowerVR EGL implementation to
-implement low-level OpenGL drawing surfaces.
+The reference integration for OpenGL into Qt for Embedded Linux is for the
+PowerVR chipset from \l{http://www.imgtec.com/}{Imagination Technologies}.
+It consists of two components: \c{pvreglscreen}, which provides the Qt for
+Embedded Linux screen driver, and \c{QWSWSEGL}, which implements a plug-in
+to the PowerVR EGL implementation to implement low-level OpenGL drawing
+surfaces.
\section2 Integrating Other Chipsets
-
-In this section we discuss the essential features of the reference
+In this section, we discuss the essential features of the reference
integration that need to be provided for any other chipset integration.
The QtOpenGL module assumes that a QGLWidget can be represented
-by a \c EGLNativeWindowType value in some underlying window system
+by an \c EGLNativeWindowType value in some underlying window system
implementation, and that \c{eglSwapBuffers()} is sufficient to copy
the contents of the native window to the screen when requested.
@@ -159,7 +102,7 @@ However, many EGL implementations do not have a pre-existing window system.
Usually only a single full-screen window is provided, and everything else
must be simulated some other way. This can be a problem because
of QtOpenGL's assumptions. We intend to address these assumptions in a
-future version of Qt, but for now it is the responsibility of the integrator
+future version of Qt, but for now, it is the responsibility of the integrator
to provide a rudimentary window system within the EGL implementation.
This is the purpose of \c{QWSWSEGL} in the reference integration.
@@ -218,13 +161,4 @@ In the case of PowerVR, the rudimentary window system in \c{QWSWSEGL}
provides a \c PvrQwsDrawable object to represent the \c EGLNativeWindowType
value for the widget.
-\section1 OpenVG Support
-
-\l {http://www.khronos.org/openvg} {OpenVG} is a dedicated API for 2D
-graphics on mobile devices. It is therefore more likely to be a better
-alternative for 2D acceleration than OpenGL/ES. Acceleration of
-regular widgets is supported with OpenVG, unlike with OpenGL/ES.
-See \l{OpenVG Rendering in Qt} for more information on the
-OpenVG support in Qt.
-
*/
diff --git a/doc/src/platforms/emb-opengl.qdocinc b/doc/src/platforms/emb-opengl.qdocinc
new file mode 100644
index 0000000000..dac537946e
--- /dev/null
+++ b/doc/src/platforms/emb-opengl.qdocinc
@@ -0,0 +1,85 @@
+\section1 Introduction
+
+\l {http://www.opengl.org}{OpenGL} is an industry standard API for
+2D/3D graphics. It provides a powerful, low-level interface between
+software and acceleration hardware, and it is operating system and
+window system independent. \l {http://www.khronos.org/opengles}{OpenGL ES}
+is a subset of the \l {http://www.opengl.org}{OpenGL} standard. Because it
+is designed for use with embedded systems, it has a smaller, more
+constrained API.
+
+\l {http://www.khronos.org/opengles/1_X}{OpenGL ES version 1.x} is designed for
+fixed function hardware, while its successor \l
+{http://www.khronos.org/opengles/2_X}{OpenGL ES version 2.x} is designed for
+programmable hardware. It is worth noting that there is a significant
+difference between the two, and that they are not compatible with each
+other. OpenGL ES 1.x limits processing to a pre-defined set of fixed
+options for drawing and lighting objects. OpenGL 2.x has a significantly
+shorter graphics pipeline than 1.x. Instead of using function
+transformation and a fragment pipeline, 2.x uses the \l
+{http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf}{OpenGL
+ES Shading Language (GLSL ES)}. Instead of using the pre-defined functions,
+the programmer writes small shader programs telling the hardware in detail
+how to render each object.
+
+The \l {QtOpenGL module} offers classes that make it easy to draw 3D
+graphics in GUI applications using OpenGL ES. Qt provides a plugin that
+integrates both OpenGL ES versions \l
+{http://www.khronos.org/opengles/1_X}{1.x} and \l
+{http://www.khronos.org/opengles/2_X}{2.x} with Qt for Embedded. However,
+Qt for Embedded can be adapted to a wide range of OpenGL versions.
+
+To translate QPainter operations into OpenGL ES calls (there are actually
+two subclasses, one for OpenGL/ES 1.1 and another for OpenGL/ES 2.0), Qt
+uses a subclass of QPaintEngine. This specialized paint engine can be used
+to improve 2D rendering performance on appropriate hardware. It can also
+overlay controls and decorations onto 3D scenes drawn using OpenGL.
+
+\tableofcontents
+
+\section1 Using OpenGL ES with Qt
+To use OpenGL-enabled widgets in a Qt for Embedded application, all that is
+required is to subclass QGLWidget and draw into instances of the subclass
+with standard OpenGL functions. The current implementation only
+supports OpenGL ES and 2D painting within a QGLWidget. Using OpenGL ES to
+accelerate regular widgets as well as compositing top-level windows with
+OpenGL ES are not currently supported. These issues will be addressed in
+future versions of Qt.
+
+\note The OpenGL paint engine is not currently supported in regular
+widgets. However, any application that uses QGraphicsView can set a
+QGLWidget as the viewport and obtain access to the OpenGL paint engine that
+way:
+
+\code
+ QGraphicsView view(&scene);
+ view.setViewport(new QGLWidget());
+ view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ view.setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
+ view.setFrameStyle(0);
+ view.showFullScreen();
+\endcode
+
+It is recommended that the QGraphicsView::FullViewportUpdate flag
+be set because the default double-buffered behavior of QGLWidget
+does not support partial updates. It is also recommended that the
+window be shown full-screen because that usually has the best
+performance on current OpenGL ES implementations.
+
+Once a QGraphicsView has been initialized as above, regular widgets
+can be added to the canvas using QGraphicsProxyWidget if the
+application requires them.
+
+\note OpenGL ES 2.X does not support PBuffers, so QGLPixelBuffer will not
+work. In this case, QGLFramebufferObject should be used instead. However,
+OpenGL ES 1.X does not support Framebuffer objects, with the exception of
+some OpenGL ES 1.X extensions. In this case, please use QGLPixelBuffer.
+
+\note On most embedded hardware, the OpenGL implementation is
+actually \l{http://www.khronos.org/opengles/1_X/}{OpenGL/ES 1.1} or
+\l{http://www.khronos.org/opengles/2_X/}{OpenGL/ES 2.0}. When painting
+within a QGLWidget::paintGL() override, it is necessary to limit the
+application to only the features that are present in the OpenGL/ES
+implementation.
+
diff --git a/doc/src/platforms/emb-openvg-EmbLinux.qdoc b/doc/src/platforms/emb-openvg-EmbLinux.qdoc
new file mode 100644
index 0000000000..abdb6174c1
--- /dev/null
+++ b/doc/src/platforms/emb-openvg-EmbLinux.qdoc
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** 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 qt-embeddedLinux-openvg.html
+
+\title Qt for Embedded Linux and OpenVG
+
+\ingroup qt-embedded-linux
+
+\input platforms/emb-openvg.qdocinc
+
+
+
+*/
diff --git a/doc/src/platforms/emb-openvg.qdocinc b/doc/src/platforms/emb-openvg.qdocinc
new file mode 100644
index 0000000000..37ccb9c1de
--- /dev/null
+++ b/doc/src/platforms/emb-openvg.qdocinc
@@ -0,0 +1,288 @@
+\section1 Introduction
+
+\l {http://www.khronos.org/openvg}{OpenVG} is a standard API from the
+\l{http://www.khronos.org/openvg}{Khronos Group} for accelerated 2D vector
+graphics and raster graphics. It is a dedicated API for 2D graphics on
+mobile devices. It is therefore more likely to be a better alternative for
+2D acceleration than OpenGL/ES.
+
+\tableofcontents
+
+\section1 Using OpenVG with Qt
+The QtOpenVG plugin provides support for OpenVG painting. OpenVG is
+optimized for 2D vector operations, and closely matches the functionality
+in QPainter. To translate QPainter operations into OpenVG calls, Qt uses a
+subclass of QPaintEngine. Unlike with OpenGL ES, OpenVG can be used for
+acceleration of regular widgets. It can therefore be an excellent substitute
+for the default raster-based QPaintEngine on hardware that supports the
+OpenVG API.
+
+\section2 Configure
+OpenVG support can be enabled by passing the \c{-openvg} option to
+configure. It is assumed that the following qmake variables are set to
+appropriate values in the qmake.conf file for your platform:
+
+ \list
+ \o QMAKE_INCDIR_OPENVG
+ \o QMAKE_LIBDIR_OPENVG
+ \o QMAKE_LIBS_OPENVG
+ \endlist
+
+Most OpenVG implementations are based on EGL, so the following variables
+may also need to be set:
+
+ \list
+ \o QMAKE_INCDIR_EGL
+ \o QMAKE_LIBDIR_EGL
+ \o QMAKE_LIBS_EGL
+ \endlist
+
+See \l{qmake Variable Reference} for more information on these variables.
+
+\section2 Supported OpenVG Engines
+
+Two kinds of OpenVG engines are currently supported: EGL based, and engines
+built on top of OpenGL such as
+\l{http://sourceforge.net/projects/shivavg}{ShivaVG}. EGL based engines are
+preferred.
+
+It is assumed that the EGL implementation has some way to turn a
+QWidget::winId() into an EGL rendering surface with
+\c{eglCreateWindowSurface()}. If this is not the case, then modifications
+may be needed to the code under \c{src/gui/egl} and
+\c{src/plugins/graphicssystems/openvg} to accomodate the EGL
+implementation.
+
+The ShivaVG graphics system under \c{src/plugins/graphicssystems/shivavg}
+is an example of how to integrate a non-EGL implementation of OpenVG into
+Qt. It is currently only supported with Qt/X11 and being an example only,
+the resulting screen output may not be as good as with other OpenVG
+engines.
+
+\section1 Using the OpenVG graphics system
+
+Once the graphics system plugin has been built and installed, applications
+can be run as follows to use the plugin:
+
+ \code
+ app -graphicssystem OpenVG
+ \endcode
+
+If ShivaVG is being used, then substitute \c ShivaVG instead of \c OpenVG
+in the line above.
+
+If the plugin fails to load, try setting the \c QT_DEBUG_PLUGINS
+environment variable to 1 and try again. Usually the plugin cannot be
+loaded because Qt cannot locate it in the directory
+\c{plugins/graphicssystems} within the Qt installation, or the dynamic
+library path does not include the directory containing the system's \c
+libOpenVG.so library.
+
+\section2 Supported features
+
+\table
+ \header
+ \o Feature
+ \o Description
+
+ \row
+ \o Context modes
+ \o The default configuration is "single-context" mode, where a single
+EGLContext object is used for all drawing, regardless of the surface.
+Multiple EGLSurfaces are created, one for each window surface or pixmap.
+eglMakeCurrent() is called with the same EGLContext every time, but a
+different EGLSurface.
+
+Single-context mode is necessary for QPixmapData to be implemented in terms
+of a VGImage. If single-context mode is not enabled, then QPixmapData will
+use the fallback QRasterPixmapData implementation, which is less efficient
+performance-wise.
+
+Single-context mode can be disabled with the QVG_NO_SINGLE_CONTEXT
+define if the OpenVG engine does not support one context with multiple
+surfaces.
+
+ \row
+ \o Transformation matrices
+ \o All affine and projective transformation matrices are supported.
+
+QVGPaintEngine will use the engine to accelerate affine transformation
+matrices only. When a projective transformation matrix is used,
+QVGPaintEngine will transform the coordinates before passing them to the
+engine. This will probably incur a performance penalty.
+
+Pixmaps and images are always transformed by the engine, because OpenVG
+specifies that projective transformations must work for images.
+
+It is recommended that client applications should avoid using projective
+transformations for non-image elements in performance critical code.
+
+ \row
+ \o Composition modes
+ \o The following composition modes are supported:
+
+\list
+\o QPainter::CompositionMode_SourceOver
+\o QPainter::CompositionMode_DestinationOver
+\o QPainter::CompositionMode_Source
+\o QPainter::CompositionMode_SourceIn
+\o QPainter::CompositionMode_DestinationIn
+\o QPainter::CompositionMode_Plus
+\o QPainter::CompositionMode_Multiply
+\o QPainter::CompositionMode_Screen
+\o QPainter::CompositionMode_Darken
+\o QPainter::CompositionMode_Lighten
+\endlist
+
+The other members of QPainter::CompositionMode are not supported
+because OpenVG 1.1 does not have an equivalent in its \c VGBlendMode
+enumeration. Any attempt to set an unsupported mode will result in
+the actual mode being set to QPainter::CompositionMode_SourceOver.
+Client applications should avoid using unsupported modes.
+
+ \row
+ \o Pens and brushes
+ \o All pen styles are supported, including cosmetic pens.
+
+All brush styles are supported except for conical gradients, which are not
+supported by OpenVG 1.1. Conical gradients will be converted into a solid
+color brush corresponding to the first color in the gradient's color ramp.
+
+Affine matrices are supported for brush transforms, but not projective
+matrices.
+
+
+ \row
+ \o Rectangles, lines, and points
+ \o Rectangles, lines, and rounded rectangles use cached VGPath
+objects to try to accelerate drawing operations. vgModifyPathCoords() is
+used to modify the co-ordinates in the cached VGPath object each time
+fillRect(), drawRects(), drawLines(), or drawRoundedRect() is called.
+
+If the engine does not implement vgModifyPathCoords() properly, then the
+QVG_NO_MODIFY_PATH define can be set to disable path caching. This will
+incur a performance penalty.
+
+Points are implemented as lines from the point to itself. The cached line
+drawing VGPath object is used when drawing points.
+
+ \row
+ \o Polygons and Ellipses
+ \o Polygon and ellipse drawing creates a new VGPath object every
+time drawPolygon() or drawEllipse() is called. If the client application
+is making heavy use of these functions, the constant creation and
+destruction of VGPath objects could have an impact on performance.
+
+If a projective transformation is active, ellipses are converted into cubic
+curves prior to transformation, which may further impact performance.
+
+Client applications should avoid polygon and ellipse drawing in performance
+critical code if possible.
+
+ \row
+ \o Other Objects
+ \o Most other objects (arcs, pies, etc) use drawPath(), which takes
+a QPainterPath argument. The default implementation in QPainterEngineEx
+converts the QPainterPath into a QVectorPath and then calls draw(), which
+in turn converts the QVectorPath into a VGPath for drawing.
+
+To reduce the overhead, we have overridden drawPath() in QVGPaintEngine to
+convert QPainterPath's directly into VGPath's. This should help improve
+performance compared to the default implementation.
+
+Client applications should try to avoid these types of objects in
+performance critical code because of the QPainterPath to VGPath conversion
+cost.
+
+ \row
+ \o Clipping
+ \o Clipping with QRect, QRectF, and QRegion objects is supported on
+all OpenVG engines with vgMask() if the transformation matrix is the
+identity or a simple origin translation.
+
+Clipping with an arbitrary QPainterPath, or setting the clip region when
+the transformation matrix is simple, is supported only if the OpenVG engine
+has the vgRenderToMask() function (OpenVG 1.1 and higher).
+
+The QVG_NO_RENDER_TO_MASK define will disable the use of vgRenderToMask().
+
+The QVG_SCISSOR_CLIP define will disable clipping with vgMask() or
+vgRenderToMask() and instead use the scissor rectangle list to perform
+clipping. Clipping with an arbitrary QPainterPath will not be supported.
+
+The QVG_SCISSOR_CLIP define should only be used if the OpenVG engine does
+not support vgMask() or vgRenderToMask().
+
+ \row
+ \o Opacity
+ \o Opacity is supported for all drawing operations. Solid color
+pens, solid color brushes, gradient brushes, and image drawing with
+drawPixmap() and drawImage() will probably have the best performance
+compared to other kinds of pens and brushes.
+
+ \row
+ \o Text Drawing
+ \o If OpenVG 1.1 is used, the paint engine will use VG fonts to
+cache glyphs while drawing. If the engine does not support VG fonts
+correctly, QVG_NO_DRAW_GLYPHS can be defined to disable this mode. Text
+drawing performance will suffer if VG fonts are not used.
+
+By default, image-based glyphs are used. If QVG_NO_IMAGE_GLYPHS is defined,
+then path-based glyphs will be used instead. QVG_NO_IMAGE_GLYPHS is ignored
+if QVG_NO_DRAW_GLYPHS is defined.
+
+If path-based glyphs are used, then the OpenVG engine will need to support
+hinting to render text with good results. Image-based glyphs avoids the
+need for hinting and will usually give better results than path-based
+glyphs.
+
+ \row
+ \o Pixmaps
+ \o In single-context mode, pixmaps will be implemented using
+VGImage unless QVG_NO_PIXMAP_DATA is defined.
+
+QVGPixmapData will convert QImage's into VGImage's when the application
+calls drawPixmap(), and the pixmap will be kept in VGImage form for the
+lifetime of the QVGPixmapData object. When the application tries to paint
+into a QPixmap with QPainter, the data will be converted back into a QImage
+and the raster paint engine will be used to render into the QImage.
+
+This arrangement optimizes for the case of drawing the same static pixmap
+over and over (e.g. for icons), but does not optimize the case of drawing
+into pixmaps.
+
+Bitmaps must use QRasterPixmapData. They are not accelerated with VGImage
+at present.
+
+ \row
+ \o Pixmap filters
+ \o Convolution, colorize, drop shadow, and blur filters are
+accelerated using OpenVG operations.
+
+\endtable
+
+\section2 Known issues
+
+Performance of copying the contents of an OpenVG-rendered window to the
+screen needs platform-specific work in the QVGWindowSurface class.
+
+Clipping with arbitrary non-rectangular paths only works on engines that
+support vgRenderToMask(). Simple rectangular paths are supported on all
+engines that correctly implement vgMask().
+
+The paint engine is not yet thread-safe, so it is not recommended for use
+in threaded Qt applications that draw from multiple threads. Drawing should
+be limited to the main GUI thread.
+
+Performance of projective matrices for non-image drawing is not as good
+as for affine matrices.
+
+QPixmap's are implemented as VGImage objects so that they can be quickly
+rendered with drawPixmap(). Rendering into a QPixmap using QPainter will
+use the default Qt raster paint engine on a QImage copy of the QPixmap, and
+will not be accelerated. This issue may be addressed in a future version
+of the engine.
+
+ShivaVG support is highly experimental and limited to Qt/X11. It is
+provided as an example of how to integrate a non-EGL engine.
+
diff --git a/doc/src/platforms/qt-embedded-linux.qdoc b/doc/src/platforms/qt-embedded-linux.qdoc
index 21cbf3be5d..a6524d77c6 100644
--- a/doc/src/platforms/qt-embedded-linux.qdoc
+++ b/doc/src/platforms/qt-embedded-linux.qdoc
@@ -96,7 +96,7 @@
\o \l {Qt for Embedded Linux Pointer Handling}{Pointer Handling}
\o \l {Qt for Embedded Linux Character Input}{Character Input}
\o \l {Qt for Embedded Linux Display Management}{Display Management}
- \o \l {Qt for Embedded Linux and OpenGL}{OpenGL}
+ \o \l {Qt for Embedded Linux Hardware Accelerated Graphics}{Hardware Accelerated Graphics}
\o \l {Qt for Embedded Linux Fonts}{Fonts}
\endlist
diff --git a/doc/src/platforms/qt-embedded.qdoc b/doc/src/platforms/qt-embedded.qdoc
index e0c35cc8ba..b38c94f5ec 100644
--- a/doc/src/platforms/qt-embedded.qdoc
+++ b/doc/src/platforms/qt-embedded.qdoc
@@ -67,7 +67,7 @@
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 using Qt}{Qt for the Symbian
+ \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
diff --git a/doc/src/platforms/s60-introduction.qdoc b/doc/src/platforms/s60-introduction.qdoc
index 5fd0cbe2bd..058198238b 100644
--- a/doc/src/platforms/s60-introduction.qdoc
+++ b/doc/src/platforms/s60-introduction.qdoc
@@ -42,7 +42,7 @@
/*!
\page symbian-with-qt-introduction.html
- \title Symbian platform - Introduction to using Qt
+ \title Symbian Platform - Introduction to Qt
\brief An introduction to Qt for Symbian platform developers.
\ingroup howto
\ingroup qts60
@@ -51,15 +51,15 @@
\section1 Required tools
- See \l{Qt for Symbian platform Requirements} to see what tools are
+ See \l{Qt for Symbian Platform Requirements} to see what tools are
required to use Qt for Symbian platform.
\section1 Installing Qt and running demos
- Follow the instructions found in \l{Installing Qt on the Symbian platform using binary package} to learn how
- to install Qt using binary package and how to build and run Qt 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
diff --git a/doc/src/platforms/wince-introduction.qdoc b/doc/src/platforms/wince-introduction.qdoc
index 46ecbf666a..886b0840ba 100644
--- a/doc/src/platforms/wince-introduction.qdoc
+++ b/doc/src/platforms/wince-introduction.qdoc
@@ -65,7 +65,7 @@
\endlist
\o
\list
- \o \l {Windows CE OpenGL ES}{OpenGL ES}
+ \o \l {Qt for Windows CE Hardware Accelerated Graphics}{Hardware Accelerated Graphics}
\o \l {Qt Performance Tuning}
\o \l {Fine-Tuning Features in Qt}
\endlist
diff --git a/doc/src/platforms/wince-opengl.qdoc b/doc/src/platforms/wince-opengl.qdoc
index 4fc4d7be64..0ea2ec65e5 100644
--- a/doc/src/platforms/wince-opengl.qdoc
+++ b/doc/src/platforms/wince-opengl.qdoc
@@ -41,58 +41,48 @@
/*!
\page windowsce-opengl.html
- \title Windows CE OpenGL ES
+ \title Qt for Windows CE and OpenGL ES
\ingroup qtce
\brief Information about support for OpenGL ES with Qt for Windows CE.
- \section1 Introduction
+ \input platforms/emb-opengl.qdocinc
- \l {http://www.opengl.org}{OpenGL} is an industry standard API for 2D/3D
- graphics. It provides a powerful, low-level interface between software
- and acceleration hardware, and it is operating system and window system
- independent.
+\section1 Using OpenGL with Qt for Windows CE
+Qt for Windows CE uses EGL 1.1 to embed OpenGL ES windows within the
+Windows CE window manager.
- \l {http://www.khronos.org/opengles}{OpenGL ES} is a subset of the
- \l {http://www.opengl.org}{OpenGL} standard. It is meant for use in
- embedded systems. Hence, it has a smaller, more constrained API.
+\section2 Configure
- Qt for Windows CE uses EGL 1.1 to embed OpenGL ES windows within the
- Windows CE window manager.
+To configure Qt for Windows Mobile 5.0 and OpenGL ES Common Lite support
+you can run \c{configure} like this:
- To use OpenGL ES enabled widgets in a Qt for Windows CE application, you
- only need to subclass QGLWidget and draw on instances of the subclass with
- OpenGL ES functions.
-
- OpenGL ES includes profiles for floating-point and fixed-point arithmetic.
- The floating point profile is called OpenGL ES CM (Common) and the
- fixed-point profile is called OpenGL ES CL (Common Lite).
-
- You can run \c{configure} with the \c{-opengl-es-cm} option for the Common
- profile or \c{-opengl-es-cl} for the Common Lite profile. In both cases,
- ensure that the \c{lib} and \c{includes} paths include the OpenGL ES
- headers and libararies from your SDK. The OpenGL ES lib should be called
- either \c{libGLES_CM.lib} for the Common profile or \c{libGLES_CL.lib}
- for the Common Lite profile.
+ \snippet doc/src/snippets/code/doc_src_wince-opengl.qdoc 0
- To configure Qt for Windows Mobile 5.0 and OpenGL ES Common Lite support
- you can run \c{configure} like this:
+OpenGL ES includes profiles for floating-point and fixed-point arithmetic.
+The floating point profile is called OpenGL ES CM (Common) and the
+fixed-point profile is called OpenGL ES CL (Common Lite).
- \snippet doc/src/snippets/code/doc_src_wince-opengl.qdoc 0
+You can run \c{configure} with the \c{-opengl-es-cm} option for the Common
+profile or \c{-opengl-es-cl} for the Common Lite profile. In both cases,
+ensure that the \c{lib} and \c{includes} paths include the OpenGL ES
+headers and libararies from your SDK. The OpenGL ES lib should be called
+either \c{libGLES_CM.lib} for the Common profile or \c{libGLES_CL.lib} for
+the Common Lite profile.
- The distinction between the Common and Common Lite profiles is important,
- because the Common Lite profile has less functionality and only supports a
- fixed-point vertex format.
+The distinction between the Common and Common Lite profiles is important,
+because the Common Lite profile has less functionality and only supports a
+fixed-point vertex format.
- To start programming with Qt and OpenGL ES on Windows CE, you can start
- with the \l{Hello GL ES Example}. This example shows how to use QGLWidget
- and QGLPainter with OpenGL ES. It also provides some hints on how to port
- OpenGL code to OpenGL ES.
+To start programming with Qt and OpenGL ES on Windows CE, you can start
+with the \l{Hello GL ES Example}. This example shows how to use QGLWidget
+and QGLPainter with OpenGL ES. It also provides some hints on how to port
+OpenGL code to OpenGL ES.
- \section2 Using OpenGL to Accelerate Normal 2D Painting
+\section2 Using OpenGL to Accelerate Normal 2D Painting
- Qt provides QOpenGLPaintEngine, a subclass of QPaintEngine that translates
- QPainter operations into OpenGL calls. This is especially convenient for
- drawing text or QImage objects in an OpenGL ES context. For further
- details, refer to the \l{Hello GL ES Example}.
+Qt provides QOpenGLPaintEngine, a subclass of QPaintEngine that translates
+QPainter operations into OpenGL calls. This is especially convenient for
+drawing text or QImage objects in an OpenGL ES context. For further
+details, refer to the \l{Hello GL ES Example}.
*/
diff --git a/doc/src/platforms/wince-openvg.qdoc b/doc/src/platforms/wince-openvg.qdoc
new file mode 100644
index 0000000000..047c6553a0
--- /dev/null
+++ b/doc/src/platforms/wince-openvg.qdoc
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** 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 windowsce-openvg.html
+ \title Qt for Windows CE and OpenVG
+ \ingroup qtce
+ \brief Information about support for OpenVG with Qt for Windows CE.
+
+ \input platforms/emb-openvg.qdocinc
+
+\section1 Using OpenVG with Qt for Windows CE
+Qt for Windows CE uses EGL 1.1 to embed OpenVG windows within the Windows
+CE window manager.
+
+\note Make sure that your Windows CE SDK have a working EGL implementation.
+If not, OpenVG will not work.
+
+\note There is currently no support for Blitting and Alpha blending in Qt
+for Windows CE.
+
+\note To configure Qt for Windows Mobile 5.0 and OpenVG support you can run
+\c{configure} like this:
+
+ \snippet doc/src/snippets/code/doc_src_wince-opengl.qdoc 0
+
+*/
diff --git a/doc/src/platforms/wince-signing.qdoc b/doc/src/platforms/wince-signing.qdoc
new file mode 100644
index 0000000000..fa383b34ea
--- /dev/null
+++ b/doc/src/platforms/wince-signing.qdoc
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** 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 windowsce-signing.html
+ \ingroup qtce
+ \title Windows CE - Signing
+ \brief How to sign Qt projects for use with Windows CE.
+
+ \section1 Signing on Windows CE
+
+Windows CE provides a security mechanism to ask the user to confirm
+that they want to use an application/library that is unknown to the
+system. This process gets repeated for each dependency of an
+application, meaning each library the application links to, which is
+not recognized yet.
+
+To simplify this process you can use signatures and certificates. A
+certificate gets installed on the device and each file which is
+signed with the according certificate can be launched without the
+security warning.
+
+If you want to use signatures for your project written in Qt,
+configure provides the \c -signature option. You need to specify the
+location of the .pfx file and qmake adds the signing step to the
+build rules.
+
+If you need to select a separate signature for a specific project,
+or you only want to sign a single project, you can use the
+"SIGNATURE_FILE = foo.pfx" rule inside the project file.
+
+The above described rules apply for command line makefiles as well as
+Visual Studio projects generated by qmake.
+
+Microsoft usually ships development signatures inside the SDK packages.
+You can find them in the Tools subdirectory of the SDK root folder.
+
+Example:
+
+\list
+\o Calling configure with signing enabled:
+\code
+configure.exe -platform win32-msvc2005 -xplatform wincewm50pocket-msvc2005 -signature C:\some\path\SDKSamplePrivDeveloper.pfx
+\endcode
+
+\o Using pro file to specify signature
+\code
+...
+TARGET = foo
+
+wince*: {
+ SIGNATURE_FILE = somepath\customSignature.pfx
+}
+...
+\endcode
+\endlist
+
+*/
diff --git a/doc/src/platforms/winsystem.qdoc b/doc/src/platforms/winsystem.qdoc
index f427d6e99f..72e7da60b5 100644
--- a/doc/src/platforms/winsystem.qdoc
+++ b/doc/src/platforms/winsystem.qdoc
@@ -43,6 +43,7 @@
\page winsystem.html
\title Window System Specific Notes
\ingroup platform-specific
+ \brief Collections of notes about Qt implementations on different window systems.
Qt is a cross-platform GUI toolkit, so almost the entire API is the
same on all platforms and window systems. If you wish to use
@@ -95,4 +96,15 @@
When compiling for this platform, the macro \c{Q_WS_QWS} is
defined (the window system is literally the Qt Window System). See
the \l{Qt for Embedded Linux} documentation for more information.
+
+ \section1 Qt for Windows CE
+
+ 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
+
+ When compiling for this platform, the macro \c{Q_WS_S60} is defined.
+ See the \l{Symbian Platform - Introduction to Qt} documentation for
+ more information.
*/
diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc
index 494398405b..49114260cb 100644
--- a/doc/src/qt4-intro.qdoc
+++ b/doc/src/qt4-intro.qdoc
@@ -664,7 +664,7 @@
See the \l{QtMultimedia Module} documentation for more information.
- \section1 New Classes, Functions, Macros, etc
+ \section1 New Classes, Functions, Macros, etc.
Links to new classes, functions, macros, and other items
introduced in Qt 4.6.
diff --git a/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp b/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp
index e87408a55f..52fbd1a8f8 100644
--- a/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp
@@ -234,7 +234,7 @@ ba.indexOf("X"); // returns -1
//! [23]
QByteArray x("crazy azimuths");
-QByteArray y("azy");
+QByteArray y("az");
x.lastIndexOf(y); // returns 6
x.lastIndexOf(y, 6); // returns 6
x.lastIndexOf(y, 5); // returns 2
diff --git a/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp b/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
index 29972974b0..9a15f199b9 100644
--- a/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
+++ b/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
@@ -40,32 +40,32 @@
****************************************************************************/
//! [0]
-QGLShader shader(QGLShader::VertexShader);
-shader.compile(code);
+QGLShader shader(QGLShader::Vertex);
+shader.compileSourceCode(code);
QGLShaderProgram program(context);
program.addShader(shader);
program.link();
-program.enable();
+program.bind();
//! [0]
//! [1]
-program.addShader(QGLShader::VertexShader,
+program.addShaderFromSourceCode(QGLShader::Vertex,
"attribute highp vec4 vertex;\n"
"attribute mediump mat4 matrix;\n"
"void main(void)\n"
"{\n"
" gl_Position = matrix * vertex;\n"
"}");
-program.addShader(QGLShader::FragmentShader,
+program.addShaderFromSourceCode(QGLShader::Fragment,
"uniform mediump vec4 color;\n"
"void main(void)\n"
"{\n"
" gl_FragColor = color;\n"
"}");
program.link();
-program.enable();
+program.bind();
int vertexLocation = program.attributeLocation("vertex");
int matrixLocation = program.attributeLocation("matrix");
@@ -84,9 +84,12 @@ QColor color(0, 255, 0, 255);
QMatrix4x4 pmvMatrix;
pmvMatrix.ortho(rect());
+program.enableAttributeArray(vertexLocation);
program.setAttributeArray(vertexLocation, triangleVertices, 3);
program.setUniformValue(matrixLocation, pmvMatrix);
program.setUniformValue(colorLocation, color);
glDrawArrays(GL_TRIANGLES, 0, 3);
+
+program.disableAttributeArray(vertexLocation);
//! [2]
diff --git a/examples/gestures/imagegestures/imagewidget.cpp b/examples/gestures/imagegestures/imagewidget.cpp
index f615129103..afa0185efd 100644
--- a/examples/gestures/imagegestures/imagewidget.cpp
+++ b/examples/gestures/imagegestures/imagewidget.cpp
@@ -50,7 +50,8 @@ ImageWidget::ImageWidget(QWidget *parent)
horizontalOffset(0),
verticalOffset(0),
rotationAngle(0),
- scaleFactor(1)
+ scaleFactor(1),
+ currentStepScaleFactor(1)
{
setMinimumSize(QSize(100,100));
@@ -75,7 +76,6 @@ bool ImageWidget::event(QEvent *event)
void ImageWidget::paintEvent(QPaintEvent*)
{
QPainter p(this);
- p.fillRect(rect(), Qt::white);
float iw = currentImage.width();
float ih = currentImage.height();
@@ -85,7 +85,7 @@ void ImageWidget::paintEvent(QPaintEvent*)
p.translate(ww/2, wh/2);
p.translate(horizontalOffset, verticalOffset);
p.rotate(rotationAngle);
- p.scale(scaleFactor, scaleFactor);
+ p.scale(currentStepScaleFactor * scaleFactor, currentStepScaleFactor * scaleFactor);
p.translate(-iw/2, -ih/2);
p.drawImage(0, 0, currentImage);
}
@@ -94,6 +94,7 @@ void ImageWidget::mouseDoubleClickEvent(QMouseEvent *)
{
rotationAngle = 0;
scaleFactor = 1;
+ currentStepScaleFactor = 1;
verticalOffset = 0;
horizontalOffset = 0;
update();
@@ -102,12 +103,12 @@ void ImageWidget::mouseDoubleClickEvent(QMouseEvent *)
//! [gesture event handler]
bool ImageWidget::gestureEvent(QGestureEvent *event)
{
- if (QGesture *pan = event->gesture(Qt::PanGesture))
+ if (QGesture *swipe = event->gesture(Qt::SwipeGesture))
+ swipeTriggered(static_cast<QSwipeGesture *>(swipe));
+ else if (QGesture *pan = event->gesture(Qt::PanGesture))
panTriggered(static_cast<QPanGesture *>(pan));
if (QGesture *pinch = event->gesture(Qt::PinchGesture))
pinchTriggered(static_cast<QPinchGesture *>(pinch));
- if (QGesture *swipe = event->gesture(Qt::SwipeGesture))
- swipeTriggered(static_cast<QSwipeGesture *>(swipe));
return true;
}
//! [gesture event handler]
@@ -140,8 +141,11 @@ void ImageWidget::pinchTriggered(QPinchGesture *gesture)
}
if (changeFlags & QPinchGesture::ScaleFactorChanged) {
qreal value = gesture->property("scaleFactor").toReal();
- qreal lastValue = gesture->property("lastScaleFactor").toReal();
- scaleFactor += value - lastValue;
+ currentStepScaleFactor = value;
+ }
+ if (gesture->state() == Qt::GestureFinished) {
+ scaleFactor *= currentStepScaleFactor;
+ currentStepScaleFactor = 1;
}
update();
}
@@ -149,12 +153,14 @@ void ImageWidget::pinchTriggered(QPinchGesture *gesture)
//! [swipe function]
void ImageWidget::swipeTriggered(QSwipeGesture *gesture)
{
- if (gesture->horizontalDirection() == QSwipeGesture::Left
+ if (gesture->state() == Qt::GestureFinished) {
+ if (gesture->horizontalDirection() == QSwipeGesture::Left
|| gesture->verticalDirection() == QSwipeGesture::Up)
- goPrevImage();
- else
- goNextImage();
- update();
+ goPrevImage();
+ else
+ goNextImage();
+ update();
+ }
}
//! [swipe function]
diff --git a/examples/gestures/imagegestures/imagewidget.h b/examples/gestures/imagegestures/imagewidget.h
index 56e2316d72..7a68488d50 100644
--- a/examples/gestures/imagegestures/imagewidget.h
+++ b/examples/gestures/imagegestures/imagewidget.h
@@ -93,6 +93,7 @@ private:
float verticalOffset;
float rotationAngle;
float scaleFactor;
+ float currentStepScaleFactor;
//! [class definition end]
};
//! [class definition end]
diff --git a/examples/graphicsview/graphicsview.pro b/examples/graphicsview/graphicsview.pro
index a919c74909..210ab1f739 100644
--- a/examples/graphicsview/graphicsview.pro
+++ b/examples/graphicsview/graphicsview.pro
@@ -9,7 +9,8 @@ SUBDIRS = \
diagramscene \
dragdroprobot \
flowlayout \
- anchorlayout
+ anchorlayout \
+ weatheranchorlayout
contains(QT_CONFIG, qt3support):SUBDIRS += portedcanvas portedasteroids
contains(DEFINES, QT_NO_CURSOR)|contains(DEFINES, QT_NO_DRAGANDDROP): SUBDIRS -= dragdroprobot
diff --git a/examples/graphicsview/weatheranchorlayout/images/5days.jpg b/examples/graphicsview/weatheranchorlayout/images/5days.jpg
new file mode 100644
index 0000000000..fd92ba8ba7
--- /dev/null
+++ b/examples/graphicsview/weatheranchorlayout/images/5days.jpg
Binary files differ
diff --git a/examples/graphicsview/weatheranchorlayout/images/details.jpg b/examples/graphicsview/weatheranchorlayout/images/details.jpg
new file mode 100644
index 0000000000..fde0448c69
--- /dev/null
+++ b/examples/graphicsview/weatheranchorlayout/images/details.jpg
Binary files differ
diff --git a/examples/graphicsview/weatheranchorlayout/images/place.jpg b/examples/graphicsview/weatheranchorlayout/images/place.jpg
new file mode 100644
index 0000000000..03e5344330
--- /dev/null
+++ b/examples/graphicsview/weatheranchorlayout/images/place.jpg
Binary files differ
diff --git a/examples/graphicsview/weatheranchorlayout/images/tabbar.jpg b/examples/graphicsview/weatheranchorlayout/images/tabbar.jpg
new file mode 100644
index 0000000000..7777662901
--- /dev/null
+++ b/examples/graphicsview/weatheranchorlayout/images/tabbar.jpg
Binary files differ
diff --git a/examples/graphicsview/weatheranchorlayout/images/title.jpg b/examples/graphicsview/weatheranchorlayout/images/title.jpg
new file mode 100644
index 0000000000..fa84c8156c
--- /dev/null
+++ b/examples/graphicsview/weatheranchorlayout/images/title.jpg
Binary files differ
diff --git a/examples/graphicsview/weatheranchorlayout/images/weather-few-clouds.png b/examples/graphicsview/weatheranchorlayout/images/weather-few-clouds.png
new file mode 100644
index 0000000000..eea6ce6529
--- /dev/null
+++ b/examples/graphicsview/weatheranchorlayout/images/weather-few-clouds.png
Binary files differ
diff --git a/examples/graphicsview/weatheranchorlayout/main.cpp b/examples/graphicsview/weatheranchorlayout/main.cpp
new file mode 100644
index 0000000000..900282829a
--- /dev/null
+++ b/examples/graphicsview/weatheranchorlayout/main.cpp
@@ -0,0 +1,275 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QLabel>
+#include <QPainter>
+#include <QPushButton>
+#include <QApplication>
+
+#include <QGraphicsView>
+#include <QGraphicsScene>
+#include <QGraphicsWidget>
+#include <QGraphicsProxyWidget>
+#include <QGraphicsAnchorLayout>
+#include <QGraphicsSceneResizeEvent>
+
+
+class PixmapWidget : public QGraphicsLayoutItem
+{
+
+public:
+ PixmapWidget(const QPixmap &pix) : QGraphicsLayoutItem()
+ {
+ original = new QGraphicsPixmapItem(pix);
+ setGraphicsItem(original);
+ original->show();
+ r = QRectF(QPointF(0, 0), pix.size());
+ }
+
+ ~PixmapWidget()
+ {
+ setGraphicsItem(0);
+ delete original;
+ }
+
+ void setZValue(qreal z)
+ {
+ original->setZValue(z);
+ }
+
+ void setGeometry (const QRectF &rect)
+ {
+ original->scale(rect.width() / r.width(), rect.height() / r.height());
+ original->setPos(rect.x(), rect.y());
+ r = rect;
+ }
+
+protected:
+ QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const
+ {
+ Q_UNUSED(constraint);
+ QSizeF sh;
+ switch (which) {
+ case Qt::MinimumSize:
+ sh = QSizeF(0, 0);
+ break;
+ case Qt::PreferredSize:
+ sh = QSizeF(50, 50);
+ break;
+ case Qt::MaximumSize:
+ sh = QSizeF(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
+ break;
+ }
+ return sh;
+ }
+
+private:
+ QGraphicsPixmapItem *original;
+ QRectF r;
+};
+
+
+class PlaceWidget : public QGraphicsWidget
+{
+ Q_OBJECT
+
+public:
+ PlaceWidget(const QPixmap &pix) : QGraphicsWidget(), original(pix), scaled(pix)
+ {
+ }
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*)
+ {
+ QPointF reflection = QPointF();
+ reflection.setY(scaled.height() + 2);
+
+ painter->drawPixmap(QPointF(), scaled);
+
+ QPixmap tmp(scaled.size());
+ tmp.fill(Qt::transparent);
+ QPainter p(&tmp);
+
+ // create gradient
+ QPoint p1(scaled.width() / 2, 0);
+ QPoint p2(scaled.width() / 2, scaled.height());
+ QLinearGradient linearGrad(p1, p2);
+ linearGrad.setColorAt(0, QColor(0, 0, 0, 0));
+ linearGrad.setColorAt(0.65, QColor(0, 0, 0, 127));
+ linearGrad.setColorAt(1, QColor(0, 0, 0, 255));
+
+ // apply 'mask'
+ p.setBrush(linearGrad);
+ p.fillRect(0, 0, tmp.width(), tmp.height(), QBrush(linearGrad));
+ p.fillRect(0, 0, tmp.width(), tmp.height(), QBrush(linearGrad));
+
+ // paint the image flipped
+ p.setCompositionMode(QPainter::CompositionMode_DestinationOver);
+ p.drawPixmap(0, 0, QPixmap::fromImage(scaled.toImage().mirrored(false, true)));
+ p.end();
+
+ painter->drawPixmap(reflection, tmp);
+ }
+
+ void resizeEvent(QGraphicsSceneResizeEvent *event)
+ {
+ QSize newSize = event->newSize().toSize();
+ newSize.setHeight(newSize.height() / 2);
+ scaled = original.scaled(newSize);
+ }
+
+ QRectF boundingRect() const
+ {
+ QSize size(scaled.width(), scaled.height() * 2 + 2);
+ return QRectF(QPointF(0, 0), size);
+ }
+
+private:
+ QPixmap original;
+ QPixmap scaled;
+};
+
+
+static QGraphicsProxyWidget *createItem(const QString &name = "Unnamed")
+{
+ QGraphicsProxyWidget *w = new QGraphicsProxyWidget;
+ w->setWidget(new QPushButton(name));
+ w->setData(0, name);
+ w->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
+ return w;
+}
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(weatheranchorlayout);
+
+ QApplication app(argc, argv);
+
+ QGraphicsScene scene;
+ scene.setSceneRect(0, 0, 800, 480);
+
+#ifdef DEBUG_MODE
+ QGraphicsProxyWidget *title = createItem("Title");
+ QGraphicsProxyWidget *place = createItem("Place");
+ QGraphicsProxyWidget *sun = createItem("Sun");
+ QGraphicsProxyWidget *details = createItem("Details");
+ QGraphicsProxyWidget *tabbar = createItem("Tabbar");
+#else
+ // pixmaps widgets
+ PixmapWidget *title = new PixmapWidget(QPixmap(":/images/title.jpg"));
+ PlaceWidget *place = new PlaceWidget(QPixmap(":/images/place.jpg"));
+ PixmapWidget *details = new PixmapWidget(QPixmap(":/images/5days.jpg"));
+ PixmapWidget *sun = new PixmapWidget(QPixmap(":/images/weather-few-clouds.png"));
+ PixmapWidget *tabbar = new PixmapWidget(QPixmap(":/images/tabbar.jpg"));
+#endif
+
+
+ // setup sizes
+ title->setPreferredSize(QSizeF(348, 45));
+ title->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+
+ place->setPreferredSize(QSizeF(96, 72));
+ place->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+
+ details->setMinimumSize(QSizeF(200, 112));
+ details->setPreferredSize(QSizeF(200, 112));
+ details->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+
+ tabbar->setPreferredSize(QSizeF(70, 24));
+ tabbar->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+
+ sun->setPreferredSize(QSizeF(128, 97));
+ sun->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+ sun->setZValue(9999);
+
+ // start anchor layout
+ QGraphicsAnchorLayout *l = new QGraphicsAnchorLayout;
+ l->setSpacing(0);
+
+ // setup the main widget
+ QGraphicsWidget *w = new QGraphicsWidget(0, Qt::Window);
+ QPalette p;
+ p.setColor(QPalette::Window, Qt::black);
+ w->setPalette(p);
+ w->setPos(20, 20);
+ w->setLayout(l);
+
+ // vertical anchors
+ QGraphicsAnchor *anchor = l->addAnchor(title, Qt::AnchorTop, l, Qt::AnchorTop);
+ anchor = l->addAnchor(place, Qt::AnchorTop, title, Qt::AnchorBottom);
+ anchor->setSpacing(12);
+ anchor = l->addAnchor(place, Qt::AnchorBottom, l, Qt::AnchorBottom);
+ anchor->setSpacing(12);
+
+ anchor = l->addAnchor(sun, Qt::AnchorTop, title, Qt::AnchorTop);
+ anchor = l->addAnchor(sun, Qt::AnchorBottom, l, Qt::AnchorVerticalCenter);
+
+ anchor = l->addAnchor(tabbar, Qt::AnchorTop, title, Qt::AnchorBottom);
+ anchor->setSpacing(5);
+ anchor = l->addAnchor(details, Qt::AnchorTop, tabbar, Qt::AnchorBottom);
+ anchor->setSpacing(2);
+ anchor = l->addAnchor(details, Qt::AnchorBottom, l, Qt::AnchorBottom);
+ anchor->setSpacing(12);
+
+ // horizontal anchors
+ anchor = l->addAnchor(l, Qt::AnchorLeft, title, Qt::AnchorLeft);
+ anchor = l->addAnchor(title, Qt::AnchorRight, l, Qt::AnchorRight);
+
+ anchor = l->addAnchor(place, Qt::AnchorLeft, l, Qt::AnchorLeft);
+ anchor->setSpacing(15);
+ anchor = l->addAnchor(place, Qt::AnchorRight, details, Qt::AnchorLeft);
+ anchor->setSpacing(35);
+
+ anchor = l->addAnchor(sun, Qt::AnchorLeft, place, Qt::AnchorHorizontalCenter);
+ anchor = l->addAnchor(sun, Qt::AnchorRight, l, Qt::AnchorHorizontalCenter);
+
+ anchor = l->addAnchor(tabbar, Qt::AnchorHorizontalCenter, details, Qt::AnchorHorizontalCenter);
+ anchor = l->addAnchor(details, Qt::AnchorRight, l, Qt::AnchorRight);
+
+ // QGV setup
+ scene.addItem(w);
+ scene.setBackgroundBrush(Qt::white);
+ QGraphicsView *view = new QGraphicsView(&scene);
+ view->show();
+
+ return app.exec();
+}
+
+#include "main.moc"
diff --git a/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.pro b/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.pro
new file mode 100644
index 0000000000..fa2733c875
--- /dev/null
+++ b/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.pro
@@ -0,0 +1,14 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Tue May 12 15:22:25 2009
+######################################################################
+
+# Input
+SOURCES += main.cpp
+RESOURCES += weatheranchorlayout.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/weatheranchorlayout
+sources.files = $$SOURCES $$HEADERS $$RESOURCES weatheranchorlayout.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/weatheranchorlayout
+INSTALLS += target sources
+
diff --git a/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.qrc b/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.qrc
new file mode 100644
index 0000000000..e39f8c0423
--- /dev/null
+++ b/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.qrc
@@ -0,0 +1,10 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/5days.jpg</file>
+ <file>images/title.jpg</file>
+ <file>images/place.jpg</file>
+ <file>images/tabbar.jpg</file>
+ <file>images/details.jpg</file>
+ <file>images/weather-few-clouds.png</file>
+</qresource>
+</RCC>
diff --git a/examples/network/googlesuggest/googlesuggest.cpp b/examples/network/googlesuggest/googlesuggest.cpp
index e1588a6b93..a1075ec803 100644
--- a/examples/network/googlesuggest/googlesuggest.cpp
+++ b/examples/network/googlesuggest/googlesuggest.cpp
@@ -39,17 +39,22 @@
**
****************************************************************************/
-#include <QtCore>
-#include <QtGui>
-#include <QtNetwork>
+//! [1]
#include "googlesuggest.h"
#define GSUGGEST_URL "http://google.com/complete/search?output=toolbar&q=%1"
+//! [1]
+//! [2]
GSuggestCompletion::GSuggestCompletion(QLineEdit *parent): QObject(parent), editor(parent)
{
popup = new QTreeWidget;
+ popup->setWindowFlags(Qt::Popup);
+ popup->setFocusPolicy(Qt::NoFocus);
+ popup->setFocusProxy(parent);
+ popup->setMouseTracking(true);
+
popup->setColumnCount(2);
popup->setUniformRowHeights(true);
popup->setRootIsDecorated(false);
@@ -57,18 +62,13 @@ GSuggestCompletion::GSuggestCompletion(QLineEdit *parent): QObject(parent), edit
popup->setSelectionBehavior(QTreeWidget::SelectRows);
popup->setFrameStyle(QFrame::Box | QFrame::Plain);
popup->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-
popup->header()->hide();
+
popup->installEventFilter(this);
- popup->setMouseTracking(true);
connect(popup, SIGNAL(itemClicked(QTreeWidgetItem*, int)),
SLOT(doneCompletion()));
- popup->setWindowFlags(Qt::Popup);
- popup->setFocusPolicy(Qt::NoFocus);
- popup->setFocusProxy(parent);
-
timer = new QTimer(this);
timer->setSingleShot(true);
timer->setInterval(500);
@@ -79,12 +79,16 @@ GSuggestCompletion::GSuggestCompletion(QLineEdit *parent): QObject(parent), edit
this, SLOT(handleNetworkData(QNetworkReply*)));
}
+//! [2]
+//! [3]
GSuggestCompletion::~GSuggestCompletion()
{
delete popup;
}
+//! [3]
+//! [4]
bool GSuggestCompletion::eventFilter(QObject *obj, QEvent *ev)
{
if (obj != popup)
@@ -131,9 +135,12 @@ bool GSuggestCompletion::eventFilter(QObject *obj, QEvent *ev)
return false;
}
+//! [4]
+//! [5]
void GSuggestCompletion::showCompletion(const QStringList &choices, const QStringList &hits)
{
+
if (choices.isEmpty() || choices.count() != hits.count())
return;
@@ -163,7 +170,9 @@ void GSuggestCompletion::showCompletion(const QStringList &choices, const QStrin
popup->setFocus();
popup->show();
}
+//! [5]
+//! [6]
void GSuggestCompletion::doneCompletion()
{
timer->stop();
@@ -172,26 +181,28 @@ void GSuggestCompletion::doneCompletion()
QTreeWidgetItem *item = popup->currentItem();
if (item) {
editor->setText(item->text(0));
- QKeyEvent *e;
- e = new QKeyEvent(QEvent::KeyPress, Qt::Key_Enter, Qt::NoModifier);
- QApplication::postEvent(editor, e);
- e = new QKeyEvent(QEvent::KeyRelease, Qt::Key_Enter, Qt::NoModifier);
- QApplication::postEvent(editor, e);
+ QMetaObject::invokeMethod(editor, "returnPressed");
}
}
+//! [6]
-void GSuggestCompletion::preventSuggest()
-{
- timer->stop();
-}
-
+//! [7]
void GSuggestCompletion::autoSuggest()
{
QString str = editor->text();
QString url = QString(GSUGGEST_URL).arg(str);
networkManager.get(QNetworkRequest(QString(url)));
}
+//! [7]
+
+//! [8]
+void GSuggestCompletion::preventSuggest()
+{
+ timer->stop();
+}
+//! [8]
+//! [9]
void GSuggestCompletion::handleNetworkData(QNetworkReply *networkReply)
{
QUrl url = networkReply->url();
@@ -199,20 +210,20 @@ void GSuggestCompletion::handleNetworkData(QNetworkReply *networkReply)
QStringList choices;
QStringList hits;
- QString response(networkReply->readAll());
+ QByteArray response(networkReply->readAll());
QXmlStreamReader xml(response);
while (!xml.atEnd()) {
xml.readNext();
- if (xml.isStartElement()) {
+ if (xml.tokenType() == QXmlStreamReader::StartElement)
if (xml.name() == "suggestion") {
QStringRef str = xml.attributes().value("data");
choices << str.toString();
}
- else if (xml.name() == "num_queries") {
+ if (xml.tokenType() == QXmlStreamReader::StartElement)
+ if (xml.name() == "num_queries") {
QStringRef str = xml.attributes().value("int");
hits << str.toString();
}
- }
}
showCompletion(choices, hits);
@@ -220,3 +231,4 @@ void GSuggestCompletion::handleNetworkData(QNetworkReply *networkReply)
networkReply->deleteLater();
}
+//! [9] \ No newline at end of file
diff --git a/examples/network/googlesuggest/googlesuggest.h b/examples/network/googlesuggest/googlesuggest.h
index 2a3c87853f..c33df360ab 100644
--- a/examples/network/googlesuggest/googlesuggest.h
+++ b/examples/network/googlesuggest/googlesuggest.h
@@ -42,8 +42,9 @@
#ifndef GOOGLESUGGEST_H
#define GOOGLESUGGEST_H
+#include <QtGui>
+#include <QtNetwork>
#include <QObject>
-#include <QNetworkAccessManager>
QT_BEGIN_NAMESPACE
class QLineEdit;
@@ -52,6 +53,7 @@ class QTimer;
class QTreeWidget;
QT_END_NAMESPACE
+//! [1]
class GSuggestCompletion : public QObject
{
Q_OBJECT
@@ -75,6 +77,6 @@ private:
QTimer *timer;
QNetworkAccessManager networkManager;
};
-
+//! [1]
#endif // GOOGLESUGGEST_H
diff --git a/examples/network/googlesuggest/searchbox.cpp b/examples/network/googlesuggest/searchbox.cpp
index 21599e0ea6..ae08a75dde 100644
--- a/examples/network/googlesuggest/searchbox.cpp
+++ b/examples/network/googlesuggest/searchbox.cpp
@@ -47,12 +47,12 @@
#define GSEARCH_URL "http://www.google.com/search?q=%1"
-
+//! [1]
SearchBox::SearchBox(QWidget *parent): QLineEdit(parent)
{
completer = new GSuggestCompletion(this);
- connect(this, SIGNAL(returnPressed()), SLOT(doSearch()));
+ connect(this, SIGNAL(returnPressed()),this, SLOT(doSearch()));
setWindowTitle("Search with Google");
@@ -60,10 +60,13 @@ SearchBox::SearchBox(QWidget *parent): QLineEdit(parent)
resize(400, height());
setFocus();
}
+//! [1]
+//! [2]
void SearchBox::doSearch()
{
completer->preventSuggest();
QString url = QString(GSEARCH_URL).arg(text());
QDesktopServices::openUrl(QUrl(url));
}
+//! [2] \ No newline at end of file
diff --git a/examples/network/googlesuggest/searchbox.h b/examples/network/googlesuggest/searchbox.h
index 4b03dba20b..ec18bb090a 100644
--- a/examples/network/googlesuggest/searchbox.h
+++ b/examples/network/googlesuggest/searchbox.h
@@ -42,6 +42,7 @@
#ifndef SEARCHBOX_H
#define SEARCHBOX_H
+//! [1]
#include <QLineEdit>
class GSuggestCompletion;
@@ -58,6 +59,7 @@ protected slots:
private:
GSuggestCompletion *completer;
+//! [1]
};
diff --git a/examples/opengl/hellogl_es2/glwidget.cpp b/examples/opengl/hellogl_es2/glwidget.cpp
index a31c34a3c0..08e887af21 100644
--- a/examples/opengl/hellogl_es2/glwidget.cpp
+++ b/examples/opengl/hellogl_es2/glwidget.cpp
@@ -92,6 +92,8 @@ void GLWidget::showBubbles(bool bubbles)
void GLWidget::paintQtLogo()
{
+ program1.enableAttributeArray(normalAttr1);
+ program1.enableAttributeArray(vertexAttr1);
program1.setAttributeArray(vertexAttr1, vertices.constData());
program1.setAttributeArray(normalAttr1, normals.constData());
glDrawArrays(GL_TRIANGLES, 0, vertices.size());
@@ -159,6 +161,10 @@ void GLWidget::paintTexturedCube()
program2.setUniformValue(textureUniform2, 0); // use texture unit 0
+ program2.enableAttributeArray(vertexAttr2);
+ program2.enableAttributeArray(normalAttr2);
+ program2.enableAttributeArray(texCoordAttr2);
+
glDrawArrays(GL_TRIANGLES, 0, 36);
program2.disableAttributeArray(vertexAttr2);
@@ -173,7 +179,7 @@ void GLWidget::initializeGL ()
glGenTextures(1, &m_uiTexture);
m_uiTexture = bindTexture(QImage(":/qt.png"));
- QGLShader *vshader1 = new QGLShader(QGLShader::VertexShader, this);
+ QGLShader *vshader1 = new QGLShader(QGLShader::Vertex, this);
const char *vsrc1 =
"attribute highp vec4 vertex;\n"
"attribute mediump vec3 normal;\n"
@@ -188,16 +194,16 @@ void GLWidget::initializeGL ()
" color = clamp(color, 0.0, 1.0);\n"
" gl_Position = matrix * vertex;\n"
"}\n";
- vshader1->compile(vsrc1);
+ vshader1->compileSourceCode(vsrc1);
- QGLShader *fshader1 = new QGLShader(QGLShader::FragmentShader, this);
+ QGLShader *fshader1 = new QGLShader(QGLShader::Fragment, this);
const char *fsrc1 =
"varying mediump vec4 color;\n"
"void main(void)\n"
"{\n"
" gl_FragColor = color;\n"
"}\n";
- fshader1->compile(fsrc1);
+ fshader1->compileSourceCode(fsrc1);
program1.addShader(vshader1);
program1.addShader(fshader1);
@@ -207,7 +213,7 @@ void GLWidget::initializeGL ()
normalAttr1 = program1.attributeLocation("normal");
matrixUniform1 = program1.uniformLocation("matrix");
- QGLShader *vshader2 = new QGLShader(QGLShader::VertexShader);
+ QGLShader *vshader2 = new QGLShader(QGLShader::Vertex);
const char *vsrc2 =
"attribute highp vec4 vertex;\n"
"attribute highp vec4 texCoord;\n"
@@ -222,9 +228,9 @@ void GLWidget::initializeGL ()
" gl_Position = matrix * vertex;\n"
" texc = texCoord;\n"
"}\n";
- vshader2->compile(vsrc2);
+ vshader2->compileSourceCode(vsrc2);
- QGLShader *fshader2 = new QGLShader(QGLShader::FragmentShader);
+ QGLShader *fshader2 = new QGLShader(QGLShader::Fragment);
const char *fsrc2 =
"varying highp vec4 texc;\n"
"uniform sampler2D tex;\n"
@@ -235,7 +241,7 @@ void GLWidget::initializeGL ()
" color = color * 0.2 + color * 0.8 * angle;\n"
" gl_FragColor = vec4(clamp(color, 0.0, 1.0), 1.0);\n"
"}\n";
- fshader2->compile(fsrc2);
+ fshader2->compileSourceCode(fsrc2);
program2.addShader(vshader2);
program2.addShader(fshader2);
@@ -284,15 +290,15 @@ void GLWidget::paintGL()
modelview.translate(0.0f, -0.2f, 0.0f);
if (qtLogo) {
- program1.enable();
+ program1.bind();
program1.setUniformValue(matrixUniform1, modelview);
paintQtLogo();
- program1.disable();
+ program1.release();
} else {
- program2.enable();
+ program2.bind();
program1.setUniformValue(matrixUniform2, modelview);
paintTexturedCube();
- program2.disable();
+ program2.release();
}
glDisable(GL_DEPTH_TEST);
diff --git a/examples/opengl/textures/glwidget.cpp b/examples/opengl/textures/glwidget.cpp
index 6efd31a5bb..0f50e2dff8 100644
--- a/examples/opengl/textures/glwidget.cpp
+++ b/examples/opengl/textures/glwidget.cpp
@@ -99,7 +99,7 @@ void GLWidget::initializeGL()
#define PROGRAM_VERTEX_ATTRIBUTE 0
#define PROGRAM_TEXCOORD_ATTRIBUTE 1
- QGLShader *vshader = new QGLShader(QGLShader::VertexShader, this);
+ QGLShader *vshader = new QGLShader(QGLShader::Vertex, this);
const char *vsrc =
"attribute highp vec4 vertex;\n"
"attribute mediump vec4 texCoord;\n"
@@ -110,9 +110,9 @@ void GLWidget::initializeGL()
" gl_Position = matrix * vertex;\n"
" texc = texCoord;\n"
"}\n";
- vshader->compile(vsrc);
+ vshader->compileSourceCode(vsrc);
- QGLShader *fshader = new QGLShader(QGLShader::FragmentShader, this);
+ QGLShader *fshader = new QGLShader(QGLShader::Fragment, this);
const char *fsrc =
"uniform sampler2D texture;\n"
"varying mediump vec4 texc;\n"
@@ -120,7 +120,7 @@ void GLWidget::initializeGL()
"{\n"
" gl_FragColor = texture2D(texture, texc.st);\n"
"}\n";
- fshader->compile(fsrc);
+ fshader->compileSourceCode(fsrc);
program = new QGLShaderProgram(this);
program->addShader(vshader);
@@ -129,7 +129,7 @@ void GLWidget::initializeGL()
program->bindAttributeLocation("texCoord", PROGRAM_TEXCOORD_ATTRIBUTE);
program->link();
- program->enable();
+ program->bind();
program->setUniformValue("texture", 0);
#endif
@@ -163,6 +163,8 @@ void GLWidget::paintGL()
m.rotate(zRot / 16.0f, 0.0f, 0.0f, 1.0f);
program->setUniformValue("matrix", m);
+ program->enableAttributeArray(PROGRAM_VERTEX_ATTRIBUTE);
+ program->enableAttributeArray(PROGRAM_TEXCOORD_ATTRIBUTE);
program->setAttributeArray
(PROGRAM_VERTEX_ATTRIBUTE, vertices.constData());
program->setAttributeArray
diff --git a/examples/painting/svggenerator/svggenerator.pro b/examples/painting/svggenerator/svggenerator.pro
index 11346192ef..e0e48953e4 100644
--- a/examples/painting/svggenerator/svggenerator.pro
+++ b/examples/painting/svggenerator/svggenerator.pro
@@ -14,4 +14,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS svggenerator.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/painting/svggenerator
INSTALLS += target sources
-symbian:TARGET.UID3 = 0xA000CF68 \ No newline at end of file
+symbian {
+ TARGET.UID3 = 0xA000CF68
+ include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+}
diff --git a/examples/tools/regexp/regexpdialog.cpp b/examples/tools/regexp/regexpdialog.cpp
index 08c7a9725f..3becc2bab7 100644
--- a/examples/tools/regexp/regexpdialog.cpp
+++ b/examples/tools/regexp/regexpdialog.cpp
@@ -180,8 +180,8 @@ void RegExpDialog::refresh()
indexEdit->setText(QString::number(rx.indexIn(text)));
matchedLengthEdit->setText(QString::number(rx.matchedLength()));
for (int i = 0; i < MaxCaptures; ++i) {
- captureLabels[i]->setEnabled(i <= rx.numCaptures());
- captureEdits[i]->setEnabled(i <= rx.numCaptures());
+ captureLabels[i]->setEnabled(i <= rx.captureCount());
+ captureEdits[i]->setEnabled(i <= rx.captureCount());
captureEdits[i]->setText(rx.cap(i));
}
diff --git a/examples/webkit/fancybrowser/mainwindow.cpp b/examples/webkit/fancybrowser/mainwindow.cpp
index a3293b8c28..11fac91937 100644
--- a/examples/webkit/fancybrowser/mainwindow.cpp
+++ b/examples/webkit/fancybrowser/mainwindow.cpp
@@ -150,12 +150,11 @@ void MainWindow::highlightAllLinks()
//! [8]
void MainWindow::rotateImages(bool toggle)
{
- QString code = "$('img').each( function () { $(this).css('-webkit-transition', '-webkit-transform 2s') } )";
- view->page()->mainFrame()->evaluateJavaScript(code);
+ QString code;
if (toggle)
- code = "$('img').each( function () { $(this).css('-webkit-transform', 'rotate(180deg)') } )";
+ code = "$('img').each( function () { $(this).css('-webkit-transition', '-webkit-transform 2s'); $(this).css('-webkit-transform', 'rotate(180deg)') } )";
else
- code = "$('img').each( function () { $(this).css('-webkit-transform', 'rotate(0deg)') } )";
+ code = "$('img').each( function () { $(this).css('-webkit-transition', '-webkit-transform 2s'); $(this).css('-webkit-transform', 'rotate(0deg)') } )";
view->page()->mainFrame()->evaluateJavaScript(code);
}
//! [8]
diff --git a/examples/xmlpatterns/filetree/filetree.pro b/examples/xmlpatterns/filetree/filetree.pro
index 0238c23dce..1683491d9d 100644
--- a/examples/xmlpatterns/filetree/filetree.pro
+++ b/examples/xmlpatterns/filetree/filetree.pro
@@ -12,4 +12,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.xq *.html
sources.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/filetree
INSTALLS += target sources
-symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+symbian {
+ TARGET.UID3 = 0xA000D7C4
+ include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+}
diff --git a/examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.pro b/examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.pro
index 39f01062cc..5a63b2bbb5 100644
--- a/examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.pro
+++ b/examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.pro
@@ -11,3 +11,8 @@ target.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/qobjectxmlmodel
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.xq *.html
sources.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/qobjectxmlmodel
INSTALLS += target sources
+
+symbian {
+ TARGET.UID3 = 0xA000D7C8
+ include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+}
diff --git a/examples/xmlpatterns/recipes/recipes.pro b/examples/xmlpatterns/recipes/recipes.pro
index f02a018494..67d6d73401 100644
--- a/examples/xmlpatterns/recipes/recipes.pro
+++ b/examples/xmlpatterns/recipes/recipes.pro
@@ -10,4 +10,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.xq *.html forms files
sources.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/recipes
INSTALLS += target sources
-symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+symbian {
+ TARGET.UID3 = 0xA000D7C5
+ include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+}
diff --git a/examples/xmlpatterns/schema/schema.pro b/examples/xmlpatterns/schema/schema.pro
index af32e0a39b..4d3520c1a9 100644
--- a/examples/xmlpatterns/schema/schema.pro
+++ b/examples/xmlpatterns/schema/schema.pro
@@ -9,3 +9,8 @@ target.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/schema
sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.xq *.html files
sources.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/schema
INSTALLS += target sources
+
+symbian {
+ TARGET.UID3 = 0xA000D7C6
+ include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+}
diff --git a/examples/xmlpatterns/trafficinfo/trafficinfo.pro b/examples/xmlpatterns/trafficinfo/trafficinfo.pro
index 52bcc19f16..99825d0db9 100644
--- a/examples/xmlpatterns/trafficinfo/trafficinfo.pro
+++ b/examples/xmlpatterns/trafficinfo/trafficinfo.pro
@@ -7,3 +7,8 @@ target.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/trafficinfo
sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/trafficinfo
INSTALLS += target sources
+
+symbian {
+ TARGET.UID3 = 0xA000D7C7
+ include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+}
diff --git a/mkspecs/aix-g++-64/qplatformdefs.h b/mkspecs/aix-g++-64/qplatformdefs.h
index 5a1cda83be..25c86a26e2 100644
--- a/mkspecs/aix-g++-64/qplatformdefs.h
+++ b/mkspecs/aix-g++-64/qplatformdefs.h
@@ -109,6 +109,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -117,6 +118,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/aix-g++/qplatformdefs.h b/mkspecs/aix-g++/qplatformdefs.h
index 5a1cda83be..25c86a26e2 100644
--- a/mkspecs/aix-g++/qplatformdefs.h
+++ b/mkspecs/aix-g++/qplatformdefs.h
@@ -109,6 +109,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -117,6 +118,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/aix-xlc-64/qplatformdefs.h b/mkspecs/aix-xlc-64/qplatformdefs.h
index 0a0d11f5cd..a25ea42e98 100644
--- a/mkspecs/aix-xlc-64/qplatformdefs.h
+++ b/mkspecs/aix-xlc-64/qplatformdefs.h
@@ -105,6 +105,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -113,6 +114,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/aix-xlc/qplatformdefs.h b/mkspecs/aix-xlc/qplatformdefs.h
index b162513af4..38566003e5 100644
--- a/mkspecs/aix-xlc/qplatformdefs.h
+++ b/mkspecs/aix-xlc/qplatformdefs.h
@@ -105,6 +105,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -113,6 +114,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/common/symbian/qplatformdefs.h b/mkspecs/common/symbian/qplatformdefs.h
index 2d0e6e8612..c0756b2791 100644
--- a/mkspecs/common/symbian/qplatformdefs.h
+++ b/mkspecs/common/symbian/qplatformdefs.h
@@ -112,6 +112,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -120,6 +121,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
@@ -139,6 +141,7 @@
#define QT_CHDIR ::chdir
#define QT_MKDIR ::mkdir
#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE 0
#define QT_OPEN_RDONLY O_RDONLY
#define QT_OPEN_WRONLY O_WRONLY
#define QT_OPEN_RDWR O_RDWR
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index 1acfefe26f..79bac42461 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -50,17 +50,18 @@ QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
-QMAKE_LINK = g++
-QMAKE_LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
-QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads -Wl
+QMAKE_LINK =
+QMAKE_LFLAGS =
+QMAKE_LFLAGS.ARMCC =
+QMAKE_LFLAGS_EXCEPTIONS_ON =
QMAKE_LFLAGS_EXCEPTIONS_OFF =
-QMAKE_LFLAGS_RELEASE = -Wl,-s
-QMAKE_LFLAGS_DEBUG =
-QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console
-QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows
-QMAKE_LFLAGS_DLL = -shared
-QMAKE_LINK_OBJECT_MAX = 10
-QMAKE_LINK_OBJECT_SCRIPT= object_script
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_CONSOLE =
+QMAKE_LFLAGS_WINDOWS =
+QMAKE_LFLAGS_DLL =
+QMAKE_LINK_OBJECT_MAX =
+QMAKE_LINK_OBJECT_SCRIPT=
QMAKE_LIBS = -llibc -llibm -leuser -llibdl
QMAKE_LIBS_CORE = $$QMAKE_LIBS -llibpthread -lefsrv
diff --git a/mkspecs/common/wince/qplatformdefs.h b/mkspecs/common/wince/qplatformdefs.h
index f00ed713c7..52a34e9edc 100644
--- a/mkspecs/common/wince/qplatformdefs.h
+++ b/mkspecs/common/wince/qplatformdefs.h
@@ -97,6 +97,7 @@
#define QT_CHDIR ::_chdir
#define QT_MKDIR ::qt_wince__mkdir
#define QT_RMDIR ::qt_wince__rmdir
+#define QT_OPEN_LARGEFILE 0
#define QT_OPEN_RDONLY _O_RDONLY
#define QT_OPEN_WRONLY _O_WRONLY
#define QT_OPEN_RDWR _O_RDWR
@@ -111,6 +112,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
diff --git a/mkspecs/cygwin-g++/qplatformdefs.h b/mkspecs/cygwin-g++/qplatformdefs.h
index 78f739865c..6cf02f2e46 100644
--- a/mkspecs/cygwin-g++/qplatformdefs.h
+++ b/mkspecs/cygwin-g++/qplatformdefs.h
@@ -119,6 +119,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
diff --git a/mkspecs/darwin-g++/qplatformdefs.h b/mkspecs/darwin-g++/qplatformdefs.h
index 31e32f19f0..8ae5606499 100644
--- a/mkspecs/darwin-g++/qplatformdefs.h
+++ b/mkspecs/darwin-g++/qplatformdefs.h
@@ -79,6 +79,7 @@
#define QT_FTELL ::ftello
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T off_t
diff --git a/mkspecs/freebsd-g++/qplatformdefs.h b/mkspecs/freebsd-g++/qplatformdefs.h
index 470923a078..8b07cdc95f 100644
--- a/mkspecs/freebsd-g++/qplatformdefs.h
+++ b/mkspecs/freebsd-g++/qplatformdefs.h
@@ -81,6 +81,7 @@
#define QT_FTELL ::ftello
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T off_t
diff --git a/mkspecs/hpux-acc-64/qplatformdefs.h b/mkspecs/hpux-acc-64/qplatformdefs.h
index a8025d0140..7ef3d511e9 100644
--- a/mkspecs/hpux-acc-64/qplatformdefs.h
+++ b/mkspecs/hpux-acc-64/qplatformdefs.h
@@ -104,6 +104,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -112,6 +113,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/hpux-acc-o64/qplatformdefs.h b/mkspecs/hpux-acc-o64/qplatformdefs.h
index 4927cf9a95..e082d9d534 100644
--- a/mkspecs/hpux-acc-o64/qplatformdefs.h
+++ b/mkspecs/hpux-acc-o64/qplatformdefs.h
@@ -105,6 +105,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -113,6 +114,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/hpux-acc/qplatformdefs.h b/mkspecs/hpux-acc/qplatformdefs.h
index ec416cd092..7b540a1288 100644
--- a/mkspecs/hpux-acc/qplatformdefs.h
+++ b/mkspecs/hpux-acc/qplatformdefs.h
@@ -107,6 +107,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -115,6 +116,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/hpux-g++-64/qplatformdefs.h b/mkspecs/hpux-g++-64/qplatformdefs.h
index 31aa7ff560..a8d06d8554 100644
--- a/mkspecs/hpux-g++-64/qplatformdefs.h
+++ b/mkspecs/hpux-g++-64/qplatformdefs.h
@@ -104,6 +104,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -112,6 +113,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/hpux-g++/qplatformdefs.h b/mkspecs/hpux-g++/qplatformdefs.h
index 2c46b7dab0..d89a0263f3 100644
--- a/mkspecs/hpux-g++/qplatformdefs.h
+++ b/mkspecs/hpux-g++/qplatformdefs.h
@@ -106,6 +106,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -114,6 +115,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/hpuxi-acc-32/qplatformdefs.h b/mkspecs/hpuxi-acc-32/qplatformdefs.h
index f02de1f67f..466f27e497 100644
--- a/mkspecs/hpuxi-acc-32/qplatformdefs.h
+++ b/mkspecs/hpuxi-acc-32/qplatformdefs.h
@@ -105,6 +105,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -113,6 +114,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/hpuxi-acc-64/qplatformdefs.h b/mkspecs/hpuxi-acc-64/qplatformdefs.h
index f02de1f67f..466f27e497 100644
--- a/mkspecs/hpuxi-acc-64/qplatformdefs.h
+++ b/mkspecs/hpuxi-acc-64/qplatformdefs.h
@@ -105,6 +105,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -113,6 +114,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/hpuxi-g++-64/qplatformdefs.h b/mkspecs/hpuxi-g++-64/qplatformdefs.h
index 546a7b5597..d351af301c 100644
--- a/mkspecs/hpuxi-g++-64/qplatformdefs.h
+++ b/mkspecs/hpuxi-g++-64/qplatformdefs.h
@@ -104,6 +104,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -112,6 +113,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/hurd-g++/qplatformdefs.h b/mkspecs/hurd-g++/qplatformdefs.h
index d5aaf666d5..611252c8f6 100644
--- a/mkspecs/hurd-g++/qplatformdefs.h
+++ b/mkspecs/hurd-g++/qplatformdefs.h
@@ -87,6 +87,7 @@
#define QT_FTELL ::ftello
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T off_t
diff --git a/mkspecs/irix-cc-64/qplatformdefs.h b/mkspecs/irix-cc-64/qplatformdefs.h
index 6d436a1f47..bfb19ca64b 100644
--- a/mkspecs/irix-cc-64/qplatformdefs.h
+++ b/mkspecs/irix-cc-64/qplatformdefs.h
@@ -103,6 +103,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -111,6 +112,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/irix-cc/qplatformdefs.h b/mkspecs/irix-cc/qplatformdefs.h
index 6d436a1f47..bfb19ca64b 100644
--- a/mkspecs/irix-cc/qplatformdefs.h
+++ b/mkspecs/irix-cc/qplatformdefs.h
@@ -103,6 +103,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -111,6 +112,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/irix-g++/qplatformdefs.h b/mkspecs/irix-g++/qplatformdefs.h
index 8191c15fbf..4e2fda27b1 100644
--- a/mkspecs/irix-g++/qplatformdefs.h
+++ b/mkspecs/irix-g++/qplatformdefs.h
@@ -103,6 +103,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -111,6 +112,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/linux-cxx/qplatformdefs.h b/mkspecs/linux-cxx/qplatformdefs.h
index 5bf968644e..0c3a07e592 100644
--- a/mkspecs/linux-cxx/qplatformdefs.h
+++ b/mkspecs/linux-cxx/qplatformdefs.h
@@ -110,6 +110,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -118,6 +119,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/linux-ecc-64/qplatformdefs.h b/mkspecs/linux-ecc-64/qplatformdefs.h
index 5bf968644e..0c3a07e592 100644
--- a/mkspecs/linux-ecc-64/qplatformdefs.h
+++ b/mkspecs/linux-ecc-64/qplatformdefs.h
@@ -110,6 +110,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -118,6 +119,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/linux-g++-gles2-experimental/qplatformdefs.h b/mkspecs/linux-g++-gles2-experimental/qplatformdefs.h
index 14309160f5..ecfbc73881 100644
--- a/mkspecs/linux-g++-gles2-experimental/qplatformdefs.h
+++ b/mkspecs/linux-g++-gles2-experimental/qplatformdefs.h
@@ -110,6 +110,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -118,6 +119,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/linux-g++/qplatformdefs.h b/mkspecs/linux-g++/qplatformdefs.h
index 14309160f5..ecfbc73881 100644
--- a/mkspecs/linux-g++/qplatformdefs.h
+++ b/mkspecs/linux-g++/qplatformdefs.h
@@ -110,6 +110,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -118,6 +119,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/linux-kcc/qplatformdefs.h b/mkspecs/linux-kcc/qplatformdefs.h
index 48a289b717..65278c888a 100644
--- a/mkspecs/linux-kcc/qplatformdefs.h
+++ b/mkspecs/linux-kcc/qplatformdefs.h
@@ -113,6 +113,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -121,6 +122,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/linux-llvm/qplatformdefs.h b/mkspecs/linux-llvm/qplatformdefs.h
index 14309160f5..ecfbc73881 100644
--- a/mkspecs/linux-llvm/qplatformdefs.h
+++ b/mkspecs/linux-llvm/qplatformdefs.h
@@ -110,6 +110,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -118,6 +119,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/linux-lsb-g++/qplatformdefs.h b/mkspecs/linux-lsb-g++/qplatformdefs.h
index dc48a0891a..0928b71989 100644
--- a/mkspecs/linux-lsb-g++/qplatformdefs.h
+++ b/mkspecs/linux-lsb-g++/qplatformdefs.h
@@ -114,6 +114,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -122,6 +123,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/linux-pgcc/qplatformdefs.h b/mkspecs/linux-pgcc/qplatformdefs.h
index 5bf968644e..0c3a07e592 100644
--- a/mkspecs/linux-pgcc/qplatformdefs.h
+++ b/mkspecs/linux-pgcc/qplatformdefs.h
@@ -110,6 +110,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -118,6 +119,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/lynxos-g++/qplatformdefs.h b/mkspecs/lynxos-g++/qplatformdefs.h
index e3626765e9..96764a300e 100644
--- a/mkspecs/lynxos-g++/qplatformdefs.h
+++ b/mkspecs/lynxos-g++/qplatformdefs.h
@@ -80,6 +80,7 @@
#define QT_FTELL ::ftello
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T off_t
diff --git a/mkspecs/macx-g++/qplatformdefs.h b/mkspecs/macx-g++/qplatformdefs.h
index 98e5eaf448..3a9288b672 100644
--- a/mkspecs/macx-g++/qplatformdefs.h
+++ b/mkspecs/macx-g++/qplatformdefs.h
@@ -80,6 +80,7 @@
#define QT_FTELL ::ftello
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T off_t
diff --git a/mkspecs/macx-g++40/qplatformdefs.h b/mkspecs/macx-g++40/qplatformdefs.h
index 98e5eaf448..3a9288b672 100644
--- a/mkspecs/macx-g++40/qplatformdefs.h
+++ b/mkspecs/macx-g++40/qplatformdefs.h
@@ -80,6 +80,7 @@
#define QT_FTELL ::ftello
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T off_t
diff --git a/mkspecs/macx-g++42/qplatformdefs.h b/mkspecs/macx-g++42/qplatformdefs.h
index 98e5eaf448..3a9288b672 100644
--- a/mkspecs/macx-g++42/qplatformdefs.h
+++ b/mkspecs/macx-g++42/qplatformdefs.h
@@ -80,6 +80,7 @@
#define QT_FTELL ::ftello
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T off_t
diff --git a/mkspecs/macx-llvm/qplatformdefs.h b/mkspecs/macx-llvm/qplatformdefs.h
index 98e5eaf448..3a9288b672 100644
--- a/mkspecs/macx-llvm/qplatformdefs.h
+++ b/mkspecs/macx-llvm/qplatformdefs.h
@@ -80,6 +80,7 @@
#define QT_FTELL ::ftello
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T off_t
diff --git a/mkspecs/macx-pbuilder/qplatformdefs.h b/mkspecs/macx-pbuilder/qplatformdefs.h
index 04aaab771c..05ee441900 100644
--- a/mkspecs/macx-pbuilder/qplatformdefs.h
+++ b/mkspecs/macx-pbuilder/qplatformdefs.h
@@ -80,6 +80,7 @@
#define QT_FTELL ::ftello
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T off_t
diff --git a/mkspecs/macx-xcode/qplatformdefs.h b/mkspecs/macx-xcode/qplatformdefs.h
index 98e5eaf448..3a9288b672 100644
--- a/mkspecs/macx-xcode/qplatformdefs.h
+++ b/mkspecs/macx-xcode/qplatformdefs.h
@@ -80,6 +80,7 @@
#define QT_FTELL ::ftello
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T off_t
diff --git a/mkspecs/macx-xlc/qplatformdefs.h b/mkspecs/macx-xlc/qplatformdefs.h
index e7012174f9..bc2cfb632f 100644
--- a/mkspecs/macx-xlc/qplatformdefs.h
+++ b/mkspecs/macx-xlc/qplatformdefs.h
@@ -80,6 +80,7 @@
#define QT_FTELL ::ftello
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T off_t
diff --git a/mkspecs/netbsd-g++/qplatformdefs.h b/mkspecs/netbsd-g++/qplatformdefs.h
index 6e0fee7f51..40f83a2fa6 100644
--- a/mkspecs/netbsd-g++/qplatformdefs.h
+++ b/mkspecs/netbsd-g++/qplatformdefs.h
@@ -80,6 +80,7 @@
#define QT_FTELL ::ftello
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T off_t
diff --git a/mkspecs/openbsd-g++/qplatformdefs.h b/mkspecs/openbsd-g++/qplatformdefs.h
index ef313aa89e..90e4c21b62 100644
--- a/mkspecs/openbsd-g++/qplatformdefs.h
+++ b/mkspecs/openbsd-g++/qplatformdefs.h
@@ -81,6 +81,7 @@
#define QT_FTELL ::ftello
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T off_t
diff --git a/mkspecs/sco-cc/qplatformdefs.h b/mkspecs/sco-cc/qplatformdefs.h
index 4c53c187aa..41f4f0fdc0 100644
--- a/mkspecs/sco-cc/qplatformdefs.h
+++ b/mkspecs/sco-cc/qplatformdefs.h
@@ -81,6 +81,7 @@
#define QT_FTELL ::ftello
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T off_t
diff --git a/mkspecs/sco-g++/qplatformdefs.h b/mkspecs/sco-g++/qplatformdefs.h
index 3ecb86d5f4..613f22e714 100644
--- a/mkspecs/sco-g++/qplatformdefs.h
+++ b/mkspecs/sco-g++/qplatformdefs.h
@@ -85,6 +85,7 @@
#define QT_FTELL ::ftello
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T off_t
diff --git a/mkspecs/solaris-cc-64/qplatformdefs.h b/mkspecs/solaris-cc-64/qplatformdefs.h
index 3d1ddebe30..f344ffcd36 100644
--- a/mkspecs/solaris-cc-64/qplatformdefs.h
+++ b/mkspecs/solaris-cc-64/qplatformdefs.h
@@ -111,6 +111,7 @@ static inline int qt_socket_connect(int s, struct sockaddr *addr, QT_SOCKLEN_T a
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -119,6 +120,7 @@ static inline int qt_socket_connect(int s, struct sockaddr *addr, QT_SOCKLEN_T a
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/solaris-cc/qplatformdefs.h b/mkspecs/solaris-cc/qplatformdefs.h
index 6c5fd5f4d1..8b2104a674 100644
--- a/mkspecs/solaris-cc/qplatformdefs.h
+++ b/mkspecs/solaris-cc/qplatformdefs.h
@@ -119,6 +119,7 @@ static inline int qt_socket_connect(int s, struct sockaddr *addr, QT_SOCKLEN_T a
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -127,6 +128,7 @@ static inline int qt_socket_connect(int s, struct sockaddr *addr, QT_SOCKLEN_T a
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/solaris-g++-64/qplatformdefs.h b/mkspecs/solaris-g++-64/qplatformdefs.h
index 09aabfdcb3..a6f9c8a609 100644
--- a/mkspecs/solaris-g++-64/qplatformdefs.h
+++ b/mkspecs/solaris-g++-64/qplatformdefs.h
@@ -128,6 +128,7 @@ static inline int qt_socket_bind(int s, struct sockaddr *addr, QT_SOCKLEN_T addr
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -136,6 +137,7 @@ static inline int qt_socket_bind(int s, struct sockaddr *addr, QT_SOCKLEN_T addr
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/solaris-g++/qplatformdefs.h b/mkspecs/solaris-g++/qplatformdefs.h
index 01b551da74..c37b3669f8 100644
--- a/mkspecs/solaris-g++/qplatformdefs.h
+++ b/mkspecs/solaris-g++/qplatformdefs.h
@@ -132,6 +132,7 @@ static inline int qt_socket_bind(int s, struct sockaddr *addr, QT_SOCKLEN_T addr
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -140,6 +141,7 @@ static inline int qt_socket_bind(int s, struct sockaddr *addr, QT_SOCKLEN_T addr
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/tru64-cxx/qplatformdefs.h b/mkspecs/tru64-cxx/qplatformdefs.h
index 7c25fa0c04..aa3a9094f8 100644
--- a/mkspecs/tru64-cxx/qplatformdefs.h
+++ b/mkspecs/tru64-cxx/qplatformdefs.h
@@ -83,6 +83,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T off_t
diff --git a/mkspecs/tru64-g++/qplatformdefs.h b/mkspecs/tru64-g++/qplatformdefs.h
index 63eea44b96..0e8b345d9a 100644
--- a/mkspecs/tru64-g++/qplatformdefs.h
+++ b/mkspecs/tru64-g++/qplatformdefs.h
@@ -83,6 +83,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T off_t
diff --git a/mkspecs/unixware-cc/qplatformdefs.h b/mkspecs/unixware-cc/qplatformdefs.h
index ea523fb512..3a6b314a5c 100644
--- a/mkspecs/unixware-cc/qplatformdefs.h
+++ b/mkspecs/unixware-cc/qplatformdefs.h
@@ -81,6 +81,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T off_t
diff --git a/mkspecs/unixware-g++/qplatformdefs.h b/mkspecs/unixware-g++/qplatformdefs.h
index ea523fb512..3a6b314a5c 100644
--- a/mkspecs/unixware-g++/qplatformdefs.h
+++ b/mkspecs/unixware-g++/qplatformdefs.h
@@ -81,6 +81,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T off_t
diff --git a/mkspecs/unsupported/qnx-g++/qplatformdefs.h b/mkspecs/unsupported/qnx-g++/qplatformdefs.h
index 1bf9ffcb3e..f001eeaff5 100644
--- a/mkspecs/unsupported/qnx-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/qnx-g++/qplatformdefs.h
@@ -87,6 +87,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -95,6 +96,7 @@
#define QT_FTELL ::ftello
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T off_t
#endif
diff --git a/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h b/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h
index 5cec788af6..d16fa8a6d1 100644
--- a/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h
@@ -76,6 +76,7 @@
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
+#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
@@ -84,6 +85,7 @@
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
#endif
diff --git a/mkspecs/win32-msvc.net/qplatformdefs.h b/mkspecs/win32-msvc.net/qplatformdefs.h
index 19f9ba436c..da092facbc 100644
--- a/mkspecs/win32-msvc.net/qplatformdefs.h
+++ b/mkspecs/win32-msvc.net/qplatformdefs.h
@@ -115,8 +115,10 @@
#define QT_FOPEN ::fopen
#ifdef QT_LARGEFILE_SUPPORT
+// 64-bit versions of fseek/ftell not always available. E.g., when linking
+// dynamically to CRT (/MT)
#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
+#define QT_FTELL (QT_OFF_T)::ftell
#else
#define QT_FSEEK ::fseek
#define QT_FTELL ::ftell
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 19af1daab5..8ec4b3ffb6 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -74,6 +74,9 @@
#define MMP_OPTION_CW "OPTION CW"
#define MMP_OPTION_ARMCC "OPTION ARMCC"
#define MMP_OPTION_GCCE "OPTION GCCE"
+#define MMP_LINKEROPTION_CW "LINKEROPTION CW"
+#define MMP_LINKEROPTION_ARMCC "LINKEROPTION ARMCC"
+#define MMP_LINKEROPTION_GCCE "LINKEROPTION GCCE"
#define SIS_TARGET "sis"
#define OK_SIS_TARGET "ok_sis"
@@ -655,8 +658,7 @@ void SymbianMakefileGenerator::initMmpVariables()
// Check MMP_RULES for singleton keywords that are overridden
QStringList overridableMmpKeywords;
- overridableMmpKeywords << QLatin1String(MMP_TARGETTYPE) << QLatin1String(MMP_OPTION_CW)
- << QLatin1String(MMP_OPTION_ARMCC) << QLatin1String(MMP_OPTION_GCCE);
+ overridableMmpKeywords << QLatin1String(MMP_TARGETTYPE);
foreach (QString item, project->values("MMP_RULES")) {
if (project->values(item).isEmpty()) {
@@ -971,6 +973,7 @@ void SymbianMakefileGenerator::writeMmpFileCapabilityPart(QTextStream& t)
void SymbianMakefileGenerator::writeMmpFileCompilerOptionPart(QTextStream& t)
{
QString cw, armcc, gcce;
+ QString cwlink, armlink, gccelink;
if (0 != project->values("QMAKE_CXXFLAGS.CW").size()) {
cw.append(project->values("QMAKE_CXXFLAGS.CW").join(" "));
@@ -1020,12 +1023,42 @@ void SymbianMakefileGenerator::writeMmpFileCompilerOptionPart(QTextStream& t)
gcce.append(" ");
}
+ if (0 != project->values("QMAKE_LFLAGS.CW").size()) {
+ cwlink.append(project->values("QMAKE_LFLAGS.CW").join(" "));
+ cwlink.append(" ");
+ }
+
+ if (0 != project->values("QMAKE_LFLAGS.ARMCC").size()) {
+ armlink.append(project->values("QMAKE_LFLAGS.ARMCC").join(" "));
+ armlink.append(" ");
+ }
+
+ if (0 != project->values("QMAKE_LFLAGS.GCCE").size()) {
+ gccelink.append(project->values("QMAKE_LFLAGS.GCCE").join(" "));
+ gccelink.append(" ");
+ }
+
+ if (0 != project->values("QMAKE_LFLAGS").size()) {
+ cwlink.append(project->values("QMAKE_LFLAGS").join(" "));
+ cwlink.append(" ");
+ armlink.append(project->values("QMAKE_LFLAGS").join(" "));
+ armlink.append(" ");
+ gccelink.append(project->values("QMAKE_LFLAGS").join(" "));
+ gccelink.append(" ");
+ }
+
if (!cw.isEmpty() && cw[cw.size()-1] == ' ')
cw.chop(1);
if (!armcc.isEmpty() && armcc[armcc.size()-1] == ' ')
armcc.chop(1);
if (!gcce.isEmpty() && gcce[gcce.size()-1] == ' ')
gcce.chop(1);
+ if (!cwlink.isEmpty() && cwlink[cwlink.size()-1] == ' ')
+ cwlink.chop(1);
+ if (!armlink.isEmpty() && armlink[armlink.size()-1] == ' ')
+ armlink.chop(1);
+ if (!gccelink.isEmpty() && gccelink[gccelink.size()-1] == ' ')
+ gccelink.chop(1);
if (!cw.isEmpty() && !overriddenMmpKeywords.contains(MMP_OPTION_CW))
t << MMP_OPTION_CW " " << cw << endl;
@@ -1034,6 +1067,13 @@ void SymbianMakefileGenerator::writeMmpFileCompilerOptionPart(QTextStream& t)
if (!gcce.isEmpty() && !overriddenMmpKeywords.contains(MMP_OPTION_GCCE))
t << MMP_OPTION_GCCE " " << gcce << endl;
+ if (!cwlink.isEmpty() && !overriddenMmpKeywords.contains(MMP_LINKEROPTION_CW))
+ t << MMP_LINKEROPTION_CW " " << cwlink << endl;
+ if (!armlink.isEmpty() && !overriddenMmpKeywords.contains(MMP_LINKEROPTION_ARMCC))
+ t << MMP_LINKEROPTION_ARMCC " " << armlink << endl;
+ if (!gccelink.isEmpty() && !overriddenMmpKeywords.contains(MMP_LINKEROPTION_GCCE))
+ t << MMP_LINKEROPTION_GCCE " " << gccelink << endl;
+
t << endl;
}
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-arabic.c b/src/3rdparty/harfbuzz/src/harfbuzz-arabic.c
index 4d85c19277..3837087f44 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-arabic.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-arabic.c
@@ -489,6 +489,56 @@ static void getArabicProperties(const unsigned short *chars, int len, HB_ArabicP
*/
}
+static Joining getNkoJoining(unsigned short uc)
+{
+ if (uc < 0x7ca)
+ return JNone;
+ if (uc <= 0x7ea)
+ return JDual;
+ if (uc <= 0x7f3)
+ return JTransparent;
+ if (uc <= 0x7f9)
+ return JNone;
+ if (uc == 0x7fa)
+ return JCausing;
+ return JNone;
+}
+
+static void getNkoProperties(const unsigned short *chars, int len, HB_ArabicProperties *properties)
+{
+ int lastPos = 0;
+ int i = 0;
+
+ Joining j = getNkoJoining(chars[0]);
+ ArabicShape shape = joining_table[XIsolated][j].form2;
+ properties[0].justification = HB_NoJustification;
+
+ for (i = 1; i < len; ++i) {
+ properties[i].justification = (HB_GetUnicodeCharCategory(chars[i]) == HB_Separator_Space) ?
+ ArabicSpace : ArabicNone;
+
+ j = getNkoJoining(chars[i]);
+
+ if (j == JTransparent) {
+ properties[i].shape = XIsolated;
+ continue;
+ }
+
+ properties[lastPos].shape = joining_table[shape][j].form1;
+ shape = joining_table[shape][j].form2;
+
+
+ lastPos = i;
+ }
+ properties[lastPos].shape = joining_table[shape][JNone].form1;
+
+
+ /*
+ for (int i = 0; i < len; ++i)
+ qDebug("nko properties(%d): uc=%x shape=%d, justification=%d", i, chars[i], properties[i].shape, properties[i].justification);
+ */
+}
+
/*
// The unicode to unicode shaping codec.
// does only presentation forms B at the moment, but that should be enough for
@@ -1012,7 +1062,10 @@ static HB_Bool arabicSyriacOpenTypeShape(HB_ShaperItem *item, HB_Bool *ot_ok)
if (f + l + item->item.pos < item->stringLength) {
++l;
}
- getArabicProperties(uc+f, l, props);
+ if (item->item.script == HB_Script_Nko)
+ getNkoProperties(uc+f, l, props);
+ else
+ getArabicProperties(uc+f, l, props);
for (i = 0; i < (int)item->num_glyphs; i++) {
apply[i] = 0;
@@ -1051,7 +1104,8 @@ HB_Bool HB_ArabicShape(HB_ShaperItem *item)
HB_Bool haveGlyphs;
HB_STACKARRAY(HB_UChar16, shapedChars, item->item.length);
- assert(item->item.script == HB_Script_Arabic || item->item.script == HB_Script_Syriac);
+ assert(item->item.script == HB_Script_Arabic || item->item.script == HB_Script_Syriac
+ || item->item.script == HB_Script_Nko);
#ifndef NO_OPENTYPE
@@ -1065,7 +1119,7 @@ HB_Bool HB_ArabicShape(HB_ShaperItem *item)
}
#endif
- if (item->item.script == HB_Script_Syriac)
+ if (item->item.script != HB_Script_Arabic)
return HB_BasicShape(item);
shapedString(item->string, item->stringLength, item->item.pos, item->item.length, shapedChars, &slen,
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
index 48f4f908a8..3008fca993 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
@@ -566,7 +566,7 @@ static const unsigned char indicPosition[0xe00-0x900] = {
None, None, None, None,
None, None, None, None,
- None, None, None, None,
+ Below, None, None, None,
None, None, None, None,
None, None, None, None,
None, None, None, None,
@@ -1252,7 +1252,9 @@ static bool indic_shape_syllable(HB_Bool openType, HB_ShaperItem *item, bool inv
// farther than 3 consonants from the end of the syllable.
// #### replace the HasReph property by testing if the feature exists in the font!
if (form(*uc) == Consonant || (script == HB_Script_Bengali && form(*uc) == IndependentVowel)) {
- beginsWithRa = (properties & HasReph) && ((len > 2) && *uc == ra && *(uc+1) == halant);
+ if ((properties & HasReph) && (len > 2) &&
+ (*uc == ra || *uc == 0x9f0) && *(uc+1) == halant)
+ beginsWithRa = true;
if (beginsWithRa && form(*(uc+2)) == Control)
beginsWithRa = false;
@@ -1744,6 +1746,10 @@ static int indic_nextSyllableBoundary(HB_Script script, const HB_UChar16 *s, int
++pos;
continue;
}
+ if (script == HB_Script_Malayalam && state == Matra && uc[pos-1] == 0x0d41) {
+ ++pos;
+ continue;
+ }
goto finish;
case Nukta:
if (state == Consonant)
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
index f92bb55c9c..f3ec8e10f5 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
@@ -637,7 +637,9 @@ const HB_ScriptEngine HB_ScriptEngines[] = {
// Runic
{ HB_BasicShape, 0 },
// Khmer
- { HB_KhmerShape, HB_KhmerAttributes }
+ { HB_KhmerShape, HB_KhmerAttributes },
+ // N'Ko
+ { HB_ArabicShape, 0}
};
void HB_GetCharAttributes(const HB_UChar16 *string, hb_uint32 stringLength,
@@ -877,7 +879,9 @@ static const OTScripts ot_scripts [] = {
// Runic
{ HB_MAKE_TAG('r', 'u', 'n', 'r'), 0 },
// Khmer
- { HB_MAKE_TAG('k', 'h', 'm', 'r'), 1 }
+ { HB_MAKE_TAG('k', 'h', 'm', 'r'), 1 },
+ // N'Ko
+ { HB_MAKE_TAG('n', 'k', 'o', ' '), 1 }
};
enum { NumOTScripts = sizeof(ot_scripts)/sizeof(OTScripts) };
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
index d2357f4301..f7c7714743 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
@@ -62,6 +62,7 @@ typedef enum {
HB_Script_Ogham,
HB_Script_Runic,
HB_Script_Khmer,
+ HB_Script_Nko,
HB_Script_Inherited,
HB_ScriptCount = HB_Script_Inherited
/*
@@ -102,7 +103,6 @@ typedef enum {
HB_Script_Cuneiform = Common,
HB_Script_Phoenician = Common,
HB_Script_PhagsPa = Common,
- HB_Script_Nko = Common
*/
} HB_Script;
diff --git a/src/3rdparty/harfbuzz/tests/shaping/main.cpp b/src/3rdparty/harfbuzz/tests/shaping/main.cpp
index a7ea417470..12fa7c48f2 100644
--- a/src/3rdparty/harfbuzz/tests/shaping/main.cpp
+++ b/src/3rdparty/harfbuzz/tests/shaping/main.cpp
@@ -181,6 +181,7 @@ private slots:
void sinhala();
void khmer();
+ void nko();
void linearB();
};
@@ -515,6 +516,12 @@ void tst_QScriptEngine::bengali()
{ 0x179, 0x151, 0x172, 0x0 } },
{ { 0x995, 0x9c7, 0x9d7, 0x0 },
{ 0x179, 0x151, 0x17e, 0x0 } },
+ { { 0x9b0, 0x9cd, 0x9ad, 0x0 },
+ { 0x168, 0x276, 0x0 } },
+ { { 0x9f0, 0x9cd, 0x9ad, 0x0 },
+ { 0x168, 0x276, 0x0 } },
+ { { 0x9f1, 0x9cd, 0x9ad, 0x0 },
+ { 0x191, 0x17d, 0x168, 0x0 } },
{ {0}, {0} }
};
@@ -652,6 +659,12 @@ void tst_QScriptEngine::bengali()
{ 0x01fe, 0x0 } },
{ { 0x09b0, 0x09cd, 0x09a8, 0x09cd, 0x200d, 0x0 },
{ 0x10b, 0x167, 0x0 } },
+ { { 0x9b0, 0x9cd, 0x9ad, 0x0 },
+ { 0xa1, 0x167, 0x0 } },
+ { { 0x9f0, 0x9cd, 0x9ad, 0x0 },
+ { 0xa1, 0x167, 0x0 } },
+ { { 0x9f1, 0x9cd, 0x9ad, 0x0 },
+ { 0x11c, 0xa1, 0x0 } },
{ {0}, {0} }
};
@@ -967,6 +980,8 @@ void tst_QScriptEngine::malayalam()
{ 0x5e, 0x34, 0x65, 0x0 } },
{ { 0xd15, 0xd57, 0x0 },
{ 0x34, 0x65, 0x0 } },
+ { { 0xd1f, 0xd4d, 0xd1f, 0xd41, 0xd4d, 0x0 },
+ { 0x69, 0x5b, 0x64, 0x0 } },
{ {0}, {0} }
};
@@ -1061,6 +1076,40 @@ void tst_QScriptEngine::khmer()
}
}
+void tst_QScriptEngine::nko()
+{
+ {
+ FT_Face face = loadFace("DejaVuSans.ttf");
+ if (face) {
+ const ShapeTable shape_table [] = {
+ { { 0x7ca, 0x0 },
+ { 0x5c1, 0x0 } },
+ { { 0x7ca, 0x7ca, 0x0 },
+ { 0x14db, 0x14d9, 0x0 } },
+ { { 0x7ca, 0x7fa, 0x7ca, 0x0 },
+ { 0x14db, 0x5ec, 0x14d9, 0x0 } },
+ { { 0x7ca, 0x7f3, 0x7ca, 0x0 },
+ { 0x14db, 0x5e7, 0x14d9, 0x0 } },
+ { { 0x7ca, 0x7f3, 0x7fa, 0x7ca, 0x0 },
+ { 0x14db, 0x5e7, 0x5ec, 0x14d9, 0x0 } },
+ { {0}, {0} }
+ };
+
+
+ const ShapeTable *s = shape_table;
+ while (s->unicode[0]) {
+ QVERIFY( shaping(face, s, HB_Script_Nko) );
+ ++s;
+ }
+
+ FT_Done_Face(face);
+ } else {
+ QSKIP("couln't find DejaVuSans.ttf", SkipAll);
+ }
+ }
+}
+
+
void tst_QScriptEngine::linearB()
{
{
diff --git a/src/3rdparty/phonon/ds9/videorenderer_soft.cpp b/src/3rdparty/phonon/ds9/videorenderer_soft.cpp
index 82d62359a4..f7d42cf1fe 100644
--- a/src/3rdparty/phonon/ds9/videorenderer_soft.cpp
+++ b/src/3rdparty/phonon/ds9/videorenderer_soft.cpp
@@ -661,7 +661,10 @@ namespace Phonon
#ifndef QT_NO_OPENGL
- if (painter.paintEngine() && painter.paintEngine()->type() == QPaintEngine::OpenGL && checkGLPrograms()) {
+ if (painter.paintEngine() &&
+ (painter.paintEngine()->type() == QPaintEngine::OpenGL || painter.paintEngine()->type() == QPaintEngine::OpenGL2)
+ && checkGLPrograms()) {
+
//for now we only support YUV (both YV12 and YUY2)
updateTexture();
@@ -673,6 +676,7 @@ namespace Phonon
}
//let's draw the texture
+ painter.beginNativePainting();
//Let's pass the other arguments
const Program prog = (m_inputPin->connectedType().subtype == MEDIASUBTYPE_YV12) ? YV12toRGB : YUY2toRGB;
@@ -722,6 +726,7 @@ namespace Phonon
glDisableClientState(GL_VERTEX_ARRAY);
glDisable(GL_FRAGMENT_PROGRAM_ARB);
+ painter.endNativePainting();
return;
} else
#endif
diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp
index af2c31ec4f..f2efaa09f0 100644
--- a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp
+++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp
@@ -318,7 +318,8 @@ void MMF::AbstractMediaPlayer::doVolumeChanged()
case PausedState:
case PlayingState:
case BufferingState: {
- const int err = setDeviceVolume(m_volume * m_mmfMaxVolume);
+ const qreal volume = (m_volume * m_mmfMaxVolume) + 0.5;
+ const int err = setDeviceVolume(volume);
if (KErrNone != err) {
setError(NormalError);
@@ -359,26 +360,27 @@ qint64 MMF::AbstractMediaPlayer::toMilliSeconds(const TTimeIntervalMicroSeconds
return in.Int64() / 1000;
}
-void MMF::AbstractMediaPlayer::changeState(PrivateState newState)
+//-----------------------------------------------------------------------------
+// Slots
+//-----------------------------------------------------------------------------
+
+void MMF::AbstractMediaPlayer::tick()
{
- TRACE_CONTEXT(AbstractPlayer::changeState, EAudioInternal);
- TRACE_ENTRY("state %d newState %d", privateState(), newState);
+ // For the MWC compiler, we need to qualify the base class.
+ emit MMF::AbstractPlayer::tick(currentTime());
+}
- // TODO: add some invariants to check that the transition is valid
+void MMF::AbstractMediaPlayer::changeState(PrivateState newState)
+{
+ TRACE_CONTEXT(AbstractMediaPlayer::changeState, EAudioInternal);
const Phonon::State oldPhononState = phononState(privateState());
const Phonon::State newPhononState = phononState(newState);
- if (oldPhononState != newPhononState) {
- TRACE("emit stateChanged(%d, %d)", newPhononState, oldPhononState);
- emit stateChanged(newPhononState, oldPhononState);
- }
- setState(newState);
+ // TODO: add some invariants to check that the transition is valid
+ AbstractPlayer::changeState(newState);
- if (
- LoadingState == oldPhononState
- and StoppedState == newPhononState
- ) {
+ if (LoadingState == oldPhononState && StoppedState == newPhononState) {
// Ensure initial volume is set on MMF API before starting playback
doVolumeChanged();
@@ -390,18 +392,28 @@ void MMF::AbstractMediaPlayer::changeState(PrivateState newState)
play();
}
}
-
- TRACE_EXIT_0();
}
-//-----------------------------------------------------------------------------
-// Slots
-//-----------------------------------------------------------------------------
-
-void MMF::AbstractMediaPlayer::tick()
+void MMF::AbstractMediaPlayer::updateMetaData()
{
- // For the MWC compiler, we need to qualify the base class.
- emit MMF::AbstractPlayer::tick(currentTime());
+ TRACE_CONTEXT(AbstractMediaPlayer::updateMetaData, EAudioInternal);
+ TRACE_ENTRY_0();
+
+ m_metaData.clear();
+
+ const int numberOfEntries = numberOfMetaDataEntries();
+ for(int i=0; i<numberOfEntries; ++i) {
+ const QPair<QString, QString> entry = metaDataEntry(i);
+
+ // Note that we capitalize the key, as required by the Ogg Vorbis
+ // metadata standard to which Phonon adheres:
+ // http://xiph.org/vorbis/doc/v-comment.html
+ m_metaData.insert(entry.first.toUpper(), entry.second);
+ }
+
+ emit metaDataChanged(m_metaData);
+
+ TRACE_EXIT_0();
}
QT_END_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.h b/src/3rdparty/phonon/mmf/abstractmediaplayer.h
index 698b899e96..cff7babf66 100644
--- a/src/3rdparty/phonon/mmf/abstractmediaplayer.h
+++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.h
@@ -71,12 +71,12 @@ protected:
virtual int setDeviceVolume(int mmfVolume) = 0;
virtual int openFile(RFile& file) = 0;
virtual void close() = 0;
-
- /**
- * Changes state and emits stateChanged()
- */
virtual void changeState(PrivateState newState);
+ void updateMetaData();
+ virtual int numberOfMetaDataEntries() const = 0;
+ virtual QPair<QString, QString> metaDataEntry(int index) const = 0;
+
protected:
bool tickTimerRunning() const;
void startTickTimer();
@@ -109,6 +109,8 @@ private:
MediaSource m_source;
MediaSource m_nextSource;
+ QMultiMap<QString, QString> m_metaData;
+
};
}
}
diff --git a/src/3rdparty/phonon/mmf/abstractplayer.cpp b/src/3rdparty/phonon/mmf/abstractplayer.cpp
index e3c0ecb41e..de2722d2b1 100644
--- a/src/3rdparty/phonon/mmf/abstractplayer.cpp
+++ b/src/3rdparty/phonon/mmf/abstractplayer.cpp
@@ -118,12 +118,14 @@ void MMF::AbstractPlayer::videoOutputChanged()
// Default behaviour is empty - overridden by VideoPlayer
}
-void MMF::AbstractPlayer::setError(Phonon::ErrorType error)
+void MMF::AbstractPlayer::setError(Phonon::ErrorType error,
+ const QString &errorMessage)
{
TRACE_CONTEXT(AbstractPlayer::setError, EAudioInternal);
TRACE_ENTRY("state %d error %d", m_state, error);
m_error = error;
+ m_errorString = errorMessage;
changeState(ErrorState);
TRACE_EXIT_0();
@@ -138,9 +140,7 @@ Phonon::ErrorType MMF::AbstractPlayer::errorType() const
QString MMF::AbstractPlayer::errorString() const
{
- // TODO: put in proper error strings
- QString result;
- return result;
+ return m_errorString;
}
Phonon::State MMF::AbstractPlayer::phononState() const
@@ -173,5 +173,29 @@ void MMF::AbstractPlayer::setState(PrivateState newState)
m_state = newState;
}
+void MMF::AbstractPlayer::changeState(PrivateState newState)
+{
+ TRACE_CONTEXT(AbstractPlayer::changeState, EAudioInternal);
+ TRACE_ENTRY("state %d newState %d", privateState(), newState);
+
+ // TODO: add some invariants to check that the transition is valid
+
+ const Phonon::State oldPhononState = phononState(privateState());
+
+ // We need to change the state before we emit stateChanged(), because
+ // some user code, for instance the mediaplayer, switch on MediaObject's
+ // state.
+ setState(newState);
+
+ const Phonon::State newPhononState = phononState(newState);
+
+ if (oldPhononState != newPhononState) {
+ TRACE("emit stateChanged(%d, %d)", newPhononState, oldPhononState);
+ emit stateChanged(newPhononState, oldPhononState);
+ }
+
+ TRACE_EXIT_0();
+}
+
QT_END_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/abstractplayer.h b/src/3rdparty/phonon/mmf/abstractplayer.h
index 08558cf2ef..66496cc02b 100644
--- a/src/3rdparty/phonon/mmf/abstractplayer.h
+++ b/src/3rdparty/phonon/mmf/abstractplayer.h
@@ -93,16 +93,18 @@ public:
/**
* Records error and changes state to ErrorState
*/
- void setError(Phonon::ErrorType error);
+ void setError(Phonon::ErrorType error,
+ const QString &errorMessage = QString());
Phonon::State state() const;
+
Q_SIGNALS:
void totalTimeChanged(qint64 length);
void finished();
void tick(qint64 time);
void stateChanged(Phonon::State oldState,
Phonon::State newState);
-
+ void metaDataChanged(const QMultiMap<QString, QString>& metaData);
protected:
/**
@@ -132,7 +134,10 @@ protected:
PrivateState privateState() const;
- virtual void changeState(PrivateState newState) = 0;
+ /**
+ * Changes state and emits stateChanged()
+ */
+ virtual void changeState(PrivateState newState);
/**
* Modifies m_state directly. Typically you want to call changeState(),
@@ -152,6 +157,7 @@ protected:
private:
PrivateState m_state;
Phonon::ErrorType m_error;
+ QString m_errorString;
qint32 m_tickInterval;
qint32 m_transitionTime;
qint32 m_prefinishMark;
diff --git a/src/3rdparty/phonon/mmf/ancestormovemonitor.cpp b/src/3rdparty/phonon/mmf/ancestormovemonitor.cpp
new file mode 100644
index 0000000000..0447d57b45
--- /dev/null
+++ b/src/3rdparty/phonon/mmf/ancestormovemonitor.cpp
@@ -0,0 +1,175 @@
+/* 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/>.
+
+*/
+
+#include "ancestormovemonitor.h"
+#include "utils.h"
+#include "videooutput.h"
+
+#include <QCoreApplication>
+
+QT_BEGIN_NAMESPACE
+
+using namespace Phonon::MMF;
+
+/*! \class MMF::AncestorMoveMonitor
+ \internal
+ \brief Class which installs a global event filter, and listens for move
+ events which may affect the absolute position of widgets registered with
+ the monitor
+ See QTBUG-4956
+*/
+
+//-----------------------------------------------------------------------------
+// Constructor / destructor
+//-----------------------------------------------------------------------------
+
+AncestorMoveMonitor::AncestorMoveMonitor(QObject *parent)
+ : QObject(parent)
+{
+ QCoreApplication::instance()->installEventFilter(this);
+}
+
+AncestorMoveMonitor::~AncestorMoveMonitor()
+{
+ QCoreApplication::instance()->removeEventFilter(this);
+}
+
+
+//-----------------------------------------------------------------------------
+// Public functions
+//-----------------------------------------------------------------------------
+
+void AncestorMoveMonitor::registerTarget(VideoOutput *target)
+{
+ TRACE_CONTEXT(AncestorMoveMonitor::registerTarget, EVideoInternal);
+ TRACE_ENTRY("target 0x%08x", target);
+
+ // First un-register the target, in case this is being called as a result
+ // of re-parenting. This is not the most efficient way to update the
+ // target hash, but since this is not likely to be a frequent operation,
+ // simplicity is preferred over outright speed. In any case, re-parenting
+ // of the video widget leads to re-creation of native windows, which is
+ // likely to take far more processing than any implementation of this
+ // function.
+ unRegisterTarget(target);
+
+ QWidget *ancestor = target->parentWidget();
+ while(ancestor) {
+ const Hash::iterator it = m_hash.find(ancestor);
+ if(m_hash.end() == it) {
+ TargetList targetList;
+ targetList.append(target);
+ m_hash.insert(ancestor, targetList);
+ } else {
+ TargetList& targetList = it.value();
+ Q_ASSERT(targetList.indexOf(target) == -1);
+ targetList.append(target);
+ }
+ ancestor = ancestor->parentWidget();
+ }
+
+ dump();
+
+ TRACE_EXIT_0();
+}
+
+void AncestorMoveMonitor::unRegisterTarget(VideoOutput *target)
+{
+ TRACE_CONTEXT(AncestorMoveMonitor::unRegisterTarget, EVideoInternal);
+ TRACE_ENTRY("target 0x%08x", target);
+
+ Hash::iterator it = m_hash.begin();
+ while(it != m_hash.end()) {
+ TargetList& targetList = it.value();
+ const int index = targetList.indexOf(target);
+ if(index != -1)
+ targetList.removeAt(index);
+ if(targetList.count())
+ ++it;
+ else
+ it = m_hash.erase(it);
+ }
+
+ dump();
+
+ TRACE_EXIT_0();
+}
+
+bool AncestorMoveMonitor::eventFilter(QObject *watched, QEvent *event)
+{
+ TRACE_CONTEXT(AncestorMoveMonitor::eventFilter, EVideoInternal);
+
+ if(event->type() == QEvent::Move || event->type() == QEvent::ParentChange) {
+
+ //TRACE_ENTRY("watched 0x%08x event.type %d", watched, event->type());
+
+ const Hash::const_iterator it = m_hash.find(watched);
+ if(it != m_hash.end()) {
+ const TargetList& targetList = it.value();
+ VideoOutput* target = 0;
+ foreach(target, targetList) {
+ switch (event->type()) {
+
+ case QEvent::Move:
+ // Notify the target that its ancestor has moved
+ target->ancestorMoved();
+ break;
+
+ case QEvent::ParentChange:
+ // Update ancestor list for the target
+ registerTarget(target);
+ break;
+
+ default:
+ Q_ASSERT(false);
+ }
+ }
+ }
+
+ //TRACE_EXIT_0();
+ }
+
+ // The event is never consumed by this filter
+ return false;
+}
+
+//-----------------------------------------------------------------------------
+// Private functions
+//-----------------------------------------------------------------------------
+
+void AncestorMoveMonitor::dump()
+{
+#ifndef QT_NO_DEBUG
+ TRACE_CONTEXT(AncestorMoveMonitor::dump, EVideoInternal);
+ for(Hash::const_iterator it = m_hash.begin();
+ it != m_hash.end(); ++it) {
+ const QObject *ancestor = it.key();
+ TRACE("ancestor 0x%08x", ancestor);
+ const TargetList& targetList = it.value();
+ VideoOutput* target = 0;
+ foreach(target, targetList) {
+ TRACE(" target 0x%08x", target);
+ }
+ }
+#endif
+}
+
+
+
+QT_END_NAMESPACE
+
diff --git a/src/3rdparty/phonon/mmf/ancestormovemonitor.h b/src/3rdparty/phonon/mmf/ancestormovemonitor.h
new file mode 100644
index 0000000000..0e681aa1e3
--- /dev/null
+++ b/src/3rdparty/phonon/mmf/ancestormovemonitor.h
@@ -0,0 +1,95 @@
+/* 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 PHONON_MMF_ANCESTORMOVEMONITOR_H
+#define PHONON_MMF_ANCESTORMOVEMONITOR_H
+
+#include <QObject>
+#include <QHash>
+#include <QList>
+
+QT_BEGIN_NAMESPACE
+
+namespace Phonon
+{
+namespace MMF
+{
+class VideoOutput;
+
+class AncestorMoveMonitor : public QObject
+{
+ Q_OBJECT
+
+public:
+ explicit AncestorMoveMonitor(QObject *parent);
+ ~AncestorMoveMonitor();
+
+ /**
+ * Register target widget for notification.
+ *
+ * The widget receives an ancestorMoveEvent callback when a move event
+ * is delivered to any of its ancestors:
+ *
+ * If the target is already registered, this function causes its
+ * ancestor list to be updated - therefore it should be called when
+ * the target receives a ParentChange event.
+ */
+ void registerTarget(VideoOutput *target);
+
+ /**
+ * Remove target from the monitor.
+ *
+ * The target will no longer receive notification when move events are
+ * delivered to its ancestors.
+ */
+ void unRegisterTarget(VideoOutput *target);
+
+protected:
+ /**
+ * Function which receives events from the global event filter.
+ */
+ bool eventFilter(QObject *watched, QEvent *event);
+
+ void dump();
+
+private:
+ /**
+ * List of registered target widgets which descend from a given
+ * ancestor.
+ *
+ * Note that the members of the list should be non-redundant; this
+ * invariant is checked in debug builds. Semantically, the value is
+ * therefore a set, however we use QList rather than QSet for
+ * efficiency of iteration.
+ */
+ typedef QList<VideoOutput *> TargetList;
+
+ /**
+ * Map from widget on which the move event occurs, to widgets which
+ * descend from it and therefore need to be notified.
+ */
+ typedef QHash<QObject *, TargetList> Hash;
+ Hash m_hash;
+
+};
+}
+}
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/3rdparty/phonon/mmf/audioplayer.cpp b/src/3rdparty/phonon/mmf/audioplayer.cpp
index 1d259a80dc..8fccfe6edf 100644
--- a/src/3rdparty/phonon/mmf/audioplayer.cpp
+++ b/src/3rdparty/phonon/mmf/audioplayer.cpp
@@ -182,8 +182,8 @@ void MMF::AudioPlayer::MapcInitComplete(TInt aError,
if (KErrNone == aError) {
maxVolumeChanged(m_player->MaxVolume());
-
emit totalTimeChanged(totalTime());
+ updateMetaData();
changeState(StoppedState);
} else {
// TODO: set different error states according to value of aError?
@@ -251,5 +251,24 @@ void MMF::AudioPlayer::MaloLoadingComplete()
#endif // QT_PHONON_MMF_AUDIO_DRM
+//-----------------------------------------------------------------------------
+// Private functions
+//-----------------------------------------------------------------------------
+
+int MMF::AudioPlayer::numberOfMetaDataEntries() const
+{
+ int numberOfEntries = 0;
+ m_player->GetNumberOfMetaDataEntries(numberOfEntries); // ignoring return code
+ return numberOfEntries;
+}
+
+QPair<QString, QString> MMF::AudioPlayer::metaDataEntry(int index) const
+{
+ CMMFMetaDataEntry *entry = 0;
+ QT_TRAP_THROWING(entry = m_player->GetMetaDataEntryL(index));
+ return QPair<QString, QString>(qt_TDesC2QString(entry->Name()), qt_TDesC2QString(entry->Value()));
+}
+
+
QT_END_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/audioplayer.h b/src/3rdparty/phonon/mmf/audioplayer.h
index 60ef436038..bc600764a7 100644
--- a/src/3rdparty/phonon/mmf/audioplayer.h
+++ b/src/3rdparty/phonon/mmf/audioplayer.h
@@ -94,6 +94,10 @@ public:
private:
void construct();
+ // AbstractMediaPlayer
+ virtual int numberOfMetaDataEntries() const;
+ virtual QPair<QString, QString> metaDataEntry(int index) const;
+
private:
/**
* Using CPlayerType typedef in order to be able to easily switch between
diff --git a/src/3rdparty/phonon/mmf/backend.cpp b/src/3rdparty/phonon/mmf/backend.cpp
index f542ec9c72..cac27e3ab2 100644
--- a/src/3rdparty/phonon/mmf/backend.cpp
+++ b/src/3rdparty/phonon/mmf/backend.cpp
@@ -24,6 +24,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <apmstd.h> // for TDataType
#include "abstractaudioeffect.h"
+#include "ancestormovemonitor.h"
#include "audiooutput.h"
#include "audioplayer.h"
#include "backend.h"
@@ -45,7 +46,9 @@ using namespace Phonon::MMF;
\internal
*/
-Backend::Backend(QObject *parent) : QObject(parent)
+Backend::Backend(QObject *parent)
+ : QObject(parent)
+ , m_ancestorMoveMonitor(new AncestorMoveMonitor(this))
{
TRACE_CONTEXT(Backend::Backend, EBackend);
TRACE_ENTRY_0();
@@ -87,7 +90,7 @@ QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const
return EffectFactory::createAudioEffect(effect, parent);
}
case VideoWidgetClass:
- result = new VideoWidget(qobject_cast<QWidget *>(parent));
+ result = new VideoWidget(m_ancestorMoveMonitor.data(), qobject_cast<QWidget *>(parent));
break;
default:
diff --git a/src/3rdparty/phonon/mmf/backend.h b/src/3rdparty/phonon/mmf/backend.h
index 1886ae66e0..9e3d3b3aa8 100644
--- a/src/3rdparty/phonon/mmf/backend.h
+++ b/src/3rdparty/phonon/mmf/backend.h
@@ -19,8 +19,11 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#ifndef PHONON_MMF_BACKEND_H
#define PHONON_MMF_BACKEND_H
+#include "ancestormovemonitor.h"
+
#include <Phonon/MediaSource>
#include <Phonon/BackendInterface>
+#include <QScopedPointer>
QT_BEGIN_NAMESPACE
@@ -47,6 +50,10 @@ public:
Q_SIGNALS:
void objectDescriptionChanged(ObjectDescriptionType);
+
+private:
+ QScopedPointer<AncestorMoveMonitor> m_ancestorMoveMonitor;
+
};
}
}
diff --git a/src/3rdparty/phonon/mmf/dummyplayer.cpp b/src/3rdparty/phonon/mmf/dummyplayer.cpp
index bd21d20377..e6f38559a1 100644
--- a/src/3rdparty/phonon/mmf/dummyplayer.cpp
+++ b/src/3rdparty/phonon/mmf/dummyplayer.cpp
@@ -87,11 +87,6 @@ qint64 MMF::DummyPlayer::currentTime() const
return 0;
}
-QString MMF::DummyPlayer::errorString() const
-{
- return QString();
-}
-
Phonon::ErrorType MMF::DummyPlayer::errorType() const
{
return Phonon::NoError;
@@ -127,9 +122,5 @@ void MMF::DummyPlayer::doSetTickInterval(qint32)
}
-void MMF::DummyPlayer::changeState(PrivateState)
-{
-}
-
QT_END_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/dummyplayer.h b/src/3rdparty/phonon/mmf/dummyplayer.h
index 9ff9f78af7..c6270c9ce6 100644
--- a/src/3rdparty/phonon/mmf/dummyplayer.h
+++ b/src/3rdparty/phonon/mmf/dummyplayer.h
@@ -54,7 +54,6 @@ public:
virtual bool isSeekable() const;
virtual qint64 currentTime() const;
virtual Phonon::State state() const;
- virtual QString errorString() const;
virtual Phonon::ErrorType errorType() const;
virtual qint64 totalTime() const;
virtual MediaSource source() const;
@@ -64,9 +63,6 @@ public:
// AbstractPlayer
virtual void doSetTickInterval(qint32 interval);
-
-protected:
- virtual void changeState(PrivateState newState);
};
}
}
diff --git a/src/3rdparty/phonon/mmf/mediaobject.cpp b/src/3rdparty/phonon/mmf/mediaobject.cpp
index 29ac2df909..f004fd7189 100644
--- a/src/3rdparty/phonon/mmf/mediaobject.cpp
+++ b/src/3rdparty/phonon/mmf/mediaobject.cpp
@@ -239,6 +239,7 @@ void MMF::MediaObject::createPlayer(const MediaSource &source)
const bool oldPlayerSeekable = oldPlayer->isSeekable();
Phonon::ErrorType error = NoError;
+ QString errorMessage;
// Determine media type
switch (source.type()) {
@@ -253,7 +254,7 @@ void MMF::MediaObject::createPlayer(const MediaSource &source)
mediaType = fileMediaType(url.toLocalFile());
}
else {
- TRACE_0("Network streaming not supported yet");
+ errorMessage = QLatin1String("Network streaming not supported yet");
error = NormalError;
}
}
@@ -286,7 +287,8 @@ void MMF::MediaObject::createPlayer(const MediaSource &source)
newPlayer = new DummyPlayer();
}
- newPlayer->setError(NormalError);
+ error = NormalError;
+ errorMessage = tr("Media type could not be determined");
break;
case MediaTypeAudio:
@@ -320,10 +322,13 @@ void MMF::MediaObject::createPlayer(const MediaSource &source)
connect(m_player.data(), SIGNAL(stateChanged(Phonon::State, Phonon::State)), SIGNAL(stateChanged(Phonon::State, Phonon::State)));
connect(m_player.data(), SIGNAL(finished()), SIGNAL(finished()));
connect(m_player.data(), SIGNAL(tick(qint64)), SIGNAL(tick(qint64)));
+ connect(m_player.data(), SIGNAL(metaDataChanged(const QMultiMap<QString, QString>&)), SIGNAL(metaDataChanged(const QMultiMap<QString, QString>&)));
- if (error != NoError ) {
- newPlayer = new DummyPlayer();
- newPlayer->setError(error);
+ // We need to call setError() after doing the connects, otherwise the
+ // error won't be received.
+ if (error != NoError) {
+ Q_ASSERT(m_player);
+ m_player->setError(error, errorMessage);
}
TRACE_EXIT_0();
diff --git a/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp b/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp
index d1d2337724..ba7d005c68 100644
--- a/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp
+++ b/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp
@@ -110,6 +110,9 @@ MMF::VideoPlayer::~VideoPlayer()
TRACE_CONTEXT(VideoPlayer::~VideoPlayer, EVideoApi);
TRACE_ENTRY_0();
+ if (m_videoOutput)
+ m_videoOutput->setObserver(0);
+
TRACE_EXIT_0();
}
@@ -487,6 +490,19 @@ bool MMF::VideoPlayer::getNativeWindowSystemHandles()
TRACE_RETURN("changed %d", changed);
}
+int MMF::VideoPlayer::numberOfMetaDataEntries() const
+{
+ int numberOfEntries = 0;
+ TRAP_IGNORE(numberOfEntries = m_player->NumberOfMetaDataEntriesL());
+ return numberOfEntries;
+}
+
+QPair<QString, QString> MMF::VideoPlayer::metaDataEntry(int index) const
+{
+ CMMFMetaDataEntry *entry = 0;
+ QT_TRAP_THROWING(entry = m_player->MetaDataEntryL(index));
+ return QPair<QString, QString>(qt_TDesC2QString(entry->Name()), qt_TDesC2QString(entry->Value()));
+}
QT_END_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/mmf_videoplayer.h b/src/3rdparty/phonon/mmf/mmf_videoplayer.h
index 8072404372..fa4e59b65a 100644
--- a/src/3rdparty/phonon/mmf/mmf_videoplayer.h
+++ b/src/3rdparty/phonon/mmf/mmf_videoplayer.h
@@ -86,6 +86,10 @@ private:
void updateMmfOutput();
+ // AbstractMediaPlayer
+ virtual int numberOfMetaDataEntries() const;
+ virtual QPair<QString, QString> metaDataEntry(int index) const;
+
private:
QScopedPointer<CVideoPlayerUtility> m_player;
diff --git a/src/3rdparty/phonon/mmf/videooutput.cpp b/src/3rdparty/phonon/mmf/videooutput.cpp
index f0393a7bbf..1b338a2d80 100644
--- a/src/3rdparty/phonon/mmf/videooutput.cpp
+++ b/src/3rdparty/phonon/mmf/videooutput.cpp
@@ -16,6 +16,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "ancestormovemonitor.h"
#include "utils.h"
#include "videooutput.h"
#include "videooutputobserver.h"
@@ -44,8 +45,10 @@ using namespace Phonon::MMF;
// Constructor / destructor
//-----------------------------------------------------------------------------
-MMF::VideoOutput::VideoOutput(QWidget* parent)
+MMF::VideoOutput::VideoOutput
+ (AncestorMoveMonitor* ancestorMoveMonitor, QWidget* parent)
: QWidget(parent)
+ , m_ancestorMoveMonitor(ancestorMoveMonitor)
, m_observer(0)
{
TRACE_CONTEXT(VideoOutput::VideoOutput, EVideoInternal);
@@ -63,6 +66,8 @@ MMF::VideoOutput::VideoOutput(QWidget* parent)
// to be invisible when running on the target device.
qt_widget_private(this)->extraData()->disableBlit = true;
+ registerForAncestorMoved();
+
dump();
TRACE_EXIT_0();
@@ -73,6 +78,8 @@ MMF::VideoOutput::~VideoOutput()
TRACE_CONTEXT(VideoOutput::~VideoOutput, EVideoInternal);
TRACE_ENTRY_0();
+ m_ancestorMoveMonitor->unRegisterTarget(this);
+
TRACE_EXIT_0();
}
@@ -97,6 +104,15 @@ void MMF::VideoOutput::setObserver(VideoOutputObserver* observer)
m_observer = observer;
}
+void MMF::VideoOutput::ancestorMoved()
+{
+ TRACE_CONTEXT(VideoOutput::ancestorMoved, EVideoInternal);
+ TRACE_ENTRY_0();
+
+ videoOutputRegionChanged();
+
+ TRACE_EXIT_0();
+}
//-----------------------------------------------------------------------------
// QWidget
@@ -120,7 +136,7 @@ void MMF::VideoOutput::paintEvent(QPaintEvent* event)
TRACE("rect %d %d - %d %d",
event->rect().left(), event->rect().top(),
event->rect().right(), event->rect().bottom());
- TRACE("regions %d", event->region().numRects());
+ TRACE("regions %d", event->region().rectCount());
TRACE("type %d", event->type());
// Do nothing
@@ -154,8 +170,11 @@ bool MMF::VideoOutput::event(QEvent* event)
TRACE_0("WinIdChange");
videoOutputRegionChanged();
return true;
- }
- else
+ } else if (event->type() == QEvent::ParentChange) {
+ // Tell ancestor move monitor to update ancestor list for this widget
+ registerForAncestorMoved();
+ return true;
+ } else
return QWidget::event(event);
}
@@ -171,6 +190,11 @@ void MMF::VideoOutput::videoOutputRegionChanged()
m_observer->videoOutputRegionChanged();
}
+void MMF::VideoOutput::registerForAncestorMoved()
+{
+ m_ancestorMoveMonitor->registerTarget(this);
+}
+
void MMF::VideoOutput::dump() const
{
#ifndef QT_NO_DEBUG
diff --git a/src/3rdparty/phonon/mmf/videooutput.h b/src/3rdparty/phonon/mmf/videooutput.h
index 7bc0b52b43..db4d127a11 100644
--- a/src/3rdparty/phonon/mmf/videooutput.h
+++ b/src/3rdparty/phonon/mmf/videooutput.h
@@ -30,6 +30,7 @@ namespace Phonon
{
namespace MMF
{
+class AncestorMoveMonitor;
class VideoOutputObserver;
class VideoOutput : public QWidget
@@ -37,12 +38,14 @@ class VideoOutput : public QWidget
Q_OBJECT
public:
- explicit VideoOutput(QWidget* parent);
+ VideoOutput(AncestorMoveMonitor* ancestorMoveMonitor, QWidget* parent);
~VideoOutput();
void setFrameSize(const QSize& size);
void setObserver(VideoOutputObserver* observer);
+ void ancestorMoved();
+
protected:
// Override QWidget functions
QSize sizeHint() const;
@@ -55,11 +58,17 @@ private:
void dump() const;
void videoOutputRegionChanged();
+ void registerForAncestorMoved();
+
private:
- QSize m_frameSize;
+ // Not owned
+ AncestorMoveMonitor* m_ancestorMoveMonitor;
// Not owned
- VideoOutputObserver* m_observer;
+ VideoOutputObserver* m_observer;
+
+ QSize m_frameSize;
+
};
}
}
diff --git a/src/3rdparty/phonon/mmf/videowidget.cpp b/src/3rdparty/phonon/mmf/videowidget.cpp
index 8a5c9ff924..7d7abf1ef2 100644
--- a/src/3rdparty/phonon/mmf/videowidget.cpp
+++ b/src/3rdparty/phonon/mmf/videowidget.cpp
@@ -49,9 +49,10 @@ static const qreal DefaultSaturation = 1.0;
// Constructor / destructor
//-----------------------------------------------------------------------------
-MMF::VideoWidget::VideoWidget(QWidget* parent)
+MMF::VideoWidget::VideoWidget
+ (AncestorMoveMonitor* ancestorMoveMonitor, QWidget* parent)
: MediaNode(parent)
- , m_widget(new VideoOutput(parent))
+ , m_widget(new VideoOutput(ancestorMoveMonitor, parent))
, m_aspectRatio(DefaultAspectRatio)
, m_brightness(DefaultBrightness)
, m_scaleMode(DefaultScaleMode)
diff --git a/src/3rdparty/phonon/mmf/videowidget.h b/src/3rdparty/phonon/mmf/videowidget.h
index 970f749623..318dfae7cd 100644
--- a/src/3rdparty/phonon/mmf/videowidget.h
+++ b/src/3rdparty/phonon/mmf/videowidget.h
@@ -31,6 +31,7 @@ namespace Phonon
{
namespace MMF
{
+class AncestorMoveMonitor;
class VideoOutput;
class VideoWidget : public MediaNode
@@ -40,7 +41,7 @@ class VideoWidget : public MediaNode
Q_INTERFACES(Phonon::VideoWidgetInterface)
public:
- VideoWidget(QWidget* parent);
+ VideoWidget(AncestorMoveMonitor* ancestorMoveMonitor, QWidget* parent);
~VideoWidget();
// VideoWidgetInterface
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PlatformScreenQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PlatformScreenQt.cpp
index 8221760885..442ffa39aa 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/PlatformScreenQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/PlatformScreenQt.cpp
@@ -72,7 +72,7 @@ int screenDepthPerComponent(Widget* w)
bool screenIsMonochrome(Widget* w)
{
- return QApplication::desktop()->screen(screenNumber(w))->numColors() < 2;
+ return QApplication::desktop()->screen(screenNumber(w))->colorCount() < 2;
}
FloatRect screenRect(Widget* w)
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index a4c7e299ef..be99b3b226 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -50,7 +50,7 @@
animations that plug into the rest of the animation framework.
The progress of an animation is given by its current time
- (currentTime()), which is measured in milliseconds from the start
+ (currentLoopTime()), which is measured in milliseconds from the start
of the animation (0) to its end (duration()). The value is updated
automatically while the animation is running. It can also be set
directly with setCurrentTime().
@@ -115,7 +115,7 @@
*/
/*!
- \fn QAbstractAnimation::stateChanged(QAbstractAnimation::State oldState, QAbstractAnimation::State newState)
+ \fn QAbstractAnimation::stateChanged(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)
QAbstractAnimation emits this signal whenever the state of the animation has
changed from \a oldState to \a newState. This signal is emitted after the virtual
@@ -165,8 +165,8 @@ Q_GLOBAL_STATIC(QThreadStorage<QUnifiedTimer *>, unifiedTimer)
QUnifiedTimer::QUnifiedTimer() :
QObject(), lastTick(0), timingInterval(DEFAULT_TIMER_INTERVAL),
- currentAnimationIdx(0), consistentTiming(false), isPauseTimerActive(false),
- runningLeafAnimations(0)
+ currentAnimationIdx(0), consistentTiming(false), slowMode(false),
+ isPauseTimerActive(false), runningLeafAnimations(0)
{
}
@@ -191,8 +191,10 @@ void QUnifiedTimer::ensureTimerUpdate()
void QUnifiedTimer::updateAnimationsTime()
{
// ignore consistentTiming in case the pause timer is active
- const int delta = (consistentTiming && !isPauseTimerActive) ?
+ int delta = (consistentTiming && !isPauseTimerActive) ?
timingInterval : time.elapsed() - lastTick;
+ if (slowMode)
+ delta /= 5;
lastTick = time.elapsed();
//we make sure we only call update time if the time has actually changed
@@ -213,6 +215,10 @@ void QUnifiedTimer::restartAnimationTimer()
{
if (runningLeafAnimations == 0 && !runningPauseAnimations.isEmpty()) {
int closestTimeToFinish = closestPauseAnimationTimeToFinish();
+ if (closestTimeToFinish < 0) {
+ qDebug() << runningPauseAnimations;
+ qDebug() << closestPauseAnimationTimeToFinish();
+ }
animationTimer.start(closestTimeToFinish, this);
isPauseTimerActive = true;
} else if (!animationTimer.isActive() || isPauseTimerActive) {
@@ -287,9 +293,11 @@ void QUnifiedTimer::registerRunningAnimation(QAbstractAnimation *animation)
if (QAbstractAnimationPrivate::get(animation)->isGroup)
return;
- if (QAbstractAnimationPrivate::get(animation)->isPause)
+ if (QAbstractAnimationPrivate::get(animation)->isPause) {
+ if (animation->duration() == -1)
+ qDebug() << "toto";
runningPauseAnimations << animation;
- else
+ } else
runningLeafAnimations++;
}
@@ -313,9 +321,9 @@ int QUnifiedTimer::closestPauseAnimationTimeToFinish()
int timeToFinish;
if (animation->direction() == QAbstractAnimation::Forward)
- timeToFinish = animation->duration() - animation->currentTime();
+ timeToFinish = animation->duration() - animation->currentLoopTime();
else
- timeToFinish = animation->currentTime();
+ timeToFinish = animation->currentLoopTime();
if (timeToFinish < closestTimeToFinish)
closestTimeToFinish = timeToFinish;
@@ -347,34 +355,32 @@ void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState)
state = newState;
QWeakPointer<QAbstractAnimation> guard(q);
- q->updateState(oldState, newState);
- if (!guard)
- return;
+ //(un)registration of the animation must always happen before calls to
+ //virtual function (updateState) to ensure a correct state of the timer
+ bool isTopLevel = !group || group->state() == QAbstractAnimation::Stopped;
+ if (oldState == QAbstractAnimation::Running) {
+ if (newState == QAbstractAnimation::Paused && hasRegisteredTimer)
+ QUnifiedTimer::instance()->ensureTimerUpdate();
+ //the animation, is not running any more
+ QUnifiedTimer::instance()->unregisterAnimation(q);
+ } else if (newState == QAbstractAnimation::Running) {
+ QUnifiedTimer::instance()->registerAnimation(q, isTopLevel);
+ }
- //this is to be safe if updateState changes the state
- if (state == oldState)
+ q->updateState(newState, oldState);
+ if (!guard || newState != state) //this is to be safe if updateState changes the state
return;
// Notify state change
- emit q->stateChanged(oldState, newState);
- if (!guard)
+ emit q->stateChanged(newState, oldState);
+ if (!guard || newState != state) //this is to be safe if updateState changes the state
return;
switch (state) {
case QAbstractAnimation::Paused:
- if (hasRegisteredTimer)
- // currentTime needs to be updated if pauseTimer is active
- QUnifiedTimer::instance()->ensureTimerUpdate();
- if (!guard)
- return;
- //here we're sure that we were in running state before and that the
- //animation is currently registered
- QUnifiedTimer::instance()->unregisterAnimation(q);
break;
case QAbstractAnimation::Running:
{
- bool isTopLevel = !group || group->state() == QAbstractAnimation::Stopped;
- QUnifiedTimer::instance()->registerAnimation(q, isTopLevel);
// this ensures that the value is updated now that the animation is running
if (oldState == QAbstractAnimation::Stopped) {
@@ -389,15 +395,10 @@ void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState)
case QAbstractAnimation::Stopped:
// Leave running state.
int dura = q->duration();
- if (!guard)
- return;
if (deleteWhenStopped)
q->deleteLater();
- if (oldState == QAbstractAnimation::Running)
- QUnifiedTimer::instance()->unregisterAnimation(q);
-
if (dura == -1 || loopCount < 0
|| (oldDirection == QAbstractAnimation::Forward && (oldCurrentTime * (oldCurrentLoop + 1)) == (dura * loopCount))
|| (oldDirection == QAbstractAnimation::Backward && oldCurrentTime == 0)) {
@@ -642,6 +643,18 @@ int QAbstractAnimation::totalDuration() const
}
/*!
+ Returns the current time inside the current loop. It can go from 0 to duration().
+
+ \sa duration(), currentTime
+*/
+
+int QAbstractAnimation::currentLoopTime() const
+{
+ Q_D(const QAbstractAnimation);
+ return d->currentTime;
+}
+
+/*!
\property QAbstractAnimation::currentTime
\brief the current time and progress of the animation
@@ -650,17 +663,14 @@ int QAbstractAnimation::totalDuration() const
the animation run, setting the current time automatically as the animation
progresses.
- The animation's current time starts at 0, and ends at duration(). If the
- animation's loopCount is larger than 1, the current time will rewind and
- start at 0 again for the consecutive loops. If the animation has a pause.
- currentTime will also include the duration of the pause.
+ The animation's current time starts at 0, and ends at totalDuration().
- \sa loopCount
+ \sa loopCount, currentLoopTime
*/
int QAbstractAnimation::currentTime() const
{
Q_D(const QAbstractAnimation);
- return d->currentTime;
+ return d->totalCurrentTime;
}
void QAbstractAnimation::setCurrentTime(int msecs)
{
@@ -734,7 +744,7 @@ void QAbstractAnimation::start(DeletionPolicy policy)
signal, and state() returns Stopped. The current time is not changed.
If the animation stops by itself after reaching the end (i.e.,
- currentTime() == duration() and currentLoop() > loopCount() - 1), the
+ currentLoopTime() == duration() and currentLoop() > loopCount() - 1), the
finished() signal is emitted.
\sa start(), state()
@@ -784,6 +794,21 @@ void QAbstractAnimation::resume()
}
/*!
+ If \a paused is true, the animation is paused.
+ If \a paused is false, the animation is resumed.
+
+ \sa state(), pause(), resume()
+*/
+void QAbstractAnimation::setPaused(bool paused)
+{
+ if (paused)
+ pause();
+ else
+ resume();
+}
+
+
+/*!
\reimp
*/
bool QAbstractAnimation::event(QEvent *event)
@@ -806,8 +831,8 @@ bool QAbstractAnimation::event(QEvent *event)
\sa start(), stop(), pause(), resume()
*/
-void QAbstractAnimation::updateState(QAbstractAnimation::State oldState,
- QAbstractAnimation::State newState)
+void QAbstractAnimation::updateState(QAbstractAnimation::State newState,
+ QAbstractAnimation::State oldState)
{
Q_UNUSED(oldState);
Q_UNUSED(newState);
diff --git a/src/corelib/animation/qabstractanimation.h b/src/corelib/animation/qabstractanimation.h
index 3d608b64dc..3c6e12fab6 100644
--- a/src/corelib/animation/qabstractanimation.h
+++ b/src/corelib/animation/qabstractanimation.h
@@ -95,6 +95,9 @@ public:
Direction direction() const;
void setDirection(Direction direction);
+ int currentTime() const;
+ int currentLoopTime() const;
+
int loopCount() const;
void setLoopCount(int loopCount);
int currentLoop() const;
@@ -102,11 +105,9 @@ public:
virtual int duration() const = 0;
int totalDuration() const;
- int currentTime() const;
-
Q_SIGNALS:
void finished();
- void stateChanged(QAbstractAnimation::State oldState, QAbstractAnimation::State newState);
+ void stateChanged(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
void currentLoopChanged(int currentLoop);
void directionChanged(QAbstractAnimation::Direction);
@@ -114,6 +115,7 @@ public Q_SLOTS:
void start(QAbstractAnimation::DeletionPolicy policy = KeepWhenStopped);
void pause();
void resume();
+ void setPaused(bool);
void stop();
void setCurrentTime(int msecs);
@@ -122,7 +124,7 @@ protected:
bool event(QEvent *event);
virtual void updateCurrentTime(int currentTime) = 0;
- virtual void updateState(QAbstractAnimation::State oldState, QAbstractAnimation::State newState);
+ virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
virtual void updateDirection(QAbstractAnimation::Direction direction);
private:
diff --git a/src/corelib/animation/qabstractanimation_p.h b/src/corelib/animation/qabstractanimation_p.h
index f989bce269..720e68d193 100644
--- a/src/corelib/animation/qabstractanimation_p.h
+++ b/src/corelib/animation/qabstractanimation_p.h
@@ -138,6 +138,9 @@ public:
*/
void setConsistentTiming(bool consistent) { consistentTiming = consistent; }
+ //this facilitates fine-tuning of complex animations
+ void setSlowModeEnabled(bool enabled) { slowMode = enabled; }
+
/*
this is used for updating the currentTime of all animations in case the pause
timer is active or, otherwise, only of the animation passed as parameter.
@@ -164,6 +167,7 @@ private:
int timingInterval;
int currentAnimationIdx;
bool consistentTiming;
+ bool slowMode;
// bool to indicate that only pause animations are active
bool isPauseTimerActive;
diff --git a/src/corelib/animation/qanimationgroup.cpp b/src/corelib/animation/qanimationgroup.cpp
index 40f5936554..64282eab5f 100644
--- a/src/corelib/animation/qanimationgroup.cpp
+++ b/src/corelib/animation/qanimationgroup.cpp
@@ -70,7 +70,7 @@
QAnimationGroup provides methods for adding and retrieving
animations. Besides that, you can remove animations by calling
remove(), and clear the animation group by calling
- clearAnimations(). You may keep track of changes in the group's
+ clear(). You may keep track of changes in the group's
animations by listening to QEvent::ChildAdded and
QEvent::ChildRemoved events.
@@ -151,7 +151,7 @@ int QAnimationGroup::animationCount() const
Returns the index of \a animation. The returned index can be passed
to the other functions that take an index as an argument.
- \sa insertAnimationAt(), animationAt(), takeAnimationAt()
+ \sa insertAnimation(), animationAt(), takeAnimation()
*/
int QAnimationGroup::indexOfAnimation(QAbstractAnimation *animation) const
{
@@ -160,7 +160,7 @@ int QAnimationGroup::indexOfAnimation(QAbstractAnimation *animation) const
}
/*!
- Adds \a animation to this group. This will call insertAnimationAt with
+ Adds \a animation to this group. This will call insertAnimation with
index equals to animationCount().
\note The group takes ownership of the animation.
@@ -170,7 +170,7 @@ int QAnimationGroup::indexOfAnimation(QAbstractAnimation *animation) const
void QAnimationGroup::addAnimation(QAbstractAnimation *animation)
{
Q_D(QAnimationGroup);
- insertAnimationAt(d->animations.count(), animation);
+ insertAnimation(d->animations.count(), animation);
}
/*!
@@ -180,14 +180,14 @@ void QAnimationGroup::addAnimation(QAbstractAnimation *animation)
\note The group takes ownership of the animation.
- \sa takeAnimationAt(), addAnimation(), indexOfAnimation(), removeAnimation()
+ \sa takeAnimation(), addAnimation(), indexOfAnimation(), removeAnimation()
*/
-void QAnimationGroup::insertAnimationAt(int index, QAbstractAnimation *animation)
+void QAnimationGroup::insertAnimation(int index, QAbstractAnimation *animation)
{
Q_D(QAnimationGroup);
if (index < 0 || index > d->animations.size()) {
- qWarning("QAnimationGroup::insertAnimationAt: index is out of bounds");
+ qWarning("QAnimationGroup::insertAnimation: index is out of bounds");
return;
}
@@ -205,7 +205,7 @@ void QAnimationGroup::insertAnimationAt(int index, QAbstractAnimation *animation
Removes \a animation from this group. The ownership of \a animation is
transferred to the caller.
- \sa takeAnimationAt(), insertAnimationAt(), addAnimation()
+ \sa takeAnimation(), insertAnimation(), addAnimation()
*/
void QAnimationGroup::removeAnimation(QAbstractAnimation *animation)
{
@@ -221,7 +221,7 @@ void QAnimationGroup::removeAnimation(QAbstractAnimation *animation)
return;
}
- takeAnimationAt(index);
+ takeAnimation(index);
}
/*!
@@ -229,13 +229,13 @@ void QAnimationGroup::removeAnimation(QAbstractAnimation *animation)
\note The ownership of the animation is transferred to the caller.
- \sa removeAnimation(), addAnimation(), insertAnimationAt(), indexOfAnimation()
+ \sa removeAnimation(), addAnimation(), insertAnimation(), indexOfAnimation()
*/
-QAbstractAnimation *QAnimationGroup::takeAnimationAt(int index)
+QAbstractAnimation *QAnimationGroup::takeAnimation(int index)
{
Q_D(QAnimationGroup);
if (index < 0 || index >= d->animations.size()) {
- qWarning("QAnimationGroup::takeAnimationAt: no animation at index %d", index);
+ qWarning("QAnimationGroup::takeAnimation: no animation at index %d", index);
return 0;
}
QAbstractAnimation *animation = d->animations.at(index);
@@ -254,7 +254,7 @@ QAbstractAnimation *QAnimationGroup::takeAnimationAt(int index)
\sa addAnimation(), removeAnimation()
*/
-void QAnimationGroup::clearAnimations()
+void QAnimationGroup::clear()
{
Q_D(QAnimationGroup);
qDeleteAll(d->animations);
@@ -279,7 +279,7 @@ bool QAnimationGroup::event(QEvent *event)
// case it might be called from the destructor.
int index = d->animations.indexOf(a);
if (index != -1)
- takeAnimationAt(index);
+ takeAnimation(index);
}
return QAbstractAnimation::event(event);
}
diff --git a/src/corelib/animation/qanimationgroup.h b/src/corelib/animation/qanimationgroup.h
index 86368a33b4..416ce3fb47 100644
--- a/src/corelib/animation/qanimationgroup.h
+++ b/src/corelib/animation/qanimationgroup.h
@@ -65,10 +65,10 @@ public:
int animationCount() const;
int indexOfAnimation(QAbstractAnimation *animation) const;
void addAnimation(QAbstractAnimation *animation);
- void insertAnimationAt(int index, QAbstractAnimation *animation);
+ void insertAnimation(int index, QAbstractAnimation *animation);
void removeAnimation(QAbstractAnimation *animation);
- QAbstractAnimation *takeAnimationAt(int index);
- void clearAnimations();
+ QAbstractAnimation *takeAnimation(int index);
+ void clear();
protected:
QAnimationGroup(QAnimationGroupPrivate &dd, QObject *parent);
diff --git a/src/corelib/animation/qparallelanimationgroup.cpp b/src/corelib/animation/qparallelanimationgroup.cpp
index 0a04c14ff9..2d37d10eca 100644
--- a/src/corelib/animation/qparallelanimationgroup.cpp
+++ b/src/corelib/animation/qparallelanimationgroup.cpp
@@ -182,11 +182,11 @@ void QParallelAnimationGroup::updateCurrentTime(int currentTime)
/*!
\reimp
*/
-void QParallelAnimationGroup::updateState(QAbstractAnimation::State oldState,
- QAbstractAnimation::State newState)
+void QParallelAnimationGroup::updateState(QAbstractAnimation::State newState,
+ QAbstractAnimation::State oldState)
{
Q_D(QParallelAnimationGroup);
- QAnimationGroup::updateState(oldState, newState);
+ QAnimationGroup::updateState(newState, oldState);
switch (newState) {
case Stopped:
diff --git a/src/corelib/animation/qparallelanimationgroup.h b/src/corelib/animation/qparallelanimationgroup.h
index 1cab91e5c0..18ec885966 100644
--- a/src/corelib/animation/qparallelanimationgroup.h
+++ b/src/corelib/animation/qparallelanimationgroup.h
@@ -68,7 +68,7 @@ protected:
bool event(QEvent *event);
void updateCurrentTime(int currentTime);
- void updateState(QAbstractAnimation::State oldState, QAbstractAnimation::State newState);
+ void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
void updateDirection(QAbstractAnimation::Direction direction);
private:
diff --git a/src/corelib/animation/qpauseanimation.cpp b/src/corelib/animation/qpauseanimation.cpp
index 21e5b0849a..1b3b654b86 100644
--- a/src/corelib/animation/qpauseanimation.cpp
+++ b/src/corelib/animation/qpauseanimation.cpp
@@ -56,7 +56,7 @@
It is not necessary to construct a QPauseAnimation yourself.
QSequentialAnimationGroup provides the convenience functions
\l{QSequentialAnimationGroup::}{addPause()} and
- \l{QSequentialAnimationGroup::}{insertPauseAt()}. These functions
+ \l{QSequentialAnimationGroup::}{insertPause()}. These functions
simply take the number of milliseconds the pause should last.
\sa QSequentialAnimationGroup
diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp
index 4742e54953..30650831bc 100644
--- a/src/corelib/animation/qpropertyanimation.cpp
+++ b/src/corelib/animation/qpropertyanimation.cpp
@@ -250,8 +250,8 @@ void QPropertyAnimation::updateCurrentValue(const QVariant &value)
If the startValue is not defined when the state of the animation changes from Stopped to Running,
the current property value is used as the initial value for the animation.
*/
-void QPropertyAnimation::updateState(QAbstractAnimation::State oldState,
- QAbstractAnimation::State newState)
+void QPropertyAnimation::updateState(QAbstractAnimation::State newState,
+ QAbstractAnimation::State oldState)
{
Q_D(QPropertyAnimation);
@@ -260,7 +260,7 @@ void QPropertyAnimation::updateState(QAbstractAnimation::State oldState,
return;
}
- QVariantAnimation::updateState(oldState, newState);
+ QVariantAnimation::updateState(newState, oldState);
QPropertyAnimation *animToStop = 0;
{
diff --git a/src/corelib/animation/qpropertyanimation.h b/src/corelib/animation/qpropertyanimation.h
index 2e2ca3a2c2..61efed9958 100644
--- a/src/corelib/animation/qpropertyanimation.h
+++ b/src/corelib/animation/qpropertyanimation.h
@@ -73,7 +73,7 @@ public:
protected:
bool event(QEvent *event);
void updateCurrentValue(const QVariant &value);
- void updateState(QAbstractAnimation::State oldState, QAbstractAnimation::State newState);
+ void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
private:
Q_DISABLE_COPY(QPropertyAnimation)
diff --git a/src/corelib/animation/qsequentialanimationgroup.cpp b/src/corelib/animation/qsequentialanimationgroup.cpp
index 5ca560a1e5..861e26e78f 100644
--- a/src/corelib/animation/qsequentialanimationgroup.cpp
+++ b/src/corelib/animation/qsequentialanimationgroup.cpp
@@ -50,7 +50,7 @@
another has finished playing. The animations are played in the
order they are added to the group (using
\l{QAnimationGroup::}{addAnimation()} or
- \l{QAnimationGroup::}{insertAnimationAt()}). The animation group
+ \l{QAnimationGroup::}{insertAnimation()}). The animation group
finishes when its last animation has finished.
At each moment there is at most one animation that is active in
@@ -59,7 +59,7 @@
A sequential animation group can be treated as any other
animation, i.e., it can be started, stopped, and added to other
- groups. You can also call addPause() or insertPauseAt() to add a
+ groups. You can also call addPause() or insertPause() to add a
pause to a sequential animation group.
\code
@@ -269,7 +269,7 @@ QSequentialAnimationGroup::~QSequentialAnimationGroup()
\l{QAnimationGroup::animationCount()}{animationCount} will be
increased by one.
- \sa insertPauseAt(), QAnimationGroup::addAnimation()
+ \sa insertPause(), QAnimationGroup::addAnimation()
*/
QPauseAnimation *QSequentialAnimationGroup::addPause(int msecs)
{
@@ -282,19 +282,19 @@ QPauseAnimation *QSequentialAnimationGroup::addPause(int msecs)
Inserts a pause of \a msecs milliseconds at \a index in this animation
group.
- \sa addPause(), QAnimationGroup::insertAnimationAt()
+ \sa addPause(), QAnimationGroup::insertAnimation()
*/
-QPauseAnimation *QSequentialAnimationGroup::insertPauseAt(int index, int msecs)
+QPauseAnimation *QSequentialAnimationGroup::insertPause(int index, int msecs)
{
Q_D(const QSequentialAnimationGroup);
if (index < 0 || index > d->animations.size()) {
- qWarning("QSequentialAnimationGroup::insertPauseAt: index is out of bounds");
+ qWarning("QSequentialAnimationGroup::insertPause: index is out of bounds");
return 0;
}
QPauseAnimation *pause = new QPauseAnimation(msecs);
- insertAnimationAt(index, pause);
+ insertAnimation(index, pause);
return pause;
}
@@ -382,11 +382,11 @@ void QSequentialAnimationGroup::updateCurrentTime(int currentTime)
/*!
\reimp
*/
-void QSequentialAnimationGroup::updateState(QAbstractAnimation::State oldState,
- QAbstractAnimation::State newState)
+void QSequentialAnimationGroup::updateState(QAbstractAnimation::State newState,
+ QAbstractAnimation::State oldState)
{
Q_D(QSequentialAnimationGroup);
- QAnimationGroup::updateState(oldState, newState);
+ QAnimationGroup::updateState(newState, oldState);
if (!d->currentAnimation)
return;
@@ -532,7 +532,7 @@ void QSequentialAnimationGroupPrivate::animationInsertedAt(int index)
currentAnimationIndex = animations.indexOf(currentAnimation);
if (index < currentAnimationIndex || currentLoop != 0) {
- qWarning("QSequentialGroup::insertAnimationAt only supports to add animations after the current one.");
+ qWarning("QSequentialGroup::insertAnimation only supports to add animations after the current one.");
return; //we're not affected because it is added after the current one
}
}
diff --git a/src/corelib/animation/qsequentialanimationgroup.h b/src/corelib/animation/qsequentialanimationgroup.h
index f30f851f8b..97e7e01870 100644
--- a/src/corelib/animation/qsequentialanimationgroup.h
+++ b/src/corelib/animation/qsequentialanimationgroup.h
@@ -65,7 +65,7 @@ public:
~QSequentialAnimationGroup();
QPauseAnimation *addPause(int msecs);
- QPauseAnimation *insertPauseAt(int index, int msecs);
+ QPauseAnimation *insertPause(int index, int msecs);
QAbstractAnimation *currentAnimation() const;
int duration() const;
@@ -78,7 +78,7 @@ protected:
bool event(QEvent *event);
void updateCurrentTime(int);
- void updateState(QAbstractAnimation::State oldState, QAbstractAnimation::State newState);
+ void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
void updateDirection(QAbstractAnimation::Direction direction);
private:
diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp
index de8185bcbb..c7357783f2 100644
--- a/src/corelib/animation/qvariantanimation.cpp
+++ b/src/corelib/animation/qvariantanimation.cpp
@@ -621,8 +621,8 @@ bool QVariantAnimation::event(QEvent *event)
/*!
\reimp
*/
-void QVariantAnimation::updateState(QAbstractAnimation::State oldState,
- QAbstractAnimation::State newState)
+void QVariantAnimation::updateState(QAbstractAnimation::State newState,
+ QAbstractAnimation::State oldState)
{
Q_UNUSED(oldState);
Q_UNUSED(newState);
diff --git a/src/corelib/animation/qvariantanimation.h b/src/corelib/animation/qvariantanimation.h
index bc57b1c076..89d9b3425c 100644
--- a/src/corelib/animation/qvariantanimation.h
+++ b/src/corelib/animation/qvariantanimation.h
@@ -103,7 +103,7 @@ protected:
bool event(QEvent *event);
void updateCurrentTime(int);
- void updateState(QAbstractAnimation::State oldState, QAbstractAnimation::State newState);
+ void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
virtual void updateCurrentValue(const QVariant &value) = 0;
virtual QVariant interpolated(const QVariant &from, const QVariant &to, qreal progress) const;
diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h
index 9b3e817ac3..77785e8d9e 100644
--- a/src/corelib/global/qfeatures.h
+++ b/src/corelib/global/qfeatures.h
@@ -632,6 +632,11 @@
#define QT_NO_COLORDIALOG
#endif
+// QGraphicsEffect
+#if !defined(QT_NO_GRAPHICSEFFECT) && (defined(QT_NO_GRAPHICSVIEW))
+#define QT_NO_GRAPHICSEFFECT
+#endif
+
// The Model/View Framework
#if !defined(QT_NO_ITEMVIEWS) && (defined(QT_NO_RUBBERBAND) || defined(QT_NO_SCROLLAREA))
#define QT_NO_ITEMVIEWS
diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt
index ff340065c3..ec4945fa0d 100644
--- a/src/corelib/global/qfeatures.txt
+++ b/src/corelib/global/qfeatures.txt
@@ -491,6 +491,13 @@ Requires: SCROLLAREA
Name: QGraphicsView
SeeAlso: ???
+Feature: GRAPHICSEFFECT
+Description: Supports the graphicseffect classes.
+Section: Widgets
+Requires: GRAPHICSVIEW
+Name: QGraphicsEffect
+SeeAlso: ???
+
Feature: SPINWIDGET
Description: Supports spinbox control widgets.
Section: Widgets
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 5578091936..62b5409eef 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1191,6 +1191,10 @@ bool qSharedBuild()
\value SV_9_2 Symbian OS v9.2
\value SV_9_3 Symbian OS v9.3
\value SV_9_4 Symbian OS v9.4
+ \value SV_SF_1 Symbian^1
+ \value SV_SF_2 Symbian^2
+ \value SV_SF_3 Symbian^3
+ \value SV_SF_4 Symbian^4
\value SV_Unknown An unknown and currently unsupported platform
\sa S60Version, WinVersion, MacVersion
@@ -1207,6 +1211,8 @@ bool qSharedBuild()
\value SV_S60_3_1 S60 3rd Edition Feature Pack 1
\value SV_S60_3_2 S60 3rd Edition Feature Pack 2
\value SV_S60_5_0 S60 5th Edition
+ \value SV_S60_5_1 S60 5th Edition Feature Pack 1
+ \value SV_S60_5_2 S60 5th Edition Feature Pack 2
\value SV_S60_Unknown An unknown and currently unsupported platform
\omitvalue SV_S60_None
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index 15a06d7cf9..15325ae4be 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -212,11 +212,13 @@ QLibraryInfo::buildKey()
Returns the installation date for this build of Qt. The install date will
usually be the last time that Qt sources were configured.
*/
+#ifndef QT_NO_DATESTRING
QDate
QLibraryInfo::buildDate()
{
return QDate::fromString(QString::fromLatin1(qt_configure_installation + 12), Qt::ISODate);
}
+#endif //QT_NO_DATESTRING
/*!
Returns the location specified by \a loc.
diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h
index 88e85667a5..f65051d7c7 100644
--- a/src/corelib/global/qlibraryinfo.h
+++ b/src/corelib/global/qlibraryinfo.h
@@ -60,7 +60,9 @@ public:
static QString licensedProducts();
static QString buildKey();
+#ifndef QT_NO_DATESTRING
static QDate buildDate();
+#endif //QT_NO_DATESTRING
enum LibraryLocation
{
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index 134c4b8b6d..c9b26032ea 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -1020,14 +1020,15 @@ bool QFile::open(OpenMode mode)
\bold{Warning:}
\list 1
- \o If \a fh is \c stdin, \c stdout, or \c stderr, you may not be able
- to seek(). See QIODevice::isSequential() for more information.
+ \o If \a fh does not refer to a regular file, e.g., it is \c stdin,
+ \c stdout, or \c stderr, you may not be able to seek(). size()
+ returns \c 0 in those cases. See QIODevice::isSequential() for
+ more information.
\o Since this function opens the file without specifying the file name,
you cannot use this QFile with a QFileInfo.
\endlist
- \note For Windows CE you may not be able to call seek() and resize().
- Also, size() is set to \c 0.
+ \note For Windows CE you may not be able to call resize().
\sa close(), {qmake Variable Reference#CONFIG}{qmake Variable Reference}
@@ -1064,7 +1065,7 @@ bool QFile::open(FILE *fh, OpenMode mode)
if (mode & Append) {
seek(size());
} else {
- long pos = ftell(fh);
+ qint64 pos = (qint64)QT_FTELL(fh);
if (pos != -1)
seek(pos);
}
@@ -1081,7 +1082,7 @@ bool QFile::open(FILE *fh, OpenMode mode)
/*!
\overload
- Opens the existing file descripter \a fd in the given \a mode.
+ Opens the existing file descriptor \a fd in the given \a mode.
Returns true if successful; otherwise returns false.
When a QFile is opened using this function, close() does not
@@ -1092,12 +1093,13 @@ bool QFile::open(FILE *fh, OpenMode mode)
are slow. If you run into performance issues, you should try to
use one of the other open functions.
- \warning If \a fd is 0 (\c stdin), 1 (\c stdout), or 2 (\c
- stderr), you may not be able to seek(). size() is set to \c
- LLONG_MAX (in \c <climits>).
+ \warning If \a fd is not a regular file, e.g, it is 0 (\c stdin),
+ 1 (\c stdout), or 2 (\c stderr), you may not be able to seek(). In
+ those cases, size() returns \c 0. See QIODevice::isSequential()
+ for more information.
\warning For Windows CE you may not be able to call seek(), setSize(),
- fileTime(). size() is set to \c 0.
+ fileTime(). size() returns \c 0.
\warning Since this function opens the file without specifying the file name,
you cannot use this QFile with a QFileInfo.
@@ -1120,8 +1122,13 @@ bool QFile::open(int fd, OpenMode mode)
}
if(d->openExternalFile(mode, fd)) {
QIODevice::open(mode);
- if (mode & Append)
+ if (mode & Append) {
seek(size());
+ } else {
+ qint64 pos = (qint64)QT_LSEEK(fd, QT_OFF_T(0), SEEK_CUR);
+ if (pos != -1)
+ seek(pos);
+ }
return true;
}
return false;
diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp
index b69a5e55a5..9ab831fcd2 100644
--- a/src/corelib/io/qfsfileengine.cpp
+++ b/src/corelib/io/qfsfileengine.cpp
@@ -76,17 +76,6 @@ QT_BEGIN_NAMESPACE
# endif
#endif
-#ifdef Q_OS_SYMBIAN
- // Using default 4k block in symbian is highly inefficient due to
- // the fact that each file operation requires slow IPC calls, so
- // use somewhat larger block size.
-# define FDFH_BLOCK_SIZE 16384
-#else
- // Read/write in blocks of 4k to avoid platform limitations (Windows
- // commonly bails out if you read or write too large blocks at once).
-# define FDFH_BLOCK_SIZE 4096
-#endif
-
/*! \class QFSFileEngine
\brief The QFSFileEngine class implements Qt's default file engine.
\since 4.1
@@ -132,11 +121,9 @@ void QFSFileEnginePrivate::init()
#ifdef Q_OS_WIN
fileAttrib = INVALID_FILE_ATTRIBUTES;
fileHandle = INVALID_HANDLE_VALUE;
+ mapHandle = INVALID_HANDLE_VALUE;
cachedFd = -1;
#endif
-#ifdef Q_USE_DEPRECATED_MAP_API
- fileMapHandle = INVALID_HANDLE_VALUE;
-#endif
}
/*!
@@ -329,9 +316,9 @@ bool QFSFileEnginePrivate::openFh(QIODevice::OpenMode openMode, FILE *fh)
int ret;
do {
ret = QT_FSEEK(fh, 0, SEEK_END);
- } while (ret == -1 && errno == EINTR);
+ } while (ret != 0 && errno == EINTR);
- if (ret == -1) {
+ if (ret != 0) {
q->setError(errno == EMFILE ? QFile::ResourceError : QFile::OpenError,
qt_error_string(int(errno)));
@@ -576,20 +563,23 @@ bool QFSFileEnginePrivate::seekFdFh(qint64 pos)
if (lastIOCommand != QFSFileEnginePrivate::IOFlushCommand && !q->flush())
return false;
+ if (pos < 0 || pos != qint64(QT_OFF_T(pos)))
+ return false;
+
if (fh) {
// Buffered stdlib mode.
int ret;
do {
ret = QT_FSEEK(fh, QT_OFF_T(pos), SEEK_SET);
- } while (ret == -1 && errno == EINTR);
+ } while (ret != 0 && errno == EINTR);
- if (ret == -1) {
+ if (ret != 0) {
q->setError(QFile::ReadError, qt_error_string(int(errno)));
return false;
}
} else {
// Unbuffered stdio mode.
- if (QT_LSEEK(fd, pos, SEEK_SET) == -1) {
+ if (QT_LSEEK(fd, QT_OFF_T(pos), SEEK_SET) == -1) {
qWarning() << "QFile::at: Cannot set file position" << pos;
q->setError(QFile::PositionError, qt_error_string(errno));
return false;
@@ -632,67 +622,55 @@ qint64 QFSFileEnginePrivate::readFdFh(char *data, qint64 len)
{
Q_Q(QFSFileEngine);
- // Buffered stdlib mode.
+ if (len < 0 || len != qint64(size_t(len))) {
+ q->setError(QFile::ReadError, qt_error_string(EINVAL));
+ return -1;
+ }
+
+ qint64 readBytes = 0;
+ bool eof = false;
+
if (fh) {
- qint64 readBytes = 0;
- qint64 read = 0;
- int retry = 0;
+ // Buffered stdlib mode.
- qint64 bytesToRead;
+ size_t result;
+ bool retry = true;
do {
- if (retry == 1)
- retry = 2;
-
- bytesToRead = qMin<qint64>(FDFH_BLOCK_SIZE, len - read);
- do {
- readBytes = fread(data + read, 1, size_t(bytesToRead), fh);
- } while (readBytes == 0 && !feof(fh) && errno == EINTR);
-
- if (readBytes > 0) {
- read += readBytes;
- } else if (!retry && feof(fh)) {
- // Synchronize and try again (just once though).
- if (++retry == 1)
- QT_FSEEK(fh, QT_FTELL(fh), SEEK_SET);
+ result = fread(data + readBytes, 1, size_t(len - readBytes), fh);
+ eof = feof(fh);
+ if (retry && eof && result == 0) {
+ // On Mac OS, this is needed, e.g., if a file was written to
+ // through another stream since our last read. See test
+ // tst_QFile::appendAndRead
+ QT_FSEEK(fh, QT_FTELL(fh), SEEK_SET); // re-sync stream.
+ retry = false;
+ continue;
}
- } while (retry == 1 || (readBytes == bytesToRead && read < len));
+ readBytes += result;
+ } while (!eof && (result == 0 ? errno == EINTR : readBytes < len));
- // Return the number of bytes read, or if nothing was read, return -1
- // if an error occurred, or 0 if we detected EOF.
- if (read == 0) {
- q->setError(QFile::ReadError, qt_error_string(int(errno)));
- if (!feof(fh))
- read = -1;
- }
- return read;
- }
+ } else if (fd != -1) {
+ // Unbuffered stdio mode.
- // Unbuffered stdio mode.
- qint64 ret = 0;
- if (len) {
+#ifdef Q_OS_WIN
int result;
- qint64 read = 0;
- errno = 0;
-
+#else
+ ssize_t result;
+#endif
do {
- qint64 bytesToRead = qMin<qint64>(FDFH_BLOCK_SIZE, len - read);
- do {
- result = QT_READ(fd, data + read, int(bytesToRead));
- } while (result == -1 && errno == EINTR);
- if (result > 0)
- read += result;
- } while (result > 0 && read < len);
-
- // Return the number of bytes read, or if nothing was read, return -1
- // if an error occurred.
- if (read > 0) {
- ret += read;
- } else if (read == 0 && result < 0) {
- ret = -1;
- q->setError(QFile::ReadError, qt_error_string(errno));
- }
+ result = QT_READ(fd, data + readBytes, size_t(len - readBytes));
+ } while ((result == -1 && errno == EINTR)
+ || (result > 0 && (readBytes += result) < len));
+
+ eof = !(result == -1);
+ }
+
+ if (!eof && readBytes == 0) {
+ readBytes = -1;
+ q->setError(QFile::ReadError, qt_error_string(errno));
}
- return ret;
+
+ return readBytes;
}
/*!
@@ -772,34 +750,45 @@ qint64 QFSFileEngine::write(const char *data, qint64 len)
qint64 QFSFileEnginePrivate::writeFdFh(const char *data, qint64 len)
{
Q_Q(QFSFileEngine);
- qint64 result;
- qint64 written = 0;
- do {
- qint64 bytesToWrite = qMin<qint64>(FDFH_BLOCK_SIZE, len - written);
- if (fh) {
- do {
- // Buffered stdlib mode.
- result = qint64(fwrite(data + written, 1, size_t(bytesToWrite), fh));
- } while (result == 0 && errno == EINTR);
- if (bytesToWrite > 0 && result == 0)
- result = -1;
- } else {
- do {
- // Unbuffered stdio mode.
- result = QT_WRITE(fd, data + written, bytesToWrite);
- } while (result == -1 && errno == EINTR);
- }
- if (result > 0)
- written += qint64(result);
- } while (written < len && result > 0);
-
- // If we read anything, return that with success. Otherwise, set an error,
- // and return the last return value.
- if (result > 0)
- return written;
- q->setError(errno == ENOSPC ? QFile::ResourceError : QFile::WriteError, qt_error_string(errno));
- return result;
+ if (len < 0 || len != qint64(size_t(len))) {
+ q->setError(QFile::WriteError, qt_error_string(EINVAL));
+ return -1;
+ }
+
+ qint64 writtenBytes = 0;
+
+ if (fh) {
+ // Buffered stdlib mode.
+
+ size_t result;
+ bool eof;
+ do {
+ result = fwrite(data + writtenBytes, 1, size_t(len - writtenBytes), fh);
+ writtenBytes += result;
+ eof = feof(fh);
+ } while (!eof && (result == 0 ? errno == EINTR : writtenBytes < len));
+
+ } else if (fd != -1) {
+ // Unbuffered stdio mode.
+
+#ifdef Q_OS_WIN
+ int result;
+#else
+ ssize_t result;
+#endif
+ do {
+ result = QT_WRITE(fd, data + writtenBytes, size_t(len - writtenBytes));
+ } while ((result == -1 && errno == EINTR)
+ || (result > 0 && (writtenBytes += result) < len));
+ }
+
+ if (writtenBytes == 0) {
+ writtenBytes = -1;
+ q->setError(errno == ENOSPC ? QFile::ResourceError : QFile::WriteError, qt_error_string(errno));
+ }
+
+ return writtenBytes;
}
/*!
diff --git a/src/corelib/io/qfsfileengine_p.h b/src/corelib/io/qfsfileengine_p.h
index 66e0219889..87f0737c1e 100644
--- a/src/corelib/io/qfsfileengine_p.h
+++ b/src/corelib/io/qfsfileengine_p.h
@@ -110,20 +110,16 @@ public:
FILE *fh;
#ifdef Q_WS_WIN
HANDLE fileHandle;
- QHash<uchar *, QPair<int /*offset*/, HANDLE /*handle*/> > maps;
+ HANDLE mapHandle;
+ QHash<uchar *, DWORD /* offset % AllocationGranularity */> maps;
mutable int cachedFd;
mutable DWORD fileAttrib;
#else
- QHash<uchar *, QPair<int /*offset*/, int /*handle|len*/> > maps;
+ QHash<uchar *, QPair<int /*offset % PageSize*/, size_t /*length + offset % PageSize*/> > maps;
mutable QT_STATBUF st;
#endif
int fd;
-#ifdef Q_USE_DEPRECATED_MAP_API
- void mapHandleClose();
- HANDLE fileMapHandle;
-#endif
-
enum LastIOCommand
{
IOFlushCommand,
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index b0cddaaae1..05e6fabecf 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -1243,34 +1243,51 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, QFile::MemoryMapFla
q->setError(QFile::PermissionsError, qt_error_string(int(EACCES)));
return 0;
}
- if (offset < 0) {
+
+ if (offset < 0 || offset != qint64(QT_OFF_T(offset))
+ || size < 0 || size > qint64(size_t(-1))) {
q->setError(QFile::UnspecifiedError, qt_error_string(int(EINVAL)));
return 0;
}
+
+ // If we know the mapping will extend beyond EOF, fail early to avoid
+ // undefined behavior. Otherwise, let mmap have its say.
+ if (doStat()
+ && (QT_OFF_T(size) > st.st_size - QT_OFF_T(offset)))
+ return 0;
+
int access = 0;
if (openMode & QIODevice::ReadOnly) access |= PROT_READ;
if (openMode & QIODevice::WriteOnly) access |= PROT_WRITE;
- int pagesSize = getpagesize();
- int realOffset = offset / pagesSize;
- int extra = offset % pagesSize;
+ int pageSize = getpagesize();
+ int extra = offset % pageSize;
+
+ if (size + extra > (size_t)-1) {
+ q->setError(QFile::UnspecifiedError, qt_error_string(int(EINVAL)));
+ return 0;
+ }
+
+ size_t realSize = (size_t)size + extra;
+ QT_OFF_T realOffset = QT_OFF_T(offset);
+ realOffset &= ~(QT_OFF_T(pageSize - 1));
#ifdef Q_OS_SYMBIAN
void *mapAddress;
- TRAPD(err, mapAddress = mmap((void*)0, (size_t)size + extra,
- access, MAP_SHARED, nativeHandle(), realOffset * pagesSize));
+ TRAPD(err, mapAddress = QT_MMAP((void*)0, realSize,
+ access, MAP_SHARED, nativeHandle(), realOffset));
if (err != KErrNone) {
qWarning("OpenC bug: leave from mmap %d", err);
mapAddress = MAP_FAILED;
errno = EINVAL;
}
#else
- void *mapAddress = mmap((void*)0, (size_t)size + extra,
- access, MAP_SHARED, nativeHandle(), realOffset * pagesSize);
+ void *mapAddress = QT_MMAP((void*)0, realSize,
+ access, MAP_SHARED, nativeHandle(), realOffset);
#endif
if (MAP_FAILED != mapAddress) {
uchar *address = extra + static_cast<uchar*>(mapAddress);
- maps[address] = QPair<int,int>(extra, size);
+ maps[address] = QPair<int,size_t>(extra, realSize);
return address;
}
@@ -1300,7 +1317,7 @@ bool QFSFileEnginePrivate::unmap(uchar *ptr)
}
uchar *start = ptr - maps[ptr].first;
- int len = maps[ptr].second;
+ size_t len = maps[ptr].second;
if (-1 == munmap(start, len)) {
q->setError(QFile::UnspecifiedError, qt_error_string(errno));
return false;
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index 898447cc2e..a6cb5a9f7a 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -455,17 +455,10 @@ bool QFSFileEnginePrivate::nativeClose()
// Windows native mode.
bool ok = true;
- if ((fileHandle == INVALID_HANDLE_VALUE || !CloseHandle(fileHandle))
-#ifdef Q_USE_DEPRECATED_MAP_API
- && (fileMapHandle == INVALID_HANDLE_VALUE || !CloseHandle(fileMapHandle))
-#endif
- ) {
+ if ((fileHandle == INVALID_HANDLE_VALUE || !::CloseHandle(fileHandle))) {
q->setError(QFile::UnspecifiedError, qt_error_string());
ok = false;
}
-#ifdef Q_USE_DEPRECATED_MAP_API
- fileMapHandle = INVALID_HANDLE_VALUE;
-#endif
fileHandle = INVALID_HANDLE_VALUE;
cachedFd = -1; // gets closed by CloseHandle above
@@ -504,14 +497,30 @@ qint64 QFSFileEnginePrivate::nativeSize() const
// ### Don't flush; for buffered files, we should get away with ftell.
thatQ->flush();
+#if !defined(Q_OS_WINCE)
+ // stdlib/stdio mode.
+ if (fh || fd != -1) {
+ qint64 fileSize = _filelengthi64(fh ? QT_FILENO(fh) : fd);
+ if (fileSize == -1) {
+ fileSize = 0;
+ thatQ->setError(QFile::UnspecifiedError, qt_error_string(errno));
+ }
+ return fileSize;
+ }
+#else // Q_OS_WINCE
// Buffered stdlib mode.
if (fh) {
QT_OFF_T oldPos = QT_FTELL(fh);
QT_FSEEK(fh, 0, SEEK_END);
- QT_OFF_T fileSize = QT_FTELL(fh);
+ qint64 fileSize = (qint64)QT_FTELL(fh);
QT_FSEEK(fh, oldPos, SEEK_SET);
- return qint64(fileSize);
+ if (fileSize == -1) {
+ fileSize = 0;
+ thatQ->setError(QFile::UnspecifiedError, qt_error_string(errno));
+ }
+ return fileSize;
}
+#endif
// Not-open mode, where the file name is known: We'll check the
// file system directly.
@@ -551,23 +560,13 @@ qint64 QFSFileEnginePrivate::nativeSize() const
return 0;
}
- // Unbuffed stdio mode.
- if(fd != -1) {
-#if !defined(Q_OS_WINCE)
- HANDLE handle = (HANDLE)_get_osfhandle(fd);
- if (handle != INVALID_HANDLE_VALUE) {
- BY_HANDLE_FILE_INFORMATION fileInfo;
- if (GetFileInformationByHandle(handle, &fileInfo)) {
- qint64 size = fileInfo.nFileSizeHigh;
- size <<= 32;
- size += fileInfo.nFileSizeLow;
- return size;
- }
- }
-#endif
- thatQ->setError(QFile::UnspecifiedError, qt_error_string());
+#if defined(Q_OS_WINCE)
+ // Unbuffed stdio mode
+ if (fd != -1) {
+ thatQ->setError(QFile::UnspecifiedError, QLatin1String("Not implemented!"));
return 0;
}
+#endif
// Windows native mode.
if (fileHandle == INVALID_HANDLE_VALUE)
@@ -799,27 +798,18 @@ int QFSFileEnginePrivate::nativeHandle() const
bool QFSFileEnginePrivate::nativeIsSequential() const
{
#if !defined(Q_OS_WINCE)
- // stdlib / Windows native mode.
- if (fh || fileHandle != INVALID_HANDLE_VALUE) {
- if (fh == stdin || fh == stdout || fh == stderr)
- return true;
-
- HANDLE handle = fileHandle;
- if (fileHandle == INVALID_HANDLE_VALUE) {
- // Rare case: using QFile::open(FILE*) to open a pipe.
- handle = (HANDLE)_get_osfhandle(QT_FILENO(fh));
- return false;
- }
-
- DWORD fileType = GetFileType(handle);
- return fileType == FILE_TYPE_PIPE;
- }
+ HANDLE handle = fileHandle;
+ if (fh || fd != -1)
+ handle = (HANDLE)_get_osfhandle(fh ? QT_FILENO(fh) : fd);
+ if (handle == INVALID_HANDLE_VALUE)
+ return false;
- // stdio mode.
- if (fd != -1)
- return isSequentialFdFh();
-#endif
+ DWORD fileType = GetFileType(handle);
+ return (fileType == FILE_TYPE_CHAR)
+ || (fileType == FILE_TYPE_PIPE);
+#else
return false;
+#endif
}
bool QFSFileEngine::remove()
@@ -1931,42 +1921,42 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size,
return 0;
}
+ if (mapHandle == INVALID_HANDLE_VALUE) {
+ // get handle to the file
+ HANDLE handle = fileHandle;
- // get handle to the file
- HANDLE handle = fileHandle;
#ifndef Q_OS_WINCE
- if (handle == INVALID_HANDLE_VALUE && fh)
- handle = (HANDLE)_get_osfhandle(QT_FILENO(fh));
+ if (handle == INVALID_HANDLE_VALUE && fh)
+ handle = (HANDLE)::_get_osfhandle(QT_FILENO(fh));
#endif
#ifdef Q_USE_DEPRECATED_MAP_API
- if (fileMapHandle == INVALID_HANDLE_VALUE) {
nativeClose();
- fileMapHandle = CreateFileForMapping((const wchar_t*)nativeFilePath.constData(),
+ // handle automatically closed by kernel with mapHandle (below).
+ handle = ::CreateFileForMapping((const wchar_t*)nativeFilePath.constData(),
GENERIC_READ | (openMode & QIODevice::WriteOnly ? GENERIC_WRITE : 0),
0,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);
- }
- handle = fileMapHandle;
#endif
- if (handle == INVALID_HANDLE_VALUE) {
- q->setError(QFile::PermissionsError, qt_error_string(ERROR_ACCESS_DENIED));
- return 0;
- }
+ if (handle == INVALID_HANDLE_VALUE) {
+ q->setError(QFile::PermissionsError, qt_error_string(ERROR_ACCESS_DENIED));
+ return 0;
+ }
- // first create the file mapping handle
- DWORD protection = (openMode & QIODevice::WriteOnly) ? PAGE_READWRITE : PAGE_READONLY;
- HANDLE mapHandle = ::CreateFileMapping(handle, 0, protection, 0, 0, 0);
- if (mapHandle == NULL) {
- q->setError(QFile::PermissionsError, qt_error_string());
+ // first create the file mapping handle
+ DWORD protection = (openMode & QIODevice::WriteOnly) ? PAGE_READWRITE : PAGE_READONLY;
+ mapHandle = ::CreateFileMapping(handle, 0, protection, 0, 0, 0);
+ if (mapHandle == INVALID_HANDLE_VALUE) {
+ q->setError(QFile::PermissionsError, qt_error_string());
#ifdef Q_USE_DEPRECATED_MAP_API
- mapHandleClose();
+ ::CloseHandle(handle);
#endif
- return 0;
+ return 0;
+ }
}
// setup args to map
@@ -1978,17 +1968,17 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size,
DWORD offsetLo = offset & Q_UINT64_C(0xffffffff);
SYSTEM_INFO sysinfo;
::GetSystemInfo(&sysinfo);
- int mask = sysinfo.dwAllocationGranularity - 1;
- int extra = offset & mask;
+ DWORD mask = sysinfo.dwAllocationGranularity - 1;
+ DWORD extra = offset & mask;
if (extra)
offsetLo &= ~mask;
// attempt to create the map
- LPVOID mapAddress = MapViewOfFile(mapHandle, access,
+ LPVOID mapAddress = ::MapViewOfFile(mapHandle, access,
offsetHi, offsetLo, size + extra);
if (mapAddress) {
uchar *address = extra + static_cast<uchar*>(mapAddress);
- maps[address] = QPair<int, HANDLE>(extra, mapHandle);
+ maps[address] = extra;
return address;
}
@@ -2001,10 +1991,8 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size,
default:
q->setError(QFile::UnspecifiedError, qt_error_string());
}
- CloseHandle(mapHandle);
-#ifdef Q_USE_DEPRECATED_MAP_API
- mapHandleClose();
-#endif
+
+ ::CloseHandle(mapHandle);
return 0;
}
@@ -2015,32 +2003,19 @@ bool QFSFileEnginePrivate::unmap(uchar *ptr)
q->setError(QFile::PermissionsError, qt_error_string(ERROR_ACCESS_DENIED));
return false;
}
- uchar *start = ptr - maps[ptr].first;
+ uchar *start = ptr - maps[ptr];
if (!UnmapViewOfFile(start)) {
q->setError(QFile::PermissionsError, qt_error_string());
return false;
}
- if (!CloseHandle((HANDLE)maps[ptr].second)) {
- q->setError(QFile::UnspecifiedError, qt_error_string());
- return false;
- }
maps.remove(ptr);
-
-#ifdef Q_USE_DEPRECATED_MAP_API
- mapHandleClose();
-#endif
- return true;
-}
-
-#ifdef Q_USE_DEPRECATED_MAP_API
-void QFSFileEnginePrivate::mapHandleClose()
-{
if (maps.isEmpty()) {
- CloseHandle(fileMapHandle);
- fileMapHandle = INVALID_HANDLE_VALUE;
+ ::CloseHandle(mapHandle);
+ mapHandle = INVALID_HANDLE_VALUE;
}
+
+ return true;
}
-#endif
QT_END_NAMESPACE
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index d13e1d1d67..f2e66c58ce 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -470,7 +470,7 @@ LRESULT CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
}
return 0;
} else if (message == WM_TIMER) {
- if (wp == ~0u) {
+ if (wp == ~1u) {
KillTimer(d->internalHwnd, wp);
int localSerialNumber = d->serialNumber;
(void) d->wakeUps.fetchAndStoreRelease(0);
@@ -488,7 +488,7 @@ LRESULT CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
if (GetQueueStatus(QS_INPUT | QS_RAWINPUT | QS_TIMER) != 0) {
// delay the next pass of sendPostedEvents() until we get the special
// WM_TIMER, which allows all pending Windows messages to be processed
- SetTimer(d->internalHwnd, ~0u, 0, 0);
+ SetTimer(d->internalHwnd, ~1u, 0, 0);
} else {
// nothing pending in the queue, let sendPostedEvents go through
d->wakeUps.fetchAndStoreRelease(0);
@@ -531,15 +531,16 @@ static HWND qt_create_internal_window(const QEventDispatcherWin32 *eventDispatch
qWinAppInst(), // application
0); // windows creation data.
+ if (!wnd) {
+ qWarning("QEventDispatcher: Failed to create QEventDispatcherWin32 internal window: %d\n", (int)GetLastError());
+ }
+
#ifdef GWLP_USERDATA
SetWindowLongPtr(wnd, GWLP_USERDATA, (LONG_PTR)eventDispatcher);
#else
SetWindowLong(wnd, GWL_USERDATA, (LONG)eventDispatcher);
#endif
- if (!wnd) {
- qWarning("QEventDispatcher: Failed to create QEventDispatcherWin32 internal window: %d\n", (int)GetLastError());
- }
return wnd;
}
@@ -550,7 +551,7 @@ void QEventDispatcherWin32Private::registerTimer(WinTimerInfo *t)
Q_Q(QEventDispatcherWin32);
int ok = 0;
- if (t->interval > 15 || !t->interval || !qtimeSetEvent) {
+ if (t->interval > 20 || !t->interval || !qtimeSetEvent) {
ok = 1;
if (!t->interval) // optimization for single-shot-zero-timer
QCoreApplication::postEvent(q, new QZeroTimerEvent(t->timerId));
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp
index cf951c95cd..ecf3f9c1e8 100644
--- a/src/corelib/statemachine/qstatemachine.cpp
+++ b/src/corelib/statemachine/qstatemachine.cpp
@@ -1616,9 +1616,8 @@ void QStateMachinePrivate::unregisterEventTransition(QEventTransition *transitio
}
void QStateMachinePrivate::handleFilteredEvent(QObject *watched, QEvent *event)
-{
- Q_ASSERT(qobjectEvents.contains(watched));
- if (qobjectEvents[watched].contains(event->type())) {
+{
+ if (qobjectEvents.value(watched).contains(event->type())) {
postInternalEvent(new QStateMachine::WrappedEvent(watched, handler->cloneEvent(event)));
processEvents(DirectProcessing);
}
diff --git a/src/corelib/tools/qbytearraymatcher.h b/src/corelib/tools/qbytearraymatcher.h
index ef46d34695..3d951cf1f4 100644
--- a/src/corelib/tools/qbytearraymatcher.h
+++ b/src/corelib/tools/qbytearraymatcher.h
@@ -79,17 +79,21 @@ private:
QByteArray q_pattern;
#ifdef Q_CC_RVCT
// explicitely allow anonymous unions for RVCT to prevent compiler warnings
-#pragma anon_unions
+# pragma push
+# pragma anon_unions
#endif
struct Data {
uchar q_skiptable[256];
const uchar *p;
int l;
- };
+ };
union {
uint dummy[256];
Data p;
};
+#ifdef Q_CC_RVCT
+# pragma pop
+#endif
};
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h
index 65c3d2a67d..0441107771 100644
--- a/src/corelib/tools/qmap.h
+++ b/src/corelib/tools/qmap.h
@@ -151,7 +151,7 @@ class QMap
static inline int payload() { return sizeof(PayloadNode) - sizeof(QMapData::Node *); }
static inline int alignment() {
#ifdef Q_ALIGNOF
- return qMax(sizeof(void*), Q_ALIGNOF(Node));
+ return int(qMax(sizeof(void*), Q_ALIGNOF(Node)));
#else
return 0;
#endif
diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp
index 1f23211744..3ca8ab9709 100644
--- a/src/corelib/tools/qregexp.cpp
+++ b/src/corelib/tools/qregexp.cpp
@@ -1083,7 +1083,7 @@ public:
bool isValid() const { return valid; }
const QString &errorString() const { return yyError; }
- int numCaptures() const { return officialncap; }
+ int captureCount() const { return officialncap; }
int createState(QChar ch);
int createState(const QRegExpCharClass &cc);
@@ -1378,7 +1378,7 @@ void QRegExpMatchState::prepareForMatch(QRegExpEngine *eng)
#else
int newSlideTabSize = 0;
#endif
- int numCaptures = eng->numCaptures();
+ int numCaptures = eng->captureCount();
int newCapturedSize = 2 + 2 * numCaptures;
bigArray = q_check_ptr((int *)realloc(bigArray, ((3 + 4 * ncap) * ns + 4 * ncap + newSlideTabSize + newCapturedSize)*sizeof(int)));
@@ -4168,12 +4168,24 @@ int QRegExp::matchedLength() const
#ifndef QT_NO_REGEXP_CAPTURE
/*!
+ \obsolete
Returns the number of captures contained in the regular expression.
+
+ \sa captureCount()
*/
int QRegExp::numCaptures() const
{
+ return captureCount();
+}
+
+/*!
+ \since 4.6
+ Returns the number of captures contained in the regular expression.
+ */
+int QRegExp::captureCount() const
+{
prepareEngine(priv);
- return priv->eng->numCaptures();
+ return priv->eng->captureCount();
}
/*!
diff --git a/src/corelib/tools/qregexp.h b/src/corelib/tools/qregexp.h
index 1a7cf53711..2bad40e0a9 100644
--- a/src/corelib/tools/qregexp.h
+++ b/src/corelib/tools/qregexp.h
@@ -119,7 +119,8 @@ public:
#endif
int matchedLength() const;
#ifndef QT_NO_REGEXP_CAPTURE
- int numCaptures() const;
+ QT_DEPRECATED int numCaptures() const;
+ int captureCount() const;
QStringList capturedTexts() const;
QStringList capturedTexts();
QString cap(int nth = 0) const;
diff --git a/src/corelib/tools/qringbuffer_p.h b/src/corelib/tools/qringbuffer_p.h
index c44346cc94..7c766cb7f2 100644
--- a/src/corelib/tools/qringbuffer_p.h
+++ b/src/corelib/tools/qringbuffer_p.h
@@ -287,6 +287,33 @@ public:
return -1;
}
+ inline int indexOf(char c, int maxLength) const {
+ int index = 0;
+ int remain = qMin(size(), maxLength);
+ for (int i = 0; remain && i < buffers.size(); ++i) {
+ int start = 0;
+ int end = buffers.at(i).size();
+
+ if (i == 0)
+ start = head;
+ if (i == tailBuffer)
+ end = tail;
+ if (remain < end - start) {
+ end = start + remain;
+ remain = 0;
+ } else {
+ remain -= end - start;
+ }
+ const char *ptr = buffers.at(i).data() + start;
+ for (int j = start; j < end; ++j) {
+ if (*ptr++ == c)
+ return index;
+ ++index;
+ }
+ }
+ return -1;
+ }
+
inline int read(char *data, int maxLength) {
int bytesToRead = qMin(size(), maxLength);
int readSoFar = 0;
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 55ad28d416..f7321ef404 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -2681,7 +2681,7 @@ QString& QString::replace(const QRegExp &rx, const QString &after)
realloc();
int index = 0;
- int numCaptures = rx2.numCaptures();
+ int numCaptures = rx2.captureCount();
int al = after.length();
QRegExp::CaretMode caretMode = QRegExp::CaretAtZero;
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index 6c9a3cab35..74f93a4ca0 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -631,6 +631,7 @@ private:
friend class QCharRef;
friend class QTextCodec;
friend class QStringRef;
+ friend struct QAbstractConcatenable;
friend inline bool qStringComparisonHelper(const QString &s1, const char *s2);
friend inline bool qStringComparisonHelper(const QStringRef &s1, const char *s2);
public:
diff --git a/src/corelib/tools/qstringbuilder.cpp b/src/corelib/tools/qstringbuilder.cpp
index 0a1321892d..4a16488efc 100644
--- a/src/corelib/tools/qstringbuilder.cpp
+++ b/src/corelib/tools/qstringbuilder.cpp
@@ -41,6 +41,8 @@
#include "qstringbuilder.h"
+QT_BEGIN_NAMESPACE
+
/*!
\class QLatin1Literal
\internal
@@ -143,3 +145,25 @@
Converts the \c QLatin1Literal into a \c QString object.
*/
+
+/*! \internal */
+void QAbstractConcatenable::convertFromAscii(const char *a, int len, QChar *&out)
+{
+#ifndef QT_NO_TEXTCODEC
+ if (QString::codecForCStrings) {
+ QString tmp = QString::fromAscii(a);
+ memcpy(out, reinterpret_cast<const char *>(tmp.constData()), sizeof(QChar) * tmp.size());
+ out += tmp.length();
+ return;
+ }
+#endif
+ if (len == -1) {
+ while (*a)
+ *out++ = QLatin1Char(*a++);
+ } else {
+ for (int i = 0; i < len - 1; ++i)
+ *out++ = QLatin1Char(a[i]);
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/corelib/tools/qstringbuilder.h b/src/corelib/tools/qstringbuilder.h
index efa39b50b4..798d09702b 100644
--- a/src/corelib/tools/qstringbuilder.h
+++ b/src/corelib/tools/qstringbuilder.h
@@ -66,7 +66,7 @@ public:
const char *data() const { return m_data; }
template <int N>
- QLatin1Literal(const char (&str)[N])
+ QLatin1Literal(const char (&str)[N])
: m_size(N - 1), m_data(str) {}
private:
@@ -74,6 +74,21 @@ private:
const char *m_data;
};
+struct Q_CORE_EXPORT QAbstractConcatenable
+{
+protected:
+ static void convertFromAscii(const char *a, int len, QChar *&out);
+
+ static inline void convertFromAscii(char a, QChar *&out)
+ {
+#ifndef QT_NO_TEXTCODEC
+ if (QString::codecForCStrings)
+ *out++ = QChar::fromAscii(a);
+ else
+#endif
+ *out++ = QLatin1Char(a);
+ }
+};
template <typename T> struct QConcatenable {};
@@ -87,9 +102,12 @@ public:
{
QString s(QConcatenable< QStringBuilder<A, B> >::size(*this),
Qt::Uninitialized);
-
+
QChar *d = s.data();
QConcatenable< QStringBuilder<A, B> >::appendTo(*this, d);
+ // this resize is necessary since we allocate a bit too much
+ // when dealing with variable sized 8-bit encodings
+ s.resize(d - s.data());
return s;
}
QByteArray toLatin1() const { return QString(*this).toLatin1(); }
@@ -99,13 +117,13 @@ public:
};
-template <> struct QConcatenable<char>
+template <> struct QConcatenable<char> : private QAbstractConcatenable
{
typedef char type;
static int size(const char) { return 1; }
static inline void appendTo(const char c, QChar *&out)
{
- *out++ = QLatin1Char(c);
+ QAbstractConcatenable::convertFromAscii(c, out);
}
};
@@ -170,7 +188,7 @@ template <> struct QConcatenable<QString>
{
const int n = a.size();
memcpy(out, reinterpret_cast<const char*>(a.constData()), sizeof(QChar) * n);
- out += n;
+ out += n;
}
};
@@ -182,53 +200,51 @@ template <> struct QConcatenable<QStringRef>
{
const int n = a.size();
memcpy(out, reinterpret_cast<const char*>(a.constData()), sizeof(QChar) * n);
- out += n;
+ out += n;
}
};
#ifndef QT_NO_CAST_FROM_ASCII
-template <int N> struct QConcatenable<char[N]>
+template <int N> struct QConcatenable<char[N]> : private QAbstractConcatenable
{
typedef char type[N];
- static int size(const char[N]) { return N - 1; }
+ static int size(const char[N])
+ {
+ return N - 1;
+ }
static inline void appendTo(const char a[N], QChar *&out)
{
- for (int i = 0; i < N - 1; ++i)
- *out++ = QLatin1Char(a[i]);
+ QAbstractConcatenable::convertFromAscii(a, N, out);
}
};
-template <int N> struct QConcatenable<const char[N]>
+template <int N> struct QConcatenable<const char[N]> : private QAbstractConcatenable
{
typedef const char type[N];
static int size(const char[N]) { return N - 1; }
static inline void appendTo(const char a[N], QChar *&out)
{
- for (int i = 0; i < N - 1; ++i)
- *out++ = QLatin1Char(a[i]);
+ QAbstractConcatenable::convertFromAscii(a, N, out);
}
};
-template <> struct QConcatenable<const char *>
+template <> struct QConcatenable<const char *> : private QAbstractConcatenable
{
typedef char const *type;
static int size(const char *a) { return qstrlen(a); }
static inline void appendTo(const char *a, QChar *&out)
{
- while (*a)
- *out++ = QLatin1Char(*a++);
+ QAbstractConcatenable::convertFromAscii(a, -1, out);
}
};
-template <> struct QConcatenable<QByteArray>
+template <> struct QConcatenable<QByteArray> : private QAbstractConcatenable
{
typedef QByteArray type;
static int size(const QByteArray &ba) { return qstrnlen(ba.constData(), ba.size()); }
static inline void appendTo(const QByteArray &ba, QChar *&out)
{
- const char *data = ba.constData();
- while (*data)
- *out++ = QLatin1Char(*data++);
+ QAbstractConcatenable::convertFromAscii(ba.constData(), -1, out);
}
};
#endif
@@ -237,7 +253,7 @@ template <typename A, typename B>
struct QConcatenable< QStringBuilder<A, B> >
{
typedef QStringBuilder<A, B> type;
- static int size(const type &p)
+ static int size(const type &p)
{
return QConcatenable<A>::size(p.a) + QConcatenable<B>::size(p.b);
}
diff --git a/src/corelib/tools/qstringmatcher.h b/src/corelib/tools/qstringmatcher.h
index 0cb1312940..80760985a4 100644
--- a/src/corelib/tools/qstringmatcher.h
+++ b/src/corelib/tools/qstringmatcher.h
@@ -79,7 +79,8 @@ private:
Qt::CaseSensitivity q_cs;
#ifdef Q_CC_RVCT
// explicitely allow anonymous unions for RVCT to prevent compiler warnings
-#pragma anon_unions
+# pragma push
+# pragma anon_unions
#endif
struct Data {
uchar q_skiptable[256];
@@ -90,6 +91,9 @@ private:
uint q_data[256];
Data p;
};
+#ifdef Q_CC_RVCT
+# pragma pop
+#endif
};
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qunicodetables_p.h b/src/corelib/tools/qunicodetables_p.h
index e4041b4c88..4e9ce4d61a 100644
--- a/src/corelib/tools/qunicodetables_p.h
+++ b/src/corelib/tools/qunicodetables_p.h
@@ -114,6 +114,7 @@ namespace QUnicodeTables {
Ogham,
Runic,
Khmer,
+ Nko,
Inherited,
ScriptCount = Inherited,
Latin = Common,
@@ -152,8 +153,7 @@ namespace QUnicodeTables {
Balinese = Common,
Cuneiform = Common,
Phoenician = Common,
- PhagsPa = Common,
- Nko = Common
+ PhagsPa = Common
};
enum { ScriptSentinel = 32 };
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index 7402d77adf..930b006c08 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -92,7 +92,7 @@ struct QVectorTypedData : private QVectorData
// as this would break strict aliasing rules. (in the case of shared_null)
T array[1];
- static inline void free(QVectorTypedData *x, int alignment) { QVectorData::free(x, alignment); }
+ static inline void free(QVectorTypedData<T> *x, int alignment) { QVectorData::free(static_cast<QVectorData *>(x), alignment); }
};
class QRegion;
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index c7538c3db5..748658db82 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -1988,7 +1988,7 @@ void QDBusConnectionPrivate::connectSignal(const QString &key, const SignalHook
{
signalHooks.insertMulti(key, hook);
connect(hook.obj, SIGNAL(destroyed(QObject*)), SLOT(objectDestroyed(QObject*)),
- Qt::DirectConnection);
+ Qt::ConnectionType(Qt::DirectConnection | Qt::UniqueConnection));
MatchRefCountHash::iterator it = matchRefCounts.find(hook.matchRule);
diff --git a/src/dbus/qdbusservicewatcher.cpp b/src/dbus/qdbusservicewatcher.cpp
index 115fe3eb3d..1557b47870 100644
--- a/src/dbus/qdbusservicewatcher.cpp
+++ b/src/dbus/qdbusservicewatcher.cpp
@@ -47,6 +47,8 @@
#include <private/qobject_p.h>
+QT_BEGIN_NAMESPACE
+
Q_GLOBAL_STATIC_WITH_ARGS(QString, busService, (QLatin1String(DBUS_SERVICE_DBUS)))
Q_GLOBAL_STATIC_WITH_ARGS(QString, busPath, (QLatin1String(DBUS_PATH_DBUS)))
Q_GLOBAL_STATIC_WITH_ARGS(QString, busInterface, (QLatin1String(DBUS_INTERFACE_DBUS)))
@@ -371,4 +373,6 @@ void QDBusServiceWatcher::setConnection(const QDBusConnection &connection)
d->setConnection(d->servicesWatched, connection, d->watchMode);
}
+QT_END_NAMESPACE
+
#include "moc_qdbusservicewatcher.cpp"
diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h
index 8f6d9d921f..c49305488e 100644
--- a/src/gui/accessible/qaccessible.h
+++ b/src/gui/accessible/qaccessible.h
@@ -311,7 +311,8 @@ namespace QAccessible2
EditableTextInterface,
ValueInterface,
TableInterface,
- ActionInterface
+ ActionInterface,
+ ImageInterface
};
}
@@ -321,6 +322,7 @@ class QAccessibleEditableTextInterface;
class QAccessibleValueInterface;
class QAccessibleTableInterface;
class QAccessibleActionInterface;
+class QAccessibleImageInterface;
class Q_GUI_EXPORT QAccessibleInterface : public QAccessible
{
@@ -381,6 +383,9 @@ public:
inline QAccessibleActionInterface *actionInterface()
{ return reinterpret_cast<QAccessibleActionInterface *>(cast_helper(QAccessible2::ActionInterface)); }
+ inline QAccessibleImageInterface *imageInterface()
+ { return reinterpret_cast<QAccessibleImageInterface *>(cast_helper(QAccessible2::ImageInterface)); }
+
private:
QAccessible2Interface *cast_helper(QAccessible2::InterfaceType);
};
diff --git a/src/gui/accessible/qaccessible2.cpp b/src/gui/accessible/qaccessible2.cpp
index 08673686f9..b878cf12ba 100644
--- a/src/gui/accessible/qaccessible2.cpp
+++ b/src/gui/accessible/qaccessible2.cpp
@@ -120,6 +120,18 @@ QT_BEGIN_NAMESPACE
\link http://www.linux-foundation.org/en/Accessibility/IAccessible2 IAccessible2 Specification \endlink
*/
+/*!
+ \class QAccessibleImageInterface
+ \ingroup accessibility
+ \internal
+ \preliminary
+
+ \brief The QAccessibleImageInterface class implements support for
+ the IAccessibleImage interface.
+
+ \link http://www.linux-foundation.org/en/Accessibility/IAccessible2 IAccessible2 Specification \endlink
+*/
+
QAccessibleSimpleEditableTextInterface::QAccessibleSimpleEditableTextInterface(
QAccessibleInterface *accessibleInterface)
: iface(accessibleInterface)
diff --git a/src/gui/accessible/qaccessible2.h b/src/gui/accessible/qaccessible2.h
index 435c640148..ba12a7c9f6 100644
--- a/src/gui/accessible/qaccessible2.h
+++ b/src/gui/accessible/qaccessible2.h
@@ -82,6 +82,7 @@ inline QAccessible2Interface *qAccessibleTextCastHelper() { return 0; }
inline QAccessible2Interface *qAccessibleEditableTextCastHelper() { return 0; }
inline QAccessible2Interface *qAccessibleTableCastHelper() { return 0; }
inline QAccessible2Interface *qAccessibleActionCastHelper() { return 0; }
+inline QAccessible2Interface *qAccessibleImageCastHelper() { return 0; }
#define Q_ACCESSIBLE_OBJECT \
public: \
@@ -98,6 +99,8 @@ inline QAccessible2Interface *qAccessibleActionCastHelper() { return 0; }
return qAccessibleTableCastHelper(); \
case QAccessible2::ActionInterface: \
return qAccessibleActionCastHelper(); \
+ case QAccessible2::ImageInterface: \
+ return qAccessibleImageCastHelper(); \
} \
return 0; \
} \
@@ -224,6 +227,16 @@ public:
virtual QStringList keyBindings(int actionIndex) = 0;
};
+class Q_GUI_EXPORT QAccessibleImageInterface : public QAccessible2Interface
+{
+public:
+ inline QAccessible2Interface *qAccessibleImageCastHelper() { return this; }
+
+ virtual QString imageDescription() = 0;
+ virtual QSize imageSize() = 0;
+ virtual QRect imagePosition(QAccessible2::CoordinateType coordType) = 0;
+};
+
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE
diff --git a/src/gui/accessible/qaccessible_mac.mm b/src/gui/accessible/qaccessible_mac.mm
index 9575ad8a8c..030c1a982b 100644
--- a/src/gui/accessible/qaccessible_mac.mm
+++ b/src/gui/accessible/qaccessible_mac.mm
@@ -504,11 +504,6 @@ QAElement::QAElement(const QAElement &element)
}
QAElement::QAElement(HIObjectRef object, int child)
- :elementRef(
-#ifndef QT_MAC_USE_COCOA
- AXUIElementCreateWithHIObjectAndIdentifier(object, child)
-#endif
-)
{
#ifndef QT_MAC_USE_COCOA
if (object == 0) {
diff --git a/src/gui/dialogs/qcolordialog_mac.mm b/src/gui/dialogs/qcolordialog_mac.mm
index 9e4fdd1d0b..5f074c0d94 100644
--- a/src/gui/dialogs/qcolordialog_mac.mm
+++ b/src/gui/dialogs/qcolordialog_mac.mm
@@ -252,15 +252,20 @@ QT_USE_NAMESPACE
delete mQtColor;
mQtColor = new QColor();
NSColor *color = [mColorPanel color];
- NSString *colorSpace = [color colorSpaceName];
- if (colorSpace == NSDeviceCMYKColorSpace) {
- CGFloat cyan, magenta, yellow, black, alpha;
+ NSString *colorSpaceName = [color colorSpaceName];
+ if (colorSpaceName == NSDeviceCMYKColorSpace) {
+ CGFloat cyan = 0, magenta = 0, yellow = 0, black = 0, alpha = 0;
[color getCyan:&cyan magenta:&magenta yellow:&yellow black:&black alpha:&alpha];
mQtColor->setCmykF(cyan, magenta, yellow, black, alpha);
- } else if (colorSpace == NSCalibratedRGBColorSpace || colorSpace == NSDeviceRGBColorSpace) {
- CGFloat red, green, blue, alpha;
+ } else if (colorSpaceName == NSCalibratedRGBColorSpace || colorSpaceName == NSDeviceRGBColorSpace) {
+ CGFloat red = 0, green = 0, blue = 0, alpha = 0;
[color getRed:&red green:&green blue:&blue alpha:&alpha];
mQtColor->setRgbF(red, green, blue, alpha);
+ } else if (colorSpaceName == NSNamedColorSpace) {
+ NSColor *tmpColor = [color colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
+ CGFloat red = 0, green = 0, blue = 0, alpha = 0;
+ [tmpColor getRed:&red green:&green blue:&blue alpha:&alpha];
+ mQtColor->setRgbF(red, green, blue, alpha);
} else {
NSColorSpace *colorSpace = [color colorSpace];
if ([colorSpace colorSpaceModel] == NSCMYKColorSpaceModel && [color numberOfComponents] == 5){
@@ -269,7 +274,7 @@ QT_USE_NAMESPACE
mQtColor->setCmykF(components[0], components[1], components[2], components[3], components[4]);
} else {
NSColor *tmpColor = [color colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
- CGFloat red, green, blue, alpha;
+ CGFloat red = 0, green = 0, blue = 0, alpha = 0;
[tmpColor getRed:&red green:&green blue:&blue alpha:&alpha];
mQtColor->setRgbF(red, green, blue, alpha);
}
@@ -319,7 +324,18 @@ QT_USE_NAMESPACE
QBoolBlocker nativeDialogOnTop(QApplicationPrivate::native_modal_dialog_active);
QMacCocoaAutoReleasePool pool;
mDialogIsExecuting = true;
- [NSApp runModalForWindow:mColorPanel];
+ bool modalEnded = false;
+ while (!modalEnded) {
+ @try {
+ [NSApp runModalForWindow:mColorPanel];
+ modalEnded = true;
+ } @catch (NSException *) {
+ // For some reason, NSColorPanel throws an exception when
+ // clicking on 'SelectedMenuItemColor' from the 'Developer'
+ // palette (tab three).
+ }
+ }
+
QAbstractEventDispatcher::instance()->interrupt();
if (mResultCode == NSCancelButton)
mPriv->colorDialog()->reject();
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm
index 4af5688d5b..b0e6575766 100644
--- a/src/gui/dialogs/qfiledialog_mac.mm
+++ b/src/gui/dialogs/qfiledialog_mac.mm
@@ -830,8 +830,8 @@ void QFileDialogPrivate::qt_mac_filedialog_event_proc(const NavEventCallbackMess
|| mode == QFileDialog::ExistingFiles){
// When changing directory, the current selection is cleared if
// we are supposed to be selecting files only:
- fileDialogPrivate->mCurrentSelectionList.clear();
if (!fileDialogPrivate->mCurrentSelection.isEmpty()){
+ fileDialogPrivate->mCurrentSelectionList.clear();
fileDialogPrivate->mCurrentSelection.clear();
emit fileDialogPrivate->q_func()->currentChanged(fileDialogPrivate->mCurrentSelection);
}
diff --git a/src/gui/dialogs/qprintpreviewdialog.cpp b/src/gui/dialogs/qprintpreviewdialog.cpp
index 4cb0c930c4..1f0b51dc20 100644
--- a/src/gui/dialogs/qprintpreviewdialog.cpp
+++ b/src/gui/dialogs/qprintpreviewdialog.cpp
@@ -446,7 +446,7 @@ void QPrintPreviewDialogPrivate::setFitting(bool on)
void QPrintPreviewDialogPrivate::updateNavActions()
{
int curPage = preview->currentPage();
- int numPages = preview->numPages();
+ int numPages = preview->pageCount();
nextPageAction->setEnabled(curPage < numPages);
prevPageAction->setEnabled(curPage > 1);
firstPageAction->setEnabled(curPage > 1);
@@ -458,7 +458,7 @@ void QPrintPreviewDialogPrivate::updatePageNumLabel()
{
Q_Q(QPrintPreviewDialog);
- int numPages = preview->numPages();
+ int numPages = preview->pageCount();
int maxChars = QString::number(numPages).length();
pageNumLabel->setText(QString::fromLatin1("/ %1").arg(numPages));
int cyphersWidth = q->fontMetrics().width(QString().fill(QLatin1Char('8'), maxChars));
@@ -515,7 +515,7 @@ void QPrintPreviewDialogPrivate::_q_navigate(QAction* action)
else if (action == firstPageAction)
preview->setCurrentPage(1);
else if (action == lastPageAction)
- preview->setCurrentPage(preview->numPages());
+ preview->setCurrentPage(preview->pageCount());
updateNavActions();
}
diff --git a/src/gui/effects/qgraphicseffect.cpp b/src/gui/effects/qgraphicseffect.cpp
index 83f4f792ee..568ff738e1 100644
--- a/src/gui/effects/qgraphicseffect.cpp
+++ b/src/gui/effects/qgraphicseffect.cpp
@@ -108,6 +108,7 @@
#include <QtCore/qdebug.h>
#include <private/qdrawhelper_p.h>
+#ifndef QT_NO_GRAPHICSEFFECT
QT_BEGIN_NAMESPACE
/*!
@@ -127,6 +128,19 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \enum QGraphicsEffectSource::PixmapPadMode
+
+ This enum describes how much of the effect will be rendered to a pixmap
+ created using the pixmap() function.
+
+ \value NoExpandPadMode The pixmap is the size of the widget or graphics item.
+ \value ExpandToTransparentBorderPadMode The pixmap is expanded to include
+ the widget or graphics item plus a transparent border.
+ \value ExpandToEffectRectPadMode The pixmap is expanded to include the widget
+ or graphics item and the effect.
+*/
+
+/*!
\internal
*/
QGraphicsEffectSource::QGraphicsEffectSource(QGraphicsEffectSourcePrivate &dd, QObject *parent)
@@ -263,6 +277,9 @@ bool QGraphicsEffectSource::isPixmap() const
The optional \a offset parameter returns the offset where the pixmap should
be painted at using the current painter.
+ The \a mode determines how much of the effect the pixmap will contain.
+ By default, the pixmap will contain the whole effect.
+
The returned pixmap is bound to the current painter's device rectangle when
\a system is Qt::DeviceCoordinates.
@@ -303,6 +320,11 @@ QPixmap QGraphicsEffectSource::pixmap(Qt::CoordinateSystem system, QPoint *offse
return pm;
}
+QGraphicsEffectSourcePrivate::~QGraphicsEffectSourcePrivate()
+{
+ invalidateCache();
+}
+
void QGraphicsEffectSourcePrivate::invalidateCache(bool effectRectChanged) const
{
if (effectRectChanged && m_cachedMode != QGraphicsEffectSource::ExpandToEffectRectPadMode)
@@ -734,7 +756,7 @@ void QGraphicsBlurEffect::setBlurHint(QGraphicsBlurEffect::BlurHint hint)
}
/*!
- \fn void QGraphicsBlurEffect::blurHintChanged(Qt::BlurHint hint)
+ \fn void QGraphicsBlurEffect::blurHintChanged(QGraphicsBlurEffect::BlurHint hint)
This signal is emitted whenever the effect's blur hint changes.
The \a hint parameter holds the effect's new blur hint.
@@ -1128,3 +1150,4 @@ void QGraphicsOpacityEffect::draw(QPainter *painter, QGraphicsEffectSource *sour
QT_END_NAMESPACE
+#endif //QT_NO_GRAPHICSEFFECT
diff --git a/src/gui/effects/qgraphicseffect.h b/src/gui/effects/qgraphicseffect.h
index 7335a254f2..5c73f4bb3d 100644
--- a/src/gui/effects/qgraphicseffect.h
+++ b/src/gui/effects/qgraphicseffect.h
@@ -48,6 +48,7 @@
#include <QtGui/qcolor.h>
#include <QtGui/qbrush.h>
+#ifndef QT_NO_GRAPHICSEFFECT
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -302,6 +303,7 @@ private:
QT_END_NAMESPACE
QT_END_HEADER
+#endif //QT_NO_GRAPHICSEFFECT
#endif // QGRAPHICSEFFECT_H
diff --git a/src/gui/effects/qgraphicseffect_p.h b/src/gui/effects/qgraphicseffect_p.h
index 0ff5794802..d94d08d4ab 100644
--- a/src/gui/effects/qgraphicseffect_p.h
+++ b/src/gui/effects/qgraphicseffect_p.h
@@ -60,6 +60,7 @@
#include <private/qobject_p.h>
#include <private/qpixmapfilter_p.h>
+#ifndef QT_NO_GRAPHICSEFFECT
QT_BEGIN_NAMESPACE
class QGraphicsEffectSourcePrivate : public QObjectPrivate
@@ -72,7 +73,7 @@ public:
, m_cachedMode(QGraphicsEffectSource::ExpandToTransparentBorderPadMode)
{}
- virtual ~QGraphicsEffectSourcePrivate() { invalidateCache(); }
+ virtual ~QGraphicsEffectSourcePrivate();
virtual void detach() = 0;
virtual QRectF boundingRect(Qt::CoordinateSystem system) const = 0;
virtual QRect deviceRect() const = 0;
@@ -179,5 +180,6 @@ public:
QT_END_NAMESPACE
+#endif //QT_NO_GRAPHICSEFFECT
#endif // QGRAPHICSEFFECT_P_H
diff --git a/src/gui/embedded/qscreen_qws.cpp b/src/gui/embedded/qscreen_qws.cpp
index 911a77e43b..ae5570febc 100644
--- a/src/gui/embedded/qscreen_qws.cpp
+++ b/src/gui/embedded/qscreen_qws.cpp
@@ -600,7 +600,7 @@ static void blit_template(QScreen *screen, const QImage &image,
const int screenStride = screen->linestep();
const int imageStride = image.bytesPerLine();
- if (region.numRects() == 1) {
+ if (region.rectCount() == 1) {
const QRect r = region.boundingRect();
const SRC *src = reinterpret_cast<const SRC*>(image.scanLine(r.y()))
+ r.x();
@@ -1385,7 +1385,7 @@ QImage::Format QScreenPrivate::preferredImageFormat() const
QScreen provides several functions to retrieve information about
the color palette: The clut() function returns a pointer to the
- color lookup table (i.e. its color palette). Use the numCols()
+ color lookup table (i.e. its color palette). Use the colorCount()
function to determine the number of entries in this table, and the
alloc() function to retrieve the palette index of the color that
is the closest match to a given RGB value.
@@ -1998,12 +1998,20 @@ QImage::Format QScreenPrivate::preferredImageFormat() const
i.e. in modes where only the palette indexes (and not the actual
color values) are stored in memory.
- \sa alloc(), depth(), numCols()
+ \sa alloc(), depth(), colorCount()
*/
/*!
+ \obsolete
\fn int QScreen::numCols()
+ \sa colorCount()
+*/
+
+/*!
+ \since 4.6
+ \fn int QScreen::colorCount()
+
Returns the number of entries in the screen's color lookup table
(i.e. its color palette). A pointer to the color table can be
retrieved using the clut() function.
@@ -2103,7 +2111,7 @@ void QScreen::setPixelFormat(QImage::Format format)
i.e. in modes where only the palette indexes (and not the actual
color values) are stored in memory.
- \sa clut(), numCols()
+ \sa clut(), colorCount()
*/
int QScreen::alloc(unsigned int r,unsigned int g,unsigned int b)
@@ -2455,7 +2463,7 @@ void QScreen::exposeRegion(QRegion r, int windowIndex)
delete blendBuffer;
}
- if (r.numRects() == 1) {
+ if (r.rectCount() == 1) {
setDirty(r.boundingRect());
} else {
const QVector<QRect> rects = r.rects();
diff --git a/src/gui/embedded/qscreen_qws.h b/src/gui/embedded/qscreen_qws.h
index d20d7099e6..b3246f9edc 100644
--- a/src/gui/embedded/qscreen_qws.h
+++ b/src/gui/embedded/qscreen_qws.h
@@ -243,7 +243,8 @@ public:
int totalSize() const { return mapsize; }
QRgb * clut() { return screenclut; }
- int numCols() { return screencols; }
+ QT_DEPRECATED int numCols() { return screencols; }
+ int colorCount() { return screencols; }
virtual QSize mapToDevice(const QSize &) const;
virtual QSize mapFromDevice(const QSize &) const;
diff --git a/src/gui/embedded/qwscursor_qws.cpp b/src/gui/embedded/qwscursor_qws.cpp
index 07271e1d55..7d5a3d1cd7 100644
--- a/src/gui/embedded/qwscursor_qws.cpp
+++ b/src/gui/embedded/qwscursor_qws.cpp
@@ -534,7 +534,7 @@ void QWSCursor::set(const uchar *data, const uchar *mask,
if (!width || !height || !data || !mask || cursor.isNull())
return;
- cursor.setNumColors(3);
+ cursor.setColorCount(3);
cursor.setColor(0, 0xff000000);
cursor.setColor(1, 0xffffffff);
cursor.setColor(2, 0x00000000);
diff --git a/src/gui/graphicsview/qgraph_p.h b/src/gui/graphicsview/qgraph_p.h
index f1fa185fa7..0a2bf27fb0 100644
--- a/src/gui/graphicsview/qgraph_p.h
+++ b/src/gui/graphicsview/qgraph_p.h
@@ -201,11 +201,6 @@ public:
return l;
}
- void setRootVertex(Vertex *vertex)
- {
- userVertex = vertex;
- }
-
QSet<Vertex*> vertices() const {
QSet<Vertex *> setOfVertices;
for (const_iterator it = constBegin(); it != constEnd(); ++it) {
@@ -241,7 +236,7 @@ public:
EdgeData *data = edgeData(v, v1);
bool forward = data->from == v;
if (forward) {
- edges += QString::fromAscii("%1->%2 [label=\"[%3,%4,%5]\" dir=both color=\"#000000:#a0a0a0\"] \n")
+ edges += QString::fromAscii("\"%1\"->\"%2\" [label=\"[%3,%4,%5]\" dir=both color=\"#000000:#a0a0a0\"] \n")
.arg(v->toString())
.arg(v1->toString())
.arg(data->minSize)
@@ -250,17 +245,12 @@ public:
;
}
}
- strVertices += QString::fromAscii("%1 [label=\"%2\"]\n").arg(v->toString()).arg(v->toString());
+ strVertices += QString::fromAscii("\"%1\" [label=\"%2\"]\n").arg(v->toString()).arg(v->toString());
}
return QString::fromAscii("%1\n%2\n").arg(strVertices).arg(edges);
}
#endif
- Vertex *rootVertex() const
- {
- return userVertex;
- }
-
protected:
void createDirectedEdge(Vertex *from, Vertex *to, EdgeData *data)
{
@@ -286,8 +276,6 @@ protected:
}
private:
- Vertex *userVertex;
-
QHash<Vertex *, QHash<Vertex *, EdgeData *> *> m_graph;
};
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp
index 56d70e1f46..872ec3c7c1 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp
+++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp
@@ -83,10 +83,8 @@
\clearfloat
\section1 Size Hints and Size Policies in an Anchor Layout
- QGraphicsAnchorLayout respects each item's size hints and size policies. However it does
- not currently respect their stretch factors. This might change in the future, so avoid
- using stretch factors in anchor layouts if you want to avoid any future regressions in
- behavior.
+ QGraphicsAnchorLayout respects each item's size hints and size policies.
+ Note that there are some properties of QSizePolicy that are \l{Known issues}{not respected}.
\section1 Spacing within an Anchor Layout
@@ -101,6 +99,21 @@
If the spacing is negative, the items will overlap to some extent.
+
+ \section1 Known issues
+ There are some features that QGraphicsAnchorLayout currently does not support.
+ This might change in the future, so avoid using these features if you want to
+ avoid any future regressions in behaviour:
+ \list
+
+ \o Stretch factors are not respected.
+
+ \o QSizePolicy::ExpandFlag is not respected.
+
+ \o Height for width is not respected.
+
+ \endlist
+
\sa QGraphicsLinearLayout, QGraphicsGridLayout, QGraphicsLayout
*/
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
index 41aa8aac9a..182594e55b 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
@@ -61,6 +61,8 @@ QGraphicsAnchorPrivate::QGraphicsAnchorPrivate(int version)
QGraphicsAnchorPrivate::~QGraphicsAnchorPrivate()
{
+ // ###
+ layoutPrivate->restoreSimplifiedGraph(QGraphicsAnchorLayoutPrivate::Orientation(data->orientation));
layoutPrivate->removeAnchor(data->from, data->to);
}
@@ -105,7 +107,7 @@ qreal QGraphicsAnchorPrivate::spacing() const
static void internalSizeHints(QSizePolicy::Policy policy,
qreal minSizeHint, qreal prefSizeHint, qreal maxSizeHint,
qreal *minSize, qreal *prefSize,
- qreal *expSize, qreal *maxSize)
+ qreal *maxSize)
{
// minSize, prefSize and maxSize are initialized
// with item's preferred Size: this is QSizePolicy::Fixed.
@@ -135,11 +137,6 @@ static void internalSizeHints(QSizePolicy::Policy policy,
*prefSize = *minSize;
else
*prefSize = prefSizeHint;
-
- if (policy & QSizePolicy::ExpandFlag)
- *expSize = *maxSize;
- else
- *expSize = *prefSize;
}
bool AnchorData::refreshSizeHints(const QLayoutStyleInfo *styleInfo)
@@ -154,7 +151,6 @@ bool AnchorData::refreshSizeHints(const QLayoutStyleInfo *styleInfo)
if (isLayoutAnchor) {
minSize = 0;
prefSize = 0;
- expSize = 0;
maxSize = QWIDGETSIZE_MAX;
if (isCenterAnchor)
maxSize /= 2;
@@ -205,8 +201,8 @@ bool AnchorData::refreshSizeHints(const QLayoutStyleInfo *styleInfo)
}
maxSizeHint = QWIDGETSIZE_MAX;
}
- internalSizeHints(policy, minSizeHint, prefSizeHint, maxSizeHint,
- &minSize, &prefSize, &expSize, &maxSize);
+ internalSizeHints(policy, minSizeHint, prefSizeHint, maxSizeHint,
+ &minSize, &prefSize, &maxSize);
// Set the anchor effective sizes to preferred.
//
@@ -217,7 +213,6 @@ bool AnchorData::refreshSizeHints(const QLayoutStyleInfo *styleInfo)
// recalculate and override the values we set here.
sizeAtMinimum = prefSize;
sizeAtPreferred = prefSize;
- sizeAtExpanding = prefSize;
sizeAtMaximum = prefSize;
return true;
@@ -225,10 +220,20 @@ bool AnchorData::refreshSizeHints(const QLayoutStyleInfo *styleInfo)
void ParallelAnchorData::updateChildrenSizes()
{
- firstEdge->sizeAtMinimum = secondEdge->sizeAtMinimum = sizeAtMinimum;
- firstEdge->sizeAtPreferred = secondEdge->sizeAtPreferred = sizeAtPreferred;
- firstEdge->sizeAtExpanding = secondEdge->sizeAtExpanding = sizeAtExpanding;
- firstEdge->sizeAtMaximum = secondEdge->sizeAtMaximum = sizeAtMaximum;
+ firstEdge->sizeAtMinimum = sizeAtMinimum;
+ firstEdge->sizeAtPreferred = sizeAtPreferred;
+ firstEdge->sizeAtMaximum = sizeAtMaximum;
+
+ const bool secondFwd = (secondEdge->from == from);
+ if (secondFwd) {
+ secondEdge->sizeAtMinimum = sizeAtMinimum;
+ secondEdge->sizeAtPreferred = sizeAtPreferred;
+ secondEdge->sizeAtMaximum = sizeAtMaximum;
+ } else {
+ secondEdge->sizeAtMinimum = -sizeAtMinimum;
+ secondEdge->sizeAtPreferred = -sizeAtPreferred;
+ secondEdge->sizeAtMaximum = -sizeAtMaximum;
+ }
firstEdge->updateChildrenSizes();
secondEdge->updateChildrenSizes();
@@ -247,8 +252,16 @@ bool ParallelAnchorData::refreshSizeHints_helper(const QLayoutStyleInfo *styleIn
return false;
}
- minSize = qMax(firstEdge->minSize, secondEdge->minSize);
- maxSize = qMin(firstEdge->maxSize, secondEdge->maxSize);
+ // Account for parallel anchors where the second edge is backwards.
+ // We rely on the fact that a forward anchor of sizes min, pref, max is equivalent
+ // to a backwards anchor of size (-max, -pref, -min)
+ const bool secondFwd = (secondEdge->from == from);
+ const qreal secondMin = secondFwd ? secondEdge->minSize : -secondEdge->maxSize;
+ const qreal secondPref = secondFwd ? secondEdge->prefSize : -secondEdge->prefSize;
+ const qreal secondMax = secondFwd ? secondEdge->maxSize : -secondEdge->minSize;
+
+ minSize = qMax(firstEdge->minSize, secondMin);
+ maxSize = qMin(firstEdge->maxSize, secondMax);
// This condition means that the maximum size of one anchor being simplified is smaller than
// the minimum size of the other anchor. The consequence is that there won't be a valid size
@@ -257,16 +270,27 @@ bool ParallelAnchorData::refreshSizeHints_helper(const QLayoutStyleInfo *styleIn
return false;
}
- expSize = qMax(firstEdge->expSize, secondEdge->expSize);
- expSize = qMin(expSize, maxSize);
+ // The equivalent preferred Size of a parallel anchor is calculated as to
+ // reduce the deviation from the original preferred sizes _and_ to avoid shrinking
+ // items below their preferred sizes, unless strictly needed.
- prefSize = qMax(firstEdge->prefSize, secondEdge->prefSize);
- prefSize = qMin(prefSize, expSize);
+ // ### This logic only holds if all anchors in the layout are "well-behaved" in the
+ // following terms:
+ //
+ // - There are no negative-sized anchors
+ // - All sequential anchors are composed of children in the same direction as the
+ // sequential anchor itself
+ //
+ // With these assumptions we can grow a child knowing that no hidden items will
+ // have to shrink as the result of that.
+ // If any of these does not hold, we have a situation where the ParallelAnchor
+ // does not have enough information to calculate its equivalent prefSize.
+ prefSize = qMax(firstEdge->prefSize, secondPref);
+ prefSize = qMin(prefSize, maxSize);
// See comment in AnchorData::refreshSizeHints() about sizeAt* values
sizeAtMinimum = prefSize;
sizeAtPreferred = prefSize;
- sizeAtExpanding = prefSize;
sizeAtMaximum = prefSize;
return true;
@@ -280,8 +304,7 @@ bool ParallelAnchorData::refreshSizeHints_helper(const QLayoutStyleInfo *styleIn
1 is at Maximum
*/
static QPair<QGraphicsAnchorLayoutPrivate::Interval, qreal> getFactor(qreal value, qreal min,
- qreal pref, qreal exp,
- qreal max)
+ qreal pref, qreal max)
{
QGraphicsAnchorLayoutPrivate::Interval interval;
qreal lower;
@@ -291,13 +314,9 @@ static QPair<QGraphicsAnchorLayoutPrivate::Interval, qreal> getFactor(qreal valu
interval = QGraphicsAnchorLayoutPrivate::MinToPreferred;
lower = min;
upper = pref;
- } else if (value < exp) {
- interval = QGraphicsAnchorLayoutPrivate::PreferredToExpanding;
- lower = pref;
- upper = exp;
} else {
- interval = QGraphicsAnchorLayoutPrivate::ExpandingToMax;
- lower = exp;
+ interval = QGraphicsAnchorLayoutPrivate::PreferredToMax;
+ lower = pref;
upper = max;
}
@@ -313,7 +332,7 @@ static QPair<QGraphicsAnchorLayoutPrivate::Interval, qreal> getFactor(qreal valu
static qreal interpolate(const QPair<QGraphicsAnchorLayoutPrivate::Interval, qreal> &factor,
qreal min, qreal pref,
- qreal exp, qreal max)
+ qreal max)
{
qreal lower;
qreal upper;
@@ -323,12 +342,8 @@ static qreal interpolate(const QPair<QGraphicsAnchorLayoutPrivate::Interval, qre
lower = min;
upper = pref;
break;
- case QGraphicsAnchorLayoutPrivate::PreferredToExpanding:
+ case QGraphicsAnchorLayoutPrivate::PreferredToMax:
lower = pref;
- upper = exp;
- break;
- case QGraphicsAnchorLayoutPrivate::ExpandingToMax:
- lower = exp;
upper = max;
break;
}
@@ -341,34 +356,31 @@ void SequentialAnchorData::updateChildrenSizes()
// ### REMOVE ME
// ### check whether we are guarantee to get those or we need to warn stuff at this
// point.
- Q_ASSERT(sizeAtMinimum > minSize || qFuzzyCompare(sizeAtMinimum, minSize));
- Q_ASSERT(sizeAtMinimum < maxSize || qFuzzyCompare(sizeAtMinimum, maxSize));
- Q_ASSERT(sizeAtPreferred > minSize || qFuzzyCompare(sizeAtPreferred, minSize));
- Q_ASSERT(sizeAtPreferred < maxSize || qFuzzyCompare(sizeAtPreferred, maxSize));
- Q_ASSERT(sizeAtExpanding > minSize || qFuzzyCompare(sizeAtExpanding, minSize));
- Q_ASSERT(sizeAtExpanding < maxSize || qFuzzyCompare(sizeAtExpanding, maxSize));
- Q_ASSERT(sizeAtMaximum > minSize || qFuzzyCompare(sizeAtMaximum, minSize));
- Q_ASSERT(sizeAtMaximum < maxSize || qFuzzyCompare(sizeAtMaximum, maxSize));
+ Q_ASSERT(sizeAtMinimum > minSize || qAbs(sizeAtMinimum - minSize) < 0.00000001);
+ Q_ASSERT(sizeAtPreferred > minSize || qAbs(sizeAtPreferred - minSize) < 0.00000001);
+ Q_ASSERT(sizeAtMaximum > minSize || qAbs(sizeAtMaximum - minSize) < 0.00000001);
+
+ // These may be false if this anchor was in parallel with the layout stucture
+ // Q_ASSERT(sizeAtMinimum < maxSize || qAbs(sizeAtMinimum - maxSize) < 0.00000001);
+ // Q_ASSERT(sizeAtPreferred < maxSize || qAbs(sizeAtPreferred - maxSize) < 0.00000001);
+ // Q_ASSERT(sizeAtMaximum < maxSize || qAbs(sizeAtMaximum - maxSize) < 0.00000001);
// Band here refers if the value is in the Minimum To Preferred
// band (the lower band) or the Preferred To Maximum (the upper band).
const QPair<QGraphicsAnchorLayoutPrivate::Interval, qreal> minFactor =
- getFactor(sizeAtMinimum, minSize, prefSize, expSize, maxSize);
+ getFactor(sizeAtMinimum, minSize, prefSize, maxSize);
const QPair<QGraphicsAnchorLayoutPrivate::Interval, qreal> prefFactor =
- getFactor(sizeAtPreferred, minSize, prefSize, expSize, maxSize);
- const QPair<QGraphicsAnchorLayoutPrivate::Interval, qreal> expFactor =
- getFactor(sizeAtExpanding, minSize, prefSize, expSize, maxSize);
+ getFactor(sizeAtPreferred, minSize, prefSize, maxSize);
const QPair<QGraphicsAnchorLayoutPrivate::Interval, qreal> maxFactor =
- getFactor(sizeAtMaximum, minSize, prefSize, expSize, maxSize);
+ getFactor(sizeAtMaximum, minSize, prefSize, maxSize);
for (int i = 0; i < m_edges.count(); ++i) {
AnchorData *e = m_edges.at(i);
- e->sizeAtMinimum = interpolate(minFactor, e->minSize, e->prefSize, e->expSize, e->maxSize);
- e->sizeAtPreferred = interpolate(prefFactor, e->minSize, e->prefSize, e->expSize, e->maxSize);
- e->sizeAtExpanding = interpolate(expFactor, e->minSize, e->prefSize, e->expSize, e->maxSize);
- e->sizeAtMaximum = interpolate(maxFactor, e->minSize, e->prefSize, e->expSize, e->maxSize);
+ e->sizeAtMinimum = interpolate(minFactor, e->minSize, e->prefSize, e->maxSize);
+ e->sizeAtPreferred = interpolate(prefFactor, e->minSize, e->prefSize, e->maxSize);
+ e->sizeAtMaximum = interpolate(maxFactor, e->minSize, e->prefSize, e->maxSize);
e->updateChildrenSizes();
}
@@ -384,7 +396,6 @@ bool SequentialAnchorData::refreshSizeHints_helper(const QLayoutStyleInfo *style
{
minSize = 0;
prefSize = 0;
- expSize = 0;
maxSize = 0;
for (int i = 0; i < m_edges.count(); ++i) {
@@ -396,14 +407,12 @@ bool SequentialAnchorData::refreshSizeHints_helper(const QLayoutStyleInfo *style
minSize += edge->minSize;
prefSize += edge->prefSize;
- expSize += edge->expSize;
maxSize += edge->maxSize;
}
// See comment in AnchorData::refreshSizeHints() about sizeAt* values
sizeAtMinimum = prefSize;
sizeAtPreferred = prefSize;
- sizeAtExpanding = prefSize;
sizeAtMaximum = prefSize;
return true;
@@ -478,12 +487,15 @@ QGraphicsAnchorLayoutPrivate::QGraphicsAnchorLayoutPrivate()
for (int j = 0; j < 3; ++j) {
sizeHints[i][j] = -1;
}
- sizeAtExpanding[i] = -1;
interpolationProgress[i] = -1;
spacings[i] = -1;
graphSimplified[i] = false;
graphHasConflicts[i] = false;
+
+ layoutFirstVertex[i] = 0;
+ layoutCentralVertex[i] = 0;
+ layoutLastVertex[i] = 0;
}
}
@@ -526,33 +538,67 @@ inline static qreal checkAdd(qreal a, qreal b)
/*!
\internal
- Adds \a newAnchor to the graph \a g.
+ Adds \a newAnchor to the graph.
Returns the newAnchor itself if it could be added without further changes to the graph. If a
- new parallel anchor had to be created, then returns the new parallel anchor. In case the
- addition is unfeasible -- because a parallel setup is not possible, returns 0.
+ new parallel anchor had to be created, then returns the new parallel anchor. If a parallel anchor
+ had to be created and it results in an unfeasible setup, \a feasible is set to false, otherwise
+ true.
+
+ Note that in the case a new parallel anchor is created, it might also take over some constraints
+ from its children anchors.
*/
-static AnchorData *addAnchorMaybeParallel(Graph<AnchorVertex, AnchorData> *g,
- AnchorData *newAnchor)
+AnchorData *QGraphicsAnchorLayoutPrivate::addAnchorMaybeParallel(AnchorData *newAnchor, bool *feasible)
{
- bool feasible = true;
+ Orientation orientation = Orientation(newAnchor->orientation);
+ Graph<AnchorVertex, AnchorData> &g = graph[orientation];
+ *feasible = true;
// If already exists one anchor where newAnchor is supposed to be, we create a parallel
// anchor.
- if (AnchorData *oldAnchor = g->takeEdge(newAnchor->from, newAnchor->to)) {
+ if (AnchorData *oldAnchor = g.takeEdge(newAnchor->from, newAnchor->to)) {
ParallelAnchorData *parallel = new ParallelAnchorData(oldAnchor, newAnchor);
+ // The parallel anchor will "replace" its children anchors in
+ // every center constraint that they appear.
+
+ // ### If the dependent (center) anchors had reference(s) to their constraints, we
+ // could avoid traversing all the itemCenterConstraints.
+ QList<QSimplexConstraint *> &constraints = itemCenterConstraints[orientation];
+
+ AnchorData *children[2] = { oldAnchor, newAnchor };
+ QList<QSimplexConstraint *> *childrenConstraints[2] = { &parallel->m_firstConstraints,
+ &parallel->m_secondConstraints };
+
+ for (int i = 0; i < 2; ++i) {
+ AnchorData *child = children[i];
+ QList<QSimplexConstraint *> *childConstraints = childrenConstraints[i];
+
+ if (!child->isCenterAnchor)
+ continue;
+
+ parallel->isCenterAnchor = true;
+
+ for (int i = 0; i < constraints.count(); ++i) {
+ QSimplexConstraint *c = constraints[i];
+ if (c->variables.contains(child)) {
+ childConstraints->append(c);
+ qreal v = c->variables.take(child);
+ c->variables.insert(parallel, v);
+ }
+ }
+ }
+
// At this point we can identify that the parallel anchor is not feasible, e.g. one
// anchor minimum size is bigger than the other anchor maximum size.
- feasible = parallel->refreshSizeHints_helper(0, false);
+ *feasible = parallel->refreshSizeHints_helper(0, false);
newAnchor = parallel;
}
- g->createEdge(newAnchor->from, newAnchor->to, newAnchor);
- return feasible ? newAnchor : 0;
+ g.createEdge(newAnchor->from, newAnchor->to, newAnchor);
+ return newAnchor;
}
-
/*!
\internal
@@ -656,30 +702,185 @@ bool QGraphicsAnchorLayoutPrivate::simplifyGraph(Orientation orientation)
if (graphSimplified[orientation])
return true;
- graphSimplified[orientation] = true;
#if 0
qDebug("Simplifying Graph for %s",
orientation == Horizontal ? "Horizontal" : "Vertical");
#endif
- if (!graph[orientation].rootVertex())
- return true;
+ // Vertex simplification
+ if (!simplifyVertices(orientation)) {
+ restoreVertices(orientation);
+ return false;
+ }
+ // Anchor simplification
bool dirty;
bool feasible = true;
do {
dirty = simplifyGraphIteration(orientation, &feasible);
} while (dirty && feasible);
- if (!feasible)
- graphSimplified[orientation] = false;
+ // Note that if we are not feasible, we fallback and make sure that the graph is fully restored
+ if (!feasible) {
+ graphSimplified[orientation] = true;
+ restoreSimplifiedGraph(orientation);
+ restoreVertices(orientation);
+ return false;
+ }
+
+ graphSimplified[orientation] = true;
+ return true;
+}
+
+static AnchorVertex *replaceVertex_helper(AnchorData *data, AnchorVertex *oldV, AnchorVertex *newV)
+{
+ AnchorVertex *other;
+ if (data->from == oldV) {
+ data->from = newV;
+ other = data->to;
+ } else {
+ data->to = newV;
+ other = data->from;
+ }
+ return other;
+}
+
+bool QGraphicsAnchorLayoutPrivate::replaceVertex(Orientation orientation, AnchorVertex *oldV,
+ AnchorVertex *newV, const QList<AnchorData *> &edges)
+{
+ Graph<AnchorVertex, AnchorData> &g = graph[orientation];
+ bool feasible = true;
+
+ for (int i = 0; i < edges.count(); ++i) {
+ AnchorData *ad = edges[i];
+ AnchorVertex *otherV = replaceVertex_helper(ad, oldV, newV);
+
+#if defined(QT_DEBUG)
+ ad->name = QString::fromAscii("%1 --to--> %2").arg(ad->from->toString()).arg(ad->to->toString());
+#endif
+
+ bool newFeasible;
+ AnchorData *newAnchor = addAnchorMaybeParallel(ad, &newFeasible);
+ feasible &= newFeasible;
+
+ if (newAnchor != ad) {
+ // A parallel was created, we mark that in the list of anchors created by vertex
+ // simplification. This is needed because we want to restore them in a separate step
+ // from the restoration of anchor simplification.
+ anchorsFromSimplifiedVertices[orientation].append(newAnchor);
+ }
+
+ g.takeEdge(oldV, otherV);
+ }
return feasible;
}
/*!
\internal
+*/
+bool QGraphicsAnchorLayoutPrivate::simplifyVertices(Orientation orientation)
+{
+ Q_Q(QGraphicsAnchorLayout);
+ Graph<AnchorVertex, AnchorData> &g = graph[orientation];
+
+ // We'll walk through vertices
+ QStack<AnchorVertex *> stack;
+ stack.push(layoutFirstVertex[orientation]);
+ QSet<AnchorVertex *> visited;
+
+ while (!stack.isEmpty()) {
+ AnchorVertex *v = stack.pop();
+ visited.insert(v);
+
+ // Each adjacent of 'v' is a possible vertex to be merged. So we traverse all of
+ // them. Since once a merge is made, we might add new adjacents, and we don't want to
+ // pass two times through one adjacent. The 'index' is used to track our position.
+ QList<AnchorVertex *> adjacents = g.adjacentVertices(v);
+ int index = 0;
+
+ while (index < adjacents.count()) {
+ AnchorVertex *next = adjacents.at(index);
+ index++;
+
+ AnchorData *data = g.edgeData(v, next);
+ const bool bothLayoutVertices = v->m_item == q && next->m_item == q;
+ const bool zeroSized = !data->minSize && !data->maxSize;
+
+ if (!bothLayoutVertices && zeroSized) {
+
+ // Create a new vertex pair, note that we keep a list of those vertices so we can
+ // easily process them when restoring the graph.
+ AnchorVertexPair *newV = new AnchorVertexPair(v, next, data);
+ simplifiedVertices[orientation].append(newV);
+
+ // Collect the anchors of both vertices, the new vertex pair will take their place
+ // in those anchors
+ const QList<AnchorVertex *> &vAdjacents = g.adjacentVertices(v);
+ const QList<AnchorVertex *> &nextAdjacents = g.adjacentVertices(next);
+
+ for (int i = 0; i < vAdjacents.count(); ++i) {
+ AnchorVertex *adjacent = vAdjacents.at(i);
+ if (adjacent != next) {
+ AnchorData *ad = g.edgeData(v, adjacent);
+ newV->m_firstAnchors.append(ad);
+ }
+ }
+
+ for (int i = 0; i < nextAdjacents.count(); ++i) {
+ AnchorVertex *adjacent = nextAdjacents.at(i);
+ if (adjacent != v) {
+ AnchorData *ad = g.edgeData(next, adjacent);
+ newV->m_secondAnchors.append(ad);
+
+ // We'll also add new vertices to the adjacent list of the new 'v', to be
+ // created as a vertex pair and replace the current one.
+ if (!adjacents.contains(adjacent))
+ adjacents.append(adjacent);
+ }
+ }
+
+ // ### merge this loop into the ones that calculated m_firstAnchors/m_secondAnchors?
+ // Make newV take the place of v and next
+ bool feasible = replaceVertex(orientation, v, newV, newV->m_firstAnchors);
+ feasible &= replaceVertex(orientation, next, newV, newV->m_secondAnchors);
+
+ // Update the layout vertex information if one of the vertices is a layout vertex.
+ AnchorVertex *layoutVertex = 0;
+ if (v->m_item == q)
+ layoutVertex = v;
+ else if (next->m_item == q)
+ layoutVertex = next;
+
+ if (layoutVertex) {
+ // Layout vertices always have m_item == q...
+ newV->m_item = q;
+ changeLayoutVertex(orientation, layoutVertex, newV);
+ }
+
+ g.takeEdge(v, next);
+
+ // If a non-feasibility is found, we leave early and cancel the simplification
+ if (!feasible)
+ return false;
+
+ v = newV;
+ visited.insert(newV);
+
+ } else if (!visited.contains(next) && !stack.contains(next)) {
+ // If the adjacent is not fit for merge and it wasn't visited by the outermost
+ // loop, we add it to the stack.
+ stack.push(next);
+ }
+ }
+ }
+
+ return true;
+}
+
+/*!
+ \internal
One iteration of the simplification algorithm. Returns true if another iteration is needed.
@@ -700,7 +901,7 @@ bool QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(QGraphicsAnchorLayoutP
QSet<AnchorVertex *> visited;
QStack<QPair<AnchorVertex *, AnchorVertex *> > stack;
- stack.push(qMakePair(static_cast<AnchorVertex *>(0), g.rootVertex()));
+ stack.push(qMakePair(static_cast<AnchorVertex *>(0), layoutFirstVertex[orientation]));
QVector<AnchorVertex*> candidates;
bool candidatesForward;
@@ -719,7 +920,8 @@ bool QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(QGraphicsAnchorLayoutP
// (a) it is a layout vertex, we don't simplify away the layout vertices;
// (b) it does not have exactly 2 adjacents;
// (c) it will change the direction of the sequence;
- // (d) its next adjacent is already visited (a cycle in the graph).
+ // (d) its next adjacent is already visited (a cycle in the graph);
+ // (e) the next anchor is a center anchor.
const QList<AnchorVertex *> &adjacents = g.adjacentVertices(v);
const bool isLayoutVertex = v->m_item == q;
@@ -742,13 +944,14 @@ bool QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(QGraphicsAnchorLayoutP
candidatesForward = (beforeSequence == data->from);
}
- // This is a tricky part. We peek at the next vertex to find out
+ // This is a tricky part. We peek at the next vertex to find out whether
//
- // - whether the edge from this vertex to the next vertex has the same direction;
- // - whether we already visited the next vertex.
+ // - the edge from this vertex to the next vertex has the same direction;
+ // - we already visited the next vertex;
+ // - the next anchor is a center.
//
- // Those are needed to identify (c) and (d). Note that unlike (a) and (b), we preempt
- // the end of sequence by looking into the next vertex.
+ // Those are needed to identify the remaining end of sequence cases. Note that unlike
+ // (a) and (b), we preempt the end of sequence by looking into the next vertex.
// Peek at the next vertex
AnchorVertex *after;
@@ -766,8 +969,8 @@ bool QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(QGraphicsAnchorLayoutP
const bool willChangeDirection = (candidatesForward != (v == data->from));
const bool cycleFound = visited.contains(after);
- // Now cases (c) and (d)...
- endOfSequence = willChangeDirection || cycleFound;
+ // Now cases (c), (d) and (e)...
+ endOfSequence = willChangeDirection || cycleFound || data->isCenterAnchor;
if (endOfSequence) {
if (!willChangeDirection) {
@@ -839,9 +1042,10 @@ bool QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(QGraphicsAnchorLayoutP
// If 'beforeSequence' and 'afterSequence' already had an anchor between them, we'll
// create a parallel anchor between the new sequence and the old anchor.
- AnchorData *newAnchor = addAnchorMaybeParallel(&g, sequence);
+ bool newFeasible;
+ AnchorData *newAnchor = addAnchorMaybeParallel(sequence, &newFeasible);
- if (!newAnchor) {
+ if (!newFeasible) {
*feasible = false;
return false;
}
@@ -861,48 +1065,70 @@ bool QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(QGraphicsAnchorLayoutP
return false;
}
-static void restoreSimplifiedAnchor(Graph<AnchorVertex, AnchorData> &g,
- AnchorData *edge,
- AnchorVertex *before,
- AnchorVertex *after)
+void QGraphicsAnchorLayoutPrivate::restoreSimplifiedAnchor(AnchorData *edge)
{
- Q_ASSERT(edge->type != AnchorData::Normal);
#if 0
static const char *anchortypes[] = {"Normal",
"Sequential",
"Parallel"};
qDebug("Restoring %s edge.", anchortypes[int(edge->type)]);
#endif
- if (edge->type == AnchorData::Sequential) {
- SequentialAnchorData* seqEdge = static_cast<SequentialAnchorData*>(edge);
- // restore the sequential anchor
- AnchorVertex *prev = before;
- AnchorVertex *last = after;
- if (edge->from != prev)
- qSwap(last, prev);
-
- for (int i = 0; i < seqEdge->m_edges.count(); ++i) {
- AnchorVertex *v1 = (i < seqEdge->m_children.count()) ? seqEdge->m_children.at(i) : last;
- AnchorData *data = seqEdge->m_edges.at(i);
- if (data->type != AnchorData::Normal) {
- restoreSimplifiedAnchor(g, data, prev, v1);
- } else {
- g.createEdge(prev, v1, data);
- }
- prev = v1;
+
+ Graph<AnchorVertex, AnchorData> &g = graph[edge->orientation];
+
+ if (edge->type == AnchorData::Normal) {
+ g.createEdge(edge->from, edge->to, edge);
+
+ } else if (edge->type == AnchorData::Sequential) {
+ SequentialAnchorData *sequence = static_cast<SequentialAnchorData *>(edge);
+
+ for (int i = 0; i < sequence->m_edges.count(); ++i) {
+ AnchorData *data = sequence->m_edges.at(i);
+ restoreSimplifiedAnchor(data);
}
+
+ delete sequence;
+
} else if (edge->type == AnchorData::Parallel) {
- ParallelAnchorData* parallelEdge = static_cast<ParallelAnchorData*>(edge);
- AnchorData *parallelEdges[2] = {parallelEdge->firstEdge,
- parallelEdge->secondEdge};
- for (int i = 0; i < 2; ++i) {
- AnchorData *data = parallelEdges[i];
- if (data->type == AnchorData::Normal) {
- g.createEdge(before, after, data);
- } else {
- restoreSimplifiedAnchor(g, data, before, after);
- }
- }
+
+ // Skip parallel anchors that were created by vertex simplification, they will be processed
+ // later, when restoring vertex simplification.
+ // ### we could improve this check bit having a bit inside 'edge'
+ if (anchorsFromSimplifiedVertices[edge->orientation].contains(edge))
+ return;
+
+ ParallelAnchorData* parallel = static_cast<ParallelAnchorData*>(edge);
+ restoreSimplifiedConstraints(parallel);
+
+ // ### Because of the way parallel anchors are created in the anchor simplification
+ // algorithm, we know that one of these will be a sequence, so it'll be safe if the other
+ // anchor create an edge between the same vertices as the parallel.
+ Q_ASSERT(parallel->firstEdge->type == AnchorData::Sequential
+ || parallel->secondEdge->type == AnchorData::Sequential);
+ restoreSimplifiedAnchor(parallel->firstEdge);
+ restoreSimplifiedAnchor(parallel->secondEdge);
+
+ delete parallel;
+ }
+}
+
+void QGraphicsAnchorLayoutPrivate::restoreSimplifiedConstraints(ParallelAnchorData *parallel)
+{
+ if (!parallel->isCenterAnchor)
+ return;
+
+ for (int i = 0; i < parallel->m_firstConstraints.count(); ++i) {
+ QSimplexConstraint *c = parallel->m_firstConstraints.at(i);
+ qreal v = c->variables[parallel];
+ c->variables.remove(parallel);
+ c->variables.insert(parallel->firstEdge, v);
+ }
+
+ for (int i = 0; i < parallel->m_secondConstraints.count(); ++i) {
+ QSimplexConstraint *c = parallel->m_secondConstraints.at(i);
+ qreal v = c->variables[parallel];
+ c->variables.remove(parallel);
+ c->variables.insert(parallel->secondEdge, v);
}
}
@@ -917,19 +1143,93 @@ void QGraphicsAnchorLayoutPrivate::restoreSimplifiedGraph(Orientation orientatio
orientation == Horizontal ? "Horizontal" : "Vertical");
#endif
+ // Restore anchor simplification
Graph<AnchorVertex, AnchorData> &g = graph[orientation];
-
QList<QPair<AnchorVertex*, AnchorVertex*> > connections = g.connections();
for (int i = 0; i < connections.count(); ++i) {
AnchorVertex *v1 = connections.at(i).first;
AnchorVertex *v2 = connections.at(i).second;
AnchorData *edge = g.edgeData(v1, v2);
- if (edge->type != AnchorData::Normal) {
- AnchorData *oldEdge = g.takeEdge(v1, v2);
- restoreSimplifiedAnchor(g, edge, v1, v2);
- delete oldEdge;
+
+ // We restore only sequential anchors and parallels that were not created by
+ // vertex simplification.
+ if (edge->type == AnchorData::Sequential
+ || (edge->type == AnchorData::Parallel &&
+ !anchorsFromSimplifiedVertices[orientation].contains(edge))) {
+
+ g.takeEdge(v1, v2);
+ restoreSimplifiedAnchor(edge);
}
}
+
+ restoreVertices(orientation);
+}
+
+void QGraphicsAnchorLayoutPrivate::restoreVertices(Orientation orientation)
+{
+ Q_Q(QGraphicsAnchorLayout);
+
+ Graph<AnchorVertex, AnchorData> &g = graph[orientation];
+ QList<AnchorVertexPair *> &toRestore = simplifiedVertices[orientation];
+
+ // We will restore the vertices in the inverse order of creation, this way we ensure that
+ // the vertex being restored was not wrapped by another simplification.
+ for (int i = toRestore.count() - 1; i >= 0; --i) {
+ AnchorVertexPair *pair = toRestore.at(i);
+ QList<AnchorVertex *> adjacents = g.adjacentVertices(pair);
+
+ // Restore the removed edge, this will also restore both vertices 'first' and 'second' to
+ // the graph structure.
+ AnchorVertex *first = pair->m_first;
+ AnchorVertex *second = pair->m_second;
+ g.createEdge(first, second, pair->m_removedAnchor);
+
+ // Restore the anchors for the first child vertex
+ for (int j = 0; j < pair->m_firstAnchors.count(); ++j) {
+ AnchorData *ad = pair->m_firstAnchors.at(j);
+ Q_ASSERT(ad->from == pair || ad->to == pair);
+
+ replaceVertex_helper(ad, pair, first);
+ g.createEdge(ad->from, ad->to, ad);
+ }
+
+ // Restore the anchors for the second child vertex
+ for (int j = 0; j < pair->m_secondAnchors.count(); ++j) {
+ AnchorData *ad = pair->m_secondAnchors.at(j);
+ Q_ASSERT(ad->from == pair || ad->to == pair);
+
+ replaceVertex_helper(ad, pair, second);
+ g.createEdge(ad->from, ad->to, ad);
+ }
+
+ for (int j = 0; j < adjacents.count(); ++j) {
+ g.takeEdge(pair, adjacents.at(j));
+ }
+
+ // The pair simplified a layout vertex, so place back the correct vertex in the variable
+ // that track layout vertices
+ if (pair->m_item == q) {
+ AnchorVertex *layoutVertex = first->m_item == q ? first : second;
+ Q_ASSERT(layoutVertex->m_item == q);
+ changeLayoutVertex(orientation, pair, layoutVertex);
+ }
+
+ delete pair;
+ }
+ toRestore.clear();
+
+ // The restoration process for vertex simplification also restored the effect of the
+ // parallel anchors created during vertex simplification, so we just need to restore
+ // the constraints in case of parallels that contain center anchors. For the same
+ // reason as above, order matters here.
+ QList<AnchorData *> &parallelAnchors = anchorsFromSimplifiedVertices[orientation];
+
+ for (int i = parallelAnchors.count() - 1; i >= 0; --i) {
+ ParallelAnchorData *parallel = static_cast<ParallelAnchorData *>(parallelAnchors.at(i));
+ restoreSimplifiedConstraints(parallel);
+ delete parallel;
+ }
+ parallelAnchors.clear();
}
QGraphicsAnchorLayoutPrivate::Orientation
@@ -959,9 +1259,10 @@ void QGraphicsAnchorLayoutPrivate::createLayoutEdges()
data->maxSize = QWIDGETSIZE_MAX;
data->skipInPreferred = 1;
- // Set the Layout Left edge as the root of the horizontal graph.
- AnchorVertex *v = internalVertex(layout, Qt::AnchorLeft);
- graph[Horizontal].setRootVertex(v);
+ // Save a reference to layout vertices
+ layoutFirstVertex[Horizontal] = internalVertex(layout, Qt::AnchorLeft);
+ layoutCentralVertex[Horizontal] = 0;
+ layoutLastVertex[Horizontal] = internalVertex(layout, Qt::AnchorRight);
// Vertical
data = new AnchorData;
@@ -970,17 +1271,18 @@ void QGraphicsAnchorLayoutPrivate::createLayoutEdges()
data->maxSize = QWIDGETSIZE_MAX;
data->skipInPreferred = 1;
- // Set the Layout Top edge as the root of the vertical graph.
- v = internalVertex(layout, Qt::AnchorTop);
- graph[Vertical].setRootVertex(v);
+ // Save a reference to layout vertices
+ layoutFirstVertex[Vertical] = internalVertex(layout, Qt::AnchorTop);
+ layoutCentralVertex[Vertical] = 0;
+ layoutLastVertex[Vertical] = internalVertex(layout, Qt::AnchorBottom);
}
void QGraphicsAnchorLayoutPrivate::deleteLayoutEdges()
{
Q_Q(QGraphicsAnchorLayout);
- Q_ASSERT(internalVertex(q, Qt::AnchorHorizontalCenter) == NULL);
- Q_ASSERT(internalVertex(q, Qt::AnchorVerticalCenter) == NULL);
+ Q_ASSERT(!internalVertex(q, Qt::AnchorHorizontalCenter));
+ Q_ASSERT(!internalVertex(q, Qt::AnchorVerticalCenter));
removeAnchor_helper(internalVertex(q, Qt::AnchorLeft),
internalVertex(q, Qt::AnchorRight));
@@ -1019,6 +1321,8 @@ void QGraphicsAnchorLayoutPrivate::createItemEdges(QGraphicsLayoutItem *item)
void QGraphicsAnchorLayoutPrivate::createCenterAnchors(
QGraphicsLayoutItem *item, Qt::AnchorPoint centerEdge)
{
+ Q_Q(QGraphicsAnchorLayout);
+
Orientation orientation;
switch (centerEdge) {
case Qt::AnchorHorizontalCenter:
@@ -1061,24 +1365,32 @@ void QGraphicsAnchorLayoutPrivate::createCenterAnchors(
c->variables.insert(data, 1.0);
addAnchor_helper(item, firstEdge, item, centerEdge, data);
data->isCenterAnchor = true;
+ data->dependency = AnchorData::Master;
data->refreshSizeHints(0);
data = new AnchorData;
c->variables.insert(data, -1.0);
addAnchor_helper(item, centerEdge, item, lastEdge, data);
data->isCenterAnchor = true;
+ data->dependency = AnchorData::Slave;
data->refreshSizeHints(0);
itemCenterConstraints[orientation].append(c);
// Remove old one
removeAnchor_helper(first, last);
+
+ if (item == q) {
+ layoutCentralVertex[orientation] = internalVertex(q, centerEdge);
+ }
}
void QGraphicsAnchorLayoutPrivate::removeCenterAnchors(
QGraphicsLayoutItem *item, Qt::AnchorPoint centerEdge,
bool substitute)
{
+ Q_Q(QGraphicsAnchorLayout);
+
Orientation orientation;
switch (centerEdge) {
case Qt::AnchorHorizontalCenter:
@@ -1120,7 +1432,7 @@ void QGraphicsAnchorLayoutPrivate::removeCenterAnchors(
AnchorData *oldData = g.edgeData(first, center);
// Remove center constraint
for (int i = itemCenterConstraints[orientation].count() - 1; i >= 0; --i) {
- if (itemCenterConstraints[orientation][i]->variables.contains(oldData)) {
+ if (itemCenterConstraints[orientation].at(i)->variables.contains(oldData)) {
delete itemCenterConstraints[orientation].takeAt(i);
break;
}
@@ -1151,6 +1463,10 @@ void QGraphicsAnchorLayoutPrivate::removeCenterAnchors(
// by this time, the center vertex is deleted and merged into a non-centered internal anchor
removeAnchor_helper(first, internalVertex(item, lastEdge));
}
+
+ if (item == q) {
+ layoutCentralVertex[orientation] = 0;
+ }
}
@@ -1180,7 +1496,7 @@ void QGraphicsAnchorLayoutPrivate::removeCenterConstraints(QGraphicsLayoutItem *
// Look for our anchor in all item center constraints, then remove it
for (int i = 0; i < itemCenterConstraints[orientation].size(); ++i) {
- if (itemCenterConstraints[orientation][i]->variables.contains(internalAnchor)) {
+ if (itemCenterConstraints[orientation].at(i)->variables.contains(internalAnchor)) {
delete itemCenterConstraints[orientation].takeAt(i);
break;
}
@@ -1690,7 +2006,7 @@ QList<AnchorData *> getVariables(QList<QSimplexConstraint *> constraints)
{
QSet<AnchorData *> variableSet;
for (int i = 0; i < constraints.count(); ++i) {
- const QSimplexConstraint *c = constraints[i];
+ const QSimplexConstraint *c = constraints.at(i);
foreach (QSimplexVariable *var, c->variables.keys()) {
variableSet += static_cast<AnchorData *>(var);
}
@@ -1724,12 +2040,19 @@ QList<AnchorData *> getVariables(QList<QSimplexConstraint *> constraints)
void QGraphicsAnchorLayoutPrivate::calculateGraphs(
QGraphicsAnchorLayoutPrivate::Orientation orientation)
{
- Q_Q(QGraphicsAnchorLayout);
-
#if defined(QT_DEBUG) || defined(Q_AUTOTEST_EXPORT)
lastCalculationUsedSimplex[orientation] = false;
#endif
+ // ### This is necessary because now we do vertex simplification, we still don't know
+ // differentiate between invalidate()s that doesn't need resimplification and those which
+ // need. For example, when size hint of an item changes, this may cause an anchor to reach 0 or to
+ // leave 0 and get a size. In both cases we need resimplify.
+ //
+ // ### one possible solution would be tracking all the 0-sized anchors, if this set change, we need
+ // resimplify.
+ restoreSimplifiedGraph(orientation);
+
// Reset the nominal sizes of each anchor based on the current item sizes. This function
// works with both simplified and non-simplified graphs, so it'll work when the
// simplification is going to be reused.
@@ -1768,12 +2091,12 @@ void QGraphicsAnchorLayoutPrivate::calculateGraphs(
// Now run the simplex solver to calculate Minimum, Preferred and Maximum sizes
// of the "trunk" set of constraints and variables.
// ### does trunk always exist? empty = trunk is the layout left->center->right
- QList<QSimplexConstraint *> trunkConstraints = parts[0];
+ QList<QSimplexConstraint *> trunkConstraints = parts.at(0);
QList<AnchorData *> trunkVariables = getVariables(trunkConstraints);
// For minimum and maximum, use the path between the two layout sides as the
// objective function.
- AnchorVertex *v = internalVertex(q, pickEdge(Qt::AnchorRight, orientation));
+ AnchorVertex *v = layoutLastVertex[orientation];
GraphPath trunkPath = graphPaths[orientation].value(v);
bool feasible = calculateTrunk(orientation, trunkPath, trunkConstraints, trunkVariables);
@@ -1787,7 +2110,7 @@ void QGraphicsAnchorLayoutPrivate::calculateGraphs(
if (!feasible)
break;
- QList<QSimplexConstraint *> partConstraints = parts[i];
+ QList<QSimplexConstraint *> partConstraints = parts.at(i);
QList<AnchorData *> partVariables = getVariables(partConstraints);
Q_ASSERT(!partVariables.isEmpty());
feasible &= calculateNonTrunk(partConstraints, partVariables);
@@ -1836,27 +2159,19 @@ bool QGraphicsAnchorLayoutPrivate::calculateTrunk(Orientation orientation, const
if (feasible) {
solvePreferred(allConstraints, variables);
- // Note that we don't include the sizeHintConstraints, since they
- // have a different logic for solveExpanding().
- solveExpanding(constraints, variables);
-
- // Calculate and set the preferred and expanding sizes for the layout,
+ // Calculate and set the preferred size for the layout,
// from the edge sizes that were calculated above.
qreal pref(0.0);
- qreal expanding(0.0);
foreach (const AnchorData *ad, path.positives) {
pref += ad->sizeAtPreferred;
- expanding += ad->sizeAtExpanding;
}
foreach (const AnchorData *ad, path.negatives) {
pref -= ad->sizeAtPreferred;
- expanding -= ad->sizeAtExpanding;
}
sizeHints[orientation][Qt::MinimumSize] = min;
sizeHints[orientation][Qt::PreferredSize] = pref;
sizeHints[orientation][Qt::MaximumSize] = max;
- sizeAtExpanding[orientation] = expanding;
}
qDeleteAll(sizeHintConstraints);
@@ -1870,13 +2185,11 @@ bool QGraphicsAnchorLayoutPrivate::calculateTrunk(Orientation orientation, const
AnchorData *ad = path.positives.toList()[0];
ad->sizeAtMinimum = ad->minSize;
ad->sizeAtPreferred = ad->prefSize;
- ad->sizeAtExpanding = ad->expSize;
ad->sizeAtMaximum = ad->maxSize;
sizeHints[orientation][Qt::MinimumSize] = ad->sizeAtMinimum;
sizeHints[orientation][Qt::PreferredSize] = ad->sizeAtPreferred;
sizeHints[orientation][Qt::MaximumSize] = ad->sizeAtMaximum;
- sizeAtExpanding[orientation] = ad->sizeAtExpanding;
}
#if defined(QT_DEBUG) || defined(Q_AUTOTEST_EXPORT)
@@ -1899,10 +2212,9 @@ bool QGraphicsAnchorLayoutPrivate::calculateNonTrunk(const QList<QSimplexConstra
// Propagate size at preferred to other sizes. Semi-floats always will be
// in their sizeAtPreferred.
for (int j = 0; j < variables.count(); ++j) {
- AnchorData *ad = variables[j];
+ AnchorData *ad = variables.at(j);
Q_ASSERT(ad);
ad->sizeAtMinimum = ad->sizeAtPreferred;
- ad->sizeAtExpanding = ad->sizeAtPreferred;
ad->sizeAtMaximum = ad->sizeAtPreferred;
}
}
@@ -1955,7 +2267,7 @@ void QGraphicsAnchorLayoutPrivate::findPaths(Orientation orientation)
QSet<AnchorData *> visited;
- AnchorVertex *root = graph[orientation].rootVertex();
+ AnchorVertex *root = layoutFirstVertex[orientation];
graphPaths[orientation].insert(root, GraphPath());
@@ -2013,7 +2325,7 @@ void QGraphicsAnchorLayoutPrivate::constraintsFromPaths(Orientation orientation)
QList<GraphPath> pathsToVertex = graphPaths[orientation].values(vertex);
for (int i = 1; i < valueCount; ++i) {
constraints[orientation] += \
- pathsToVertex[0].constraint(pathsToVertex[i]);
+ pathsToVertex[0].constraint(pathsToVertex.at(i));
}
}
}
@@ -2041,9 +2353,37 @@ void QGraphicsAnchorLayoutPrivate::updateAnchorSizes(Orientation orientation)
QList<QSimplexConstraint *> QGraphicsAnchorLayoutPrivate::constraintsFromSizeHints(
const QList<AnchorData *> &anchors)
{
+ if (anchors.isEmpty())
+ return QList<QSimplexConstraint *>();
+
+ // Look for the layout edge. That can be either the first half in case the
+ // layout is split in two, or the whole layout anchor.
+ Orientation orient = Orientation(anchors.first()->orientation);
+ AnchorData *layoutEdge = 0;
+ if (layoutCentralVertex[orient]) {
+ layoutEdge = graph[orient].edgeData(layoutFirstVertex[orient], layoutCentralVertex[orient]);
+ } else {
+ layoutEdge = graph[orient].edgeData(layoutFirstVertex[orient], layoutLastVertex[orient]);
+
+ // If maxSize is less then "infinite", that means there are other anchors
+ // grouped together with this one. We can't ignore its maximum value so we
+ // set back the variable to NULL to prevent the continue condition from being
+ // satisfied in the loop below.
+ if (layoutEdge->maxSize < QWIDGETSIZE_MAX)
+ layoutEdge = 0;
+ }
+
+ // For each variable, create constraints based on size hints
QList<QSimplexConstraint *> anchorConstraints;
+ bool unboundedProblem = true;
for (int i = 0; i < anchors.size(); ++i) {
- AnchorData *ad = anchors[i];
+ AnchorData *ad = anchors.at(i);
+
+ // Anchors that have their size directly linked to another one don't need constraints
+ // For exammple, the second half of an item has exactly the same size as the first half
+ // thus constraining the latter is enough.
+ if (ad->dependency == AnchorData::Slave)
+ continue;
if ((ad->minSize == ad->maxSize) || qFuzzyCompare(ad->minSize, ad->maxSize)) {
QSimplexConstraint *c = new QSimplexConstraint;
@@ -2051,6 +2391,7 @@ QList<QSimplexConstraint *> QGraphicsAnchorLayoutPrivate::constraintsFromSizeHin
c->constant = ad->minSize;
c->ratio = QSimplexConstraint::Equal;
anchorConstraints += c;
+ unboundedProblem = false;
} else {
QSimplexConstraint *c = new QSimplexConstraint;
c->variables.insert(ad, 1.0);
@@ -2058,14 +2399,30 @@ QList<QSimplexConstraint *> QGraphicsAnchorLayoutPrivate::constraintsFromSizeHin
c->ratio = QSimplexConstraint::MoreOrEqual;
anchorConstraints += c;
+ // We avoid adding restrictions to the layout internal anchors. That's
+ // to prevent unnecessary fair distribution from happening due to this
+ // artificial restriction.
+ if (ad == layoutEdge)
+ continue;
+
c = new QSimplexConstraint;
c->variables.insert(ad, 1.0);
c->constant = ad->maxSize;
c->ratio = QSimplexConstraint::LessOrEqual;
anchorConstraints += c;
+ unboundedProblem = false;
}
}
+ // If no upper boundary restriction was added, add one to avoid unbounded problem
+ if (unboundedProblem) {
+ QSimplexConstraint *c = new QSimplexConstraint;
+ c->variables.insert(layoutEdge, 1.0);
+ c->constant = QWIDGETSIZE_MAX;
+ c->ratio = QSimplexConstraint::LessOrEqual;
+ anchorConstraints += c;
+ }
+
return anchorConstraints;
}
@@ -2075,38 +2432,26 @@ QList<QSimplexConstraint *> QGraphicsAnchorLayoutPrivate::constraintsFromSizeHin
QList< QList<QSimplexConstraint *> >
QGraphicsAnchorLayoutPrivate::getGraphParts(Orientation orientation)
{
- Q_Q(QGraphicsAnchorLayout);
+ Q_ASSERT(layoutFirstVertex[orientation] && layoutLastVertex[orientation]);
- // Find layout vertices and edges for the current orientation.
- AnchorVertex *layoutFirstVertex = \
- internalVertex(q, pickEdge(Qt::AnchorLeft, orientation));
-
- AnchorVertex *layoutCentralVertex = \
- internalVertex(q, pickEdge(Qt::AnchorHorizontalCenter, orientation));
-
- AnchorVertex *layoutLastVertex = \
- internalVertex(q, pickEdge(Qt::AnchorRight, orientation));
-
- Q_ASSERT(layoutFirstVertex && layoutLastVertex);
-
- AnchorData *edgeL1 = NULL;
- AnchorData *edgeL2 = NULL;
+ AnchorData *edgeL1 = 0;
+ AnchorData *edgeL2 = 0;
// The layout may have a single anchor between Left and Right or two half anchors
// passing through the center
- if (layoutCentralVertex) {
- edgeL1 = graph[orientation].edgeData(layoutFirstVertex, layoutCentralVertex);
- edgeL2 = graph[orientation].edgeData(layoutCentralVertex, layoutLastVertex);
+ if (layoutCentralVertex[orientation]) {
+ edgeL1 = graph[orientation].edgeData(layoutFirstVertex[orientation], layoutCentralVertex[orientation]);
+ edgeL2 = graph[orientation].edgeData(layoutCentralVertex[orientation], layoutLastVertex[orientation]);
} else {
- edgeL1 = graph[orientation].edgeData(layoutFirstVertex, layoutLastVertex);
+ edgeL1 = graph[orientation].edgeData(layoutFirstVertex[orientation], layoutLastVertex[orientation]);
}
QLinkedList<QSimplexConstraint *> remainingConstraints;
for (int i = 0; i < constraints[orientation].count(); ++i) {
- remainingConstraints += constraints[orientation][i];
+ remainingConstraints += constraints[orientation].at(i);
}
for (int i = 0; i < itemCenterConstraints[orientation].count(); ++i) {
- remainingConstraints += itemCenterConstraints[orientation][i];
+ remainingConstraints += itemCenterConstraints[orientation].at(i);
}
QList<QSimplexConstraint *> trunkConstraints;
@@ -2276,6 +2621,21 @@ void QGraphicsAnchorLayoutPrivate::setItemsGeometries(const QRectF &geom)
}
/*!
+ \internal
+
+ Fill the distance in the vertex and in the sub-vertices if its a combined vertex.
+*/
+static void setVertexDistance(AnchorVertex *v, qreal distance)
+{
+ v->distance = distance;
+ if (v->m_type == AnchorVertex::Pair) {
+ AnchorVertexPair *pair = static_cast<AnchorVertexPair *>(v);
+ setVertexDistance(pair->m_first, distance);
+ setVertexDistance(pair->m_second, distance);
+ }
+}
+
+/*!
\internal
Calculate the position of each vertex based on the paths to each of
@@ -2288,9 +2648,9 @@ void QGraphicsAnchorLayoutPrivate::calculateVertexPositions(
QSet<AnchorVertex *> visited;
// Get root vertex
- AnchorVertex *root = graph[orientation].rootVertex();
+ AnchorVertex *root = layoutFirstVertex[orientation];
- root->distance = 0;
+ setVertexDistance(root, 0);
visited.insert(root);
// Add initial edges to the queue
@@ -2314,7 +2674,7 @@ void QGraphicsAnchorLayoutPrivate::calculateVertexPositions(
continue;
visited.insert(pair.second);
- interpolateEdge(pair.first, edge, orientation);
+ interpolateEdge(pair.first, edge);
QList<AnchorVertex *> adjacents = graph[orientation].adjacentVertices(pair.second);
for (int i = 0; i < adjacents.count(); ++i) {
@@ -2343,7 +2703,6 @@ void QGraphicsAnchorLayoutPrivate::setupEdgesInterpolation(
result = getFactor(current,
sizeHints[orientation][Qt::MinimumSize],
sizeHints[orientation][Qt::PreferredSize],
- sizeAtExpanding[orientation],
sizeHints[orientation][Qt::MaximumSize]);
interpolationInterval[orientation] = result.first;
@@ -2358,7 +2717,6 @@ void QGraphicsAnchorLayoutPrivate::setupEdgesInterpolation(
- minimum size,
- preferred size,
- - size when all expanding anchors are expanded,
- maximum size.
These three key values are calculated in advance using linear
@@ -2370,36 +2728,32 @@ void QGraphicsAnchorLayoutPrivate::setupEdgesInterpolation(
vertices to be initalized, so it calls specialized functions that
will recurse back to interpolateEdge().
*/
-void QGraphicsAnchorLayoutPrivate::interpolateEdge(AnchorVertex *base,
- AnchorData *edge,
- Orientation orientation)
+void QGraphicsAnchorLayoutPrivate::interpolateEdge(AnchorVertex *base, AnchorData *edge)
{
+ const Orientation orientation = Orientation(edge->orientation);
const QPair<Interval, qreal> factor(interpolationInterval[orientation],
interpolationProgress[orientation]);
qreal edgeDistance = interpolate(factor, edge->sizeAtMinimum, edge->sizeAtPreferred,
- edge->sizeAtExpanding, edge->sizeAtMaximum);
+ edge->sizeAtMaximum);
Q_ASSERT(edge->from == base || edge->to == base);
- if (edge->from == base)
- edge->to->distance = base->distance + edgeDistance;
- else
- edge->from->distance = base->distance - edgeDistance;
+ // Calculate the distance for the vertex opposite to the base
+ if (edge->from == base) {
+ setVertexDistance(edge->to, base->distance + edgeDistance);
+ } else {
+ setVertexDistance(edge->from, base->distance - edgeDistance);
+ }
// Process child anchors
if (edge->type == AnchorData::Sequential)
- interpolateSequentialEdges(edge->from,
- static_cast<SequentialAnchorData *>(edge),
- orientation);
+ interpolateSequentialEdges(static_cast<SequentialAnchorData *>(edge));
else if (edge->type == AnchorData::Parallel)
- interpolateParallelEdges(edge->from,
- static_cast<ParallelAnchorData *>(edge),
- orientation);
+ interpolateParallelEdges(static_cast<ParallelAnchorData *>(edge));
}
-void QGraphicsAnchorLayoutPrivate::interpolateParallelEdges(
- AnchorVertex *base, ParallelAnchorData *data, Orientation orientation)
+void QGraphicsAnchorLayoutPrivate::interpolateParallelEdges(ParallelAnchorData *data)
{
// In parallels the boundary vertices are already calculate, we
// just need to look for sequential groups inside, because only
@@ -2407,46 +2761,44 @@ void QGraphicsAnchorLayoutPrivate::interpolateParallelEdges(
// First edge
if (data->firstEdge->type == AnchorData::Sequential)
- interpolateSequentialEdges(base,
- static_cast<SequentialAnchorData *>(data->firstEdge),
- orientation);
+ interpolateSequentialEdges(static_cast<SequentialAnchorData *>(data->firstEdge));
else if (data->firstEdge->type == AnchorData::Parallel)
- interpolateParallelEdges(base,
- static_cast<ParallelAnchorData *>(data->firstEdge),
- orientation);
+ interpolateParallelEdges(static_cast<ParallelAnchorData *>(data->firstEdge));
// Second edge
if (data->secondEdge->type == AnchorData::Sequential)
- interpolateSequentialEdges(base,
- static_cast<SequentialAnchorData *>(data->secondEdge),
- orientation);
+ interpolateSequentialEdges(static_cast<SequentialAnchorData *>(data->secondEdge));
else if (data->secondEdge->type == AnchorData::Parallel)
- interpolateParallelEdges(base,
- static_cast<ParallelAnchorData *>(data->secondEdge),
- orientation);
+ interpolateParallelEdges(static_cast<ParallelAnchorData *>(data->secondEdge));
}
-void QGraphicsAnchorLayoutPrivate::interpolateSequentialEdges(
- AnchorVertex *base, SequentialAnchorData *data, Orientation orientation)
+void QGraphicsAnchorLayoutPrivate::interpolateSequentialEdges(SequentialAnchorData *data)
{
- AnchorVertex *prev = base;
+ // This method is supposed to handle any sequential anchor, even out-of-order
+ // ones. However, in the current QGAL implementation we should get only the
+ // well behaved ones.
+ Q_ASSERT(data->m_edges.first()->from == data->from);
+ Q_ASSERT(data->m_edges.last()->to == data->to);
- // ### I'm not sure whether this assumption is safe. If not,
- // consider that m_edges.last() could be used instead (so
- // at(0) would be the one to be treated specially).
- Q_ASSERT(base == data->m_edges.at(0)->to || base == data->m_edges.at(0)->from);
+ // At this point, the two outter vertices already have their distance
+ // calculated.
+ // We use the first as the base to calculate the internal ones
+
+ AnchorVertex *prev = data->from;
- // Skip the last
for (int i = 0; i < data->m_edges.count() - 1; ++i) {
- AnchorData *child = data->m_edges.at(i);
- interpolateEdge(prev, child, orientation);
- prev = child->to;
+ AnchorData *edge = data->m_edges.at(i);
+ interpolateEdge(prev, edge);
+
+ // Use the recently calculated vertex as the base for the next one
+ const bool edgeIsForward = (edge->from == prev);
+ prev = edgeIsForward ? edge->to : edge->from;
}
// Treat the last specially, since we already calculated it's end
// vertex, so it's only interesting if it's a complex one
if (data->m_edges.last()->type != AnchorData::Normal)
- interpolateEdge(prev, data->m_edges.last(), orientation);
+ interpolateEdge(prev, data->m_edges.last());
}
bool QGraphicsAnchorLayoutPrivate::solveMinMax(const QList<QSimplexConstraint *> &constraints,
@@ -2472,9 +2824,10 @@ bool QGraphicsAnchorLayoutPrivate::solveMinMax(const QList<QSimplexConstraint *>
// Save sizeAtMinimum results
QList<AnchorData *> variables = getVariables(constraints);
for (int i = 0; i < variables.size(); ++i) {
- AnchorData *ad = static_cast<AnchorData *>(variables[i]);
- Q_ASSERT(ad->result >= ad->minSize || qFuzzyCompare(ad->result, ad->minSize));
+ AnchorData *ad = static_cast<AnchorData *>(variables.at(i));
ad->sizeAtMinimum = ad->result;
+ Q_ASSERT(ad->sizeAtMinimum >= ad->minSize ||
+ qAbs(ad->sizeAtMinimum - ad->minSize) < 0.00000001);
}
// Calculate maximum values
@@ -2482,9 +2835,10 @@ bool QGraphicsAnchorLayoutPrivate::solveMinMax(const QList<QSimplexConstraint *>
// Save sizeAtMaximum results
for (int i = 0; i < variables.size(); ++i) {
- AnchorData *ad = static_cast<AnchorData *>(variables[i]);
- Q_ASSERT(ad->result <= ad->maxSize || qFuzzyCompare(ad->result, ad->maxSize));
+ AnchorData *ad = static_cast<AnchorData *>(variables.at(i));
ad->sizeAtMaximum = ad->result;
+ // Q_ASSERT(ad->sizeAtMaximum <= ad->maxSize ||
+ // qAbs(ad->sizeAtMaximum - ad->maxSize) < 0.00000001);
}
}
return feasible;
@@ -2515,7 +2869,7 @@ bool QGraphicsAnchorLayoutPrivate::solvePreferred(const QList<QSimplexConstraint
// A + A_shrinker - A_grower = A_pref
//
for (int i = 0; i < variables.size(); ++i) {
- AnchorData *ad = variables[i];
+ AnchorData *ad = variables.at(i);
if (ad->skipInPreferred)
continue;
@@ -2546,7 +2900,7 @@ bool QGraphicsAnchorLayoutPrivate::solvePreferred(const QList<QSimplexConstraint
// Save sizeAtPreferred results
for (int i = 0; i < variables.size(); ++i) {
- AnchorData *ad = variables[i];
+ AnchorData *ad = variables.at(i);
ad->sizeAtPreferred = ad->result;
}
@@ -2563,139 +2917,6 @@ bool QGraphicsAnchorLayoutPrivate::solvePreferred(const QList<QSimplexConstraint
/*!
\internal
- Calculate the "expanding" keyframe
-
- This new keyframe sits between the already existing sizeAtPreferred and
- sizeAtMaximum keyframes. Its goal is to modify the interpolation between
- the latter as to respect the "expanding" size policy of some anchors.
-
- Previously all items would be subject to a linear interpolation between
- sizeAtPreferred and sizeAtMaximum values. This will change now, the
- expanding anchors will change their size before the others. To calculate
- this keyframe we use the following logic:
-
- 1) Ask each anchor for their desired expanding size (ad->expSize), this
- value depends on the anchor expanding property in the following way:
-
- - Expanding normal anchors want to grow towards their maximum size
- - Non-expanding normal anchors want to remain at their preferred size.
- - Sequential anchors wants to grow towards a size that is calculated by:
- summarizing it's child anchors, where it will use preferred size for non-expanding anchors
- and maximum size for expanding anchors.
- - Parallel anchors want to grow towards the smallest maximum size of all the expanding anchors.
-
- 2) Clamp their desired values to the value they assume in the neighbour
- keyframes (sizeAtPreferred and sizeAtExpanding)
-
- 3) Run simplex with a setup that ensures the following:
-
- a. Anchors will change their value from their sizeAtPreferred towards
- their sizeAtMaximum as much as required to ensure that ALL anchors
- reach their respective "desired" expanding sizes.
-
- b. No anchors will change their value beyond what is NEEDED to satisfy
- the requirement above.
-
- The final result is that, at the "expanding" keyframe expanding anchors
- will grow and take with them all anchors that are parallel to them.
- However, non-expanding anchors will remain at their preferred size unless
- they are forced to grow by a parallel expanding anchor.
-
- Note: For anchors where the sizeAtPreferred is bigger than sizeAtMaximum,
- the visual effect when the layout grows from its preferred size is
- the following: Expanding anchors will keep their size while non
- expanding ones will shrink. Only after non-expanding anchors have
- shrinked all the way, the expanding anchors will start to shrink too.
-*/
-void QGraphicsAnchorLayoutPrivate::solveExpanding(const QList<QSimplexConstraint *> &constraints,
- const QList<AnchorData *> &variables)
-{
- QList<QSimplexConstraint *> itemConstraints;
- QSimplexConstraint *objective = new QSimplexConstraint;
- bool hasExpanding = false;
-
- // Construct the simplex constraints and objective
- for (int i = 0; i < variables.size(); ++i) {
- // For each anchor
- AnchorData *ad = variables[i];
-
- // Clamp the desired expanding size
- qreal upperBoundary = qMax(ad->sizeAtPreferred, ad->sizeAtMaximum);
- qreal lowerBoundary = qMin(ad->sizeAtPreferred, ad->sizeAtMaximum);
- qreal boundedExpSize = qBound(lowerBoundary, ad->expSize, upperBoundary);
-
- // Expanding anchors are those that want to move from their preferred size
- if (boundedExpSize != ad->sizeAtPreferred)
- hasExpanding = true;
-
- // Lock anchor between boundedExpSize and sizeAtMaximum (ensure 3.a)
- if (boundedExpSize == ad->sizeAtMaximum || qFuzzyCompare(boundedExpSize, ad->sizeAtMaximum)) {
- // The interval has only one possible value, we can use an "Equal"
- // constraint and don't need to add this variable to the objective.
- QSimplexConstraint *itemC = new QSimplexConstraint;
- itemC->ratio = QSimplexConstraint::Equal;
- itemC->variables.insert(ad, 1.0);
- itemC->constant = boundedExpSize;
- itemConstraints << itemC;
- } else {
- // Add MoreOrEqual and LessOrEqual constraints.
- QSimplexConstraint *itemC = new QSimplexConstraint;
- itemC->ratio = QSimplexConstraint::MoreOrEqual;
- itemC->variables.insert(ad, 1.0);
- itemC->constant = qMin(boundedExpSize, ad->sizeAtMaximum);
- itemConstraints << itemC;
-
- itemC = new QSimplexConstraint;
- itemC->ratio = QSimplexConstraint::LessOrEqual;
- itemC->variables.insert(ad, 1.0);
- itemC->constant = qMax(boundedExpSize, ad->sizeAtMaximum);
- itemConstraints << itemC;
-
- // Create objective to avoid the anchors from moving away from
- // the preferred size more than the needed amount. (ensure 3.b)
- // The objective function is the distance between sizeAtPreferred
- // and sizeAtExpanding, it will be minimized.
- if (ad->sizeAtExpanding < ad->sizeAtMaximum) {
- // Try to shrink this variable towards its sizeAtPreferred value
- objective->variables.insert(ad, 1.0);
- } else {
- // Try to grow this variable towards its sizeAtPreferred value
- objective->variables.insert(ad, -1.0);
- }
- }
- }
-
- // Solve
- if (hasExpanding == false) {
- // If no anchors are expanding, we don't need to run the simplex
- // Set all variables to their preferred size
- for (int i = 0; i < variables.size(); ++i) {
- variables[i]->sizeAtExpanding = variables[i]->sizeAtPreferred;
- }
- } else {
- // Run simplex
- QSimplex simplex;
-
- // Satisfy expanding (3.a)
- bool feasible = simplex.setConstraints(constraints + itemConstraints);
- Q_ASSERT(feasible);
-
- // Reduce damage (3.b)
- simplex.setObjective(objective);
- simplex.solveMin();
-
- // Collect results
- for (int i = 0; i < variables.size(); ++i) {
- variables[i]->sizeAtExpanding = variables[i]->result;
- }
- }
-
- delete objective;
- qDeleteAll(itemConstraints);
-}
-
-/*!
- \internal
Returns true if there are no arrangement that satisfies all constraints.
Otherwise returns false.
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
index 7dd0d658bf..5f50c85d99 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
@@ -78,66 +78,30 @@ QT_BEGIN_NAMESPACE
Represents a vertex (anchorage point) in the internal graph
*/
struct AnchorVertex {
+ enum Type {
+ Normal = 0,
+ Pair
+ };
+
AnchorVertex(QGraphicsLayoutItem *item, Qt::AnchorPoint edge)
- : m_item(item), m_edge(edge) {}
+ : m_item(item), m_edge(edge), m_type(Normal) {}
AnchorVertex()
- : m_item(0), m_edge(Qt::AnchorPoint(0)) {}
+ : m_item(0), m_edge(Qt::AnchorPoint(0)), m_type(Normal) {}
#ifdef QT_DEBUG
inline QString toString() const;
#endif
+
QGraphicsLayoutItem *m_item;
Qt::AnchorPoint m_edge;
+ uint m_type : 1;
// Current distance from this vertex to the layout edge (Left or Top)
// Value is calculated from the current anchors sizes.
qreal distance;
};
-#ifdef QT_DEBUG
-inline QString AnchorVertex::toString() const
-{
- if (!this || !m_item) {
- return QLatin1String("NULL");
- }
- QString edge;
- switch (m_edge) {
- case Qt::AnchorLeft:
- edge = QLatin1String("Left");
- break;
- case Qt::AnchorHorizontalCenter:
- edge = QLatin1String("HorizontalCenter");
- break;
- case Qt::AnchorRight:
- edge = QLatin1String("Right");
- break;
- case Qt::AnchorTop:
- edge = QLatin1String("Top");
- break;
- case Qt::AnchorVerticalCenter:
- edge = QLatin1String("VerticalCenter");
- break;
- case Qt::AnchorBottom:
- edge = QLatin1String("Bottom");
- break;
- default:
- edge = QLatin1String("None");
- break;
- }
- QString itemName;
- if (m_item->isLayout()) {
- itemName = QLatin1String("layout");
- } else {
- if (QGraphicsItem *item = m_item->graphicsItem()) {
- itemName = item->data(0).toString();
- }
- }
- edge.insert(0, QLatin1String("%1_"));
- return edge.arg(itemName);
-}
-#endif
-
/*!
\internal
@@ -150,14 +114,21 @@ struct AnchorData : public QSimplexVariable {
Parallel
};
+ enum Dependency {
+ Independent = 0,
+ Master,
+ Slave
+ };
+
AnchorData()
: QSimplexVariable(), item(0), from(0), to(0),
- minSize(0), prefSize(0), expSize(0), maxSize(0),
+ minSize(0), prefSize(0), maxSize(0),
sizeAtMinimum(0), sizeAtPreferred(0),
- sizeAtExpanding(0), sizeAtMaximum(0),
+ sizeAtMaximum(0),
graphicsAnchor(0), skipInPreferred(0),
type(Normal), hasSize(true), isLayoutAnchor(false),
- isCenterAnchor(false), orientation(0) {}
+ isCenterAnchor(false), orientation(0),
+ dependency(Independent) {}
virtual void updateChildrenSizes() {}
virtual bool refreshSizeHints(const QLayoutStyleInfo *styleInfo);
@@ -194,7 +165,6 @@ struct AnchorData : public QSimplexVariable {
// size.
qreal minSize;
qreal prefSize;
- qreal expSize;
qreal maxSize;
// These attributes define which sizes should that anchor be in when the
@@ -202,7 +172,6 @@ struct AnchorData : public QSimplexVariable {
// calculated by the Simplex solver based on the current layout setup.
qreal sizeAtMinimum;
qreal sizeAtPreferred;
- qreal sizeAtExpanding;
qreal sizeAtMaximum;
QGraphicsAnchor *graphicsAnchor;
@@ -212,6 +181,7 @@ struct AnchorData : public QSimplexVariable {
uint isLayoutAnchor : 1; // if this anchor is an internal layout anchor
uint isCenterAnchor : 1;
uint orientation : 1;
+ uint dependency : 2; // either Independent, Master or Slave
};
#ifdef QT_DEBUG
@@ -250,10 +220,11 @@ struct ParallelAnchorData : public AnchorData
type = AnchorData::Parallel;
orientation = first->orientation;
- // ### Those asserts force that both child anchors have the same direction,
- // but can't we simplify a pair of anchors in opposite directions?
- Q_ASSERT(first->from == second->from);
- Q_ASSERT(first->to == second->to);
+ // This assert whether the child anchors share their vertices
+ Q_ASSERT(((first->from == second->from) && (first->to == second->to)) ||
+ ((first->from == second->to) && (first->to == second->from)));
+
+ // We arbitrarily choose the direction of the first child as "our" direction
from = first->from;
to = first->to;
#ifdef QT_DEBUG
@@ -268,8 +239,73 @@ struct ParallelAnchorData : public AnchorData
AnchorData* firstEdge;
AnchorData* secondEdge;
+
+ QList<QSimplexConstraint *> m_firstConstraints;
+ QList<QSimplexConstraint *> m_secondConstraints;
};
+struct AnchorVertexPair : public AnchorVertex {
+ AnchorVertexPair(AnchorVertex *v1, AnchorVertex *v2, AnchorData *data)
+ : AnchorVertex(), m_first(v1), m_second(v2), m_removedAnchor(data) {
+ m_type = AnchorVertex::Pair;
+ }
+
+ AnchorVertex *m_first;
+ AnchorVertex *m_second;
+
+ AnchorData *m_removedAnchor;
+ QList<AnchorData *> m_firstAnchors;
+ QList<AnchorData *> m_secondAnchors;
+};
+
+#ifdef QT_DEBUG
+inline QString AnchorVertex::toString() const
+{
+ if (!this) {
+ return QLatin1String("NULL");
+ } else if (m_type == Pair) {
+ const AnchorVertexPair *vp = static_cast<const AnchorVertexPair *>(this);
+ return QString::fromAscii("(%1, %2)").arg(vp->m_first->toString()).arg(vp->m_second->toString());
+ } else if (!m_item) {
+ return QString::fromAscii("NULL_%1").arg(quintptr(this));
+ }
+ QString edge;
+ switch (m_edge) {
+ case Qt::AnchorLeft:
+ edge = QLatin1String("Left");
+ break;
+ case Qt::AnchorHorizontalCenter:
+ edge = QLatin1String("HorizontalCenter");
+ break;
+ case Qt::AnchorRight:
+ edge = QLatin1String("Right");
+ break;
+ case Qt::AnchorTop:
+ edge = QLatin1String("Top");
+ break;
+ case Qt::AnchorVerticalCenter:
+ edge = QLatin1String("VerticalCenter");
+ break;
+ case Qt::AnchorBottom:
+ edge = QLatin1String("Bottom");
+ break;
+ default:
+ edge = QLatin1String("None");
+ break;
+ }
+ QString itemName;
+ if (m_item->isLayout()) {
+ itemName = QLatin1String("layout");
+ } else {
+ if (QGraphicsItem *item = m_item->graphicsItem()) {
+ itemName = item->data(0).toString();
+ }
+ }
+ edge.insert(0, QLatin1String("%1_"));
+ return edge.arg(itemName);
+}
+#endif
+
/*!
\internal
@@ -337,8 +373,7 @@ public:
// Interval represents which interpolation interval are we operating in.
enum Interval {
MinToPreferred = 0,
- PreferredToExpanding,
- ExpandingToMax
+ PreferredToMax
};
// Several structures internal to the layout are duplicated to handle
@@ -427,20 +462,33 @@ public:
QLayoutStyleInfo &styleInfo() const;
- // Activation methods
- bool simplifyGraph(Orientation orientation);
- bool simplifyGraphIteration(Orientation orientation, bool *feasible);
- void restoreSimplifiedGraph(Orientation orientation);
+ AnchorData *addAnchorMaybeParallel(AnchorData *newAnchor, bool *feasible);
+ // Activation
void calculateGraphs();
void calculateGraphs(Orientation orientation);
+ // Simplification
+ bool simplifyGraph(Orientation orientation);
+ bool simplifyVertices(Orientation orientation);
+ bool simplifyGraphIteration(Orientation orientation, bool *feasible);
+
+ bool replaceVertex(Orientation orientation, AnchorVertex *oldV,
+ AnchorVertex *newV, const QList<AnchorData *> &edges);
+
+
+ void restoreSimplifiedGraph(Orientation orientation);
+ void restoreSimplifiedAnchor(AnchorData *edge);
+ void restoreSimplifiedConstraints(ParallelAnchorData *parallel);
+ void restoreVertices(Orientation orientation);
+
bool calculateTrunk(Orientation orientation, const GraphPath &trunkPath,
const QList<QSimplexConstraint *> &constraints,
const QList<AnchorData *> &variables);
bool calculateNonTrunk(const QList<QSimplexConstraint *> &constraints,
const QList<AnchorData *> &variables);
+ // Support functions for calculateGraph()
bool refreshAllSizeHints(Orientation orientation);
void findPaths(Orientation orientation);
void constraintsFromPaths(Orientation orientation);
@@ -460,6 +508,17 @@ public:
return internalVertex(qMakePair(const_cast<QGraphicsLayoutItem *>(item), edge));
}
+ inline void changeLayoutVertex(Orientation orientation, AnchorVertex *oldV, AnchorVertex *newV)
+ {
+ if (layoutFirstVertex[orientation] == oldV)
+ layoutFirstVertex[orientation] = newV;
+ else if (layoutCentralVertex[orientation] == oldV)
+ layoutCentralVertex[orientation] = newV;
+ else if (layoutLastVertex[orientation] == oldV)
+ layoutLastVertex[orientation] = newV;
+ }
+
+
AnchorVertex *addInternalVertex(QGraphicsLayoutItem *item, Qt::AnchorPoint edge);
void removeInternalVertex(QGraphicsLayoutItem *item, Qt::AnchorPoint edge);
@@ -468,19 +527,15 @@ public:
void calculateVertexPositions(Orientation orientation);
void setupEdgesInterpolation(Orientation orientation);
- void interpolateEdge(AnchorVertex *base, AnchorData *edge, Orientation orientation);
- void interpolateSequentialEdges(AnchorVertex *base, SequentialAnchorData *edge,
- Orientation orientation);
- void interpolateParallelEdges(AnchorVertex *base, ParallelAnchorData *edge,
- Orientation orientation);
+ void interpolateEdge(AnchorVertex *base, AnchorData *edge);
+ void interpolateSequentialEdges(SequentialAnchorData *edge);
+ void interpolateParallelEdges(ParallelAnchorData *edge);
// Linear Programming solver methods
bool solveMinMax(const QList<QSimplexConstraint *> &constraints,
GraphPath path, qreal *min, qreal *max);
bool solvePreferred(const QList<QSimplexConstraint *> &constraints,
const QList<AnchorData *> &variables);
- void solveExpanding(const QList<QSimplexConstraint *> &constraints,
- const QList<AnchorData *> &variables);
bool hasConflicts() const;
#ifdef QT_DEBUG
@@ -491,7 +546,6 @@ public:
qreal spacings[NOrientations];
// Size hints from simplex engine
qreal sizeHints[2][3];
- qreal sizeAtExpanding[2];
// Items
QVector<QGraphicsLayoutItem *> items;
@@ -504,6 +558,14 @@ public:
// Internal graph of anchorage points and anchors, for both orientations
Graph<AnchorVertex, AnchorData> graph[2];
+ AnchorVertex *layoutFirstVertex[2];
+ AnchorVertex *layoutCentralVertex[2];
+ AnchorVertex *layoutLastVertex[2];
+
+ // Combined anchors in order of creation
+ QList<AnchorVertexPair *> simplifiedVertices[2];
+ QList<AnchorData *> anchorsFromSimplifiedVertices[2];
+
// Graph paths and constraints, for both orientations
QMultiHash<AnchorVertex *, GraphPath> graphPaths[2];
QList<QSimplexConstraint *> constraints[2];
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 2fd499dc90..723e49646c 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -386,6 +386,12 @@
introduced in Qt 4.6.
\omitvalue ItemIsFocusScope Internal only (for now).
+
+ \value ItemSendsScenePositionChanges The item enables itemChange()
+ notifications for ItemScenePositionHasChanged. For performance reasons,
+ these notifications are disabled by default. You must enable this flag
+ to receive notifications for scene position changes. This flag was
+ introduced in Qt 4.6.
*/
/*!
@@ -562,6 +568,14 @@
\value ItemOpacityHasChanged The item's opacity has changed. The value
argument is the new opacity (i.e., a double). Do not call setOpacity() as
this notification is delivered. The return value is ignored.
+
+ \value ItemScenePositionHasChanged The item's scene position has changed.
+ This notification is sent if the ItemSendsScenePositionChanges flag is
+ enabled, and after the item's scene position has changed (i.e., the
+ position or transformation of the item itself or the position or
+ transformation of any ancestor has changed). The value argument is the
+ new scene position (the same as scenePos()), and QGraphicsItem ignores
+ the return value for this notification (i.e., a read-only notification).
*/
/*!
@@ -990,6 +1004,10 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent)
if (scene) {
// Deliver the change to the index
scene->d_func()->index->itemChange(q, QGraphicsItem::ItemParentChange, newParentVariant);
+
+ // Disable scene pos notifications for old ancestors
+ if (scenePosDescendants || (flags & QGraphicsItem::ItemSendsScenePositionChanges))
+ scene->d_func()->setScenePosItemEnabled(q, false);
}
if (subFocusItem && parent) {
@@ -1084,10 +1102,15 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent)
parent->d_ptr->addChild(q);
parent->itemChange(QGraphicsItem::ItemChildAddedChange, thisPointerVariant);
- if (!implicitUpdate && scene) {
- scene->d_func()->markDirty(q_ptr, QRect(),
- /*invalidateChildren=*/false,
- /*maybeDirtyClipPath=*/true);
+ if (scene) {
+ if (!implicitUpdate)
+ scene->d_func()->markDirty(q_ptr, QRect(),
+ /*invalidateChildren=*/false,
+ /*maybeDirtyClipPath=*/true);
+
+ // Re-enable scene pos notifications for new ancestors
+ if (scenePosDescendants || (flags & QGraphicsItem::ItemSendsScenePositionChanges))
+ scene->d_func()->setScenePosItemEnabled(q, true);
}
// Inherit ancestor flags from the new parent.
@@ -1336,7 +1359,9 @@ QGraphicsItem::~QGraphicsItem()
d_ptr->setParentItemHelper(0);
}
+#ifndef QT_NO_GRAPHICSEFFECT
delete d_ptr->graphicsEffect;
+#endif //QT_NO_GRAPHICSEFFECT
if (d_ptr->transformData) {
for(int i = 0; i < d_ptr->transformData->graphicsTransforms.size(); ++i) {
QGraphicsTransform *t = d_ptr->transformData->graphicsTransforms.at(i);
@@ -1746,6 +1771,12 @@ void QGraphicsItem::setFlags(GraphicsItemFlags flags)
}
if (d_ptr->scene) {
+ if ((flags & ItemSendsScenePositionChanges) != (oldFlags & ItemSendsScenePositionChanges)) {
+ if (flags & ItemSendsScenePositionChanges)
+ d_ptr->scene->d_func()->registerScenePosItem(this);
+ else
+ d_ptr->scene->d_func()->unregisterScenePosItem(this);
+ }
d_ptr->scene->d_func()->markDirty(this, QRectF(),
/*invalidateChildren=*/true,
/*maybeDirtyClipPath*/true);
@@ -2506,7 +2537,9 @@ void QGraphicsItem::setOpacity(qreal opacity)
// Update.
if (d_ptr->scene) {
+#ifndef QT_NO_GRAPHICSEFFECT
d_ptr->invalidateGraphicsEffectsRecursively();
+#endif //QT_NO_GRAPHICSEFFECT
d_ptr->scene->d_func()->markDirty(this, QRectF(),
/*invalidateChildren=*/true,
/*maybeDirtyClipPath=*/false,
@@ -2523,6 +2556,7 @@ void QGraphicsItem::setOpacity(qreal opacity)
\since 4.6
*/
+#ifndef QT_NO_GRAPHICSEFFECT
QGraphicsEffect *QGraphicsItem::graphicsEffect() const
{
return d_ptr->graphicsEffect;
@@ -2569,6 +2603,7 @@ void QGraphicsItem::setGraphicsEffect(QGraphicsEffect *effect)
prepareGeometryChange();
}
+#endif //QT_NO_GRAPHICSEFFECT
/*!
\internal
@@ -2582,6 +2617,7 @@ void QGraphicsItem::setGraphicsEffect(QGraphicsEffect *effect)
*/
QRectF QGraphicsItemPrivate::effectiveBoundingRect() const
{
+#ifndef QT_NO_GRAPHICSEFFECT
QGraphicsEffect *effect = graphicsEffect;
QRectF brect = effect && effect->isEnabled() ? effect->boundingRect() : q_ptr->boundingRect();
if (ancestorFlags & QGraphicsItemPrivate::AncestorClipsChildren)
@@ -2598,6 +2634,10 @@ QRectF QGraphicsItemPrivate::effectiveBoundingRect() const
}
return brect;
+#else //QT_NO_GRAPHICSEFFECT
+ return q_ptr->boundingRect();
+#endif //QT_NO_GRAPHICSEFFECT
+
}
/*!
@@ -2951,7 +2991,7 @@ bool QGraphicsItem::hasFocus() const
{
if (d_ptr->focusProxy)
return d_ptr->focusProxy->hasFocus();
- return (d_ptr->scene && d_ptr->scene->focusItem() == this);
+ return isActive() && (d_ptr->scene && d_ptr->scene->focusItem() == this);
}
/*!
@@ -3309,6 +3349,9 @@ QPointF QGraphicsItem::pos() const
*/
void QGraphicsItem::setX(qreal x)
{
+ if (d_ptr->inDestructor)
+ return;
+
d_ptr->setPosHelper(QPointF(x, d_ptr->pos.y()));
}
@@ -3330,6 +3373,9 @@ void QGraphicsItem::setX(qreal x)
*/
void QGraphicsItem::setY(qreal y)
{
+ if (d_ptr->inDestructor)
+ return;
+
d_ptr->setPosHelper(QPointF(d_ptr->pos.x(), y));
}
@@ -3395,6 +3441,9 @@ void QGraphicsItem::setPos(const QPointF &pos)
if (d_ptr->pos == pos)
return;
+ if (d_ptr->inDestructor)
+ return;
+
// Update and repositition.
if (!(d_ptr->flags & ItemSendsGeometryChanges)) {
d_ptr->setPosHelper(pos);
@@ -3412,6 +3461,7 @@ void QGraphicsItem::setPos(const QPointF &pos)
// Send post-notification.
itemChange(QGraphicsItem::ItemPositionHasChanged, newPosVariant);
+ d_ptr->sendScenePosChange();
}
/*!
@@ -4022,6 +4072,7 @@ void QGraphicsItem::setTransform(const QTransform &matrix, bool combine)
// Send post-notification.
itemChange(ItemTransformHasChanged, newTransformVariant);
+ d_ptr->sendScenePosChange();
}
/*!
@@ -4246,6 +4297,24 @@ void QGraphicsItemPrivate::ensureSequentialSiblingIndex()
}
/*!
+ \internal
+*/
+inline void QGraphicsItemPrivate::sendScenePosChange()
+{
+ Q_Q(QGraphicsItem);
+ if (scene) {
+ if (flags & QGraphicsItem::ItemSendsScenePositionChanges)
+ q->itemChange(QGraphicsItem::ItemScenePositionHasChanged, q->scenePos());
+ if (scenePosDescendants) {
+ foreach (QGraphicsItem *item, scene->d_func()->scenePosItems) {
+ if (q->isAncestorOf(item))
+ item->itemChange(QGraphicsItem::ItemScenePositionHasChanged, item->scenePos());
+ }
+ }
+ }
+}
+
+/*!
\since 4.6
Stacks this item before \a sibling, which must be a sibling item (i.e., the
@@ -4296,6 +4365,12 @@ void QGraphicsItem::stackBefore(const QGraphicsItem *sibling)
++index;
}
d_ptr->siblingIndex = siblingIndex;
+ for (int i = 0; i < siblings->size(); ++i) {
+ int &index = siblings->at(i)->d_ptr->siblingIndex;
+ if (i != siblingIndex && index >= siblingIndex && index <= myIndex)
+ siblings->at(i)->d_ptr->siblingOrderChange();
+ }
+ d_ptr->siblingOrderChange();
}
}
@@ -4977,6 +5052,7 @@ int QGraphicsItemPrivate::depth() const
/*!
\internal
*/
+#ifndef QT_NO_GRAPHICSEFFECT
void QGraphicsItemPrivate::invalidateGraphicsEffectsRecursively()
{
QGraphicsItemPrivate *itemPrivate = this;
@@ -4989,6 +5065,7 @@ void QGraphicsItemPrivate::invalidateGraphicsEffectsRecursively()
}
} while ((itemPrivate = itemPrivate->parent ? itemPrivate->parent->d_ptr.data() : 0));
}
+#endif //QT_NO_GRAPHICSEFFECT
/*!
\internal
@@ -5293,6 +5370,16 @@ void QGraphicsItemPrivate::subFocusItemChange()
/*!
\internal
+ Subclasses can reimplement this function to be notified when its
+ siblingIndex order is changed.
+*/
+void QGraphicsItemPrivate::siblingOrderChange()
+{
+}
+
+/*!
+ \internal
+
Tells us if it is a proxy widget
*/
bool QGraphicsItemPrivate::isProxyWidget() const
@@ -5324,7 +5411,9 @@ void QGraphicsItem::update(const QRectF &rect)
return;
// Make sure we notify effects about invalidated source.
+#ifndef QT_NO_GRAPHICSEFFECT
d_ptr->invalidateGraphicsEffectsRecursively();
+#endif //QT_NO_GRAPHICSEFFECT
if (CacheMode(d_ptr->cacheMode) != NoCache) {
// Invalidate cache.
@@ -10678,6 +10767,7 @@ int QGraphicsItemGroup::type() const
return Type;
}
+#ifndef QT_NO_GRAPHICSEFFECT
QRectF QGraphicsItemEffectSourcePrivate::boundingRect(Qt::CoordinateSystem system) const
{
const bool deviceCoordinates = (system == Qt::DeviceCoordinates);
@@ -10817,6 +10907,7 @@ QPixmap QGraphicsItemEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QP
return pixmap;
}
+#endif //QT_NO_GRAPHICSEFFECT
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug debug, QGraphicsItem *item)
@@ -10940,6 +11031,9 @@ QDebug operator<<(QDebug debug, QGraphicsItem::GraphicsItemChange change)
case QGraphicsItem::ItemOpacityHasChanged:
str = "ItemOpacityHasChanged";
break;
+ case QGraphicsItem::ItemScenePositionHasChanged:
+ str = "ItemScenePositionHasChanged";
+ break;
}
debug << str;
return debug;
@@ -10997,6 +11091,9 @@ QDebug operator<<(QDebug debug, QGraphicsItem::GraphicsItemFlag flag)
case QGraphicsItem::ItemIsFocusScope:
str = "ItemIsFocusScope";
break;
+ case QGraphicsItem::ItemSendsScenePositionChanges:
+ str = "ItemSendsScenePositionChanges";
+ break;
}
debug << str;
return debug;
diff --git a/src/gui/graphicsview/qgraphicsitem.h b/src/gui/graphicsview/qgraphicsitem.h
index f091e34a6a..8bbe9f1254 100644
--- a/src/gui/graphicsview/qgraphicsitem.h
+++ b/src/gui/graphicsview/qgraphicsitem.h
@@ -105,7 +105,8 @@ public:
ItemAcceptsInputMethod = 0x1000,
ItemNegativeZStacksBehindParent = 0x2000,
ItemIsPanel = 0x4000,
- ItemIsFocusScope = 0x8000 // internal
+ ItemIsFocusScope = 0x8000, // internal
+ ItemSendsScenePositionChanges = 0x10000
// NB! Don't forget to increase the d_ptr->flags bit field by 1 when adding a new flag.
};
Q_DECLARE_FLAGS(GraphicsItemFlags, GraphicsItemFlag)
@@ -137,7 +138,8 @@ public:
ItemZValueChange,
ItemZValueHasChanged,
ItemOpacityChange,
- ItemOpacityHasChanged
+ ItemOpacityHasChanged,
+ ItemScenePositionHasChanged
};
enum CacheMode {
@@ -225,9 +227,11 @@ public:
qreal effectiveOpacity() const;
void setOpacity(qreal opacity);
+#ifndef QT_NO_GRAPHICSEFFECT
// Effect
QGraphicsEffect *graphicsEffect() const;
void setGraphicsEffect(QGraphicsEffect *effect);
+#endif //QT_NO_GRAPHICSEFFECT
Qt::MouseButtons acceptedMouseButtons() const;
void setAcceptedMouseButtons(Qt::MouseButtons buttons);
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index 51d2ffd005..afc2198342 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -179,6 +179,7 @@ public:
holesInSiblingIndex(0),
sequentialOrdering(1),
updateDueToGraphicsEffect(0),
+ scenePosDescendants(0),
globalStackingOrder(-1),
q_ptr(0)
{
@@ -223,7 +224,9 @@ public:
bool discardUpdateRequest(bool ignoreClipping = false, bool ignoreVisibleBit = false,
bool ignoreDirtyBit = false, bool ignoreOpacity = false) const;
int depth() const;
+#ifndef QT_NO_GRAPHICSEFFECT
void invalidateGraphicsEffectsRecursively();
+#endif //QT_NO_GRAPHICSEFFECT
void invalidateDepthRecursively();
void resolveDepth();
void addChild(QGraphicsItem *child);
@@ -429,6 +432,8 @@ public:
inline void ensureSortedChildren();
static inline bool insertionOrder(QGraphicsItem *a, QGraphicsItem *b);
void ensureSequentialSiblingIndex();
+ inline void sendScenePosChange();
+ virtual void siblingOrderChange();
QPainterPath cachedClipPath;
QRectF childrenBoundingRect;
@@ -483,7 +488,7 @@ public:
// Packed 32 bits
quint32 fullUpdatePending : 1;
- quint32 flags : 16;
+ quint32 flags : 17;
quint32 dirtyChildrenBoundingRect : 1;
quint32 paintedViewBoundingRectsNeedRepaint : 1;
quint32 dirtySceneTransform : 1;
@@ -498,14 +503,15 @@ public:
quint32 sceneTransformTranslateOnly : 1;
quint32 notifyBoundingRectChanged : 1;
quint32 notifyInvalidated : 1;
- quint32 mouseSetsFocus : 1;
// New 32 bits
+ quint32 mouseSetsFocus : 1;
quint32 explicitActivate : 1;
quint32 wantsActive : 1;
quint32 holesInSiblingIndex : 1;
quint32 sequentialOrdering : 1;
quint32 updateDueToGraphicsEffect : 1;
+ quint32 scenePosDescendants : 1;
// Optional stacking order
int globalStackingOrder;
@@ -577,6 +583,7 @@ struct QGraphicsItemPaintInfo
quint32 drawItem : 1;
};
+#ifndef QT_NO_GRAPHICSEFFECT
class QGraphicsItemEffectSourcePrivate : public QGraphicsEffectSourcePrivate
{
public:
@@ -632,7 +639,7 @@ public:
QGraphicsItemPaintInfo *info;
QTransform lastEffectTransform;
};
-
+#endif //QT_NO_GRAPHICSEFFECT
/*!
Returns true if \a item1 is on top of \a item2.
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index dc036f84c8..2748ab63e9 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -294,6 +294,7 @@ QGraphicsScenePrivate::QGraphicsScenePrivate()
needSortTopLevelItems(true),
holesInTopLevelSiblingIndex(false),
topLevelSequentialOrdering(true),
+ scenePosDescendantsUpdatePending(false),
stickyFocus(false),
hasFocus(false),
focusItem(0),
@@ -488,6 +489,55 @@ void QGraphicsScenePrivate::_q_processDirtyItems()
/*!
\internal
+*/
+void QGraphicsScenePrivate::setScenePosItemEnabled(QGraphicsItem *item, bool enabled)
+{
+ QGraphicsItem *p = item->d_ptr->parent;
+ while (p) {
+ p->d_ptr->scenePosDescendants = enabled;
+ p = p->d_ptr->parent;
+ }
+ if (!enabled && !scenePosDescendantsUpdatePending) {
+ scenePosDescendantsUpdatePending = true;
+ QMetaObject::invokeMethod(q_func(), "_q_updateScenePosDescendants", Qt::QueuedConnection);
+ }
+}
+
+/*!
+ \internal
+*/
+void QGraphicsScenePrivate::registerScenePosItem(QGraphicsItem *item)
+{
+ scenePosItems.insert(item);
+ setScenePosItemEnabled(item, true);
+}
+
+/*!
+ \internal
+*/
+void QGraphicsScenePrivate::unregisterScenePosItem(QGraphicsItem *item)
+{
+ scenePosItems.remove(item);
+ setScenePosItemEnabled(item, false);
+}
+
+/*!
+ \internal
+*/
+void QGraphicsScenePrivate::_q_updateScenePosDescendants()
+{
+ foreach (QGraphicsItem *item, scenePosItems) {
+ QGraphicsItem *p = item->d_ptr->parent;
+ while (p) {
+ p->d_ptr->scenePosDescendants = 1;
+ p = p->d_ptr->parent;
+ }
+ }
+ scenePosDescendantsUpdatePending = false;
+}
+
+/*!
+ \internal
Schedules an item for removal. This function leaves some stale indexes
around in the BSP tree if called from the item's destructor; these will
@@ -523,6 +573,9 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item)
widget->d_func()->fixFocusChainBeforeReparenting(0, 0);
}
+ if (item->flags() & QGraphicsItem::ItemSendsScenePositionChanges)
+ unregisterScenePosItem(item);
+
item->d_func()->scene = 0;
//We need to remove all children first because they might use their parent
@@ -2293,8 +2346,9 @@ void QGraphicsScene::clear()
// NB! We have to clear the index before deleting items; otherwise the
// index might try to access dangling item pointers.
d->index->clear();
- const QList<QGraphicsItem *> items = d->topLevelItems;
- qDeleteAll(items);
+ // NB! QGraphicsScenePrivate::unregisterTopLevelItem() removes items
+ while (!d->topLevelItems.isEmpty())
+ delete d->topLevelItems.first();
Q_ASSERT(d->topLevelItems.isEmpty());
d->lastItemCount = 0;
d->allItemsIgnoreHoverEvents = true;
@@ -2540,6 +2594,9 @@ void QGraphicsScene::addItem(QGraphicsItem *item)
}
}
+ if (item->flags() & QGraphicsItem::ItemSendsScenePositionChanges)
+ d->registerScenePosItem(item);
+
// Ensure that newly added items that have subfocus set, gain
// focus automatically if there isn't a focus item already.
if (!d->focusItem && item != d->lastFocusItem && item->focusItem() == item)
@@ -2826,18 +2883,20 @@ void QGraphicsScene::removeItem(QGraphicsItem *item)
}
/*!
- Returns the scene's current focus item, or 0 if no item currently has
- focus.
+ When the scene is active, this functions returns the scene's current focus
+ item, or 0 if no item currently has focus. When the scene is inactive, this
+ functions returns the item that will gain input focus when the scene becomes
+ active.
The focus item receives keyboard input when the scene receives a
key event.
- \sa setFocusItem(), QGraphicsItem::hasFocus()
+ \sa setFocusItem(), QGraphicsItem::hasFocus(), isActive()
*/
QGraphicsItem *QGraphicsScene::focusItem() const
{
Q_D(const QGraphicsScene);
- return d->focusItem;
+ return isActive() ? d->focusItem : d->lastFocusItem;
}
/*!
@@ -4149,7 +4208,7 @@ static void _q_paintIntoCache(QPixmap *pix, QGraphicsItem *item, const QRegion &
QRect br = pixmapExposed.boundingRect();
// Don't use subpixmap if we get a full update.
- if (pixmapExposed.isEmpty() || (pixmapExposed.numRects() == 1 && br.contains(pix->rect()))) {
+ if (pixmapExposed.isEmpty() || (pixmapExposed.rectCount() == 1 && br.contains(pix->rect()))) {
pix->fill(Qt::transparent);
pixmapPainter.begin(pix);
} else {
@@ -4577,6 +4636,7 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter *
if (itemHasChildren && itemClipsChildrenToShape)
ENSURE_TRANSFORM_PTR;
+#ifndef QT_NO_GRAPHICSEFFECT
if (item->d_ptr->graphicsEffect && item->d_ptr->graphicsEffect->isEnabled()) {
ENSURE_TRANSFORM_PTR;
QGraphicsItemPaintInfo info(viewTransform, transformPtr, effectTransform, exposedRegion, widget, &styleOptionTmp,
@@ -4599,7 +4659,9 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter *
item->d_ptr->graphicsEffect->draw(painter, source);
painter->setWorldTransform(restoreTransform);
sourced->info = 0;
- } else {
+ } else
+#endif //QT_NO_GRAPHICSEFFECT
+ {
draw(item, painter, viewTransform, transformPtr, exposedRegion, widget, opacity,
effectTransform, wasDirtyParentSceneTransform, drawItem);
}
@@ -4768,10 +4830,12 @@ void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, b
QGraphicsItem *p = item->d_ptr->parent;
while (p) {
p->d_ptr->dirtyChildren = 1;
+#ifndef QT_NO_GRAPHICSEFFECT
if (p->d_ptr->graphicsEffect && p->d_ptr->graphicsEffect->isEnabled()) {
p->d_ptr->dirty = 1;
p->d_ptr->fullUpdatePending = 1;
}
+#endif //QT_NO_GRAPHICSEFFECT
p = p->d_ptr->parent;
}
}
diff --git a/src/gui/graphicsview/qgraphicsscene.h b/src/gui/graphicsview/qgraphicsscene.h
index d6d48d77bd..a47574ea9d 100644
--- a/src/gui/graphicsview/qgraphicsscene.h
+++ b/src/gui/graphicsview/qgraphicsscene.h
@@ -299,6 +299,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_emitUpdated())
Q_PRIVATE_SLOT(d_func(), void _q_polishItems())
Q_PRIVATE_SLOT(d_func(), void _q_processDirtyItems())
+ Q_PRIVATE_SLOT(d_func(), void _q_updateScenePosDescendants())
friend class QGraphicsItem;
friend class QGraphicsItemPrivate;
friend class QGraphicsView;
diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h
index f8db08401e..fdec466dc5 100644
--- a/src/gui/graphicsview/qgraphicsscene_p.h
+++ b/src/gui/graphicsview/qgraphicsscene_p.h
@@ -122,6 +122,13 @@ public:
void _q_processDirtyItems();
+ QSet<QGraphicsItem *> scenePosItems;
+ bool scenePosDescendantsUpdatePending;
+ void setScenePosItemEnabled(QGraphicsItem *item, bool enabled);
+ void registerScenePosItem(QGraphicsItem *item);
+ void unregisterScenePosItem(QGraphicsItem *item);
+ void _q_updateScenePosDescendants();
+
void removeItemHelper(QGraphicsItem *item);
QBrush backgroundBrush;
@@ -234,6 +241,7 @@ public:
item->d_ptr->fullUpdatePending = 0;
item->d_ptr->ignoreVisible = 0;
item->d_ptr->ignoreOpacity = 0;
+#ifndef QT_NO_GRAPHICSEFFECT
QGraphicsEffect::ChangeFlags flags;
if (item->d_ptr->notifyBoundingRectChanged) {
flags |= QGraphicsEffect::SourceBoundingRectChanged;
@@ -243,12 +251,15 @@ public:
flags |= QGraphicsEffect::SourceInvalidated;
item->d_ptr->notifyInvalidated = 0;
}
+#endif //QT_NO_GRAPHICSEFFECT
if (recursive) {
for (int i = 0; i < item->d_ptr->children.size(); ++i)
resetDirtyItem(item->d_ptr->children.at(i), recursive);
}
+#ifndef QT_NO_GRAPHICSEFFECT
if (flags && item->d_ptr->graphicsEffect)
item->d_ptr->graphicsEffect->sourceChanged(flags);
+#endif //QT_NO_GRAPHICSEFFECT
}
inline void ensureSortedTopLevelItems()
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index c88f678f64..27fd09e165 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -978,7 +978,7 @@ QList<QGraphicsItem *> QGraphicsViewPrivate::findItems(const QRegion &exposedReg
// Step 2) If the expose region is a simple rect and the view is only
// translated or scaled, search for items using
// QGraphicsScene::items(QRectF).
- bool simpleRectLookup = exposedRegion.numRects() == 1 && matrix.type() <= QTransform::TxScale;
+ bool simpleRectLookup = exposedRegion.rectCount() == 1 && matrix.type() <= QTransform::TxScale;
if (simpleRectLookup) {
return scene->items(exposedRegionSceneBounds,
Qt::IntersectsItemBoundingRect,
@@ -1512,6 +1512,11 @@ void QGraphicsView::setScene(QGraphicsScene *scene)
this, SLOT(updateSceneRect(QRectF)));
d->scene->d_func()->removeView(this);
d->connectedToScene = false;
+
+ if (isActiveWindow() && isVisible()) {
+ QEvent windowDeactivate(QEvent::WindowDeactivate);
+ QApplication::sendEvent(d->scene, &windowDeactivate);
+ }
}
// Assign the new scene and update the contents (scrollbars, etc.)).
@@ -1533,6 +1538,11 @@ void QGraphicsView::setScene(QGraphicsScene *scene)
// enable touch events if any items is interested in them
if (!d->scene->d_func()->allItemsIgnoreTouchEvents)
d->viewport->setAttribute(Qt::WA_AcceptTouchEvents);
+
+ if (isActiveWindow() && isVisible()) {
+ QEvent windowActivate(QEvent::WindowActivate);
+ QApplication::sendEvent(d->scene, &windowActivate);
+ }
} else {
d->recalculateContentSize();
}
@@ -2638,6 +2648,19 @@ bool QGraphicsView::viewportEvent(QEvent *event)
d->scene->d_func()->removePopup(d->scene->d_func()->popupWidgets.first());
QApplication::sendEvent(d->scene, event);
break;
+ case QEvent::Show:
+ if (d->scene && isActiveWindow()) {
+ QEvent windowActivate(QEvent::WindowActivate);
+ QApplication::sendEvent(d->scene, &windowActivate);
+ }
+ break;
+ case QEvent::Hide:
+ // spontaneous event will generate a WindowDeactivate.
+ if (!event->spontaneous() && d->scene && isActiveWindow()) {
+ QEvent windowDeactivate(QEvent::WindowDeactivate);
+ QApplication::sendEvent(d->scene, &windowDeactivate);
+ }
+ break;
case QEvent::Leave:
// ### This is a temporary fix for until we get proper mouse grab
// events. activeMouseGrabberItem should be set to 0 if we lose the
@@ -3252,10 +3275,13 @@ void QGraphicsView::paintEvent(QPaintEvent *event)
// Determine the exposed region
d->exposedRegion = event->region();
+ if (d->exposedRegion.isEmpty())
+ d->exposedRegion = viewport()->rect();
QRectF exposedSceneRect = mapToScene(d->exposedRegion.boundingRect()).boundingRect();
// Set up the painter
QPainter painter(viewport());
+ painter.setClipRect(event->rect(), Qt::IntersectClip);
#ifndef QT_NO_RUBBERBAND
if (d->rubberBanding && !d->rubberBandRect.isEmpty())
painter.save();
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp
index d70a2819a5..d9c65bbd54 100644
--- a/src/gui/graphicsview/qgraphicswidget.cpp
+++ b/src/gui/graphicsview/qgraphicswidget.cpp
@@ -318,6 +318,12 @@ void QGraphicsWidget::resize(const QSizeF &size)
*/
/*!
+ \property QGraphicsWidget::sizePolicy
+ \brief the size policy for the widget
+ \sa sizePolicy(), setSizePolicy(), QWidget::sizePolicy()
+*/
+
+/*!
\property QGraphicsWidget::geometry
\brief the geometry of the widget
@@ -410,6 +416,27 @@ void QGraphicsWidget::setGeometry(const QRectF &rect)
*/
/*!
+ \property QGraphicsWidget::minimumSize
+ \brief the minimum size of the widget
+
+ \sa setMinimumSize(), minimumSize(), preferredSize, maximumSize
+*/
+
+/*!
+ \property QGraphicsWidget::preferredSize
+ \brief the preferred size of the widget
+
+ \sa setPreferredSize(), preferredSize(), minimumSize, maximumSize
+*/
+
+/*!
+ \property QGraphicsWidget::maximumSize
+ \brief the maximum size of the widget
+
+ \sa setMaximumSize(), maximumSize(), minimumSize, preferredSize
+*/
+
+/*!
Sets the widget's contents margins to \a left, \a top, \a right and \a
bottom.
diff --git a/src/gui/graphicsview/qgraphicswidget.h b/src/gui/graphicsview/qgraphicswidget.h
index 9c71140e74..05d3a49a40 100644
--- a/src/gui/graphicsview/qgraphicswidget.h
+++ b/src/gui/graphicsview/qgraphicswidget.h
@@ -74,6 +74,10 @@ class Q_GUI_EXPORT QGraphicsWidget : public QGraphicsObject, public QGraphicsLay
Q_PROPERTY(QFont font READ font WRITE setFont)
Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection RESET unsetLayoutDirection)
Q_PROPERTY(QSizeF size READ size WRITE resize)
+ Q_PROPERTY(QSizeF minimumSize READ minimumSize WRITE setMinimumSize)
+ Q_PROPERTY(QSizeF preferredSize READ preferredSize WRITE setPreferredSize)
+ Q_PROPERTY(QSizeF maximumSize READ maximumSize WRITE setMaximumSize)
+ Q_PROPERTY(QSizePolicy sizePolicy READ sizePolicy WRITE setSizePolicy)
Q_PROPERTY(Qt::FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy)
Q_PROPERTY(Qt::WindowFlags windowFlags READ windowFlags WRITE setWindowFlags)
Q_PROPERTY(QString windowTitle READ windowTitle WRITE setWindowTitle)
diff --git a/src/gui/graphicsview/qsimplex_p.cpp b/src/gui/graphicsview/qsimplex_p.cpp
index 86b10b4c8c..cd40f9ed61 100644
--- a/src/gui/graphicsview/qsimplex_p.cpp
+++ b/src/gui/graphicsview/qsimplex_p.cpp
@@ -288,7 +288,7 @@ bool QSimplex::setConstraints(const QList<QSimplexConstraint *> newConstraints)
// original problem.
// Otherwise, we clean up our structures and report there is
// no feasible solution.
- if (valueAt(0, columns - 1) != 0.0) {
+ if ((valueAt(0, columns - 1) != 0.0) && (qAbs(valueAt(0, columns - 1)) > 0.00001)) {
qWarning() << "QSimplex: No feasible solution!";
clearDataStructures();
return false;
diff --git a/src/gui/graphicsview/qsimplex_p.h b/src/gui/graphicsview/qsimplex_p.h
index 084ad7f936..a5816d1987 100644
--- a/src/gui/graphicsview/qsimplex_p.h
+++ b/src/gui/graphicsview/qsimplex_p.h
@@ -107,7 +107,7 @@ struct QSimplexConstraint
Q_ASSERT(constant > 0 || qFuzzyCompare(1, 1 + constant));
- if ((leftHandSide == constant) || qFuzzyCompare(1000 + leftHandSide, 1000 + constant))
+ if ((leftHandSide == constant) || qAbs(leftHandSide - constant) < 0.00000001)
return true;
switch (ratio) {
diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp
index 4b6fcba384..f3eb7c3fca 100644
--- a/src/gui/image/qbmphandler.cpp
+++ b/src/gui/image/qbmphandler.cpp
@@ -52,9 +52,9 @@ QT_BEGIN_NAMESPACE
static void swapPixel01(QImage *image) // 1-bpp: swap 0 and 1 pixels
{
int i;
- if (image->depth() == 1 && image->numColors() == 2) {
+ if (image->depth() == 1 && image->colorCount() == 2) {
register uint *p = (uint *)image->bits();
- int nbytes = image->numBytes();
+ int nbytes = image->byteCount();
for (i=0; i<nbytes/4; i++) {
*p = ~*p;
p++;
@@ -246,7 +246,7 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
if (depth != 32) {
ncols = bi.biClrUsed ? bi.biClrUsed : 1 << nbits;
- image.setNumColors(ncols);
+ image.setColorCount(ncols);
}
image.setDotsPerMeterX(bi.biXPelsPerMeter);
@@ -526,7 +526,7 @@ bool qt_write_dib(QDataStream &s, QImage image)
if (!d->isWritable())
return false;
- if (image.depth() == 8 && image.numColors() <= 16) {
+ if (image.depth() == 8 && image.colorCount() <= 16) {
bpl_bmp = (((bpl+1)/2+3)/4)*4;
nbits = 4;
} else if (image.depth() == 32) {
@@ -554,23 +554,23 @@ bool qt_write_dib(QDataStream &s, QImage image)
bi.biXPelsPerMeter = image.dotsPerMeterX() ? image.dotsPerMeterX()
: 2834; // 72 dpi default
bi.biYPelsPerMeter = image.dotsPerMeterY() ? image.dotsPerMeterY() : 2834;
- bi.biClrUsed = image.numColors();
- bi.biClrImportant = image.numColors();
+ bi.biClrUsed = image.colorCount();
+ bi.biClrImportant = image.colorCount();
s << bi; // write info header
if (s.status() != QDataStream::Ok)
return false;
if (image.depth() != 32) { // write color table
- uchar *color_table = new uchar[4*image.numColors()];
+ uchar *color_table = new uchar[4*image.colorCount()];
uchar *rgb = color_table;
QVector<QRgb> c = image.colorTable();
- for (int i=0; i<image.numColors(); i++) {
+ for (int i=0; i<image.colorCount(); i++) {
*rgb++ = qBlue (c[i]);
*rgb++ = qGreen(c[i]);
*rgb++ = qRed (c[i]);
*rgb++ = 0;
}
- if (d->write((char *)color_table, 4*image.numColors()) == -1) {
+ if (d->write((char *)color_table, 4*image.colorCount()) == -1) {
delete [] color_table;
return false;
}
@@ -754,7 +754,7 @@ bool QBmpHandler::write(const QImage &img)
int bpl = image.bytesPerLine();
// Code partially repeated in qt_write_dib
- if (image.depth() == 8 && image.numColors() <= 16) {
+ if (image.depth() == 8 && image.colorCount() <= 16) {
bpl_bmp = (((bpl+1)/2+3)/4)*4;
} else if (image.depth() == 32) {
bpl_bmp = ((image.width()*24+31)/32)*4;
@@ -771,7 +771,7 @@ bool QBmpHandler::write(const QImage &img)
// write file header
bf.bfReserved1 = 0;
bf.bfReserved2 = 0;
- bf.bfOffBits = BMP_FILEHDR_SIZE + BMP_WIN + image.numColors() * 4;
+ bf.bfOffBits = BMP_FILEHDR_SIZE + BMP_WIN + image.colorCount() * 4;
bf.bfSize = bf.bfOffBits + bpl_bmp*image.height();
s << bf;
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 21ca1e366d..6d96d7a6cb 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -449,7 +449,7 @@ bool QImageData::checkForAlphaPixels() const
to the pixel() function. The pixel() function returns the color
as a QRgb value indepedent of the image's format.
- In case of monochrome and 8-bit images, the numColors() and
+ In case of monochrome and 8-bit images, the colorCount() and
colorTable() functions provide information about the color
components used to store the image data: The colorTable() function
returns the image's entire color table. To obtain a single entry,
@@ -484,7 +484,7 @@ bool QImageData::checkForAlphaPixels() const
depths are 1 (monochrome), 8 and 32 (for more information see the
\l {QImage#Image Formats}{Image Formats} section).
- The format(), bytesPerLine(), and numBytes() functions provide
+ The format(), bytesPerLine(), and byteCount() functions provide
low-level information about the data stored in the image.
The cacheKey() function returns a number that uniquely
@@ -623,7 +623,7 @@ bool QImageData::checkForAlphaPixels() const
\o Sets the color table used to translate color indexes. Only
monochrome and 8-bit formats.
\row
- \o setNumColors()
+ \o setColorCount()
\o Resizes the color table. Only monochrome and 8-bit formats.
\endtable
@@ -906,7 +906,7 @@ QImageData *QImageData::create(uchar *data, int width, int height, int bpl, QIm
If \a format is an indexed color format, the image color table is
initially empty and must be sufficiently expanded with
- setNumColors() or setColorTable() before the image is used.
+ setColorCount() or setColorTable() before the image is used.
*/
QImage::QImage(uchar* data, int width, int height, Format format)
: QPaintDevice()
@@ -928,7 +928,7 @@ QImage::QImage(uchar* data, int width, int height, Format format)
If \a format is an indexed color format, the image color table is
initially empty and must be sufficiently expanded with
- setNumColors() or setColorTable() before the image is used.
+ setColorCount() or setColorTable() before the image is used.
Unlike the similar QImage constructor that takes a non-const data buffer,
this version will never alter the contents of the buffer. For example,
@@ -954,7 +954,7 @@ QImage::QImage(const uchar* data, int width, int height, Format format)
If \a format is an indexed color format, the image color table is
initially empty and must be sufficiently expanded with
- setNumColors() or setColorTable() before the image is used.
+ setColorCount() or setColorTable() before the image is used.
*/
QImage::QImage(uchar *data, int width, int height, int bytesPerLine, Format format)
:QPaintDevice()
@@ -974,7 +974,7 @@ QImage::QImage(uchar *data, int width, int height, int bytesPerLine, Format form
If \a format is an indexed color format, the image color table is
initially empty and must be sufficiently expanded with
- setNumColors() or setColorTable() before the image is used.
+ setColorCount() or setColorTable() before the image is used.
Unlike the similar QImage constructor that takes a non-const data buffer,
this version will never alter the contents of the buffer. For example,
@@ -1126,7 +1126,7 @@ QImage::QImage(const QImage &image)
Use the constructor that accepts a width, a height and a format
(i.e. specifying the depth and bit order), in combination with the
- setNumColors() function, instead.
+ setColorCount() function, instead.
\oldcode
QImage image(width, height, depth, numColors);
@@ -1135,15 +1135,15 @@ QImage::QImage(const QImage &image)
// For 8 bit images the default number of colors is 256. If
// another number of colors is required it can be specified
- // using the setNumColors() function.
- image.setNumColors(numColors);
+ // using the setColorCount() function.
+ image.setColorCount(numColors);
\endcode
*/
-QImage::QImage(int w, int h, int depth, int numColors, Endian bitOrder)
+QImage::QImage(int w, int h, int depth, int colorCount, Endian bitOrder)
: QPaintDevice()
{
- d = QImageData::create(QSize(w, h), formatFor(depth, bitOrder), numColors);
+ d = QImageData::create(QSize(w, h), formatFor(depth, bitOrder), colorCount);
}
/*!
@@ -1152,7 +1152,7 @@ QImage::QImage(int w, int h, int depth, int numColors, Endian bitOrder)
Use the constructor that accepts a size and a format
(i.e. specifying the depth and bit order), in combination with the
- setNumColors() function, instead.
+ setColorCount() function, instead.
\oldcode
QSize mySize(width, height);
@@ -1163,8 +1163,8 @@ QImage::QImage(int w, int h, int depth, int numColors, Endian bitOrder)
// For 8 bit images the default number of colors is 256. If
// another number of colors is required it can be specified
- // using the setNumColors() function.
- image.setNumColors(numColors);
+ // using the setColorCount() function.
+ image.setColorCount(numColors);
\endcode
*/
QImage::QImage(const QSize& size, int depth, int numColors, Endian bitOrder)
@@ -1232,7 +1232,7 @@ QImage::QImage(uchar* data, int w, int h, int depth, const QRgb* colortable, int
for (int i = 0; i < numColors; ++i)
d->colortable[i] = colortable[i];
} else if (numColors) {
- setNumColors(numColors);
+ setColorCount(numColors);
}
}
@@ -1283,7 +1283,7 @@ QImage::QImage(uchar* data, int w, int h, int depth, int bpl, const QRgb* colort
for (int i = 0; i < numColors; ++i)
d->colortable[i] = colortable[i];
} else if (numColors) {
- setNumColors(numColors);
+ setColorCount(numColors);
}
}
#endif // Q_WS_QWS
@@ -1592,17 +1592,31 @@ int QImage::depth() const
}
/*!
+ \obsolete
\fn int QImage::numColors() const
Returns the size of the color table for the image.
- Notice that numColors() returns 0 for 32-bpp images because these
+ \sa setColorCount()
+*/
+int QImage::numColors() const
+{
+ return d ? d->colortable.size() : 0;
+}
+
+/*!
+ \since 4.6
+ \fn int QImage::colorCount() const
+
+ Returns the size of the color table for the image.
+
+ Notice that colorCount() returns 0 for 32-bpp images because these
images do not use color tables, but instead encode pixel values as
ARGB quadruplets.
- \sa setNumColors(), {QImage#Image Information}{Image Information}
+ \sa setColorCount(), {QImage#Image Information}{Image Information}
*/
-int QImage::numColors() const
+int QImage::colorCount() const
{
return d ? d->colortable.size() : 0;
}
@@ -1711,7 +1725,7 @@ void QImage::setColorTable(const QVector<QRgb> colors)
Returns a list of the colors contained in the image's color table,
or an empty list if the image does not have a color table
- \sa setColorTable(), numColors(), color()
+ \sa setColorTable(), colorCount(), color()
*/
QVector<QRgb> QImage::colorTable() const
{
@@ -1720,12 +1734,24 @@ QVector<QRgb> QImage::colorTable() const
/*!
+ \obsolete
+ Returns the number of bytes occupied by the image data.
+
+ \sa byteCount()
+*/
+int QImage::numBytes() const
+{
+ return d ? d->nbytes : 0;
+}
+
+/*!
+ \since 4.6
Returns the number of bytes occupied by the image data.
\sa bytesPerLine(), bits(), {QImage#Image Information}{Image
Information}
*/
-int QImage::numBytes() const
+int QImage::byteCount() const
{
return d ? d->nbytes : 0;
}
@@ -1733,7 +1759,7 @@ int QImage::numBytes() const
/*!
Returns the number of bytes per image scanline.
- This is equivalent to numBytes()/ height().
+ This is equivalent to byteCount() / height().
\sa scanLine()
*/
@@ -1756,7 +1782,7 @@ int QImage::bytesPerLine() const
*/
QRgb QImage::color(int i) const
{
- Q_ASSERT(i < numColors());
+ Q_ASSERT(i < colorCount());
return d ? d->colortable.at(i) : QRgb(uint(-1));
}
@@ -1767,9 +1793,9 @@ QRgb QImage::color(int i) const
given to \a colorValue. The color value is an ARGB quadruplet.
If \a index is outside the current size of the color table, it is
- expanded with setNumColors().
+ expanded with setColorCount().
- \sa color(), numColors(), setColorTable(), {QImage#Pixel Manipulation}{Pixel
+ \sa color(), colorCount(), setColorTable(), {QImage#Pixel Manipulation}{Pixel
Manipulation}
*/
void QImage::setColor(int i, QRgb c)
@@ -1787,7 +1813,7 @@ void QImage::setColor(int i, QRgb c)
return;
if (i >= d->colortable.size())
- setNumColors(i+1);
+ setColorCount(i+1);
d->colortable[i] = c;
d->has_alpha_clut |= (qAlpha(c) != 255);
}
@@ -1844,7 +1870,7 @@ const uchar *QImage::scanLine(int i) const
data, thus ensuring that this QImage is the only one using the
current return value.
- \sa scanLine(), numBytes()
+ \sa scanLine(), byteCount()
*/
uchar *QImage::bits()
{
@@ -2025,8 +2051,21 @@ void QImage::invertPixels(InvertMode mode)
#endif
/*!
+ \obsolete
Resizes the color table to contain \a numColors entries.
+ \sa setColorCount()
+*/
+
+void QImage::setNumColors(int numColors)
+{
+ setColorCount(numColors);
+}
+
+/*!
+ \since 4.6
+ Resizes the color table to contain \a colorCount entries.
+
If the color table is expanded, all the extra colors will be set to
transparent (i.e qRgba(0, 0, 0, 0)).
@@ -2034,14 +2073,14 @@ void QImage::invertPixels(InvertMode mode)
have entries for all the pixel/index values present in the image,
otherwise the results are undefined.
- \sa numColors(), colorTable(), setColor(), {QImage#Image
+ \sa colorsCount(), colorTable(), setColor(), {QImage#Image
Transformations}{Image Transformations}
*/
-void QImage::setNumColors(int numColors)
+void QImage::setColorCount(int colorCount)
{
if (!d) {
- qWarning("QImage::setNumColors: null image");
+ qWarning("QImage::setColorCount: null image");
return;
}
@@ -2051,17 +2090,16 @@ void QImage::setNumColors(int numColors)
if (!d)
return;
- if (numColors == d->colortable.size())
+ if (colorCount == d->colortable.size())
return;
- if (numColors <= 0) { // use no color table
+ if (colorCount <= 0) { // use no color table
d->colortable = QVector<QRgb>();
return;
}
int nc = d->colortable.size();
- d->colortable.resize(numColors);
- for (int i = nc; i < numColors; ++i)
+ d->colortable.resize(colorCount);
+ for (int i = nc; i < colorCount; ++i)
d->colortable[i] = 0;
-
}
/*!
@@ -3674,7 +3712,7 @@ QRgb QImage::pixel(int x, int y) const
otherwise the parameter must be a QRgb value.
If \a position is not a valid coordinate pair in the image, or if
- \a index_or_rgb >= numColors() in the case of monochrome and
+ \a index_or_rgb >= colorCount() in the case of monochrome and
8-bit images, the result is undefined.
\warning This function is expensive due to the call of the internal
@@ -3835,7 +3873,7 @@ bool QImage::allGray() const
} else {
if (d->colortable.isEmpty())
return true;
- for (int i = 0; i < numColors(); i++)
+ for (int i = 0; i < colorCount(); i++)
if (!qIsGray(d->colortable.at(i)))
return false;
}
@@ -3862,7 +3900,7 @@ bool QImage::isGrayscale() const
case 16:
return allGray();
case 8: {
- for (int i = 0; i < numColors(); i++)
+ for (int i = 0; i < colorCount(); i++)
if (d->colortable.at(i) != qRgb(i,i,i))
return false;
return true;
@@ -4128,7 +4166,7 @@ QImage QImage::createHeuristicMask(bool clipTight) const
int w = width();
int h = height();
QImage m(w, h, Format_MonoLSB);
- m.setNumColors(2);
+ m.setColorCount(2);
m.setColor(0, QColor(Qt::color0).rgba());
m.setColor(1, QColor(Qt::color1).rgba());
m.fill(0xff);
@@ -5703,7 +5741,7 @@ QImage QImage::alphaChannel() const
int h = d->height;
QImage image(w, h, Format_Indexed8);
- image.setNumColors(256);
+ image.setColorCount(256);
// set up gray scale table.
for (int i=0; i<256; ++i)
@@ -5833,7 +5871,7 @@ static QImage smoothScaled(const QImage &source, int w, int h) {
static QImage rotated90(const QImage &image) {
QImage out(image.height(), image.width(), image.format());
- if (image.numColors() > 0)
+ if (image.colorCount() > 0)
out.setColorTable(image.colorTable());
int w = image.width();
int h = image.height();
@@ -5872,7 +5910,7 @@ static QImage rotated90(const QImage &image) {
break;
default:
for (int y=0; y<h; ++y) {
- if (image.numColors())
+ if (image.colorCount())
for (int x=0; x<w; ++x)
out.setPixel(h-y-1, x, image.pixelIndex(x, y));
else
@@ -5892,7 +5930,7 @@ static QImage rotated180(const QImage &image) {
static QImage rotated270(const QImage &image) {
QImage out(image.height(), image.width(), image.format());
- if (image.numColors() > 0)
+ if (image.colorCount() > 0)
out.setColorTable(image.colorTable());
int w = image.width();
int h = image.height();
@@ -5931,7 +5969,7 @@ static QImage rotated270(const QImage &image) {
break;
default:
for (int y=0; y<h; ++y) {
- if (image.numColors())
+ if (image.colorCount())
for (int x=0; x<w; ++x)
out.setPixel(y, w-x-1, image.pixelIndex(x, y));
else
@@ -6071,16 +6109,16 @@ QImage QImage::transformed(const QTransform &matrix, Qt::TransformationMode mode
if (dImage.d->colortable.size() < 256) {
// colors are left in the color table, so pick that one as transparent
dImage.d->colortable.append(0x0);
- memset(dImage.bits(), dImage.d->colortable.size() - 1, dImage.numBytes());
+ memset(dImage.bits(), dImage.d->colortable.size() - 1, dImage.byteCount());
} else {
- memset(dImage.bits(), 0, dImage.numBytes());
+ memset(dImage.bits(), 0, dImage.byteCount());
}
break;
case 1:
case 16:
case 24:
case 32:
- memset(dImage.bits(), 0x00, dImage.numBytes());
+ memset(dImage.bits(), 0x00, dImage.byteCount());
break;
}
diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h
index 1ac56a7de0..d8809ef114 100644
--- a/src/gui/image/qimage.h
+++ b/src/gui/image/qimage.h
@@ -165,18 +165,21 @@ public:
QRect rect() const;
int depth() const;
- int numColors() const;
+ QT_DEPRECATED int numColors() const;
+ int colorCount() const;
QRgb color(int i) const;
void setColor(int i, QRgb c);
- void setNumColors(int);
+ QT_DEPRECATED void setNumColors(int);
+ void setColorCount(int);
bool allGray() const;
bool isGrayscale() const;
uchar *bits();
const uchar *bits() const;
- int numBytes() const;
+ QT_DEPRECATED int numBytes() const;
+ int byteCount() const;
uchar *scanLine(int);
const uchar *scanLine(int) const;
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index c452b9aa75..985a20b5f1 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -639,13 +639,13 @@ void QPixmap::resize_helper(const QSize &s)
QPixmap pm(QSize(w, h), data ? data->type : QPixmapData::PixmapType);
bool uninit = false;
#if defined(Q_WS_X11)
- QX11PixmapData *x11Data = data->classId() == QPixmapData::X11Class ? static_cast<QX11PixmapData*>(data.data()) : 0;
+ QX11PixmapData *x11Data = data && data->classId() == QPixmapData::X11Class ? static_cast<QX11PixmapData*>(data.data()) : 0;
if (x11Data) {
pm.x11SetScreen(x11Data->xinfo.screen());
uninit = x11Data->flags & QX11PixmapData::Uninitialized;
}
#elif defined(Q_WS_MAC)
- QMacPixmapData *macData = data->classId() == QPixmapData::MacClass ? static_cast<QMacPixmapData*>(data.data()) : 0;
+ QMacPixmapData *macData = data && data->classId() == QPixmapData::MacClass ? static_cast<QMacPixmapData*>(data.data()) : 0;
if (macData)
uninit = macData->uninit;
#endif
@@ -2150,6 +2150,13 @@ QPixmapData* QPixmap::pixmapData() const
*/
/*! \fn int QPixmap::numCols() const
+ \obsolete
+ \internal
+ \sa colorCount()
+*/
+
+/*! \fn int QPixmap::colorCount() const
+ \since 4.6
\internal
*/
diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h
index d11bd03565..d95b4eead8 100644
--- a/src/gui/image/qpixmap.h
+++ b/src/gui/image/qpixmap.h
@@ -185,7 +185,8 @@ public:
const uchar *qwsBits() const;
int qwsBytesPerLine() const;
QRgb *clut() const;
- int numCols() const;
+ QT_DEPRECATED int numCols() const;
+ int colorCount() const;
#elif defined(Q_WS_MAC)
Qt::HANDLE macQDHandle() const;
Qt::HANDLE macQDAlphaHandle() const;
diff --git a/src/gui/image/qpixmap_mac.cpp b/src/gui/image/qpixmap_mac.cpp
index 9209d458aa..6175931f80 100644
--- a/src/gui/image/qpixmap_mac.cpp
+++ b/src/gui/image/qpixmap_mac.cpp
@@ -248,7 +248,7 @@ void QMacPixmapData::fromImage(const QImage &img,
} else if ((flags & Qt::ColorMode_Mask) == Qt::ColorOnly) {
conv8 = d == 1; // native depth wanted
} else if (d == 1) {
- if (image.numColors() == 2) {
+ if (image.colorCount() == 2) {
QRgb c0 = image.color(0); // Auto: convert to best
QRgb c1 = image.color(1);
conv8 = qMin(c0,c1) != qRgb(0,0,0) || qMax(c0,c1) != qRgb(255,255,255);
@@ -339,7 +339,7 @@ void QMacPixmapData::fromImage(const QImage &img,
bool alphamap = image.depth() == 32;
if (sfmt == QImage::Format_Indexed8) {
const QVector<QRgb> rgb = image.colorTable();
- for (int i = 0, count = image.numColors(); i < count; ++i) {
+ for (int i = 0, count = image.colorCount(); i < count; ++i) {
const int alpha = qAlpha(rgb[i]);
if (alpha != 0xff) {
alphamap = true;
@@ -355,13 +355,13 @@ void QMacPixmapData::fromImage(const QImage &img,
int get_index(QImage * qi,QRgb mycol)
{
int loopc;
- for(loopc=0;loopc<qi->numColors();loopc++) {
+ for(loopc=0;loopc<qi->colorCount();loopc++) {
if(qi->color(loopc)==mycol)
return loopc;
}
- qi->setNumColors(qi->numColors()+1);
- qi->setColor(qi->numColors(),mycol);
- return qi->numColors();
+ qi->setColorCount(qi->colorCount()+1);
+ qi->setColor(qi->colorCount(),mycol);
+ return qi->colorCount();
}
QImage QMacPixmapData::toImage() const
@@ -376,7 +376,7 @@ QImage QMacPixmapData::toImage() const
const uint sbpr = bytesPerRow;
if (format == QImage::Format_MonoLSB) {
image.fill(0);
- image.setNumColors(2);
+ image.setColorCount(2);
image.setColor(0, QColor(Qt::color0).rgba());
image.setColor(1, QColor(Qt::color1).rgba());
for (int y = 0; y < h; ++y) {
diff --git a/src/gui/image/qpixmap_qws.cpp b/src/gui/image/qpixmap_qws.cpp
index a8516a5147..69626edb83 100644
--- a/src/gui/image/qpixmap_qws.cpp
+++ b/src/gui/image/qpixmap_qws.cpp
@@ -124,9 +124,14 @@ QRgb* QPixmap::clut() const
int QPixmap::numCols() const
{
+ return colorCount();
+}
+
+int QPixmap::colorCount() const
+{
if (data && data->classId() == QPixmapData::RasterClass) {
const QRasterPixmapData *d = static_cast<const QRasterPixmapData*>(data.data());
- return d->image.numColors();
+ return d->image.colorCount();
}
return 0;
diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp
index fc76dc3434..1b01e6f3bb 100644
--- a/src/gui/image/qpixmap_raster.cpp
+++ b/src/gui/image/qpixmap_raster.cpp
@@ -119,7 +119,7 @@ void QRasterPixmapData::resize(int width, int height)
is_null = (w <= 0 || h <= 0);
if (pixelType() == BitmapType && !image.isNull()) {
- image.setNumColors(2);
+ image.setColorCount(2);
image.setColor(0, QColor(Qt::color0).rgba());
image.setColor(1, QColor(Qt::color1).rgba());
}
diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp
index cd8a4d4ded..f7a880c7d7 100644
--- a/src/gui/image/qpixmap_s60.cpp
+++ b/src/gui/image/qpixmap_s60.cpp
@@ -443,7 +443,7 @@ void QS60PixmapData::fromSymbianBitmap(CFbsBitmap* bitmap)
// Create default palette if needed
if (cfbsBitmap->DisplayMode() == EGray2) {
- image.setNumColors(2);
+ image.setColorCount(2);
image.setColor(0, QColor(Qt::color0).rgba());
image.setColor(1, QColor(Qt::color1).rgba());
@@ -526,13 +526,13 @@ void QS60PixmapData::fromImage(const QImage &img, Qt::ImageConversionFlags flags
const uchar *sptr = const_cast<const QImage &>(sourceImage).bits();
symbianBitmapDataAccess->beginDataAccess(cfbsBitmap);
uchar *dptr = (uchar*)cfbsBitmap->DataAddress();
- Mem::Copy(dptr, sptr, sourceImage.numBytes());
+ Mem::Copy(dptr, sptr, sourceImage.byteCount());
symbianBitmapDataAccess->endDataAccess(cfbsBitmap);
UPDATE_BUFFER();
if (destFormat == QImage::Format_MonoLSB) {
- image.setNumColors(2);
+ image.setColorCount(2);
image.setColor(0, QColor(Qt::color0).rgba());
image.setColor(1, QColor(Qt::color1).rgba());
} else {
@@ -835,7 +835,7 @@ void* QS60PixmapData::toNativeType(NativeType type)
symbianBitmapDataAccess->beginDataAccess(newBitmap);
uchar *dptr = (uchar*)newBitmap->DataAddress();
- Mem::Copy(dptr, sptr, source.numBytes());
+ Mem::Copy(dptr, sptr, source.byteCount());
symbianBitmapDataAccess->endDataAccess(newBitmap);
diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp
index c735031415..3f297dfef2 100644
--- a/src/gui/image/qpixmap_x11.cpp
+++ b/src/gui/image/qpixmap_x11.cpp
@@ -464,7 +464,7 @@ void QX11PixmapData::fromImage(const QImage &img,
} else if ((flags & Qt::ColorMode_Mask) == Qt::ColorOnly) {
conv8 = (d == 1); // native depth wanted
} else if (d == 1) {
- if (image.numColors() == 2) {
+ if (image.colorCount() == 2) {
QRgb c0 = image.color(0); // Auto: convert to best
QRgb c1 = image.color(1);
conv8 = qMin(c0,c1) != qRgb(0,0,0) || qMax(c0,c1) != qRgb(255,255,255);
@@ -489,7 +489,7 @@ void QX11PixmapData::fromImage(const QImage &img,
Visual *visual = (Visual *)xinfo.visual();
XImage *xi = 0;
bool trucol = (visual->c_class >= TrueColor);
- int nbytes = image.numBytes();
+ int nbytes = image.byteCount();
uchar *newbits= 0;
#ifndef QT_NO_XRENDER
@@ -631,7 +631,7 @@ void QX11PixmapData::fromImage(const QImage &img,
if (d8) { // setup pixel translation
QVector<QRgb> ctable = cimage.colorTable();
- for (int i=0; i < cimage.numColors(); i++) {
+ for (int i=0; i < cimage.colorCount(); i++) {
int r = qRed (ctable[i]);
int g = qGreen(ctable[i]);
int b = qBlue (ctable[i]);
@@ -957,8 +957,8 @@ void QX11PixmapData::fromImage(const QImage &img,
if (d == 8 && !trucol) { // 8 bit pixmap
int pop[256]; // pixel popularity
- if (image.numColors() == 0)
- image.setNumColors(1);
+ if (image.colorCount() == 0)
+ image.setColorCount(1);
const QImage &cimage = image;
memset(pop, 0, sizeof(int)*256); // reset popularity array
@@ -988,11 +988,11 @@ void QX11PixmapData::fromImage(const QImage &img,
int mindist;
};
int ncols = 0;
- for (int i=0; i< cimage.numColors(); i++) { // compute number of colors
+ for (int i=0; i< cimage.colorCount(); i++) { // compute number of colors
if (pop[i] > 0)
ncols++;
}
- for (int i = cimage.numColors(); i < 256; i++) // ignore out-of-range pixels
+ for (int i = cimage.colorCount(); i < 256; i++) // ignore out-of-range pixels
pop[i] = 0;
// works since we make sure above to have at least
@@ -1651,7 +1651,7 @@ QImage QX11PixmapData::toImage() const
}
if (d == 1) { // bitmap
- image.setNumColors(2);
+ image.setColorCount(2);
image.setColor(0, qRgb(255,255,255));
image.setColor(1, qRgb(0,0,0));
} else if (!trucol) { // pixmap with colormap
@@ -1707,10 +1707,10 @@ QImage QX11PixmapData::toImage() const
int trans;
if (ncols < 256) {
trans = ncols++;
- image.setNumColors(ncols); // create color table
+ image.setColorCount(ncols); // create color table
image.setColor(trans, 0x00000000);
} else {
- image.setNumColors(ncols); // create color table
+ image.setColorCount(ncols); // create color table
// oh dear... no spare "transparent" pixel.
// use first pixel in image (as good as any).
trans = image.scanLine(0)[0];
@@ -1733,7 +1733,7 @@ QImage QX11PixmapData::toImage() const
}
}
} else {
- image.setNumColors(ncols); // create color table
+ image.setColorCount(ncols); // create color table
}
QVector<QColor> colors = QColormap::instance(xinfo.screen()).colormap();
int j = 0;
diff --git a/src/gui/image/qpixmapdata.cpp b/src/gui/image/qpixmapdata.cpp
index 10194e45d3..38f6b5d550 100644
--- a/src/gui/image/qpixmapdata.cpp
+++ b/src/gui/image/qpixmapdata.cpp
@@ -201,7 +201,7 @@ QBitmap QPixmapData::mask() const
if (mask.isNull()) // allocation failed
return QBitmap();
- mask.setNumColors(2);
+ mask.setColorCount(2);
mask.setColor(0, QColor(Qt::color0).rgba());
mask.setColor(1, QColor(Qt::color1).rgba());
diff --git a/src/gui/image/qpixmapdata_p.h b/src/gui/image/qpixmapdata_p.h
index d1bb92a11d..41e29230f1 100644
--- a/src/gui/image/qpixmapdata_p.h
+++ b/src/gui/image/qpixmapdata_p.h
@@ -113,7 +113,8 @@ public:
inline int width() const { return w; }
inline int height() const { return h; }
- inline int numColors() const { return metric(QPaintDevice::PdmNumColors); }
+ QT_DEPRECATED inline int numColors() const { return metric(QPaintDevice::PdmNumColors); }
+ inline int colorCount() const { return metric(QPaintDevice::PdmNumColors); }
inline int depth() const { return d; }
inline bool isNull() const { return is_null; }
diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp
index e50cc8b788..d83ef2c9b2 100644
--- a/src/gui/image/qpixmapfilter.cpp
+++ b/src/gui/image/qpixmapfilter.cpp
@@ -53,6 +53,7 @@
#include "private/qpaintengineex_p.h"
#include "private/qpaintengine_raster_p.h"
+#ifndef QT_NO_GRAPHICSEFFECT
QT_BEGIN_NAMESPACE
class QPixmapFilterPrivate : public QObjectPrivate
@@ -1107,3 +1108,5 @@ void QPixmapDropShadowFilter::draw(QPainter *p,
}
QT_END_NAMESPACE
+
+#endif //QT_NO_GRAPHICSEFFECT
diff --git a/src/gui/image/qpixmapfilter_p.h b/src/gui/image/qpixmapfilter_p.h
index 6a96676c6d..2573fc7bde 100644
--- a/src/gui/image/qpixmapfilter_p.h
+++ b/src/gui/image/qpixmapfilter_p.h
@@ -57,6 +57,7 @@
#include <QtGui/qpixmap.h>
#include <QtGui/qgraphicseffect.h>
+#ifndef QT_NO_GRAPHICSEFFECT
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -191,4 +192,5 @@ QT_END_NAMESPACE
QT_END_HEADER
+#endif //QT_NO_GRAPHICSEFFECT
#endif // QPIXMAPFILTER_H
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index 44d689d80f..14c863b2e3 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -171,7 +171,7 @@ void setup_qt(QImage& image, png_structp png_ptr, png_infop info_ptr, float scre
if (image.isNull())
return;
}
- image.setNumColors(2);
+ image.setColorCount(2);
image.setColor(1, qRgb(0,0,0));
image.setColor(0, qRgb(255,255,255));
} else if (bit_depth == 16 && png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
@@ -199,7 +199,7 @@ void setup_qt(QImage& image, png_structp png_ptr, png_infop info_ptr, float scre
if (image.isNull())
return;
}
- image.setNumColors(ncols);
+ image.setColorCount(ncols);
for (int i=0; i<ncols; i++) {
int c = i*255/(ncols-1);
image.setColor(i, qRgba(c,c,c,0xff));
@@ -230,7 +230,7 @@ void setup_qt(QImage& image, png_structp png_ptr, png_infop info_ptr, float scre
if (image.isNull())
return;
}
- image.setNumColors(info_ptr->num_palette);
+ image.setColorCount(info_ptr->num_palette);
int i = 0;
if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
while (i < info_ptr->num_trans) {
@@ -508,7 +508,7 @@ bool Q_INTERNAL_WIN_NO_THROW QPngHandlerPrivate::readPngImage(QImage *outImage)
// sanity check palette entries
if (color_type == PNG_COLOR_TYPE_PALETTE
&& outImage->format() == QImage::Format_Indexed8) {
- int color_table_size = outImage->numColors();
+ int color_table_size = outImage->colorCount();
for (int y=0; y<(int)height; ++y) {
uchar *p = outImage->scanLine(y);
uchar *end = p + width;
@@ -762,9 +762,9 @@ bool Q_INTERNAL_WIN_NO_THROW QPNGImageWriter::writeImage(const QImage& image_in,
png_colorp palette = 0;
png_bytep copy_trans = 0;
- if (image.numColors()) {
+ if (image.colorCount()) {
// Paletted
- int num_palette = image.numColors();
+ int num_palette = image.colorCount();
palette = new png_color[num_palette];
png_set_PLTE(png_ptr, info_ptr, palette, num_palette);
int* trans = new int[num_palette];
diff --git a/src/gui/image/qppmhandler.cpp b/src/gui/image/qppmhandler.cpp
index 28e4a2ac25..8ec9efbe08 100644
--- a/src/gui/image/qppmhandler.cpp
+++ b/src/gui/image/qppmhandler.cpp
@@ -242,11 +242,11 @@ static bool read_pbm_body(QIODevice *device, char type, int w, int h, int mcc, Q
}
if (nbits == 1) { // bitmap
- outImage->setNumColors(2);
+ outImage->setColorCount(2);
outImage->setColor(0, qRgb(255,255,255)); // white
outImage->setColor(1, qRgb(0,0,0)); // black
} else if (nbits == 8) { // graymap
- outImage->setNumColors(maxc+1);
+ outImage->setColorCount(maxc+1);
for (int i=0; i<=maxc; i++)
outImage->setColor(i, qRgb(i*255/maxc,i*255/maxc,i*255/maxc));
}
@@ -287,7 +287,7 @@ static bool write_pbm_image(QIODevice *out, const QImage &sourceImage, const QBy
}
}
- if (image.depth() == 1 && image.numColors() == 2) {
+ if (image.depth() == 1 && image.colorCount() == 2) {
if (qGray(image.color(0)) < qGray(image.color(1))) {
// 0=dark/black, 1=light/white - invert
image.detach();
diff --git a/src/gui/image/qxbmhandler.cpp b/src/gui/image/qxbmhandler.cpp
index 1c74351ee0..0d76ea0910 100644
--- a/src/gui/image/qxbmhandler.cpp
+++ b/src/gui/image/qxbmhandler.cpp
@@ -135,7 +135,7 @@ static bool read_xbm_body(QIODevice *device, int w, int h, QImage *outImage)
return false;
}
- outImage->setNumColors(2);
+ outImage->setColorCount(2);
outImage->setColor(0, qRgb(255,255,255)); // white
outImage->setColor(1, qRgb(0,0,0)); // black
diff --git a/src/gui/image/qxpmhandler.cpp b/src/gui/image/qxpmhandler.cpp
index 4bdd16eeee..ac4711a66e 100644
--- a/src/gui/image/qxpmhandler.cpp
+++ b/src/gui/image/qxpmhandler.cpp
@@ -895,7 +895,7 @@ static bool read_xpm_body(
if (image.isNull())
return false;
}
- image.setNumColors(ncols);
+ image.setColorCount(ncols);
}
QMap<quint64, int> colorMap;
diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h
index 15310366bd..452aa754ae 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_p.h
+++ b/src/gui/inputmethod/qcoefepinputcontext_p.h
@@ -65,10 +65,10 @@
QT_BEGIN_NAMESPACE
-class Q_GUI_EXPORT QCoeFepInputContext : public QInputContext,
- public MCoeFepAwareTextEditor,
- public MCoeFepAwareTextEditor_Extension1,
- public MObjectProvider
+class QCoeFepInputContext : public QInputContext,
+ public MCoeFepAwareTextEditor,
+ public MCoeFepAwareTextEditor_Extension1,
+ public MObjectProvider
{
Q_OBJECT
@@ -97,6 +97,7 @@ private:
void applyHints(Qt::InputMethodHints hints);
void applyFormat(QList<QInputMethodEvent::Attribute> *attributes);
void queueInputCapabilitiesChanged();
+ bool needsInputPanel();
private Q_SLOTS:
void ensureInputCapabilitiesChanged();
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 3f21bc32a3..25b2313c9d 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -47,6 +47,7 @@
#include <private/qcore_symbian_p.h>
#include <fepitfr.h>
+#include <hal.h>
#include <limits.h>
// You only find these enumerations on SDK 5 onwards, so we need to provide our own
@@ -153,6 +154,44 @@ QString QCoeFepInputContext::language()
}
}
+bool QCoeFepInputContext::needsInputPanel()
+{
+ switch (QSysInfo::s60Version()) {
+ case QSysInfo::SV_S60_3_1:
+ case QSysInfo::SV_S60_3_2:
+ // There are no touch phones for pre-5.0 SDKs.
+ return false;
+#ifdef Q_CC_NOKIAX86
+ default:
+ // For emulator we assume that we need an input panel, since we can't
+ // separate between phone types.
+ return true;
+#else
+ case QSysInfo::SV_S60_5_0: {
+ // For SDK == 5.0, we need phone specific detection, since the HAL API
+ // is no good on most phones. However, all phones at the time of writing use the
+ // input panel, except N97 in landscape mode, but in this mode it refuses to bring
+ // up the panel anyway, so we don't have to care.
+ return true;
+ }
+ default:
+ // For unknown/newer types, we try to use the HAL API.
+ int keyboardEnabled;
+ int keyboardType;
+ int err[2];
+ err[0] = HAL::Get(HAL::EKeyboard, keyboardType);
+ err[1] = HAL::Get(HAL::EKeyboardState, keyboardEnabled);
+ if (err[0] == KErrNone && err[1] == KErrNone
+ && keyboardType != 0 && keyboardEnabled)
+ // Means that we have some sort of keyboard.
+ return false;
+
+ // Fall back to using the input panel.
+ return true;
+#endif // !Q_CC_NOKIAX86
+ }
+}
+
bool QCoeFepInputContext::filterEvent(const QEvent *event)
{
// The CloseSoftwareInputPanel event is not handled here, because the VK will automatically
@@ -174,10 +213,8 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event)
}
}
- // For pre-5.0 SDKs, we don't launch the keyboard.
- if (QSysInfo::s60Version() != QSysInfo::SV_S60_5_0) {
+ if (!needsInputPanel())
return false;
- }
if (event->type() == QEvent::RequestSoftwareInputPanel) {
// Notify S60 that we want the virtual keyboard to show up.
diff --git a/src/gui/itemviews/qitemdelegate.cpp b/src/gui/itemviews/qitemdelegate.cpp
index 3b3036df61..3e00dba9f1 100644
--- a/src/gui/itemviews/qitemdelegate.cpp
+++ b/src/gui/itemviews/qitemdelegate.cpp
@@ -1059,7 +1059,7 @@ QPixmap *QItemDelegate::selected(const QPixmap &pixmap, const QPalette &palette,
painter.end();
QPixmap selected = QPixmap(QPixmap::fromImage(img));
- int n = (img.numBytes() >> 10) + 1;
+ int n = (img.byteCount() >> 10) + 1;
if (QPixmapCache::cacheLimit() < n)
QPixmapCache::setCacheLimit(n);
diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp
index d680af8a7e..15db9a603f 100644
--- a/src/gui/itemviews/qlistview.cpp
+++ b/src/gui/itemviews/qlistview.cpp
@@ -357,7 +357,7 @@ QListView::LayoutMode QListView::layoutMode() const
/*!
\property QListView::spacing
- \brief the space between items in the layout
+ \brief the space around the items in the layout
This property is the size of the empty space that is padded around
an item in the layout.
@@ -972,9 +972,9 @@ void QListView::paintEvent(QPaintEvent *e)
option.rect = visualRect(*it);
if (flow() == TopToBottom)
- option.rect.setWidth(qMin(viewport()->size().width(), option.rect.width()));
+ option.rect.setWidth(qMin(viewport()->size().width() - 2 * d->spacing(), option.rect.width()));
else
- option.rect.setHeight(qMin(viewport()->size().height(), option.rect.height()));
+ option.rect.setHeight(qMin(viewport()->size().height() - 2 * d->spacing(), option.rect.height()));
option.state = state;
if (selections && selections->isSelected(*it))
@@ -1837,14 +1837,14 @@ void QCommonListViewBase::updateHorizontalScrollBar(const QSize &step)
{
horizontalScrollBar()->setSingleStep(step.width() + spacing());
horizontalScrollBar()->setPageStep(viewport()->width());
- horizontalScrollBar()->setRange(0, contentsSize.width() - viewport()->width());
+ horizontalScrollBar()->setRange(0, contentsSize.width() - viewport()->width() - 2 * spacing());
}
void QCommonListViewBase::updateVerticalScrollBar(const QSize &step)
{
verticalScrollBar()->setSingleStep(step.height() + spacing());
verticalScrollBar()->setPageStep(viewport()->height());
- verticalScrollBar()->setRange(0, contentsSize.height() - viewport()->height());
+ verticalScrollBar()->setRange(0, contentsSize.height() - viewport()->height() - 2 * spacing());
}
void QCommonListViewBase::scrollContentsBy(int dx, int dy, bool /*scrollElasticBand*/)
diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
index 3856293afd..a3cbc0d337 100644
--- a/src/gui/itemviews/qtreeview.cpp
+++ b/src/gui/itemviews/qtreeview.cpp
@@ -2113,6 +2113,12 @@ QModelIndex QTreeView::moveCursor(CursorAction cursorAction, Qt::KeyboardModifie
if (vi < 0)
vi = qMax(0, d->viewIndex(current));
+ if (isRightToLeft()) {
+ if (cursorAction == MoveRight)
+ cursorAction = MoveLeft;
+ else if (cursorAction == MoveLeft)
+ cursorAction = MoveRight;
+ }
switch (cursorAction) {
case MoveNext:
case MoveDown:
diff --git a/src/gui/itemviews/qtreeview_p.h b/src/gui/itemviews/qtreeview_p.h
index aad5837599..d58dea34c2 100644
--- a/src/gui/itemviews/qtreeview_p.h
+++ b/src/gui/itemviews/qtreeview_p.h
@@ -105,7 +105,7 @@ public:
int top() const { return startValue().toInt(); }
QRect rect() const { QRect rect = viewport->rect(); rect.moveTop(top()); return rect; }
void updateCurrentValue(const QVariant &) { viewport->update(rect()); }
- void updateState(State, State state) { if (state == Stopped) before = after = QPixmap(); }
+ void updateState(State state, State) { if (state == Stopped) before = after = QPixmap(); }
} animatedOperation;
void prepareAnimatedOperation(int item, QVariantAnimation::Direction d);
void beginAnimatedOperation();
diff --git a/src/gui/kernel/qaction.cpp b/src/gui/kernel/qaction.cpp
index 5f5650f6b4..6f3cbafaf2 100644
--- a/src/gui/kernel/qaction.cpp
+++ b/src/gui/kernel/qaction.cpp
@@ -286,7 +286,7 @@ void QActionPrivate::setShortcutEnabled(bool enable, QShortcutMap &map)
Actions with a softkey role defined are only visible in the softkey bar when the widget containing
the action has focus. If no widget currently has focus, the softkey framework will traverse up the
- widget parent heirarchy looking for a widget containing softkey actions.
+ widget parent hierarchy looking for a widget containing softkey actions.
*/
/*!
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index 84e0d506fc..84da56e5b9 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -104,6 +104,7 @@
#include "qdir.h"
#include "qdebug.h"
#include "qtimer.h"
+#include "qurl.h"
#include "private/qmacinputcontext_p.h"
#include "private/qpaintengine_mac_p.h"
#include "private/qcursor_p.h"
@@ -966,7 +967,8 @@ struct QMacAppleEventTypeSpec {
AEEventID mac_id;
} app_apple_events[] = {
{ kCoreEventClass, kAEQuitApplication },
- { kCoreEventClass, kAEOpenDocuments }
+ { kCoreEventClass, kAEOpenDocuments },
+ { kInternetEventClass, kAEGetURL },
};
#ifndef QT_MAC_USE_COCOA
@@ -1201,7 +1203,7 @@ void qt_init(QApplicationPrivate *priv, int)
app_proc_ae_handlerUPP = AEEventHandlerUPP(QApplicationPrivate::globalAppleEventProcessor);
for(uint i = 0; i < sizeof(app_apple_events) / sizeof(QMacAppleEventTypeSpec); ++i)
AEInstallEventHandler(app_apple_events[i].mac_class, app_apple_events[i].mac_id,
- app_proc_ae_handlerUPP, SRefCon(qApp), true);
+ app_proc_ae_handlerUPP, SRefCon(qApp), false);
}
if (QApplicationPrivate::app_style) {
@@ -1237,6 +1239,10 @@ void qt_init(QApplicationPrivate *priv, int)
[cocoaApp setMenu:[qtMenuLoader menu]];
[newDelegate setMenuLoader:qtMenuLoader];
[qtMenuLoader release];
+
+ NSAppleEventManager *eventManager = [NSAppleEventManager sharedAppleEventManager];
+ [eventManager setEventHandler:newDelegate andSelector:@selector(getUrl:withReplyEvent:)
+ forEventClass:kInternetEventClass andEventID:kAEGetURL];
}
#endif
// Register for Carbon tablet proximity events on the event monitor target.
@@ -2477,6 +2483,22 @@ OSStatus QApplicationPrivate::globalAppleEventProcessor(const AppleEvent *ae, Ap
default:
break;
}
+ } else if (aeClass == kInternetEventClass) {
+ switch (aeID) {
+ case kAEGetURL: {
+ char urlData[1024];
+ Size actualSize;
+ if (AEGetParamPtr(ae, keyDirectObject, typeChar, 0, urlData,
+ sizeof(urlData) - 1, &actualSize) == noErr) {
+ urlData[actualSize] = 0;
+ QFileOpenEvent ev(QUrl(QString::fromUtf8(urlData)));
+ QApplication::sendSpontaneousEvent(app, &ev);
+ }
+ break;
+ }
+ default:
+ break;
+ }
}
#ifdef DEBUG_EVENTS
qDebug("Qt: internal: %shandled Apple event! %c%c%c%c %c%c%c%c", handled_event ? "(*)" : "",
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index 8df4d081ff..992e4beae5 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -72,7 +72,7 @@
#include <private/qgraphicssystem_qws_p.h>
#endif
#ifdef Q_OS_SYMBIAN
-#include <w32std.h>
+#include <w32std.h>
#endif
QT_BEGIN_NAMESPACE
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 1b0659a186..5578a72564 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -357,6 +357,9 @@ QSymbianControl::~QSymbianControl()
setFocusSafely(false);
S60->appUi()->RemoveFromStack(this);
delete m_longTapDetector;
+
+ if(m_previousEventLongTap)
+ QApplicationPrivate::mouse_buttons = QApplicationPrivate::mouse_buttons & ~Qt::RightButton;
}
void QSymbianControl::setWidget(QWidget *w)
@@ -866,6 +869,11 @@ void QSymbianControl::SizeChanged()
tlwExtra->inTopLevelResize = false;
}
}
+
+ // CCoeControl::SetExtent calls SizeChanged, but does not call
+ // PositionChanged, so we call it here to ensure that the widget's
+ // position is updated.
+ PositionChanged();
}
void QSymbianControl::PositionChanged()
@@ -1255,7 +1263,7 @@ bool QApplicationPrivate::modalState()
void QApplicationPrivate::enterModal_sys(QWidget *widget)
{
if (widget) {
- widget->effectiveWinId()->DrawableWindow()->FadeBehind(ETrue);
+ static_cast<QSymbianControl *>(widget->effectiveWinId())->FadeBehindPopup(ETrue);
// Modal partial screen dialogs (like queries) capture pointer events.
// ### FixMe: Add specialized behaviour for fullscreen modal dialogs
widget->effectiveWinId()->SetGloballyCapturing(ETrue);
@@ -1270,7 +1278,7 @@ void QApplicationPrivate::enterModal_sys(QWidget *widget)
void QApplicationPrivate::leaveModal_sys(QWidget *widget)
{
if (widget) {
- widget->effectiveWinId()->DrawableWindow()->FadeBehind(EFalse);
+ static_cast<QSymbianControl *>(widget->effectiveWinId())->FadeBehindPopup(EFalse);
// ### FixMe: Add specialized behaviour for fullscreen modal dialogs
widget->effectiveWinId()->SetGloballyCapturing(EFalse);
widget->effectiveWinId()->SetPointerCapture(EFalse);
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 387c29b5d1..05e75a2cac 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -832,6 +832,7 @@ void qt_init(QApplicationPrivate *priv, int)
priv->GetGestureInfo = (PtrGetGestureInfo) &TKGetGestureInfo;
priv->GetGestureExtraArgs = (PtrGetGestureExtraArgs) &TKGetGestureExtraArguments;
#elif !defined(Q_WS_WINCE)
+ #if !defined(QT_NO_NATIVE_GESTURES)
priv->GetGestureInfo =
(PtrGetGestureInfo)QLibrary::resolve(QLatin1String("user32"),
"GetGestureInfo");
@@ -847,6 +848,7 @@ void qt_init(QApplicationPrivate *priv, int)
priv->GetGestureConfig =
(PtrGetGestureConfig)QLibrary::resolve(QLatin1String("user32"),
"GetGestureConfig");
+ #endif // QT_NO_NATIVE_GESTURES
priv->BeginPanningFeedback =
(PtrBeginPanningFeedback)QLibrary::resolve(QLatin1String("uxtheme"),
"BeginPanningFeedback");
diff --git a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
index d103cbdc62..37dcc67fe1 100644
--- a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
+++ b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
@@ -83,6 +83,7 @@
#include <private/qt_cocoa_helpers_mac_p.h>
#include <private/qdesktopwidget_mac_p.h>
#include <qevent.h>
+#include <qurl.h>
#include <qapplication.h>
QT_BEGIN_NAMESPACE
@@ -303,5 +304,15 @@ static void cleanupCocoaApplicationDelegate()
[self doesNotRecognizeSelector:invocationSelector];
}
+- (void)getUrl:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent
+{
+ Q_UNUSED(replyEvent);
+
+ NSString *urlString = [[event paramDescriptorForKeyword:keyDirectObject] stringValue];
+ QUrl url(qt_mac_NSStringToQString(urlString));
+ QFileOpenEvent qtEvent(url);
+ qt_sendSpontaneousEvent(qAppInstance(), &qtEvent);
+}
+
@end
#endif
diff --git a/src/gui/kernel/qcocoaapplicationdelegate_mac_p.h b/src/gui/kernel/qcocoaapplicationdelegate_mac_p.h
index 80df6452c7..a137744118 100644
--- a/src/gui/kernel/qcocoaapplicationdelegate_mac_p.h
+++ b/src/gui/kernel/qcocoaapplicationdelegate_mac_p.h
@@ -123,5 +123,6 @@ QT_FORWARD_DECLARE_CLASS(QApplicationPrivate);
- (void)setMenuLoader:(QT_MANGLE_NAMESPACE(QCocoaMenuLoader)*)menuLoader;
- (QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *)menuLoader;
- (void)setReflectionDelegate:(NSObject <NSApplicationDelegate> *)oldDelegate;
+- (void)getUrl:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent;
@end
#endif
diff --git a/src/gui/kernel/qcocoawindowdelegate_mac.mm b/src/gui/kernel/qcocoawindowdelegate_mac.mm
index 803a1b1c83..9fb674e0cf 100644
--- a/src/gui/kernel/qcocoawindowdelegate_mac.mm
+++ b/src/gui/kernel/qcocoawindowdelegate_mac.mm
@@ -307,6 +307,18 @@ static void cleanupCocoaWindowDelegate()
return m_windowHash->value(window);
}
+- (BOOL)windowShouldZoom:(NSWindow *)window toFrame:(NSRect)newFrame
+{
+ Q_UNUSED(newFrame);
+ // saving the current window geometry before the window is maximized
+ QWidget *qwidget = m_windowHash->value(window);
+ if (qwidget->isWindow() && !(qwidget->windowState() & Qt::WindowMaximized)) {
+ QWidgetPrivate *widgetPrivate = qt_widget_private(qwidget);
+ widgetPrivate->topData()->normalGeometry = qwidget->geometry();
+ }
+ return YES;
+}
+
- (NSRect)windowWillUseStandardFrame:(NSWindow *)window defaultFrame:(NSRect)defaultFrame
{
NSRect frameToReturn = defaultFrame;
diff --git a/src/gui/kernel/qcocoawindowdelegate_mac_p.h b/src/gui/kernel/qcocoawindowdelegate_mac_p.h
index 3728002fc4..243ba03a1e 100644
--- a/src/gui/kernel/qcocoawindowdelegate_mac_p.h
+++ b/src/gui/kernel/qcocoawindowdelegate_mac_p.h
@@ -78,6 +78,7 @@ QT_FORWARD_DECLARE_CLASS(QWidgetData)
- (void)windowDidResignKey:(NSNotification*)notification;
- (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu;
- (BOOL)window:(NSWindow *)window shouldDragDocumentWithEvent:(NSEvent *)event from:(NSPoint)dragImageLocation withPasteboard:(NSPasteboard *)pasteboard;
+- (BOOL)windowShouldZoom:(NSWindow *)window toFrame:(NSRect)newFrame;
@end
@protocol NSDrawerDelegate <NSObject>
diff --git a/src/gui/kernel/qcursor_win.cpp b/src/gui/kernel/qcursor_win.cpp
index 26cde1afcd..a4e7b1fb83 100644
--- a/src/gui/kernel/qcursor_win.cpp
+++ b/src/gui/kernel/qcursor_win.cpp
@@ -153,8 +153,8 @@ static HCURSOR create32BitCursor(const QPixmap &pixmap, int hx, int hy)
bool invb, invm;
bbits = pixmap.toImage().convertToFormat(QImage::Format_Mono);
mbits = pixmap.toImage().convertToFormat(QImage::Format_Mono);
- invb = bbits.numColors() > 1 && qGray(bbits.color(0)) < qGray(bbits.color(1));
- invm = mbits.numColors() > 1 && qGray(mbits.color(0)) < qGray(mbits.color(1));
+ invb = bbits.colorCount() > 1 && qGray(bbits.color(0)) < qGray(bbits.color(1));
+ invm = mbits.colorCount() > 1 && qGray(mbits.color(0)) < qGray(mbits.color(1));
int sysW = GetSystemMetrics(SM_CXCURSOR);
int sysH = GetSystemMetrics(SM_CYCURSOR);
@@ -396,8 +396,8 @@ void QCursorData::update()
} else {
bbits = bm->toImage().convertToFormat(QImage::Format_Mono);
mbits = bmm->toImage().convertToFormat(QImage::Format_Mono);
- invb = bbits.numColors() > 1 && qGray(bbits.color(0)) < qGray(bbits.color(1));
- invm = mbits.numColors() > 1 && qGray(mbits.color(0)) < qGray(mbits.color(1));
+ invb = bbits.colorCount() > 1 && qGray(bbits.color(0)) < qGray(bbits.color(1));
+ invm = mbits.colorCount() > 1 && qGray(mbits.color(0)) < qGray(mbits.color(1));
}
int n = qMax(1, bbits.width() / 8);
int h = bbits.height();
diff --git a/src/gui/kernel/qdesktopwidget_mac.mm b/src/gui/kernel/qdesktopwidget_mac.mm
index 88dc17377b..c2d05d71bf 100644
--- a/src/gui/kernel/qdesktopwidget_mac.mm
+++ b/src/gui/kernel/qdesktopwidget_mac.mm
@@ -136,16 +136,19 @@ void QDesktopWidgetImplementation::onResize()
screenRects.clear();
availableRects.clear();
NSRect primaryRect = [[displays objectAtIndex:0] frame];
- for (int i = 0; i<screenCount; i++) {
- NSRect r = [[displays objectAtIndex:i] frame];
- const int flippedY = - r.origin.y + // account for position offset and
+ for (int i = 0; i<screenCount; i++) {
+ NSRect r = [[displays objectAtIndex:i] frame];
+ int flippedY = - r.origin.y + // account for position offset and
primaryRect.size.height - r.size.height; // height difference.
screenRects.append(QRectF(r.origin.x, flippedY,
r.size.width, r.size.height));
- r = [[displays objectAtIndex:i] visibleFrame];
+
+ r = [[displays objectAtIndex:i] visibleFrame];
+ flippedY = - r.origin.y + // account for position offset and
+ primaryRect.size.height - r.size.height; // height difference.
availableRects.append(QRectF(r.origin.x, flippedY,
r.size.width, r.size.height));
- }
+ }
}
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index ad68aea420..ff97405ea8 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -2976,13 +2976,13 @@ QShowEvent::~QShowEvent()
/*!
\class QFileOpenEvent
\brief The QFileOpenEvent class provides an event that will be
- sent when there is a request to open a file.
+ sent when there is a request to open a file or a URL.
\ingroup events
File open events will be sent to the QApplication::instance()
- when the operating system requests that a file be opened. This is
- a high-level event that can be caused by different user actions
+ when the operating system requests that a file or URL should be opened.
+ This is a high-level event that can be caused by different user actions
depending on the user's desktop environment; for example, double
clicking on an file icon in the Finder on Mac OS X.
@@ -2999,12 +2999,27 @@ QShowEvent::~QShowEvent()
*/
QFileOpenEvent::QFileOpenEvent(const QString &file)
: QEvent(FileOpen), f(file)
-{}
+{
+ d = reinterpret_cast<QEventPrivate *>(new QFileOpenEventPrivate(QUrl::fromLocalFile(file)));
+}
+
+/*!
+ \internal
+
+ Constructs a file open event for the given \a url.
+*/
+QFileOpenEvent::QFileOpenEvent(const QUrl &url)
+ : QEvent(FileOpen)
+{
+ d = reinterpret_cast<QEventPrivate *>(new QFileOpenEventPrivate(url));
+ f = url.toLocalFile();
+}
/*! \internal
*/
QFileOpenEvent::~QFileOpenEvent()
{
+ delete reinterpret_cast<QFileOpenEventPrivate *>(d);
}
/*!
@@ -3013,6 +3028,16 @@ QFileOpenEvent::~QFileOpenEvent()
Returns the file that is being opened.
*/
+/*!
+ \fn QUrl QFileOpenEvent::url() const
+
+ Returns the url that is being opened.
+*/
+QUrl QFileOpenEvent::url() const
+{
+ return reinterpret_cast<const QFileOpenEventPrivate *>(d)->url;
+}
+
#ifndef QT_NO_TOOLBAR
/*!
\internal
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index b9512fa78d..98392696df 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -638,9 +638,11 @@ class Q_GUI_EXPORT QFileOpenEvent : public QEvent
{
public:
QFileOpenEvent(const QString &file);
+ QFileOpenEvent(const QUrl &url);
~QFileOpenEvent();
inline QString file() const { return f; }
+ QUrl url() const;
private:
QString f;
};
diff --git a/src/gui/kernel/qevent_p.h b/src/gui/kernel/qevent_p.h
index 6e6ab01e97..4aaaa8bfc1 100644
--- a/src/gui/kernel/qevent_p.h
+++ b/src/gui/kernel/qevent_p.h
@@ -43,6 +43,7 @@
#define QEVENT_P_H
#include <QtCore/qglobal.h>
+#include <QtCore/qurl.h>
#include <QtGui/qevent.h>
QT_BEGIN_NAMESPACE
@@ -164,6 +165,18 @@ public:
QMap<Qt::GestureType, QWidget *> targetWidgets;
};
+
+class QFileOpenEventPrivate
+{
+public:
+ inline QFileOpenEventPrivate(const QUrl &url)
+ : url(url)
+ {
+ }
+
+ QUrl url;
+};
+
QT_END_NAMESPACE
#endif // QEVENT_P_H
diff --git a/src/gui/kernel/qgesture.cpp b/src/gui/kernel/qgesture.cpp
index 4edf8a947b..e8c2f8af50 100644
--- a/src/gui/kernel/qgesture.cpp
+++ b/src/gui/kernel/qgesture.cpp
@@ -220,15 +220,6 @@ QGesture::GestureCancelPolicy QGesture::gestureCancelPolicy() const
*/
/*!
- \property QPanGesture::totalOffset
- \brief the total offset from the first input position to the current input
- position
-
- The total offset measures the total change in position of the user's input
- covered by the gesture on the input device.
-*/
-
-/*!
\property QPanGesture::lastOffset
\brief the last offset recorded for this gesture
@@ -667,4 +658,70 @@ void QSwipeGesture::setSwipeAngle(qreal value)
d_func()->swipeAngle = value;
}
+/*!
+ \class QTapGesture
+ \since 4.6
+ \brief The QTapGesture class describes a tap gesture made by the user.
+ \ingroup gestures
+
+ \sa {Gestures Programming}, QPanGesture, QPinchGesture
+*/
+
+/*!
+ \property QTapGesture::position
+ \brief the position of the tap
+*/
+
+/*!
+ \internal
+*/
+QTapGesture::QTapGesture(QObject *parent)
+ : QGesture(*new QTapGesturePrivate, parent)
+{
+ d_func()->gestureType = Qt::TapGesture;
+}
+
+QPointF QTapGesture::position() const
+{
+ return d_func()->position;
+}
+
+void QTapGesture::setPosition(const QPointF &value)
+{
+ d_func()->position = value;
+}
+/*!
+ \class QTapAndHoldGesture
+ \since 4.6
+ \brief The QTapAndHoldGesture class describes a tap-and-hold (aka LongTap)
+ gesture made by the user.
+ \ingroup gestures
+
+ \sa {Gestures Programming}, QPanGesture, QPinchGesture
+*/
+
+/*!
+ \property QTapAndHoldGesture::position
+ \brief the position of the tap
+*/
+
+/*!
+ \internal
+*/
+QTapAndHoldGesture::QTapAndHoldGesture(QObject *parent)
+ : QGesture(*new QTapAndHoldGesturePrivate, parent)
+{
+ d_func()->gestureType = Qt::TapAndHoldGesture;
+}
+
+QPointF QTapAndHoldGesture::position() const
+{
+ return d_func()->position;
+}
+
+void QTapAndHoldGesture::setPosition(const QPointF &value)
+{
+ d_func()->position = value;
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qgesture.h b/src/gui/kernel/qgesture.h
index dd322adac9..f995d7b616 100644
--- a/src/gui/kernel/qgesture.h
+++ b/src/gui/kernel/qgesture.h
@@ -219,6 +219,40 @@ public:
friend class QSwipeGestureRecognizer;
};
+class QTapGesturePrivate;
+class Q_GUI_EXPORT QTapGesture : public QGesture
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QTapGesture)
+
+ Q_PROPERTY(QPointF position READ position WRITE setPosition)
+
+public:
+ QTapGesture(QObject *parent = 0);
+
+ QPointF position() const;
+ void setPosition(const QPointF &pos);
+
+ friend class QTapGestureRecognizer;
+};
+
+class QTapAndHoldGesturePrivate;
+class Q_GUI_EXPORT QTapAndHoldGesture : public QGesture
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QTapAndHoldGesture)
+
+ Q_PROPERTY(QPointF position READ position WRITE setPosition)
+
+public:
+ QTapAndHoldGesture(QObject *parent = 0);
+
+ QPointF position() const;
+ void setPosition(const QPointF &pos);
+
+ friend class QTapAndHoldGestureRecognizer;
+};
+
QT_END_NAMESPACE
Q_DECLARE_METATYPE(QGesture::GestureCancelPolicy)
diff --git a/src/gui/kernel/qgesture_p.h b/src/gui/kernel/qgesture_p.h
index ae2e28715f..2537f47029 100644
--- a/src/gui/kernel/qgesture_p.h
+++ b/src/gui/kernel/qgesture_p.h
@@ -136,13 +136,45 @@ public:
QSwipeGesturePrivate()
: horizontalDirection(QSwipeGesture::NoDirection),
verticalDirection(QSwipeGesture::NoDirection),
- swipeAngle(0)
+ swipeAngle(0),
+ started(false), speed(0)
{
}
QSwipeGesture::SwipeDirection horizontalDirection;
QSwipeGesture::SwipeDirection verticalDirection;
qreal swipeAngle;
+
+ QPoint lastPositions[3];
+ bool started;
+ qreal speed;
+ QTime time;
+};
+
+class QTapGesturePrivate : public QGesturePrivate
+{
+ Q_DECLARE_PUBLIC(QTapGesture)
+
+public:
+ QTapGesturePrivate()
+ {
+ }
+
+ QPointF position;
+};
+
+class QTapAndHoldGesturePrivate : public QGesturePrivate
+{
+ Q_DECLARE_PUBLIC(QTapAndHoldGesture)
+
+public:
+ QTapAndHoldGesturePrivate()
+ : timerId(0)
+ {
+ }
+
+ QPointF position;
+ int timerId;
};
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp
index 628892d4d1..3d4bb8c848 100644
--- a/src/gui/kernel/qgesturemanager.cpp
+++ b/src/gui/kernel/qgesturemanager.cpp
@@ -52,7 +52,7 @@
#ifdef Q_WS_MAC
#include "qmacgesturerecognizer_mac_p.h"
#endif
-#if defined(Q_OS_WIN)
+#if defined(Q_OS_WIN) && !defined(QT_NO_NATIVE_GESTURES)
#include "qwinnativepangesturerecognizer_win_p.h"
#endif
@@ -90,9 +90,15 @@ QGestureManager::QGestureManager(QObject *parent)
#else
registerGestureRecognizer(new QPanGestureRecognizer);
registerGestureRecognizer(new QPinchGestureRecognizer);
+ registerGestureRecognizer(new QSwipeGestureRecognizer);
+ registerGestureRecognizer(new QTapGestureRecognizer);
+#endif
#if defined(Q_OS_WIN)
+ #if !defined(QT_NO_NATIVE_GESTURES)
registerGestureRecognizer(new QWinNativePanGestureRecognizer);
-#endif
+ #endif
+#else
+ registerGestureRecognizer(new QTapAndHoldGestureRecognizer);
#endif
}
@@ -175,8 +181,10 @@ QGesture *QGestureManager::getState(QObject *object, QGestureRecognizer *recogni
return 0;
} else if (QGesture *g = qobject_cast<QGesture *>(object)) {
return g;
+#ifndef QT_NO_GRAPHICSVIEW
} else {
Q_ASSERT(qobject_cast<QGraphicsObject *>(object));
+#endif
}
QList<QGesture *> states =
diff --git a/src/gui/kernel/qlayout.cpp b/src/gui/kernel/qlayout.cpp
index 70cd5a53cb..5d44b3d2a9 100644
--- a/src/gui/kernel/qlayout.cpp
+++ b/src/gui/kernel/qlayout.cpp
@@ -496,6 +496,21 @@ void QLayout::setContentsMargins(int left, int top, int right, int bottom)
}
/*!
+ \since 4.6
+
+ Sets the \a margins to use around the layout.
+
+ By default, QLayout uses the values provided by the style. On
+ most platforms, the margin is 11 pixels in all directions.
+
+ \sa contentsMargins()
+*/
+void QLayout::setContentsMargins(const QMargins &margins)
+{
+ setContentsMargins(margins.left(), margins.top(), margins.right(), margins.bottom());
+}
+
+/*!
\since 4.3
Extracts the left, top, right, and bottom margins used around the
@@ -521,6 +536,23 @@ void QLayout::getContentsMargins(int *left, int *top, int *right, int *bottom) c
}
/*!
+ \since 4.6
+
+ Returns the margins used around the layout.
+
+ By default, QLayout uses the values provided by the style. On
+ most platforms, the margin is 11 pixels in all directions.
+
+ \sa setContentsMargins()
+*/
+QMargins QLayout::contentsMargins() const
+{
+ int left, top, right, bottom;
+ getContentsMargins(&left, &top, &right, &bottom);
+ return QMargins(left, top, right, bottom);
+}
+
+/*!
\since 4.3
Returns the layout's geometry() rectangle, but taking into account the
diff --git a/src/gui/kernel/qlayout.h b/src/gui/kernel/qlayout.h
index 83cbab6cdb..2f302944e1 100644
--- a/src/gui/kernel/qlayout.h
+++ b/src/gui/kernel/qlayout.h
@@ -46,6 +46,7 @@
#include <QtGui/qlayoutitem.h>
#include <QtGui/qsizepolicy.h>
#include <QtCore/qrect.h>
+#include <QtCore/qmargins.h>
#include <limits.h>
@@ -122,7 +123,9 @@ public:
void setSpacing(int);
void setContentsMargins(int left, int top, int right, int bottom);
+ void setContentsMargins(const QMargins &margins);
void getContentsMargins(int *left, int *top, int *right, int *bottom) const;
+ QMargins contentsMargins() const;
QRect contentsRect() const;
bool setAlignment(QWidget *w, Qt::Alignment alignment);
diff --git a/src/gui/kernel/qmacgesturerecognizer_mac.mm b/src/gui/kernel/qmacgesturerecognizer_mac.mm
index d842322a24..f142d71a0d 100644
--- a/src/gui/kernel/qmacgesturerecognizer_mac.mm
+++ b/src/gui/kernel/qmacgesturerecognizer_mac.mm
@@ -120,7 +120,7 @@ QMacPinchGestureRecognizer::recognize(QGesture *gesture, QObject *obj, QEvent *e
case QNativeGestureEvent::Zoom:
g->setLastScaleFactor(g->scaleFactor());
g->setLastRotationAngle(g->rotationAngle());
- g->setScaleFactor(g->scaleFactor() + ev->percentage);
+ g->setScaleFactor(g->scaleFactor() * (1 + ev->percentage));
g->setChangeFlags(QPinchGesture::ScaleFactorChanged);
g->setTotalChangeFlags(g->totalChangeFlags() | g->changeFlags());
return QGestureRecognizer::TriggerGesture | QGestureRecognizer::ConsumeEventHint;
diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp
index 21795b4a52..ecad72f758 100644
--- a/src/gui/kernel/qsoftkeymanager.cpp
+++ b/src/gui/kernel/qsoftkeymanager.cpp
@@ -137,12 +137,14 @@ QAction *QSoftKeyManager::createAction(StandardSoftKey standardKey, QWidget *act
*/
QAction *QSoftKeyManager::createKeyedAction(StandardSoftKey standardKey, Qt::Key key, QWidget *actionWidget)
{
+#ifndef QT_NO_ACTION
QScopedPointer<QAction> action(createAction(standardKey, actionWidget));
connect(action.data(), SIGNAL(triggered()), QSoftKeyManager::instance(), SLOT(sendKeyEvent()));
connect(action.data(), SIGNAL(destroyed(QObject*)), QSoftKeyManager::instance(), SLOT(cleanupHash(QObject*)));
QSoftKeyManager::instance()->d_func()->keyedActions.insert(action.data(), key);
return action.take();
+#endif //QT_NO_ACTION
}
void QSoftKeyManager::cleanupHash(QObject* obj)
@@ -175,6 +177,7 @@ void QSoftKeyManager::updateSoftKeys()
bool QSoftKeyManager::event(QEvent *e)
{
+#ifndef QT_NO_ACTION
if (e->type() == QEvent::UpdateSoftKeys) {
QList<QAction*> softKeys;
QWidget *source = QApplication::focusWidget();
@@ -197,10 +200,10 @@ bool QSoftKeyManager::event(QEvent *e)
} while (source);
QSoftKeyManagerPrivate::softKeySource = source;
- if (source)
- QSoftKeyManagerPrivate::updateSoftKeys_sys(softKeys);
+ QSoftKeyManagerPrivate::updateSoftKeys_sys(softKeys);
return true;
}
+#endif //QT_NO_ACTION
return false;
}
@@ -247,7 +250,10 @@ void QSoftKeyManagerPrivate::updateSoftKeys_sys(const QList<QAction*> &softkeys)
}
}
- Qt::WindowType sourceWindowType = QSoftKeyManagerPrivate::softKeySource->window()->windowType();
+ const Qt::WindowType sourceWindowType = QSoftKeyManagerPrivate::softKeySource
+ ? QSoftKeyManagerPrivate::softKeySource->window()->windowType()
+ : Qt::Widget;
+
if (needsExitButton && sourceWindowType != Qt::Dialog && sourceWindowType != Qt::Popup)
QT_TRAP_THROWING(nativeContainer->SetCommandL(2, EAknSoftkeyExit, qt_QString2TPtrC(QSoftKeyManager::tr("Exit"))));
diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp
index dfd49eb752..6b0441bd8d 100644
--- a/src/gui/kernel/qstandardgestures.cpp
+++ b/src/gui/kernel/qstandardgestures.cpp
@@ -45,6 +45,7 @@
#include "qevent.h"
#include "qwidget.h"
#include "qabstractscrollarea.h"
+#include "qdebug.h"
QT_BEGIN_NAMESPACE
@@ -55,7 +56,7 @@ QPanGestureRecognizer::QPanGestureRecognizer()
QGesture *QPanGestureRecognizer::create(QObject *target)
{
if (target && target->isWidgetType()) {
-#if defined(Q_OS_WIN)
+#if defined(Q_OS_WIN) && !defined(QT_NO_NATIVE_GESTURES)
// for scroll areas on Windows we want to use native gestures instead
if (!qobject_cast<QAbstractScrollArea *>(target->parent()))
static_cast<QWidget *>(target)->setAttribute(Qt::WA_AcceptTouchEvents);
@@ -66,7 +67,9 @@ QGesture *QPanGestureRecognizer::create(QObject *target)
return new QPanGesture;
}
-QGestureRecognizer::Result QPanGestureRecognizer::recognize(QGesture *state, QObject *, QEvent *event)
+QGestureRecognizer::Result QPanGestureRecognizer::recognize(QGesture *state,
+ QObject *,
+ QEvent *event)
{
QPanGesture *q = static_cast<QPanGesture *>(state);
QPanGesturePrivate *d = q->d_func();
@@ -74,7 +77,6 @@ QGestureRecognizer::Result QPanGestureRecognizer::recognize(QGesture *state, QOb
const QTouchEvent *ev = static_cast<const QTouchEvent *>(event);
QGestureRecognizer::Result result;
-
switch (event->type()) {
case QEvent::TouchBegin: {
result = QGestureRecognizer::MayBeGesture;
@@ -155,7 +157,9 @@ QGesture *QPinchGestureRecognizer::create(QObject *target)
return new QPinchGesture;
}
-QGestureRecognizer::Result QPinchGestureRecognizer::recognize(QGesture *state, QObject *, QEvent *event)
+QGestureRecognizer::Result QPinchGestureRecognizer::recognize(QGesture *state,
+ QObject *,
+ QEvent *event)
{
QPinchGesture *q = static_cast<QPinchGesture *>(state);
QPinchGesturePrivate *d = q->d_func();
@@ -199,8 +203,9 @@ QGestureRecognizer::Result QPinchGestureRecognizer::recognize(QGesture *state, Q
d->centerPoint = centerPoint;
d->changeFlags |= QPinchGesture::CenterPointChanged;
- const qreal scaleFactor = QLineF(p1.pos(), p2.pos()).length()
- / QLineF(d->startPosition[0], d->startPosition[1]).length();
+ const qreal scaleFactor =
+ QLineF(p1.screenPos(), p2.screenPos()).length()
+ / QLineF(d->startPosition[0], d->startPosition[1]).length();
if (d->isNewSequence) {
d->lastScaleFactor = scaleFactor;
} else {
@@ -210,7 +215,13 @@ QGestureRecognizer::Result QPinchGestureRecognizer::recognize(QGesture *state, Q
d->totalScaleFactor += d->scaleFactor - d->lastScaleFactor;
d->changeFlags |= QPinchGesture::ScaleFactorChanged;
- const qreal rotationAngle = -line.angle();
+ qreal angle = QLineF(p1.screenPos(), p2.screenPos()).angle();
+ if (angle > 180)
+ angle -= 360;
+ qreal startAngle = QLineF(p1.startScreenPos(), p2.startScreenPos()).angle();
+ if (startAngle > 180)
+ startAngle -= 360;
+ const qreal rotationAngle = startAngle - angle;
if (d->isNewSequence)
d->lastRotationAngle = rotationAngle;
else
@@ -224,7 +235,10 @@ QGestureRecognizer::Result QPinchGestureRecognizer::recognize(QGesture *state, Q
result = QGestureRecognizer::TriggerGesture;
} else {
d->isNewSequence = true;
- result = QGestureRecognizer::MayBeGesture;
+ if (q->state() == Qt::NoGesture)
+ result = QGestureRecognizer::Ignore;
+ else
+ result = QGestureRecognizer::FinishGesture;
}
break;
}
@@ -252,6 +266,299 @@ void QPinchGestureRecognizer::reset(QGesture *state)
d->totalRotationAngle = d->lastRotationAngle = d->rotationAngle = 0;
d->isNewSequence = true;
+ d->startPosition[0] = d->startPosition[1] = QPointF();
+
+ QGestureRecognizer::reset(state);
+}
+
+//
+// QSwipeGestureRecognizer
+//
+
+QSwipeGestureRecognizer::QSwipeGestureRecognizer()
+{
+}
+
+QGesture *QSwipeGestureRecognizer::create(QObject *target)
+{
+ if (target && target->isWidgetType()) {
+ static_cast<QWidget *>(target)->setAttribute(Qt::WA_AcceptTouchEvents);
+ }
+ return new QSwipeGesture;
+}
+
+QGestureRecognizer::Result QSwipeGestureRecognizer::recognize(QGesture *state,
+ QObject *,
+ QEvent *event)
+{
+ QSwipeGesture *q = static_cast<QSwipeGesture *>(state);
+ QSwipeGesturePrivate *d = q->d_func();
+
+ const QTouchEvent *ev = static_cast<const QTouchEvent *>(event);
+
+ QGestureRecognizer::Result result;
+
+ switch (event->type()) {
+ case QEvent::TouchBegin: {
+ d->speed = 1;
+ d->time = QTime::currentTime();
+ d->started = true;
+ result = QGestureRecognizer::MayBeGesture;
+ break;
+ }
+ case QEvent::TouchEnd: {
+ if (q->state() != Qt::NoGesture) {
+ result = QGestureRecognizer::FinishGesture;
+ } else {
+ result = QGestureRecognizer::CancelGesture;
+ }
+ break;
+ }
+ case QEvent::TouchUpdate: {
+ if (!d->started)
+ result = QGestureRecognizer::CancelGesture;
+ else if (ev->touchPoints().size() == 3) {
+ QTouchEvent::TouchPoint p1 = ev->touchPoints().at(0);
+ QTouchEvent::TouchPoint p2 = ev->touchPoints().at(1);
+ QTouchEvent::TouchPoint p3 = ev->touchPoints().at(2);
+
+ if (d->lastPositions[0].isNull()) {
+ d->lastPositions[0] = p1.startScreenPos().toPoint();
+ d->lastPositions[1] = p2.startScreenPos().toPoint();
+ d->lastPositions[2] = p3.startScreenPos().toPoint();
+ }
+ d->hotSpot = p1.screenPos();
+ d->isHotSpotSet = true;
+
+ int xDistance = (p1.screenPos().x() - d->lastPositions[0].x() +
+ p2.screenPos().x() - d->lastPositions[1].x() +
+ p3.screenPos().x() - d->lastPositions[2].x()) / 3;
+ int yDistance = (p1.screenPos().y() - d->lastPositions[0].y() +
+ p2.screenPos().y() - d->lastPositions[1].y() +
+ p3.screenPos().y() - d->lastPositions[2].y()) / 3;
+
+ const int distance = xDistance >= yDistance ? xDistance : yDistance;
+ int elapsedTime = d->time.msecsTo(QTime::currentTime());
+ if (!elapsedTime)
+ elapsedTime = 1;
+ d->speed = 0.9 * d->speed + distance / elapsedTime;
+ d->time = QTime::currentTime();
+ d->swipeAngle = QLineF(p1.startScreenPos(), p1.screenPos()).angle();
+
+ static const int MoveThreshold = 50;
+ if (xDistance > MoveThreshold || yDistance > MoveThreshold) {
+ // measure the distance to check if the direction changed
+ d->lastPositions[0] = p1.screenPos().toPoint();
+ d->lastPositions[1] = p2.screenPos().toPoint();
+ d->lastPositions[2] = p3.screenPos().toPoint();
+ QSwipeGesture::SwipeDirection horizontal =
+ xDistance > 0 ? QSwipeGesture::Right : QSwipeGesture::Left;
+ QSwipeGesture::SwipeDirection vertical =
+ yDistance > 0 ? QSwipeGesture::Down : QSwipeGesture::Up;
+ if (d->verticalDirection == QSwipeGesture::NoDirection)
+ d->verticalDirection = vertical;
+ if (d->horizontalDirection == QSwipeGesture::NoDirection)
+ d->horizontalDirection = horizontal;
+ if (d->verticalDirection != vertical || d->horizontalDirection != horizontal) {
+ // the user has changed the direction!
+ result = QGestureRecognizer::CancelGesture;
+ }
+ result = QGestureRecognizer::TriggerGesture;
+ } else {
+ if (q->state() != Qt::NoGesture)
+ result = QGestureRecognizer::TriggerGesture;
+ else
+ result = QGestureRecognizer::MayBeGesture;
+ }
+ } else if (ev->touchPoints().size() > 3) {
+ result = QGestureRecognizer::CancelGesture;
+ } else { // less than 3 touch points
+ if (d->started && (ev->touchPointStates() & Qt::TouchPointPressed))
+ result = QGestureRecognizer::CancelGesture;
+ else if (d->started)
+ result = QGestureRecognizer::Ignore;
+ else
+ result = QGestureRecognizer::MayBeGesture;
+ }
+ break;
+ }
+ case QEvent::MouseButtonPress:
+ case QEvent::MouseMove:
+ case QEvent::MouseButtonRelease:
+ result = QGestureRecognizer::Ignore;
+ break;
+ default:
+ result = QGestureRecognizer::Ignore;
+ break;
+ }
+ return result;
+}
+
+void QSwipeGestureRecognizer::reset(QGesture *state)
+{
+ QSwipeGesture *q = static_cast<QSwipeGesture *>(state);
+ QSwipeGesturePrivate *d = q->d_func();
+
+ d->verticalDirection = d->horizontalDirection = QSwipeGesture::NoDirection;
+ d->swipeAngle = 0;
+
+ d->lastPositions[0] = d->lastPositions[1] = d->lastPositions[2] = QPoint();
+ d->started = false;
+ d->speed = 0;
+ d->time = QTime();
+
+ QGestureRecognizer::reset(state);
+}
+
+//
+// QTapGestureRecognizer
+//
+
+QTapGestureRecognizer::QTapGestureRecognizer()
+{
+}
+
+QGesture *QTapGestureRecognizer::create(QObject *target)
+{
+ if (target && target->isWidgetType()) {
+ static_cast<QWidget *>(target)->setAttribute(Qt::WA_AcceptTouchEvents);
+ }
+ return new QTapGesture;
+}
+
+QGestureRecognizer::Result QTapGestureRecognizer::recognize(QGesture *state,
+ QObject *,
+ QEvent *event)
+{
+ QTapGesture *q = static_cast<QTapGesture *>(state);
+ QTapGesturePrivate *d = q->d_func();
+
+ const QTouchEvent *ev = static_cast<const QTouchEvent *>(event);
+
+ QGestureRecognizer::Result result = QGestureRecognizer::CancelGesture;
+
+ switch (event->type()) {
+ case QEvent::TouchBegin: {
+ d->position = ev->touchPoints().at(0).pos();
+ result = QGestureRecognizer::TriggerGesture;
+ break;
+ }
+ case QEvent::TouchUpdate:
+ case QEvent::TouchEnd: {
+ if (q->state() != Qt::NoGesture && ev->touchPoints().size() == 1) {
+ QTouchEvent::TouchPoint p = ev->touchPoints().at(0);
+ QPoint delta = p.pos().toPoint() - p.startPos().toPoint();
+ enum { TapRadius = 40 };
+ if (delta.manhattanLength() <= TapRadius) {
+ if (event->type() == QEvent::TouchEnd)
+ result = QGestureRecognizer::FinishGesture;
+ else
+ result = QGestureRecognizer::TriggerGesture;
+ }
+ }
+ break;
+ }
+ case QEvent::MouseButtonPress:
+ case QEvent::MouseMove:
+ case QEvent::MouseButtonRelease:
+ result = QGestureRecognizer::Ignore;
+ break;
+ default:
+ result = QGestureRecognizer::Ignore;
+ break;
+ }
+ return result;
+}
+
+void QTapGestureRecognizer::reset(QGesture *state)
+{
+ QTapGesture *q = static_cast<QTapGesture *>(state);
+ QTapGesturePrivate *d = q->d_func();
+
+ d->position = QPointF();
+
+ QGestureRecognizer::reset(state);
+}
+
+//
+// QTapAndHoldGestureRecognizer
+//
+
+QTapAndHoldGestureRecognizer::QTapAndHoldGestureRecognizer()
+{
+}
+
+QGesture *QTapAndHoldGestureRecognizer::create(QObject *target)
+{
+ if (target && target->isWidgetType()) {
+ static_cast<QWidget *>(target)->setAttribute(Qt::WA_AcceptTouchEvents);
+ }
+ return new QTapAndHoldGesture;
+}
+
+QGestureRecognizer::Result
+QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
+ QEvent *event)
+{
+ QTapAndHoldGesture *q = static_cast<QTapAndHoldGesture *>(state);
+ QTapAndHoldGesturePrivate *d = q->d_func();
+
+ if (object == state && event->type() == QEvent::Timer) {
+ q->killTimer(d->timerId);
+ d->timerId = 0;
+ return QGestureRecognizer::Ignore | QGestureRecognizer::ConsumeEventHint;
+ }
+
+ const QTouchEvent *ev = static_cast<const QTouchEvent *>(event);
+
+ QGestureRecognizer::Result result = QGestureRecognizer::CancelGesture;
+
+ enum { TimerInterval = 2000 };
+ enum { TapRadius = 40 };
+
+ switch (event->type()) {
+ case QEvent::TouchBegin:
+ d->position = ev->touchPoints().at(0).pos();
+ if (d->timerId)
+ q->killTimer(d->timerId);
+ d->timerId = q->startTimer(TimerInterval);
+ result = QGestureRecognizer::TriggerGesture;
+ break;
+ case QEvent::TouchEnd:
+ if (d->timerId)
+ result = QGestureRecognizer::CancelGesture;
+ else
+ result = QGestureRecognizer::FinishGesture;
+ break;
+ case QEvent::TouchUpdate:
+ if (q->state() != Qt::NoGesture && ev->touchPoints().size() == 1) {
+ QTouchEvent::TouchPoint p = ev->touchPoints().at(0);
+ QPoint delta = p.pos().toPoint() - p.startPos().toPoint();
+ if (delta.manhattanLength() <= TapRadius)
+ result = QGestureRecognizer::TriggerGesture;
+ }
+ break;
+ case QEvent::MouseButtonPress:
+ case QEvent::MouseMove:
+ case QEvent::MouseButtonRelease:
+ result = QGestureRecognizer::Ignore;
+ break;
+ default:
+ result = QGestureRecognizer::Ignore;
+ break;
+ }
+ return result;
+}
+
+void QTapAndHoldGestureRecognizer::reset(QGesture *state)
+{
+ QTapAndHoldGesture *q = static_cast<QTapAndHoldGesture *>(state);
+ QTapAndHoldGesturePrivate *d = q->d_func();
+
+ d->position = QPointF();
+ if (d->timerId)
+ q->killTimer(d->timerId);
+ d->timerId = 0;
QGestureRecognizer::reset(state);
}
diff --git a/src/gui/kernel/qstandardgestures_p.h b/src/gui/kernel/qstandardgestures_p.h
index e6f346c830..8fea2bc30d 100644
--- a/src/gui/kernel/qstandardgestures_p.h
+++ b/src/gui/kernel/qstandardgestures_p.h
@@ -74,7 +74,36 @@ public:
QPinchGestureRecognizer();
QGesture *create(QObject *target);
+ QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, QEvent *event);
+ void reset(QGesture *state);
+};
+
+class QSwipeGestureRecognizer : public QGestureRecognizer
+{
+public:
+ QSwipeGestureRecognizer();
+ QGesture *create(QObject *target);
+ QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, QEvent *event);
+ void reset(QGesture *state);
+};
+
+class QTapGestureRecognizer : public QGestureRecognizer
+{
+public:
+ QTapGestureRecognizer();
+
+ QGesture *create(QObject *target);
+ QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, QEvent *event);
+ void reset(QGesture *state);
+};
+
+class QTapAndHoldGestureRecognizer : public QGestureRecognizer
+{
+public:
+ QTapAndHoldGestureRecognizer();
+
+ QGesture *create(QObject *target);
QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, QEvent *event);
void reset(QGesture *state);
};
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index 789d89e385..3405bcfe76 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -73,6 +73,7 @@
#include <akntitle.h> // CAknTitlePane
#include <akncontext.h> // CAknContextPane
#include <eikspane.h> // CEikStatusPane
+#include <aknpopupfader.h> // MAknFadedComponent and TAknPopupFader
#endif
QT_BEGIN_NAMESPACE
@@ -114,7 +115,7 @@ public:
int supportsPremultipliedAlpha : 1;
QApplication::QS60MainApplicationFactory s60ApplicationFactory; // typedef'ed pointer type
static inline void updateScreenSize();
- static inline RWsSession& wsSession();
+ static inline RWsSession& wsSession();
static inline RWindowGroup& windowGroup();
static inline CWsScreenDevice* screenDevice();
static inline CCoeAppUi* appUi();
@@ -140,7 +141,11 @@ public:
};
class QLongTapTimer;
+
class QSymbianControl : public CCoeControl, public QAbstractLongTapObserver
+#ifdef Q_WS_S60
+, public MAknFadedComponent
+#endif
{
public:
DECLARE_TYPE_ID(0x51740000) // Fun fact: the two first values are "Qt" in ASCII.
@@ -165,6 +170,17 @@ public:
void setFocusSafely(bool focus);
+#ifdef Q_WS_S60
+ void FadeBehindPopup(bool fade){ popupFader.FadeBehindPopup( this, this, fade); }
+
+protected: // from MAknFadedComponent
+ TInt CountFadedComponents() {return 1;}
+ CCoeControl* FadedComponent(TInt aIndex) {return this;}
+#else
+ #warning No fallback implementation for QSymbianControl::FadeBehindPopup
+ void FadeBehindPopup(bool /*fade*/){ }
+#endif
+
protected:
void Draw(const TRect& aRect) const;
void SizeChanged();
@@ -189,6 +205,11 @@ private:
bool m_ignoreFocusChanged;
QLongTapTimer* m_longTapDetector;
bool m_previousEventLongTap;
+
+#ifdef Q_WS_S60
+ // Fader object used to fade everything except this menu and the CBA.
+ TAknPopupFader popupFader;
+#endif
};
inline QS60Data::QS60Data()
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 6a72cfa689..f856b135dd 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -230,7 +230,9 @@ QWidgetPrivate::~QWidgetPrivate()
if (extra)
deleteExtra();
+#ifndef QT_NO_GRAPHICSEFFECT
delete graphicsEffect;
+#endif //QT_NO_GRAPHICSEFFECT
}
QWindowSurface *QWidgetPrivate::createDefaultWindowSurface()
@@ -898,7 +900,7 @@ void QWidget::setAutoFillBackground(bool enabled)
passing a \c QAction with a softkey role set on it. When the widget
containing the softkey actions has focus, its softkeys should appear in
the user interface. Softkeys are discovered by traversing the widget
- heirarchy so it is possible to define a single set of softkeys that are
+ hierarchy so it is possible to define a single set of softkeys that are
present at all times by calling addAction() for a given top level widget.
On some platforms, this concept overlaps with \c QMenuBar such that if no
@@ -1793,6 +1795,7 @@ QRegion QWidgetPrivate::clipRegion() const
return r;
}
+#ifndef QT_NO_GRAPHICSEFFECT
void QWidgetPrivate::invalidateGraphicsEffectsRecursively()
{
Q_Q(QWidget);
@@ -1807,6 +1810,7 @@ void QWidgetPrivate::invalidateGraphicsEffectsRecursively()
w = w->parentWidget();
} while (w);
}
+#endif //QT_NO_GRAPHICSEFFECT
void QWidgetPrivate::setDirtyOpaqueRegion()
{
@@ -1814,7 +1818,9 @@ void QWidgetPrivate::setDirtyOpaqueRegion()
dirtyOpaqueChildren = true;
+#ifndef QT_NO_GRAPHICSEFFECT
invalidateGraphicsEffectsRecursively();
+#endif //QT_NO_GRAPHICSEFFECT
if (q->isWindow())
return;
@@ -1963,10 +1969,12 @@ void QWidgetPrivate::clipToEffectiveMask(QRegion &region) const
const QWidget *w = q;
QPoint offset;
+#ifndef QT_NO_GRAPHICSEFFECT
if (graphicsEffect) {
w = q->parentWidget();
offset -= data.crect.topLeft();
}
+#endif //QT_NO_GRAPHICSEFFECT
while (w) {
const QWidgetPrivate *wd = w->d_func();
@@ -2001,11 +2009,13 @@ void QWidgetPrivate::updateIsOpaque()
// hw: todo: only needed if opacity actually changed
setDirtyOpaqueRegion();
+#ifndef QT_NO_GRAPHICSEFFECT
if (graphicsEffect) {
// ### We should probably add QGraphicsEffect::isOpaque at some point.
setOpaque(false);
return;
}
+#endif //QT_NO_GRAPHICSEFFECT
Q_Q(QWidget);
#ifdef Q_WS_X11
@@ -5013,11 +5023,13 @@ void QWidget::render(QPainter *painter, const QPoint &targetOffset,
\sa setGraphicsEffect()
*/
+#ifndef QT_NO_GRAPHICSEFFECT
QGraphicsEffect *QWidget::graphicsEffect() const
{
Q_D(const QWidget);
return d->graphicsEffect;
}
+#endif //QT_NO_GRAPHICSEFFECT
/*!
@@ -5036,6 +5048,7 @@ QGraphicsEffect *QWidget::graphicsEffect() const
\sa graphicsEffect()
*/
+#ifndef QT_NO_GRAPHICSEFFECT
void QWidget::setGraphicsEffect(QGraphicsEffect *effect)
{
Q_D(QWidget);
@@ -5065,6 +5078,7 @@ void QWidget::setGraphicsEffect(QGraphicsEffect *effect)
d->updateIsOpaque();
update();
}
+#endif //QT_NO_GRAPHICSEFFECT
bool QWidgetPrivate::isAboutToShow() const
{
@@ -5157,8 +5171,7 @@ void QWidgetPrivate::render_helper(QPainter *painter, const QPoint &targetOffset
return;
QPixmap pixmap(size);
- if (!(renderFlags & QWidget::DrawWindowBackground)
- || !q->palette().brush(q->backgroundRole()).isOpaque())
+ if (!(renderFlags & QWidget::DrawWindowBackground) || !isOpaque)
pixmap.fill(Qt::transparent);
q->render(&pixmap, QPoint(), toBePainted, renderFlags);
@@ -5211,6 +5224,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
return;
Q_Q(QWidget);
+#ifndef QT_NO_GRAPHICSEFFECT
if (graphicsEffect && graphicsEffect->isEnabled()) {
QGraphicsEffectSource *source = graphicsEffect->d_func()->source;
QWidgetEffectSourcePrivate *sourced = static_cast<QWidgetEffectSourcePrivate *>
@@ -5241,6 +5255,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
return;
}
}
+#endif //QT_NO_GRAFFICSEFFECT
const bool asRoot = flags & DrawAsRoot;
const bool alsoOnScreen = flags & DrawPaintOnScreen;
@@ -5395,7 +5410,6 @@ void QWidgetPrivate::paintSiblingsRecursive(QPaintDevice *pdev, const QObjectLis
QWidgetPrivate *wd = w->d_func();
const QPoint widgetPos(w->data->crect.topLeft());
const bool hasMask = wd->extra && wd->extra->hasMask && !wd->graphicsEffect;
-
if (index > 0) {
QRegion wr(rgn);
if (wd->isOpaque)
@@ -5421,6 +5435,7 @@ void QWidgetPrivate::paintSiblingsRecursive(QPaintDevice *pdev, const QObjectLis
}
}
+#ifndef QT_NO_GRAPHICSEFFECT
QRectF QWidgetEffectSourcePrivate::boundingRect(Qt::CoordinateSystem system) const
{
if (system != Qt::DeviceCoordinates)
@@ -5521,6 +5536,7 @@ QPixmap QWidgetEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QPoint *
m_widget->render(&pixmap, pixmapOffset);
return pixmap;
}
+#endif //QT_NO_GRAPHICSEFFECT
#ifndef QT_NO_GRAPHICSVIEW
/*!
diff --git a/src/gui/kernel/qwidget.h b/src/gui/kernel/qwidget.h
index 05f0069e07..b7c55f9796 100644
--- a/src/gui/kernel/qwidget.h
+++ b/src/gui/kernel/qwidget.h
@@ -351,8 +351,10 @@ public:
const QRegion &sourceRegion = QRegion(),
RenderFlags renderFlags = RenderFlags(DrawWindowBackground | DrawChildren));
+#ifndef QT_NO_GRAPHICSEFFECT
QGraphicsEffect *graphicsEffect() const;
void setGraphicsEffect(QGraphicsEffect *effect);
+#endif //QT_NO_GRAPHICSEFFECT
void grabGesture(Qt::GestureType type, Qt::GestureFlags flags = Qt::GestureFlags());
void ungrabGesture(Qt::GestureType type);
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 9270220d31..75f9a59d28 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -730,6 +730,7 @@ static EventTypeSpec window_events[] = {
{ kEventClassWindow, kEventWindowClose },
{ kEventClassWindow, kEventWindowExpanded },
{ kEventClassWindow, kEventWindowHidden },
+ { kEventClassWindow, kEventWindowZoom },
{ kEventClassWindow, kEventWindowZoomed },
{ kEventClassWindow, kEventWindowCollapsed },
{ kEventClassWindow, kEventWindowToolbarSwitchMode },
@@ -812,6 +813,9 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event,
QShowEvent qse;
QApplication::sendSpontaneousEvent(widget, &qse);
+ } else if(ekind == kEventWindowZoom) {
+ widget->d_func()->topData()->normalGeometry = widget->geometry();
+ handled_event = false;
} else if(ekind == kEventWindowZoomed) {
WindowPartCode windowPart;
GetEventParameter(event, kEventParamWindowPartCode,
@@ -3487,10 +3491,10 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
qt_mac_set_fullscreen_mode(true);
} else {
needShow = isVisible();
- setParent(parentWidget(), d->topData()->savedFlags);
- setGeometry(d->topData()->normalGeometry);
if(!qApp->desktop()->screenNumber(this))
qt_mac_set_fullscreen_mode(false);
+ setParent(parentWidget(), d->topData()->savedFlags);
+ setGeometry(d->topData()->normalGeometry);
d->topData()->normalGeometry.setRect(0, 0, -1, -1);
}
}
@@ -3592,7 +3596,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
[window zoom:window];
#endif
needSendStateChange = oldstate == windowState(); // Zoom didn't change flags.
- } else if(oldstate & Qt::WindowMaximized) {
+ } else if(oldstate & Qt::WindowMaximized && !(oldstate & Qt::WindowFullScreen)) {
#ifndef QT_MAC_USE_COCOA
Point idealSize;
ZoomWindowIdeal(window, inZoomIn, &idealSize);
@@ -3787,7 +3791,7 @@ void QWidgetPrivate::stackUnder_sys(QWidget *w)
/*
Modifies the bounds for a widgets backing HIView during moves and resizes. Also updates the
widget, either by scrolling its contents or repainting, depending on the WA_StaticContents
- and QWidgetPrivate::isOpaque flags.
+ flag
*/
static void qt_mac_update_widget_posisiton(QWidget *q, QRect oldRect, QRect newRect)
{
@@ -3804,8 +3808,8 @@ static void qt_mac_update_widget_posisiton(QWidget *q, QRect oldRect, QRect newR
// Perform a normal (complete repaint) update in some cases:
if (
- // move-by-scroll requires QWidgetPrivate::isOpaque set
- (isMove && q->testAttribute(Qt::WA_OpaquePaintEvent) == false) ||
+ // always repaint on move.
+ (isMove) ||
// limited update on resize requires WA_StaticContents.
(isResize && q->testAttribute(Qt::WA_StaticContents) == false) ||
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index 8b03a85afa..151b90a2d5 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -384,7 +384,9 @@ public:
void setOpaque(bool opaque);
void updateIsTranslucent();
bool paintOnScreen() const;
+#ifndef QT_NO_GRAPHICSEFFECT
void invalidateGraphicsEffectsRecursively();
+#endif //QT_NO_GRAPHICSEFFECT
const QRegion &getOpaqueChildren() const;
void setDirtyOpaqueRegion();
@@ -530,8 +532,10 @@ public:
inline QRect effectiveRectFor(const QRect &rect) const
{
+#ifndef QT_NO_GRAPHICSEFFECT
if (graphicsEffect && graphicsEffect->isEnabled())
return graphicsEffect->boundingRectFor(rect).toAlignedRect();
+#endif //QT_NO_GRAPHICSEFFECT
return rect;
}
@@ -774,6 +778,7 @@ struct QWidgetPaintContext
QPainter *painter;
};
+#ifndef QT_NO_GRAPHICSEFFECT
class QWidgetEffectSourcePrivate : public QGraphicsEffectSourcePrivate
{
public:
@@ -826,6 +831,7 @@ public:
QTransform lastEffectTransform;
bool updateDueToGraphicsEffect;
};
+#endif //QT_NO_GRAPHICSEFFECT
inline QWExtra *QWidgetPrivate::extraData() const
{
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index a6d8ed719b..88cd63d1fc 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -434,8 +434,10 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de
drawableWindow->PointerFilter(EPointerFilterEnterExit
| EPointerFilterMove | EPointerFilterDrag, 0);
- if (q->isVisible() && q->testAttribute(Qt::WA_Mapped))
+ if (q->isVisible() && q->testAttribute(Qt::WA_Mapped)) {
activateSymbianWindow(control.data());
+ control->MakeVisible(true);
+ }
// We wait until the control is fully constructed before calling setWinId, because
// this generates a WinIdChanged event.
diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp
index 22a94b92a8..fde0d45122 100644
--- a/src/gui/kernel/qwidget_win.cpp
+++ b/src/gui/kernel/qwidget_win.cpp
@@ -677,7 +677,11 @@ QPoint QWidget::mapToGlobal(const QPoint &pos) const
QWidget *parentWindow = window();
QWExtra *extra = parentWindow->d_func()->extra;
if (!isVisible() || parentWindow->isMinimized() || !testAttribute(Qt::WA_WState_Created) || !internalWinId()
- || (extra && extra->proxyWidget)) {
+ || (extra
+#ifndef QT_NO_GRAPHICSVIEW
+ && extra->proxyWidget
+#endif //QT_NO_GRAPHICSVIEW
+ )) {
if (extra && extra->topextra && extra->topextra->embedded) {
QPoint pt = mapTo(parentWindow, pos);
POINT p = {pt.x(), pt.y()};
@@ -704,7 +708,11 @@ QPoint QWidget::mapFromGlobal(const QPoint &pos) const
QWidget *parentWindow = window();
QWExtra *extra = parentWindow->d_func()->extra;
if (!isVisible() || parentWindow->isMinimized() || !testAttribute(Qt::WA_WState_Created) || !internalWinId()
- || (extra && extra->proxyWidget)) {
+ || (extra
+#ifndef QT_NO_GRAPHICSVIEW
+ && extra->proxyWidget
+#endif //QT_NO_GRAPHICSVIEW
+ )) {
if (extra && extra->topextra && extra->topextra->embedded) {
POINT p = {pos.x(), pos.y()};
ScreenToClient(parentWindow->effectiveWinId(), &p);
@@ -1331,8 +1339,15 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
if (isResize && !q->testAttribute(Qt::WA_StaticContents) && q->internalWinId())
ValidateRgn(q->internalWinId(), 0);
+#ifdef Q_WS_WINCE
+ // On Windows CE we can't just fiddle around with the window state.
+ // Too much magic in setWindowState.
+ if (isResize && q->isMaximized())
+ q->setWindowState(q->windowState() & ~Qt::WindowMaximized);
+#else
if (isResize)
data.window_state &= ~Qt::WindowMaximized;
+#endif
if (data.window_state & Qt::WindowFullScreen) {
QTLWExtra *top = topData();
@@ -2032,16 +2047,21 @@ void QWidgetPrivate::registerTouchWindow()
void QWidgetPrivate::winSetupGestures()
{
+#if !defined(QT_NO_NATIVE_GESTURES)
Q_Q(QWidget);
- if (!q || !q->isVisible())
+ if (!q || !q->isVisible() || !nativeGesturePanEnabled)
return;
+
QApplicationPrivate *qAppPriv = QApplicationPrivate::instance();
+ if (!qAppPriv->SetGestureConfig)
+ return;
WId winid = q->internalWinId();
bool needh = false;
bool needv = false;
bool singleFingerPanEnabled = false;
+#ifndef QT_NO_SCROLLAREA
if (QAbstractScrollArea *asa = qobject_cast<QAbstractScrollArea*>(q->parent())) {
QScrollBar *hbar = asa->horizontalScrollBar();
QScrollBar *vbar = asa->verticalScrollBar();
@@ -2052,10 +2072,12 @@ void QWidgetPrivate::winSetupGestures()
needv = (vbarpolicy == Qt::ScrollBarAlwaysOn ||
(vbarpolicy == Qt::ScrollBarAsNeeded && vbar->minimum() < vbar->maximum()));
singleFingerPanEnabled = asa->d_func()->singleFingerPanEnabled;
- if (!winid)
+ if (!winid) {
winid = q->winId(); // enforces the native winid on the viewport
+ }
}
- if (winid && qAppPriv->SetGestureConfig) {
+#endif //QT_NO_SCROLLAREA
+ if (winid) {
GESTURECONFIG gc[1];
memset(gc, 0, sizeof(gc));
gc[0].dwID = GID_PAN;
@@ -2075,6 +2097,7 @@ void QWidgetPrivate::winSetupGestures()
qAppPriv->SetGestureConfig(winid, 0, sizeof(gc)/sizeof(gc[0]), gc, sizeof(gc[0]));
}
+#endif
}
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
index 28676da2ea..7461637ba0 100644
--- a/src/gui/kernel/qwidget_x11.cpp
+++ b/src/gui/kernel/qwidget_x11.cpp
@@ -1445,7 +1445,7 @@ void QWidgetPrivate::setWindowIcon_sys(bool forceReset)
icon_data[pos++] = image.width();
icon_data[pos++] = image.height();
if (sizeof(long) == sizeof(quint32)) {
- memcpy(icon_data.data() + pos, image.scanLine(0), image.numBytes());
+ memcpy(icon_data.data() + pos, image.scanLine(0), image.byteCount());
} else {
for (int y = 0; y < image.height(); ++y) {
uint *scanLine = reinterpret_cast<uint *>(image.scanLine(y));
diff --git a/src/gui/kernel/qwinnativepangesturerecognizer_win.cpp b/src/gui/kernel/qwinnativepangesturerecognizer_win.cpp
index 5fceb13161..7dff54317e 100644
--- a/src/gui/kernel/qwinnativepangesturerecognizer_win.cpp
+++ b/src/gui/kernel/qwinnativepangesturerecognizer_win.cpp
@@ -52,6 +52,8 @@
QT_BEGIN_NAMESPACE
+#if !defined(QT_NO_NATIVE_GESTURES)
+
QWinNativePanGestureRecognizer::QWinNativePanGestureRecognizer()
{
}
@@ -122,4 +124,6 @@ void QWinNativePanGestureRecognizer::reset(QGesture *state)
QGestureRecognizer::reset(state);
}
+#endif // QT_NO_NATIVE_GESTURES
+
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h b/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h
index 8fb0d50b17..7d53ed2b57 100644
--- a/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h
+++ b/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h
@@ -57,6 +57,8 @@
QT_BEGIN_NAMESPACE
+#if !defined(QT_NO_NATIVE_GESTURES)
+
class QWinNativePanGestureRecognizer : public QGestureRecognizer
{
public:
@@ -67,6 +69,8 @@ public:
void reset(QGesture *state);
};
+#endif // QT_NO_NATIVE_GESTURES
+
QT_END_NAMESPACE
#endif // QWINNATIVEPANGESTURERECOGNIZER_WIN_P_H
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index f36470ae3d..8226797cff 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -529,7 +529,9 @@ void QWidgetBackingStore::markDirty(const QRegion &rgn, QWidget *widget, bool up
Q_ASSERT(widget->window() == tlw);
Q_ASSERT(!rgn.isEmpty());
+#ifndef QT_NO_GRAPHICSEFFECT
widget->d_func()->invalidateGraphicsEffectsRecursively();
+#endif //QT_NO_GRAPHICSEFFECT
if (widget->d_func()->paintOnScreen()) {
if (widget->d_func()->dirty.isEmpty()) {
@@ -559,9 +561,11 @@ void QWidgetBackingStore::markDirty(const QRegion &rgn, QWidget *widget, bool up
if (invalidateBuffer) {
const bool eventAlreadyPosted = !dirty.isEmpty();
+#ifndef QT_NO_GRAPHICSEFFECT
if (widget->d_func()->graphicsEffect)
dirty += widget->d_func()->effectiveRectFor(rgn.boundingRect()).translated(offset);
else
+#endif //QT_NO_GRAPHICSEFFECT
dirty += rgn.translated(offset);
if (!eventAlreadyPosted || updateImmediately)
sendUpdateRequest(tlw, updateImmediately);
@@ -576,9 +580,11 @@ void QWidgetBackingStore::markDirty(const QRegion &rgn, QWidget *widget, bool up
if (widget->d_func()->inDirtyList) {
if (!qt_region_strictContains(widget->d_func()->dirty, widgetRect)) {
+#ifndef QT_NO_GRAPHICSEFFECT
if (widget->d_func()->graphicsEffect)
widget->d_func()->dirty += widget->d_func()->effectiveRectFor(rgn.boundingRect());
else
+#endif //QT_NO_GRAPHICSEFFECT
widget->d_func()->dirty += rgn;
}
} else {
@@ -606,7 +612,9 @@ void QWidgetBackingStore::markDirty(const QRect &rect, QWidget *widget, bool upd
Q_ASSERT(widget->window() == tlw);
Q_ASSERT(!rect.isEmpty());
+#ifndef QT_NO_GRAPHICSEFFECT
widget->d_func()->invalidateGraphicsEffectsRecursively();
+#endif //QT_NO_GRAPHICSEFFECT
if (widget->d_func()->paintOnScreen()) {
if (widget->d_func()->dirty.isEmpty()) {
diff --git a/src/gui/painting/qbackingstore_p.h b/src/gui/painting/qbackingstore_p.h
index 3288daee2c..fbef9801a5 100644
--- a/src/gui/painting/qbackingstore_p.h
+++ b/src/gui/painting/qbackingstore_p.h
@@ -146,9 +146,11 @@ private:
{
if (widget && !widget->d_func()->inDirtyList && !widget->data->in_destructor) {
QWidgetPrivate *widgetPrivate = widget->d_func();
+#ifndef QT_NO_GRAPHICSEFFECT
if (widgetPrivate->graphicsEffect)
widgetPrivate->dirty = widgetPrivate->effectiveRectFor(rgn.boundingRect());
else
+#endif //QT_NO_GRAPHICSEFFECT
widgetPrivate->dirty = rgn;
dirtyWidgets.append(widget);
widgetPrivate->inDirtyList = true;
diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp
index f8dd424b09..8737f101d5 100644
--- a/src/gui/painting/qblendfunctions.cpp
+++ b/src/gui/painting/qblendfunctions.cpp
@@ -223,11 +223,23 @@ void qt_scale_image_16bit(uchar *destPixels, int dbpl,
int h = ty2 - ty1;
int w = tx2 - tx1;
- const int dstx = qCeil((tx1 + 0.5 - qMin(targetRect.left(), targetRect.right())) * ix) - 1;
- const int dsty = qCeil((ty1 + 0.5 - qMin(targetRect.top(), targetRect.bottom())) * iy) - 1;
+ quint32 basex;
+ quint32 srcy;
- quint32 basex = quint32((sx < 0 ? srcRect.right() : srcRect.left()) * 65536) + dstx;
- quint32 srcy = quint32((sy < 0 ? srcRect.bottom() : srcRect.top()) * 65536) + dsty;
+ if (sx < 0) {
+ int dstx = qFloor((tx1 + 0.5 - targetRect.right()) * ix) + 1;
+ basex = quint32(srcRect.right() * 65536) + dstx;
+ } else {
+ int dstx = qCeil((tx1 + 0.5 - targetRect.left()) * ix) - 1;
+ basex = quint32(srcRect.left() * 65536) + dstx;
+ }
+ if (sy < 0) {
+ int dsty = qFloor((ty1 + 0.5 - targetRect.bottom()) * iy) + 1;
+ srcy = quint32(srcRect.bottom() * 65536) + dsty;
+ } else {
+ int dsty = qCeil((ty1 + 0.5 - targetRect.top()) * iy) - 1;
+ srcy = quint32(srcRect.top() * 65536) + dsty;
+ }
quint16 *dst = ((quint16 *) (destPixels + ty1 * dbpl)) + tx1;
@@ -723,11 +735,23 @@ template <typename T> void qt_scale_image_32bit(uchar *destPixels, int dbpl,
int h = ty2 - ty1;
int w = tx2 - tx1;
- const int dstx = qCeil((tx1 + 0.5 - qMin(targetRect.left(), targetRect.right())) * ix) - 1;
- const int dsty = qCeil((ty1 + 0.5 - qMin(targetRect.top(), targetRect.bottom())) * iy) - 1;
+ quint32 basex;
+ quint32 srcy;
- quint32 basex = quint32((sx < 0 ? srcRect.right() : srcRect.left()) * 65536) + dstx;
- quint32 srcy = quint32((sy < 0 ? srcRect.bottom() : srcRect.top()) * 65536) + dsty;
+ if (sx < 0) {
+ int dstx = qFloor((tx1 + 0.5 - targetRect.right()) * ix) + 1;
+ basex = quint32(srcRect.right() * 65536) + dstx;
+ } else {
+ int dstx = qCeil((tx1 + 0.5 - targetRect.left()) * ix) - 1;
+ basex = quint32(srcRect.left() * 65536) + dstx;
+ }
+ if (sy < 0) {
+ int dsty = qFloor((ty1 + 0.5 - targetRect.bottom()) * iy) + 1;
+ srcy = quint32(srcRect.bottom() * 65536) + dsty;
+ } else {
+ int dsty = qCeil((ty1 + 0.5 - targetRect.top()) * iy) - 1;
+ srcy = quint32(srcRect.top() * 65536) + dsty;
+ }
quint32 *dst = ((quint32 *) (destPixels + ty1 * dbpl)) + tx1;
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp
index cbfbba63da..afe9986870 100644
--- a/src/gui/painting/qbrush.cpp
+++ b/src/gui/painting/qbrush.cpp
@@ -970,7 +970,29 @@ bool QBrush::operator==(const QBrush &b) const
QDebug operator<<(QDebug dbg, const QBrush &b)
{
#ifndef Q_BROKEN_DEBUG_STREAM
- dbg.nospace() << "QBrush(" << b.color() << ',' << b.style() << ')';
+ const char *BRUSH_STYLES[] = {
+ "NoBrush",
+ "SolidPattern",
+ "Dense1Pattern",
+ "Dense2Pattern",
+ "Dense3Pattern",
+ "Dense4Pattern",
+ "Dense5Pattern",
+ "Dense6Pattern",
+ "Dense7Pattern",
+ "HorPattern",
+ "VerPattern",
+ "CrossPattern",
+ "BDiagPattern",
+ "FDiagPattern",
+ "DiagCrossPattern",
+ "LinearGradientPattern",
+ "RadialGradientPattern",
+ "ConicalGradientPattern",
+ "TexturePattern"
+ };
+
+ dbg.nospace() << "QBrush(" << b.color() << ',' << BRUSH_STYLES[b.style()] << ')';
return dbg.space();
#else
qWarning("This compiler doesn't support streaming QBrush to QDebug");
diff --git a/src/gui/painting/qcolormap_qws.cpp b/src/gui/painting/qcolormap_qws.cpp
index ce4cd0995d..bc97b086e7 100644
--- a/src/gui/painting/qcolormap_qws.cpp
+++ b/src/gui/painting/qcolormap_qws.cpp
@@ -170,7 +170,7 @@ const QColor QColormap::colorAt(uint pixel) const
(pixel & green_mask) >> green_shift,
(pixel & blue_mask));
}
- Q_ASSERT_X(int(pixel) < qt_screen->numCols(), "QColormap::colorAt", "pixel out of bounds of palette");
+ Q_ASSERT_X(int(pixel) < qt_screen->colorCount(), "QColormap::colorAt", "pixel out of bounds of palette");
return QColor(qt_screen->clut()[pixel]);
}
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 41602a12ad..4df7f8ab20 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -2386,12 +2386,12 @@ static void QT_FASTCALL comp_func_HardLight(uint *dest, const uint *src, int len
}
/*
- if 2.Sca < Sa
- Dca' = Dca.(Sa - (1 - Dca/Da).(2.Sca - Sa)) + Sca.(1 - Da) + Dca.(1 - Sa)
- otherwise if 8.Dca <= Da
- Dca' = Dca.(Sa - (1 - Dca/Da).(2.Sca - Sa).(3 - 8.Dca/Da)) + Sca.(1 - Da) + Dca.(1 - Sa)
- otherwise
- Dca' = (Dca.Sa + ((Dca/Da)^(0.5).Da - Dca).(2.Sca - Sa)) + Sca.(1 - Da) + Dca.(1 - Sa)
+ if 2.Sca <= Sa
+ Dca' = Dca.(Sa + (2.Sca - Sa).(1 - Dca/Da)) + Sca.(1 - Da) + Dca.(1 - Sa)
+ otherwise if 2.Sca > Sa and 4.Dca <= Da
+ Dca' = Dca.Sa + Da.(2.Sca - Sa).(4.Dca/Da.(4.Dca/Da + 1).(Dca/Da - 1) + 7.Dca/Da) + Sca.(1 - Da) + Dca.(1 - Sa)
+ otherwise if 2.Sca > Sa and 4.Dca > Da
+ Dca' = Dca.Sa + Da.(2.Sca - Sa).((Dca/Da)^0.5 - Dca/Da) + Sca.(1 - Da) + Dca.(1 - Sa)
*/
static inline int soft_light_op(int dst, int src, int da, int sa)
{
@@ -2400,13 +2400,11 @@ static inline int soft_light_op(int dst, int src, int da, int sa)
const int temp = (src * (255 - da) + dst * (255 - sa)) * 255;
if (src2 < sa)
- return (dst * ((sa * 255) - (255 - dst_np) * (src2 - sa)) + temp) / 65025;
- else if (8 * dst <= da)
- return (dst * ((sa * 255) - ((255 - dst_np) * (src2 - sa) * ((3 * 255) - 8 * dst_np)) / 255) + temp) / 65025;
+ return (dst * (sa * 255 + (src2 - sa) * (255 - dst_np)) + temp) / 65025;
+ else if (4 * dst <= da)
+ return (dst * sa * 255 + da * (src2 - sa) * ((((16 * dst_np - 12 * 255) * dst_np + 3 * 65025) * dst_np) / 65025) + temp) / 65025;
else {
- // sqrt is too expensive to do three times per pixel, so skipping it for now
- // a future possibility is to use a LUT
- return ((dst * sa * 255) + (int(dst_np) * da - (dst * 255)) * (src2 - sa) + temp) / 65025;
+ return (dst * sa * 255 + da * (src2 - sa) * (int(sqrt(qreal(dst_np * 255))) - dst_np) + temp) / 65025;
}
}
diff --git a/src/gui/painting/qmatrix.cpp b/src/gui/painting/qmatrix.cpp
index 88b2b7aafa..17b7241926 100644
--- a/src/gui/painting/qmatrix.cpp
+++ b/src/gui/painting/qmatrix.cpp
@@ -85,7 +85,7 @@ QT_BEGIN_NAMESPACE
which returns true if the matrix is non-singular (i.e. AB = BA =
I). The inverted() function returns an inverted copy of \e this
matrix if it is invertible (otherwise it returns the identity
- matrix). In addition, QMatrix provides the det() function
+ matrix). In addition, QMatrix provides the determinant() function
returning the matrix's determinant.
Finally, the QMatrix class supports matrix multiplication, and
@@ -959,9 +959,19 @@ QMatrix &QMatrix::rotate(qreal a)
*/
/*!
+ \obsolete
\fn qreal QMatrix::det() const
Returns the matrix's determinant.
+
+ \sa determinant()
+*/
+
+/*!
+ \since 4.6
+ \fn qreal QMatrix::determinant() const
+
+ Returns the matrix's determinant.
*/
/*!
@@ -985,8 +995,8 @@ QMatrix &QMatrix::rotate(qreal a)
QMatrix QMatrix::inverted(bool *invertible) const
{
- qreal determinant = det();
- if (determinant == 0.0) {
+ qreal dtr = determinant();
+ if (dtr == 0.0) {
if (invertible)
*invertible = false; // singular matrix
return QMatrix(true);
@@ -994,7 +1004,7 @@ QMatrix QMatrix::inverted(bool *invertible) const
else { // invertible matrix
if (invertible)
*invertible = true;
- qreal dinv = 1.0/determinant;
+ qreal dinv = 1.0/dtr;
return QMatrix((_m22*dinv), (-_m12*dinv),
(-_m21*dinv), (_m11*dinv),
((_m21*_dy - _m22*_dx)*dinv),
diff --git a/src/gui/painting/qmatrix.h b/src/gui/painting/qmatrix.h
index 8887f0ef7c..152b3c9b40 100644
--- a/src/gui/painting/qmatrix.h
+++ b/src/gui/painting/qmatrix.h
@@ -101,7 +101,8 @@ public:
QMatrix &rotate(qreal a);
bool isInvertible() const { return !qFuzzyIsNull(_m11*_m22 - _m12*_m21); }
- qreal det() const { return _m11*_m22 - _m12*_m21; }
+ qreal determinant() const { return _m11*_m22 - _m12*_m21; }
+ QT_DEPRECATED qreal det() const { return _m11*_m22 - _m12*_m21; }
QMatrix inverted(bool *invertible = 0) const;
diff --git a/src/gui/painting/qpaintbuffer.cpp b/src/gui/painting/qpaintbuffer.cpp
index 6b9d77c77a..b8700c33e9 100644
--- a/src/gui/painting/qpaintbuffer.cpp
+++ b/src/gui/painting/qpaintbuffer.cpp
@@ -48,7 +48,7 @@
#include <QDebug>
-//#define QPAINTBUFFER_DEBUG_DRAW
+// #define QPAINTBUFFER_DEBUG_DRAW
QT_BEGIN_NAMESPACE
@@ -247,23 +247,24 @@ void QPaintBuffer::draw(QPainter *painter, int frame) const
#ifdef QPAINTBUFFER_DEBUG_DRAW
qDebug() << "QPaintBuffer::draw() --------------------------------";
-// printf("Float buffer:");
-// for (int i=0; i<d->floats.size(); i++) {
-// if ((i % 10) == 0) {
-// printf("\n%4d-%4d: ", i, i+9);
-// }
-// printf("%4.2f ", d->floats[i]);
-// }
-// printf("\n");
-
-// printf("Int Buffer:");
-// for (int i=0; i<d->ints.size(); i++) {
-// if ((i % 10) == 0) {
-// printf("\n%4d-%4d: ", i, i+10);
-// }
-// printf("%5d", d->ints[i]);
-// }
-// printf("\n");
+ Q_D(const QPaintBuffer);
+ printf("Float buffer:");
+ for (int i=0; i<d->floats.size(); i++) {
+ if ((i % 10) == 0) {
+ printf("\n%4d-%4d: ", i, i+9);
+ }
+ printf("%4.2f ", d->floats[i]);
+ }
+ printf("\n");
+
+ printf("Int Buffer:");
+ for (int i=0; i<d->ints.size(); i++) {
+ if ((i % 10) == 0) {
+ printf("\n%4d-%4d: ", i, i+10);
+ }
+ printf("%5d", d->ints[i]);
+ }
+ printf("\n");
#endif
if (painter && !painter->isActive())
@@ -406,16 +407,17 @@ void QPaintBufferEngine::clipEnabledChanged()
void QPaintBufferEngine::penChanged()
{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine:" << state()->pen;
-#endif
const QPen &pen = state()->pen;
if (!buffer->commands.isEmpty()
&& buffer->commands.last().id == QPaintBufferPrivate::Cmd_SetPen) {
+#ifdef QPAINTBUFFER_DEBUG_DRAW
+ qDebug() << "QPaintBufferEngine: penChanged (compressed)" << state()->pen;
+#endif
buffer->variants[buffer->commands.last().offset] = pen;
return;
}
+
if (buffer->calculateBoundingRect) {
if (pen.style() == Qt::NoPen) {
buffer->penWidthAdjustment = 0;
@@ -427,22 +429,28 @@ void QPaintBufferEngine::penChanged()
buffer->penWidthAdjustment = transformedWidth.x() / 2.0;
}
}
+#ifdef QPAINTBUFFER_DEBUG_DRAW
+ qDebug() << "QPaintBufferEngine: penChanged" << state()->pen;
+#endif
buffer->addCommand(QPaintBufferPrivate::Cmd_SetPen, pen);
}
void QPaintBufferEngine::brushChanged()
{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine:" << state()->brush;
-#endif
const QBrush &brush = state()->brush;
if (!buffer->commands.isEmpty()
&& buffer->commands.last().id == QPaintBufferPrivate::Cmd_SetBrush) {
+#ifdef QPAINTBUFFER_DEBUG_DRAW
+ qDebug() << "QPaintBufferEngine: brushChanged (compressed)" << state()->brush;
+#endif
buffer->variants[buffer->commands.last().offset] = brush;
return;
}
+#ifdef QPAINTBUFFER_DEBUG_DRAW
+ qDebug() << "QPaintBufferEngine: brushChanged" << state()->brush;
+#endif
buffer->addCommand(QPaintBufferPrivate::Cmd_SetBrush, brush);
}
@@ -488,14 +496,14 @@ void QPaintBufferEngine::transformChanged()
if (!buffer->commands.isEmpty()
&& buffer->commands.last().id == QPaintBufferPrivate::Cmd_SetTransform) {
#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: compressing " << state()->matrix;
+ qDebug() << "QPaintBufferEngine: transformChanged (compressing) " << state()->matrix;
#endif
buffer->variants[buffer->commands.last().offset] = state()->matrix;
return;
}
#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: " << state()->matrix;
+ qDebug() << "QPaintBufferEngine: transformChanged:" << state()->matrix;
#endif
buffer->addCommand(QPaintBufferPrivate::Cmd_SetTransform, state()->matrix);
}
@@ -514,7 +522,18 @@ void QPaintBufferEngine::draw(const QVectorPath &path)
#ifdef QPAINTBUFFER_DEBUG_DRAW
qDebug() << "QPaintBufferEngine: draw vpath:" << path.elementCount();
#endif
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawVectorPath, path);
+
+ bool hasBrush = qbrush_style(state()->brush) != Qt::NoBrush;
+ bool hasPen = qpen_style(state()->pen) != Qt::NoPen
+ && qbrush_style(qpen_brush(state()->pen)) != Qt::NoBrush;
+
+ if (hasPen || hasBrush)
+ buffer->addCommand(QPaintBufferPrivate::Cmd_DrawVectorPath, path);
+#ifdef QPAINTBUFFER_DEBUG_DRAW
+ else
+ qDebug() << " - no pen or brush active, discarded...\n";
+#endif
+
// if (buffer->calculateBoundingRect) {
// QRealRect r = path.controlPointRect();
// buffer->updateBoundingRect(QRectF(r.x1, r.y1, r.x2 - r.x1, r.y2 - r.y1));
@@ -745,15 +764,15 @@ void QPaintBufferEngine::drawEllipse(const QRect &r)
void QPaintBufferEngine::drawPath(const QPainterPath &path)
{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: drawPath: element count:" << path.elementCount();
-#endif
- // ### Path -> QVariant
- // buffer->addCommand(QPaintBufferPrivate::Cmd_DrawPath, QVariant(path));
+// #ifdef QPAINTBUFFER_DEBUG_DRAW
+// qDebug() << "QPaintBufferEngine: drawPath: element count:" << path.elementCount();
+// #endif
+// // ### Path -> QVariant
+// // buffer->addCommand(QPaintBufferPrivate::Cmd_DrawPath, QVariant(path));
QPaintEngineEx::drawPath(path);
- if (buffer->calculateBoundingRect)
- buffer->updateBoundingRect(path.boundingRect());
+// if (buffer->calculateBoundingRect)
+// buffer->updateBoundingRect(path.boundingRect());
}
void QPaintBufferEngine::drawPoints(const QPoint *points, int pointCount)
@@ -1424,10 +1443,6 @@ void QPainterReplayer::process(const QPaintBufferCommand &cmd)
QTextItemInt &ti = (*tiCopy)();
QString text(ti.text());
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawTextItem:" << pos << " " << text << " " << scaleFactor;
-#endif
-
QFont font(ti.font());
font.setUnderline(false);
font.setStrikeOut(false);
@@ -1439,6 +1454,10 @@ void QPainterReplayer::process(const QPaintBufferCommand &cmd)
justificationWidth = si.width.toReal();
qreal scaleFactor = font.d->dpi/qreal(qt_defaultDpiY());
+#ifdef QPAINTBUFFER_DEBUG_DRAW
+ qDebug() << " -> Cmd_DrawTextItem:" << pos << " " << text << " " << scaleFactor;
+#endif
+
if (scaleFactor != 1.0) {
QFont fnt(font);
QFakeDevice fake;
diff --git a/src/gui/painting/qpaintbuffer_p.h b/src/gui/painting/qpaintbuffer_p.h
index 6a7ac7342c..adf0564b72 100644
--- a/src/gui/painting/qpaintbuffer_p.h
+++ b/src/gui/painting/qpaintbuffer_p.h
@@ -66,6 +66,7 @@ class QPaintBufferPlayback;
class Q_GUI_EXPORT QPaintBuffer : public QPaintDevice
{
+ Q_DECLARE_PRIVATE(QPaintBuffer);
public:
QPaintBuffer();
QPaintBuffer(const QPaintBuffer &other);
@@ -311,7 +312,7 @@ public:
virtual ~QPainterReplayer() { }
void setupTransform(QPainter *painter);
- void process(const QPaintBufferCommand &cmd);
+ virtual void process(const QPaintBufferCommand &cmd);
void draw(const QPaintBuffer &buffer, QPainter *painter, int frame);
protected:
@@ -326,7 +327,7 @@ class Q_GUI_EXPORT QPaintEngineExReplayer : public QPainterReplayer
public:
QPaintEngineExReplayer() { }
- void process(const QPaintBufferCommand &cmd);
+ virtual void process(const QPaintBufferCommand &cmd);
};
class QPaintBufferEnginePrivate;
diff --git a/src/gui/painting/qpaintdevice.h b/src/gui/painting/qpaintdevice.h
index c8e86b85b5..9148e4b7ec 100644
--- a/src/gui/painting/qpaintdevice.h
+++ b/src/gui/painting/qpaintdevice.h
@@ -96,7 +96,8 @@ public:
int logicalDpiY() const { return metric(PdmDpiY); }
int physicalDpiX() const { return metric(PdmPhysicalDpiX); }
int physicalDpiY() const { return metric(PdmPhysicalDpiY); }
- int numColors() const { return metric(PdmNumColors); }
+ QT_DEPRECATED int numColors() const { return metric(PdmNumColors); }
+ int colorCount() const { return metric(PdmNumColors); }
int depth() const { return metric(PdmDepth); }
protected:
diff --git a/src/gui/painting/qpaintengine_mac.cpp b/src/gui/painting/qpaintengine_mac.cpp
index e6863736de..c1b887cc81 100644
--- a/src/gui/painting/qpaintengine_mac.cpp
+++ b/src/gui/painting/qpaintengine_mac.cpp
@@ -1023,7 +1023,7 @@ CGImageRef qt_mac_createCGImageFromQImage(const QImage &img, const QImage **imag
#endif
QCFType<CGDataProviderRef> dataProvider = CGDataProviderCreateWithData(image,
static_cast<const QImage *>(image)->bits(),
- image->numBytes(),
+ image->byteCount(),
drawImageReleaseData);
if (imagePtr)
*imagePtr = image;
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 8d0b961325..3f33319f1c 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -1362,7 +1362,7 @@ void QRasterPaintEngine::clip(const QRegion &region, Qt::ClipOperation op)
Q_D(QRasterPaintEngine);
- if (region.numRects() == 1) {
+ if (region.rectCount() == 1) {
clip(region.boundingRect(), op);
return;
}
@@ -4536,7 +4536,7 @@ void QClipData::setClipRect(const QRect &rect)
*/
void QClipData::setClipRegion(const QRegion &region)
{
- if (region.numRects() == 1) {
+ if (region.rectCount() == 1) {
setClipRect(region.rects().at(0));
return;
}
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index 9e21182038..7d1c109de7 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -431,6 +431,10 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
// Some engines might decide to optimize for the non-shape hint later on...
uint flags = QVectorPath::WindingFill;
+
+ if (path.elementCount() > 2)
+ flags |= QVectorPath::NonConvexShapeMask;
+
if (d->stroker.capStyle() == Qt::RoundCap || d->stroker.joinStyle() == Qt::RoundJoin)
flags |= QVectorPath::CurvedShapeMask;
@@ -598,7 +602,7 @@ void QPaintEngineEx::clip(const QRect &r, Qt::ClipOperation op)
void QPaintEngineEx::clip(const QRegion &region, Qt::ClipOperation op)
{
- if (region.numRects() == 1)
+ if (region.rectCount() == 1)
clip(region.boundingRect(), op);
QVector<QRect> rects = region.rects();
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 09a4563b33..48629d196c 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -3787,27 +3787,14 @@ void QPainter::setPen(const QPen &pen)
if (d->state->pen == pen)
return;
+ d->state->pen = pen;
+
if (d->extended) {
- d->state->pen = pen;
d->checkEmulation();
d->extended->penChanged();
return;
}
- // Do some checks to see if we are the same pen.
- Qt::PenStyle currentStyle = d->state->pen.style();
- if (currentStyle == pen.style() && currentStyle != Qt::CustomDashLine) {
- if (currentStyle == Qt::NoPen ||
- (d->state->pen.isSolid() && pen.isSolid()
- && d->state->pen.color() == pen.color()
- && d->state->pen.widthF() == pen.widthF()
- && d->state->pen.capStyle() == pen.capStyle()
- && d->state->pen.joinStyle() == pen.joinStyle()
- && d->state->pen.isCosmetic() == pen.isCosmetic()))
- return;
- }
-
- d->state->pen = pen;
d->state->dirtyFlags |= QPaintEngine::DirtyPen;
}
@@ -3890,14 +3877,6 @@ void QPainter::setBrush(const QBrush &brush)
return;
}
- Qt::BrushStyle currentStyle = d->state->brush.style();
- if (currentStyle == brush.style()) {
- if (currentStyle == Qt::NoBrush
- || (currentStyle == Qt::SolidPattern
- && d->state->brush.color() == brush.color()))
- return;
- }
-
d->state->brush = brush;
d->state->dirtyFlags |= QPaintEngine::DirtyBrush;
}
diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp
index 41efc80fb3..77aa74817f 100644
--- a/src/gui/painting/qpen.cpp
+++ b/src/gui/painting/qpen.cpp
@@ -835,16 +835,17 @@ bool QPen::operator==(const QPen &p) const
{
QPenData *dd = static_cast<QPenData *>(d);
QPenData *pdd = static_cast<QPenData *>(p.d);
- return (p.d == d) || (p.d->style == d->style
- && p.d->capStyle == d->capStyle
- && p.d->joinStyle == d->joinStyle
- && p.d->width == d->width
- && pdd->miterLimit == dd->miterLimit
- && (d->style != Qt::CustomDashLine
- || (qFuzzyCompare(pdd->dashOffset, dd->dashOffset) &&
- pdd->dashPattern == dd->dashPattern))
- && p.d->brush == d->brush
- && pdd->cosmetic == dd->cosmetic);
+ return (p.d == d)
+ || (p.d->style == d->style
+ && p.d->capStyle == d->capStyle
+ && p.d->joinStyle == d->joinStyle
+ && p.d->width == d->width
+ && pdd->miterLimit == dd->miterLimit
+ && (d->style != Qt::CustomDashLine
+ || (qFuzzyCompare(pdd->dashOffset, dd->dashOffset) &&
+ pdd->dashPattern == dd->dashPattern))
+ && p.d->brush == d->brush
+ && pdd->cosmetic == dd->cosmetic);
}
@@ -983,8 +984,18 @@ QDataStream &operator>>(QDataStream &s, QPen &p)
QDebug operator<<(QDebug dbg, const QPen &p)
{
#ifndef Q_BROKEN_DEBUG_STREAM
+ const char *PEN_STYLES[] = {
+ "NoPen",
+ "SolidLine",
+ "DashLine",
+ "DotLine",
+ "DashDotLine",
+ "DashDotDotLine",
+ "CustomDashLine"
+ };
+
dbg.nospace() << "QPen(" << p.width() << ',' << p.brush()
- << ',' << int(p.style()) << ',' << int(p.capStyle())
+ << ',' << PEN_STYLES[p.style()] << ',' << int(p.capStyle())
<< ',' << int(p.joinStyle()) << ',' << p.dashPattern()
<< ',' << p.dashOffset()
<< ',' << p.miterLimit() << ')';
diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp
index b48b02400b..9d1d9659cd 100644
--- a/src/gui/painting/qregion.cpp
+++ b/src/gui/painting/qregion.cpp
@@ -690,7 +690,7 @@ bool QRegion::intersects(const QRegion &region) const
if (!rect_intersects(boundingRect(), region.boundingRect()))
return false;
- if (numRects() == 1 && region.numRects() == 1)
+ if (rectCount() == 1 && region.rectCount() == 1)
return true;
const QVector<QRect> myRects = rects();
@@ -717,7 +717,7 @@ bool QRegion::intersects(const QRect &rect) const
const QRect r = rect.normalized();
if (!rect_intersects(boundingRect(), r))
return false;
- if (numRects() == 1)
+ if (rectCount() == 1)
return true;
const QVector<QRect> myRects = rects();
@@ -739,6 +739,7 @@ QRegion QRegion::intersect(const QRect &r) const
#endif
/*!
+ \obsolete
\fn int QRegion::numRects() const
\since 4.4
@@ -746,6 +747,13 @@ QRegion QRegion::intersect(const QRect &r) const
*/
/*!
+ \fn int QRegion::rectCount() const
+ \since 4.6
+
+ Returns the number of rectangles that will be returned in rects().
+*/
+
+/*!
\fn bool QRegion::isEmpty() const
Returns true if the region is empty; otherwise returns false. An
@@ -1027,7 +1035,7 @@ void addSegmentsToPath(Segment *segment, QPainterPath &path)
Q_AUTOTEST_EXPORT QPainterPath qt_regionToPath(const QRegion &region)
{
QPainterPath result;
- if (region.numRects() == 1) {
+ if (region.rectCount() == 1) {
result.addRect(region.boundingRect());
return result;
}
@@ -4317,6 +4325,12 @@ int QRegion::numRects() const
return (d->qt_rgn ? d->qt_rgn->numRects : 0);
}
+int QRegion::rectCount() const
+{
+ return (d->qt_rgn ? d->qt_rgn->numRects : 0);
+}
+
+
bool QRegion::operator==(const QRegion &r) const
{
if (!d->qt_rgn)
diff --git a/src/gui/painting/qregion.h b/src/gui/painting/qregion.h
index 7e459ed7d3..2a1be86223 100644
--- a/src/gui/painting/qregion.h
+++ b/src/gui/painting/qregion.h
@@ -116,7 +116,8 @@ public:
QRect boundingRect() const;
QVector<QRect> rects() const;
void setRects(const QRect *rect, int num);
- int numRects() const;
+ QT_DEPRECATED int numRects() const;
+ int rectCount() const;
const QRegion operator|(const QRegion &r) const;
const QRegion operator+(const QRegion &r) const;
diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp
index 81184501f4..45db80ac64 100644
--- a/src/gui/painting/qtransform.cpp
+++ b/src/gui/painting/qtransform.cpp
@@ -1421,7 +1421,7 @@ QRegion QTransform::map(const QRegion &r) const
return copy;
}
- if (t == TxScale && r.numRects() == 1)
+ if (t == TxScale && r.rectCount() == 1)
return QRegion(mapRect(r.boundingRect()));
QPainterPath p = map(qt_regionToPath(r));
@@ -2214,12 +2214,14 @@ bool qt_scaleForTransform(const QTransform &transform, qreal *scale)
{
const QTransform::TransformationType type = transform.type();
if (type <= QTransform::TxTranslate) {
- *scale = 1;
+ if (scale)
+ *scale = 1;
return true;
} else if (type == QTransform::TxScale) {
const qreal xScale = qAbs(transform.m11());
const qreal yScale = qAbs(transform.m22());
- *scale = qMax(xScale, yScale);
+ if (scale)
+ *scale = qMax(xScale, yScale);
return qFuzzyCompare(xScale, yScale);
}
@@ -2227,7 +2229,8 @@ bool qt_scaleForTransform(const QTransform &transform, qreal *scale)
+ transform.m21() * transform.m21();
const qreal yScale = transform.m12() * transform.m12()
+ transform.m22() * transform.m22();
- *scale = qSqrt(qMax(xScale, yScale));
+ if (scale)
+ *scale = qSqrt(qMax(xScale, yScale));
return type == QTransform::TxRotate && qFuzzyCompare(xScale, yScale);
}
diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp
index d412040813..5060f95f0b 100644
--- a/src/gui/painting/qwindowsurface_raster.cpp
+++ b/src/gui/painting/qwindowsurface_raster.cpp
@@ -140,7 +140,7 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi
// Not ready for painting yet, bail out. This can happen in
// QWidget::create_sys()
- if (!d->image || rgn.numRects() == 0)
+ if (!d->image || rgn.rectCount() == 0)
return;
#ifdef Q_WS_WIN
@@ -203,7 +203,7 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi
wrgn.translate(-wOffset);
QRect wbr = wrgn.boundingRect();
- if (wrgn.numRects() != 1) {
+ if (wrgn.rectCount() != 1) {
int num;
XRectangle *rects = (XRectangle *)qt_getClipRects(wrgn, num);
XSetClipRectangles(X11->display, d_ptr->gc, 0, 0, rects, num, YXBanded);
@@ -242,7 +242,7 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi
}
}
- if (wrgn.numRects() != 1)
+ if (wrgn.rectCount() != 1)
XSetClipMask(X11->display, d_ptr->gc, XNone);
#endif // FALCON
diff --git a/src/gui/s60framework/qs60mainappui.cpp b/src/gui/s60framework/qs60mainappui.cpp
index 3b439a8582..4c4c9940c1 100644
--- a/src/gui/s60framework/qs60mainappui.cpp
+++ b/src/gui/s60framework/qs60mainappui.cpp
@@ -161,8 +161,6 @@ void QS60MainAppUi::HandleResourceChangeL(TInt type)
}
/*!
- * \fn void QS60MainAppUi::HandleWsEventL(const TWsEvent &event, CCoeControl *destination)
- *
* \brief Handles raw window server events.
*
* The event type and information is passed in \a wsEvent, while the receiving control is passed in
diff --git a/src/gui/statemachine/qguistatemachine.cpp b/src/gui/statemachine/qguistatemachine.cpp
index 1de5ffa7d7..4f7806fe7e 100644
--- a/src/gui/statemachine/qguistatemachine.cpp
+++ b/src/gui/statemachine/qguistatemachine.cpp
@@ -106,8 +106,10 @@ static QEvent *cloneEvent(QEvent *e)
return new QEvent(*e);
case QEvent::HideToParent:
return new QEvent(*e);
+#ifndef QT_NO_WHEELEVENT
case QEvent::Wheel:
return new QWheelEvent(*static_cast<QWheelEvent*>(e));
+#endif //QT_NO_WHEELEVENT
case QEvent::WindowTitleChange:
return new QEvent(*e);
case QEvent::WindowIconChange:
@@ -190,8 +192,10 @@ static QEvent *cloneEvent(QEvent *e)
return new QInputMethodEvent(*static_cast<QInputMethodEvent*>(e));
case QEvent::AccessibilityPrepare:
return new QEvent(*e);
+#ifndef QT_NO_TABLETEVENT
case QEvent::TabletMove:
return new QTabletEvent(*static_cast<QTabletEvent*>(e));
+#endif //QT_NO_TABLETEVENT
case QEvent::LocaleChange:
return new QEvent(*e);
case QEvent::LanguageChange:
@@ -200,10 +204,12 @@ static QEvent *cloneEvent(QEvent *e)
return new QEvent(*e);
case QEvent::Style:
return new QEvent(*e);
+#ifndef QT_NO_TABLETEVENT
case QEvent::TabletPress:
return new QTabletEvent(*static_cast<QTabletEvent*>(e));
case QEvent::TabletRelease:
return new QTabletEvent(*static_cast<QTabletEvent*>(e));
+#endif //QT_NO_TABLETEVENT
case QEvent::OkRequest:
return new QEvent(*e);
case QEvent::HelpRequest:
@@ -238,8 +244,10 @@ static QEvent *cloneEvent(QEvent *e)
return new QHelpEvent(*static_cast<QHelpEvent*>(e));
case QEvent::WhatsThis:
return new QHelpEvent(*static_cast<QHelpEvent*>(e));
+#ifndef QT_NO_STATUSTIP
case QEvent::StatusTip:
return new QStatusTipEvent(*static_cast<QStatusTipEvent*>(e));
+#endif //QT_NO_STATUSTIP
#ifndef QT_NO_ACTION
case QEvent::ActionChanged:
case QEvent::ActionAdded:
@@ -249,8 +257,10 @@ static QEvent *cloneEvent(QEvent *e)
case QEvent::FileOpen:
return new QFileOpenEvent(*static_cast<QFileOpenEvent*>(e));
+#ifndef QT_NO_SHORTCUT
case QEvent::Shortcut:
return new QShortcutEvent(*static_cast<QShortcutEvent*>(e));
+#endif //QT_NO_SHORTCUT
case QEvent::ShortcutOverride:
return new QKeyEvent(*static_cast<QKeyEvent*>(e));
@@ -263,11 +273,15 @@ static QEvent *cloneEvent(QEvent *e)
break;
#endif
+#ifndef QT_NO_WHATSTHIS
case QEvent::WhatsThisClicked:
return new QWhatsThisClickedEvent(*static_cast<QWhatsThisClickedEvent*>(e));
+#endif //QT_NO_WHATSTHIS
+#ifndef QT_NO_TOOLBAR
case QEvent::ToolBarChange:
return new QToolBarChangeEvent(*static_cast<QToolBarChangeEvent*>(e));
+#endif //QT_NO_TOOLBAR
case QEvent::ApplicationActivate:
return new QEvent(*e);
@@ -397,9 +411,11 @@ static QEvent *cloneEvent(QEvent *e)
case QEvent::DynamicPropertyChange:
return new QDynamicPropertyChangeEvent(*static_cast<QDynamicPropertyChangeEvent*>(e));
+#ifndef QT_NO_TABLETEVENT
case QEvent::TabletEnterProximity:
case QEvent::TabletLeaveProximity:
return new QTabletEvent(*static_cast<QTabletEvent*>(e));
+#endif //QT_NO_TABLETEVENT
case QEvent::NonClientAreaMouseMove:
case QEvent::NonClientAreaMouseButtonPress:
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 350a8e6868..b5e92c7939 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -281,7 +281,7 @@ void QS60StylePrivate::drawSkinElement(SkinElements element, QPainter *painter,
drawFrame(SF_ButtonInactive, painter, rect, flags | SF_PointNorth);
break;
case SE_Editor:
- drawFrame(SF_Editor, painter, rect, flags | SF_PointNorth);
+ drawFrame(SF_FrameLineEdit, painter, rect, flags | SF_PointNorth);
break;
default:
break;
@@ -433,7 +433,7 @@ QColor QS60StylePrivate::colorFromFrameGraphics(SkinFrameElements frame) const
return Qt::black;
const QRgb *pixelRgb = (const QRgb*)frameImage.bits();
- const int pixels = frameImage.numBytes()/sizeof(QRgb);
+ const int pixels = frameImage.byteCount()/sizeof(QRgb);
int estimatedRed = 0;
int estimatedGreen = 0;
@@ -831,6 +831,11 @@ QSize QS60StylePrivate::partSize(QS60StyleEnums::SkinParts part, SkinElementFlag
pixelMetric(QStyle::PM_SliderControlThickness), Qt::IgnoreAspectRatio);
break;
+ case QS60StyleEnums::SP_QgnGrafBarFrameSideL:
+ case QS60StyleEnums::SP_QgnGrafBarFrameSideR:
+ result.setWidth(pixelMetric(PM_Custom_FrameCornerWidth));
+ break;
+
case QS60StyleEnums::SP_QsnCpScrollHandleBottomPressed:
case QS60StyleEnums::SP_QsnCpScrollHandleTopPressed:
case QS60StyleEnums::SP_QsnCpScrollHandleMiddlePressed:
@@ -1676,18 +1681,18 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
if (!styleHint(SH_UnderlineShortcut, menuItem, widget))
text_flags |= Qt::TextHideMnemonic;
- QRect iconRect =
- subElementRect(SE_ItemViewItemDecoration, &optionMenuItem, widget);
- QRect textRect = subElementRect(SE_ItemViewItemText, &optionMenuItem, widget);
-
if ((option->state & State_Selected) && (option->state & State_Enabled))
QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_ListHighlight, painter, option->rect, flags);
+ QRect iconRect = subElementRect(SE_ItemViewItemDecoration, &optionMenuItem, widget);
+ QRect textRect = subElementRect(SE_ItemViewItemText, &optionMenuItem, widget);
+
//todo: move the vertical spacing stuff into subElementRect
const int vSpacing = QS60StylePrivate::pixelMetric(QStyle::PM_LayoutVerticalSpacing);
if (checkable){
+ const int hSpacing = QS60StylePrivate::pixelMetric(QStyle::PM_LayoutHorizontalSpacing);
QStyleOptionMenuItem optionCheckBox;
- optionCheckBox.QStyleOption::operator=(*menuItem);
+ optionCheckBox.QStyleOptionMenuItem::operator=(*menuItem);
optionCheckBox.rect.setWidth(pixelMetric(PM_IndicatorWidth));
optionCheckBox.rect.setHeight(pixelMetric(PM_IndicatorHeight));
const int moveByX = optionCheckBox.rect.width()+vSpacing;
@@ -1696,6 +1701,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
iconRect.translate(moveByX, 0);
iconRect.setWidth(iconRect.width()+vSpacing);
textRect.setWidth(textRect.width()-moveByX-vSpacing);
+ optionCheckBox.rect.translate(vSpacing/2, hSpacing/2);
} else {
textRect.setWidth(textRect.width()-moveByX);
iconRect.setWidth(iconRect.width()+vSpacing);
@@ -2292,8 +2298,18 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
{
QSize sz(csz);
switch (ct) {
+ case CT_ToolButton:
+ sz = QCommonStyle::sizeFromContents( ct, opt, csz, widget);
+ //FIXME properly - style should calculate the location of border frame-part
+ sz += QSize(2*pixelMetric(PM_ButtonMargin), 2*pixelMetric(PM_ButtonMargin));
+ if (const QStyleOptionToolButton *toolBtn = qstyleoption_cast<const QStyleOptionToolButton *>(opt))
+ if (toolBtn->subControls & SC_ToolButtonMenu)
+ sz += QSize(pixelMetric(PM_MenuButtonIndicator),0);
+ break;
case CT_PushButton:
sz = QCommonStyle::sizeFromContents( ct, opt, csz, widget);
+ //FIXME properly - style should calculate the location of border frame-part
+ sz += QSize(2*pixelMetric(PM_ButtonMargin), 2*pixelMetric(PM_ButtonMargin));
if (const QAbstractButton *buttonWidget = (qobject_cast<const QAbstractButton *>(widget)))
if (buttonWidget->isCheckable())
sz += QSize(pixelMetric(PM_IndicatorWidth) + pixelMetric(PM_CheckBoxLabelSpacing), 0);
@@ -2572,8 +2588,8 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple
break;
case CC_ToolButton:
if (const QStyleOptionToolButton *toolButton = qstyleoption_cast<const QStyleOptionToolButton *>(option)) {
- const int indicatorRect = pixelMetric(PM_MenuButtonIndicator, toolButton, widget) +
- 2*pixelMetric(PM_ButtonMargin, toolButton, widget);
+ const int indicatorRect = pixelMetric(PM_MenuButtonIndicator) + 2*pixelMetric(PM_ButtonMargin);
+ const int border = pixelMetric(PM_ButtonMargin) + pixelMetric(PM_DefaultFrameWidth);
ret = toolButton->rect;
const bool popup = (toolButton->features &
(QStyleOptionToolButton::MenuButtonPopup | QStyleOptionToolButton::PopupDelay))
@@ -2585,7 +2601,7 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple
break;
case SC_ToolButtonMenu:
if (popup)
- ret.adjust(ret.width() - indicatorRect, ret.height() - indicatorRect, 0, 0);
+ ret.adjust(ret.width() - indicatorRect, border, -pixelMetric(PM_ButtonMargin), -border);
break;
default:
break;
@@ -2607,8 +2623,8 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con
QRect ret;
switch (element) {
case SE_LineEditContents: {
- // in S60 the input text box doesn't start from line Edit's TL, but
- // a bit indented.
+ // in S60 the input text box doesn't start from line Edit's TL, but
+ // a bit indented.
QRect lineEditRect = opt->rect;
const int adjustment = opt->rect.height()>>2;
lineEditRect.adjust(adjustment,0,0,0);
diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h
index 54af757581..46547bf889 100644
--- a/src/gui/styles/qs60style_p.h
+++ b/src/gui/styles/qs60style_p.h
@@ -361,7 +361,6 @@ public:
SF_ToolBarButtonPressed,
SF_PanelBackground,
SF_ButtonInactive,
- SF_Editor,
};
enum SkinElementFlag {
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index 0cd87bdfa8..c2a207c1af 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -319,16 +319,6 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = {
/* SP_QsnFrButtonSideRInactive */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b8},
/* SP_QsnFrButtonCenterInactive */ {KAknsIIDQsnFrButtonTbCenter, EDrawIcon, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b9},
- /* SP_QsnFrNotepadCornerTl */ {KAknsIIDQsnFrNotepadContCornerTl, ENoDraw, ES60_AllReleases, -1,-1},
- /* SP_QsnFrNotepadCornerTr */ {KAknsIIDQsnFrNotepadContCornerTr, ENoDraw, ES60_AllReleases, -1,-1},
- /* SP_QsnFrNotepadCornerBl */ {KAknsIIDQsnFrNotepadCornerBl, ENoDraw, ES60_AllReleases, -1,-1},
- /* SP_QsnFrNotepadCornerBr */ {KAknsIIDQsnFrNotepadCornerBr, ENoDraw, ES60_AllReleases, -1,-1},
- /* SP_QsnFrNotepadSideT */ {KAknsIIDQsnFrNotepadContSideT, ENoDraw, ES60_AllReleases, -1,-1},
- /* SP_QsnFrNotepadSideB */ {KAknsIIDQsnFrNotepadSideB, ENoDraw, ES60_AllReleases, -1,-1},
- /* SP_QsnFrNotepadSideL */ {KAknsIIDQsnFrNotepadSideL, ENoDraw, ES60_AllReleases, -1,-1},
- /* SP_QsnFrNotepadSideR */ {KAknsIIDQsnFrNotepadSideR, ENoDraw, ES60_AllReleases, -1,-1},
- /* SP_QsnFrNotepadCenter */ {KAknsIIDQsnFrNotepadCenter, EDrawIcon, ES60_AllReleases, -1,-1},
-
};
QPixmap QS60StyleModeSpecifics::skinnedGraphics(
@@ -852,10 +842,6 @@ void QS60StyleModeSpecifics::frameIdAndCenterId(QS60StylePrivate::SkinFrameEleme
centerId.Set(KAknsIIDNone);
frameId.Set(KAknsIIDQsnFrSetOpt);
break;
- case QS60StylePrivate::SF_Editor:
- centerId.Set(KAknsIIDQsnFrNotepadCenter);
- frameId.Set(KAknsIIDQsnFrNotepadCont);
- break;
default:
// center should be correct here
frameId.iMinor = centerId.iMinor - 9;
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index ae1d33a06c..ce73fd8db3 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -3325,9 +3325,14 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
break;
case CE_PushButton:
- ParentStyle::drawControl(ce, opt, p, w);
- return;
-
+ if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) {
+ if (rule.hasDrawable() || rule.hasBox() || rule.hasPosition() || rule.hasPalette() ||
+ ((btn->features & QStyleOptionButton::HasMenu) && hasStyleRule(w, PseudoElement_PushButtonMenuIndicator))) {
+ ParentStyle::drawControl(ce, opt, p, w);
+ return;
+ }
+ }
+ break;
case CE_PushButtonBevel:
if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) {
QStyleOptionButton btnOpt(*btn);
@@ -3370,7 +3375,9 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
if (rule.hasPosition() && rule.position()->textAlignment != 0) {
Qt::Alignment textAlignment = rule.position()->textAlignment;
QRect textRect = button->rect;
- uint tf = Qt::AlignVCenter | Qt::TextShowMnemonic;
+ uint tf = Qt::TextShowMnemonic;
+ const uint verticalAlignMask = Qt::AlignVCenter | Qt::AlignTop | Qt::AlignLeft;
+ tf |= (textAlignment & verticalAlignMask) ? (textAlignment & verticalAlignMask) : Qt::AlignVCenter;
if (!styleHint(SH_UnderlineShortcut, button, w))
tf |= Qt::TextHideMnemonic;
if (!button->icon.isNull()) {
@@ -3599,6 +3606,27 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
}
} else if (hasStyleRule(w, PseudoElement_MenuCheckMark) || hasStyleRule(w, PseudoElement_MenuRightArrow)) {
QWindowsStyle::drawControl(ce, &mi, p, w);
+ if (mi.checkType != QStyleOptionMenuItem::NotCheckable && !mi.checked) {
+ // We have a style defined, but QWindowsStyle won't draw anything if not checked.
+ // So we mimick what QWindowsStyle would do.
+ int checkcol = qMax<int>(mi.maxIconWidth, QWindowsStylePrivate::windowsCheckMarkWidth);
+ QRect vCheckRect = visualRect(opt->direction, mi.rect, QRect(mi.rect.x(), mi.rect.y(), checkcol, mi.rect.height()));
+ if (mi.state.testFlag(State_Enabled) && mi.state.testFlag(State_Selected)) {
+ qDrawShadePanel(p, vCheckRect, mi.palette, true, 1, &mi.palette.brush(QPalette::Button));
+ } else {
+ QBrush fill(mi.palette.light().color(), Qt::Dense4Pattern);
+ qDrawShadePanel(p, vCheckRect, mi.palette, true, 1, &fill);
+ }
+ QRenderRule subSubRule = renderRule(w, opt, PseudoElement_MenuCheckMark);
+ if (subSubRule.hasDrawable()) {
+ QStyleOptionMenuItem newMi(mi);
+ newMi.rect = visualRect(opt->direction, mi.rect, QRect(mi.rect.x() + QWindowsStylePrivate::windowsItemFrame,
+ mi.rect.y() + QWindowsStylePrivate::windowsItemFrame,
+ checkcol - 2 * QWindowsStylePrivate::windowsItemFrame,
+ mi.rect.height() - 2 * QWindowsStylePrivate::windowsItemFrame));
+ drawPrimitive(PE_IndicatorMenuCheckMark, &newMi, p, w);
+ }
+ }
} else {
if (rule.hasDrawable() && !subRule.hasDrawable() && !(opt->state & QStyle::State_Selected)) {
mi.palette.setColor(QPalette::Window, Qt::transparent);
@@ -3668,7 +3696,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
}
if (!cb->currentText.isEmpty() && !cb->editable) {
drawItemText(p, editRect.adjusted(0, 0, 0, 0), Qt::AlignLeft | Qt::AlignVCenter, cb->palette,
- cb->state & State_Enabled, cb->currentText);
+ cb->state & State_Enabled, cb->currentText, QPalette::Text);
}
p->restore();
return;
@@ -4275,23 +4303,7 @@ void QStyleSheetStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *op
p->fillRect(v2->rect, v2->palette.alternateBase());
subRule.drawRule(p, opt->rect);
} else {
- QStyleOptionViewItemV2 v2Copy(*v2);
- if (v2->showDecorationSelected) {
- QRenderRule subRule2 = renderRule(w, opt, PseudoElement_ViewItem);
- if (v2->state & QStyle::State_Selected) {
- subRule2.configurePalette(&v2Copy.palette, QPalette::NoRole, QPalette::Highlight);
- } else if (v2->features & QStyleOptionViewItemV2::Alternate) {
- subRule2.configurePalette(&v2Copy.palette, QPalette::NoRole, QPalette::AlternateBase);
- } else if (subRule2.hasBackground()) {
- p->fillRect(v2->rect, subRule2.background()->brush);
- }
- } else if (v2->features & QStyleOptionViewItemV2::Alternate) {
- quint64 pc = v2->state & QStyle::State_Enabled ? PseudoClass_Enabled : PseudoClass_Disabled;
- pc |= PseudoClass_Alternate;
- QRenderRule subRule2 = renderRule(w, PseudoElement_ViewItem, pc);
- subRule2.configurePalette(&v2Copy.palette, QPalette::NoRole, QPalette::AlternateBase);
- }
- baseStyle()->drawPrimitive(pe, &v2Copy, p, w);
+ baseStyle()->drawPrimitive(pe, v2, p, w);
}
}
return;
@@ -4356,18 +4368,6 @@ void QStyleSheetStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *op
break;
case PE_PanelItemViewItem:
- if (!styleHint(SH_ItemView_ShowDecorationSelected, opt, w)) {
- rect = subElementRect(QStyle::SE_ItemViewItemText, opt, w)
- | subElementRect(QStyle::SE_ItemViewItemDecoration, opt, w)
- | subElementRect(QStyle::SE_ItemViewItemCheckIndicator, opt, w);
- }
- pseudoElement = PseudoElement_ViewItem;
- break;
-
- case PE_PanelItemViewRow:
- ParentStyle::drawPrimitive(pe, opt, p, w);
- if (!styleHint(SH_ItemView_ShowDecorationSelected, opt, w))
- return;
pseudoElement = PseudoElement_ViewItem;
break;
diff --git a/src/gui/styles/qstylesheetstyle_default.cpp b/src/gui/styles/qstylesheetstyle_default.cpp
index 406633ed5c..f79f8e06dc 100644
--- a/src/gui/styles/qstylesheetstyle_default.cpp
+++ b/src/gui/styles/qstylesheetstyle_default.cpp
@@ -203,49 +203,6 @@ StyleSheet QStyleSheetStyle::getDefaultStyleSheet() const
ADD_STYLE_RULE;
}
- /*QLineEdit[style="QCleanlooksStyle"] {
- padding-top: 2px;
- padding-bottom: 2px;
- }*/
- if (baseStyle()->inherits("QCleanlooksStyle"))
- {
- SET_ELEMENT_NAME(QLatin1String("QLineEdit"));
- ADD_BASIC_SELECTOR;
- ADD_SELECTOR;
-
-
- SET_PROPERTY(QLatin1String("padding-top"), PaddingTop);
- ADD_VALUE(Value::Identifier, QString::fromLatin1("2px"));
- ADD_DECLARATION;
-
- SET_PROPERTY(QLatin1String("padding-bottom"), PaddingBottom);
- ADD_VALUE(Value::Identifier, QString::fromLatin1("2px"));
- ADD_DECLARATION;
-
- ADD_STYLE_RULE;
- }
-
- /*QLineEdit[style="QWindowsXPStyle"],
- QLineEdit[style="QWindowsVistaStyle"],
- QLineEdit[style="QGtkStyle"] {
- padding-top: 1px;
- padding-bottom: 1px;
- }*/
- if (baseStyle()->inherits("QWindowsXPStyle") || baseStyle()->inherits("QGtkStyle"))
- {
- SET_ELEMENT_NAME(QLatin1String("QLineEdit"));
-
- SET_PROPERTY(QLatin1String("padding-top"), PaddingTop);
- ADD_VALUE(Value::Identifier, QString::fromLatin1("1px"));
- ADD_DECLARATION;
-
- SET_PROPERTY(QLatin1String("padding-bottom"), PaddingBottom);
- ADD_VALUE(Value::Identifier, QString::fromLatin1("1px"));
- ADD_DECLARATION;
-
- ADD_STYLE_RULE;
- }
-
/*QFrame {
border: native;
}*/
diff --git a/src/gui/styles/qwindowsmobilestyle.cpp b/src/gui/styles/qwindowsmobilestyle.cpp
index 7ed187f038..86ba947016 100644
--- a/src/gui/styles/qwindowsmobilestyle.cpp
+++ b/src/gui/styles/qwindowsmobilestyle.cpp
@@ -4121,6 +4121,7 @@ void QWindowsMobileStylePrivate::setupWindowsMobileStyle65()
void QWindowsMobileStylePrivate::drawTabBarTab(QPainter *painter, const QStyleOptionTab *tab)
{
+#ifndef QT_NO_TABBAR
#ifdef Q_WS_WINCE_WM
if (wm65) {
tintImagesButton(tab->palette.button().color());
@@ -4207,6 +4208,7 @@ void QWindowsMobileStylePrivate::drawTabBarTab(QPainter *painter, const QStyleOp
}
}
painter->restore();
+#endif //QT_NO_TABBAR
}
void QWindowsMobileStylePrivate::drawPanelItemViewSelected(QPainter *painter, const QStyleOptionViewItemV4 *option, QRect rect)
@@ -4412,7 +4414,7 @@ void QWindowsMobileStylePrivate::drawScrollbarHandleUp(QPainter *p, QStyleOption
void QWindowsMobileStylePrivate::drawScrollbarHandleDown(QPainter *p, QStyleOptionSlider *opt, bool completeFrame, bool secondScrollBar)
{
-
+#ifndef QT_NO_SCROLLBAR
#ifdef Q_WS_WINCE_WM
if (wm65) {
tintImagesHigh(opt->palette.highlight().color());
@@ -4469,10 +4471,12 @@ void QWindowsMobileStylePrivate::drawScrollbarHandleDown(QPainter *p, QStyleOpti
arrowOpt.rect.adjust(1, 0, 1, 0);
q_func()->proxy()->drawPrimitive(QStyle::PE_IndicatorArrowDown, &arrowOpt, p, 0);
}
+#endif //QT_NO_SCROLLBAR
}
void QWindowsMobileStylePrivate::drawScrollbarGroove(QPainter *p,const QStyleOptionSlider *opt)
{
+#ifndef QT_NO_SCROLLBAR
#ifdef Q_OS_WINCE_WM
if (wm65) {
p->fillRect(opt->rect, QColor(231, 231, 231));
@@ -4498,6 +4502,7 @@ void QWindowsMobileStylePrivate::drawScrollbarGroove(QPainter *p,const QStyleOpt
fill = opt->palette.light();
}
p->fillRect(opt->rect, fill);
+#endif //QT_NO_SCROLLBAR
}
QWindowsMobileStyle::QWindowsMobileStyle(QWindowsMobileStylePrivate &dd) : QWindowsStyle(dd) {
@@ -6325,16 +6330,20 @@ QSize QWindowsMobileStyle::sizeFromContents(ContentsType type, const QStyleOptio
switch (type) {
case CT_PushButton:
if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) {
- newSize = QWindowsStyle::sizeFromContents(type, option, size, widget);
+ newSize = QCommonStyle::sizeFromContents(type, option, size, widget);
int w = newSize.width(),
h = newSize.height();
int defwidth = 0;
if (button->features & QStyleOptionButton::AutoDefaultButton)
defwidth = 2 * proxy()->pixelMetric(PM_ButtonDefaultIndicator, button, widget);
- if (w < 75 + defwidth && button->icon.isNull())
- w = 75 + defwidth;
- if (h < 23 + defwidth)
- h = 23 + defwidth;
+
+ int minwidth = int(QStyleHelper::dpiScaled(55.0f));
+ int minheight = int(QStyleHelper::dpiScaled(19.0f));
+
+ if (w < minwidth + defwidth && button->icon.isNull())
+ w = minwidth + defwidth;
+ if (h < minheight + defwidth)
+ h = minheight + defwidth;
newSize = QSize(w + 4, h + 4);
}
break;
diff --git a/src/gui/styles/qwindowsmobilestyle_p.h b/src/gui/styles/qwindowsmobilestyle_p.h
index 1e8c7ffb31..139a4ab01b 100644
--- a/src/gui/styles/qwindowsmobilestyle_p.h
+++ b/src/gui/styles/qwindowsmobilestyle_p.h
@@ -60,6 +60,10 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_STYLE_WINDOWSMOBILE
+class QStyleOptionTab;
+class QStyleOptionSlider;
+class QStyleOptionViewItemV4;
+
class QWindowsMobileStylePrivate : public QWindowsStylePrivate
{
Q_DECLARE_PUBLIC(QWindowsMobileStyle)
diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp
index 5cf738e536..f894b8278c 100644
--- a/src/gui/styles/qwindowsstyle.cpp
+++ b/src/gui/styles/qwindowsstyle.cpp
@@ -115,14 +115,6 @@ QT_BEGIN_INCLUDE_NAMESPACE
#include <limits.h>
QT_END_INCLUDE_NAMESPACE
-static const int windowsItemFrame = 2; // menu item frame width
-static const int windowsSepHeight = 9; // separator item height
-static const int windowsItemHMargin = 3; // menu item hor text margin
-static const int windowsItemVMargin = 2; // menu item ver text margin
-static const int windowsArrowHMargin = 6; // arrow horizontal margin
-static const int windowsRightBorder = 15; // right border on windows
-static const int windowsCheckMarkWidth = 12; // checkmarks width on windows
-
enum QSliderDirection { SlUp, SlDown, SlLeft, SlRight };
/*
@@ -1847,7 +1839,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
bool act = menuitem->state & State_Selected;
// windows always has a check column, regardless whether we have an icon or not
- int checkcol = qMax(menuitem->maxIconWidth, windowsCheckMarkWidth);
+ int checkcol = qMax<int>(menuitem->maxIconWidth, QWindowsStylePrivate::windowsCheckMarkWidth);
QBrush fill = menuitem->palette.brush(act ? QPalette::Highlight : QPalette::Button);
p->fillRect(menuitem->rect.adjusted(0, 0, -1, 0), fill);
@@ -1903,8 +1895,10 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
newMi.state |= State_Enabled;
if (act)
newMi.state |= State_On;
- newMi.rect = visualRect(opt->direction, menuitem->rect, QRect(menuitem->rect.x() + windowsItemFrame, menuitem->rect.y() + windowsItemFrame,
- checkcol - 2 * windowsItemFrame, menuitem->rect.height() - 2*windowsItemFrame));
+ newMi.rect = visualRect(opt->direction, menuitem->rect, QRect(menuitem->rect.x() + QWindowsStylePrivate::windowsItemFrame,
+ menuitem->rect.y() + QWindowsStylePrivate::windowsItemFrame,
+ checkcol - 2 * QWindowsStylePrivate::windowsItemFrame,
+ menuitem->rect.height() - 2 * QWindowsStylePrivate::windowsItemFrame));
proxy()->drawPrimitive(PE_IndicatorMenuCheckMark, &newMi, p, widget);
}
p->setPen(act ? menuitem->palette.highlightedText().color() : menuitem->palette.buttonText().color());
@@ -1915,9 +1909,10 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
p->setPen(discol);
}
- int xm = windowsItemFrame + checkcol + windowsItemHMargin;
+ int xm = QWindowsStylePrivate::windowsItemFrame + checkcol + QWindowsStylePrivate::windowsItemHMargin;
int xpos = menuitem->rect.x() + xm;
- QRect textRect(xpos, y + windowsItemVMargin, w - xm - windowsRightBorder - tab + 1, h - 2 * windowsItemVMargin);
+ QRect textRect(xpos, y + QWindowsStylePrivate::windowsItemVMargin,
+ w - xm - QWindowsStylePrivate::windowsRightBorder - tab + 1, h - 2 * QWindowsStylePrivate::windowsItemVMargin);
QRect vTextRect = visualRect(opt->direction, menuitem->rect, textRect);
QString s = menuitem->text;
if (!s.isEmpty()) { // draw text
@@ -1951,10 +1946,10 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
p->restore();
}
if (menuitem->menuItemType == QStyleOptionMenuItem::SubMenu) {// draw sub menu arrow
- int dim = (h - 2 * windowsItemFrame) / 2;
+ int dim = (h - 2 * QWindowsStylePrivate::windowsItemFrame) / 2;
PrimitiveElement arrow;
arrow = (opt->direction == Qt::RightToLeft) ? PE_IndicatorArrowLeft : PE_IndicatorArrowRight;
- xpos = x + w - windowsArrowHMargin - windowsItemFrame - dim;
+ xpos = x + w - QWindowsStylePrivate::windowsArrowHMargin - QWindowsStylePrivate::windowsItemFrame - dim;
QRect vSubMenuRect = visualRect(opt->direction, menuitem->rect, QRect(xpos, y + h / 2 - dim / 2, dim, dim));
QStyleOptionMenuItem newMI = *menuitem;
newMI.rect = vSubMenuRect;
@@ -2994,6 +2989,7 @@ void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComp
#ifndef QT_NO_COMBOBOX
case CC_ComboBox:
if (const QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) {
+ p->save();
QBrush editBrush = cmb->palette.brush(QPalette::Base);
if ((cmb->subControls & SC_ComboBoxFrame)) {
if (cmb->frame) {
@@ -3063,6 +3059,7 @@ void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComp
proxy()->drawPrimitive(PE_FrameFocusRect, &focus, p, widget);
}
}
+ p->restore();
}
break;
#endif // QT_NO_COMBOBOX
@@ -3191,7 +3188,7 @@ QSize QWindowsStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
sz = QCommonStyle::sizeFromContents(ct, opt, csz, widget);
if (mi->menuItemType == QStyleOptionMenuItem::Separator) {
- sz = QSize(10, windowsSepHeight);
+ sz = QSize(10, QWindowsStylePrivate::windowsSepHeight);
}
else if (mi->icon.isNull()) {
sz.setHeight(sz.height() - 2);
@@ -3202,14 +3199,14 @@ QSize QWindowsStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
int iconExtent = proxy()->pixelMetric(PM_SmallIconSize, opt, widget);
sz.setHeight(qMax(sz.height(),
mi->icon.actualSize(QSize(iconExtent, iconExtent)).height()
- + 2 * windowsItemFrame));
+ + 2 * QWindowsStylePrivate::windowsItemFrame));
}
int maxpmw = mi->maxIconWidth;
int tabSpacing = 20;
if (mi->text.contains(QLatin1Char('\t')))
w += tabSpacing;
else if (mi->menuItemType == QStyleOptionMenuItem::SubMenu)
- w += 2 * windowsArrowHMargin;
+ w += 2 * QWindowsStylePrivate::windowsArrowHMargin;
else if (mi->menuItemType == QStyleOptionMenuItem::DefaultItem) {
// adjust the font and add the difference in size.
// it would be better if the font could be adjusted in the initStyleOption qmenu func!!
@@ -3220,9 +3217,9 @@ QSize QWindowsStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
w += fmBold.width(mi->text) - fm.width(mi->text);
}
- int checkcol = qMax(maxpmw, windowsCheckMarkWidth); // Windows always shows a check column
+ int checkcol = qMax<int>(maxpmw, QWindowsStylePrivate::windowsCheckMarkWidth); // Windows always shows a check column
w += checkcol;
- w += windowsRightBorder + 10;
+ w += QWindowsStylePrivate::windowsRightBorder + 10;
sz.setWidth(w);
}
break;
@@ -3230,7 +3227,7 @@ QSize QWindowsStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
#ifndef QT_NO_MENUBAR
case CT_MenuBarItem:
if (!sz.isEmpty())
- sz += QSize(windowsItemHMargin * 4, windowsItemVMargin * 2);
+ sz += QSize(QWindowsStylePrivate::windowsItemHMargin * 4, QWindowsStylePrivate::windowsItemVMargin * 2);
break;
#endif
// Otherwise, fall through
diff --git a/src/gui/styles/qwindowsstyle_p.h b/src/gui/styles/qwindowsstyle_p.h
index fb84dcecd7..d81c82be41 100644
--- a/src/gui/styles/qwindowsstyle_p.h
+++ b/src/gui/styles/qwindowsstyle_p.h
@@ -87,7 +87,17 @@ public:
QColor activeGradientCaptionColor;
QColor inactiveCaptionColor;
QColor inactiveGradientCaptionColor;
+
+ enum {
+ windowsItemFrame = 2, // menu item frame width
+ windowsSepHeight = 9, // separator item height
+ windowsItemHMargin = 3, // menu item hor text margin
+ windowsItemVMargin = 2, // menu item ver text margin
+ windowsArrowHMargin = 6, // arrow horizontal margin
+ windowsRightBorder = 15, // right border on windows
+ windowsCheckMarkWidth = 12 // checkmarks width on windows
};
+};
QT_END_NAMESPACE
diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp
index 6db86bdaf3..93b9fc6c1a 100644
--- a/src/gui/text/qcssparser.cpp
+++ b/src/gui/text/qcssparser.cpp
@@ -1129,19 +1129,22 @@ static bool setFontWeightFromValue(const Value &value, QFont *font)
static bool setFontFamilyFromValues(const QVector<Value> &values, QFont *font, int start = 0)
{
QString family;
+ bool shouldAddSpace = false;
for (int i = start; i < values.count(); ++i) {
const Value &v = values.at(i);
if (v.type == Value::TermOperatorComma) {
family += QLatin1Char(',');
+ shouldAddSpace = false;
continue;
}
const QString str = v.variant.toString();
if (str.isEmpty())
break;
+ if (shouldAddSpace)
+ family += QLatin1Char(' ');
family += str;
- family += QLatin1Char(' ');
+ shouldAddSpace = true;
}
- family = family.simplified();
if (family.isEmpty())
return false;
font->setFamily(family);
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index fb8444e5d2..7e93aa0b7d 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -533,7 +533,13 @@ static int requiredUnicodeBits[QFontDatabase::WritingSystemsCount][2] = {
// Vietnamese,
{ 0, 127 }, // same as latin1
// Other,
- { 126, 127 }
+ { 126, 127 },
+ // Ogham,
+ { 78, 127 },
+ // Runic,
+ { 79, 127 },
+ // Nko,
+ { 14, 127 },
};
#define SimplifiedChineseCsbBit 18
@@ -873,7 +879,8 @@ static const int scriptForWritingSystem[] = {
QUnicodeTables::Common, // Braille
QUnicodeTables::Common, // Symbol
QUnicodeTables::Ogham, // Ogham
- QUnicodeTables::Runic // Runic
+ QUnicodeTables::Runic, // Runic
+ QUnicodeTables::Nko // Nko
};
@@ -881,12 +888,12 @@ static const int scriptForWritingSystem[] = {
static inline bool requiresOpenType(int writingSystem)
{
return ((writingSystem >= QFontDatabase::Syriac && writingSystem <= QFontDatabase::Sinhala)
- || writingSystem == QFontDatabase::Khmer);
+ || writingSystem == QFontDatabase::Khmer || writingSystem == QFontDatabase::Nko);
}
static inline bool scriptRequiresOpenType(int script)
{
return ((script >= QUnicodeTables::Syriac && script <= QUnicodeTables::Sinhala)
- || script == QUnicodeTables::Khmer);
+ || script == QUnicodeTables::Khmer || script == QUnicodeTables::Nko);
}
#endif
@@ -1558,6 +1565,7 @@ QFontDatabase::QFontDatabase()
\value Other (the same as Symbol)
\value Ogham
\value Runic
+ \value Nko
\omitvalue WritingSystemsCount
*/
@@ -2232,6 +2240,9 @@ QString QFontDatabase::writingSystemName(WritingSystem writingSystem)
case Runic:
name = QT_TRANSLATE_NOOP("QFontDatabase", "Runic");
break;
+ case Nko:
+ name = QT_TRANSLATE_NOOP("QFontDatabase", "N'Ko");
+ break;
default:
Q_ASSERT_X(false, "QFontDatabase::writingSystemName", "invalid 'writingSystem' parameter");
break;
@@ -2445,6 +2456,12 @@ QString QFontDatabase::writingSystemSample(WritingSystem writingSystem)
sample += QChar(0x16a2);
sample += QChar(0x16a3);
break;
+ case Nko:
+ sample += QChar(0x7ca);
+ sample += QChar(0x7cb);
+ sample += QChar(0x7cc);
+ sample += QChar(0x7cd);
+ break;
default:
break;
}
diff --git a/src/gui/text/qfontdatabase.h b/src/gui/text/qfontdatabase.h
index e6dcfc9a06..37b5860e13 100644
--- a/src/gui/text/qfontdatabase.h
+++ b/src/gui/text/qfontdatabase.h
@@ -108,6 +108,7 @@ public:
Ogham,
Runic,
+ Nko,
WritingSystemsCount
};
diff --git a/src/gui/text/qfontdatabase_x11.cpp b/src/gui/text/qfontdatabase_x11.cpp
index f184811df8..dd575f97b4 100644
--- a/src/gui/text/qfontdatabase_x11.cpp
+++ b/src/gui/text/qfontdatabase_x11.cpp
@@ -155,187 +155,187 @@ static const char writingSystems_for_xlfd_encoding[sizeof(xlfd_encoding)][QFontD
{ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// iso8859-2
{ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// iso8859-3
{ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// iso8859-4
{ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// iso8859-9
{ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// iso8859-10
{ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// iso8859-13
{ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// iso8859-14
{ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// iso8859-15
{ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// hp-roman8
{ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// iso8859-5
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// *-cp1251
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// koi8-ru
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// koi8-u
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// koi8-r
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// iso8859-7
{ 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// iso8859-8
{ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// gb18030-0
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// gb18030.2000-0
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// gbk-0
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// gb2312.*-0
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// jisx0201*-0
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
- 0 },
+ 0, 0 },
// jisx0208*-0
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
- 0 },
+ 0, 0 },
// ksc5601*-*
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
- 0 },
+ 0, 0 },
// big5hkscs-0
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 0 },
+ 0, 0 },
// hkscs-1
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 0 },
+ 0, 0 },
// big5*-*
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 0 },
+ 0, 0 },
// tscii-*
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// tis620*-*
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// iso8859-11
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// mulelao-1
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// ethiopic-unicode
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 },
+ 0, 0 },
// iso10646-1
{ 0, 1, 1, 1, 1, 1, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 1, 0, 1, 0, 1, 1, 0, 0, 0,
- 0 },
+ 0, 0 },
// unicode-*
{ 0, 1, 1, 1, 1, 1, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 1, 0, 1, 0, 1, 1, 0, 0, 0,
- 0 },
+ 0, 0 },
// *-symbol
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1 },
+ 1, 0 },
// *-fontspecific
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1 },
+ 1, 0 },
// fontspecific-*
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1 }
+ 1, 0 }
};
@@ -835,7 +835,8 @@ static const char *specialLanguages[] = {
"ko", // Hangul
"", // Ogham
"", // Runic
- "km" // Khmer
+ "km", // Khmer
+ "" // N'Ko
};
enum { SpecialLanguageCount = sizeof(specialLanguages) / sizeof(const char *) };
@@ -866,7 +867,8 @@ static const ushort specialChars[] = {
0, // Hangul
0x1681, // Ogham
0x16a0, // Runic
- 0 // Khmer
+ 0, // Khmer
+ 0x7ca // N'Ko
};
enum { SpecialCharCount = sizeof(specialChars) / sizeof(ushort) };
@@ -905,7 +907,8 @@ static const char *languageForWritingSystem[] = {
"vi", // Vietnamese
0, // Symbol
0, // Ogham
- 0 // Runic
+ 0, // Runic
+ 0 // N'Ko
};
enum { LanguageCount = sizeof(languageForWritingSystem) / sizeof(const char *) };
@@ -944,7 +947,8 @@ static const ushort sampleCharForWritingSystem[] = {
0, // Vietnamese
0, // Symbol
0x1681, // Ogham
- 0x16a0 // Runic
+ 0x16a0, // Runic
+ 0x7ca // N'Ko
};
enum { SampleCharCount = sizeof(sampleCharForWritingSystem) / sizeof(ushort) };
@@ -984,7 +988,8 @@ static const char *openType[] = {
0, // Vietnamese
0, // Symbol
0, // Ogham
- 0 // Runic
+ 0, // Runic
+ "nko " // N'Ko
};
enum { OpenTypeCount = sizeof(openType) / sizeof(const char *) };
@@ -1472,7 +1477,7 @@ void qt_addPatternProps(FcPattern *pattern, int screen, int script, const QFontD
!(request.styleStrategy & QFont::NoAntialias));
}
- if (script != QUnicodeTables::Common) {
+ if (script != QUnicodeTables::Common && *specialLanguages[script] != '\0') {
Q_ASSERT(script < QUnicodeTables::ScriptCount);
FcLangSet *ls = FcLangSetCreate();
FcLangSetAdd(ls, (const FcChar8*)specialLanguages[script]);
@@ -1615,7 +1620,7 @@ static QFontEngine *tryPatternLoad(FcPattern *p, int screen,
goto done;
if (!FcCharSetHasChar(cs, specialChars[script]))
goto done;
- } else {
+ } else if (*specialLanguages[script] != '\0'){
FcLangSet *langSet = 0;
if (FcPatternGetLangSet(match, FC_LANG, 0, &langSet) != FcResultMatch)
goto done;
diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp
index 94974fca5c..f978bd897c 100644
--- a/src/gui/text/qfontengine_qpf.cpp
+++ b/src/gui/text/qfontengine_qpf.cpp
@@ -938,7 +938,7 @@ void QFontEngineQPF::loadGlyph(glyph_t glyph)
g.advance = qRound(metrics.xoff);
QT_WRITE(fd, &g, sizeof(g));
- QT_WRITE(fd, img.bits(), img.numBytes());
+ QT_WRITE(fd, img.bits(), img.byteCount());
glyphPos = oldSize - glyphDataOffset;
#if 0 && defined(DEBUG_FONTENGINE)
@@ -948,7 +948,7 @@ void QFontEngineQPF::loadGlyph(glyph_t glyph)
quint32 *gmap = (quint32 *)(fontData + glyphMapOffset);
gmap[glyph] = qToBigEndian(glyphPos);
- glyphDataSize = glyphPos + sizeof(g) + img.numBytes();
+ glyphDataSize = glyphPos + sizeof(g) + img.byteCount();
quint32 *blockSizePtr = (quint32 *)(fontData + glyphDataOffset - 4);
*blockSizePtr = qToBigEndian(glyphDataSize);
}
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index 9497b6fbc0..2bfe33c56d 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -911,7 +911,7 @@ void QTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget *conte
break;
case QEvent::MouseButtonPress: {
QMouseEvent *ev = static_cast<QMouseEvent *>(e);
- d->mousePressEvent(ev->button(), matrix.map(ev->pos()), ev->modifiers(),
+ d->mousePressEvent(ev, ev->button(), matrix.map(ev->pos()), ev->modifiers(),
ev->buttons(), ev->globalPos());
break; }
case QEvent::MouseMove: {
@@ -979,7 +979,7 @@ void QTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget *conte
#ifndef QT_NO_GRAPHICSVIEW
case QEvent::GraphicsSceneMousePress: {
QGraphicsSceneMouseEvent *ev = static_cast<QGraphicsSceneMouseEvent *>(e);
- d->mousePressEvent(ev->button(), matrix.map(ev->pos()), ev->modifiers(), ev->buttons(),
+ d->mousePressEvent(ev, ev->button(), matrix.map(ev->pos()), ev->modifiers(), ev->buttons(),
ev->screenPos());
break; }
case QEvent::GraphicsSceneMouseMove: {
@@ -1296,7 +1296,9 @@ QVariant QTextControl::loadResource(int type, const QUrl &name)
void QTextControlPrivate::_q_updateBlock(const QTextBlock &block)
{
Q_Q(QTextControl);
- emit q->updateRequest(q->blockBoundingRect(block));
+ QRectF br = q->blockBoundingRect(block);
+ br.setRight(qreal(INT_MAX)); // the block might have shrunk
+ emit q->updateRequest(br);
}
QRectF QTextControlPrivate::rectForPosition(int position) const
@@ -1465,7 +1467,7 @@ QRectF QTextControl::selectionRect() const
return selectionRect(d->cursor);
}
-void QTextControlPrivate::mousePressEvent(Qt::MouseButton button, const QPointF &pos, Qt::KeyboardModifiers modifiers,
+void QTextControlPrivate::mousePressEvent(QEvent *e, Qt::MouseButton button, const QPointF &pos, Qt::KeyboardModifiers modifiers,
Qt::MouseButtons buttons, const QPoint &globalPos)
{
Q_Q(QTextControl);
@@ -1479,11 +1481,11 @@ void QTextControlPrivate::mousePressEvent(Qt::MouseButton button, const QPointF
cursor.clearSelection();
}
}
- if (!(button & Qt::LeftButton))
- return;
-
- if (!((interactionFlags & Qt::TextSelectableByMouse) || (interactionFlags & Qt::TextEditable)))
- return;
+ if (!(button & Qt::LeftButton) ||
+ !((interactionFlags & Qt::TextSelectableByMouse) || (interactionFlags & Qt::TextEditable))) {
+ e->ignore();
+ return;
+ }
cursorIsFocusIndicator = false;
const QTextCursor oldSelection = cursor;
@@ -1507,8 +1509,10 @@ void QTextControlPrivate::mousePressEvent(Qt::MouseButton button, const QPointF
trippleClickTimer.stop();
} else {
int cursorPos = q->hitTest(pos, Qt::FuzzyHit);
- if (cursorPos == -1)
+ if (cursorPos == -1) {
+ e->ignore();
return;
+ }
#if !defined(QT_NO_IM)
QTextLayout *layout = cursor.block().layout();
@@ -1519,8 +1523,10 @@ void QTextControlPrivate::mousePressEvent(Qt::MouseButton button, const QPointF
button, buttons, modifiers);
ctx->mouseHandler(cursorPos - cursor.position(), &ev);
}
- if (!layout->preeditAreaText().isEmpty())
+ if (!layout->preeditAreaText().isEmpty()) {
+ e->ignore();
return;
+ }
}
#endif
if (modifiers == Qt::ShiftModifier) {
diff --git a/src/gui/text/qtextcontrol_p_p.h b/src/gui/text/qtextcontrol_p_p.h
index ca9db9f9d3..66459f6443 100644
--- a/src/gui/text/qtextcontrol_p_p.h
+++ b/src/gui/text/qtextcontrol_p_p.h
@@ -131,10 +131,10 @@ public:
QString anchorForCursor(const QTextCursor &anchor) const;
void keyPressEvent(QKeyEvent *e);
- void mousePressEvent(Qt::MouseButton button, const QPointF &pos,
+ void mousePressEvent(QEvent *e, Qt::MouseButton button, const QPointF &pos,
Qt::KeyboardModifiers modifiers,
Qt::MouseButtons buttons,
- const QPoint &globalPos = QPoint());
+ const QPoint &globalPos);
void mouseMoveEvent(Qt::MouseButtons buttons, const QPointF &pos);
void mouseReleaseEvent(Qt::MouseButton button, const QPointF &pos);
void mouseDoubleClickEvent(QEvent *e, Qt::MouseButton button, const QPointF &pos);
diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp
index 85b539f20d..fd84949a63 100644
--- a/src/gui/util/qdesktopservices.cpp
+++ b/src/gui/util/qdesktopservices.cpp
@@ -293,8 +293,6 @@ void QDesktopServices::unsetUrlHandler(const QString &scheme)
have desktop concept, DesktopLocation returns same path as DocumentsLocation.
Rest of the standard locations point to folder on same drive with executable, except
that if executable is in ROM the folder from C drive is returned.
-
- \endcode
*/
/*!
diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp
index 7d81d5a4e2..b0d0baf1c3 100644
--- a/src/gui/widgets/qabstractscrollarea.cpp
+++ b/src/gui/widgets/qabstractscrollarea.cpp
@@ -51,6 +51,7 @@
#include "qdebug.h"
#include "qboxlayout.h"
#include "qpainter.h"
+#include "qmargins.h"
#include "qabstractscrollarea_p.h"
#include <qwidget.h>
@@ -868,6 +869,22 @@ void QAbstractScrollArea::setViewportMargins(int left, int top, int right, int b
}
/*!
+ \since 4.6
+ Sets \a margins around the scrolling area. This is useful for
+ applications such as spreadsheets with "locked" rows and columns.
+ The marginal space is is left blank; put widgets in the unused
+ area.
+
+ By default all margins are zero.
+
+*/
+void QAbstractScrollArea::setViewportMargins(const QMargins &margins)
+{
+ setViewportMargins(margins.left(), margins.top(),
+ margins.right(), margins.bottom());
+}
+
+/*!
\fn bool QAbstractScrollArea::event(QEvent *event)
\reimp
@@ -946,7 +963,7 @@ bool QAbstractScrollArea::event(QEvent *e)
if (g) {
QScrollBar *hBar = horizontalScrollBar();
QScrollBar *vBar = verticalScrollBar();
- QPointF delta = g->lastOffset();
+ QPointF delta = g->delta();
if (!delta.isNull()) {
if (QApplication::isRightToLeft())
delta.rx() *= -1;
diff --git a/src/gui/widgets/qabstractscrollarea.h b/src/gui/widgets/qabstractscrollarea.h
index b3a18616c6..18d1e96e62 100644
--- a/src/gui/widgets/qabstractscrollarea.h
+++ b/src/gui/widgets/qabstractscrollarea.h
@@ -52,6 +52,7 @@ QT_MODULE(Gui)
#ifndef QT_NO_SCROLLAREA
+class QMargins;
class QScrollBar;
class QAbstractScrollAreaPrivate;
@@ -95,6 +96,7 @@ protected Q_SLOTS:
protected:
QAbstractScrollArea(QAbstractScrollAreaPrivate &dd, QWidget *parent = 0);
void setViewportMargins(int left, int top, int right, int bottom);
+ void setViewportMargins(const QMargins &margins);
bool event(QEvent *);
virtual bool viewportEvent(QEvent *);
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index 1879db4d03..bd1d8ba1f2 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -1111,6 +1111,32 @@ void QComboBoxPrivate::updateLineEditGeometry()
lineEdit->setGeometry(editRect);
}
+Qt::MatchFlags QComboBoxPrivate::matchFlags() const
+{
+ // Base how duplicates are determined on the autocompletion case sensitivity
+ Qt::MatchFlags flags = Qt::MatchFixedString;
+#ifndef QT_NO_COMPLETER
+ if (!lineEdit->completer() || lineEdit->completer()->caseSensitivity() == Qt::CaseSensitive)
+#endif
+ flags |= Qt::MatchCaseSensitive;
+ return flags;
+}
+
+
+void QComboBoxPrivate::_q_editingFinished()
+{
+ Q_Q(QComboBox);
+ if (lineEdit && !lineEdit->text().isEmpty()) {
+ //here we just check if the current item was entered
+ const int index = q_func()->findText(lineEdit->text(), matchFlags());
+ if (index != -1 && itemText(currentIndex) != lineEdit->text()) {
+ q->setCurrentIndex(index);
+ emitActivated(currentIndex);
+ }
+ }
+
+}
+
void QComboBoxPrivate::_q_returnPressed()
{
Q_Q(QComboBox);
@@ -1123,13 +1149,7 @@ void QComboBoxPrivate::_q_returnPressed()
// check for duplicates (if not enabled) and quit
int index = -1;
if (!duplicatesEnabled) {
- // Base how duplicates are determined on the autocompletion case sensitivity
- Qt::MatchFlags flags = Qt::MatchFixedString;
-#ifndef QT_NO_COMPLETER
- if (!lineEdit->completer() || lineEdit->completer()->caseSensitivity() == Qt::CaseSensitive)
-#endif
- flags |= Qt::MatchCaseSensitive;
- index = q->findText(text, flags);
+ index = q->findText(text, matchFlags());
if (index != -1) {
q->setCurrentIndex(index);
emitActivated(currentIndex);
@@ -1664,6 +1684,7 @@ void QComboBox::setLineEdit(QLineEdit *edit)
if (d->lineEdit->parent() != this)
d->lineEdit->setParent(this);
connect(d->lineEdit, SIGNAL(returnPressed()), this, SLOT(_q_returnPressed()));
+ connect(d->lineEdit, SIGNAL(editingFinished()), this, SLOT(_q_editingFinished()));
connect(d->lineEdit, SIGNAL(textChanged(QString)), this, SIGNAL(editTextChanged(QString)));
#ifdef QT3_SUPPORT
connect(d->lineEdit, SIGNAL(textChanged(QString)), this, SIGNAL(textChanged(QString)));
@@ -1960,7 +1981,7 @@ void QComboBoxPrivate::setCurrentIndex(const QModelIndex &mi)
if (lineEdit) {
QString newText = q->itemText(currentIndex.row());
if (lineEdit->text() != newText)
- lineEdit->setText(q->itemText(currentIndex.row()));
+ lineEdit->setText(newText);
updateLineEditGeometry();
}
if (indexChanged) {
diff --git a/src/gui/widgets/qcombobox.h b/src/gui/widgets/qcombobox.h
index 0652594979..5d5ea21287 100644
--- a/src/gui/widgets/qcombobox.h
+++ b/src/gui/widgets/qcombobox.h
@@ -304,6 +304,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_itemSelected(const QModelIndex &item))
Q_PRIVATE_SLOT(d_func(), void _q_emitHighlighted(const QModelIndex &))
Q_PRIVATE_SLOT(d_func(), void _q_emitCurrentIndexChanged(const QModelIndex &index))
+ Q_PRIVATE_SLOT(d_func(), void _q_editingFinished())
Q_PRIVATE_SLOT(d_func(), void _q_returnPressed())
Q_PRIVATE_SLOT(d_func(), void _q_resetButton())
Q_PRIVATE_SLOT(d_func(), void _q_dataChanged(const QModelIndex &, const QModelIndex &))
diff --git a/src/gui/widgets/qcombobox_p.h b/src/gui/widgets/qcombobox_p.h
index fe42c47aba..f6ba57cd84 100644
--- a/src/gui/widgets/qcombobox_p.h
+++ b/src/gui/widgets/qcombobox_p.h
@@ -342,6 +342,8 @@ public:
void init();
QComboBoxPrivateContainer* viewContainer();
void updateLineEditGeometry();
+ Qt::MatchFlags matchFlags() const;
+ void _q_editingFinished();
void _q_returnPressed();
void _q_complete();
void _q_itemSelected(const QModelIndex &item);
diff --git a/src/gui/widgets/qlcdnumber.cpp b/src/gui/widgets/qlcdnumber.cpp
index 9f9e353906..f33a98f976 100644
--- a/src/gui/widgets/qlcdnumber.cpp
+++ b/src/gui/widgets/qlcdnumber.cpp
@@ -85,7 +85,7 @@ public:
decimal point with setSmallDecimalPoint().
QLCDNumber emits the overflow() signal when it is asked to display
- something beyond its range. The range is set by setNumDigits(),
+ something beyond its range. The range is set by setDigitCount(),
but setSmallDecimalPoint() also influences it. If the display is
set to hexadecimal, octal or binary, the integer equivalent of the
value is displayed.
@@ -160,7 +160,7 @@ public:
This signal is emitted whenever the QLCDNumber is asked to display
a too-large number or a too-long string.
- It is never emitted by setNumDigits().
+ It is never emitted by setDigitCount().
*/
@@ -345,7 +345,7 @@ static const char *getSegments(char ch) // gets list of segments f
The \a parent and \a name arguments are passed to the QFrame
constructor.
- \sa setNumDigits(), setSmallDecimalPoint()
+ \sa setDigitCount(), setSmallDecimalPoint()
*/
QLCDNumber::QLCDNumber(QWidget *parent, const char *name)
@@ -367,7 +367,7 @@ QLCDNumber::QLCDNumber(QWidget *parent, const char *name)
The \a parent and \a name arguments are passed to the QFrame
constructor.
- \sa setNumDigits(), setSmallDecimalPoint()
+ \sa setDigitCount(), setSmallDecimalPoint()
*/
QLCDNumber::QLCDNumber(uint numDigits, QWidget *parent, const char *name)
@@ -387,7 +387,7 @@ QLCDNumber::QLCDNumber(uint numDigits, QWidget *parent, const char *name)
The \a parent argument is passed to the QFrame constructor.
- \sa setNumDigits(), setSmallDecimalPoint()
+ \sa setDigitCount(), setSmallDecimalPoint()
*/
QLCDNumber::QLCDNumber(QWidget *parent)
@@ -407,7 +407,7 @@ QLCDNumber::QLCDNumber(QWidget *parent)
The \a parent argument is passed to the QFrame constructor.
- \sa setNumDigits(), setSmallDecimalPoint()
+ \sa setDigitCount(), setSmallDecimalPoint()
*/
QLCDNumber::QLCDNumber(uint numDigits, QWidget *parent)
@@ -426,7 +426,7 @@ void QLCDNumberPrivate::init()
val = 0;
base = QLCDNumber::Dec;
smallPoint = false;
- q->setNumDigits(ndigits);
+ q->setDigitCount(ndigits);
q->setSegmentStyle(QLCDNumber::Filled);
q->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
}
@@ -441,8 +441,21 @@ QLCDNumber::~QLCDNumber()
/*!
+ \obsolete
\property QLCDNumber::numDigits
\brief the current number of digits displayed
+ \sa setDigitCount
+*/
+
+void QLCDNumber::setNumDigits(int numDigits)
+{
+ setDigitCount(numDigits);
+}
+
+/*!
+ \since 4.6
+ \property QLCDNumber::digitCount
+ \brief the current number of digits displayed
Corresponds to the current number of digits. If \l
QLCDNumber::smallDecimalPoint is false, the decimal point occupies
@@ -453,7 +466,7 @@ QLCDNumber::~QLCDNumber()
\sa smallDecimalPoint
*/
-void QLCDNumber::setNumDigits(int numDigits)
+void QLCDNumber::setDigitCount(int numDigits)
{
Q_D(QLCDNumber);
if (numDigits > 99) {
@@ -508,13 +521,19 @@ int QLCDNumber::numDigits() const
return d->ndigits;
}
+int QLCDNumber::digitCount() const
+{
+ Q_D(const QLCDNumber);
+ return d->ndigits;
+}
+
/*!
\overload
Returns true if \a num is too big to be displayed in its entirety;
otherwise returns false.
- \sa display(), numDigits(), smallDecimalPoint()
+ \sa display(), digitCount(), smallDecimalPoint()
*/
bool QLCDNumber::checkOverflow(int num) const
@@ -530,7 +549,7 @@ bool QLCDNumber::checkOverflow(int num) const
Returns true if \a num is too big to be displayed in its entirety;
otherwise returns false.
- \sa display(), numDigits(), smallDecimalPoint()
+ \sa display(), digitCount(), smallDecimalPoint()
*/
bool QLCDNumber::checkOverflow(double num) const
@@ -1256,7 +1275,7 @@ QLCDNumber::SegmentStyle QLCDNumber::segmentStyle() const
*/
QSize QLCDNumber::sizeHint() const
{
- return QSize(10 + 9 * (numDigits() + (smallDecimalPoint() ? 0 : 1)), 23);
+ return QSize(10 + 9 * (digitCount() + (smallDecimalPoint() ? 0 : 1)), 23);
}
/*! \reimp */
diff --git a/src/gui/widgets/qlcdnumber.h b/src/gui/widgets/qlcdnumber.h
index 9753f312ba..e65637deef 100644
--- a/src/gui/widgets/qlcdnumber.h
+++ b/src/gui/widgets/qlcdnumber.h
@@ -60,6 +60,7 @@ class Q_GUI_EXPORT QLCDNumber : public QFrame // LCD number widget
Q_ENUMS(Mode SegmentStyle)
Q_PROPERTY(bool smallDecimalPoint READ smallDecimalPoint WRITE setSmallDecimalPoint)
Q_PROPERTY(int numDigits READ numDigits WRITE setNumDigits)
+ Q_PROPERTY(int digitCount READ digitCount WRITE setDigitCount)
Q_PROPERTY(Mode mode READ mode WRITE setMode)
Q_PROPERTY(SegmentStyle segmentStyle READ segmentStyle WRITE setSegmentStyle)
Q_PROPERTY(double value READ value WRITE display)
@@ -82,8 +83,10 @@ public:
bool smallDecimalPoint() const;
- int numDigits() const;
- void setNumDigits(int nDigits);
+ QT_DEPRECATED int numDigits() const;
+ QT_DEPRECATED void setNumDigits(int nDigits);
+ int digitCount() const;
+ void setDigitCount(int nDigits);
bool checkOverflow(double num) const;
bool checkOverflow(int num) const;
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index 0fc94c9d9d..2914164581 100644
--- a/src/gui/widgets/qlinecontrol.cpp
+++ b/src/gui/widgets/qlinecontrol.cpp
@@ -1511,6 +1511,18 @@ void QLineControl::processKeyEvent(QKeyEvent* event)
}
#endif // QT_NO_COMPLETER
+ if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return) {
+ if (hasAcceptableInput() || fixup()) {
+ emit accepted();
+ emit editingFinished();
+ }
+ if (inlineCompletionAccepted)
+ event->accept();
+ else
+ event->ignore();
+ return;
+ }
+
if (echoMode() == QLineEdit::PasswordEchoOnEdit
&& !passwordEchoEditing()
&& !isReadOnly()
@@ -1531,17 +1543,6 @@ void QLineControl::processKeyEvent(QKeyEvent* event)
clear();
}
- if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return) {
- if (hasAcceptableInput() || fixup()) {
- emit accepted();
- emit editingFinished();
- }
- if (inlineCompletionAccepted)
- event->accept();
- else
- event->ignore();
- return;
- }
bool unknown = false;
if (false) {
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index e4252b5572..f5dbe1c001 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -1102,6 +1102,17 @@ void QLineEdit::setTextMargins(int left, int top, int right, int bottom)
}
/*!
+ \since 4.6
+ Sets the \a margins around the text inside the frame.
+
+ See also textMargins().
+*/
+void QLineEdit::setTextMargins(const QMargins &margins)
+{
+ setTextMargins(margins.left(), margins.top(), margins.right(), margins.bottom());
+}
+
+/*!
Returns the widget's text margins for \a left, \a top, \a right, and \a bottom.
\since 4.5
@@ -1121,6 +1132,18 @@ void QLineEdit::getTextMargins(int *left, int *top, int *right, int *bottom) con
}
/*!
+ \since 4.6
+ Returns the widget's text margins.
+
+ \sa setTextMargins()
+*/
+QMargins QLineEdit::textMargins() const
+{
+ Q_D(const QLineEdit);
+ return QMargins(d->leftTextMargin, d->topTextMargin, d->rightTextMargin, d->bottomTextMargin);
+}
+
+/*!
\property QLineEdit::inputMask
\brief The validation input mask
diff --git a/src/gui/widgets/qlineedit.h b/src/gui/widgets/qlineedit.h
index 214509a505..ac918c716e 100644
--- a/src/gui/widgets/qlineedit.h
+++ b/src/gui/widgets/qlineedit.h
@@ -44,6 +44,7 @@
#include <QtGui/qframe.h>
#include <QtCore/qstring.h>
+#include <QtCore/qmargins.h>
QT_BEGIN_HEADER
@@ -158,7 +159,9 @@ public:
bool hasAcceptableInput() const;
void setTextMargins(int left, int top, int right, int bottom);
+ void setTextMargins(const QMargins &margins);
void getTextMargins(int *left, int *top, int *right, int *bottom) const;
+ QMargins textMargins() const;
public Q_SLOTS:
void setText(const QString &);
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index 1b5d1cd1f5..cc39b7f891 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -273,7 +273,7 @@ void QMenuPrivate::updateActionRects() const
for (int i = 0; i < actions.count(); ++i) {
QAction *action = actions.at(i);
- if (action->isSeparator() || !action->isVisible() || widgetItems.at(i))
+ if (action->isSeparator() || !action->isVisible() || widgetItems.contains(action))
continue;
//..and some members
hasCheckableItems |= action->isCheckable();
@@ -301,7 +301,7 @@ void QMenuPrivate::updateActionRects() const
const QFontMetrics &fm = opt.fontMetrics;
QSize sz;
- if (QWidget *w = widgetItems.at(i)) {
+ if (QWidget *w = widgetItems.value(action)) {
sz = w->sizeHint().expandedTo(w->minimumSize()).expandedTo(w->minimumSizeHint()).boundedTo(w->maximumSize());
} else {
//calc what I think the size is..
@@ -370,7 +370,7 @@ void QMenuPrivate::updateActionRects() const
rect.setWidth(max_column_width); //uniform width
//we need to update the widgets geometry
- if (QWidget *widget = widgetItems.at(i)) {
+ if (QWidget *widget = widgetItems.value(actions.at(i))) {
widget->setGeometry(rect);
widget->setVisible(actions.at(i)->isVisible());
}
@@ -583,8 +583,7 @@ void QMenuPrivate::setCurrentAction(QAction *action, int popup, SelectionReason
q->update(actionRect(action));
if (reason == SelectedFromKeyboard) {
- const int actionIndex = actions.indexOf(action);
- QWidget *widget = widgetItems.at(actionIndex);
+ QWidget *widget = widgetItems.value(action);
if (widget) {
if (widget->focusPolicy() != Qt::NoFocus)
widget->setFocus(Qt::TabFocusReason);
@@ -800,7 +799,7 @@ void QMenuPrivate::scrollMenu(QAction *action, QMenuScroller::ScrollLocation loc
current.moveTop(current.top() + delta);
//we need to update the widgets geometry
- if (QWidget *w = widgetItems.at(i))
+ if (QWidget *w = widgetItems.value(actions.at(i)))
w->setGeometry(current);
}
}
@@ -1392,11 +1391,12 @@ QMenu::QMenu(QMenuPrivate &dd, QWidget *parent)
QMenu::~QMenu()
{
Q_D(QMenu);
- for (int i = 0; i < d->widgetItems.count(); ++i) {
- if (QWidget *widget = d->widgetItems.at(i)) {
- QWidgetAction *action = static_cast<QWidgetAction *>(d->actions.at(i));
+ QHash<QAction *, QWidget *>::iterator it = d->widgetItems.begin();
+ for (; it != d->widgetItems.end(); ++it) {
+ if (QWidget *widget = it.value()) {
+ QWidgetAction *action = static_cast<QWidgetAction *>(it.key());
action->releaseWidget(widget);
- d->widgetItems[i] = 0;
+ *it = 0;
}
}
@@ -1878,9 +1878,11 @@ void QMenu::popup(const QPoint &p, QAction *atAction)
if(snapToMouse) //position flowing left from the mouse
pos.setX(mouse.x()-size.width());
+#ifndef QT_NO_MENUBAR
//if in a menubar, it should be right-aligned
if (qobject_cast<QMenuBar*>(d->causedPopup.widget))
pos.rx() -= size.width();
+#endif //QT_NO_MENUBAR
if (pos.x() < screen.left()+desktopFrame)
pos.setX(qMax(p.x(), screen.left()+desktopFrame));
@@ -2151,7 +2153,7 @@ void QMenu::paintEvent(QPaintEvent *e)
QAction *action = d->actions.at(i);
QRect adjustedActionRect = d->actionRects.at(i);
if (!e->rect().intersects(adjustedActionRect)
- || d->widgetItems.at(i))
+ || d->widgetItems.value(action))
continue;
//set the clip region to be extra safe (and adjust for the scrollers)
QRegion adjustedActionReg(adjustedActionRect);
@@ -2862,25 +2864,20 @@ void QMenu::actionEvent(QActionEvent *e)
connect(e->action(), SIGNAL(triggered()), this, SLOT(_q_actionTriggered()));
connect(e->action(), SIGNAL(hovered()), this, SLOT(_q_actionHovered()));
}
- QWidget *widget = 0;
- if (QWidgetAction *wa = qobject_cast<QWidgetAction *>(e->action()))
- widget = wa->requestWidget(this);
-
- int index = d->actions.indexOf(e->action());
- Q_ASSERT(index != -1);
- d->widgetItems.insert(index, widget);
-
+ if (QWidgetAction *wa = qobject_cast<QWidgetAction *>(e->action())) {
+ QWidget *widget = wa->requestWidget(this);
+ if (widget)
+ d->widgetItems.insert(wa, widget);
+ }
} else if (e->type() == QEvent::ActionRemoved) {
e->action()->disconnect(this);
if (e->action() == d->currentAction)
d->currentAction = 0;
- int index = d->actions.indexOf(e->before()) + 1;
if (QWidgetAction *wa = qobject_cast<QWidgetAction *>(e->action())) {
- if (QWidget *widget = d->widgetItems.at(index))
+ if (QWidget *widget = d->widgetItems.value(wa))
wa->releaseWidget(widget);
}
- Q_ASSERT(index != -1);
- d->widgetItems.removeAt(index);
+ d->widgetItems.remove(e->action());
}
#ifdef Q_WS_MAC
diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm
index b238faf2a0..9510cc666d 100644
--- a/src/gui/widgets/qmenu_mac.mm
+++ b/src/gui/widgets/qmenu_mac.mm
@@ -1191,7 +1191,7 @@ QMenuPrivate::QMacMenuPrivate::addAction(QMacMenuAction *action, QMacMenuAction
#endif
}
- QWidget *widget = qmenu ? qmenu->widgetItems.value(qmenu->actions.indexOf(action->action)) : 0;
+ QWidget *widget = qmenu ? qmenu->widgetItems.value(action->action) : 0;
if (widget) {
#ifndef QT_MAC_USE_COCOA
ChangeMenuAttributes(action->menu, kMenuAttrDoNotCacheImage, 0);
diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h
index 9348f7bd53..a5bde7c39c 100644
--- a/src/gui/widgets/qmenu_p.h
+++ b/src/gui/widgets/qmenu_p.h
@@ -190,7 +190,7 @@ public:
QRect actionRect(QAction *) const;
mutable QVector<QRect> actionRects;
- mutable QWidgetList widgetItems;
+ mutable QHash<QAction *, QWidget *> widgetItems;
void updateActionRects() const;
QRect popupGeometry(const QWidget *widget) const;
QRect popupGeometry(int screen = -1) const;
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index 0de7421f16..18adc6ce9d 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -1465,7 +1465,7 @@ bool QPlainTextEdit::event(QEvent *e)
// QPlainTextEdit scrolls by lines only in vertical direction
QFontMetrics fm(document()->defaultFont());
int lineHeight = fm.height();
- int newX = hBar->value() - g->lastOffset().x();
+ int newX = hBar->value() - g->delta().x();
int newY = d->originalOffsetY - offset.y()/lineHeight;
hBar->setValue(newX);
vBar->setValue(newY);
diff --git a/src/gui/widgets/qprintpreviewwidget.cpp b/src/gui/widgets/qprintpreviewwidget.cpp
index d92b1ea3a2..0074c91cc7 100644
--- a/src/gui/widgets/qprintpreviewwidget.cpp
+++ b/src/gui/widgets/qprintpreviewwidget.cpp
@@ -663,7 +663,9 @@ void QPrintPreviewWidget::setZoomFactor(qreal factor)
}
/*!
+ \obsolete
Returns the number of pages in the preview.
+ \sa pageCount()
*/
int QPrintPreviewWidget::numPages() const
{
@@ -672,6 +674,16 @@ int QPrintPreviewWidget::numPages() const
}
/*!
+ \since 4.6
+ Returns the number of pages in the preview.
+*/
+int QPrintPreviewWidget::pageCount() const
+{
+ Q_D(const QPrintPreviewWidget);
+ return d->pages.size();
+}
+
+/*!
Returns the currently viewed page in the preview.
*/
int QPrintPreviewWidget::currentPage() const
diff --git a/src/gui/widgets/qprintpreviewwidget.h b/src/gui/widgets/qprintpreviewwidget.h
index 2823873a6c..08e596d43a 100644
--- a/src/gui/widgets/qprintpreviewwidget.h
+++ b/src/gui/widgets/qprintpreviewwidget.h
@@ -82,7 +82,8 @@ public:
ViewMode viewMode() const;
ZoomMode zoomMode() const;
int currentPage() const;
- int numPages() const;
+ QT_DEPRECATED int numPages() const;
+ int pageCount() const;
void setVisible(bool visible);
public Q_SLOTS:
diff --git a/src/gui/widgets/qwidgetanimator.cpp b/src/gui/widgets/qwidgetanimator.cpp
index bdd3c75a15..13ee346445 100644
--- a/src/gui/widgets/qwidgetanimator.cpp
+++ b/src/gui/widgets/qwidgetanimator.cpp
@@ -88,8 +88,6 @@ void QWidgetAnimator::animate(QWidget *widget, const QRect &_final_geometry, boo
const QRect final_geometry = _final_geometry.isValid() || widget->isWindow() ? _final_geometry :
QRect(QPoint(-500 - widget->width(), -500 - widget->height()), widget->size());
- if (r == final_geometry)
- return; //the widget is already where it should be
#ifndef QT_NO_ANIMATION
AnimationMap::const_iterator it = m_animation_map.constFind(widget);
if (it != m_animation_map.constEnd() && (*it)->endValue().toRect() == final_geometry)
@@ -116,9 +114,4 @@ bool QWidgetAnimator::animating() const
return !m_animation_map.isEmpty();
}
-bool QWidgetAnimator::animating(QWidget *widget) const
-{
- return m_animation_map.contains(widget);
-}
-
QT_END_NAMESPACE
diff --git a/src/gui/widgets/qwidgetanimator_p.h b/src/gui/widgets/qwidgetanimator_p.h
index 68d93441ea..095380feb1 100644
--- a/src/gui/widgets/qwidgetanimator_p.h
+++ b/src/gui/widgets/qwidgetanimator_p.h
@@ -70,7 +70,6 @@ public:
QWidgetAnimator(QMainWindowLayout *layout);
void animate(QWidget *widget, const QRect &final_geometry, bool animate);
bool animating() const;
- bool animating(QWidget *widget) const;
void abort(QWidget *widget);
diff --git a/src/multimedia/video/qimagevideobuffer.cpp b/src/multimedia/video/qimagevideobuffer.cpp
index bfeb2a08ee..e57adb6bee 100644
--- a/src/multimedia/video/qimagevideobuffer.cpp
+++ b/src/multimedia/video/qimagevideobuffer.cpp
@@ -85,7 +85,7 @@ uchar *QImageVideoBuffer::map(MapMode mode, int *numBytes, int *bytesPerLine)
d->mapMode = mode;
if (numBytes)
- *numBytes = d->image.numBytes();
+ *numBytes = d->image.byteCount();
if (bytesPerLine)
*bytesPerLine = d->image.bytesPerLine();
diff --git a/src/network/access/qnetworkaccessdebugpipebackend.cpp b/src/network/access/qnetworkaccessdebugpipebackend.cpp
index 4f7f15cb31..fecbe832a9 100644
--- a/src/network/access/qnetworkaccessdebugpipebackend.cpp
+++ b/src/network/access/qnetworkaccessdebugpipebackend.cpp
@@ -229,7 +229,7 @@ void QNetworkAccessDebugPipeBackend::possiblyFinish()
void QNetworkAccessDebugPipeBackend::closeDownstreamChannel()
{
- qWarning("QNetworkAccessDebugPipeBackend::closeDownstreamChannel()",operation());;
+ qWarning("QNetworkAccessDebugPipeBackend::closeDownstreamChannel() %d",operation());;
//if (operation() == QNetworkAccessManager::GetOperation)
// socket.disconnectFromHost();
}
@@ -237,7 +237,7 @@ void QNetworkAccessDebugPipeBackend::closeDownstreamChannel()
void QNetworkAccessDebugPipeBackend::socketError()
{
- qWarning("QNetworkAccessDebugPipeBackend::socketError()", socket.error());
+ qWarning("QNetworkAccessDebugPipeBackend::socketError() %d",socket.error());
QNetworkReply::NetworkError code;
switch (socket.error()) {
case QAbstractSocket::RemoteHostClosedError:
diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp
index 73a8703351..7dfb7af22a 100644
--- a/src/network/access/qnetworkcookie.cpp
+++ b/src/network/access/qnetworkcookie.cpp
@@ -984,14 +984,14 @@ QList<QNetworkCookie> QNetworkCookiePrivate::parseSetCookieHeaderLine(const QByt
cookie.setExpirationDate(dt);
} else if (field.first == "domain") {
QByteArray rawDomain = field.second;
+ QString maybeLeadingDot;
if (rawDomain.startsWith('.')) {
+ maybeLeadingDot = QLatin1Char('.');
rawDomain = rawDomain.mid(1);
}
+
QString normalizedDomain = QUrl::fromAce(QUrl::toAce(QString::fromUtf8(rawDomain)));
- // always add the dot, there are some servers that forget the
- // leading dot. This is actually forbidden according to RFC 2109,
- // but all browsers accept it anyway so we do that as well
- cookie.setDomain(QLatin1Char('.') + normalizedDomain);
+ cookie.setDomain(maybeLeadingDot + normalizedDomain);
} else if (field.first == "max-age") {
bool ok = false;
int secs = field.second.toInt(&ok);
diff --git a/src/network/access/qnetworkcookiejar.cpp b/src/network/access/qnetworkcookiejar.cpp
index 8430966f6f..19f7217fd7 100644
--- a/src/network/access/qnetworkcookiejar.cpp
+++ b/src/network/access/qnetworkcookiejar.cpp
@@ -198,6 +198,13 @@ bool QNetworkCookieJar::setCookiesFromUrl(const QList<QNetworkCookie> &cookieLis
if (cookie.domain().isEmpty()) {
cookie.setDomain(defaultDomain);
} else {
+ // Ensure the domain starts with a dot if its field was not empty
+ // in the HTTP header. There are some servers that forget the
+ // leading dot and this is actually forbidden according to RFC 2109,
+ // but all browsers accept it anyway so we do that as well.
+ if (!cookie.domain().startsWith(QLatin1Char('.')))
+ cookie.setDomain(QLatin1Char('.') + cookie.domain());
+
QString domain = cookie.domain();
if (!(isParentDomain(domain, defaultDomain)
|| isParentDomain(defaultDomain, domain))) {
diff --git a/src/network/kernel/qhostinfo_p.h b/src/network/kernel/qhostinfo_p.h
index 64c51527b0..afd3570e4c 100644
--- a/src/network/kernel/qhostinfo_p.h
+++ b/src/network/kernel/qhostinfo_p.h
@@ -161,9 +161,11 @@ public Q_SLOTS:
cond.wakeOne();
}
#ifndef QT_NO_THREAD
- if (!wait(QHOSTINFO_THREAD_WAIT))
+ if (!wait(QHOSTINFO_THREAD_WAIT)) {
terminate();
- wait();
+ // Don't wait forever; see QTBUG-5296.
+ wait(QHOSTINFO_THREAD_WAIT);
+ }
#endif
}
diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp
index 8a745ab0bb..d812d888ca 100644
--- a/src/network/socket/qlocalsocket_win.cpp
+++ b/src/network/socket/qlocalsocket_win.cpp
@@ -363,7 +363,8 @@ bool QLocalSocket::canReadLine() const
Q_D(const QLocalSocket);
if (state() != ConnectedState)
return false;
- return (d->readBuffer.indexOf('\n') != -1 || QIODevice::canReadLine());
+ return (QIODevice::canReadLine()
+ || d->readBuffer.indexOf('\n', d->actualReadBufferSize) != -1);
}
void QLocalSocket::close()
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
index 40a6241eae..8a8f4835e8 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
@@ -169,14 +169,14 @@ QGLEngineSharedShaders::QGLEngineSharedShaders(const QGLContext* context)
source.clear();
source.append(qShaderSnippets[MainVertexShader]);
source.append(qShaderSnippets[PositionOnlyVertexShader]);
- vertexShader = new QGLShader(QGLShader::VertexShader, context, this);
- vertexShader->compile(source);
+ vertexShader = new QGLShader(QGLShader::Vertex, context, this);
+ vertexShader->compileSourceCode(source);
source.clear();
source.append(qShaderSnippets[MainFragmentShader]);
source.append(qShaderSnippets[ShockingPinkSrcFragmentShader]);
- fragShader = new QGLShader(QGLShader::FragmentShader, context, this);
- fragShader->compile(source);
+ fragShader = new QGLShader(QGLShader::Fragment, context, this);
+ fragShader->compileSourceCode(source);
simpleShaderProg = new QGLShaderProgram(context, this);
simpleShaderProg->addShader(vertexShader);
@@ -192,14 +192,14 @@ QGLEngineSharedShaders::QGLEngineSharedShaders(const QGLContext* context)
source.clear();
source.append(qShaderSnippets[MainWithTexCoordsVertexShader]);
source.append(qShaderSnippets[UntransformedPositionVertexShader]);
- vertexShader = new QGLShader(QGLShader::VertexShader, context, this);
- vertexShader->compile(source);
+ vertexShader = new QGLShader(QGLShader::Vertex, context, this);
+ vertexShader->compileSourceCode(source);
source.clear();
source.append(qShaderSnippets[MainFragmentShader]);
source.append(qShaderSnippets[ImageSrcFragmentShader]);
- fragShader = new QGLShader(QGLShader::FragmentShader, context, this);
- fragShader->compile(source);
+ fragShader = new QGLShader(QGLShader::Fragment, context, this);
+ fragShader->compileSourceCode(source);
blitShaderProg = new QGLShaderProgram(context, this);
blitShaderProg->addShader(vertexShader);
@@ -243,14 +243,14 @@ QGLEngineShaderProg *QGLEngineSharedShaders::findProgramInCache(const QGLEngineS
source.append(qShaderSnippets[prog.compositionFragShader]);
if (prog.maskFragShader)
source.append(qShaderSnippets[prog.maskFragShader]);
- QGLShader* fragShader = new QGLShader(QGLShader::FragmentShader, ctxGuard.context(), this);
- fragShader->compile(source);
+ QGLShader* fragShader = new QGLShader(QGLShader::Fragment, ctxGuard.context(), this);
+ fragShader->compileSourceCode(source);
source.clear();
source.append(qShaderSnippets[prog.mainVertexShader]);
source.append(qShaderSnippets[prog.positionVertexShader]);
- QGLShader* vertexShader = new QGLShader(QGLShader::VertexShader, ctxGuard.context(), this);
- vertexShader->compile(source);
+ QGLShader* vertexShader = new QGLShader(QGLShader::Vertex, ctxGuard.context(), this);
+ vertexShader->compileSourceCode(source);
#if defined(QT_DEBUG)
// Name the shaders for easier debugging
@@ -673,7 +673,7 @@ bool QGLEngineShaderManager::useCorrectShaderProg()
currentShaderProg = sharedShaders->findProgramInCache(requiredProgram);
if (currentShaderProg) {
- currentShaderProg->program->enable();
+ currentShaderProg->program->bind();
if (useCustomSrc)
customSrcStage->setUniforms(currentShaderProg->program);
}
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index a9744b3ba6..8c5bf0ee01 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -246,7 +246,7 @@ void QGLTextureGlyphCache::resizeTextureData(int width, int height)
glVertexAttribPointer(QT_VERTEX_COORDS_ATTR, 2, GL_FLOAT, GL_FALSE, 0, vertexCoordinateArray);
glVertexAttribPointer(QT_TEXTURE_COORDS_ATTR, 2, GL_FLOAT, GL_FALSE, 0, textureCoordinateArray);
- pex->shaderManager->blitProgram()->enable();
+ pex->shaderManager->blitProgram()->bind();
pex->shaderManager->blitProgram()->setUniformValue("imageTexture", QT_IMAGE_TEXTURE_UNIT);
pex->shaderManager->setDirty();
@@ -395,7 +395,7 @@ void QGL2PaintEngineExPrivate::setBrush(const QBrush* brush)
void QGL2PaintEngineExPrivate::useSimpleShader()
{
- shaderManager->simpleProgram()->enable();
+ shaderManager->simpleProgram()->bind();
shaderManager->setDirty();
if (matrixDirty)
@@ -1203,7 +1203,9 @@ void QGL2PaintEngineEx::fill(const QVectorPath &path, const QBrush &brush)
ensureActive();
QOpenGL2PaintEngineState *s = state();
- bool doOffset = !(s->renderHints & QPainter::Antialiasing) && style == Qt::SolidPattern;
+ bool doOffset = !(s->renderHints & QPainter::Antialiasing) &&
+ (style == Qt::SolidPattern) &&
+ !d->multisamplingAlwaysEnabled;
if (doOffset) {
d->temporaryTransform = s->matrix;
@@ -1221,6 +1223,9 @@ void QGL2PaintEngineEx::fill(const QVectorPath &path, const QBrush &brush)
}
}
+extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp
+
+
void QGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
{
Q_D(QGL2PaintEngineEx);
@@ -1231,10 +1236,15 @@ void QGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
return;
QOpenGL2PaintEngineState *s = state();
+ if (pen.isCosmetic() && !qt_scaleForTransform(s->transform(), 0)) {
+ // QTriangulatingStroker class is not meant to support cosmetically sheared strokes.
+ QPaintEngineEx::stroke(path, pen);
+ return;
+ }
ensureActive();
- bool doOffset = !(s->renderHints & QPainter::Antialiasing);
+ bool doOffset = !(s->renderHints & QPainter::Antialiasing) && !d->multisamplingAlwaysEnabled;
if (doOffset) {
d->temporaryTransform = s->matrix;
QTransform tx = QTransform::fromTranslate(0.49, .49);
@@ -1772,6 +1782,14 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev)
}
#endif
+#if defined(QT_OPENGL_ES_2)
+ // OpenGL ES can't switch MSAA off, so if the gl paint device is
+ // multisampled, it's always multisampled.
+ d->multisamplingAlwaysEnabled = d->device->format().sampleBuffers();
+#else
+ d->multisamplingAlwaysEnabled = false;
+#endif
+
return true;
}
@@ -2089,7 +2107,7 @@ void QGL2PaintEngineExPrivate::systemStateChanged()
q->state()->rectangleClip = use_system_clip ? systemClip.boundingRect() : QRect(0, 0, width, height);
updateClipScissorTest();
- if (systemClip.numRects() == 1) {
+ if (systemClip.rectCount() == 1) {
if (systemClip.boundingRect() == QRect(0, 0, width, height))
use_system_clip = false;
#ifndef QT_GL_NO_SCISSOR_TEST
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index 4cf2a834c4..97207234d9 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -277,6 +277,7 @@ public:
bool needsSync;
bool inRenderText;
+ bool multisamplingAlwaysEnabled;
GLfloat depthRange[2];
diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h b/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h
index 97eabef15f..defa3f1baa 100644
--- a/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h
+++ b/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h
@@ -129,9 +129,9 @@ inline void QTriangulatingStroker::normalVector(float x1, float y1, float x2, fl
float pw;
if (dx == 0)
- pw = m_width / dy;
+ pw = m_width / qAbs(dy);
else if (dy == 0)
- pw = m_width / dx;
+ pw = m_width / qAbs(dx);
else
pw = m_width / sqrt(dx*dx + dy*dy);
@@ -259,8 +259,6 @@ void QTriangulatingStroker::lineTo(const qreal *pts)
-
-
void QTriangulatingStroker::join(const qreal *pts)
{
// Creates a join to the next segment (m_cx, m_cy) -> (pts[0], pts[1])
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index ad177dccdd..8063fc82d1 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -4078,7 +4078,7 @@ QImage QGLWidget::grabFrameBuffer(bool withAlpha)
glReadPixels(0, 0, w, h, GL_COLOR_INDEX, GL_UNSIGNED_BYTE, res.bits());
const QVector<QColor> pal = QColormap::instance().colormap();
if (pal.size()) {
- res.setNumColors(pal.size());
+ res.setColorCount(pal.size());
for (int i = 0; i < pal.size(); i++)
res.setColor(i, pal.at(i).rgb());
}
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index 7374594f93..d79283ee7d 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -342,39 +342,6 @@ QGLContext *QGLFBOGLPaintDevice::context() const
return fboContext;
}
-void QGLFBOGLPaintDevice::ensureActiveTarget()
-{
- if (QGLContext::currentContext() != context())
- context()->makeCurrent();
-
- QGLContext* ctx = const_cast<QGLContext*>(QGLContext::currentContext());
- Q_ASSERT(ctx);
- const GLuint fboId = fbo->d_func()->fbo();
- if (ctx->d_func()->current_fbo != fboId) {
- ctx->d_func()->current_fbo = fboId;
- glBindFramebuffer(GL_FRAMEBUFFER_EXT, fboId);
- }
-}
-
-void QGLFBOGLPaintDevice::beginPaint()
-{
- if (QGLContext::currentContext() != context())
- context()->makeCurrent();
-
- // We let QFBO track the previously bound FBO rather than doing it
- // ourselves here. This has the advantage that begin/release & bind/end
- // work as expected.
- wasBound = fbo->isBound();
- if (!wasBound)
- fbo->bind();
-}
-
-void QGLFBOGLPaintDevice::endPaint()
-{
- if (!wasBound)
- fbo->release();
-}
-
bool QGLFramebufferObjectPrivate::checkFramebufferStatus() const
{
QGL_FUNCP_CONTEXT;
@@ -879,13 +846,6 @@ bool QGLFramebufferObject::isValid() const
framebuffer to this framebuffer object.
Returns true upon success, false otherwise.
- Since 4.6: if another QGLFramebufferObject instance was already bound
- to the current context, then its handle() will be remembered and
- automatically restored when release() is called. This allows multiple
- framebuffer rendering targets to be stacked up. It is important that
- release() is called on the stacked framebuffer objects in the reverse
- order of the calls to bind().
-
\sa release()
*/
bool QGLFramebufferObject::bind()
@@ -896,17 +856,18 @@ bool QGLFramebufferObject::bind()
QGL_FUNC_CONTEXT;
if (!ctx)
return false; // Context no longer exists.
+ const QGLContext *current = QGLContext::currentContext();
+#ifdef QT_DEBUG
+ if (!current ||
+ QGLContextPrivate::contextGroup(current) != QGLContextPrivate::contextGroup(ctx))
+ {
+ qWarning("QGLFramebufferObject::bind() called from incompatible context");
+ }
+#endif
glBindFramebuffer(GL_FRAMEBUFFER_EXT, d->fbo());
d->valid = d->checkFramebufferStatus();
- const QGLContext *context = QGLContext::currentContext();
- if (d->valid && context) {
- Q_ASSERT(QGLContextPrivate::contextGroup(context) == QGLContextPrivate::contextGroup(ctx));
- // Save the previous setting to automatically restore in release().
- if (context->d_ptr->current_fbo != d->fbo()) {
- d->previous_fbo = context->d_ptr->current_fbo;
- context->d_ptr->current_fbo = d->fbo();
- }
- }
+ if (d->valid && current)
+ current->d_ptr->current_fbo = d->fbo();
return d->valid;
}
@@ -917,30 +878,29 @@ bool QGLFramebufferObject::bind()
framebuffer.
Returns true upon success, false otherwise.
- Since 4.6: if another QGLFramebufferObject instance was already bound
- to the current context when bind() was called, then this function will
- automatically re-bind it to the current context.
-
\sa bind()
*/
bool QGLFramebufferObject::release()
{
if (!isValid())
return false;
- Q_D(QGLFramebufferObject);
QGL_FUNC_CONTEXT;
if (!ctx)
return false; // Context no longer exists.
- const QGLContext *context = QGLContext::currentContext();
- if (context) {
- Q_ASSERT(QGLContextPrivate::contextGroup(context) == QGLContextPrivate::contextGroup(ctx));
- // Restore the previous setting for stacked framebuffer objects.
- if (d->previous_fbo != context->d_ptr->current_fbo) {
- context->d_ptr->current_fbo = d->previous_fbo;
- glBindFramebuffer(GL_FRAMEBUFFER_EXT, d->previous_fbo);
- }
- d->previous_fbo = 0;
+ const QGLContext *current = QGLContext::currentContext();
+
+#ifdef QT_DEBUG
+ if (!current ||
+ QGLContextPrivate::contextGroup(current) != QGLContextPrivate::contextGroup(ctx))
+ {
+ qWarning("QGLFramebufferObject::release() called from incompatible context");
+ }
+#endif
+
+ if (current) {
+ current->d_ptr->current_fbo = 0;
+ glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0);
}
return true;
diff --git a/src/opengl/qglframebufferobject_p.h b/src/opengl/qglframebufferobject_p.h
index 122c42e6f5..800cb683b9 100644
--- a/src/opengl/qglframebufferobject_p.h
+++ b/src/opengl/qglframebufferobject_p.h
@@ -111,9 +111,6 @@ public:
virtual QSize size() const {return fbo->size();}
virtual QGLContext* context() const;
virtual QGLFormat format() const {return fboFormat;}
- virtual void ensureActiveTarget();
- virtual void beginPaint();
- virtual void endPaint();
void setFBO(QGLFramebufferObject* f,
QGLFramebufferObject::Attachment attachment);
@@ -127,7 +124,8 @@ private:
class QGLFramebufferObjectPrivate
{
public:
- QGLFramebufferObjectPrivate() : fbo_guard(0), texture(0), depth_stencil_buffer(0), color_buffer(0), valid(false), previous_fbo(0), engine(0) {}
+ QGLFramebufferObjectPrivate() : fbo_guard(0), texture(0), depth_stencil_buffer(0)
+ , color_buffer(0), valid(false), engine(0) {}
~QGLFramebufferObjectPrivate() {}
void init(QGLFramebufferObject *q, const QSize& sz,
@@ -143,7 +141,6 @@ public:
QGLFramebufferObjectFormat format;
uint valid : 1;
QGLFramebufferObject::Attachment fbo_attachment;
- GLuint previous_fbo;
mutable QPaintEngine *engine;
QGLFBOGLPaintDevice glDevice;
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp
index e28c3821d6..b4191dcc3b 100644
--- a/src/opengl/qglshaderprogram.cpp
+++ b/src/opengl/qglshaderprogram.cpp
@@ -69,7 +69,7 @@ QT_BEGIN_NAMESPACE
The following example creates a vertex shader program using the
supplied source \c{code}. Once compiled and linked, the shader
program is activated in the current QGLContext by calling
- QGLShaderProgram::enable():
+ QGLShaderProgram::bind():
\snippet doc/src/snippets/code/src_opengl_qglshaderprogram.cpp 0
@@ -125,11 +125,11 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \enum QGLShader::ShaderTypeBits
+ \enum QGLShader::ShaderTypeBit
This enum specifies the type of QGLShader that is being created.
- \value VertexShader Vertex shader written in the OpenGL Shading Language (GLSL).
- \value FragmentShader Fragment shader written in the OpenGL Shading Language (GLSL).
+ \value Vertex Vertex shader written in the OpenGL Shading Language (GLSL).
+ \value Fragment Fragment shader written in the OpenGL Shading Language (GLSL).
*/
#ifndef GL_FRAGMENT_SHADER
@@ -211,7 +211,7 @@ bool QGLShaderPrivate::create()
return false;
if (qt_resolve_glsl_extensions(const_cast<QGLContext *>(context))) {
GLuint shader;
- if (shaderType == QGLShader::VertexShader)
+ if (shaderType == QGLShader::Vertex)
shader = glCreateShader(GL_VERTEX_SHADER);
else
shader = glCreateShader(GL_FRAGMENT_SHADER);
@@ -266,14 +266,14 @@ void QGLShaderPrivate::deleteShader()
/*!
Constructs a new QGLShader object of the specified \a type
and attaches it to \a parent. If shader programs are not supported,
- QGLShaderProgram::hasShaderPrograms() will return false.
+ QGLShaderProgram::hasOpenGLShaderPrograms() will return false.
- This constructor is normally followed by a call to compile()
- or compileFile().
+ This constructor is normally followed by a call to compileSourceCode()
+ or compileSourceFile().
The shader will be associated with the current QGLContext.
- \sa compile(), compileFile()
+ \sa compileSourceCode(), compileSourceFile()
*/
QGLShader::QGLShader(QGLShader::ShaderType type, QObject *parent)
: QObject(*new QGLShaderPrivate(QGLContext::currentContext(), type), parent)
@@ -283,45 +283,19 @@ QGLShader::QGLShader(QGLShader::ShaderType type, QObject *parent)
}
/*!
- Constructs a new QGLShader object of the specified \a type from the
- source code in \a fileName and attaches it to \a parent.
- If the shader could not be loaded, then isCompiled() will return false.
-
- The shader will be associated with the current QGLContext.
-
- \sa isCompiled()
-*/
-QGLShader::QGLShader
- (const QString& fileName, QGLShader::ShaderType type, QObject *parent)
- : QObject(*new QGLShaderPrivate(QGLContext::currentContext(), type), parent)
-{
- Q_D(QGLShader);
- if (d->create() && !compileFile(fileName))
- d->deleteShader();
-}
-
-static inline const QGLContext *contextOrCurrent(const QGLContext *context)
-{
- if (context)
- return context;
- else
- return QGLContext::currentContext();
-}
-
-/*!
Constructs a new QGLShader object of the specified \a type
and attaches it to \a parent. If shader programs are not supported,
- then QGLShaderProgram::hasShaderPrograms() will return false.
+ then QGLShaderProgram::hasOpenGLShaderPrograms() will return false.
- This constructor is normally followed by a call to compile()
- or compileFile().
+ This constructor is normally followed by a call to compileSourceCode()
+ or compileSourceFile().
The shader will be associated with \a context.
- \sa compile(), compileFile()
+ \sa compileSourceCode(), compileSourceFile()
*/
QGLShader::QGLShader(QGLShader::ShaderType type, const QGLContext *context, QObject *parent)
- : QObject(*new QGLShaderPrivate(contextOrCurrent(context), type), parent)
+ : QObject(*new QGLShaderPrivate(context ? context : QGLContext::currentContext(), type), parent)
{
Q_D(QGLShader);
#ifndef QT_NO_DEBUG
@@ -334,30 +308,6 @@ QGLShader::QGLShader(QGLShader::ShaderType type, const QGLContext *context, QObj
}
/*!
- Constructs a new QGLShader object of the specified \a type from the
- source code in \a fileName and attaches it to \a parent.
- If the shader could not be loaded, then isCompiled() will return false.
-
- The shader will be associated with \a context.
-
- \sa isCompiled()
-*/
-QGLShader::QGLShader
- (const QString& fileName, QGLShader::ShaderType type, const QGLContext *context, QObject *parent)
- : QObject(*new QGLShaderPrivate(contextOrCurrent(context), type), parent)
-{
- Q_D(QGLShader);
-#ifndef QT_NO_DEBUG
- if (context && !QGLContext::areSharing(context, QGLContext::currentContext())) {
- qWarning("QGLShader::QGLShader: \'context\' must be current context or sharing with it.");
- return;
- }
-#endif
- if (d->create() && !compileFile(fileName))
- d->deleteShader();
-}
-
-/*!
Deletes this shader. If the shader has been attached to a
QGLShaderProgram object, then the actual shader will stay around
until the QGLShaderProgram is destroyed.
@@ -400,9 +350,9 @@ static const char redefineHighp[] =
Sets the \a source code for this shader and compiles it.
Returns true if the source was successfully compiled, false otherwise.
- \sa compileFile()
+ \sa compileSourceFile()
*/
-bool QGLShader::compile(const char *source)
+bool QGLShader::compileSourceCode(const char *source)
{
Q_D(QGLShader);
if (d->shaderGuard.id()) {
@@ -431,7 +381,7 @@ bool QGLShader::compile(const char *source)
srclen.append(GLint(sizeof(qualifierDefines) - 1));
#endif
#ifdef QGL_REDEFINE_HIGHP
- if (d->shaderType == FragmentShader) {
+ if (d->shaderType == Fragment) {
src.append(redefineHighp);
srclen.append(GLint(sizeof(redefineHighp) - 1));
}
@@ -451,11 +401,11 @@ bool QGLShader::compile(const char *source)
Sets the \a source code for this shader and compiles it.
Returns true if the source was successfully compiled, false otherwise.
- \sa compileFile()
+ \sa compileSourceFile()
*/
-bool QGLShader::compile(const QByteArray& source)
+bool QGLShader::compileSourceCode(const QByteArray& source)
{
- return compile(source.constData());
+ return compileSourceCode(source.constData());
}
/*!
@@ -464,11 +414,11 @@ bool QGLShader::compile(const QByteArray& source)
Sets the \a source code for this shader and compiles it.
Returns true if the source was successfully compiled, false otherwise.
- \sa compileFile()
+ \sa compileSourceFile()
*/
-bool QGLShader::compile(const QString& source)
+bool QGLShader::compileSourceCode(const QString& source)
{
- return compile(source.toLatin1().constData());
+ return compileSourceCode(source.toLatin1().constData());
}
/*!
@@ -476,9 +426,9 @@ bool QGLShader::compile(const QString& source)
and compiles it. Returns true if the file could be opened and the
source compiled, false otherwise.
- \sa compile()
+ \sa compileSourceCode()
*/
-bool QGLShader::compileFile(const QString& fileName)
+bool QGLShader::compileSourceFile(const QString& fileName)
{
QFile file(fileName);
if (!file.open(QFile::ReadOnly)) {
@@ -487,13 +437,13 @@ bool QGLShader::compileFile(const QString& fileName)
}
QByteArray contents = file.readAll();
- return compile(contents.constData());
+ return compileSourceCode(contents.constData());
}
/*!
Returns the source code for this shader.
- \sa compile()
+ \sa compileSourceCode()
*/
QByteArray QGLShader::sourceCode() const
{
@@ -516,7 +466,7 @@ QByteArray QGLShader::sourceCode() const
/*!
Returns true if this shader has been compiled; false otherwise.
- \sa compile()
+ \sa compileSourceCode(), compileSourceFile()
*/
bool QGLShader::isCompiled() const
{
@@ -527,7 +477,7 @@ bool QGLShader::isCompiled() const
/*!
Returns the errors and warnings that occurred during the last compile.
- \sa compile()
+ \sa compileSourceCode(), compileSourceFile()
*/
QString QGLShader::log() const
{
@@ -666,6 +616,7 @@ bool QGLShaderProgram::init()
is deleted. This allows the caller to add the same shader
to multiple shader programs.
+ \sa addShaderFromSourceCode(), addShaderFromSourceFile()
\sa removeShader(), link(), removeAllShaders()
*/
bool QGLShaderProgram::addShader(QGLShader *shader)
@@ -705,15 +656,16 @@ bool QGLShaderProgram::addShader(QGLShader *shader)
adding vertex and fragment shaders to a shader program without
creating an instance of QGLShader first.
+ \sa addShader(), addShaderFromSourceFile()
\sa removeShader(), link(), log(), removeAllShaders()
*/
-bool QGLShaderProgram::addShader(QGLShader::ShaderType type, const char *source)
+bool QGLShaderProgram::addShaderFromSourceCode(QGLShader::ShaderType type, const char *source)
{
Q_D(QGLShaderProgram);
if (!init())
return false;
QGLShader *shader = new QGLShader(type, this);
- if (!shader->compile(source)) {
+ if (!shader->compileSourceCode(source)) {
d->log = shader->log();
delete shader;
return false;
@@ -734,11 +686,12 @@ bool QGLShaderProgram::addShader(QGLShader::ShaderType type, const char *source)
adding vertex and fragment shaders to a shader program without
creating an instance of QGLShader first.
+ \sa addShader(), addShaderFromSourceFile()
\sa removeShader(), link(), log(), removeAllShaders()
*/
-bool QGLShaderProgram::addShader(QGLShader::ShaderType type, const QByteArray& source)
+bool QGLShaderProgram::addShaderFromSourceCode(QGLShader::ShaderType type, const QByteArray& source)
{
- return addShader(type, source.constData());
+ return addShaderFromSourceCode(type, source.constData());
}
/*!
@@ -753,11 +706,12 @@ bool QGLShaderProgram::addShader(QGLShader::ShaderType type, const QByteArray& s
adding vertex and fragment shaders to a shader program without
creating an instance of QGLShader first.
+ \sa addShader(), addShaderFromSourceFile()
\sa removeShader(), link(), log(), removeAllShaders()
*/
-bool QGLShaderProgram::addShader(QGLShader::ShaderType type, const QString& source)
+bool QGLShaderProgram::addShaderFromSourceCode(QGLShader::ShaderType type, const QString& source)
{
- return addShader(type, source.toLatin1().constData());
+ return addShaderFromSourceCode(type, source.toLatin1().constData());
}
/*!
@@ -770,16 +724,16 @@ bool QGLShaderProgram::addShader(QGLShader::ShaderType type, const QString& sour
adding vertex and fragment shaders to a shader program without
creating an instance of QGLShader first.
- \sa addShader()
+ \sa addShader(), addShaderFromSourceCode()
*/
-bool QGLShaderProgram::addShaderFromFile
+bool QGLShaderProgram::addShaderFromSourceFile
(QGLShader::ShaderType type, const QString& fileName)
{
Q_D(QGLShaderProgram);
if (!init())
return false;
QGLShader *shader = new QGLShader(type, this);
- if (!shader->compileFile(fileName)) {
+ if (!shader->compileSourceFile(fileName)) {
d->log = shader->log();
delete shader;
return false;
@@ -912,14 +866,16 @@ QString QGLShaderProgram::log() const
}
/*!
- Enable use of this shader program in the currently active QGLContext.
- Returns true if the program was successfully enabled; false
- otherwise. If the shader program has not yet been linked,
+ Binds this shader program to the active QGLContext and makes
+ it the current shader program. Any previously bound shader program
+ is released. This is equivalent to calling \c{glUseProgram()} on
+ programId(). Returns true if the program was successfully bound;
+ false otherwise. If the shader program has not yet been linked,
or it needs to be re-linked, this function will call link().
- \sa link(), disable()
+ \sa link(), release()
*/
-bool QGLShaderProgram::enable()
+bool QGLShaderProgram::bind()
{
Q_D(QGLShaderProgram);
GLuint program = d->programGuard.id();
@@ -927,6 +883,12 @@ bool QGLShaderProgram::enable()
return false;
if (!d->linked && !link())
return false;
+#ifndef QT_NO_DEBUG
+ if (!QGLContext::areSharing(d->programGuard.context(), QGLContext::currentContext())) {
+ qWarning("QGLShaderProgram::bind: program is not valid in the current context.");
+ return false;
+ }
+#endif
glUseProgram(program);
return true;
}
@@ -935,13 +897,18 @@ bool QGLShaderProgram::enable()
#define ctx QGLContext::currentContext()
/*!
- Disables the active shader program in the current QGLContext.
+ Releases the active shader program from the current QGLContext.
This is equivalent to calling \c{glUseProgram(0)}.
- \sa enable()
+ \sa bind()
*/
-void QGLShaderProgram::disable()
+void QGLShaderProgram::release()
{
+#ifndef QT_NO_DEBUG
+ Q_D(QGLShaderProgram);
+ if (!QGLContext::areSharing(d->programGuard.context(), QGLContext::currentContext()))
+ qWarning("QGLShaderProgram::release: program is not valid in the current context.");
+#endif
#if defined(QT_OPENGL_ES_2)
glUseProgram(0);
#else
@@ -1331,22 +1298,26 @@ void QGLShaderProgram::setAttributeValue
/*!
Sets an array of vertex \a values on the attribute at \a location
- in this shader program. The \a size indicates the number of
+ in this shader program. The \a tupleSize indicates the number of
components per vertex (1, 2, 3, or 4), and the \a stride indicates
the number of bytes between vertices. A default \a stride value
of zero indicates that the vertices are densely packed in \a values.
- \sa setAttributeValue(), setUniformValue(), disableAttributeArray()
+ The array will become active when enableAttributeArray() is called
+ on the \a location. Otherwise the value specified with
+ setAttributeValue() for \a location will be used.
+
+ \sa setAttributeValue(), setUniformValue(), enableAttributeArray()
+ \sa disableAttributeArray()
*/
void QGLShaderProgram::setAttributeArray
- (int location, const GLfloat *values, int size, int stride)
+ (int location, const GLfloat *values, int tupleSize, int stride)
{
Q_D(QGLShaderProgram);
Q_UNUSED(d);
if (location != -1) {
- glVertexAttribPointer(location, size, GL_FLOAT, GL_FALSE,
+ glVertexAttribPointer(location, tupleSize, GL_FLOAT, GL_FALSE,
stride, values);
- glEnableVertexAttribArray(location);
}
}
@@ -1356,7 +1327,12 @@ void QGLShaderProgram::setAttributeArray
between vertices. A default \a stride value of zero indicates that
the vertices are densely packed in \a values.
- \sa setAttributeValue(), setUniformValue(), disableAttributeArray()
+ The array will become active when enableAttributeArray() is called
+ on the \a location. Otherwise the value specified with
+ setAttributeValue() for \a location will be used.
+
+ \sa setAttributeValue(), setUniformValue(), enableAttributeArray()
+ \sa disableAttributeArray()
*/
void QGLShaderProgram::setAttributeArray
(int location, const QVector2D *values, int stride)
@@ -1366,7 +1342,6 @@ void QGLShaderProgram::setAttributeArray
if (location != -1) {
glVertexAttribPointer(location, 2, GL_FLOAT, GL_FALSE,
stride, values);
- glEnableVertexAttribArray(location);
}
}
@@ -1376,7 +1351,12 @@ void QGLShaderProgram::setAttributeArray
between vertices. A default \a stride value of zero indicates that
the vertices are densely packed in \a values.
- \sa setAttributeValue(), setUniformValue(), disableAttributeArray()
+ The array will become active when enableAttributeArray() is called
+ on the \a location. Otherwise the value specified with
+ setAttributeValue() for \a location will be used.
+
+ \sa setAttributeValue(), setUniformValue(), enableAttributeArray()
+ \sa disableAttributeArray()
*/
void QGLShaderProgram::setAttributeArray
(int location, const QVector3D *values, int stride)
@@ -1386,7 +1366,6 @@ void QGLShaderProgram::setAttributeArray
if (location != -1) {
glVertexAttribPointer(location, 3, GL_FLOAT, GL_FALSE,
stride, values);
- glEnableVertexAttribArray(location);
}
}
@@ -1396,7 +1375,12 @@ void QGLShaderProgram::setAttributeArray
between vertices. A default \a stride value of zero indicates that
the vertices are densely packed in \a values.
- \sa setAttributeValue(), setUniformValue(), disableAttributeArray()
+ The array will become active when enableAttributeArray() is called
+ on the \a location. Otherwise the value specified with
+ setAttributeValue() for \a location will be used.
+
+ \sa setAttributeValue(), setUniformValue(), enableAttributeArray()
+ \sa disableAttributeArray()
*/
void QGLShaderProgram::setAttributeArray
(int location, const QVector4D *values, int stride)
@@ -1406,7 +1390,6 @@ void QGLShaderProgram::setAttributeArray
if (location != -1) {
glVertexAttribPointer(location, 4, GL_FLOAT, GL_FALSE,
stride, values);
- glEnableVertexAttribArray(location);
}
}
@@ -1414,17 +1397,22 @@ void QGLShaderProgram::setAttributeArray
\overload
Sets an array of vertex \a values on the attribute called \a name
- in this shader program. The \a size indicates the number of
+ in this shader program. The \a tupleSize indicates the number of
components per vertex (1, 2, 3, or 4), and the \a stride indicates
the number of bytes between vertices. A default \a stride value
of zero indicates that the vertices are densely packed in \a values.
- \sa setAttributeValue(), setUniformValue(), disableAttributeArray()
+ The array will become active when enableAttributeArray() is called
+ on \a name. Otherwise the value specified with setAttributeValue()
+ for \a name will be used.
+
+ \sa setAttributeValue(), setUniformValue(), enableAttributeArray()
+ \sa disableAttributeArray()
*/
void QGLShaderProgram::setAttributeArray
- (const char *name, const GLfloat *values, int size, int stride)
+ (const char *name, const GLfloat *values, int tupleSize, int stride)
{
- setAttributeArray(attributeLocation(name), values, size, stride);
+ setAttributeArray(attributeLocation(name), values, tupleSize, stride);
}
/*!
@@ -1435,7 +1423,12 @@ void QGLShaderProgram::setAttributeArray
between vertices. A default \a stride value of zero indicates that
the vertices are densely packed in \a values.
- \sa setAttributeValue(), setUniformValue(), disableAttributeArray()
+ The array will become active when enableAttributeArray() is called
+ on \a name. Otherwise the value specified with setAttributeValue()
+ for \a name will be used.
+
+ \sa setAttributeValue(), setUniformValue(), enableAttributeArray()
+ \sa disableAttributeArray()
*/
void QGLShaderProgram::setAttributeArray
(const char *name, const QVector2D *values, int stride)
@@ -1451,7 +1444,12 @@ void QGLShaderProgram::setAttributeArray
between vertices. A default \a stride value of zero indicates that
the vertices are densely packed in \a values.
- \sa setAttributeValue(), setUniformValue(), disableAttributeArray()
+ The array will become active when enableAttributeArray() is called
+ on \a name. Otherwise the value specified with setAttributeValue()
+ for \a name will be used.
+
+ \sa setAttributeValue(), setUniformValue(), enableAttributeArray()
+ \sa disableAttributeArray()
*/
void QGLShaderProgram::setAttributeArray
(const char *name, const QVector3D *values, int stride)
@@ -1467,7 +1465,12 @@ void QGLShaderProgram::setAttributeArray
between vertices. A default \a stride value of zero indicates that
the vertices are densely packed in \a values.
- \sa setAttributeValue(), setUniformValue(), disableAttributeArray()
+ The array will become active when enableAttributeArray() is called
+ on \a name. Otherwise the value specified with setAttributeValue()
+ for \a name will be used.
+
+ \sa setAttributeValue(), setUniformValue(), enableAttributeArray()
+ \sa disableAttributeArray()
*/
void QGLShaderProgram::setAttributeArray
(const char *name, const QVector4D *values, int stride)
@@ -1476,10 +1479,42 @@ void QGLShaderProgram::setAttributeArray
}
/*!
+ Enables the vertex array at \a location in this shader program
+ so that the value set by setAttributeArray() on \a location
+ will be used by the shader program.
+
+ \sa disableAttributeArray(), setAttributeArray(), setAttributeValue()
+ \sa setUniformValue()
+*/
+void QGLShaderProgram::enableAttributeArray(int location)
+{
+ Q_D(QGLShaderProgram);
+ Q_UNUSED(d);
+ if (location != -1)
+ glEnableVertexAttribArray(location);
+}
+
+/*!
+ \overload
+
+ Enables the vertex array called \a name in this shader program
+ so that the value set by setAttributeArray() on \a name
+ will be used by the shader program.
+
+ \sa disableAttributeArray(), setAttributeArray(), setAttributeValue()
+ \sa setUniformValue()
+*/
+void QGLShaderProgram::enableAttributeArray(const char *name)
+{
+ enableAttributeArray(attributeLocation(name));
+}
+
+/*!
Disables the vertex array at \a location in this shader program
- that was enabled by a previous call to setAttributeArray().
+ that was enabled by a previous call to enableAttributeArray().
- \sa setAttributeArray(), setAttributeValue(), setUniformValue()
+ \sa enableAttributeArray(), setAttributeArray(), setAttributeValue()
+ \sa setUniformValue()
*/
void QGLShaderProgram::disableAttributeArray(int location)
{
@@ -1493,9 +1528,10 @@ void QGLShaderProgram::disableAttributeArray(int location)
\overload
Disables the vertex array called \a name in this shader program
- that was enabled by a previous call to setAttributeArray().
+ that was enabled by a previous call to enableAttributeArray().
- \sa setAttributeArray(), setAttributeValue(), setUniformValue()
+ \sa enableAttributeArray(), setAttributeArray(), setAttributeValue()
+ \sa setUniformValue()
*/
void QGLShaderProgram::disableAttributeArray(const char *name)
{
@@ -2363,25 +2399,25 @@ void QGLShaderProgram::setUniformValueArray
/*!
Sets the uniform variable array at \a location in the current
context to the \a count elements of \a values. Each element
- has \a size components. The \a size must be 1, 2, 3, or 4.
+ has \a tupleSize components. The \a tupleSize must be 1, 2, 3, or 4.
\sa setAttributeValue()
*/
-void QGLShaderProgram::setUniformValueArray(int location, const GLfloat *values, int count, int size)
+void QGLShaderProgram::setUniformValueArray(int location, const GLfloat *values, int count, int tupleSize)
{
Q_D(QGLShaderProgram);
Q_UNUSED(d);
if (location != -1) {
- if (size == 1)
+ if (tupleSize == 1)
glUniform1fv(location, count, values);
- else if (size == 2)
+ else if (tupleSize == 2)
glUniform2fv(location, count, values);
- else if (size == 3)
+ else if (tupleSize == 3)
glUniform3fv(location, count, values);
- else if (size == 4)
+ else if (tupleSize == 4)
glUniform4fv(location, count, values);
else
- qWarning() << "QGLShaderProgram::setUniformValue: size" << size << "not supported";
+ qWarning() << "QGLShaderProgram::setUniformValue: size" << tupleSize << "not supported";
}
}
@@ -2390,14 +2426,14 @@ void QGLShaderProgram::setUniformValueArray(int location, const GLfloat *values,
Sets the uniform variable array called \a name in the current
context to the \a count elements of \a values. Each element
- has \a size components. The \a size must be 1, 2, 3, or 4.
+ has \a tupleSize components. The \a tupleSize must be 1, 2, 3, or 4.
\sa setAttributeValue()
*/
void QGLShaderProgram::setUniformValueArray
- (const char *name, const GLfloat *values, int count, int size)
+ (const char *name, const GLfloat *values, int count, int tupleSize)
{
- setUniformValueArray(uniformLocation(name), values, count, size);
+ setUniformValueArray(uniformLocation(name), values, count, tupleSize);
}
/*!
@@ -2800,7 +2836,7 @@ void QGLShaderProgram::setUniformValueArray(const char *name, const QMatrix4x4 *
The \a context is used to resolve the GLSL extensions.
If \a context is null, then QGLContext::currentContext() is used.
*/
-bool QGLShaderProgram::hasShaderPrograms(const QGLContext *context)
+bool QGLShaderProgram::hasOpenGLShaderPrograms(const QGLContext *context)
{
#if !defined(QT_OPENGL_ES_2)
if (!context)
@@ -2825,8 +2861,6 @@ void QGLShaderProgram::shaderDestroyed()
removeShader(shader);
}
-#endif
-
#ifdef Q_MAC_COMPAT_GL_FUNCTIONS
/*! \internal */
void QGLShaderProgram::setUniformValue(int location, QMacCompatGLint value)
@@ -2877,4 +2911,6 @@ void QGLShaderProgram::setUniformValueArray(const char *name, const QMacCompatGL
}
#endif
+#endif // !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+
QT_END_NAMESPACE
diff --git a/src/opengl/qglshaderprogram.h b/src/opengl/qglshaderprogram.h
index 49c3364b67..deeaee2bf2 100644
--- a/src/opengl/qglshaderprogram.h
+++ b/src/opengl/qglshaderprogram.h
@@ -63,25 +63,23 @@ class Q_OPENGL_EXPORT QGLShader : public QObject
{
Q_OBJECT
public:
- enum ShaderTypeBits
+ enum ShaderTypeBit
{
- VertexShader = 0x0001,
- FragmentShader = 0x0002
+ Vertex = 0x0001,
+ Fragment = 0x0002
};
- Q_DECLARE_FLAGS(ShaderType, ShaderTypeBits)
+ Q_DECLARE_FLAGS(ShaderType, ShaderTypeBit)
explicit QGLShader(QGLShader::ShaderType type, QObject *parent = 0);
- QGLShader(const QString& fileName, QGLShader::ShaderType type, QObject *parent = 0);
QGLShader(QGLShader::ShaderType type, const QGLContext *context, QObject *parent = 0);
- QGLShader(const QString& fileName, QGLShader::ShaderType type, const QGLContext *context, QObject *parent = 0);
virtual ~QGLShader();
QGLShader::ShaderType shaderType() const;
- bool compile(const char *source);
- bool compile(const QByteArray& source);
- bool compile(const QString& source);
- bool compileFile(const QString& fileName);
+ bool compileSourceCode(const char *source);
+ bool compileSourceCode(const QByteArray& source);
+ bool compileSourceCode(const QString& source);
+ bool compileSourceFile(const QString& fileName);
QByteArray sourceCode() const;
@@ -114,10 +112,10 @@ public:
void removeShader(QGLShader *shader);
QList<QGLShader *> shaders() const;
- bool addShader(QGLShader::ShaderType type, const char *source);
- bool addShader(QGLShader::ShaderType type, const QByteArray& source);
- bool addShader(QGLShader::ShaderType type, const QString& source);
- bool addShaderFromFile(QGLShader::ShaderType type, const QString& fileName);
+ bool addShaderFromSourceCode(QGLShader::ShaderType type, const char *source);
+ bool addShaderFromSourceCode(QGLShader::ShaderType type, const QByteArray& source);
+ bool addShaderFromSourceCode(QGLShader::ShaderType type, const QString& source);
+ bool addShaderFromSourceFile(QGLShader::ShaderType type, const QString& fileName);
void removeAllShaders();
@@ -125,8 +123,8 @@ public:
bool isLinked() const;
QString log() const;
- bool enable();
- static void disable();
+ bool bind();
+ void release();
GLuint programId() const;
@@ -159,7 +157,7 @@ public:
void setAttributeValue(const char *name, const GLfloat *values, int columns, int rows);
void setAttributeArray
- (int location, const GLfloat *values, int size, int stride = 0);
+ (int location, const GLfloat *values, int tupleSize, int stride = 0);
void setAttributeArray
(int location, const QVector2D *values, int stride = 0);
void setAttributeArray
@@ -167,13 +165,16 @@ public:
void setAttributeArray
(int location, const QVector4D *values, int stride = 0);
void setAttributeArray
- (const char *name, const GLfloat *values, int size, int stride = 0);
+ (const char *name, const GLfloat *values, int tupleSize, int stride = 0);
void setAttributeArray
(const char *name, const QVector2D *values, int stride = 0);
void setAttributeArray
(const char *name, const QVector3D *values, int stride = 0);
void setAttributeArray
(const char *name, const QVector4D *values, int stride = 0);
+
+ void enableAttributeArray(int location);
+ void enableAttributeArray(const char *name);
void disableAttributeArray(int location);
void disableAttributeArray(const char *name);
@@ -244,7 +245,7 @@ public:
void setUniformValue(const char *name, const GLfloat value[4][4]);
void setUniformValue(const char *name, const QTransform& value);
- void setUniformValueArray(int location, const GLfloat *values, int count, int size);
+ void setUniformValueArray(int location, const GLfloat *values, int count, int tupleSize);
void setUniformValueArray(int location, const GLint *values, int count);
void setUniformValueArray(int location, const GLuint *values, int count);
void setUniformValueArray(int location, const QVector2D *values, int count);
@@ -260,7 +261,7 @@ public:
void setUniformValueArray(int location, const QMatrix4x3 *values, int count);
void setUniformValueArray(int location, const QMatrix4x4 *values, int count);
- void setUniformValueArray(const char *name, const GLfloat *values, int count, int size);
+ void setUniformValueArray(const char *name, const GLfloat *values, int count, int tupleSize);
void setUniformValueArray(const char *name, const GLint *values, int count);
void setUniformValueArray(const char *name, const GLuint *values, int count);
void setUniformValueArray(const char *name, const QVector2D *values, int count);
@@ -276,7 +277,7 @@ public:
void setUniformValueArray(const char *name, const QMatrix4x3 *values, int count);
void setUniformValueArray(const char *name, const QMatrix4x4 *values, int count);
- static bool hasShaderPrograms(const QGLContext *context = 0);
+ static bool hasOpenGLShaderPrograms(const QGLContext *context = 0);
private Q_SLOTS:
void shaderDestroyed();
diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp
index 5ca37ef6dd..fb55097e55 100644
--- a/src/opengl/qpixmapdata_gl.cpp
+++ b/src/opengl/qpixmapdata_gl.cpp
@@ -452,7 +452,7 @@ QImage QGLPixmapData::fillImage(const QColor &color) const
if (pixelType() == BitmapType) {
img = QImage(w, h, QImage::Format_MonoLSB);
- img.setNumColors(2);
+ img.setColorCount(2);
img.setColor(0, QColor(Qt::color0).rgba());
img.setColor(1, QColor(Qt::color1).rgba());
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index ebe101d405..f1f597657b 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -625,7 +625,7 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint &
QGLShaderProgram *blitProgram =
QGLEngineSharedShaders::shadersForContext(ctx)->blitProgram();
- blitProgram->enable();
+ blitProgram->bind();
blitProgram->setUniformValue("imageTexture", 0 /*QT_IMAGE_TEXTURE_UNIT*/);
// The shader manager's blit program does not multiply the
diff --git a/src/opengl/util/composition_mode_softlight.glsl b/src/opengl/util/composition_mode_softlight.glsl
index 4777b7412c..e4c1f89156 100644
--- a/src/opengl/util/composition_mode_softlight.glsl
+++ b/src/opengl/util/composition_mode_softlight.glsl
@@ -1,18 +1,22 @@
-// Dca' = 2.Sca < Sa ?
-// Dca.(Sa - (1 - Dca/Da).(2.Sca - Sa)) + Sca.(1 - Da) + Dca.(1 - Sa) :
-// (8.Dca <= Da ?
-// Dca.(Sa - (1 - Dca/Da).(2.Sca - Sa).(3 - 8.Dca/Da)) + Sca.(1 - Da) + Dca.(1 - Sa) :
-// (Dca.Sa + ((Dca/Da)^(0.5).Da - Dca).(2.Sca - Sa)) + Sca.(1 - Da) + Dca.(1 - Sa))
+// if 2.Sca <= Sa
+// Dca' = Dca.(Sa + (2.Sca - Sa).(1 - Dca/Da)) + Sca.(1 - Da) + Dca.(1 - Sa)
+// otherwise if 2.Sca > Sa and 4.Dca <= Da
+// Dca' = Dca.Sa + Da.(2.Sca - Sa).(4.Dca/Da.(4.Dca/Da + 1).(Dca/Da - 1) + 7.Dca/Da) + Sca.(1 - Da) + Dca.(1 - Sa)
+// otherwise if 2.Sca > Sa and 4.Dca > Da
+// Dca' = Dca.Sa + Da.(2.Sca - Sa).((Dca/Da)^0.5 - Dca/Da) + Sca.(1 - Da) + Dca.(1 - Sa)
// Da' = Sa + Da - Sa.Da
+
vec4 composite(vec4 src, vec4 dst)
{
vec4 result;
float da = max(dst.a, 0.00001);
- result.rgb = mix(dst.rgb * (src.a - (1.0 - dst.rgb / da) * (2.0 * src.rgb - src.a)),
- mix(dst.rgb * (src.a - (1.0 - dst.rgb / da) * (2.0 * src.rgb - src.a) * (3.0 - 8.0 * dst.rgb / da)),
- (dst.rgb * src.a + (sqrt(dst.rgb / da) * dst.a - dst.rgb) * (2.0 * src.rgb - src.a)),
- step(dst.a, 8.0 * dst.rgb)),
- step(src.a, 2.0 * src.rgb)) + src.rgb * (1.0 - dst.a) + dst.rgb * (1.0 - src.a);
+ vec3 dst_np = dst.rgb / da;
+ result.rgb = mix(dst.rgb * (src.a + (2.0 * src.rgb - src.a) * (1.0 - dst_np)),
+ mix(dst.rgb * src.a + dst.a * (2.0 * src.rgb - src.a) * ((16.0 * dst_np - 12.0) * dst_np + 3.0) * dst_np,
+ dst.rgb * src.a + dst.a * (2.0 * src.rgb - src.a) * (sqrt(dst_np) - dst_np),
+ step(dst.a, 4.0 * dst.rgb)),
+ step(src.a, 2.0 * src.rgb))
+ + src.rgb * (1.0 - dst.a) + dst.rgb * (1.0 - src.a);
result.a = src.a + dst.a - src.a * dst.a;
return result;
}
diff --git a/src/opengl/util/fragmentprograms_p.h b/src/opengl/util/fragmentprograms_p.h
index 9154c6ea3e..2241057366 100644
--- a/src/opengl/util/fragmentprograms_p.h
+++ b/src/opengl/util/fragmentprograms_p.h
@@ -519,8 +519,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_SOFTLIGHT =
"!!ARBfp1.0\n"
"PARAM c[6] = { program.local[0..3],\n"
- " { 1, 2, 9.9999997e-006, 8 },\n"
- " { 3 } };\n"
+ " { 1, 2, 9.9999997e-006, 4 },\n"
+ " { 16, 12, 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -530,30 +530,31 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"MUL R0.xy, fragment.position, c[1];\n"
"TEX R0, R0, texture[0], 2D;\n"
"MAX R1.x, R0.w, c[4].z;\n"
- "RCP R1.w, R1.x;\n"
- "MUL R1.xyz, R0, R1.w;\n"
- "MUL R4.xyz, -R1, c[4].w;\n"
- "RSQ R2.x, R1.x;\n"
- "RSQ R2.z, R1.z;\n"
- "RSQ R2.y, R1.y;\n"
- "MAD R1.xyz, -R0, R1.w, c[4].x;\n"
- "RCP R2.x, R2.x;\n"
- "RCP R2.z, R2.z;\n"
- "RCP R2.y, R2.y;\n"
- "MAD R3.xyz, R0.w, R2, -R0;\n"
- "MAD R2.xyz, fragment.color.primary, c[4].y, -fragment.color.primary.w;\n"
- "MUL R3.xyz, R2, R3;\n"
- "ADD R5.xyz, R4, c[5].x;\n"
- "MUL R4.xyz, R1, R2;\n"
- "MAD R1.xyz, -R1, R2, fragment.color.primary.w;\n"
+ "RCP R1.x, R1.x;\n"
+ "MUL R2.xyz, R0, R1.x;\n"
+ "MAD R1.xyz, R2, c[5].x, -c[5].y;\n"
+ "MAD R3.xyz, R2, R1, c[5].z;\n"
+ "MAD R1.xyz, fragment.color.primary, c[4].y, -fragment.color.primary.w;\n"
+ "MUL R4.xyz, R0.w, R1;\n"
+ "MUL R5.xyz, R4, R3;\n"
+ "RSQ R1.w, R2.x;\n"
+ "RSQ R2.w, R2.z;\n"
+ "RCP R3.x, R1.w;\n"
+ "RSQ R1.w, R2.y;\n"
+ "MUL R5.xyz, R2, R5;\n"
+ "RCP R3.z, R2.w;\n"
+ "RCP R3.y, R1.w;\n"
+ "ADD R3.xyz, -R2, R3;\n"
+ "MUL R3.xyz, R4, R3;\n"
+ "ADD R2.xyz, -R2, c[4].x;\n"
+ "MAD R1.xyz, R1, R2, fragment.color.primary.w;\n"
"MUL R2.xyz, fragment.color.primary, c[4].y;\n"
- "MAD R5.xyz, -R4, R5, fragment.color.primary.w;\n"
+ "MAD R4.xyz, fragment.color.primary.w, R0, R5;\n"
"MAD R3.xyz, fragment.color.primary.w, R0, R3;\n"
- "MAD R4.xyz, -R0, R5, R3;\n"
+ "ADD R5.xyz, R3, -R4;\n"
"MUL R3.xyz, R0, c[4].w;\n"
- "MUL R5.xyz, R0, R5;\n"
"SGE R3.xyz, R3, R0.w;\n"
- "MAD R3.xyz, R3, R4, R5;\n"
+ "MAD R3.xyz, R3, R5, R4;\n"
"MAD R3.xyz, -R0, R1, R3;\n"
"MUL R1.xyz, R0, R1;\n"
"SGE R2.xyz, R2, fragment.color.primary.w;\n"
@@ -861,8 +862,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_SOFTLIGHT_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[3] = { program.local[0],\n"
- " { 1, 2, 9.9999997e-006, 8 },\n"
- " { 3 } };\n"
+ " { 1, 2, 9.9999997e-006, 4 },\n"
+ " { 16, 12, 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -872,30 +873,31 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"MUL R0.xy, fragment.position, c[0];\n"
"TEX R0, R0, texture[0], 2D;\n"
"MAX R1.x, R0.w, c[1].z;\n"
- "RCP R1.w, R1.x;\n"
- "MUL R1.xyz, R0, R1.w;\n"
- "MUL R4.xyz, -R1, c[1].w;\n"
- "RSQ R2.x, R1.x;\n"
- "RSQ R2.z, R1.z;\n"
- "RSQ R2.y, R1.y;\n"
- "RCP R2.x, R2.x;\n"
- "RCP R2.z, R2.z;\n"
- "RCP R2.y, R2.y;\n"
- "MAD R3.xyz, R0.w, R2, -R0;\n"
- "MAD R2.xyz, fragment.color.primary, c[1].y, -fragment.color.primary.w;\n"
- "MUL R3.xyz, R2, R3;\n"
+ "RCP R1.x, R1.x;\n"
+ "MUL R2.xyz, R0, R1.x;\n"
+ "MAD R1.xyz, R2, c[2].x, -c[2].y;\n"
+ "MAD R3.xyz, R2, R1, c[2].z;\n"
+ "MAD R1.xyz, fragment.color.primary, c[1].y, -fragment.color.primary.w;\n"
+ "MUL R4.xyz, R0.w, R1;\n"
+ "MUL R5.xyz, R4, R3;\n"
+ "RSQ R1.w, R2.x;\n"
+ "RCP R3.x, R1.w;\n"
+ "RSQ R2.w, R2.z;\n"
+ "RSQ R1.w, R2.y;\n"
+ "MUL R5.xyz, R2, R5;\n"
+ "RCP R3.z, R2.w;\n"
+ "RCP R3.y, R1.w;\n"
+ "ADD R3.xyz, -R2, R3;\n"
+ "MUL R3.xyz, R4, R3;\n"
+ "ADD R2.xyz, -R2, c[1].x;\n"
+ "MAD R1.xyz, R1, R2, fragment.color.primary.w;\n"
+ "MUL R2.xyz, fragment.color.primary, c[1].y;\n"
+ "MAD R4.xyz, fragment.color.primary.w, R0, R5;\n"
"MAD R3.xyz, fragment.color.primary.w, R0, R3;\n"
- "MAD R1.xyz, -R0, R1.w, c[1].x;\n"
- "ADD R5.xyz, R4, c[2].x;\n"
- "MUL R4.xyz, R1, R2;\n"
- "MAD R1.xyz, -R1, R2, fragment.color.primary.w;\n"
- "MAD R5.xyz, -R4, R5, fragment.color.primary.w;\n"
- "MAD R4.xyz, -R0, R5, R3;\n"
+ "ADD R5.xyz, R3, -R4;\n"
"MUL R3.xyz, R0, c[1].w;\n"
- "MUL R2.xyz, fragment.color.primary, c[1].y;\n"
- "MUL R5.xyz, R0, R5;\n"
"SGE R3.xyz, R3, R0.w;\n"
- "MAD R3.xyz, R3, R4, R5;\n"
+ "MAD R3.xyz, R3, R5, R4;\n"
"MAD R3.xyz, -R0, R1, R3;\n"
"MUL R1.xyz, R0, R1;\n"
"SGE R2.xyz, R2, fragment.color.primary.w;\n"
@@ -1457,7 +1459,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"!!ARBfp1.0\n"
"PARAM c[11] = { program.local[0..8],\n"
" { 2, 4, 1, 9.9999997e-006 },\n"
- " { 8, 3 } };\n"
+ " { 16, 12, 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -1469,53 +1471,55 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"MAD R0.xyz, fragment.position.x, c[2], R0;\n"
"ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
- "MUL R1.xy, fragment.position, c[6];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "MAX R0.w, R1, c[9];\n"
- "RCP R2.w, R0.w;\n"
- "MUL R5.xyz, R1, R2.w;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
"ADD R0.z, R0, R0.w;\n"
"MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.y, R0.x, c[9].x;\n"
- "MOV R0.x, c[9];\n"
- "RSQ R2.x, R5.x;\n"
- "RSQ R2.z, R5.z;\n"
- "RSQ R2.y, R5.y;\n"
"MUL R0.z, -R0, c[1].x;\n"
- "MUL R0.z, R0, c[9].y;\n"
- "MAD R0.z, R0.y, R0.y, -R0;\n"
- "MUL R0.w, R0.x, c[1].x;\n"
- "RSQ R0.z, R0.z;\n"
- "RCP R0.x, R0.z;\n"
- "RCP R0.z, R0.w;\n"
- "ADD R0.x, -R0.y, R0;\n"
- "MUL R0.x, R0, R0.z;\n"
+ "MUL R0.y, R0.z, c[9];\n"
+ "MUL R0.x, R0, c[9];\n"
+ "MUL R0.zw, fragment.position.xyxy, c[6].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MAD R0.y, R0.x, R0.x, -R0;\n"
+ "RSQ R0.y, R0.y;\n"
+ "RCP R0.y, R0.y;\n"
+ "ADD R0.y, -R0.x, R0;\n"
+ "MOV R0.x, c[9];\n"
+ "MUL R0.x, R0, c[1];\n"
+ "MAX R0.z, R1.w, c[9].w;\n"
+ "RCP R0.z, R0.z;\n"
+ "MUL R3.xyz, R1, R0.z;\n"
+ "MAD R4.xyz, R3, c[10].x, -c[10].y;\n"
+ "RCP R0.x, R0.x;\n"
+ "MUL R0.x, R0.y, R0;\n"
"TEX R0, R0, texture[2], 1D;\n"
- "MAD R3.xyz, R0, c[9].x, -R0.w;\n"
- "MAD R6.xyz, -R5, c[10].x, c[10].y;\n"
- "RCP R2.x, R2.x;\n"
- "RCP R2.z, R2.z;\n"
- "RCP R2.y, R2.y;\n"
- "MAD R2.xyz, R1.w, R2, -R1;\n"
- "MUL R2.xyz, R3, R2;\n"
- "MAD R4.xyz, R0.w, R1, R2;\n"
- "MAD R2.xyz, -R1, R2.w, c[9].z;\n"
- "MUL R5.xyz, R2, R3;\n"
- "MAD R6.xyz, -R5, R6, R0.w;\n"
- "MAD R5.xyz, -R1, R6, R4;\n"
- "MAD R2.xyz, -R2, R3, R0.w;\n"
+ "MAD R2.xyz, R0, c[9].x, -R0.w;\n"
+ "MAD R4.xyz, R3, R4, c[10].z;\n"
+ "MUL R5.xyz, R1.w, R2;\n"
+ "MUL R6.xyz, R5, R4;\n"
+ "RSQ R2.w, R3.x;\n"
+ "RCP R4.x, R2.w;\n"
+ "RSQ R2.w, R3.y;\n"
+ "RSQ R3.w, R3.z;\n"
+ "RCP R4.y, R2.w;\n"
+ "RCP R4.z, R3.w;\n"
+ "ADD R4.xyz, -R3, R4;\n"
+ "MUL R6.xyz, R3, R6;\n"
+ "MUL R4.xyz, R5, R4;\n"
+ "ADD R3.xyz, -R3, c[9].z;\n"
+ "MAD R2.xyz, R2, R3, R0.w;\n"
"MUL R3.xyz, R0, c[9].x;\n"
- "MUL R4.xyz, R1, c[10].x;\n"
- "SGE R3.xyz, R3, R0.w;\n"
- "ADD R2.w, -R1, c[9].z;\n"
- "MUL R6.xyz, R1, R6;\n"
+ "MAD R5.xyz, R0.w, R1, R6;\n"
+ "MAD R4.xyz, R0.w, R1, R4;\n"
+ "ADD R6.xyz, R4, -R5;\n"
+ "MUL R4.xyz, R1, c[9].y;\n"
"SGE R4.xyz, R4, R1.w;\n"
- "MAD R4.xyz, R4, R5, R6;\n"
+ "MAD R4.xyz, R4, R6, R5;\n"
"MAD R4.xyz, -R1, R2, R4;\n"
+ "SGE R3.xyz, R3, R0.w;\n"
"MUL R2.xyz, R1, R2;\n"
+ "ADD R2.w, -R1, c[9].z;\n"
"MAD R2.xyz, R3, R4, R2;\n"
"MAD R2.xyz, R0, R2.w, R2;\n"
"ADD R0.x, -R0.w, c[9].z;\n"
@@ -2060,7 +2064,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"!!ARBfp1.0\n"
"PARAM c[8] = { program.local[0..5],\n"
" { 2, 4, 1, 9.9999997e-006 },\n"
- " { 8, 3 } };\n"
+ " { 16, 12, 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -2072,49 +2076,51 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"MAD R0.xyz, fragment.position.x, c[2], R0;\n"
"ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
- "MUL R1.xy, fragment.position, c[5];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "MAX R0.w, R1, c[6];\n"
- "RCP R2.w, R0.w;\n"
- "MUL R5.xyz, R1, R2.w;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
"ADD R0.z, R0, R0.w;\n"
"MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.y, R0.x, c[6].x;\n"
- "MOV R0.x, c[6];\n"
- "RSQ R2.x, R5.x;\n"
- "RSQ R2.z, R5.z;\n"
- "RSQ R2.y, R5.y;\n"
"MUL R0.z, -R0, c[1].x;\n"
- "MUL R0.z, R0, c[6].y;\n"
- "MAD R0.z, R0.y, R0.y, -R0;\n"
- "MUL R0.w, R0.x, c[1].x;\n"
- "RSQ R0.z, R0.z;\n"
- "RCP R0.x, R0.z;\n"
- "RCP R0.z, R0.w;\n"
- "ADD R0.x, -R0.y, R0;\n"
- "MUL R0.x, R0, R0.z;\n"
+ "MUL R0.y, R0.z, c[6];\n"
+ "MUL R0.x, R0, c[6];\n"
+ "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MAD R0.y, R0.x, R0.x, -R0;\n"
+ "RSQ R0.y, R0.y;\n"
+ "RCP R0.y, R0.y;\n"
+ "ADD R0.y, -R0.x, R0;\n"
+ "MOV R0.x, c[6];\n"
+ "MUL R0.x, R0, c[1];\n"
+ "MAX R0.z, R1.w, c[6].w;\n"
+ "RCP R0.z, R0.z;\n"
+ "MUL R3.xyz, R1, R0.z;\n"
+ "MAD R4.xyz, R3, c[7].x, -c[7].y;\n"
+ "RCP R0.x, R0.x;\n"
+ "MUL R0.x, R0.y, R0;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "MAD R3.xyz, R0, c[6].x, -R0.w;\n"
- "MAD R6.xyz, -R5, c[7].x, c[7].y;\n"
- "RCP R2.x, R2.x;\n"
- "RCP R2.z, R2.z;\n"
- "RCP R2.y, R2.y;\n"
- "MAD R2.xyz, R1.w, R2, -R1;\n"
- "MUL R2.xyz, R3, R2;\n"
- "MAD R4.xyz, R0.w, R1, R2;\n"
- "MAD R2.xyz, -R1, R2.w, c[6].z;\n"
- "MUL R5.xyz, R2, R3;\n"
- "MAD R2.xyz, -R2, R3, R0.w;\n"
- "MAD R6.xyz, -R5, R6, R0.w;\n"
- "MAD R5.xyz, -R1, R6, R4;\n"
+ "MAD R2.xyz, R0, c[6].x, -R0.w;\n"
+ "MAD R4.xyz, R3, R4, c[7].z;\n"
+ "MUL R5.xyz, R1.w, R2;\n"
+ "MUL R6.xyz, R5, R4;\n"
+ "RSQ R2.w, R3.x;\n"
+ "RCP R4.x, R2.w;\n"
+ "RSQ R2.w, R3.y;\n"
+ "RSQ R3.w, R3.z;\n"
+ "RCP R4.y, R2.w;\n"
+ "RCP R4.z, R3.w;\n"
+ "ADD R4.xyz, -R3, R4;\n"
+ "MUL R6.xyz, R3, R6;\n"
+ "MUL R4.xyz, R5, R4;\n"
+ "ADD R3.xyz, -R3, c[6].z;\n"
+ "MAD R2.xyz, R2, R3, R0.w;\n"
"MUL R3.xyz, R0, c[6].x;\n"
- "MUL R4.xyz, R1, c[7].x;\n"
- "MUL R6.xyz, R1, R6;\n"
+ "MAD R5.xyz, R0.w, R1, R6;\n"
+ "MAD R4.xyz, R0.w, R1, R4;\n"
+ "ADD R6.xyz, R4, -R5;\n"
+ "MUL R4.xyz, R1, c[6].y;\n"
"SGE R4.xyz, R4, R1.w;\n"
- "MAD R4.xyz, R4, R5, R6;\n"
+ "MAD R4.xyz, R4, R6, R5;\n"
"MAD R4.xyz, -R1, R2, R4;\n"
"MUL R2.xyz, R1, R2;\n"
"SGE R3.xyz, R3, R0.w;\n"
@@ -2899,11 +2905,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_SOFTLIGHT =
"!!ARBfp1.0\n"
- "PARAM c[12] = { program.local[0..7],\n"
+ "PARAM c[13] = { program.local[0..7],\n"
" { 0.0020000001, -0.01348047, 0.05747731, 0.1212391 },\n"
" { 0.1956359, 0.33299461, 0.99999559, 1.570796 },\n"
" { 3.141593, 0.15915494, 1, 2 },\n"
- " { 9.9999997e-006, 8, 3 } };\n"
+ " { 9.9999997e-006, 4, 16, 12 },\n"
+ " { 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -2940,41 +2947,43 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
"ADD R0.w, -R0.z, c[10].x;\n"
"CMP R0.x, R0, R0.w, R0.z;\n"
"MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
- "CMP R0.x, -R0.y, -R0, R0;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MAX R0.y, R1.w, c[11].x;\n"
- "RCP R2.w, R0.y;\n"
- "MUL R5.xyz, R1, R2.w;\n"
- "RSQ R2.x, R5.x;\n"
- "RSQ R2.z, R5.z;\n"
- "RSQ R2.y, R5.y;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "MAX R0.z, R1.w, c[11].x;\n"
+ "RCP R2.x, R0.z;\n"
+ "MUL R3.xyz, R1, R2.x;\n"
+ "MAD R4.xyz, R3, c[11].z, -c[11].w;\n"
"ADD R0.x, R0, c[0];\n"
"MUL R0.x, R0, c[10].y;\n"
"FLR R0.y, R0.x;\n"
"ADD R0.x, R0, -R0.y;\n"
"TEX R0, R0, texture[2], 1D;\n"
- "MAD R3.xyz, R0, c[10].w, -R0.w;\n"
- "MAD R6.xyz, -R5, c[11].y, c[11].z;\n"
- "RCP R2.x, R2.x;\n"
- "RCP R2.z, R2.z;\n"
- "RCP R2.y, R2.y;\n"
- "MAD R2.xyz, R1.w, R2, -R1;\n"
- "MUL R2.xyz, R3, R2;\n"
- "MAD R4.xyz, R0.w, R1, R2;\n"
- "MAD R2.xyz, -R1, R2.w, c[10].z;\n"
- "MUL R5.xyz, R2, R3;\n"
- "MAD R6.xyz, -R5, R6, R0.w;\n"
- "MAD R5.xyz, -R1, R6, R4;\n"
- "MAD R2.xyz, -R2, R3, R0.w;\n"
+ "MAD R2.xyz, R0, c[10].w, -R0.w;\n"
+ "MAD R4.xyz, R3, R4, c[12].x;\n"
+ "MUL R5.xyz, R1.w, R2;\n"
+ "MUL R6.xyz, R5, R4;\n"
+ "RSQ R2.w, R3.x;\n"
+ "RCP R4.x, R2.w;\n"
+ "RSQ R2.w, R3.y;\n"
+ "RSQ R3.w, R3.z;\n"
+ "RCP R4.y, R2.w;\n"
+ "RCP R4.z, R3.w;\n"
+ "ADD R4.xyz, -R3, R4;\n"
+ "MUL R6.xyz, R3, R6;\n"
+ "MUL R4.xyz, R5, R4;\n"
+ "ADD R3.xyz, -R3, c[10].z;\n"
+ "MAD R2.xyz, R2, R3, R0.w;\n"
"MUL R3.xyz, R0, c[10].w;\n"
+ "MAD R5.xyz, R0.w, R1, R6;\n"
+ "MAD R4.xyz, R0.w, R1, R4;\n"
+ "ADD R6.xyz, R4, -R5;\n"
"MUL R4.xyz, R1, c[11].y;\n"
- "SGE R3.xyz, R3, R0.w;\n"
- "ADD R2.w, -R1, c[10].z;\n"
- "MUL R6.xyz, R1, R6;\n"
"SGE R4.xyz, R4, R1.w;\n"
- "MAD R4.xyz, R4, R5, R6;\n"
+ "MAD R4.xyz, R4, R6, R5;\n"
"MAD R4.xyz, -R1, R2, R4;\n"
+ "SGE R3.xyz, R3, R0.w;\n"
"MUL R2.xyz, R1, R2;\n"
+ "ADD R2.w, -R1, c[10].z;\n"
"MAD R2.xyz, R3, R4, R2;\n"
"MAD R2.xyz, R0, R2.w, R2;\n"
"ADD R0.x, -R0.w, c[10].z;\n"
@@ -3682,11 +3691,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_SOFTLIGHT_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[9] = { program.local[0..4],\n"
+ "PARAM c[10] = { program.local[0..4],\n"
" { 0.0020000001, -0.01348047, 0.05747731, 0.1212391 },\n"
" { 0.1956359, 0.33299461, 0.99999559, 1.570796 },\n"
" { 3.141593, 0.15915494, 1, 2 },\n"
- " { 9.9999997e-006, 8, 3 } };\n"
+ " { 9.9999997e-006, 4, 16, 12 },\n"
+ " { 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -3723,37 +3733,39 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
"ADD R0.w, -R0.z, c[7].x;\n"
"CMP R0.x, R0, R0.w, R0.z;\n"
"MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
- "CMP R0.x, -R0.y, -R0, R0;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MAX R0.y, R1.w, c[8].x;\n"
- "RCP R2.w, R0.y;\n"
- "MUL R5.xyz, R1, R2.w;\n"
- "RSQ R2.x, R5.x;\n"
- "RSQ R2.z, R5.z;\n"
- "RSQ R2.y, R5.y;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "MAX R0.z, R1.w, c[8].x;\n"
+ "RCP R2.x, R0.z;\n"
+ "MUL R3.xyz, R1, R2.x;\n"
+ "MAD R4.xyz, R3, c[8].z, -c[8].w;\n"
"ADD R0.x, R0, c[0];\n"
"MUL R0.x, R0, c[7].y;\n"
"FLR R0.y, R0.x;\n"
"ADD R0.x, R0, -R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "MAD R3.xyz, R0, c[7].w, -R0.w;\n"
- "MAD R6.xyz, -R5, c[8].y, c[8].z;\n"
- "RCP R2.x, R2.x;\n"
- "RCP R2.z, R2.z;\n"
- "RCP R2.y, R2.y;\n"
- "MAD R2.xyz, R1.w, R2, -R1;\n"
- "MUL R2.xyz, R3, R2;\n"
- "MAD R4.xyz, R0.w, R1, R2;\n"
- "MAD R2.xyz, -R1, R2.w, c[7].z;\n"
- "MUL R5.xyz, R2, R3;\n"
- "MAD R2.xyz, -R2, R3, R0.w;\n"
- "MAD R6.xyz, -R5, R6, R0.w;\n"
- "MAD R5.xyz, -R1, R6, R4;\n"
+ "MAD R2.xyz, R0, c[7].w, -R0.w;\n"
+ "MAD R4.xyz, R3, R4, c[9].x;\n"
+ "MUL R5.xyz, R1.w, R2;\n"
+ "MUL R6.xyz, R5, R4;\n"
+ "RSQ R2.w, R3.x;\n"
+ "RCP R4.x, R2.w;\n"
+ "RSQ R2.w, R3.y;\n"
+ "RSQ R3.w, R3.z;\n"
+ "RCP R4.y, R2.w;\n"
+ "RCP R4.z, R3.w;\n"
+ "ADD R4.xyz, -R3, R4;\n"
+ "MUL R6.xyz, R3, R6;\n"
+ "MUL R4.xyz, R5, R4;\n"
+ "ADD R3.xyz, -R3, c[7].z;\n"
+ "MAD R2.xyz, R2, R3, R0.w;\n"
"MUL R3.xyz, R0, c[7].w;\n"
+ "MAD R5.xyz, R0.w, R1, R6;\n"
+ "MAD R4.xyz, R0.w, R1, R4;\n"
+ "ADD R6.xyz, R4, -R5;\n"
"MUL R4.xyz, R1, c[8].y;\n"
- "MUL R6.xyz, R1, R6;\n"
"SGE R4.xyz, R4, R1.w;\n"
- "MAD R4.xyz, R4, R5, R6;\n"
+ "MAD R4.xyz, R4, R6, R5;\n"
"MAD R4.xyz, -R1, R2, R4;\n"
"MUL R2.xyz, R1, R2;\n"
"SGE R3.xyz, R3, R0.w;\n"
@@ -4356,8 +4368,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_SOFTLIGHT =
"!!ARBfp1.0\n"
"PARAM c[10] = { program.local[0..7],\n"
- " { 1, 2, 9.9999997e-006, 8 },\n"
- " { 3 } };\n"
+ " { 1, 2, 9.9999997e-006, 4 },\n"
+ " { 16, 12, 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -4365,13 +4377,6 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"TEMP R4;\n"
"TEMP R5;\n"
"TEMP R6;\n"
- "MUL R0.xy, fragment.position, c[5];\n"
- "TEX R1, R0, texture[0], 2D;\n"
- "MAX R0.w, R1, c[8].z;\n"
- "RCP R2.w, R0.w;\n"
- "MUL R2.xyz, R1, R2.w;\n"
- "RSQ R0.w, R2.x;\n"
- "MUL R5.xyz, -R2, c[8].w;\n"
"MUL R0.xyz, fragment.position.y, c[2];\n"
"MAD R0.xyz, fragment.position.x, c[1], R0;\n"
"ADD R0.xyz, R0, c[3];\n"
@@ -4379,32 +4384,40 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "RSQ R0.z, R2.y;\n"
- "RSQ R0.y, R2.z;\n"
- "MAD R2.xyz, -R1, R2.w, c[8].x;\n"
- "RCP R3.x, R0.w;\n"
- "RCP R3.y, R0.z;\n"
- "RCP R3.z, R0.y;\n"
+ "MUL R1.xy, fragment.position, c[5];\n"
+ "TEX R1, R1, texture[0], 2D;\n"
+ "MAX R0.z, R1.w, c[8];\n"
+ "RCP R0.z, R0.z;\n"
+ "MUL R3.xyz, R1, R0.z;\n"
+ "MAD R2.xyz, R3, c[9].x, -c[9].y;\n"
"MUL R0.x, R0, c[0].z;\n"
"TEX R0, R0, texture[2], 1D;\n"
- "MAD R4.xyz, R1.w, R3, -R1;\n"
- "MAD R3.xyz, R0, c[8].y, -R0.w;\n"
- "MUL R4.xyz, R3, R4;\n"
- "ADD R6.xyz, R5, c[9].x;\n"
- "MUL R5.xyz, R2, R3;\n"
- "MAD R2.xyz, -R2, R3, R0.w;\n"
+ "MAD R4.xyz, R3, R2, c[9].z;\n"
+ "MAD R2.xyz, R0, c[8].y, -R0.w;\n"
+ "MUL R5.xyz, R1.w, R2;\n"
+ "MUL R6.xyz, R5, R4;\n"
+ "RSQ R2.w, R3.x;\n"
+ "RCP R4.x, R2.w;\n"
+ "RSQ R2.w, R3.y;\n"
+ "RSQ R3.w, R3.z;\n"
+ "RCP R4.y, R2.w;\n"
+ "RCP R4.z, R3.w;\n"
+ "ADD R4.xyz, -R3, R4;\n"
+ "MUL R6.xyz, R3, R6;\n"
+ "MUL R4.xyz, R5, R4;\n"
+ "ADD R3.xyz, -R3, c[8].x;\n"
+ "MAD R2.xyz, R2, R3, R0.w;\n"
"MUL R3.xyz, R0, c[8].y;\n"
- "MAD R6.xyz, -R5, R6, R0.w;\n"
+ "MAD R5.xyz, R0.w, R1, R6;\n"
"MAD R4.xyz, R0.w, R1, R4;\n"
- "MAD R5.xyz, -R1, R6, R4;\n"
+ "ADD R6.xyz, R4, -R5;\n"
"MUL R4.xyz, R1, c[8].w;\n"
- "SGE R3.xyz, R3, R0.w;\n"
- "ADD R2.w, -R1, c[8].x;\n"
- "MUL R6.xyz, R1, R6;\n"
"SGE R4.xyz, R4, R1.w;\n"
- "MAD R4.xyz, R4, R5, R6;\n"
+ "MAD R4.xyz, R4, R6, R5;\n"
"MAD R4.xyz, -R1, R2, R4;\n"
+ "SGE R3.xyz, R3, R0.w;\n"
"MUL R2.xyz, R1, R2;\n"
+ "ADD R2.w, -R1, c[8].x;\n"
"MAD R2.xyz, R3, R4, R2;\n"
"MAD R2.xyz, R0, R2.w, R2;\n"
"ADD R0.x, -R0.w, c[8];\n"
@@ -4815,8 +4828,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_SOFTLIGHT_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[7] = { program.local[0..4],\n"
- " { 1, 2, 9.9999997e-006, 8 },\n"
- " { 3 } };\n"
+ " { 1, 2, 9.9999997e-006, 4 },\n"
+ " { 16, 12, 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -4824,13 +4837,6 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"TEMP R4;\n"
"TEMP R5;\n"
"TEMP R6;\n"
- "MUL R0.xy, fragment.position, c[4];\n"
- "TEX R1, R0, texture[0], 2D;\n"
- "MAX R0.w, R1, c[5].z;\n"
- "RCP R2.w, R0.w;\n"
- "MUL R2.xyz, R1, R2.w;\n"
- "RSQ R0.w, R2.x;\n"
- "MUL R5.xyz, -R2, c[5].w;\n"
"MUL R0.xyz, fragment.position.y, c[2];\n"
"MAD R0.xyz, fragment.position.x, c[1], R0;\n"
"ADD R0.xyz, R0, c[3];\n"
@@ -4838,28 +4844,36 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "RSQ R0.z, R2.y;\n"
- "RSQ R0.y, R2.z;\n"
- "MAD R2.xyz, -R1, R2.w, c[5].x;\n"
- "RCP R3.x, R0.w;\n"
- "RCP R3.y, R0.z;\n"
- "RCP R3.z, R0.y;\n"
+ "MUL R1.xy, fragment.position, c[4];\n"
+ "TEX R1, R1, texture[0], 2D;\n"
+ "MAX R0.z, R1.w, c[5];\n"
+ "RCP R0.z, R0.z;\n"
+ "MUL R3.xyz, R1, R0.z;\n"
+ "MAD R2.xyz, R3, c[6].x, -c[6].y;\n"
"MUL R0.x, R0, c[0].z;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "MAD R4.xyz, R1.w, R3, -R1;\n"
- "MAD R3.xyz, R0, c[5].y, -R0.w;\n"
- "MUL R4.xyz, R3, R4;\n"
- "ADD R6.xyz, R5, c[6].x;\n"
- "MUL R5.xyz, R2, R3;\n"
- "MAD R2.xyz, -R2, R3, R0.w;\n"
+ "MAD R4.xyz, R3, R2, c[6].z;\n"
+ "MAD R2.xyz, R0, c[5].y, -R0.w;\n"
+ "MUL R5.xyz, R1.w, R2;\n"
+ "MUL R6.xyz, R5, R4;\n"
+ "RSQ R2.w, R3.x;\n"
+ "RCP R4.x, R2.w;\n"
+ "RSQ R2.w, R3.y;\n"
+ "RSQ R3.w, R3.z;\n"
+ "RCP R4.y, R2.w;\n"
+ "RCP R4.z, R3.w;\n"
+ "ADD R4.xyz, -R3, R4;\n"
+ "MUL R6.xyz, R3, R6;\n"
+ "MUL R4.xyz, R5, R4;\n"
+ "ADD R3.xyz, -R3, c[5].x;\n"
+ "MAD R2.xyz, R2, R3, R0.w;\n"
"MUL R3.xyz, R0, c[5].y;\n"
- "MAD R6.xyz, -R5, R6, R0.w;\n"
+ "MAD R5.xyz, R0.w, R1, R6;\n"
"MAD R4.xyz, R0.w, R1, R4;\n"
- "MAD R5.xyz, -R1, R6, R4;\n"
+ "ADD R6.xyz, R4, -R5;\n"
"MUL R4.xyz, R1, c[5].w;\n"
- "MUL R6.xyz, R1, R6;\n"
"SGE R4.xyz, R4, R1.w;\n"
- "MAD R4.xyz, R4, R5, R6;\n"
+ "MAD R4.xyz, R4, R6, R5;\n"
"MAD R4.xyz, -R1, R2, R4;\n"
"MUL R2.xyz, R1, R2;\n"
"SGE R3.xyz, R3, R0.w;\n"
@@ -5333,8 +5347,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_SOFTLIGHT =
"!!ARBfp1.0\n"
"PARAM c[10] = { program.local[0..7],\n"
- " { 1, 2, 9.9999997e-006, 8 },\n"
- " { 3 } };\n"
+ " { 1, 2, 9.9999997e-006, 4 },\n"
+ " { 16, 12, 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -5342,44 +5356,45 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"TEMP R4;\n"
"TEMP R5;\n"
"TEMP R6;\n"
- "MUL R0.xy, fragment.position, c[5];\n"
- "TEX R1, R0, texture[0], 2D;\n"
- "MAX R0.x, R1.w, c[8].z;\n"
- "RCP R2.w, R0.x;\n"
- "MUL R2.xyz, R1, R2.w;\n"
- "RSQ R0.w, R2.x;\n"
- "RCP R3.x, R0.w;\n"
- "RSQ R0.w, R2.y;\n"
- "MUL R5.xyz, -R2, c[8].w;\n"
"MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MUL R1.xy, fragment.position, c[5];\n"
+ "TEX R1, R1, texture[0], 2D;\n"
"MAD R0.xyz, fragment.position.x, c[1], R0;\n"
"ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "RSQ R0.z, R2.z;\n"
- "MAD R2.xyz, -R1, R2.w, c[8].x;\n"
- "RCP R3.y, R0.w;\n"
- "RCP R3.z, R0.z;\n"
+ "MAX R0.w, R1, c[8].z;\n"
+ "RCP R0.w, R0.w;\n"
+ "MUL R3.xyz, R1, R0.w;\n"
+ "MAD R2.xyz, R3, c[9].x, -c[9].y;\n"
"MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[2], 2D;\n"
- "MAD R4.xyz, R1.w, R3, -R1;\n"
- "MAD R3.xyz, R0, c[8].y, -R0.w;\n"
- "MUL R4.xyz, R3, R4;\n"
- "ADD R6.xyz, R5, c[9].x;\n"
- "MUL R5.xyz, R2, R3;\n"
- "MAD R2.xyz, -R2, R3, R0.w;\n"
+ "MAD R4.xyz, R3, R2, c[9].z;\n"
+ "MAD R2.xyz, R0, c[8].y, -R0.w;\n"
+ "MUL R5.xyz, R1.w, R2;\n"
+ "MUL R6.xyz, R5, R4;\n"
+ "RSQ R2.w, R3.x;\n"
+ "RCP R4.x, R2.w;\n"
+ "RSQ R2.w, R3.y;\n"
+ "RSQ R3.w, R3.z;\n"
+ "RCP R4.y, R2.w;\n"
+ "RCP R4.z, R3.w;\n"
+ "ADD R4.xyz, -R3, R4;\n"
+ "MUL R6.xyz, R3, R6;\n"
+ "MUL R4.xyz, R5, R4;\n"
+ "ADD R3.xyz, -R3, c[8].x;\n"
+ "MAD R2.xyz, R2, R3, R0.w;\n"
"MUL R3.xyz, R0, c[8].y;\n"
- "MAD R6.xyz, -R5, R6, R0.w;\n"
+ "MAD R5.xyz, R0.w, R1, R6;\n"
"MAD R4.xyz, R0.w, R1, R4;\n"
- "MAD R5.xyz, -R1, R6, R4;\n"
+ "ADD R6.xyz, R4, -R5;\n"
"MUL R4.xyz, R1, c[8].w;\n"
- "SGE R3.xyz, R3, R0.w;\n"
- "ADD R2.w, -R1, c[8].x;\n"
- "MUL R6.xyz, R1, R6;\n"
"SGE R4.xyz, R4, R1.w;\n"
- "MAD R4.xyz, R4, R5, R6;\n"
+ "MAD R4.xyz, R4, R6, R5;\n"
"MAD R4.xyz, -R1, R2, R4;\n"
+ "SGE R3.xyz, R3, R0.w;\n"
"MUL R2.xyz, R1, R2;\n"
+ "ADD R2.w, -R1, c[8].x;\n"
"MAD R2.xyz, R3, R4, R2;\n"
"MAD R2.xyz, R0, R2.w, R2;\n"
"ADD R0.x, -R0.w, c[8];\n"
@@ -5768,8 +5783,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_SOFTLIGHT_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[7] = { program.local[0..4],\n"
- " { 1, 2, 9.9999997e-006, 8 },\n"
- " { 3 } };\n"
+ " { 1, 2, 9.9999997e-006, 4 },\n"
+ " { 16, 12, 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -5777,40 +5792,41 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"TEMP R4;\n"
"TEMP R5;\n"
"TEMP R6;\n"
- "MUL R0.xy, fragment.position, c[4];\n"
- "TEX R1, R0, texture[0], 2D;\n"
- "MAX R0.x, R1.w, c[5].z;\n"
- "RCP R2.w, R0.x;\n"
- "MUL R2.xyz, R1, R2.w;\n"
- "RSQ R0.w, R2.x;\n"
- "RCP R3.x, R0.w;\n"
- "RSQ R0.w, R2.y;\n"
- "MUL R5.xyz, -R2, c[5].w;\n"
"MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MUL R1.xy, fragment.position, c[4];\n"
+ "TEX R1, R1, texture[0], 2D;\n"
"MAD R0.xyz, fragment.position.x, c[1], R0;\n"
"ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "RSQ R0.z, R2.z;\n"
- "MAD R2.xyz, -R1, R2.w, c[5].x;\n"
- "RCP R3.y, R0.w;\n"
- "RCP R3.z, R0.z;\n"
+ "MAX R0.w, R1, c[5].z;\n"
+ "RCP R0.w, R0.w;\n"
+ "MUL R3.xyz, R1, R0.w;\n"
+ "MAD R2.xyz, R3, c[6].x, -c[6].y;\n"
"MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[1], 2D;\n"
- "MAD R4.xyz, R1.w, R3, -R1;\n"
- "MAD R3.xyz, R0, c[5].y, -R0.w;\n"
- "MUL R4.xyz, R3, R4;\n"
- "ADD R6.xyz, R5, c[6].x;\n"
- "MUL R5.xyz, R2, R3;\n"
- "MAD R2.xyz, -R2, R3, R0.w;\n"
+ "MAD R4.xyz, R3, R2, c[6].z;\n"
+ "MAD R2.xyz, R0, c[5].y, -R0.w;\n"
+ "MUL R5.xyz, R1.w, R2;\n"
+ "MUL R6.xyz, R5, R4;\n"
+ "RSQ R2.w, R3.x;\n"
+ "RCP R4.x, R2.w;\n"
+ "RSQ R2.w, R3.y;\n"
+ "RSQ R3.w, R3.z;\n"
+ "RCP R4.y, R2.w;\n"
+ "RCP R4.z, R3.w;\n"
+ "ADD R4.xyz, -R3, R4;\n"
+ "MUL R6.xyz, R3, R6;\n"
+ "MUL R4.xyz, R5, R4;\n"
+ "ADD R3.xyz, -R3, c[5].x;\n"
+ "MAD R2.xyz, R2, R3, R0.w;\n"
"MUL R3.xyz, R0, c[5].y;\n"
- "MAD R6.xyz, -R5, R6, R0.w;\n"
+ "MAD R5.xyz, R0.w, R1, R6;\n"
"MAD R4.xyz, R0.w, R1, R4;\n"
- "MAD R5.xyz, -R1, R6, R4;\n"
+ "ADD R6.xyz, R4, -R5;\n"
"MUL R4.xyz, R1, c[5].w;\n"
- "MUL R6.xyz, R1, R6;\n"
"SGE R4.xyz, R4, R1.w;\n"
- "MAD R4.xyz, R4, R5, R6;\n"
+ "MAD R4.xyz, R4, R6, R5;\n"
"MAD R4.xyz, -R1, R2, R4;\n"
"MUL R2.xyz, R1, R2;\n"
"SGE R3.xyz, R3, R0.w;\n"
@@ -6295,8 +6311,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_SOFTLIGHT =
"!!ARBfp1.0\n"
"PARAM c[10] = { program.local[0..7],\n"
- " { 1, 2, 9.9999997e-006, 8 },\n"
- " { 3 } };\n"
+ " { 1, 2, 9.9999997e-006, 4 },\n"
+ " { 16, 12, 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -6304,46 +6320,47 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"TEMP R4;\n"
"TEMP R5;\n"
"TEMP R6;\n"
- "MUL R0.xy, fragment.position, c[5];\n"
- "TEX R0, R0, texture[0], 2D;\n"
- "MAX R1.w, R0, c[8].z;\n"
- "RCP R2.w, R1.w;\n"
- "MUL R2.xyz, R0, R2.w;\n"
- "RSQ R1.w, R2.x;\n"
- "MUL R5.xyz, -R2, c[8].w;\n"
- "MUL R1.xyz, fragment.position.y, c[2];\n"
- "MAD R1.xyz, fragment.position.x, c[1], R1;\n"
- "ADD R1.xyz, R1, c[3];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R1.xyz, R0, c[3];\n"
"RCP R1.z, R1.z;\n"
"MUL R1.xy, R1, R1.z;\n"
"MUL R1.xy, R1, c[0];\n"
"TEX R1.x, R1, texture[2], 2D;\n"
- "RSQ R1.z, R2.y;\n"
- "RSQ R1.y, R2.z;\n"
- "MAD R2.xyz, -R0, R2.w, c[8].x;\n"
- "RCP R3.x, R1.w;\n"
- "RCP R3.y, R1.z;\n"
- "RCP R3.z, R1.y;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "MAX R1.z, R0.w, c[8];\n"
+ "RCP R1.z, R1.z;\n"
+ "MUL R3.xyz, R0, R1.z;\n"
+ "MAD R2.xyz, R3, c[9].x, -c[9].y;\n"
"ADD R1.x, -R1, c[8];\n"
"MUL R1, fragment.color.primary, R1.x;\n"
- "MAD R4.xyz, R0.w, R3, -R0;\n"
- "MAD R3.xyz, R1, c[8].y, -R1.w;\n"
- "MUL R4.xyz, R3, R4;\n"
- "ADD R6.xyz, R5, c[9].x;\n"
- "MUL R5.xyz, R2, R3;\n"
- "MAD R2.xyz, -R2, R3, R1.w;\n"
+ "MAD R4.xyz, R3, R2, c[9].z;\n"
+ "MAD R2.xyz, R1, c[8].y, -R1.w;\n"
+ "MUL R5.xyz, R0.w, R2;\n"
+ "MUL R6.xyz, R5, R4;\n"
+ "RSQ R2.w, R3.x;\n"
+ "RCP R4.x, R2.w;\n"
+ "RSQ R2.w, R3.y;\n"
+ "RSQ R3.w, R3.z;\n"
+ "RCP R4.y, R2.w;\n"
+ "RCP R4.z, R3.w;\n"
+ "ADD R4.xyz, -R3, R4;\n"
+ "MUL R6.xyz, R3, R6;\n"
+ "MUL R4.xyz, R5, R4;\n"
+ "ADD R3.xyz, -R3, c[8].x;\n"
+ "MAD R2.xyz, R2, R3, R1.w;\n"
"MUL R3.xyz, R1, c[8].y;\n"
- "MAD R6.xyz, -R5, R6, R1.w;\n"
+ "MAD R5.xyz, R1.w, R0, R6;\n"
"MAD R4.xyz, R1.w, R0, R4;\n"
- "MAD R5.xyz, -R0, R6, R4;\n"
+ "ADD R6.xyz, R4, -R5;\n"
"MUL R4.xyz, R0, c[8].w;\n"
- "SGE R3.xyz, R3, R1.w;\n"
- "ADD R2.w, -R0, c[8].x;\n"
- "MUL R6.xyz, R0, R6;\n"
"SGE R4.xyz, R4, R0.w;\n"
- "MAD R4.xyz, R4, R5, R6;\n"
+ "MAD R4.xyz, R4, R6, R5;\n"
"MAD R4.xyz, -R0, R2, R4;\n"
+ "SGE R3.xyz, R3, R1.w;\n"
"MUL R2.xyz, R0, R2;\n"
+ "ADD R2.w, -R0, c[8].x;\n"
"MAD R2.xyz, R3, R4, R2;\n"
"MAD R2.xyz, R1, R2.w, R2;\n"
"ADD R1.x, -R1.w, c[8];\n"
@@ -6755,8 +6772,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_SOFTLIGHT_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[7] = { program.local[0..4],\n"
- " { 1, 2, 9.9999997e-006, 8 },\n"
- " { 3 } };\n"
+ " { 1, 2, 9.9999997e-006, 4 },\n"
+ " { 16, 12, 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -6764,42 +6781,43 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"TEMP R4;\n"
"TEMP R5;\n"
"TEMP R6;\n"
- "MUL R0.xy, fragment.position, c[4];\n"
- "TEX R0, R0, texture[0], 2D;\n"
- "MAX R1.w, R0, c[5].z;\n"
- "RCP R2.w, R1.w;\n"
- "MUL R2.xyz, R0, R2.w;\n"
- "RSQ R1.w, R2.x;\n"
- "MUL R5.xyz, -R2, c[5].w;\n"
- "MUL R1.xyz, fragment.position.y, c[2];\n"
- "MAD R1.xyz, fragment.position.x, c[1], R1;\n"
- "ADD R1.xyz, R1, c[3];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R1.xyz, R0, c[3];\n"
"RCP R1.z, R1.z;\n"
"MUL R1.xy, R1, R1.z;\n"
"MUL R1.xy, R1, c[0];\n"
"TEX R1.x, R1, texture[1], 2D;\n"
- "RSQ R1.z, R2.y;\n"
- "RSQ R1.y, R2.z;\n"
- "MAD R2.xyz, -R0, R2.w, c[5].x;\n"
- "RCP R3.x, R1.w;\n"
- "RCP R3.y, R1.z;\n"
- "RCP R3.z, R1.y;\n"
+ "MUL R0.xy, fragment.position, c[4];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "MAX R1.z, R0.w, c[5];\n"
+ "RCP R1.z, R1.z;\n"
+ "MUL R3.xyz, R0, R1.z;\n"
+ "MAD R2.xyz, R3, c[6].x, -c[6].y;\n"
"ADD R1.x, -R1, c[5];\n"
"MUL R1, fragment.color.primary, R1.x;\n"
- "MAD R4.xyz, R0.w, R3, -R0;\n"
- "MAD R3.xyz, R1, c[5].y, -R1.w;\n"
- "MUL R4.xyz, R3, R4;\n"
- "ADD R6.xyz, R5, c[6].x;\n"
- "MUL R5.xyz, R2, R3;\n"
- "MAD R2.xyz, -R2, R3, R1.w;\n"
+ "MAD R4.xyz, R3, R2, c[6].z;\n"
+ "MAD R2.xyz, R1, c[5].y, -R1.w;\n"
+ "MUL R5.xyz, R0.w, R2;\n"
+ "MUL R6.xyz, R5, R4;\n"
+ "RSQ R2.w, R3.x;\n"
+ "RCP R4.x, R2.w;\n"
+ "RSQ R2.w, R3.y;\n"
+ "RSQ R3.w, R3.z;\n"
+ "RCP R4.y, R2.w;\n"
+ "RCP R4.z, R3.w;\n"
+ "ADD R4.xyz, -R3, R4;\n"
+ "MUL R6.xyz, R3, R6;\n"
+ "MUL R4.xyz, R5, R4;\n"
+ "ADD R3.xyz, -R3, c[5].x;\n"
+ "MAD R2.xyz, R2, R3, R1.w;\n"
"MUL R3.xyz, R1, c[5].y;\n"
- "MAD R6.xyz, -R5, R6, R1.w;\n"
+ "MAD R5.xyz, R1.w, R0, R6;\n"
"MAD R4.xyz, R1.w, R0, R4;\n"
- "MAD R5.xyz, -R0, R6, R4;\n"
+ "ADD R6.xyz, R4, -R5;\n"
"MUL R4.xyz, R0, c[5].w;\n"
- "MUL R6.xyz, R0, R6;\n"
"SGE R4.xyz, R4, R0.w;\n"
- "MAD R4.xyz, R4, R5, R6;\n"
+ "MAD R4.xyz, R4, R6, R5;\n"
"MAD R4.xyz, -R0, R2, R4;\n"
"MUL R2.xyz, R0, R2;\n"
"SGE R3.xyz, R3, R1.w;\n"
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index 047d9d8e60..75b7fa5edf 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -1753,13 +1753,13 @@ void QVGPaintEngine::clip(const QRect &rect, Qt::ClipOperation op)
// QRegion copy on the heap for the test if we can.
QRegion clip = d->systemClip; // Reference-counted, no alloc.
QRect clipRect;
- if (clip.numRects() == 1) {
+ if (clip.rectCount() == 1) {
clipRect = clip.boundingRect().intersected(r);
} else if (clip.isEmpty()) {
clipRect = r;
} else {
clip = clip.intersect(r);
- if (clip.numRects() != 1) {
+ if (clip.rectCount() != 1) {
d->maskValid = false;
d->maskIsSet = false;
d->maskRect = QRect();
@@ -1810,7 +1810,7 @@ void QVGPaintEngine::clip(const QRegion &region, Qt::ClipOperation op)
Q_D(QVGPaintEngine);
// Use the QRect case if the region consists of a single rectangle.
- if (region.numRects() == 1) {
+ if (region.rectCount() == 1) {
clip(region.boundingRect(), op);
return;
}
@@ -1853,7 +1853,7 @@ void QVGPaintEngine::clip(const QRegion &region, Qt::ClipOperation op)
clip = r;
else
clip = clip.intersect(r);
- if (clip.numRects() == 1) {
+ if (clip.rectCount() == 1) {
d->maskValid = false;
d->maskIsSet = false;
d->maskRect = clip.boundingRect();
@@ -1871,7 +1871,7 @@ void QVGPaintEngine::clip(const QRegion &region, Qt::ClipOperation op)
case Qt::IntersectClip:
{
- if (region.numRects() != 1) {
+ if (region.rectCount() != 1) {
// If there is more than one rectangle, then intersecting
// the rectangles one by one in modifyMask() will not give
// the desired result. So fall back to path-based clipping.
@@ -2148,7 +2148,7 @@ QRegion QVGPaintEngine::defaultClipRegion()
bool QVGPaintEngine::isDefaultClipRegion(const QRegion& region)
{
- if (region.numRects() != 1)
+ if (region.rectCount() != 1)
return false;
QPaintDevice *pdev = paintDevice();
@@ -3544,7 +3544,7 @@ void QVGCompositionHelper::fillBackground
d->clearColor = color;
d->clearOpacity = 1.0f;
}
- if (region.numRects() == 1) {
+ if (region.rectCount() == 1) {
QRect r = region.boundingRect();
vgClear(r.x(), screenSize.height() - r.y() - r.height(),
r.width(), r.height());
@@ -3569,7 +3569,7 @@ void QVGCompositionHelper::fillBackground
d->ensureBrush(brush);
d->setFillRule(VG_EVEN_ODD);
- if (region.numRects() == 1) {
+ if (region.rectCount() == 1) {
fillBackgroundRect(region.boundingRect(), d);
} else {
const QVector<QRect> rects = region.rects();
diff --git a/src/plugins/accessible/widgets/simplewidgets.cpp b/src/plugins/accessible/widgets/simplewidgets.cpp
index aa51759a61..7be4a2ac4c 100644
--- a/src/plugins/accessible/widgets/simplewidgets.cpp
+++ b/src/plugins/accessible/widgets/simplewidgets.cpp
@@ -256,9 +256,9 @@ QString QAccessibleButton::localizedName(int actionIndex)
QStringList QAccessibleButton::keyBindings(int actionIndex)
{
switch (actionIndex) {
-#ifdef QT_NO_SHORTCUT
+#ifndef QT_NO_SHORTCUT
case 0:
- return button()->shortcut().toString();
+ return QStringList() << button()->shortcut().toString();
#endif
default:
return QStringList();
@@ -528,7 +528,7 @@ QString QAccessibleDisplay::text(Text t, int child) const
#ifndef QT_NO_LCDNUMBER
} else if (qobject_cast<QLCDNumber*>(object())) {
QLCDNumber *l = qobject_cast<QLCDNumber*>(object());
- if (l->numDigits())
+ if (l->digitCount())
str = QString::number(l->value());
else
str = QString::number(l->intValue());
@@ -602,6 +602,44 @@ int QAccessibleDisplay::navigate(RelationFlag rel, int entry, QAccessibleInterfa
return QAccessibleWidgetEx::navigate(rel, entry, target);
}
+/*! \reimp */
+QString QAccessibleDisplay::imageDescription()
+{
+ return widget()->toolTip();
+}
+
+/*! \reimp */
+QSize QAccessibleDisplay::imageSize()
+{
+ QLabel *label = qobject_cast<QLabel *>(widget());
+ if (!label)
+ return QSize();
+ const QPixmap *pixmap = label->pixmap();
+ if (!pixmap)
+ return QSize();
+ return pixmap->size();
+}
+
+/*! \reimp */
+QRect QAccessibleDisplay::imagePosition(QAccessible2::CoordinateType coordType)
+{
+ QLabel *label = qobject_cast<QLabel *>(widget());
+ if (!label)
+ return QRect();
+ const QPixmap *pixmap = label->pixmap();
+ if (!pixmap)
+ return QRect();
+
+ switch (coordType) {
+ case QAccessible2::RelativeToScreen:
+ return QRect(label->mapToGlobal(label->pos()), label->size());
+ case QAccessible2::RelativeToParent:
+ return label->geometry();
+ }
+
+ return QRect();
+}
+
#ifndef QT_NO_LINEEDIT
/*!
\class QAccessibleLineEdit
diff --git a/src/plugins/accessible/widgets/simplewidgets.h b/src/plugins/accessible/widgets/simplewidgets.h
index 0c1cf5e5cb..5182bdd2f8 100644
--- a/src/plugins/accessible/widgets/simplewidgets.h
+++ b/src/plugins/accessible/widgets/simplewidgets.h
@@ -111,7 +111,7 @@ protected:
};
#endif // QT_NO_TOOLBUTTON
-class QAccessibleDisplay : public QAccessibleWidgetEx
+class QAccessibleDisplay : public QAccessibleWidgetEx, public QAccessibleImageInterface
{
Q_ACCESSIBLE_OBJECT
public:
@@ -122,6 +122,11 @@ public:
Relation relationTo(int child, const QAccessibleInterface *other, int otherChild) const;
int navigate(RelationFlag, int entry, QAccessibleInterface **target) const;
+
+ // QAccessibleImageInterface
+ QString imageDescription();
+ QSize imageSize();
+ QRect imagePosition(QAccessible2::CoordinateType coordType);
};
#ifndef QT_NO_LINEEDIT
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp
index cb4fb8895c..daefa21d97 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp
@@ -176,7 +176,7 @@ int QDirectFBPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const
return QDirectFBScreen::depth(imageFormat);
case QPaintDevice::PdmNumColors: {
if (!lockedImage.isNull())
- return lockedImage.numColors();
+ return lockedImage.colorCount();
DFBResult result;
IDirectFBPalette *palette = 0;
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index dd6b0d31ed..c86af73da8 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -68,9 +68,11 @@ public:
};
enum CompositionModeStatus {
- PorterDuff_None = 0x0,
- PorterDuff_SupportedBlits = 0x1,
- PorterDuff_SupportedPrimitives = 0x2
+ PorterDuff_None = 0x00,
+ PorterDuff_SupportedBlits = 0x01,
+ PorterDuff_SupportedPrimitives = 0x02,
+ PorterDuff_SupportedOpaquePrimitives = 0x04,
+ PorterDuff_Dirty = 0x10
};
enum ClipType {
@@ -95,6 +97,7 @@ public:
inline void unlock();
static inline void unlock(QDirectFBPaintDevice *device);
+ inline bool testCompositionMode(const QPen *pen, const QBrush *brush, const QColor *color = 0) const;
inline bool isSimpleBrush(const QBrush &brush) const;
void drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap, const QPointF &pos);
@@ -404,11 +407,11 @@ void QDirectFBPaintEngine::drawRects(const QRect *rects, int rectCount)
if (brush.style() == Qt::NoBrush && pen.style() == Qt::NoPen)
return;
- if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives)
- || (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_RectsUnsupported)
+ if ((d->transformationType & QDirectFBPaintEnginePrivate::Matrix_RectsUnsupported)
|| !d->simplePen
|| d->clipType == QDirectFBPaintEnginePrivate::ComplexClip
- || !d->isSimpleBrush(brush)) {
+ || !d->isSimpleBrush(brush)
+ || !d->testCompositionMode(&pen, &brush)) {
RASTERFALLBACK(DRAW_RECTS, rectCount, VOID_ARG(), VOID_ARG());
d->lock();
QRasterPaintEngine::drawRects(rects, rectCount);
@@ -434,11 +437,11 @@ void QDirectFBPaintEngine::drawRects(const QRectF *rects, int rectCount)
if (brush.style() == Qt::NoBrush && pen.style() == Qt::NoPen)
return;
- if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives)
- || (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_RectsUnsupported)
+ if ((d->transformationType & QDirectFBPaintEnginePrivate::Matrix_RectsUnsupported)
|| !d->simplePen
|| d->clipType == QDirectFBPaintEnginePrivate::ComplexClip
- || !d->isSimpleBrush(brush)) {
+ || !d->isSimpleBrush(brush)
+ || !d->testCompositionMode(&pen, &brush)) {
RASTERFALLBACK(DRAW_RECTS, rectCount, VOID_ARG(), VOID_ARG());
d->lock();
QRasterPaintEngine::drawRects(rects, rectCount);
@@ -460,16 +463,16 @@ void QDirectFBPaintEngine::drawLines(const QLine *lines, int lineCount)
{
Q_D(QDirectFBPaintEngine);
- if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives)
- || !d->simplePen
- || d->clipType == QDirectFBPaintEnginePrivate::ComplexClip) {
+ const QPen &pen = state()->pen;
+ if (!d->simplePen
+ || d->clipType == QDirectFBPaintEnginePrivate::ComplexClip
+ || !d->testCompositionMode(&pen, 0)) {
RASTERFALLBACK(DRAW_LINES, lineCount, VOID_ARG(), VOID_ARG());
d->lock();
QRasterPaintEngine::drawLines(lines, lineCount);
return;
}
- const QPen &pen = state()->pen;
if (pen.style() != Qt::NoPen) {
d->setDFBColor(pen.color());
CLIPPED_PAINT(QT_PREPEND_NAMESPACE(drawLines<QLine>)(lines, lineCount, state()->matrix, d->surface));
@@ -480,16 +483,16 @@ void QDirectFBPaintEngine::drawLines(const QLineF *lines, int lineCount)
{
Q_D(QDirectFBPaintEngine);
- if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives)
- || !d->simplePen
- || d->clipType == QDirectFBPaintEnginePrivate::ComplexClip) {
+ const QPen &pen = state()->pen;
+ if (!d->simplePen
+ || d->clipType == QDirectFBPaintEnginePrivate::ComplexClip
+ || !d->testCompositionMode(&pen, 0)) {
RASTERFALLBACK(DRAW_LINES, lineCount, VOID_ARG(), VOID_ARG());
d->lock();
QRasterPaintEngine::drawLines(lines, lineCount);
return;
}
- const QPen &pen = state()->pen;
if (pen.style() != Qt::NoPen) {
d->setDFBColor(pen.color());
CLIPPED_PAINT(QT_PREPEND_NAMESPACE(drawLines<QLineF>)(lines, lineCount, state()->matrix, d->surface));
@@ -714,8 +717,8 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush)
if (d->clipType != QDirectFBPaintEnginePrivate::ComplexClip) {
switch (brush.style()) {
case Qt::SolidPattern: {
- if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives)
- || (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_RectsUnsupported)) {
+ if (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_RectsUnsupported
+ || !d->testCompositionMode(0, &brush)) {
break;
}
const QColor color = brush.color();
@@ -753,9 +756,9 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QColor &color)
if (!color.isValid())
return;
Q_D(QDirectFBPaintEngine);
- if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives)
- || (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_RectsUnsupported)
- || d->clipType == QDirectFBPaintEnginePrivate::ComplexClip) {
+ if ((d->transformationType & QDirectFBPaintEnginePrivate::Matrix_RectsUnsupported)
+ || d->clipType == QDirectFBPaintEnginePrivate::ComplexClip
+ || !d->testCompositionMode(0, 0, &color)) {
RASTERFALLBACK(FILL_RECT, rect, color, VOID_ARG());
d->lock();
QRasterPaintEngine::fillRect(rect, color);
@@ -815,6 +818,36 @@ bool QDirectFBPaintEnginePrivate::isSimpleBrush(const QBrush &brush) const
return (brush.style() == Qt::NoBrush) || (brush.style() == Qt::SolidPattern && !antialiased);
}
+bool QDirectFBPaintEnginePrivate::testCompositionMode(const QPen *pen, const QBrush *brush, const QColor *color) const
+{
+ Q_ASSERT(!pen || pen->style() == Qt::NoPen || pen->style() == Qt::SolidLine);
+ Q_ASSERT(!brush || brush->style() == Qt::NoBrush || brush->style() == Qt::SolidPattern);
+ switch (compositionModeStatus & (QDirectFBPaintEnginePrivate::PorterDuff_SupportedOpaquePrimitives
+ |QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives)) {
+ case QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives:
+ return true;
+ case QDirectFBPaintEnginePrivate::PorterDuff_SupportedOpaquePrimitives:
+ if (pen && pen->style() == Qt::SolidLine && pen->color().alpha() != 255)
+ return false;
+ if (brush) {
+ if (brush->style() == Qt::SolidPattern && brush->color().alpha() != 255) {
+ return false;
+ }
+ } else if (color && color->alpha() != 255) {
+ return false;
+ }
+ return true;
+ case QDirectFBPaintEnginePrivate::PorterDuff_None:
+ return false;
+ default:
+ // ### PorterDuff_SupportedOpaquePrimitives|PorterDuff_SupportedPrimitives can't be combined
+ break;
+ }
+ Q_ASSERT(0);
+ return false;
+}
+
+
void QDirectFBPaintEnginePrivate::lock()
{
// We will potentially get a new pointer to the buffer after a
@@ -888,6 +921,7 @@ void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode m
break;
case QPainter::CompositionMode_Source:
surface->SetPorterDuff(surface, DSPD_SRC);
+ compositionModeStatus |= PorterDuff_SupportedOpaquePrimitives;
break;
case QPainter::CompositionMode_SourceOver:
compositionModeStatus |= PorterDuff_SupportedPrimitives;
@@ -945,6 +979,9 @@ void QDirectFBPaintEnginePrivate::prepareForBlit(bool alpha)
}
surface->SetColor(surface, 0xff, 0xff, 0xff, opacity);
surface->SetBlittingFlags(surface, blittingFlags);
+ if (compositionModeStatus & PorterDuff_Dirty) {
+ setCompositionMode(q->state()->composition_mode);
+ }
}
static inline uint ALPHA_MUL(uint x, uint a)
@@ -962,6 +999,7 @@ void QDirectFBPaintEnginePrivate::setDFBColor(const QColor &color)
surface->SetColor(surface, color.red(), color.green(), color.blue(), alpha);
surface->SetPorterDuff(surface, DSPD_NONE);
surface->SetDrawingFlags(surface, alpha == 255 ? DSDRAW_NOFX : DSDRAW_BLEND);
+ compositionModeStatus |= PorterDuff_Dirty;
}
IDirectFBSurface *QDirectFBPaintEnginePrivate::getSurface(const QImage &img, bool *release)
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
index 449bc0d1fd..eb771ba6a4 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
@@ -214,7 +214,7 @@ IDirectFBSurface *QDirectFBScreen::createDFBSurface(const QImage &image, QImage:
const int height = image.height();
const int bplQt = image.bytesPerLine();
if (bplQt == bplDFB && bplQt == (image.width() * image.depth() / 8)) {
- memcpy(mem, image.bits(), image.numBytes());
+ memcpy(mem, image.bits(), image.byteCount());
} else {
for (int i=0; i<height; ++i) {
memcpy(mem, image.scanLine(i), bplQt);
@@ -225,7 +225,7 @@ IDirectFBSurface *QDirectFBScreen::createDFBSurface(const QImage &image, QImage:
}
}
#ifdef QT_DIRECTFB_PALETTE
- if (image.numColors() != 0 && surface)
+ if (image.colorCount() != 0 && surface)
QDirectFBScreen::setSurfaceColorTable(surface, image);
#endif
return surface;
@@ -497,7 +497,7 @@ void QDirectFBScreen::setSurfaceColorTable(IDirectFBSurface *surface,
if (!surface)
return;
- const int numColors = image.numColors();
+ const int numColors = image.colorCount();
if (numColors == 0)
return;
@@ -1066,7 +1066,7 @@ static inline QColor colorFromName(const QString &name)
QRegExp rx("#([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])");
rx.setCaseSensitivity(Qt::CaseInsensitive);
if (rx.exactMatch(name)) {
- Q_ASSERT(rx.numCaptures() == 4);
+ Q_ASSERT(rx.captureCount() == 4);
int ints[4];
int i;
for (i=0; i<4; ++i) {
@@ -1564,7 +1564,7 @@ void QDirectFBScreen::exposeRegion(QRegion r, int)
primary->SetColor(primary, 0xff, 0xff, 0xff, cmd.windowOpacity);
}
const QRegion &region = cmd.source;
- const int rectCount = region.numRects();
+ const int rectCount = region.rectCount();
DFBRectangle source;
if (rectCount == 1) {
::initParameters(source, region.boundingRect(), cmd.windowPosition);
@@ -1619,7 +1619,7 @@ void QDirectFBScreen::solidFill(const QColor &color, const QRegion &region)
d_ptr->primarySurface->SetColor(d_ptr->primarySurface,
color.red(), color.green(), color.blue(),
color.alpha());
- const int n = region.numRects();
+ const int n = region.rectCount();
if (n == 1) {
const QRect r = region.boundingRect();
d_ptr->primarySurface->FillRectangle(d_ptr->primarySurface, r.x(), r.y(), r.width(), r.height());
@@ -1680,7 +1680,7 @@ void QDirectFBScreen::flipSurface(IDirectFBSurface *surface, DFBSurfaceFlipFlags
if (!(flipFlags & DSFLIP_BLIT)) {
surface->Flip(surface, 0, flipFlags);
} else {
- if (!(d_ptr->directFBFlags & BoundingRectFlip) && region.numRects() > 1) {
+ if (!(d_ptr->directFBFlags & BoundingRectFlip) && region.rectCount() > 1) {
const QVector<QRect> rects = region.rects();
const DFBSurfaceFlipFlags nonWaitFlags = flipFlags & ~DSFLIP_WAIT;
for (int i=0; i<rects.size(); ++i) {
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
index 3fbefc35ef..c9a010f049 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
@@ -311,7 +311,7 @@ bool QDirectFBWindowSurface::scroll(const QRegion &region, int dx, int dy)
if (!dfbSurface || !(flipFlags & DSFLIP_BLIT) || region.isEmpty())
return false;
dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_NOFX);
- if (region.numRects() == 1) {
+ if (region.rectCount() == 1) {
scrollSurface(dfbSurface, region.boundingRect(), dx, dy);
} else {
const QVector<QRect> rects = region.rects();
diff --git a/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.cpp b/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.cpp
index 4a3787f537..51a6c4e88b 100644
--- a/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.cpp
+++ b/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.cpp
@@ -199,7 +199,7 @@ void PvrEglWindowSurface::setDirectRegion(const QRegion &r, int id)
if (region.isEmpty()) {
pvrQwsClearVisibleRegion(drawable);
- } else if (region.numRects() == 1) {
+ } else if (region.rectCount() == 1) {
QRect rect = region.boundingRect();
PvrQwsRect pvrRect;
pvrRect.x = rect.x();
diff --git a/src/plugins/graphicssystems/openvg/openvg.pro b/src/plugins/graphicssystems/openvg/openvg.pro
index d36570cddf..781cdc42e3 100644
--- a/src/plugins/graphicssystems/openvg/openvg.pro
+++ b/src/plugins/graphicssystems/openvg/openvg.pro
@@ -10,3 +10,5 @@ HEADERS = qgraphicssystem_vg_p.h
target.path += $$[QT_INSTALL_PLUGINS]/graphicssystems
INSTALLS += target
+
+symbian: TARGET.UID3 = 0x2001E62C
diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp
index 98879b0689..c95b63ca72 100644
--- a/src/plugins/imageformats/gif/qgifhandler.cpp
+++ b/src/plugins/imageformats/gif/qgifhandler.cpp
@@ -335,7 +335,7 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length,
QImage::Format format = trans_index >= 0 ? QImage::Format_ARGB32 : QImage::Format_RGB32;
if (image->isNull()) {
(*image) = QImage(swidth, sheight, format);
- memset(image->bits(), 0, image->numBytes());
+ memset(image->bits(), 0, image->byteCount());
// ### size of the upcoming frame, should rather
// be known before decoding it.
@@ -393,7 +393,7 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length,
backingstore = QImage(qMax(backingstore.width(), w),
qMax(backingstore.height(), h),
QImage::Format_RGB32);
- memset(image->bits(), 0, image->numBytes());
+ memset(image->bits(), 0, image->byteCount());
}
for (int ln=0; ln<h; ln++) {
memcpy(backingstore.scanLine(ln),
diff --git a/src/plugins/imageformats/ico/qicohandler.cpp b/src/plugins/imageformats/ico/qicohandler.cpp
index e01b33a026..4d819d1a10 100644
--- a/src/plugins/imageformats/ico/qicohandler.cpp
+++ b/src/plugins/imageformats/ico/qicohandler.cpp
@@ -379,7 +379,7 @@ void ICOReader::findColorInfo(QImage & image)
void ICOReader::readColorTable(QImage & image)
{
if (iod) {
- image.setNumColors(icoAttrib.ncolors);
+ image.setColorCount(icoAttrib.ncolors);
uchar rgb[4];
for (int i=0; i<icoAttrib.ncolors; i++) {
if (iod->read((char*)rgb, 4) != 4) {
@@ -574,7 +574,7 @@ QImage ICOReader::iconAt(int index)
if (!image.isNull()) {
QImage mask(image.width(), image.height(), QImage::Format_Mono);
if (!mask.isNull()) {
- mask.setNumColors(2);
+ mask.setColorCount(2);
mask.setColor(0, qRgba(255,255,255,0xff));
mask.setColor(1, qRgba(0 ,0 ,0 ,0xff));
read1BitBMP(mask);
diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
index 3b23e5628f..6b2f885bbb 100644
--- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp
+++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
@@ -741,7 +741,7 @@ static bool ensureValidImage(QImage *dest, struct jpeg_decompress_struct *info,
*dest = QImage(size, format);
if (format == QImage::Format_Indexed8) {
- dest->setNumColors(256);
+ dest->setColorCount(256);
for (int i = 0; i < 256; i++)
dest->setColor(i, qRgb(i,i,i));
}
@@ -851,7 +851,7 @@ static bool read_jpeg_image(QIODevice *device, QImage *outImage,
} else if (cinfo.output_components == 1) {
if (outImage->size() != QSize(sWidth, sHeight) || outImage->format() != QImage::Format_Indexed8)
*outImage = QImage(sWidth, sHeight, QImage::Format_Indexed8);
- outImage->setNumColors(256);
+ outImage->setColorCount(256);
for (int i = 0; i < 256; ++i)
outImage->setColor(i, qRgb(i,i,i));
} else {
@@ -1054,7 +1054,7 @@ static bool write_jpeg_image(const QImage &sourceImage, QIODevice *device, int s
case QImage::Format_MonoLSB:
case QImage::Format_Indexed8:
gray = true;
- for (int i = image.numColors(); gray && i--;) {
+ for (int i = image.colorCount(); gray && i--;) {
gray = gray & (qRed(cmap[i]) == qGreen(cmap[i]) &&
qRed(cmap[i]) == qBlue(cmap[i]));
}
diff --git a/src/plugins/phonon/mmf/plugin/plugin.pro b/src/plugins/phonon/mmf/plugin/plugin.pro
index eb7fd2767a..8a7de98ad5 100644
--- a/src/plugins/phonon/mmf/plugin/plugin.pro
+++ b/src/plugins/phonon/mmf/plugin/plugin.pro
@@ -26,6 +26,7 @@ HEADERS += \
$$PHONON_MMF_DIR/abstractaudioeffect.h \
$$PHONON_MMF_DIR/abstractmediaplayer.h \
$$PHONON_MMF_DIR/abstractplayer.h \
+ $$PHONON_MMF_DIR/ancestormovemonitor.h \
$$PHONON_MMF_DIR/audiooutput.h \
$$PHONON_MMF_DIR/audioequalizer.h \
$$PHONON_MMF_DIR/audioplayer.h \
@@ -47,6 +48,7 @@ SOURCES += \
$$PHONON_MMF_DIR/abstractaudioeffect.cpp \
$$PHONON_MMF_DIR/abstractmediaplayer.cpp \
$$PHONON_MMF_DIR/abstractplayer.cpp \
+ $$PHONON_MMF_DIR/ancestormovemonitor.cpp \
$$PHONON_MMF_DIR/audiooutput.cpp \
$$PHONON_MMF_DIR/audioequalizer.cpp \
$$PHONON_MMF_DIR/audioplayer.cpp \
@@ -67,11 +69,12 @@ debug {
LIBS += -lhal
}
-LIBS += -lmediaclientvideo # For CVideoPlayerUtility
-LIBS += -lcone # For CCoeEnv
-LIBS += -lws32 # For RWindow
-LIBS += -lefsrv # For file server
-LIBS += -lapgrfx -lapmime # For recognizer
+LIBS += -lmediaclientvideo # For CVideoPlayerUtility
+LIBS += -lcone # For CCoeEnv
+LIBS += -lws32 # For RWindow
+LIBS += -lefsrv # For file server
+LIBS += -lapgrfx -lapmime # For recognizer
+LIBS += -lmmfcontrollerframework # For CMMFMetaDataEntry
# These are for effects.
LIBS += -lAudioEqualizerEffect -lBassBoostEffect -lDistanceAttenuationEffect -lDopplerBase -lEffectBase -lEnvironmentalReverbEffect -lListenerDopplerEffect -lListenerLocationEffect -lListenerOrientationEffect -lLocationBase -lLoudnessEffect -lOrientationBase -lSourceDopplerEffect -lSourceLocationEffect -lSourceOrientationEffect -lStereoWideningEffect
diff --git a/src/qt3support/painting/q3paintdevicemetrics.h b/src/qt3support/painting/q3paintdevicemetrics.h
index 830dd908f5..4f1603b2ab 100644
--- a/src/qt3support/painting/q3paintdevicemetrics.h
+++ b/src/qt3support/painting/q3paintdevicemetrics.h
@@ -63,7 +63,7 @@ public:
int logicalDpiY() const { return pdev->logicalDpiY(); }
int physicalDpiX() const { return pdev->physicalDpiX(); }
int physicalDpiY() const { return pdev->physicalDpiY(); }
- int numColors() const { return pdev->numColors(); }
+ int numColors() const { return pdev->colorCount(); }
int depth() const { return pdev->depth(); }
private:
diff --git a/src/qt3support/widgets/q3dockarea.cpp b/src/qt3support/widgets/q3dockarea.cpp
index bb34622174..fbe235e816 100644
--- a/src/qt3support/widgets/q3dockarea.cpp
+++ b/src/qt3support/widgets/q3dockarea.cpp
@@ -1139,7 +1139,7 @@ void Q3DockArea::setAcceptDockWindow(Q3DockWindow *dw, bool accept)
{
if (accept)
forbiddenWidgets.removeAll(dw);
- else if (forbiddenWidgets.contains(dw))
+ else if (!forbiddenWidgets.contains(dw))
forbiddenWidgets.append(dw);
}
diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def
index cbaf52383e..9d3db41a0e 100644
--- a/src/s60installs/bwins/QtCoreu.def
+++ b/src/s60installs/bwins/QtCoreu.def
@@ -3968,7 +3968,7 @@ EXPORTS
?constEnd@QByteArray@@QBEPBDXZ @ 3967 NONAME ; char const * QByteArray::constEnd(void) const
?setOvershoot@QEasingCurve@@QAEXM@Z @ 3968 NONAME ; void QEasingCurve::setOvershoot(float)
??6@YAAAVQDataStream@@AAV0@ABVQRectF@@@Z @ 3969 NONAME ; class QDataStream & operator<<(class QDataStream &, class QRectF const &)
- ?detach_helper@QHashData@@QAEPAU1@P6AXPAUNode@1@PAX@ZP6AX0@ZH@Z @ 3970 NONAME ; struct QHashData * QHashData::detach_helper(void (*)(struct QHashData::Node *, void *), void (*)(struct QHashData::Node *), int)
+ ?detach_helper@QHashData@@QAEPAU1@P6AXPAUNode@1@PAX@ZP6AX0@ZH@Z @ 3970 NONAME ABSENT ; struct QHashData * QHashData::detach_helper(void (*)(struct QHashData::Node *, void *), void (*)(struct QHashData::Node *), int)
??0QSystemLocale@@AAE@_N@Z @ 3971 NONAME ; QSystemLocale::QSystemLocale(bool)
?data@QHBufC@@QBEPBVHBufC16@@XZ @ 3972 NONAME ; class HBufC16 const * QHBufC::data(void) const
?setFileName@QFile@@QAEXABVQString@@@Z @ 3973 NONAME ; void QFile::setFileName(class QString const &)
@@ -4357,4 +4357,27 @@ EXPORTS
??6@YA?AVQDebug@@V0@V?$QFlags@W4OpenModeFlag@QIODevice@@@@@Z @ 4356 NONAME ; class QDebug operator<<(class QDebug, class QFlags<enum QIODevice::OpenModeFlag>)
?staticMetaObject@QHistoryState@@2UQMetaObject@@B @ 4357 NONAME ; struct QMetaObject const QHistoryState::staticMetaObject
?unlock@QSharedMemory@@QAE_NXZ @ 4358 NONAME ; bool QSharedMemory::unlock(void)
+ ?allocate@QContiguousCacheData@@SAPAU1@HH@Z @ 4359 NONAME ; struct QContiguousCacheData * QContiguousCacheData::allocate(int, int)
+ ?allocate@QVectorData@@SAPAU1@HH@Z @ 4360 NONAME ; struct QVectorData * QVectorData::allocate(int, int)
+ ?allocateNode@QHashData@@QAEPAXH@Z @ 4361 NONAME ; void * QHashData::allocateNode(int)
+ ?buildDate@QLibraryInfo@@SA?AVQDate@@XZ @ 4362 NONAME ; class QDate QLibraryInfo::buildDate(void)
+ ?createData@QMapData@@SAPAU1@H@Z @ 4363 NONAME ; struct QMapData * QMapData::createData(int)
+ ?dequeueExternalEvent@QStateMachinePrivate@@QAEPAVQEvent@@XZ @ 4364 NONAME ; class QEvent * QStateMachinePrivate::dequeueExternalEvent(void)
+ ?dequeueInternalEvent@QStateMachinePrivate@@QAEPAVQEvent@@XZ @ 4365 NONAME ; class QEvent * QStateMachinePrivate::dequeueInternalEvent(void)
+ ?detach_helper2@QHashData@@QAEPAU1@P6AXPAUNode@1@PAX@ZP6AX0@ZHH@Z @ 4366 NONAME ; struct QHashData * QHashData::detach_helper2(void (*)(struct QHashData::Node *, void *), void (*)(struct QHashData::Node *), int, int)
+ ?free@QContiguousCacheData@@SAXPAU1@@Z @ 4367 NONAME ; void QContiguousCacheData::free(struct QContiguousCacheData *)
+ ?free@QVectorData@@SAXPAU1@H@Z @ 4368 NONAME ; void QVectorData::free(struct QVectorData *, int)
+ ?isExternalEventQueueEmpty@QStateMachinePrivate@@QAE_NXZ @ 4369 NONAME ; bool QStateMachinePrivate::isExternalEventQueueEmpty(void)
+ ?isInternalEventQueueEmpty@QStateMachinePrivate@@QAE_NXZ @ 4370 NONAME ; bool QStateMachinePrivate::isInternalEventQueueEmpty(void)
+ ?node_create@QMapData@@QAEPAUNode@1@QAPAU21@HH@Z @ 4371 NONAME ; struct QMapData::Node * QMapData::node_create(struct QMapData::Node * * const, int, int)
+ ?postExternalEvent@QStateMachinePrivate@@QAEXPAVQEvent@@@Z @ 4372 NONAME ; void QStateMachinePrivate::postExternalEvent(class QEvent *)
+ ?postInternalEvent@QStateMachinePrivate@@QAEXPAVQEvent@@@Z @ 4373 NONAME ; void QStateMachinePrivate::postInternalEvent(class QEvent *)
+ ?qFreeAligned@@YAXPAX@Z @ 4374 NONAME ; void qFreeAligned(void *)
+ ?qMallocAligned@@YAPAXII@Z @ 4375 NONAME ; void * qMallocAligned(unsigned int, unsigned int)
+ ?qReallocAligned@@YAPAXPAXIII@Z @ 4376 NONAME ; void * qReallocAligned(void *, unsigned int, unsigned int, unsigned int)
+ ?reallocate@QVectorData@@SAPAU1@PAU1@HHH@Z @ 4377 NONAME ; struct QVectorData * QVectorData::reallocate(struct QVectorData *, int, int, int)
+ ?toFinalState@QStateMachinePrivate@@SAPAVQFinalState@@PAVQAbstractState@@@Z @ 4378 NONAME ; class QFinalState * QStateMachinePrivate::toFinalState(class QAbstractState *)
+ ?toHistoryState@QStateMachinePrivate@@SAPAVQHistoryState@@PAVQAbstractState@@@Z @ 4379 NONAME ; class QHistoryState * QStateMachinePrivate::toHistoryState(class QAbstractState *)
+ ?toStandardState@QStateMachinePrivate@@SAPAVQState@@PAVQAbstractState@@@Z @ 4380 NONAME ; class QState * QStateMachinePrivate::toStandardState(class QAbstractState *)
+ ?toStandardState@QStateMachinePrivate@@SAPBVQState@@PBVQAbstractState@@@Z @ 4381 NONAME ; class QState const * QStateMachinePrivate::toStandardState(class QAbstractState const *)
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index 56ba18f837..69a95f0f67 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -6,7 +6,7 @@ EXPORTS
?checkedAction@QActionGroup@@QBEPAVQAction@@XZ @ 5 NONAME ; class QAction * QActionGroup::checkedAction(void) const
?minimumSizeHint@QComboBox@@UBE?AVQSize@@XZ @ 6 NONAME ; class QSize QComboBox::minimumSizeHint(void) const
?setIcon@QStandardItem@@QAEXABVQIcon@@@Z @ 7 NONAME ; void QStandardItem::setIcon(class QIcon const &)
- ?d_func@QGraphicsBloomEffect@@AAEPAVQGraphicsBloomEffectPrivate@@XZ @ 8 NONAME ; class QGraphicsBloomEffectPrivate * QGraphicsBloomEffect::d_func(void)
+ ?d_func@QGraphicsBloomEffect@@AAEPAVQGraphicsBloomEffectPrivate@@XZ @ 8 NONAME ABSENT ; class QGraphicsBloomEffectPrivate * QGraphicsBloomEffect::d_func(void)
?normalize@QVector2D@@QAEXXZ @ 9 NONAME ; void QVector2D::normalize(void)
?name@QColor@@QBE?AVQString@@XZ @ 10 NONAME ; class QString QColor::name(void) const
?openPersistentEditor@QListWidget@@QAEXPAVQListWidgetItem@@@Z @ 11 NONAME ; void QListWidget::openPersistentEditor(class QListWidgetItem *)
@@ -96,7 +96,7 @@ EXPORTS
??0QIcon@@QAE@PAVQIconEngineV2@@@Z @ 95 NONAME ; QIcon::QIcon(class QIconEngineV2 *)
?qt_metacall@QFileSystemModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 96 NONAME ; int QFileSystemModel::qt_metacall(enum QMetaObject::Call, int, void * *)
?getStaticMetaObject@QGraphicsDropShadowEffect@@SAABUQMetaObject@@XZ @ 97 NONAME ; struct QMetaObject const & QGraphicsDropShadowEffect::getStaticMetaObject(void)
- ?staticMetaObject@QGraphicsPixelizeEffect@@2UQMetaObject@@B @ 98 NONAME ; struct QMetaObject const QGraphicsPixelizeEffect::staticMetaObject
+ ?staticMetaObject@QGraphicsPixelizeEffect@@2UQMetaObject@@B @ 98 NONAME ABSENT ; struct QMetaObject const QGraphicsPixelizeEffect::staticMetaObject
?eraseRect@QPainter@@QAEXHHHH@Z @ 99 NONAME ; void QPainter::eraseRect(int, int, int, int)
?gotFocus@QFocusEvent@@QBE_NXZ @ 100 NONAME ; bool QFocusEvent::gotFocus(void) const
?setLayout@QWidget@@QAEXPAVQLayout@@@Z @ 101 NONAME ; void QWidget::setLayout(class QLayout *)
@@ -130,7 +130,7 @@ EXPORTS
??_EQShortcutEvent@@UAE@I@Z @ 129 NONAME ; QShortcutEvent::~QShortcutEvent(unsigned int)
?tr@QTextBrowser@@SA?AVQString@@PBD0H@Z @ 130 NONAME ; class QString QTextBrowser::tr(char const *, char const *, int)
?setIconProvider@QFileSystemModel@@QAEXPAVQFileIconProvider@@@Z @ 131 NONAME ; void QFileSystemModel::setIconProvider(class QFileIconProvider *)
- ?setStrength@QGraphicsBloomEffect@@QAEXM@Z @ 132 NONAME ; void QGraphicsBloomEffect::setStrength(float)
+ ?setStrength@QGraphicsBloomEffect@@QAEXM@Z @ 132 NONAME ABSENT ; void QGraphicsBloomEffect::setStrength(float)
?map@QMatrix4x4@@QBE?AVQVector4D@@ABV2@@Z @ 133 NONAME ; class QVector4D QMatrix4x4::map(class QVector4D const &) const
?clearSpans@QTableView@@QAEXXZ @ 134 NONAME ; void QTableView::clearSpans(void)
?tr@QPanGesture@@SA?AVQString@@PBD0@Z @ 135 NONAME ; class QString QPanGesture::tr(char const *, char const *)
@@ -155,7 +155,7 @@ EXPORTS
?redoText@QUndoStack@@QBE?AVQString@@XZ @ 154 NONAME ; class QString QUndoStack::redoText(void) const
?dropEvent@QTableWidget@@MAEXPAVQDropEvent@@@Z @ 155 NONAME ; void QTableWidget::dropEvent(class QDropEvent *)
?setPalette@QToolTip@@SAXABVQPalette@@@Z @ 156 NONAME ; void QToolTip::setPalette(class QPalette const &)
- ?tr@QGraphicsPixelizeEffect@@SA?AVQString@@PBD0@Z @ 157 NONAME ; class QString QGraphicsPixelizeEffect::tr(char const *, char const *)
+ ?tr@QGraphicsPixelizeEffect@@SA?AVQString@@PBD0@Z @ 157 NONAME ABSENT ; class QString QGraphicsPixelizeEffect::tr(char const *, char const *)
?read@QImageReader@@QAE?AVQImage@@XZ @ 158 NONAME ; class QImage QImageReader::read(void)
?tr@QPinchGesture@@SA?AVQString@@PBD0@Z @ 159 NONAME ; class QString QPinchGesture::tr(char const *, char const *)
?setRadius@QRadialGradient@@QAEXM@Z @ 160 NONAME ; void QRadialGradient::setRadius(float)
@@ -297,7 +297,7 @@ EXPORTS
?standardPixmap@QWindowsStyle@@UBE?AVQPixmap@@W4StandardPixmap@QStyle@@PBVQStyleOption@@PBVQWidget@@@Z @ 296 NONAME ; class QPixmap QWindowsStyle::standardPixmap(enum QStyle::StandardPixmap, class QStyleOption const *, class QWidget const *) const
?setStyleSheet@QApplication@@QAEXABVQString@@@Z @ 297 NONAME ; void QApplication::setStyleSheet(class QString const &)
?minLeftBearing@QFontMetrics@@QBEHXZ @ 298 NONAME ; int QFontMetrics::minLeftBearing(void) const
- ?isComposing@QCoeFepInputContext@@UBE_NXZ @ 299 NONAME ; bool QCoeFepInputContext::isComposing(void) const
+ ?isComposing@QCoeFepInputContext@@UBE_NXZ @ 299 NONAME ABSENT ; bool QCoeFepInputContext::isComposing(void) const
??8iterator@QTextFrame@@QBE_NABV01@@Z @ 300 NONAME ; bool QTextFrame::iterator::operator==(class QTextFrame::iterator const &) const
?toolBarArea@QMainWindow@@QBE?AW4ToolBarArea@Qt@@PAVQToolBar@@@Z @ 301 NONAME ; enum Qt::ToolBarArea QMainWindow::toolBarArea(class QToolBar *) const
?mode@QColormap@@QBE?AW4Mode@1@XZ @ 302 NONAME ; enum QColormap::Mode QColormap::mode(void) const
@@ -408,7 +408,7 @@ EXPORTS
??1QMovie@@UAE@XZ @ 407 NONAME ; QMovie::~QMovie(void)
?setDrawBase@QTabBar@@QAEX_N@Z @ 408 NONAME ; void QTabBar::setDrawBase(bool)
?findNextPrevAnchor@QTextControl@@QAE_NABVQTextCursor@@_NAAV2@@Z @ 409 NONAME ; bool QTextControl::findNextPrevAnchor(class QTextCursor const &, bool, class QTextCursor &)
- ?qt_metacast@QGraphicsGrayscaleEffect@@UAEPAXPBD@Z @ 410 NONAME ; void * QGraphicsGrayscaleEffect::qt_metacast(char const *)
+ ?qt_metacast@QGraphicsGrayscaleEffect@@UAEPAXPBD@Z @ 410 NONAME ABSENT ; void * QGraphicsGrayscaleEffect::qt_metacast(char const *)
?paintEvent@QToolButton@@MAEXPAVQPaintEvent@@@Z @ 411 NONAME ; void QToolButton::paintEvent(class QPaintEvent *)
?createHeuristicMask@QImage@@QBE?AV1@_N@Z @ 412 NONAME ; class QImage QImage::createHeuristicMask(bool) const
?supportsAnimation@QImageReader@@QBE_NXZ @ 413 NONAME ; bool QImageReader::supportsAnimation(void) const
@@ -542,7 +542,7 @@ EXPORTS
?dotsPerMeterX@QImage@@QBEHXZ @ 541 NONAME ; int QImage::dotsPerMeterX(void) const
??0QStyleOptionComboBox@@QAE@ABV0@@Z @ 542 NONAME ; QStyleOptionComboBox::QStyleOptionComboBox(class QStyleOptionComboBox const &)
?setBackground@QWorkspace@@QAEXABVQBrush@@@Z @ 543 NONAME ; void QWorkspace::setBackground(class QBrush const &)
- ?pixelSizeChanged@QGraphicsPixelizeEffect@@IAEXH@Z @ 544 NONAME ; void QGraphicsPixelizeEffect::pixelSizeChanged(int)
+ ?pixelSizeChanged@QGraphicsPixelizeEffect@@IAEXH@Z @ 544 NONAME ABSENT ; void QGraphicsPixelizeEffect::pixelSizeChanged(int)
?cursorForPosition@QTextEdit@@QBE?AVQTextCursor@@ABVQPoint@@@Z @ 545 NONAME ; class QTextCursor QTextEdit::cursorForPosition(class QPoint const &) const
??0QQuaternion@@QAE@XZ @ 546 NONAME ; QQuaternion::QQuaternion(void)
?modificationChanged@QPlainTextEdit@@IAEX_N@Z @ 547 NONAME ; void QPlainTextEdit::modificationChanged(bool)
@@ -657,7 +657,7 @@ EXPORTS
?stack@QUndoView@@QBEPAVQUndoStack@@XZ @ 656 NONAME ; class QUndoStack * QUndoView::stack(void) const
?squareToQuad@QTransform@@SA_NABVQPolygonF@@AAV1@@Z @ 657 NONAME ; bool QTransform::squareToQuad(class QPolygonF const &, class QTransform &)
?controlPointRect@QPainterPath@@QBE?AVQRectF@@XZ @ 658 NONAME ; class QRectF QPainterPath::controlPointRect(void) const
- ?language@QCoeFepInputContext@@UAE?AVQString@@XZ @ 659 NONAME ; class QString QCoeFepInputContext::language(void)
+ ?language@QCoeFepInputContext@@UAE?AVQString@@XZ @ 659 NONAME ABSENT ; class QString QCoeFepInputContext::language(void)
?horizontalScrollbarAction@QTableView@@MAEXH@Z @ 660 NONAME ; void QTableView::horizontalScrollbarAction(int)
?qt_metacall@QGraphicsView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 661 NONAME ; int QGraphicsView::qt_metacall(enum QMetaObject::Call, int, void * *)
?itemPrototype@QStandardItemModel@@QBEPBVQStandardItem@@XZ @ 662 NONAME ; class QStandardItem const * QStandardItemModel::itemPrototype(void) const
@@ -960,7 +960,7 @@ EXPORTS
?qt_metacall@QUndoView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 959 NONAME ; int QUndoView::qt_metacall(enum QMetaObject::Call, int, void * *)
?overlinePos@QFontMetrics@@QBEHXZ @ 960 NONAME ; int QFontMetrics::overlinePos(void) const
?modifiers@QKeyEvent@@QBE?AV?$QFlags@W4KeyboardModifier@Qt@@@@XZ @ 961 NONAME ; class QFlags<enum Qt::KeyboardModifier> QKeyEvent::modifiers(void) const
- ?blurRadius@QPixmapDropShadowFilter@@QBEHXZ @ 962 NONAME ; int QPixmapDropShadowFilter::blurRadius(void) const
+ ?blurRadius@QPixmapDropShadowFilter@@QBEHXZ @ 962 NONAME ABSENT ; int QPixmapDropShadowFilter::blurRadius(void) const
?trUtf8@QButtonGroup@@SA?AVQString@@PBD0@Z @ 963 NONAME ; class QString QButtonGroup::trUtf8(char const *, char const *)
?staticMetaObject@QWidget@@2UQMetaObject@@B @ 964 NONAME ; struct QMetaObject const QWidget::staticMetaObject
?mapToScene@QGraphicsView@@QBE?AVQPointF@@ABVQPoint@@@Z @ 965 NONAME ; class QPointF QGraphicsView::mapToScene(class QPoint const &) const
@@ -1049,7 +1049,7 @@ EXPORTS
?item@QTableWidget@@QBEPAVQTableWidgetItem@@HH@Z @ 1048 NONAME ; class QTableWidgetItem * QTableWidget::item(int, int) const
??0QRegion@@QAE@ABV0@@Z @ 1049 NONAME ; QRegion::QRegion(class QRegion const &)
?doLayout@QItemDelegate@@IBEXABVQStyleOptionViewItem@@PAVQRect@@11_N@Z @ 1050 NONAME ; void QItemDelegate::doLayout(class QStyleOptionViewItem const &, class QRect *, class QRect *, class QRect *, bool) const
- ?brightnessChanged@QGraphicsBloomEffect@@IAEXH@Z @ 1051 NONAME ; void QGraphicsBloomEffect::brightnessChanged(int)
+ ?brightnessChanged@QGraphicsBloomEffect@@IAEXH@Z @ 1051 NONAME ABSENT ; void QGraphicsBloomEffect::brightnessChanged(int)
?type@QGraphicsProxyWidget@@UBEHXZ @ 1052 NONAME ; int QGraphicsProxyWidget::type(void) const
?numBytes@QImage@@QBEHXZ @ 1053 NONAME ; int QImage::numBytes(void) const
?clear@QMenuBar@@QAEXXZ @ 1054 NONAME ; void QMenuBar::clear(void)
@@ -1450,7 +1450,7 @@ EXPORTS
?focusProxy@QWidget@@QBEPAV1@XZ @ 1449 NONAME ; class QWidget * QWidget::focusProxy(void) const
?closestLegalPosition@QSplitterHandle@@IAEHH@Z @ 1450 NONAME ; int QSplitterHandle::closestLegalPosition(int)
?setExtension@QGraphicsEllipseItem@@MAEXW4Extension@QGraphicsItem@@ABVQVariant@@@Z @ 1451 NONAME ; void QGraphicsEllipseItem::setExtension(enum QGraphicsItem::Extension, class QVariant const &)
- ?tr@QGraphicsBloomEffect@@SA?AVQString@@PBD0H@Z @ 1452 NONAME ; class QString QGraphicsBloomEffect::tr(char const *, char const *, int)
+ ?tr@QGraphicsBloomEffect@@SA?AVQString@@PBD0H@Z @ 1452 NONAME ABSENT ; class QString QGraphicsBloomEffect::tr(char const *, char const *, int)
?docHandle@QTextObject@@QBEPAVQTextDocumentPrivate@@XZ @ 1453 NONAME ; class QTextDocumentPrivate * QTextObject::docHandle(void) const
??0QTextControl@@QAE@ABVQString@@PAVQObject@@@Z @ 1454 NONAME ; QTextControl::QTextControl(class QString const &, class QObject *)
?blockBoundingRect@QPlainTextDocumentLayout@@UBE?AVQRectF@@ABVQTextBlock@@@Z @ 1455 NONAME ; class QRectF QPlainTextDocumentLayout::blockBoundingRect(class QTextBlock const &) const
@@ -1640,15 +1640,15 @@ EXPORTS
?angleChanged@QGraphicsRotation@@IAEXXZ @ 1639 NONAME ; void QGraphicsRotation::angleChanged(void)
?horizontalOffset@QTableView@@MBEHXZ @ 1640 NONAME ; int QTableView::horizontalOffset(void) const
?subWindowActivated@QMdiArea@@IAEXPAVQMdiSubWindow@@@Z @ 1641 NONAME ; void QMdiArea::subWindowActivated(class QMdiSubWindow *)
- ??0QGraphicsGrayscaleEffect@@QAE@PAVQObject@@@Z @ 1642 NONAME ; QGraphicsGrayscaleEffect::QGraphicsGrayscaleEffect(class QObject *)
+ ??0QGraphicsGrayscaleEffect@@QAE@PAVQObject@@@Z @ 1642 NONAME ABSENT ; QGraphicsGrayscaleEffect::QGraphicsGrayscaleEffect(class QObject *)
?tr@QItemDelegate@@SA?AVQString@@PBD0H@Z @ 1643 NONAME ; class QString QItemDelegate::tr(char const *, char const *, int)
?isObscuredBy@QGraphicsPolygonItem@@UBE_NPBVQGraphicsItem@@@Z @ 1644 NONAME ; bool QGraphicsPolygonItem::isObscuredBy(class QGraphicsItem const *) const
?anchorClicked@QTextBrowser@@IAEXABVQUrl@@@Z @ 1645 NONAME ; void QTextBrowser::anchorClicked(class QUrl const &)
?childEvent@QMdiSubWindow@@MAEXPAVQChildEvent@@@Z @ 1646 NONAME ; void QMdiSubWindow::childEvent(class QChildEvent *)
?enterEvent@QMenu@@MAEXPAVQEvent@@@Z @ 1647 NONAME ; void QMenu::enterEvent(class QEvent *)
- ?ensureInputCapabilitiesChanged@QCoeFepInputContext@@AAEXXZ @ 1648 NONAME ; void QCoeFepInputContext::ensureInputCapabilitiesChanged(void)
+ ?ensureInputCapabilitiesChanged@QCoeFepInputContext@@AAEXXZ @ 1648 NONAME ABSENT ; void QCoeFepInputContext::ensureInputCapabilitiesChanged(void)
?tr@QSwipeGesture@@SA?AVQString@@PBD0@Z @ 1649 NONAME ; class QString QSwipeGesture::tr(char const *, char const *)
- ?d_func@QGraphicsPixelizeEffect@@AAEPAVQGraphicsPixelizeEffectPrivate@@XZ @ 1650 NONAME ; class QGraphicsPixelizeEffectPrivate * QGraphicsPixelizeEffect::d_func(void)
+ ?d_func@QGraphicsPixelizeEffect@@AAEPAVQGraphicsPixelizeEffectPrivate@@XZ @ 1650 NONAME ABSENT ; class QGraphicsPixelizeEffectPrivate * QGraphicsPixelizeEffect::d_func(void)
?completer@QComboBox@@QBEPAVQCompleter@@XZ @ 1651 NONAME ; class QCompleter * QComboBox::completer(void) const
?testOption@QMdiSubWindow@@QBE_NW4SubWindowOption@1@@Z @ 1652 NONAME ; bool QMdiSubWindow::testOption(enum QMdiSubWindow::SubWindowOption) const
?mapRectToScene@QGraphicsItem@@QBE?AVQRectF@@ABV2@@Z @ 1653 NONAME ; class QRectF QGraphicsItem::mapRectToScene(class QRectF const &) const
@@ -2133,7 +2133,7 @@ EXPORTS
?translate@QPainter@@QAEXABVQPoint@@@Z @ 2132 NONAME ; void QPainter::translate(class QPoint const &)
?tr@QStackedLayout@@SA?AVQString@@PBD0@Z @ 2133 NONAME ; class QString QStackedLayout::tr(char const *, char const *)
?dragLeaveEvent@QWidget@@MAEXPAVQDragLeaveEvent@@@Z @ 2134 NONAME ; void QWidget::dragLeaveEvent(class QDragLeaveEvent *)
- ?trUtf8@QGraphicsGrayscaleEffect@@SA?AVQString@@PBD0@Z @ 2135 NONAME ; class QString QGraphicsGrayscaleEffect::trUtf8(char const *, char const *)
+ ?trUtf8@QGraphicsGrayscaleEffect@@SA?AVQString@@PBD0@Z @ 2135 NONAME ABSENT ; class QString QGraphicsGrayscaleEffect::trUtf8(char const *, char const *)
?format@QTextObject@@QBE?AVQTextFormat@@XZ @ 2136 NONAME ; class QTextFormat QTextObject::format(void) const
?addAction@QActionGroup@@QAEPAVQAction@@ABVQIcon@@ABVQString@@@Z @ 2137 NONAME ; class QAction * QActionGroup::addAction(class QIcon const &, class QString const &)
?update@QGraphicsEffect@@QAEXXZ @ 2138 NONAME ; void QGraphicsEffect::update(void)
@@ -2165,7 +2165,7 @@ EXPORTS
?linkHovered@QLabel@@IAEXABVQString@@@Z @ 2164 NONAME ; void QLabel::linkHovered(class QString const &)
?isCornerButtonEnabled@QTableView@@QBE_NXZ @ 2165 NONAME ; bool QTableView::isCornerButtonEnabled(void) const
?setFilterRegExp@QSortFilterProxyModel@@QAEXABVQRegExp@@@Z @ 2166 NONAME ; void QSortFilterProxyModel::setFilterRegExp(class QRegExp const &)
- ?qt_metacall@QCoeFepInputContext@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2167 NONAME ; int QCoeFepInputContext::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QCoeFepInputContext@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2167 NONAME ABSENT ; int QCoeFepInputContext::qt_metacall(enum QMetaObject::Call, int, void * *)
?combinedMatrix@QPainter@@QBE?AVQMatrix@@XZ @ 2168 NONAME ; class QMatrix QPainter::combinedMatrix(void) const
?d_func@QTextEdit@@AAEPAVQTextEditPrivate@@XZ @ 2169 NONAME ; class QTextEditPrivate * QTextEdit::d_func(void)
?qDrawBorderPixmap@@YAXPAVQPainter@@ABVQRect@@ABVQMargins@@ABVQPixmap@@12ABUQTileRules@@V?$QFlags@W4DrawingHint@QDrawBorderPixmap@@@@@Z @ 2170 NONAME ; void qDrawBorderPixmap(class QPainter *, class QRect const &, class QMargins const &, class QPixmap const &, class QRect const &, class QMargins const &, struct QTileRules const &, class QFlags<enum QDrawBorderPixmap::DrawingHint>)
@@ -2306,7 +2306,7 @@ EXPORTS
?setMenuWidget@QMainWindow@@QAEXPAVQWidget@@@Z @ 2305 NONAME ; void QMainWindow::setMenuWidget(class QWidget *)
?setCurrentIndex@QItemSelectionModel@@QAEXABVQModelIndex@@V?$QFlags@W4SelectionFlag@QItemSelectionModel@@@@@Z @ 2306 NONAME ; void QItemSelectionModel::setCurrentIndex(class QModelIndex const &, class QFlags<enum QItemSelectionModel::SelectionFlag>)
?grabShortcut@QWidget@@QAEHABVQKeySequence@@W4ShortcutContext@Qt@@@Z @ 2307 NONAME ; int QWidget::grabShortcut(class QKeySequence const &, enum Qt::ShortcutContext)
- ?UpdateFepInlineTextL@QCoeFepInputContext@@UAEXABVTDesC16@@H@Z @ 2308 NONAME ; void QCoeFepInputContext::UpdateFepInlineTextL(class TDesC16 const &, int)
+ ?UpdateFepInlineTextL@QCoeFepInputContext@@UAEXABVTDesC16@@H@Z @ 2308 NONAME ABSENT ; void QCoeFepInputContext::UpdateFepInlineTextL(class TDesC16 const &, int)
?draw@QPixmapDropShadowFilter@@UBEXPAVQPainter@@ABVQPointF@@ABVQPixmap@@ABVQRectF@@@Z @ 2309 NONAME ; void QPixmapDropShadowFilter::draw(class QPainter *, class QPointF const &, class QPixmap const &, class QRectF const &) const
?mouseMoveEvent@QMdiSubWindow@@MAEXPAVQMouseEvent@@@Z @ 2310 NONAME ; void QMdiSubWindow::mouseMoveEvent(class QMouseEvent *)
?hoverMoveEvent@QGraphicsItem@@MAEXPAVQGraphicsSceneHoverEvent@@@Z @ 2311 NONAME ; void QGraphicsItem::hoverMoveEvent(class QGraphicsSceneHoverEvent *)
@@ -2537,7 +2537,7 @@ EXPORTS
?text@QImage@@QBE?AVQString@@ABV2@@Z @ 2536 NONAME ; class QString QImage::text(class QString const &) const
?showMessage@QSplashScreen@@QAEXABVQString@@HABVQColor@@@Z @ 2537 NONAME ; void QSplashScreen::showMessage(class QString const &, int, class QColor const &)
?setActiveSubWindow@QMdiArea@@QAEXPAVQMdiSubWindow@@@Z @ 2538 NONAME ; void QMdiArea::setActiveSubWindow(class QMdiSubWindow *)
- ?metaObject@QCoeFepInputContext@@UBEPBUQMetaObject@@XZ @ 2539 NONAME ; struct QMetaObject const * QCoeFepInputContext::metaObject(void) const
+ ?metaObject@QCoeFepInputContext@@UBEPBUQMetaObject@@XZ @ 2539 NONAME ABSENT ; struct QMetaObject const * QCoeFepInputContext::metaObject(void) const
?showEvent@QGraphicsProxyWidget@@MAEXPAVQShowEvent@@@Z @ 2540 NONAME ; void QGraphicsProxyWidget::showEvent(class QShowEvent *)
?bitmap@QCursor@@QBEPBVQBitmap@@XZ @ 2541 NONAME ; class QBitmap const * QCursor::bitmap(void) const
?trUtf8@QMenuBar@@SA?AVQString@@PBD0H@Z @ 2542 NONAME ; class QString QMenuBar::trUtf8(char const *, char const *, int)
@@ -2602,7 +2602,7 @@ EXPORTS
?d_func@QToolButton@@AAEPAVQToolButtonPrivate@@XZ @ 2601 NONAME ; class QToolButtonPrivate * QToolButton::d_func(void)
?opaqueArea@QGraphicsEllipseItem@@UBE?AVQPainterPath@@XZ @ 2602 NONAME ; class QPainterPath QGraphicsEllipseItem::opaqueArea(void) const
?hitTestComplexControl@QCommonStyle@@UBE?AW4SubControl@QStyle@@W4ComplexControl@3@PBVQStyleOptionComplex@@ABVQPoint@@PBVQWidget@@@Z @ 2603 NONAME ; enum QStyle::SubControl QCommonStyle::hitTestComplexControl(enum QStyle::ComplexControl, class QStyleOptionComplex const *, class QPoint const &, class QWidget const *) const
- ??0QGraphicsBloomEffect@@QAE@PAVQObject@@@Z @ 2604 NONAME ; QGraphicsBloomEffect::QGraphicsBloomEffect(class QObject *)
+ ??0QGraphicsBloomEffect@@QAE@PAVQObject@@@Z @ 2604 NONAME ABSENT ; QGraphicsBloomEffect::QGraphicsBloomEffect(class QObject *)
?alternateBase@QPalette@@QBEABVQBrush@@XZ @ 2605 NONAME ; class QBrush const & QPalette::alternateBase(void) const
?qt_metacast@QColumnView@@UAEPAXPBD@Z @ 2606 NONAME ; void * QColumnView::qt_metacast(char const *)
??_0QQuaternion@@QAEAAV0@M@Z @ 2607 NONAME ; class QQuaternion & QQuaternion::operator/=(float)
@@ -2615,7 +2615,7 @@ EXPORTS
?options@QFileDialog@@QBE?AV?$QFlags@W4Option@QFileDialog@@@@XZ @ 2614 NONAME ; class QFlags<enum QFileDialog::Option> QFileDialog::options(void) const
?dataChanged@QHeaderView@@MAEXABVQModelIndex@@0@Z @ 2615 NONAME ; void QHeaderView::dataChanged(class QModelIndex const &, class QModelIndex const &)
?hideText@QWhatsThis@@SAXXZ @ 2616 NONAME ; void QWhatsThis::hideText(void)
- ?getStaticMetaObject@QGraphicsGrayscaleEffect@@SAABUQMetaObject@@XZ @ 2617 NONAME ; struct QMetaObject const & QGraphicsGrayscaleEffect::getStaticMetaObject(void)
+ ?getStaticMetaObject@QGraphicsGrayscaleEffect@@SAABUQMetaObject@@XZ @ 2617 NONAME ABSENT ; struct QMetaObject const & QGraphicsGrayscaleEffect::getStaticMetaObject(void)
?construct@QApplicationPrivate@@QAEXXZ @ 2618 NONAME ; void QApplicationPrivate::construct(void)
?mouseReleaseEvent@QSizeGrip@@MAEXPAVQMouseEvent@@@Z @ 2619 NONAME ; void QSizeGrip::mouseReleaseEvent(class QMouseEvent *)
?currentIndex@QTabBar@@QBEHXZ @ 2620 NONAME ; int QTabBar::currentIndex(void) const
@@ -2664,7 +2664,7 @@ EXPORTS
?cleanIndex@QUndoStack@@QBEHXZ @ 2663 NONAME ; int QUndoStack::cleanIndex(void) const
?index@QFileSystemModel@@UBE?AVQModelIndex@@HHABV2@@Z @ 2664 NONAME ; class QModelIndex QFileSystemModel::index(int, int, class QModelIndex const &) const
??1QStyleOptionFrameV3@@QAE@XZ @ 2665 NONAME ; QStyleOptionFrameV3::~QStyleOptionFrameV3(void)
- ??1QGraphicsBloomEffect@@UAE@XZ @ 2666 NONAME ; QGraphicsBloomEffect::~QGraphicsBloomEffect(void)
+ ??1QGraphicsBloomEffect@@UAE@XZ @ 2666 NONAME ABSENT ; QGraphicsBloomEffect::~QGraphicsBloomEffect(void)
??1QAbstractTextDocumentLayout@@UAE@XZ @ 2667 NONAME ; QAbstractTextDocumentLayout::~QAbstractTextDocumentLayout(void)
?scaled@QPixmap@@QBE?AV1@HHW4AspectRatioMode@Qt@@W4TransformationMode@3@@Z @ 2668 NONAME ; class QPixmap QPixmap::scaled(int, int, enum Qt::AspectRatioMode, enum Qt::TransformationMode) const
??_EQGraphicsTransform@@UAE@I@Z @ 2669 NONAME ; QGraphicsTransform::~QGraphicsTransform(unsigned int)
@@ -2682,7 +2682,7 @@ EXPORTS
?isBlockFormat@QTextFormat@@QBE_NXZ @ 2681 NONAME ; bool QTextFormat::isBlockFormat(void) const
??0QColormap@@QAE@ABV0@@Z @ 2682 NONAME ; QColormap::QColormap(class QColormap const &)
?rightPadding@QTextTableCellFormat@@QBEMXZ @ 2683 NONAME ; float QTextTableCellFormat::rightPadding(void) const
- ?staticMetaObject@QGraphicsBloomEffect@@2UQMetaObject@@B @ 2684 NONAME ; struct QMetaObject const QGraphicsBloomEffect::staticMetaObject
+ ?staticMetaObject@QGraphicsBloomEffect@@2UQMetaObject@@B @ 2684 NONAME ABSENT ; struct QMetaObject const QGraphicsBloomEffect::staticMetaObject
?leading@QFontMetricsF@@QBEMXZ @ 2685 NONAME ; float QFontMetricsF::leading(void) const
?beginNativePainting@QPainter@@QAEXXZ @ 2686 NONAME ; void QPainter::beginNativePainting(void)
?addChildWidget@QLayout@@IAEXPAVQWidget@@@Z @ 2687 NONAME ; void QLayout::addChildWidget(class QWidget *)
@@ -2733,7 +2733,7 @@ EXPORTS
?data_ptr@QPicture@@QAEAAV?$QExplicitlySharedDataPointer@VQPicturePrivate@@@@XZ @ 2732 NONAME ; class QExplicitlySharedDataPointer<class QPicturePrivate> & QPicture::data_ptr(void)
?closeAllWindows@QApplication@@SAXXZ @ 2733 NONAME ; void QApplication::closeAllWindows(void)
?setMimeData@QDrag@@QAEXPAVQMimeData@@@Z @ 2734 NONAME ; void QDrag::setMimeData(class QMimeData *)
- ?trUtf8@QGraphicsGrayscaleEffect@@SA?AVQString@@PBD0H@Z @ 2735 NONAME ; class QString QGraphicsGrayscaleEffect::trUtf8(char const *, char const *, int)
+ ?trUtf8@QGraphicsGrayscaleEffect@@SA?AVQString@@PBD0H@Z @ 2735 NONAME ABSENT ; class QString QGraphicsGrayscaleEffect::trUtf8(char const *, char const *, int)
?trUtf8@QStringListModel@@SA?AVQString@@PBD0H@Z @ 2736 NONAME ; class QString QStringListModel::trUtf8(char const *, char const *, int)
?trUtf8@QEventDispatcherS60@@SA?AVQString@@PBD0@Z @ 2737 NONAME ; class QString QEventDispatcherS60::trUtf8(char const *, char const *)
??0QMdiSubWindow@@QAE@PAVQWidget@@V?$QFlags@W4WindowType@Qt@@@@@Z @ 2738 NONAME ; QMdiSubWindow::QMdiSubWindow(class QWidget *, class QFlags<enum Qt::WindowType>)
@@ -2801,7 +2801,7 @@ EXPORTS
??4QTextFormatCollection@@QAEAAV0@ABV0@@Z @ 2800 NONAME ; class QTextFormatCollection & QTextFormatCollection::operator=(class QTextFormatCollection const &)
?setDecMode@QLCDNumber@@QAEXXZ @ 2801 NONAME ; void QLCDNumber::setDecMode(void)
?setSelected@QTreeWidgetItem@@QAEX_N@Z @ 2802 NONAME ; void QTreeWidgetItem::setSelected(bool)
- ??_EQGraphicsGrayscaleEffect@@UAE@I@Z @ 2803 NONAME ; QGraphicsGrayscaleEffect::~QGraphicsGrayscaleEffect(unsigned int)
+ ??_EQGraphicsGrayscaleEffect@@UAE@I@Z @ 2803 NONAME ABSENT ; QGraphicsGrayscaleEffect::~QGraphicsGrayscaleEffect(unsigned int)
?setTransformations@QGraphicsItem@@QAEXABV?$QList@PAVQGraphicsTransform@@@@@Z @ 2804 NONAME ; void QGraphicsItem::setTransformations(class QList<class QGraphicsTransform *> const &)
?associatedWidgets@QAction@@QBE?AV?$QList@PAVQWidget@@@@XZ @ 2805 NONAME ; class QList<class QWidget *> QAction::associatedWidgets(void) const
??0QTransform@@QAE@W4Initialization@Qt@@@Z @ 2806 NONAME ; QTransform::QTransform(enum Qt::Initialization)
@@ -2943,7 +2943,7 @@ EXPORTS
??1QTextDocumentFragment@@QAE@XZ @ 2942 NONAME ; QTextDocumentFragment::~QTextDocumentFragment(void)
?setInsertPolicy@QComboBox@@QAEXW4InsertPolicy@1@@Z @ 2943 NONAME ; void QComboBox::setInsertPolicy(enum QComboBox::InsertPolicy)
?setHorizontalSpacing@QGridLayout@@QAEXH@Z @ 2944 NONAME ; void QGridLayout::setHorizontalSpacing(int)
- ?setPixelSize@QGraphicsPixelizeEffect@@QAEXH@Z @ 2945 NONAME ; void QGraphicsPixelizeEffect::setPixelSize(int)
+ ?setPixelSize@QGraphicsPixelizeEffect@@QAEXH@Z @ 2945 NONAME ABSENT ; void QGraphicsPixelizeEffect::setPixelSize(int)
?tr@QImageIOPlugin@@SA?AVQString@@PBD0@Z @ 2946 NONAME ; class QString QImageIOPlugin::tr(char const *, char const *)
?setStyle@QApplication@@SAPAVQStyle@@ABVQString@@@Z @ 2947 NONAME ; class QStyle * QApplication::setStyle(class QString const &)
??0QDrag@@QAE@PAVQWidget@@@Z @ 2948 NONAME ; QDrag::QDrag(class QWidget *)
@@ -2978,7 +2978,7 @@ EXPORTS
?onTransition@QKeyEventTransition@@MAEXPAVQEvent@@@Z @ 2977 NONAME ; void QKeyEventTransition::onTransition(class QEvent *)
?size@QImageReader@@QBE?AVQSize@@XZ @ 2978 NONAME ; class QSize QImageReader::size(void) const
?unite@QRegion@@QBE?AV1@ABVQRect@@@Z @ 2979 NONAME ; class QRegion QRegion::unite(class QRect const &) const
- ?strength@QGraphicsBloomEffect@@QBEMXZ @ 2980 NONAME ; float QGraphicsBloomEffect::strength(void) const
+ ?strength@QGraphicsBloomEffect@@QBEMXZ @ 2980 NONAME ABSENT ; float QGraphicsBloomEffect::strength(void) const
?registerEditor@QItemEditorFactory@@QAEXW4Type@QVariant@@PAVQItemEditorCreatorBase@@@Z @ 2981 NONAME ; void QItemEditorFactory::registerEditor(enum QVariant::Type, class QItemEditorCreatorBase *)
?count@QListWidget@@QBEHXZ @ 2982 NONAME ; int QListWidget::count(void) const
?loadFromData@QPixmap@@QAE_NPBEIPBDV?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 2983 NONAME ; bool QPixmap::loadFromData(unsigned char const *, unsigned int, char const *, class QFlags<enum Qt::ImageConversionFlag>)
@@ -3099,7 +3099,7 @@ EXPORTS
?nextCheckState@QToolButton@@MAEXXZ @ 3098 NONAME ; void QToolButton::nextCheckState(void)
?polish@QCommonStyle@@UAEXPAVQApplication@@@Z @ 3099 NONAME ; void QCommonStyle::polish(class QApplication *)
?lengthVectorProperty@QTextFormat@@QBE?AV?$QVector@VQTextLength@@@@H@Z @ 3100 NONAME ; class QVector<class QTextLength> QTextFormat::lengthVectorProperty(int) const
- ?getStaticMetaObject@QGraphicsBloomEffect@@SAABUQMetaObject@@XZ @ 3101 NONAME ; struct QMetaObject const & QGraphicsBloomEffect::getStaticMetaObject(void)
+ ?getStaticMetaObject@QGraphicsBloomEffect@@SAABUQMetaObject@@XZ @ 3101 NONAME ABSENT ; struct QMetaObject const & QGraphicsBloomEffect::getStaticMetaObject(void)
?setMinimumDateTime@QDateTimeEdit@@QAEXABVQDateTime@@@Z @ 3102 NONAME ; void QDateTimeEdit::setMinimumDateTime(class QDateTime const &)
??1QResizeEvent@@UAE@XZ @ 3103 NONAME ; QResizeEvent::~QResizeEvent(void)
?boundingRectFor@QPixmapConvolutionFilter@@UBE?AVQRectF@@ABV2@@Z @ 3104 NONAME ; class QRectF QPixmapConvolutionFilter::boundingRectFor(class QRectF const &) const
@@ -3115,7 +3115,7 @@ EXPORTS
?activateSymbianWindow@QWidgetPrivate@@QAEXPAVCCoeControl@@@Z @ 3114 NONAME ; void QWidgetPrivate::activateSymbianWindow(class CCoeControl *)
?loadFromData@QImage@@QAE_NPBEHPBD@Z @ 3115 NONAME ; bool QImage::loadFromData(unsigned char const *, int, char const *)
?addItem@QGridLayout@@QAEXPAVQLayoutItem@@HHHHV?$QFlags@W4AlignmentFlag@Qt@@@@@Z @ 3116 NONAME ; void QGridLayout::addItem(class QLayoutItem *, int, int, int, int, class QFlags<enum Qt::AlignmentFlag>)
- ?d_func@QGraphicsPixelizeEffect@@ABEPBVQGraphicsPixelizeEffectPrivate@@XZ @ 3117 NONAME ; class QGraphicsPixelizeEffectPrivate const * QGraphicsPixelizeEffect::d_func(void) const
+ ?d_func@QGraphicsPixelizeEffect@@ABEPBVQGraphicsPixelizeEffectPrivate@@XZ @ 3117 NONAME ABSENT ; class QGraphicsPixelizeEffectPrivate const * QGraphicsPixelizeEffect::d_func(void) const
??D@YA?AVQLine@@ABV0@ABVQTransform@@@Z @ 3118 NONAME ; class QLine operator*(class QLine const &, class QTransform const &)
?boundingRectFor@QPixmapDropShadowFilter@@UBE?AVQRectF@@ABV2@@Z @ 3119 NONAME ; class QRectF QPixmapDropShadowFilter::boundingRectFor(class QRectF const &) const
?del@QLineEdit@@QAEXXZ @ 3120 NONAME ; void QLineEdit::del(void)
@@ -3151,7 +3151,7 @@ EXPORTS
?device@QImageIOHandler@@QBEPAVQIODevice@@XZ @ 3150 NONAME ; class QIODevice * QImageIOHandler::device(void) const
?setCurrentIndex@QStackedLayout@@QAEXH@Z @ 3151 NONAME ; void QStackedLayout::setCurrentIndex(int)
?d_func@QWindowsStyle@@AAEPAVQWindowsStylePrivate@@XZ @ 3152 NONAME ; class QWindowsStylePrivate * QWindowsStyle::d_func(void)
- ?tr@QGraphicsGrayscaleEffect@@SA?AVQString@@PBD0H@Z @ 3153 NONAME ; class QString QGraphicsGrayscaleEffect::tr(char const *, char const *, int)
+ ?tr@QGraphicsGrayscaleEffect@@SA?AVQString@@PBD0H@Z @ 3153 NONAME ABSENT ; class QString QGraphicsGrayscaleEffect::tr(char const *, char const *, int)
?sidebarUrls@QFileDialog@@QBE?AV?$QList@VQUrl@@@@XZ @ 3154 NONAME ; class QList<class QUrl> QFileDialog::sidebarUrls(void) const
??1QPictureFormatInterface@@UAE@XZ @ 3155 NONAME ; QPictureFormatInterface::~QPictureFormatInterface(void)
?setLineCount@QTextBlock@@QAEXH@Z @ 3156 NONAME ; void QTextBlock::setLineCount(int)
@@ -3288,7 +3288,7 @@ EXPORTS
?notation@QDoubleValidator@@QBE?AW4Notation@1@XZ @ 3287 NONAME ; enum QDoubleValidator::Notation QDoubleValidator::notation(void) const
?maximumTime@QDateTimeEdit@@QBE?AVQTime@@XZ @ 3288 NONAME ; class QTime QDateTimeEdit::maximumTime(void) const
?drawControl@QS60Style@@UBEXW4ControlElement@QStyle@@PBVQStyleOption@@PAVQPainter@@PBVQWidget@@@Z @ 3289 NONAME ; void QS60Style::drawControl(enum QStyle::ControlElement, class QStyleOption const *, class QPainter *, class QWidget const *) const
- ??_EQCoeFepInputContext@@UAE@I@Z @ 3290 NONAME ; QCoeFepInputContext::~QCoeFepInputContext(unsigned int)
+ ??_EQCoeFepInputContext@@UAE@I@Z @ 3290 NONAME ABSENT ; QCoeFepInputContext::~QCoeFepInputContext(unsigned int)
?setAttribute@QWidget@@QAEXW4WidgetAttribute@Qt@@_N@Z @ 3291 NONAME ; void QWidget::setAttribute(enum Qt::WidgetAttribute, bool)
??1QImageIOPlugin@@UAE@XZ @ 3292 NONAME ; QImageIOPlugin::~QImageIOPlugin(void)
??1QTessellator@@UAE@XZ @ 3293 NONAME ; QTessellator::~QTessellator(void)
@@ -3365,7 +3365,7 @@ EXPORTS
?setObjectFormat@QTextFormatCollection@@QAEXHABVQTextFormat@@@Z @ 3364 NONAME ; void QTextFormatCollection::setObjectFormat(int, class QTextFormat const &)
?setExtension@QGraphicsSimpleTextItem@@MAEXW4Extension@QGraphicsItem@@ABVQVariant@@@Z @ 3365 NONAME ; void QGraphicsSimpleTextItem::setExtension(enum QGraphicsItem::Extension, class QVariant const &)
?palette@QGraphicsWidget@@QBE?AVQPalette@@XZ @ 3366 NONAME ; class QPalette QGraphicsWidget::palette(void) const
- ?pixmap@QGraphicsEffectSource@@QBE?AVQPixmap@@W4CoordinateSystem@Qt@@PAVQPoint@@@Z @ 3367 NONAME ; class QPixmap QGraphicsEffectSource::pixmap(enum Qt::CoordinateSystem, class QPoint *) const
+ ?pixmap@QGraphicsEffectSource@@QBE?AVQPixmap@@W4CoordinateSystem@Qt@@PAVQPoint@@@Z @ 3367 NONAME ABSENT ; class QPixmap QGraphicsEffectSource::pixmap(enum Qt::CoordinateSystem, class QPoint *) const
?setColor@QPen@@QAEXABVQColor@@@Z @ 3368 NONAME ; void QPen::setColor(class QColor const &)
?pen@QPaintEngineState@@QBE?AVQPen@@XZ @ 3369 NONAME ; class QPen QPaintEngineState::pen(void) const
?fileName@QSound@@QBE?AVQString@@XZ @ 3370 NONAME ; class QString QSound::fileName(void) const
@@ -3385,7 +3385,7 @@ EXPORTS
?qt_metacall@QStyle@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 3384 NONAME ; int QStyle::qt_metacall(enum QMetaObject::Call, int, void * *)
??1QApplication@@UAE@XZ @ 3385 NONAME ; QApplication::~QApplication(void)
?setBaseSize@QWidget@@QAEXABVQSize@@@Z @ 3386 NONAME ; void QWidget::setBaseSize(class QSize const &)
- ?trUtf8@QGraphicsBloomEffect@@SA?AVQString@@PBD0@Z @ 3387 NONAME ; class QString QGraphicsBloomEffect::trUtf8(char const *, char const *)
+ ?trUtf8@QGraphicsBloomEffect@@SA?AVQString@@PBD0@Z @ 3387 NONAME ABSENT ; class QString QGraphicsBloomEffect::trUtf8(char const *, char const *)
?setWindowFilePath_helper@QWidgetPrivate@@QAEXABVQString@@@Z @ 3388 NONAME ; void QWidgetPrivate::setWindowFilePath_helper(class QString const &)
?setSourceModel@QSortFilterProxyModel@@UAEXPAVQAbstractItemModel@@@Z @ 3389 NONAME ; void QSortFilterProxyModel::setSourceModel(class QAbstractItemModel *)
?removeStack@QUndoGroup@@QAEXPAVQUndoStack@@@Z @ 3390 NONAME ; void QUndoGroup::removeStack(class QUndoStack *)
@@ -3433,12 +3433,12 @@ EXPORTS
?setVisible@QWidget@@UAEX_N@Z @ 3432 NONAME ; void QWidget::setVisible(bool)
?quitOnLastWindowClosed@QApplicationPrivate@@2_NA @ 3433 NONAME ; bool QApplicationPrivate::quitOnLastWindowClosed
?rowsInserted@QColumnView@@MAEXABVQModelIndex@@HH@Z @ 3434 NONAME ; void QColumnView::rowsInserted(class QModelIndex const &, int, int)
- ?qt_metacast@QCoeFepInputContext@@UAEPAXPBD@Z @ 3435 NONAME ; void * QCoeFepInputContext::qt_metacast(char const *)
+ ?qt_metacast@QCoeFepInputContext@@UAEPAXPBD@Z @ 3435 NONAME ABSENT ; void * QCoeFepInputContext::qt_metacast(char const *)
?map@QMatrix@@QBE?AVQPoint@@ABV2@@Z @ 3436 NONAME ; class QPoint QMatrix::map(class QPoint const &) const
- ?MopSupplyObject@QCoeFepInputContext@@UAE?AVPtr@TTypeUid@@V3@@Z @ 3437 NONAME ; class TTypeUid::Ptr QCoeFepInputContext::MopSupplyObject(class TTypeUid)
+ ?MopSupplyObject@QCoeFepInputContext@@UAE?AVPtr@TTypeUid@@V3@@Z @ 3437 NONAME ABSENT ; class TTypeUid::Ptr QCoeFepInputContext::MopSupplyObject(class TTypeUid)
?styleName@QGuiPlatformPlugin@@UAE?AVQString@@XZ @ 3438 NONAME ; class QString QGuiPlatformPlugin::styleName(void)
?rowsInserted@QAbstractItemView@@MAEXABVQModelIndex@@HH@Z @ 3439 NONAME ; void QAbstractItemView::rowsInserted(class QModelIndex const &, int, int)
- ?setBlurHint@QGraphicsBloomEffect@@QAEXW4RenderHint@Qt@@@Z @ 3440 NONAME ; void QGraphicsBloomEffect::setBlurHint(enum Qt::RenderHint)
+ ?setBlurHint@QGraphicsBloomEffect@@QAEXW4RenderHint@Qt@@@Z @ 3440 NONAME ABSENT ; void QGraphicsBloomEffect::setBlurHint(enum Qt::RenderHint)
?gradient@QBrush@@QBEPBVQGradient@@XZ @ 3441 NONAME ; class QGradient const * QBrush::gradient(void) const
?hasFocus@QWidget@@QBE_NXZ @ 3442 NONAME ; bool QWidget::hasFocus(void) const
??0Symbol@QCss@@QAE@XZ @ 3443 NONAME ; QCss::Symbol::Symbol(void)
@@ -3464,7 +3464,7 @@ EXPORTS
?header@QTreeView@@QBEPAVQHeaderView@@XZ @ 3463 NONAME ; class QHeaderView * QTreeView::header(void) const
?scrollToAnchor@QTextEdit@@QAEXABVQString@@@Z @ 3464 NONAME ; void QTextEdit::scrollToAnchor(class QString const &)
??_EQGraphicsSystem@@UAE@I@Z @ 3465 NONAME ; QGraphicsSystem::~QGraphicsSystem(unsigned int)
- ?metaObject@QGraphicsPixelizeEffect@@UBEPBUQMetaObject@@XZ @ 3466 NONAME ; struct QMetaObject const * QGraphicsPixelizeEffect::metaObject(void) const
+ ?metaObject@QGraphicsPixelizeEffect@@UBEPBUQMetaObject@@XZ @ 3466 NONAME ABSENT ; struct QMetaObject const * QGraphicsPixelizeEffect::metaObject(void) const
?setWrapping@QDial@@QAEX_N@Z @ 3467 NONAME ; void QDial::setWrapping(bool)
?setActive@QGraphicsItem@@QAEX_N@Z @ 3468 NONAME ; void QGraphicsItem::setActive(bool)
?wordWrap@QLabel@@QBE_NXZ @ 3469 NONAME ; bool QLabel::wordWrap(void) const
@@ -3585,7 +3585,7 @@ EXPORTS
?setUniformRowHeights@QTreeView@@QAEX_N@Z @ 3584 NONAME ; void QTreeView::setUniformRowHeights(bool)
??MQImageTextKeyLang@@QBE_NABV0@@Z @ 3585 NONAME ; bool QImageTextKeyLang::operator<(class QImageTextKeyLang const &) const
?paste@QLineEdit@@QAEXXZ @ 3586 NONAME ; void QLineEdit::paste(void)
- ?identifierName@QCoeFepInputContext@@UAE?AVQString@@XZ @ 3587 NONAME ; class QString QCoeFepInputContext::identifierName(void)
+ ?identifierName@QCoeFepInputContext@@UAE?AVQString@@XZ @ 3587 NONAME ABSENT ; class QString QCoeFepInputContext::identifierName(void)
??_EQMouseEvent@@UAE@I@Z @ 3588 NONAME ; QMouseEvent::~QMouseEvent(unsigned int)
?setForegroundBrush@QGraphicsView@@QAEXABVQBrush@@@Z @ 3589 NONAME ; void QGraphicsView::setForegroundBrush(class QBrush const &)
?setDocumentMode@QTabWidget@@QAEX_N@Z @ 3590 NONAME ; void QTabWidget::setDocumentMode(bool)
@@ -3809,7 +3809,7 @@ EXPORTS
?load@QPixmap@@QAE_NABVQString@@PBDV?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 3808 NONAME ; bool QPixmap::load(class QString const &, char const *, class QFlags<enum Qt::ImageConversionFlag>)
??0QStyleOptionToolBar@@IAE@H@Z @ 3809 NONAME ; QStyleOptionToolBar::QStyleOptionToolBar(int)
?setForegroundRole@QWidget@@QAEXW4ColorRole@QPalette@@@Z @ 3810 NONAME ; void QWidget::setForegroundRole(enum QPalette::ColorRole)
- ?applyHints@QCoeFepInputContext@@AAEXV?$QFlags@W4InputMethodHint@Qt@@@@@Z @ 3811 NONAME ; void QCoeFepInputContext::applyHints(class QFlags<enum Qt::InputMethodHint>)
+ ?applyHints@QCoeFepInputContext@@AAEXV?$QFlags@W4InputMethodHint@Qt@@@@@Z @ 3811 NONAME ABSENT ; void QCoeFepInputContext::applyHints(class QFlags<enum Qt::InputMethodHint>)
?visualAlignment@QStyle@@SA?AV?$QFlags@W4AlignmentFlag@Qt@@@@W4LayoutDirection@Qt@@V2@@Z @ 3812 NONAME ; class QFlags<enum Qt::AlignmentFlag> QStyle::visualAlignment(enum Qt::LayoutDirection, class QFlags<enum Qt::AlignmentFlag>)
?scrollContentsBy@QScrollArea@@MAEXHH@Z @ 3813 NONAME ; void QScrollArea::scrollContentsBy(int, int)
?itemsExpandable@QTreeView@@QBE_NXZ @ 3814 NONAME ; bool QTreeView::itemsExpandable(void) const
@@ -3915,7 +3915,7 @@ EXPORTS
?setConvolutionKernel@QPixmapConvolutionFilter@@QAEXPBMHH@Z @ 3914 NONAME ; void QPixmapConvolutionFilter::setConvolutionKernel(float const *, int, int)
?animate_menu@QApplicationPrivate@@2_NA @ 3915 NONAME ; bool QApplicationPrivate::animate_menu
?eventTest@QMouseEventTransition@@MAE_NPAVQEvent@@@Z @ 3916 NONAME ; bool QMouseEventTransition::eventTest(class QEvent *)
- ??1QGraphicsPixelizeEffect@@UAE@XZ @ 3917 NONAME ; QGraphicsPixelizeEffect::~QGraphicsPixelizeEffect(void)
+ ??1QGraphicsPixelizeEffect@@UAE@XZ @ 3917 NONAME ABSENT ; QGraphicsPixelizeEffect::~QGraphicsPixelizeEffect(void)
?staticMetaObject@QTabWidget@@2UQMetaObject@@B @ 3918 NONAME ; struct QMetaObject const QTabWidget::staticMetaObject
?id@QUndoCommand@@UBEHXZ @ 3919 NONAME ; int QUndoCommand::id(void) const
?contextMenuEvent@QLabel@@MAEXPAVQContextMenuEvent@@@Z @ 3920 NONAME ; void QLabel::contextMenuEvent(class QContextMenuEvent *)
@@ -3989,7 +3989,7 @@ EXPORTS
?cursorRect@QTextControl@@QBE?AVQRectF@@ABVQTextCursor@@@Z @ 3988 NONAME ; class QRectF QTextControl::cursorRect(class QTextCursor const &) const
?drawItems@QGraphicsView@@MAEXPAVQPainter@@HQAPAVQGraphicsItem@@QBVQStyleOptionGraphicsItem@@@Z @ 3989 NONAME ; void QGraphicsView::drawItems(class QPainter *, int, class QGraphicsItem * * const, class QStyleOptionGraphicsItem const * const)
?activateChildLayoutsRecursively@QWidgetPrivate@@QAEXXZ @ 3990 NONAME ; void QWidgetPrivate::activateChildLayoutsRecursively(void)
- ?tr@QGraphicsBloomEffect@@SA?AVQString@@PBD0@Z @ 3991 NONAME ; class QString QGraphicsBloomEffect::tr(char const *, char const *)
+ ?tr@QGraphicsBloomEffect@@SA?AVQString@@PBD0@Z @ 3991 NONAME ABSENT ; class QString QGraphicsBloomEffect::tr(char const *, char const *)
?mimeData@QClipboard@@QBEPBVQMimeData@@W4Mode@1@@Z @ 3992 NONAME ; class QMimeData const * QClipboard::mimeData(enum QClipboard::Mode) const
?createWinId@QWidget@@QAEXXZ @ 3993 NONAME ; void QWidget::createWinId(void)
?closeActiveSubWindow@QMdiArea@@QAEXXZ @ 3994 NONAME ; void QMdiArea::closeActiveSubWindow(void)
@@ -4098,7 +4098,7 @@ EXPORTS
?columnWidths@QColumnView@@QBE?AV?$QList@H@@XZ @ 4097 NONAME ; class QList<int> QColumnView::columnWidths(void) const
?scale@QPainter@@QAEXMM@Z @ 4098 NONAME ; void QPainter::scale(float, float)
?setShortcut@QAction@@QAEXABVQKeySequence@@@Z @ 4099 NONAME ; void QAction::setShortcut(class QKeySequence const &)
- ?draw@QGraphicsBloomEffect@@MAEXPAVQPainter@@PAVQGraphicsEffectSource@@@Z @ 4100 NONAME ; void QGraphicsBloomEffect::draw(class QPainter *, class QGraphicsEffectSource *)
+ ?draw@QGraphicsBloomEffect@@MAEXPAVQPainter@@PAVQGraphicsEffectSource@@@Z @ 4100 NONAME ABSENT ; void QGraphicsBloomEffect::draw(class QPainter *, class QGraphicsEffectSource *)
?setGeometry@QWidget@@QAEXABVQRect@@@Z @ 4101 NONAME ; void QWidget::setGeometry(class QRect const &)
?clear@QMenu@@QAEXXZ @ 4102 NONAME ; void QMenu::clear(void)
?mouseDoubleClickEvent@QAbstractScrollArea@@MAEXPAVQMouseEvent@@@Z @ 4103 NONAME ; void QAbstractScrollArea::mouseDoubleClickEvent(class QMouseEvent *)
@@ -4109,7 +4109,7 @@ EXPORTS
?dragEnterEvent@QGraphicsScene@@MAEXPAVQGraphicsSceneDragDropEvent@@@Z @ 4108 NONAME ; void QGraphicsScene::dragEnterEvent(class QGraphicsSceneDragDropEvent *)
?draw@QTextLine@@QBEXPAVQPainter@@ABVQPointF@@PBUFormatRange@QTextLayout@@@Z @ 4109 NONAME ; void QTextLine::draw(class QPainter *, class QPointF const &, struct QTextLayout::FormatRange const *) const
?type@QSymbianEvent@@QBE?AW4Type@1@XZ @ 4110 NONAME ; enum QSymbianEvent::Type QSymbianEvent::type(void) const
- ?boundingRectFor@QGraphicsBloomEffect@@UBE?AVQRectF@@ABV2@@Z @ 4111 NONAME ; class QRectF QGraphicsBloomEffect::boundingRectFor(class QRectF const &) const
+ ?boundingRectFor@QGraphicsBloomEffect@@UBE?AVQRectF@@ABV2@@Z @ 4111 NONAME ABSENT ; class QRectF QGraphicsBloomEffect::boundingRectFor(class QRectF const &) const
?setDockOptions@QMainWindow@@QAEXV?$QFlags@W4DockOption@QMainWindow@@@@@Z @ 4112 NONAME ; void QMainWindow::setDockOptions(class QFlags<enum QMainWindow::DockOption>)
?canUndoChanged@QUndoGroup@@IAEX_N@Z @ 4113 NONAME ; void QUndoGroup::canUndoChanged(bool)
?d_func@QMdiArea@@AAEPAVQMdiAreaPrivate@@XZ @ 4114 NONAME ; class QMdiAreaPrivate * QMdiArea::d_func(void)
@@ -4159,7 +4159,7 @@ EXPORTS
?isUndoRedoEnabled@QPlainTextEdit@@QBE_NXZ @ 4158 NONAME ; bool QPlainTextEdit::isUndoRedoEnabled(void) const
?clicked@QGroupBox@@IAEX_N@Z @ 4159 NONAME ; void QGroupBox::clicked(bool)
?setKeyboardSingleStep@QMdiSubWindow@@QAEXH@Z @ 4160 NONAME ; void QMdiSubWindow::setKeyboardSingleStep(int)
- ?brightness@QGraphicsBloomEffect@@QBEHXZ @ 4161 NONAME ; int QGraphicsBloomEffect::brightness(void) const
+ ?brightness@QGraphicsBloomEffect@@QBEHXZ @ 4161 NONAME ABSENT ; int QGraphicsBloomEffect::brightness(void) const
??_EQDragMoveEvent@@UAE@I@Z @ 4162 NONAME ; QDragMoveEvent::~QDragMoveEvent(unsigned int)
?isItemSelected@QListWidget@@QBE_NPBVQListWidgetItem@@@Z @ 4163 NONAME ; bool QListWidget::isItemSelected(class QListWidgetItem const *) const
?d_func@QGraphicsBlurEffect@@ABEPBVQGraphicsBlurEffectPrivate@@XZ @ 4164 NONAME ; class QGraphicsBlurEffectPrivate const * QGraphicsBlurEffect::d_func(void) const
@@ -4247,7 +4247,7 @@ EXPORTS
?qt_metacast@QActionGroup@@UAEPAXPBD@Z @ 4246 NONAME ; void * QActionGroup::qt_metacast(char const *)
?inputMethodQuery@QTextEdit@@MBE?AVQVariant@@W4InputMethodQuery@Qt@@@Z @ 4247 NONAME ; class QVariant QTextEdit::inputMethodQuery(enum Qt::InputMethodQuery) const
?paint@QGraphicsRectItem@@UAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 4248 NONAME ; void QGraphicsRectItem::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *)
- ?getStaticMetaObject@QCoeFepInputContext@@SAABUQMetaObject@@XZ @ 4249 NONAME ; struct QMetaObject const & QCoeFepInputContext::getStaticMetaObject(void)
+ ?getStaticMetaObject@QCoeFepInputContext@@SAABUQMetaObject@@XZ @ 4249 NONAME ABSENT ; struct QMetaObject const & QCoeFepInputContext::getStaticMetaObject(void)
?d_func@QStyle@@AAEPAVQStylePrivate@@XZ @ 4250 NONAME ; class QStylePrivate * QStyle::d_func(void)
?hasAlphaChannel@QRasterPixmapData@@UBE_NXZ @ 4251 NONAME ; bool QRasterPixmapData::hasAlphaChannel(void) const
??1QAbstractScrollArea@@UAE@XZ @ 4252 NONAME ; QAbstractScrollArea::~QAbstractScrollArea(void)
@@ -4297,8 +4297,8 @@ EXPORTS
?isAreaAllowed@QToolBar@@QBE_NW4ToolBarArea@Qt@@@Z @ 4296 NONAME ; bool QToolBar::isAreaAllowed(enum Qt::ToolBarArea) const
?fontWeight@QTextCharFormat@@QBEHXZ @ 4297 NONAME ; int QTextCharFormat::fontWeight(void) const
?staticMetaObject@QTextList@@2UQMetaObject@@B @ 4298 NONAME ; struct QMetaObject const QTextList::staticMetaObject
- ?setBlurRadius@QPixmapDropShadowFilter@@QAEXH@Z @ 4299 NONAME ; void QPixmapDropShadowFilter::setBlurRadius(int)
- ?GetEditorContentForFep@QCoeFepInputContext@@UBEXAAVTDes16@@HH@Z @ 4300 NONAME ; void QCoeFepInputContext::GetEditorContentForFep(class TDes16 &, int, int) const
+ ?setBlurRadius@QPixmapDropShadowFilter@@QAEXH@Z @ 4299 NONAME ABSENT ; void QPixmapDropShadowFilter::setBlurRadius(int)
+ ?GetEditorContentForFep@QCoeFepInputContext@@UBEXAAVTDes16@@HH@Z @ 4300 NONAME ABSENT ; void QCoeFepInputContext::GetEditorContentForFep(class TDes16 &, int, int) const
?trUtf8@QGraphicsWidget@@SA?AVQString@@PBD0H@Z @ 4301 NONAME ; class QString QGraphicsWidget::trUtf8(char const *, char const *, int)
?extraItemCache@QGraphicsItemPrivate@@QBEPAVQGraphicsItemCache@@XZ @ 4302 NONAME ; class QGraphicsItemCache * QGraphicsItemPrivate::extraItemCache(void) const
?metaObject@QTableWidget@@UBEPBUQMetaObject@@XZ @ 4303 NONAME ; struct QMetaObject const * QTableWidget::metaObject(void) const
@@ -4429,7 +4429,7 @@ EXPORTS
?beginNewFrame@QPaintBuffer@@QAEXXZ @ 4428 NONAME ; void QPaintBuffer::beginNewFrame(void)
?boundingRect@QPainterPath@@QBE?AVQRectF@@XZ @ 4429 NONAME ; class QRectF QPainterPath::boundingRect(void) const
?eventFilter@QCompleter@@MAE_NPAVQObject@@PAVQEvent@@@Z @ 4430 NONAME ; bool QCompleter::eventFilter(class QObject *, class QEvent *)
- ??0QCoeFepInputContext@@QAE@PAVQObject@@@Z @ 4431 NONAME ; QCoeFepInputContext::QCoeFepInputContext(class QObject *)
+ ??0QCoeFepInputContext@@QAE@PAVQObject@@@Z @ 4431 NONAME ABSENT ; QCoeFepInputContext::QCoeFepInputContext(class QObject *)
?clear@QTextDocument@@UAEXXZ @ 4432 NONAME ; void QTextDocument::clear(void)
?tr@QKeyEventTransition@@SA?AVQString@@PBD0@Z @ 4433 NONAME ; class QString QKeyEventTransition::tr(char const *, char const *)
?drawPicture@QPainter@@QAEXABVQPoint@@ABVQPicture@@@Z @ 4434 NONAME ; void QPainter::drawPicture(class QPoint const &, class QPicture const &)
@@ -4663,7 +4663,7 @@ EXPORTS
?event@QAbstractSlider@@MAE_NPAVQEvent@@@Z @ 4662 NONAME ; bool QAbstractSlider::event(class QEvent *)
??_EQS60Style@@UAE@I@Z @ 4663 NONAME ; QS60Style::~QS60Style(unsigned int)
?setModal@QDialog@@QAEX_N@Z @ 4664 NONAME ; void QDialog::setModal(bool)
- ??_EQGraphicsBloomEffect@@UAE@I@Z @ 4665 NONAME ; QGraphicsBloomEffect::~QGraphicsBloomEffect(unsigned int)
+ ??_EQGraphicsBloomEffect@@UAE@I@Z @ 4665 NONAME ABSENT ; QGraphicsBloomEffect::~QGraphicsBloomEffect(unsigned int)
?tr@QDoubleSpinBox@@SA?AVQString@@PBD0@Z @ 4666 NONAME ; class QString QDoubleSpinBox::tr(char const *, char const *)
?isNavigationBarVisible@QCalendarWidget@@QBE_NXZ @ 4667 NONAME ; bool QCalendarWidget::isNavigationBarVisible(void) const
??0QStatusBar@@QAE@PAVQWidget@@@Z @ 4668 NONAME ; QStatusBar::QStatusBar(class QWidget *)
@@ -4674,7 +4674,7 @@ EXPORTS
?heightForWidth@QBoxLayout@@UBEHH@Z @ 4673 NONAME ; int QBoxLayout::heightForWidth(int) const
?specialValueText@QAbstractSpinBox@@QBE?AVQString@@XZ @ 4674 NONAME ; class QString QAbstractSpinBox::specialValueText(void) const
?showEvent@QGraphicsView@@MAEXPAVQShowEvent@@@Z @ 4675 NONAME ; void QGraphicsView::showEvent(class QShowEvent *)
- ?blurRadiusChanged@QGraphicsBloomEffect@@IAEXH@Z @ 4676 NONAME ; void QGraphicsBloomEffect::blurRadiusChanged(int)
+ ?blurRadiusChanged@QGraphicsBloomEffect@@IAEXH@Z @ 4676 NONAME ABSENT ; void QGraphicsBloomEffect::blurRadiusChanged(int)
?setAutoCompletionCaseSensitivity@QComboBox@@QAEXW4CaseSensitivity@Qt@@@Z @ 4677 NONAME ; void QComboBox::setAutoCompletionCaseSensitivity(enum Qt::CaseSensitivity)
?itemDoubleClicked@QTreeWidget@@IAEXPAVQTreeWidgetItem@@H@Z @ 4678 NONAME ; void QTreeWidget::itemDoubleClicked(class QTreeWidgetItem *, int)
?setFontItalic@QTextEdit@@QAEX_N@Z @ 4679 NONAME ; void QTextEdit::setFontItalic(bool)
@@ -4741,7 +4741,7 @@ EXPORTS
?type@QGraphicsItem@@UBEHXZ @ 4740 NONAME ; int QGraphicsItem::type(void) const
?modifiers@QInputEvent@@QBE?AV?$QFlags@W4KeyboardModifier@Qt@@@@XZ @ 4741 NONAME ; class QFlags<enum Qt::KeyboardModifier> QInputEvent::modifiers(void) const
?transformed@QBitmap@@QBE?AV1@ABVQTransform@@@Z @ 4742 NONAME ; class QBitmap QBitmap::transformed(class QTransform const &) const
- ?tr@QGraphicsGrayscaleEffect@@SA?AVQString@@PBD0@Z @ 4743 NONAME ; class QString QGraphicsGrayscaleEffect::tr(char const *, char const *)
+ ?tr@QGraphicsGrayscaleEffect@@SA?AVQString@@PBD0@Z @ 4743 NONAME ABSENT ; class QString QGraphicsGrayscaleEffect::tr(char const *, char const *)
?setBlurHint@QGraphicsBlurEffect@@QAEXW4RenderHint@Qt@@@Z @ 4744 NONAME ; void QGraphicsBlurEffect::setBlurHint(enum Qt::RenderHint)
?event@QDockWidget@@MAE_NPAVQEvent@@@Z @ 4745 NONAME ; bool QDockWidget::event(class QEvent *)
??_EQStyle@@UAE@I@Z @ 4746 NONAME ; QStyle::~QStyle(unsigned int)
@@ -4835,7 +4835,7 @@ EXPORTS
?setStandardButtons@QMessageBox@@QAEXV?$QFlags@W4StandardButton@QMessageBox@@@@@Z @ 4834 NONAME ; void QMessageBox::setStandardButtons(class QFlags<enum QMessageBox::StandardButton>)
??0QTextTableCell@@QAE@ABV0@@Z @ 4835 NONAME ; QTextTableCell::QTextTableCell(class QTextTableCell const &)
?createStandardContextMenu@QTextControl@@QAEPAVQMenu@@ABVQPointF@@PAVQWidget@@@Z @ 4836 NONAME ; class QMenu * QTextControl::createStandardContextMenu(class QPointF const &, class QWidget *)
- ?metaObject@QGraphicsGrayscaleEffect@@UBEPBUQMetaObject@@XZ @ 4837 NONAME ; struct QMetaObject const * QGraphicsGrayscaleEffect::metaObject(void) const
+ ?metaObject@QGraphicsGrayscaleEffect@@UBEPBUQMetaObject@@XZ @ 4837 NONAME ABSENT ; struct QMetaObject const * QGraphicsGrayscaleEffect::metaObject(void) const
??9QFont@@QBE_NABV0@@Z @ 4838 NONAME ; bool QFont::operator!=(class QFont const &) const
?yearShown@QCalendarWidget@@QBEHXZ @ 4839 NONAME ; int QCalendarWidget::yearShown(void) const
?setRowSpacing@QGraphicsGridLayout@@QAEXHM@Z @ 4840 NONAME ; void QGraphicsGridLayout::setRowSpacing(int, float)
@@ -5072,7 +5072,7 @@ EXPORTS
?removeToolBar@QMainWindow@@QAEXPAVQToolBar@@@Z @ 5071 NONAME ; void QMainWindow::removeToolBar(class QToolBar *)
??0QGraphicsItemAnimation@@QAE@PAVQObject@@@Z @ 5072 NONAME ; QGraphicsItemAnimation::QGraphicsItemAnimation(class QObject *)
?addStrut@QBoxLayout@@QAEXH@Z @ 5073 NONAME ; void QBoxLayout::addStrut(int)
- ??1QGraphicsGrayscaleEffect@@UAE@XZ @ 5074 NONAME ; QGraphicsGrayscaleEffect::~QGraphicsGrayscaleEffect(void)
+ ??1QGraphicsGrayscaleEffect@@UAE@XZ @ 5074 NONAME ABSENT ; QGraphicsGrayscaleEffect::~QGraphicsGrayscaleEffect(void)
?setSelection@QListView@@MAEXABVQRect@@V?$QFlags@W4SelectionFlag@QItemSelectionModel@@@@@Z @ 5075 NONAME ; void QListView::setSelection(class QRect const &, class QFlags<enum QItemSelectionModel::SelectionFlag>)
?staticMetaObject@QAbstractSpinBox@@2UQMetaObject@@B @ 5076 NONAME ; struct QMetaObject const QAbstractSpinBox::staticMetaObject
?trUtf8@QAbstractItemDelegate@@SA?AVQString@@PBD0@Z @ 5077 NONAME ; class QString QAbstractItemDelegate::trUtf8(char const *, char const *)
@@ -5180,7 +5180,7 @@ EXPORTS
?setPoint@QPolygon@@QAEXHHH@Z @ 5179 NONAME ; void QPolygon::setPoint(int, int, int)
?getStaticMetaObject@QIconEnginePluginV2@@SAABUQMetaObject@@XZ @ 5180 NONAME ; struct QMetaObject const & QIconEnginePluginV2::getStaticMetaObject(void)
?tr@QGraphicsTransform@@SA?AVQString@@PBD0H@Z @ 5181 NONAME ; class QString QGraphicsTransform::tr(char const *, char const *, int)
- ?ReportAknEdStateEvent@QCoeFepInputContext@@AAEXW4EAknEdwinStateEvent@MAknEdStateObserver@@@Z @ 5182 NONAME ; void QCoeFepInputContext::ReportAknEdStateEvent(enum MAknEdStateObserver::EAknEdwinStateEvent)
+ ?ReportAknEdStateEvent@QCoeFepInputContext@@AAEXW4EAknEdwinStateEvent@MAknEdStateObserver@@@Z @ 5182 NONAME ABSENT ; void QCoeFepInputContext::ReportAknEdStateEvent(enum MAknEdStateObserver::EAknEdwinStateEvent)
?getStaticMetaObject@QUndoStack@@SAABUQMetaObject@@XZ @ 5183 NONAME ; struct QMetaObject const & QUndoStack::getStaticMetaObject(void)
?focusInEvent@QDateTimeEdit@@MAEXPAVQFocusEvent@@@Z @ 5184 NONAME ; void QDateTimeEdit::focusInEvent(class QFocusEvent *)
?isNull@QIcon@@QBE_NXZ @ 5185 NONAME ; bool QIcon::isNull(void) const
@@ -5189,7 +5189,7 @@ EXPORTS
?toCmyk@QColor@@QBE?AV1@XZ @ 5188 NONAME ; class QColor QColor::toCmyk(void) const
?maximum@QProgressBar@@QBEHXZ @ 5189 NONAME ; int QProgressBar::maximum(void) const
?geometry@QGraphicsLayoutItem@@QBE?AVQRectF@@XZ @ 5190 NONAME ; class QRectF QGraphicsLayoutItem::geometry(void) const
- ?blurRadiusChanged@QGraphicsBlurEffect@@IAEXH@Z @ 5191 NONAME ; void QGraphicsBlurEffect::blurRadiusChanged(int)
+ ?blurRadiusChanged@QGraphicsBlurEffect@@IAEXH@Z @ 5191 NONAME ABSENT ; void QGraphicsBlurEffect::blurRadiusChanged(int)
?qt_metacall@QFontDialog@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 5192 NONAME ; int QFontDialog::qt_metacall(enum QMetaObject::Call, int, void * *)
?layoutSpacing@QStyle@@QBEHW4ControlType@QSizePolicy@@0W4Orientation@Qt@@PBVQStyleOption@@PBVQWidget@@@Z @ 5193 NONAME ; int QStyle::layoutSpacing(enum QSizePolicy::ControlType, enum QSizePolicy::ControlType, enum Qt::Orientation, class QStyleOption const *, class QWidget const *) const
?invalidate@QFormLayout@@UAEXXZ @ 5194 NONAME ; void QFormLayout::invalidate(void)
@@ -5286,7 +5286,7 @@ EXPORTS
?setFontOverline@QTextCharFormat@@QAEX_N@Z @ 5285 NONAME ; void QTextCharFormat::setFontOverline(bool)
?selectedIndexes@QAbstractItemView@@MBE?AV?$QList@VQModelIndex@@@@XZ @ 5286 NONAME ; class QList<class QModelIndex> QAbstractItemView::selectedIndexes(void) const
?addPixmap@QIcon@@QAEXABVQPixmap@@W4Mode@1@W4State@1@@Z @ 5287 NONAME ; void QIcon::addPixmap(class QPixmap const &, enum QIcon::Mode, enum QIcon::State)
- ?blurRadius@QGraphicsBloomEffect@@QBEHXZ @ 5288 NONAME ; int QGraphicsBloomEffect::blurRadius(void) const
+ ?blurRadius@QGraphicsBloomEffect@@QBEHXZ @ 5288 NONAME ABSENT ; int QGraphicsBloomEffect::blurRadius(void) const
?setSortLocaleAware@QSortFilterProxyModel@@QAEX_N@Z @ 5289 NONAME ; void QSortFilterProxyModel::setSortLocaleAware(bool)
?blockCountChanged@QTextControl@@IAEXH@Z @ 5290 NONAME ; void QTextControl::blockCountChanged(int)
?mousePressEvent@QSplashScreen@@MAEXPAVQMouseEvent@@@Z @ 5291 NONAME ; void QSplashScreen::mousePressEvent(class QMouseEvent *)
@@ -5482,7 +5482,7 @@ EXPORTS
?itemData@QComboBox@@QBE?AVQVariant@@HH@Z @ 5481 NONAME ; class QVariant QComboBox::itemData(int, int) const
?RestoreMenuL@QS60MainAppUi@@UAEXPAVCCoeControl@@HW4TMenuType@MEikMenuObserver@@@Z @ 5482 NONAME ; void QS60MainAppUi::RestoreMenuL(class CCoeControl *, int, enum MEikMenuObserver::TMenuType)
?depth@QImage@@QBEHXZ @ 5483 NONAME ; int QImage::depth(void) const
- ?setStrength@QGraphicsGrayscaleEffect@@QAEXM@Z @ 5484 NONAME ; void QGraphicsGrayscaleEffect::setStrength(float)
+ ?setStrength@QGraphicsGrayscaleEffect@@QAEXM@Z @ 5484 NONAME ABSENT ; void QGraphicsGrayscaleEffect::setStrength(float)
?setPasswordCharacter@QLineControl@@QAEXABVQChar@@@Z @ 5485 NONAME ; void QLineControl::setPasswordCharacter(class QChar const &)
?tr@QMdiSubWindow@@SA?AVQString@@PBD0H@Z @ 5486 NONAME ; class QString QMdiSubWindow::tr(char const *, char const *, int)
?currentIndex@QDataWidgetMapper@@QBEHXZ @ 5487 NONAME ; int QDataWidgetMapper::currentIndex(void) const
@@ -5505,7 +5505,7 @@ EXPORTS
?hasFormats@QTextEngine@@QBE_NXZ @ 5504 NONAME ; bool QTextEngine::hasFormats(void) const
?setNumColumns@QTextLine@@QAEXHM@Z @ 5505 NONAME ; void QTextLine::setNumColumns(int, float)
?trUtf8@QPixmapConvolutionFilter@@SA?AVQString@@PBD0H@Z @ 5506 NONAME ; class QString QPixmapConvolutionFilter::trUtf8(char const *, char const *, int)
- ?GetScreenCoordinatesForFepL@QCoeFepInputContext@@UBEXAAVTPoint@@AAH1H@Z @ 5507 NONAME ; void QCoeFepInputContext::GetScreenCoordinatesForFepL(class TPoint &, int &, int &, int) const
+ ?GetScreenCoordinatesForFepL@QCoeFepInputContext@@UBEXAAVTPoint@@AAH1H@Z @ 5507 NONAME ABSENT ; void QCoeFepInputContext::GetScreenCoordinatesForFepL(class TPoint &, int &, int &, int) const
?visualRect@QHeaderView@@MBE?AVQRect@@ABVQModelIndex@@@Z @ 5508 NONAME ; class QRect QHeaderView::visualRect(class QModelIndex const &) const
?minimumSize@QStackedLayout@@UBE?AVQSize@@XZ @ 5509 NONAME ; class QSize QStackedLayout::minimumSize(void) const
?keyPressEvent@QGraphicsView@@MAEXPAVQKeyEvent@@@Z @ 5510 NONAME ; void QGraphicsView::keyPressEvent(class QKeyEvent *)
@@ -5591,7 +5591,7 @@ EXPORTS
??0QDockWidgetLayout@@QAE@PAVQWidget@@@Z @ 5590 NONAME ; QDockWidgetLayout::QDockWidgetLayout(class QWidget *)
?glyphMargin@QTextureGlyphCache@@UBEHXZ @ 5591 NONAME ; int QTextureGlyphCache::glyphMargin(void) const
?isInvisible@QGraphicsItemPrivate@@QBE_NXZ @ 5592 NONAME ; bool QGraphicsItemPrivate::isInvisible(void) const
- ?unregisterGestureRecognizer@QApplication@@QAEXW4GestureType@Qt@@@Z @ 5593 NONAME ; void QApplication::unregisterGestureRecognizer(enum Qt::GestureType)
+ ?unregisterGestureRecognizer@QApplication@@QAEXW4GestureType@Qt@@@Z @ 5593 NONAME ABSENT ; void QApplication::unregisterGestureRecognizer(enum Qt::GestureType)
?removeChild@QGraphicsItemPrivate@@QAEXPAVQGraphicsItem@@@Z @ 5594 NONAME ; void QGraphicsItemPrivate::removeChild(class QGraphicsItem *)
?appendRow@QStandardItemModel@@QAEXABV?$QList@PAVQStandardItem@@@@@Z @ 5595 NONAME ; void QStandardItemModel::appendRow(class QList<class QStandardItem *> const &)
?event@QTableWidget@@MAE_NPAVQEvent@@@Z @ 5596 NONAME ; bool QTableWidget::event(class QEvent *)
@@ -5806,7 +5806,7 @@ EXPORTS
?reset@QMatrix@@QAEXXZ @ 5805 NONAME ; void QMatrix::reset(void)
?qt_metacast@QTabWidget@@UAEPAXPBD@Z @ 5806 NONAME ; void * QTabWidget::qt_metacast(char const *)
?acceptsHoverEvents@QGraphicsItem@@QBE_NXZ @ 5807 NONAME ; bool QGraphicsItem::acceptsHoverEvents(void) const
- ?commitCurrentString@QCoeFepInputContext@@AAEX_N@Z @ 5808 NONAME ; void QCoeFepInputContext::commitCurrentString(bool)
+ ?commitCurrentString@QCoeFepInputContext@@AAEX_N@Z @ 5808 NONAME ABSENT ; void QCoeFepInputContext::commitCurrentString(bool)
?validate@QIntValidator@@UBE?AW4State@QValidator@@AAVQString@@AAH@Z @ 5809 NONAME ; enum QValidator::State QIntValidator::validate(class QString &, int &) const
?itemChange@QGraphicsWidget@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 5810 NONAME ; class QVariant QGraphicsWidget::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &)
?windowFrameEvent@QGraphicsWidget@@MAE_NPAVQEvent@@@Z @ 5811 NONAME ; bool QGraphicsWidget::windowFrameEvent(class QEvent *)
@@ -5827,7 +5827,7 @@ EXPORTS
??0QStyleOptionSizeGrip@@IAE@H@Z @ 5826 NONAME ; QStyleOptionSizeGrip::QStyleOptionSizeGrip(int)
?unsetWindowFrameMargins@QGraphicsWidget@@QAEXXZ @ 5827 NONAME ; void QGraphicsWidget::unsetWindowFrameMargins(void)
?inputMask@QLineEdit@@QBE?AVQString@@XZ @ 5828 NONAME ; class QString QLineEdit::inputMask(void) const
- ?inputCapabilities@QCoeFepInputContext@@QAE?AVTCoeInputCapabilities@@XZ @ 5829 NONAME ; class TCoeInputCapabilities QCoeFepInputContext::inputCapabilities(void)
+ ?inputCapabilities@QCoeFepInputContext@@QAE?AVTCoeInputCapabilities@@XZ @ 5829 NONAME ABSENT ; class TCoeInputCapabilities QCoeFepInputContext::inputCapabilities(void)
?rawValue@QTextLength@@QBEMXZ @ 5830 NONAME ; float QTextLength::rawValue(void) const
?horizontalOffset@QListView@@MBEHXZ @ 5831 NONAME ; int QListView::horizontalOffset(void) const
?tr@QPixmapBlurFilter@@SA?AVQString@@PBD0H@Z @ 5832 NONAME ; class QString QPixmapBlurFilter::tr(char const *, char const *, int)
@@ -6170,7 +6170,7 @@ EXPORTS
?setCurrentSection@QDateTimeEdit@@QAEXW4Section@1@@Z @ 6169 NONAME ; void QDateTimeEdit::setCurrentSection(enum QDateTimeEdit::Section)
?tr@QMenuBar@@SA?AVQString@@PBD0@Z @ 6170 NONAME ; class QString QMenuBar::tr(char const *, char const *)
?setRootIsDecorated@QTreeView@@QAEX_N@Z @ 6171 NONAME ; void QTreeView::setRootIsDecorated(bool)
- ?qt_metacall@QGraphicsGrayscaleEffect@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 6172 NONAME ; int QGraphicsGrayscaleEffect::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QGraphicsGrayscaleEffect@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 6172 NONAME ABSENT ; int QGraphicsGrayscaleEffect::qt_metacall(enum QMetaObject::Call, int, void * *)
?worldMatrixEnabled@QPainter@@QBE_NXZ @ 6173 NONAME ; bool QPainter::worldMatrixEnabled(void) const
??0iterator@QTextBlock@@AAE@PBVQTextDocumentPrivate@@HHH@Z @ 6174 NONAME ; QTextBlock::iterator::iterator(class QTextDocumentPrivate const *, int, int, int)
?isValid@QTextTableCell@@QBE_NXZ @ 6175 NONAME ; bool QTextTableCell::isValid(void) const
@@ -6406,7 +6406,7 @@ EXPORTS
?widgetForAction@QToolBar@@QBEPAVQWidget@@PAVQAction@@@Z @ 6405 NONAME ; class QWidget * QToolBar::widgetForAction(class QAction *) const
?setPos@QGraphicsSceneMouseEvent@@QAEXABVQPointF@@@Z @ 6406 NONAME ; void QGraphicsSceneMouseEvent::setPos(class QPointF const &)
?setSelection@QLineEdit@@QAEXHH@Z @ 6407 NONAME ; void QLineEdit::setSelection(int, int)
- ?d_func@QGraphicsBloomEffect@@ABEPBVQGraphicsBloomEffectPrivate@@XZ @ 6408 NONAME ; class QGraphicsBloomEffectPrivate const * QGraphicsBloomEffect::d_func(void) const
+ ?d_func@QGraphicsBloomEffect@@ABEPBVQGraphicsBloomEffectPrivate@@XZ @ 6408 NONAME ABSENT ; class QGraphicsBloomEffectPrivate const * QGraphicsBloomEffect::d_func(void) const
??1QSortFilterProxyModel@@UAE@XZ @ 6409 NONAME ; QSortFilterProxyModel::~QSortFilterProxyModel(void)
??1QTextBrowser@@UAE@XZ @ 6410 NONAME ; QTextBrowser::~QTextBrowser(void)
?maximumViewportSize@QAbstractScrollArea@@QBE?AVQSize@@XZ @ 6411 NONAME ; class QSize QAbstractScrollArea::maximumViewportSize(void) const
@@ -6576,7 +6576,7 @@ EXPORTS
?activateNextSubWindow@QMdiArea@@QAEXXZ @ 6575 NONAME ; void QMdiArea::activateNextSubWindow(void)
?controlType@QSizePolicy@@QBE?AW4ControlType@1@XZ @ 6576 NONAME ; enum QSizePolicy::ControlType QSizePolicy::controlType(void) const
?rect@QTextLine@@QBE?AVQRectF@@XZ @ 6577 NONAME ; class QRectF QTextLine::rect(void) const
- ?qt_metacall@QGraphicsPixelizeEffect@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 6578 NONAME ; int QGraphicsPixelizeEffect::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QGraphicsPixelizeEffect@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 6578 NONAME ABSENT ; int QGraphicsPixelizeEffect::qt_metacall(enum QMetaObject::Call, int, void * *)
?question@QMessageBox@@SA?AW4StandardButton@1@PAVQWidget@@ABVQString@@1V?$QFlags@W4StandardButton@QMessageBox@@@@W421@@Z @ 6579 NONAME ; enum QMessageBox::StandardButton QMessageBox::question(class QWidget *, class QString const &, class QString const &, class QFlags<enum QMessageBox::StandardButton>, enum QMessageBox::StandardButton)
?symbianResourceChange@QApplicationPrivate@@QAEHH@Z @ 6580 NONAME ; int QApplicationPrivate::symbianResourceChange(int)
??6@YA?AVQDebug@@V0@ABVQPainterPath@@@Z @ 6581 NONAME ; class QDebug operator<<(class QDebug, class QPainterPath const &)
@@ -6608,7 +6608,7 @@ EXPORTS
?quality@QPictureIO@@QBEHXZ @ 6607 NONAME ; int QPictureIO::quality(void) const
?tr@QLineControl@@SA?AVQString@@PBD0@Z @ 6608 NONAME ; class QString QLineControl::tr(char const *, char const *)
?selectedFont@QFontDialog@@QBE?AVQFont@@XZ @ 6609 NONAME ; class QFont QFontDialog::selectedFont(void) const
- ??1QCoeFepInputContext@@UAE@XZ @ 6610 NONAME ; QCoeFepInputContext::~QCoeFepInputContext(void)
+ ??1QCoeFepInputContext@@UAE@XZ @ 6610 NONAME ABSENT ; QCoeFepInputContext::~QCoeFepInputContext(void)
?q_func@QPaintEngineExPrivate@@AAEPAVQPaintEngineEx@@XZ @ 6611 NONAME ; class QPaintEngineEx * QPaintEngineExPrivate::q_func(void)
?setMatrixEnabled@QPainter@@QAEX_N@Z @ 6612 NONAME ; void QPainter::setMatrixEnabled(bool)
?dateTime@QDateTimeEdit@@QBE?AVQDateTime@@XZ @ 6613 NONAME ; class QDateTime QDateTimeEdit::dateTime(void) const
@@ -6687,7 +6687,7 @@ EXPORTS
?sizeHint@QStyledItemDelegate@@UBE?AVQSize@@ABVQStyleOptionViewItem@@ABVQModelIndex@@@Z @ 6686 NONAME ; class QSize QStyledItemDelegate::sizeHint(class QStyleOptionViewItem const &, class QModelIndex const &) const
?setNameFilters@QFileSystemModel@@QAEXABVQStringList@@@Z @ 6687 NONAME ; void QFileSystemModel::setNameFilters(class QStringList const &)
?installSceneEventFilter@QGraphicsItem@@QAEXPAV1@@Z @ 6688 NONAME ; void QGraphicsItem::installSceneEventFilter(class QGraphicsItem *)
- ?blurRadius@QGraphicsBlurEffect@@QBEHXZ @ 6689 NONAME ; int QGraphicsBlurEffect::blurRadius(void) const
+ ?blurRadius@QGraphicsBlurEffect@@QBEHXZ @ 6689 NONAME ABSENT ; int QGraphicsBlurEffect::blurRadius(void) const
?opaqueArea@QAbstractGraphicsShapeItem@@UBE?AVQPainterPath@@XZ @ 6690 NONAME ; class QPainterPath QAbstractGraphicsShapeItem::opaqueArea(void) const
?eventFilter@QSizeGrip@@MAE_NPAVQObject@@PAVQEvent@@@Z @ 6691 NONAME ; bool QSizeGrip::eventFilter(class QObject *, class QEvent *)
?resizeEvent@QComboBox@@MAEXPAVQResizeEvent@@@Z @ 6692 NONAME ; void QComboBox::resizeEvent(class QResizeEvent *)
@@ -6787,7 +6787,7 @@ EXPORTS
?metaObject@QWidgetAction@@UBEPBUQMetaObject@@XZ @ 6786 NONAME ; struct QMetaObject const * QWidgetAction::metaObject(void) const
??1QInputEvent@@UAE@XZ @ 6787 NONAME ; QInputEvent::~QInputEvent(void)
?freeMemory@QTextEngine@@QAEXXZ @ 6788 NONAME ; void QTextEngine::freeMemory(void)
- ?setRadius@QPixmapBlurFilter@@QAEXH@Z @ 6789 NONAME ; void QPixmapBlurFilter::setRadius(int)
+ ?setRadius@QPixmapBlurFilter@@QAEXH@Z @ 6789 NONAME ABSENT ; void QPixmapBlurFilter::setRadius(int)
?metaObject@QDialogButtonBox@@UBEPBUQMetaObject@@XZ @ 6790 NONAME ; struct QMetaObject const * QDialogButtonBox::metaObject(void) const
?qt_metacall@QWidgetAction@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 6791 NONAME ; int QWidgetAction::qt_metacall(enum QMetaObject::Call, int, void * *)
?addSubWindow@QMdiArea@@QAEPAVQMdiSubWindow@@PAVQWidget@@V?$QFlags@W4WindowType@Qt@@@@@Z @ 6792 NONAME ; class QMdiSubWindow * QMdiArea::addSubWindow(class QWidget *, class QFlags<enum Qt::WindowType>)
@@ -6850,7 +6850,7 @@ EXPORTS
?changeEvent@QSplitter@@MAEXPAVQEvent@@@Z @ 6849 NONAME ; void QSplitter::changeEvent(class QEvent *)
?letterSpacing@QFont@@QBEMXZ @ 6850 NONAME ; float QFont::letterSpacing(void) const
?backgroundMode@QPaintEngineState@@QBE?AW4BGMode@Qt@@XZ @ 6851 NONAME ; enum Qt::BGMode QPaintEngineState::backgroundMode(void) const
- ?staticMetaObject@QCoeFepInputContext@@2UQMetaObject@@B @ 6852 NONAME ; struct QMetaObject const QCoeFepInputContext::staticMetaObject
+ ?staticMetaObject@QCoeFepInputContext@@2UQMetaObject@@B @ 6852 NONAME ABSENT ; struct QMetaObject const QCoeFepInputContext::staticMetaObject
?enterWhatsThisMode@QWhatsThis@@SAXXZ @ 6853 NONAME ; void QWhatsThis::enterWhatsThisMode(void)
?textInteractionFlags@QPlainTextEdit@@QBE?AV?$QFlags@W4TextInteractionFlag@Qt@@@@XZ @ 6854 NONAME ; class QFlags<enum Qt::TextInteractionFlag> QPlainTextEdit::textInteractionFlags(void) const
?addToolBar@QMainWindow@@QAEXPAVQToolBar@@@Z @ 6855 NONAME ; void QMainWindow::addToolBar(class QToolBar *)
@@ -7081,7 +7081,7 @@ EXPORTS
?setAcceptRichText@QTextControl@@QAEX_N@Z @ 7080 NONAME ; void QTextControl::setAcceptRichText(bool)
??0QGraphicsPixmapItem@@QAE@PAVQGraphicsItem@@PAVQGraphicsScene@@@Z @ 7081 NONAME ; QGraphicsPixmapItem::QGraphicsPixmapItem(class QGraphicsItem *, class QGraphicsScene *)
??1TouchPoint@QTouchEvent@@QAE@XZ @ 7082 NONAME ; QTouchEvent::TouchPoint::~TouchPoint(void)
- ??_EQGraphicsPixelizeEffect@@UAE@I@Z @ 7083 NONAME ; QGraphicsPixelizeEffect::~QGraphicsPixelizeEffect(unsigned int)
+ ??_EQGraphicsPixelizeEffect@@UAE@I@Z @ 7083 NONAME ABSENT ; QGraphicsPixelizeEffect::~QGraphicsPixelizeEffect(unsigned int)
?createTLSysExtra@QWidgetPrivate@@QAEXXZ @ 7084 NONAME ; void QWidgetPrivate::createTLSysExtra(void)
?dropEvent@QGraphicsTextItem@@MAEXPAVQGraphicsSceneDragDropEvent@@@Z @ 7085 NONAME ; void QGraphicsTextItem::dropEvent(class QGraphicsSceneDragDropEvent *)
?insertChildren@QTreeWidgetItem@@QAEXHABV?$QList@PAVQTreeWidgetItem@@@@@Z @ 7086 NONAME ; void QTreeWidgetItem::insertChildren(int, class QList<class QTreeWidgetItem *> const &)
@@ -7107,7 +7107,7 @@ EXPORTS
?qt_metacast@QIntValidator@@UAEPAXPBD@Z @ 7106 NONAME ; void * QIntValidator::qt_metacast(char const *)
??K@YA?AVQTransform@@ABV0@M@Z @ 7107 NONAME ; class QTransform operator/(class QTransform const &, float)
?invalidateChildrenSceneTransform@QGraphicsItemPrivate@@QAEXXZ @ 7108 NONAME ; void QGraphicsItemPrivate::invalidateChildrenSceneTransform(void)
- ?trUtf8@QGraphicsBloomEffect@@SA?AVQString@@PBD0H@Z @ 7109 NONAME ; class QString QGraphicsBloomEffect::trUtf8(char const *, char const *, int)
+ ?trUtf8@QGraphicsBloomEffect@@SA?AVQString@@PBD0H@Z @ 7109 NONAME ABSENT ; class QString QGraphicsBloomEffect::trUtf8(char const *, char const *, int)
?metaObject@QTextFrame@@UBEPBUQMetaObject@@XZ @ 7110 NONAME ; struct QMetaObject const * QTextFrame::metaObject(void) const
?hasFormatCached@QTextFormatCollection@@QBE_NABVQTextFormat@@@Z @ 7111 NONAME ; bool QTextFormatCollection::hasFormatCached(class QTextFormat const &) const
?eventFilter@QMenuBar@@MAE_NPAVQObject@@PAVQEvent@@@Z @ 7112 NONAME ; bool QMenuBar::eventFilter(class QObject *, class QEvent *)
@@ -7319,7 +7319,7 @@ EXPORTS
?rowStretch@QGridLayout@@QBEHH@Z @ 7318 NONAME ; int QGridLayout::rowStretch(int) const
?metaObject@QGraphicsTransform@@UBEPBUQMetaObject@@XZ @ 7319 NONAME ; struct QMetaObject const * QGraphicsTransform::metaObject(void) const
?tr@QTableView@@SA?AVQString@@PBD0H@Z @ 7320 NONAME ; class QString QTableView::tr(char const *, char const *, int)
- ?getStaticMetaObject@QGraphicsPixelizeEffect@@SAABUQMetaObject@@XZ @ 7321 NONAME ; struct QMetaObject const & QGraphicsPixelizeEffect::getStaticMetaObject(void)
+ ?getStaticMetaObject@QGraphicsPixelizeEffect@@SAABUQMetaObject@@XZ @ 7321 NONAME ABSENT ; struct QMetaObject const & QGraphicsPixelizeEffect::getStaticMetaObject(void)
?isSelected@QTreeWidgetItem@@QBE_NXZ @ 7322 NONAME ; bool QTreeWidgetItem::isSelected(void) const
?setUrlHandler@QDesktopServices@@SAXABVQString@@PAVQObject@@PBD@Z @ 7323 NONAME ; void QDesktopServices::setUrlHandler(class QString const &, class QObject *, char const *)
?tr@QMdiArea@@SA?AVQString@@PBD0H@Z @ 7324 NONAME ; class QString QMdiArea::tr(char const *, char const *, int)
@@ -7402,7 +7402,7 @@ EXPORTS
?setAutoRepeat@QShortcut@@QAEX_N@Z @ 7401 NONAME ; void QShortcut::setAutoRepeat(bool)
?clearLineData@QTextEngine@@QAEXXZ @ 7402 NONAME ; void QTextEngine::clearLineData(void)
?devType@QPixmap@@UBEHXZ @ 7403 NONAME ; int QPixmap::devType(void) const
- ?update@QCoeFepInputContext@@UAEXXZ @ 7404 NONAME ; void QCoeFepInputContext::update(void)
+ ?update@QCoeFepInputContext@@UAEXXZ @ 7404 NONAME ABSENT ; void QCoeFepInputContext::update(void)
?showSection@QHeaderView@@QAEXH@Z @ 7405 NONAME ; void QHeaderView::showSection(int)
?setDirection@QBoxLayout@@QAEXW4Direction@1@@Z @ 7406 NONAME ; void QBoxLayout::setDirection(enum QBoxLayout::Direction)
?items@QGraphicsScene@@QBE?AV?$QList@PAVQGraphicsItem@@@@ABVQPolygonF@@W4ItemSelectionMode@Qt@@@Z @ 7407 NONAME ; class QList<class QGraphicsItem *> QGraphicsScene::items(class QPolygonF const &, enum Qt::ItemSelectionMode) const
@@ -7557,7 +7557,7 @@ EXPORTS
?setOrientation@QSplitterHandle@@QAEXW4Orientation@Qt@@@Z @ 7556 NONAME ; void QSplitterHandle::setOrientation(enum Qt::Orientation)
?setTabText@QTabBar@@QAEXHABVQString@@@Z @ 7557 NONAME ; void QTabBar::setTabText(int, class QString const &)
?storageLocation@QDesktopServices@@SA?AVQString@@W4StandardLocation@1@@Z @ 7558 NONAME ; class QString QDesktopServices::storageLocation(enum QDesktopServices::StandardLocation)
- ?staticMetaObject@QGraphicsGrayscaleEffect@@2UQMetaObject@@B @ 7559 NONAME ; struct QMetaObject const QGraphicsGrayscaleEffect::staticMetaObject
+ ?staticMetaObject@QGraphicsGrayscaleEffect@@2UQMetaObject@@B @ 7559 NONAME ABSENT ; struct QMetaObject const QGraphicsGrayscaleEffect::staticMetaObject
?setFontWordSpacing@QTextCharFormat@@QAEXM@Z @ 7560 NONAME ; void QTextCharFormat::setFontWordSpacing(float)
??_EQShowEvent@@UAE@I@Z @ 7561 NONAME ; QShowEvent::~QShowEvent(unsigned int)
?tr@QFileSystemModel@@SA?AVQString@@PBD0@Z @ 7562 NONAME ; class QString QFileSystemModel::tr(char const *, char const *)
@@ -7569,7 +7569,7 @@ EXPORTS
?trUtf8@QStandardItemModel@@SA?AVQString@@PBD0H@Z @ 7568 NONAME ; class QString QStandardItemModel::trUtf8(char const *, char const *, int)
?setResizeMode@QListView@@QAEXW4ResizeMode@1@@Z @ 7569 NONAME ; void QListView::setResizeMode(enum QListView::ResizeMode)
??_EQTableWidgetItem@@UAE@I@Z @ 7570 NONAME ; QTableWidgetItem::~QTableWidgetItem(unsigned int)
- ?qt_metacast@QGraphicsBloomEffect@@UAEPAXPBD@Z @ 7571 NONAME ; void * QGraphicsBloomEffect::qt_metacast(char const *)
+ ?qt_metacast@QGraphicsBloomEffect@@UAEPAXPBD@Z @ 7571 NONAME ABSENT ; void * QGraphicsBloomEffect::qt_metacast(char const *)
?mapFromParent@QGraphicsItem@@QBE?AVQPolygonF@@MMMM@Z @ 7572 NONAME ; class QPolygonF QGraphicsItem::mapFromParent(float, float, float, float) const
?tabRect@QTabBar@@QBE?AVQRect@@H@Z @ 7573 NONAME ; class QRect QTabBar::tabRect(int) const
?sizeHint@QAbstractSpinBox@@UBE?AVQSize@@XZ @ 7574 NONAME ; class QSize QAbstractSpinBox::sizeHint(void) const
@@ -7923,8 +7923,8 @@ EXPORTS
?resizeContents@QListView@@IAEXHH@Z @ 7922 NONAME ; void QListView::resizeContents(int, int)
?setStrength@QPixmapColorizeFilter@@QAEXM@Z @ 7923 NONAME ; void QPixmapColorizeFilter::setStrength(float)
??0QStyleOptionTabV3@@QAE@XZ @ 7924 NONAME ; QStyleOptionTabV3::QStyleOptionTabV3(void)
- ?updateHints@QCoeFepInputContext@@AAEX_N@Z @ 7925 NONAME ; void QCoeFepInputContext::updateHints(bool)
- ?StartFepInlineEditL@QCoeFepInputContext@@UAEXABVTDesC16@@HHPBVMFormCustomDraw@@AAVMFepInlineTextFormatRetriever@@AAVMFepPointerEventHandlerDuringInlineEdit@@@Z @ 7926 NONAME ; void QCoeFepInputContext::StartFepInlineEditL(class TDesC16 const &, int, int, class MFormCustomDraw const *, class MFepInlineTextFormatRetriever &, class MFepPointerEventHandlerDuringInlineEdit &)
+ ?updateHints@QCoeFepInputContext@@AAEX_N@Z @ 7925 NONAME ABSENT ; void QCoeFepInputContext::updateHints(bool)
+ ?StartFepInlineEditL@QCoeFepInputContext@@UAEXABVTDesC16@@HHPBVMFormCustomDraw@@AAVMFepInlineTextFormatRetriever@@AAVMFepPointerEventHandlerDuringInlineEdit@@@Z @ 7926 NONAME ABSENT ; void QCoeFepInputContext::StartFepInlineEditL(class TDesC16 const &, int, int, class MFormCustomDraw const *, class MFepInlineTextFormatRetriever &, class MFepPointerEventHandlerDuringInlineEdit &)
?childEvent@QWorkspace@@MAEXPAVQChildEvent@@@Z @ 7927 NONAME ; void QWorkspace::childEvent(class QChildEvent *)
?setMovable@QHeaderView@@QAEX_N@Z @ 7928 NONAME ; void QHeaderView::setMovable(bool)
?trUtf8@QTextList@@SA?AVQString@@PBD0H@Z @ 7929 NONAME ; class QString QTextList::trUtf8(char const *, char const *, int)
@@ -8052,7 +8052,7 @@ EXPORTS
?setFlat@QPushButton@@QAEX_N@Z @ 8051 NONAME ; void QPushButton::setFlat(bool)
?columnAlignment@QGraphicsGridLayout@@QBE?AV?$QFlags@W4AlignmentFlag@Qt@@@@H@Z @ 8052 NONAME ; class QFlags<enum Qt::AlignmentFlag> QGraphicsGridLayout::columnAlignment(int) const
?d_func@QSound@@AAEPAVQSoundPrivate@@XZ @ 8053 NONAME ; class QSoundPrivate * QSound::d_func(void)
- ?strengthChanged@QGraphicsBloomEffect@@IAEXM@Z @ 8054 NONAME ; void QGraphicsBloomEffect::strengthChanged(float)
+ ?strengthChanged@QGraphicsBloomEffect@@IAEXM@Z @ 8054 NONAME ABSENT ; void QGraphicsBloomEffect::strengthChanged(float)
??_0QVector3D@@QAEAAV0@M@Z @ 8055 NONAME ; class QVector3D & QVector3D::operator/=(float)
?currentFrame@iterator@QTextFrame@@QBEPAV2@XZ @ 8056 NONAME ; class QTextFrame * QTextFrame::iterator::currentFrame(void) const
??_EQSplitterHandle@@UAE@I@Z @ 8057 NONAME ; QSplitterHandle::~QSplitterHandle(unsigned int)
@@ -8104,7 +8104,7 @@ EXPORTS
?drawPixmap@QPainter@@QAEXHHABVQPixmap@@HHHH@Z @ 8103 NONAME ; void QPainter::drawPixmap(int, int, class QPixmap const &, int, int, int, int)
?toolTipBase@QPalette@@QBEABVQBrush@@XZ @ 8104 NONAME ; class QBrush const & QPalette::toolTipBase(void) const
?fileInfo@QDirModel@@QBE?AVQFileInfo@@ABVQModelIndex@@@Z @ 8105 NONAME ; class QFileInfo QDirModel::fileInfo(class QModelIndex const &) const
- ?blurHintChanged@QGraphicsBloomEffect@@IAEXW4RenderHint@Qt@@@Z @ 8106 NONAME ; void QGraphicsBloomEffect::blurHintChanged(enum Qt::RenderHint)
+ ?blurHintChanged@QGraphicsBloomEffect@@IAEXW4RenderHint@Qt@@@Z @ 8106 NONAME ABSENT ; void QGraphicsBloomEffect::blurHintChanged(enum Qt::RenderHint)
?putPoints@QPolygon@@QAEXHHABV1@H@Z @ 8107 NONAME ; void QPolygon::putPoints(int, int, class QPolygon const &, int)
??1QDragMoveEvent@@UAE@XZ @ 8108 NONAME ; QDragMoveEvent::~QDragMoveEvent(void)
?intProperty@QTextFormat@@QBEHH@Z @ 8109 NONAME ; int QTextFormat::intProperty(int) const
@@ -8218,7 +8218,7 @@ EXPORTS
?isRightToLeft@QWidget@@QBE_NXZ @ 8217 NONAME ; bool QWidget::isRightToLeft(void) const
?updateNeeded@QLineControl@@IAEXABVQRect@@@Z @ 8218 NONAME ; void QLineControl::updateNeeded(class QRect const &)
?trUtf8@QSplitter@@SA?AVQString@@PBD0H@Z @ 8219 NONAME ; class QString QSplitter::trUtf8(char const *, char const *, int)
- ?mouseHandler@QCoeFepInputContext@@UAEXHPAVQMouseEvent@@@Z @ 8220 NONAME ; void QCoeFepInputContext::mouseHandler(int, class QMouseEvent *)
+ ?mouseHandler@QCoeFepInputContext@@UAEXHPAVQMouseEvent@@@Z @ 8220 NONAME ABSENT ; void QCoeFepInputContext::mouseHandler(int, class QMouseEvent *)
??0QGraphicsPathItem@@QAE@PAVQGraphicsItem@@PAVQGraphicsScene@@@Z @ 8221 NONAME ; QGraphicsPathItem::QGraphicsPathItem(class QGraphicsItem *, class QGraphicsScene *)
?d_func@QAbstractSpinBox@@AAEPAVQAbstractSpinBoxPrivate@@XZ @ 8222 NONAME ; class QAbstractSpinBoxPrivate * QAbstractSpinBox::d_func(void)
??6@YA?AVQDebug@@V0@PAVQGraphicsObject@@@Z @ 8223 NONAME ; class QDebug operator<<(class QDebug, class QGraphicsObject *)
@@ -8250,7 +8250,7 @@ EXPORTS
?stacks@QUndoGroup@@QBE?AV?$QList@PAVQUndoStack@@@@XZ @ 8249 NONAME ; class QList<class QUndoStack *> QUndoGroup::stacks(void) const
?naturalTextWidth@QTextLine@@QBEMXZ @ 8250 NONAME ; float QTextLine::naturalTextWidth(void) const
?atSpace@QTextEngine@@QBE_NH@Z @ 8251 NONAME ; bool QTextEngine::atSpace(int) const
- ?CancelFepInlineEdit@QCoeFepInputContext@@UAEXXZ @ 8252 NONAME ; void QCoeFepInputContext::CancelFepInlineEdit(void)
+ ?CancelFepInlineEdit@QCoeFepInputContext@@UAEXXZ @ 8252 NONAME ABSENT ; void QCoeFepInputContext::CancelFepInlineEdit(void)
?syncBackingStore@QWidgetPrivate@@QAEXXZ @ 8253 NONAME ; void QWidgetPrivate::syncBackingStore(void)
?setHorizontalPolicy@QSizePolicy@@QAEXW4Policy@1@@Z @ 8254 NONAME ; void QSizePolicy::setHorizontalPolicy(enum QSizePolicy::Policy)
?filter@QDirModel@@QBE?AV?$QFlags@W4Filter@QDir@@@@XZ @ 8255 NONAME ; class QFlags<enum QDir::Filter> QDirModel::filter(void) const
@@ -8270,7 +8270,7 @@ EXPORTS
?setTransform@QGraphicsItem@@QAEXABVQTransform@@_N@Z @ 8269 NONAME ; void QGraphicsItem::setTransform(class QTransform const &, bool)
?expand@QTreeView@@QAEXABVQModelIndex@@@Z @ 8270 NONAME ; void QTreeView::expand(class QModelIndex const &)
?setParentItem@QGraphicsItem@@QAEXPAV1@@Z @ 8271 NONAME ; void QGraphicsItem::setParentItem(class QGraphicsItem *)
- ?GetFormatForFep@QCoeFepInputContext@@UBEXAAVTCharFormat@@H@Z @ 8272 NONAME ; void QCoeFepInputContext::GetFormatForFep(class TCharFormat &, int) const
+ ?GetFormatForFep@QCoeFepInputContext@@UBEXAAVTCharFormat@@H@Z @ 8272 NONAME ABSENT ; void QCoeFepInputContext::GetFormatForFep(class TCharFormat &, int) const
?setSizeConstraint@QLayout@@QAEXW4SizeConstraint@1@@Z @ 8273 NONAME ; void QLayout::setSizeConstraint(enum QLayout::SizeConstraint)
??5@YAAAVQDataStream@@AAV0@AAVQPicture@@@Z @ 8274 NONAME ; class QDataStream & operator>>(class QDataStream &, class QPicture &)
?atEnd@QTextCursor@@QBE_NXZ @ 8275 NONAME ; bool QTextCursor::atEnd(void) const
@@ -8299,7 +8299,7 @@ EXPORTS
?setPixelSize@QFont@@QAEXH@Z @ 8298 NONAME ; void QFont::setPixelSize(int)
?setBottomMargin@QTextFrameFormat@@QAEXM@Z @ 8299 NONAME ; void QTextFrameFormat::setBottomMargin(float)
?minimumDate@QCalendarWidget@@QBE?AVQDate@@XZ @ 8300 NONAME ; class QDate QCalendarWidget::minimumDate(void) const
- ?setBlurRadius@QGraphicsDropShadowEffect@@QAEXH@Z @ 8301 NONAME ; void QGraphicsDropShadowEffect::setBlurRadius(int)
+ ?setBlurRadius@QGraphicsDropShadowEffect@@QAEXH@Z @ 8301 NONAME ABSENT ; void QGraphicsDropShadowEffect::setBlurRadius(int)
?setMask@QPixmapData@@UAEXABVQBitmap@@@Z @ 8302 NONAME ; void QPixmapData::setMask(class QBitmap const &)
?drawPie@QPainter@@QAEXABVQRectF@@HH@Z @ 8303 NONAME ; void QPainter::drawPie(class QRectF const &, int, int)
?supportsExtension@QGraphicsPolygonItem@@MBE_NW4Extension@QGraphicsItem@@@Z @ 8304 NONAME ; bool QGraphicsPolygonItem::supportsExtension(enum QGraphicsItem::Extension) const
@@ -8539,7 +8539,7 @@ EXPORTS
?resolveSymlinks@QFileDialog@@QBE_NXZ @ 8538 NONAME ; bool QFileDialog::resolveSymlinks(void) const
?d_func@QGraphicsTransform@@ABEPBVQGraphicsTransformPrivate@@XZ @ 8539 NONAME ; class QGraphicsTransformPrivate const * QGraphicsTransform::d_func(void) const
?verticalStretch@QSizePolicy@@QBEHXZ @ 8540 NONAME ; int QSizePolicy::verticalStretch(void) const
- ?pixelSize@QGraphicsPixelizeEffect@@QBEHXZ @ 8541 NONAME ; int QGraphicsPixelizeEffect::pixelSize(void) const
+ ?pixelSize@QGraphicsPixelizeEffect@@QBEHXZ @ 8541 NONAME ABSENT ; int QGraphicsPixelizeEffect::pixelSize(void) const
?time@QDateTimeEdit@@QBE?AVQTime@@XZ @ 8542 NONAME ; class QTime QDateTimeEdit::time(void) const
?buttonDownScenePos@QGraphicsSceneMouseEvent@@QBE?AVQPointF@@W4MouseButton@Qt@@@Z @ 8543 NONAME ; class QPointF QGraphicsSceneMouseEvent::buttonDownScenePos(enum Qt::MouseButton) const
?map@QMatrix@@QBEXMMPAM0@Z @ 8544 NONAME ; void QMatrix::map(float, float, float *, float *) const
@@ -8599,7 +8599,7 @@ EXPORTS
?isResize@QWidgetResizeHandler@@ABE_NXZ @ 8598 NONAME ; bool QWidgetResizeHandler::isResize(void) const
?setWrapping@QListView@@QAEX_N@Z @ 8599 NONAME ; void QListView::setWrapping(bool)
??0QTextTableCellFormat@@IAE@ABVQTextFormat@@@Z @ 8600 NONAME ; QTextTableCellFormat::QTextTableCellFormat(class QTextFormat const &)
- ?queueInputCapabilitiesChanged@QCoeFepInputContext@@AAEXXZ @ 8601 NONAME ; void QCoeFepInputContext::queueInputCapabilitiesChanged(void)
+ ?queueInputCapabilitiesChanged@QCoeFepInputContext@@AAEXXZ @ 8601 NONAME ABSENT ; void QCoeFepInputContext::queueInputCapabilitiesChanged(void)
??4QPixmap@@QAEAAV0@ABV0@@Z @ 8602 NONAME ; class QPixmap & QPixmap::operator=(class QPixmap const &)
??0QTextCursor@@QAE@PAVQTextDocumentPrivate@@H@Z @ 8603 NONAME ; QTextCursor::QTextCursor(class QTextDocumentPrivate *, int)
??0QStyleOptionRubberBand@@QAE@XZ @ 8604 NONAME ; QStyleOptionRubberBand::QStyleOptionRubberBand(void)
@@ -8753,7 +8753,7 @@ EXPORTS
?standardFormat@QInputContext@@QBE?AVQTextFormat@@W4StandardFormat@1@@Z @ 8752 NONAME ; class QTextFormat QInputContext::standardFormat(enum QInputContext::StandardFormat) const
??_EQStandardItemModel@@UAE@I@Z @ 8753 NONAME ; QStandardItemModel::~QStandardItemModel(unsigned int)
?d_func@QPainterPathStroker@@AAEPAVQPainterPathStrokerPrivate@@XZ @ 8754 NONAME ; class QPainterPathStrokerPrivate * QPainterPathStroker::d_func(void)
- ?trUtf8@QGraphicsPixelizeEffect@@SA?AVQString@@PBD0H@Z @ 8755 NONAME ; class QString QGraphicsPixelizeEffect::trUtf8(char const *, char const *, int)
+ ?trUtf8@QGraphicsPixelizeEffect@@SA?AVQString@@PBD0H@Z @ 8755 NONAME ABSENT ; class QString QGraphicsPixelizeEffect::trUtf8(char const *, char const *, int)
?takeLayout@QWidget@@AAEPAVQLayout@@XZ @ 8756 NONAME ; class QLayout * QWidget::takeLayout(void)
?offset@QPanGesture@@QBE?AVQPointF@@XZ @ 8757 NONAME ; class QPointF QPanGesture::offset(void) const
?tightBoundingRect@QFontMetrics@@QBE?AVQRect@@ABVQString@@@Z @ 8758 NONAME ; class QRect QFontMetrics::tightBoundingRect(class QString const &) const
@@ -8917,7 +8917,7 @@ EXPORTS
?offset@QWindowSurface@@UBE?AVQPoint@@PBVQWidget@@@Z @ 8916 NONAME ; class QPoint QWindowSurface::offset(class QWidget const *) const
?d_func@QFileIconProvider@@ABEPBVQFileIconProviderPrivate@@XZ @ 8917 NONAME ; class QFileIconProviderPrivate const * QFileIconProvider::d_func(void) const
??0QDateTimeEdit@@QAE@ABVQDateTime@@PAVQWidget@@@Z @ 8918 NONAME ; QDateTimeEdit::QDateTimeEdit(class QDateTime const &, class QWidget *)
- ?d_func@QGraphicsGrayscaleEffect@@ABEPBVQGraphicsGrayscaleEffectPrivate@@XZ @ 8919 NONAME ; class QGraphicsGrayscaleEffectPrivate const * QGraphicsGrayscaleEffect::d_func(void) const
+ ?d_func@QGraphicsGrayscaleEffect@@ABEPBVQGraphicsGrayscaleEffectPrivate@@XZ @ 8919 NONAME ABSENT ; class QGraphicsGrayscaleEffectPrivate const * QGraphicsGrayscaleEffect::d_func(void) const
?testOption@QColorDialog@@QBE_NW4ColorDialogOption@1@@Z @ 8920 NONAME ; bool QColorDialog::testOption(enum QColorDialog::ColorDialogOption) const
?setWSGeometry@QWidgetPrivate@@QAEX_NABVQRect@@@Z @ 8921 NONAME ; void QWidgetPrivate::setWSGeometry(bool, class QRect const &)
?inputMethodEvent@QPlainTextEdit@@MAEXPAVQInputMethodEvent@@@Z @ 8922 NONAME ; void QPlainTextEdit::inputMethodEvent(class QInputMethodEvent *)
@@ -8963,7 +8963,7 @@ EXPORTS
?event@QStatusBar@@MAE_NPAVQEvent@@@Z @ 8962 NONAME ; bool QStatusBar::event(class QEvent *)
?anchorAt@QTextControl@@QBE?AVQString@@ABVQPointF@@@Z @ 8963 NONAME ; class QString QTextControl::anchorAt(class QPointF const &) const
?restart@QWizard@@QAEXXZ @ 8964 NONAME ; void QWizard::restart(void)
- ?hasCacheHint@QVectorPath@@QBE_NXZ @ 8965 NONAME ; bool QVectorPath::hasCacheHint(void) const
+ ?hasCacheHint@QVectorPath@@QBE_NXZ @ 8965 NONAME ABSENT ; bool QVectorPath::hasCacheHint(void) const
?setUnifiedTitleAndToolBarOnMac@QMainWindow@@QAEX_N@Z @ 8966 NONAME ; void QMainWindow::setUnifiedTitleAndToolBarOnMac(bool)
?setGeometry@QGridLayout@@UAEXABVQRect@@@Z @ 8967 NONAME ; void QGridLayout::setGeometry(class QRect const &)
?qDrawPixmaps@@YAXPAVQPainter@@PBUData@QDrawPixmaps@@HABVQPixmap@@V?$QFlags@W4DrawingHint@QDrawPixmaps@@@@@Z @ 8968 NONAME ; void qDrawPixmaps(class QPainter *, struct QDrawPixmaps::Data const *, int, class QPixmap const &, class QFlags<enum QDrawPixmaps::DrawingHint>)
@@ -8987,7 +8987,7 @@ EXPORTS
?d_func@QGraphicsLinearLayout@@AAEPAVQGraphicsLinearLayoutPrivate@@XZ @ 8986 NONAME ; class QGraphicsLinearLayoutPrivate * QGraphicsLinearLayout::d_func(void)
?staticMetaObject@QTextControl@@2UQMetaObject@@B @ 8987 NONAME ; struct QMetaObject const QTextControl::staticMetaObject
??_EQClipboardEvent@@UAE@I@Z @ 8988 NONAME ; QClipboardEvent::~QClipboardEvent(unsigned int)
- ?draw@QGraphicsGrayscaleEffect@@MAEXPAVQPainter@@PAVQGraphicsEffectSource@@@Z @ 8989 NONAME ; void QGraphicsGrayscaleEffect::draw(class QPainter *, class QGraphicsEffectSource *)
+ ?draw@QGraphicsGrayscaleEffect@@MAEXPAVQPainter@@PAVQGraphicsEffectSource@@@Z @ 8989 NONAME ABSENT ; void QGraphicsGrayscaleEffect::draw(class QPainter *, class QGraphicsEffectSource *)
?tr@QGraphicsScene@@SA?AVQString@@PBD0H@Z @ 8990 NONAME ; class QString QGraphicsScene::tr(char const *, char const *, int)
?handle@QCursor@@QBEKXZ @ 8991 NONAME ; unsigned long QCursor::handle(void) const
?qt_metacast@QRadioButton@@UAEPAXPBD@Z @ 8992 NONAME ; void * QRadioButton::qt_metacast(char const *)
@@ -9068,7 +9068,7 @@ EXPORTS
?indexFromItem@QStandardItemModel@@QBE?AVQModelIndex@@PBVQStandardItem@@@Z @ 9067 NONAME ; class QModelIndex QStandardItemModel::indexFromItem(class QStandardItem const *) const
?scene@QGraphicsItem@@QBEPAVQGraphicsScene@@XZ @ 9068 NONAME ; class QGraphicsScene * QGraphicsItem::scene(void) const
??0QListWidget@@QAE@PAVQWidget@@@Z @ 9069 NONAME ; QListWidget::QListWidget(class QWidget *)
- ?qt_metacall@QGraphicsBloomEffect@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 9070 NONAME ; int QGraphicsBloomEffect::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QGraphicsBloomEffect@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 9070 NONAME ABSENT ; int QGraphicsBloomEffect::qt_metacall(enum QMetaObject::Call, int, void * *)
?qt_metacast@QShortcut@@UAEPAXPBD@Z @ 9071 NONAME ; void * QShortcut::qt_metacast(char const *)
??0QTextLayout@@AAE@PAVQTextEngine@@@Z @ 9072 NONAME ; QTextLayout::QTextLayout(class QTextEngine *)
?hasProperty@QTextFormat@@QBE_NH@Z @ 9073 NONAME ; bool QTextFormat::hasProperty(int) const
@@ -9273,7 +9273,7 @@ EXPORTS
??1QPixmapFilter@@UAE@XZ @ 9272 NONAME ; QPixmapFilter::~QPixmapFilter(void)
?setTabWhatsThis@QTabWidget@@QAEXHABVQString@@@Z @ 9273 NONAME ; void QTabWidget::setTabWhatsThis(int, class QString const &)
?setTitleBarWidget@QDockWidget@@QAEXPAVQWidget@@@Z @ 9274 NONAME ; void QDockWidget::setTitleBarWidget(class QWidget *)
- ?DocumentMaximumLengthForFep@QCoeFepInputContext@@UBEHXZ @ 9275 NONAME ; int QCoeFepInputContext::DocumentMaximumLengthForFep(void) const
+ ?DocumentMaximumLengthForFep@QCoeFepInputContext@@UBEHXZ @ 9275 NONAME ABSENT ; int QCoeFepInputContext::DocumentMaximumLengthForFep(void) const
?decideFormatFromContent@QImageReader@@QBE_NXZ @ 9276 NONAME ; bool QImageReader::decideFormatFromContent(void) const
?trUtf8@QPixmapColorizeFilter@@SA?AVQString@@PBD0@Z @ 9277 NONAME ; class QString QPixmapColorizeFilter::trUtf8(char const *, char const *)
?removeFromGroup@QGraphicsItemGroup@@QAEXPAVQGraphicsItem@@@Z @ 9278 NONAME ; void QGraphicsItemGroup::removeFromGroup(class QGraphicsItem *)
@@ -9357,7 +9357,7 @@ EXPORTS
?toVector2D@QVector3D@@QBE?AVQVector2D@@XZ @ 9356 NONAME ; class QVector2D QVector3D::toVector2D(void) const
?stackBefore@QGraphicsItem@@QAEXPBV1@@Z @ 9357 NONAME ; void QGraphicsItem::stackBefore(class QGraphicsItem const *)
?sizeHintForColumn@QTreeView@@MBEHH@Z @ 9358 NONAME ; int QTreeView::sizeHintForColumn(int) const
- ?widgetDestroyed@QCoeFepInputContext@@UAEXPAVQWidget@@@Z @ 9359 NONAME ; void QCoeFepInputContext::widgetDestroyed(class QWidget *)
+ ?widgetDestroyed@QCoeFepInputContext@@UAEXPAVQWidget@@@Z @ 9359 NONAME ABSENT ; void QCoeFepInputContext::widgetDestroyed(class QWidget *)
?staticMetaObject@QPushButton@@2UQMetaObject@@B @ 9360 NONAME ; struct QMetaObject const QPushButton::staticMetaObject
?xHeight@QFontEngine@@UBE?AUQFixed@@XZ @ 9361 NONAME ; struct QFixed QFontEngine::xHeight(void) const
?setItemIcon@QToolBox@@QAEXHABVQIcon@@@Z @ 9362 NONAME ; void QToolBox::setItemIcon(int, class QIcon const &)
@@ -9495,7 +9495,7 @@ EXPORTS
?visualIndex@QTreeView@@ABEHABVQModelIndex@@@Z @ 9494 NONAME ; int QTreeView::visualIndex(class QModelIndex const &) const
?tr@QVBoxLayout@@SA?AVQString@@PBD0@Z @ 9495 NONAME ; class QString QVBoxLayout::tr(char const *, char const *)
??0QCheckBox@@QAE@ABVQString@@PAVQWidget@@@Z @ 9496 NONAME ; QCheckBox::QCheckBox(class QString const &, class QWidget *)
- ?d_func@QGraphicsGrayscaleEffect@@AAEPAVQGraphicsGrayscaleEffectPrivate@@XZ @ 9497 NONAME ; class QGraphicsGrayscaleEffectPrivate * QGraphicsGrayscaleEffect::d_func(void)
+ ?d_func@QGraphicsGrayscaleEffect@@AAEPAVQGraphicsGrayscaleEffectPrivate@@XZ @ 9497 NONAME ABSENT ; class QGraphicsGrayscaleEffectPrivate * QGraphicsGrayscaleEffect::d_func(void)
?trUtf8@QAction@@SA?AVQString@@PBD0H@Z @ 9498 NONAME ; class QString QAction::trUtf8(char const *, char const *, int)
?staticMetaObject@QGraphicsOpacityEffect@@2UQMetaObject@@B @ 9499 NONAME ; struct QMetaObject const QGraphicsOpacityEffect::staticMetaObject
?items@QGraphicsScene@@QBE?AV?$QList@PAVQGraphicsItem@@@@MMMMW4ItemSelectionMode@Qt@@W4SortOrder@4@ABVQTransform@@@Z @ 9500 NONAME ; class QList<class QGraphicsItem *> QGraphicsScene::items(float, float, float, float, enum Qt::ItemSelectionMode, enum Qt::SortOrder, class QTransform const &) const
@@ -9549,7 +9549,7 @@ EXPORTS
?done@QDialog@@UAEXH@Z @ 9548 NONAME ; void QDialog::done(int)
?widgetAt@QApplication@@SAPAVQWidget@@HH@Z @ 9549 NONAME ; class QWidget * QApplication::widgetAt(int, int)
??_EQTextFrameLayoutData@@UAE@I@Z @ 9550 NONAME ; QTextFrameLayoutData::~QTextFrameLayoutData(unsigned int)
- ??0QGraphicsPixelizeEffect@@QAE@PAVQObject@@@Z @ 9551 NONAME ; QGraphicsPixelizeEffect::QGraphicsPixelizeEffect(class QObject *)
+ ??0QGraphicsPixelizeEffect@@QAE@PAVQObject@@@Z @ 9551 NONAME ABSENT ; QGraphicsPixelizeEffect::QGraphicsPixelizeEffect(class QObject *)
?frameChanged@QMovie@@IAEXH@Z @ 9552 NONAME ; void QMovie::frameChanged(int)
?geometry@QWidgetItem@@UBE?AVQRect@@XZ @ 9553 NONAME ; class QRect QWidgetItem::geometry(void) const
??0QTextFrame@@IAE@AAVQTextFramePrivate@@PAVQTextDocument@@@Z @ 9554 NONAME ; QTextFrame::QTextFrame(class QTextFramePrivate &, class QTextDocument *)
@@ -9606,7 +9606,7 @@ EXPORTS
?textDirection@QProgressBar@@QAE?AW4Direction@1@XZ @ 9605 NONAME ; enum QProgressBar::Direction QProgressBar::textDirection(void)
?unpolish@QStyle@@UAEXPAVQApplication@@@Z @ 9606 NONAME ; void QStyle::unpolish(class QApplication *)
?redo@QPlainTextEdit@@QAEXXZ @ 9607 NONAME ; void QPlainTextEdit::redo(void)
- ?SetInlineEditingCursorVisibilityL@QCoeFepInputContext@@UAEXH@Z @ 9608 NONAME ; void QCoeFepInputContext::SetInlineEditingCursorVisibilityL(int)
+ ?SetInlineEditingCursorVisibilityL@QCoeFepInputContext@@UAEXH@Z @ 9608 NONAME ABSENT ; void QCoeFepInputContext::SetInlineEditingCursorVisibilityL(int)
??6@YA?AVQDebug@@V0@V?$QFlags@W4StateFlag@QStyle@@@@@Z @ 9609 NONAME ; class QDebug operator<<(class QDebug, class QFlags<enum QStyle::StateFlag>)
?test@Parser@QCss@@QAE_NW4TokenType@2@@Z @ 9610 NONAME ; bool QCss::Parser::test(enum QCss::TokenType)
?alignment@QTextBlockFormat@@QBE?AV?$QFlags@W4AlignmentFlag@Qt@@@@XZ @ 9611 NONAME ; class QFlags<enum Qt::AlignmentFlag> QTextBlockFormat::alignment(void) const
@@ -9712,7 +9712,7 @@ EXPORTS
?d_func@QListWidget@@AAEPAVQListWidgetPrivate@@XZ @ 9711 NONAME ; class QListWidgetPrivate * QListWidget::d_func(void)
??1QMessageBox@@UAE@XZ @ 9712 NONAME ; QMessageBox::~QMessageBox(void)
?paintOnScreen@QWidgetPrivate@@QBE_NXZ @ 9713 NONAME ; bool QWidgetPrivate::paintOnScreen(void) const
- ?trUtf8@QCoeFepInputContext@@SA?AVQString@@PBD0H@Z @ 9714 NONAME ; class QString QCoeFepInputContext::trUtf8(char const *, char const *, int)
+ ?trUtf8@QCoeFepInputContext@@SA?AVQString@@PBD0H@Z @ 9714 NONAME ABSENT ; class QString QCoeFepInputContext::trUtf8(char const *, char const *, int)
?setCorrectionMode@QAbstractSpinBox@@QAEXW4CorrectionMode@1@@Z @ 9715 NONAME ; void QAbstractSpinBox::setCorrectionMode(enum QAbstractSpinBox::CorrectionMode)
?translate@QPolygon@@QAEXABVQPoint@@@Z @ 9716 NONAME ; void QPolygon::translate(class QPoint const &)
??0QTextBrowser@@QAE@PAVQWidget@@@Z @ 9717 NONAME ; QTextBrowser::QTextBrowser(class QWidget *)
@@ -9732,7 +9732,7 @@ EXPORTS
?setItemDelegate@QDataWidgetMapper@@QAEXPAVQAbstractItemDelegate@@@Z @ 9731 NONAME ; void QDataWidgetMapper::setItemDelegate(class QAbstractItemDelegate *)
?timerEvent@QAbstractSlider@@MAEXPAVQTimerEvent@@@Z @ 9732 NONAME ; void QAbstractSlider::timerEvent(class QTimerEvent *)
?helpRequested@QWizard@@IAEXXZ @ 9733 NONAME ; void QWizard::helpRequested(void)
- ?registerGestureRecognizer@QApplication@@QAE?AW4GestureType@Qt@@PAVQGestureRecognizer@@@Z @ 9734 NONAME ; enum Qt::GestureType QApplication::registerGestureRecognizer(class QGestureRecognizer *)
+ ?registerGestureRecognizer@QApplication@@QAE?AW4GestureType@Qt@@PAVQGestureRecognizer@@@Z @ 9734 NONAME ABSENT ; enum Qt::GestureType QApplication::registerGestureRecognizer(class QGestureRecognizer *)
??0QTableWidgetItem@@QAE@ABVQIcon@@ABVQString@@H@Z @ 9735 NONAME ; QTableWidgetItem::QTableWidgetItem(class QIcon const &, class QString const &, int)
?validatePage@QWizardPage@@UAE_NXZ @ 9736 NONAME ; bool QWizardPage::validatePage(void)
?itemCollapsed@QTreeWidget@@IAEXPAVQTreeWidgetItem@@@Z @ 9737 NONAME ; void QTreeWidget::itemCollapsed(class QTreeWidgetItem *)
@@ -9740,7 +9740,7 @@ EXPORTS
?contains@QGraphicsPixmapItem@@UBE_NABVQPointF@@@Z @ 9739 NONAME ; bool QGraphicsPixmapItem::contains(class QPointF const &) const
??1QTextTableFormat@@QAE@XZ @ 9740 NONAME ; QTextTableFormat::~QTextTableFormat(void)
?qt_metacall@QGraphicsScene@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 9741 NONAME ; int QGraphicsScene::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?strength@QGraphicsGrayscaleEffect@@QBEMXZ @ 9742 NONAME ; float QGraphicsGrayscaleEffect::strength(void) const
+ ?strength@QGraphicsGrayscaleEffect@@QBEMXZ @ 9742 NONAME ABSENT ; float QGraphicsGrayscaleEffect::strength(void) const
??1QStyleOptionDockWidget@@QAE@XZ @ 9743 NONAME ; QStyleOptionDockWidget::~QStyleOptionDockWidget(void)
?horizontalScrollBarPolicy@QAbstractScrollArea@@QBE?AW4ScrollBarPolicy@Qt@@XZ @ 9744 NONAME ; enum Qt::ScrollBarPolicy QAbstractScrollArea::horizontalScrollBarPolicy(void) const
?contextMenuEvent@QScrollBar@@MAEXPAVQContextMenuEvent@@@Z @ 9745 NONAME ; void QScrollBar::contextMenuEvent(class QContextMenuEvent *)
@@ -9771,7 +9771,7 @@ EXPORTS
?setPrefix@QDoubleSpinBox@@QAEXABVQString@@@Z @ 9770 NONAME ; void QDoubleSpinBox::setPrefix(class QString const &)
?metaObject@QRadioButton@@UBEPBUQMetaObject@@XZ @ 9771 NONAME ; struct QMetaObject const * QRadioButton::metaObject(void) const
??1QTabWidget@@UAE@XZ @ 9772 NONAME ; QTabWidget::~QTabWidget(void)
- ?setBrightness@QGraphicsBloomEffect@@QAEXH@Z @ 9773 NONAME ; void QGraphicsBloomEffect::setBrightness(int)
+ ?setBrightness@QGraphicsBloomEffect@@QAEXH@Z @ 9773 NONAME ABSENT ; void QGraphicsBloomEffect::setBrightness(int)
?detach@QRegion@@AAEXXZ @ 9774 NONAME ; void QRegion::detach(void)
?d_func@QPixmapColorizeFilter@@ABEPBVQPixmapColorizeFilterPrivate@@XZ @ 9775 NONAME ; class QPixmapColorizeFilterPrivate const * QPixmapColorizeFilter::d_func(void) const
?currentIndex@QTabWidget@@QBEHXZ @ 9776 NONAME ; int QTabWidget::currentIndex(void) const
@@ -9800,14 +9800,14 @@ EXPORTS
?staticMetaObject@QLCDNumber@@2UQMetaObject@@B @ 9799 NONAME ; struct QMetaObject const QLCDNumber::staticMetaObject
?items@QListWidget@@IBE?AV?$QList@PAVQListWidgetItem@@@@PBVQMimeData@@@Z @ 9800 NONAME ; class QList<class QListWidgetItem *> QListWidget::items(class QMimeData const *) const
?qt_metacast@QAbstractItemDelegate@@UAEPAXPBD@Z @ 9801 NONAME ; void * QAbstractItemDelegate::qt_metacast(char const *)
- ?radius@QPixmapBlurFilter@@QBEHXZ @ 9802 NONAME ; int QPixmapBlurFilter::radius(void) const
+ ?radius@QPixmapBlurFilter@@QBEHXZ @ 9802 NONAME ABSENT ; int QPixmapBlurFilter::radius(void) const
?clearSubFocus@QGraphicsItemPrivate@@QAEXPAVQGraphicsItem@@@Z @ 9803 NONAME ; void QGraphicsItemPrivate::clearSubFocus(class QGraphicsItem *)
??_EQPlainTextDocumentLayout@@UAE@I@Z @ 9804 NONAME ; QPlainTextDocumentLayout::~QPlainTextDocumentLayout(unsigned int)
?nodeNameEquals@StyleSelector@QCss@@UBE_NTNodePtr@12@ABVQString@@@Z @ 9805 NONAME ; bool QCss::StyleSelector::nodeNameEquals(union QCss::StyleSelector::NodePtr, class QString const &) const
?widthF@QPen@@QBEMXZ @ 9806 NONAME ; float QPen::widthF(void) const
?mouseMoveEvent@QAbstractItemView@@MAEXPAVQMouseEvent@@@Z @ 9807 NONAME ; void QAbstractItemView::mouseMoveEvent(class QMouseEvent *)
?styleHint@QWindowsStyle@@UBEHW4StyleHint@QStyle@@PBVQStyleOption@@PBVQWidget@@PAVQStyleHintReturn@@@Z @ 9808 NONAME ; int QWindowsStyle::styleHint(enum QStyle::StyleHint, class QStyleOption const *, class QWidget const *, class QStyleHintReturn *) const
- ?SetCursorSelectionForFepL@QCoeFepInputContext@@UAEXABVTCursorSelection@@@Z @ 9809 NONAME ; void QCoeFepInputContext::SetCursorSelectionForFepL(class TCursorSelection const &)
+ ?SetCursorSelectionForFepL@QCoeFepInputContext@@UAEXABVTCursorSelection@@@Z @ 9809 NONAME ABSENT ; void QCoeFepInputContext::SetCursorSelectionForFepL(class TCursorSelection const &)
??1QClipboardEvent@@UAE@XZ @ 9810 NONAME ; QClipboardEvent::~QClipboardEvent(void)
?textLanguages@QImage@@QBE?AVQStringList@@XZ @ 9811 NONAME ; class QStringList QImage::textLanguages(void) const
?page@QWizard@@QBEPAVQWizardPage@@H@Z @ 9812 NONAME ; class QWizardPage * QWizard::page(int) const
@@ -9869,7 +9869,7 @@ EXPORTS
?clear@QAbstractSpinBox@@UAEXXZ @ 9868 NONAME ; void QAbstractSpinBox::clear(void)
?flags@QSortFilterProxyModel@@UBE?AV?$QFlags@W4ItemFlag@Qt@@@@ABVQModelIndex@@@Z @ 9869 NONAME ; class QFlags<enum Qt::ItemFlag> QSortFilterProxyModel::flags(class QModelIndex const &) const
?setAcceptedMouseButtons@QGraphicsItem@@QAEXV?$QFlags@W4MouseButton@Qt@@@@@Z @ 9870 NONAME ; void QGraphicsItem::setAcceptedMouseButtons(class QFlags<enum Qt::MouseButton>)
- ?qt_metacast@QGraphicsPixelizeEffect@@UAEPAXPBD@Z @ 9871 NONAME ; void * QGraphicsPixelizeEffect::qt_metacast(char const *)
+ ?qt_metacast@QGraphicsPixelizeEffect@@UAEPAXPBD@Z @ 9871 NONAME ABSENT ; void * QGraphicsPixelizeEffect::qt_metacast(char const *)
?loopCount@QImageIOHandler@@UBEHXZ @ 9872 NONAME ; int QImageIOHandler::loopCount(void) const
?items@QGraphicsScene@@QBE?AV?$QList@PAVQGraphicsItem@@@@ABVQPointF@@@Z @ 9873 NONAME ; class QList<class QGraphicsItem *> QGraphicsScene::items(class QPointF const &) const
?rowCount@QGraphicsGridLayout@@QBEHXZ @ 9874 NONAME ; int QGraphicsGridLayout::rowCount(void) const
@@ -9877,7 +9877,7 @@ EXPORTS
?radius@QRadialGradient@@QBEMXZ @ 9876 NONAME ; float QRadialGradient::radius(void) const
?itemFromIndex@QListWidget@@IBEPAVQListWidgetItem@@ABVQModelIndex@@@Z @ 9877 NONAME ; class QListWidgetItem * QListWidget::itemFromIndex(class QModelIndex const &) const
?tr@QPlainTextEdit@@SA?AVQString@@PBD0@Z @ 9878 NONAME ; class QString QPlainTextEdit::tr(char const *, char const *)
- ?blurRadius@QGraphicsDropShadowEffect@@QBEHXZ @ 9879 NONAME ; int QGraphicsDropShadowEffect::blurRadius(void) const
+ ?blurRadius@QGraphicsDropShadowEffect@@QBEHXZ @ 9879 NONAME ABSENT ; int QGraphicsDropShadowEffect::blurRadius(void) const
?focusPolicy@QWidget@@QBE?AW4FocusPolicy@Qt@@XZ @ 9880 NONAME ; enum Qt::FocusPolicy QWidget::focusPolicy(void) const
?write@QIconEngineV2@@UBE_NAAVQDataStream@@@Z @ 9881 NONAME ; bool QIconEngineV2::write(class QDataStream &) const
?mouseHandler@QInputContext@@UAEXHPAVQMouseEvent@@@Z @ 9882 NONAME ; void QInputContext::mouseHandler(int, class QMouseEvent *)
@@ -9958,14 +9958,14 @@ EXPORTS
?valuePropertyName@QItemEditorFactory@@UBE?AVQByteArray@@W4Type@QVariant@@@Z @ 9957 NONAME ; class QByteArray QItemEditorFactory::valuePropertyName(enum QVariant::Type) const
?focusInEvent@QLabel@@MAEXPAVQFocusEvent@@@Z @ 9958 NONAME ; void QLabel::focusInEvent(class QFocusEvent *)
?toString@Value@QCss@@QBE?AVQString@@XZ @ 9959 NONAME ; class QString QCss::Value::toString(void) const
- ?GetCursorSelectionForFep@QCoeFepInputContext@@UBEXAAVTCursorSelection@@@Z @ 9960 NONAME ; void QCoeFepInputContext::GetCursorSelectionForFep(class TCursorSelection &) const
+ ?GetCursorSelectionForFep@QCoeFepInputContext@@UBEXAAVTCursorSelection@@@Z @ 9960 NONAME ABSENT ; void QCoeFepInputContext::GetCursorSelectionForFep(class TCursorSelection &) const
??0QTransform@@QAE@ABVQMatrix@@@Z @ 9961 NONAME ; QTransform::QTransform(class QMatrix const &)
?setViewMode@QFileDialog@@QAEXW4ViewMode@1@@Z @ 9962 NONAME ; void QFileDialog::setViewMode(enum QFileDialog::ViewMode)
?setCurrentCharFormat@QTextControl@@QAEXABVQTextCharFormat@@@Z @ 9963 NONAME ; void QTextControl::setCurrentCharFormat(class QTextCharFormat const &)
??6@YAAAVQDataStream@@AAV0@ABVQPalette@@@Z @ 9964 NONAME ; class QDataStream & operator<<(class QDataStream &, class QPalette const &)
??_EQHelpEvent@@UAE@I@Z @ 9965 NONAME ; QHelpEvent::~QHelpEvent(unsigned int)
?verticalScaleAt@QGraphicsItemAnimation@@QBEMM@Z @ 9966 NONAME ; float QGraphicsItemAnimation::verticalScaleAt(float) const
- ?State@QCoeFepInputContext@@UAEPAVCState@MCoeFepAwareTextEditor_Extension1@@VTUid@@@Z @ 9967 NONAME ; class MCoeFepAwareTextEditor_Extension1::CState * QCoeFepInputContext::State(class TUid)
+ ?State@QCoeFepInputContext@@UAEPAVCState@MCoeFepAwareTextEditor_Extension1@@VTUid@@@Z @ 9967 NONAME ABSENT ; class MCoeFepAwareTextEditor_Extension1::CState * QCoeFepInputContext::State(class TUid)
?q_func@QGraphicsEffectPrivate@@AAEPAVQGraphicsEffect@@XZ @ 9968 NONAME ; class QGraphicsEffect * QGraphicsEffectPrivate::q_func(void)
?trUtf8@QRadioButton@@SA?AVQString@@PBD0@Z @ 9969 NONAME ; class QString QRadioButton::trUtf8(char const *, char const *)
?setVerticalHeaderFormat@QCalendarWidget@@QAEXW4VerticalHeaderFormat@1@@Z @ 9970 NONAME ; void QCalendarWidget::setVerticalHeaderFormat(enum QCalendarWidget::VerticalHeaderFormat)
@@ -10291,7 +10291,7 @@ EXPORTS
?tr@QInputDialog@@SA?AVQString@@PBD0@Z @ 10290 NONAME ; class QString QInputDialog::tr(char const *, char const *)
?tabSizeHint@QTabBar@@MBE?AVQSize@@H@Z @ 10291 NONAME ; class QSize QTabBar::tabSizeHint(int) const
?tr@QDateEdit@@SA?AVQString@@PBD0@Z @ 10292 NONAME ; class QString QDateEdit::tr(char const *, char const *)
- ?tr@QCoeFepInputContext@@SA?AVQString@@PBD0H@Z @ 10293 NONAME ; class QString QCoeFepInputContext::tr(char const *, char const *, int)
+ ?tr@QCoeFepInputContext@@SA?AVQString@@PBD0H@Z @ 10293 NONAME ABSENT ; class QString QCoeFepInputContext::tr(char const *, char const *, int)
?origin@QGraphicsScale@@QBE?AVQVector3D@@XZ @ 10294 NONAME ; class QVector3D QGraphicsScale::origin(void) const
?subElementRect@QCommonStyle@@UBE?AVQRect@@W4SubElement@QStyle@@PBVQStyleOption@@PBVQWidget@@@Z @ 10295 NONAME ; class QRect QCommonStyle::subElementRect(enum QStyle::SubElement, class QStyleOption const *, class QWidget const *) const
?sizeHint@QRadioButton@@UBE?AVQSize@@XZ @ 10296 NONAME ; class QSize QRadioButton::sizeHint(void) const
@@ -10434,7 +10434,7 @@ EXPORTS
??0QPainterPath@@QAE@ABVQPointF@@@Z @ 10433 NONAME ; QPainterPath::QPainterPath(class QPointF const &)
?wizardStyle@QWizard@@QBE?AW4WizardStyle@1@XZ @ 10434 NONAME ; enum QWizard::WizardStyle QWizard::wizardStyle(void) const
?setStyle@QGraphicsScene@@QAEXPAVQStyle@@@Z @ 10435 NONAME ; void QGraphicsScene::setStyle(class QStyle *)
- ?getOpaqueRegion@QWidgetPrivate@@QBE?AVQRegion@@XZ @ 10436 NONAME ; class QRegion QWidgetPrivate::getOpaqueRegion(void) const
+ ?getOpaqueRegion@QWidgetPrivate@@QBE?AVQRegion@@XZ @ 10436 NONAME ABSENT ; class QRegion QWidgetPrivate::getOpaqueRegion(void) const
?triggered@QMenuBar@@IAEXPAVQAction@@@Z @ 10437 NONAME ; void QMenuBar::triggered(class QAction *)
??0QStyleOptionButton@@QAE@XZ @ 10438 NONAME ; QStyleOptionButton::QStyleOptionButton(void)
?height@QImage@@QBEHXZ @ 10439 NONAME ; int QImage::height(void) const
@@ -10464,7 +10464,7 @@ EXPORTS
??1QGraphicsPolygonItem@@UAE@XZ @ 10463 NONAME ; QGraphicsPolygonItem::~QGraphicsPolygonItem(void)
?showEvent@QMdiArea@@MAEXPAVQShowEvent@@@Z @ 10464 NONAME ; void QMdiArea::showEvent(class QShowEvent *)
?startPos@TouchPoint@QTouchEvent@@QBE?AVQPointF@@XZ @ 10465 NONAME ; class QPointF QTouchEvent::TouchPoint::startPos(void) const
- ?metaObject@QGraphicsBloomEffect@@UBEPBUQMetaObject@@XZ @ 10466 NONAME ; struct QMetaObject const * QGraphicsBloomEffect::metaObject(void) const
+ ?metaObject@QGraphicsBloomEffect@@UBEPBUQMetaObject@@XZ @ 10466 NONAME ABSENT ; struct QMetaObject const * QGraphicsBloomEffect::metaObject(void) const
?clicked@QDialogButtonBox@@IAEXPAVQAbstractButton@@@Z @ 10467 NONAME ; void QDialogButtonBox::clicked(class QAbstractButton *)
?tr@QSplitterHandle@@SA?AVQString@@PBD0@Z @ 10468 NONAME ; class QString QSplitterHandle::tr(char const *, char const *)
?setWindowIcon_sys@QWidgetPrivate@@QAEX_N@Z @ 10469 NONAME ; void QWidgetPrivate::setWindowIcon_sys(bool)
@@ -10521,7 +10521,7 @@ EXPORTS
?itemAt@QGraphicsScene@@QBEPAVQGraphicsItem@@ABVQPointF@@ABVQTransform@@@Z @ 10520 NONAME ; class QGraphicsItem * QGraphicsScene::itemAt(class QPointF const &, class QTransform const &) const
?paintEvent@QCheckBox@@MAEXPAVQPaintEvent@@@Z @ 10521 NONAME ; void QCheckBox::paintEvent(class QPaintEvent *)
?timerEvent@QTextEdit@@MAEXPAVQTimerEvent@@@Z @ 10522 NONAME ; void QTextEdit::timerEvent(class QTimerEvent *)
- ?blurHint@QGraphicsBloomEffect@@QBE?AW4RenderHint@Qt@@XZ @ 10523 NONAME ; enum Qt::RenderHint QGraphicsBloomEffect::blurHint(void) const
+ ?blurHint@QGraphicsBloomEffect@@QBE?AW4RenderHint@Qt@@XZ @ 10523 NONAME ABSENT ; enum Qt::RenderHint QGraphicsBloomEffect::blurHint(void) const
?setInterpolationMode@QGradient@@QAEXW4InterpolationMode@1@@Z @ 10524 NONAME ; void QGradient::setInterpolationMode(enum QGradient::InterpolationMode)
?eraseRect@QPainter@@QAEXABVQRect@@@Z @ 10525 NONAME ; void QPainter::eraseRect(class QRect const &)
?tr@QDesktopWidget@@SA?AVQString@@PBD0H@Z @ 10526 NONAME ; class QString QDesktopWidget::tr(char const *, char const *, int)
@@ -10538,7 +10538,7 @@ EXPORTS
?setOffset@QGraphicsDropShadowEffect@@QAEXABVQPointF@@@Z @ 10537 NONAME ; void QGraphicsDropShadowEffect::setOffset(class QPointF const &)
?hideEvent@QAbstractSpinBox@@MAEXPAVQHideEvent@@@Z @ 10538 NONAME ; void QAbstractSpinBox::hideEvent(class QHideEvent *)
?setData@QTableWidgetItem@@UAEXHABVQVariant@@@Z @ 10539 NONAME ; void QTableWidgetItem::setData(int, class QVariant const &)
- ?setBlurRadius@QGraphicsBloomEffect@@QAEXH@Z @ 10540 NONAME ; void QGraphicsBloomEffect::setBlurRadius(int)
+ ?setBlurRadius@QGraphicsBloomEffect@@QAEXH@Z @ 10540 NONAME ABSENT ; void QGraphicsBloomEffect::setBlurRadius(int)
?qt_metacast@QAbstractProxyModel@@UAEPAXPBD@Z @ 10541 NONAME ; void * QAbstractProxyModel::qt_metacast(char const *)
?setModelColumn@QListView@@QAEXH@Z @ 10542 NONAME ; void QListView::setModelColumn(int)
?addDockWidget@QMainWindow@@QAEXW4DockWidgetArea@Qt@@PAVQDockWidget@@W4Orientation@3@@Z @ 10543 NONAME ; void QMainWindow::addDockWidget(enum Qt::DockWidgetArea, class QDockWidget *, enum Qt::Orientation)
@@ -10597,7 +10597,7 @@ EXPORTS
?menuBar@QLayout@@QBEPAVQWidget@@XZ @ 10596 NONAME ; class QWidget * QLayout::menuBar(void) const
?items@QGraphicsScene@@QBE?AV?$QList@PAVQGraphicsItem@@@@ABVQPolygonF@@W4ItemSelectionMode@Qt@@W4SortOrder@5@ABVQTransform@@@Z @ 10597 NONAME ; class QList<class QGraphicsItem *> QGraphicsScene::items(class QPolygonF const &, enum Qt::ItemSelectionMode, enum Qt::SortOrder, class QTransform const &) const
?substitutions@QFont@@SA?AVQStringList@@XZ @ 10598 NONAME ; class QStringList QFont::substitutions(void)
- ?DoCommitFepInlineEditL@QCoeFepInputContext@@EAEXXZ @ 10599 NONAME ; void QCoeFepInputContext::DoCommitFepInlineEditL(void)
+ ?DoCommitFepInlineEditL@QCoeFepInputContext@@EAEXXZ @ 10599 NONAME ABSENT ; void QCoeFepInputContext::DoCommitFepInlineEditL(void)
?rootPath@QFileSystemModel@@QBE?AVQString@@XZ @ 10600 NONAME ; class QString QFileSystemModel::rootPath(void) const
?documentSizeChanged@QTextControl@@IAEXABVQSizeF@@@Z @ 10601 NONAME ; void QTextControl::documentSizeChanged(class QSizeF const &)
??1QScrollArea@@UAE@XZ @ 10602 NONAME ; QScrollArea::~QScrollArea(void)
@@ -10616,7 +10616,7 @@ EXPORTS
?reason@QFocusEvent@@QBE?AW4FocusReason@Qt@@XZ @ 10615 NONAME ; enum Qt::FocusReason QFocusEvent::reason(void) const
?undo@QTextControl@@QAEXXZ @ 10616 NONAME ; void QTextControl::undo(void)
?fromHsv@QColor@@SA?AV1@HHHH@Z @ 10617 NONAME ; class QColor QColor::fromHsv(int, int, int, int)
- ?reset@QCoeFepInputContext@@UAEXXZ @ 10618 NONAME ; void QCoeFepInputContext::reset(void)
+ ?reset@QCoeFepInputContext@@UAEXXZ @ 10618 NONAME ABSENT ; void QCoeFepInputContext::reset(void)
?load@QImage@@QAE_NABVQString@@PBD@Z @ 10619 NONAME ; bool QImage::load(class QString const &, char const *)
?staticMetaObject@QProxyStyle@@2UQMetaObject@@B @ 10620 NONAME ; struct QMetaObject const QProxyStyle::staticMetaObject
?translate@QMatrix4x4@@QAEAAV1@MMM@Z @ 10621 NONAME ; class QMatrix4x4 & QMatrix4x4::translate(float, float, float)
@@ -10690,7 +10690,7 @@ EXPORTS
?controlTypes@QLayoutItem@@QBE?AV?$QFlags@W4ControlType@QSizePolicy@@@@XZ @ 10689 NONAME ; class QFlags<enum QSizePolicy::ControlType> QLayoutItem::controlTypes(void) const
?options@QWizard@@QBE?AV?$QFlags@W4WizardOption@QWizard@@@@XZ @ 10690 NONAME ; class QFlags<enum QWizard::WizardOption> QWizard::options(void) const
?visualRegionForSelection@QTableView@@MBE?AVQRegion@@ABVQItemSelection@@@Z @ 10691 NONAME ; class QRegion QTableView::visualRegionForSelection(class QItemSelection const &) const
- ?applyFormat@QCoeFepInputContext@@AAEXPAV?$QList@VAttribute@QInputMethodEvent@@@@@Z @ 10692 NONAME ; void QCoeFepInputContext::applyFormat(class QList<class QInputMethodEvent::Attribute> *)
+ ?applyFormat@QCoeFepInputContext@@AAEXPAV?$QList@VAttribute@QInputMethodEvent@@@@@Z @ 10692 NONAME ABSENT ; void QCoeFepInputContext::applyFormat(class QList<class QInputMethodEvent::Attribute> *)
??1QFontMetrics@@QAE@XZ @ 10693 NONAME ; QFontMetrics::~QFontMetrics(void)
?setWindowRole@QWidget@@QAEXABVQString@@@Z @ 10694 NONAME ; void QWidget::setWindowRole(class QString const &)
??0QTextTable@@QAE@PAVQTextDocument@@@Z @ 10695 NONAME ; QTextTable::QTextTable(class QTextDocument *)
@@ -10707,7 +10707,7 @@ EXPORTS
?dragMoveEvent@QWidget@@MAEXPAVQDragMoveEvent@@@Z @ 10706 NONAME ; void QWidget::dragMoveEvent(class QDragMoveEvent *)
?started@QMovie@@IAEXXZ @ 10707 NONAME ; void QMovie::started(void)
??_EQImageIOPlugin@@UAE@I@Z @ 10708 NONAME ; QImageIOPlugin::~QImageIOPlugin(unsigned int)
- ?blurRadiusChanged@QGraphicsDropShadowEffect@@IAEXH@Z @ 10709 NONAME ; void QGraphicsDropShadowEffect::blurRadiusChanged(int)
+ ?blurRadiusChanged@QGraphicsDropShadowEffect@@IAEXH@Z @ 10709 NONAME ABSENT ; void QGraphicsDropShadowEffect::blurRadiusChanged(int)
?contains@QPainterPath@@QBE_NABVQPointF@@@Z @ 10710 NONAME ; bool QPainterPath::contains(class QPointF const &) const
?historyUrl@QTextBrowser@@QBE?AVQUrl@@H@Z @ 10711 NONAME ; class QUrl QTextBrowser::historyUrl(int) const
?setLastCenterPoint@QPinchGesture@@QAEXABVQPointF@@@Z @ 10712 NONAME ; void QPinchGesture::setLastCenterPoint(class QPointF const &)
@@ -10867,7 +10867,7 @@ EXPORTS
?setNameFilterDisables@QFileSystemModel@@QAEX_N@Z @ 10866 NONAME ; void QFileSystemModel::setNameFilterDisables(bool)
?resizeAnchor@QGraphicsView@@QBE?AW4ViewportAnchor@1@XZ @ 10867 NONAME ; enum QGraphicsView::ViewportAnchor QGraphicsView::resizeAnchor(void) const
?scale@QMatrix4x4@@QAEAAV1@M@Z @ 10868 NONAME ; class QMatrix4x4 & QMatrix4x4::scale(float)
- ?SetStateTransferingOwnershipL@QCoeFepInputContext@@UAEXPAVCState@MCoeFepAwareTextEditor_Extension1@@VTUid@@@Z @ 10869 NONAME ; void QCoeFepInputContext::SetStateTransferingOwnershipL(class MCoeFepAwareTextEditor_Extension1::CState *, class TUid)
+ ?SetStateTransferingOwnershipL@QCoeFepInputContext@@UAEXPAVCState@MCoeFepAwareTextEditor_Extension1@@VTUid@@@Z @ 10869 NONAME ABSENT ; void QCoeFepInputContext::SetStateTransferingOwnershipL(class MCoeFepAwareTextEditor_Extension1::CState *, class TUid)
??0QStyle@@QAE@XZ @ 10870 NONAME ; QStyle::QStyle(void)
?mouseDoubleClickEvent@QHeaderView@@MAEXPAVQMouseEvent@@@Z @ 10871 NONAME ; void QHeaderView::mouseDoubleClickEvent(class QMouseEvent *)
?addPermanentWidget@QStatusBar@@QAEXPAVQWidget@@H@Z @ 10872 NONAME ; void QStatusBar::addPermanentWidget(class QWidget *, int)
@@ -11401,7 +11401,7 @@ EXPORTS
?staticMetaObject@QToolBar@@2UQMetaObject@@B @ 11400 NONAME ; struct QMetaObject const QToolBar::staticMetaObject
?setPosition@QTextLine@@QAEXABVQPointF@@@Z @ 11401 NONAME ; void QTextLine::setPosition(class QPointF const &)
?topLevelWidget@QGraphicsItem@@QBEPAVQGraphicsWidget@@XZ @ 11402 NONAME ; class QGraphicsWidget * QGraphicsItem::topLevelWidget(void) const
- ?setBlurRadius@QGraphicsBlurEffect@@QAEXH@Z @ 11403 NONAME ; void QGraphicsBlurEffect::setBlurRadius(int)
+ ?setBlurRadius@QGraphicsBlurEffect@@QAEXH@Z @ 11403 NONAME ABSENT ; void QGraphicsBlurEffect::setBlurRadius(int)
?fromRgba@QColor@@SA?AV1@I@Z @ 11404 NONAME ; class QColor QColor::fromRgba(unsigned int)
?isValid@QTextFormat@@QBE_NXZ @ 11405 NONAME ; bool QTextFormat::isValid(void) const
??0QMatrix4x4@@AAE@H@Z @ 11406 NONAME ; QMatrix4x4::QMatrix4x4(int)
@@ -11455,7 +11455,7 @@ EXPORTS
?tr@QTabWidget@@SA?AVQString@@PBD0@Z @ 11454 NONAME ; class QString QTabWidget::tr(char const *, char const *)
?addToPolygonMixed@QBezier@@QBEXPAVQPolygonF@@@Z @ 11455 NONAME ; void QBezier::addToPolygonMixed(class QPolygonF *) const
?command@QUndoStack@@QBEPBVQUndoCommand@@H@Z @ 11456 NONAME ; class QUndoCommand const * QUndoStack::command(int) const
- ?tr@QGraphicsPixelizeEffect@@SA?AVQString@@PBD0H@Z @ 11457 NONAME ; class QString QGraphicsPixelizeEffect::tr(char const *, char const *, int)
+ ?tr@QGraphicsPixelizeEffect@@SA?AVQString@@PBD0H@Z @ 11457 NONAME ABSENT ; class QString QGraphicsPixelizeEffect::tr(char const *, char const *, int)
?data@QStandardItem@@UBE?AVQVariant@@H@Z @ 11458 NONAME ; class QVariant QStandardItem::data(int) const
?focusItem@QGraphicsScene@@QBEPAVQGraphicsItem@@XZ @ 11459 NONAME ; class QGraphicsItem * QGraphicsScene::focusItem(void) const
?delta@QWheelEvent@@QBEHXZ @ 11460 NONAME ; int QWheelEvent::delta(void) const
@@ -11545,7 +11545,7 @@ EXPORTS
?keyReleaseEvent@QWidget@@MAEXPAVQKeyEvent@@@Z @ 11544 NONAME ; void QWidget::keyReleaseEvent(class QKeyEvent *)
??0QCursor@@QAE@ABV0@@Z @ 11545 NONAME ; QCursor::QCursor(class QCursor const &)
?keyReleaseEvent@QGraphicsScene@@MAEXPAVQKeyEvent@@@Z @ 11546 NONAME ; void QGraphicsScene::keyReleaseEvent(class QKeyEvent *)
- ?tr@QCoeFepInputContext@@SA?AVQString@@PBD0@Z @ 11547 NONAME ; class QString QCoeFepInputContext::tr(char const *, char const *)
+ ?tr@QCoeFepInputContext@@SA?AVQString@@PBD0@Z @ 11547 NONAME ABSENT ; class QString QCoeFepInputContext::tr(char const *, char const *)
?pos@QContextMenuEvent@@QBEABVQPoint@@XZ @ 11548 NONAME ; class QPoint const & QContextMenuEvent::pos(void) const
??5@YAAAVQDataStream@@AAV0@AAVQCursor@@@Z @ 11549 NONAME ; class QDataStream & operator>>(class QDataStream &, class QCursor &)
??_EQTextObject@@UAE@I@Z @ 11550 NONAME ; QTextObject::~QTextObject(unsigned int)
@@ -11787,7 +11787,7 @@ EXPORTS
?focusOutEvent@QPlainTextEdit@@MAEXPAVQFocusEvent@@@Z @ 11786 NONAME ; void QPlainTextEdit::focusOutEvent(class QFocusEvent *)
??_EQItemEditorCreatorBase@@UAE@I@Z @ 11787 NONAME ; QItemEditorCreatorBase::~QItemEditorCreatorBase(unsigned int)
?capStyleMode@QStroker@@QBE?AW4LineJoinMode@1@XZ @ 11788 NONAME ; enum QStroker::LineJoinMode QStroker::capStyleMode(void) const
- ?filterEvent@QCoeFepInputContext@@UAE_NPBVQEvent@@@Z @ 11789 NONAME ; bool QCoeFepInputContext::filterEvent(class QEvent const *)
+ ?filterEvent@QCoeFepInputContext@@UAE_NPBVQEvent@@@Z @ 11789 NONAME ABSENT ; bool QCoeFepInputContext::filterEvent(class QEvent const *)
??HQRegion@@QBE?BV0@ABV0@@Z @ 11790 NONAME ; class QRegion const QRegion::operator+(class QRegion const &) const
?revert@QAbstractProxyModel@@UAEXXZ @ 11791 NONAME ; void QAbstractProxyModel::revert(void)
??0QPainterState@@QAE@PBV0@@Z @ 11792 NONAME ; QPainterState::QPainterState(class QPainterState const *)
@@ -11851,7 +11851,7 @@ EXPORTS
?insertToolBarBreak@QMainWindow@@QAEXPAVQToolBar@@@Z @ 11850 NONAME ; void QMainWindow::insertToolBarBreak(class QToolBar *)
?d_func@QTextDocument@@ABEPBVQTextDocumentPrivate@@XZ @ 11851 NONAME ; class QTextDocumentPrivate const * QTextDocument::d_func(void) const
?setBlurHint@QPixmapBlurFilter@@QAEXW4RenderHint@Qt@@@Z @ 11852 NONAME ; void QPixmapBlurFilter::setBlurHint(enum Qt::RenderHint)
- ?trUtf8@QGraphicsPixelizeEffect@@SA?AVQString@@PBD0@Z @ 11853 NONAME ; class QString QGraphicsPixelizeEffect::trUtf8(char const *, char const *)
+ ?trUtf8@QGraphicsPixelizeEffect@@SA?AVQString@@PBD0@Z @ 11853 NONAME ABSENT ; class QString QGraphicsPixelizeEffect::trUtf8(char const *, char const *)
?adjustSize@QGraphicsTextItem@@QAEXXZ @ 11854 NONAME ; void QGraphicsTextItem::adjustSize(void)
??0QTextDocumentFragment@@QAE@PBVQTextDocument@@@Z @ 11855 NONAME ; QTextDocumentFragment::QTextDocumentFragment(class QTextDocument const *)
?lastResortFamily@QFont@@QBE?AVQString@@XZ @ 11856 NONAME ; class QString QFont::lastResortFamily(void) const
@@ -11876,16 +11876,16 @@ EXPORTS
?resolveSymlinks@QFileSystemModel@@QBE_NXZ @ 11875 NONAME ; bool QFileSystemModel::resolveSymlinks(void) const
?itemFromIndex@QTableWidget@@IBEPAVQTableWidgetItem@@ABVQModelIndex@@@Z @ 11876 NONAME ; class QTableWidgetItem * QTableWidget::itemFromIndex(class QModelIndex const &) const
?commitData@QApplication@@UAEXAAVQSessionManager@@@Z @ 11877 NONAME ; void QApplication::commitData(class QSessionManager &)
- ?draw@QGraphicsPixelizeEffect@@MAEXPAVQPainter@@PAVQGraphicsEffectSource@@@Z @ 11878 NONAME ; void QGraphicsPixelizeEffect::draw(class QPainter *, class QGraphicsEffectSource *)
+ ?draw@QGraphicsPixelizeEffect@@MAEXPAVQPainter@@PAVQGraphicsEffectSource@@@Z @ 11878 NONAME ABSENT ; void QGraphicsPixelizeEffect::draw(class QPainter *, class QGraphicsEffectSource *)
?updateState@QPaintEngineEx@@UAEXABVQPaintEngineState@@@Z @ 11879 NONAME ; void QPaintEngineEx::updateState(class QPaintEngineState const &)
?qt_metacall@QTextFrame@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 11880 NONAME ; int QTextFrame::qt_metacall(enum QMetaObject::Call, int, void * *)
?getStaticMetaObject@QImageIOPlugin@@SAABUQMetaObject@@XZ @ 11881 NONAME ; struct QMetaObject const & QImageIOPlugin::getStaticMetaObject(void)
- ?trUtf8@QCoeFepInputContext@@SA?AVQString@@PBD0@Z @ 11882 NONAME ; class QString QCoeFepInputContext::trUtf8(char const *, char const *)
+ ?trUtf8@QCoeFepInputContext@@SA?AVQString@@PBD0@Z @ 11882 NONAME ABSENT ; class QString QCoeFepInputContext::trUtf8(char const *, char const *)
?autoExclusive@QAbstractButton@@QBE_NXZ @ 11883 NONAME ; bool QAbstractButton::autoExclusive(void) const
??1QGraphicsEffectSource@@UAE@XZ @ 11884 NONAME ; QGraphicsEffectSource::~QGraphicsEffectSource(void)
?mapRectToScene@QGraphicsItem@@QBE?AVQRectF@@MMMM@Z @ 11885 NONAME ; class QRectF QGraphicsItem::mapRectToScene(float, float, float, float) const
??1QToolBarChangeEvent@@UAE@XZ @ 11886 NONAME ; QToolBarChangeEvent::~QToolBarChangeEvent(void)
- ?strengthChanged@QGraphicsGrayscaleEffect@@IAEXM@Z @ 11887 NONAME ; void QGraphicsGrayscaleEffect::strengthChanged(float)
+ ?strengthChanged@QGraphicsGrayscaleEffect@@IAEXM@Z @ 11887 NONAME ABSENT ; void QGraphicsGrayscaleEffect::strengthChanged(float)
?sizeHintChanged@QAbstractItemDelegate@@IAEXABVQModelIndex@@@Z @ 11888 NONAME ; void QAbstractItemDelegate::sizeHintChanged(class QModelIndex const &)
?setModel@QColumnView@@UAEXPAVQAbstractItemModel@@@Z @ 11889 NONAME ; void QColumnView::setModel(class QAbstractItemModel *)
?dy@QMatrix@@QBEMXZ @ 11890 NONAME ; float QMatrix::dy(void) const
@@ -12050,7 +12050,7 @@ EXPORTS
?addRoundedRect@QPainterPath@@QAEXMMMMMMW4SizeMode@Qt@@@Z @ 12049 NONAME ; void QPainterPath::addRoundedRect(float, float, float, float, float, float, enum Qt::SizeMode)
?lastCursorPosition@QTextTableCell@@QBE?AVQTextCursor@@XZ @ 12050 NONAME ; class QTextCursor QTextTableCell::lastCursorPosition(void) const
?toTableCellFormat@QTextFormat@@QBE?AVQTextTableCellFormat@@XZ @ 12051 NONAME ; class QTextTableCellFormat QTextFormat::toTableCellFormat(void) const
- ?setFocusWidget@QCoeFepInputContext@@UAEXPAVQWidget@@@Z @ 12052 NONAME ; void QCoeFepInputContext::setFocusWidget(class QWidget *)
+ ?setFocusWidget@QCoeFepInputContext@@UAEXPAVQWidget@@@Z @ 12052 NONAME ABSENT ; void QCoeFepInputContext::setFocusWidget(class QWidget *)
?stretch@QBoxLayout@@QBEHH@Z @ 12053 NONAME ; int QBoxLayout::stretch(int) const
?setColumnHidden@QTableView@@QAEXH_N@Z @ 12054 NONAME ; void QTableView::setColumnHidden(int, bool)
??Eiterator@QTextBlock@@QAE?AV01@H@Z @ 12055 NONAME ; class QTextBlock::iterator QTextBlock::iterator::operator++(int)
@@ -12405,7 +12405,7 @@ EXPORTS
??6@YAAAVQDataStream@@AAV0@ABVQTextFormat@@@Z @ 12404 NONAME ; class QDataStream & operator<<(class QDataStream &, class QTextFormat const &)
?setBlockCharFormat@QTextCursor@@QAEXABVQTextCharFormat@@@Z @ 12405 NONAME ; void QTextCursor::setBlockCharFormat(class QTextCharFormat const &)
??6@YA?AVQDebug@@V0@ABVQRegion@@@Z @ 12406 NONAME ; class QDebug operator<<(class QDebug, class QRegion const &)
- ?Extension1@QCoeFepInputContext@@EAEPAVMCoeFepAwareTextEditor_Extension1@@AAH@Z @ 12407 NONAME ; class MCoeFepAwareTextEditor_Extension1 * QCoeFepInputContext::Extension1(int &)
+ ?Extension1@QCoeFepInputContext@@EAEPAVMCoeFepAwareTextEditor_Extension1@@AAH@Z @ 12407 NONAME ABSENT ; class MCoeFepAwareTextEditor_Extension1 * QCoeFepInputContext::Extension1(int &)
?tr@QUndoView@@SA?AVQString@@PBD0H@Z @ 12408 NONAME ; class QString QUndoView::tr(char const *, char const *, int)
?sortByColumn@QTableView@@QAEXH@Z @ 12409 NONAME ; void QTableView::sortByColumn(int)
?supportedDropActions@QStringListModel@@UBE?AV?$QFlags@W4DropAction@Qt@@@@XZ @ 12410 NONAME ; class QFlags<enum Qt::DropAction> QStringListModel::supportedDropActions(void) const
@@ -12540,7 +12540,7 @@ EXPORTS
?loadResource@QTextEdit@@UAE?AVQVariant@@HABVQUrl@@@Z @ 12539 NONAME ; class QVariant QTextEdit::loadResource(int, class QUrl const &)
??0QStyleOptionDockWidgetV2@@IAE@H@Z @ 12540 NONAME ; QStyleOptionDockWidgetV2::QStyleOptionDockWidgetV2(int)
??0QSplitter@@QAE@PAVQWidget@@@Z @ 12541 NONAME ; QSplitter::QSplitter(class QWidget *)
- ?DocumentLengthForFep@QCoeFepInputContext@@UBEHXZ @ 12542 NONAME ; int QCoeFepInputContext::DocumentLengthForFep(void) const
+ ?DocumentLengthForFep@QCoeFepInputContext@@UBEHXZ @ 12542 NONAME ABSENT ; int QCoeFepInputContext::DocumentLengthForFep(void) const
??0QShowEvent@@QAE@XZ @ 12543 NONAME ; QShowEvent::QShowEvent(void)
?fontEngine@QTextEngine@@QBEPAVQFontEngine@@ABUQScriptItem@@PAUQFixed@@11@Z @ 12544 NONAME ; class QFontEngine * QTextEngine::fontEngine(struct QScriptItem const &, struct QFixed *, struct QFixed *, struct QFixed *) const
?leading@QTextLine@@QBEMXZ @ 12545 NONAME ; float QTextLine::leading(void) const
@@ -12548,4 +12548,38 @@ EXPORTS
?projectedRotate@QMatrix4x4@@AAEAAV1@MMMM@Z @ 12547 NONAME ; class QMatrix4x4 & QMatrix4x4::projectedRotate(float, float, float, float)
?setLeadingIncluded@QTextLine@@QAEX_N@Z @ 12548 NONAME ; void QTextLine::setLeadingIncluded(bool)
?toTransform@QMatrix4x4@@QBE?AVQTransform@@XZ @ 12549 NONAME ; class QTransform QMatrix4x4::toTransform(void) const
+ ??0QStyleOptionTabWidgetFrameV2@@IAE@H@Z @ 12550 NONAME ; QStyleOptionTabWidgetFrameV2::QStyleOptionTabWidgetFrameV2(int)
+ ??0QStyleOptionTabWidgetFrameV2@@QAE@ABV0@@Z @ 12551 NONAME ; QStyleOptionTabWidgetFrameV2::QStyleOptionTabWidgetFrameV2(class QStyleOptionTabWidgetFrameV2 const &)
+ ??0QStyleOptionTabWidgetFrameV2@@QAE@ABVQStyleOptionTabWidgetFrame@@@Z @ 12552 NONAME ; QStyleOptionTabWidgetFrameV2::QStyleOptionTabWidgetFrameV2(class QStyleOptionTabWidgetFrame const &)
+ ??0QStyleOptionTabWidgetFrameV2@@QAE@XZ @ 12553 NONAME ; QStyleOptionTabWidgetFrameV2::QStyleOptionTabWidgetFrameV2(void)
+ ??1QStyleOptionTabWidgetFrameV2@@QAE@XZ @ 12554 NONAME ; QStyleOptionTabWidgetFrameV2::~QStyleOptionTabWidgetFrameV2(void)
+ ??4QStyleOptionTabWidgetFrameV2@@QAEAAV0@ABVQStyleOptionTabWidgetFrame@@@Z @ 12555 NONAME ; class QStyleOptionTabWidgetFrameV2 & QStyleOptionTabWidgetFrameV2::operator=(class QStyleOptionTabWidgetFrame const &)
+ ?accept@QGestureEvent@@QAEXW4GestureType@Qt@@@Z @ 12556 NONAME ; void QGestureEvent::accept(enum Qt::GestureType)
+ ?addCacheData@QVectorPath@@QAEPAUCacheEntry@1@PAVQPaintEngineEx@@PAXP6AX1@Z@Z @ 12557 NONAME ; struct QVectorPath::CacheEntry * QVectorPath::addCacheData(class QPaintEngineEx *, void *, void (*)(void *))
+ ?availableRedoSteps@QTextDocument@@QBEHXZ @ 12558 NONAME ; int QTextDocument::availableRedoSteps(void) const
+ ?availableUndoSteps@QTextDocument@@QBEHXZ @ 12559 NONAME ; int QTextDocument::availableUndoSteps(void) const
+ ?blurRadius@QGraphicsBlurEffect@@QBEMXZ @ 12560 NONAME ; float QGraphicsBlurEffect::blurRadius(void) const
+ ?blurRadius@QGraphicsDropShadowEffect@@QBEMXZ @ 12561 NONAME ; float QGraphicsDropShadowEffect::blurRadius(void) const
+ ?blurRadius@QPixmapDropShadowFilter@@QBEMXZ @ 12562 NONAME ; float QPixmapDropShadowFilter::blurRadius(void) const
+ ?blurRadiusChanged@QGraphicsBlurEffect@@IAEXM@Z @ 12563 NONAME ; void QGraphicsBlurEffect::blurRadiusChanged(float)
+ ?blurRadiusChanged@QGraphicsDropShadowEffect@@IAEXM@Z @ 12564 NONAME ; void QGraphicsDropShadowEffect::blurRadiusChanged(float)
+ ?gestureCancelPolicy@QGesture@@QBE?AW4GestureCancelPolicy@1@XZ @ 12565 NONAME ; enum QGesture::GestureCancelPolicy QGesture::gestureCancelPolicy(void) const
+ ?ignore@QGestureEvent@@QAEXW4GestureType@Qt@@@Z @ 12566 NONAME ; void QGestureEvent::ignore(enum Qt::GestureType)
+ ?isAccepted@QGestureEvent@@QBE_NW4GestureType@Qt@@@Z @ 12567 NONAME ; bool QGestureEvent::isAccepted(enum Qt::GestureType) const
+ ?isCacheable@QVectorPath@@QBE_NXZ @ 12568 NONAME ; bool QVectorPath::isCacheable(void) const
+ ?isConvex@QVectorPath@@QBE_NXZ @ 12569 NONAME ; bool QVectorPath::isConvex(void) const
+ ?isCurved@QVectorPath@@QBE_NXZ @ 12570 NONAME ; bool QVectorPath::isCurved(void) const
+ ?lookupCacheData@QVectorPath@@QBEPAUCacheEntry@1@PAVQPaintEngineEx@@@Z @ 12571 NONAME ; struct QVectorPath::CacheEntry * QVectorPath::lookupCacheData(class QPaintEngineEx *) const
+ ?pixmap@QGraphicsEffectSource@@QBE?AVQPixmap@@W4CoordinateSystem@Qt@@PAVQPoint@@W4PixmapPadMode@1@@Z @ 12572 NONAME ; class QPixmap QGraphicsEffectSource::pixmap(enum Qt::CoordinateSystem, class QPoint *, enum QGraphicsEffectSource::PixmapPadMode) const
+ ?radius@QPixmapBlurFilter@@QBEMXZ @ 12573 NONAME ; float QPixmapBlurFilter::radius(void) const
+ ?registerGestureRecognizer@QApplication@@SA?AW4GestureType@Qt@@PAVQGestureRecognizer@@@Z @ 12574 NONAME ; enum Qt::GestureType QApplication::registerGestureRecognizer(class QGestureRecognizer *)
+ ?setAccepted@QGestureEvent@@QAEXW4GestureType@Qt@@_N@Z @ 12575 NONAME ; void QGestureEvent::setAccepted(enum Qt::GestureType, bool)
+ ?setBlurRadius@QGraphicsBlurEffect@@QAEXM@Z @ 12576 NONAME ; void QGraphicsBlurEffect::setBlurRadius(float)
+ ?setBlurRadius@QGraphicsDropShadowEffect@@QAEXM@Z @ 12577 NONAME ; void QGraphicsDropShadowEffect::setBlurRadius(float)
+ ?setBlurRadius@QPixmapDropShadowFilter@@QAEXM@Z @ 12578 NONAME ; void QPixmapDropShadowFilter::setBlurRadius(float)
+ ?setGestureCancelPolicy@QGesture@@QAEXW4GestureCancelPolicy@1@@Z @ 12579 NONAME ; void QGesture::setGestureCancelPolicy(enum QGesture::GestureCancelPolicy)
+ ?setRadius@QPixmapBlurFilter@@QAEXM@Z @ 12580 NONAME ; void QPixmapBlurFilter::setRadius(float)
+ ?topLevelChanged@QToolBar@@IAEX_N@Z @ 12581 NONAME ; void QToolBar::topLevelChanged(bool)
+ ?ungrabGesture@QWidget@@QAEXW4GestureType@Qt@@@Z @ 12582 NONAME ; void QWidget::ungrabGesture(enum Qt::GestureType)
+ ?unregisterGestureRecognizer@QApplication@@SAXW4GestureType@Qt@@@Z @ 12583 NONAME ; void QApplication::unregisterGestureRecognizer(enum Qt::GestureType)
diff --git a/src/s60installs/bwins/QtScriptu.def b/src/s60installs/bwins/QtScriptu.def
index 95b047e0ea..b3efd69354 100644
--- a/src/s60installs/bwins/QtScriptu.def
+++ b/src/s60installs/bwins/QtScriptu.def
@@ -328,4 +328,19 @@ EXPORTS
?functionMetaIndex@QScriptContextInfo@@QBEHXZ @ 327 NONAME ; int QScriptContextInfo::functionMetaIndex(void) const
?columnNumber@QScriptContextInfo@@QBEHXZ @ 328 NONAME ; int QScriptContextInfo::columnNumber(void) const
??0QScriptValue@@QAE@_N@Z @ 329 NONAME ; QScriptValue::QScriptValue(bool)
+ ??0QScriptProgram@@QAE@ABV0@@Z @ 330 NONAME ; QScriptProgram::QScriptProgram(class QScriptProgram const &)
+ ??0QScriptProgram@@QAE@ABVQString@@V1@H@Z @ 331 NONAME ; QScriptProgram::QScriptProgram(class QString const &, class QString, int)
+ ??0QScriptProgram@@QAE@XZ @ 332 NONAME ; QScriptProgram::QScriptProgram(void)
+ ??1QScriptProgram@@QAE@XZ @ 333 NONAME ; QScriptProgram::~QScriptProgram(void)
+ ??4QScriptProgram@@QAEAAV0@ABV0@@Z @ 334 NONAME ; class QScriptProgram & QScriptProgram::operator=(class QScriptProgram const &)
+ ??8QScriptProgram@@QBE_NABV0@@Z @ 335 NONAME ; bool QScriptProgram::operator==(class QScriptProgram const &) const
+ ??9QScriptProgram@@QBE_NABV0@@Z @ 336 NONAME ; bool QScriptProgram::operator!=(class QScriptProgram const &) const
+ ?d_func@QScriptProgram@@AAEPAVQScriptProgramPrivate@@XZ @ 337 NONAME ; class QScriptProgramPrivate * QScriptProgram::d_func(void)
+ ?d_func@QScriptProgram@@ABEPBVQScriptProgramPrivate@@XZ @ 338 NONAME ; class QScriptProgramPrivate const * QScriptProgram::d_func(void) const
+ ?evaluate@QScriptEngine@@QAE?AVQScriptValue@@ABVQScriptProgram@@@Z @ 339 NONAME ; class QScriptValue QScriptEngine::evaluate(class QScriptProgram const &)
+ ?fileName@QScriptProgram@@QBE?AVQString@@XZ @ 340 NONAME ; class QString QScriptProgram::fileName(void) const
+ ?firstLineNumber@QScriptProgram@@QBEHXZ @ 341 NONAME ; int QScriptProgram::firstLineNumber(void) const
+ ?isNull@QScriptProgram@@QBE_NXZ @ 342 NONAME ; bool QScriptProgram::isNull(void) const
+ ?sourceCode@QScriptProgram@@QBE?AVQString@@XZ @ 343 NONAME ; class QString QScriptProgram::sourceCode(void) const
+ ?toArrayIndex@QScriptString@@QBEIPA_N@Z @ 344 NONAME ; unsigned int QScriptString::toArrayIndex(bool *) const
diff --git a/src/s60installs/bwins/QtXmlPatternsu.def b/src/s60installs/bwins/QtXmlPatternsu.def
new file mode 100644
index 0000000000..57a75d4f70
--- /dev/null
+++ b/src/s60installs/bwins/QtXmlPatternsu.def
@@ -0,0 +1,280 @@
+EXPORTS
+ ??0QAbstractMessageHandler@@QAE@PAVQObject@@@Z @ 1 NONAME ; QAbstractMessageHandler::QAbstractMessageHandler(class QObject *)
+ ??0QAbstractUriResolver@@QAE@PAVQObject@@@Z @ 2 NONAME ; QAbstractUriResolver::QAbstractUriResolver(class QObject *)
+ ??0QAbstractXmlNodeModel@@IAE@PAVQAbstractXmlNodeModelPrivate@@@Z @ 3 NONAME ; QAbstractXmlNodeModel::QAbstractXmlNodeModel(class QAbstractXmlNodeModelPrivate *)
+ ??0QAbstractXmlNodeModel@@QAE@XZ @ 4 NONAME ; QAbstractXmlNodeModel::QAbstractXmlNodeModel(void)
+ ??0QAbstractXmlReceiver@@IAE@PAVQAbstractXmlReceiverPrivate@@@Z @ 5 NONAME ; QAbstractXmlReceiver::QAbstractXmlReceiver(class QAbstractXmlReceiverPrivate *)
+ ??0QAbstractXmlReceiver@@QAE@XZ @ 6 NONAME ; QAbstractXmlReceiver::QAbstractXmlReceiver(void)
+ ??0QSimpleXmlNodeModel@@QAE@ABVQXmlNamePool@@@Z @ 7 NONAME ; QSimpleXmlNodeModel::QSimpleXmlNodeModel(class QXmlNamePool const &)
+ ??0QSourceLocation@@QAE@ABV0@@Z @ 8 NONAME ; QSourceLocation::QSourceLocation(class QSourceLocation const &)
+ ??0QSourceLocation@@QAE@ABVQUrl@@HH@Z @ 9 NONAME ; QSourceLocation::QSourceLocation(class QUrl const &, int, int)
+ ??0QSourceLocation@@QAE@XZ @ 10 NONAME ; QSourceLocation::QSourceLocation(void)
+ ??0QXmlFormatter@@QAE@ABVQXmlQuery@@PAVQIODevice@@@Z @ 11 NONAME ; QXmlFormatter::QXmlFormatter(class QXmlQuery const &, class QIODevice *)
+ ??0QXmlItem@@AAE@ABVItem@QPatternist@@@Z @ 12 NONAME ; QXmlItem::QXmlItem(class QPatternist::Item const &)
+ ??0QXmlItem@@QAE@ABV0@@Z @ 13 NONAME ; QXmlItem::QXmlItem(class QXmlItem const &)
+ ??0QXmlItem@@QAE@ABVQVariant@@@Z @ 14 NONAME ; QXmlItem::QXmlItem(class QVariant const &)
+ ??0QXmlItem@@QAE@ABVQXmlNodeModelIndex@@@Z @ 15 NONAME ; QXmlItem::QXmlItem(class QXmlNodeModelIndex const &)
+ ??0QXmlItem@@QAE@XZ @ 16 NONAME ; QXmlItem::QXmlItem(void)
+ ??0QXmlName@@AAE@H@Z @ 17 NONAME ; QXmlName::QXmlName(int)
+ ??0QXmlName@@QAE@AAVQXmlNamePool@@ABVQString@@11@Z @ 18 NONAME ; QXmlName::QXmlName(class QXmlNamePool &, class QString const &, class QString const &, class QString const &)
+ ??0QXmlName@@QAE@ABV0@@Z @ 19 NONAME ; QXmlName::QXmlName(class QXmlName const &)
+ ??0QXmlName@@QAE@FFF@Z @ 20 NONAME ; QXmlName::QXmlName(short, short, short)
+ ??0QXmlName@@QAE@XZ @ 21 NONAME ; QXmlName::QXmlName(void)
+ ??0QXmlNamePool@@AAE@PAVNamePool@QPatternist@@@Z @ 22 NONAME ; QXmlNamePool::QXmlNamePool(class QPatternist::NamePool *)
+ ??0QXmlNamePool@@QAE@ABV0@@Z @ 23 NONAME ; QXmlNamePool::QXmlNamePool(class QXmlNamePool const &)
+ ??0QXmlNamePool@@QAE@XZ @ 24 NONAME ; QXmlNamePool::QXmlNamePool(void)
+ ??0QXmlNodeModelIndex@@AAE@ABVNodeIndexStorage@QPatternist@@@Z @ 25 NONAME ; QXmlNodeModelIndex::QXmlNodeModelIndex(class QPatternist::NodeIndexStorage const &)
+ ??0QXmlNodeModelIndex@@QAE@ABV0@@Z @ 26 NONAME ; QXmlNodeModelIndex::QXmlNodeModelIndex(class QXmlNodeModelIndex const &)
+ ??0QXmlNodeModelIndex@@QAE@XZ @ 27 NONAME ; QXmlNodeModelIndex::QXmlNodeModelIndex(void)
+ ??0QXmlQuery@@QAE@ABV0@@Z @ 28 NONAME ; QXmlQuery::QXmlQuery(class QXmlQuery const &)
+ ??0QXmlQuery@@QAE@ABVQXmlNamePool@@@Z @ 29 NONAME ; QXmlQuery::QXmlQuery(class QXmlNamePool const &)
+ ??0QXmlQuery@@QAE@W4QueryLanguage@0@ABVQXmlNamePool@@@Z @ 30 NONAME ; QXmlQuery::QXmlQuery(enum QXmlQuery::QueryLanguage, class QXmlNamePool const &)
+ ??0QXmlQuery@@QAE@XZ @ 31 NONAME ; QXmlQuery::QXmlQuery(void)
+ ??0QXmlResultItems@@QAE@XZ @ 32 NONAME ; QXmlResultItems::QXmlResultItems(void)
+ ??0QXmlSchema@@QAE@ABV0@@Z @ 33 NONAME ; QXmlSchema::QXmlSchema(class QXmlSchema const &)
+ ??0QXmlSchema@@QAE@XZ @ 34 NONAME ; QXmlSchema::QXmlSchema(void)
+ ??0QXmlSchemaValidator@@QAE@ABVQXmlSchema@@@Z @ 35 NONAME ; QXmlSchemaValidator::QXmlSchemaValidator(class QXmlSchema const &)
+ ??0QXmlSchemaValidator@@QAE@XZ @ 36 NONAME ; QXmlSchemaValidator::QXmlSchemaValidator(void)
+ ??0QXmlSerializer@@IAE@PAVQAbstractXmlReceiverPrivate@@@Z @ 37 NONAME ; QXmlSerializer::QXmlSerializer(class QAbstractXmlReceiverPrivate *)
+ ??0QXmlSerializer@@QAE@ABVQXmlQuery@@PAVQIODevice@@@Z @ 38 NONAME ; QXmlSerializer::QXmlSerializer(class QXmlQuery const &, class QIODevice *)
+ ??1QAbstractMessageHandler@@UAE@XZ @ 39 NONAME ; QAbstractMessageHandler::~QAbstractMessageHandler(void)
+ ??1QAbstractUriResolver@@UAE@XZ @ 40 NONAME ; QAbstractUriResolver::~QAbstractUriResolver(void)
+ ??1QAbstractXmlNodeModel@@UAE@XZ @ 41 NONAME ; QAbstractXmlNodeModel::~QAbstractXmlNodeModel(void)
+ ??1QAbstractXmlReceiver@@UAE@XZ @ 42 NONAME ; QAbstractXmlReceiver::~QAbstractXmlReceiver(void)
+ ??1QSimpleXmlNodeModel@@UAE@XZ @ 43 NONAME ; QSimpleXmlNodeModel::~QSimpleXmlNodeModel(void)
+ ??1QSourceLocation@@QAE@XZ @ 44 NONAME ; QSourceLocation::~QSourceLocation(void)
+ ??1QXmlFormatter@@UAE@XZ @ 45 NONAME ; QXmlFormatter::~QXmlFormatter(void)
+ ??1QXmlItem@@QAE@XZ @ 46 NONAME ; QXmlItem::~QXmlItem(void)
+ ??1QXmlNamePool@@QAE@XZ @ 47 NONAME ; QXmlNamePool::~QXmlNamePool(void)
+ ??1QXmlQuery@@QAE@XZ @ 48 NONAME ; QXmlQuery::~QXmlQuery(void)
+ ??1QXmlResultItems@@UAE@XZ @ 49 NONAME ; QXmlResultItems::~QXmlResultItems(void)
+ ??1QXmlSchema@@QAE@XZ @ 50 NONAME ; QXmlSchema::~QXmlSchema(void)
+ ??1QXmlSchemaValidator@@QAE@XZ @ 51 NONAME ; QXmlSchemaValidator::~QXmlSchemaValidator(void)
+ ??1QXmlSerializer@@UAE@XZ @ 52 NONAME ; QXmlSerializer::~QXmlSerializer(void)
+ ??4QSourceLocation@@QAEAAV0@ABV0@@Z @ 53 NONAME ; class QSourceLocation & QSourceLocation::operator=(class QSourceLocation const &)
+ ??4QXmlItem@@QAEAAV0@ABV0@@Z @ 54 NONAME ; class QXmlItem & QXmlItem::operator=(class QXmlItem const &)
+ ??4QXmlName@@QAEAAV0@ABV0@@Z @ 55 NONAME ; class QXmlName & QXmlName::operator=(class QXmlName const &)
+ ??4QXmlNamePool@@QAEAAV0@ABV0@@Z @ 56 NONAME ; class QXmlNamePool & QXmlNamePool::operator=(class QXmlNamePool const &)
+ ??4QXmlQuery@@QAEAAV0@ABV0@@Z @ 57 NONAME ; class QXmlQuery & QXmlQuery::operator=(class QXmlQuery const &)
+ ??4QXmlSchema@@QAEAAV0@ABV0@@Z @ 58 NONAME ; class QXmlSchema & QXmlSchema::operator=(class QXmlSchema const &)
+ ??6@YA?AVQDebug@@V0@ABVQSourceLocation@@@Z @ 59 NONAME ; class QDebug operator<<(class QDebug, class QSourceLocation const &)
+ ??8QSourceLocation@@QBE_NABV0@@Z @ 60 NONAME ; bool QSourceLocation::operator==(class QSourceLocation const &) const
+ ??8QXmlName@@QBE_NABV0@@Z @ 61 NONAME ; bool QXmlName::operator==(class QXmlName const &) const
+ ??8QXmlNodeModelIndex@@QBE_NABV0@@Z @ 62 NONAME ; bool QXmlNodeModelIndex::operator==(class QXmlNodeModelIndex const &) const
+ ??9QSourceLocation@@QBE_NABV0@@Z @ 63 NONAME ; bool QSourceLocation::operator!=(class QSourceLocation const &) const
+ ??9QXmlName@@QBE_NABV0@@Z @ 64 NONAME ; bool QXmlName::operator!=(class QXmlName const &) const
+ ??9QXmlNodeModelIndex@@QBE_NABV0@@Z @ 65 NONAME ; bool QXmlNodeModelIndex::operator!=(class QXmlNodeModelIndex const &) const
+ ??_EQAbstractMessageHandler@@UAE@I@Z @ 66 NONAME ; QAbstractMessageHandler::~QAbstractMessageHandler(unsigned int)
+ ??_EQAbstractUriResolver@@UAE@I@Z @ 67 NONAME ; QAbstractUriResolver::~QAbstractUriResolver(unsigned int)
+ ??_EQAbstractXmlNodeModel@@UAE@I@Z @ 68 NONAME ; QAbstractXmlNodeModel::~QAbstractXmlNodeModel(unsigned int)
+ ??_EQAbstractXmlReceiver@@UAE@I@Z @ 69 NONAME ; QAbstractXmlReceiver::~QAbstractXmlReceiver(unsigned int)
+ ??_EQSimpleXmlNodeModel@@UAE@I@Z @ 70 NONAME ; QSimpleXmlNodeModel::~QSimpleXmlNodeModel(unsigned int)
+ ??_EQXmlFormatter@@UAE@I@Z @ 71 NONAME ; QXmlFormatter::~QXmlFormatter(unsigned int)
+ ??_EQXmlResultItems@@UAE@I@Z @ 72 NONAME ; QXmlResultItems::~QXmlResultItems(unsigned int)
+ ??_EQXmlSerializer@@UAE@I@Z @ 73 NONAME ; QXmlSerializer::~QXmlSerializer(unsigned int)
+ ?additionalData@QXmlNodeModelIndex@@QBE_JXZ @ 74 NONAME ; long long QXmlNodeModelIndex::additionalData(void) const
+ ?atDocumentRoot@QXmlSerializer@@ABE_NXZ @ 75 NONAME ; bool QXmlSerializer::atDocumentRoot(void) const
+ ?atomicValue@QXmlFormatter@@UAEXABVQVariant@@@Z @ 76 NONAME ; void QXmlFormatter::atomicValue(class QVariant const &)
+ ?atomicValue@QXmlSerializer@@UAEXABVQVariant@@@Z @ 77 NONAME ; void QXmlSerializer::atomicValue(class QVariant const &)
+ ?attribute@QXmlFormatter@@UAEXABVQXmlName@@ABVQStringRef@@@Z @ 78 NONAME ; void QXmlFormatter::attribute(class QXmlName const &, class QStringRef const &)
+ ?attribute@QXmlSerializer@@UAEXABVQXmlName@@ABVQStringRef@@@Z @ 79 NONAME ; void QXmlSerializer::attribute(class QXmlName const &, class QStringRef const &)
+ ?baseUri@QSimpleXmlNodeModel@@UBE?AVQUrl@@ABVQXmlNodeModelIndex@@@Z @ 80 NONAME ; class QUrl QSimpleXmlNodeModel::baseUri(class QXmlNodeModelIndex const &) const
+ ?baseUri@QXmlNodeModelIndex@@QBE?AVQUrl@@XZ @ 81 NONAME ; class QUrl QXmlNodeModelIndex::baseUri(void) const
+ ?bindVariable@QXmlQuery@@QAEXABVQString@@ABV1@@Z @ 82 NONAME ; void QXmlQuery::bindVariable(class QString const &, class QXmlQuery const &)
+ ?bindVariable@QXmlQuery@@QAEXABVQString@@ABVQXmlItem@@@Z @ 83 NONAME ; void QXmlQuery::bindVariable(class QString const &, class QXmlItem const &)
+ ?bindVariable@QXmlQuery@@QAEXABVQString@@PAVQIODevice@@@Z @ 84 NONAME ; void QXmlQuery::bindVariable(class QString const &, class QIODevice *)
+ ?bindVariable@QXmlQuery@@QAEXABVQXmlName@@ABV1@@Z @ 85 NONAME ; void QXmlQuery::bindVariable(class QXmlName const &, class QXmlQuery const &)
+ ?bindVariable@QXmlQuery@@QAEXABVQXmlName@@ABVQXmlItem@@@Z @ 86 NONAME ; void QXmlQuery::bindVariable(class QXmlName const &, class QXmlItem const &)
+ ?bindVariable@QXmlQuery@@QAEXABVQXmlName@@PAVQIODevice@@@Z @ 87 NONAME ; void QXmlQuery::bindVariable(class QXmlName const &, class QIODevice *)
+ ?characters@QXmlFormatter@@UAEXABVQStringRef@@@Z @ 88 NONAME ; void QXmlFormatter::characters(class QStringRef const &)
+ ?characters@QXmlSerializer@@UAEXABVQStringRef@@@Z @ 89 NONAME ; void QXmlSerializer::characters(class QStringRef const &)
+ ?code@QXmlName@@QBE_JXZ @ 90 NONAME ; long long QXmlName::code(void) const
+ ?codec@QXmlSerializer@@QBEPBVQTextCodec@@XZ @ 91 NONAME ; class QTextCodec const * QXmlSerializer::codec(void) const
+ ?column@QSourceLocation@@QBE_JXZ @ 92 NONAME ; long long QSourceLocation::column(void) const
+ ?comment@QXmlFormatter@@UAEXABVQString@@@Z @ 93 NONAME ; void QXmlFormatter::comment(class QString const &)
+ ?comment@QXmlSerializer@@UAEXABVQString@@@Z @ 94 NONAME ; void QXmlSerializer::comment(class QString const &)
+ ?compareOrder@QXmlNodeModelIndex@@QBE?AW4DocumentOrder@1@ABV1@@Z @ 95 NONAME ; enum QXmlNodeModelIndex::DocumentOrder QXmlNodeModelIndex::compareOrder(class QXmlNodeModelIndex const &) const
+ ?copyNodeTo@QAbstractXmlNodeModel@@UBEXABVQXmlNodeModelIndex@@PAVQAbstractXmlReceiver@@ABV?$QFlags@W4NodeCopySetting@QAbstractXmlNodeModel@@@@@Z @ 96 NONAME ; void QAbstractXmlNodeModel::copyNodeTo(class QXmlNodeModelIndex const &, class QAbstractXmlReceiver *, class QFlags<enum QAbstractXmlNodeModel::NodeCopySetting> const &) const
+ ?create@QXmlNodeModelIndex@@CA?AV1@_JPBVQAbstractXmlNodeModel@@0@Z @ 97 NONAME ; class QXmlNodeModelIndex QXmlNodeModelIndex::create(long long, class QAbstractXmlNodeModel const *, long long)
+ ?create@QXmlNodeModelIndex@@CA?AV1@_JPBVQAbstractXmlNodeModel@@@Z @ 98 NONAME ; class QXmlNodeModelIndex QXmlNodeModelIndex::create(long long, class QAbstractXmlNodeModel const *)
+ ?createIndex@QAbstractXmlNodeModel@@IBE?AVQXmlNodeModelIndex@@PAX_J@Z @ 99 NONAME ; class QXmlNodeModelIndex QAbstractXmlNodeModel::createIndex(void *, long long) const
+ ?createIndex@QAbstractXmlNodeModel@@IBE?AVQXmlNodeModelIndex@@_J0@Z @ 100 NONAME ; class QXmlNodeModelIndex QAbstractXmlNodeModel::createIndex(long long, long long) const
+ ?createIndex@QAbstractXmlNodeModel@@IBE?AVQXmlNodeModelIndex@@_J@Z @ 101 NONAME ; class QXmlNodeModelIndex QAbstractXmlNodeModel::createIndex(long long) const
+ ?current@QXmlResultItems@@QBE?AVQXmlItem@@XZ @ 102 NONAME ; class QXmlItem QXmlResultItems::current(void) const
+ ?d_func@QAbstractMessageHandler@@AAEPAVQAbstractMessageHandlerPrivate@@XZ @ 103 NONAME ; class QAbstractMessageHandlerPrivate * QAbstractMessageHandler::d_func(void)
+ ?d_func@QAbstractMessageHandler@@ABEPBVQAbstractMessageHandlerPrivate@@XZ @ 104 NONAME ; class QAbstractMessageHandlerPrivate const * QAbstractMessageHandler::d_func(void) const
+ ?d_func@QAbstractUriResolver@@AAEPAVQAbstractUriResolverPrivate@@XZ @ 105 NONAME ; class QAbstractUriResolverPrivate * QAbstractUriResolver::d_func(void)
+ ?d_func@QAbstractUriResolver@@ABEPBVQAbstractUriResolverPrivate@@XZ @ 106 NONAME ; class QAbstractUriResolverPrivate const * QAbstractUriResolver::d_func(void) const
+ ?d_func@QSimpleXmlNodeModel@@AAEPAVQSimpleXmlNodeModelPrivate@@XZ @ 107 NONAME ; class QSimpleXmlNodeModelPrivate * QSimpleXmlNodeModel::d_func(void)
+ ?d_func@QSimpleXmlNodeModel@@ABEPBVQSimpleXmlNodeModelPrivate@@XZ @ 108 NONAME ; class QSimpleXmlNodeModelPrivate const * QSimpleXmlNodeModel::d_func(void) const
+ ?d_func@QXmlFormatter@@AAEPAVQXmlFormatterPrivate@@XZ @ 109 NONAME ; class QXmlFormatterPrivate * QXmlFormatter::d_func(void)
+ ?d_func@QXmlFormatter@@ABEPBVQXmlFormatterPrivate@@XZ @ 110 NONAME ; class QXmlFormatterPrivate const * QXmlFormatter::d_func(void) const
+ ?d_func@QXmlResultItems@@AAEPAVQXmlResultItemsPrivate@@XZ @ 111 NONAME ; class QXmlResultItemsPrivate * QXmlResultItems::d_func(void)
+ ?d_func@QXmlResultItems@@ABEPBVQXmlResultItemsPrivate@@XZ @ 112 NONAME ; class QXmlResultItemsPrivate const * QXmlResultItems::d_func(void) const
+ ?d_func@QXmlSerializer@@AAEPAVQXmlSerializerPrivate@@XZ @ 113 NONAME ; class QXmlSerializerPrivate * QXmlSerializer::d_func(void)
+ ?d_func@QXmlSerializer@@ABEPBVQXmlSerializerPrivate@@XZ @ 114 NONAME ; class QXmlSerializerPrivate const * QXmlSerializer::d_func(void) const
+ ?data@QXmlNodeModelIndex@@QBE_JXZ @ 115 NONAME ; long long QXmlNodeModelIndex::data(void) const
+ ?documentUri@QXmlNodeModelIndex@@QBE?AVQUrl@@XZ @ 116 NONAME ; class QUrl QXmlNodeModelIndex::documentUri(void) const
+ ?documentUri@QXmlSchema@@QBE?AVQUrl@@XZ @ 117 NONAME ; class QUrl QXmlSchema::documentUri(void) const
+ ?elementById@QSimpleXmlNodeModel@@UBE?AVQXmlNodeModelIndex@@ABVQXmlName@@@Z @ 118 NONAME ; class QXmlNodeModelIndex QSimpleXmlNodeModel::elementById(class QXmlName const &) const
+ ?endDocument@QXmlFormatter@@UAEXXZ @ 119 NONAME ; void QXmlFormatter::endDocument(void)
+ ?endDocument@QXmlSerializer@@UAEXXZ @ 120 NONAME ; void QXmlSerializer::endDocument(void)
+ ?endElement@QXmlFormatter@@UAEXXZ @ 121 NONAME ; void QXmlFormatter::endElement(void)
+ ?endElement@QXmlSerializer@@UAEXXZ @ 122 NONAME ; void QXmlSerializer::endElement(void)
+ ?endOfSequence@QXmlFormatter@@UAEXXZ @ 123 NONAME ; void QXmlFormatter::endOfSequence(void)
+ ?endOfSequence@QXmlSerializer@@UAEXXZ @ 124 NONAME ; void QXmlSerializer::endOfSequence(void)
+ ?evaluateTo@QXmlQuery@@QBEXPAVQXmlResultItems@@@Z @ 125 NONAME ; void QXmlQuery::evaluateTo(class QXmlResultItems *) const
+ ?evaluateTo@QXmlQuery@@QBE_NPAVQAbstractXmlReceiver@@@Z @ 126 NONAME ; bool QXmlQuery::evaluateTo(class QAbstractXmlReceiver *) const
+ ?evaluateTo@QXmlQuery@@QBE_NPAVQIODevice@@@Z @ 127 NONAME ; bool QXmlQuery::evaluateTo(class QIODevice *) const
+ ?evaluateTo@QXmlQuery@@QBE_NPAVQString@@@Z @ 128 NONAME ; bool QXmlQuery::evaluateTo(class QString *) const
+ ?evaluateTo@QXmlQuery@@QBE_NPAVQStringList@@@Z @ 129 NONAME ; bool QXmlQuery::evaluateTo(class QStringList *) const
+ ?fromClarkName@QXmlName@@SA?AV1@ABVQString@@ABVQXmlNamePool@@@Z @ 130 NONAME ; class QXmlName QXmlName::fromClarkName(class QString const &, class QXmlNamePool const &)
+ ?getStaticMetaObject@QAbstractMessageHandler@@SAABUQMetaObject@@XZ @ 131 NONAME ; struct QMetaObject const & QAbstractMessageHandler::getStaticMetaObject(void)
+ ?getStaticMetaObject@QAbstractUriResolver@@SAABUQMetaObject@@XZ @ 132 NONAME ; struct QMetaObject const & QAbstractUriResolver::getStaticMetaObject(void)
+ ?hasError@QXmlResultItems@@QBE_NXZ @ 133 NONAME ; bool QXmlResultItems::hasError(void) const
+ ?hasNamespace@QXmlName@@QBE_NXZ @ 134 NONAME ; bool QXmlName::hasNamespace(void) const
+ ?hasPrefix@QXmlName@@QBE_NXZ @ 135 NONAME ; bool QXmlName::hasPrefix(void) const
+ ?indentationDepth@QXmlFormatter@@QBEHXZ @ 136 NONAME ; int QXmlFormatter::indentationDepth(void) const
+ ?initialTemplateName@QXmlQuery@@QBE?AVQXmlName@@XZ @ 137 NONAME ; class QXmlName QXmlQuery::initialTemplateName(void) const
+ ?internalIsAtomicValue@QXmlItem@@ABE_NXZ @ 138 NONAME ; bool QXmlItem::internalIsAtomicValue(void) const
+ ?internalPointer@QXmlNodeModelIndex@@QBEPAXXZ @ 139 NONAME ; void * QXmlNodeModelIndex::internalPointer(void) const
+ ?is@QXmlNodeModelIndex@@QBE_NABV1@@Z @ 140 NONAME ; bool QXmlNodeModelIndex::is(class QXmlNodeModelIndex const &) const
+ ?isAtomicValue@QXmlItem@@QBE_NXZ @ 141 NONAME ; bool QXmlItem::isAtomicValue(void) const
+ ?isBindingInScope@QXmlSerializer@@ABE_NVQXmlName@@@Z @ 142 NONAME ; bool QXmlSerializer::isBindingInScope(class QXmlName) const
+ ?isDeepEqual@QAbstractXmlNodeModel@@UBE_NABVQXmlNodeModelIndex@@0@Z @ 143 NONAME ; bool QAbstractXmlNodeModel::isDeepEqual(class QXmlNodeModelIndex const &, class QXmlNodeModelIndex const &) const
+ ?isDeepEqual@QXmlNodeModelIndex@@QBE_NABV1@@Z @ 144 NONAME ; bool QXmlNodeModelIndex::isDeepEqual(class QXmlNodeModelIndex const &) const
+ ?isIgnorableInDeepEqual@QAbstractXmlNodeModel@@CA_NABVQXmlNodeModelIndex@@@Z @ 145 NONAME ; bool QAbstractXmlNodeModel::isIgnorableInDeepEqual(class QXmlNodeModelIndex const &)
+ ?isLexicallyEqual@QXmlName@@QBE_NABV1@@Z @ 146 NONAME ; bool QXmlName::isLexicallyEqual(class QXmlName const &) const
+ ?isNCName@QXmlName@@SA_NABVQString@@@Z @ 147 NONAME ; bool QXmlName::isNCName(class QString const &)
+ ?isNode@QXmlItem@@QBE_NXZ @ 148 NONAME ; bool QXmlItem::isNode(void) const
+ ?isNull@QSourceLocation@@QBE_NXZ @ 149 NONAME ; bool QSourceLocation::isNull(void) const
+ ?isNull@QXmlItem@@QBE_NXZ @ 150 NONAME ; bool QXmlItem::isNull(void) const
+ ?isNull@QXmlName@@QBE_NXZ @ 151 NONAME ; bool QXmlName::isNull(void) const
+ ?isNull@QXmlNodeModelIndex@@QBE_NXZ @ 152 NONAME ; bool QXmlNodeModelIndex::isNull(void) const
+ ?isValid@QXmlQuery@@QBE_NXZ @ 153 NONAME ; bool QXmlQuery::isValid(void) const
+ ?isValid@QXmlSchema@@QBE_NXZ @ 154 NONAME ; bool QXmlSchema::isValid(void) const
+ ?item@QAbstractXmlReceiver@@UAEXABVItem@QPatternist@@@Z @ 155 NONAME ; void QAbstractXmlReceiver::item(class QPatternist::Item const &)
+ ?item@QXmlFormatter@@UAEXABVItem@QPatternist@@@Z @ 156 NONAME ; void QXmlFormatter::item(class QPatternist::Item const &)
+ ?item@QXmlSerializer@@UAEXABVItem@QPatternist@@@Z @ 157 NONAME ; void QXmlSerializer::item(class QPatternist::Item const &)
+ ?iterate@QAbstractXmlNodeModel@@UBE?AV?$QExplicitlySharedDataPointer@V?$QAbstractXmlForwardIterator@VQXmlNodeModelIndex@@@@@@ABVQXmlNodeModelIndex@@W4Axis@3@@Z @ 158 NONAME ; class QExplicitlySharedDataPointer<class QAbstractXmlForwardIterator<class QXmlNodeModelIndex> > QAbstractXmlNodeModel::iterate(class QXmlNodeModelIndex const &, enum QXmlNodeModelIndex::Axis) const
+ ?iterate@QXmlNodeModelIndex@@QBE?AV?$QExplicitlySharedDataPointer@V?$QAbstractXmlForwardIterator@VQXmlNodeModelIndex@@@@@@W4Axis@1@@Z @ 159 NONAME ; class QExplicitlySharedDataPointer<class QAbstractXmlForwardIterator<class QXmlNodeModelIndex> > QXmlNodeModelIndex::iterate(enum QXmlNodeModelIndex::Axis) const
+ ?kind@QXmlNodeModelIndex@@QBE?AW4NodeKind@1@XZ @ 160 NONAME ; enum QXmlNodeModelIndex::NodeKind QXmlNodeModelIndex::kind(void) const
+ ?line@QSourceLocation@@QBE_JXZ @ 161 NONAME ; long long QSourceLocation::line(void) const
+ ?load@QXmlSchema@@QAE_NABVQByteArray@@ABVQUrl@@@Z @ 162 NONAME ; bool QXmlSchema::load(class QByteArray const &, class QUrl const &)
+ ?load@QXmlSchema@@QAE_NABVQUrl@@@Z @ 163 NONAME ; bool QXmlSchema::load(class QUrl const &)
+ ?load@QXmlSchema@@QAE_NPAVQIODevice@@ABVQUrl@@@Z @ 164 NONAME ; bool QXmlSchema::load(class QIODevice *, class QUrl const &)
+ ?localName@QXmlName@@QBE?AVQString@@ABVQXmlNamePool@@@Z @ 165 NONAME ; class QString QXmlName::localName(class QXmlNamePool const &) const
+ ?localName@QXmlName@@QBEFXZ @ 166 NONAME ; short QXmlName::localName(void) const
+ ?mapToSequence@QAbstractXmlNodeModel@@ABE?AV?$QExplicitlySharedDataPointer@V?$QAbstractXmlForwardIterator@VQXmlNodeModelIndex@@@@@@ABVQXmlNodeModelIndex@@ABV?$QExplicitlySharedDataPointer@VDynamicContext@QPatternist@@@@@Z @ 167 NONAME ; class QExplicitlySharedDataPointer<class QAbstractXmlForwardIterator<class QXmlNodeModelIndex> > QAbstractXmlNodeModel::mapToSequence(class QXmlNodeModelIndex const &, class QExplicitlySharedDataPointer<class QPatternist::DynamicContext> const &) const
+ ?message@QAbstractMessageHandler@@QAEXW4QtMsgType@@ABVQString@@ABVQUrl@@ABVQSourceLocation@@@Z @ 168 NONAME ; void QAbstractMessageHandler::message(enum QtMsgType, class QString const &, class QUrl const &, class QSourceLocation const &)
+ ?messageHandler@QXmlQuery@@QBEPAVQAbstractMessageHandler@@XZ @ 169 NONAME ; class QAbstractMessageHandler * QXmlQuery::messageHandler(void) const
+ ?messageHandler@QXmlSchema@@QBEPAVQAbstractMessageHandler@@XZ @ 170 NONAME ; class QAbstractMessageHandler * QXmlSchema::messageHandler(void) const
+ ?messageHandler@QXmlSchemaValidator@@QBEPAVQAbstractMessageHandler@@XZ @ 171 NONAME ; class QAbstractMessageHandler * QXmlSchemaValidator::messageHandler(void) const
+ ?metaObject@QAbstractMessageHandler@@UBEPBUQMetaObject@@XZ @ 172 NONAME ; struct QMetaObject const * QAbstractMessageHandler::metaObject(void) const
+ ?metaObject@QAbstractUriResolver@@UBEPBUQMetaObject@@XZ @ 173 NONAME ; struct QMetaObject const * QAbstractUriResolver::metaObject(void) const
+ ?model@QXmlNodeModelIndex@@QBEPBVQAbstractXmlNodeModel@@XZ @ 174 NONAME ; class QAbstractXmlNodeModel const * QXmlNodeModelIndex::model(void) const
+ ?name@QXmlNodeModelIndex@@QBE?AVQXmlName@@XZ @ 175 NONAME ; class QXmlName QXmlNodeModelIndex::name(void) const
+ ?namePool@QSimpleXmlNodeModel@@QBEAAVQXmlNamePool@@XZ @ 176 NONAME ; class QXmlNamePool & QSimpleXmlNodeModel::namePool(void) const
+ ?namePool@QXmlQuery@@QBE?AVQXmlNamePool@@XZ @ 177 NONAME ; class QXmlNamePool QXmlQuery::namePool(void) const
+ ?namePool@QXmlSchema@@QBE?AVQXmlNamePool@@XZ @ 178 NONAME ; class QXmlNamePool QXmlSchema::namePool(void) const
+ ?namePool@QXmlSchemaValidator@@QBE?AVQXmlNamePool@@XZ @ 179 NONAME ; class QXmlNamePool QXmlSchemaValidator::namePool(void) const
+ ?namespaceBinding@QXmlSerializer@@UAEXABVQXmlName@@@Z @ 180 NONAME ; void QXmlSerializer::namespaceBinding(class QXmlName const &)
+ ?namespaceBindings@QSimpleXmlNodeModel@@UBE?AV?$QVector@VQXmlName@@@@ABVQXmlNodeModelIndex@@@Z @ 181 NONAME ; class QVector<class QXmlName> QSimpleXmlNodeModel::namespaceBindings(class QXmlNodeModelIndex const &) const
+ ?namespaceBindings@QXmlNodeModelIndex@@QBE?AV?$QVector@VQXmlName@@@@XZ @ 182 NONAME ; class QVector<class QXmlName> QXmlNodeModelIndex::namespaceBindings(void) const
+ ?namespaceForPrefix@QAbstractXmlNodeModel@@UBEFABVQXmlNodeModelIndex@@F@Z @ 183 NONAME ; short QAbstractXmlNodeModel::namespaceForPrefix(class QXmlNodeModelIndex const &, short) const
+ ?namespaceForPrefix@QXmlNodeModelIndex@@QBEFF@Z @ 184 NONAME ; short QXmlNodeModelIndex::namespaceForPrefix(short) const
+ ?namespaceURI@QXmlName@@QBEFXZ @ 185 NONAME ; short QXmlName::namespaceURI(void) const
+ ?namespaceUri@QXmlName@@QBE?AVQString@@ABVQXmlNamePool@@@Z @ 186 NONAME ; class QString QXmlName::namespaceUri(class QXmlNamePool const &) const
+ ?networkAccessManager@QXmlQuery@@QBEPAVQNetworkAccessManager@@XZ @ 187 NONAME ; class QNetworkAccessManager * QXmlQuery::networkAccessManager(void) const
+ ?networkAccessManager@QXmlSchema@@QBEPAVQNetworkAccessManager@@XZ @ 188 NONAME ; class QNetworkAccessManager * QXmlSchema::networkAccessManager(void) const
+ ?networkAccessManager@QXmlSchemaValidator@@QBEPAVQNetworkAccessManager@@XZ @ 189 NONAME ; class QNetworkAccessManager * QXmlSchemaValidator::networkAccessManager(void) const
+ ?next@QXmlResultItems@@QAE?AVQXmlItem@@XZ @ 190 NONAME ; class QXmlItem QXmlResultItems::next(void)
+ ?nodesByIdref@QSimpleXmlNodeModel@@UBE?AV?$QVector@VQXmlNodeModelIndex@@@@ABVQXmlName@@@Z @ 191 NONAME ; class QVector<class QXmlNodeModelIndex> QSimpleXmlNodeModel::nodesByIdref(class QXmlName const &) const
+ ?outputDevice@QXmlSerializer@@QBEPAVQIODevice@@XZ @ 192 NONAME ; class QIODevice * QXmlSerializer::outputDevice(void) const
+ ?prefix@QXmlName@@QBE?AVQString@@ABVQXmlNamePool@@@Z @ 193 NONAME ; class QString QXmlName::prefix(class QXmlNamePool const &) const
+ ?prefix@QXmlName@@QBEFXZ @ 194 NONAME ; short QXmlName::prefix(void) const
+ ?processingInstruction@QXmlFormatter@@UAEXABVQXmlName@@ABVQString@@@Z @ 195 NONAME ; void QXmlFormatter::processingInstruction(class QXmlName const &, class QString const &)
+ ?processingInstruction@QXmlSerializer@@UAEXABVQXmlName@@ABVQString@@@Z @ 196 NONAME ; void QXmlSerializer::processingInstruction(class QXmlName const &, class QString const &)
+ ?qHash@@YAIABVQSourceLocation@@@Z @ 197 NONAME ; unsigned int qHash(class QSourceLocation const &)
+ ?qHash@@YAIABVQXmlName@@@Z @ 198 NONAME ; unsigned int qHash(class QXmlName const &)
+ ?qHash@@YAIABVQXmlNodeModelIndex@@@Z @ 199 NONAME ; unsigned int qHash(class QXmlNodeModelIndex const &)
+ ?qt_metacall@QAbstractMessageHandler@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 200 NONAME ; int QAbstractMessageHandler::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QAbstractUriResolver@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 201 NONAME ; int QAbstractUriResolver::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacast@QAbstractMessageHandler@@UAEPAXPBD@Z @ 202 NONAME ; void * QAbstractMessageHandler::qt_metacast(char const *)
+ ?qt_metacast@QAbstractUriResolver@@UAEPAXPBD@Z @ 203 NONAME ; void * QAbstractUriResolver::qt_metacast(char const *)
+ ?queryLanguage@QXmlQuery@@QBE?AW4QueryLanguage@1@XZ @ 204 NONAME ; enum QXmlQuery::QueryLanguage QXmlQuery::queryLanguage(void) const
+ ?reset@QXmlNodeModelIndex@@QAEXXZ @ 205 NONAME ; void QXmlNodeModelIndex::reset(void)
+ ?root@QXmlNodeModelIndex@@QBE?AV1@XZ @ 206 NONAME ; class QXmlNodeModelIndex QXmlNodeModelIndex::root(void) const
+ ?schema@QXmlSchemaValidator@@QBE?AVQXmlSchema@@XZ @ 207 NONAME ; class QXmlSchema QXmlSchemaValidator::schema(void) const
+ ?sendAsNode@QAbstractXmlReceiver@@IAEXABVItem@QPatternist@@@Z @ 208 NONAME ; void QAbstractXmlReceiver::sendAsNode(class QPatternist::Item const &)
+ ?sendNamespaces@QAbstractXmlNodeModel@@UBEXABVQXmlNodeModelIndex@@PAVQAbstractXmlReceiver@@@Z @ 209 NONAME ; void QAbstractXmlNodeModel::sendNamespaces(class QXmlNodeModelIndex const &, class QAbstractXmlReceiver *) const
+ ?sendNamespaces@QXmlNodeModelIndex@@QBEXPAVQAbstractXmlReceiver@@@Z @ 210 NONAME ; void QXmlNodeModelIndex::sendNamespaces(class QAbstractXmlReceiver *) const
+ ?sequencedTypedValue@QAbstractXmlNodeModel@@UBE?AV?$QExplicitlySharedDataPointer@V?$QAbstractXmlForwardIterator@VItem@QPatternist@@@@@@ABVQXmlNodeModelIndex@@@Z @ 211 NONAME ; class QExplicitlySharedDataPointer<class QAbstractXmlForwardIterator<class QPatternist::Item> > QAbstractXmlNodeModel::sequencedTypedValue(class QXmlNodeModelIndex const &) const
+ ?sequencedTypedValue@QXmlNodeModelIndex@@QBE?AV?$QExplicitlySharedDataPointer@V?$QAbstractXmlForwardIterator@VItem@QPatternist@@@@@@XZ @ 212 NONAME ; class QExplicitlySharedDataPointer<class QAbstractXmlForwardIterator<class QPatternist::Item> > QXmlNodeModelIndex::sequencedTypedValue(void) const
+ ?setCodec@QXmlSerializer@@QAEXPBVQTextCodec@@@Z @ 213 NONAME ; void QXmlSerializer::setCodec(class QTextCodec const *)
+ ?setColumn@QSourceLocation@@QAEX_J@Z @ 214 NONAME ; void QSourceLocation::setColumn(long long)
+ ?setFocus@QXmlQuery@@QAEXABVQXmlItem@@@Z @ 215 NONAME ; void QXmlQuery::setFocus(class QXmlItem const &)
+ ?setFocus@QXmlQuery@@QAE_NABVQString@@@Z @ 216 NONAME ; bool QXmlQuery::setFocus(class QString const &)
+ ?setFocus@QXmlQuery@@QAE_NABVQUrl@@@Z @ 217 NONAME ; bool QXmlQuery::setFocus(class QUrl const &)
+ ?setFocus@QXmlQuery@@QAE_NPAVQIODevice@@@Z @ 218 NONAME ; bool QXmlQuery::setFocus(class QIODevice *)
+ ?setIndentationDepth@QXmlFormatter@@QAEXH@Z @ 219 NONAME ; void QXmlFormatter::setIndentationDepth(int)
+ ?setInitialTemplateName@QXmlQuery@@QAEXABVQString@@@Z @ 220 NONAME ; void QXmlQuery::setInitialTemplateName(class QString const &)
+ ?setInitialTemplateName@QXmlQuery@@QAEXABVQXmlName@@@Z @ 221 NONAME ; void QXmlQuery::setInitialTemplateName(class QXmlName const &)
+ ?setLine@QSourceLocation@@QAEX_J@Z @ 222 NONAME ; void QSourceLocation::setLine(long long)
+ ?setLocalName@QXmlName@@QAEXF@Z @ 223 NONAME ; void QXmlName::setLocalName(short)
+ ?setMessageHandler@QXmlQuery@@QAEXPAVQAbstractMessageHandler@@@Z @ 224 NONAME ; void QXmlQuery::setMessageHandler(class QAbstractMessageHandler *)
+ ?setMessageHandler@QXmlSchema@@QAEXPAVQAbstractMessageHandler@@@Z @ 225 NONAME ; void QXmlSchema::setMessageHandler(class QAbstractMessageHandler *)
+ ?setMessageHandler@QXmlSchemaValidator@@QAEXPAVQAbstractMessageHandler@@@Z @ 226 NONAME ; void QXmlSchemaValidator::setMessageHandler(class QAbstractMessageHandler *)
+ ?setNamespaceURI@QXmlName@@QAEXF@Z @ 227 NONAME ; void QXmlName::setNamespaceURI(short)
+ ?setNetworkAccessManager@QXmlQuery@@QAEXPAVQNetworkAccessManager@@@Z @ 228 NONAME ; void QXmlQuery::setNetworkAccessManager(class QNetworkAccessManager *)
+ ?setNetworkAccessManager@QXmlSchema@@QAEXPAVQNetworkAccessManager@@@Z @ 229 NONAME ; void QXmlSchema::setNetworkAccessManager(class QNetworkAccessManager *)
+ ?setNetworkAccessManager@QXmlSchemaValidator@@QAEXPAVQNetworkAccessManager@@@Z @ 230 NONAME ; void QXmlSchemaValidator::setNetworkAccessManager(class QNetworkAccessManager *)
+ ?setPrefix@QXmlName@@QAEXF@Z @ 231 NONAME ; void QXmlName::setPrefix(short)
+ ?setQuery@QXmlQuery@@QAEXABVQString@@ABVQUrl@@@Z @ 232 NONAME ; void QXmlQuery::setQuery(class QString const &, class QUrl const &)
+ ?setQuery@QXmlQuery@@QAEXABVQUrl@@0@Z @ 233 NONAME ; void QXmlQuery::setQuery(class QUrl const &, class QUrl const &)
+ ?setQuery@QXmlQuery@@QAEXPAVQIODevice@@ABVQUrl@@@Z @ 234 NONAME ; void QXmlQuery::setQuery(class QIODevice *, class QUrl const &)
+ ?setSchema@QXmlSchemaValidator@@QAEXABVQXmlSchema@@@Z @ 235 NONAME ; void QXmlSchemaValidator::setSchema(class QXmlSchema const &)
+ ?setUri@QSourceLocation@@QAEXABVQUrl@@@Z @ 236 NONAME ; void QSourceLocation::setUri(class QUrl const &)
+ ?setUriResolver@QXmlQuery@@QAEXPBVQAbstractUriResolver@@@Z @ 237 NONAME ; void QXmlQuery::setUriResolver(class QAbstractUriResolver const *)
+ ?setUriResolver@QXmlSchema@@QAEXPBVQAbstractUriResolver@@@Z @ 238 NONAME ; void QXmlSchema::setUriResolver(class QAbstractUriResolver const *)
+ ?setUriResolver@QXmlSchemaValidator@@QAEXPBVQAbstractUriResolver@@@Z @ 239 NONAME ; void QXmlSchemaValidator::setUriResolver(class QAbstractUriResolver const *)
+ ?sourceLocation@QAbstractXmlNodeModel@@QBE?AVQSourceLocation@@ABVQXmlNodeModelIndex@@@Z @ 240 NONAME ; class QSourceLocation QAbstractXmlNodeModel::sourceLocation(class QXmlNodeModelIndex const &) const
+ ?startContent@QXmlSerializer@@AAEXXZ @ 241 NONAME ; void QXmlSerializer::startContent(void)
+ ?startDocument@QXmlFormatter@@UAEXXZ @ 242 NONAME ; void QXmlFormatter::startDocument(void)
+ ?startDocument@QXmlSerializer@@UAEXXZ @ 243 NONAME ; void QXmlSerializer::startDocument(void)
+ ?startElement@QXmlFormatter@@UAEXABVQXmlName@@@Z @ 244 NONAME ; void QXmlFormatter::startElement(class QXmlName const &)
+ ?startElement@QXmlSerializer@@UAEXABVQXmlName@@@Z @ 245 NONAME ; void QXmlSerializer::startElement(class QXmlName const &)
+ ?startFormattingContent@QXmlFormatter@@AAEXXZ @ 246 NONAME ; void QXmlFormatter::startFormattingContent(void)
+ ?startOfSequence@QXmlFormatter@@UAEXXZ @ 247 NONAME ; void QXmlFormatter::startOfSequence(void)
+ ?startOfSequence@QXmlSerializer@@UAEXXZ @ 248 NONAME ; void QXmlSerializer::startOfSequence(void)
+ ?stringValue@QSimpleXmlNodeModel@@UBE?AVQString@@ABVQXmlNodeModelIndex@@@Z @ 249 NONAME ; class QString QSimpleXmlNodeModel::stringValue(class QXmlNodeModelIndex const &) const
+ ?stringValue@QXmlNodeModelIndex@@QBE?AVQString@@XZ @ 250 NONAME ; class QString QXmlNodeModelIndex::stringValue(void) const
+ ?toAtomicValue@QXmlItem@@QBE?AVQVariant@@XZ @ 251 NONAME ; class QVariant QXmlItem::toAtomicValue(void) const
+ ?toClarkName@QXmlName@@QBE?AVQString@@ABVQXmlNamePool@@@Z @ 252 NONAME ; class QString QXmlName::toClarkName(class QXmlNamePool const &) const
+ ?toNodeModelIndex@QXmlItem@@QBE?AVQXmlNodeModelIndex@@XZ @ 253 NONAME ; class QXmlNodeModelIndex QXmlItem::toNodeModelIndex(void) const
+ ?tr@QAbstractMessageHandler@@SA?AVQString@@PBD0@Z @ 254 NONAME ; class QString QAbstractMessageHandler::tr(char const *, char const *)
+ ?tr@QAbstractMessageHandler@@SA?AVQString@@PBD0H@Z @ 255 NONAME ; class QString QAbstractMessageHandler::tr(char const *, char const *, int)
+ ?tr@QAbstractUriResolver@@SA?AVQString@@PBD0@Z @ 256 NONAME ; class QString QAbstractUriResolver::tr(char const *, char const *)
+ ?tr@QAbstractUriResolver@@SA?AVQString@@PBD0H@Z @ 257 NONAME ; class QString QAbstractUriResolver::tr(char const *, char const *, int)
+ ?trUtf8@QAbstractMessageHandler@@SA?AVQString@@PBD0@Z @ 258 NONAME ; class QString QAbstractMessageHandler::trUtf8(char const *, char const *)
+ ?trUtf8@QAbstractMessageHandler@@SA?AVQString@@PBD0H@Z @ 259 NONAME ; class QString QAbstractMessageHandler::trUtf8(char const *, char const *, int)
+ ?trUtf8@QAbstractUriResolver@@SA?AVQString@@PBD0@Z @ 260 NONAME ; class QString QAbstractUriResolver::trUtf8(char const *, char const *)
+ ?trUtf8@QAbstractUriResolver@@SA?AVQString@@PBD0H@Z @ 261 NONAME ; class QString QAbstractUriResolver::trUtf8(char const *, char const *, int)
+ ?type@QAbstractXmlNodeModel@@UBE?AV?$QExplicitlySharedDataPointer@VItemType@QPatternist@@@@ABVQXmlNodeModelIndex@@@Z @ 262 NONAME ; class QExplicitlySharedDataPointer<class QPatternist::ItemType> QAbstractXmlNodeModel::type(class QXmlNodeModelIndex const &) const
+ ?type@QXmlNodeModelIndex@@QBE?AV?$QExplicitlySharedDataPointer@VItemType@QPatternist@@@@XZ @ 263 NONAME ; class QExplicitlySharedDataPointer<class QPatternist::ItemType> QXmlNodeModelIndex::type(void) const
+ ?uri@QSourceLocation@@QBE?AVQUrl@@XZ @ 264 NONAME ; class QUrl QSourceLocation::uri(void) const
+ ?uriResolver@QXmlQuery@@QBEPBVQAbstractUriResolver@@XZ @ 265 NONAME ; class QAbstractUriResolver const * QXmlQuery::uriResolver(void) const
+ ?uriResolver@QXmlSchema@@QBEPBVQAbstractUriResolver@@XZ @ 266 NONAME ; class QAbstractUriResolver const * QXmlSchema::uriResolver(void) const
+ ?uriResolver@QXmlSchemaValidator@@QBEPBVQAbstractUriResolver@@XZ @ 267 NONAME ; class QAbstractUriResolver const * QXmlSchemaValidator::uriResolver(void) const
+ ?validate@QXmlSchemaValidator@@QBE_NABVQByteArray@@ABVQUrl@@@Z @ 268 NONAME ; bool QXmlSchemaValidator::validate(class QByteArray const &, class QUrl const &) const
+ ?validate@QXmlSchemaValidator@@QBE_NABVQUrl@@@Z @ 269 NONAME ; bool QXmlSchemaValidator::validate(class QUrl const &) const
+ ?validate@QXmlSchemaValidator@@QBE_NPAVQIODevice@@ABVQUrl@@@Z @ 270 NONAME ; bool QXmlSchemaValidator::validate(class QIODevice *, class QUrl const &) const
+ ?whitespaceOnly@QAbstractXmlReceiver@@UAEXABVQStringRef@@@Z @ 271 NONAME ; void QAbstractXmlReceiver::whitespaceOnly(class QStringRef const &)
+ ?write@QXmlSerializer@@AAEXABVQString@@@Z @ 272 NONAME ; void QXmlSerializer::write(class QString const &)
+ ?write@QXmlSerializer@@AAEXABVQXmlName@@@Z @ 273 NONAME ; void QXmlSerializer::write(class QXmlName const &)
+ ?write@QXmlSerializer@@AAEXPBD@Z @ 274 NONAME ; void QXmlSerializer::write(char const *)
+ ?writeEscaped@QXmlSerializer@@AAEXABVQString@@@Z @ 275 NONAME ; void QXmlSerializer::writeEscaped(class QString const &)
+ ?writeEscapedAttribute@QXmlSerializer@@AAEXABVQString@@@Z @ 276 NONAME ; void QXmlSerializer::writeEscapedAttribute(class QString const &)
+ ?staticMetaObject@QAbstractMessageHandler@@2UQMetaObject@@B @ 277 NONAME ; struct QMetaObject const QAbstractMessageHandler::staticMetaObject
+ ?staticMetaObject@QAbstractUriResolver@@2UQMetaObject@@B @ 278 NONAME ; struct QMetaObject const QAbstractUriResolver::staticMetaObject
+
diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def
index 2ecc48f963..487d989e26 100644
--- a/src/s60installs/eabi/QtCoreu.def
+++ b/src/s60installs/eabi/QtCoreu.def
@@ -2136,7 +2136,7 @@ EXPORTS
_ZN9QHashData11shared_nullE @ 2135 NONAME DATA 32
_ZN9QHashData12allocateNodeEv @ 2136 NONAME
_ZN9QHashData12previousNodeEPNS_4NodeE @ 2137 NONAME
- _ZN9QHashData13detach_helperEPFvPNS_4NodeEPvEPFvS1_Ei @ 2138 NONAME
+ _ZN9QHashData13detach_helperEPFvPNS_4NodeEPvEPFvS1_Ei @ 2138 NONAME ABSENT
_ZN9QHashData13detach_helperEPFvPNS_4NodeEPvEi @ 2139 NONAME
_ZN9QHashData14destroyAndFreeEv @ 2140 NONAME
_ZN9QHashData6rehashEi @ 2141 NONAME
@@ -3577,4 +3577,27 @@ EXPORTS
uncompress @ 3576 NONAME
zError @ 3577 NONAME
zlibVersion @ 3578 NONAME
+ _Z12qFreeAlignedPv @ 3579 NONAME
+ _Z14qMallocAlignedjj @ 3580 NONAME
+ _Z15qReallocAlignedPvjjj @ 3581 NONAME
+ _ZN11QVectorData10reallocateEPS_iii @ 3582 NONAME
+ _ZN11QVectorData4freeEPS_i @ 3583 NONAME
+ _ZN11QVectorData8allocateEii @ 3584 NONAME
+ _ZN12QLibraryInfo9buildDateEv @ 3585 NONAME
+ _ZN20QContiguousCacheData4freeEPS_ @ 3586 NONAME
+ _ZN20QContiguousCacheData8allocateEii @ 3587 NONAME
+ _ZN20QStateMachinePrivate12toFinalStateEP14QAbstractState @ 3588 NONAME
+ _ZN20QStateMachinePrivate14toHistoryStateEP14QAbstractState @ 3589 NONAME
+ _ZN20QStateMachinePrivate15toStandardStateEP14QAbstractState @ 3590 NONAME
+ _ZN20QStateMachinePrivate15toStandardStateEPK14QAbstractState @ 3591 NONAME
+ _ZN20QStateMachinePrivate17postExternalEventEP6QEvent @ 3592 NONAME
+ _ZN20QStateMachinePrivate17postInternalEventEP6QEvent @ 3593 NONAME
+ _ZN20QStateMachinePrivate20dequeueExternalEventEv @ 3594 NONAME
+ _ZN20QStateMachinePrivate20dequeueInternalEventEv @ 3595 NONAME
+ _ZN20QStateMachinePrivate25isExternalEventQueueEmptyEv @ 3596 NONAME
+ _ZN20QStateMachinePrivate25isInternalEventQueueEmptyEv @ 3597 NONAME
+ _ZN8QMapData10createDataEi @ 3598 NONAME
+ _ZN8QMapData11node_createEPPNS_4NodeEii @ 3599 NONAME
+ _ZN9QHashData12allocateNodeEi @ 3600 NONAME
+ _ZN9QHashData14detach_helper2EPFvPNS_4NodeEPvEPFvS1_Eii @ 3601 NONAME
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index 2d1c42fee4..5d66fb7eee 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -4060,7 +4060,7 @@ EXPORTS
_ZN17QPixmapBlurFilter11setBlurHintEN2Qt10RenderHintE @ 4059 NONAME
_ZN17QPixmapBlurFilter16staticMetaObjectE @ 4060 NONAME DATA 16
_ZN17QPixmapBlurFilter19getStaticMetaObjectEv @ 4061 NONAME
- _ZN17QPixmapBlurFilter9setRadiusEi @ 4062 NONAME
+ _ZN17QPixmapBlurFilter9setRadiusEi @ 4062 NONAME ABSENT
_ZN17QPixmapBlurFilterC1EP7QObject @ 4063 NONAME
_ZN17QPixmapBlurFilterC2EP7QObject @ 4064 NONAME
_ZN17QPixmapBlurFilterD0Ev @ 4065 NONAME
@@ -4361,40 +4361,40 @@ EXPORTS
_ZN19QApplicationPrivateD0Ev @ 4360 NONAME
_ZN19QApplicationPrivateD1Ev @ 4361 NONAME
_ZN19QApplicationPrivateD2Ev @ 4362 NONAME
- _ZN19QCoeFepInputContext10Extension1ERi @ 4363 NONAME
- _ZN19QCoeFepInputContext10applyHintsE6QFlagsIN2Qt15InputMethodHintEE @ 4364 NONAME
- _ZN19QCoeFepInputContext11applyFormatEP5QListIN17QInputMethodEvent9AttributeEE @ 4365 NONAME
- _ZN19QCoeFepInputContext11filterEventEPK6QEvent @ 4366 NONAME
- _ZN19QCoeFepInputContext11qt_metacallEN11QMetaObject4CallEiPPv @ 4367 NONAME
- _ZN19QCoeFepInputContext11qt_metacastEPKc @ 4368 NONAME
- _ZN19QCoeFepInputContext11updateHintsEb @ 4369 NONAME
- _ZN19QCoeFepInputContext12mouseHandlerEiP11QMouseEvent @ 4370 NONAME
- _ZN19QCoeFepInputContext14setFocusWidgetEP7QWidget @ 4371 NONAME
- _ZN19QCoeFepInputContext15MopSupplyObjectE8TTypeUid @ 4372 NONAME
- _ZN19QCoeFepInputContext15widgetDestroyedEP7QWidget @ 4373 NONAME
- _ZN19QCoeFepInputContext16staticMetaObjectE @ 4374 NONAME DATA 16
- _ZN19QCoeFepInputContext17inputCapabilitiesEv @ 4375 NONAME
- _ZN19QCoeFepInputContext19CancelFepInlineEditEv @ 4376 NONAME
- _ZN19QCoeFepInputContext19StartFepInlineEditLERK7TDesC16iiPK15MFormCustomDrawR29MFepInlineTextFormatRetrieverR39MFepPointerEventHandlerDuringInlineEdit @ 4377 NONAME
- _ZN19QCoeFepInputContext19commitCurrentStringEb @ 4378 NONAME
- _ZN19QCoeFepInputContext19getStaticMetaObjectEv @ 4379 NONAME
- _ZN19QCoeFepInputContext20UpdateFepInlineTextLERK7TDesC16i @ 4380 NONAME
- _ZN19QCoeFepInputContext21ReportAknEdStateEventEN19MAknEdStateObserver19EAknEdwinStateEventE @ 4381 NONAME
- _ZN19QCoeFepInputContext22DoCommitFepInlineEditLEv @ 4382 NONAME
- _ZN19QCoeFepInputContext25SetCursorSelectionForFepLERK16TCursorSelection @ 4383 NONAME
- _ZN19QCoeFepInputContext29SetStateTransferingOwnershipLEPN33MCoeFepAwareTextEditor_Extension16CStateE4TUid @ 4384 NONAME
- _ZN19QCoeFepInputContext29queueInputCapabilitiesChangedEv @ 4385 NONAME
- _ZN19QCoeFepInputContext30ensureInputCapabilitiesChangedEv @ 4386 NONAME
- _ZN19QCoeFepInputContext33SetInlineEditingCursorVisibilityLEi @ 4387 NONAME
- _ZN19QCoeFepInputContext5StateE4TUid @ 4388 NONAME
- _ZN19QCoeFepInputContext5resetEv @ 4389 NONAME
- _ZN19QCoeFepInputContext6updateEv @ 4390 NONAME
- _ZN19QCoeFepInputContext8languageEv @ 4391 NONAME
- _ZN19QCoeFepInputContextC1EP7QObject @ 4392 NONAME
- _ZN19QCoeFepInputContextC2EP7QObject @ 4393 NONAME
- _ZN19QCoeFepInputContextD0Ev @ 4394 NONAME
- _ZN19QCoeFepInputContextD1Ev @ 4395 NONAME
- _ZN19QCoeFepInputContextD2Ev @ 4396 NONAME
+ _ZN19QCoeFepInputContext10Extension1ERi @ 4363 NONAME ABSENT
+ _ZN19QCoeFepInputContext10applyHintsE6QFlagsIN2Qt15InputMethodHintEE @ 4364 NONAME ABSENT
+ _ZN19QCoeFepInputContext11applyFormatEP5QListIN17QInputMethodEvent9AttributeEE @ 4365 NONAME ABSENT
+ _ZN19QCoeFepInputContext11filterEventEPK6QEvent @ 4366 NONAME ABSENT
+ _ZN19QCoeFepInputContext11qt_metacallEN11QMetaObject4CallEiPPv @ 4367 NONAME ABSENT
+ _ZN19QCoeFepInputContext11qt_metacastEPKc @ 4368 NONAME ABSENT
+ _ZN19QCoeFepInputContext11updateHintsEb @ 4369 NONAME ABSENT
+ _ZN19QCoeFepInputContext12mouseHandlerEiP11QMouseEvent @ 4370 NONAME ABSENT
+ _ZN19QCoeFepInputContext14setFocusWidgetEP7QWidget @ 4371 NONAME ABSENT
+ _ZN19QCoeFepInputContext15MopSupplyObjectE8TTypeUid @ 4372 NONAME ABSENT
+ _ZN19QCoeFepInputContext15widgetDestroyedEP7QWidget @ 4373 NONAME ABSENT
+ _ZN19QCoeFepInputContext16staticMetaObjectE @ 4374 NONAME DATA 16 ABSENT
+ _ZN19QCoeFepInputContext17inputCapabilitiesEv @ 4375 NONAME ABSENT
+ _ZN19QCoeFepInputContext19CancelFepInlineEditEv @ 4376 NONAME ABSENT
+ _ZN19QCoeFepInputContext19StartFepInlineEditLERK7TDesC16iiPK15MFormCustomDrawR29MFepInlineTextFormatRetrieverR39MFepPointerEventHandlerDuringInlineEdit @ 4377 NONAME ABSENT
+ _ZN19QCoeFepInputContext19commitCurrentStringEb @ 4378 NONAME ABSENT
+ _ZN19QCoeFepInputContext19getStaticMetaObjectEv @ 4379 NONAME ABSENT
+ _ZN19QCoeFepInputContext20UpdateFepInlineTextLERK7TDesC16i @ 4380 NONAME ABSENT
+ _ZN19QCoeFepInputContext21ReportAknEdStateEventEN19MAknEdStateObserver19EAknEdwinStateEventE @ 4381 NONAME ABSENT
+ _ZN19QCoeFepInputContext22DoCommitFepInlineEditLEv @ 4382 NONAME ABSENT
+ _ZN19QCoeFepInputContext25SetCursorSelectionForFepLERK16TCursorSelection @ 4383 NONAME ABSENT
+ _ZN19QCoeFepInputContext29SetStateTransferingOwnershipLEPN33MCoeFepAwareTextEditor_Extension16CStateE4TUid @ 4384 NONAME ABSENT
+ _ZN19QCoeFepInputContext29queueInputCapabilitiesChangedEv @ 4385 NONAME ABSENT
+ _ZN19QCoeFepInputContext30ensureInputCapabilitiesChangedEv @ 4386 NONAME ABSENT
+ _ZN19QCoeFepInputContext33SetInlineEditingCursorVisibilityLEi @ 4387 NONAME ABSENT
+ _ZN19QCoeFepInputContext5StateE4TUid @ 4388 NONAME ABSENT
+ _ZN19QCoeFepInputContext5resetEv @ 4389 NONAME ABSENT
+ _ZN19QCoeFepInputContext6updateEv @ 4390 NONAME ABSENT
+ _ZN19QCoeFepInputContext8languageEv @ 4391 NONAME ABSENT
+ _ZN19QCoeFepInputContextC1EP7QObject @ 4392 NONAME ABSENT
+ _ZN19QCoeFepInputContextC2EP7QObject @ 4393 NONAME ABSENT
+ _ZN19QCoeFepInputContextD0Ev @ 4394 NONAME ABSENT
+ _ZN19QCoeFepInputContextD1Ev @ 4395 NONAME ABSENT
+ _ZN19QCoeFepInputContextD2Ev @ 4396 NONAME ABSENT
_ZN19QEventDispatcherS6011qt_metacallEN11QMetaObject4CallEiPPv @ 4397 NONAME
_ZN19QEventDispatcherS6011qt_metacastEPKc @ 4398 NONAME
_ZN19QEventDispatcherS6013processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE @ 4399 NONAME
@@ -4412,10 +4412,10 @@ EXPORTS
_ZN19QGraphicsBlurEffect11qt_metacallEN11QMetaObject4CallEiPPv @ 4411 NONAME
_ZN19QGraphicsBlurEffect11qt_metacastEPKc @ 4412 NONAME
_ZN19QGraphicsBlurEffect11setBlurHintEN2Qt10RenderHintE @ 4413 NONAME
- _ZN19QGraphicsBlurEffect13setBlurRadiusEi @ 4414 NONAME
+ _ZN19QGraphicsBlurEffect13setBlurRadiusEi @ 4414 NONAME ABSENT
_ZN19QGraphicsBlurEffect15blurHintChangedEN2Qt10RenderHintE @ 4415 NONAME
_ZN19QGraphicsBlurEffect16staticMetaObjectE @ 4416 NONAME DATA 16
- _ZN19QGraphicsBlurEffect17blurRadiusChangedEi @ 4417 NONAME
+ _ZN19QGraphicsBlurEffect17blurRadiusChangedEi @ 4417 NONAME ABSENT
_ZN19QGraphicsBlurEffect19getStaticMetaObjectEv @ 4418 NONAME
_ZN19QGraphicsBlurEffect4drawEP8QPainterP21QGraphicsEffectSource @ 4419 NONAME
_ZN19QGraphicsBlurEffectC1EP7QObject @ 4420 NONAME
@@ -4625,24 +4625,24 @@ EXPORTS
_ZN19QToolBarChangeEventD0Ev @ 4624 NONAME
_ZN19QToolBarChangeEventD1Ev @ 4625 NONAME
_ZN19QToolBarChangeEventD2Ev @ 4626 NONAME
- _ZN20QGraphicsBloomEffect11qt_metacallEN11QMetaObject4CallEiPPv @ 4627 NONAME
- _ZN20QGraphicsBloomEffect11qt_metacastEPKc @ 4628 NONAME
- _ZN20QGraphicsBloomEffect11setBlurHintEN2Qt10RenderHintE @ 4629 NONAME
- _ZN20QGraphicsBloomEffect11setStrengthEf @ 4630 NONAME
- _ZN20QGraphicsBloomEffect13setBlurRadiusEi @ 4631 NONAME
- _ZN20QGraphicsBloomEffect13setBrightnessEi @ 4632 NONAME
- _ZN20QGraphicsBloomEffect15blurHintChangedEN2Qt10RenderHintE @ 4633 NONAME
- _ZN20QGraphicsBloomEffect15strengthChangedEf @ 4634 NONAME
- _ZN20QGraphicsBloomEffect16staticMetaObjectE @ 4635 NONAME DATA 16
- _ZN20QGraphicsBloomEffect17blurRadiusChangedEi @ 4636 NONAME
- _ZN20QGraphicsBloomEffect17brightnessChangedEi @ 4637 NONAME
- _ZN20QGraphicsBloomEffect19getStaticMetaObjectEv @ 4638 NONAME
- _ZN20QGraphicsBloomEffect4drawEP8QPainterP21QGraphicsEffectSource @ 4639 NONAME
- _ZN20QGraphicsBloomEffectC1EP7QObject @ 4640 NONAME
- _ZN20QGraphicsBloomEffectC2EP7QObject @ 4641 NONAME
- _ZN20QGraphicsBloomEffectD0Ev @ 4642 NONAME
- _ZN20QGraphicsBloomEffectD1Ev @ 4643 NONAME
- _ZN20QGraphicsBloomEffectD2Ev @ 4644 NONAME
+ _ZN20QGraphicsBloomEffect11qt_metacallEN11QMetaObject4CallEiPPv @ 4627 NONAME ABSENT
+ _ZN20QGraphicsBloomEffect11qt_metacastEPKc @ 4628 NONAME ABSENT
+ _ZN20QGraphicsBloomEffect11setBlurHintEN2Qt10RenderHintE @ 4629 NONAME ABSENT
+ _ZN20QGraphicsBloomEffect11setStrengthEf @ 4630 NONAME ABSENT
+ _ZN20QGraphicsBloomEffect13setBlurRadiusEi @ 4631 NONAME ABSENT
+ _ZN20QGraphicsBloomEffect13setBrightnessEi @ 4632 NONAME ABSENT
+ _ZN20QGraphicsBloomEffect15blurHintChangedEN2Qt10RenderHintE @ 4633 NONAME ABSENT
+ _ZN20QGraphicsBloomEffect15strengthChangedEf @ 4634 NONAME ABSENT
+ _ZN20QGraphicsBloomEffect16staticMetaObjectE @ 4635 NONAME DATA 16 ABSENT
+ _ZN20QGraphicsBloomEffect17blurRadiusChangedEi @ 4636 NONAME ABSENT
+ _ZN20QGraphicsBloomEffect17brightnessChangedEi @ 4637 NONAME ABSENT
+ _ZN20QGraphicsBloomEffect19getStaticMetaObjectEv @ 4638 NONAME ABSENT
+ _ZN20QGraphicsBloomEffect4drawEP8QPainterP21QGraphicsEffectSource @ 4639 NONAME ABSENT
+ _ZN20QGraphicsBloomEffectC1EP7QObject @ 4640 NONAME ABSENT
+ _ZN20QGraphicsBloomEffectC2EP7QObject @ 4641 NONAME ABSENT
+ _ZN20QGraphicsBloomEffectD0Ev @ 4642 NONAME ABSENT
+ _ZN20QGraphicsBloomEffectD1Ev @ 4643 NONAME ABSENT
+ _ZN20QGraphicsBloomEffectD2Ev @ 4644 NONAME ABSENT
_ZN20QGraphicsEllipseItem12setExtensionEN13QGraphicsItem9ExtensionERK8QVariant @ 4645 NONAME
_ZN20QGraphicsEllipseItem12setSpanAngleEi @ 4646 NONAME
_ZN20QGraphicsEllipseItem13setStartAngleEi @ 4647 NONAME
@@ -5082,18 +5082,18 @@ EXPORTS
_ZN23QGraphicsColorizeEffectD0Ev @ 5081 NONAME
_ZN23QGraphicsColorizeEffectD1Ev @ 5082 NONAME
_ZN23QGraphicsColorizeEffectD2Ev @ 5083 NONAME
- _ZN23QGraphicsPixelizeEffect11qt_metacallEN11QMetaObject4CallEiPPv @ 5084 NONAME
- _ZN23QGraphicsPixelizeEffect11qt_metacastEPKc @ 5085 NONAME
- _ZN23QGraphicsPixelizeEffect12setPixelSizeEi @ 5086 NONAME
- _ZN23QGraphicsPixelizeEffect16pixelSizeChangedEi @ 5087 NONAME
- _ZN23QGraphicsPixelizeEffect16staticMetaObjectE @ 5088 NONAME DATA 16
- _ZN23QGraphicsPixelizeEffect19getStaticMetaObjectEv @ 5089 NONAME
- _ZN23QGraphicsPixelizeEffect4drawEP8QPainterP21QGraphicsEffectSource @ 5090 NONAME
- _ZN23QGraphicsPixelizeEffectC1EP7QObject @ 5091 NONAME
- _ZN23QGraphicsPixelizeEffectC2EP7QObject @ 5092 NONAME
- _ZN23QGraphicsPixelizeEffectD0Ev @ 5093 NONAME
- _ZN23QGraphicsPixelizeEffectD1Ev @ 5094 NONAME
- _ZN23QGraphicsPixelizeEffectD2Ev @ 5095 NONAME
+ _ZN23QGraphicsPixelizeEffect11qt_metacallEN11QMetaObject4CallEiPPv @ 5084 NONAME ABSENT
+ _ZN23QGraphicsPixelizeEffect11qt_metacastEPKc @ 5085 NONAME ABSENT
+ _ZN23QGraphicsPixelizeEffect12setPixelSizeEi @ 5086 NONAME ABSENT
+ _ZN23QGraphicsPixelizeEffect16pixelSizeChangedEi @ 5087 NONAME ABSENT
+ _ZN23QGraphicsPixelizeEffect16staticMetaObjectE @ 5088 NONAME DATA 16 ABSENT
+ _ZN23QGraphicsPixelizeEffect19getStaticMetaObjectEv @ 5089 NONAME ABSENT
+ _ZN23QGraphicsPixelizeEffect4drawEP8QPainterP21QGraphicsEffectSource @ 5090 NONAME ABSENT
+ _ZN23QGraphicsPixelizeEffectC1EP7QObject @ 5091 NONAME ABSENT
+ _ZN23QGraphicsPixelizeEffectC2EP7QObject @ 5092 NONAME ABSENT
+ _ZN23QGraphicsPixelizeEffectD0Ev @ 5093 NONAME ABSENT
+ _ZN23QGraphicsPixelizeEffectD1Ev @ 5094 NONAME ABSENT
+ _ZN23QGraphicsPixelizeEffectD2Ev @ 5095 NONAME ABSENT
_ZN23QGraphicsSceneHelpEvent11setScenePosERK7QPointF @ 5096 NONAME
_ZN23QGraphicsSceneHelpEvent12setScreenPosERK6QPoint @ 5097 NONAME
_ZN23QGraphicsSceneHelpEventC1EN6QEvent4TypeE @ 5098 NONAME
@@ -5127,7 +5127,7 @@ EXPORTS
_ZN23QPaintBufferSignalProxy8instanceEv @ 5126 NONAME
_ZN23QPixmapDropShadowFilter11qt_metacallEN11QMetaObject4CallEiPPv @ 5127 NONAME
_ZN23QPixmapDropShadowFilter11qt_metacastEPKc @ 5128 NONAME
- _ZN23QPixmapDropShadowFilter13setBlurRadiusEi @ 5129 NONAME
+ _ZN23QPixmapDropShadowFilter13setBlurRadiusEi @ 5129 NONAME ABSENT
_ZN23QPixmapDropShadowFilter16staticMetaObjectE @ 5130 NONAME DATA 16
_ZN23QPixmapDropShadowFilter19getStaticMetaObjectEv @ 5131 NONAME
_ZN23QPixmapDropShadowFilter8setColorERK6QColor @ 5132 NONAME
@@ -5161,18 +5161,18 @@ EXPORTS
_ZN23QWindowStateChangeEventD0Ev @ 5160 NONAME
_ZN23QWindowStateChangeEventD1Ev @ 5161 NONAME
_ZN23QWindowStateChangeEventD2Ev @ 5162 NONAME
- _ZN24QGraphicsGrayscaleEffect11qt_metacallEN11QMetaObject4CallEiPPv @ 5163 NONAME
- _ZN24QGraphicsGrayscaleEffect11qt_metacastEPKc @ 5164 NONAME
- _ZN24QGraphicsGrayscaleEffect11setStrengthEf @ 5165 NONAME
- _ZN24QGraphicsGrayscaleEffect15strengthChangedEf @ 5166 NONAME
- _ZN24QGraphicsGrayscaleEffect16staticMetaObjectE @ 5167 NONAME DATA 16
- _ZN24QGraphicsGrayscaleEffect19getStaticMetaObjectEv @ 5168 NONAME
- _ZN24QGraphicsGrayscaleEffect4drawEP8QPainterP21QGraphicsEffectSource @ 5169 NONAME
- _ZN24QGraphicsGrayscaleEffectC1EP7QObject @ 5170 NONAME
- _ZN24QGraphicsGrayscaleEffectC2EP7QObject @ 5171 NONAME
- _ZN24QGraphicsGrayscaleEffectD0Ev @ 5172 NONAME
- _ZN24QGraphicsGrayscaleEffectD1Ev @ 5173 NONAME
- _ZN24QGraphicsGrayscaleEffectD2Ev @ 5174 NONAME
+ _ZN24QGraphicsGrayscaleEffect11qt_metacallEN11QMetaObject4CallEiPPv @ 5163 NONAME ABSENT
+ _ZN24QGraphicsGrayscaleEffect11qt_metacastEPKc @ 5164 NONAME ABSENT
+ _ZN24QGraphicsGrayscaleEffect11setStrengthEf @ 5165 NONAME ABSENT
+ _ZN24QGraphicsGrayscaleEffect15strengthChangedEf @ 5166 NONAME ABSENT
+ _ZN24QGraphicsGrayscaleEffect16staticMetaObjectE @ 5167 NONAME DATA 16 ABSENT
+ _ZN24QGraphicsGrayscaleEffect19getStaticMetaObjectEv @ 5168 NONAME ABSENT
+ _ZN24QGraphicsGrayscaleEffect4drawEP8QPainterP21QGraphicsEffectSource @ 5169 NONAME ABSENT
+ _ZN24QGraphicsGrayscaleEffectC1EP7QObject @ 5170 NONAME ABSENT
+ _ZN24QGraphicsGrayscaleEffectC2EP7QObject @ 5171 NONAME ABSENT
+ _ZN24QGraphicsGrayscaleEffectD0Ev @ 5172 NONAME ABSENT
+ _ZN24QGraphicsGrayscaleEffectD1Ev @ 5173 NONAME ABSENT
+ _ZN24QGraphicsGrayscaleEffectD2Ev @ 5174 NONAME ABSENT
_ZN24QGraphicsSceneHoverEvent10setLastPosERK7QPointF @ 5175 NONAME
_ZN24QGraphicsSceneHoverEvent11setScenePosERK7QPointF @ 5176 NONAME
_ZN24QGraphicsSceneHoverEvent12setModifiersE6QFlagsIN2Qt16KeyboardModifierEE @ 5177 NONAME
@@ -5276,9 +5276,9 @@ EXPORTS
_ZN25QGraphicsDropShadowEffect11qt_metacastEPKc @ 5275 NONAME
_ZN25QGraphicsDropShadowEffect12colorChangedERK6QColor @ 5276 NONAME
_ZN25QGraphicsDropShadowEffect13offsetChangedERK7QPointF @ 5277 NONAME
- _ZN25QGraphicsDropShadowEffect13setBlurRadiusEi @ 5278 NONAME
+ _ZN25QGraphicsDropShadowEffect13setBlurRadiusEi @ 5278 NONAME ABSENT
_ZN25QGraphicsDropShadowEffect16staticMetaObjectE @ 5279 NONAME DATA 16
- _ZN25QGraphicsDropShadowEffect17blurRadiusChangedEi @ 5280 NONAME
+ _ZN25QGraphicsDropShadowEffect17blurRadiusChangedEi @ 5280 NONAME ABSENT
_ZN25QGraphicsDropShadowEffect19getStaticMetaObjectEv @ 5281 NONAME
_ZN25QGraphicsDropShadowEffect4drawEP8QPainterP21QGraphicsEffectSource @ 5282 NONAME
_ZN25QGraphicsDropShadowEffect8setColorERK6QColor @ 5283 NONAME
@@ -8817,7 +8817,7 @@ EXPORTS
_ZNK14QWidgetPrivate13isAboutToShowEv @ 8816 NONAME
_ZNK14QWidgetPrivate13paintOnScreenEv @ 8817 NONAME
_ZNK14QWidgetPrivate14childAt_helperERK6QPointb @ 8818 NONAME
- _ZNK14QWidgetPrivate15getOpaqueRegionEv @ 8819 NONAME
+ _ZNK14QWidgetPrivate15getOpaqueRegionEv @ 8819 NONAME ABSENT
_ZNK14QWidgetPrivate15paintBackgroundEP8QPainterRK7QRegioni @ 8820 NONAME
_ZNK14QWidgetPrivate17getOpaqueChildrenEv @ 8821 NONAME
_ZNK14QWidgetPrivate17naturalWidgetFontEj @ 8822 NONAME
@@ -9263,13 +9263,13 @@ EXPORTS
_ZNK19QAbstractScrollArea8viewportEv @ 9262 NONAME
_ZNK19QApplicationPrivate11inPopupModeEv @ 9263 NONAME
_ZNK19QApplicationPrivate7appNameEv @ 9264 NONAME
- _ZNK19QCoeFepInputContext10metaObjectEv @ 9265 NONAME
- _ZNK19QCoeFepInputContext15GetFormatForFepER11TCharFormati @ 9266 NONAME
- _ZNK19QCoeFepInputContext20DocumentLengthForFepEv @ 9267 NONAME
- _ZNK19QCoeFepInputContext22GetEditorContentForFepER6TDes16ii @ 9268 NONAME
- _ZNK19QCoeFepInputContext24GetCursorSelectionForFepER16TCursorSelection @ 9269 NONAME
- _ZNK19QCoeFepInputContext27DocumentMaximumLengthForFepEv @ 9270 NONAME
- _ZNK19QCoeFepInputContext27GetScreenCoordinatesForFepLER6TPointRiS2_i @ 9271 NONAME
+ _ZNK19QCoeFepInputContext10metaObjectEv @ 9265 NONAME ABSENT
+ _ZNK19QCoeFepInputContext15GetFormatForFepER11TCharFormati @ 9266 NONAME ABSENT
+ _ZNK19QCoeFepInputContext20DocumentLengthForFepEv @ 9267 NONAME ABSENT
+ _ZNK19QCoeFepInputContext22GetEditorContentForFepER6TDes16ii @ 9268 NONAME ABSENT
+ _ZNK19QCoeFepInputContext24GetCursorSelectionForFepER16TCursorSelection @ 9269 NONAME ABSENT
+ _ZNK19QCoeFepInputContext27DocumentMaximumLengthForFepEv @ 9270 NONAME ABSENT
+ _ZNK19QCoeFepInputContext27GetScreenCoordinatesForFepLER6TPointRiS2_i @ 9271 NONAME ABSENT
_ZNK19QEventDispatcherS6010metaObjectEv @ 9272 NONAME
_ZNK19QGraphicsBlurEffect10blurRadiusEv @ 9273 NONAME
_ZNK19QGraphicsBlurEffect10metaObjectEv @ 9274 NONAME
@@ -9366,12 +9366,12 @@ EXPORTS
_ZNK19QTextDocumentWriter6deviceEv @ 9365 NONAME
_ZNK19QTextDocumentWriter6formatEv @ 9366 NONAME
_ZNK19QTextDocumentWriter8fileNameEv @ 9367 NONAME
- _ZNK20QGraphicsBloomEffect10blurRadiusEv @ 9368 NONAME
- _ZNK20QGraphicsBloomEffect10brightnessEv @ 9369 NONAME
- _ZNK20QGraphicsBloomEffect10metaObjectEv @ 9370 NONAME
- _ZNK20QGraphicsBloomEffect15boundingRectForERK6QRectF @ 9371 NONAME
- _ZNK20QGraphicsBloomEffect8blurHintEv @ 9372 NONAME
- _ZNK20QGraphicsBloomEffect8strengthEv @ 9373 NONAME
+ _ZNK20QGraphicsBloomEffect10blurRadiusEv @ 9368 NONAME ABSENT
+ _ZNK20QGraphicsBloomEffect10brightnessEv @ 9369 NONAME ABSENT
+ _ZNK20QGraphicsBloomEffect10metaObjectEv @ 9370 NONAME ABSENT
+ _ZNK20QGraphicsBloomEffect15boundingRectForERK6QRectF @ 9371 NONAME ABSENT
+ _ZNK20QGraphicsBloomEffect8blurHintEv @ 9372 NONAME ABSENT
+ _ZNK20QGraphicsBloomEffect8strengthEv @ 9373 NONAME ABSENT
_ZNK20QGraphicsEllipseItem10opaqueAreaEv @ 9374 NONAME
_ZNK20QGraphicsEllipseItem10startAngleEv @ 9375 NONAME
_ZNK20QGraphicsEllipseItem12boundingRectEv @ 9376 NONAME
@@ -9429,7 +9429,7 @@ EXPORTS
_ZNK21QGraphicsEffectSource11styleOptionEv @ 9428 NONAME
_ZNK21QGraphicsEffectSource12boundingRectEN2Qt16CoordinateSystemE @ 9429 NONAME
_ZNK21QGraphicsEffectSource12graphicsItemEv @ 9430 NONAME
- _ZNK21QGraphicsEffectSource6pixmapEN2Qt16CoordinateSystemEP6QPoint @ 9431 NONAME
+ _ZNK21QGraphicsEffectSource6pixmapEN2Qt16CoordinateSystemEP6QPoint @ 9431 NONAME ABSENT
_ZNK21QGraphicsEffectSource6widgetEv @ 9432 NONAME
_ZNK21QGraphicsEffectSource8isPixmapEv @ 9433 NONAME
_ZNK21QGraphicsLinearLayout11itemSpacingEi @ 9434 NONAME
@@ -9514,8 +9514,8 @@ EXPORTS
_ZNK23QGraphicsColorizeEffect10metaObjectEv @ 9513 NONAME
_ZNK23QGraphicsColorizeEffect5colorEv @ 9514 NONAME
_ZNK23QGraphicsColorizeEffect8strengthEv @ 9515 NONAME
- _ZNK23QGraphicsPixelizeEffect10metaObjectEv @ 9516 NONAME
- _ZNK23QGraphicsPixelizeEffect9pixelSizeEv @ 9517 NONAME
+ _ZNK23QGraphicsPixelizeEffect10metaObjectEv @ 9516 NONAME ABSENT
+ _ZNK23QGraphicsPixelizeEffect9pixelSizeEv @ 9517 NONAME ABSENT
_ZNK23QGraphicsSceneHelpEvent8scenePosEv @ 9518 NONAME
_ZNK23QGraphicsSceneHelpEvent9screenPosEv @ 9519 NONAME
_ZNK23QGraphicsSceneMoveEvent6newPosEv @ 9520 NONAME
@@ -9539,8 +9539,8 @@ EXPORTS
_ZNK23QPixmapDropShadowFilter6offsetEv @ 9538 NONAME
_ZNK23QTreeWidgetItemIterator12matchesFlagsEPK15QTreeWidgetItem @ 9539 NONAME
_ZNK23QWindowStateChangeEvent10isOverrideEv @ 9540 NONAME
- _ZNK24QGraphicsGrayscaleEffect10metaObjectEv @ 9541 NONAME
- _ZNK24QGraphicsGrayscaleEffect8strengthEv @ 9542 NONAME
+ _ZNK24QGraphicsGrayscaleEffect10metaObjectEv @ 9541 NONAME ABSENT
+ _ZNK24QGraphicsGrayscaleEffect8strengthEv @ 9542 NONAME ABSENT
_ZNK24QGraphicsSceneHoverEvent12lastScenePosEv @ 9543 NONAME
_ZNK24QGraphicsSceneHoverEvent13lastScreenPosEv @ 9544 NONAME
_ZNK24QGraphicsSceneHoverEvent3posEv @ 9545 NONAME
@@ -10774,7 +10774,7 @@ EXPORTS
_ZTI19QAbstractProxyModel @ 10773 NONAME
_ZTI19QAbstractScrollArea @ 10774 NONAME
_ZTI19QApplicationPrivate @ 10775 NONAME
- _ZTI19QCoeFepInputContext @ 10776 NONAME
+ _ZTI19QCoeFepInputContext @ 10776 NONAME ABSENT
_ZTI19QEventDispatcherS60 @ 10777 NONAME
_ZTI19QGraphicsBlurEffect @ 10778 NONAME
_ZTI19QGraphicsGridLayout @ 10779 NONAME
@@ -10788,7 +10788,7 @@ EXPORTS
_ZTI19QS60MainApplication @ 10787 NONAME
_ZTI19QStyledItemDelegate @ 10788 NONAME
_ZTI19QToolBarChangeEvent @ 10789 NONAME
- _ZTI20QGraphicsBloomEffect @ 10790 NONAME
+ _ZTI20QGraphicsBloomEffect @ 10790 NONAME ABSENT
_ZTI20QGraphicsEllipseItem @ 10791 NONAME
_ZTI20QGraphicsItemPrivate @ 10792 NONAME
_ZTI20QGraphicsPolygonItem @ 10793 NONAME
@@ -10815,7 +10815,7 @@ EXPORTS
_ZTI22QStyleFactoryInterface @ 10814 NONAME
_ZTI22QWhatsThisClickedEvent @ 10815 NONAME
_ZTI23QGraphicsColorizeEffect @ 10816 NONAME
- _ZTI23QGraphicsPixelizeEffect @ 10817 NONAME
+ _ZTI23QGraphicsPixelizeEffect @ 10817 NONAME ABSENT
_ZTI23QGraphicsSceneHelpEvent @ 10818 NONAME
_ZTI23QGraphicsSceneMoveEvent @ 10819 NONAME
_ZTI23QGraphicsSimpleTextItem @ 10820 NONAME
@@ -10823,7 +10823,7 @@ EXPORTS
_ZTI23QPictureFormatInterface @ 10822 NONAME
_ZTI23QPixmapDropShadowFilter @ 10823 NONAME
_ZTI23QWindowStateChangeEvent @ 10824 NONAME
- _ZTI24QGraphicsGrayscaleEffect @ 10825 NONAME
+ _ZTI24QGraphicsGrayscaleEffect @ 10825 NONAME ABSENT
_ZTI24QGraphicsSceneHoverEvent @ 10826 NONAME
_ZTI24QGraphicsSceneMouseEvent @ 10827 NONAME
_ZTI24QGraphicsSceneWheelEvent @ 10828 NONAME
@@ -11056,7 +11056,7 @@ EXPORTS
_ZTV19QAbstractProxyModel @ 11055 NONAME
_ZTV19QAbstractScrollArea @ 11056 NONAME
_ZTV19QApplicationPrivate @ 11057 NONAME
- _ZTV19QCoeFepInputContext @ 11058 NONAME
+ _ZTV19QCoeFepInputContext @ 11058 NONAME ABSENT
_ZTV19QEventDispatcherS60 @ 11059 NONAME
_ZTV19QGraphicsBlurEffect @ 11060 NONAME
_ZTV19QGraphicsGridLayout @ 11061 NONAME
@@ -11070,7 +11070,7 @@ EXPORTS
_ZTV19QS60MainApplication @ 11069 NONAME
_ZTV19QStyledItemDelegate @ 11070 NONAME
_ZTV19QToolBarChangeEvent @ 11071 NONAME
- _ZTV20QGraphicsBloomEffect @ 11072 NONAME
+ _ZTV20QGraphicsBloomEffect @ 11072 NONAME ABSENT
_ZTV20QGraphicsEllipseItem @ 11073 NONAME
_ZTV20QGraphicsItemPrivate @ 11074 NONAME
_ZTV20QGraphicsPolygonItem @ 11075 NONAME
@@ -11095,14 +11095,14 @@ EXPORTS
_ZTV22QPaintEngineExReplayer @ 11094 NONAME
_ZTV22QWhatsThisClickedEvent @ 11095 NONAME
_ZTV23QGraphicsColorizeEffect @ 11096 NONAME
- _ZTV23QGraphicsPixelizeEffect @ 11097 NONAME
+ _ZTV23QGraphicsPixelizeEffect @ 11097 NONAME ABSENT
_ZTV23QGraphicsSceneHelpEvent @ 11098 NONAME
_ZTV23QGraphicsSceneMoveEvent @ 11099 NONAME
_ZTV23QGraphicsSimpleTextItem @ 11100 NONAME
_ZTV23QPaintBufferSignalProxy @ 11101 NONAME
_ZTV23QPixmapDropShadowFilter @ 11102 NONAME
_ZTV23QWindowStateChangeEvent @ 11103 NONAME
- _ZTV24QGraphicsGrayscaleEffect @ 11104 NONAME
+ _ZTV24QGraphicsGrayscaleEffect @ 11104 NONAME ABSENT
_ZTV24QGraphicsSceneHoverEvent @ 11105 NONAME
_ZTV24QGraphicsSceneMouseEvent @ 11106 NONAME
_ZTV24QGraphicsSceneWheelEvent @ 11107 NONAME
@@ -11164,8 +11164,8 @@ EXPORTS
_ZThn12_N14QDragMoveEventD1Ev @ 11163 NONAME
_ZThn12_N15QDragEnterEventD0Ev @ 11164 NONAME
_ZThn12_N15QDragEnterEventD1Ev @ 11165 NONAME
- _ZThn12_N19QCoeFepInputContext29SetStateTransferingOwnershipLEPN33MCoeFepAwareTextEditor_Extension16CStateE4TUid @ 11166 NONAME
- _ZThn12_N19QCoeFepInputContext5StateE4TUid @ 11167 NONAME
+ _ZThn12_N19QCoeFepInputContext29SetStateTransferingOwnershipLEPN33MCoeFepAwareTextEditor_Extension16CStateE4TUid @ 11166 NONAME ABSENT
+ _ZThn12_N19QCoeFepInputContext5StateE4TUid @ 11167 NONAME ABSENT
_ZThn12_NK10QDropEvent11encodedDataEPKc @ 11168 NONAME
_ZThn12_NK10QDropEvent6formatEi @ 11169 NONAME
_ZThn12_NK10QDropEvent8providesEPKc @ 11170 NONAME
@@ -11173,7 +11173,7 @@ EXPORTS
_ZThn16_N15QGraphicsWidget14updateGeometryEv @ 11172 NONAME
_ZThn16_N15QGraphicsWidgetD0Ev @ 11173 NONAME
_ZThn16_N15QGraphicsWidgetD1Ev @ 11174 NONAME
- _ZThn16_N19QCoeFepInputContext15MopSupplyObjectE8TTypeUid @ 11175 NONAME
+ _ZThn16_N19QCoeFepInputContext15MopSupplyObjectE8TTypeUid @ 11175 NONAME ABSENT
_ZThn16_N20QGraphicsProxyWidget11setGeometryERK6QRectF @ 11176 NONAME
_ZThn16_N20QGraphicsProxyWidgetD0Ev @ 11177 NONAME
_ZThn16_N20QGraphicsProxyWidgetD1Ev @ 11178 NONAME
@@ -11323,13 +11323,13 @@ EXPORTS
_ZThn8_N17QIconEnginePluginD1Ev @ 11322 NONAME
_ZThn8_N19QAbstractScrollAreaD0Ev @ 11323 NONAME
_ZThn8_N19QAbstractScrollAreaD1Ev @ 11324 NONAME
- _ZThn8_N19QCoeFepInputContext10Extension1ERi @ 11325 NONAME
- _ZThn8_N19QCoeFepInputContext19CancelFepInlineEditEv @ 11326 NONAME
- _ZThn8_N19QCoeFepInputContext19StartFepInlineEditLERK7TDesC16iiPK15MFormCustomDrawR29MFepInlineTextFormatRetrieverR39MFepPointerEventHandlerDuringInlineEdit @ 11327 NONAME
- _ZThn8_N19QCoeFepInputContext20UpdateFepInlineTextLERK7TDesC16i @ 11328 NONAME
- _ZThn8_N19QCoeFepInputContext22DoCommitFepInlineEditLEv @ 11329 NONAME
- _ZThn8_N19QCoeFepInputContext25SetCursorSelectionForFepLERK16TCursorSelection @ 11330 NONAME
- _ZThn8_N19QCoeFepInputContext33SetInlineEditingCursorVisibilityLEi @ 11331 NONAME
+ _ZThn8_N19QCoeFepInputContext10Extension1ERi @ 11325 NONAME ABSENT
+ _ZThn8_N19QCoeFepInputContext19CancelFepInlineEditEv @ 11326 NONAME ABSENT
+ _ZThn8_N19QCoeFepInputContext19StartFepInlineEditLERK7TDesC16iiPK15MFormCustomDrawR29MFepInlineTextFormatRetrieverR39MFepPointerEventHandlerDuringInlineEdit @ 11327 NONAME ABSENT
+ _ZThn8_N19QCoeFepInputContext20UpdateFepInlineTextLERK7TDesC16i @ 11328 NONAME ABSENT
+ _ZThn8_N19QCoeFepInputContext22DoCommitFepInlineEditLEv @ 11329 NONAME ABSENT
+ _ZThn8_N19QCoeFepInputContext25SetCursorSelectionForFepLERK16TCursorSelection @ 11330 NONAME ABSENT
+ _ZThn8_N19QCoeFepInputContext33SetInlineEditingCursorVisibilityLEi @ 11331 NONAME ABSENT
_ZThn8_N19QIconEnginePluginV2D0Ev @ 11332 NONAME
_ZThn8_N19QIconEnginePluginV2D1Ev @ 11333 NONAME
_ZThn8_N19QInputContextPluginD0Ev @ 11334 NONAME
@@ -11446,12 +11446,12 @@ EXPORTS
_ZThn8_NK17QGraphicsTextItem5shapeEv @ 11445 NONAME
_ZThn8_NK17QGraphicsTextItem8containsERK7QPointF @ 11446 NONAME
_ZThn8_NK17QGraphicsTextItem9extensionERK8QVariant @ 11447 NONAME
- _ZThn8_NK19QCoeFepInputContext15GetFormatForFepER11TCharFormati @ 11448 NONAME
- _ZThn8_NK19QCoeFepInputContext20DocumentLengthForFepEv @ 11449 NONAME
- _ZThn8_NK19QCoeFepInputContext22GetEditorContentForFepER6TDes16ii @ 11450 NONAME
- _ZThn8_NK19QCoeFepInputContext24GetCursorSelectionForFepER16TCursorSelection @ 11451 NONAME
- _ZThn8_NK19QCoeFepInputContext27DocumentMaximumLengthForFepEv @ 11452 NONAME
- _ZThn8_NK19QCoeFepInputContext27GetScreenCoordinatesForFepLER6TPointRiS2_i @ 11453 NONAME
+ _ZThn8_NK19QCoeFepInputContext15GetFormatForFepER11TCharFormati @ 11448 NONAME ABSENT
+ _ZThn8_NK19QCoeFepInputContext20DocumentLengthForFepEv @ 11449 NONAME ABSENT
+ _ZThn8_NK19QCoeFepInputContext22GetEditorContentForFepER6TDes16ii @ 11450 NONAME ABSENT
+ _ZThn8_NK19QCoeFepInputContext24GetCursorSelectionForFepER16TCursorSelection @ 11451 NONAME ABSENT
+ _ZThn8_NK19QCoeFepInputContext27DocumentMaximumLengthForFepEv @ 11452 NONAME ABSENT
+ _ZThn8_NK19QCoeFepInputContext27GetScreenCoordinatesForFepLER6TPointRiS2_i @ 11453 NONAME ABSENT
_ZThn8_NK20QGraphicsProxyWidget4typeEv @ 11454 NONAME
_ZThn8_NK7QLayout11maximumSizeEv @ 11455 NONAME
_ZThn8_NK7QLayout11minimumSizeEv @ 11456 NONAME
@@ -11635,4 +11635,29 @@ EXPORTS
_ZNK11QTextEngine10fontEngineERK11QScriptItemP6QFixedS4_S4_ @ 11634 NONAME
_ZNK9QTextLine15leadingIncludedEv @ 11635 NONAME
_ZNK9QTextLine7leadingEv @ 11636 NONAME
+ _ZN11QVectorPath12addCacheDataEP14QPaintEngineExPvPFvS2_E @ 11637 NONAME
+ _ZN13QGestureEvent11setAcceptedEN2Qt11GestureTypeEb @ 11638 NONAME
+ _ZN13QGestureEvent6acceptEN2Qt11GestureTypeE @ 11639 NONAME
+ _ZN13QGestureEvent6ignoreEN2Qt11GestureTypeE @ 11640 NONAME
+ _ZN17QPixmapBlurFilter9setRadiusEf @ 11641 NONAME
+ _ZN19QGraphicsBlurEffect13setBlurRadiusEf @ 11642 NONAME
+ _ZN19QGraphicsBlurEffect17blurRadiusChangedEf @ 11643 NONAME
+ _ZN23QPixmapDropShadowFilter13setBlurRadiusEf @ 11644 NONAME
+ _ZN25QGraphicsDropShadowEffect13setBlurRadiusEf @ 11645 NONAME
+ _ZN25QGraphicsDropShadowEffect17blurRadiusChangedEf @ 11646 NONAME
+ _ZN28QStyleOptionTabWidgetFrameV2C1ERK26QStyleOptionTabWidgetFrame @ 11647 NONAME
+ _ZN28QStyleOptionTabWidgetFrameV2C1Ei @ 11648 NONAME
+ _ZN28QStyleOptionTabWidgetFrameV2C1Ev @ 11649 NONAME
+ _ZN28QStyleOptionTabWidgetFrameV2C2ERK26QStyleOptionTabWidgetFrame @ 11650 NONAME
+ _ZN28QStyleOptionTabWidgetFrameV2C2Ei @ 11651 NONAME
+ _ZN28QStyleOptionTabWidgetFrameV2C2Ev @ 11652 NONAME
+ _ZN28QStyleOptionTabWidgetFrameV2aSERK26QStyleOptionTabWidgetFrame @ 11653 NONAME
+ _ZN7QWidget13ungrabGestureEN2Qt11GestureTypeE @ 11654 NONAME
+ _ZN8QGesture22setGestureCancelPolicyENS_19GestureCancelPolicyE @ 11655 NONAME
+ _ZN8QToolBar15topLevelChangedEb @ 11656 NONAME
+ _ZNK13QGestureEvent10isAcceptedEN2Qt11GestureTypeE @ 11657 NONAME
+ _ZNK13QTextDocument18availableRedoStepsEv @ 11658 NONAME
+ _ZNK13QTextDocument18availableUndoStepsEv @ 11659 NONAME
+ _ZNK21QGraphicsEffectSource6pixmapEN2Qt16CoordinateSystemEP6QPointNS_13PixmapPadModeE @ 11660 NONAME
+ _ZNK8QGesture19gestureCancelPolicyEv @ 11661 NONAME
diff --git a/src/s60installs/eabi/QtScriptu.def b/src/s60installs/eabi/QtScriptu.def
index 159266490e..1e81977f9a 100644
--- a/src/s60installs/eabi/QtScriptu.def
+++ b/src/s60installs/eabi/QtScriptu.def
@@ -342,4 +342,21 @@ EXPORTS
_ZlsR11QDataStreamRK18QScriptContextInfo @ 341 NONAME
_ZrsR11QDataStreamR18QScriptContextInfo @ 342 NONAME
_Z5qHashRK13QScriptString @ 343 NONAME
+ _ZN13QScriptEngine8evaluateERK14QScriptProgram @ 344 NONAME
+ _ZN14QScriptProgramC1ERK7QStringS0_i @ 345 NONAME
+ _ZN14QScriptProgramC1ERKS_ @ 346 NONAME
+ _ZN14QScriptProgramC1Ev @ 347 NONAME
+ _ZN14QScriptProgramC2ERK7QStringS0_i @ 348 NONAME
+ _ZN14QScriptProgramC2ERKS_ @ 349 NONAME
+ _ZN14QScriptProgramC2Ev @ 350 NONAME
+ _ZN14QScriptProgramD1Ev @ 351 NONAME
+ _ZN14QScriptProgramD2Ev @ 352 NONAME
+ _ZN14QScriptProgramaSERKS_ @ 353 NONAME
+ _ZNK13QScriptString12toArrayIndexEPb @ 354 NONAME
+ _ZNK14QScriptProgram10sourceCodeEv @ 355 NONAME
+ _ZNK14QScriptProgram15firstLineNumberEv @ 356 NONAME
+ _ZNK14QScriptProgram6isNullEv @ 357 NONAME
+ _ZNK14QScriptProgram8fileNameEv @ 358 NONAME
+ _ZNK14QScriptProgrameqERKS_ @ 359 NONAME
+ _ZNK14QScriptProgramneERKS_ @ 360 NONAME
diff --git a/src/s60installs/eabi/QtXmlPatternsu.def b/src/s60installs/eabi/QtXmlPatternsu.def
new file mode 100644
index 0000000000..5168c39f35
--- /dev/null
+++ b/src/s60installs/eabi/QtXmlPatternsu.def
@@ -0,0 +1,253 @@
+EXPORTS
+ _Z5qHashRK15QSourceLocation @ 1 NONAME
+ _Z5qHashRK18QXmlNodeModelIndex @ 2 NONAME
+ _Z5qHashRK8QXmlName @ 3 NONAME
+ _ZN10QXmlSchema14setUriResolverEPK20QAbstractUriResolver @ 4 NONAME
+ _ZN10QXmlSchema17setMessageHandlerEP23QAbstractMessageHandler @ 5 NONAME
+ _ZN10QXmlSchema23setNetworkAccessManagerEP21QNetworkAccessManager @ 6 NONAME
+ _ZN10QXmlSchema4loadEP9QIODeviceRK4QUrl @ 7 NONAME
+ _ZN10QXmlSchema4loadERK10QByteArrayRK4QUrl @ 8 NONAME
+ _ZN10QXmlSchema4loadERK4QUrl @ 9 NONAME
+ _ZN10QXmlSchemaC1ERKS_ @ 10 NONAME
+ _ZN10QXmlSchemaC1Ev @ 11 NONAME
+ _ZN10QXmlSchemaC2ERKS_ @ 12 NONAME
+ _ZN10QXmlSchemaC2Ev @ 13 NONAME
+ _ZN10QXmlSchemaD1Ev @ 14 NONAME
+ _ZN10QXmlSchemaD2Ev @ 15 NONAME
+ _ZN12QXmlNamePoolC1EPN11QPatternist8NamePoolE @ 16 NONAME
+ _ZN12QXmlNamePoolC1ERKS_ @ 17 NONAME
+ _ZN12QXmlNamePoolC1Ev @ 18 NONAME
+ _ZN12QXmlNamePoolC2EPN11QPatternist8NamePoolE @ 19 NONAME
+ _ZN12QXmlNamePoolC2ERKS_ @ 20 NONAME
+ _ZN12QXmlNamePoolC2Ev @ 21 NONAME
+ _ZN12QXmlNamePoolD1Ev @ 22 NONAME
+ _ZN12QXmlNamePoolD2Ev @ 23 NONAME
+ _ZN12QXmlNamePoolaSERKS_ @ 24 NONAME
+ _ZN13QXmlFormatter10charactersERK10QStringRef @ 25 NONAME
+ _ZN13QXmlFormatter10endElementEv @ 26 NONAME
+ _ZN13QXmlFormatter11atomicValueERK8QVariant @ 27 NONAME
+ _ZN13QXmlFormatter11endDocumentEv @ 28 NONAME
+ _ZN13QXmlFormatter12startElementERK8QXmlName @ 29 NONAME
+ _ZN13QXmlFormatter13endOfSequenceEv @ 30 NONAME
+ _ZN13QXmlFormatter13startDocumentEv @ 31 NONAME
+ _ZN13QXmlFormatter15startOfSequenceEv @ 32 NONAME
+ _ZN13QXmlFormatter19setIndentationDepthEi @ 33 NONAME
+ _ZN13QXmlFormatter21processingInstructionERK8QXmlNameRK7QString @ 34 NONAME
+ _ZN13QXmlFormatter4itemERKN11QPatternist4ItemE @ 35 NONAME
+ _ZN13QXmlFormatter7commentERK7QString @ 36 NONAME
+ _ZN13QXmlFormatter9attributeERK8QXmlNameRK10QStringRef @ 37 NONAME
+ _ZN13QXmlFormatterC1ERK9QXmlQueryP9QIODevice @ 38 NONAME
+ _ZN13QXmlFormatterC2ERK9QXmlQueryP9QIODevice @ 39 NONAME
+ _ZN14QXmlSerializer10charactersERK10QStringRef @ 40 NONAME
+ _ZN14QXmlSerializer10endElementEv @ 41 NONAME
+ _ZN14QXmlSerializer11atomicValueERK8QVariant @ 42 NONAME
+ _ZN14QXmlSerializer11endDocumentEv @ 43 NONAME
+ _ZN14QXmlSerializer12startElementERK8QXmlName @ 44 NONAME
+ _ZN14QXmlSerializer12writeEscapedERK7QString @ 45 NONAME
+ _ZN14QXmlSerializer13endOfSequenceEv @ 46 NONAME
+ _ZN14QXmlSerializer13startDocumentEv @ 47 NONAME
+ _ZN14QXmlSerializer15startOfSequenceEv @ 48 NONAME
+ _ZN14QXmlSerializer16namespaceBindingERK8QXmlName @ 49 NONAME
+ _ZN14QXmlSerializer21processingInstructionERK8QXmlNameRK7QString @ 50 NONAME
+ _ZN14QXmlSerializer4itemERKN11QPatternist4ItemE @ 51 NONAME
+ _ZN14QXmlSerializer7commentERK7QString @ 52 NONAME
+ _ZN14QXmlSerializer8setCodecEPK10QTextCodec @ 53 NONAME
+ _ZN14QXmlSerializer9attributeERK8QXmlNameRK10QStringRef @ 54 NONAME
+ _ZN14QXmlSerializerC1EP27QAbstractXmlReceiverPrivate @ 55 NONAME
+ _ZN14QXmlSerializerC1ERK9QXmlQueryP9QIODevice @ 56 NONAME
+ _ZN14QXmlSerializerC2EP27QAbstractXmlReceiverPrivate @ 57 NONAME
+ _ZN14QXmlSerializerC2ERK9QXmlQueryP9QIODevice @ 58 NONAME
+ _ZN15QSourceLocation6setUriERK4QUrl @ 59 NONAME
+ _ZN15QSourceLocation7setLineEx @ 60 NONAME
+ _ZN15QSourceLocation9setColumnEx @ 61 NONAME
+ _ZN15QSourceLocationC1ERK4QUrlii @ 62 NONAME
+ _ZN15QSourceLocationC1ERKS_ @ 63 NONAME
+ _ZN15QSourceLocationC1Ev @ 64 NONAME
+ _ZN15QSourceLocationC2ERK4QUrlii @ 65 NONAME
+ _ZN15QSourceLocationC2ERKS_ @ 66 NONAME
+ _ZN15QSourceLocationC2Ev @ 67 NONAME
+ _ZN15QSourceLocationD1Ev @ 68 NONAME
+ _ZN15QSourceLocationD2Ev @ 69 NONAME
+ _ZN15QSourceLocationaSERKS_ @ 70 NONAME
+ _ZN15QXmlResultItems4nextEv @ 71 NONAME
+ _ZN15QXmlResultItemsC1Ev @ 72 NONAME
+ _ZN15QXmlResultItemsC2Ev @ 73 NONAME
+ _ZN15QXmlResultItemsD0Ev @ 74 NONAME
+ _ZN15QXmlResultItemsD1Ev @ 75 NONAME
+ _ZN15QXmlResultItemsD2Ev @ 76 NONAME
+ _ZN19QSimpleXmlNodeModelC2ERK12QXmlNamePool @ 77 NONAME
+ _ZN19QSimpleXmlNodeModelD0Ev @ 78 NONAME
+ _ZN19QSimpleXmlNodeModelD1Ev @ 79 NONAME
+ _ZN19QSimpleXmlNodeModelD2Ev @ 80 NONAME
+ _ZN19QXmlSchemaValidator14setUriResolverEPK20QAbstractUriResolver @ 81 NONAME
+ _ZN19QXmlSchemaValidator17setMessageHandlerEP23QAbstractMessageHandler @ 82 NONAME
+ _ZN19QXmlSchemaValidator23setNetworkAccessManagerEP21QNetworkAccessManager @ 83 NONAME
+ _ZN19QXmlSchemaValidator9setSchemaERK10QXmlSchema @ 84 NONAME
+ _ZN19QXmlSchemaValidatorC1ERK10QXmlSchema @ 85 NONAME
+ _ZN19QXmlSchemaValidatorC1Ev @ 86 NONAME
+ _ZN19QXmlSchemaValidatorC2ERK10QXmlSchema @ 87 NONAME
+ _ZN19QXmlSchemaValidatorC2Ev @ 88 NONAME
+ _ZN19QXmlSchemaValidatorD1Ev @ 89 NONAME
+ _ZN19QXmlSchemaValidatorD2Ev @ 90 NONAME
+ _ZN20QAbstractUriResolver11qt_metacallEN11QMetaObject4CallEiPPv @ 91 NONAME
+ _ZN20QAbstractUriResolver11qt_metacastEPKc @ 92 NONAME
+ _ZN20QAbstractUriResolver16staticMetaObjectE @ 93 NONAME DATA 16
+ _ZN20QAbstractUriResolver19getStaticMetaObjectEv @ 94 NONAME
+ _ZN20QAbstractUriResolverC2EP7QObject @ 95 NONAME
+ _ZN20QAbstractUriResolverD0Ev @ 96 NONAME
+ _ZN20QAbstractUriResolverD1Ev @ 97 NONAME
+ _ZN20QAbstractUriResolverD2Ev @ 98 NONAME
+ _ZN20QAbstractXmlReceiver10sendAsNodeERKN11QPatternist4ItemE @ 99 NONAME
+ _ZN20QAbstractXmlReceiver14whitespaceOnlyERK10QStringRef @ 100 NONAME
+ _ZN20QAbstractXmlReceiver4itemERKN11QPatternist4ItemE @ 101 NONAME
+ _ZN20QAbstractXmlReceiverC2EP27QAbstractXmlReceiverPrivate @ 102 NONAME
+ _ZN20QAbstractXmlReceiverC2Ev @ 103 NONAME
+ _ZN20QAbstractXmlReceiverD0Ev @ 104 NONAME
+ _ZN20QAbstractXmlReceiverD1Ev @ 105 NONAME
+ _ZN20QAbstractXmlReceiverD2Ev @ 106 NONAME
+ _ZN21QAbstractXmlNodeModelC2EP28QAbstractXmlNodeModelPrivate @ 107 NONAME
+ _ZN21QAbstractXmlNodeModelC2Ev @ 108 NONAME
+ _ZN21QAbstractXmlNodeModelD0Ev @ 109 NONAME
+ _ZN21QAbstractXmlNodeModelD1Ev @ 110 NONAME
+ _ZN21QAbstractXmlNodeModelD2Ev @ 111 NONAME
+ _ZN23QAbstractMessageHandler11qt_metacallEN11QMetaObject4CallEiPPv @ 112 NONAME
+ _ZN23QAbstractMessageHandler11qt_metacastEPKc @ 113 NONAME
+ _ZN23QAbstractMessageHandler16staticMetaObjectE @ 114 NONAME DATA 16
+ _ZN23QAbstractMessageHandler19getStaticMetaObjectEv @ 115 NONAME
+ _ZN23QAbstractMessageHandler7messageE9QtMsgTypeRK7QStringRK4QUrlRK15QSourceLocation @ 116 NONAME
+ _ZN23QAbstractMessageHandlerC2EP7QObject @ 117 NONAME
+ _ZN23QAbstractMessageHandlerD0Ev @ 118 NONAME
+ _ZN23QAbstractMessageHandlerD1Ev @ 119 NONAME
+ _ZN23QAbstractMessageHandlerD2Ev @ 120 NONAME
+ _ZN8QXmlItemC1ERK18QXmlNodeModelIndex @ 121 NONAME
+ _ZN8QXmlItemC1ERK8QVariant @ 122 NONAME
+ _ZN8QXmlItemC1ERKS_ @ 123 NONAME
+ _ZN8QXmlItemC1Ev @ 124 NONAME
+ _ZN8QXmlItemC2ERK18QXmlNodeModelIndex @ 125 NONAME
+ _ZN8QXmlItemC2ERK8QVariant @ 126 NONAME
+ _ZN8QXmlItemC2ERKS_ @ 127 NONAME
+ _ZN8QXmlItemC2Ev @ 128 NONAME
+ _ZN8QXmlItemD1Ev @ 129 NONAME
+ _ZN8QXmlItemD2Ev @ 130 NONAME
+ _ZN8QXmlItemaSERKS_ @ 131 NONAME
+ _ZN8QXmlName13fromClarkNameERK7QStringRK12QXmlNamePool @ 132 NONAME
+ _ZN8QXmlName8isNCNameERK7QString @ 133 NONAME
+ _ZN8QXmlNameC1ER12QXmlNamePoolRK7QStringS4_S4_ @ 134 NONAME
+ _ZN8QXmlNameC1Ev @ 135 NONAME
+ _ZN8QXmlNameC2ER12QXmlNamePoolRK7QStringS4_S4_ @ 136 NONAME
+ _ZN8QXmlNameC2Ev @ 137 NONAME
+ _ZN8QXmlNameaSERKS_ @ 138 NONAME
+ _ZN9QXmlQuery12bindVariableERK7QStringP9QIODevice @ 139 NONAME
+ _ZN9QXmlQuery12bindVariableERK7QStringRK8QXmlItem @ 140 NONAME
+ _ZN9QXmlQuery12bindVariableERK7QStringRKS_ @ 141 NONAME
+ _ZN9QXmlQuery12bindVariableERK8QXmlNameP9QIODevice @ 142 NONAME
+ _ZN9QXmlQuery12bindVariableERK8QXmlNameRK8QXmlItem @ 143 NONAME
+ _ZN9QXmlQuery12bindVariableERK8QXmlNameRKS_ @ 144 NONAME
+ _ZN9QXmlQuery14setUriResolverEPK20QAbstractUriResolver @ 145 NONAME
+ _ZN9QXmlQuery17setMessageHandlerEP23QAbstractMessageHandler @ 146 NONAME
+ _ZN9QXmlQuery22setInitialTemplateNameERK7QString @ 147 NONAME
+ _ZN9QXmlQuery22setInitialTemplateNameERK8QXmlName @ 148 NONAME
+ _ZN9QXmlQuery23setNetworkAccessManagerEP21QNetworkAccessManager @ 149 NONAME
+ _ZN9QXmlQuery8setFocusEP9QIODevice @ 150 NONAME
+ _ZN9QXmlQuery8setFocusERK4QUrl @ 151 NONAME
+ _ZN9QXmlQuery8setFocusERK7QString @ 152 NONAME
+ _ZN9QXmlQuery8setFocusERK8QXmlItem @ 153 NONAME
+ _ZN9QXmlQuery8setQueryEP9QIODeviceRK4QUrl @ 154 NONAME
+ _ZN9QXmlQuery8setQueryERK4QUrlS2_ @ 155 NONAME
+ _ZN9QXmlQuery8setQueryERK7QStringRK4QUrl @ 156 NONAME
+ _ZN9QXmlQueryC1ENS_13QueryLanguageERK12QXmlNamePool @ 157 NONAME
+ _ZN9QXmlQueryC1ERK12QXmlNamePool @ 158 NONAME
+ _ZN9QXmlQueryC1ERKS_ @ 159 NONAME
+ _ZN9QXmlQueryC1Ev @ 160 NONAME
+ _ZN9QXmlQueryC2ENS_13QueryLanguageERK12QXmlNamePool @ 161 NONAME
+ _ZN9QXmlQueryC2ERK12QXmlNamePool @ 162 NONAME
+ _ZN9QXmlQueryC2ERKS_ @ 163 NONAME
+ _ZN9QXmlQueryC2Ev @ 164 NONAME
+ _ZN9QXmlQueryD1Ev @ 165 NONAME
+ _ZN9QXmlQueryD2Ev @ 166 NONAME
+ _ZN9QXmlQueryaSERKS_ @ 167 NONAME
+ _ZNK10QXmlSchema11documentUriEv @ 168 NONAME
+ _ZNK10QXmlSchema11uriResolverEv @ 169 NONAME
+ _ZNK10QXmlSchema14messageHandlerEv @ 170 NONAME
+ _ZNK10QXmlSchema20networkAccessManagerEv @ 171 NONAME
+ _ZNK10QXmlSchema7isValidEv @ 172 NONAME
+ _ZNK10QXmlSchema8namePoolEv @ 173 NONAME
+ _ZNK13QXmlFormatter16indentationDepthEv @ 174 NONAME
+ _ZNK14QXmlSerializer12outputDeviceEv @ 175 NONAME
+ _ZNK14QXmlSerializer5codecEv @ 176 NONAME
+ _ZNK15QSourceLocation3uriEv @ 177 NONAME
+ _ZNK15QSourceLocation4lineEv @ 178 NONAME
+ _ZNK15QSourceLocation6columnEv @ 179 NONAME
+ _ZNK15QSourceLocation6isNullEv @ 180 NONAME
+ _ZNK15QSourceLocationeqERKS_ @ 181 NONAME
+ _ZNK15QSourceLocationneERKS_ @ 182 NONAME
+ _ZNK15QXmlResultItems7currentEv @ 183 NONAME
+ _ZNK15QXmlResultItems8hasErrorEv @ 184 NONAME
+ _ZNK18QXmlNodeModelIndexeqERKS_ @ 185 NONAME
+ _ZNK18QXmlNodeModelIndexneERKS_ @ 186 NONAME
+ _ZNK19QSimpleXmlNodeModel11elementByIdERK8QXmlName @ 187 NONAME
+ _ZNK19QSimpleXmlNodeModel11stringValueERK18QXmlNodeModelIndex @ 188 NONAME
+ _ZNK19QSimpleXmlNodeModel12nodesByIdrefERK8QXmlName @ 189 NONAME
+ _ZNK19QSimpleXmlNodeModel17namespaceBindingsERK18QXmlNodeModelIndex @ 190 NONAME
+ _ZNK19QSimpleXmlNodeModel7baseUriERK18QXmlNodeModelIndex @ 191 NONAME
+ _ZNK19QSimpleXmlNodeModel8namePoolEv @ 192 NONAME
+ _ZNK19QXmlSchemaValidator11uriResolverEv @ 193 NONAME
+ _ZNK19QXmlSchemaValidator14messageHandlerEv @ 194 NONAME
+ _ZNK19QXmlSchemaValidator20networkAccessManagerEv @ 195 NONAME
+ _ZNK19QXmlSchemaValidator6schemaEv @ 196 NONAME
+ _ZNK19QXmlSchemaValidator8namePoolEv @ 197 NONAME
+ _ZNK19QXmlSchemaValidator8validateEP9QIODeviceRK4QUrl @ 198 NONAME
+ _ZNK19QXmlSchemaValidator8validateERK10QByteArrayRK4QUrl @ 199 NONAME
+ _ZNK19QXmlSchemaValidator8validateERK4QUrl @ 200 NONAME
+ _ZNK20QAbstractUriResolver10metaObjectEv @ 201 NONAME
+ _ZNK21QAbstractXmlNodeModel10copyNodeToERK18QXmlNodeModelIndexP20QAbstractXmlReceiverRK6QFlagsINS_15NodeCopySettingEE @ 202 NONAME
+ _ZNK21QAbstractXmlNodeModel11isDeepEqualERK18QXmlNodeModelIndexS2_ @ 203 NONAME
+ _ZNK21QAbstractXmlNodeModel14sendNamespacesERK18QXmlNodeModelIndexP20QAbstractXmlReceiver @ 204 NONAME
+ _ZNK21QAbstractXmlNodeModel14sourceLocationERK18QXmlNodeModelIndex @ 205 NONAME
+ _ZNK21QAbstractXmlNodeModel18namespaceForPrefixERK18QXmlNodeModelIndexs @ 206 NONAME
+ _ZNK21QAbstractXmlNodeModel19sequencedTypedValueERK18QXmlNodeModelIndex @ 207 NONAME
+ _ZNK21QAbstractXmlNodeModel4typeERK18QXmlNodeModelIndex @ 208 NONAME
+ _ZNK21QAbstractXmlNodeModel7iterateERK18QXmlNodeModelIndexNS0_4AxisE @ 209 NONAME
+ _ZNK23QAbstractMessageHandler10metaObjectEv @ 210 NONAME
+ _ZNK8QXmlItem13isAtomicValueEv @ 211 NONAME
+ _ZNK8QXmlItem13toAtomicValueEv @ 212 NONAME
+ _ZNK8QXmlItem16toNodeModelIndexEv @ 213 NONAME
+ _ZNK8QXmlItem6isNodeEv @ 214 NONAME
+ _ZNK8QXmlItem6isNullEv @ 215 NONAME
+ _ZNK8QXmlName11toClarkNameERK12QXmlNamePool @ 216 NONAME
+ _ZNK8QXmlName12namespaceUriERK12QXmlNamePool @ 217 NONAME
+ _ZNK8QXmlName6isNullEv @ 218 NONAME
+ _ZNK8QXmlName6prefixERK12QXmlNamePool @ 219 NONAME
+ _ZNK8QXmlName9localNameERK12QXmlNamePool @ 220 NONAME
+ _ZNK8QXmlNameeqERKS_ @ 221 NONAME
+ _ZNK8QXmlNameneERKS_ @ 222 NONAME
+ _ZNK9QXmlQuery10evaluateToEP11QStringList @ 223 NONAME
+ _ZNK9QXmlQuery10evaluateToEP15QXmlResultItems @ 224 NONAME
+ _ZNK9QXmlQuery10evaluateToEP20QAbstractXmlReceiver @ 225 NONAME
+ _ZNK9QXmlQuery10evaluateToEP7QString @ 226 NONAME
+ _ZNK9QXmlQuery10evaluateToEP9QIODevice @ 227 NONAME
+ _ZNK9QXmlQuery11uriResolverEv @ 228 NONAME
+ _ZNK9QXmlQuery13queryLanguageEv @ 229 NONAME
+ _ZNK9QXmlQuery14messageHandlerEv @ 230 NONAME
+ _ZNK9QXmlQuery19initialTemplateNameEv @ 231 NONAME
+ _ZNK9QXmlQuery20networkAccessManagerEv @ 232 NONAME
+ _ZNK9QXmlQuery7isValidEv @ 233 NONAME
+ _ZNK9QXmlQuery8namePoolEv @ 234 NONAME
+ _ZTI13QXmlFormatter @ 235 NONAME
+ _ZTI14QXmlSerializer @ 236 NONAME
+ _ZTI15QXmlResultItems @ 237 NONAME
+ _ZTI19QSimpleXmlNodeModel @ 238 NONAME
+ _ZTI20QAbstractUriResolver @ 239 NONAME
+ _ZTI20QAbstractXmlReceiver @ 240 NONAME
+ _ZTI21QAbstractXmlNodeModel @ 241 NONAME
+ _ZTI23QAbstractMessageHandler @ 242 NONAME
+ _ZTV13QXmlFormatter @ 243 NONAME
+ _ZTV14QXmlSerializer @ 244 NONAME
+ _ZTV15QXmlResultItems @ 245 NONAME
+ _ZTV19QSimpleXmlNodeModel @ 246 NONAME
+ _ZTV20QAbstractUriResolver @ 247 NONAME
+ _ZTV20QAbstractXmlReceiver @ 248 NONAME
+ _ZTV21QAbstractXmlNodeModel @ 249 NONAME
+ _ZTV23QAbstractMessageHandler @ 250 NONAME
+ _Zls6QDebugRK15QSourceLocation @ 251 NONAME
+
diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp
index 1e41571db8..981b750975 100644
--- a/src/sql/drivers/psql/qsql_psql.cpp
+++ b/src/sql/drivers/psql/qsql_psql.cpp
@@ -1150,7 +1150,7 @@ QString QPSQLDriver::formatValue(const QSqlField &field, bool trimStrings) const
case QVariant::Time:
#ifndef QT_NO_DATESTRING
if (field.value().toTime().isValid()) {
- r = QLatin1Char('\'') + field.value().toTime().toString(Qt::ISODate) + QLatin1Char('\'');
+ r = QLatin1Char('\'') + field.value().toTime().toString(QLatin1String("hh:mm:ss.zzz")) + QLatin1Char('\'');
} else
#endif
{
diff --git a/src/sql/models/qsqlquerymodel.cpp b/src/sql/models/qsqlquerymodel.cpp
index 1719239dff..319055e96d 100644
--- a/src/sql/models/qsqlquerymodel.cpp
+++ b/src/sql/models/qsqlquerymodel.cpp
@@ -314,6 +314,7 @@ void QSqlQueryModel::setQuery(const QSqlQuery &query)
QSqlRecord newRec = query.record();
bool columnsChanged = (newRec != d->rec);
bool hasQuerySize = query.driver()->hasFeature(QSqlDriver::QuerySize);
+ bool hasNewData = (newRec != QSqlRecord()) || !query.lastError().isValid();
if (d->colOffsets.size() != newRec.count() || columnsChanged)
d->initColOffsets(newRec.count());
@@ -328,13 +329,13 @@ void QSqlQueryModel::setQuery(const QSqlQuery &query)
d->error = QSqlError();
d->query = query;
d->rec = newRec;
-
+
if (mustClearModel)
endRemoveRows();
-
- d->atEnd = false;
- if (columnsChanged)
+ d->atEnd = false;
+
+ if (columnsChanged && hasNewData)
reset();
if (!query.isActive() || query.isForwardOnly()) {
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp
index df94080e26..e5c6550f3f 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -406,7 +406,7 @@ bool QSqlTableModel::select()
QSqlQuery qu(query, d->db);
setQuery(qu);
- if (!qu.isActive()) {
+ if (!qu.isActive() || lastError().isValid()) {
// something went wrong - revert to non-select state
d->initRecordAndPrimaryIndex();
return false;
diff --git a/src/src.pro b/src/src.pro
index 5307612b11..7cab6c9d64 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -8,17 +8,12 @@ wince*:{
} else:symbian {
SRC_SUBDIRS += src_s60main src_corelib src_xml src_gui src_network src_sql src_testlib src_s60installs
} else {
- SRC_SUBDIRS += src_tools_bootstrap src_tools_moc src_tools_rcc src_tools_uic src_corelib src_xml src_network src_gui src_sql src_testlib
+ SRC_SUBDIRS += src_corelib src_xml src_network src_gui src_sql src_testlib
!vxworks:contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_qt3support
+ include(tools/tools.pro)
contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus
- !cross_compile {
- contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_tools_uic3
- }
-}
-win32:{
- SRC_SUBDIRS += src_activeqt
- !wince*: SRC_SUBDIRS += src_tools_idc
}
+win32:SRC_SUBDIRS += src_activeqt
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2): SRC_SUBDIRS += src_opengl
contains(QT_CONFIG, openvg): SRC_SUBDIRS += src_openvg
@@ -41,14 +36,6 @@ src_s60installs.subdir = $$QT_SOURCE_TREE/src/s60installs
src_s60installs.target = sub-s60installs
src_winmain.subdir = $$QT_SOURCE_TREE/src/winmain
src_winmain.target = sub-winmain
-src_tools_bootstrap.subdir = $$QT_SOURCE_TREE/src/tools/bootstrap
-src_tools_bootstrap.target = sub-tools-bootstrap
-src_tools_moc.subdir = $$QT_SOURCE_TREE/src/tools/moc
-src_tools_moc.target = sub-moc
-src_tools_rcc.subdir = $$QT_SOURCE_TREE/src/tools/rcc
-src_tools_rcc.target = sub-rcc
-src_tools_uic.subdir = $$QT_SOURCE_TREE/src/tools/uic
-src_tools_uic.target = sub-uic
src_corelib.subdir = $$QT_SOURCE_TREE/src/corelib
src_corelib.target = sub-corelib
src_xml.subdir = $$QT_SOURCE_TREE/src/xml
@@ -79,12 +66,8 @@ src_phonon.subdir = $$QT_SOURCE_TREE/src/phonon
src_phonon.target = sub-phonon
src_multimedia.subdir = $$QT_SOURCE_TREE/src/multimedia
src_multimedia.target = sub-multimedia
-src_tools_uic3.subdir = $$QT_SOURCE_TREE/src/tools/uic3
-src_tools_uic3.target = sub-uic3
src_activeqt.subdir = $$QT_SOURCE_TREE/src/activeqt
src_activeqt.target = sub-activeqt
-src_tools_idc.subdir = $$QT_SOURCE_TREE/src/tools/idc
-src_tools_idc.target = sub-idc
src_plugins.subdir = $$QT_SOURCE_TREE/src/plugins
src_plugins.target = sub-plugins
src_testlib.subdir = $$QT_SOURCE_TREE/src/testlib
@@ -98,9 +81,6 @@ src_declarative.target = sub-declarative
#CONFIG += ordered
!wince*:!symbian:!ordered {
- src_tools_moc.depends = src_tools_bootstrap
- src_tools_rcc.depends = src_tools_bootstrap
- src_tools_uic.depends = src_tools_bootstrap
src_corelib.depends = src_tools_moc src_tools_rcc
src_gui.depends = src_corelib src_tools_uic
embedded: src_gui.depends += src_network
@@ -116,10 +96,10 @@ src_declarative.target = sub-declarative
src_sql.depends = src_corelib
src_testlib.depends = src_corelib
src_qt3support.depends = src_gui src_xml src_network src_sql
+ src_tools_idc.depends = src_corelib # target defined in tools.pro
+ src_tools_uic3.depends = src_qt3support src_xml # target defined in tools.pro
src_phonon.depends = src_gui
src_multimedia.depends = src_gui
- src_tools_uic3.depends = src_qt3support src_xml
- src_tools_idc.depends = src_corelib
src_tools_activeqt.depends = src_tools_idc src_gui
src_declarative.depends = src_xml src_gui src_script src_network src_svg
src_plugins.depends = src_gui src_sql src_svg
@@ -146,8 +126,6 @@ sub_src_target.recurse_target =
QMAKE_EXTRA_TARGETS += sub_src_target
# This gives us a top level debug/release
-EXTRA_DEBUG_TARGETS =
-EXTRA_RELEASE_TARGETS =
for(subname, SRC_SUBDIRS) {
subdir = $$subname
!isEmpty($${subname}.subdir):subdir = $$eval($${subname}.subdir)
@@ -189,4 +167,3 @@ QMAKE_EXTRA_TARGETS += debug release
}
SUBDIRS += $$SRC_SUBDIRS
-
diff --git a/src/testlib/qbenchmarkvalgrind.cpp b/src/testlib/qbenchmarkvalgrind.cpp
index 3398737803..88cb37fc6b 100644
--- a/src/testlib/qbenchmarkvalgrind.cpp
+++ b/src/testlib/qbenchmarkvalgrind.cpp
@@ -114,7 +114,7 @@ qint64 QBenchmarkValgrindUtils::extractResult(const QString &fileName)
while (!file.atEnd()) {
const QString line(QLatin1String(file.readLine()));
if (rxValue.indexIn(line) != -1) {
- Q_ASSERT(rxValue.numCaptures() == 1);
+ Q_ASSERT(rxValue.captureCount() == 1);
bool ok;
val = rxValue.cap(1).toLongLong(&ok);
Q_ASSERT(ok);
diff --git a/src/tools/tools.pro b/src/tools/tools.pro
new file mode 100644
index 0000000000..7c8fb47adb
--- /dev/null
+++ b/src/tools/tools.pro
@@ -0,0 +1,70 @@
+TEMPLATE = subdirs
+
+TOOLS_SUBDIRS = src_tools_bootstrap src_tools_moc src_tools_rcc src_tools_uic
+!cross_compile {
+ contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_tools_uic3
+ win32:!wince*: SRC_SUBDIRS += src_tools_idc
+}
+
+# Set subdir and respective target name
+src_tools_bootstrap.subdir = $$QT_SOURCE_TREE/src/tools/bootstrap
+src_tools_bootstrap.target = sub-tools-bootstrap
+src_tools_moc.subdir = $$QT_SOURCE_TREE/src/tools/moc
+src_tools_moc.target = sub-moc
+src_tools_rcc.subdir = $$QT_SOURCE_TREE/src/tools/rcc
+src_tools_rcc.target = sub-rcc
+src_tools_uic.subdir = $$QT_SOURCE_TREE/src/tools/uic
+src_tools_uic.target = sub-uic
+src_tools_uic3.subdir = $$QT_SOURCE_TREE/src/tools/uic3
+src_tools_uic3.target = sub-uic3
+src_tools_idc.subdir = $$QT_SOURCE_TREE/src/tools/idc
+src_tools_idc.target = sub-idc
+
+# Set dependencies for each subdir
+src_tools_moc.depends = src_tools_bootstrap
+src_tools_rcc.depends = src_tools_bootstrap
+src_tools_uic.depends = src_tools_bootstrap
+
+# Special handling, depending on type of project, if it used debug/release or only has one configuration
+EXTRA_DEBUG_TARGETS =
+EXTRA_RELEASE_TARGETS =
+!symbian {
+ for(subname, TOOLS_SUBDIRS) {
+ subdir = $$subname
+ !isEmpty($${subname}.subdir):subdir = $$eval($${subname}.subdir)
+ subpro = $$subdir/$${basename(subdir)}.pro
+ !exists($$subpro):next()
+ subtarget = $$replace(subdir, [^A-Za-z0-9], _)
+ reg_src = $$replace(QT_SOURCE_TREE, \\\\, \\\\)
+ subdir = $$replace(subdir, $$reg_src, $$QT_BUILD_TREE)
+ subdir = $$replace(subdir, /, $$QMAKE_DIR_SEP)
+ subdir = $$replace(subdir, \\\\, $$QMAKE_DIR_SEP)
+ SUB_TEMPLATE = $$list($$fromfile($$subpro, TEMPLATE))
+ !isEqual(subname, src_tools_bootstrap):if(isEqual($$SUB_TEMPLATE, lib) | isEqual($$SUB_TEMPLATE, subdirs) | isEqual(subname, src_tools_idc) | isEqual(subname, src_tools_uic3)):!separate_debug_info {
+ #debug
+ eval(debug-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS)
+ eval(debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug))
+ EXTRA_DEBUG_TARGETS += debug-$${subtarget}
+ QMAKE_EXTRA_TARGETS += debug-$${subtarget}
+ #release
+ eval(release-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS)
+ eval(release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) release))
+ EXTRA_RELEASE_TARGETS += release-$${subtarget}
+ QMAKE_EXTRA_TARGETS += release-$${subtarget}
+ } else { #do not have a real debug target/release
+ #debug
+ eval(debug-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS)
+ eval(debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first))
+ EXTRA_DEBUG_TARGETS += debug-$${subtarget}
+ QMAKE_EXTRA_TARGETS += debug-$${subtarget}
+ #release
+ eval(release-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS)
+ eval(release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first))
+ EXTRA_RELEASE_TARGETS += release-$${subtarget}
+ QMAKE_EXTRA_TARGETS += release-$${subtarget}
+ }
+ }
+}
+
+SUBDIRS = $$TOOLS_SUBDIRS $$SUBDIRS
+isEqual(TARGET,tools): SUBDIRS += $$SRC_SUBDIRS
diff --git a/src/tools/uic3/embed.cpp b/src/tools/uic3/embed.cpp
index d699623b21..2eb4dd5246 100644
--- a/src/tools/uic3/embed.cpp
+++ b/src/tools/uic3/embed.cpp
@@ -177,7 +177,7 @@ void Ui3Reader::embed(const char *project, const QStringList &images)
e->width = img.width();
e->height = img.height();
e->depth = img.depth();
- e->numColors = img.numColors();
+ e->numColors = img.colorCount();
e->colorTable = new QRgb[e->numColors];
e->alpha = img.hasAlphaBuffer();
QVector<QRgb> ct = img.colorTable();
@@ -195,7 +195,7 @@ void Ui3Reader::embed(const char *project, const QStringList &images)
#ifndef QT_NO_IMAGE_COLLECTION_COMPRESSION
e->compressed =
#endif
- embedData( out, img.bits(), img.numBytes() );
+ embedData( out, img.bits(), img.byteCount() );
out << "\n};\n\n";
if ( e->numColors ) {
out << s.sprintf( "static const QRgb %s_ctable[] = {",
diff --git a/src/xmlpatterns/functions/qpatternmatchingfns.cpp b/src/xmlpatterns/functions/qpatternmatchingfns.cpp
index cb421cb304..a7275f6066 100644
--- a/src/xmlpatterns/functions/qpatternmatchingfns.cpp
+++ b/src/xmlpatterns/functions/qpatternmatchingfns.cpp
@@ -82,7 +82,7 @@ Item ReplaceFN::evaluateSingleton(const DynamicContext::Ptr &context) const
if(arg)
input = arg.stringValue();
- const QString replacement(m_replacementString.isNull() ? parseReplacement(regexp.numCaptures(), context)
+ const QString replacement(m_replacementString.isNull() ? parseReplacement(regexp.captureCount(), context)
: m_replacementString);
diff --git a/src/xmlpatterns/functions/qpatternplatform_p.h b/src/xmlpatterns/functions/qpatternplatform_p.h
index e007381693..a85cd0cf7d 100644
--- a/src/xmlpatterns/functions/qpatternplatform_p.h
+++ b/src/xmlpatterns/functions/qpatternplatform_p.h
@@ -180,7 +180,7 @@ namespace QPatternist
inline int PatternPlatform::captureCount() const
{
if(m_compiledParts.testFlag(PatternPrecompiled))
- return m_pattern.numCaptures();
+ return m_pattern.captureCount();
else
return -1;
}
diff --git a/tests/arthur/common/paintcommands.cpp b/tests/arthur/common/paintcommands.cpp
index 475f07d9cf..feabaed3c7 100644
--- a/tests/arthur/common/paintcommands.cpp
+++ b/tests/arthur/common/paintcommands.cpp
@@ -587,10 +587,10 @@ void PaintCommands::staticInit()
"^image_setColor\\s+([\\w.:\\/]*)\\s+([0-9]*)\\s+#([0-9]*)$",
"image_setColor <imageName> <index> <color>",
"image_setColor myImage 0 black");
- DECL_PAINTCOMMAND("image_setNumColors", command_image_setNumColors,
- "^image_setNumColors\\s+([\\w.:\\/]*)\\s+([0-9]*)$",
- "image_setNumColors <imageName> <nbColors>",
- "image_setNumColors myImage 128");
+ DECL_PAINTCOMMAND("image_setColorCount", command_image_setColorCount,
+ "^image_setColorCount\\s+([\\w.:\\/]*)\\s+([0-9]*)$",
+ "image_setColorCount <imageName> <nbColors>",
+ "image_setColorCount myImage 128");
DECL_PAINTCOMMANDSECTION("transformations");
DECL_PAINTCOMMAND("resetMatrix", command_resetMatrix,
@@ -974,7 +974,7 @@ void PaintCommands::command_drawPixmap(QRegExp re)
if (sh == 0) sh = -1;
if (m_verboseMode)
- printf(" -(lance) drawPixmap('%s' dim=(%d, %d), depth=%d, (%d, %d, %d, %d), (%d, %d, %d, %d)\n",
+ printf(" -(lance) drawPixmap('%s' dim=(%d, %d), depth=%d, (%f, %f, %f, %f), (%f, %f, %f, %f)\n",
qPrintable(re.cap(1)), pm.width(), pm.height(), pm.depth(),
tx, ty, tw, th, sx, sy, sw, sh);
@@ -1022,7 +1022,7 @@ void PaintCommands::command_drawImage(QRegExp re)
if (sh == 0) sh = -1;
if (m_verboseMode)
- printf(" -(lance) drawImage('%s' dim=(%d, %d), (%d, %d, %d, %d), (%d, %d, %d, %d)\n",
+ printf(" -(lance) drawImage('%s' dim=(%d, %d), (%f, %f, %f, %f), (%f, %f, %f, %f)\n",
qPrintable(re.cap(1)), im.width(), im.height(), tx, ty, tw, th, sx, sy, sw, sh);
m_painter->drawImage(QRectF(tx, ty, tw, th), im, QRectF(sx, sy, sw, sh), Qt::OrderedDither | Qt::OrderedAlphaDither);
@@ -2245,7 +2245,7 @@ void PaintCommands::command_image_load(QRegExp re)
}
/***************************************************************************************************/
-void PaintCommands::command_image_setNumColors(QRegExp re)
+void PaintCommands::command_image_setColorCount(QRegExp re)
{
QStringList caps = re.capturedTexts();
@@ -2253,10 +2253,10 @@ void PaintCommands::command_image_setNumColors(QRegExp re)
int count = convertToInt(caps.at(2));
if (m_verboseMode)
- printf(" -(lance) image_setNumColors(%s), %d -> %d\n",
- qPrintable(name), m_imageMap[name].numColors(), count);
+ printf(" -(lance) image_setColorCount(%s), %d -> %d\n",
+ qPrintable(name), m_imageMap[name].colorCount(), count);
- m_imageMap[name].setNumColors(count);
+ m_imageMap[name].setColorCount(count);
}
/***************************************************************************************************/
diff --git a/tests/arthur/common/paintcommands.h b/tests/arthur/common/paintcommands.h
index ba91a9266a..e2c4d67af7 100644
--- a/tests/arthur/common/paintcommands.h
+++ b/tests/arthur/common/paintcommands.h
@@ -239,7 +239,7 @@ private:
void command_image_convertToFormat(QRegExp re);
void command_image_load(QRegExp re);
void command_image_setColor(QRegExp re);
- void command_image_setNumColors(QRegExp re);
+ void command_image_setColorCount(QRegExp re);
// commands: transformation
void command_resetMatrix(QRegExp re);
diff --git a/tests/auto/linguist/lrelease/tst_lrelease.cpp b/tests/auto/linguist/lrelease/tst_lrelease.cpp
index 39de8a15fa..93cb97c5fa 100644
--- a/tests/auto/linguist/lrelease/tst_lrelease.cpp
+++ b/tests/auto/linguist/lrelease/tst_lrelease.cpp
@@ -60,6 +60,7 @@ private slots:
void mixedcodecs();
void compressed();
void idbased();
+ void markuntranslated();
void dupes();
private:
@@ -210,6 +211,18 @@ void tst_lrelease::idbased()
QCOMPARE(qtTrId("untranslated_id"), QString::fromAscii("This has no translation."));
}
+void tst_lrelease::markuntranslated()
+{
+ QVERIFY(!QProcess::execute(binDir + "/lrelease -markuntranslated # -idbased testdata/idbased.ts"));
+
+ QTranslator translator;
+ QVERIFY(translator.load("testdata/idbased.qm"));
+ qApp->installTranslator(&translator);
+
+ QCOMPARE(qtTrId("test_id"), QString::fromAscii("This is a test string."));
+ QCOMPARE(qtTrId("untranslated_id"), QString::fromAscii("#This has no translation."));
+}
+
void tst_lrelease::dupes()
{
QProcess proc;
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp
index eaa271aea2..7ddb68fbb1 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp
@@ -63,3 +63,52 @@ line c++ comment } (with brace)
#define This is another // comment in } define \
something } comment
} // complain here
+
+
+
+// Nested class in same file
+class TopLevel {
+ Q_OBJECT
+
+ class Nested;
+};
+
+class TopLevel::Nested {
+ void foo();
+};
+
+TopLevel::Nested::foo()
+{
+ TopLevel::tr("TopLevel");
+}
+
+// Nested class in other file
+#include "main.h"
+
+class TopLevel2::Nested {
+ void foo();
+};
+
+TopLevel2::Nested::foo()
+{
+ TopLevel2::tr("TopLevel2");
+}
+
+
+
+namespace NameSpace {
+class ToBeUsed;
+}
+
+// using statement before class definition
+using NameSpace::ToBeUsed;
+
+class NameSpace::ToBeUsed {
+ Q_OBJECT
+ void caller();
+};
+
+void ToBeUsed::caller()
+{
+ tr("NameSpace::ToBeUsed");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.h b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.h
new file mode 100644
index 0000000000..54a76ab3aa
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.h
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** 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 QtCore module 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$
+**
+****************************************************************************/
+
+// IMPORTANT!!!! If you want to add testdata to this file,
+// always add it to the end in order to not change the linenumbers of translations!!!
+
+class TopLevel2 {
+ Q_OBJECT
+
+ class Nested;
+};
+
+
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result
index 07a7469f10..6f48e27021 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result
@@ -1,4 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0">
+<context>
+ <name>NameSpace::ToBeUsed</name>
+ <message>
+ <location filename="main.cpp" line="113"/>
+ <source>NameSpace::ToBeUsed</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>TopLevel</name>
+ <message>
+ <location filename="main.cpp" line="82"/>
+ <source>TopLevel</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>TopLevel2</name>
+ <message>
+ <location filename="main.cpp" line="94"/>
+ <source>TopLevel2</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
</TS>
diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp
index 9f2e4e7afb..25c2649e43 100644
--- a/tests/auto/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/qaccessibility/tst_qaccessibility.cpp
@@ -4034,6 +4034,27 @@ void tst_QAccessibility::labelTest()
delete acc_label;
delete label;
QTestAccessibility::clearEvents();
+
+ QPixmap testPixmap(50, 50);
+ testPixmap.fill();
+
+ QLabel imageLabel;
+ imageLabel.setPixmap(testPixmap);
+ imageLabel.setToolTip("Test Description");
+
+ acc_label = QAccessible::queryAccessibleInterface(&imageLabel);
+ QVERIFY(acc_label);
+
+ QAccessibleImageInterface *imageInterface = acc_label->imageInterface();
+ QVERIFY(imageInterface);
+
+ QCOMPARE(imageInterface->imageSize(), testPixmap.size());
+ QCOMPARE(imageInterface->imageDescription(), QString::fromLatin1("Test Description"));
+ QCOMPARE(imageInterface->imagePosition(QAccessible2::RelativeToParent), imageLabel.geometry());
+
+ delete acc_label;
+
+ QTestAccessibility::clearEvents();
#else
QSKIP("Test needs accessibility support.", SkipAll);
#endif
diff --git a/tests/auto/qanimationgroup/tst_qanimationgroup.cpp b/tests/auto/qanimationgroup/tst_qanimationgroup.cpp
index 81c51eddde..b4e4a491fd 100644
--- a/tests/auto/qanimationgroup/tst_qanimationgroup.cpp
+++ b/tests/auto/qanimationgroup/tst_qanimationgroup.cpp
@@ -165,9 +165,9 @@ void tst_QAnimationGroup::emptyGroup()
QCOMPARE(groupStateChangedSpy.count(), 2);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(groupStateChangedSpy.at(0).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(groupStateChangedSpy.at(0).first()),
QAnimationGroup::Running);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(groupStateChangedSpy.at(1).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(groupStateChangedSpy.at(1).first()),
QAnimationGroup::Stopped);
QCOMPARE(group.state(), QAnimationGroup::Stopped);
@@ -180,9 +180,9 @@ void tst_QAnimationGroup::emptyGroup()
group.start();
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(groupStateChangedSpy.at(2).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(groupStateChangedSpy.at(2).first()),
QAnimationGroup::Running);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(groupStateChangedSpy.at(3).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(groupStateChangedSpy.at(3).first()),
QAnimationGroup::Stopped);
QCOMPARE(group.state(), QAnimationGroup::Stopped);
@@ -259,54 +259,54 @@ void tst_QAnimationGroup::setCurrentTime()
QCOMPARE(notTimeDriven->state(), QAnimationGroup::Stopped);
QCOMPARE(loopsForever->state(), QAnimationGroup::Stopped);
- QCOMPARE(group.currentTime(), 1);
- QCOMPARE(sequence->currentTime(), 1);
- QCOMPARE(a1_s_o1->currentTime(), 1);
- QCOMPARE(a2_s_o1->currentTime(), 0);
- QCOMPARE(a3_s_o1->currentTime(), 0);
- QCOMPARE(a1_s_o2->currentTime(), 1);
- QCOMPARE(a1_s_o3->currentTime(), 0);
- QCOMPARE(a1_p_o1->currentTime(), 1);
- QCOMPARE(a1_p_o2->currentTime(), 1);
- QCOMPARE(a1_p_o3->currentTime(), 1);
- QCOMPARE(notTimeDriven->currentTime(), 1);
- QCOMPARE(loopsForever->currentTime(), 1);
+ QCOMPARE(group.currentLoopTime(), 1);
+ QCOMPARE(sequence->currentLoopTime(), 1);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 1);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 0);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 0);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 1);
+ QCOMPARE(a1_s_o3->currentLoopTime(), 0);
+ QCOMPARE(a1_p_o1->currentLoopTime(), 1);
+ QCOMPARE(a1_p_o2->currentLoopTime(), 1);
+ QCOMPARE(a1_p_o3->currentLoopTime(), 1);
+ QCOMPARE(notTimeDriven->currentLoopTime(), 1);
+ QCOMPARE(loopsForever->currentLoopTime(), 1);
// Current time = 250
group.setCurrentTime(250);
- QCOMPARE(group.currentTime(), 250);
- QCOMPARE(sequence->currentTime(), 250);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a2_s_o1->currentTime(), 0);
- QCOMPARE(a3_s_o1->currentTime(), 0);
- QCOMPARE(a1_s_o2->currentTime(), 250);
- QCOMPARE(a1_s_o3->currentTime(), 0);
- QCOMPARE(a1_p_o1->currentTime(), 250);
- QCOMPARE(a1_p_o2->currentTime(), 0);
+ QCOMPARE(group.currentLoopTime(), 250);
+ QCOMPARE(sequence->currentLoopTime(), 250);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 0);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 0);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 250);
+ QCOMPARE(a1_s_o3->currentLoopTime(), 0);
+ QCOMPARE(a1_p_o1->currentLoopTime(), 250);
+ QCOMPARE(a1_p_o2->currentLoopTime(), 0);
QCOMPARE(a1_p_o2->currentLoop(), 1);
- QCOMPARE(a1_p_o3->currentTime(), 250);
- QCOMPARE(notTimeDriven->currentTime(), 250);
- QCOMPARE(loopsForever->currentTime(), 0);
+ QCOMPARE(a1_p_o3->currentLoopTime(), 250);
+ QCOMPARE(notTimeDriven->currentLoopTime(), 250);
+ QCOMPARE(loopsForever->currentLoopTime(), 0);
QCOMPARE(loopsForever->currentLoop(), 1);
QCOMPARE(sequence->currentAnimation(), a2_s_o1);
// Current time = 251
group.setCurrentTime(251);
- QCOMPARE(group.currentTime(), 251);
- QCOMPARE(sequence->currentTime(), 251);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a2_s_o1->currentTime(), 1);
+ QCOMPARE(group.currentLoopTime(), 251);
+ QCOMPARE(sequence->currentLoopTime(), 251);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 1);
QCOMPARE(a2_s_o1->currentLoop(), 0);
- QCOMPARE(a3_s_o1->currentTime(), 0);
- QCOMPARE(sequence2->currentTime(), 251);
- QCOMPARE(a1_s_o2->currentTime(), 250);
- QCOMPARE(a1_s_o3->currentTime(), 1);
- QCOMPARE(a1_p_o1->currentTime(), 250);
- QCOMPARE(a1_p_o2->currentTime(), 1);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 0);
+ QCOMPARE(sequence2->currentLoopTime(), 251);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 250);
+ QCOMPARE(a1_s_o3->currentLoopTime(), 1);
+ QCOMPARE(a1_p_o1->currentLoopTime(), 250);
+ QCOMPARE(a1_p_o2->currentLoopTime(), 1);
QCOMPARE(a1_p_o2->currentLoop(), 1);
- QCOMPARE(a1_p_o3->currentTime(), 250);
- QCOMPARE(notTimeDriven->currentTime(), 251);
- QCOMPARE(loopsForever->currentTime(), 1);
+ QCOMPARE(a1_p_o3->currentLoopTime(), 250);
+ QCOMPARE(notTimeDriven->currentLoopTime(), 251);
+ QCOMPARE(loopsForever->currentLoopTime(), 1);
QCOMPARE(sequence->currentAnimation(), a2_s_o1);
}
@@ -356,7 +356,7 @@ void tst_QAnimationGroup::addChildTwice()
parent->addAnimation(subGroup);
QCOMPARE(parent->animationCount(), 1);
- parent->clearAnimations();
+ parent->clear();
QCOMPARE(parent->animationCount(), 0);
diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp
index 51a7ff8142..18ebddcdaa 100644
--- a/tests/auto/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/qcombobox/tst_qcombobox.cpp
@@ -57,6 +57,7 @@
#include <qtreewidget.h>
#include <qtablewidget.h>
#include <qscrollbar.h>
+#include <qboxlayout.h>
#ifdef Q_WS_MAC
#include <qmacstyle_mac.h>
#elif defined Q_WS_X11
@@ -154,6 +155,7 @@ private slots:
void removeItem();
void resetModel();
void keyBoardNavigationWithMouse();
+ void task_QTBUG_1071_changingFocusEmitsActivated();
protected slots:
void onEditTextChanged( const QString &newString );
@@ -813,21 +815,25 @@ void tst_QComboBox::autoCompletionCaseSensitivity()
// case insensitive
testWidget->clearEditText();
+ QSignalSpy spyReturn(testWidget, SIGNAL(activated(int)));
testWidget->setAutoCompletionCaseSensitivity(Qt::CaseInsensitive);
QVERIFY(testWidget->autoCompletionCaseSensitivity() == Qt::CaseInsensitive);
QTest::keyClick(testWidget->lineEdit(), Qt::Key_A);
qApp->processEvents();
QCOMPARE(testWidget->currentText(), QString("aww"));
+ QCOMPARE(spyReturn.count(), 0);
QTest::keyClick(testWidget->lineEdit(), Qt::Key_B);
qApp->processEvents();
// autocompletions preserve userkey-case from 4.2
QCOMPARE(testWidget->currentText(), QString("abCDEF"));
+ QCOMPARE(spyReturn.count(), 0);
QTest::keyClick(testWidget->lineEdit(), Qt::Key_Enter);
qApp->processEvents();
QCOMPARE(testWidget->currentText(), QString("aBCDEF")); // case restored to item's case
+ QCOMPARE(spyReturn.count(), 1);
testWidget->clearEditText();
QTest::keyClick(testWidget->lineEdit(), 'c');
@@ -2500,6 +2506,31 @@ void tst_QComboBox::keyBoardNavigationWithMouse()
QTRY_COMPARE(combo.currentText(), QString::number(final));
}
+void tst_QComboBox::task_QTBUG_1071_changingFocusEmitsActivated()
+{
+ QWidget w;
+ QVBoxLayout layout(&w);
+ QComboBox cb;
+ cb.setEditable(true);
+ QSignalSpy spy(&cb, SIGNAL(activated(int)));
+ cb.addItem("0");
+ cb.addItem("1");
+ cb.addItem("2");
+ QLineEdit edit;
+ layout.add(&cb);
+ layout.add(&edit);
+
+ w.show();
+ QTest::qWaitForWindowShown(&w);
+ cb.clearEditText();
+ cb.setFocus();
+ QApplication::processEvents();
+ QTest::keyClick(0, '1');
+ QCOMPARE(spy.count(), 0);
+ edit.setFocus();
+ QTRY_VERIFY(edit.hasFocus());
+ QTRY_COMPARE(spy.count(), 1);
+}
QTEST_MAIN(tst_QComboBox)
#include "tst_qcombobox.moc"
diff --git a/tests/auto/qcssparser/tst_qcssparser.cpp b/tests/auto/qcssparser/tst_qcssparser.cpp
index 150f131f02..3580252c7f 100644
--- a/tests/auto/qcssparser/tst_qcssparser.cpp
+++ b/tests/auto/qcssparser/tst_qcssparser.cpp
@@ -1556,8 +1556,11 @@ void tst_QCssParser::extractFontFamily_data()
QTest::newRow("shorthand") << "font: 12pt Times New Roman" << QString("Times New Roman");
QTest::newRow("shorthand multiple quote") << "font: 12pt invalid, \"Times New Roman\" " << QString("Times New Roman");
QTest::newRow("shorthand multiple") << "font: 12pt invalid, Times New Roman " << QString("Times New Roman");
+ QTest::newRow("invalid spaces") << "font-family: invalid spaces, Times New Roman " << QString("Times New Roman");
+ QTest::newRow("invalid spaces quotes") << "font-family: 'invalid spaces', 'Times New Roman' " << QString("Times New Roman");
}
+
void tst_QCssParser::extractFontFamily()
{
QFETCH(QString, css);
diff --git a/tests/auto/qdatastream/tst_qdatastream.cpp b/tests/auto/qdatastream/tst_qdatastream.cpp
index 56fc53a235..7535645d1e 100644
--- a/tests/auto/qdatastream/tst_qdatastream.cpp
+++ b/tests/auto/qdatastream/tst_qdatastream.cpp
@@ -1461,7 +1461,7 @@ void tst_QDataStream::readQImage(QDataStream *s)
QVERIFY(d12.width() == ref.width());
QVERIFY(d12.height() == ref.height());
QVERIFY(d12.depth() == ref.depth());
- QVERIFY(d12.numColors() == ref.numColors());
+ QVERIFY(d12.colorCount() == ref.colorCount());
#ifdef QT3_SUPPORT
QVERIFY(d12.hasAlphaBuffer() == ref.hasAlphaBuffer());
#else
diff --git a/tests/auto/qfile/largefile/largefile.pro b/tests/auto/qfile/largefile/largefile.pro
new file mode 100644
index 0000000000..0f968659a1
--- /dev/null
+++ b/tests/auto/qfile/largefile/largefile.pro
@@ -0,0 +1,4 @@
+load(qttest_p4)
+
+QT = core
+SOURCES += tst_largefile.cpp
diff --git a/tests/auto/qfile/largefile/tst_largefile.cpp b/tests/auto/qfile/largefile/tst_largefile.cpp
new file mode 100644
index 0000000000..9105063e73
--- /dev/null
+++ b/tests/auto/qfile/largefile/tst_largefile.cpp
@@ -0,0 +1,537 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QTest>
+
+#include <QtAlgorithms>
+#include <QFile>
+#include <QFileInfo>
+#include <qplatformdefs.h>
+
+#include <QDebug>
+
+#include <cstdlib>
+#include <cstdio>
+
+#ifdef Q_OS_WIN
+
+#include <windows.h>
+#include <io.h>
+
+#ifndef FSCTL_SET_SPARSE
+// MinGW doesn't define this.
+#define FSCTL_SET_SPARSE (0x900C4)
+#endif
+
+#endif // Q_OS_WIN
+
+class tst_LargeFile
+ : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_LargeFile()
+ : blockSize(1 << 12)
+ , maxSizeBits()
+ , fd_(-1)
+ , stream_(0)
+ {
+ #if defined(QT_LARGEFILE_SUPPORT) && !defined(Q_OS_MAC)
+ maxSizeBits = 36; // 64 GiB
+ #elif defined(Q_OS_MAC)
+ // HFS+ does not support sparse files, so we limit file size for the test
+ // on Mac OS.
+ maxSizeBits = 32; // 4 GiB
+ #else
+ maxSizeBits = 24; // 16 MiB
+ #endif
+ }
+
+private:
+ void sparseFileData();
+ QByteArray const &getDataBlock(int index, qint64 position);
+
+private slots:
+ // The LargeFile test case was designed to be run in order as a single unit
+
+ void initTestCase();
+ void cleanupTestCase();
+
+ void init();
+ void cleanup();
+
+ // Create and fill large file
+ void createSparseFile();
+ void fillFileSparsely();
+ void closeSparseFile();
+
+ // Verify file was created
+ void fileCreated();
+
+ // Positioning in large files
+ void filePositioning();
+ void fdPositioning();
+ void streamPositioning();
+
+ // Read data from file
+ void openFileForReading();
+ void readFile();
+
+ // Map/unmap large file
+ void mapFile();
+ void mapOffsetOverflow();
+
+ void closeFile() { largeFile.close(); }
+
+ // Test data
+ void fillFileSparsely_data() { sparseFileData(); }
+ void filePositioning_data() { sparseFileData(); }
+ void fdPositioning_data() { sparseFileData(); }
+ void streamPositioning_data() { sparseFileData(); }
+ void readFile_data() { sparseFileData(); }
+ void mapFile_data() { sparseFileData(); }
+
+private:
+ const int blockSize;
+ int maxSizeBits;
+
+ QFile largeFile;
+
+ QVector<QByteArray> generatedBlocks;
+
+ int fd_;
+ FILE *stream_;
+};
+
+/*
+ Convenience function to hide reinterpret_cast when copying a POD directly
+ into a QByteArray.
+ */
+template <class T>
+static inline void appendRaw(QByteArray &array, T data)
+{
+ array.append(reinterpret_cast<char *>(&data), sizeof(T));
+}
+
+/*
+ Pad array with filler up to size. On return, array.size() returns size.
+ */
+static inline void topUpWith(QByteArray &array, QByteArray filler, int size)
+{
+ Q_ASSERT(filler.size() > 0);
+
+ for (int i = (size - array.size()) / filler.size(); i > 0; --i)
+ array.append(filler);
+
+ if (array.size() < size) {
+ Q_ASSERT(size - array.size() < filler.size());
+ array.append(filler.left(size - array.size()));
+ }
+}
+
+/*
+ Generate a unique data block containing identifiable data. Unaligned,
+ overlapping and partial blocks should not compare equal.
+ */
+static inline QByteArray generateDataBlock(int blockSize, QString text, qint64 userBits = -1)
+{
+ QByteArray block;
+ block.reserve(blockSize);
+
+ // Use of counter and randomBits means content of block will be dependent
+ // on the generation order. For (file-)systems that do not support sparse
+ // files, these can be removed so the test file can be reused and doesn't
+ // have to be generated for every run.
+
+ static qint64 counter = 0;
+
+ qint64 randomBits = ((qint64)qrand() << 32)
+ | ((qint64)qrand() & 0x00000000ffffffff);
+
+ appendRaw(block, randomBits);
+ appendRaw(block, userBits);
+ appendRaw(block, counter);
+ appendRaw(block, (qint32)0xdeadbeef);
+ appendRaw(block, blockSize);
+
+ QByteArray userContent = text.toUtf8();
+ appendRaw(block, userContent.size());
+ block.append(userContent);
+ appendRaw(block, (qint64)0);
+
+ // size, so far
+ appendRaw(block, block.size());
+
+ QByteArray filler("0123456789");
+ block.append(filler.right(10 - block.size() % 10));
+ topUpWith(block, filler, blockSize - 2 * sizeof(qint64));
+
+ appendRaw(block, counter);
+ appendRaw(block, userBits);
+ appendRaw(block, randomBits);
+
+ Q_ASSERT( block.size() >= blockSize );
+ block.resize(blockSize);
+
+ ++counter;
+ return block;
+}
+
+/*
+ Generates data blocks the first time they are requested. Keeps copies for reuse.
+ */
+QByteArray const &tst_LargeFile::getDataBlock(int index, qint64 position)
+{
+ if (index >= generatedBlocks.size())
+ generatedBlocks.resize(index + 1);
+
+ if (generatedBlocks[index].isNull()) {
+ QString text = QString("Current %1-byte block (index = %2) "
+ "starts %3 bytes into the file '%4'.")
+ .arg(blockSize)
+ .arg(index)
+ .arg(position)
+ .arg("qt_largefile.tmp");
+
+ generatedBlocks[index] = generateDataBlock(blockSize, text, (qint64)1 << index);
+ }
+
+ return generatedBlocks[index];
+}
+
+void tst_LargeFile::initTestCase()
+{
+ QFile file("qt_largefile.tmp");
+ QVERIFY( !file.exists() || file.remove() );
+}
+
+void tst_LargeFile::cleanupTestCase()
+{
+ if (largeFile.isOpen())
+ largeFile.close();
+
+ QFile file("qt_largefile.tmp");
+ QVERIFY( !file.exists() || file.remove() );
+}
+
+void tst_LargeFile::init()
+{
+ fd_ = -1;
+ stream_ = 0;
+}
+
+void tst_LargeFile::cleanup()
+{
+ if (-1 != fd_)
+ QT_CLOSE(fd_);
+ if (stream_)
+ ::fclose(stream_);
+}
+
+void tst_LargeFile::sparseFileData()
+{
+ QTest::addColumn<int>("index");
+ QTest::addColumn<qint64>("position");
+ QTest::addColumn<QByteArray>("block");
+
+ QTest::newRow(QString("block[%1] @%2)")
+ .arg(0).arg(0)
+ .toLocal8Bit().constData())
+ << 0 << (qint64)0 << getDataBlock(0, 0);
+
+ // While on Linux sparse files scale well, on Windows, testing at every
+ // power of 2 leads to very large files. i += 4 gives us a good coverage
+ // without taxing too much on resources.
+ for (int index = 12; index <= maxSizeBits; index += 4) {
+ qint64 position = (qint64)1 << index;
+ QByteArray block = getDataBlock(index, position);
+
+ QTest::newRow(
+ QString("block[%1] @%2)")
+ .arg(index).arg(position)
+ .toLocal8Bit().constData())
+ << index << position << block;
+ }
+}
+
+void tst_LargeFile::createSparseFile()
+{
+#if defined(Q_OS_WIN)
+ // On Windows platforms, we must explicitly set the file to be sparse,
+ // so disk space is not allocated for the full file when writing to it.
+ HANDLE handle = ::CreateFileA("qt_largefile.tmp",
+ GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, 0);
+ QVERIFY( INVALID_HANDLE_VALUE != handle );
+
+ DWORD bytes;
+ if (!::DeviceIoControl(handle, FSCTL_SET_SPARSE, NULL, 0, NULL, 0,
+ &bytes, NULL)) {
+ QWARN("Unable to set test file as sparse. "
+ "Limiting test file to 16MiB.");
+ maxSizeBits = 24;
+ }
+
+ int fd = ::_open_osfhandle((intptr_t)handle, 0);
+ QVERIFY( -1 != fd );
+ QVERIFY( largeFile.open(fd, QIODevice::WriteOnly | QIODevice::Unbuffered) );
+#else // !Q_OS_WIN
+ largeFile.setFileName("qt_largefile.tmp");
+ QVERIFY( largeFile.open(QIODevice::WriteOnly | QIODevice::Unbuffered) );
+#endif
+}
+
+void tst_LargeFile::closeSparseFile()
+{
+#if defined(Q_OS_WIN)
+ int fd = largeFile.handle();
+#endif
+
+ largeFile.close();
+
+#if defined(Q_OS_WIN)
+ if (-1 != fd)
+ ::_close(fd);
+#endif
+}
+
+void tst_LargeFile::fillFileSparsely()
+{
+ QFETCH( qint64, position );
+ QFETCH( QByteArray, block );
+ QCOMPARE( block.size(), blockSize );
+
+ static int lastKnownGoodIndex = 0;
+ struct ScopeGuard {
+ ScopeGuard(tst_LargeFile* test)
+ : this_(test)
+ , failed(true)
+ {
+ QFETCH( int, index );
+ index_ = index;
+ }
+
+ ~ScopeGuard()
+ {
+ if (failed) {
+ this_->maxSizeBits = lastKnownGoodIndex;
+ QWARN( qPrintable(
+ QString("QFile::error %1: '%2'. Maximum size bits reset to %3.")
+ .arg(this_->largeFile.error())
+ .arg(this_->largeFile.errorString())
+ .arg(this_->maxSizeBits)) );
+ } else
+ lastKnownGoodIndex = qMax<int>(index_, lastKnownGoodIndex);
+ }
+
+ private:
+ tst_LargeFile * const this_;
+ int index_;
+
+ public:
+ bool failed;
+ };
+
+ ScopeGuard resetMaxSizeBitsOnFailure(this);
+
+ QVERIFY( largeFile.seek(position) );
+ QCOMPARE( largeFile.pos(), position );
+
+ QCOMPARE( largeFile.write(block), (qint64)blockSize );
+ QCOMPARE( largeFile.pos(), position + blockSize );
+ QVERIFY( largeFile.flush() );
+
+ resetMaxSizeBitsOnFailure.failed = false;
+}
+
+void tst_LargeFile::fileCreated()
+{
+ QFileInfo info("qt_largefile.tmp");
+
+ QVERIFY( info.exists() );
+ QVERIFY( info.isFile() );
+ QVERIFY( info.size() >= ((qint64)1 << maxSizeBits) + blockSize );
+}
+
+void tst_LargeFile::filePositioning()
+{
+ QFETCH( qint64, position );
+
+ QFile file("qt_largefile.tmp");
+ QVERIFY( file.open(QIODevice::ReadOnly) );
+
+ QVERIFY( file.seek(position) );
+ QCOMPARE( file.pos(), position );
+}
+
+void tst_LargeFile::fdPositioning()
+{
+ QFETCH( qint64, position );
+
+ fd_ = QT_OPEN("qt_largefile.tmp",
+ QT_OPEN_RDONLY | QT_OPEN_LARGEFILE);
+ QVERIFY( -1 != fd_ );
+
+ QFile file;
+ QVERIFY( file.open(fd_, QIODevice::ReadOnly) );
+ QCOMPARE( file.pos(), (qint64)0 );
+ QVERIFY( file.seek(position) );
+ QCOMPARE( file.pos(), position );
+
+ file.close();
+
+ QCOMPARE( QT_LSEEK(fd_, QT_OFF_T(0), SEEK_SET), QT_OFF_T(0) );
+ QCOMPARE( QT_LSEEK(fd_, QT_OFF_T(position), SEEK_SET), QT_OFF_T(position) );
+
+ QVERIFY( file.open(fd_, QIODevice::ReadOnly) );
+ QCOMPARE( QT_LSEEK(fd_, QT_OFF_T(0), SEEK_CUR), QT_OFF_T(position) );
+ QCOMPARE( file.pos(), position );
+ QVERIFY( file.seek(0) );
+ QCOMPARE( file.pos(), (qint64)0 );
+
+ file.close();
+
+ QVERIFY( !QT_CLOSE(fd_) );
+ fd_ = -1;
+}
+
+void tst_LargeFile::streamPositioning()
+{
+ QFETCH( qint64, position );
+
+#if defined(QT_LARGEFILE_SUPPORT) && defined(Q_CC_MSVC) && _MSC_VER < 1400
+ if (position >= (qint64)1 << 31)
+ QSKIP("MSVC 2003 doesn't have 64 bit versions of fseek/ftell.", SkipSingle);
+#endif
+
+ stream_ = QT_FOPEN("qt_largefile.tmp", "rb");
+ QVERIFY( 0 != stream_ );
+
+ QFile file;
+ QVERIFY( file.open(stream_, QIODevice::ReadOnly) );
+ QCOMPARE( file.pos(), (qint64)0 );
+ QVERIFY( file.seek(position) );
+ QCOMPARE( file.pos(), position );
+
+ file.close();
+
+ QVERIFY( !QT_FSEEK(stream_, QT_OFF_T(0), SEEK_SET) );
+ QCOMPARE( QT_FTELL(stream_), QT_OFF_T(0) );
+ QVERIFY( !QT_FSEEK(stream_, QT_OFF_T(position), SEEK_SET) );
+ QCOMPARE( QT_FTELL(stream_), QT_OFF_T(position) );
+
+ QVERIFY( file.open(stream_, QIODevice::ReadOnly) );
+ QCOMPARE( QT_FTELL(stream_), QT_OFF_T(position) );
+ QCOMPARE( file.pos(), position );
+ QVERIFY( file.seek(0) );
+ QCOMPARE( file.pos(), (qint64)0 );
+
+ file.close();
+
+ QVERIFY( !::fclose(stream_) );
+ stream_ = 0;
+}
+
+void tst_LargeFile::openFileForReading()
+{
+ largeFile.setFileName("qt_largefile.tmp");
+ QVERIFY( largeFile.open(QIODevice::ReadOnly) );
+}
+
+void tst_LargeFile::readFile()
+{
+ QFETCH( qint64, position );
+ QFETCH( QByteArray, block );
+ QCOMPARE( block.size(), blockSize );
+
+ QVERIFY( largeFile.size() >= position + blockSize );
+
+ QVERIFY( largeFile.seek(position) );
+ QCOMPARE( largeFile.pos(), position );
+
+ QCOMPARE( largeFile.read(blockSize), block );
+ QCOMPARE( largeFile.pos(), position + blockSize );
+}
+
+void tst_LargeFile::mapFile()
+{
+ QFETCH( qint64, position );
+ QFETCH( QByteArray, block );
+ QCOMPARE( block.size(), blockSize );
+
+ // Keep full block mapped to facilitate OS and/or internal reuse by Qt.
+ uchar *baseAddress = largeFile.map(position, blockSize);
+ QVERIFY( baseAddress );
+ QVERIFY( qEqual(block.begin(), block.end(), reinterpret_cast<char*>(baseAddress)) );
+
+ for (int offset = 1; offset < blockSize; ++offset) {
+ uchar *address = largeFile.map(position + offset, blockSize - offset);
+
+ QVERIFY( address );
+ if ( !qEqual(block.begin() + offset, block.end(), reinterpret_cast<char*>(address)) ) {
+ qDebug() << "Expected:" << block.toHex();
+ qDebug() << "Actual :" << QByteArray(reinterpret_cast<char*>(address), blockSize).toHex();
+ QVERIFY(false);
+ }
+
+ QVERIFY( largeFile.unmap( address ) );
+ }
+
+ QVERIFY( largeFile.unmap( baseAddress ) );
+}
+
+void tst_LargeFile::mapOffsetOverflow()
+{
+ // Out-of-range mappings should fail, and not silently clip the offset
+ for (int i = 50; i < 63; ++i) {
+ uchar *address = 0;
+
+ address = largeFile.map(((qint64)1 << i), blockSize);
+ QVERIFY( !address );
+
+ address = largeFile.map(((qint64)1 << i) + blockSize, blockSize);
+ QVERIFY( !address );
+ }
+}
+
+QTEST_APPLESS_MAIN(tst_LargeFile)
+#include "tst_largefile.moc"
+
diff --git a/tests/auto/qfile/qfile.pro b/tests/auto/qfile/qfile.pro
index eebfcdafe9..f70f75025b 100644
--- a/tests/auto/qfile/qfile.pro
+++ b/tests/auto/qfile/qfile.pro
@@ -5,5 +5,5 @@ wince*:{
SUBDIRS = test stdinprocess
}
-
+SUBDIRS += largefile
diff --git a/tests/auto/qfile/tst_qfile.cpp b/tests/auto/qfile/tst_qfile.cpp
index 19fbecd239..b3d6fd917e 100644
--- a/tests/auto/qfile/tst_qfile.cpp
+++ b/tests/auto/qfile/tst_qfile.cpp
@@ -79,6 +79,22 @@
# define SRCDIR ""
#endif
+#ifndef STDIN_FILENO
+#define STDIN_FILENO 0
+#endif
+
+#ifndef STDOUT_FILENO
+#define STDOUT_FILENO 1
+#endif
+
+#ifndef STDERR_FILENO
+#define STDERR_FILENO 2
+#endif
+
+#ifndef QT_OPEN_BINARY
+#define QT_OPEN_BINARY 0
+#endif
+
Q_DECLARE_METATYPE(QFile::FileError)
//TESTED_CLASS=
@@ -105,6 +121,7 @@ private slots:
void openUnbuffered();
void size_data();
void size();
+ void sizeNoExist();
void seek();
void setSize();
void setSizeSeek();
@@ -187,6 +204,8 @@ private slots:
void mapOpenMode_data();
void mapOpenMode();
+ void openStandardStreams();
+
// --- Task related tests below this line
void task167217();
@@ -196,6 +215,81 @@ public:
// disabled this test for the moment... it hangs
void invalidFile_data();
void invalidFile();
+
+private:
+ enum FileType { OpenQFile, OpenFd, OpenStream };
+
+ bool openFd(QFile &file, QIODevice::OpenMode mode)
+ {
+ int fdMode = QT_OPEN_LARGEFILE | QT_OPEN_BINARY;
+
+ // File will be truncated if in Write mode.
+ if (mode & QIODevice::WriteOnly)
+ fdMode |= QT_OPEN_WRONLY | QT_OPEN_TRUNC;
+ if (mode & QIODevice::ReadOnly)
+ fdMode |= QT_OPEN_RDONLY;
+
+ fd_ = QT_OPEN(qPrintable(file.fileName()), fdMode);
+
+ return (-1 != fd_) && file.open(fd_, mode);
+ }
+
+ bool openStream(QFile &file, QIODevice::OpenMode mode)
+ {
+ char const *streamMode = "";
+
+ // File will be truncated if in Write mode.
+ if (mode & QIODevice::WriteOnly)
+ streamMode = "wb+";
+ else if (mode & QIODevice::ReadOnly)
+ streamMode = "rb";
+
+ stream_ = QT_FOPEN(qPrintable(file.fileName()), streamMode);
+
+ return stream_ && file.open(stream_, mode);
+ }
+
+ bool openFile(QFile &file, QIODevice::OpenMode mode, FileType type = OpenQFile)
+ {
+ if (mode & QIODevice::WriteOnly && !file.exists())
+ {
+ // Make sure the file exists
+ QFile createFile(file.fileName());
+ if (!createFile.open(QIODevice::ReadWrite))
+ return false;
+ }
+
+ // Note: openFd and openStream will truncate the file if write mode.
+ switch (type)
+ {
+ case OpenQFile:
+ return file.open(mode);
+
+ case OpenFd:
+ return openFd(file, mode);
+
+ case OpenStream:
+ return openStream(file, mode);
+ }
+
+ return false;
+ }
+
+ void closeFile(QFile &file)
+ {
+ file.close();
+
+ if (-1 != fd_)
+ QT_CLOSE(fd_);
+ if (stream_)
+ ::fclose(stream_);
+
+ fd_ = -1;
+ stream_ = 0;
+ }
+
+ int fd_;
+ FILE *stream_;
};
tst_QFile::tst_QFile()
@@ -211,6 +305,8 @@ void tst_QFile::init()
{
// TODO: Add initialization code here.
// This will be executed immediately before each test is run.
+ fd_ = -1;
+ stream_ = 0;
}
void tst_QFile::cleanup()
@@ -239,6 +335,11 @@ void tst_QFile::cleanup()
QFile::remove("existing-file.txt");
QFile::remove("file-renamed-once.txt");
QFile::remove("file-renamed-twice.txt");
+
+ if (-1 != fd_)
+ QT_CLOSE(fd_);
+ if (stream_)
+ ::fclose(stream_);
}
void tst_QFile::initTestCase()
@@ -438,23 +539,57 @@ void tst_QFile::openUnbuffered()
void tst_QFile::size_data()
{
QTest::addColumn<QString>("filename");
- QTest::addColumn<int>("size");
+ QTest::addColumn<qint64>("size");
- QTest::newRow( "exist01" ) << QString(SRCDIR "testfile.txt") << 245;
- QTest::newRow( "nonexist01" ) << QString("foo.txt") << 0;
+ QTest::newRow( "exist01" ) << QString(SRCDIR "testfile.txt") << (qint64)245;
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
// Only test UNC on Windows./
- QTest::newRow("unc") << "//" + QString(QtNetworkSettings::winServerName() + "/testsharewritable/test.pri") << 34;
+ QTest::newRow("unc") << "//" + QString(QtNetworkSettings::winServerName() + "/testsharewritable/test.pri") << (qint64)34;
#endif
}
void tst_QFile::size()
{
QFETCH( QString, filename );
- QFile f( filename );
- QTEST( (int)f.size(), "size" );
- if (f.open(QFile::ReadOnly))
- QTEST( (int)f.size(), "size" );
+ QFETCH( qint64, size );
+
+ {
+ QFile f( filename );
+ QCOMPARE( f.size(), size );
+
+ QVERIFY( f.open(QIODevice::ReadOnly) );
+ QCOMPARE( f.size(), size );
+ }
+
+ {
+ QFile f;
+ int fd = QT_OPEN(filename.toLocal8Bit().constData(), QT_OPEN_RDONLY);
+ QVERIFY( fd != -1 );
+ QVERIFY( f.open(fd, QIODevice::ReadOnly) );
+ QCOMPARE( f.size(), size );
+
+ f.close();
+ QT_CLOSE(fd);
+ }
+
+ {
+ QFile f;
+ FILE* stream = QT_FOPEN(filename.toLocal8Bit().constData(), "rb");
+ QVERIFY( stream );
+ QVERIFY( f.open(stream, QIODevice::ReadOnly) );
+ QCOMPARE( f.size(), size );
+
+ f.close();
+ fclose(stream);
+ }
+}
+
+void tst_QFile::sizeNoExist()
+{
+ QFile file("nonexist01");
+ QVERIFY( !file.exists() );
+ QCOMPARE( file.size(), (qint64)0 );
+ QVERIFY( !file.open(QIODevice::ReadOnly) );
}
void tst_QFile::seek()
@@ -1909,53 +2044,71 @@ void tst_QFile::fullDisk()
void tst_QFile::writeLargeDataBlock_data()
{
QTest::addColumn<QString>("fileName");
+ QTest::addColumn<int>("type");
+
+ QTest::newRow("localfile-QFile") << "./largeblockfile.txt" << (int)OpenQFile;
+ QTest::newRow("localfile-Fd") << "./largeblockfile.txt" << (int)OpenFd;
+ QTest::newRow("localfile-Stream") << "./largeblockfile.txt" << (int)OpenStream;
- QTest::newRow("localfile") << QString("./largeblockfile.txt");
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
// Some semi-randomness to avoid collisions.
QTest::newRow("unc file")
<< QString("//" + QtNetworkSettings::winServerName() + "/TESTSHAREWRITABLE/largefile-%1-%2.txt")
.arg(QHostInfo::localHostName())
- .arg(QTime::currentTime().msec());
+ .arg(QTime::currentTime().msec()) << (int)OpenQFile;
#endif
}
-void tst_QFile::writeLargeDataBlock()
+static QByteArray getLargeDataBlock()
{
- QFETCH(QString, fileName);
+ static QByteArray array;
- // Generate a 64MB array with well defined contents.
- QByteArray array;
+ if (array.isNull())
+ {
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
- int resizeSize = 1024 * 1024; // WinCE and Symbian do not have much space
+ int resizeSize = 1024 * 1024; // WinCE and Symbian do not have much space
#else
- int resizeSize = 64 * 1024 * 1024;
+ int resizeSize = 64 * 1024 * 1024;
#endif
- array.resize(resizeSize);
- for (int i = 0; i < array.size(); ++i)
- array[i] = uchar(i);
+ array.resize(resizeSize);
+ for (int i = 0; i < array.size(); ++i)
+ array[i] = uchar(i);
+ }
- // Remove and open the target file
- QFile file(fileName);
- file.remove();
- if (file.open(QFile::WriteOnly)) {
- QCOMPARE(file.write(array), qint64(array.size()));
- file.close();
- QVERIFY(file.open(QFile::ReadOnly));
- array.clear();
- array = file.readAll();
- file.remove();
- } else {
- QFAIL(qPrintable(QString("Couldn't open file for writing: [%1]").arg(fileName)));
- }
- // Check that we got the right content
- QCOMPARE(array.size(), resizeSize);
- for (int i = 0; i < array.size(); ++i) {
- if (array[i] != char(i)) {
- QFAIL(qPrintable(QString("Wrong contents! Char at %1 = %2, expected %3")
- .arg(i).arg(int(uchar(array[i]))).arg(int(uchar(i)))));
- }
+ return array;
+}
+
+void tst_QFile::writeLargeDataBlock()
+{
+ QFETCH(QString, fileName);
+ QFETCH( int, type );
+
+ QByteArray const originalData = getLargeDataBlock();
+
+ {
+ QFile file(fileName);
+
+ QVERIFY2( openFile(file, QIODevice::WriteOnly, (FileType)type),
+ qPrintable(QString("Couldn't open file for writing: [%1]").arg(fileName)) );
+ QCOMPARE( file.write(originalData), (qint64)originalData.size() );
+ QVERIFY( file.flush() );
+
+ closeFile(file);
}
+
+ QByteArray readData;
+
+ {
+ QFile file(fileName);
+
+ QVERIFY2( openFile(file, QIODevice::ReadOnly, (FileType)type),
+ qPrintable(QString("Couldn't open file for reading: [%1]").arg(fileName)) );
+ readData = file.readAll();
+ closeFile(file);
+ }
+
+ QCOMPARE( readData, originalData );
+ QVERIFY( QFile::remove(fileName) );
}
void tst_QFile::readFromWriteOnlyFile()
@@ -2634,5 +2787,58 @@ void tst_QFile::openDirectory()
QVERIFY(!f1.open(QIODevice::ReadOnly|QIODevice::Unbuffered));
}
+void tst_QFile::openStandardStreams()
+{
+ // Using file descriptors
+ {
+ QFile in;
+ in.open(STDIN_FILENO, QIODevice::ReadOnly);
+ QCOMPARE( in.pos(), (qint64)0 );
+ QCOMPARE( in.size(), (qint64)0 );
+ QVERIFY( in.isSequential() );
+ }
+
+ {
+ QFile out;
+ out.open(STDOUT_FILENO, QIODevice::WriteOnly);
+ QCOMPARE( out.pos(), (qint64)0 );
+ QCOMPARE( out.size(), (qint64)0 );
+ QVERIFY( out.isSequential() );
+ }
+
+ {
+ QFile err;
+ err.open(STDERR_FILENO, QIODevice::WriteOnly);
+ QCOMPARE( err.pos(), (qint64)0 );
+ QCOMPARE( err.size(), (qint64)0 );
+ QVERIFY( err.isSequential() );
+ }
+
+ // Using streams
+ {
+ QFile in;
+ in.open(stdin, QIODevice::ReadOnly);
+ QCOMPARE( in.pos(), (qint64)0 );
+ QCOMPARE( in.size(), (qint64)0 );
+ QVERIFY( in.isSequential() );
+ }
+
+ {
+ QFile out;
+ out.open(stdout, QIODevice::WriteOnly);
+ QCOMPARE( out.pos(), (qint64)0 );
+ QCOMPARE( out.size(), (qint64)0 );
+ QVERIFY( out.isSequential() );
+ }
+
+ {
+ QFile err;
+ err.open(stderr, QIODevice::WriteOnly);
+ QCOMPARE( err.pos(), (qint64)0 );
+ QCOMPARE( err.size(), (qint64)0 );
+ QVERIFY( err.isSequential() );
+ }
+}
+
QTEST_MAIN(tst_QFile)
#include "tst_qfile.moc"
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp
index e9f0476e0b..c680decc01 100644
--- a/tests/auto/qgl/tst_qgl.cpp
+++ b/tests/auto/qgl/tst_qgl.cpp
@@ -82,7 +82,6 @@ private slots:
void glPBufferRendering();
void glWidgetReparent();
void glWidgetRenderPixmap();
- void stackedFBOs();
void colormap();
void fboFormat();
void testDontCrashOnDanglingResources();
@@ -1226,110 +1225,6 @@ void tst_QGL::glWidgetRenderPixmap()
QCOMPARE(fb, reference);
}
-
-// When using multiple FBOs at the same time, unbinding one FBO should re-bind the
-// previous. I.e. It should be possible to have a stack of FBOs where pop'ing there
-// top re-binds the one underneeth.
-void tst_QGL::stackedFBOs()
-{
- if (!QGLFramebufferObject::hasOpenGLFramebufferObjects())
- QSKIP("QGLFramebufferObject not supported on this platform", SkipSingle);
-
- QGLWidget glw;
- glw.show();
-
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(&glw);
-#endif
- QTest::qWait(200);
-
- glw.makeCurrent();
-
- // No multisample with combined depth/stencil attachment:
- QGLFramebufferObjectFormat fboFormat;
- fboFormat.setAttachment(QGLFramebufferObject::CombinedDepthStencil);
-
- // Don't complicate things by using NPOT:
- QGLFramebufferObject *fbo1 = new QGLFramebufferObject(128, 128, fboFormat);
- QGLFramebufferObject *fbo2 = new QGLFramebufferObject(128, 128, fboFormat);
- QGLFramebufferObject *fbo3 = new QGLFramebufferObject(128, 128, fboFormat);
-
- glClearColor(1.0, 0.0, 1.0, 1.0);
- glClear(GL_COLOR_BUFFER_BIT);
-
- fbo1->bind();
- glClearColor(1.0, 0.0, 0.0, 1.0);
- glClear(GL_COLOR_BUFFER_BIT);
-
- fbo2->bind();
- glClearColor(0.0, 1.0, 0.0, 1.0);
- glClear(GL_COLOR_BUFFER_BIT);
-
- fbo3->bind();
- glClearColor(0.0, 0.0, 1.0, 1.0);
- glClear(GL_COLOR_BUFFER_BIT);
- glScissor(32, 32, 64, 64);
- glEnable(GL_SCISSOR_TEST);
- glClearColor(0.0, 1.0, 1.0, 1.0);
- glClear(GL_COLOR_BUFFER_BIT);
- fbo3->release();
-
- // Scissor rect & test should be left untouched by the fbo release...
- glClearColor(0.0, 0.0, 0.0, 1.0);
- glClear(GL_COLOR_BUFFER_BIT);
- fbo2->release();
-
- glClearColor(1.0, 1.0, 1.0, 1.0);
- glClear(GL_COLOR_BUFFER_BIT);
- fbo1->release();
-
- glClearColor(1.0, 1.0, 0.0, 1.0);
- glClear(GL_COLOR_BUFFER_BIT);
-
- glw.swapBuffers();
-
- QImage widgetFB = glw.grabFrameBuffer(false).convertToFormat(QImage::Format_RGB32);
- QImage fb1 = fbo1->toImage().convertToFormat(QImage::Format_RGB32);
- QImage fb2 = fbo2->toImage().convertToFormat(QImage::Format_RGB32);
- QImage fb3 = fbo3->toImage().convertToFormat(QImage::Format_RGB32);
-
- delete fbo1;
- delete fbo2;
- delete fbo3;
-
- QImage widgetReference(widgetFB.size(), widgetFB.format());
- QImage fb1Reference(fb1.size(), fb1.format());
- QImage fb2Reference(fb2.size(), fb2.format());
- QImage fb3Reference(fb3.size(), fb3.format());
-
- QPainter widgetReferencePainter(&widgetReference);
- QPainter fb1ReferencePainter(&fb1Reference);
- QPainter fb2ReferencePainter(&fb2Reference);
- QPainter fb3ReferencePainter(&fb3Reference);
-
- widgetReferencePainter.fillRect(0, 0, widgetReference.width(), widgetReference.height(), Qt::magenta);
- fb1ReferencePainter.fillRect(0, 0, fb1Reference.width(), fb1Reference.height(), Qt::red);
- fb2ReferencePainter.fillRect(0, 0, fb2Reference.width(), fb2Reference.height(), Qt::green);
- fb3ReferencePainter.fillRect(0, 0, fb3Reference.width(), fb3Reference.height(), Qt::blue);
-
- // Flip y-coords to match GL for the widget (which can be any size)
- widgetReferencePainter.fillRect(32, glw.height() - 96, 64, 64, Qt::yellow);
- fb1ReferencePainter.fillRect(32, 32, 64, 64, Qt::white);
- fb2ReferencePainter.fillRect(32, 32, 64, 64, Qt::black);
- fb3ReferencePainter.fillRect(32, 32, 64, 64, Qt::cyan);
-
- widgetReferencePainter.end();
- fb1ReferencePainter.end();
- fb2ReferencePainter.end();
- fb3ReferencePainter.end();
-
- QCOMPARE(widgetFB, widgetReference);
- QCOMPARE(fb1, fb1Reference);
- QCOMPARE(fb2, fb2Reference);
- QCOMPARE(fb3, fb3Reference);
-}
-
-
class ColormapExtended : public QGLColormap
{
public:
diff --git a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
index c8a9facc2b..c7ed309a2b 100644
--- a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
+++ b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
@@ -79,13 +79,12 @@ private slots:
void delete_anchor();
void conflicts();
void sizePolicy();
- void expandingSequence();
- void expandingSequenceFairDistribution();
- void expandingParallel();
void floatConflict();
void infiniteMaxSizes();
void simplifiableUnfeasible();
void simplificationVsOrder();
+ void parallelSimplificationOfCenter();
+ void simplificationVsRedundance();
};
class RectWidget : public QGraphicsWidget
@@ -342,8 +341,10 @@ void tst_QGraphicsAnchorLayout::layoutDirection()
QCOMPARE(checkReverseDirection(p), true);
- QVERIFY(usedSimplex(l, Qt::Horizontal));
- QVERIFY(!usedSimplex(l, Qt::Vertical));
+ if (hasSimplification) {
+ QVERIFY(usedSimplex(l, Qt::Horizontal));
+ QVERIFY(!usedSimplex(l, Qt::Vertical));
+ }
delete p;
delete view;
@@ -1609,217 +1610,6 @@ void tst_QGraphicsAnchorLayout::conflicts()
delete p;
}
-void tst_QGraphicsAnchorLayout::expandingSequence()
-{
- QSizeF min(10, 10);
- QSizeF pref(50, 10);
- QSizeF max(100, 10);
-
- QGraphicsWidget *a = createItem(min, pref, max, "a");
- QGraphicsWidget *b = createItem(min, pref, max, "b");
-
- b->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
-
- QGraphicsAnchorLayout *l = new QGraphicsAnchorLayout;
- l->setContentsMargins(0, 0, 0, 0);
-
- // horizontal
- setAnchor(l, l, Qt::AnchorLeft, a, Qt::AnchorLeft, 0);
- setAnchor(l, a, Qt::AnchorRight, b, Qt::AnchorLeft, 0);
- setAnchor(l, b, Qt::AnchorRight, l, Qt::AnchorRight, 0);
-
- // vertical
- l->addAnchors(l, a, Qt::Vertical);
- l->addAnchors(l, b, Qt::Vertical);
-
- QCOMPARE(l->count(), 2);
-
- QGraphicsWidget p;
- p.setLayout(l);
-
- QSizeF layoutMinimumSize = l->effectiveSizeHint(Qt::MinimumSize);
- QCOMPARE(layoutMinimumSize.width(), qreal(20));
-
- QSizeF layoutExpandedSize(pref.width() + max.width(), layoutMinimumSize.height());
- p.resize(layoutExpandedSize);
-
- QCOMPARE(a->geometry().size(), pref);
- QCOMPARE(b->geometry().size(), max);
-
- QSizeF layoutMaximumSize = l->effectiveSizeHint(Qt::MaximumSize);
- QCOMPARE(layoutMaximumSize.width(), qreal(200));
-
- if (hasSimplification) {
- QVERIFY(!usedSimplex(l, Qt::Horizontal));
- QVERIFY(!usedSimplex(l, Qt::Vertical));
- }
-}
-
-void tst_QGraphicsAnchorLayout::expandingSequenceFairDistribution()
-{
- QSizeF min(10, 10);
- QSizeF pref(50, 10);
- QSizeF max(100, 10);
-
- QGraphicsWidget *a = createItem(min, pref, max, "a");
- QGraphicsWidget *b = createItem(min, pref, max, "b");
- QGraphicsWidget *c = createItem(min, pref, max, "c");
- QGraphicsWidget *d = createItem(min, pref, max, "d");
-
- b->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
- d->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
-
- QGraphicsAnchorLayout *l = new QGraphicsAnchorLayout;
- l->setContentsMargins(0, 0, 0, 0);
-
- // horizontal
- setAnchor(l, l, Qt::AnchorLeft, a, Qt::AnchorLeft, 0);
- setAnchor(l, a, Qt::AnchorRight, b, Qt::AnchorLeft, 0);
- setAnchor(l, b, Qt::AnchorRight, c, Qt::AnchorLeft, 0);
- setAnchor(l, c, Qt::AnchorRight, d, Qt::AnchorLeft, 0);
- setAnchor(l, d, Qt::AnchorRight, l, Qt::AnchorRight, 0);
-
- // vertical
- l->addAnchors(l, a, Qt::Vertical);
- l->addAnchors(l, b, Qt::Vertical);
- l->addAnchors(l, c, Qt::Vertical);
- l->addAnchors(l, d, Qt::Vertical);
-
- QCOMPARE(l->count(), 4);
-
- QGraphicsWidget p;
- p.setLayout(l);
-
- QSizeF layoutMinimumSize = l->effectiveSizeHint(Qt::MinimumSize);
- QCOMPARE(layoutMinimumSize.width(), qreal(40));
-
- QSizeF layoutPartialExpandedSize((2 * pref.width()) + (2 * (pref.width() + 10)),
- layoutMinimumSize.height());
- p.resize(layoutPartialExpandedSize);
-
- QCOMPARE(a->geometry().size(), pref);
- QCOMPARE(b->geometry().size(), pref + QSizeF(10, 0));
- QCOMPARE(c->geometry().size(), pref);
- QCOMPARE(d->geometry().size(), pref + QSizeF(10, 0));
-
- QSizeF layoutExpandedSize((2 * pref.width()) + (2 * max.width()),
- layoutMinimumSize.height());
- p.resize(layoutExpandedSize);
-
- QCOMPARE(a->geometry().size(), pref);
- QCOMPARE(b->geometry().size(), max);
- QCOMPARE(c->geometry().size(), pref);
- QCOMPARE(d->geometry().size(), max);
-
- QSizeF layoutMaximumSize = l->effectiveSizeHint(Qt::MaximumSize);
- QCOMPARE(layoutMaximumSize.width(), qreal(400));
-
- if (hasSimplification) {
- QVERIFY(!usedSimplex(l, Qt::Horizontal));
- QVERIFY(!usedSimplex(l, Qt::Vertical));
- }
-
- // Now we change D to have more "room for growth" from its preferred size
- // to its maximum size. We expect a proportional fair distribution. Note that
- // this seems to not conform with what QGraphicsLinearLayout does.
- d->setMaximumSize(QSizeF(150, 10));
-
- QSizeF newLayoutExpandedSize((2 * pref.width()) + (max.width() + 150),
- layoutMinimumSize.height());
- p.resize(newLayoutExpandedSize);
-
- QCOMPARE(a->geometry().size(), pref);
- QCOMPARE(b->geometry().size(), max);
- QCOMPARE(c->geometry().size(), pref);
- QCOMPARE(d->geometry().size(), QSizeF(150, 10));
-
- QSizeF newLayoutPartialExpandedSize((4 * pref.width()) + 75,
- layoutMinimumSize.height());
- p.resize(newLayoutPartialExpandedSize);
-
- QCOMPARE(a->geometry().size(), pref);
- QCOMPARE(b->geometry().size(), pref + QSizeF(25, 0));
- QCOMPARE(c->geometry().size(), pref);
- QCOMPARE(d->geometry().size(), pref + QSizeF(50, 0));
-
- if (hasSimplification) {
- QVERIFY(!usedSimplex(l, Qt::Horizontal));
- QVERIFY(!usedSimplex(l, Qt::Vertical));
- }
-}
-
-void tst_QGraphicsAnchorLayout::expandingParallel()
-{
- QSizeF min(10, 10);
- QSizeF pref(50, 10);
- QSizeF max(100, 10);
- QSizeF max2(100, 50);
-
- QGraphicsWidget *a = createItem(min, pref, max, "a");
- QGraphicsWidget *b = createItem(min, pref, max, "b");
- QGraphicsWidget *c = createItem(min, pref, max2, "c");
-
- b->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
-
- QGraphicsAnchorLayout *l = new QGraphicsAnchorLayout;
- l->setContentsMargins(0, 0, 0, 0);
-
- // horizontal
- setAnchor(l, l, Qt::AnchorLeft, a, Qt::AnchorLeft, 0);
- setAnchor(l, l, Qt::AnchorLeft, b, Qt::AnchorLeft, 0);
-
- setAnchor(l, a, Qt::AnchorRight, c, Qt::AnchorLeft, 0);
- setAnchor(l, b, Qt::AnchorRight, c, Qt::AnchorLeft, 0);
-
- setAnchor(l, c, Qt::AnchorRight, l, Qt::AnchorRight, 0);
-
- // vertical
- l->addAnchors(l, c, Qt::Vertical);
- setAnchor(l, l, Qt::AnchorTop, a, Qt::AnchorTop, 0);
- setAnchor(l, a, Qt::AnchorBottom, c, Qt::AnchorVerticalCenter, 0);
- setAnchor(l, b, Qt::AnchorTop, c, Qt::AnchorVerticalCenter, 0);
- setAnchor(l, b, Qt::AnchorBottom, l, Qt::AnchorBottom, 0);
-
- QCOMPARE(l->count(), 3);
-
- QGraphicsWidget p;
- p.setLayout(l);
-
- QSizeF layoutMinimumSize = l->effectiveSizeHint(Qt::MinimumSize);
- QCOMPARE(layoutMinimumSize.width(), qreal(20));
-
- QSizeF layoutExpandedSize(pref.width() + max.width(), layoutMinimumSize.height());
- p.resize(layoutExpandedSize);
-
- QCOMPARE(a->geometry().size(), max);
- QCOMPARE(b->geometry().size(), max);
- QCOMPARE(c->geometry().size(), QSizeF(pref.width(), 20));
-
- QSizeF layoutMaximumSize = l->effectiveSizeHint(Qt::MaximumSize);
- QCOMPARE(layoutMaximumSize.width(), qreal(200));
-
- //
- // Change the parallel connection to a paralell connection of b with a center...
- //
- QGraphicsAnchor *anchor = l->anchor(b, Qt::AnchorRight, c, Qt::AnchorLeft);
- delete anchor;
- setAnchor(l, b, Qt::AnchorRight, a, Qt::AnchorHorizontalCenter, 0);
- a->setMaximumSize(max + QSizeF(100, 0));
-
- QSizeF newLayoutMinimumSize = l->effectiveSizeHint(Qt::MinimumSize);
- QCOMPARE(newLayoutMinimumSize.width(), qreal(30));
-
- QSizeF newLayoutExpandedSize = layoutExpandedSize + QSizeF(100, 0);
- p.resize(newLayoutExpandedSize);
-
- QCOMPARE(a->geometry().size(), max + QSizeF(100, 0));
- QCOMPARE(b->geometry().size(), max);
- QCOMPARE(c->geometry().size(), QSizeF(pref.width(), 20));
-
- QSizeF newLayoutMaximumSize = l->effectiveSizeHint(Qt::MaximumSize);
- QCOMPARE(newLayoutMaximumSize.width(), qreal(300));
-}
-
void tst_QGraphicsAnchorLayout::floatConflict()
{
QGraphicsWidget *a = createItem(QSizeF(80,10), QSizeF(90,10), QSizeF(100,10), "a");
@@ -1882,6 +1672,7 @@ void tst_QGraphicsAnchorLayout::infiniteMaxSizes()
QGraphicsWidget *b = createItem(min, pref, max, "b");
QGraphicsWidget *c = createItem(min, pref, max, "c");
QGraphicsWidget *d = createItem(min, pref, max, "d");
+ QGraphicsWidget *e = createItem(min, pref, max, "e");
//<!-- Trunk -->
setAnchor(l, l, Qt::AnchorLeft, a, Qt::AnchorLeft, 0);
@@ -1889,34 +1680,32 @@ void tst_QGraphicsAnchorLayout::infiniteMaxSizes()
setAnchor(l, b, Qt::AnchorRight, c, Qt::AnchorLeft, 0);
setAnchor(l, c, Qt::AnchorRight, d, Qt::AnchorLeft, 0);
setAnchor(l, d, Qt::AnchorRight, l, Qt::AnchorRight, 0);
-
- a->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
- c->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+ setAnchor(l, b, Qt::AnchorHorizontalCenter, e, Qt::AnchorLeft, 0);
+ setAnchor(l, e, Qt::AnchorRight, c, Qt::AnchorHorizontalCenter, 0);
QGraphicsWidget p;
p.setLayout(l);
+ QCOMPARE(int(p.effectiveSizeHint(Qt::MaximumSize).width()),
+ QWIDGETSIZE_MAX);
+
p.resize(200, 10);
QCOMPARE(a->geometry(), QRectF(0, 0, 50, 10));
QCOMPARE(b->geometry(), QRectF(50, 0, 50, 10));
QCOMPARE(c->geometry(), QRectF(100, 0, 50, 10));
QCOMPARE(d->geometry(), QRectF(150, 0, 50, 10));
- if (!hasSimplification)
- QEXPECT_FAIL("", "Without simplification there is no fair distribution.", Abort);
-
p.resize(1000, 10);
- QCOMPARE(a->geometry(), QRectF(0, 0, 450, 10));
- QCOMPARE(b->geometry(), QRectF(450, 0, 50, 10));
- QCOMPARE(c->geometry(), QRectF(500, 0, 450, 10));
- QCOMPARE(d->geometry(), QRectF(950, 0, 50, 10));
-
- qreal expMaxSize = (QWIDGETSIZE_MAX - 100.0) / 2;
- p.resize(QWIDGETSIZE_MAX, 10);
- QCOMPARE(a->geometry(), QRectF(0, 0, expMaxSize, 10));
- QCOMPARE(b->geometry(), QRectF(expMaxSize, 0, 50, 10));
- QCOMPARE(c->geometry(), QRectF(expMaxSize + 50, 0, expMaxSize, 10));
- QCOMPARE(d->geometry(), QRectF(QWIDGETSIZE_MAX - 50, 0, 50, 10));
+ QCOMPARE(a->geometry(), QRectF(0, 0, 250, 10));
+ QCOMPARE(b->geometry(), QRectF(250, 0, 250, 10));
+ QCOMPARE(c->geometry(), QRectF(500, 0, 250, 10));
+ QCOMPARE(d->geometry(), QRectF(750, 0, 250, 10));
+
+ p.resize(40000, 10);
+ QCOMPARE(a->geometry(), QRectF(0, 0, 10000, 10));
+ QCOMPARE(b->geometry(), QRectF(10000, 0, 10000, 10));
+ QCOMPARE(c->geometry(), QRectF(20000, 0, 10000, 10));
+ QCOMPARE(d->geometry(), QRectF(30000, 0, 10000, 10));
}
void tst_QGraphicsAnchorLayout::simplifiableUnfeasible()
@@ -1951,7 +1740,7 @@ void tst_QGraphicsAnchorLayout::simplifiableUnfeasible()
if (hasSimplification)
QVERIFY(!usedSimplex(l, Qt::Horizontal));
- // Now we make it valid again
+ // Now we make it valid
b->setMinimumWidth(100);
l->invalidate();
@@ -1979,9 +1768,9 @@ void tst_QGraphicsAnchorLayout::simplificationVsOrder()
QSizeF pref(20, 10);
QSizeF max(50, 10);
- QGraphicsWidget *a = createItem(min, pref, max);
- QGraphicsWidget *b = createItem(min, pref, max);
- QGraphicsWidget *c = createItem(min, pref, max);
+ QGraphicsWidget *a = createItem(min, pref, max, "A");
+ QGraphicsWidget *b = createItem(min, pref, max, "B");
+ QGraphicsWidget *c = createItem(min, pref, max, "C");
QGraphicsAnchorLayout *l = new QGraphicsAnchorLayout;
@@ -2014,5 +1803,68 @@ void tst_QGraphicsAnchorLayout::simplificationVsOrder()
}
}
+void tst_QGraphicsAnchorLayout::parallelSimplificationOfCenter()
+{
+ QSizeF min(10, 10);
+ QSizeF pref(20, 10);
+ QSizeF max(50, 10);
+
+ QGraphicsWidget *a = createItem(min, pref, max, "A");
+ QGraphicsWidget *b = createItem(min, pref, max, "B");
+
+ QGraphicsWidget parent;
+ QGraphicsAnchorLayout *l = new QGraphicsAnchorLayout(&parent);
+ l->setContentsMargins(0, 0, 0, 0);
+
+ l->addAnchor(l, Qt::AnchorLeft, a, Qt::AnchorLeft);
+ l->addAnchor(l, Qt::AnchorRight, a, Qt::AnchorRight);
+
+ l->addAnchor(a, Qt::AnchorHorizontalCenter, b, Qt::AnchorLeft);
+ l->addAnchor(b, Qt::AnchorRight, a, Qt::AnchorRight);
+
+ parent.resize(l->effectiveSizeHint(Qt::PreferredSize));
+
+ QCOMPARE(a->geometry(), QRectF(0, 0, 40, 10));
+ QCOMPARE(b->geometry(), QRectF(20, 0, 20, 10));
+}
+
+/*
+ Test whether redundance of anchors (in this case by using addCornerAnchors), will
+ prevent simplification to take place when it should.
+*/
+void tst_QGraphicsAnchorLayout::simplificationVsRedundance()
+{
+ QSizeF min(10, 10);
+ QSizeF pref(20, 10);
+ QSizeF max(50, 30);
+
+ QGraphicsWidget *a = createItem(min, pref, max, "A");
+ QGraphicsWidget *b = createItem(min, pref, max, "B");
+ QGraphicsWidget *c = createItem(min, pref, max, "C");
+
+ QGraphicsAnchorLayout *l = new QGraphicsAnchorLayout;
+
+ l->addCornerAnchors(a, Qt::TopLeftCorner, l, Qt::TopLeftCorner);
+ l->addCornerAnchors(a, Qt::BottomLeftCorner, l, Qt::BottomLeftCorner);
+
+ l->addCornerAnchors(b, Qt::TopLeftCorner, a, Qt::TopRightCorner);
+ l->addCornerAnchors(b, Qt::TopRightCorner, l, Qt::TopRightCorner);
+
+ l->addCornerAnchors(c, Qt::TopLeftCorner, b, Qt::BottomLeftCorner);
+ l->addCornerAnchors(c, Qt::BottomLeftCorner, a, Qt::BottomRightCorner);
+ l->addCornerAnchors(c, Qt::TopRightCorner, b, Qt::BottomRightCorner);
+ l->addCornerAnchors(c, Qt::BottomRightCorner, l, Qt::BottomRightCorner);
+
+ l->effectiveSizeHint(Qt::MinimumSize);
+
+ QCOMPARE(layoutHasConflict(l), false);
+
+ if (!hasSimplification)
+ QEXPECT_FAIL("", "Test depends on simplification.", Abort);
+
+ QCOMPARE(usedSimplex(l, Qt::Horizontal), false);
+ QCOMPARE(usedSimplex(l, Qt::Vertical), false);
+}
+
QTEST_MAIN(tst_QGraphicsAnchorLayout)
#include "tst_qgraphicsanchorlayout.moc"
diff --git a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
index 1c7a159e34..0fbd0692ce 100644
--- a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
+++ b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
@@ -162,10 +162,14 @@ Q_DECLARE_METATYPE(AnchorItemSizeHintList)
class TestWidget : public QGraphicsWidget
{
public:
- inline TestWidget(QGraphicsItem *parent = 0)
+ inline TestWidget(QGraphicsItem *parent = 0, const QString &name = QString())
: QGraphicsWidget(parent)
{
setContentsMargins( 0,0,0,0 );
+ if (name.isEmpty())
+ setData(0, QString::fromAscii("w%1").arg(int(this)));
+ else
+ setData(0, name);
}
~TestWidget()
{
@@ -419,7 +423,6 @@ void tst_QGraphicsAnchorLayout1::testAddAndRemoveAnchor()
layout->setAnchor(layout, Qt::AnchorLeft, widget5, Qt::AnchorTop, 10);
QCOMPARE( layout->count(), 4 );
- // ###: NOT SUPPORTED
// anchor two edges of a widget (to define width / height)
QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself");
layout->setAnchor(widget5, Qt::AnchorLeft, widget5, Qt::AnchorRight, 10);
@@ -516,8 +519,6 @@ void tst_QGraphicsAnchorLayout1::testIsValid()
widget->setLayout(layout);
widget->setGeometry(QRectF(0,0,100,100));
- // ###: this shall change once isValid() is ready
- // QCOMPARE(layout->isValid(), false);
QCOMPARE(layout->isValid(), true);
delete widget;
}
@@ -694,9 +695,8 @@ void tst_QGraphicsAnchorLayout1::testSpecialCases()
layout2->setAnchor(widget1, Qt::AnchorRight, layout2, Qt::AnchorRight, 1);
layout2->setAnchor(widget1, Qt::AnchorBottom, layout2, Qt::AnchorBottom, 1);
- // ###: uncomment when simplification bug is solved
- //widget->setGeometry(QRectF(0,0,100,100));
- //QCOMPARE(widget1->geometry(), QRectF(51,2,47,96));
+ widget->setGeometry(QRectF(0,0,100,100));
+ QCOMPARE(widget1->geometry(), QRectF(51,2,47,96));
delete widget;
}
@@ -896,9 +896,6 @@ void tst_QGraphicsAnchorLayout1::testBasicLayout_data()
<< BasicData(-1, Qt::AnchorLeft, 1, Qt::AnchorRight, 20)
;
- // ### SIMPLIFICATION BUG FOR ITEM 1
- // ### remove this when bug is solved
-
theResult
<< BasicResult(0, QRectF(10, 10, 180, 80) )
<< BasicResult(1, QRectF(10, 80, 10, 10) )
@@ -1664,6 +1661,18 @@ inline QGraphicsLayoutItem *getItem(
return widgets[index];
}
+static QRectF truncate(QRectF original)
+{
+ QRectF result;
+
+ result.setX(qRound(original.x() * 1000000) / 1000000.0);
+ result.setY(qRound(original.y() * 1000000) / 1000000.0);
+ result.setWidth(qRound(original.width() * 1000000) / 1000000.0);
+ result.setHeight(qRound(original.height() * 1000000) / 1000000.0);
+
+ return result;
+}
+
void tst_QGraphicsAnchorLayout1::testBasicLayout()
{
QFETCH(QSizeF, size);
@@ -1684,7 +1693,7 @@ void tst_QGraphicsAnchorLayout1::testBasicLayout()
// Create dummy widgets
QList<QGraphicsWidget *> widgets;
for (int i = 0; i < widgetCount; ++i) {
- TestWidget *w = new TestWidget;
+ TestWidget *w = new TestWidget(0, QString::fromAscii("W%1").arg(i));
widgets << w;
}
@@ -1704,19 +1713,18 @@ void tst_QGraphicsAnchorLayout1::testBasicLayout()
widget->setLayout(layout);
widget->setContentsMargins(0,0,0,0);
- widget->setMinimumSize(size);
- widget->setMaximumSize(size);
-
-// QTest::qWait(500); // layouting is asynchronous..
+ widget->resize(size);
+ QCOMPARE(widget->size(), size);
// Validate
for (int i = 0; i < result.count(); ++i) {
const BasicLayoutTestResult item = result[i];
- QCOMPARE(widgets[item.index]->geometry(), item.rect);
+ QRectF expected = truncate(item.rect);
+ QRectF actual = truncate(widgets[item.index]->geometry());
+
+ QCOMPARE(expected, actual);
}
- // ###: not supported yet
-/*
// Test mirrored mode
widget->setLayoutDirection(Qt::RightToLeft);
layout->activate();
@@ -1728,10 +1736,13 @@ void tst_QGraphicsAnchorLayout1::testBasicLayout()
if (mirroredRect.isValid()){
mirroredRect.moveLeft(size.width()-item.rect.width()-item.rect.left());
}
- QCOMPARE(widgets[item.index]->geometry(), mirroredRect);
+ QRectF expected = truncate(mirroredRect);
+ QRectF actual = truncate(widgets[item.index]->geometry());
+
+ QCOMPARE(expected, actual);
delete widgets[item.index];
}
-*/
+
delete widget;
}
@@ -2212,8 +2223,8 @@ void tst_QGraphicsAnchorLayout1::testRemoveCenterAnchor()
widget->setLayout(layout);
widget->setContentsMargins(0,0,0,0);
- widget->setMinimumSize(size);
- widget->setMaximumSize(size);
+ widget->resize(size);
+ QCOMPARE(widget->size(), size);
// Validate
for (int i = 0; i < result.count(); ++i) {
@@ -2430,6 +2441,8 @@ void tst_QGraphicsAnchorLayout1::testDoubleSizePolicy_data()
QTest::newRow("double size policy: expanding-preferred") << sizePolicy1 << sizePolicy2 << width1 << width2;
}
+ // QGAL handling of ignored flag is different
+ if (0)
{
QSizePolicy sizePolicy1( QSizePolicy::Ignored, QSizePolicy::Ignored );
QSizePolicy sizePolicy2( QSizePolicy::Preferred, QSizePolicy::Preferred );
@@ -2497,9 +2510,6 @@ void tst_QGraphicsAnchorLayout1::testDoubleSizePolicy_data()
void tst_QGraphicsAnchorLayout1::testDoubleSizePolicy()
{
- // ### Size policy is not yet supported
- return;
-
QFETCH(QSizePolicy, policy1);
QFETCH(QSizePolicy, policy2);
QFETCH(qreal, width1);
@@ -3053,8 +3063,8 @@ void tst_QGraphicsAnchorLayout1::testComplexCases()
widget->setLayout(layout);
widget->setContentsMargins(0,0,0,0);
- widget->setMinimumSize(size);
- widget->setMaximumSize(size);
+ widget->resize(size);
+ QCOMPARE(widget->size(), size);
// QTest::qWait(500); // layouting is asynchronous..
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index 3bc6db5472..d65c6ecdb2 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -401,6 +401,7 @@ private slots:
void modality_clickFocus();
void modality_keyEvents();
void itemIsInFront();
+ void scenePosChange();
// task specific tests below me
void task141694_textItemEnsureVisible();
@@ -4229,6 +4230,8 @@ protected:
break;
case QGraphicsItem::ItemOpacityHasChanged:
break;
+ case QGraphicsItem::ItemScenePositionHasChanged:
+ break;
}
return itemChangeReturnValue.isValid() ? itemChangeReturnValue : value;
}
@@ -9677,5 +9680,76 @@ void tst_QGraphicsItem::itemIsInFront()
QCOMPARE(qt_closestItemFirst(rect1child1_2, rect2child1), false);
}
+class ScenePosChangeTester : public ItemChangeTester
+{
+public:
+ ScenePosChangeTester()
+ { }
+ ScenePosChangeTester(QGraphicsItem *parent) : ItemChangeTester(parent)
+ { }
+};
+
+void tst_QGraphicsItem::scenePosChange()
+{
+ ScenePosChangeTester* root = new ScenePosChangeTester;
+ ScenePosChangeTester* child1 = new ScenePosChangeTester(root);
+ ScenePosChangeTester* grandChild1 = new ScenePosChangeTester(child1);
+ ScenePosChangeTester* child2 = new ScenePosChangeTester(root);
+ ScenePosChangeTester* grandChild2 = new ScenePosChangeTester(child2);
+
+ child1->setFlag(QGraphicsItem::ItemSendsScenePositionChanges, true);
+ grandChild2->setFlag(QGraphicsItem::ItemSendsScenePositionChanges, true);
+
+ QGraphicsScene scene;
+ scene.addItem(root);
+
+ // ignore uninteresting changes
+ child1->clear();
+ child2->clear();
+ grandChild1->clear();
+ grandChild2->clear();
+
+ // move whole tree
+ root->moveBy(1.0, 1.0);
+ QCOMPARE(child1->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 1);
+ QCOMPARE(grandChild1->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 0);
+ QCOMPARE(child2->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 0);
+ QCOMPARE(grandChild2->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 1);
+
+ // move subtree
+ child2->moveBy(1.0, 1.0);
+ QCOMPARE(child1->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 1);
+ QCOMPARE(grandChild1->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 0);
+ QCOMPARE(child2->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 0);
+ QCOMPARE(grandChild2->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 2);
+
+ // reparent
+ grandChild2->setParentItem(child1);
+ child1->moveBy(1.0, 1.0);
+ QCOMPARE(child1->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 2);
+ QCOMPARE(grandChild1->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 0);
+ QCOMPARE(child2->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 0);
+ QCOMPARE(grandChild2->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 3);
+
+ // change flags
+ grandChild1->setFlag(QGraphicsItem::ItemSendsScenePositionChanges, true);
+ grandChild2->setFlag(QGraphicsItem::ItemSendsScenePositionChanges, false);
+ QCoreApplication::processEvents(); // QGraphicsScenePrivate::_q_updateScenePosDescendants()
+ child1->moveBy(1.0, 1.0);
+ QCOMPARE(child1->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 3);
+ QCOMPARE(grandChild1->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 1);
+ QCOMPARE(child2->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 0);
+ QCOMPARE(grandChild2->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 3);
+
+ // remove
+ scene.removeItem(grandChild1);
+ delete grandChild2; grandChild2 = 0;
+ QCoreApplication::processEvents(); // QGraphicsScenePrivate::_q_updateScenePosDescendants()
+ root->moveBy(1.0, 1.0);
+ QCOMPARE(child1->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 4);
+ QCOMPARE(grandChild1->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 1);
+ QCOMPARE(child2->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 0);
+}
+
QTEST_MAIN(tst_QGraphicsItem)
#include "tst_qgraphicsitem.moc"
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
index 0589994841..9a561ebc11 100644
--- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -225,6 +225,7 @@ private slots:
void focusItem();
void focusItemLostFocus();
void setFocusItem();
+ void setFocusItem_inactive();
void mouseGrabberItem();
void hoverEvents_siblings();
void hoverEvents_parentChild();
@@ -267,6 +268,7 @@ private slots:
void initialFocus_data();
void initialFocus();
void polishItems();
+ void isActive();
// task specific tests below me
void task139710_bspTreeCrash();
@@ -1453,6 +1455,13 @@ void tst_QGraphicsScene::focusItemLostFocus()
item->clearFocus();
}
+class ClearTestItem : public QGraphicsRectItem
+{
+public:
+ ~ClearTestItem() { qDeleteAll(items); }
+ QList<QGraphicsItem *> items;
+};
+
void tst_QGraphicsScene::clear()
{
QGraphicsScene scene;
@@ -1463,6 +1472,19 @@ void tst_QGraphicsScene::clear()
scene.clear();
QVERIFY(scene.items().isEmpty());
QCOMPARE(scene.sceneRect(), QRectF(0, 0, 100, 100));
+
+ ClearTestItem *firstItem = new ClearTestItem;
+ QGraphicsItem *secondItem = new QGraphicsRectItem;
+ firstItem->items += secondItem;
+
+ scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+ scene.addItem(firstItem);
+ scene.addItem(secondItem);
+ QCOMPARE(scene.items().at(0), firstItem);
+ QCOMPARE(scene.items().at(1), secondItem);
+ // must not crash even if firstItem deletes secondItem
+ scene.clear();
+ QVERIFY(scene.items().isEmpty());
}
void tst_QGraphicsScene::setFocusItem()
@@ -1514,6 +1536,26 @@ void tst_QGraphicsScene::setFocusItem()
QVERIFY(!item2->hasFocus());
}
+void tst_QGraphicsScene::setFocusItem_inactive()
+{
+ QGraphicsScene scene;
+ QGraphicsItem *item = scene.addText("Qt");
+ QVERIFY(!scene.focusItem());
+ QVERIFY(!scene.hasFocus());
+ scene.setFocusItem(item);
+ QVERIFY(!scene.hasFocus());
+ QVERIFY(!scene.focusItem());
+ item->setFlag(QGraphicsItem::ItemIsFocusable);
+
+ for (int i = 0; i < 3; ++i) {
+ scene.setFocusItem(item);
+ QCOMPARE(scene.focusItem(), item);
+ QVERIFY(!item->hasFocus());
+ }
+
+}
+
+
void tst_QGraphicsScene::mouseGrabberItem()
{
QGraphicsScene scene;
@@ -3110,6 +3152,7 @@ void tst_QGraphicsScene::tabFocus_sceneWithFocusableItems()
QVERIFY(!view->viewport()->hasFocus());
QVERIFY(!scene.hasFocus());
QVERIFY(!item->hasFocus());
+ QCOMPARE(scene.focusItem(), static_cast<QGraphicsItem *>(item));
// Check that the correct item regains focus.
widget.show();
@@ -3117,8 +3160,10 @@ void tst_QGraphicsScene::tabFocus_sceneWithFocusableItems()
widget.activateWindow();
QTest::qWaitForWindowShown(&widget);
QTRY_VERIFY(view->hasFocus());
+ QTRY_VERIFY(scene.isActive());
QVERIFY(view->viewport()->hasFocus());
QVERIFY(scene.hasFocus());
+ QCOMPARE(scene.focusItem(), static_cast<QGraphicsItem *>(item));
QVERIFY(item->hasFocus());
}
@@ -3910,5 +3955,180 @@ void tst_QGraphicsScene::polishItems()
QMetaObject::invokeMethod(&scene,"_q_polishItems");
}
+void tst_QGraphicsScene::isActive()
+{
+ QGraphicsScene scene1;
+ QVERIFY(!scene1.isActive());
+ QGraphicsScene scene2;
+ QVERIFY(!scene2.isActive());
+
+ {
+ QWidget toplevel1;
+ QHBoxLayout *layout = new QHBoxLayout;
+ toplevel1.setLayout(layout);
+ QGraphicsView *view1 = new QGraphicsView(&scene1);
+ QGraphicsView *view2 = new QGraphicsView(&scene2);
+ layout->addWidget(view1);
+ layout->addWidget(view2);
+
+ QVERIFY(!scene1.isActive());
+ QVERIFY(!scene2.isActive());
+
+ view1->setVisible(false);
+
+ toplevel1.show();
+ QApplication::setActiveWindow(&toplevel1);
+ QTest::qWaitForWindowShown(&toplevel1);
+ QTRY_COMPARE(QApplication::activeWindow(), &toplevel1);
+
+ QVERIFY(!scene1.isActive()); //it is hidden;
+ QVERIFY(scene2.isActive());
+
+ view1->show();
+ QVERIFY(scene1.isActive());
+ QVERIFY(scene2.isActive());
+
+ view2->hide();
+
+ QVERIFY(scene1.isActive());
+ QVERIFY(!scene2.isActive());
+
+ toplevel1.hide();
+ QTest::qWait(12);
+ QTRY_VERIFY(!scene1.isActive());
+ QTRY_VERIFY(!scene2.isActive());
+
+ toplevel1.show();
+ QApplication::setActiveWindow(&toplevel1);
+ QApplication::processEvents();
+ QTRY_COMPARE(QApplication::activeWindow(), &toplevel1);
+
+ QTRY_VERIFY(scene1.isActive());
+ QTRY_VERIFY(!scene2.isActive());
+
+ view2->show();
+ QVERIFY(scene1.isActive());
+ QVERIFY(scene2.isActive());
+ }
+
+ QVERIFY(!scene1.isActive());
+ QVERIFY(!scene2.isActive());
+
+ {
+ QWidget toplevel2;
+ QHBoxLayout *layout = new QHBoxLayout;
+ toplevel2.setLayout(layout);
+ QGraphicsView *view1 = new QGraphicsView(&scene1);
+ QGraphicsView *view2 = new QGraphicsView();
+ layout->addWidget(view1);
+ layout->addWidget(view2);
+
+ QVERIFY(!scene1.isActive());
+ QVERIFY(!scene2.isActive());
+
+ toplevel2.show();
+ QApplication::setActiveWindow(&toplevel2);
+ QTest::qWaitForWindowShown(&toplevel2);
+ QTRY_COMPARE(QApplication::activeWindow(), &toplevel2);
+
+ QVERIFY(scene1.isActive());
+ QVERIFY(!scene2.isActive());
+
+ view2->setScene(&scene2);
+
+ QVERIFY(scene1.isActive());
+ QVERIFY(scene2.isActive());
+
+ view1->setScene(&scene2);
+ QVERIFY(!scene1.isActive());
+ QVERIFY(scene2.isActive());
+
+ view1->hide();
+ QVERIFY(!scene1.isActive());
+ QVERIFY(scene2.isActive());
+
+ view1->setScene(&scene1);
+ QVERIFY(!scene1.isActive());
+ QVERIFY(scene2.isActive());
+
+ view1->show();
+
+ view1->show();
+ QVERIFY(scene1.isActive());
+ QVERIFY(scene2.isActive());
+
+ view2->hide();
+ QVERIFY(scene1.isActive());
+ QVERIFY(!scene2.isActive());
+
+ QGraphicsView topLevelView;
+ topLevelView.show();
+ QApplication::setActiveWindow(&topLevelView);
+ QTest::qWaitForWindowShown(&topLevelView);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&topLevelView));
+
+ QVERIFY(!scene1.isActive());
+ QVERIFY(!scene2.isActive());
+
+ topLevelView.setScene(&scene1);
+ QVERIFY(scene1.isActive());
+ QVERIFY(!scene2.isActive());
+
+ view2->show();
+ QVERIFY(scene1.isActive());
+ QVERIFY(!scene2.isActive());
+
+ view1->hide();
+ QVERIFY(scene1.isActive());
+ QVERIFY(!scene2.isActive());
+
+ QApplication::setActiveWindow(&toplevel2);
+ QTRY_COMPARE(QApplication::activeWindow(), &toplevel2);
+
+ QVERIFY(!scene1.isActive());
+ QVERIFY(scene2.isActive());
+
+
+ }
+
+ QVERIFY(!scene1.isActive());
+ QVERIFY(!scene2.isActive());
+
+ {
+ QWidget toplevel3;
+ QHBoxLayout *layout = new QHBoxLayout;
+ toplevel3.setLayout(layout);
+ QGraphicsView *view1 = new QGraphicsView(&scene1);
+ QGraphicsView *view2 = new QGraphicsView(&scene2);
+ layout->addWidget(view1);
+
+ QVERIFY(!scene1.isActive());
+ QVERIFY(!scene2.isActive());
+
+ toplevel3.show();
+ QApplication::setActiveWindow(&toplevel3);
+ QTest::qWaitForWindowShown(&toplevel3);
+ QTRY_COMPARE(QApplication::activeWindow(), &toplevel3);
+
+ QVERIFY(scene1.isActive());
+ QVERIFY(!scene2.isActive());
+
+ layout->addWidget(view2);
+ QApplication::processEvents();
+ QVERIFY(scene1.isActive());
+ QVERIFY(scene2.isActive());
+
+ view1->setParent(0);
+ QVERIFY(!scene1.isActive());
+ QVERIFY(scene2.isActive());
+ delete view1;
+ }
+
+ QVERIFY(!scene1.isActive());
+ QVERIFY(!scene2.isActive());
+
+}
+
+
QTEST_MAIN(tst_QGraphicsScene)
#include "tst_qgraphicsscene.moc"
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
index f07453cea4..9c6aa393e6 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -217,6 +217,7 @@ private slots:
void update();
void inputMethodSensitivity();
void inputContextReset();
+ void defaultClipIntersectToView();
// task specific tests below me
void task172231_untransformableItems();
@@ -3692,6 +3693,77 @@ void tst_QGraphicsView::inputContextReset()
QCOMPARE(inputContext.resets, 0);
}
+class ViewClipTester : public QGraphicsView
+{
+public:
+ ViewClipTester(QGraphicsScene *scene = 0)
+ : QGraphicsView(scene)
+ { }
+ QRegion clipRegion;
+
+protected:
+ void drawBackground(QPainter *painter, const QRectF &rect)
+ {
+ clipRegion = painter->clipRegion();
+ }
+};
+
+class ItemClipTester : public QGraphicsRectItem
+{
+public:
+ ItemClipTester() : QGraphicsRectItem(0, 0, 20, 20)
+ {
+ setBrush(Qt::blue);
+ }
+ QRegion clipRegion;
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0)
+ {
+ clipRegion = painter->clipRegion();
+ QGraphicsRectItem::paint(painter, option, widget);
+ }
+};
+
+void tst_QGraphicsView::defaultClipIntersectToView()
+{
+ QGraphicsScene scene;
+ ItemClipTester *tester = new ItemClipTester;
+ scene.addItem(tester);
+
+ ViewClipTester view(&scene);
+ view.setAlignment(Qt::AlignTop | Qt::AlignLeft);
+ view.setFrameStyle(0);
+ view.resize(200, 200);
+ view.show();
+ QTRY_COMPARE(QApplication::activeWindow(), (QWidget *)&view);
+
+ QRect viewRect(0, 0, 200, 200);
+ QCOMPARE(view.clipRegion, QRegion(viewRect));
+ QCOMPARE(tester->clipRegion, QRegion(viewRect));
+
+ view.viewport()->update(0, 0, 5, 5);
+ view.viewport()->update(10, 10, 5, 5);
+ qApp->processEvents();
+ viewRect = QRect(0, 0, 15, 15);
+ QCOMPARE(view.clipRegion, QRegion(viewRect));
+ QCOMPARE(tester->clipRegion, QRegion(viewRect));
+
+ view.scale(2, 2);
+ qApp->processEvents();
+
+ viewRect.moveTop(-viewRect.height());
+ viewRect = QRect(0, 0, 100, 100);
+ QCOMPARE(view.clipRegion, QRegion(viewRect));
+ QCOMPARE(tester->clipRegion, QRegion(viewRect));
+
+ view.viewport()->update(0, 0, 5, 5);
+ view.viewport()->update(10, 10, 5, 5);
+ qApp->processEvents();
+ viewRect = QRect(0, 0, 8, 8);
+ QCOMPARE(view.clipRegion, QRegion(viewRect));
+ QCOMPARE(tester->clipRegion, QRegion(viewRect));
+}
+
void tst_QGraphicsView::task253415_reconnectUpdateSceneOnSceneChanged()
{
QGraphicsView view;
diff --git a/tests/auto/qgridlayout/tst_qgridlayout.cpp b/tests/auto/qgridlayout/tst_qgridlayout.cpp
index 7c320be2ef..46e2a03c32 100644
--- a/tests/auto/qgridlayout/tst_qgridlayout.cpp
+++ b/tests/auto/qgridlayout/tst_qgridlayout.cpp
@@ -920,9 +920,9 @@ void tst_QGridLayout::minMaxSize()
#if defined(Q_WS_X11)
qt_x11_wait_for_window_manager(m_toplevel); // wait for the show
#endif
- QTest::qWait(20);
+ QTest::qWait(40);
m_toplevel->adjustSize();
- QTest::qWait(120); // wait for the implicit adjustSize
+ QTest::qWait(240); // wait for the implicit adjustSize
// If the following fails we might have to wait longer.
// If that does not help there is likely a problem with the implicit adjustSize in show()
if (!fixedSize.isValid()) {
diff --git a/tests/auto/qimage/tst_qimage.cpp b/tests/auto/qimage/tst_qimage.cpp
index e15ae8a645..da4e85d074 100644
--- a/tests/auto/qimage/tst_qimage.cpp
+++ b/tests/auto/qimage/tst_qimage.cpp
@@ -104,7 +104,7 @@ private slots:
void setPixel_data();
void setPixel();
- void setNumColors();
+ void setColorCount();
void setColor();
void rasterClipping();
@@ -155,7 +155,7 @@ void tst_QImage::create()
#endif
//QImage image(7000000, 7000000, 8, 256, QImage::IgnoreEndian);
QImage image(7000000, 7000000, QImage::Format_Indexed8);
- image.setNumColors(256);
+ image.setColorCount(256);
cr = !image.isNull();
#if !defined(Q_WS_QWS) && !defined(Q_OS_WINCE)
} catch (...) {
@@ -242,7 +242,7 @@ void tst_QImage::convertBitOrder()
QSKIP("Qt compiled without Qt3Support", SkipAll);
#else
QImage i(9,5,1,2,QImage::LittleEndian);
- qMemSet(i.bits(), 0, i.numBytes());
+ qMemSet(i.bits(), 0, i.byteCount());
i.setDotsPerMeterX(9);
i.setDotsPerMeterY(5);
@@ -258,7 +258,7 @@ void tst_QImage::convertBitOrder()
QVERIFY(i.dotsPerMeterY() == ni.dotsPerMeterY());
QVERIFY(i.depth() == ni.depth());
QVERIFY(i.size() == ni.size());
- QVERIFY(i.numColors() == ni.numColors());
+ QVERIFY(i.colorCount() == ni.colorCount());
#endif
}
@@ -365,7 +365,7 @@ void tst_QImage::setAlphaChannel()
QImage alphaChannel;
if (gray) {
alphaChannel = QImage(width, height, QImage::Format_Indexed8);
- alphaChannel.setNumColors(256);
+ alphaChannel.setColorCount(256);
for (int i=0; i<256; ++i)
alphaChannel.setColor(i, qRgb(i, i, i));
alphaChannel.fill(alpha);
@@ -927,7 +927,7 @@ void tst_QImage::rotate()
original.fill(qRgb(255,255,255));
if (format == QImage::Format_Indexed8) {
- original.setNumColors(256);
+ original.setColorCount(256);
for (int i = 0; i < 255; ++i)
original.setColor(i, qRgb(0, i, i));
}
@@ -1196,23 +1196,23 @@ void tst_QImage::convertToFormatPreserveText()
}
#endif // QT_NO_IMAGE_TEXT
-void tst_QImage::setNumColors()
+void tst_QImage::setColorCount()
{
QImage img(0, 0, QImage::Format_Indexed8);
- QTest::ignoreMessage(QtWarningMsg, "QImage::setNumColors: null image");
- img.setNumColors(256);
- QCOMPARE(img.numColors(), 0);
+ QTest::ignoreMessage(QtWarningMsg, "QImage::setColorCount: null image");
+ img.setColorCount(256);
+ QCOMPARE(img.colorCount(), 0);
}
void tst_QImage::setColor()
{
QImage img(0, 0, QImage::Format_Indexed8);
img.setColor(0, qRgba(18, 219, 108, 128));
- QCOMPARE(img.numColors(), 0);
+ QCOMPARE(img.colorCount(), 0);
QImage img2(1, 1, QImage::Format_Indexed8);
img2.setColor(0, qRgba(18, 219, 108, 128));
- QCOMPARE(img2.numColors(), 1);
+ QCOMPARE(img2.colorCount(), 1);
}
/* Just some sanity checking that we don't draw outside the buffer of
diff --git a/tests/auto/qimagewriter/tst_qimagewriter.cpp b/tests/auto/qimagewriter/tst_qimagewriter.cpp
index 584a0602bb..ab5572dc58 100644
--- a/tests/auto/qimagewriter/tst_qimagewriter.cpp
+++ b/tests/auto/qimagewriter/tst_qimagewriter.cpp
@@ -546,7 +546,7 @@ void tst_QImageWriter::saveWithNoFormat()
QFETCH(QImageWriter::ImageWriterError, error);
QImage niceImage(64, 64, QImage::Format_ARGB32);
- qMemSet(niceImage.bits(), 0, niceImage.numBytes());
+ qMemSet(niceImage.bits(), 0, niceImage.byteCount());
QImageWriter writer(fileName /* , 0 - no format! */);
if (error != 0) {
diff --git a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp
index 426887d7cf..a2770d49d3 100644
--- a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp
+++ b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp
@@ -877,7 +877,7 @@ void tst_QItemDelegate::decoration()
}
case QVariant::Image: {
QImage img(size, QImage::Format_Mono);
- qMemSet(img.bits(), 0, img.numBytes());
+ qMemSet(img.bits(), 0, img.byteCount());
value = img;
break;
}
diff --git a/tests/auto/qlabel/tst_qlabel.cpp b/tests/auto/qlabel/tst_qlabel.cpp
index 9eae9c9b53..9d957a5b60 100644
--- a/tests/auto/qlabel/tst_qlabel.cpp
+++ b/tests/auto/qlabel/tst_qlabel.cpp
@@ -328,14 +328,14 @@ void tst_QLabel::eventPropagation_data()
QTest::addColumn<bool>("propagation");
QTest::newRow("plain text1") << QString("plain text") << int(Qt::LinksAccessibleByMouse) << int(Qt::NoFocus) << true;
- QTest::newRow("plain text2") << QString("plain text") << (int)Qt::TextSelectableByKeyboard << (int)Qt::ClickFocus << false;
+ QTest::newRow("plain text2") << QString("plain text") << (int)Qt::TextSelectableByKeyboard << (int)Qt::ClickFocus << true;
QTest::newRow("plain text3") << QString("plain text") << (int)Qt::TextSelectableByMouse << (int)Qt::ClickFocus << false;
QTest::newRow("plain text4") << QString("plain text") << (int)Qt::NoTextInteraction << (int)Qt::NoFocus << true;
- QTest::newRow("rich text1") << QString("<b>rich text</b>") << (int)Qt::LinksAccessibleByMouse << (int)Qt::NoFocus << false;
- QTest::newRow("rich text2") << QString("<b>rich text</b>") << (int)Qt::TextSelectableByKeyboard << (int)Qt::ClickFocus << false;
+ QTest::newRow("rich text1") << QString("<b>rich text</b>") << (int)Qt::LinksAccessibleByMouse << (int)Qt::NoFocus << true;
+ QTest::newRow("rich text2") << QString("<b>rich text</b>") << (int)Qt::TextSelectableByKeyboard << (int)Qt::ClickFocus << true;
QTest::newRow("rich text3") << QString("<b>rich text</b>") << (int)Qt::TextSelectableByMouse << (int)Qt::ClickFocus << false;
QTest::newRow("rich text4") << QString("<b>rich text</b>") << (int)Qt::NoTextInteraction << (int)Qt::NoFocus << true;
- QTest::newRow("rich text4") << QString("<b>rich text</b>") << (int)Qt::LinksAccessibleByKeyboard << (int)Qt::StrongFocus << false;
+ QTest::newRow("rich text4") << QString("<b>rich text</b>") << (int)Qt::LinksAccessibleByKeyboard << (int)Qt::StrongFocus << true;
if (!test_box)
test_box = new Widget;
diff --git a/tests/auto/qlcdnumber/tst_qlcdnumber.cpp b/tests/auto/qlcdnumber/tst_qlcdnumber.cpp
index c18ce24175..3f52c708db 100644
--- a/tests/auto/qlcdnumber/tst_qlcdnumber.cpp
+++ b/tests/auto/qlcdnumber/tst_qlcdnumber.cpp
@@ -74,14 +74,14 @@ tst_QLCDNumber::~tst_QLCDNumber()
void tst_QLCDNumber::getSetCheck()
{
QLCDNumber obj1;
- // int QLCDNumber::numDigits()
- // void QLCDNumber::setNumDigits(int)
- obj1.setNumDigits(0);
- QCOMPARE(0, obj1.numDigits());
- obj1.setNumDigits(INT_MIN);
- QCOMPARE(0, obj1.numDigits()); // Range<0, 99>
- obj1.setNumDigits(INT_MAX);
- QCOMPARE(99, obj1.numDigits()); // Range<0, 99>
+ // int QLCDNumber::digitCount()
+ // void QLCDNumber::setDigitCount(int)
+ obj1.setDigitCount(0);
+ QCOMPARE(0, obj1.digitCount());
+ obj1.setDigitCount(INT_MIN);
+ QCOMPARE(0, obj1.digitCount()); // Range<0, 99>
+ obj1.setDigitCount(INT_MAX);
+ QCOMPARE(99, obj1.digitCount()); // Range<0, 99>
}
QTEST_MAIN(tst_QLCDNumber)
diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp
index c6769596f8..b4dfbbad47 100644
--- a/tests/auto/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/qlineedit/tst_qlineedit.cpp
@@ -260,6 +260,7 @@ private slots:
void task233101_cursorPosAfterInputMethod();
void task241436_passwordEchoOnEditRestoreEchoMode();
void task248948_redoRemovedSelection();
+ void taskQTBUG_4401_enterKeyClearsPassword();
protected slots:
#ifdef QT3_SUPPORT
@@ -3532,5 +3533,20 @@ void tst_QLineEdit::task248948_redoRemovedSelection()
QCOMPARE(testWidget->text(), QLatin1String("ab"));
}
+void tst_QLineEdit::taskQTBUG_4401_enterKeyClearsPassword()
+{
+ QString password("Wanna guess?");
+
+ testWidget->setText(password);
+ testWidget->setEchoMode(QLineEdit::PasswordEchoOnEdit);
+ testWidget->setFocus();
+ testWidget->selectAll();
+ QApplication::setActiveWindow(testWidget);
+ QTRY_VERIFY(testWidget->hasFocus());
+
+ QTest::keyPress(testWidget, Qt::Key_Enter);
+ QTRY_COMPARE(testWidget->text(), password);
+}
+
QTEST_MAIN(tst_QLineEdit)
#include "tst_qlineedit.moc"
diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp
index a5ff153b7c..1c8fecf96b 100644
--- a/tests/auto/qlistview/tst_qlistview.cpp
+++ b/tests/auto/qlistview/tst_qlistview.cpp
@@ -121,6 +121,7 @@ private slots:
void taskQTBUG_2233_scrollHiddenItems();
void taskQTBUG_633_changeModelData();
void taskQTBUG_435_deselectOnViewportClick();
+ void taskQTBUG_2678_spacingAndWrappedText();
};
// Testing get/set functions
@@ -1787,13 +1788,13 @@ void tst_QListView::task262152_setModelColumnNavigate()
view.show();
QTest::qWaitForWindowShown(&view);
- QTest::qWait(100);
+ QTest::qWait(120);
QTest::keyClick(&view, Qt::Key_Down);
- QTest::qWait(100);
- QCOMPARE(view.currentIndex(), model.index(1,1));
+ QTest::qWait(30);
+ QTRY_COMPARE(view.currentIndex(), model.index(1,1));
QTest::keyClick(&view, Qt::Key_Down);
- QTest::qWait(100);
- QCOMPARE(view.currentIndex(), model.index(2,1));
+ QTest::qWait(30);
+ QTRY_COMPARE(view.currentIndex(), model.index(2,1));
}
@@ -1861,7 +1862,7 @@ void tst_QListView::taskQTBUG_435_deselectOnViewportClick()
view.setSelectionMode(QAbstractItemView::ExtendedSelection);
view.selectAll();
QCOMPARE(view.selectionModel()->selectedIndexes().count(), model.rowCount());
-
+
QPoint p = view.visualRect(model.index(model.rowCount() - 1)).center() + QPoint(0, 20);
//first the left button
@@ -1876,5 +1877,19 @@ void tst_QListView::taskQTBUG_435_deselectOnViewportClick()
QVERIFY(!view.selectionModel()->hasSelection());
}
+void tst_QListView::taskQTBUG_2678_spacingAndWrappedText()
+{
+ static const QString lorem("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.");
+ QStringListModel model(QStringList() << lorem << lorem << "foo" << lorem << "bar" << lorem << lorem);
+ QListView w;
+ w.setModel(&model);
+ w.setViewMode(QListView::ListMode);
+ w.setWordWrap(true);
+ w.setSpacing(10);
+ w.show();
+ QTest::qWaitForWindowShown(&w);
+ QCOMPARE(w.horizontalScrollBar()->minimum(), w.horizontalScrollBar()->maximum());
+}
+
QTEST_MAIN(tst_QListView)
#include "tst_qlistview.moc"
diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
index ab7b0ac144..5ead049215 100644
--- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
+++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
@@ -587,14 +587,16 @@ void tst_QLocalSocket::readBufferOverflow()
char buffer[dataBufferSize];
memset(buffer, 0, dataBufferSize);
serverSocket->write(buffer, dataBufferSize);
- serverSocket->flush();
+ serverSocket->waitForBytesWritten();
+ // wait until the first 128 bytes are ready to read
QVERIFY(client.waitForReadyRead());
QCOMPARE(client.read(buffer, readBufferSize), qint64(readBufferSize));
-#if defined(QT_LOCALSOCKET_TCP) || defined(Q_OS_SYMBIAN)
- QTest::qWait(250);
-#endif
+ // wait until the second 128 bytes are ready to read
+ QVERIFY(client.waitForReadyRead());
QCOMPARE(client.read(buffer, readBufferSize), qint64(readBufferSize));
+ // no more bytes available
+ QVERIFY(client.bytesAvailable() == 0);
}
// QLocalSocket/Server can take a name or path, check that it works as expected
diff --git a/tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp b/tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp
index 3c4ddd497c..94857d7b4d 100644
--- a/tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp
+++ b/tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp
@@ -234,7 +234,7 @@ void tst_QNetworkCookie::parseSingleCookie_data()
QTest::newRow("path-with-utf8-2") << "a=b;path=/R%C3%A9sum%C3%A9" << cookie;
cookie.setPath(QString());
- cookie.setDomain(".qt.nokia.com");
+ cookie.setDomain("qt.nokia.com");
QTest::newRow("plain-domain1") << "a=b;domain=qt.nokia.com" << cookie;
QTest::newRow("plain-domain2") << "a=b; domain=qt.nokia.com " << cookie;
QTest::newRow("plain-domain3") << "a=b;domain=QT.NOKIA.COM" << cookie;
@@ -247,32 +247,25 @@ void tst_QNetworkCookie::parseSingleCookie_data()
QTest::newRow("dot-domain4") << "a=b; Domain = .QT.NOKIA.COM" << cookie;
cookie.setDomain(QString::fromUtf8(".d\303\270gn\303\245pent.troll.no"));
- QTest::newRow("idn-domain1") << "a=b;domain=xn--dgnpent-gxa2o.troll.no" << cookie;
- QTest::newRow("idn-domain2") << "a=b;domain=d\303\270gn\303\245pent.troll.no" << cookie;
- QTest::newRow("idn-domain3") << "a=b;domain=XN--DGNPENT-GXA2O.TROLL.NO" << cookie;
- QTest::newRow("idn-domain4") << "a=b;domain=D\303\230GN\303\205PENT.troll.NO" << cookie;
- QTest::newRow("idn-domain5") << "a=b;domain = D\303\230GN\303\205PENT.troll.NO" << cookie;
-
- cookie.setDomain(QString::fromUtf8(".d\303\270gn\303\245pent.troll.no"));
- QTest::newRow("dot-idn-domain1") << "a=b;domain=.xn--dgnpent-gxa2o.troll.no" << cookie;
- QTest::newRow("dot-idn-domain2") << "a=b;domain=.d\303\270gn\303\245pent.troll.no" << cookie;
- QTest::newRow("dot-idn-domain3") << "a=b;domain=.XN--DGNPENT-GXA2O.TROLL.NO" << cookie;
- QTest::newRow("dot-idn-domain4") << "a=b;domain=.D\303\230GN\303\205PENT.troll.NO" << cookie;
+ QTest::newRow("idn-domain1") << "a=b;domain=.xn--dgnpent-gxa2o.troll.no" << cookie;
+ QTest::newRow("idn-domain2") << "a=b;domain=.d\303\270gn\303\245pent.troll.no" << cookie;
+ QTest::newRow("idn-domain3") << "a=b;domain=.XN--DGNPENT-GXA2O.TROLL.NO" << cookie;
+ QTest::newRow("idn-domain4") << "a=b;domain=.D\303\230GN\303\205PENT.troll.NO" << cookie;
cookie.setDomain(".qt.nokia.com");
cookie.setPath("/");
- QTest::newRow("two-fields") << "a=b;domain=qt.nokia.com;path=/" << cookie;
- QTest::newRow("two-fields2") << "a=b; domain=qt.nokia.com; path=/" << cookie;
- QTest::newRow("two-fields3") << "a=b; domain=qt.nokia.com ; path=/ " << cookie;
- QTest::newRow("two-fields4") << "a=b;path=/; domain=qt.nokia.com" << cookie;
- QTest::newRow("two-fields5") << "a=b; path=/ ; domain=qt.nokia.com" << cookie;
- QTest::newRow("two-fields6") << "a=b; path= / ; domain =qt.nokia.com" << cookie;
+ QTest::newRow("two-fields") << "a=b;domain=.qt.nokia.com;path=/" << cookie;
+ QTest::newRow("two-fields2") << "a=b; domain=.qt.nokia.com; path=/" << cookie;
+ QTest::newRow("two-fields3") << "a=b; domain=.qt.nokia.com ; path=/ " << cookie;
+ QTest::newRow("two-fields4") << "a=b;path=/; domain=.qt.nokia.com" << cookie;
+ QTest::newRow("two-fields5") << "a=b; path=/ ; domain=.qt.nokia.com" << cookie;
+ QTest::newRow("two-fields6") << "a=b; path= / ; domain =.qt.nokia.com" << cookie;
cookie.setSecure(true);
- QTest::newRow("three-fields") << "a=b;domain=qt.nokia.com;path=/;secure" << cookie;
- QTest::newRow("three-fields2") << "a=b;secure;path=/;domain=qt.nokia.com" << cookie;
- QTest::newRow("three-fields3") << "a=b;secure;domain=qt.nokia.com; path=/" << cookie;
- QTest::newRow("three-fields4") << "a = b;secure;domain=qt.nokia.com; path=/" << cookie;
+ QTest::newRow("three-fields") << "a=b;domain=.qt.nokia.com;path=/;secure" << cookie;
+ QTest::newRow("three-fields2") << "a=b;secure;path=/;domain=.qt.nokia.com" << cookie;
+ QTest::newRow("three-fields3") << "a=b;secure;domain=.qt.nokia.com; path=/" << cookie;
+ QTest::newRow("three-fields4") << "a = b;secure;domain=.qt.nokia.com; path=/" << cookie;
cookie = QNetworkCookie();
cookie.setName("a");
@@ -664,7 +657,7 @@ void tst_QNetworkCookie::parseMultipleCookies_data()
cookie.setName("baz");
cookie.setDomain(".qt.nokia.com");
list.prepend(cookie);
- QTest::newRow("complex-2") << "baz=bar; path=/; domain=qt.nokia.com, c=d,a=,foo=bar; path=/" << list;
+ QTest::newRow("complex-2") << "baz=bar; path=/; domain=.qt.nokia.com, c=d,a=,foo=bar; path=/" << list;
// cookies obtained from the network:
cookie = QNetworkCookie("id", "51706646077999719");
diff --git a/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
index 9b9c56a5f9..ff7e78e544 100644
--- a/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
+++ b/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
@@ -120,7 +120,7 @@ void tst_QNetworkCookieJar::setCookiesFromUrl_data()
cookie.setName("a");
cookie.setPath("/");
- cookie.setDomain("www.foo.tld");
+ cookie.setDomain(".foo.tld");
result += cookie;
QTest::newRow("just-add") << preset << cookie << "http://www.foo.tld" << result << true;
@@ -148,6 +148,20 @@ void tst_QNetworkCookieJar::setCookiesFromUrl_data()
cookie.setPath("/");
QTest::newRow("diff-path-order") << preset << cookie << "http://www.foo.tld" << result << true;
+ preset.clear();
+ result.clear();
+ QNetworkCookie finalCookie = cookie;
+ cookie.setDomain("foo.tld");
+ finalCookie.setDomain(".foo.tld");
+ result += finalCookie;
+ QTest::newRow("should-add-dot-prefix") << preset << cookie << "http://www.foo.tld" << result << true;
+
+ result.clear();
+ cookie.setDomain("");
+ finalCookie.setDomain("www.foo.tld");
+ result += finalCookie;
+ QTest::newRow("should-set-default-domain") << preset << cookie << "http://www.foo.tld" << result << true;
+
// security test:
result.clear();
preset.clear();
@@ -159,7 +173,7 @@ void tst_QNetworkCookieJar::setCookiesFromUrl_data()
QTest::newRow("security-path-1") << preset << cookie << "http://www.foo.tld" << result << false;
// setting the defaults:
- QNetworkCookie finalCookie = cookie;
+ finalCookie = cookie;
finalCookie.setPath("/something/");
cookie.setPath("");
cookie.setDomain("");
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index 7adb67f115..0b61dcd6f6 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -227,12 +227,6 @@ private Q_SLOTS:
void rateControl_data();
void rateControl();
- void downloadPerformance();
- void uploadPerformance();
- void performanceControlRate();
- void httpUploadPerformance();
- void httpDownloadPerformance_data();
- void httpDownloadPerformance();
void downloadProgress_data();
void downloadProgress();
@@ -413,93 +407,6 @@ public slots:
}
};
-class FixedSizeDataGenerator : public QIODevice
-{
- Q_OBJECT
- enum { Idle, Started, Stopped } state;
-public:
- FixedSizeDataGenerator(qint64 size) : state(Idle)
- { open(ReadOnly | Unbuffered);
- toBeGeneratedTotalCount = toBeGeneratedCount = size;
- }
-
- virtual qint64 bytesAvailable() const
- {
- return state == Started ? toBeGeneratedCount + QIODevice::bytesAvailable() : 0;
- }
-
- virtual bool isSequential() const{
- return false;
- }
-
- virtual bool reset() const{
- return false;
- }
-
- qint64 size() const {
- return toBeGeneratedTotalCount;
- }
-
-public slots:
- void start() { state = Started; emit readyRead(); }
-
-protected:
- virtual qint64 readData(char *data, qint64 maxlen)
- {
- memset(data, '@', maxlen);
-
- if (toBeGeneratedCount <= 0) {
- return -1;
- }
-
- qint64 n = qMin(maxlen, toBeGeneratedCount);
- toBeGeneratedCount -= n;
-
- if (toBeGeneratedCount <= 0) {
- // make sure this is a queued connection!
- emit readChannelFinished();
- }
-
- return n;
- }
- virtual qint64 writeData(const char *, qint64)
- { return -1; }
-
- qint64 toBeGeneratedCount;
- qint64 toBeGeneratedTotalCount;
-};
-
-
-class DataGenerator: public QIODevice
-{
- Q_OBJECT
- enum { Idle, Started, Stopped } state;
-public:
- DataGenerator() : state(Idle)
- { open(ReadOnly); }
-
- virtual bool isSequential() const { return true; }
- virtual qint64 bytesAvailable() const { return state == Started ? 1024*1024 : 0; }
-
-public slots:
- void start() { state = Started; emit readyRead(); }
- void stop() { state = Stopped; emit readyRead(); }
-
-protected:
- virtual qint64 readData(char *data, qint64 maxlen)
- {
- if (state == Stopped)
- return -1; // EOF
-
- // return as many bytes as are wanted
- memset(data, '@', maxlen);
- return maxlen;
- }
- virtual qint64 writeData(const char *, qint64)
- { return -1; }
-};
-
-
class SocketPair: public QObject
{
@@ -692,255 +599,6 @@ protected:
}
};
-class TimedSender: public QThread
-{
- Q_OBJECT
- qint64 totalBytes;
- QSemaphore ready;
- QByteArray dataToSend;
- QTcpSocket *client;
- int timeout;
- int port;
-public:
- int transferRate;
- TimedSender(int ms)
- : totalBytes(0), timeout(ms), port(-1), transferRate(-1)
- {
- dataToSend = QByteArray(16*1024, '@');
- start();
- ready.acquire();
- }
-
- inline int serverPort() const { return port; }
-
-private slots:
- void writeMore()
- {
- while (client->bytesToWrite() < 128 * 1024) {
- writePacket(dataToSend);
- }
- }
-
-protected:
- void run()
- {
- QTcpServer server;
- server.listen();
- port = server.serverPort();
- ready.release();
-
- server.waitForNewConnection(-1);
- client = server.nextPendingConnection();
-
- writeMore();
- connect(client, SIGNAL(bytesWritten(qint64)), SLOT(writeMore()), Qt::DirectConnection);
-
- QEventLoop eventLoop;
- QTimer::singleShot(timeout, &eventLoop, SLOT(quit()));
-
- QTime timer;
- timer.start();
- eventLoop.exec();
- disconnect(client, SIGNAL(bytesWritten(qint64)), this, 0);
-
- // wait for the connection to shut down
- client->disconnectFromHost();
- if (!client->waitForDisconnected(10000))
- return;
-
- transferRate = totalBytes * 1000 / timer.elapsed();
- qDebug() << "TimedSender::run" << "receive rate:" << (transferRate / 1024) << "kB/s in"
- << timer.elapsed() << "ms";
- }
-
- void writePacket(const QByteArray &array)
- {
- client->write(array);
- totalBytes += array.size();
- }
-};
-
-class ThreadedDataReader: public QThread
-{
- Q_OBJECT
- // used to make the constructor only return after the tcp server started listening
- QSemaphore ready;
- QTcpSocket *client;
- int timeout;
- int port;
-public:
- qint64 transferRate;
- ThreadedDataReader()
- : port(-1), transferRate(-1)
- {
- start();
- ready.acquire();
- }
-
- inline int serverPort() const { return port; }
-
-protected:
- void run()
- {
- QTcpServer server;
- server.listen();
- port = server.serverPort();
- ready.release();
-
- server.waitForNewConnection(-1);
- client = server.nextPendingConnection();
-
- QEventLoop eventLoop;
- DataReader reader(client, false);
- QObject::connect(client, SIGNAL(disconnected()), &eventLoop, SLOT(quit()));
-
- QTime timer;
- timer.start();
- eventLoop.exec();
- qint64 elapsed = timer.elapsed();
-
- transferRate = reader.totalBytes * 1000 / elapsed;
- qDebug() << "ThreadedDataReader::run" << "send rate:" << (transferRate / 1024) << "kB/s in" << elapsed << "msec";
- }
-};
-
-class ThreadedDataReaderHttpServer: public QThread
-{
- Q_OBJECT
- // used to make the constructor only return after the tcp server started listening
- QSemaphore ready;
- QTcpSocket *client;
- int timeout;
- int port;
-public:
- qint64 transferRate;
- ThreadedDataReaderHttpServer()
- : port(-1), transferRate(-1)
- {
- start();
- ready.acquire();
- }
-
- inline int serverPort() const { return port; }
-
-protected:
- void run()
- {
- QTcpServer server;
- server.listen();
- port = server.serverPort();
- ready.release();
-
- server.waitForNewConnection(-1);
- client = server.nextPendingConnection();
- client->write("HTTP/1.0 200 OK\r\n");
- client->write("Content-length: 0\r\n");
- client->write("\r\n");
- client->flush();
-
- QCoreApplication::processEvents();
-
- QEventLoop eventLoop;
- DataReader reader(client, false);
- QObject::connect(client, SIGNAL(disconnected()), &eventLoop, SLOT(quit()));
-
- QTime timer;
- timer.start();
- eventLoop.exec();
- qint64 elapsed = timer.elapsed();
-
- transferRate = reader.totalBytes * 1000 / elapsed;
- qDebug() << "ThreadedDataReaderHttpServer::run" << "send rate:" << (transferRate / 1024) << "kB/s in" << elapsed << "msec";
- }
-};
-
-class HttpDownloadPerformanceClient : QObject {
- Q_OBJECT;
- QIODevice *device;
- public:
- HttpDownloadPerformanceClient (QIODevice *dev) : device(dev){
- connect(dev, SIGNAL(readyRead()), this, SLOT(readyReadSlot()));
- }
-
- public slots:
- void readyReadSlot() {
- device->readAll();
- }
-
-};
-
-class HttpDownloadPerformanceServer : QObject {
- Q_OBJECT;
- qint64 dataSize;
- qint64 dataSent;
- QTcpServer server;
- QTcpSocket *client;
- bool serverSendsContentLength;
- bool chunkedEncoding;
-
-public:
- HttpDownloadPerformanceServer (qint64 ds, bool sscl, bool ce) : dataSize(ds), dataSent(0),
- client(0), serverSendsContentLength(sscl), chunkedEncoding(ce) {
- server.listen();
- connect(&server, SIGNAL(newConnection()), this, SLOT(newConnectionSlot()));
- }
-
- int serverPort() {
- return server.serverPort();
- }
-
-public slots:
-
- void newConnectionSlot() {
- client = server.nextPendingConnection();
- client->setParent(this);
- connect(client, SIGNAL(readyRead()), this, SLOT(readyReadSlot()));
- connect(client, SIGNAL(bytesWritten(qint64)), this, SLOT(bytesWrittenSlot(qint64)));
- }
-
- void readyReadSlot() {
- client->readAll();
- client->write("HTTP/1.0 200 OK\n");
- if (serverSendsContentLength)
- client->write(QString("Content-Length: " + QString::number(dataSize) + "\n").toAscii());
- if (chunkedEncoding)
- client->write(QString("Transfer-Encoding: chunked\n").toAscii());
- client->write("Connection: close\n\n");
- }
-
- void bytesWrittenSlot(qint64 amount) {
- Q_UNUSED(amount);
- if (dataSent == dataSize && client) {
- // close eventually
-
- // chunked encoding: we have to send a last "empty" chunk
- if (chunkedEncoding)
- client->write(QString("0\r\n\r\n").toAscii());
-
- client->disconnectFromHost();
- server.close();
- client = 0;
- return;
- }
-
- // send data
- if (client && client->bytesToWrite() < 100*1024 && dataSent < dataSize) {
- qint64 amount = qMin(qint64(16*1024), dataSize - dataSent);
- QByteArray data(amount, '@');
-
- if (chunkedEncoding) {
- client->write(QString(QString("%1").arg(amount,0,16).toUpper() + "\r\n").toAscii());
- client->write(data.constData(), amount);
- client->write(QString("\r\n").toAscii());
- } else {
- client->write(data.constData(), amount);
- }
-
- dataSent += amount;
- }
- }
-};
-
tst_QNetworkReply::tst_QNetworkReply()
{
@@ -3311,7 +2969,6 @@ void tst_QNetworkReply::ioPostToHttpEmtpyUploadProgress()
server.close();
}
-
void tst_QNetworkReply::rateControl_data()
{
QTest::addColumn<int>("rate");
@@ -3365,142 +3022,6 @@ void tst_QNetworkReply::rateControl()
QVERIFY(sender.transferRate <= maxRate);
}
-void tst_QNetworkReply::downloadPerformance()
-{
- // unlike the above function, this one tries to send as fast as possible
- // and measures how fast it was.
- TimedSender sender(5000);
- QNetworkRequest request("debugpipe://127.0.0.1:" + QString::number(sender.serverPort()) + "/?bare=1");
- QNetworkReplyPtr reply = manager.get(request);
- DataReader reader(reply, false);
-
- QTime loopTime;
- connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
- loopTime.start();
- QTestEventLoop::instance().enterLoop(40);
- int elapsedTime = loopTime.elapsed();
- sender.wait();
-
- qint64 receivedBytes = reader.totalBytes;
- qDebug() << "tst_QNetworkReply::downloadPerformance" << "receive rate:" << (receivedBytes * 1000 / elapsedTime / 1024) << "kB/s and"
- << elapsedTime << "ms";
-}
-
-void tst_QNetworkReply::uploadPerformance()
-{
- ThreadedDataReader reader;
- DataGenerator generator;
-
-
- QNetworkRequest request("debugpipe://127.0.0.1:" + QString::number(reader.serverPort()) + "/?bare=1");
- QNetworkReplyPtr reply = manager.put(request, &generator);
- generator.start();
- connect(&reader, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
- QTimer::singleShot(5000, &generator, SLOT(stop()));
-
- QTestEventLoop::instance().enterLoop(30);
- QCOMPARE(reply->error(), QNetworkReply::NoError);
- QVERIFY(!QTestEventLoop::instance().timeout());
-}
-
-void tst_QNetworkReply::httpUploadPerformance()
-{
-#ifdef Q_OS_SYMBIAN
- // SHow some mercy for non-desktop platform/s
- enum {UploadSize = 4*1024*1024}; // 4 MB
-#else
- enum {UploadSize = 128*1024*1024}; // 128 MB
-#endif
- ThreadedDataReaderHttpServer reader;
- FixedSizeDataGenerator generator(UploadSize);
-
- QNetworkRequest request(QUrl("http://127.0.0.1:" + QString::number(reader.serverPort()) + "/?bare=1"));
- request.setHeader(QNetworkRequest::ContentLengthHeader,UploadSize);
-
- QNetworkReplyPtr reply = manager.put(request, &generator);
-
- connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-
- QTime time;
- generator.start();
- time.start();
- QTestEventLoop::instance().enterLoop(40);
- QCOMPARE(reply->error(), QNetworkReply::NoError);
- QVERIFY(!QTestEventLoop::instance().timeout());
-
- qint64 elapsed = time.elapsed();
- qDebug() << "tst_QNetworkReply::httpUploadPerformance" << elapsed << "msec, "
- << ((UploadSize/1024.0)/(elapsed/1000.0)) << " kB/sec";
-
- reader.exit();
- reader.wait();
-}
-
-
-void tst_QNetworkReply::performanceControlRate()
-{
- // this is a control comparison for the other two above
- // it does the same thing, but instead bypasses the QNetworkAccess system
- qDebug() << "The following are the maximum transfer rates that we can get in this system"
- " (bypassing QNetworkAccess)";
-
- TimedSender sender(5000);
- QTcpSocket sink;
- sink.connectToHost("127.0.0.1", sender.serverPort());
- DataReader reader(&sink, false);
-
- QTime loopTime;
- connect(&sink, SIGNAL(disconnected()), &QTestEventLoop::instance(), SLOT(exitLoop()));
- loopTime.start();
- QTestEventLoop::instance().enterLoop(40);
- int elapsedTime = loopTime.elapsed();
- sender.wait();
-
- qint64 receivedBytes = reader.totalBytes;
- qDebug() << "tst_QNetworkReply::performanceControlRate" << "receive rate:" << (receivedBytes * 1000 / elapsedTime / 1024) << "kB/s and"
- << elapsedTime << "ms";
-}
-
-void tst_QNetworkReply::httpDownloadPerformance_data()
-{
- QTest::addColumn<bool>("serverSendsContentLength");
- QTest::addColumn<bool>("chunkedEncoding");
-
- QTest::newRow("Server sends no Content-Length") << false << false;
- QTest::newRow("Server sends Content-Length") << true << false;
- QTest::newRow("Server uses chunked encoding") << false << true;
-
-}
-
-void tst_QNetworkReply::httpDownloadPerformance()
-{
- QFETCH(bool, serverSendsContentLength);
- QFETCH(bool, chunkedEncoding);
-#ifdef Q_OS_SYMBIAN
- // Show some mercy to non-desktop platform/s
- enum {UploadSize = 4*1024*1024}; // 4 MB
-#else
- enum {UploadSize = 128*1024*1024}; // 128 MB
-#endif
- HttpDownloadPerformanceServer server(UploadSize, serverSendsContentLength, chunkedEncoding);
-
- QNetworkRequest request(QUrl("http://127.0.0.1:" + QString::number(server.serverPort()) + "/?bare=1"));
- QNetworkReplyPtr reply = manager.get(request);
-
- connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection);
- HttpDownloadPerformanceClient client(reply);
-
- QTime time;
- time.start();
- QTestEventLoop::instance().enterLoop(40);
- QCOMPARE(reply->error(), QNetworkReply::NoError);
- QVERIFY(!QTestEventLoop::instance().timeout());
-
- qint64 elapsed = time.elapsed();
- qDebug() << "tst_QNetworkReply::httpDownloadPerformance" << elapsed << "msec, "
- << ((UploadSize/1024.0)/(elapsed/1000.0)) << " kB/sec";
-}
-
void tst_QNetworkReply::downloadProgress_data()
{
QTest::addColumn<int>("loopCount");
diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp
index 8ed83cb851..8b713496e6 100644
--- a/tests/auto/qpainter/tst_qpainter.cpp
+++ b/tests/auto/qpainter/tst_qpainter.cpp
@@ -101,6 +101,8 @@ private slots:
void saveAndRestore_data();
void saveAndRestore();
+ void drawBorderPixmap();
+
void drawLine_data();
void drawLine();
void drawLine_clipped();
@@ -239,9 +241,12 @@ private slots:
void taskQT4444_dontOverflowDashOffset();
void painterBegin();
+ void setPenColorOnImage();
+ void setPenColorOnPixmap();
private:
void fillData();
+ void setPenColor(QPainter& p);
QColor baseColor( int k, int intensity=255 );
QImage getResImage( const QString &dir, const QString &addition, const QString &extension );
QBitmap getBitmap( const QString &dir, const QString &filename, bool mask );
@@ -970,6 +975,18 @@ void tst_QPainter::initFrom()
delete widget;
}
+void tst_QPainter::drawBorderPixmap()
+{
+ QPixmap src(79,79);
+ src.fill(Qt::transparent);
+
+ QImage pm(200,200,QImage::Format_RGB32);
+ QPainter p(&pm);
+ p.setTransform(QTransform(-1,0,0,-1,173.5,153.5));
+ qDrawBorderPixmap(&p, QRect(0,0,75,105), QMargins(39,39,39,39), src, QRect(0,0,79,79), QMargins(39,39,39,39),
+ QTileRules(Qt::StretchTile,Qt::StretchTile), 0);
+}
+
void tst_QPainter::drawLine_data()
{
QTest::addColumn<QLine>("line");
@@ -2915,7 +2932,7 @@ void tst_QPainter::monoImages()
QImage img(2, 2, format);
- if (img.numColors() > 0) {
+ if (img.colorCount() > 0) {
img.setColor(0, QColor(colorPairs[j][0]).rgba());
img.setColor(1, QColor(colorPairs[j][1]).rgba());
}
@@ -2937,7 +2954,7 @@ void tst_QPainter::monoImages()
// should not change the image
QCOMPARE(original, img);
- if (img.numColors() == 0)
+ if (img.colorCount() == 0)
continue;
for (int k = 0; k < 2; ++k) {
@@ -4193,9 +4210,9 @@ void tst_QPainter::extendedBlendModes()
QVERIFY(testCompositionMode(255, 255, 255, QPainter::CompositionMode_SoftLight));
QVERIFY(testCompositionMode( 0, 0, 0, QPainter::CompositionMode_SoftLight));
- QVERIFY(testCompositionMode(127, 127, 127, QPainter::CompositionMode_SoftLight));
- QVERIFY(testCompositionMode( 63, 63, 86, QPainter::CompositionMode_SoftLight));
- QVERIFY(testCompositionMode(127, 63, 63, QPainter::CompositionMode_SoftLight));
+ QVERIFY(testCompositionMode(127, 127, 126, QPainter::CompositionMode_SoftLight));
+ QVERIFY(testCompositionMode( 63, 63, 39, QPainter::CompositionMode_SoftLight));
+ QVERIFY(testCompositionMode(127, 63, 62, QPainter::CompositionMode_SoftLight));
QVERIFY(testCompositionMode(255, 255, 0, QPainter::CompositionMode_Difference));
QVERIFY(testCompositionMode( 0, 0, 0, QPainter::CompositionMode_Difference));
@@ -4352,5 +4369,41 @@ void tst_QPainter::painterBegin()
QVERIFY(!p.end());
}
+void tst_QPainter::setPenColor(QPainter& p)
+{
+ p.setPen(Qt::NoPen);
+
+ // Setting color, then style
+ // Should work even though the pen is "NoPen with color", temporarily.
+ QPen newPen(p.pen());
+ newPen.setColor(Qt::red);
+ QCOMPARE(p.pen().style(), newPen.style());
+ QCOMPARE(p.pen().style(), Qt::NoPen);
+ p.setPen(newPen);
+
+ QCOMPARE(p.pen().color().name(), QString("#ff0000"));
+
+ QPen newPen2(p.pen());
+ newPen2.setStyle(Qt::SolidLine);
+ p.setPen(newPen2);
+
+ QCOMPARE(p.pen().color().name(), QString("#ff0000"));
+}
+
+void tst_QPainter::setPenColorOnImage()
+{
+ QImage img(QSize(10, 10), QImage::Format_ARGB32_Premultiplied);
+ QPainter p(&img);
+ setPenColor(p);
+}
+
+void tst_QPainter::setPenColorOnPixmap()
+{
+ QPixmap pix(10, 10);
+ QPainter p(&pix);
+ setPenColor(p);
+}
+
QTEST_MAIN(tst_QPainter)
+
#include "tst_qpainter.moc"
diff --git a/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp b/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
index 8d937e9ab5..a26e0eb61f 100644
--- a/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
+++ b/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
@@ -119,8 +119,8 @@ class TestAnimation : public QVariantAnimation
Q_OBJECT
public:
virtual void updateCurrentValue(const QVariant &value) { Q_UNUSED(value)};
- virtual void updateState(QAbstractAnimation::State oldState,
- QAbstractAnimation::State newState)
+ virtual void updateState(QAbstractAnimation::State newState,
+ QAbstractAnimation::State oldState)
{
Q_UNUSED(oldState)
Q_UNUSED(newState)
@@ -135,8 +135,8 @@ public:
TestAnimation2(int duration, QAbstractAnimation *animation) : QVariantAnimation(animation), m_duration(duration) {}
virtual void updateCurrentValue(const QVariant &value) { Q_UNUSED(value)};
- virtual void updateState(QAbstractAnimation::State oldState,
- QAbstractAnimation::State newState)
+ virtual void updateState(QAbstractAnimation::State newState,
+ QAbstractAnimation::State oldState)
{
Q_UNUSED(oldState)
Q_UNUSED(newState)
@@ -223,33 +223,33 @@ void tst_QParallelAnimationGroup::setCurrentTime()
QCOMPARE(notTimeDriven->state(), QAnimationGroup::Stopped);
QCOMPARE(loopsForever->state(), QAnimationGroup::Stopped);
- QCOMPARE(group.currentTime(), 1);
- QCOMPARE(a1_p_o1->currentTime(), 1);
- QCOMPARE(a1_p_o2->currentTime(), 1);
- QCOMPARE(a1_p_o3->currentTime(), 1);
- QCOMPARE(notTimeDriven->currentTime(), 1);
- QCOMPARE(loopsForever->currentTime(), 1);
+ QCOMPARE(group.currentLoopTime(), 1);
+ QCOMPARE(a1_p_o1->currentLoopTime(), 1);
+ QCOMPARE(a1_p_o2->currentLoopTime(), 1);
+ QCOMPARE(a1_p_o3->currentLoopTime(), 1);
+ QCOMPARE(notTimeDriven->currentLoopTime(), 1);
+ QCOMPARE(loopsForever->currentLoopTime(), 1);
// Current time = 250
group.setCurrentTime(250);
- QCOMPARE(group.currentTime(), 250);
- QCOMPARE(a1_p_o1->currentTime(), 250);
- QCOMPARE(a1_p_o2->currentTime(), 0);
+ QCOMPARE(group.currentLoopTime(), 250);
+ QCOMPARE(a1_p_o1->currentLoopTime(), 250);
+ QCOMPARE(a1_p_o2->currentLoopTime(), 0);
QCOMPARE(a1_p_o2->currentLoop(), 1);
- QCOMPARE(a1_p_o3->currentTime(), 250);
- QCOMPARE(notTimeDriven->currentTime(), 250);
- QCOMPARE(loopsForever->currentTime(), 0);
+ QCOMPARE(a1_p_o3->currentLoopTime(), 250);
+ QCOMPARE(notTimeDriven->currentLoopTime(), 250);
+ QCOMPARE(loopsForever->currentLoopTime(), 0);
QCOMPARE(loopsForever->currentLoop(), 1);
// Current time = 251
group.setCurrentTime(251);
- QCOMPARE(group.currentTime(), 251);
- QCOMPARE(a1_p_o1->currentTime(), 250);
- QCOMPARE(a1_p_o2->currentTime(), 1);
+ QCOMPARE(group.currentLoopTime(), 251);
+ QCOMPARE(a1_p_o1->currentLoopTime(), 250);
+ QCOMPARE(a1_p_o2->currentLoopTime(), 1);
QCOMPARE(a1_p_o2->currentLoop(), 1);
- QCOMPARE(a1_p_o3->currentTime(), 250);
- QCOMPARE(notTimeDriven->currentTime(), 251);
- QCOMPARE(loopsForever->currentTime(), 1);
+ QCOMPARE(a1_p_o3->currentLoopTime(), 250);
+ QCOMPARE(notTimeDriven->currentLoopTime(), 251);
+ QCOMPARE(loopsForever->currentLoopTime(), 1);
}
void tst_QParallelAnimationGroup::stateChanged()
@@ -278,18 +278,18 @@ void tst_QParallelAnimationGroup::stateChanged()
group.start();
//all the animations should be started
QCOMPARE(spy1.count(), 1);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy1.last().at(1)), TestAnimation::Running);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy1.last().first()), TestAnimation::Running);
QCOMPARE(spy2.count(), 1);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy2.last().at(1)), TestAnimation::Running);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy2.last().first()), TestAnimation::Running);
QCOMPARE(spy3.count(), 1);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy3.last().at(1)), TestAnimation::Running);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy3.last().first()), TestAnimation::Running);
QCOMPARE(spy4.count(), 1);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy4.last().at(1)), TestAnimation::Running);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy4.last().first()), TestAnimation::Running);
group.setCurrentTime(1500); //anim1 should be finished
QCOMPARE(group.state(), QAnimationGroup::Running);
QCOMPARE(spy1.count(), 2);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy1.last().at(1)), TestAnimation::Stopped);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy1.last().first()), TestAnimation::Stopped);
QCOMPARE(spy2.count(), 1); //no change
QCOMPARE(spy3.count(), 1); //no change
QCOMPARE(spy4.count(), 1); //no change
@@ -298,7 +298,7 @@ void tst_QParallelAnimationGroup::stateChanged()
QCOMPARE(group.state(), QAnimationGroup::Running);
QCOMPARE(spy1.count(), 2); //no change
QCOMPARE(spy2.count(), 2);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy2.last().at(1)), TestAnimation::Stopped);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy2.last().first()), TestAnimation::Stopped);
QCOMPARE(spy3.count(), 1); //no change
QCOMPARE(spy4.count(), 1); //no change
@@ -307,9 +307,9 @@ void tst_QParallelAnimationGroup::stateChanged()
QCOMPARE(spy1.count(), 2); //no change
QCOMPARE(spy2.count(), 2); //no change
QCOMPARE(spy3.count(), 2);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy3.last().at(1)), TestAnimation::Stopped);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy3.last().first()), TestAnimation::Stopped);
QCOMPARE(spy4.count(), 2);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy4.last().at(1)), TestAnimation::Stopped);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy4.last().first()), TestAnimation::Stopped);
//cleanup
spy1.clear();
@@ -326,22 +326,22 @@ void tst_QParallelAnimationGroup::stateChanged()
QCOMPARE(spy1.count(), 0);
QCOMPARE(spy2.count(), 0);
QCOMPARE(spy3.count(), 1);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy3.last().at(1)), TestAnimation::Running);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy3.last().first()), TestAnimation::Running);
QCOMPARE(spy4.count(), 1);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy4.last().at(1)), TestAnimation::Running);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy4.last().first()), TestAnimation::Running);
group.setCurrentTime(1500); //anim2 should be started
QCOMPARE(group.state(), QAnimationGroup::Running);
QCOMPARE(spy1.count(), 0); //no change
QCOMPARE(spy2.count(), 1);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy2.last().at(1)), TestAnimation::Running);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy2.last().first()), TestAnimation::Running);
QCOMPARE(spy3.count(), 1); //no change
QCOMPARE(spy4.count(), 1); //no change
group.setCurrentTime(500); //anim1 is finally also started
QCOMPARE(group.state(), QAnimationGroup::Running);
QCOMPARE(spy1.count(), 1);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy1.last().at(1)), TestAnimation::Running);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy1.last().first()), TestAnimation::Running);
QCOMPARE(spy2.count(), 1); //no change
QCOMPARE(spy3.count(), 1); //no change
QCOMPARE(spy4.count(), 1); //no change
@@ -349,13 +349,13 @@ void tst_QParallelAnimationGroup::stateChanged()
group.setCurrentTime(0); //everything should be stopped
QCOMPARE(group.state(), QAnimationGroup::Stopped);
QCOMPARE(spy1.count(), 2);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy1.last().at(1)), TestAnimation::Stopped);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy1.last().first()), TestAnimation::Stopped);
QCOMPARE(spy2.count(), 2);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy2.last().at(1)), TestAnimation::Stopped);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy2.last().first()), TestAnimation::Stopped);
QCOMPARE(spy3.count(), 2);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy3.last().at(1)), TestAnimation::Stopped);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy3.last().first()), TestAnimation::Stopped);
QCOMPARE(spy4.count(), 2);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy4.last().at(1)), TestAnimation::Stopped);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy4.last().first()), TestAnimation::Stopped);
}
void tst_QParallelAnimationGroup::clearGroup()
@@ -375,9 +375,9 @@ void tst_QParallelAnimationGroup::clearGroup()
children[i] = group.animationAt(i);
}
- group.clearAnimations();
+ group.clear();
QCOMPARE(group.animationCount(), 0);
- QCOMPARE(group.currentTime(), 0);
+ QCOMPARE(group.currentLoopTime(), 0);
for (int i = 0; i < animationCount; ++i)
QVERIFY(children[i].isNull());
}
@@ -460,9 +460,9 @@ void tst_QParallelAnimationGroup::updateChildrenWithRunningGroup()
QCOMPARE(groupStateChangedSpy.count(), 1);
QCOMPARE(childStateChangedSpy.count(), 1);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(groupStateChangedSpy.at(0).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(groupStateChangedSpy.at(0).first()),
QAnimationGroup::Running);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(childStateChangedSpy.at(0).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(childStateChangedSpy.at(0).first()),
QAnimationGroup::Running);
// starting directly a running child will not have any effect
@@ -501,13 +501,13 @@ void tst_QParallelAnimationGroup::deleteChildrenWithRunningGroup()
QCOMPARE(anim1->state(), QAnimationGroup::Running);
QTest::qWait(80);
- QVERIFY(group.currentTime() > 0);
+ QVERIFY(group.currentLoopTime() > 0);
delete anim1;
QVERIFY(group.animationCount() == 0);
QCOMPARE(group.duration(), 0);
QCOMPARE(group.state(), QAnimationGroup::Stopped);
- QCOMPARE(group.currentTime(), 0); //that's the invariant
+ QCOMPARE(group.currentLoopTime(), 0); //that's the invariant
}
void tst_QParallelAnimationGroup::startChildrenWithStoppedGroup()
@@ -622,11 +622,11 @@ void tst_QParallelAnimationGroup::startGroupWithRunningChild()
anim2.start();
anim2.pause();
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy1.at(0).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy1.at(0).first()),
QAnimationGroup::Running);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy2.at(0).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy2.at(0).first()),
QAnimationGroup::Running);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy2.at(1).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy2.at(1).first()),
QAnimationGroup::Paused);
QCOMPARE(group.state(), QAnimationGroup::Stopped);
@@ -636,15 +636,15 @@ void tst_QParallelAnimationGroup::startGroupWithRunningChild()
group.start();
QCOMPARE(stateChangedSpy1.count(), 3);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy1.at(1).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy1.at(1).first()),
QAnimationGroup::Stopped);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy1.at(2).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy1.at(2).first()),
QAnimationGroup::Running);
QCOMPARE(stateChangedSpy2.count(), 4);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy2.at(2).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy2.at(2).first()),
QAnimationGroup::Stopped);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy2.at(3).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy2.at(3).first()),
QAnimationGroup::Running);
QCOMPARE(group.state(), QAnimationGroup::Running);
@@ -687,19 +687,19 @@ void tst_QParallelAnimationGroup::zeroDurationAnimation()
group.start();
QCOMPARE(stateChangedSpy1.count(), 2);
QCOMPARE(finishedSpy1.count(), 1);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy1.at(0).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy1.at(0).first()),
QAnimationGroup::Running);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy1.at(1).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy1.at(1).first()),
QAnimationGroup::Stopped);
QCOMPARE(stateChangedSpy2.count(), 1);
QCOMPARE(finishedSpy2.count(), 0);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy1.at(0).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy1.at(0).first()),
QAnimationGroup::Running);
QCOMPARE(stateChangedSpy3.count(), 1);
QCOMPARE(finishedSpy3.count(), 0);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy3.at(0).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy3.at(0).first()),
QAnimationGroup::Running);
@@ -762,9 +762,9 @@ void tst_QParallelAnimationGroup::stopUncontrolledAnimations()
group.start();
QCOMPARE(stateChangedSpy.count(), 2);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy.at(0).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy.at(0).first()),
QAnimationGroup::Running);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy.at(1).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy.at(1).first()),
QAnimationGroup::Stopped);
QCOMPARE(group.state(), QAnimationGroup::Running);
@@ -915,9 +915,9 @@ void tst_QParallelAnimationGroup::loopCount()
group.setCurrentTime(currentGroupTime);
- QCOMPARE(anim1.currentTime(), expected1.time);
- QCOMPARE(anim2.currentTime(), expected2.time);
- QCOMPARE(anim3.currentTime(), expected3.time);
+ QCOMPARE(anim1.currentLoopTime(), expected1.time);
+ QCOMPARE(anim2.currentLoopTime(), expected2.time);
+ QCOMPARE(anim3.currentLoopTime(), expected3.time);
if (expected1.state >=0)
QCOMPARE(int(anim1.state()), expected1.state);
@@ -968,22 +968,22 @@ void tst_QParallelAnimationGroup::pauseResume()
QCOMPARE(anim->state(), QAnimationGroup::Running);
QCOMPARE(spy.count(), 1);
spy.clear();
- const int currentTime = group.currentTime();
- QCOMPARE(anim->currentTime(), currentTime);
+ const int currentTime = group.currentLoopTime();
+ QCOMPARE(anim->currentLoopTime(), currentTime);
group.pause();
QCOMPARE(group.state(), QAnimationGroup::Paused);
- QCOMPARE(group.currentTime(), currentTime);
+ QCOMPARE(group.currentLoopTime(), currentTime);
QCOMPARE(anim->state(), QAnimationGroup::Paused);
- QCOMPARE(anim->currentTime(), currentTime);
+ QCOMPARE(anim->currentLoopTime(), currentTime);
QCOMPARE(spy.count(), 1);
spy.clear();
group.resume();
QCOMPARE(group.state(), QAnimationGroup::Running);
- QCOMPARE(group.currentTime(), currentTime);
+ QCOMPARE(group.currentLoopTime(), currentTime);
QCOMPARE(anim->state(), QAnimationGroup::Running);
- QCOMPARE(anim->currentTime(), currentTime);
+ QCOMPARE(anim->currentLoopTime(), currentTime);
QCOMPARE(spy.count(), 1);
group.stop();
@@ -991,10 +991,10 @@ void tst_QParallelAnimationGroup::pauseResume()
new TestAnimation2(500, &group);
group.start();
QCOMPARE(spy.count(), 1); //the animation should have been started
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy.last().at(1)), TestAnimation::Running);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy.last().first()), TestAnimation::Running);
group.setCurrentTime(250); //end of first animation
QCOMPARE(spy.count(), 2); //the animation should have been stopped
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy.last().at(1)), TestAnimation::Stopped);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(spy.last().first()), TestAnimation::Stopped);
group.pause();
QCOMPARE(spy.count(), 2); //this shouldn't have changed
group.resume();
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index 8e02c74e25..d7f042edea 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -293,7 +293,7 @@ void tst_QPixmap::setAlphaChannel()
QRgb expected = alpha == 0 ? 0 : qRgba(red, green, blue, alpha);
for (int y = 0; y < height; ++y) {
for (int x = 0; x < width; ++x) {
- if (result.numColors() > 0) {
+ if (result.colorCount() > 0) {
ok &= result.pixelIndex(x, y) == expected;
} else {
ok &= result.pixel(x, y) == expected;
@@ -330,7 +330,7 @@ void tst_QPixmap::fromImage()
QImage image(37, 16, format);
- if (image.numColors() == 2) {
+ if (image.colorCount() == 2) {
image.setColor(0, QColor(Qt::color0).rgba());
image.setColor(1, QColor(Qt::color1).rgba());
}
@@ -731,7 +731,7 @@ void tst_QPixmap::testMetrics()
void tst_QPixmap::createMaskFromColor()
{
QImage image(3, 3, QImage::Format_Indexed8);
- image.setNumColors(10);
+ image.setColorCount(10);
image.setColor(0, 0xffffffff);
image.setColor(1, 0xff000000);
image.setColor(2, 0xffff0000);
diff --git a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
index 56c1ced81b..f41fff128a 100644
--- a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
+++ b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
@@ -225,7 +225,7 @@ void tst_QPropertyAnimation::setCurrentTime()
animation.setLoopCount(loopCount);
animation.setCurrentTime(currentTime);
- QCOMPARE(animation.currentTime(), testCurrentTime);
+ QCOMPARE(animation.currentLoopTime(), testCurrentTime);
QCOMPARE(animation.currentLoop(), testCurrentLoop);
}
@@ -280,7 +280,7 @@ void tst_QPropertyAnimation::statesAndSignals()
QCOMPARE(anim->state(), QAnimationGroup::Stopped);
QCOMPARE(runningSpy.count(), 1); //anim must have stopped
QCOMPARE(finishedSpy.count(), 0);
- QCOMPARE(anim->currentTime(), 0);
+ QCOMPARE(anim->currentLoopTime(), 0);
QCOMPARE(anim->currentLoop(), 0);
QCOMPARE(currentLoopSpy.count(), 2);
runningSpy.clear();
@@ -291,7 +291,7 @@ void tst_QPropertyAnimation::statesAndSignals()
QCOMPARE(runningSpy.count(), 2); //started and stopped again
runningSpy.clear();
QCOMPARE(finishedSpy.count(), 1);
- QCOMPARE(anim->currentTime(), 100);
+ QCOMPARE(anim->currentLoopTime(), 100);
QCOMPARE(anim->currentLoop(), 2);
QCOMPARE(currentLoopSpy.count(), 4);
@@ -312,7 +312,7 @@ void tst_QPropertyAnimation::statesAndSignals()
QCOMPARE(anim->currentLoop(), 2);
QCOMPARE(runningSpy.count(), 1); // anim has stopped
QCOMPARE(finishedSpy.count(), 2);
- QCOMPARE(anim->currentTime(), 100);
+ QCOMPARE(anim->currentLoopTime(), 100);
delete anim;
}
@@ -864,16 +864,16 @@ void tst_QPropertyAnimation::zeroDurationStart()
//let's check the first state change
const QVariantList firstChange = spy.first();
//old state
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(firstChange.first()), QAbstractAnimation::Stopped);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(firstChange.last()), QAbstractAnimation::Stopped);
//new state
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(firstChange.last()), QAbstractAnimation::Running);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(firstChange.first()), QAbstractAnimation::Running);
//let's check the first state change
const QVariantList secondChange = spy.last();
//old state
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(secondChange.first()), QAbstractAnimation::Running);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(secondChange.last()), QAbstractAnimation::Running);
//new state
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(secondChange.last()), QAbstractAnimation::Stopped);
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(secondChange.first()), QAbstractAnimation::Stopped);
}
#define Pause 1
@@ -1171,9 +1171,9 @@ public:
innerAnim->start();
}
- void updateState(QAbstractAnimation::State oldState, QAbstractAnimation::State newState)
+ void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)
{
- QPropertyAnimation::updateState(oldState, newState);
+ QPropertyAnimation::updateState(newState, oldState);
if (newState == QAbstractAnimation::Stopped)
delete innerAnim;
}
diff --git a/tests/auto/qregexp/tst_qregexp.cpp b/tests/auto/qregexp/tst_qregexp.cpp
index 86d831e8ad..e3053865cf 100644
--- a/tests/auto/qregexp/tst_qregexp.cpp
+++ b/tests/auto/qregexp/tst_qregexp.cpp
@@ -628,7 +628,7 @@ void tst_QRegExp::capturedTexts()
QRegExp rx7("([A-Za-z_])([A-Za-z_0-9]*)");
rx7.setCaseSensitivity(Qt::CaseSensitive);
rx7.setPatternSyntax(QRegExp::RegExp);
- QCOMPARE(rx7.numCaptures(), 2);
+ QCOMPARE(rx7.captureCount(), 2);
int pos = rx7.indexIn("(10 + delta4) * 32");
QCOMPARE(pos, 6);
@@ -1177,36 +1177,36 @@ void tst_QRegExp::prepareEngineOptimization()
QCOMPARE(rx1.capturedTexts(), QStringList() << "" << "" << "" << "");
QCOMPARE(rx1.matchedLength(), -1);
QCOMPARE(rx1.matchedLength(), -1);
- QCOMPARE(rx1.numCaptures(), 3);
+ QCOMPARE(rx1.captureCount(), 3);
QCOMPARE(rx1.exactMatch("foo"), true);
QCOMPARE(rx1.matchedLength(), 3);
QCOMPARE(rx1.capturedTexts(), QStringList() << "foo" << "f" << "o" << "o");
- QCOMPARE(rx1.numCaptures(), 3);
+ QCOMPARE(rx1.captureCount(), 3);
QCOMPARE(rx1.matchedLength(), 3);
QCOMPARE(rx1.capturedTexts(), QStringList() << "foo" << "f" << "o" << "o");
QCOMPARE(rx1.pos(3), 2);
QCOMPARE(rx1.exactMatch("foo"), true);
- QCOMPARE(rx1.numCaptures(), 3);
+ QCOMPARE(rx1.captureCount(), 3);
QCOMPARE(rx1.matchedLength(), 3);
QCOMPARE(rx1.capturedTexts(), QStringList() << "foo" << "f" << "o" << "o");
QCOMPARE(rx1.pos(3), 2);
QRegExp rx2 = rx1;
- QCOMPARE(rx1.numCaptures(), 3);
+ QCOMPARE(rx1.captureCount(), 3);
QCOMPARE(rx1.matchedLength(), 3);
QCOMPARE(rx1.capturedTexts(), QStringList() << "foo" << "f" << "o" << "o");
QCOMPARE(rx1.pos(3), 2);
- QCOMPARE(rx2.numCaptures(), 3);
+ QCOMPARE(rx2.captureCount(), 3);
QCOMPARE(rx2.matchedLength(), 3);
QCOMPARE(rx2.capturedTexts(), QStringList() << "foo" << "f" << "o" << "o");
QCOMPARE(rx2.pos(3), 2);
QCOMPARE(rx1.exactMatch("fo"), true);
- QCOMPARE(rx1.numCaptures(), 3);
+ QCOMPARE(rx1.captureCount(), 3);
QCOMPARE(rx1.matchedLength(), 2);
QCOMPARE(rx1.capturedTexts(), QStringList() << "fo" << "f" << "o" << "");
QCOMPARE(rx1.pos(2), 1);
@@ -1245,25 +1245,25 @@ void tst_QRegExp::prepareEngineOptimization()
rx11.setPatternSyntax(QRegExp::Wildcard);
QVERIFY(!rx11.isValid());
- QCOMPARE(rx11.numCaptures(), 0);
+ QCOMPARE(rx11.captureCount(), 0);
QCOMPARE(rx11.matchedLength(), -1);
rx11.setPatternSyntax(QRegExp::RegExp);
QVERIFY(!rx11.isValid());
- QCOMPARE(rx11.numCaptures(), 0);
+ QCOMPARE(rx11.captureCount(), 0);
QCOMPARE(rx11.matchedLength(), -1);
rx11.setPattern("(foo)");
QVERIFY(rx11.isValid());
- QCOMPARE(rx11.numCaptures(), 1);
+ QCOMPARE(rx11.captureCount(), 1);
QCOMPARE(rx11.matchedLength(), -1);
QCOMPARE(rx11.indexIn("ofoo"), 1);
- QCOMPARE(rx11.numCaptures(), 1);
+ QCOMPARE(rx11.captureCount(), 1);
QCOMPARE(rx11.matchedLength(), 3);
rx11.setPatternSyntax(QRegExp::RegExp);
- QCOMPARE(rx11.numCaptures(), 1);
+ QCOMPARE(rx11.captureCount(), 1);
QCOMPARE(rx11.matchedLength(), 3);
/*
@@ -1278,11 +1278,11 @@ void tst_QRegExp::prepareEngineOptimization()
QCOMPARE(rx11.matchedLength(), 3);
rx11.setPatternSyntax(QRegExp::Wildcard);
- QCOMPARE(rx11.numCaptures(), 0);
+ QCOMPARE(rx11.captureCount(), 0);
QCOMPARE(rx11.matchedLength(), -1);
rx11.setPatternSyntax(QRegExp::RegExp);
- QCOMPARE(rx11.numCaptures(), 1);
+ QCOMPARE(rx11.captureCount(), 1);
QCOMPARE(rx11.matchedLength(), -1);
}
diff --git a/tests/auto/qregion/tst_qregion.cpp b/tests/auto/qregion/tst_qregion.cpp
index e5a3151120..582b5e8df3 100644
--- a/tests/auto/qregion/tst_qregion.cpp
+++ b/tests/auto/qregion/tst_qregion.cpp
@@ -88,8 +88,8 @@ private slots:
void operator_xor_data();
void operator_xor();
- void numRects_data();
- void numRects();
+ void rectCount_data();
+ void rectCount();
void isEmpty_data();
void isEmpty();
@@ -554,7 +554,7 @@ void tst_QRegion::operator_plus()
qDebug() << "expected" << expected;
}
QCOMPARE(r1 + r2, expected);
- if (r2.numRects() == 1) {
+ if (r2.rectCount() == 1) {
if (r1 + r2.boundingRect() != expected) {
qDebug() << "r1 + QRect(r2)" << (r1 + r2.boundingRect());
qDebug() << "expected" << expected;
@@ -567,7 +567,7 @@ void tst_QRegion::operator_plus()
qDebug() << "expected" << expected;
}
QCOMPARE(r2 + r1, expected);
- if (r1.numRects() == 1) {
+ if (r1.rectCount() == 1) {
if (r1 + r2.boundingRect() != expected) {
qDebug() << "r2 + QRect(r1)" << (r2 + r1.boundingRect());
qDebug() << "expected" << expected;
@@ -582,7 +582,7 @@ void tst_QRegion::operator_plus()
qDebug() << "expected" << expected;
}
QCOMPARE(result1, expected);
- if (r2.numRects() == 1) {
+ if (r2.rectCount() == 1) {
result1 = r1;
result1 += r2.boundingRect();
if (result1 != expected) {
@@ -599,7 +599,7 @@ void tst_QRegion::operator_plus()
qDebug() << "expected" << expected;
}
QCOMPARE(result2, expected);
- if (r1.numRects() == 1) {
+ if (r1.rectCount() == 1) {
result2 = r2;
result2 += r1.boundingRect();
if (result2 != expected) {
@@ -802,7 +802,7 @@ void tst_QRegion::operator_xor()
QCOMPARE(dest, expected);
}
-void tst_QRegion::numRects_data()
+void tst_QRegion::rectCount_data()
{
QTest::addColumn<QRegion>("region");
QTest::addColumn<int>("expected");
@@ -818,12 +818,12 @@ void tst_QRegion::numRects_data()
QTest::newRow("2 rects") << dest << rects.size();
}
-void tst_QRegion::numRects()
+void tst_QRegion::rectCount()
{
QFETCH(QRegion, region);
QFETCH(int, expected);
- QCOMPARE(region.numRects(), expected);
+ QCOMPARE(region.rectCount(), expected);
}
void tst_QRegion::isEmpty_data()
@@ -850,7 +850,7 @@ void tst_QRegion::isEmpty()
QVERIFY(region.isEmpty());
QCOMPARE(region, QRegion());
- QCOMPARE(region.numRects(), 0);
+ QCOMPARE(region.rectCount(), 0);
QCOMPARE(region.boundingRect(), QRect());
QVERIFY(region.rects().isEmpty());
}
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp
index 804534fe47..8eaad78470 100644
--- a/tests/auto/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp
@@ -4485,7 +4485,7 @@ void tst_QScriptEngine::qRegExpInport()
QScriptValue result = func.call(QScriptValue(), QScriptValueList() << string << rexp);
rx.indexIn(string);
- for (int i = 0; i <= rx.numCaptures(); i++) {
+ for (int i = 0; i <= rx.captureCount(); i++) {
QCOMPARE(result.property(i).toString(), rx.cap(i));
}
}
diff --git a/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp b/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
index f6afc5b7de..28fccac428 100644
--- a/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
+++ b/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
@@ -87,7 +87,7 @@ private slots:
void currentAnimation();
void currentAnimationWithZeroDuration();
void insertAnimation();
- void clearAnimations();
+ void clear();
void pauseResume();
};
@@ -134,8 +134,8 @@ class TestAnimation : public QVariantAnimation
Q_OBJECT
public:
virtual void updateCurrentValue(const QVariant &value) { Q_UNUSED(value)};
- virtual void updateState(QAbstractAnimation::State oldState,
- QAbstractAnimation::State newState)
+ virtual void updateState(QAbstractAnimation::State newState,
+ QAbstractAnimation::State oldState)
{
Q_UNUSED(oldState)
Q_UNUSED(newState)
@@ -208,119 +208,119 @@ void tst_QSequentialAnimationGroup::setCurrentTime()
QCOMPARE(sequence2->state(), QAnimationGroup::Stopped);
QCOMPARE(a1_s_o2->state(), QAnimationGroup::Stopped);
- QCOMPARE(group.currentTime(), 1);
- QCOMPARE(sequence->currentTime(), 1);
- QCOMPARE(a1_s_o1->currentTime(), 1);
- QCOMPARE(a2_s_o1->currentTime(), 0);
- QCOMPARE(a3_s_o1->currentTime(), 0);
- QCOMPARE(a1_s_o2->currentTime(), 0);
- QCOMPARE(a1_s_o3->currentTime(), 0);
+ QCOMPARE(group.currentLoopTime(), 1);
+ QCOMPARE(sequence->currentLoopTime(), 1);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 1);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 0);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 0);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 0);
+ QCOMPARE(a1_s_o3->currentLoopTime(), 0);
// Current time = 250
group.setCurrentTime(250);
- QCOMPARE(group.currentTime(), 250);
- QCOMPARE(sequence->currentTime(), 250);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a2_s_o1->currentTime(), 0);
- QCOMPARE(a3_s_o1->currentTime(), 0);
- QCOMPARE(a1_s_o2->currentTime(), 0);
- QCOMPARE(a1_s_o3->currentTime(), 0);
+ QCOMPARE(group.currentLoopTime(), 250);
+ QCOMPARE(sequence->currentLoopTime(), 250);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 0);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 0);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 0);
+ QCOMPARE(a1_s_o3->currentLoopTime(), 0);
// Current time = 251
group.setCurrentTime(251);
- QCOMPARE(group.currentTime(), 251);
- QCOMPARE(sequence->currentTime(), 251);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a2_s_o1->currentTime(), 1);
+ QCOMPARE(group.currentLoopTime(), 251);
+ QCOMPARE(sequence->currentLoopTime(), 251);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 1);
QCOMPARE(a2_s_o1->currentLoop(), 0);
- QCOMPARE(a3_s_o1->currentTime(), 0);
- QCOMPARE(sequence2->currentTime(), 0);
- QCOMPARE(a1_s_o2->currentTime(), 0);
- QCOMPARE(a1_s_o3->currentTime(), 0);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 0);
+ QCOMPARE(sequence2->currentLoopTime(), 0);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 0);
+ QCOMPARE(a1_s_o3->currentLoopTime(), 0);
// Current time = 750
group.setCurrentTime(750);
- QCOMPARE(group.currentTime(), 750);
- QCOMPARE(sequence->currentTime(), 750);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a2_s_o1->currentTime(), 0);
+ QCOMPARE(group.currentLoopTime(), 750);
+ QCOMPARE(sequence->currentLoopTime(), 750);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 0);
QCOMPARE(a2_s_o1->currentLoop(), 2);
- QCOMPARE(a3_s_o1->currentTime(), 0);
- QCOMPARE(sequence2->currentTime(), 0);
- QCOMPARE(a1_s_o2->currentTime(), 0);
- QCOMPARE(a1_s_o3->currentTime(), 0);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 0);
+ QCOMPARE(sequence2->currentLoopTime(), 0);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 0);
+ QCOMPARE(a1_s_o3->currentLoopTime(), 0);
// Current time = 1000
group.setCurrentTime(1000);
- QCOMPARE(group.currentTime(), 1000);
- QCOMPARE(sequence->currentTime(), 1000);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a2_s_o1->currentTime(), 250);
+ QCOMPARE(group.currentLoopTime(), 1000);
+ QCOMPARE(sequence->currentLoopTime(), 1000);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 250);
QCOMPARE(a2_s_o1->currentLoop(), 2);
- QCOMPARE(a3_s_o1->currentTime(), 0);
- QCOMPARE(sequence2->currentTime(), 0);
- QCOMPARE(a1_s_o2->currentTime(), 0);
- QCOMPARE(a1_s_o3->currentTime(), 0);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 0);
+ QCOMPARE(sequence2->currentLoopTime(), 0);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 0);
+ QCOMPARE(a1_s_o3->currentLoopTime(), 0);
// Current time = 1010
group.setCurrentTime(1010);
- QCOMPARE(group.currentTime(), 1010);
- QCOMPARE(sequence->currentTime(), 1010);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a2_s_o1->currentTime(), 250);
+ QCOMPARE(group.currentLoopTime(), 1010);
+ QCOMPARE(sequence->currentLoopTime(), 1010);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 250);
QCOMPARE(a2_s_o1->currentLoop(), 2);
- QCOMPARE(a3_s_o1->currentTime(), 10);
- QCOMPARE(sequence2->currentTime(), 0);
- QCOMPARE(a1_s_o2->currentTime(), 0);
- QCOMPARE(a1_s_o3->currentTime(), 0);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 10);
+ QCOMPARE(sequence2->currentLoopTime(), 0);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 0);
+ QCOMPARE(a1_s_o3->currentLoopTime(), 0);
// Current time = 1250
group.setCurrentTime(1250);
- QCOMPARE(group.currentTime(), 1250);
- QCOMPARE(sequence->currentTime(), 1250);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a2_s_o1->currentTime(), 250);
+ QCOMPARE(group.currentLoopTime(), 1250);
+ QCOMPARE(sequence->currentLoopTime(), 1250);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 250);
QCOMPARE(a2_s_o1->currentLoop(), 2);
- QCOMPARE(a3_s_o1->currentTime(), 250);
- QCOMPARE(sequence2->currentTime(), 0);
- QCOMPARE(a1_s_o2->currentTime(), 0);
- QCOMPARE(a1_s_o3->currentTime(), 0);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 250);
+ QCOMPARE(sequence2->currentLoopTime(), 0);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 0);
+ QCOMPARE(a1_s_o3->currentLoopTime(), 0);
// Current time = 1500
group.setCurrentTime(1500);
- QCOMPARE(group.currentTime(), 1500);
- QCOMPARE(sequence->currentTime(), 1250);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a2_s_o1->currentTime(), 250);
+ QCOMPARE(group.currentLoopTime(), 1500);
+ QCOMPARE(sequence->currentLoopTime(), 1250);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 250);
QCOMPARE(a2_s_o1->currentLoop(), 2);
- QCOMPARE(a3_s_o1->currentTime(), 250);
- QCOMPARE(sequence2->currentTime(), 250);
- QCOMPARE(a1_s_o2->currentTime(), 250);
- QCOMPARE(a1_s_o3->currentTime(), 0);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 250);
+ QCOMPARE(sequence2->currentLoopTime(), 250);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 250);
+ QCOMPARE(a1_s_o3->currentLoopTime(), 0);
// Current time = 1750
group.setCurrentTime(1750);
- QCOMPARE(group.currentTime(), 1750);
- QCOMPARE(sequence->currentTime(), 1250);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a2_s_o1->currentTime(), 250);
+ QCOMPARE(group.currentLoopTime(), 1750);
+ QCOMPARE(sequence->currentLoopTime(), 1250);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 250);
QCOMPARE(a2_s_o1->currentLoop(), 2);
- QCOMPARE(a3_s_o1->currentTime(), 250);
- QCOMPARE(sequence2->currentTime(), 500);
- QCOMPARE(a1_s_o2->currentTime(), 250);
- QCOMPARE(a1_s_o3->currentTime(), 250);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 250);
+ QCOMPARE(sequence2->currentLoopTime(), 500);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 250);
+ QCOMPARE(a1_s_o3->currentLoopTime(), 250);
// Current time = 2000
group.setCurrentTime(2000);
- QCOMPARE(group.currentTime(), 1750);
- QCOMPARE(sequence->currentTime(), 1250);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a2_s_o1->currentTime(), 250);
+ QCOMPARE(group.currentLoopTime(), 1750);
+ QCOMPARE(sequence->currentLoopTime(), 1250);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 250);
QCOMPARE(a2_s_o1->currentLoop(), 2);
- QCOMPARE(a3_s_o1->currentTime(), 250);
- QCOMPARE(sequence2->currentTime(), 500);
- QCOMPARE(a1_s_o2->currentTime(), 250);
- QCOMPARE(a1_s_o3->currentTime(), 250);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 250);
+ QCOMPARE(sequence2->currentLoopTime(), 500);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 250);
+ QCOMPARE(a1_s_o3->currentLoopTime(), 250);
}
void tst_QSequentialAnimationGroup::setCurrentTimeWithUncontrolledAnimation()
@@ -357,40 +357,40 @@ void tst_QSequentialAnimationGroup::setCurrentTimeWithUncontrolledAnimation()
QCOMPARE(notTimeDriven->state(), QAnimationGroup::Stopped);
QCOMPARE(loopsForever->state(), QAnimationGroup::Stopped);
- QCOMPARE(group.currentTime(), 1);
- QCOMPARE(sequence->currentTime(), 1);
- QCOMPARE(a1_s_o1->currentTime(), 1);
- QCOMPARE(a1_s_o2->currentTime(), 0);
- QCOMPARE(notTimeDriven->currentTime(), 0);
- QCOMPARE(loopsForever->currentTime(), 0);
+ QCOMPARE(group.currentLoopTime(), 1);
+ QCOMPARE(sequence->currentLoopTime(), 1);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 1);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 0);
+ QCOMPARE(notTimeDriven->currentLoopTime(), 0);
+ QCOMPARE(loopsForever->currentLoopTime(), 0);
// Current time = 250
group.setCurrentTime(250);
- QCOMPARE(group.currentTime(), 250);
- QCOMPARE(sequence->currentTime(), 250);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a1_s_o2->currentTime(), 0);
- QCOMPARE(notTimeDriven->currentTime(), 0);
- QCOMPARE(loopsForever->currentTime(), 0);
+ QCOMPARE(group.currentLoopTime(), 250);
+ QCOMPARE(sequence->currentLoopTime(), 250);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 0);
+ QCOMPARE(notTimeDriven->currentLoopTime(), 0);
+ QCOMPARE(loopsForever->currentLoopTime(), 0);
// Current time = 500
group.setCurrentTime(500);
- QCOMPARE(group.currentTime(), 500);
- QCOMPARE(sequence->currentTime(), 500);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a1_s_o2->currentTime(), 250);
- QCOMPARE(notTimeDriven->currentTime(), 0);
- QCOMPARE(loopsForever->currentTime(), 0);
+ QCOMPARE(group.currentLoopTime(), 500);
+ QCOMPARE(sequence->currentLoopTime(), 500);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 250);
+ QCOMPARE(notTimeDriven->currentLoopTime(), 0);
+ QCOMPARE(loopsForever->currentLoopTime(), 0);
QCOMPARE(group.currentAnimation(), notTimeDriven);
// Current time = 505
group.setCurrentTime(505);
- QCOMPARE(group.currentTime(), 505);
- QCOMPARE(sequence->currentTime(), 500);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a1_s_o2->currentTime(), 250);
- QCOMPARE(notTimeDriven->currentTime(), 5);
- QCOMPARE(loopsForever->currentTime(), 0);
+ QCOMPARE(group.currentLoopTime(), 505);
+ QCOMPARE(sequence->currentLoopTime(), 500);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 250);
+ QCOMPARE(notTimeDriven->currentLoopTime(), 5);
+ QCOMPARE(loopsForever->currentLoopTime(), 0);
QCOMPARE(group.currentAnimation(), notTimeDriven);
QCOMPARE(sequence->state(), QAnimationGroup::Stopped);
QCOMPARE(a1_s_o1->state(), QAnimationGroup::Stopped);
@@ -400,12 +400,12 @@ void tst_QSequentialAnimationGroup::setCurrentTimeWithUncontrolledAnimation()
// Current time = 750 (end of notTimeDriven animation)
group.setCurrentTime(750);
- QCOMPARE(group.currentTime(), 750);
- QCOMPARE(sequence->currentTime(), 500);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a1_s_o2->currentTime(), 250);
- QCOMPARE(notTimeDriven->currentTime(), 250);
- QCOMPARE(loopsForever->currentTime(), 0);
+ QCOMPARE(group.currentLoopTime(), 750);
+ QCOMPARE(sequence->currentLoopTime(), 500);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 250);
+ QCOMPARE(notTimeDriven->currentLoopTime(), 250);
+ QCOMPARE(loopsForever->currentLoopTime(), 0);
QCOMPARE(group.currentAnimation(), loopsForever);
QCOMPARE(sequence->state(), QAnimationGroup::Stopped);
QCOMPARE(a1_s_o1->state(), QAnimationGroup::Stopped);
@@ -415,13 +415,13 @@ void tst_QSequentialAnimationGroup::setCurrentTimeWithUncontrolledAnimation()
// Current time = 800 (as notTimeDriven was finished at 750, loopsforever should still run)
group.setCurrentTime(800);
- QCOMPARE(group.currentTime(), 800);
+ QCOMPARE(group.currentLoopTime(), 800);
QCOMPARE(group.currentAnimation(), loopsForever);
- QCOMPARE(sequence->currentTime(), 500);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a1_s_o2->currentTime(), 250);
- QCOMPARE(notTimeDriven->currentTime(), 250);
- QCOMPARE(loopsForever->currentTime(), 50);
+ QCOMPARE(sequence->currentLoopTime(), 500);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 250);
+ QCOMPARE(notTimeDriven->currentLoopTime(), 250);
+ QCOMPARE(loopsForever->currentLoopTime(), 50);
loopsForever->stop(); // this should stop the group
@@ -466,26 +466,26 @@ void tst_QSequentialAnimationGroup::seekingForwards()
QCOMPARE(a1_s_o2->state(), QAnimationGroup::Stopped);
QCOMPARE(a1_s_o3->state(), QAnimationGroup::Stopped);
- QCOMPARE(group.currentTime(), 1);
- QCOMPARE(sequence->currentTime(), 1);
- QCOMPARE(a1_s_o1->currentTime(), 1);
- QCOMPARE(a2_s_o1->currentTime(), 0);
- QCOMPARE(a3_s_o1->currentTime(), 0);
- QCOMPARE(sequence2->currentTime(), 0);
- QCOMPARE(a1_s_o2->currentTime(), 0);
- QCOMPARE(a1_s_o3->currentTime(), 0);
+ QCOMPARE(group.currentLoopTime(), 1);
+ QCOMPARE(sequence->currentLoopTime(), 1);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 1);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 0);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 0);
+ QCOMPARE(sequence2->currentLoopTime(), 0);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 0);
+ QCOMPARE(a1_s_o3->currentLoopTime(), 0);
// Current time = 1500
group.setCurrentTime(1500);
- QCOMPARE(group.currentTime(), 1500);
- QCOMPARE(sequence->currentTime(), 1250);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a2_s_o1->currentTime(), 250);
+ QCOMPARE(group.currentLoopTime(), 1500);
+ QCOMPARE(sequence->currentLoopTime(), 1250);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 250);
QCOMPARE(a2_s_o1->currentLoop(), 2);
- QCOMPARE(a3_s_o1->currentTime(), 250);
- QCOMPARE(sequence2->currentTime(), 250);
- QCOMPARE(a1_s_o2->currentTime(), 250);
- QCOMPARE(a1_s_o3->currentTime(), 0);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 250);
+ QCOMPARE(sequence2->currentLoopTime(), 250);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 250);
+ QCOMPARE(a1_s_o3->currentLoopTime(), 0);
// this will restart the group
group.start();
@@ -499,15 +499,15 @@ void tst_QSequentialAnimationGroup::seekingForwards()
// Current time = 1750
group.setCurrentTime(1750);
- QCOMPARE(group.currentTime(), 1750);
- QCOMPARE(sequence->currentTime(), 1250);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a2_s_o1->currentTime(), 250);
+ QCOMPARE(group.currentLoopTime(), 1750);
+ QCOMPARE(sequence->currentLoopTime(), 1250);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 250);
QCOMPARE(a2_s_o1->currentLoop(), 2);
- QCOMPARE(a3_s_o1->currentTime(), 250);
- QCOMPARE(sequence2->currentTime(), 500);
- QCOMPARE(a1_s_o2->currentTime(), 250);
- QCOMPARE(a1_s_o3->currentTime(), 250);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 250);
+ QCOMPARE(sequence2->currentLoopTime(), 500);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 250);
+ QCOMPARE(a1_s_o3->currentLoopTime(), 250);
}
void tst_QSequentialAnimationGroup::seekingBackwards()
@@ -537,15 +537,15 @@ void tst_QSequentialAnimationGroup::seekingBackwards()
// Current time = 1600
group.setCurrentTime(1600);
- QCOMPARE(group.currentTime(), 1600);
- QCOMPARE(sequence->currentTime(), 1250);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a2_s_o1->currentTime(), 250);
+ QCOMPARE(group.currentLoopTime(), 1600);
+ QCOMPARE(sequence->currentLoopTime(), 1250);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 250);
QCOMPARE(a2_s_o1->currentLoop(), 2);
- QCOMPARE(a3_s_o1->currentTime(), 250);
- QCOMPARE(sequence2->currentTime(), 350);
- QCOMPARE(a1_s_o2->currentTime(), 250);
- QCOMPARE(a1_s_o3->currentTime(), 100);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 250);
+ QCOMPARE(sequence2->currentLoopTime(), 350);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 250);
+ QCOMPARE(a1_s_o3->currentLoopTime(), 100);
QCOMPARE(group.state(), QAnimationGroup::Running);
QCOMPARE(sequence->state(), QAnimationGroup::Stopped);
@@ -556,22 +556,22 @@ void tst_QSequentialAnimationGroup::seekingBackwards()
// Seeking backwards, current time = 1
group.setCurrentTime(1);
- QCOMPARE(group.currentTime(), 1);
- QCOMPARE(sequence->currentTime(), 1);
- QCOMPARE(a1_s_o1->currentTime(), 1);
+ QCOMPARE(group.currentLoopTime(), 1);
+ QCOMPARE(sequence->currentLoopTime(), 1);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 1);
QEXPECT_FAIL("", "rewinding in nested groups is considered as a restart from the children,"
"hence they don't reset from their current animation", Continue);
- QCOMPARE(a2_s_o1->currentTime(), 0);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 0);
QEXPECT_FAIL("", "rewinding in nested groups is considered as a restart from the children,"
"hence they don't reset from their current animation", Continue);
QCOMPARE(a2_s_o1->currentLoop(), 0);
QEXPECT_FAIL("", "rewinding in nested groups is considered as a restart from the children,"
"hence they don't reset from their current animation", Continue);
- QCOMPARE(a3_s_o1->currentTime(), 0);
- QCOMPARE(sequence2->currentTime(), 0);
- QCOMPARE(a1_s_o2->currentTime(), 0);
- QCOMPARE(a1_s_o3->currentTime(), 0);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 0);
+ QCOMPARE(sequence2->currentLoopTime(), 0);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 0);
+ QCOMPARE(a1_s_o3->currentLoopTime(), 0);
QCOMPARE(group.state(), QAnimationGroup::Running);
QCOMPARE(sequence->state(), QAnimationGroup::Running);
@@ -582,15 +582,15 @@ void tst_QSequentialAnimationGroup::seekingBackwards()
// Current time = 2000
group.setCurrentTime(2000);
- QCOMPARE(group.currentTime(), 1750);
- QCOMPARE(sequence->currentTime(), 1250);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a2_s_o1->currentTime(), 250);
+ QCOMPARE(group.currentLoopTime(), 1750);
+ QCOMPARE(sequence->currentLoopTime(), 1250);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 250);
QCOMPARE(a2_s_o1->currentLoop(), 2);
- QCOMPARE(a3_s_o1->currentTime(), 250);
- QCOMPARE(sequence2->currentTime(), 500);
- QCOMPARE(a1_s_o2->currentTime(), 250);
- QCOMPARE(a1_s_o3->currentTime(), 250);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 250);
+ QCOMPARE(sequence2->currentLoopTime(), 500);
+ QCOMPARE(a1_s_o2->currentLoopTime(), 250);
+ QCOMPARE(a1_s_o3->currentLoopTime(), 250);
QCOMPARE(group.state(), QAnimationGroup::Stopped);
QCOMPARE(sequence->state(), QAnimationGroup::Stopped);
@@ -612,7 +612,7 @@ static bool compareStates(const QSignalSpy& spy, const StateList &expectedStates
}
QList<QVariant> args = spy.at(i);
QAbstractAnimation::State st = expectedStates.at(i);
- QAbstractAnimation::State actual = qVariantValue<QAbstractAnimation::State>(args.value(1));
+ QAbstractAnimation::State actual = qVariantValue<QAbstractAnimation::State>(args.first());
if (equals && actual != st) {
equals = false;
break;
@@ -672,14 +672,14 @@ void tst_QSequentialAnimationGroup::pauseAndResume()
// Current time = 1751
group.setCurrentTime(1751);
- QCOMPARE(group.currentTime(), 1751);
- QCOMPARE(sequence->currentTime(), 751);
+ QCOMPARE(group.currentLoopTime(), 1751);
+ QCOMPARE(sequence->currentLoopTime(), 751);
QCOMPARE(sequence->currentLoop(), 1);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a2_s_o1->currentTime(), 250);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 250);
QCOMPARE(a2_s_o1->currentLoop(), 1);
QCOMPARE(a3_s_o1->currentLoop(), 0);
- QCOMPARE(a3_s_o1->currentTime(), 1);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 1);
QCOMPARE(group.state(), QAnimationGroup::Paused);
QCOMPARE(sequence->state(), QAnimationGroup::Paused);
@@ -696,20 +696,20 @@ void tst_QSequentialAnimationGroup::pauseAndResume()
<< QAbstractAnimation::Running
<< QAbstractAnimation::Stopped)));
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(a1StateChangedSpy.at(0).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(a1StateChangedSpy.at(0).first()),
QAnimationGroup::Running);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(a1StateChangedSpy.at(1).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(a1StateChangedSpy.at(1).first()),
QAnimationGroup::Paused);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(a1StateChangedSpy.at(2).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(a1StateChangedSpy.at(2).first()),
QAnimationGroup::Stopped);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(a1StateChangedSpy.at(3).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(a1StateChangedSpy.at(3).first()),
QAnimationGroup::Running);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(a1StateChangedSpy.at(4).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(a1StateChangedSpy.at(4).first()),
QAnimationGroup::Stopped);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(seqStateChangedSpy.at(0).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(seqStateChangedSpy.at(0).first()),
QAnimationGroup::Running);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(seqStateChangedSpy.at(1).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(seqStateChangedSpy.at(1).first()),
QAnimationGroup::Paused);
group.resume();
@@ -720,17 +720,17 @@ void tst_QSequentialAnimationGroup::pauseAndResume()
QCOMPARE(a2_s_o1->state(), QAnimationGroup::Stopped);
QCOMPARE(a3_s_o1->state(), QAnimationGroup::Running);
- QVERIFY(group.currentTime() >= 1751);
- QVERIFY(sequence->currentTime() >= 751);
+ QVERIFY(group.currentLoopTime() >= 1751);
+ QVERIFY(sequence->currentLoopTime() >= 751);
QCOMPARE(sequence->currentLoop(), 1);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a2_s_o1->currentTime(), 250);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 250);
QCOMPARE(a2_s_o1->currentLoop(), 1);
QCOMPARE(a3_s_o1->currentLoop(), 0);
- QVERIFY(a3_s_o1->currentTime() >= 1);
+ QVERIFY(a3_s_o1->currentLoopTime() >= 1);
QCOMPARE(seqStateChangedSpy.count(), 3); // Running,Paused,Running
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(seqStateChangedSpy.at(2).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(seqStateChangedSpy.at(2).first()),
QAnimationGroup::Running);
group.pause();
@@ -741,23 +741,23 @@ void tst_QSequentialAnimationGroup::pauseAndResume()
QCOMPARE(a2_s_o1->state(), QAnimationGroup::Stopped);
QCOMPARE(a3_s_o1->state(), QAnimationGroup::Paused);
- QVERIFY(group.currentTime() >= 1751);
- QVERIFY(sequence->currentTime() >= 751);
+ QVERIFY(group.currentLoopTime() >= 1751);
+ QVERIFY(sequence->currentLoopTime() >= 751);
QCOMPARE(sequence->currentLoop(), 1);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a2_s_o1->currentTime(), 250);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 250);
QCOMPARE(a2_s_o1->currentLoop(), 1);
QCOMPARE(a3_s_o1->currentLoop(), 0);
- QVERIFY(a3_s_o1->currentTime() >= 1);
+ QVERIFY(a3_s_o1->currentLoopTime() >= 1);
QCOMPARE(seqStateChangedSpy.count(), 4); // Running,Paused,Running,Paused
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(seqStateChangedSpy.at(3).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(seqStateChangedSpy.at(3).first()),
QAnimationGroup::Paused);
group.stop();
QCOMPARE(seqStateChangedSpy.count(), 5); // Running,Paused,Running,Paused,Stopped
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(seqStateChangedSpy.at(4).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(seqStateChangedSpy.at(4).first()),
QAnimationGroup::Stopped);
}
@@ -797,20 +797,20 @@ void tst_QSequentialAnimationGroup::restart()
for (int i = 0; i < 3; i++) {
QCOMPARE(animsStateChanged[i]->count(), 4);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(animsStateChanged[i]->at(0).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(animsStateChanged[i]->at(0).first()),
QAnimationGroup::Running);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(animsStateChanged[i]->at(1).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(animsStateChanged[i]->at(1).first()),
QAnimationGroup::Stopped);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(animsStateChanged[i]->at(2).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(animsStateChanged[i]->at(2).first()),
QAnimationGroup::Running);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(animsStateChanged[i]->at(3).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(animsStateChanged[i]->at(3).first()),
QAnimationGroup::Stopped);
}
QCOMPARE(seqStateChangedSpy.count(), 2);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(seqStateChangedSpy.at(0).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(seqStateChangedSpy.at(0).first()),
QAnimationGroup::Running);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(seqStateChangedSpy.at(1).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(seqStateChangedSpy.at(1).first()),
QAnimationGroup::Stopped);
QCOMPARE(seqCurrentAnimChangedSpy.count(), 6);
@@ -855,15 +855,15 @@ void tst_QSequentialAnimationGroup::looping()
// Current time = 1750
group.setCurrentTime(1750);
- QCOMPARE(group.currentTime(), 1750);
- QCOMPARE(sequence->currentTime(), 750);
+ QCOMPARE(group.currentLoopTime(), 1750);
+ QCOMPARE(sequence->currentLoopTime(), 750);
QCOMPARE(sequence->currentLoop(), 1);
- QCOMPARE(a1_s_o1->currentTime(), 250);
- QCOMPARE(a2_s_o1->currentTime(), 250);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 250);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 250);
QCOMPARE(a2_s_o1->currentLoop(), 1);
// this animation is at the beginning because it is the current one inside sequence
QCOMPARE(a3_s_o1->currentLoop(), 0);
- QCOMPARE(a3_s_o1->currentTime(), 0);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 0);
QCOMPARE(sequence->currentAnimation(), a3_s_o1);
QCOMPARE(group.state(), QAnimationGroup::Paused);
@@ -890,16 +890,16 @@ void tst_QSequentialAnimationGroup::looping()
// Looping, current time = duration + 1
group.setCurrentTime(group.duration() + 1);
- QCOMPARE(group.currentTime(), 1);
+ QCOMPARE(group.currentLoopTime(), 1);
QCOMPARE(group.currentLoop(), 1);
- QCOMPARE(sequence->currentTime(), 1);
+ QCOMPARE(sequence->currentLoopTime(), 1);
QCOMPARE(sequence->currentLoop(), 0);
- QCOMPARE(a1_s_o1->currentTime(), 1);
- QCOMPARE(a2_s_o1->currentTime(), 250);
+ QCOMPARE(a1_s_o1->currentLoopTime(), 1);
+ QCOMPARE(a2_s_o1->currentLoopTime(), 250);
QCOMPARE(a2_s_o1->currentLoop(), 1);
// this animation is at the end because it was run on the previous loop
QCOMPARE(a3_s_o1->currentLoop(), 0);
- QCOMPARE(a3_s_o1->currentTime(), 250);
+ QCOMPARE(a3_s_o1->currentLoopTime(), 250);
QCOMPARE(group.state(), QAnimationGroup::Paused);
QCOMPARE(sequence->state(), QAnimationGroup::Paused);
@@ -934,7 +934,7 @@ void tst_QSequentialAnimationGroup::startDelay()
QTest::qWait(500);
- QVERIFY(group.currentTime() == 375);
+ QVERIFY(group.currentLoopTime() == 375);
QCOMPARE(group.state(), QAnimationGroup::Stopped);
}
@@ -958,9 +958,9 @@ void tst_QSequentialAnimationGroup::clearGroup()
children[i] = group.animationAt(i);
}
- group.clearAnimations();
+ group.clear();
QCOMPARE(group.animationCount(), 0);
- QCOMPARE(group.currentTime(), 0);
+ QCOMPARE(group.currentLoopTime(), 0);
for (int i = 0; i < animationCount; ++i)
QVERIFY(children[i].isNull());
}
@@ -1130,9 +1130,9 @@ void tst_QSequentialAnimationGroup::updateChildrenWithRunningGroup()
QCOMPARE(groupStateChangedSpy.count(), 1);
QCOMPARE(childStateChangedSpy.count(), 1);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(groupStateChangedSpy.at(0).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(groupStateChangedSpy.at(0).first()),
QAnimationGroup::Running);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(childStateChangedSpy.at(0).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(childStateChangedSpy.at(0).first()),
QAnimationGroup::Running);
// starting directly a running child will not have any effect
@@ -1171,13 +1171,13 @@ void tst_QSequentialAnimationGroup::deleteChildrenWithRunningGroup()
QCOMPARE(anim1->state(), QAnimationGroup::Running);
QTest::qWait(100);
- QVERIFY(group.currentTime() > 0);
+ QVERIFY(group.currentLoopTime() > 0);
delete anim1;
QCOMPARE(group.animationCount(), 0);
QCOMPARE(group.duration(), 0);
QCOMPARE(group.state(), QAnimationGroup::Stopped);
- QCOMPARE(group.currentTime(), 0); //that's the invariant
+ QCOMPARE(group.currentLoopTime(), 0); //that's the invariant
}
void tst_QSequentialAnimationGroup::startChildrenWithStoppedGroup()
@@ -1320,9 +1320,9 @@ void tst_QSequentialAnimationGroup::startGroupWithRunningChild()
QCOMPARE(anim2->state(), QAnimationGroup::Running);
QCOMPARE(stateChangedSpy2.count(), 4);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy2.at(2).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy2.at(2).first()),
QAnimationGroup::Stopped);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy2.at(3).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy2.at(3).first()),
QAnimationGroup::Running);
group.stop();
@@ -1359,9 +1359,9 @@ void tst_QSequentialAnimationGroup::zeroDurationAnimation()
group.start();
QCOMPARE(stateChangedSpy.count(), 2);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy.at(0).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy.at(0).first()),
QAnimationGroup::Running);
- QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy.at(1).at(1)),
+ QCOMPARE(qVariantValue<QAbstractAnimation::State>(stateChangedSpy.at(1).first()),
QAnimationGroup::Stopped);
QCOMPARE(anim1->state(), QAnimationGroup::Stopped);
@@ -1426,14 +1426,14 @@ void tst_QSequentialAnimationGroup::finishWithUncontrolledAnimation()
group.start();
QCOMPARE(group.state(), QAnimationGroup::Running);
QCOMPARE(notTimeDriven.state(), QAnimationGroup::Running);
- QCOMPARE(group.currentTime(), 0);
- QCOMPARE(notTimeDriven.currentTime(), 0);
+ QCOMPARE(group.currentLoopTime(), 0);
+ QCOMPARE(notTimeDriven.currentLoopTime(), 0);
QTest::qWait(300); //wait for the end of notTimeDriven
QCOMPARE(notTimeDriven.state(), QAnimationGroup::Stopped);
- const int actualDuration = notTimeDriven.currentTime();
+ const int actualDuration = notTimeDriven.currentLoopTime();
QCOMPARE(group.state(), QAnimationGroup::Stopped);
- QCOMPARE(group.currentTime(), actualDuration);
+ QCOMPARE(group.currentLoopTime(), actualDuration);
QCOMPARE(spy.count(), 1);
//2nd case:
@@ -1444,7 +1444,7 @@ void tst_QSequentialAnimationGroup::finishWithUncontrolledAnimation()
group.setCurrentTime(300);
QCOMPARE(group.state(), QAnimationGroup::Stopped);
- QCOMPARE(notTimeDriven.currentTime(), actualDuration);
+ QCOMPARE(notTimeDriven.currentLoopTime(), actualDuration);
QCOMPARE(group.currentAnimation(), static_cast<QAbstractAnimation*>(&anim));
//3rd case:
@@ -1453,8 +1453,8 @@ void tst_QSequentialAnimationGroup::finishWithUncontrolledAnimation()
group.start();
QCOMPARE(group.state(), QAnimationGroup::Running);
QCOMPARE(notTimeDriven.state(), QAnimationGroup::Running);
- QCOMPARE(group.currentTime(), 0);
- QCOMPARE(notTimeDriven.currentTime(), 0);
+ QCOMPARE(group.currentLoopTime(), 0);
+ QCOMPARE(notTimeDriven.currentLoopTime(), 0);
QCOMPARE(animStateChangedSpy.count(), 0);
@@ -1467,12 +1467,12 @@ void tst_QSequentialAnimationGroup::finishWithUncontrolledAnimation()
QTest::qWait(300); //wait for the end of anim
QCOMPARE(anim.state(), QAnimationGroup::Stopped);
- QCOMPARE(anim.currentTime(), anim.duration());
+ QCOMPARE(anim.currentLoopTime(), anim.duration());
//we should simply be at the end
QCOMPARE(spy.count(), 1);
QCOMPARE(animStateChangedSpy.count(), 2);
- QCOMPARE(group.currentTime(), notTimeDriven.currentTime() + anim.currentTime());
+ QCOMPARE(group.currentLoopTime(), notTimeDriven.currentLoopTime() + anim.currentLoopTime());
}
void tst_QSequentialAnimationGroup::addRemoveAnimation()
@@ -1481,48 +1481,48 @@ void tst_QSequentialAnimationGroup::addRemoveAnimation()
QSequentialAnimationGroup group;
QCOMPARE(group.duration(), 0);
- QCOMPARE(group.currentTime(), 0);
+ QCOMPARE(group.currentLoopTime(), 0);
QAbstractAnimation *anim1 = new QPropertyAnimation;
group.addAnimation(anim1);
QCOMPARE(group.duration(), 250);
- QCOMPARE(group.currentTime(), 0);
+ QCOMPARE(group.currentLoopTime(), 0);
QCOMPARE(group.currentAnimation(), anim1);
//let's append an animation
QAbstractAnimation *anim2 = new QPropertyAnimation;
group.addAnimation(anim2);
QCOMPARE(group.duration(), 500);
- QCOMPARE(group.currentTime(), 0);
+ QCOMPARE(group.currentLoopTime(), 0);
QCOMPARE(group.currentAnimation(), anim1);
//let's prepend an animation
QAbstractAnimation *anim0 = new QPropertyAnimation;
- group.insertAnimationAt(0, anim0);
+ group.insertAnimation(0, anim0);
QCOMPARE(group.duration(), 750);
- QCOMPARE(group.currentTime(), 0);
+ QCOMPARE(group.currentLoopTime(), 0);
QCOMPARE(group.currentAnimation(), anim0); //anim0 has become the new currentAnimation
group.setCurrentTime(300); //anim0 | anim1 | anim2
- QCOMPARE(group.currentTime(), 300);
+ QCOMPARE(group.currentLoopTime(), 300);
QCOMPARE(group.currentAnimation(), anim1);
- QCOMPARE(anim1->currentTime(), 50);
+ QCOMPARE(anim1->currentLoopTime(), 50);
group.removeAnimation(anim0); //anim1 | anim2
- QCOMPARE(group.currentTime(), 50);
+ QCOMPARE(group.currentLoopTime(), 50);
QCOMPARE(group.currentAnimation(), anim1);
- QCOMPARE(anim1->currentTime(), 50);
+ QCOMPARE(anim1->currentLoopTime(), 50);
group.setCurrentTime(0);
- group.insertAnimationAt(0, anim0); //anim0 | anim1 | anim2
+ group.insertAnimation(0, anim0); //anim0 | anim1 | anim2
group.setCurrentTime(300);
- QCOMPARE(group.currentTime(), 300);
+ QCOMPARE(group.currentLoopTime(), 300);
QCOMPARE(group.currentAnimation(), anim1);
- QCOMPARE(anim1->currentTime(), 50);
+ QCOMPARE(anim1->currentLoopTime(), 50);
group.removeAnimation(anim1); //anim0 | anim2
- QCOMPARE(group.currentTime(), 250);
+ QCOMPARE(group.currentLoopTime(), 250);
QCOMPARE(group.currentAnimation(), anim2);
- QCOMPARE(anim0->currentTime(), 250);
+ QCOMPARE(anim0->currentLoopTime(), 250);
}
void tst_QSequentialAnimationGroup::currentAnimation()
@@ -1595,15 +1595,15 @@ class SequentialAnimationGroup : public QSequentialAnimationGroup
{
Q_OBJECT
public slots:
- void clearAnimations()
+ void clear()
{
- QSequentialAnimationGroup::clearAnimations();
+ QSequentialAnimationGroup::clear();
}
void refill()
{
stop();
- clearAnimations();
+ clear();
new DummyPropertyAnimation(this);
start();
}
@@ -1611,11 +1611,11 @@ public slots:
};
-void tst_QSequentialAnimationGroup::clearAnimations()
+void tst_QSequentialAnimationGroup::clear()
{
SequentialAnimationGroup group;
QPointer<QAbstractAnimation> anim1 = new DummyPropertyAnimation(&group);
- group.connect(anim1, SIGNAL(finished()), SLOT(clearAnimations()));
+ group.connect(anim1, SIGNAL(finished()), SLOT(clear()));
new DummyPropertyAnimation(&group);
QCOMPARE(group.animationCount(), 2);
@@ -1623,7 +1623,7 @@ void tst_QSequentialAnimationGroup::clearAnimations()
QTest::qWait(anim1->duration() + 100);
QCOMPARE(group.animationCount(), 0);
QCOMPARE(group.state(), QAbstractAnimation::Stopped);
- QCOMPARE(group.currentTime(), 0);
+ QCOMPARE(group.currentLoopTime(), 0);
anim1 = new DummyPropertyAnimation(&group);
group.connect(anim1, SIGNAL(finished()), SLOT(refill()));
@@ -1649,22 +1649,22 @@ void tst_QSequentialAnimationGroup::pauseResume()
QCOMPARE(anim->state(), QAnimationGroup::Running);
QCOMPARE(spy.count(), 1);
spy.clear();
- const int currentTime = group.currentTime();
- QCOMPARE(anim->currentTime(), currentTime);
+ const int currentTime = group.currentLoopTime();
+ QCOMPARE(anim->currentLoopTime(), currentTime);
group.pause();
QCOMPARE(group.state(), QAnimationGroup::Paused);
- QCOMPARE(group.currentTime(), currentTime);
+ QCOMPARE(group.currentLoopTime(), currentTime);
QCOMPARE(anim->state(), QAnimationGroup::Paused);
- QCOMPARE(anim->currentTime(), currentTime);
+ QCOMPARE(anim->currentLoopTime(), currentTime);
QCOMPARE(spy.count(), 1);
spy.clear();
group.resume();
QCOMPARE(group.state(), QAnimationGroup::Running);
- QCOMPARE(group.currentTime(), currentTime);
+ QCOMPARE(group.currentLoopTime(), currentTime);
QCOMPARE(anim->state(), QAnimationGroup::Running);
- QCOMPARE(anim->currentTime(), currentTime);
+ QCOMPARE(anim->currentLoopTime(), currentTime);
QCOMPARE(spy.count(), 1);
}
diff --git a/tests/auto/qsqlquery/tst_qsqlquery.cpp b/tests/auto/qsqlquery/tst_qsqlquery.cpp
index 4d9e50fab4..4264a70283 100644
--- a/tests/auto/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/qsqlquery/tst_qsqlquery.cpp
@@ -193,9 +193,13 @@ private slots:
void sqlServerReturn0_data() { generic_data(); }
void sqlServerReturn0();
+
void QTBUG_551_data() { generic_data("QOCI"); }
void QTBUG_551();
+ void QTBUG_5251_data() { generic_data("QPSQL"); }
+ void QTBUG_5251();
+
private:
// returns all database connections
void generic_data(const QString &engine=QString());
@@ -2901,5 +2905,35 @@ void tst_QSqlQuery::QTBUG_551()
QCOMPARE(res_outLst[2].toString(), QLatin1String("3. Value is 2"));
}
+void tst_QSqlQuery::QTBUG_5251()
+{
+ QFETCH( QString, dbName );
+ QSqlDatabase db = QSqlDatabase::database( dbName );
+ CHECK_DATABASE( db );
+
+ if (!db.driverName().startsWith( "QPSQL" )) return;
+
+ QSqlQuery q(db);
+ q.exec("DROP TABLE " + qTableName("timetest"));
+ QVERIFY_SQL(q, exec("CREATE TABLE " + qTableName("timetest") + " (t TIME)"));
+ QVERIFY_SQL(q, exec("INSERT INTO " + qTableName("timetest") + " VALUES ('1:2:3.666')"));
+
+ QSqlTableModel timetestModel(0,db);
+ timetestModel.setEditStrategy(QSqlTableModel::OnManualSubmit);
+ timetestModel.setTable(qTableName("timetest"));
+ QVERIFY_SQL(timetestModel, select());
+
+ QCOMPARE(timetestModel.record(0).field(0).value().toTime().toString("HH:mm:ss.zzz"), QString("01:02:03.666"));
+ QVERIFY_SQL(timetestModel,setData(timetestModel.index(0, 0), QTime(0,12,34,500)));
+ QCOMPARE(timetestModel.record(0).field(0).value().toTime().toString("HH:mm:ss.zzz"), QString("00:12:34.500"));
+ QVERIFY_SQL(timetestModel, submitAll());
+ QCOMPARE(timetestModel.record(0).field(0).value().toTime().toString("HH:mm:ss.zzz"), QString("00:12:34.500"));
+
+ QVERIFY_SQL(q, exec("UPDATE " + qTableName("timetest") + " SET t = '0:11:22.33'"));
+ QVERIFY_SQL(timetestModel, select());
+ QCOMPARE(timetestModel.record(0).field(0).value().toTime().toString("HH:mm:ss.zzz"), QString("00:11:22.330"));
+
+}
+
QTEST_MAIN( tst_QSqlQuery )
#include "tst_qsqlquery.moc"
diff --git a/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp b/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
index e045c1021f..8c840cd1d5 100644
--- a/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
+++ b/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
@@ -184,8 +184,8 @@ void tst_QSqlRelationalTableModel::dropTestTables( QSqlDatabase db )
<< qTableName("casetest1" );
tst_Databases::safeDropTables( db, tableNames );
- db.exec("DROP SCHEMA "+qTableName("QTBUG_5373"));
- db.exec("DROP SCHEMA "+qTableName("QTBUG_5373_s2"));
+ db.exec("DROP SCHEMA "+qTableName("QTBUG_5373")+" CASCADE");
+ db.exec("DROP SCHEMA "+qTableName("QTBUG_5373_s2")+" CASCADE");
}
void tst_QSqlRelationalTableModel::init()
diff --git a/tests/auto/qstatemachine/tst_qstatemachine.cpp b/tests/auto/qstatemachine/tst_qstatemachine.cpp
index 9a2b2edf1a..fd39515a98 100644
--- a/tests/auto/qstatemachine/tst_qstatemachine.cpp
+++ b/tests/auto/qstatemachine/tst_qstatemachine.cpp
@@ -208,6 +208,7 @@ private slots:
void task260403_clonedSignals();
void postEventFromOtherThread();
+ void eventFilterForApplication();
};
tst_QStateMachine::tst_QStateMachine()
@@ -4276,5 +4277,35 @@ void tst_QStateMachine::postEventFromOtherThread()
QTRY_COMPARE(finishedSpy.count(), 1);
}
+void tst_QStateMachine::eventFilterForApplication()
+{
+ QStateMachine machine;
+
+ QState *s1 = new QState(&machine);
+ {
+ machine.setInitialState(s1);
+ }
+
+ QState *s2 = new QState(&machine);
+
+ QEventTransition *transition = new QEventTransition(QCoreApplication::instance(),
+ QEvent::ApplicationActivate);
+ transition->setTargetState(s2);
+ s1->addTransition(transition);
+
+ machine.start();
+ QCoreApplication::processEvents();
+
+ QCOMPARE(machine.configuration().size(), 1);
+ QVERIFY(machine.configuration().contains(s1));
+
+ QCoreApplication::postEvent(QCoreApplication::instance(),
+ new QEvent(QEvent::ApplicationActivate));
+ QCoreApplication::processEvents();
+
+ QCOMPARE(machine.configuration().size(), 1);
+ QVERIFY(machine.configuration().contains(s2));
+}
+
QTEST_MAIN(tst_QStateMachine)
#include "tst_qstatemachine.moc"
diff --git a/tests/auto/qstringbuilder1/stringbuilder.cpp b/tests/auto/qstringbuilder1/stringbuilder.cpp
index f35d4d20d5..9dc467e5cc 100644
--- a/tests/auto/qstringbuilder1/stringbuilder.cpp
+++ b/tests/auto/qstringbuilder1/stringbuilder.cpp
@@ -41,8 +41,15 @@
#define LITERAL "some literal"
+// "some literal", but replacing all vocals by their umlauted UTF-8 string :)
+#define UTF8_LITERAL "s\xc3\xb6m\xc3\xab l\xc3\xaft\xc3\xabr\xc3\xa4l"
+
void runScenario()
{
+ // set codec for C strings to 0, enforcing Latin1
+ QTextCodec::setCodecForCStrings(0);
+ QVERIFY(!QTextCodec::codecForCStrings());
+
QLatin1Literal l1literal(LITERAL);
QLatin1String l1string(LITERAL);
QString string(l1string);
@@ -75,5 +82,24 @@ void runScenario()
QCOMPARE(r, r2);
r = string P ba;
QCOMPARE(r, r2);
+
+ // now test with codec for C strings set
+ QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
+ QVERIFY(QTextCodec::codecForCStrings());
+ QCOMPARE(QTextCodec::codecForCStrings()->name(), QByteArray("UTF-8"));
+
+ string = QString::fromUtf8(UTF8_LITERAL);
+ r2 = QString::fromUtf8(UTF8_LITERAL UTF8_LITERAL);
+ ba = UTF8_LITERAL;
+
+ r = string P UTF8_LITERAL;
+ QCOMPARE(r.size(), r2.size());
+ QCOMPARE(r, r2);
+ r = UTF8_LITERAL P string;
+ QCOMPARE(r, r2);
+ r = ba P string;
+ QCOMPARE(r, r2);
+ r = string P ba;
+ QCOMPARE(r, r2);
#endif
}
diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp
index 227ca6f254..f571e8a87d 100644
--- a/tests/auto/qtableview/tst_qtableview.cpp
+++ b/tests/auto/qtableview/tst_qtableview.cpp
@@ -197,6 +197,7 @@ private slots:
void task259308_scrollVerticalHeaderSwappedSections();
void task191545_dragSelectRows();
void taskQTBUG_5062_spansInconsistency();
+ void taskQTBUG_4516_clickOnRichTextLabel();
void mouseWheel_data();
void mouseWheel();
@@ -3885,6 +3886,24 @@ void tst_QTableView::taskQTBUG_5062_spansInconsistency()
VERIFY_SPANS_CONSISTENCY(&view);
}
+void tst_QTableView::taskQTBUG_4516_clickOnRichTextLabel()
+{
+ QTableView view;
+ QStandardItemModel model(5,5);
+ view.setModel(&model);
+ QLabel label("rich text");
+ label.setTextFormat(Qt::RichText);
+ view.setIndexWidget(model.index(1,1), &label);
+ view.setCurrentIndex(model.index(0,0));
+ QCOMPARE(view.currentIndex(), model.index(0,0));
+
+ QTest::mouseClick(&label, Qt::LeftButton);
+ QCOMPARE(view.currentIndex(), model.index(1,1));
+
+
+}
+
+
void tst_QTableView::changeHeaderData()
{
QTableView view;
diff --git a/tests/auto/qtextdocument/tst_qtextdocument.cpp b/tests/auto/qtextdocument/tst_qtextdocument.cpp
index 5237438686..1d54409513 100644
--- a/tests/auto/qtextdocument/tst_qtextdocument.cpp
+++ b/tests/auto/qtextdocument/tst_qtextdocument.cpp
@@ -1721,21 +1721,21 @@ void tst_QTextDocument::capitalizationHtmlInExport()
const QString smallcaps = doc->toHtml();
QVERIFY(re.exactMatch(doc->toHtml()));
- QCOMPARE(re.numCaptures(), 1);
+ QCOMPARE(re.captureCount(), 1);
QCOMPARE(re.cap(1).trimmed(), QString("font-variant:small-caps;"));
cf.setFontCapitalization(QFont::AllUppercase);
cursor.mergeCharFormat(cf);
const QString uppercase = doc->toHtml();
QVERIFY(re.exactMatch(doc->toHtml()));
- QCOMPARE(re.numCaptures(), 1);
+ QCOMPARE(re.captureCount(), 1);
QCOMPARE(re.cap(1).trimmed(), QString("text-transform:uppercase;"));
cf.setFontCapitalization(QFont::AllLowercase);
cursor.mergeCharFormat(cf);
const QString lowercase = doc->toHtml();
QVERIFY(re.exactMatch(doc->toHtml()));
- QCOMPARE(re.numCaptures(), 1);
+ QCOMPARE(re.captureCount(), 1);
QCOMPARE(re.cap(1).trimmed(), QString("text-transform:lowercase;"));
doc->setHtml(smallcaps);
@@ -1761,14 +1761,14 @@ void tst_QTextDocument::wordspacingHtmlExport()
cursor.mergeCharFormat(cf);
QVERIFY(re.exactMatch(doc->toHtml()));
- QCOMPARE(re.numCaptures(), 1);
+ QCOMPARE(re.captureCount(), 1);
QCOMPARE(re.cap(1).trimmed(), QString("word-spacing:4px;"));
cf.setFontWordSpacing(-8.5);
cursor.mergeCharFormat(cf);
QVERIFY(re.exactMatch(doc->toHtml()));
- QCOMPARE(re.numCaptures(), 1);
+ QCOMPARE(re.captureCount(), 1);
QCOMPARE(re.cap(1).trimmed(), QString("word-spacing:-8.5px;"));
}
diff --git a/tests/auto/qtextdocumentfragment/tst_qtextdocumentfragment.cpp b/tests/auto/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
index 8c4d8fdabd..4dc732cd60 100644
--- a/tests/auto/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
+++ b/tests/auto/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
@@ -2197,6 +2197,16 @@ void tst_QTextDocumentFragment::html_quotedFontFamily()
setHtml("<div style='font-family: \"Foo Bar\";'>Test</div>");
QCOMPARE(doc->begin().begin().fragment().charFormat().fontFamily(), QString("Foo Bar"));
+
+ setHtml("<div style='font-family: \"Foo Bar\";'>Test</div>");
+ QCOMPARE(doc->begin().begin().fragment().charFormat().fontFamily(), QString("Foo Bar"));
+
+ setHtml("<div style='font-family: Foo\n Bar;'>Test</div>");
+ QCOMPARE(doc->begin().begin().fragment().charFormat().fontFamily(), QString("Foo Bar"));
+
+ setHtml("<div style='font-family: Foo\n Bar, serif, \"bar foo\";'>Test</div>");
+ QCOMPARE(doc->begin().begin().fragment().charFormat().fontFamily(), QString("Foo Bar,serif,bar foo"));
+
}
void tst_QTextDocumentFragment::defaultFont()
diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp
index 90e6c5ca83..58f059b7d8 100644
--- a/tests/auto/qtreeview/tst_qtreeview.cpp
+++ b/tests/auto/qtreeview/tst_qtreeview.cpp
@@ -3669,11 +3669,11 @@ void tst_QTreeView::doubleClickedWithSpans()
//end the previous edition
QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, p);
- QTest::qWait(100);
+ QTest::qWait(150);
QTest::mousePress(view.viewport(), Qt::LeftButton, 0, p);
QTest::mouseDClick(view.viewport(), Qt::LeftButton, 0, p);
QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, p);
- QCOMPARE(spy.count(), 2);
+ QTRY_COMPARE(spy.count(), 2);
}
QTEST_MAIN(tst_QTreeView)
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 3d801cced9..e027dd1bf4 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -3328,9 +3328,10 @@ void tst_QWidget::widgetAt()
w2->lower();
qApp->processEvents();
QTRY_VERIFY((wr = QApplication::widgetAt(100, 100)));
- QCOMPARE(wr->objectName(), QString("w1"));
-
+ const bool match = (wr->objectName() == QString("w1"));
w2->raise();
+ QVERIFY(match);
+
qApp->processEvents();
QTRY_VERIFY((wr = QApplication::widgetAt(100, 100)));
QCOMPARE(wr->objectName(), QString("w2"));
diff --git a/tests/auto/qwidgetaction/tst_qwidgetaction.cpp b/tests/auto/qwidgetaction/tst_qwidgetaction.cpp
index 50b3337592..d25738fc38 100644
--- a/tests/auto/qwidgetaction/tst_qwidgetaction.cpp
+++ b/tests/auto/qwidgetaction/tst_qwidgetaction.cpp
@@ -395,7 +395,9 @@ void tst_QWidgetAction::releaseWidgetCrash()
QMainWindow *w = new QMainWindow;
QAction *a = new CrashedAction(w);
QMenu *menu = w->menuBar()->addMenu("Test");
+ menu->addAction("foo");
menu->addAction(a);
+ menu->addAction("bar");
delete w;
}
diff --git a/tests/auto/uiloader/baseline/css_itemview_task258382.ui b/tests/auto/uiloader/baseline/css_itemview_task258382.ui
new file mode 100644
index 0000000000..11c56b4ba2
--- /dev/null
+++ b/tests/auto/uiloader/baseline/css_itemview_task258382.ui
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Form</class>
+ <widget class="QWidget" name="Form">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>437</width>
+ <height>352</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">::item { border: 1px solid black; background-color: purple; }
+::item {margin-left: 20px; }
+
+QAbstractItemView { selection-background-color: red;
+show-decoration- selected: 0;
+ }
+
+::item:selected { background-color: yellow; }</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QTreeWidget" name="treeWidget">
+ <column>
+ <property name="text">
+ <string>1</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>New Column</string>
+ </property>
+ </column>
+ <item>
+ <property name="text">
+ <string>New Item</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>New Item</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>New Item</string>
+ </property>
+ <item>
+ <property name="text">
+ <string>New Subitem</string>
+ </property>
+ <item>
+ <property name="text">
+ <string>New Subitem</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>New Item</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>New Item</string>
+ </property>
+ </item>
+ </item>
+ </item>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QTableWidget" name="tableWidget">
+ <row>
+ <property name="text">
+ <string>New Row</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>New Row</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>New Row</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>New Row</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>New Row</string>
+ </property>
+ </row>
+ <column>
+ <property name="text">
+ <string>New Column</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>New Column</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>New Column</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>New Column</string>
+ </property>
+ </column>
+ <item row="0" column="0">
+ <property name="text">
+ <string>mljkh mh mjl</string>
+ </property>
+ </item>
+ <item row="0" column="1">
+ <property name="text">
+ <string>h jlh mjklh </string>
+ </property>
+ </item>
+ <item row="0" column="2">
+ <property name="text">
+ <string>mjklh mlhj mjlh m</string>
+ </property>
+ </item>
+ <item row="1" column="3">
+ <property name="text">
+ <string>mlhj lmhj </string>
+ </property>
+ </item>
+ <item row="2" column="0">
+ <property name="text">
+ <string>mlkj l</string>
+ </property>
+ </item>
+ <item row="2" column="1">
+ <property name="text">
+ <string>mlkj </string>
+ </property>
+ </item>
+ <item row="2" column="2">
+ <property name="text">
+ <string>mlkj lmkj </string>
+ </property>
+ </item>
+ <item row="2" column="3">
+ <property name="text">
+ <string>mlkhj mlh</string>
+ </property>
+ </item>
+ <item row="3" column="1">
+ <property name="text">
+ <string>mlkj lmkj </string>
+ </property>
+ </item>
+ <item row="4" column="0">
+ <property name="text">
+ <string>mlkj lmkj </string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/tests/auto/xmlpatternsxqts/test/test.pro b/tests/auto/xmlpatternsxqts/test/test.pro
index 603ae65b26..a69838af5e 100644
--- a/tests/auto/xmlpatternsxqts/test/test.pro
+++ b/tests/auto/xmlpatternsxqts/test/test.pro
@@ -24,5 +24,3 @@ win32 {
else: DESTDIR = ../release
}
TARGET = tst_xmlpatternsxqts
-
-include (../../xmlpatterns.pri)
diff --git a/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro b/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro
index a3b13da9c4..39267c8de6 100644
--- a/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro
+++ b/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro
@@ -1,10 +1,10 @@
TEMPLATE = subdirs
-SUBDIRS = test
contains(QT_CONFIG,xmlpatterns) {
SUBDIRS += lib
!wince*:lib.file = lib/lib.pro
test.depends = lib
}
+SUBDIRS += test
# Needed on the win32-g++ setup and on the test machine arsia.
INCLUDEPATH += $$QT_BUILD_TREE/include/QtXmlPatterns/private \
diff --git a/tests/benchmarks/qanimation/rectanimation.cpp b/tests/benchmarks/qanimation/rectanimation.cpp
index ab381f4d84..88eec4d8dc 100644
--- a/tests/benchmarks/qanimation/rectanimation.cpp
+++ b/tests/benchmarks/qanimation/rectanimation.cpp
@@ -92,8 +92,3 @@ void RectAnimation::updateCurrentTime(int currentTime)
if (m_object)
m_object->setRect(m_current);
}
-
-void RectAnimation::updateState(QAbstractAnimation::State state)
-{
- Q_UNUSED(state);
-}
diff --git a/tests/benchmarks/qanimation/rectanimation.h b/tests/benchmarks/qanimation/rectanimation.h
index ea1f804e2d..38a6f48c8b 100644
--- a/tests/benchmarks/qanimation/rectanimation.h
+++ b/tests/benchmarks/qanimation/rectanimation.h
@@ -59,7 +59,6 @@ public:
int duration() const;
virtual void updateCurrentTime(int currentTime);
- virtual void updateState(QAbstractAnimation::State state);
private:
DummyObject *m_object;
diff --git a/tests/benchmarks/qapplication/main.cpp b/tests/benchmarks/qapplication/main.cpp
index a299db2b95..0ec65a8cf9 100644
--- a/tests/benchmarks/qapplication/main.cpp
+++ b/tests/benchmarks/qapplication/main.cpp
@@ -39,7 +39,6 @@
**
****************************************************************************/
#include <QApplication>
-#include <QProcess>
#include <qtest.h>
@@ -54,34 +53,19 @@ private slots:
/*
Test the performance of the QApplication constructor.
- This test creates a new process and thus includes process creation overhead.
- Callgrind results are meaningless since the child process is not traced.
+ Note: results from the second start on can be misleading,
+ since all global statics are already initialized.
*/
void tst_qapplication::ctor()
{
- QProcess proc;
- const QString program = QCoreApplication::applicationFilePath();
- const QStringList arguments = QStringList() << QLatin1String("--exit-now");
-
+ // simulate reasonable argc, argv
+ int argc = 1;
+ char *argv[] = { "tst_qapplication" };
QBENCHMARK {
- proc.start(program, arguments);
- QVERIFY(proc.waitForStarted());
- QVERIFY(proc.waitForFinished());
- QCOMPARE(proc.exitStatus(), QProcess::NormalExit);
- QCOMPARE(proc.exitCode(), 0);
+ QApplication app(argc, argv);
}
}
-int main(int argc, char** argv)
-{
- QApplication app(argc, argv);
-
- if (argc == 2 && QLatin1String("--exit-now") == QLatin1String(argv[1])) {
- return 0;
- }
-
- tst_qapplication test;
- return QTest::qExec(&test, argc, argv);
-}
+QTEST_APPLESS_MAIN(tst_qapplication)
#include "main.moc"
diff --git a/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp
index 993db52b88..1d50013f22 100644
--- a/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp
@@ -46,11 +46,397 @@
#include <QtNetwork/qnetworkreply.h>
#include <QtNetwork/qnetworkrequest.h>
#include <QtNetwork/qnetworkaccessmanager.h>
+#include <QtNetwork/qtcpsocket.h>
+#include <QtNetwork/qtcpserver.h>
#include "../../auto/network-settings.h"
+
+class TimedSender: public QThread
+{
+ Q_OBJECT
+ qint64 totalBytes;
+ QSemaphore ready;
+ QByteArray dataToSend;
+ QTcpSocket *client;
+ int timeout;
+ int port;
+public:
+ int transferRate;
+ TimedSender(int ms)
+ : totalBytes(0), timeout(ms), port(-1), transferRate(-1)
+ {
+ dataToSend = QByteArray(16*1024, '@');
+ start();
+ ready.acquire();
+ }
+
+ inline int serverPort() const { return port; }
+
+private slots:
+ void writeMore()
+ {
+ while (client->bytesToWrite() < 128 * 1024) {
+ writePacket(dataToSend);
+ }
+ }
+
+protected:
+ void run()
+ {
+ QTcpServer server;
+ server.listen();
+ port = server.serverPort();
+ ready.release();
+
+ server.waitForNewConnection(-1);
+ client = server.nextPendingConnection();
+
+ writeMore();
+ connect(client, SIGNAL(bytesWritten(qint64)), SLOT(writeMore()), Qt::DirectConnection);
+
+ QEventLoop eventLoop;
+ QTimer::singleShot(timeout, &eventLoop, SLOT(quit()));
+
+ QTime timer;
+ timer.start();
+ eventLoop.exec();
+ disconnect(client, SIGNAL(bytesWritten(qint64)), this, 0);
+
+ // wait for the connection to shut down
+ client->disconnectFromHost();
+ if (!client->waitForDisconnected(10000))
+ return;
+
+ transferRate = totalBytes * 1000 / timer.elapsed();
+ qDebug() << "TimedSender::run" << "receive rate:" << (transferRate / 1024) << "kB/s in"
+ << timer.elapsed() << "ms";
+ }
+
+ void writePacket(const QByteArray &array)
+ {
+ client->write(array);
+ totalBytes += array.size();
+ }
+};
+
+
+class QNetworkReplyPtr: public QSharedPointer<QNetworkReply>
+{
+public:
+ inline QNetworkReplyPtr(QNetworkReply *ptr = 0)
+ : QSharedPointer<QNetworkReply>(ptr)
+ { }
+
+ inline operator QNetworkReply *() const { return data(); }
+};
+
+
+class DataReader: public QObject
+{
+ Q_OBJECT
+public:
+ qint64 totalBytes;
+ QByteArray data;
+ QIODevice *device;
+ bool accumulate;
+ DataReader(QIODevice *dev, bool acc = true) : totalBytes(0), device(dev), accumulate(acc)
+ {
+ connect(device, SIGNAL(readyRead()), SLOT(doRead()));
+ }
+
+public slots:
+ void doRead()
+ {
+ QByteArray buffer;
+ buffer.resize(device->bytesAvailable());
+ qint64 bytesRead = device->read(buffer.data(), device->bytesAvailable());
+ if (bytesRead == -1) {
+ QTestEventLoop::instance().exitLoop();
+ return;
+ }
+ buffer.truncate(bytesRead);
+ totalBytes += bytesRead;
+
+ if (accumulate)
+ data += buffer;
+ }
+};
+
+class ThreadedDataReader: public QThread
+{
+ Q_OBJECT
+ // used to make the constructor only return after the tcp server started listening
+ QSemaphore ready;
+ QTcpSocket *client;
+ int timeout;
+ int port;
+public:
+ qint64 transferRate;
+ ThreadedDataReader()
+ : port(-1), transferRate(-1)
+ {
+ start();
+ ready.acquire();
+ }
+
+ inline int serverPort() const { return port; }
+
+protected:
+ void run()
+ {
+ QTcpServer server;
+ server.listen();
+ port = server.serverPort();
+ ready.release();
+
+ server.waitForNewConnection(-1);
+ client = server.nextPendingConnection();
+
+ QEventLoop eventLoop;
+ DataReader reader(client, false);
+ QObject::connect(client, SIGNAL(disconnected()), &eventLoop, SLOT(quit()));
+
+ QTime timer;
+ timer.start();
+ eventLoop.exec();
+ qint64 elapsed = timer.elapsed();
+
+ transferRate = reader.totalBytes * 1000 / elapsed;
+ qDebug() << "ThreadedDataReader::run" << "send rate:" << (transferRate / 1024) << "kB/s in" << elapsed << "msec";
+ }
+};
+
+class DataGenerator: public QIODevice
+{
+ Q_OBJECT
+ enum { Idle, Started, Stopped } state;
+public:
+ DataGenerator() : state(Idle)
+ { open(ReadOnly); }
+
+ virtual bool isSequential() const { return true; }
+ virtual qint64 bytesAvailable() const { return state == Started ? 1024*1024 : 0; }
+
+public slots:
+ void start() { state = Started; emit readyRead(); }
+ void stop() { state = Stopped; emit readyRead(); }
+
+protected:
+ virtual qint64 readData(char *data, qint64 maxlen)
+ {
+ if (state == Stopped)
+ return -1; // EOF
+
+ // return as many bytes as are wanted
+ memset(data, '@', maxlen);
+ return maxlen;
+ }
+ virtual qint64 writeData(const char *, qint64)
+ { return -1; }
+};
+
+class ThreadedDataReaderHttpServer: public QThread
+{
+ Q_OBJECT
+ // used to make the constructor only return after the tcp server started listening
+ QSemaphore ready;
+ QTcpSocket *client;
+ int timeout;
+ int port;
+public:
+ qint64 transferRate;
+ ThreadedDataReaderHttpServer()
+ : port(-1), transferRate(-1)
+ {
+ start();
+ ready.acquire();
+ }
+
+ inline int serverPort() const { return port; }
+
+protected:
+ void run()
+ {
+ QTcpServer server;
+ server.listen();
+ port = server.serverPort();
+ ready.release();
+
+ server.waitForNewConnection(-1);
+ client = server.nextPendingConnection();
+ client->write("HTTP/1.0 200 OK\r\n");
+ client->write("Content-length: 0\r\n");
+ client->write("\r\n");
+ client->flush();
+
+ QCoreApplication::processEvents();
+
+ QEventLoop eventLoop;
+ DataReader reader(client, false);
+ QObject::connect(client, SIGNAL(disconnected()), &eventLoop, SLOT(quit()));
+
+ QTime timer;
+ timer.start();
+ eventLoop.exec();
+ qint64 elapsed = timer.elapsed();
+
+ transferRate = reader.totalBytes * 1000 / elapsed;
+ qDebug() << "ThreadedDataReaderHttpServer::run" << "send rate:" << (transferRate / 1024) << "kB/s in" << elapsed << "msec";
+ }
+};
+
+
+class FixedSizeDataGenerator : public QIODevice
+{
+ Q_OBJECT
+ enum { Idle, Started, Stopped } state;
+public:
+ FixedSizeDataGenerator(qint64 size) : state(Idle)
+ { open(ReadOnly | Unbuffered);
+ toBeGeneratedTotalCount = toBeGeneratedCount = size;
+ }
+
+ virtual qint64 bytesAvailable() const
+ {
+ return state == Started ? toBeGeneratedCount + QIODevice::bytesAvailable() : 0;
+ }
+
+ virtual bool isSequential() const{
+ return false;
+ }
+
+ virtual bool reset() const{
+ return false;
+ }
+
+ qint64 size() const {
+ return toBeGeneratedTotalCount;
+ }
+
+public slots:
+ void start() { state = Started; emit readyRead(); }
+
+protected:
+ virtual qint64 readData(char *data, qint64 maxlen)
+ {
+ memset(data, '@', maxlen);
+
+ if (toBeGeneratedCount <= 0) {
+ return -1;
+ }
+
+ qint64 n = qMin(maxlen, toBeGeneratedCount);
+ toBeGeneratedCount -= n;
+
+ if (toBeGeneratedCount <= 0) {
+ // make sure this is a queued connection!
+ emit readChannelFinished();
+ }
+
+ return n;
+ }
+ virtual qint64 writeData(const char *, qint64)
+ { return -1; }
+
+ qint64 toBeGeneratedCount;
+ qint64 toBeGeneratedTotalCount;
+};
+
+class HttpDownloadPerformanceServer : QObject {
+ Q_OBJECT;
+ qint64 dataSize;
+ qint64 dataSent;
+ QTcpServer server;
+ QTcpSocket *client;
+ bool serverSendsContentLength;
+ bool chunkedEncoding;
+
+public:
+ HttpDownloadPerformanceServer (qint64 ds, bool sscl, bool ce) : dataSize(ds), dataSent(0),
+ client(0), serverSendsContentLength(sscl), chunkedEncoding(ce) {
+ server.listen();
+ connect(&server, SIGNAL(newConnection()), this, SLOT(newConnectionSlot()));
+ }
+
+ int serverPort() {
+ return server.serverPort();
+ }
+
+public slots:
+
+ void newConnectionSlot() {
+ client = server.nextPendingConnection();
+ client->setParent(this);
+ connect(client, SIGNAL(readyRead()), this, SLOT(readyReadSlot()));
+ connect(client, SIGNAL(bytesWritten(qint64)), this, SLOT(bytesWrittenSlot(qint64)));
+ }
+
+ void readyReadSlot() {
+ client->readAll();
+ client->write("HTTP/1.0 200 OK\n");
+ if (serverSendsContentLength)
+ client->write(QString("Content-Length: " + QString::number(dataSize) + "\n").toAscii());
+ if (chunkedEncoding)
+ client->write(QString("Transfer-Encoding: chunked\n").toAscii());
+ client->write("Connection: close\n\n");
+ }
+
+ void bytesWrittenSlot(qint64 amount) {
+ Q_UNUSED(amount);
+ if (dataSent == dataSize && client) {
+ // close eventually
+
+ // chunked encoding: we have to send a last "empty" chunk
+ if (chunkedEncoding)
+ client->write(QString("0\r\n\r\n").toAscii());
+
+ client->disconnectFromHost();
+ server.close();
+ client = 0;
+ return;
+ }
+
+ // send data
+ if (client && client->bytesToWrite() < 100*1024 && dataSent < dataSize) {
+ qint64 amount = qMin(qint64(16*1024), dataSize - dataSent);
+ QByteArray data(amount, '@');
+
+ if (chunkedEncoding) {
+ client->write(QString(QString("%1").arg(amount,0,16).toUpper() + "\r\n").toAscii());
+ client->write(data.constData(), amount);
+ client->write(QString("\r\n").toAscii());
+ } else {
+ client->write(data.constData(), amount);
+ }
+
+ dataSent += amount;
+ }
+ }
+};
+
+class HttpDownloadPerformanceClient : QObject {
+ Q_OBJECT;
+ QIODevice *device;
+ public:
+ HttpDownloadPerformanceClient (QIODevice *dev) : device(dev){
+ connect(dev, SIGNAL(readyRead()), this, SLOT(readyReadSlot()));
+ }
+
+ public slots:
+ void readyReadSlot() {
+ device->readAll();
+ }
+
+};
+
+
+
+
class tst_qnetworkreply : public QObject
{
Q_OBJECT
+
+ QNetworkAccessManager manager;
private slots:
void httpLatency();
@@ -58,6 +444,14 @@ private slots:
void echoPerformance_data();
void echoPerformance();
#endif
+
+ void downloadPerformance();
+ void uploadPerformance();
+ void performanceControlRate();
+ void httpUploadPerformance();
+ void httpDownloadPerformance_data();
+ void httpDownloadPerformance();
+
};
void tst_qnetworkreply::httpLatency()
@@ -107,6 +501,142 @@ void tst_qnetworkreply::echoPerformance()
}
#endif
+void tst_qnetworkreply::downloadPerformance()
+{
+ // unlike the above function, this one tries to send as fast as possible
+ // and measures how fast it was.
+ TimedSender sender(5000);
+ QNetworkRequest request("debugpipe://127.0.0.1:" + QString::number(sender.serverPort()) + "/?bare=1");
+ QNetworkReplyPtr reply = manager.get(request);
+ DataReader reader(reply, false);
+
+ QTime loopTime;
+ connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ loopTime.start();
+ QTestEventLoop::instance().enterLoop(40);
+ int elapsedTime = loopTime.elapsed();
+ sender.wait();
+
+ qint64 receivedBytes = reader.totalBytes;
+ qDebug() << "tst_QNetworkReply::downloadPerformance" << "receive rate:" << (receivedBytes * 1000 / elapsedTime / 1024) << "kB/s and"
+ << elapsedTime << "ms";
+}
+
+void tst_qnetworkreply::uploadPerformance()
+{
+ ThreadedDataReader reader;
+ DataGenerator generator;
+
+
+ QNetworkRequest request("debugpipe://127.0.0.1:" + QString::number(reader.serverPort()) + "/?bare=1");
+ QNetworkReplyPtr reply = manager.put(request, &generator);
+ generator.start();
+ connect(&reader, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ QTimer::singleShot(5000, &generator, SLOT(stop()));
+
+ QTestEventLoop::instance().enterLoop(30);
+ QCOMPARE(reply->error(), QNetworkReply::NoError);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+}
+
+void tst_qnetworkreply::httpUploadPerformance()
+{
+#ifdef Q_OS_SYMBIAN
+ // SHow some mercy for non-desktop platform/s
+ enum {UploadSize = 4*1024*1024}; // 4 MB
+#else
+ enum {UploadSize = 128*1024*1024}; // 128 MB
+#endif
+ ThreadedDataReaderHttpServer reader;
+ FixedSizeDataGenerator generator(UploadSize);
+
+ QNetworkRequest request(QUrl("http://127.0.0.1:" + QString::number(reader.serverPort()) + "/?bare=1"));
+ request.setHeader(QNetworkRequest::ContentLengthHeader,UploadSize);
+
+ QNetworkReplyPtr reply = manager.put(request, &generator);
+
+ connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+
+ QTime time;
+ generator.start();
+ time.start();
+ QTestEventLoop::instance().enterLoop(40);
+ QCOMPARE(reply->error(), QNetworkReply::NoError);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+
+ qint64 elapsed = time.elapsed();
+ qDebug() << "tst_QNetworkReply::httpUploadPerformance" << elapsed << "msec, "
+ << ((UploadSize/1024.0)/(elapsed/1000.0)) << " kB/sec";
+
+ reader.exit();
+ reader.wait();
+}
+
+
+void tst_qnetworkreply::performanceControlRate()
+{
+ // this is a control comparison for the other two above
+ // it does the same thing, but instead bypasses the QNetworkAccess system
+ qDebug() << "The following are the maximum transfer rates that we can get in this system"
+ " (bypassing QNetworkAccess)";
+
+ TimedSender sender(5000);
+ QTcpSocket sink;
+ sink.connectToHost("127.0.0.1", sender.serverPort());
+ DataReader reader(&sink, false);
+
+ QTime loopTime;
+ connect(&sink, SIGNAL(disconnected()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ loopTime.start();
+ QTestEventLoop::instance().enterLoop(40);
+ int elapsedTime = loopTime.elapsed();
+ sender.wait();
+
+ qint64 receivedBytes = reader.totalBytes;
+ qDebug() << "tst_QNetworkReply::performanceControlRate" << "receive rate:" << (receivedBytes * 1000 / elapsedTime / 1024) << "kB/s and"
+ << elapsedTime << "ms";
+}
+
+void tst_qnetworkreply::httpDownloadPerformance_data()
+{
+ QTest::addColumn<bool>("serverSendsContentLength");
+ QTest::addColumn<bool>("chunkedEncoding");
+
+ QTest::newRow("Server sends no Content-Length") << false << false;
+ QTest::newRow("Server sends Content-Length") << true << false;
+ QTest::newRow("Server uses chunked encoding") << false << true;
+
+}
+
+void tst_qnetworkreply::httpDownloadPerformance()
+{
+ QFETCH(bool, serverSendsContentLength);
+ QFETCH(bool, chunkedEncoding);
+#ifdef Q_OS_SYMBIAN
+ // Show some mercy to non-desktop platform/s
+ enum {UploadSize = 4*1024*1024}; // 4 MB
+#else
+ enum {UploadSize = 128*1024*1024}; // 128 MB
+#endif
+ HttpDownloadPerformanceServer server(UploadSize, serverSendsContentLength, chunkedEncoding);
+
+ QNetworkRequest request(QUrl("http://127.0.0.1:" + QString::number(server.serverPort()) + "/?bare=1"));
+ QNetworkReplyPtr reply = manager.get(request);
+
+ connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection);
+ HttpDownloadPerformanceClient client(reply);
+
+ QTime time;
+ time.start();
+ QTestEventLoop::instance().enterLoop(40);
+ QCOMPARE(reply->error(), QNetworkReply::NoError);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+
+ qint64 elapsed = time.elapsed();
+ qDebug() << "tst_QNetworkReply::httpDownloadPerformance" << elapsed << "msec, "
+ << ((UploadSize/1024.0)/(elapsed/1000.0)) << " kB/sec";
+}
+
QTEST_MAIN(tst_qnetworkreply)
#include "tst_qnetworkreply.moc"
diff --git a/tools/assistant/lib/lib.pro b/tools/assistant/lib/lib.pro
index 011dec2a95..51933def95 100644
--- a/tools/assistant/lib/lib.pro
+++ b/tools/assistant/lib/lib.pro
@@ -40,7 +40,8 @@ SOURCES += qhelpenginecore.cpp \
qhelpsearchindex_default.cpp \
qhelpsearchindexwriter_default.cpp \
qhelpsearchindexreader_default.cpp \
- qhelpsearchindexreader.cpp
+ qhelpsearchindexreader.cpp \
+ qhelp_global.cpp
# access to clucene
SOURCES += qhelpsearchindexwriter_clucene.cpp \
diff --git a/tools/assistant/lib/qhelp_global.cpp b/tools/assistant/lib/qhelp_global.cpp
new file mode 100644
index 0000000000..980de27857
--- /dev/null
+++ b/tools/assistant/lib/qhelp_global.cpp
@@ -0,0 +1,112 @@
+/****************************************************************************
+**
+** 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 Qt Assistant.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QRegExp>
+#include <QtCore/QMutexLocker>
+#include <QtGui/QTextDocument>
+
+#include "qhelp_global.h"
+
+QString QHelpGlobal::uniquifyConnectionName(const QString &name, void *pointer)
+{
+ static int counter = 0;
+ static QMutex mutex;
+
+ QMutexLocker locker(&mutex);
+ if (++counter > 1000)
+ counter = 0;
+
+ return QString::fromLatin1("%1-%2-%3").
+ arg(name).arg(long(pointer)).arg(counter);
+}
+
+QString QHelpGlobal::documentTitle(const QString &content)
+{
+ QString title = QObject::tr("Untitled");
+ if (!content.isEmpty()) {
+ int start = content.indexOf(QLatin1String("<title>"), 0, Qt::CaseInsensitive) + 7;
+ int end = content.indexOf(QLatin1String("</title>"), 0, Qt::CaseInsensitive);
+ if ((end - start) > 0) {
+ title = content.mid(start, end - start);
+ if (Qt::mightBeRichText(title) || title.contains(QLatin1Char('&'))) {
+ QTextDocument doc;
+ doc.setHtml(title);
+ title = doc.toPlainText();
+ }
+ }
+ }
+ return title;
+}
+
+QString QHelpGlobal::codecFromData(const QByteArray &data)
+{
+ QString codec = codecFromXmlData(data);
+ if (codec.isEmpty())
+ codec = codecFromHtmlData(data);
+ return codec.isEmpty() ? QLatin1String("utf-8") : codec;
+}
+
+QString QHelpGlobal::codecFromHtmlData(const QByteArray &data)
+{
+ QString content = QString::fromUtf8(data.constData(), data.size());
+ int start = content.indexOf(QLatin1String("<meta"), 0, Qt::CaseInsensitive);
+ if (start > 0) {
+ int end;
+ QRegExp r(QLatin1String("charset=([^\"\\s]+)"));
+ while (start != -1) {
+ end = content.indexOf(QLatin1Char('>'), start) + 1;
+ const QString &meta = content.mid(start, end - start).toLower();
+ if (r.indexIn(meta) != -1)
+ return r.cap(1);
+ start = content.indexOf(QLatin1String("<meta"), end,
+ Qt::CaseInsensitive);
+ }
+ }
+ return QString();
+}
+
+QString QHelpGlobal::codecFromXmlData(const QByteArray &data)
+{
+ QString content = QString::fromUtf8(data.constData(), data.size());
+ const QRegExp encodingExp(QLatin1String("^\\s*<\\?xml version="
+ "\"\\d\\.\\d\" encoding=\"([^\"]+)\"\\?>.*"));
+ return encodingExp.exactMatch(content) ? encodingExp.cap(1) : QString();
+}
diff --git a/tools/assistant/lib/qhelp_global.h b/tools/assistant/lib/qhelp_global.h
index 723d8679c9..4e31d671c2 100644
--- a/tools/assistant/lib/qhelp_global.h
+++ b/tools/assistant/lib/qhelp_global.h
@@ -45,9 +45,6 @@
#include <QtCore/qglobal.h>
#include <QtCore/QString>
#include <QtCore/QObject>
-#include <QtCore/QRegExp>
-#include <QtCore/QMutexLocker>
-#include <QtGui/QTextDocument>
QT_BEGIN_HEADER
@@ -65,56 +62,13 @@ QT_MODULE(Help)
class QHelpGlobal {
public:
- static QString uniquifyConnectionName(const QString &name, void *pointer)
- {
- static int counter = 0;
- static QMutex mutex;
+ static QString uniquifyConnectionName(const QString &name, void *pointer);
+ static QString documentTitle(const QString &content);
+ static QString codecFromData(const QByteArray &data);
- QMutexLocker locker(&mutex);
- if (++counter > 1000)
- counter = 0;
-
- return QString::fromLatin1("%1-%2-%3")
- .arg(name).arg(long(pointer)).arg(counter);
- };
-
- static QString documentTitle(const QString &content)
- {
- QString title = QObject::tr("Untitled");
- if (!content.isEmpty()) {
- int start = content.indexOf(QLatin1String("<title>"), 0, Qt::CaseInsensitive) + 7;
- int end = content.indexOf(QLatin1String("</title>"), 0, Qt::CaseInsensitive);
- if ((end - start) > 0) {
- title = content.mid(start, end - start);
- if (Qt::mightBeRichText(title) || title.contains(QLatin1Char('&'))) {
- QTextDocument doc;
- doc.setHtml(title);
- title = doc.toPlainText();
- }
- }
- }
- return title;
- };
-
- static QString charsetFromData(const QByteArray &data)
- {
- QString content = QString::fromUtf8(data.constData(), data.size());
- int start =
- content.indexOf(QLatin1String("<meta"), 0, Qt::CaseInsensitive);
- if (start > 0) {
- int end;
- QRegExp r(QLatin1String("charset=([^\"\\s]+)"));
- while (start != -1) {
- end = content.indexOf(QLatin1Char('>'), start) + 1;
- const QString &meta = content.mid(start, end - start).toLower();
- if (r.indexIn(meta) != -1)
- return r.cap(1);
- start = content.indexOf(QLatin1String("<meta"), end,
- Qt::CaseInsensitive);
- }
- }
- return QLatin1String("utf-8");
- }
+private:
+ static QString codecFromHtmlData(const QByteArray &data);
+ static QString codecFromXmlData(const QByteArray &data);
};
QT_END_NAMESPACE
diff --git a/tools/assistant/lib/qhelpgenerator.cpp b/tools/assistant/lib/qhelpgenerator.cpp
index 0294b303cc..48d73aa82d 100644
--- a/tools/assistant/lib/qhelpgenerator.cpp
+++ b/tools/assistant/lib/qhelpgenerator.cpp
@@ -528,7 +528,7 @@ bool QHelpGenerator::insertFiles(const QStringList &files, const QString &rootPa
QByteArray data = fi.readAll();
if (fileName.endsWith(QLatin1String(".html"))
|| fileName.endsWith(QLatin1String(".htm"))) {
- charSet = QHelpGlobal::charsetFromData(data);
+ charSet = QHelpGlobal::codecFromData(data);
QTextStream stream(&data);
stream.setCodec(QTextCodec::codecForName(charSet.toLatin1().constData()));
title = QHelpGlobal::documentTitle(stream.readAll());
diff --git a/tools/assistant/lib/qhelpsearchengine.cpp b/tools/assistant/lib/qhelpsearchengine.cpp
index cb18142725..893495d35f 100644
--- a/tools/assistant/lib/qhelpsearchengine.cpp
+++ b/tools/assistant/lib/qhelpsearchengine.cpp
@@ -95,12 +95,11 @@ private:
delete indexWriter;
}
-
- int hitsCount() const
+ int hitCount() const
{
int count = 0;
if (indexReader)
- count = indexReader->hitsCount();
+ count = indexReader->hitCount();
return count;
}
@@ -366,11 +365,22 @@ QHelpSearchResultWidget* QHelpSearchEngine::resultWidget()
}
/*!
+ \obsolete
Returns the amount of hits the search engine found.
+ \sa hitCount()
*/
int QHelpSearchEngine::hitsCount() const
{
- return d->hitsCount();
+ return d->hitCount();
+}
+
+/*!
+ \since 4.6
+ Returns the amount of hits the search engine found.
+*/
+int QHelpSearchEngine::hitCount() const
+{
+ return d->hitCount();
}
/*!
diff --git a/tools/assistant/lib/qhelpsearchengine.h b/tools/assistant/lib/qhelpsearchengine.h
index 1d53411ab6..21f04c5420 100644
--- a/tools/assistant/lib/qhelpsearchengine.h
+++ b/tools/assistant/lib/qhelpsearchengine.h
@@ -86,7 +86,8 @@ public:
QHelpSearchQueryWidget* queryWidget();
QHelpSearchResultWidget* resultWidget();
- int hitsCount() const;
+ QT_DEPRECATED int hitsCount() const;
+ int hitCount() const;
typedef QPair<QString, QString> SearchHit;
QList<SearchHit> hits(int start, int end) const;
diff --git a/tools/assistant/lib/qhelpsearchindexreader.cpp b/tools/assistant/lib/qhelpsearchindexreader.cpp
index 20d181bbe4..b13460536d 100644
--- a/tools/assistant/lib/qhelpsearchindexreader.cpp
+++ b/tools/assistant/lib/qhelpsearchindexreader.cpp
@@ -83,7 +83,7 @@ void QHelpSearchIndexReader::search(const QString &collectionFile, const QString
start(QThread::NormalPriority);
}
-int QHelpSearchIndexReader::hitsCount() const
+int QHelpSearchIndexReader::hitCount() const
{
QMutexLocker lock(&mutex);
return hitList.count();
diff --git a/tools/assistant/lib/qhelpsearchindexreader_p.h b/tools/assistant/lib/qhelpsearchindexreader_p.h
index 31c392f7d9..adbcdc246c 100644
--- a/tools/assistant/lib/qhelpsearchindexreader_p.h
+++ b/tools/assistant/lib/qhelpsearchindexreader_p.h
@@ -81,7 +81,7 @@ public:
void search(const QString &collectionFile,
const QString &indexFilesFolder,
const QList<QHelpSearchQuery> &queryList);
- int hitsCount() const;
+ int hitCount() const;
QList<QHelpSearchEngine::SearchHit> hits(int start, int end) const;
signals:
diff --git a/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp b/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp
index 284cbd3229..ab32537f9c 100644
--- a/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp
+++ b/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp
@@ -430,8 +430,8 @@ private:
QString readData(const QByteArray &data)
{
QTextStream textStream(data);
- QByteArray charSet = QHelpGlobal::charsetFromData(data).toLatin1();
- textStream.setCodec(QTextCodec::codecForName(charSet.constData()));
+ const QByteArray &codec = QHelpGlobal::codecFromData(data).toLatin1();
+ textStream.setCodec(QTextCodec::codecForName(codec.constData()));
QString stream = textStream.readAll();
if (stream.isNull() || stream.isEmpty())
diff --git a/tools/assistant/lib/qhelpsearchindexwriter_default.cpp b/tools/assistant/lib/qhelpsearchindexwriter_default.cpp
index 36b115e128..06deb85356 100644
--- a/tools/assistant/lib/qhelpsearchindexwriter_default.cpp
+++ b/tools/assistant/lib/qhelpsearchindexwriter_default.cpp
@@ -274,7 +274,7 @@ void QHelpSearchIndexWriter::run()
continue;
QTextStream s(data);
- QString en = QHelpGlobal::charsetFromData(data);
+ QString en = QHelpGlobal::codecFromData(data);
s.setCodec(QTextCodec::codecForName(en.toLatin1().constData()));
QString text = s.readAll();
diff --git a/tools/assistant/lib/qhelpsearchresultwidget.cpp b/tools/assistant/lib/qhelpsearchresultwidget.cpp
index a2f0021588..c0d17dd9a8 100644
--- a/tools/assistant/lib/qhelpsearchresultwidget.cpp
+++ b/tools/assistant/lib/qhelpsearchresultwidget.cpp
@@ -169,13 +169,13 @@ private slots:
void showNextResultPage()
{
if (!searchEngine.isNull()
- && resultLastToShow < searchEngine->hitsCount()) {
+ && resultLastToShow < searchEngine->hitCount()) {
resultLastToShow += 20;
resultFirstToShow += 20;
resultTextBrowser->showResultPage(searchEngine->hits(resultFirstToShow,
resultLastToShow), isIndexing);
- if (resultLastToShow >= searchEngine->hitsCount())
+ if (resultLastToShow >= searchEngine->hitCount())
updateNextButtonState(false);
}
updateHitRange();
@@ -184,7 +184,7 @@ private slots:
void showLastResultPage()
{
if (!searchEngine.isNull()) {
- resultLastToShow = searchEngine->hitsCount();
+ resultLastToShow = searchEngine->hitCount();
resultFirstToShow = resultLastToShow - (resultLastToShow % 20);
if (resultFirstToShow == resultLastToShow)
@@ -214,7 +214,7 @@ private slots:
{
if (!searchEngine.isNull()) {
int count = resultLastToShow % 20;
- if (count == 0 || resultLastToShow != searchEngine->hitsCount())
+ if (count == 0 || resultLastToShow != searchEngine->hitCount())
count = 20;
resultLastToShow -= count;
@@ -298,7 +298,7 @@ private:
int count = 0;
if (!searchEngine.isNull()) {
- count = searchEngine->hitsCount();
+ count = searchEngine->hitCount();
if (count > 0) {
first = resultFirstToShow +1;
last = resultLastToShow > count ? count : resultLastToShow;
diff --git a/tools/assistant/tools/assistant/assistant.pro b/tools/assistant/tools/assistant/assistant.pro
index 1cbd1d32db..1a7e874b02 100644
--- a/tools/assistant/tools/assistant/assistant.pro
+++ b/tools/assistant/tools/assistant/assistant.pro
@@ -4,8 +4,6 @@ TEMPLATE = app
LANGUAGE = C++
TARGET = assistant
-DEFINES += QT_CLUCENE_SUPPORT
-
contains(QT_CONFIG, webkit) {
QT += webkit
}
diff --git a/tools/assistant/tools/assistant/helpviewer.cpp b/tools/assistant/tools/assistant/helpviewer.cpp
index 53f3822e4d..c888a5f0d1 100644
--- a/tools/assistant/tools/assistant/helpviewer.cpp
+++ b/tools/assistant/tools/assistant/helpviewer.cpp
@@ -137,24 +137,22 @@ QNetworkReply *HelpNetworkAccessManager::createRequest(Operation op,
const QNetworkRequest &request, QIODevice *outgoingData)
{
const QString& scheme = request.url().scheme();
- if (scheme == QLatin1String("qthelp") || scheme == QLatin1String("about")) {
- const QUrl& url = request.url();
- QString mimeType = url.toString();
- if (mimeType.endsWith(QLatin1String(".svg"))
- || mimeType.endsWith(QLatin1String(".svgz"))) {
- mimeType = QLatin1String("image/svg+xml");
- }
- else if (mimeType.endsWith(QLatin1String(".css"))) {
- mimeType = QLatin1String("text/css");
- }
- else if (mimeType.endsWith(QLatin1String(".js"))) {
- mimeType = QLatin1String("text/javascript");
- } else {
- mimeType = QLatin1String("text/html");
- }
- return new HelpNetworkReply(request, helpEngine->fileData(url), mimeType);
+ const QUrl& url = request.url();
+ QString mimeType = url.toString();
+ if (mimeType.endsWith(QLatin1String(".svg"))
+ || mimeType.endsWith(QLatin1String(".svgz"))) {
+ mimeType = QLatin1String("image/svg+xml");
}
- return QNetworkAccessManager::createRequest(op, request, outgoingData);
+ else if (mimeType.endsWith(QLatin1String(".css"))) {
+ mimeType = QLatin1String("text/css");
+ }
+ else if (mimeType.endsWith(QLatin1String(".js"))) {
+ mimeType = QLatin1String("text/javascript");
+ } else {
+ mimeType = QLatin1String("text/html");
+ }
+
+ return new HelpNetworkReply(request, helpEngine->fileData(url), mimeType);
}
class HelpPage : public QWebPage
diff --git a/tools/assistant/tools/assistant/main.cpp b/tools/assistant/tools/assistant/main.cpp
index 4d7fe1016c..12bc5b15e3 100644
--- a/tools/assistant/tools/assistant/main.cpp
+++ b/tools/assistant/tools/assistant/main.cpp
@@ -115,7 +115,7 @@ updateUserCollection(QHelpEngineCore& user, const QHelpEngineCore& caller)
const uint userCollectionCreationTime = user.
customValue(QLatin1String("CreationTime"), 1).toUInt();
- if (callerCollectionCreationTime == userCollectionCreationTime)
+ if (callerCollectionCreationTime <= userCollectionCreationTime)
return false;
user.setCustomValue(QLatin1String("CreationTime"),
@@ -124,6 +124,12 @@ updateUserCollection(QHelpEngineCore& user, const QHelpEngineCore& caller)
caller.customValue(QLatin1String("WindowTitle")));
user.setCustomValue(QLatin1String("LastShownPages"),
caller.customValue(QLatin1String("LastShownPages")));
+#if !defined(QT_NO_WEBKIT)
+ const QLatin1String zoomKey("LastPagesZoomWebView");
+#else
+ const QLatin1String zoomKey("LastPagesZoomTextBrowser");
+#endif
+ user.setCustomValue(zoomKey, caller.customValue(zoomKey));
user.setCustomValue(QLatin1String("CurrentFilter"),
caller.customValue(QLatin1String("CurrentFilter")));
user.setCustomValue(QLatin1String("CacheDirectory"),
@@ -148,6 +154,8 @@ updateUserCollection(QHelpEngineCore& user, const QHelpEngineCore& caller)
caller.customValue(QLatin1String("AboutTexts")));
user.setCustomValue(QLatin1String("AboutImages"),
caller.customValue(QLatin1String("AboutImages")));
+ user.setCustomValue(QLatin1String("defaultHomepage"),
+ caller.customValue(QLatin1String("defaultHomepage")));
return true;
}
diff --git a/tools/assistant/tools/assistant/searchwidget.cpp b/tools/assistant/tools/assistant/searchwidget.cpp
index 48fa8c6ba4..3b456a38a3 100644
--- a/tools/assistant/tools/assistant/searchwidget.cpp
+++ b/tools/assistant/tools/assistant/searchwidget.cpp
@@ -85,7 +85,8 @@ SearchWidget::SearchWidget(QHelpSearchEngine *engine, QWidget *parent)
SLOT(searchingFinished(int)));
QTextBrowser* browser = qFindChild<QTextBrowser*>(resultWidget);
- browser->viewport()->installEventFilter(this);
+ if (browser) // Will be null if lib was configured not to use CLucene.
+ browser->viewport()->installEventFilter(this);
}
SearchWidget::~SearchWidget()
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 95f271defd..735e03070d 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -249,7 +249,7 @@ Configure::Configure( int& argc, char** argv )
dictionary[ "MULTIMEDIA" ] = "yes";
dictionary[ "DIRECTSHOW" ] = "no";
dictionary[ "WEBKIT" ] = "auto";
- dictionary[ "DECLARATIVE" ] = "no";
+ dictionary[ "DECLARATIVE" ] = "auto";
dictionary[ "PLUGIN_MANIFESTS" ] = "yes";
QString version;
@@ -351,6 +351,7 @@ Configure::Configure( int& argc, char** argv )
dictionary[ "INCREDIBUILD_XGE" ] = "auto";
dictionary[ "LTCG" ] = "no";
+ dictionary[ "NATIVE_GESTURES" ] = "yes";
}
Configure::~Configure()
@@ -796,6 +797,10 @@ void Configure::parseCmdLine()
dictionary[ "INCREDIBUILD_XGE" ] = "no";
else if( configCmdLine.at(i) == "-incredibuild-xge" )
dictionary[ "INCREDIBUILD_XGE" ] = "yes";
+ else if( configCmdLine.at(i) == "-native-gestures" )
+ dictionary[ "NATIVE_GESTURES" ] = "yes";
+ else if( configCmdLine.at(i) == "-no-native-gestures" )
+ dictionary[ "NATIVE_GESTURES" ] = "no";
#if !defined(EVAL)
// Others ---------------------------------------------------
else if (configCmdLine.at(i) == "-fpu" )
@@ -1774,6 +1779,8 @@ bool Configure::displayHelp()
desc("STYLE_WINDOWSCE", "yes", "", " windowsce", ' ');
desc("STYLE_WINDOWSMOBILE" , "yes", "", " windowsmobile", ' ');
desc("STYLE_S60" , "yes", "", " s60\n", ' ');
+ desc("NATIVE_GESTURES", "no", "-no-native-gestures", "Do not use native gestures on Windows 7.");
+ desc("NATIVE_GESTURES", "yes", "-native-gestures", "Use native gestures on Windows 7.");
/* We do not support -qconfig on Windows yet
@@ -2038,6 +2045,8 @@ bool Configure::checkAvailability(const QString &part)
available = true;
} else if (part == "WEBKIT") {
available = (dictionary.value("QMAKESPEC") == "win32-msvc2005") || (dictionary.value("QMAKESPEC") == "win32-msvc2008") || (dictionary.value("QMAKESPEC") == "win32-g++");
+ } else if (part == "DECLARATIVE") {
+ available = QFile::exists(sourcePath + "/src/declarative/qml/qmlcomponent.h");
}
return available;
@@ -2124,6 +2133,8 @@ void Configure::autoDetection()
dictionary["PHONON"] = checkAvailability("PHONON") ? "yes" : "no";
if (dictionary["WEBKIT"] == "auto")
dictionary["WEBKIT"] = checkAvailability("WEBKIT") ? "yes" : "no";
+ if (dictionary["DECLARATIVE"] == "auto")
+ dictionary["DECLARATIVE"] = checkAvailability("DECLARATIVE") ? "yes" : "no";
// Qt/WinCE remote test application
if (dictionary["CETEST"] == "auto")
@@ -2517,6 +2528,9 @@ void Configure::generateOutputVars()
if (dictionary["DECLARATIVE"] == "yes")
qtConfig += "declarative";
+ if( dictionary[ "NATIVE_GESTURES" ] == "yes" )
+ qtConfig += "native-gestures";
+
// We currently have no switch for QtSvg, so add it unconditionally.
qtConfig += "svg";
@@ -2893,6 +2907,7 @@ void Configure::generateConfigfiles()
if(dictionary["SCRIPTTOOLS"] == "no") qconfigList += "QT_NO_SCRIPTTOOLS";
if(dictionary["FREETYPE"] == "no") qconfigList += "QT_NO_FREETYPE";
if(dictionary["S60"] == "no") qconfigList += "QT_NO_S60";
+ if(dictionary["NATIVE_GESTURES"] == "no") qconfigList += "QT_NO_NATIVE_GESTURES";
if(dictionary["OPENGL_ES_CM"] == "yes" ||
dictionary["OPENGL_ES_CL"] == "yes" ||
@@ -3387,10 +3402,7 @@ void Configure::buildHostTools()
QString pwd = QDir::currentPath();
QStringList hostToolsDirs;
hostToolsDirs
- << "src/tools/bootstrap"
- << "src/tools/moc"
- << "src/tools/rcc"
- << "src/tools/uic";
+ << "src/tools";
if(dictionary["XQMAKESPEC"].startsWith("wince"))
hostToolsDirs << "tools/checksdk";
diff --git a/tools/designer/src/designer/qdesigner_formwindow.cpp b/tools/designer/src/designer/qdesigner_formwindow.cpp
index b2af25743f..05937cd78f 100644
--- a/tools/designer/src/designer/qdesigner_formwindow.cpp
+++ b/tools/designer/src/designer/qdesigner_formwindow.cpp
@@ -182,7 +182,7 @@ int QDesignerFormWindow::getNumberOfUntitledWindows() const
if (rx.indexIn(title) != -1) {
if (maxUntitled == 0)
++maxUntitled;
- if (rx.numCaptures() > 1) {
+ if (rx.captureCount() > 1) {
const QString numberCapture = rx.cap(2);
if (!numberCapture.isEmpty())
maxUntitled = qMax(numberCapture.toInt(), maxUntitled);
diff --git a/tools/linguist/lrelease/main.cpp b/tools/linguist/lrelease/main.cpp
index 286784947a..ecaed275d6 100644
--- a/tools/linguist/lrelease/main.cpp
+++ b/tools/linguist/lrelease/main.cpp
@@ -79,6 +79,9 @@ static void printUsage()
" -removeidentical\n"
" If the translated text is the same as\n"
" the source text, do not include the message\n"
+ " -markuntranslated <prefix>\n"
+ " If a message has no real translation, use the source text\n"
+ " prefixed with the given string instead\n"
" -silent\n"
" Do not explain what is being done\n"
" -version\n"
@@ -100,15 +103,14 @@ static bool loadTsFile(Translator &tor, const QString &tsFileName, bool /* verbo
}
static bool releaseTranslator(Translator &tor, const QString &qmFileName,
- bool verbose, bool ignoreUnfinished,
- bool removeIdentical, bool idBased, TranslatorSaveMode mode)
+ ConversionData &cd, bool removeIdentical)
{
- Translator::reportDuplicates(tor.resolveDuplicates(), qmFileName, verbose);
+ Translator::reportDuplicates(tor.resolveDuplicates(), qmFileName, cd.isVerbose());
- if (verbose)
+ if (cd.isVerbose())
printOut(QCoreApplication::tr( "Updating '%1'...\n").arg(qmFileName));
if (removeIdentical) {
- if ( verbose )
+ if (cd.isVerbose())
printOut(QCoreApplication::tr( "Removing translations equal to source text in '%1'...\n").arg(qmFileName));
tor.stripIdenticalSourceTranslations();
}
@@ -120,12 +122,7 @@ static bool releaseTranslator(Translator &tor, const QString &qmFileName,
return false;
}
- ConversionData cd;
tor.normalizeTranslations(cd);
- cd.m_verbose = verbose;
- cd.m_ignoreUnfinished = ignoreUnfinished;
- cd.m_idBased = idBased;
- cd.m_saveMode = mode;
bool ok = tor.release(&file, cd);
file.close();
@@ -139,11 +136,11 @@ static bool releaseTranslator(Translator &tor, const QString &qmFileName,
return true;
}
-static bool releaseTsFile(const QString& tsFileName, bool verbose,
- bool ignoreUnfinished, bool removeIdentical, bool idBased, TranslatorSaveMode mode)
+static bool releaseTsFile(const QString& tsFileName,
+ ConversionData &cd, bool removeIdentical)
{
Translator tor;
- if (!loadTsFile(tor, tsFileName, verbose))
+ if (!loadTsFile(tor, tsFileName, cd.isVerbose()))
return false;
QString qmFileName = tsFileName;
@@ -155,7 +152,7 @@ static bool releaseTsFile(const QString& tsFileName, bool verbose,
}
qmFileName += QLatin1String(".qm");
- return releaseTranslator(tor, qmFileName, verbose, ignoreUnfinished, removeIdentical, idBased, mode);
+ return releaseTranslator(tor, qmFileName, cd, removeIdentical);
}
int main(int argc, char **argv)
@@ -166,37 +163,40 @@ int main(int argc, char **argv)
if (translator.load(QLatin1String("lrelease_") + QLocale::system().name()))
app.installTranslator(&translator);
- bool verbose = true; // the default is true starting with Qt 4.2
- bool ignoreUnfinished = false;
- bool idBased = false;
- // the default mode is SaveEverything starting with Qt 4.2
- TranslatorSaveMode mode = SaveEverything;
+ ConversionData cd;
+ cd.m_verbose = true; // the default is true starting with Qt 4.2
bool removeIdentical = false;
Translator tor;
+ QStringList inputFiles;
QString outputFile;
- int numFiles = 0;
for (int i = 1; i < argc; ++i) {
if (args[i] == QLatin1String("-compress")) {
- mode = SaveStripped;
+ cd.m_saveMode = SaveStripped;
continue;
} else if (args[i] == QLatin1String("-idbased")) {
- idBased = true;
+ cd.m_idBased = true;
continue;
} else if (args[i] == QLatin1String("-nocompress")) {
- mode = SaveEverything;
+ cd.m_saveMode = SaveEverything;
continue;
} else if (args[i] == QLatin1String("-removeidentical")) {
removeIdentical = true;
continue;
} else if (args[i] == QLatin1String("-nounfinished")) {
- ignoreUnfinished = true;
+ cd.m_ignoreUnfinished = true;
continue;
+ } else if (args[i] == QLatin1String("-markuntranslated")) {
+ if (i == argc - 1) {
+ printUsage();
+ return 1;
+ }
+ cd.m_unTrPrefix = args[++i];
} else if (args[i] == QLatin1String("-silent")) {
- verbose = false;
+ cd.m_verbose = false;
continue;
} else if (args[i] == QLatin1String("-verbose")) {
- verbose = true;
+ cd.m_verbose = true;
continue;
} else if (args[i] == QLatin1String("-version")) {
printOut(QCoreApplication::tr( "lrelease version %1\n").arg(QLatin1String(QT_VERSION_STR)) );
@@ -206,41 +206,37 @@ int main(int argc, char **argv)
printUsage();
return 1;
}
- i++;
- outputFile = args[i];
+ outputFile = args[++i];
} else if (args[i] == QLatin1String("-help")) {
printUsage();
return 0;
- } else if (args[i][0] == QLatin1Char('-')) {
+ } else if (args[i].startsWith(QLatin1Char('-'))) {
printUsage();
return 1;
} else {
- numFiles++;
+ inputFiles << args[i];
}
}
- if (numFiles == 0) {
+ if (inputFiles.isEmpty()) {
printUsage();
return 1;
}
- for (int i = 1; i < argc; ++i) {
- if (args[i][0] == QLatin1Char('-') || args[i] == outputFile)
- continue;
-
- if (args[i].endsWith(QLatin1String(".pro"), Qt::CaseInsensitive)
- || args[i].endsWith(QLatin1String(".pri"), Qt::CaseInsensitive)) {
+ foreach (const QString &inputFile, inputFiles) {
+ if (inputFile.endsWith(QLatin1String(".pro"), Qt::CaseInsensitive)
+ || inputFile.endsWith(QLatin1String(".pri"), Qt::CaseInsensitive)) {
QHash<QByteArray, QStringList> varMap;
- bool ok = evaluateProFile(args[i], verbose, &varMap );
+ bool ok = evaluateProFile(inputFile, cd.isVerbose(), &varMap);
if (ok) {
QStringList translations = varMap.value("TRANSLATIONS");
if (translations.isEmpty()) {
qWarning("lrelease warning: Met no 'TRANSLATIONS' entry in"
" project file '%s'\n",
- qPrintable(args[i]));
+ qPrintable(inputFile));
} else {
foreach (const QString &trans, translations)
- if (!releaseTsFile(trans, verbose, ignoreUnfinished, removeIdentical, idBased, mode))
+ if (!releaseTsFile(trans, cd, removeIdentical))
return 1;
}
} else {
@@ -251,18 +247,17 @@ int main(int argc, char **argv)
}
} else {
if (outputFile.isEmpty()) {
- if (!releaseTsFile(args[i], verbose, ignoreUnfinished, removeIdentical, idBased, mode))
+ if (!releaseTsFile(inputFile, cd, removeIdentical))
return 1;
} else {
- if (!loadTsFile(tor, args[i], verbose))
+ if (!loadTsFile(tor, inputFile, cd.isVerbose()))
return 1;
}
}
}
if (!outputFile.isEmpty())
- return releaseTranslator(tor, outputFile, verbose, ignoreUnfinished,
- removeIdentical, idBased, mode) ? 0 : 1;
+ return releaseTranslator(tor, outputFile, cd, removeIdentical) ? 0 : 1;
return 0;
}
diff --git a/tools/linguist/lupdate/cpp.cpp b/tools/linguist/lupdate/cpp.cpp
index 4d891562df..fb95a95f8a 100644
--- a/tools/linguist/lupdate/cpp.cpp
+++ b/tools/linguist/lupdate/cpp.cpp
@@ -135,6 +135,11 @@ struct Namespace {
// Nested classes may be forward-declared inside a definition, and defined in another file.
// The latter will detach the class' child list, so clones need a backlink to the original
// definition (either one in case of multiple definitions).
+ // Namespaces can have tr() functions as well, so we need to track parent definitions for
+ // them as well. The complication is that we may have to deal with a forrest instead of
+ // a tree - in that case the parent will be arbitrary. However, it seem likely that
+ // Q_DECLARE_TR_FUNCTIONS would be used either in "class-like" namespaces with a central
+ // header or only locally in a file.
Namespace *classDef;
QString trQualification;
@@ -256,17 +261,20 @@ private:
bool qualifyOneCallbackUsing(const Namespace *ns, void *context) const;
bool qualifyOne(const NamespaceList &namespaces, int nsCnt, const HashString &segment,
NamespaceList *resolved) const;
- bool fullyQualify(const NamespaceList &namespaces, const QList<HashString> &segments,
- bool isDeclaration,
+ bool fullyQualify(const NamespaceList &namespaces, int nsCnt,
+ const QList<HashString> &segments, bool isDeclaration,
NamespaceList *resolved, QStringList *unresolved) const;
- bool fullyQualify(const NamespaceList &namespaces, const QString &segments,
- bool isDeclaration,
+ bool fullyQualify(const NamespaceList &namespaces,
+ const QList<HashString> &segments, bool isDeclaration,
+ NamespaceList *resolved, QStringList *unresolved) const;
+ bool fullyQualify(const NamespaceList &namespaces,
+ const QString &segments, bool isDeclaration,
NamespaceList *resolved, QStringList *unresolved) const;
bool findNamespaceCallback(const Namespace *ns, void *context) const;
const Namespace *findNamespace(const NamespaceList &namespaces, int nsCount = -1) const;
void enterNamespace(NamespaceList *namespaces, const HashString &name);
void truncateNamespaces(NamespaceList *namespaces, int lenght);
- Namespace *modifyNamespace(NamespaceList *namespaces, bool tryOrigin = true);
+ Namespace *modifyNamespace(NamespaceList *namespaces, bool haveLast = true);
enum {
Tok_Eof, Tok_class, Tok_friend, Tok_namespace, Tok_using, Tok_return,
@@ -780,7 +788,7 @@ uint CppParser::getToken()
if (yyCh == EOF) {
qWarning("%s:%d: Unterminated C++ comment\n",
qPrintable(yyFileName), yyLineNo);
- return Tok_Comment;
+ break;
}
*ptr++ = yyCh;
@@ -958,7 +966,7 @@ void CppParser::loadState(const SavedState *state)
pendingContext = state->pendingContext;
}
-Namespace *CppParser::modifyNamespace(NamespaceList *namespaces, bool tryOrigin)
+Namespace *CppParser::modifyNamespace(NamespaceList *namespaces, bool haveLast)
{
Namespace *pns, *ns = &results->rootNamespace;
for (int i = 1; i < namespaces->count(); ++i) {
@@ -966,7 +974,7 @@ Namespace *CppParser::modifyNamespace(NamespaceList *namespaces, bool tryOrigin)
if (!(ns = pns->children.value(namespaces->at(i)))) {
do {
ns = new Namespace;
- if (tryOrigin)
+ if (haveLast || i < namespaces->count() - 1)
if (const Namespace *ons = findNamespace(*namespaces, i + 1))
ns->classDef = ons->classDef;
pns->children.insert(namespaces->at(i), ns);
@@ -1052,7 +1060,18 @@ bool CppParser::qualifyOneCallbackOwn(const Namespace *ns, void *context) const
}
QHash<HashString, NamespaceList>::ConstIterator nsai = ns->aliases.constFind(data->segment);
if (nsai != ns->aliases.constEnd()) {
- *data->resolved = *nsai;
+ const NamespaceList &nsl = *nsai;
+ if (nsl.last().value().isEmpty()) { // Delayed alias resolution
+ NamespaceList &nslIn = *const_cast<NamespaceList *>(&nsl);
+ nslIn.removeLast();
+ NamespaceList nslOut;
+ if (!fullyQualify(data->namespaces, data->nsCount, nslIn, false, &nslOut, 0)) {
+ const_cast<Namespace *>(ns)->aliases.remove(data->segment);
+ return false;
+ }
+ nslIn = nslOut;
+ }
+ *data->resolved = nsl;
return true;
}
return false;
@@ -1081,8 +1100,8 @@ bool CppParser::qualifyOne(const NamespaceList &namespaces, int nsCnt, const Has
return visitNamespace(namespaces, nsCnt, &CppParser::qualifyOneCallbackUsing, &data);
}
-bool CppParser::fullyQualify(const NamespaceList &namespaces, const QList<HashString> &segments,
- bool isDeclaration,
+bool CppParser::fullyQualify(const NamespaceList &namespaces, int nsCnt,
+ const QList<HashString> &segments, bool isDeclaration,
NamespaceList *resolved, QStringList *unresolved) const
{
int nsIdx;
@@ -1099,7 +1118,7 @@ bool CppParser::fullyQualify(const NamespaceList &namespaces, const QList<HashSt
nsIdx = 0;
} else {
initSegIdx = 0;
- nsIdx = namespaces.count() - 1;
+ nsIdx = nsCnt - 1;
}
do {
@@ -1122,8 +1141,16 @@ bool CppParser::fullyQualify(const NamespaceList &namespaces, const QList<HashSt
return false;
}
-bool CppParser::fullyQualify(const NamespaceList &namespaces, const QString &quali,
- bool isDeclaration,
+bool CppParser::fullyQualify(const NamespaceList &namespaces,
+ const QList<HashString> &segments, bool isDeclaration,
+ NamespaceList *resolved, QStringList *unresolved) const
+{
+ return fullyQualify(namespaces, namespaces.count(),
+ segments, isDeclaration, resolved, unresolved);
+}
+
+bool CppParser::fullyQualify(const NamespaceList &namespaces,
+ const QString &quali, bool isDeclaration,
NamespaceList *resolved, QStringList *unresolved) const
{
static QString strColons(QLatin1String("::"));
@@ -1633,9 +1660,8 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
}
if (fullName.isEmpty())
break;
- NamespaceList nsl;
- if (fullyQualify(namespaces, fullName, false, &nsl, 0))
- modifyNamespace(&namespaces, false)->aliases[ns] = nsl;
+ fullName.append(HashString(QString())); // Mark as unresolved
+ modifyNamespace(&namespaces)->aliases[ns] = fullName;
}
} else if (yyTok == Tok_LeftBrace) {
// Anonymous namespace
@@ -1661,7 +1687,7 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
}
NamespaceList nsl;
if (fullyQualify(namespaces, fullName, false, &nsl, 0))
- modifyNamespace(&namespaces, false)->usings << HashStringList(nsl);
+ modifyNamespace(&namespaces)->usings << HashStringList(nsl);
} else {
QList<HashString> fullName;
if (yyTok == Tok_ColonColon)
@@ -1676,9 +1702,13 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
}
if (fullName.isEmpty())
break;
- NamespaceList nsl;
- if (fullyQualify(namespaces, fullName, false, &nsl, 0))
- modifyNamespace(&namespaces, true)->aliases[nsl.last()] = nsl;
+ // using-declarations cannot rename classes, so the last element of
+ // fullName is already the resolved name we actually want.
+ // As we do no resolution here, we'll collect useless usings of data
+ // members and methods as well. This is no big deal.
+ HashString &ns = fullName.last();
+ fullName.append(HashString(QString())); // Mark as unresolved
+ modifyNamespace(&namespaces)->aliases[ns] = fullName;
}
break;
case Tok_tr:
@@ -1875,7 +1905,7 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
break;
case Tok_Q_DECLARE_TR_FUNCTIONS:
if (getMacroArgs()) {
- Namespace *ns = modifyNamespace(&namespaces, true);
+ Namespace *ns = modifyNamespace(&namespaces);
ns->hasTrFunctions = true;
ns->trQualification = yyWord;
ns->trQualification.detach();
@@ -1883,7 +1913,7 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
yyTok = getToken();
break;
case Tok_Q_OBJECT:
- modifyNamespace(&namespaces, true)->hasTrFunctions = true;
+ modifyNamespace(&namespaces)->hasTrFunctions = true;
yyTok = getToken();
break;
case Tok_Ident:
diff --git a/tools/linguist/shared/qm.cpp b/tools/linguist/shared/qm.cpp
index 317a07ef67..5965aac956 100644
--- a/tools/linguist/shared/qm.cpp
+++ b/tools/linguist/shared/qm.cpp
@@ -172,8 +172,8 @@ public:
bool save(QIODevice *iod);
- void insert(const TranslatorMessage &msg, bool forceComment);
- void insertIdBased(const TranslatorMessage &message);
+ void insert(const TranslatorMessage &msg, const QStringList &tlns, bool forceComment);
+ void insertIdBased(const TranslatorMessage &message, const QStringList &tlns);
void squeeze(TranslatorSaveMode mode);
@@ -186,7 +186,8 @@ private:
// on turn should be the same as passed to the actual tr(...) calls
QByteArray originalBytes(const QString &str, bool isUtf8) const;
- void insertInternal(const TranslatorMessage &message, bool forceComment, bool isUtf8);
+ void insertInternal(const TranslatorMessage &message, const QStringList &tlns,
+ bool forceComment, bool isUtf8);
static Prefix commonPrefix(const ByteTranslatorMessage &m1, const ByteTranslatorMessage &m2);
@@ -413,12 +414,13 @@ void Releaser::squeeze(TranslatorSaveMode mode)
}
}
-void Releaser::insertInternal(const TranslatorMessage &message, bool forceComment, bool isUtf8)
+void Releaser::insertInternal(const TranslatorMessage &message, const QStringList &tlns,
+ bool forceComment, bool isUtf8)
{
ByteTranslatorMessage bmsg(originalBytes(message.context(), isUtf8),
originalBytes(message.sourceText(), isUtf8),
originalBytes(message.comment(), isUtf8),
- message.translations());
+ tlns);
if (!forceComment) {
ByteTranslatorMessage bmsg2(
bmsg.context(), bmsg.sourceText(), QByteArray(""), bmsg.translations());
@@ -430,20 +432,15 @@ void Releaser::insertInternal(const TranslatorMessage &message, bool forceCommen
m_messages.insert(bmsg, 0);
}
-void Releaser::insert(const TranslatorMessage &message, bool forceComment)
+void Releaser::insert(const TranslatorMessage &message, const QStringList &tlns, bool forceComment)
{
- insertInternal(message, forceComment, message.isUtf8());
+ insertInternal(message, tlns, forceComment, message.isUtf8());
if (message.isUtf8() && message.isNonUtf8())
- insertInternal(message, forceComment, false);
+ insertInternal(message, tlns, forceComment, false);
}
-void Releaser::insertIdBased(const TranslatorMessage &message)
+void Releaser::insertIdBased(const TranslatorMessage &message, const QStringList &tlns)
{
- QStringList tlns = message.translations();
- if (message.type() == TranslatorMessage::Unfinished)
- for (int i = 0; i < tlns.size(); ++i)
- if (tlns.at(i).isEmpty())
- tlns[i] = message.sourceText();
ByteTranslatorMessage bmsg("", originalBytes(message.id(), false), "", tlns);
m_messages.insert(bmsg, 0);
}
@@ -725,10 +722,16 @@ static bool saveQM(const Translator &translator, QIODevice &dev, ConversionData
} else {
++finished;
}
+ QStringList tlns = msg.translations();
+ if (msg.type() == TranslatorMessage::Unfinished
+ && (cd.m_idBased || !cd.m_unTrPrefix.isEmpty()))
+ for (int j = 0; j < tlns.size(); ++j)
+ if (tlns.at(j).isEmpty())
+ tlns[j] = cd.m_unTrPrefix + msg.sourceText();
if (cd.m_idBased) {
if (!msg.context().isEmpty() || !msg.comment().isEmpty())
++droppedData;
- releaser.insertIdBased(msg);
+ releaser.insertIdBased(msg, tlns);
} else {
// Drop the comment in (context, sourceText, comment),
// unless the context is empty,
@@ -739,7 +742,7 @@ static bool saveQM(const Translator &translator, QIODevice &dev, ConversionData
msg.comment().isEmpty()
|| msg.context().isEmpty()
|| translator.contains(msg.context(), msg.sourceText(), QString());
- releaser.insert(msg, forceComment);
+ releaser.insert(msg, tlns, forceComment);
}
}
}
diff --git a/tools/linguist/shared/translator.h b/tools/linguist/shared/translator.h
index 1dd6a5934c..ef81d2adb8 100644
--- a/tools/linguist/shared/translator.h
+++ b/tools/linguist/shared/translator.h
@@ -86,6 +86,7 @@ public:
QString m_defaultContext;
QByteArray m_codecForSource; // CPP, PO & QM specific
QByteArray m_outputCodec; // PO specific
+ QString m_unTrPrefix; // QM specific
QString m_sourceFileName;
QString m_targetFileName;
QDir m_sourceDir;
diff --git a/tools/makeqpf/mainwindow.cpp b/tools/makeqpf/mainwindow.cpp
index 8fa372b166..45ea0a3274 100644
--- a/tools/makeqpf/mainwindow.cpp
+++ b/tools/makeqpf/mainwindow.cpp
@@ -269,7 +269,7 @@ void MainWindow::populateCharacterRanges()
if (line.isEmpty() || line.startsWith(QLatin1Char('#')))
continue;
- if (!rangeExpr.exactMatch(line) || rangeExpr.numCaptures() != 3)
+ if (!rangeExpr.exactMatch(line) || rangeExpr.captureCount() != 3)
continue;
QPF::CharacterRange range;
diff --git a/tools/makeqpf/qpf2.cpp b/tools/makeqpf/qpf2.cpp
index 23006f0e31..a0af1a01f3 100644
--- a/tools/makeqpf/qpf2.cpp
+++ b/tools/makeqpf/qpf2.cpp
@@ -519,7 +519,7 @@ void QPF::addGlyphs(QFontEngine *fe, const QList<CharacterRange> &ranges)
glyph_metrics_t metrics = fe->boundingBox(glyphIndex);
const quint32 oldSize = glyphs.size();
- glyphs.resize(glyphs.size() + sizeof(QFontEngineQPF::Glyph) + img.numBytes());
+ glyphs.resize(glyphs.size() + sizeof(QFontEngineQPF::Glyph) + img.byteCount());
uchar *data = reinterpret_cast<uchar *>(glyphs.data() + oldSize);
uchar *gmapPtr = reinterpret_cast<uchar *>(gmap.data() + glyphIndex * sizeof(quint32));
@@ -543,7 +543,7 @@ void QPF::addGlyphs(QFontEngine *fe, const QList<CharacterRange> &ranges)
;
}
- qMemCopy(data, img.bits(), img.numBytes());
+ qMemCopy(data, img.bits(), img.byteCount());
}
}
}
diff --git a/tools/qtestlib/wince/cetest/main.cpp b/tools/qtestlib/wince/cetest/main.cpp
index e00c0e7433..763439a837 100644
--- a/tools/qtestlib/wince/cetest/main.cpp
+++ b/tools/qtestlib/wince/cetest/main.cpp
@@ -129,6 +129,7 @@ void usage()
" -conf : Specify location of qt.conf file\n"
" -f <file> : Specify project file\n"
" -cache <file> : Specify .qmake.cache file to use\n"
+ " -d : Increase qmake debugging \n"
" -timeout <value> : Specify a timeout value after which the test will be terminated\n"
" -1 specifies waiting forever (default)\n"
" 0 specifies starting the process detached\n"
@@ -216,6 +217,8 @@ int main(int argc, char **argv)
return -1;
}
cacheFile = arguments.at(i);
+ } else if (arguments.at(i).toLower() == QLatin1String("-d")) {
+ Option::debug_level++;
} else if (arguments.at(i).toLower() == QLatin1String("-timeout")) {
if (++i == arguments.size()) {
cout << "Error: No timeout value specified!" << endl;
@@ -235,13 +238,22 @@ int main(int argc, char **argv)
return -1;
}
debugOutput(QString::fromLatin1("Using Project File:").append(proFile),1);
+ }else {
+ if (!QFileInfo(proFile).exists()) {
+ cout << "Error: Project file does not exist " << qPrintable(proFile) << endl;
+ return -1;
+ }
}
Option::before_user_vars.append("CONFIG+=build_pass");
- // read target and deployment rules
- int qmakeArgc = 1;
- char* qmakeArgv[] = { "qmake.exe" };
+ // read target and deployment rules passing the .pro to use instead of
+ // relying on qmake guessing the .pro to use
+ int qmakeArgc = 2;
+ QByteArray ba(QFile::encodeName(proFile));
+ char* proFileEncodedName = ba.data();
+ char* qmakeArgv[2] = { "qmake.exe", proFileEncodedName };
+
Option::qmake_mode = Option::QMAKE_GENERATE_NOTHING;
Option::output_dir = qmake_getpwd();
if (!cacheFile.isEmpty())
@@ -267,6 +279,24 @@ int main(int argc, char **argv)
else
TestConfiguration::testDebug = false;
+ // determine what is the real mkspec to use if the default mkspec is being used
+ if (Option::mkfile::qmakespec.endsWith("/default"))
+ project.values("QMAKESPEC") = project.values("QMAKESPEC_ORIGINAL");
+ else
+ project.values("QMAKESPEC") = QStringList() << Option::mkfile::qmakespec;
+
+ // ensure that QMAKESPEC is non-empty .. to meet requirements of QList::at()
+ if (project.values("QMAKESPEC").isEmpty()){
+ cout << "Error: QMAKESPEC not set after parsing " << qPrintable(proFile) << endl;
+ return -1;
+ }
+
+ // ensure that QT_CE_C_RUNTIME is non-empty .. to meet requirements of QList::at()
+ if (project.values("QT_CE_C_RUNTIME").isEmpty()){
+ cout << "Error: QT_CE_C_RUNTIME not defined in mkspec/qconfig.pri " << qPrintable(project.values("QMAKESPEC").join(" "));
+ return -1;
+ }
+
QString destDir = project.values("DESTDIR").join(" ");
if (!destDir.isEmpty()) {
if (QDir::isRelativePath(destDir)) {
diff --git a/tools/qvfb/qvfbview.cpp b/tools/qvfb/qvfbview.cpp
index 8cab641e0b..69817bdb8e 100644
--- a/tools/qvfb/qvfbview.cpp
+++ b/tools/qvfb/qvfbview.cpp
@@ -596,7 +596,7 @@ QImage QVFbView::getBuffer(const QRect &r, int &leading) const
r.width(), r.height(), mView->linestep(),
QImage::Format_Indexed8);
img.setColorTable(mView->clut());
- if (img.numColors() <= 0)
+ if (img.colorCount() <= 0)
img = QImage();
break;
}
@@ -613,10 +613,10 @@ QImage QVFbView::getBuffer(const QRect &r, int &leading) const
if ( img.format() != QImage::Format_ARGB32_Premultiplied )
img = img.convertToFormat(QImage::Format_RGB32);
- // NOTE: calling bits() may change numBytes(), so do not
+ // NOTE: calling bits() may change byteCount(), so do not
// pass them as parameters (which are evaluated right-to-left).
QRgb *b = (QRgb*)img.bits();
- int n = img.numBytes()/4;
+ int n = img.byteCount()/4;
dim(b,n,brightness);
}
}
diff --git a/tools/xmlpatterns/xmlpatterns.pro b/tools/xmlpatterns/xmlpatterns.pro
index 1c5ab2cdbf..47f5a48e5b 100644
--- a/tools/xmlpatterns/xmlpatterns.pro
+++ b/tools/xmlpatterns/xmlpatterns.pro
@@ -27,3 +27,6 @@ HEADERS = main.h \
qapplicationargumentparser.cpp \
qcoloringmessagehandler_p.h \
qcoloroutput_p.h
+
+symbian: TARGET.UID3 = 0xA000D7C9
+
diff --git a/tools/xmlpatternsvalidator/xmlpatternsvalidator.pro b/tools/xmlpatternsvalidator/xmlpatternsvalidator.pro
index 8491129619..17fc465bf5 100644
--- a/tools/xmlpatternsvalidator/xmlpatternsvalidator.pro
+++ b/tools/xmlpatternsvalidator/xmlpatternsvalidator.pro
@@ -15,3 +15,5 @@ CONFIG -= app_bundle
SOURCES = main.cpp
HEADERS = main.h
+
+symbian: TARGET.UID3 = 0xA000D7CA