summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/createpackage.pl96
-rw-r--r--demos/browser/browser.pro2
-rw-r--r--demos/browser/networkaccessmanager.cpp3
-rw-r--r--demos/browser/webview.cpp14
-rw-r--r--dist/changes-4.6.2274
-rw-r--r--doc/src/deployment/deployment.qdoc102
-rw-r--r--doc/src/development/qmake-manual.qdoc8
-rw-r--r--doc/src/development/qtestlib.qdoc4
-rw-r--r--doc/src/examples/googlesuggest.qdoc2
-rw-r--r--doc/src/getting-started/installation.qdoc8
-rw-r--r--doc/src/platforms/platform-notes.qdoc3
-rw-r--r--doc/src/platforms/symbian-introduction.qdoc15
-rw-r--r--doc/src/porting/porting4.qdoc6
-rw-r--r--doc/src/porting/qt4-network.qdoc2
-rw-r--r--doc/src/scripting/scripting.qdoc2
-rw-r--r--doc/src/snippets/code/doc_src_deployment.qdoc17
-rw-r--r--doc/src/snippets/code/doc_src_porting4.qdoc2
-rw-r--r--doc/src/widgets-and-layouts/styles.qdoc2
-rw-r--r--doc/src/widgets-and-layouts/stylesheet.qdoc2
-rw-r--r--mkspecs/common/symbian/symbian.conf6
-rw-r--r--mkspecs/features/moc.prf2
-rw-r--r--mkspecs/win32-icc/qmake.conf2
-rw-r--r--mkspecs/win32-msvc.net/qmake.conf89
-rw-r--r--mkspecs/win32-msvc.net/qplatformdefs.h140
-rw-r--r--mkspecs/win32-msvc/features/incremental.prf2
-rw-r--r--mkspecs/win32-msvc/features/incremental_off.prf2
-rw-r--r--mkspecs/win32-msvc/qmake.conf86
-rw-r--r--mkspecs/win32-msvc/qplatformdefs.h138
-rw-r--r--mkspecs/win32-msvc2002/qmake.conf88
-rw-r--r--qmake/Makefile.unix5
-rw-r--r--qmake/Makefile.win326
-rw-r--r--qmake/Makefile.win32-g++5
-rw-r--r--qmake/Makefile.win32-g++-sh5
-rw-r--r--qmake/generators/makefile.cpp22
-rw-r--r--qmake/generators/metamakefile.cpp10
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.cpp2
-rw-r--r--qmake/generators/symbian/symmake.cpp65
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp17
-rw-r--r--qmake/generators/unix/unixmake.cpp6
-rw-r--r--qmake/generators/win32/msvc_dsp.cpp1207
-rw-r--r--qmake/generators/win32/msvc_dsp.h122
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp3
-rw-r--r--qmake/option.cpp7
-rw-r--r--qmake/option.h2
-rw-r--r--qmake/project.cpp20
-rw-r--r--qmake/property.cpp2
-rw-r--r--qmake/qmake.pri4
-rw-r--r--qmake/qmake.pro14
-rw-r--r--src/3rdparty/s60/eiksoftkeyimage.h17
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog13
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp4
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog12
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro4
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/KURLQt.cpp6
-rw-r--r--src/corelib/arch/sparc/arch.pri2
-rw-r--r--src/corelib/codecs/qsimplecodec.cpp2
-rw-r--r--src/corelib/codecs/qtextcodec.cpp46
-rw-r--r--src/corelib/global/qglobal.cpp2
-rw-r--r--src/corelib/global/qglobal.h3
-rw-r--r--src/corelib/global/qnamespace.qdoc6
-rw-r--r--src/corelib/tools/qstring.h2
-rw-r--r--src/declarative/debugger/qmldebugservice.cpp33
-rw-r--r--src/declarative/debugger/qmldebugservice_p.h4
-rw-r--r--src/declarative/graphicsitems/graphicsitems.pri3
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsanchors.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp1
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsborderimage.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicseffects.cpp13
-rw-r--r--src/declarative/graphicsitems/qmlgraphicseffects_p.h65
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsevents.cpp3
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsflickable.cpp37
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsflickable_p_p.h32
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsflipable.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp1
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp3
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsgridview.cpp61
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsgridview_p.h58
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsimage.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitem.cpp210
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitem.h2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitem_p.h201
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitemsmodule.cpp164
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitemsmodule_p.h (renamed from mkspecs/win32-msvc2002/qplatformdefs.h)27
-rw-r--r--src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicslistview.cpp71
-rw-r--r--src/declarative/graphicsitems/qmlgraphicslistview_p.h67
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsloader.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp3
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsparticles.cpp10
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspath.cpp8
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspathview.cpp3
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspositioners.cpp4
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsrectangle.cpp4
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsrepeater.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsscalegrid.cpp1
-rw-r--r--src/declarative/graphicsitems/qmlgraphicstext.cpp1
-rw-r--r--src/declarative/graphicsitems/qmlgraphicstextedit.cpp1
-rw-r--r--src/declarative/graphicsitems/qmlgraphicstextinput.cpp6
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp42
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsvisualitemmodel_p.h39
-rw-r--r--src/declarative/graphicsitems/qmlgraphicswebview.cpp28
-rw-r--r--src/declarative/graphicsitems/qmlgraphicswebview_p.h26
-rw-r--r--src/declarative/qml/qmlcomponent.cpp1
-rw-r--r--src/declarative/qml/qmlengine.cpp8
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp5
-rw-r--r--src/gui/image/qicon.cpp17
-rw-r--r--src/gui/image/qimagereader.cpp28
-rw-r--r--src/gui/image/qpixmapfilter.cpp17
-rw-r--r--src/gui/itemviews/qlistview.cpp2
-rw-r--r--src/gui/kernel/qapplication.cpp14
-rw-r--r--src/gui/kernel/qapplication_mac.mm6
-rw-r--r--src/gui/kernel/qapplication_p.h2
-rw-r--r--src/gui/kernel/qapplication_s60.cpp11
-rw-r--r--src/gui/kernel/qapplication_win.cpp28
-rw-r--r--src/gui/kernel/qapplication_x11.cpp8
-rw-r--r--src/gui/kernel/qclipboard_mac.cpp12
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm5
-rw-r--r--src/gui/kernel/qkeymapper_x11.cpp14
-rw-r--r--src/gui/kernel/qsoftkeymanager_s60.cpp16
-rw-r--r--src/gui/kernel/qsoftkeymanager_s60_p.h1
-rw-r--r--src/gui/kernel/qwidget.cpp4
-rw-r--r--src/gui/kernel/qwidget_p.h5
-rw-r--r--src/gui/kernel/qwidget_s60.cpp2
-rw-r--r--src/gui/painting/qdrawhelper.cpp36
-rw-r--r--src/gui/painting/qdrawhelper_mmx_p.h45
-rw-r--r--src/gui/painting/qdrawhelper_p.h3
-rw-r--r--src/gui/painting/qpaintengine_x11.cpp3
-rw-r--r--src/gui/painting/qpainter.cpp23
-rw-r--r--src/gui/painting/qwindowsurface_s60.cpp11
-rw-r--r--src/gui/text/qfont.cpp5
-rw-r--r--src/gui/text/qfontengine_s60.cpp2
-rw-r--r--src/gui/text/qtextlayout.cpp6
-rw-r--r--src/gui/util/qsystemtrayicon_p.h2
-rw-r--r--src/gui/util/qsystemtrayicon_x11.cpp2
-rw-r--r--src/gui/widgets/qabstractslider.cpp6
-rw-r--r--src/gui/widgets/qabstractspinbox.h2
-rw-r--r--src/gui/widgets/qcombobox.h2
-rw-r--r--src/gui/widgets/qlinecontrol.cpp2
-rw-r--r--src/gui/widgets/qmenu.h2
-rw-r--r--src/gui/widgets/qscrollbar.cpp2
-rw-r--r--src/multimedia/video/qabstractvideobuffer.cpp1
-rw-r--r--src/multimedia/video/qabstractvideosurface.cpp1
-rw-r--r--src/multimedia/video/qvideoframe.cpp1
-rw-r--r--src/multimedia/video/qvideosurfaceformat.cpp1
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp27
-rw-r--r--src/network/access/qhttpnetworkreply.cpp68
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp2
-rw-r--r--src/network/access/qnetworkcookie.h2
-rw-r--r--src/network/access/qnetworkcookiejar.h2
-rw-r--r--src/opengl/qgl.cpp9
-rw-r--r--src/opengl/qgl_mac.mm2
-rw-r--r--src/opengl/qgl_p.h4
-rw-r--r--src/opengl/qglpixelbuffer_x11.cpp6
-rw-r--r--src/opengl/qglpixmapfilter.cpp1
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp11
-rw-r--r--src/qt3support/dialogs/q3filedialog.cpp40
-rw-r--r--src/qt3support/itemviews/q3iconview.cpp13
-rw-r--r--src/qt3support/itemviews/q3listview.cpp3
-rw-r--r--src/s60installs/bwins/QtGuiu.def53
-rw-r--r--src/s60installs/bwins/QtOpenVGu.def29
-rw-r--r--src/s60installs/eabi/QtOpenVGu.def23
-rw-r--r--src/s60installs/qt.iby3
-rw-r--r--src/sql/drivers/sqlite/qsql_sqlite.cpp47
-rw-r--r--src/sql/kernel/qsqldatabase.cpp1
-rw-r--r--src/xmlpatterns/data/qatomicvalue.cpp2
-rw-r--r--src/xmlpatterns/schema/qxsdschemaparser.cpp2
-rw-r--r--tests/auto/declarative/declarative.pro5
-rw-r--r--tests/auto/declarative/qmldebug/tst_qmldebug.cpp40
-rw-r--r--tests/auto/declarative/qmldebugservice/tst_qmldebugservice.cpp1
-rw-r--r--tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp9
-rw-r--r--tests/auto/declarative/qmlengine/qmlengine.pro2
-rw-r--r--tests/auto/declarative/qmlmetatype/tst_qmlmetatype.cpp9
-rw-r--r--tests/auto/declarative/qmlxmlhttprequest/data/abort.reply1
-rw-r--r--tests/auto/declarative/qmlxmlhttprequest/data/getResponseHeader.reply1
-rw-r--r--tests/auto/declarative/qmlxmlhttprequest/data/open_network.reply1
-rw-r--r--tests/auto/declarative/qmlxmlhttprequest/data/send_data.reply1
-rw-r--r--tests/auto/declarative/qmlxmlhttprequest/data/send_ignoreData.reply1
-rw-r--r--tests/auto/declarative/qmlxmlhttprequest/data/setRequestHeader.reply1
-rw-r--r--tests/auto/declarative/qmlxmlhttprequest/data/setRequestHeader_illegalName.qml1
-rw-r--r--tests/auto/declarative/qmlxmlhttprequest/data/status.200.reply1
-rw-r--r--tests/auto/declarative/qmlxmlhttprequest/data/status.404.reply1
-rwxr-xr-xtests/auto/declarative/runall.sh8
-rw-r--r--tests/auto/declarative/shared/debugutil.cpp21
-rw-r--r--tests/auto/declarative/shared/debugutil_p.h25
-rw-r--r--tests/auto/declarative/shared/testhttpserver.cpp11
-rw-r--r--tests/auto/qabstractitemview/tst_qabstractitemview.cpp11
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp2
-rw-r--r--tests/auto/qimagereader/tst_qimagereader.cpp29
-rw-r--r--tests/auto/qlineedit/tst_qlineedit.cpp28
-rw-r--r--tests/auto/qlistview/tst_qlistview.cpp86
-rw-r--r--tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp1
-rw-r--r--tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp64
-rw-r--r--tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp14
-rw-r--r--tests/auto/qscriptvalue/testgen/data.txt4
-rwxr-xr-xtests/auto/qscriptvalue/testgen/gen.py2
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp127
-rw-r--r--tests/auto/qsqldatabase/tst_qsqldatabase.cpp20
-rw-r--r--tests/auto/qtextcodec/tst_qtextcodec.cpp46
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp11
-rw-r--r--tests/benchmarks/benchmarks.pro49
-rw-r--r--tests/benchmarks/corelib/corelib.pro6
-rw-r--r--tests/benchmarks/corelib/io/io.pro9
-rw-r--r--tests/benchmarks/corelib/io/qdir/qdir.pro (renamed from tests/benchmarks/qdir/qdir.pro)0
-rw-r--r--tests/benchmarks/corelib/io/qdir/tst_qdir.cpp (renamed from tests/benchmarks/qdir/tst_qdir.cpp)0
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/main.cpp (renamed from tests/benchmarks/qdiriterator/main.cpp)0
-rwxr-xr-xtests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro (renamed from tests/benchmarks/qdiriterator/qdiriterator.pro)0
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp (renamed from tests/benchmarks/qdiriterator/qfilesystemiterator.cpp)0
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h (renamed from tests/benchmarks/qdiriterator/qfilesystemiterator.h)0
-rw-r--r--tests/benchmarks/corelib/io/qfile/main.cpp (renamed from tests/benchmarks/qfile/main.cpp)0
-rw-r--r--tests/benchmarks/corelib/io/qfile/qfile.pro (renamed from tests/benchmarks/qfile/qfile.pro)0
-rw-r--r--tests/benchmarks/corelib/io/qfileinfo/main.cpp (renamed from tests/benchmarks/qfileinfo/main.cpp)0
-rw-r--r--tests/benchmarks/corelib/io/qfileinfo/qfileinfo.pro (renamed from tests/benchmarks/qfileinfo/qfileinfo.pro)0
-rw-r--r--tests/benchmarks/corelib/io/qiodevice/main.cpp (renamed from tests/benchmarks/qiodevice/main.cpp)0
-rwxr-xr-xtests/benchmarks/corelib/io/qiodevice/qiodevice.pro (renamed from tests/benchmarks/qiodevice/qiodevice.pro)0
-rw-r--r--tests/benchmarks/corelib/io/qtemporaryfile/main.cpp (renamed from tests/benchmarks/qtemporaryfile/main.cpp)0
-rw-r--r--tests/benchmarks/corelib/io/qtemporaryfile/qtemporaryfile.pro (renamed from tests/benchmarks/qtemporaryfile/qtemporaryfile.pro)0
-rw-r--r--tests/benchmarks/corelib/kernel/events/events.pro (renamed from tests/benchmarks/events/events.pro)0
-rw-r--r--tests/benchmarks/corelib/kernel/events/main.cpp (renamed from tests/benchmarks/events/main.cpp)0
-rw-r--r--tests/benchmarks/corelib/kernel/kernel.pro6
-rw-r--r--tests/benchmarks/corelib/kernel/qmetaobject/main.cpp (renamed from tests/benchmarks/qmetaobject/main.cpp)0
-rw-r--r--tests/benchmarks/corelib/kernel/qmetaobject/qmetaobject.pro (renamed from tests/benchmarks/qmetaobject/qmetaobject.pro)0
-rw-r--r--tests/benchmarks/corelib/kernel/qobject/main.cpp (renamed from tests/benchmarks/qobject/main.cpp)0
-rw-r--r--tests/benchmarks/corelib/kernel/qobject/object.cpp (renamed from tests/benchmarks/qobject/object.cpp)0
-rw-r--r--tests/benchmarks/corelib/kernel/qobject/object.h (renamed from tests/benchmarks/qobject/object.h)0
-rw-r--r--tests/benchmarks/corelib/kernel/qobject/qobject.pro (renamed from tests/benchmarks/qobject/qobject.pro)0
-rw-r--r--tests/benchmarks/corelib/kernel/qvariant/qvariant.pro (renamed from tests/benchmarks/qvariant/qvariant.pro)0
-rw-r--r--tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp (renamed from tests/benchmarks/qvariant/tst_qvariant.cpp)0
-rw-r--r--tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro (renamed from tests/benchmarks/qthreadstorage/qthreadstorage.pro)0
-rw-r--r--tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp (renamed from tests/benchmarks/qthreadstorage/tst_qthreadstorage.cpp)0
-rw-r--r--tests/benchmarks/corelib/thread/thread.pro3
-rw-r--r--tests/benchmarks/corelib/tools/containers-associative/containers-associative.pro (renamed from tests/benchmarks/containers-associative/containers-associative.pro)0
-rw-r--r--tests/benchmarks/corelib/tools/containers-associative/main.cpp (renamed from tests/benchmarks/containers-associative/main.cpp)0
-rw-r--r--tests/benchmarks/corelib/tools/containers-sequential/containers-sequential.pro (renamed from tests/benchmarks/containers-sequential/containers-sequential.pro)0
-rw-r--r--tests/benchmarks/corelib/tools/containers-sequential/main.cpp (renamed from tests/benchmarks/containers-sequential/main.cpp)0
-rw-r--r--tests/benchmarks/corelib/tools/qbytearray/main.cpp (renamed from tests/benchmarks/qbytearray/main.cpp)0
-rwxr-xr-xtests/benchmarks/corelib/tools/qbytearray/qbytearray.pro (renamed from tests/benchmarks/qbytearray/qbytearray.pro)0
-rw-r--r--tests/benchmarks/corelib/tools/qrect/main.cpp (renamed from tests/benchmarks/qrect/main.cpp)0
-rw-r--r--tests/benchmarks/corelib/tools/qrect/qrect.pro (renamed from tests/benchmarks/qrect/qrect.pro)0
-rw-r--r--tests/benchmarks/corelib/tools/qregexp/main.cpp (renamed from tests/benchmarks/qregexp/main.cpp)0
-rw-r--r--tests/benchmarks/corelib/tools/qregexp/qregexp.pro (renamed from tests/benchmarks/qregexp/qregexp.pro)0
-rw-r--r--tests/benchmarks/corelib/tools/qstring/main.cpp (renamed from tests/benchmarks/qstring/main.cpp)0
-rw-r--r--tests/benchmarks/corelib/tools/qstring/qstring.pro (renamed from tests/benchmarks/qstring/qstring.pro)0
-rw-r--r--tests/benchmarks/corelib/tools/qstring/utf-8.txt (renamed from tests/benchmarks/qstring/utf-8.txt)0
-rw-r--r--tests/benchmarks/corelib/tools/qstringbuilder/main.cpp (renamed from tests/benchmarks/qstringbuilder/main.cpp)0
-rw-r--r--tests/benchmarks/corelib/tools/qstringbuilder/qstringbuilder.pro (renamed from tests/benchmarks/qstringbuilder/qstringbuilder.pro)0
-rw-r--r--tests/benchmarks/corelib/tools/qstringlist/.gitignore (renamed from tests/benchmarks/qstringlist/.gitignore)0
-rw-r--r--tests/benchmarks/corelib/tools/qstringlist/main.cpp (renamed from tests/benchmarks/qstringlist/main.cpp)0
-rw-r--r--tests/benchmarks/corelib/tools/qstringlist/qstringlist.pro (renamed from tests/benchmarks/qstringlist/qstringlist.pro)0
-rw-r--r--tests/benchmarks/corelib/tools/tools.pro10
-rw-r--r--tests/benchmarks/gui/animation/animation.pro2
-rw-r--r--tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp (renamed from tests/benchmarks/qanimation/dummyanimation.cpp)0
-rw-r--r--tests/benchmarks/gui/animation/qanimation/dummyanimation.h (renamed from tests/benchmarks/qanimation/dummyanimation.h)0
-rw-r--r--tests/benchmarks/gui/animation/qanimation/dummyobject.cpp (renamed from tests/benchmarks/qanimation/dummyobject.cpp)0
-rw-r--r--tests/benchmarks/gui/animation/qanimation/dummyobject.h (renamed from tests/benchmarks/qanimation/dummyobject.h)0
-rw-r--r--tests/benchmarks/gui/animation/qanimation/main.cpp (renamed from tests/benchmarks/qanimation/main.cpp)0
-rw-r--r--tests/benchmarks/gui/animation/qanimation/qanimation.pro (renamed from tests/benchmarks/qanimation/qanimation.pro)0
-rw-r--r--tests/benchmarks/gui/animation/qanimation/rectanimation.cpp (renamed from tests/benchmarks/qanimation/rectanimation.cpp)0
-rw-r--r--tests/benchmarks/gui/animation/qanimation/rectanimation.h (renamed from tests/benchmarks/qanimation/rectanimation.h)0
-rw-r--r--tests/benchmarks/gui/graphicsview/graphicsview.pro7
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/qgraphicsanchorlayout.pro (renamed from tests/benchmarks/qgraphicsanchorlayout/qgraphicsanchorlayout.pro)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp (renamed from tests/benchmarks/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsitem/qgraphicsitem.pro (renamed from tests/benchmarks/qgraphicsitem/qgraphicsitem.pro)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp (renamed from tests/benchmarks/qgraphicsitem/tst_qgraphicsitem.cpp)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsscene/qgraphicsscene.pro (renamed from tests/benchmarks/qgraphicsscene/qgraphicsscene.pro)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp (renamed from tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp (renamed from tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.cpp)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.debug (renamed from tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.debug)bin863805 -> 863805 bytes
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h (renamed from tests/benchmarks/qgraphicsview/chiptester/chip.h)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.pro (renamed from tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.pro)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/fileprint.png (renamed from tests/benchmarks/qgraphicsview/benchapps/chipTest/fileprint.png)bin1456 -> 1456 bytes
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/images.qrc (renamed from tests/benchmarks/qgraphicsview/benchapps/chipTest/images.qrc)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp (renamed from tests/benchmarks/qgraphicsview/benchapps/chipTest/main.cpp)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp (renamed from tests/benchmarks/qgraphicsview/benchapps/chipTest/mainwindow.cpp)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h (renamed from tests/benchmarks/qgraphicsview/benchapps/chipTest/mainwindow.h)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/qt4logo.png (renamed from tests/benchmarks/qgraphicsview/chiptester/qt4logo.png)bin48333 -> 48333 bytes
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/rotateleft.png (renamed from tests/benchmarks/qgraphicsview/benchapps/chipTest/rotateleft.png)bin1754 -> 1754 bytes
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/rotateright.png (renamed from tests/benchmarks/qgraphicsview/benchapps/chipTest/rotateright.png)bin1732 -> 1732 bytes
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp (renamed from tests/benchmarks/qgraphicsview/benchapps/chipTest/view.cpp)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h (renamed from tests/benchmarks/qgraphicsview/benchapps/chipTest/view.h)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/zoomin.png (renamed from tests/benchmarks/qgraphicsview/benchapps/chipTest/zoomin.png)bin1622 -> 1622 bytes
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/zoomout.png (renamed from tests/benchmarks/qgraphicsview/benchapps/chipTest/zoomout.png)bin1601 -> 1601 bytes
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp (renamed from tests/benchmarks/qgraphicsview/benchapps/moveItems/main.cpp)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/moveItems.pro (renamed from tests/benchmarks/qgraphicsview/benchapps/moveItems/moveItems.pro)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp (renamed from tests/benchmarks/qgraphicsview/benchapps/scrolltest/main.cpp)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/scrolltest.pro (renamed from tests/benchmarks/qgraphicsview/benchapps/scrolltest/scrolltest.pro)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.cpp (renamed from tests/benchmarks/qgraphicsview/chiptester/chip.cpp)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h (renamed from tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.h)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp (renamed from tests/benchmarks/qgraphicsview/chiptester/chiptester.cpp)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h (renamed from tests/benchmarks/qgraphicsview/chiptester/chiptester.h)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.pri (renamed from tests/benchmarks/qgraphicsview/chiptester/chiptester.pri)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/images.qrc (renamed from tests/benchmarks/qgraphicsview/chiptester/images.qrc)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/qt4logo.png (renamed from tests/benchmarks/qgraphicsview/benchapps/chipTest/qt4logo.png)bin48333 -> 48333 bytes
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/images/designer.png (renamed from tests/benchmarks/qgraphicsview/images/designer.png)bin4205 -> 4205 bytes
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/images/wine-big.jpeg (renamed from tests/benchmarks/qgraphicsview/images/wine-big.jpeg)bin12249 -> 12249 bytes
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/images/wine.jpeg (renamed from tests/benchmarks/qgraphicsview/images/wine.jpeg)bin2265 -> 2265 bytes
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/qgraphicsview.pro (renamed from tests/benchmarks/qgraphicsview/qgraphicsview.pro)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/qgraphicsview.qrc (renamed from tests/benchmarks/qgraphicsview/qgraphicsview.qrc)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/random.data (renamed from tests/benchmarks/qgraphicsview/random.data)bin800 -> 800 bytes
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp (renamed from tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp)28
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicswidget/qgraphicswidget.pro (renamed from tests/benchmarks/qgraphicswidget/qgraphicswidget.pro)0
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp (renamed from tests/benchmarks/qgraphicswidget/tst_qgraphicswidget.cpp)0
-rw-r--r--tests/benchmarks/gui/gui.pro11
-rw-r--r--tests/benchmarks/gui/image/blendbench/blendbench.pro (renamed from tests/benchmarks/blendbench/blendbench.pro)0
-rw-r--r--tests/benchmarks/gui/image/blendbench/main.cpp (renamed from tests/benchmarks/blendbench/main.cpp)0
-rw-r--r--tests/benchmarks/gui/image/image.pro6
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/16bpp.bmp (renamed from tests/benchmarks/qimagereader/images/16bpp.bmp)bin153654 -> 153654 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/4bpp-rle.bmp (renamed from tests/benchmarks/qimagereader/images/4bpp-rle.bmp)bin23662 -> 23662 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/YCbCr_cmyk.jpg (renamed from tests/benchmarks/qimagereader/images/YCbCr_cmyk.jpg)bin3699 -> 3699 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/YCbCr_cmyk.png (renamed from tests/benchmarks/qimagereader/images/YCbCr_cmyk.png)bin230 -> 230 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/YCbCr_rgb.jpg (renamed from tests/benchmarks/qimagereader/images/YCbCr_rgb.jpg)bin2045 -> 2045 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/away.png (renamed from tests/benchmarks/qimagereader/images/away.png)bin753 -> 753 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/ball.mng (renamed from tests/benchmarks/qimagereader/images/ball.mng)bin34394 -> 34394 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/bat1.gif (renamed from tests/benchmarks/qimagereader/images/bat1.gif)bin953 -> 953 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/bat2.gif (renamed from tests/benchmarks/qimagereader/images/bat2.gif)bin980 -> 980 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/beavis.jpg (renamed from tests/benchmarks/qimagereader/images/beavis.jpg)bin20688 -> 20688 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/black.png (renamed from tests/benchmarks/qimagereader/images/black.png)bin697 -> 697 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/black.xpm (renamed from tests/benchmarks/qimagereader/images/black.xpm)0
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/colorful.bmp (renamed from tests/benchmarks/qimagereader/images/colorful.bmp)bin65002 -> 65002 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/corrupt-colors.xpm (renamed from tests/benchmarks/qimagereader/images/corrupt-colors.xpm)0
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/corrupt-data.tif (renamed from tests/benchmarks/qimagereader/images/corrupt-data.tif)bin8590 -> 8590 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/corrupt-pixels.xpm (renamed from tests/benchmarks/qimagereader/images/corrupt-pixels.xpm)0
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/corrupt.bmp (renamed from tests/benchmarks/qimagereader/images/corrupt.bmp)bin116 -> 116 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/corrupt.gif (renamed from tests/benchmarks/qimagereader/images/corrupt.gif)bin2608 -> 2608 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/corrupt.jpg (renamed from tests/benchmarks/qimagereader/images/corrupt.jpg)bin18 -> 18 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/corrupt.mng (renamed from tests/benchmarks/qimagereader/images/corrupt.mng)bin183 -> 183 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/corrupt.png (renamed from tests/benchmarks/qimagereader/images/corrupt.png)bin95 -> 95 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/corrupt.xbm (renamed from tests/benchmarks/qimagereader/images/corrupt.xbm)0
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/crash-signed-char.bmp (renamed from tests/benchmarks/qimagereader/images/crash-signed-char.bmp)bin45748 -> 45748 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/earth.gif (renamed from tests/benchmarks/qimagereader/images/earth.gif)bin51712 -> 51712 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/fire.mng (renamed from tests/benchmarks/qimagereader/images/fire.mng)bin44430 -> 44430 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/font.bmp (renamed from tests/benchmarks/qimagereader/images/font.bmp)bin1026 -> 1026 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/gnus.xbm (renamed from tests/benchmarks/qimagereader/images/gnus.xbm)0
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/image.pbm (renamed from tests/benchmarks/qimagereader/images/image.pbm)0
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/image.pgm (renamed from tests/benchmarks/qimagereader/images/image.pgm)0
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/image.png (renamed from tests/benchmarks/qimagereader/images/image.png)bin549 -> 549 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/image.ppm (renamed from tests/benchmarks/qimagereader/images/image.ppm)0
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/kollada-noext (renamed from tests/benchmarks/qimagereader/images/kollada-noext)bin13907 -> 13907 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/kollada.png (renamed from tests/benchmarks/qimagereader/images/kollada.png)bin13907 -> 13907 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/marble.xpm (renamed from tests/benchmarks/qimagereader/images/marble.xpm)0
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/namedcolors.xpm (renamed from tests/benchmarks/qimagereader/images/namedcolors.xpm)0
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/negativeheight.bmp (renamed from tests/benchmarks/qimagereader/images/negativeheight.bmp)bin24630 -> 24630 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/noclearcode.bmp (renamed from tests/benchmarks/qimagereader/images/noclearcode.bmp)bin326 -> 326 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/noclearcode.gif (renamed from tests/benchmarks/qimagereader/images/noclearcode.gif)bin130 -> 130 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/nontransparent.xpm (renamed from tests/benchmarks/qimagereader/images/nontransparent.xpm)0
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/pngwithcompressedtext.png (renamed from tests/benchmarks/qimagereader/images/pngwithcompressedtext.png)bin757 -> 757 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/pngwithtext.png (renamed from tests/benchmarks/qimagereader/images/pngwithtext.png)bin796 -> 796 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/rgba_adobedeflate_littleendian.tif (renamed from tests/benchmarks/qimagereader/images/rgba_adobedeflate_littleendian.tif)bin4784 -> 4784 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/rgba_lzw_littleendian.tif (renamed from tests/benchmarks/qimagereader/images/rgba_lzw_littleendian.tif)bin26690 -> 26690 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_bigendian.tif (renamed from tests/benchmarks/qimagereader/images/rgba_nocompression_bigendian.tif)bin160384 -> 160384 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_littleendian.tif (renamed from tests/benchmarks/qimagereader/images/rgba_nocompression_littleendian.tif)bin160388 -> 160388 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/rgba_packbits_littleendian.tif (renamed from tests/benchmarks/qimagereader/images/rgba_packbits_littleendian.tif)bin161370 -> 161370 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/rgba_zipdeflate_littleendian.tif (renamed from tests/benchmarks/qimagereader/images/rgba_zipdeflate_littleendian.tif)bin14728 -> 14728 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/runners.ppm (renamed from tests/benchmarks/qimagereader/images/runners.ppm)bin960016 -> 960016 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/task210380.jpg (renamed from tests/benchmarks/qimagereader/images/task210380.jpg)bin975535 -> 975535 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/teapot.ppm (renamed from tests/benchmarks/qimagereader/images/teapot.ppm)0
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/test.ppm (renamed from tests/benchmarks/qimagereader/images/test.ppm)0
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/test.xpm (renamed from tests/benchmarks/qimagereader/images/test.xpm)0
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/transparent.xpm (renamed from tests/benchmarks/qimagereader/images/transparent.xpm)0
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/trolltech.gif (renamed from tests/benchmarks/qimagereader/images/trolltech.gif)bin42629 -> 42629 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/tst7.bmp (renamed from tests/benchmarks/qimagereader/images/tst7.bmp)bin582 -> 582 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/tst7.png (renamed from tests/benchmarks/qimagereader/images/tst7.png)bin167 -> 167 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/qimagereader.pro (renamed from tests/benchmarks/qimagereader/qimagereader.pro)0
-rw-r--r--tests/benchmarks/gui/image/qimagereader/tst_qimagereader.cpp (renamed from tests/benchmarks/qimagereader/tst_qimagereader.cpp)0
-rw-r--r--tests/benchmarks/gui/image/qpixmap/qpixmap.pro (renamed from tests/benchmarks/qpixmap/qpixmap.pro)0
-rw-r--r--tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp (renamed from tests/benchmarks/qpixmap/tst_qpixmap.cpp)0
-rw-r--r--tests/benchmarks/gui/image/qpixmapcache/qpixmapcache.pro (renamed from tests/benchmarks/qpixmapcache/qpixmapcache.pro)0
-rw-r--r--tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp (renamed from tests/benchmarks/qpixmapcache/tst_qpixmapcache.cpp)0
-rw-r--r--tests/benchmarks/gui/itemviews/itemviews.pro3
-rw-r--r--tests/benchmarks/gui/itemviews/qtableview/qtableview.pro (renamed from tests/benchmarks/qtableview/qtableview.pro)0
-rw-r--r--tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp (renamed from tests/benchmarks/qtableview/tst_qtableview.cpp)0
-rw-r--r--tests/benchmarks/gui/kernel/kernel.pro4
-rw-r--r--tests/benchmarks/gui/kernel/qapplication/main.cpp (renamed from tests/benchmarks/qapplication/main.cpp)0
-rw-r--r--tests/benchmarks/gui/kernel/qapplication/qapplication.pro (renamed from tests/benchmarks/qapplication/qapplication.pro)0
-rw-r--r--tests/benchmarks/gui/kernel/qwidget/qwidget.pro (renamed from tests/benchmarks/qwidget/qwidget.pro)0
-rw-r--r--tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp (renamed from tests/benchmarks/qwidget/tst_qwidget.cpp)0
-rw-r--r--tests/benchmarks/gui/math3d/math3d.pro4
-rw-r--r--tests/benchmarks/gui/math3d/qmatrix4x4/qmatrix4x4.pro (renamed from tests/benchmarks/qmatrix4x4/qmatrix4x4.pro)0
-rw-r--r--tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp (renamed from tests/benchmarks/qmatrix4x4/tst_qmatrix4x4.cpp)0
-rw-r--r--tests/benchmarks/gui/math3d/qquaternion/qquaternion.pro (renamed from tests/benchmarks/qquaternion/qquaternion.pro)0
-rw-r--r--tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp (renamed from tests/benchmarks/qquaternion/tst_qquaternion.cpp)0
-rw-r--r--tests/benchmarks/gui/painting/painting.pro5
-rw-r--r--tests/benchmarks/gui/painting/qpainter/qpainter.pro (renamed from tests/benchmarks/qpainter/qpainter.pro)0
-rw-r--r--tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp (renamed from tests/benchmarks/qpainter/tst_qpainter.cpp)0
-rw-r--r--tests/benchmarks/gui/painting/qregion/main.cpp (renamed from tests/benchmarks/qregion/main.cpp)0
-rw-r--r--tests/benchmarks/gui/painting/qregion/qregion.pro (renamed from tests/benchmarks/qregion/qregion.pro)0
-rw-r--r--tests/benchmarks/gui/painting/qtransform/qtransform.pro (renamed from tests/benchmarks/qtransform/qtransform.pro)0
-rw-r--r--tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp (renamed from tests/benchmarks/qtransform/tst_qtransform.cpp)0
-rw-r--r--tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp (renamed from tests/benchmarks/qstylesheetstyle/main.cpp)0
-rw-r--r--tests/benchmarks/gui/styles/qstylesheetstyle/qstylesheetstyle.pro (renamed from tests/benchmarks/qstylesheetstyle/qstylesheetstyle.pro)0
-rw-r--r--tests/benchmarks/gui/styles/styles.pro3
-rw-r--r--tests/benchmarks/gui/text/qfontmetrics/main.cpp (renamed from tests/benchmarks/qfontmetrics/main.cpp)0
-rw-r--r--tests/benchmarks/gui/text/qfontmetrics/qfontmetrics.pro (renamed from tests/benchmarks/qfontmetrics/qfontmetrics.pro)0
-rw-r--r--tests/benchmarks/gui/text/qtext/bidi.txt (renamed from tests/benchmarks/qtext/bidi.txt)0
-rw-r--r--tests/benchmarks/gui/text/qtext/main.cpp (renamed from tests/benchmarks/qtext/main.cpp)0
-rw-r--r--tests/benchmarks/gui/text/qtext/qtext.pro (renamed from tests/benchmarks/qtext/qtext.pro)0
-rw-r--r--tests/benchmarks/gui/text/text.pro4
-rw-r--r--tests/benchmarks/network/access/access.pro4
-rw-r--r--tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp (renamed from tests/benchmarks/qfile_vs_qnetworkaccessmanager/main.cpp)2
-rw-r--r--tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/qfile_vs_qnetworkaccessmanager.pro (renamed from tests/benchmarks/qfile_vs_qnetworkaccessmanager/qfile_vs_qnetworkaccessmanager.pro)0
-rw-r--r--tests/benchmarks/network/access/qnetworkreply/qnetworkreply.pro (renamed from tests/benchmarks/qnetworkreply/qnetworkreply.pro)0
-rw-r--r--tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp (renamed from tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp)2
-rw-r--r--tests/benchmarks/network/kernel/kernel.pro3
-rw-r--r--tests/benchmarks/network/kernel/qhostinfo/main.cpp (renamed from tests/benchmarks/qhostinfo/main.cpp)0
-rwxr-xr-xtests/benchmarks/network/kernel/qhostinfo/qhostinfo.pro (renamed from tests/benchmarks/qhostinfo/qhostinfo.pro)0
-rw-r--r--tests/benchmarks/network/network.pro5
-rw-r--r--tests/benchmarks/network/socket/qtcpserver/qtcpserver.pro (renamed from tests/benchmarks/qtcpserver/qtcpserver.pro)0
-rw-r--r--tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp (renamed from tests/benchmarks/qtcpserver/tst_qtcpserver.cpp)2
-rw-r--r--tests/benchmarks/network/socket/socket.pro3
-rw-r--r--tests/benchmarks/qscriptclass/tst_qscriptclass.cpp511
-rw-r--r--tests/benchmarks/qtestlib-simple/main.cpp117
-rw-r--r--tests/benchmarks/qtestlib-simple/qtestlib-simple.pro8
-rw-r--r--tests/benchmarks/qtwidgets/advanced.ui319
-rw-r--r--tests/benchmarks/qtwidgets/icons/big.pngbin1323 -> 0 bytes
-rw-r--r--tests/benchmarks/qtwidgets/icons/folder.pngbin4069 -> 0 bytes
-rw-r--r--tests/benchmarks/qtwidgets/icons/icon.bmpbin246 -> 0 bytes
-rw-r--r--tests/benchmarks/qtwidgets/icons/icon.pngbin344 -> 0 bytes
-rw-r--r--tests/benchmarks/qtwidgets/mainwindow.cpp313
-rw-r--r--tests/benchmarks/qtwidgets/mainwindow.h80
-rw-r--r--tests/benchmarks/qtwidgets/qtstyles.qrc8
-rw-r--r--tests/benchmarks/qtwidgets/qtwidgets.pro9
-rw-r--r--tests/benchmarks/qtwidgets/standard.ui1207
-rw-r--r--tests/benchmarks/qtwidgets/system.ui658
-rw-r--r--tests/benchmarks/qtwidgets/tst_qtwidgets.cpp67
-rw-r--r--tests/benchmarks/script/qscriptclass/qscriptclass.pro (renamed from tests/benchmarks/qscriptclass/qscriptclass.pro)0
-rw-r--r--tests/benchmarks/script/qscriptclass/tst_qscriptclass.cpp285
-rw-r--r--tests/benchmarks/script/qscriptengine/qscriptengine.pro (renamed from tests/benchmarks/qscriptengine/qscriptengine.pro)0
-rw-r--r--tests/benchmarks/script/qscriptengine/tst_qscriptengine.cpp (renamed from tests/benchmarks/qscriptengine/tst_qscriptengine.cpp)0
-rw-r--r--tests/benchmarks/script/qscriptvalue/qscriptvalue.pro (renamed from tests/benchmarks/qscriptvalue/qscriptvalue.pro)0
-rw-r--r--tests/benchmarks/script/qscriptvalue/tst_qscriptvalue.cpp (renamed from tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp)0
-rw-r--r--tests/benchmarks/script/script.pro5
-rw-r--r--tests/benchmarks/svg/qsvgrenderer/data/tiger.svg (renamed from tests/benchmarks/qsvgrenderer/data/tiger.svg)0
-rw-r--r--tests/benchmarks/svg/qsvgrenderer/qsvgrenderer.pro (renamed from tests/benchmarks/qsvgrenderer/qsvgrenderer.pro)0
-rw-r--r--tests/benchmarks/svg/qsvgrenderer/qsvgrenderer.qrc (renamed from tests/benchmarks/qsvgrenderer/qsvgrenderer.qrc)0
-rw-r--r--tests/benchmarks/svg/qsvgrenderer/tst_qsvgrenderer.cpp (renamed from tests/benchmarks/qsvgrenderer/tst_qsvgrenderer.cpp)0
-rw-r--r--tests/benchmarks/svg/svg.pro3
-rw-r--r--tests/tests.pro3
-rw-r--r--tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp230
-rw-r--r--tools/assistant/tools/assistant/aboutdialog.cpp31
-rw-r--r--tools/assistant/tools/assistant/assistant.pro4
-rw-r--r--tools/assistant/tools/assistant/bookmarkdialog.cpp8
-rw-r--r--tools/assistant/tools/assistant/centralwidget.cpp104
-rw-r--r--tools/assistant/tools/assistant/centralwidget.h5
-rw-r--r--tools/assistant/tools/assistant/contentwindow.cpp4
-rw-r--r--tools/assistant/tools/assistant/helpviewer.cpp601
-rw-r--r--tools/assistant/tools/assistant/helpviewer.h137
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qtb.cpp331
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qtb.h116
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qwv.cpp413
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qwv.h122
-rw-r--r--tools/assistant/tools/assistant/indexwindow.cpp2
-rw-r--r--tools/assistant/tools/assistant/mainwindow.cpp7
-rw-r--r--tools/assistant/tools/assistant/preferencesdialog.cpp26
-rw-r--r--tools/designer/src/lib/shared/actionrepository.cpp21
-rw-r--r--tools/designer/src/lib/shared/actionrepository_p.h9
-rw-r--r--tools/designer/src/lib/shared/iconloader.cpp3
-rw-r--r--tools/designer/src/lib/shared/qdesigner_menu.cpp11
-rw-r--r--tools/designer/src/lib/shared/qdesigner_menu_p.h2
-rw-r--r--tools/linguist/linguist/images/transbox.pngbin782 -> 0 bytes
-rw-r--r--tools/linguist/linguist/linguist.qrc3
-rw-r--r--tools/linguist/linguist/messageeditor.cpp8
-rw-r--r--tools/linguist/linguist/messagemodel.cpp48
-rw-r--r--tools/linguist/linguist/messagemodel.h2
-rw-r--r--tools/qmlviewer/qmlviewer.cpp11
-rw-r--r--tools/runonphone/main.cpp4
-rw-r--r--tools/runonphone/runonphone.pro4
-rw-r--r--tools/runonphone/symbianutils/bluetoothlistener.cpp (renamed from tools/runonphone/trk/bluetoothlistener.cpp)2
-rw-r--r--tools/runonphone/symbianutils/bluetoothlistener.h (renamed from tools/runonphone/trk/bluetoothlistener.h)4
-rw-r--r--tools/runonphone/symbianutils/bluetoothlistener_gui.cpp (renamed from tools/runonphone/trk/bluetoothlistener_gui.cpp)6
-rw-r--r--tools/runonphone/symbianutils/bluetoothlistener_gui.h (renamed from tools/runonphone/trk/bluetoothlistener_gui.h)8
-rw-r--r--tools/runonphone/symbianutils/callback.h (renamed from tools/runonphone/trk/callback.h)2
-rw-r--r--tools/runonphone/symbianutils/communicationstarter.cpp (renamed from tools/runonphone/trk/communicationstarter.cpp)21
-rw-r--r--tools/runonphone/symbianutils/communicationstarter.h (renamed from tools/runonphone/trk/communicationstarter.h)10
-rw-r--r--tools/runonphone/symbianutils/launcher.cpp (renamed from tools/runonphone/trk/launcher.cpp)34
-rw-r--r--tools/runonphone/symbianutils/launcher.h (renamed from tools/runonphone/trk/launcher.h)2
-rw-r--r--tools/runonphone/symbianutils/symbiandevicemanager.cpp331
-rw-r--r--tools/runonphone/symbianutils/symbiandevicemanager.h145
-rw-r--r--tools/runonphone/symbianutils/symbianutils.pri (renamed from tools/runonphone/trk/trk.pri)10
-rw-r--r--tools/runonphone/symbianutils/symbianutils_global.h55
-rw-r--r--tools/runonphone/symbianutils/trkdevice.cpp (renamed from tools/runonphone/trk/trkdevice.cpp)47
-rw-r--r--tools/runonphone/symbianutils/trkdevice.h (renamed from tools/runonphone/trk/trkdevice.h)9
-rw-r--r--tools/runonphone/symbianutils/trkutils.cpp (renamed from tools/runonphone/trk/trkutils.cpp)106
-rw-r--r--tools/runonphone/symbianutils/trkutils.h (renamed from tools/runonphone/trk/trkutils.h)45
-rw-r--r--tools/runonphone/symbianutils/trkutils_p.h62
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp16
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h1
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertymanager.cpp82
-rw-r--r--translations/qt_de.ts8
-rw-r--r--util/qlalr/cppgenerator.cpp2
490 files changed, 4663 insertions, 7697 deletions
diff --git a/bin/createpackage.pl b/bin/createpackage.pl
index a748ba5..1d6ab6b 100755
--- a/bin/createpackage.pl
+++ b/bin/createpackage.pl
@@ -54,6 +54,8 @@ use Getopt::Long;
use File::Basename;
# Use File::Spec services mainly rel2abs
use File::Spec;
+# Use File::Path - to make stub sis target directory
+use File::Path;
# use CWD abs_bath, which is exported only on request
use Cwd 'abs_path';
@@ -95,10 +97,10 @@ Example with certfile:
# This is comment line, also the empty lines are ignored
rd.cer;rd-key.pem
.\\cert\\mycert.cer;.\\cert\\mykey.key;yourpassword
- X:\\QtS60\\selfsigned.cer;X:\\QtS60\\selfsigned.key
+ X:\\QtS60\\s60installs\\selfsigned.cer;X:\\QtS60\\s60installs\\selfsigned.key
If no certificate and key files are provided, either a RnD certificate or
-a self-signed certificate from Qt installation root directory is used.
+a self-signed certificate from QtDir\\src\\s60installs directory is used.
==============================================================================================
ENDUSAGESTRING
@@ -111,11 +113,13 @@ my $install = "";
my $preprocessonly = "";
my $certfile = "";
my $preserveUnsigned = "";
+my $stub = "";
unless (GetOptions('i|install' => \$install,
'p|preprocess' => \$preprocessonly,
'c|certfile=s' => \$certfile,
- 'u|unsigned' => \$preserveUnsigned,)){
+ 'u|unsigned' => \$preserveUnsigned,
+ 's|stub' => \$stub,)){
Usage();
}
@@ -149,8 +153,11 @@ $pkgoutputbasename = lc($pkgoutputbasename);
# Store output file names to variables
my $pkgoutput = lc($pkgoutputbasename.".pkg");
-my $unsigned_sis_name = $pkgoutputbasename."_unsigned.sis";
-my $signed_sis_name = $pkgoutputbasename.".sis";
+my $sisoutputbasename = lc($pkgoutputbasename);
+$sisoutputbasename =~ s/_$targetplatform//g;
+my $unsigned_sis_name = $sisoutputbasename."_unsigned.sis";
+my $signed_sis_name = $sisoutputbasename.".sis";
+my $stub_sis_name = $sisoutputbasename."_stub.sis";
# Store some utility variables
my $scriptpath = dirname(__FILE__);
@@ -252,44 +259,57 @@ if ($preprocessonly) {
exit;
}
-# Create SIS.
-system ("makesis $pkgoutput $unsigned_sis_name");
-
-# Sign SIS with certificate info given as an argument.
-system ("signsis $unsigned_sis_name $signed_sis_name $certificate $key $passphrase");
-
-# Check if creating signed SIS Succeeded
-stat($signed_sis_name);
-if( -e _ ) {
- print ("\nSuccessfully created $signed_sis_name using certificate: $certtext!\n");
+if($stub) {
+ if(!($ENV{EPOCROOT})) { die("EPOCROOT must be set to create stub sis files"); }
+ my $systeminstall = "$ENV{EPOCROOT}epoc32/data/z/system/install";
+ mkpath($systeminstall);
+ my $stub_sis_name = $systeminstall."/".$stub_sis_name;
+ # Create stub SIS.
+ system ("makesis -s $pkgoutput $stub_sis_name");
+} else {
+ # Create SIS.
+ system ("makesis $pkgoutput $unsigned_sis_name");
+ print("\n");
+
+ # Sign SIS with certificate info given as an argument.
+ system ("signsis $unsigned_sis_name $signed_sis_name $certificate $key $passphrase");
+
+ # Check if creating signed SIS Succeeded
+ stat($signed_sis_name);
+ if( -e _ ) {
+ my $targetInsert = "";
+ if ($targetplatform ne "-") {
+ $targetInsert = "for $targetplatform ";
+ }
+ print ("Successfully created $signed_sis_name ${targetInsert}using certificate: $certtext!\n");
- # Sign with additional certificates & keys
- for my $row ( @certificates ) {
- # Get certificate absolute file names, relative paths are relative to certfilepath
- my $abscert = File::Spec->rel2abs( $row->[0], $certfilepath);
- my $abskey = File::Spec->rel2abs( $row->[1], $certfilepath);
+ # Sign with additional certificates & keys
+ for my $row ( @certificates ) {
+ # Get certificate absolute file names, relative paths are relative to certfilepath
+ my $abscert = File::Spec->rel2abs( $row->[0], $certfilepath);
+ my $abskey = File::Spec->rel2abs( $row->[1], $certfilepath);
- system ("signsis $signed_sis_name $signed_sis_name $abscert $abskey $row->[2]");
- print ("\tAdditionally signed the SIS with certificate: $row->[0]!\n");
- }
+ system ("signsis $signed_sis_name $signed_sis_name $abscert $abskey $row->[2]");
+ print ("\tAdditionally signed the SIS with certificate: $row->[0]!\n");
+ }
- # remove temporary pkg and unsigned sis
- if (!$preservePkgOutput) {
- unlink $pkgoutput;
- }
- if (!$preserveUnsigned) {
- unlink $unsigned_sis_name;
- }
+ # remove temporary pkg and unsigned sis
+ if (!$preservePkgOutput) {
+ unlink $pkgoutput;
+ }
+ if (!$preserveUnsigned) {
+ unlink $unsigned_sis_name;
+ }
- # Install the sis if requested
- if ($install) {
- print ("\nInstalling $signed_sis_name...\n");
- system ("$signed_sis_name");
+ # Install the sis if requested
+ if ($install) {
+ print ("\nInstalling $signed_sis_name...\n");
+ system ("$signed_sis_name");
+ }
+ } else {
+ # Lets leave the generated PKG for problem solving purposes
+ print ("\nSIS creation failed!\n");
}
-} else {
- # Lets leave the generated PKG for problem solving purposes
- print ("\nSIS creation failed!\n");
}
-
#end of file
diff --git a/demos/browser/browser.pro b/demos/browser/browser.pro
index a42aa60..f038c61 100644
--- a/demos/browser/browser.pro
+++ b/demos/browser/browser.pro
@@ -6,8 +6,6 @@ CONFIG += qt warn_on
contains(QT_BUILD_PARTS, tools):!embedded: CONFIG += uitools
else: DEFINES += QT_NO_UITOOLS
-release:DEFINES+=QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT
-
FORMS += \
addbookmarkdialog.ui \
bookmarks.ui \
diff --git a/demos/browser/networkaccessmanager.cpp b/demos/browser/networkaccessmanager.cpp
index b0b00a2..70a9305 100644
--- a/demos/browser/networkaccessmanager.cpp
+++ b/demos/browser/networkaccessmanager.cpp
@@ -112,8 +112,9 @@ void NetworkAccessManager::requestFinished(QNetworkReply *reply)
double pctCached = (double(requestFinishedFromCacheCount) * 100.0/ double(requestFinishedCount));
double pctPipelined = (double(requestFinishedPipelinedCount) * 100.0/ double(requestFinishedCount));
double pctSecure = (double(requestFinishedSecureCount) * 100.0/ double(requestFinishedCount));
+#ifdef QT_DEBUG
qDebug("STATS [%lli requests total] [%3.2f%% from cache] [%3.2f%% pipelined] [%3.2f%% SSL/TLS]", requestFinishedCount, pctCached, pctPipelined, pctSecure);
-
+#endif
}
void NetworkAccessManager::loadSettings()
diff --git a/demos/browser/webview.cpp b/demos/browser/webview.cpp
index 1a7e38a..2f9b3e6 100644
--- a/demos/browser/webview.cpp
+++ b/demos/browser/webview.cpp
@@ -143,11 +143,19 @@ QObject *WebPage::createPlugin(const QString &classId, const QUrl &url, const QS
void WebPage::handleUnsupportedContent(QNetworkReply *reply)
{
- if (reply->error() == QNetworkReply::NoError) {
- BrowserApplication::downloadManager()->handleUnsupportedContent(reply);
+ QString errorString = reply->errorString();
+
+ if (m_loadingUrl != reply->url()) {
+ // sub resource of this page
+ qWarning() << "Resource" << reply->url().toEncoded() << "has unknown Content-Type, will be ignored.";
+ reply->deleteLater();
return;
}
+ if (reply->error() == QNetworkReply::NoError && !reply->header(QNetworkRequest::ContentTypeHeader).isValid()) {
+ errorString = "Unknown Content-Type";
+ }
+
QFile file(QLatin1String(":/notfound.html"));
bool isOpened = file.open(QIODevice::ReadOnly);
Q_ASSERT(isOpened);
@@ -156,7 +164,7 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply)
QString title = tr("Error loading page: %1").arg(reply->url().toString());
QString html = QString(QLatin1String(file.readAll()))
.arg(title)
- .arg(reply->errorString())
+ .arg(errorString)
.arg(reply->url().toString());
QBuffer imageBuffer;
diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2
index aaaaacc..657aafc 100644
--- a/dist/changes-4.6.2
+++ b/dist/changes-4.6.2
@@ -16,22 +16,6 @@ Qt Bug Tracker: http://bugreports.qt.nokia.com
Task Tracker: http://qt.nokia.com/developer/task-tracker
Merge Request: http://qt.gitorious.org
-****************************************************************************
-* General *
-****************************************************************************
-
-New features
-------------
-
- - SomeClass, SomeOtherClass
- * New classes for foo, bar and baz
-
-Optimizations
--------------
-
- - Optimized foo in QSomeClass
- * See list of Important Behavior Changes below
-
****************************************************************************
* Library *
@@ -42,98 +26,88 @@ QtCore
- QAtomicPointer
* [QTBUG-7356] Fixed a compilation failure when using the Intel
- compiler on IA-64
-
+ compiler on IA-64
- QFile
* Fixed double-buffering issue when opening files in buffered mode.
- * [QTBUG-7285] QFile::remove would fail if an unrelated operation on the
- same instance had been previously failed. This manisfested itself in
- QTemporaryFile failing to auto-remove files and QFile::copy leaving
+ * [QTBUG-7285] QFile::remove would() fail if an unrelated operation on the
+ same instance had been previously failed. This manifested itself in
+ QTemporaryFile failing to auto-remove files and QFile::copy() leaving
temporary files behind in certain situations.
-
- QFSFileEngine
- * Fix typo that made realpath() not being used
-
+ * Fix typo that made realpath() not be used.
- QIODevice
- * Optimized readAll()
-
+ * Optimized readAll().
- QReadWriteLock
- * [MR 426] Fixed documentation
-
+ * [MR 426] Fixed documentation.
- QXmlStreamWriter
- * [QTBUG-6893] Fixed adding extra Byte Order Marks when writing to a xml file.
+ * [QTBUG-6893] Fixed adding extra Byte Order Marks when writing to a
+ .xml file.
QtGui
-----
+ - QApplication
+ * [QTBUG-6098] Added a flag to avoid construction of application panes.
+ * [QTBUG-7029] Fixed a crash when re-creating QApplication object due
+ to a dangling gesture manager pointer.
- QAbstractScrollArea
- * [QTBUG-1760] Reverted horizontal scrolling with mouse wheel when vertical scrollbar is hidden
-
+ * [QTBUG-1760] Reverted horizontal scrolling with mouse wheel when vertical
+ scrollbar is hidden
- QBmpHandler
- * [QTBUG-7530] Fixed an infinite loop that could occur when reading invalid BMP images.
-
+ * [QTBUG-7530] Fixed an infinite loop that could occur when reading invalid
+ BMP images.
- QGraphicsEffect
* [QTBUG-6901] Fixed performance problem when translating items with
graphics effects.
-
- QImage
* [QTBUG-7231] Avoid an unnecessary copy in QImage::scaled().
-
- - QPDFEngine
- * [QTBUG-7249] Fixed the encoding of the Tile and Creator tags in the PDF engine.
-
- - QApplication
- * [QTBUG-6098] Added a flag to avoid construction of application panes.
- QInputContext
- * [QTBUG-7439] Avoided the loss of preedit text when losing focus on Symbian.
-
- * [QT-2629] Implemented event filter functions for Symbian.
- * [QTBUG-7029] Fixed a crash when re-creating QApplication object due to a
- dangling gesture manager pointer.
- * [QTBUG-7198] Setting a style sheet could break the checkbox position in item views.
- * [QTBUG-7253] Fixed wrong stroke clipping with the raster engine when using a QPen
- with a style other than SolidLine.
-
-
- * [MR 2077] Integrated merge request 2077
+ * [QTBUG-7439] Avoided the loss of preedit text when losing focus on
+ Symbian.
+ - QPDFEngine
+ * [QTBUG-7249] Fixed the encoding of the Tile and Creator tags in the PDF
+ engine.
+ - [QT-2629] Implemented event filter functions for Symbian.
+ - [QTBUG-7198] Setting a style sheet could break the checkbox position in
+ item views.
+ - [QTBUG-7253] Fixed wrong stroke clipping with the raster engine when using
+ a QPen with a style other than SolidLine.
QtDBus
------
- QDBusConnection
- * [QT-2307] Fixed sending of D-Bus method calls with QDBus::BlockWithGui
+ * [QT-2307] Fixed sending of D-Bus method calls with QDBus::BlockWithGui.
QtNetwork
---------
- QNetworkAccessManager
* Optimizations
- * HTTP: Get rid of QAbstractSocket warnings that were sometimes displayed
- * HTTP: setReadBufferSize() of the QNetworkReply finally is working on all layers
- * [QTBUG-7713] HTTP: Fix bug related to re-sending a request
+ * HTTP: Get rid of QAbstractSocket warnings that were sometimes displayed.
+ * HTTP: setReadBufferSize() of the QNetworkReply finally is working on all
+ layers.
+ * [QTBUG-7713] HTTP: Fix bug related to re-sending a request.
* [QTBUG-7060] Fixed an issue with parsing of HTTP headers like
- "private, max-age=300"
-
+ "private, max-age=300".
- QSslCertificate
- * [QTBUG-6466] Fix issuerInfo() and subjectInfo()
-
+ * [QTBUG-6466] Fix issuerInfo() and subjectInfo().
- QTcpSocket
- * [QTBUG-7344] Fix performance degredation with write() on Windows
- * [QTBUG-7316,QTBUG-7317] Also handle unknown errors from socket engine
+ * [QTBUG-7344] Fix performance degredation with write() on Windows.
+ * [QTBUG-7316,QTBUG-7317] Handle unknown errors from socket engine.
QtOpenGL
--------
- [QTBUG-7490] Better support for user-generated binary shaders.
-
- - QGLWidget
- * [QTBUG-7213] Fixed QGLWidget::renderPixmap() on Windows.
-
- QGLPixelBuffer
- * [QTBUG-7476] Fixed a crash under X11 when drawing QPixmaps to QGLPixelBuffers.
-
+ * [QTBUG-7476] Fixed a crash under X11 when drawing QPixmaps to
+ QGLPixelBuffers.
- QGL2PaintEngineEx
* [QTBUG-7203] Reset the GL stencil mask, op and function in resetGLState().
+ - QGLWidget
+ * [QTBUG-7213] Fixed QGLWidget::renderPixmap() on Windows.
+
QtOpenVG
--------
@@ -141,137 +115,89 @@ QtOpenVG
- [QTBUG-7791] Optimize single-rect IntersectClip in OpenVG using the scissor.
- [QTBUG-7864] Use OpenVG scissor on 90/180/270 rotations and simple clips.
-QtScript
---------
-
- - foo
- * bar
-
-QtSql
------
-
- - foo
- * bar
-
-QtXml
------
-
- - foo
- * bar
-
QtMultimedia
------------
- QAudioInput
- * [QTBUG-7044]: QAudioInput stopped working correctly after suspend()/resume() on linux.
-
-Qt Plugins
-----------
-
- - foo
- * bar
+ * [QTBUG-7044]: QAudioInput stopped working correctly after
+ suspend()/resume() on linux.
Examples
--------
- QtMultimedia
- * [MR 418] Fixed the example for QAudioOutput
-
+ * [MR 418] Fixed the example for QAudioOutput.
- WebKit
- * [MR 2235] Added the framecapture example to the default build
-
-Third party components
-----------------------
-
- - Updated foo to version 2.3.9.
-
- - Updated bar to the latest version from baz.org.
+ * [MR 2235] Added the framecapture example to the default build.
****************************************************************************
* Platform Specific Changes *
****************************************************************************
-Qt for Unix (X11 and Mac OS X)
-------------------------------
-
- -
-
Qt for Linux/X11
----------------
- * Fix a bug where QPixmap::serialNumber was not set on a transformed pixmap
- in Qt/X11.
-
- * Fixed a crash when an input method tries to create a widget after the
- application is destroyed.
-
- - [QTBUG-6952] Fixed a problem using NoButtons in spinbox with QGtkStyle
- - [QTBUG-7504] Fixed missing focus rect on check- and radiobutton with
- some GTK+ themes.
- - [QTBUG-6522] Fixed missing menu separator in some GTK+ themes.
-
-Qt for Windows
---------------
+ - Fix a bug where QPixmap::serialNumber was not set on a transformed pixmap
+ in Qt/X11.
+ - Fixed a crash when an input method tries to create a widget after the
+ application is destroyed.
+ - [QTBUG-6952] Fixed a problem using NoButtons in spinbox with QGtkStyle.
+ - [QTBUG-7504] Fixed missing focus rect on check- and radiobutton with
+ some GTK+ themes.
+ - [QTBUG-6522] Fixed missing menu separator in some GTK+ themes.
Qt for Mac OS X
---------------
- [QTBUG-7832]: Restored missing margins around non-unified toolbars.
- - [QTBUG-7312]: Menubar and dock disappear after hiding a fullscreen widget on Cocoa.
- - [QTBUG-7481]: Re-added the Close button in QPrintPreviewDialog for Mac/Carbon.
- - [QTBUG-7522]: Drawing fake buttons using QMacStyle+QStyleOptionViewItemV4 lead to crash.
- - [QTBUG-7625]: Calling showFullScreen() then showNormal() on a widget results in top menu hiding.
- - [QTBUG-7086]: QFileDialog now correctly responds to fileMode & acceptMode changes.
- - [QTBUG-7162]: Fixed a crash in Designer when previewing a QMainWindow with native toolbar.
- - [QTBUG-7305]: Fixed a crash when deleting QMainWindow with native toolbar on Cocoa.
- - [QTBUG-6882]: Fixed a text layout issue with QHeaderView in right-to-left mode.
-
-
-Qt for Embedded Linux
----------------------
-
- -
+ - [QTBUG-7312]: Menubar and dock disappear after hiding a fullscreen widget
+ on Cocoa.
+ - [QTBUG-7481]: Re-added the Close button in QPrintPreviewDialog for
+ Mac/Carbon.
+ - [QTBUG-7522]: Drawing fake buttons using QMacStyle+QStyleOptionViewItemV4
+ lead to crash.
+ - [QTBUG-7625]: Calling showFullScreen() then showNormal() on a widget results
+ in top menu hiding.
+ - [QTBUG-7086]: QFileDialog now correctly responds to fileMode & acceptMode
+ changes.
+ - [QTBUG-7162]: Fixed a crash in Designer when previewing a QMainWindow with
+ native toolbar.
+ - [QTBUG-7305]: Fixed a crash when deleting QMainWindow with native toolbar
+ on Cocoa.
+ - [QTBUG-6882]: Fixed a text layout issue with QHeaderView in right-to-left
+ mode.
DirectFB
--------
- * Fix a bug where QPixmap::serialNumber was not set on a transformed pixmap
- in DirectFB.
- * Reimplement QPixmapData::scroll for QDirectFBPixmapData which optimizes
- QPixmap::scroll
- * Fix a rendering issue for semi-transparent top level windows in DirectFB.
- * Make it possible to fall back to the raster engine for stretch blits in
- DirectFB using QT_NO_DIRECTFB_STRETCHBLIT
- -
-
-Qt for Windows CE
------------------
- -
+ - Fix a bug where QPixmap::serialNumber was not set on a transformed pixmap
+ in DirectFB.
+ - Reimplement QPixmapData::scroll for QDirectFBPixmapData which optimizes
+ QPixmap::scroll.
+ - Fix a rendering issue for semi-transparent top level windows in DirectFB.
+ - Make it possible to fall back to the raster engine for stretch blits in
+ DirectFB using QT_NO_DIRECTFB_STRETCHBLIT.
Qt for Symbian
--------------
- * [QTBUG-6556] Improve the DEF file handling scheme, to allow simple enable/
- disable of DEF file usage (for use _during development only_ to decouple
- the need to update the DEF files at the precise point that symbols are
- removed, therefore allowing builds by CI systems to succeed even if symbols
- have been removed. This does not remove the need to update the DEF files
- before release. NOTE: Builds generated using this flag are not binary
- compatible with previous versions of Qt.)
-
-- QProcess
- * [QTBUG-7667] Fixed no-timeout case for QProcess::waitForFinished.
-
-- qmake
- * [QTBUG-7695] Added support for ifdeffing for manufacturer in generated
- pkg files.
- * [QTBUG-7908] Smart installer package generation support
-
-- Patch_capabilities script
+ - [QTBUG-6556] Improve the DEF file handling scheme, to allow simple enable/
+ disable of DEF file usage (for use _during development only_ to decouple
+ the need to update the DEF files at the precise point that symbols are
+ removed, therefore allowing builds by CI systems to succeed even if symbols
+ have been removed. This does not remove the need to update the DEF files
+ before release. NOTE: Builds generated using this flag are not binary
+ compatible with previous versions of Qt.)
+ - QProcess
+ * [QTBUG-7667] Fixed no-timeout case for QProcess::waitForFinished.
+ - qmake
+ * [QTBUG-7695] Added support for ifdeffing for manufacturer in generated
+ pkg files.
+ * [QTBUG-7908] Smart installer package generation support.
+ - Patch_capabilities script
* Added support for embedded sis name/uid patching.
-
-- Qt deployment
- * [QTBUG-7518] Backup and restore support for Qt libs
+ - Qt deployment
+ * [QTBUG-7518] Backup and restore support for Qt libs.
****************************************************************************
@@ -279,28 +205,22 @@ Qt for Symbian
****************************************************************************
- Designer
- * [QTBUG-6965] Enabled editing seconds of QDateTime-type properties
+ * [QTBUG-6965] Enabled editing seconds of QDateTime-type properties.
* [QTBUG-6757] Fixed bug where selection handles would be affected by
a style sheet set on the main form.
- uic3
* [QTBUG-7404] Added option to preserve layout names set by Qt 3 Designer.
- - qdoc3
- * bar
-
- - Linguist
- * baz
-
****************************************************************************
* Important Behavior Changes *
****************************************************************************
- QNetworkAccessManager cache
- * QNetworkAccessManager will no longer return expired pages, as
- stated in the documentation
- * The behaviour of PreferCache and PreferNetwork modes now match
- the documentation more closely
+ * QNetworkAccessManager will no longer return expired pages, as
+ stated in the documentation
+ * The behaviour of PreferCache and PreferNetwork modes now match
+ the documentation more closely
- QUrl
* QUrl will now accept hostnames ending in dot and will not treat
diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc
index 51383da..16718f3 100644
--- a/doc/src/deployment/deployment.qdoc
+++ b/doc/src/deployment/deployment.qdoc
@@ -961,14 +961,14 @@
\title Deploying an Application on Mac OS X
- Starting with version 4.5, Qt now includes a \l {macdeploy}{deployment tool}
- that automates the prodecures described in this document.
-
- This documentation will describe how to create a bundle, and how
- to make sure that the application will find the resources it needs
- at run-time. We will demonstrate the procedures in terms of
- deploying the \l {tools/plugandpaint}{Plug & Paint} application
- that is provided in Qt's examples directory.
+ Beginning with Qt 4.5, a \l {macdeploy}{deployment tool} is
+ included that automates the prodecures described here.
+
+ This document describes how to create a bundle and how to make
+ sure that the application will find the resources it needs at
+ run-time. We demonstrate the procedures in terms of deploying the
+ \l {tools/plugandpaint}{Plug & Paint} application that is provided
+ in Qt's examples directory.
\tableofcontents
@@ -1378,63 +1378,38 @@
\section2 Mac OS X Version Dependencies
- Qt 4.2 has been designed to be built and deployed on Mac OS X 10.3
- up until the current version as of this writing, Mac OS X 10.4 and
- all their minor releases. Qt achieves this by using "weak
- linking." This means that Qt tests if a function added in newer
- versions of Mac OS X is available on the computer it is running on
- before it uses it. This results in getting access to newer
- features when running on newer versions of OS X while still
- remaining compatible on older versions.
+ From Qt 4.6, Mac OS X 10.3 (Panther) is no longer supported. Qt
+ 4.6 applications can be built and deployed on Mac OS X 10.4
+ (Tiger) and higher. This is achieved using \e{weak linking}. In
+ \e{weak linking}, Qt tests whether a function added in a newer
+ version of Mac OS X is available on the computer it is running
+ on. This allows Qt to use newer features, when it runs on a newer
+ version of OS X, while remaining compatible on the older versions.
For more information about cross development issues on Mac OS X,
see \l
{http://developer.apple.com/documentation/DeveloperTools/Conceptual/cross_development/index.html}{Apple's Developer Website}.
- Since the linker is set to be compatible with all OS X version, you have to
- change the \c MACOSX_DEPLOYMENT_TARGET environment variable to get weak
- linking to work for your application. You can add:
+ Since the linker is set to be compatible with all OS X versions,
+ you must change the \c MACOSX_DEPLOYMENT_TARGET environment
+ variable to get \e{weak linking} to work for your application. You
+ can add:
\snippet doc/src/snippets/code/doc_src_deployment.qdoc 51
- to your .pro file and qmake will take care of this for you.
-
- However, there is a bit of a wrinkle to keep in mind when your are
- deploying. Mac OS X 10.4 ("Tiger") ships GCC 4.0 as its default
- compiler. This is also the GCC compiler we use for building the
- binary Qt package. If you use GCC 4.0 to build your application,
- it will link against a dynamic libstdc++ that is only available on
- Mac OS X 10.4 and Mac OS X 10.3.9. The application will refuse to
- run on older versions of the operating system.
+ to your .pro file, and qmake will take care of this for you.
For more information about C++ runtime environment, see \l
{http://developer.apple.com/documentation/DeveloperTools/Conceptual/CppRuntimeEnv/index.html}{Apple's Developer Website}
- If you want to deploy to versions of Mac OS X earlier than 10.3.9,
- you must build with GCC 3.3 which is the default on Mac OS X
- 10.3. GCC 3.3 is also available on the Mac OS X 10.4 "Xcode Tools"
- CD and as a download for earlier versions of Mac OS X from Apple
- (\l {https://connect.apple.com/}{connect.apple.com}). You can use
- Apple's \c gcc_select(1) command line tool to switch the default
- complier on your system.
-
\section3 Deploying Phonon Applications on Mac OS X
\list
- \o If you build your Phonon application on Tiger, it will work on
- Tiger, Leopard and Panther.
- \o If you build your application on Leopard, it will \bold not work
- on Panther unless you rename the libraries with the following command
- after you have built your application:
-
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 51a
- This command must be invoked in the directory where
- \c{libphonon_qt7.dylib} is located, usually in
- \c{yourapp.app/Contents/plugins/phonon_backend/}.
- \o The \l {macdeploy}{deployment tool} will perform this step for you.
+ \o If you build your Qt 4.6 Phonon application on OS X 10.4
+ (Tiger), it will run on OS X 10.4 and higher.
- \o If you are using Leopard, but would like to build your application
+ \o If you are using Leopard but would like to build your application
against Tiger, you can use:
\snippet doc/src/snippets/code/doc_src_deployment.qdoc 51b
@@ -1442,12 +1417,13 @@
\section2 Architecture Dependencies
- The Qt for Mac OS X libraries, tools, and examples can be built "universal"
- (i.e. they run natively on both Intel and PowerPC machines). This
- is accomplished by passing \c -universal on the \c configure line
- of the source package, and requires that you use GCC 4.0.x. On
- PowerPC hardware you will need to pass the universal SDK as a
- command line argument to the Qt configure command. For example:
+ The Qt for Mac OS X libraries, tools, and examples can be built
+ "universal" (i.e. they run natively on both Intel and PowerPC
+ machines). This is accomplished by passing \c -universal on the
+ \c configure line of the source package, and requires that you use
+ GCC 4.0.x. On PowerPC hardware you will need to pass the universal
+ SDK as a command line argument to the Qt configure command. For
+ example:
\snippet doc/src/snippets/code/doc_src_deployment.qdoc 52
@@ -1571,28 +1547,22 @@
By default \c .pkg file generated by \c qmake adds support for all
S60 3rd edition FP1, S60 3rd edition FP2 and S60 5th edition devices.
- As a last step we will instruct qmake to generate smart installer \c .pkg file by defining
- the UID of the installation package. The UID needs to be different than the application UID,
- and should be reserved via normal Symbian mechanisms. You can use a random UID starting with
- \c 0xE for testing purposes:
-
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 58
-
Now we are ready to compile the application and create the application
deployment file. Run \c qmake to create Symbian specific makefiles, resources (\.rss)
and deployment packaging files (\c .pkg). And do build to create the
application binaries and resources.
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 59
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 58
If everything compiled and linked without any errors, we are now ready to create
- an application package (\c wiggly.sis):
+ an application installation package (\c wiggly_installer.sis).
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 60
+ If you haven't done so already, download the latest release of the Smart Installer
+ from \l{http://get.qt.nokia.com/nokiasmartinstaller/}, and install it on top of the Qt package
- Now you can create the smart installer package for the application:
+ Then use this command to create the installer sis package:
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 61
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 59
If all binaries and dependencies were found, you should now have a self signed
\c wiggly_installer.sis ready to be installed on a device. The smart installer
diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc
index 4ba7eba..6215268 100644
--- a/doc/src/development/qmake-manual.qdoc
+++ b/doc/src/development/qmake-manual.qdoc
@@ -858,7 +858,7 @@
libraries are linked in the "Frameworks & Libraries" phase in the
XCode build system.
- Furthermore, The selected "Active Build Configuration" is stored
+ Furthermore, the selected "Active Build Configuration" is stored
in a .pbxuser file, which is generated by xcode on first load, not
created by qmake.
@@ -979,7 +979,7 @@
If \c UID2 is not specified, it defaults to the same value as \c UID3.
If \c UID3 is not specified, qmake will automatically generate a \c UID3
suitable for development and debugging. This value should be manually
- specified for applications that are to be released. In order to optain
+ specified for applications that are to be released. In order to obtain
an official UID, please contact Nokia. Both \c SID and \c VID default to empty values.
For more information about unique identifiers and their meaning for
@@ -3504,7 +3504,7 @@ For example:
\target Properties
\section1 Properties
- \c qmake has a system of persistant information, this allows you to
+ \c qmake has a system of persistent information, this allows you to
\c set a variable in qmake once, and each time qmake is invoked this
value can be queried. Use the following to set a property in qmake:
@@ -3682,7 +3682,7 @@ For example:
the newly introduced libraries in the \c LIBS variable, and find their
dependent .prl files, continuing until all libraries have been resolved.
At this point, the Makefile is created as usual, and the libraries are
- linked explicitlyy against the application.
+ linked explicitly against the application.
The internals of the .prl file are left closed so they can easily
change later. They are not designed to be changed by hand, should only
diff --git a/doc/src/development/qtestlib.qdoc b/doc/src/development/qtestlib.qdoc
index 0835ff1..4b9c657 100644
--- a/doc/src/development/qtestlib.qdoc
+++ b/doc/src/development/qtestlib.qdoc
@@ -237,14 +237,14 @@
The code insde the QBENCHMARK macro will be measured, and possibly also repeated
several times in order to get an accurate measurement. This depends on the selected
- measurement back-end. Several back-ends are available an can be selected on the
+ measurement back-end. Several back-ends are available. They can be selected on the
command line:
\target testlib-benchmarking-measurement
\table
\header \o Name
- \o Commmand-line Arguemnt
+ \o Commmand-line Argument
\o Availability
\row \o Walltime
\o (default)
diff --git a/doc/src/examples/googlesuggest.qdoc b/doc/src/examples/googlesuggest.qdoc
index cd6c6b1..f2bdb4f 100644
--- a/doc/src/examples/googlesuggest.qdoc
+++ b/doc/src/examples/googlesuggest.qdoc
@@ -111,7 +111,7 @@
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
+ selected link, while the Escape key hides the popup. Since 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.
diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index 638c2da..e54774b 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.qdoc
@@ -677,7 +677,7 @@ If you are using pre-built binaries, follow the instructions given in the
\snippet doc/src/snippets/code/doc_src_installation.qdoc 30
- This will create a self-signed \c fluidlauncher_armv5_urel.sis and
+ This will create a self-signed \c fluidlauncher.sis and
install it to your device.
To run the demos on the emulator simply navigate to the directory of the demo
@@ -1023,9 +1023,11 @@ If you are using pre-built binaries, follow the instructions given in the
See \l{http://pepper.troll.no/s60prereleases/patches/}{here} for instructions how to check your
compiler version and how to patch it, if needed.
\endlist
- \o \l{http://downloads.activestate.com/ActivePerl/Windows/5.6/ActivePerl-5.6.1.638-MSWin32-x86.msi}{ActivePerl v5.6.1 build 638}
+ \o \l{http://downloads.activestate.com/ActivePerl/releases}{ActivePerl 5.6.1 build 638 or higher}
\list
- \o \bold{Note:} According to Symbian, version 5.6.1 build 638 is mandatory. Using later versions may result in unexplained errors.
+ \o \bold{Note:} According to Symbian, version 5.6.1 build 638 is mandatory for building Symbian applications,
+ but that version is no longer available from ActiveState. However, Qt for Symbian has been successfully
+ compiled using both 5.8.x and 5.10.x versions.
\endlist
\o \l{http://www.forum.nokia.com/main/resources/tools_and_sdks/S60SDK/}{S60 Platform SDK 3rd Edition FP1 or higher}
\list
diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc
index b64d67b..9c9b743 100644
--- a/doc/src/platforms/platform-notes.qdoc
+++ b/doc/src/platforms/platform-notes.qdoc
@@ -285,6 +285,9 @@
\section1 General Information
+ Qt 4.6 applications can only be deployed on Mac OS X 10.4 (Tiger)
+ and higher.
+
Qt 4.4 and Qt 4.5 development is only supported on Mac OS X 10.4 and up.
Applications built against these version of Qt can be deployed on Mac OS X
10.3, but cannot be developed on that version of the operating system due
diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc
index 427f45a..591d6f1 100644
--- a/doc/src/platforms/symbian-introduction.qdoc
+++ b/doc/src/platforms/symbian-introduction.qdoc
@@ -127,6 +127,13 @@
\row \o \c run \o Run the application on the emulator.
\row \o \c runonphone \o Run the application on a device.
\row \o \c sis \o Create signed \c .sis file for project.
+ \row \o \c installer_sis \o Create signed \l{Smart Installer}{smart installer}
+ \c .sis file for project.
+ Smart installer will attempt to download
+ missing dependencies in addition to
+ just installing the application.
+ \row \o \c stub_sis \o Create a stub sis to allow upgradability of projects
+ that are deployed in ROM
\endtable
The following lines perform a debug build for the emulator
@@ -137,6 +144,14 @@
To work on your project in Carbide, simply import the \c .pro file
by right clicking on the project explorer and executing "Import...".
+ \section2 Smart Installer
+
+ The Smart Installer makes sure that deployed applications have all the Qt dependencies
+ they need to run on a device.
+
+ Download the latest release of the Smart Installer from \l{http://get.qt.nokia.com/nokiasmartinstaller/},
+ and install it on top of the Qt package.
+
\section1 Installing your own applications
To install your own applications on hardware, you need a signed \c .sis file.
diff --git a/doc/src/porting/porting4.qdoc b/doc/src/porting/porting4.qdoc
index 25dc792..1b6eeb7 100644
--- a/doc/src/porting/porting4.qdoc
+++ b/doc/src/porting/porting4.qdoc
@@ -3201,8 +3201,8 @@
The \c QShared class has been obsoleted by the more powerful
QSharedData and QSharedDataPointer as a means of creating custom
- implicitly shared classes. It has been renamed Q3Shared moved to
- the Qt3Support library.
+ implicitly shared classes. It has been renamed Q3Shared and moved
+ to the Qt3Support library.
An easy way of porting to Qt 4 is to include this class into your
project and to use it instead of \c QShared:
@@ -3226,7 +3226,7 @@
\section1 QSimpleRichText
QSimpleRichText has been obsoleted by QTextDocument. It has
- bene renamed Q3SimpleRichText and moved to the Qt3Support
+ been renamed Q3SimpleRichText and moved to the Qt3Support
library.
Previously, you would do the following with Q3SimpleRichText:
diff --git a/doc/src/porting/qt4-network.qdoc b/doc/src/porting/qt4-network.qdoc
index 91c1c4e..60e6dbb 100644
--- a/doc/src/porting/qt4-network.qdoc
+++ b/doc/src/porting/qt4-network.qdoc
@@ -199,7 +199,7 @@
level QNetworkProtocol and QUrlOperator abstraction has been
eliminated. These classes attempted the impossible (unify FTP and
HTTP under one roof), and unsurprisingly failed at that. Qt 4
- still provides QFtp, and it also proveds the QNetworkAccessManager.
+ still provides QFtp, and it also provides the QNetworkAccessManager.
The QSocket class in Qt 3 has been renamed QTcpSocket. The new
class is reentrant and supports blocking. It's also easier to
diff --git a/doc/src/scripting/scripting.qdoc b/doc/src/scripting/scripting.qdoc
index edee52a..2c22989 100644
--- a/doc/src/scripting/scripting.qdoc
+++ b/doc/src/scripting/scripting.qdoc
@@ -1007,7 +1007,7 @@
Because of the presence of the built-in \c arguments object,
implementing functions that take a variable number of arguments
is simple. In fact, as we have seen, in the technical sense \e{all}
- Qt Script functions can be seen as variable-argument functions).
+ Qt Script functions can be seen as variable-argument functions.
As an example, consider a concat() function that takes an arbitrary
number of arguments, converts the arguments to their string
representation and concatenates the results; for example,
diff --git a/doc/src/snippets/code/doc_src_deployment.qdoc b/doc/src/snippets/code/doc_src_deployment.qdoc
index 9c00681..3b0cda1 100644
--- a/doc/src/snippets/code/doc_src_deployment.qdoc
+++ b/doc/src/snippets/code/doc_src_deployment.qdoc
@@ -475,19 +475,10 @@ default_deployment.pkg_prerules += supported_platforms
//! [57]
//! [58]
-DEPLOYMENT.installer_header = 0xE2345678
-//! [58]
-
-//! [59]
qmake
make release-gcce
-//! [59]
-
-//! [60]
-make sis
-ren wiggly_release-gcce.sis wiggly.sis
-//! [60]
+//! [58]
-//! [61]
-createpackage wiggly_installer.pkg
-//! [61] \ No newline at end of file
+//! [59]
+make installer_sis
+//! [59] \ No newline at end of file
diff --git a/doc/src/snippets/code/doc_src_porting4.qdoc b/doc/src/snippets/code/doc_src_porting4.qdoc
index 4d24ba3..2f76591 100644
--- a/doc/src/snippets/code/doc_src_porting4.qdoc
+++ b/doc/src/snippets/code/doc_src_porting4.qdoc
@@ -452,7 +452,7 @@ QSimpleRichText richText(text, font);
// Set the width of the paragraph to w
richText.setWidth(w);
-// Or set a resonable default size
+// Or set a reasonable default size
richText.adjustSize();
// Query for its used size
diff --git a/doc/src/widgets-and-layouts/styles.qdoc b/doc/src/widgets-and-layouts/styles.qdoc
index b7f7322..9a28715 100644
--- a/doc/src/widgets-and-layouts/styles.qdoc
+++ b/doc/src/widgets-and-layouts/styles.qdoc
@@ -125,7 +125,7 @@
necessary for drawing. Thanks to QStyleOption, it is possible to make
QStyle draw widgets without linking in any code for the widget. This
makes it possible to use \l{QStyle}'s draw functions on any paint
- device. Ie you can draw a combobox on any widget, not just on a
+ device, i.e., you can draw a combobox on any widget, not just on a
QComboBox.
The widget is passed as the last argument in case the style needs
diff --git a/doc/src/widgets-and-layouts/stylesheet.qdoc b/doc/src/widgets-and-layouts/stylesheet.qdoc
index ebe67df..5f42f28 100644
--- a/doc/src/widgets-and-layouts/stylesheet.qdoc
+++ b/doc/src/widgets-and-layouts/stylesheet.qdoc
@@ -3822,7 +3822,7 @@
The tear indicator and the scroll buttons can be further customized as follows:
\snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 148
- Sine Qt 4.6 the close button can be customized as follow:
+ Since Qt 4.6 the close button can be customized as follow:
\snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 159
\section2 Customizing QTableView
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index 6913dc9..aab766d 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -75,21 +75,23 @@ QMAKE_LIBS_COMPAT =
QMAKE_LIBS_QT_ENTRY = -llibcrt0.lib
QMAKE_LIBS_S60 = -lavkon
-contains(QMAKE_HOST.os, "Windows"):!isEmpty(QMAKE_SH) | unix {
+!contains(QMAKE_HOST.os, "Windows")|!isEmpty(QMAKE_SH) {
QMAKE_COPY = cp
QMAKE_COPY_DIR = cp -r
QMAKE_MOVE = mv
QMAKE_DEL_FILE = rm -f
QMAKE_MKDIR = mkdir
QMAKE_DEL_DIR = rmdir
+ QMAKE_DEL_TREE = rmdir /s /q
QMAKE_CHK_DIR_EXISTS = test -d
} else {
QMAKE_COPY = copy /y
QMAKE_COPY_DIR = xcopy /s /q /y /i
QMAKE_MOVE = move
- QMAKE_DEL_FILE = del
+ QMAKE_DEL_FILE = del 2> NUL
QMAKE_MKDIR = mkdir
QMAKE_DEL_DIR = rmdir
+ QMAKE_DEL_TREE = rm -rf
QMAKE_CHK_DIR_EXISTS = if not exist
}
diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf
index 42ce1bc..e4b7dae 100644
--- a/mkspecs/features/moc.prf
+++ b/mkspecs/features/moc.prf
@@ -97,7 +97,7 @@ equals(MOC_DIR, .) {
}
#auto depend on moc
-unix:!no_mocdepend {
+unix:!symbian:!no_mocdepend {
moc_source.depends += $$first(QMAKE_MOC)
moc_header.depends += $$first(QMAKE_MOC)
!contains(TARGET, moc) { #auto build moc
diff --git a/mkspecs/win32-icc/qmake.conf b/mkspecs/win32-icc/qmake.conf
index 78c947d..fcc7691 100644
--- a/mkspecs/win32-icc/qmake.conf
+++ b/mkspecs/win32-icc/qmake.conf
@@ -4,7 +4,7 @@
# Written for Intel C++
#
-MAKEFILE_GENERATOR = MSVC
+MAKEFILE_GENERATOR = MSVC.NET
TEMPLATE = app
CONFIG += qt warn_on release incremental flat link_prl copy_dir_files debug_and_release debug_and_release_target
QT += core gui
diff --git a/mkspecs/win32-msvc.net/qmake.conf b/mkspecs/win32-msvc.net/qmake.conf
deleted file mode 100644
index 89fa00d..0000000
--- a/mkspecs/win32-msvc.net/qmake.conf
+++ /dev/null
@@ -1,89 +0,0 @@
-#
-# qmake configuration for win32-msvc.net (used by 2002 & 2003 before, but now deprecated. Use win32-msvc2002 or win32-msvc2003 instead)
-#
-# Written for Microsoft C++.NET
-#
-!build_pass:message("The mkspec/win32-msvc.net is now deprecated, use win32-msvc2002 or win32-msvc2003")
-
-MAKEFILE_GENERATOR = MSVC.NET
-TEMPLATE = app
-CONFIG += qt warn_on release incremental flat link_prl precompile_header autogen_precompile_source copy_dir_files debug_and_release debug_and_release_target
-QT += core gui
-DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT
-QMAKE_COMPILER_DEFINES += _MSC_VER=1300 WIN32
-
-QMAKE_CC = cl
-QMAKE_LEX = flex
-QMAKE_LEXFLAGS =
-QMAKE_YACC = byacc
-QMAKE_YACCFLAGS = -d
-QMAKE_CFLAGS = -nologo -Zm300
-QMAKE_CFLAGS_WARN_ON = -W3
-QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -O2 -MD
-QMAKE_CFLAGS_DEBUG = -Zi -MDd
-QMAKE_CFLAGS_YACC =
-
-QMAKE_CXX = $$QMAKE_CC
-QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
-QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189
-QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
-QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
-QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
-QMAKE_CXXFLAGS_STL_ON = -EHsc
-QMAKE_CXXFLAGS_STL_OFF =
-QMAKE_CXXFLAGS_RTTI_ON = -GR
-QMAKE_CXXFLAGS_RTTI_OFF =
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
-QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
-
-QMAKE_INCDIR =
-QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
-QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
-
-QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<<
-QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
-
-QMAKE_LINK = link
-QMAKE_LFLAGS = /NOLOGO
-QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
-QMAKE_LFLAGS_DEBUG = /DEBUG
-QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE
-QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS
-QMAKE_LFLAGS_DLL = /DLL
-
-QMAKE_LIBS_CORE = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib advapi32.lib ws2_32.lib
-QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib winspool.lib ws2_32.lib ole32.lib user32.lib advapi32.lib
-QMAKE_LIBS_NETWORK = ws2_32.lib
-QMAKE_LIBS_OPENGL = opengl32.lib glu32.lib gdi32.lib user32.lib
-QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
-
-QMAKE_LIBS_QT_ENTRY = -lqtmain
-
-QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
-QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe
-QMAKE_IDC = $$[QT_INSTALL_BINS]\idc.exe
-
-QMAKE_IDL = midl
-QMAKE_LIB = lib /NOLOGO
-QMAKE_RC = rc
-
-QMAKE_ZIP = zip -r -9
-
-QMAKE_COPY = copy /y
-QMAKE_COPY_DIR = xcopy /s /q /y /i
-QMAKE_MOVE = move
-QMAKE_DEL_FILE = del
-QMAKE_DEL_DIR = rmdir
-QMAKE_CHK_DIR_EXISTS = if not exist
-QMAKE_MKDIR = mkdir
-
-VCPROJ_EXTENSION = .vcproj
-VCSOLUTION_EXTENSION = .sln
-VCPROJ_KEYWORD = Qt4VSv1.0
-load(qt_config)
diff --git a/mkspecs/win32-msvc.net/qplatformdefs.h b/mkspecs/win32-msvc.net/qplatformdefs.h
deleted file mode 100644
index 05584c9..0000000
--- a/mkspecs/win32-msvc.net/qplatformdefs.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the qmake spec 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$
-**
-****************************************************************************/
-
-#ifndef QPLATFORMDEFS_H
-#define QPLATFORMDEFS_H
-
-#ifdef UNICODE
-#ifndef _UNICODE
-#define _UNICODE
-#endif
-#endif
-
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-#define _POSIX_
-#include <limits.h>
-#undef _POSIX_
-
-#include <tchar.h>
-#include <io.h>
-#include <direct.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-#include <windows.h>
-
-#define Q_FS_FAT
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct _stati64 // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
-#define QT_STAT ::_stati64
-#define QT_FSTAT ::_fstati64
-#else
-#define QT_STATBUF struct _stat // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
-#define QT_STAT ::_stat
-#define QT_FSTAT ::_fstat
-#endif
-#define QT_STAT_REG _S_IFREG
-#define QT_STAT_DIR _S_IFDIR
-#define QT_STAT_MASK _S_IFMT
-#if defined(_S_IFLNK)
-# define QT_STAT_LNK _S_IFLNK
-#endif
-#define QT_FILENO _fileno
-#define QT_OPEN ::_open
-#define QT_CLOSE ::_close
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_LSEEK ::_lseeki64
-#define QT_TSTAT ::_tstati64
-#else
-#define QT_LSEEK ::_lseek
-#define QT_TSTAT ::_tstat
-#endif
-#define QT_READ ::_read
-#define QT_WRITE ::_write
-#define QT_ACCESS ::_access
-#define QT_GETCWD ::_getcwd
-#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
-#define QT_OPEN_CREAT _O_CREAT
-#define QT_OPEN_TRUNC _O_TRUNC
-#define QT_OPEN_APPEND _O_APPEND
-#if defined(O_TEXT)
-# define QT_OPEN_TEXT _O_TEXT
-# define QT_OPEN_BINARY _O_BINARY
-#endif
-
-#include "../common/c89/qplatformdefs.h"
-
-#ifdef QT_LARGEFILE_SUPPORT
-#undef QT_FTELL
-#undef QT_OFF_T
-
-// 64-bit versions of fseek/ftell not always available. E.g., when linking
-// dynamically to CRT (/MT)
-#define QT_FTELL (QT_OFF_T)::ftell
-#define QT_OFF_T __int64
-#endif
-
-#define QT_SIGNAL_ARGS int
-
-#define QT_VSNPRINTF ::_vsnprintf
-#define QT_SNPRINTF ::_snprintf
-
-# define F_OK 0
-# define X_OK 1
-# define W_OK 2
-# define R_OK 4
-
-typedef int mode_t;
-
-#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/win32-msvc/features/incremental.prf b/mkspecs/win32-msvc/features/incremental.prf
deleted file mode 100644
index 67596ca..0000000
--- a/mkspecs/win32-msvc/features/incremental.prf
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG -= incremental_off
-QMAKE_LFLAGS_DEBUG += /incremental:yes
diff --git a/mkspecs/win32-msvc/features/incremental_off.prf b/mkspecs/win32-msvc/features/incremental_off.prf
deleted file mode 100644
index 9b6d19e..0000000
--- a/mkspecs/win32-msvc/features/incremental_off.prf
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG -= incremental
-QMAKE_LFLAGS += /incremental:no
diff --git a/mkspecs/win32-msvc/qmake.conf b/mkspecs/win32-msvc/qmake.conf
deleted file mode 100644
index 64ab84a..0000000
--- a/mkspecs/win32-msvc/qmake.conf
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# qmake configuration for win32-msvc
-#
-# Written for Microsoft C++
-#
-
-MAKEFILE_GENERATOR = MSVC
-TEMPLATE = app
-CONFIG += qt warn_on release incremental flat link_prl precompile_header copy_dir_files no_delete_multiple_files debug_and_release debug_and_release_target
-QT += core gui
-DEFINES += UNICODE QT_LARGEFILE_SUPPORT
-QMAKE_COMPILER_DEFINES += _MSC_VER=1200 WIN32
-
-QMAKE_CC = cl
-QMAKE_LEX = flex
-QMAKE_LEXFLAGS =
-QMAKE_YACC = byacc
-QMAKE_YACCFLAGS = -d
-QMAKE_CFLAGS = -nologo -Zm200
-QMAKE_CFLAGS_WARN_ON = -W3
-QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -O1 -MD
-QMAKE_CFLAGS_DEBUG = -Zi -MDd
-QMAKE_CFLAGS_YACC =
-
-QMAKE_CXX = $$QMAKE_CC
-QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
-QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
-QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
-QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
-QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
-QMAKE_CXXFLAGS_STL_ON = -GX
-QMAKE_CXXFLAGS_STL_OFF =
-QMAKE_CXXFLAGS_RTTI_ON = -GR
-QMAKE_CXXFLAGS_RTTI_OFF =
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -GX
-QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
-
-QMAKE_INCDIR =
-QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
-QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
-
-QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<<
-QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
-
-QMAKE_LINK = link
-QMAKE_LFLAGS = /NOLOGO
-QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
-QMAKE_LFLAGS_DEBUG = /DEBUG
-QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:console
-QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:windows
-QMAKE_LFLAGS_DLL = /DLL
-
-QMAKE_LIBS =
-QMAKE_LIBS_CORE = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib advapi32.lib ws2_32.lib
-QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib winspool.lib ws2_32.lib ole32.lib user32.lib advapi32.lib
-QMAKE_LIBS_NETWORK = ws2_32.lib
-QMAKE_LIBS_OPENGL = opengl32.lib glu32.lib gdi32.lib user32.lib delayimp.lib
-QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
-QMAKE_LIBS_QT_ENTRY = -lqtmain
-
-QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
-QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe
-QMAKE_IDC = $$[QT_INSTALL_BINS]\idc.exe
-
-QMAKE_IDL = midl
-QMAKE_LIB = lib /NOLOGO
-QMAKE_RC = rc
-
-QMAKE_ZIP = zip -r -9
-
-QMAKE_COPY = copy /y
-QMAKE_COPY_DIR = xcopy /s /q /y /i
-QMAKE_MOVE = move
-QMAKE_DEL_FILE = del
-QMAKE_DEL_DIR = rmdir
-QMAKE_CHK_DIR_EXISTS = if not exist
-QMAKE_MKDIR = mkdir
-
-DSP_EXTENSION = .dsp
-load(qt_config)
diff --git a/mkspecs/win32-msvc/qplatformdefs.h b/mkspecs/win32-msvc/qplatformdefs.h
deleted file mode 100644
index abb5894..0000000
--- a/mkspecs/win32-msvc/qplatformdefs.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the qmake spec 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$
-**
-****************************************************************************/
-
-#ifndef QPLATFORMDEFS_H
-#define QPLATFORMDEFS_H
-
-#ifdef UNICODE
-#ifndef _UNICODE
-#define _UNICODE
-#endif
-#endif
-
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-#define _POSIX_
-#include <limits.h>
-#undef _POSIX_
-
-#include <tchar.h>
-#include <io.h>
-#include <direct.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-#include <windows.h>
-
-#define Q_FS_FAT
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct _stati64 // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
-#define QT_STAT ::_stati64
-#define QT_FSTAT ::_fstati64
-#else
-#define QT_STATBUF struct _stat // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
-#define QT_STAT ::_stat
-#define QT_FSTAT ::_fstat
-#endif
-#define QT_STAT_REG _S_IFREG
-#define QT_STAT_DIR _S_IFDIR
-#define QT_STAT_MASK _S_IFMT
-#if defined(_S_IFLNK)
-# define QT_STAT_LNK _S_IFLNK
-#endif
-#define QT_FILENO _fileno
-#define QT_OPEN ::_open
-#define QT_CLOSE ::_close
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_LSEEK ::_lseeki64
-#define QT_TSTAT ::_tstati64
-#else
-#define QT_LSEEK ::_lseek
-#define QT_TSTAT ::_tstat
-#endif
-#define QT_READ ::_read
-#define QT_WRITE ::_write
-#define QT_ACCESS ::_access
-#define QT_GETCWD ::_getcwd
-#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
-#define QT_OPEN_CREAT _O_CREAT
-#define QT_OPEN_TRUNC _O_TRUNC
-#define QT_OPEN_APPEND _O_APPEND
-#if defined(O_TEXT)
-# define QT_OPEN_TEXT _O_TEXT
-# define QT_OPEN_BINARY _O_BINARY
-#endif
-
-#include "../common/c89/qplatformdefs.h"
-
-#ifdef QT_LARGEFILE_SUPPORT
-#undef QT_OFF_T
-#define QT_OFF_T __int64
-#endif
-
-#define QT_SIGNAL_ARGS int
-
-#if defined(_MSC_VER) && _MSC_VER < 1400
-# define QT_VSNPRINTF ::_vsnprintf
-#endif
-#define QT_SNPRINTF ::_snprintf
-
-# define F_OK 0
-# define X_OK 1
-# define W_OK 2
-# define R_OK 4
-
-typedef int mode_t;
-
-
-#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/win32-msvc2002/qmake.conf b/mkspecs/win32-msvc2002/qmake.conf
deleted file mode 100644
index 13fbfb0..0000000
--- a/mkspecs/win32-msvc2002/qmake.conf
+++ /dev/null
@@ -1,88 +0,0 @@
-#
-# qmake configuration for win32-msvc2002
-#
-# Written for Microsoft C++.NET
-#
-
-MAKEFILE_GENERATOR = MSVC.NET
-TEMPLATE = app
-CONFIG += qt warn_on release incremental flat link_prl precompile_header autogen_precompile_source copy_dir_files debug_and_release debug_and_release_target
-QT += core gui
-DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT
-QMAKE_COMPILER_DEFINES += _MSC_VER=1300 WIN32
-
-QMAKE_CC = cl
-QMAKE_LEX = flex
-QMAKE_LEXFLAGS =
-QMAKE_YACC = byacc
-QMAKE_YACCFLAGS = -d
-QMAKE_CFLAGS = -nologo -Zm300
-QMAKE_CFLAGS_WARN_ON = -W3
-QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -O2 -MD
-QMAKE_CFLAGS_DEBUG = -Zi -MDd
-QMAKE_CFLAGS_YACC =
-
-QMAKE_CXX = $$QMAKE_CC
-QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
-QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189
-QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
-QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
-QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
-QMAKE_CXXFLAGS_STL_ON = -EHsc
-QMAKE_CXXFLAGS_STL_OFF =
-QMAKE_CXXFLAGS_RTTI_ON = -GR
-QMAKE_CXXFLAGS_RTTI_OFF =
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
-QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
-
-QMAKE_INCDIR =
-QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
-QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
-
-QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<<
-QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
-
-QMAKE_LINK = link
-QMAKE_LFLAGS = /NOLOGO
-QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
-QMAKE_LFLAGS_DEBUG = /DEBUG
-QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE
-QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS
-QMAKE_LFLAGS_DLL = /DLL
-
-QMAKE_LIBS_CORE = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib advapi32.lib ws2_32.lib
-QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib winspool.lib ws2_32.lib ole32.lib user32.lib advapi32.lib
-QMAKE_LIBS_NETWORK = ws2_32.lib
-QMAKE_LIBS_OPENGL = opengl32.lib glu32.lib gdi32.lib user32.lib
-QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
-
-QMAKE_LIBS_QT_ENTRY = -lqtmain
-
-QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
-QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe
-QMAKE_IDC = $$[QT_INSTALL_BINS]\idc.exe
-
-QMAKE_IDL = midl
-QMAKE_LIB = lib /NOLOGO
-QMAKE_RC = rc
-
-QMAKE_ZIP = zip -r -9
-
-QMAKE_COPY = copy /y
-QMAKE_COPY_DIR = xcopy /s /q /y /i
-QMAKE_MOVE = move
-QMAKE_DEL_FILE = del
-QMAKE_DEL_DIR = rmdir
-QMAKE_CHK_DIR_EXISTS = if not exist
-QMAKE_MKDIR = mkdir
-
-VCPROJ_EXTENSION = .vcproj
-VCSOLUTION_EXTENSION = .sln
-VCPROJ_KEYWORD = Qt4VSv1.0
-load(qt_config)
diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix
index fcf43c8..5e3190d 100644
--- a/qmake/Makefile.unix
+++ b/qmake/Makefile.unix
@@ -9,7 +9,7 @@ LFLAGS = @QMAKE_LFLAGS@
OBJS=project.o property.o main.o makefile.o unixmake2.o unixmake.o \
mingw_make.o option.o winmakefile.o projectgenerator.o \
meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o \
- borland_bmake.o msvc_dsp.o msvc_vcproj.o msvc_nmake.o msvc_objectmodel.o \
+ borland_bmake.o msvc_vcproj.o msvc_nmake.o msvc_objectmodel.o \
symmake.o initprojectdeploy_symbian.o symmake_abld.o symmake_sbsv2.o
#qt code
@@ -266,9 +266,6 @@ msvc_nmake.o: generators/win32/msvc_nmake.cpp
pbuilder_pbx.o: generators/mac/pbuilder_pbx.cpp
$(CXX) -c -o $@ $(CXXFLAGS) generators/mac/pbuilder_pbx.cpp
-msvc_dsp.o: generators/win32/msvc_dsp.cpp
- $(CXX) -c -o $@ $(CXXFLAGS) generators/win32/msvc_dsp.cpp
-
symmake.o: generators/symbian/symmake.cpp
$(CXX) -c -o $@ $(CXXFLAGS) generators/symbian/symmake.cpp
diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32
index e6bbcd5..1f3092a 100644
--- a/qmake/Makefile.win32
+++ b/qmake/Makefile.win32
@@ -73,7 +73,7 @@ ADDCLEAN = qmake.tds
OBJS = project.obj main.obj makefile.obj unixmake.obj unixmake2.obj mingw_make.obj \
option.obj winmakefile.obj projectgenerator.obj property.obj meta.obj \
makefiledeps.obj metamakefile.obj xmloutput.obj pbuilder_pbx.obj \
- borland_bmake.obj msvc_nmake.obj msvc_dsp.obj msvc_vcproj.obj \
+ borland_bmake.obj msvc_nmake.obj msvc_vcproj.obj \
msvc_objectmodel.obj symmake.obj initprojectdeploy_symbian.obj \
symmake_abld.obj symmake_sbsv2.obj
@@ -191,7 +191,6 @@ clean::
-del xmloutput.obj
-del borland_bmake.obj
-del msvc_nmake.obj
- -del msvc_dsp.obj
-del msvc_vcproj.obj
-del msvc_objectmodel.obj
-del symmake.obj
@@ -376,9 +375,6 @@ mingw_make.obj: $(SOURCE_PATH)/qmake/generators/win32/mingw_make.cpp
msvc_nmake.obj: $(SOURCE_PATH)/qmake/generators/win32/msvc_nmake.cpp
$(CXX) $(CXXFLAGS) generators/win32/msvc_nmake.cpp
-msvc_dsp.obj: $(SOURCE_PATH)/qmake/generators/win32/msvc_dsp.cpp
- $(CXX) $(CXXFLAGS) generators/win32/msvc_dsp.cpp
-
msvc_vcproj.obj: $(SOURCE_PATH)/qmake/generators/win32/msvc_vcproj.cpp
$(CXX) $(CXXFLAGS) generators/win32/msvc_vcproj.cpp
diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++
index ade379b..41a1d8c 100644
--- a/qmake/Makefile.win32-g++
+++ b/qmake/Makefile.win32-g++
@@ -36,7 +36,7 @@ ADDCLEAN =
OBJS = project.o main.o makefile.o unixmake.o unixmake2.o mingw_make.o \
option.o winmakefile.o projectgenerator.o property.o meta.o \
makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o \
- borland_bmake.o msvc_nmake.o msvc_dsp.o msvc_vcproj.o \
+ borland_bmake.o msvc_nmake.o msvc_vcproj.o \
msvc_objectmodel.o symmake.o initprojectdeploy_symbian.o \
symmake_abld.o symmake_sbsv2.o
@@ -257,9 +257,6 @@ mingw_make.o: $(SOURCE_PATH)/qmake/generators/win32/mingw_make.cpp
msvc_nmake.o: $(SOURCE_PATH)/qmake/generators/win32/msvc_nmake.cpp
$(CXX) $(CXXFLAGS) generators/win32/msvc_nmake.cpp
-msvc_dsp.o: $(SOURCE_PATH)/qmake/generators/win32/msvc_dsp.cpp
- $(CXX) $(CXXFLAGS) generators/win32/msvc_dsp.cpp
-
msvc_vcproj.o: $(SOURCE_PATH)/qmake/generators/win32/msvc_vcproj.cpp
$(CXX) $(CXXFLAGS) generators/win32/msvc_vcproj.cpp
diff --git a/qmake/Makefile.win32-g++-sh b/qmake/Makefile.win32-g++-sh
index 8d2723c..0b08320 100644
--- a/qmake/Makefile.win32-g++-sh
+++ b/qmake/Makefile.win32-g++-sh
@@ -36,7 +36,7 @@ ADDCLEAN =
OBJS = project.o main.o makefile.o unixmake.o unixmake2.o mingw_make.o \
option.o winmakefile.o projectgenerator.o property.o meta.o \
makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o \
- borland_bmake.o msvc_nmake.o msvc_dsp.o msvc_vcproj.o \
+ borland_bmake.o msvc_nmake.o msvc_vcproj.o \
msvc_objectmodel.o symmake.o initprojectdeploy_symbian.o \
symmake_abld.o symmake_sbsv2.o
@@ -256,9 +256,6 @@ mingw_make.o: $(SOURCE_PATH)/qmake/generators/win32/mingw_make.cpp
msvc_nmake.o: $(SOURCE_PATH)/qmake/generators/win32/msvc_nmake.cpp
$(CXX) $(CXXFLAGS) generators/win32/msvc_nmake.cpp
-msvc_dsp.o: $(SOURCE_PATH)/qmake/generators/win32/msvc_dsp.cpp
- $(CXX) $(CXXFLAGS) generators/win32/msvc_dsp.cpp
-
msvc_vcproj.o: $(SOURCE_PATH)/qmake/generators/win32/msvc_vcproj.cpp
$(CXX) $(CXXFLAGS) generators/win32/msvc_vcproj.cpp
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index b0a8011..ec712a0 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -65,12 +65,6 @@
#include <sys/types.h>
#include <sys/stat.h>
-#ifdef Q_OS_WIN32
-#define NO_STDERR "2> NUL"
-#else
-#define NO_STDERR "2>/dev/null"
-#endif
-
QT_BEGIN_NAMESPACE
// Well, Windows doesn't have this, so here's the macro
@@ -1814,8 +1808,6 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
tmp_clean = tmp_out;
if(tmp_clean.indexOf("${QMAKE_") == -1) {
t << "\n\t" << "-$(DEL_FILE) " << tmp_clean;
- if (isForSymbian())
- t << " " << NO_STDERR; // Eliminate unnecessary warnings
wrote_clean = true;
}
if(!wrote_clean_cmds || !wrote_clean) {
@@ -1843,12 +1835,8 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
cleans.append(files);
}
}
- if(!cleans.isEmpty()) {
- if (isForSymbian())
- t << valGlue(cleans, "\n\t" + del_statement, " " NO_STDERR "\n\t" + del_statement, " " NO_STDERR);
- else
- t << valGlue(cleans, "\n\t" + del_statement, "\n\t" + del_statement, "");
- }
+ if(!cleans.isEmpty())
+ t << valGlue(cleans, "\n\t" + del_statement, "\n\t" + del_statement, "");
if(!wrote_clean_cmds) {
for(QStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) {
t << "\n\t" << replaceExtraCompilerVariables(tmp_clean_cmds, (*input),
@@ -2164,9 +2152,7 @@ QString MakefileGenerator::buildArgs(const QString &outdir)
ret += " -nodependheuristics";
if(!Option::mkfile::qmakespec_commandline.isEmpty())
ret += " -spec " + specdir(outdir);
- if(Option::target_mode == Option::TARG_MAC9_MODE)
- ret += " -mac9";
- else if(Option::target_mode == Option::TARG_MACX_MODE)
+ if(Option::target_mode == Option::TARG_MACX_MODE)
ret += " -macx";
else if(Option::target_mode == Option::TARG_UNIX_MODE)
ret += " -unix";
@@ -2681,8 +2667,6 @@ MakefileGenerator::writeMakeQmake(QTextStream &t)
if(!specdir().isEmpty()) {
if(exists(Option::fixPathToLocalOS(specdir()+QDir::separator()+"qmake.conf")))
t << escapeDependencyPath(specdir() + Option::dir_sep + "qmake.conf") << " ";
- else if(exists(Option::fixPathToLocalOS(specdir()+QDir::separator()+"tmake.conf")))
- t << escapeDependencyPath(specdir() + Option::dir_sep + "tmake.conf") << " ";
}
const QStringList &included = project->values("QMAKE_INTERNAL_INCLUDED_FILES");
t << escapeDependencyPaths(included).join(" \\\n\t\t") << "\n\t"
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp
index 4151193..f48491c 100644
--- a/qmake/generators/metamakefile.cpp
+++ b/qmake/generators/metamakefile.cpp
@@ -432,7 +432,6 @@ QT_BEGIN_INCLUDE_NAMESPACE
#include "pbuilder_pbx.h"
#include "msvc_nmake.h"
#include "borland_bmake.h"
-#include "msvc_dsp.h"
#include "msvc_vcproj.h"
#include "symmake_abld.h"
#include "symmake_sbsv2.h"
@@ -458,15 +457,8 @@ MetaMakefileGenerator::createMakefileGenerator(QMakeProject *proj, bool noIO)
mkfile = new MingwMakefileGenerator;
} else if(gen == "PROJECTBUILDER" || gen == "XCODE") {
mkfile = new ProjectBuilderMakefileGenerator;
- } else if(gen == "MSVC") {
- // Visual Studio =< v6.0
- if(proj->first("TEMPLATE").indexOf(QRegExp("^vc.*")) != -1)
- mkfile = new DspMakefileGenerator;
- else
- mkfile = new NmakeMakefileGenerator;
} else if(gen == "MSVC.NET") {
- // Visual Studio >= v7.0
- if(proj->first("TEMPLATE").indexOf(QRegExp("^vc.*")) != -1 || proj->first("TEMPLATE").indexOf(QRegExp("^ce.*")) != -1)
+ if(proj->first("TEMPLATE").indexOf(QRegExp("^vc.*")) != -1)
mkfile = new VcprojGenerator;
else
mkfile = new NmakeMakefileGenerator;
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
index 7ccce00..7279a4c 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
@@ -207,7 +207,7 @@ QString generate_uid(const QString& target)
return tmp;
}
- unsigned long hash = 5381;
+ quint32 hash = 5381;
int c;
for (int i = 0; i < target.size(); ++i) {
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 5e27af5..69668ab 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -94,7 +94,11 @@
#define MMP_END_RESOURCE "END"
#define SIS_TARGET "sis"
+#define INSTALLER_SIS_TARGET "installer_sis"
+#define ROM_STUB_SIS_TARGET "stub_sis"
#define OK_SIS_TARGET "ok_sis"
+#define OK_INSTALLER_SIS_TARGET "ok_installer_sis"
+#define OK_ROM_STUB_SIS_TARGET "ok_stub_sis"
#define FAIL_SIS_NOPKG_TARGET "fail_sis_nopkg"
#define FAIL_SIS_NOCACHE_TARGET "fail_sis_nocache"
@@ -302,6 +306,9 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme
QTextStream t(&pkgFile);
QString installerSisHeader = project->values("DEPLOYMENT.installer_header").join("\n");
+ if (installerSisHeader.isEmpty())
+ installerSisHeader = "0xA000D7CE"; // Use default self-signable UID if not defined
+
QString wrapperStreamBuffer;
QTextStream tw(&wrapperStreamBuffer);
@@ -524,7 +531,7 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme
twf << "\"" << currentPath << "/" << sisName << "\" - \"c:\\adm\\" << sisName << "\"" << endl;
QString bootStrapPath = QLibraryInfo::location(QLibraryInfo::PrefixPath);
- bootStrapPath.append("/bootstrap.sis");
+ bootStrapPath.append("/smartinstaller.sis");
QFileInfo fi(fileInfo(bootStrapPath));
twf << "@\"" << fi.absoluteFilePath() << "\",(0x2002CCCD)" << endl;
}
@@ -1885,7 +1892,7 @@ void SymbianMakefileGenerator::writeSisTargets(QTextStream &t)
t << endl;
t << SIS_TARGET ":" << endl;
- QString siscommand = QString("\t$(if $(wildcard %1_template.%2),$(if $(wildcard %3)," \
+ QString siscommand = QString::fromLatin1("\t$(if $(wildcard %1_template.%2),$(if $(wildcard %3)," \
"$(MAKE) -s -f $(MAKEFILE) %4," \
"$(if $(QT_SIS_TARGET),$(MAKE) -s -f $(MAKEFILE) %4," \
"$(MAKE) -s -f $(MAKEFILE) %5))," \
@@ -1901,15 +1908,65 @@ void SymbianMakefileGenerator::writeSisTargets(QTextStream &t)
t << OK_SIS_TARGET ":" << endl;
- QString pkgcommand = QString("\tcreatepackage" SCRIPT_EXT " $(QT_SIS_OPTIONS) %1_template.%2 $(QT_SIS_TARGET) " \
+ QString pkgcommand = QString::fromLatin1("\tcreatepackage" SCRIPT_EXT " $(QT_SIS_OPTIONS) %1_template.%2 $(QT_SIS_TARGET) " \
+ "$(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)")
+ .arg(fixedTarget)
+ .arg("pkg");
+ t << pkgcommand << endl;
+ t << endl;
+
+ QString sisName = fixedTarget;
+ sisName += ".sis";
+
+ t << sisName << ":" << endl;
+ t << "\t$(MAKE) -s -f $(MAKEFILE) " SIS_TARGET << endl << endl;
+
+ t << ROM_STUB_SIS_TARGET ":" << endl;
+ QString stubsiscommand = QString::fromLatin1("\t$(if $(wildcard %1_template.%2),$(if $(wildcard %3)," \
+ "$(MAKE) -s -f $(MAKEFILE) %4," \
+ "$(if $(QT_SIS_TARGET),$(MAKE) -s -f $(MAKEFILE) %4," \
+ "$(MAKE) -s -f $(MAKEFILE) %5))," \
+ "$(MAKE) -s -f $(MAKEFILE) %6)")
+ .arg(fixedTarget)
+ .arg("pkg")
+ .arg(MAKE_CACHE_NAME)
+ .arg(OK_ROM_STUB_SIS_TARGET)
+ .arg(FAIL_SIS_NOCACHE_TARGET)
+ .arg(FAIL_SIS_NOPKG_TARGET);
+ t << stubsiscommand << endl;
+ t << endl;
+
+ t << OK_ROM_STUB_SIS_TARGET ":" << endl;
+
+ QString stubpkgcommand = QString::fromLatin1("\tcreatepackage.bat -s $(QT_SIS_OPTIONS) %1_template.%2 $(QT_SIS_TARGET) " \
"$(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)")
.arg(fixedTarget)
.arg("pkg");
+ t << stubpkgcommand << endl;
+ t << endl;
+
+ t << INSTALLER_SIS_TARGET ": " << sisName << endl;
+ siscommand = QString::fromLatin1("\t$(if $(wildcard %1_installer.%2)," \
+ "$(MAKE) -s -f $(MAKEFILE) %3," \
+ "$(MAKE) -s -f $(MAKEFILE) %4)")
+ .arg(fixedTarget)
+ .arg("pkg")
+ .arg(OK_INSTALLER_SIS_TARGET)
+ .arg(FAIL_SIS_NOPKG_TARGET);
+ t << siscommand << endl;
+ t << endl;
+
+ t << OK_INSTALLER_SIS_TARGET ": " << endl;
+
+ pkgcommand = QString::fromLatin1("\tcreatepackage.bat $(QT_SIS_OPTIONS) %1_installer.%2 - " \
+ "$(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)")
+ .arg(fixedTarget)
+ .arg("pkg");
t << pkgcommand << endl;
t << endl;
t << FAIL_SIS_NOPKG_TARGET ":" << endl;
- t << "\t$(error PKG file does not exist, 'SIS' target is only supported for executables or projects with DEPLOYMENT statement)" << endl;
+ t << "\t$(error PKG file does not exist, '" SIS_TARGET "' and '" INSTALLER_SIS_TARGET "' target are only supported for executables or projects with DEPLOYMENT statement)" << endl;
t << endl;
t << FAIL_SIS_NOCACHE_TARGET ":" << endl;
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index 26dd3fd..a3a504f 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -303,19 +303,16 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
// generate command lines like this ...
// -@ if NOT EXIST ".\somedir" mkdir ".\somedir"
QStringList dirsToClean;
+ QString dirExists = var("QMAKE_CHK_DIR_EXISTS");
+ QString mkdir = var("QMAKE_MKDIR");
for (QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) {
QStringList values = it.value();
for (int i = 0; i < values.size(); ++i) {
if (values.at(i).endsWith("/" QT_EXTRA_INCLUDE_DIR)) {
QString fixedValue(QDir::toNativeSeparators(values.at(i)));
dirsToClean << fixedValue;
-#ifdef Q_OS_WIN32
- t << "\t-@ if NOT EXIST \"" << fixedValue << "\" mkdir \""
- << fixedValue << "\"" << endl;
-#else
- t << "\t-@ if test ! -d \"" << fixedValue << "\"; then mkdir \""
- << fixedValue << "\"" << "; fi" <<endl;
-#endif
+ t << "\t-@ " << dirExists << " \"" << fixedValue << "\" "
+ << mkdir << " \"" << fixedValue << "\"" << endl;
}
}
}
@@ -324,11 +321,7 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
// Note: EXTENSION_CLEAN will get called many times when doing reallyclean
// This is why the "2> NUL" gets appended to generated clean targets in makefile.cpp.
t << EXTENSION_CLEAN ": " COMPILER_CLEAN_TARGET << endl;
-#ifdef Q_OS_WIN32
- generateCleanCommands(t, dirsToClean, var("QMAKE_DEL_DIR"), " /S /Q ", "", "");
-#else
- generateCleanCommands(t, dirsToClean, "rm", " -rf ", "", "");
-#endif
+ generateCleanCommands(t, dirsToClean, var("QMAKE_DEL_TREE"), "", "", "");
t << endl;
t << PRE_TARGETDEPS_TARGET ":"
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index f51c046..b2f0db1 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -778,10 +778,8 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
uninst.append("-$(DEL_FILE) \"" + dst_targ + "\"");
if(!links.isEmpty()) {
for(int i = 0; i < links.size(); ++i) {
- if(Option::target_mode == Option::TARG_WIN_MODE ||
- Option::target_mode == Option::TARG_MAC9_MODE) {
- } else if(Option::target_mode == Option::TARG_UNIX_MODE ||
- Option::target_mode == Option::TARG_MACX_MODE) {
+ if(Option::target_mode == Option::TARG_UNIX_MODE ||
+ Option::target_mode == Option::TARG_MACX_MODE) {
QString link = Option::fixPathToTargetOS(destdir + links[i], false);
int lslash = link.lastIndexOf(Option::dir_sep);
if(lslash != -1)
diff --git a/qmake/generators/win32/msvc_dsp.cpp b/qmake/generators/win32/msvc_dsp.cpp
deleted file mode 100644
index 9c8dd1d..0000000
--- a/qmake/generators/win32/msvc_dsp.cpp
+++ /dev/null
@@ -1,1207 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the qmake application 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 "msvc_dsp.h"
-#include "option.h"
-
-#include <qdir.h>
-#include <qset.h>
-
-#include <stdlib.h>
-
-QT_BEGIN_NAMESPACE
-
-DspMakefileGenerator::DspMakefileGenerator() : Win32MakefileGenerator(), init_flag(false)
-{
-}
-
-bool DspMakefileGenerator::writeMakefile(QTextStream &t)
-{
- if(!project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) {
- /* for now just dump, I need to generated an empty dsp or something.. */
- fprintf(stderr, "Project file not generated because all requirements not met:\n\t%s\n",
- var("QMAKE_FAILED_REQUIREMENTS").toLatin1().constData());
- return true;
- }
-
- // Generate workspace file
- if(project->first("TEMPLATE") == "vcsubdirs") {
- if (!project->isActiveConfig("build_pass")) {
- debug_msg(1, "Generator: MSVC: Writing workspave file");
- writeSubDirs(t);
- } else {
- debug_msg(1, "Generator: MSVC: Not writing workspace file for build_pass configs");
- }
- return true;
- } else if (project->first("TEMPLATE") == "vcapp" || project->first("TEMPLATE") == "vclib") {
- if(!project->isActiveConfig("build_pass"))
- return writeDspParts(t);
- return true;
- }
- return project->isActiveConfig("build_pass");
-}
-
-bool DspMakefileGenerator::hasBuiltinCompiler(const QString &filename) const
-{
- for (int i = 0; i < Option::cpp_ext.count(); ++i)
- if (filename.endsWith(Option::cpp_ext.at(i)))
- return true;
- for (int i = 0; i < Option::c_ext.count(); ++i)
- if (filename.endsWith(Option::c_ext.at(i)))
- return true;
- return false;
-}
-
-QString DspMakefileGenerator::replaceExtraCompilerVariables(const QString &var, const QStringList &in, const QStringList &out)
-{
- QString ret = MakefileGenerator::replaceExtraCompilerVariables(var, in, out);
- ret.replace("$(DEFINES)", varGlue("PRL_EXPORT_DEFINES"," -D"," -D","") +
- varGlue("DEFINES"," -D"," -D",""));
-
- QString incpath = this->var("MSVCDSP_INCPATH");
- incpath.replace("/I", "-I");
- ret.replace("$(INCPATH)", incpath);
- return ret;
-}
-
-
-// if config is part of a multibuild thenthe gule (this) has the correct MSVCDSP_PROJECT
-QString DspMakefileGenerator::configName(DspMakefileGenerator * config)
-{
- return var("MSVCDSP_PROJECT") + config->var("MSVCDSP_CONFIG_NAME");
-}
-
-bool DspMakefileGenerator::writeDspHeader(QTextStream &t)
-{
- DspMakefileGenerator * config = this;
- if (mergedProjects.count())
- config = mergedProjects.at(0);
-
- t << "# Microsoft Developer Studio Project File - Name=\"" << var("MSVCDSP_PROJECT") << "\" - Package Owner=<4>" << endl;
- t << "# Microsoft Developer Studio Generated Build File, Format Version 6.00" << endl;
- t << "# ** DO NOT EDIT **" << endl;
- t << endl;
- t << "# TARGTYPE \"Win32 (x86) " << var("MSVCDSP_TARGETTYPE") << "\" " << var("MSVCDSP_DSPTYPE") << endl;
- t << endl;
- t << "CFG=\"" << configName(config) << "\"" << endl;
- t << "!MESSAGE This is not a valid makefile. To build this project using NMAKE," << endl;
- t << "!MESSAGE use the Export Makefile command and run" << endl;
- t << "!MESSAGE " << endl;
- t << "!MESSAGE NMAKE /f " << escapeFilePath(var("TARGET")) << ".mak." << endl;
- t << "!MESSAGE " << endl;
- t << "!MESSAGE You can specify a configuration when running NMAKE" << endl;
- t << "!MESSAGE by defining the macro CFG on the command line. For example:" << endl;
- t << "!MESSAGE " << endl;
- t << "!MESSAGE NMAKE /f " << escapeFilePath(var("TARGET")) << ".mak CFG=\"" << configName(config) << "\"" << endl;
- t << "!MESSAGE " << endl;
- t << "!MESSAGE Possible choices for configuration are:" << endl;
- t << "!MESSAGE " << endl;
- if (mergedProjects.count()) {
- for (int i = 0; i < mergedProjects.count(); ++i) {
- DspMakefileGenerator * config = mergedProjects.at(i);
- t << "!MESSAGE \"" << configName(config) << "\" (based on \"Win32 (x86) " << config->var("MSVCDSP_TARGETTYPE") << "\")" << endl;
- }
- } else {
- t << "!MESSAGE \"" << configName(config) << "\" (based on \"Win32 (x86) " << config->var("MSVCDSP_TARGETTYPE") << "\")" << endl;
- }
- t << "!MESSAGE " << endl;
- t << endl;
- t << "# Begin Project" << endl;
- t << "# PROP AllowPerConfigDependencies 0" << endl;
- t << "# PROP Scc_ProjName \"\"" << endl;
- t << "# PROP Scc_LocalPath \"\"" << endl;
- t << "CPP=" << config->var("QMAKE_CC") << endl;
- t << "MTL=" << config->var("QMAKE_IDL") << endl;
- t << "RSC=" << config->var("QMAKE_RC") << endl;
- t << "BSC32=bscmake.exe" << endl;
-
- return true;
-}
-
-
-bool DspMakefileGenerator::writeDspParts(QTextStream &t)
-{
- //bool staticLibTarget = var("MSVCDSP_DSPTYPE") == "0x0104";
-
- writeDspHeader(t);
- writeDspConfig(t, this);
- t << endl;
- t << "# Begin Target" << endl;
- t << endl;
- t << "# Name \"" << configName(this) << "\"" << endl;
- t << endl;
-
-
- QStringList listNames = QString("SOURCES|DEF_FILE").split("|");
- QStringList allListNames = listNames;
- writeFileGroup(t, listNames, "Source Files", "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat");
- listNames = QStringList("HEADERS");
- allListNames += listNames;
- writeFileGroup(t, QStringList("HEADERS"), "Header Files", "h;hpp;hxx;hm;inl");
- listNames = QString("FORMS|INTERFACES|FORMS3").split("|");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Form Files", "ui");
- listNames = QStringList("IMAGES");
- allListNames += listNames;
- writeFileGroup(t, QStringList("IMAGES"), "Image Files", "");
- listNames = QString("RC_FILE|RESOURCES").split("|");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Resources", "rc;qrc");
- listNames = QStringList("TRANSLATIONS");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Translations", "ts;xlf");
- listNames = QStringList("LEXSOURCES");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Lexables", "l");
- listNames = QStringList("YACCSOURCES");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Yaccables", "y");
- listNames = QStringList("TYPELIBS");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Type Libraries", "tlb;olb");
-
- if (!project->isEmpty("QMAKE_EXTRA_COMPILERS")) {
- const QStringList &quc = project->values("QMAKE_EXTRA_COMPILERS");
- for (QStringList::ConstIterator it = quc.begin(); it != quc.end(); ++it) {
- const QStringList &inputs = project->values((*it)+".input");
- for (QStringList::ConstIterator input = inputs.begin(); input != inputs.end(); ++input) {
- if (!allListNames.contains((*input)) && *input != "UIC3_HEADERS")
- writeFileGroup(t, QStringList((*input)), (*input) + " Files", "");
- }
- }
- }
-
- project->values("SWAPPED_BUILD_STEPS") = swappedBuildSteps.keys();
-
- writeFileGroup(t, QString("GENERATED_SOURCES|GENERATED_FILES|SWAPPED_BUILD_STEPS").split("|"), "Generated", "");
-
- t << "# End Target" << endl;
- t << "# End Project" << endl;
- return true;
-}
-
-void
-DspMakefileGenerator::init()
-{
- if(init_flag)
- return;
- QStringList::Iterator it;
- init_flag = true;
-
- platform = "Win32";
- if(!project->values("QMAKE_PLATFORM").isEmpty())
- platform = varGlue("QMAKE_PLATFORM", "", " ", "");
-
- // this should probably not be here, but I'm using it to wrap the .t files
- if(project->first("TEMPLATE") == "vcapp")
- project->values("QMAKE_APP_FLAG").append("1");
- else if(project->first("TEMPLATE") == "vclib")
- project->values("QMAKE_LIB_FLAG").append("1");
-
- if(project->values("QMAKESPEC").isEmpty())
- project->values("QMAKESPEC").append(qgetenv("QMAKESPEC"));
-
- project->values("QMAKE_LIBS") += escapeFilePaths(project->values("LIBS"));
- processVars();
-
- if(!project->values("VERSION").isEmpty()) {
- QString version = project->values("VERSION").first();
- int firstDot = version.indexOf(".");
- QString major = version.left(firstDot);
- QString minor = version.right(version.length() - firstDot - 1);
- minor.replace(".", "");
- project->values("MSVCDSP_LFLAGS").append("/VERSION:" + major + "." + minor);
- }
-
- QString msvcdsp_project;
- if(!project->isEmpty("TARGET")) {
- project->values("TARGET") = unescapeFilePaths(project->values("TARGET"));
- msvcdsp_project = project->first("TARGET");
- }
-
- MakefileGenerator::init();
-
- if(msvcdsp_project.isEmpty())
- msvcdsp_project = Option::output.fileName();
-
- msvcdsp_project = msvcdsp_project.right(msvcdsp_project.length() - msvcdsp_project.lastIndexOf("\\") - 1);
- int dotFind = msvcdsp_project.lastIndexOf(".");
- if(dotFind != -1)
- msvcdsp_project = msvcdsp_project.left(dotFind);
- msvcdsp_project.replace("-", "");
-
- project->values("MSVCDSP_PROJECT").append(msvcdsp_project);
-
- QStringList &proj = project->values("MSVCDSP_PROJECT");
-
- for(QStringList::Iterator it = proj.begin(); it != proj.end(); ++it)
- (*it).replace(QRegExp("\\.[a-zA-Z0-9_]*$"), "");
-
- if(!project->values("QMAKE_APP_FLAG").isEmpty()) {
- if(project->isActiveConfig("console")) {
- project->values("MSVCDSP_TARGETTYPE").append("Console Application");
- project->values("MSVCDSP_DSPTYPE").append("0x0103");
- project->values("MSVCDSP_DEFINES").append(" /D \"_CONSOLE\" ");
- } else {
- project->values("MSVCDSP_TARGETTYPE").append("Application");
- project->values("MSVCDSP_DSPTYPE").append("0x0101");
- project->values("MSVCDSP_DEFINES").append(" /D \"_WINDOWS\" ");
- }
- } else {
- if(project->isActiveConfig("dll")) {
- project->values("MSVCDSP_TARGETTYPE").append("Dynamic-Link Library");
- project->values("MSVCDSP_DSPTYPE").append("0x0102");
- project->values("MSVCDSP_DEFINES").append(" /D \"_USRDLL\" ");
- } else {
- project->values("MSVCDSP_TARGETTYPE").append("Static Library");
- project->values("MSVCDSP_DSPTYPE").append("0x0104");
- project->values("MSVCDSP_DEFINES").append(" /D \"_LIB\" ");
- }
- }
-
- project->values("MSVCDSP_LFLAGS") += project->values("QMAKE_LFLAGS");
-
- if(!project->values("QMAKE_LIBDIR").isEmpty())
- project->values("MSVCDSP_LFLAGS").append(valGlue(
- escapeFilePaths(project->values("QMAKE_LIBDIR")),
- "/LIBPATH:"," /LIBPATH:",""));
-
- project->values("MSVCDSP_DEFINES").append(varGlue("DEFINES","/D ","" " /D ",""));
- project->values("MSVCDSP_DEFINES").append(varGlue("PRL_EXPORT_DEFINES","/D ","" " /D ",""));
- project->values("MSVCDSP_DEFINES").append(" /D \"WIN32\" ");
-
- QStringList &libs = project->values("QMAKE_LIBS");
- for(QStringList::Iterator libit = libs.begin(); libit != libs.end(); ++libit) {
- project->values("MSVCDSP_LIBS").append(" " + escapeFilePath(*libit));
- }
-
- QStringList &incs = project->values("INCLUDEPATH");
- for(QStringList::Iterator incit = incs.begin(); incit != incs.end(); ++incit) {
- QString inc = (*incit);
- project->values("MSVCDSP_INCPATH").append("/I" + escapeFilePath(inc));
- }
- project->values("MSVCDSP_INCPATH").append("/I" + escapeFilePath(specdir()));
-
- QString dest;
- QString preLinkStep;
- QString postLinkStep;
- QString copyDllStep;
-
- if(!project->values("QMAKE_PRE_LINK").isEmpty())
- preLinkStep += var("QMAKE_PRE_LINK");
-
- if(!project->values("QMAKE_POST_LINK").isEmpty())
- postLinkStep += var("QMAKE_POST_LINK");
-
- // don't destroy the target, it is used by prl writer.
- if(!project->values("DESTDIR").isEmpty()) {
- dest = project->first("DESTDIR");
- project->values("DESTDIR").first() = dest;
- dest = project->values("TARGET").first() + project->first("TARGET_EXT");
- dest.prepend(project->first("DESTDIR"));
- Option::fixPathToTargetOS(dest);
- dest = escapeFilePath(dest);
-
- project->values("MSVCDSP_TARGET").append(
- QString("/out:") + dest);
- if(project->isActiveConfig("dll")) {
- QString imp = dest;
- imp.replace(".dll", ".lib");
- project->values("MSVCDSP_TARGET").append(QString(" /implib:") + escapeFilePath(imp));
- }
- }
-
- if(project->isActiveConfig("dll") && !project->values("DLLDESTDIR").isEmpty()) {
- QStringList dlldirs = project->values("DLLDESTDIR");
- if(dlldirs.count())
- copyDllStep += "\t";
- for(QStringList::Iterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir) {
- copyDllStep += "copy \"$(TargetPath)\" " + escapeFilePath(Option::fixPathToTargetOS(*dlldir)) + "\t";
- }
- }
-
- if(!preLinkStep.isEmpty()) {
- project->values("MSVCDSP_PRE_LINK").append(
- "# Begin Special Build Tool\n"
- "SOURCE=$(InputPath)\n"
- "PreLink_Desc=Post Build Step\n"
- "PreLink_Cmds=" + preLinkStep + "\n"
- "# End Special Build Tool\n");
- }
-
- if(!postLinkStep.isEmpty() || !copyDllStep.isEmpty()) {
- project->values("MSVCDSP_POST_LINK").append(
- "# Begin Special Build Tool\n"
- "SOURCE=$(InputPath)\n"
- "PostBuild_Desc=Post Build Step\n"
- "PostBuild_Cmds=" + postLinkStep + copyDllStep + "\n"
- "# End Special Build Tool\n");
- }
-
- QStringList &formList = project->values("FORMS");
- for(QStringList::ConstIterator hit = formList.begin(); hit != formList.end(); ++hit) {
- if(exists(*hit + ".h"))
- project->values("SOURCES").append(*hit + ".h");
- }
- QStringList &form3List = project->values("FORMS3");
- for(QStringList::ConstIterator hit = form3List.begin(); hit != form3List.end(); ++hit) {
- if(exists(*hit + ".h"))
- project->values("SOURCES").append(*hit + ".h");
- }
-
- project->values("QMAKE_INTERNAL_PRL_LIBS") << "MSVCDSP_LIBS";
-
- // Move some files around //### is this compat?
- if (!project->values("IMAGES").isEmpty()) {
- QString imageFactory(project->first("QMAKE_IMAGE_COLLECTION"));
- project->values("GENERATED_SOURCES") += imageFactory;
- project->values("SOURCES").removeAll(imageFactory);
- }
-
- // Setup PCH variables
- precompH = project->first("PRECOMPILED_HEADER");
- namePCH = fileInfo(precompH).fileName();
- usePCH = !precompH.isEmpty() && project->isActiveConfig("precompile_header");
- if (usePCH) {
- // Created files
- precompObj = var("PRECOMPILED_DIR") + project->first("TARGET") + "_pch" + Option::obj_ext;
- precompPch = var("PRECOMPILED_DIR") + project->first("TARGET") + "_pch.pch";
-
- // Add PRECOMPILED_HEADER to HEADERS
- if (!project->values("HEADERS").contains(precompH))
- project->values("HEADERS") += precompH;
- // Add precompile compiler options
- project->values("PRECOMPILED_FLAGS") = QStringList("/Fp" + precompPch + " /Yu" + escapeFilePath(namePCH) + " /FI" + escapeFilePath(namePCH) + " ");
- // Return to variable pool
- project->values("PRECOMPILED_OBJECT") = QStringList(precompObj);
- project->values("PRECOMPILED_PCH") = QStringList(precompPch);
- }
-
- QString buildName;
- if (!var("BUILD_NAME").isEmpty())
- buildName = var("BUILD_NAME");
- else if (project->isActiveConfig("debug"))
- buildName = "Debug";
- else
- buildName = "Release";
-
- project->values("MSVCDSP_CONFIG_NAME") = QStringList(" - " + platform + " " + buildName);
-}
-
-void DspMakefileGenerator::processPrlVariable(const QString &var, const QStringList &l)
-{
- if(var == "QMAKE_PRL_DEFINES") {
- QStringList &out = project->values("MSVCDSP_DEFINES");
- for(QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) {
- if(out.indexOf((*it)) == -1)
- out.append((" /D \"" + *it + "\""));
- }
- } else {
- MakefileGenerator::processPrlVariable(var, l);
- }
-}
-
-bool DspMakefileGenerator::openOutput(QFile &file, const QString &build) const
-{
- QString outdir;
- if(!file.fileName().isEmpty()) {
- if(QDir::isRelativePath(file.fileName()))
- file.setFileName(Option::output_dir + "/" + file.fileName()); //pwd when qmake was run
- QFileInfo fi(fileInfo(file.fileName()));
- if(fi.isDir())
- outdir = file.fileName() + QDir::separator();
- }
-
- if(!outdir.isEmpty() || file.fileName().isEmpty()) {
- QString ext = project->first("DSP_EXTENSION");
- if(project->first("TEMPLATE") == "vcsubdirs") {
- if (!project->first("DSW_EXTENSION").isEmpty())
- ext = project->first("DSW_EXTENSION");
- else
- ext = ".dsw";
- }
- QString outputName = unescapeFilePath(project->first("QMAKE_DSP_PROJECT_NAME"));
- if (!project->first("MAKEFILE").isEmpty())
- outputName = unescapeFilePath(project->first("MAKEFILE"));
- if (outputName.isEmpty())
- outputName = unescapeFilePath(project->first("QMAKE_ORIG_TARGET"));
- file.setFileName(outdir + outputName + ext);
- }
-
- if(QDir::isRelativePath(file.fileName())) {
- QString ofile = Option::fixPathToLocalOS(file.fileName());
- int slashfind = ofile.lastIndexOf(Option::dir_sep);
- if(slashfind == -1) {
- ofile = ofile.replace(QRegExp("-"), "_");
- } else {
- int hypenfind = ofile.indexOf('-', slashfind);
- while (hypenfind != -1 && slashfind < hypenfind) {
- ofile = ofile.replace(hypenfind, 1, "_");
- hypenfind = ofile.indexOf('-', hypenfind + 1);
- }
- }
- file.setFileName(Option::fixPathToLocalOS(qmake_getpwd() + Option::dir_sep + ofile));
- }
- return Win32MakefileGenerator::openOutput(file, build);
-}
-
-bool DspMakefileGenerator::mergeBuildProject(MakefileGenerator *other)
-{
-
- mergedProjects.prepend(static_cast<DspMakefileGenerator*>(other));
- return true;
-}
-
-bool DspMakefileGenerator::writeProjectMakefile()
-{
- bool ret = true;
-
- QTextStream t(&Option::output);
- // Check if all requirements are fulfilled
- if(!project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) {
- fprintf(stderr, "Project file not generated because all requirements not met:\n\t%s\n",
- var("QMAKE_FAILED_REQUIREMENTS").toLatin1().constData());
- return true;
- }
-
- // Generate project file
- if(project->first("TEMPLATE") == "vcapp" ||
- project->first("TEMPLATE") == "vclib") {
- if (!mergedProjects.count()) {
- warn_msg(WarnLogic, "Generator: MSVC DSP: no single configuration created, cannot output project!");
- return false;
- }
- debug_msg(1, "Generator: MSVC 6: Writing project file");
-
- writeDspHeader(t);
- for (int i = 0; i < mergedProjects.count(); ++i) {
- DspMakefileGenerator* config = mergedProjects.at(i);
- t << endl;
- if (i == 0)
- t << "!IF";
- else
- t << "!ELSEIF";
- t << " \"$(CFG)\" == \"" << configName(config) << "\"" << endl;
- t << endl;
- writeDspConfig(t, config);
- }
- t << endl;
- t << "!ENDIF " << endl;
- t << endl;
- t << "# Begin Target" << endl;
- t << endl;
- for (int i = 0; i < mergedProjects.count(); ++i)
- t << "# Name \"" << configName(mergedProjects.at(i)) << "\"" << endl;
- t << endl;
-
- QMap< QString, QSet<QString> > files;
-
- // merge source files
- for (int i = 0; i < mergedProjects.count(); ++i) {
-
- DspMakefileGenerator* config = mergedProjects.at(i);
-
- files["DEF_FILE"] += config->project->values("DEF_FILE").toSet();
- files["SOURCES"] += config->project->values("SOURCES").toSet();
- files["HEADERS"] += config->project->values("HEADERS").toSet();
- files["INTERFACES"] += config->project->values("INTERFACES").toSet();
- files["FORMS"] += config->project->values("FORMS").toSet();
- files["FORMS"] += config->project->values("FORMS3").toSet();
- files["IMAGES"] += config->project->values("IMAGES").toSet();
- files["RC_FILE"] += config->project->values("RC_FILE").toSet();
- files["RESOURCES"] += config->project->values("RESOURCES").toSet();
- files["TRANSLATIONS"] += config->project->values("TRANSLATIONS").toSet();
- files["LEXSOURCES"] += config->project->values("LEXSOURCES").toSet();
- files["YACCSOURCES"] += config->project->values("YACCSOURCES").toSet();
- files["TYPELIBS"] += config->project->values("TYPELIBS").toSet();
-
- if (!config->project->isEmpty("QMAKE_EXTRA_COMPILERS")) {
- const QStringList &quc = config->project->values("QMAKE_EXTRA_COMPILERS");
- for (QStringList::ConstIterator it = quc.begin(); it != quc.end(); ++it) {
- const QStringList &inputs = project->values((*it)+".input");
- for (QStringList::ConstIterator input = inputs.begin(); input != inputs.end(); ++input) {
- if (*input != "UIC3_HEADERS")
- files[(*input)] += config->project->values((*input)).toSet();
- }
- }
- }
- }
-
- QStringList keys = files.keys();
- for (int k = 0; k < keys.size(); ++k)
- project->values(keys.at(k)) = QList<QString>::fromSet(files[keys.at(k)]);
-
- QStringList listNames = QString("SOURCES|DEF_FILE").split("|");
- QStringList allListNames = listNames;
- writeFileGroup(t, listNames, "Source Files", "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat");
- listNames = QStringList("HEADERS");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Header Files", "h;hpp;hxx;hm;inl");
- listNames = QString("FORMS|INTERFACES|FORMS3").split("|");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Form Files", "ui");
- listNames = QStringList("IMAGES");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Image Files", "");
- listNames = QString("RC_FILE|RESOURCES").split("|");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Resources", "rc;qrc");
- listNames = QStringList("TRANSLATIONS");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Translations", "ts;xlf");
- listNames = QStringList("LEXSOURCES");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Lexables", "l");
- listNames = QStringList("YACCSOURCES");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Yaccables", "y");
- listNames = QStringList("TYPELIBS");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Type Libraries", "tlb;olb");
-
- for (int l = 0; l < allListNames.size(); ++l)
- keys.removeAll(allListNames.at(l));
-
- for (int k = 0; k < keys.size(); ++k)
- writeFileGroup(t, QStringList(keys.at(k)), keys.at(k) + " Files", "");
-
- // done last as generated may have changed when creating build rules for the above
- for (int i = 0; i < mergedProjects.count(); ++i) {
-
- DspMakefileGenerator* config = mergedProjects.at(i);
-
- config->project->values("SWAPPED_BUILD_STEPS") = config->swappedBuildSteps.keys();
- files["SWAPPED_BUILD_STEPS"] += config->project->values("SWAPPED_BUILD_STEPS").toSet();
-
- files["GENERATED_SOURCES"] += config->project->values("GENERATED_SOURCES").toSet();
- files["GENERATED_FILES"] += config->project->values("GENERATED_FILES").toSet();
- }
-
- project->values("SWAPPED_BUILD_STEPS") = QList<QString>::fromSet(files["SWAPPED_BUILD_STEPS"]);
- project->values("GENERATED_SOURCES") = QList<QString>::fromSet(files["GENERATED_SOURCES"]);
- project->values("GENERATED_FILES") = QList<QString>::fromSet(files["GENERATED_FILES"]);
-
- writeFileGroup(t, QString("GENERATED_SOURCES|GENERATED_FILES|SWAPPED_BUILD_STEPS").split("|"), "Generated", "");
- t << endl;
- t << "# End Target" << endl;
- t << "# End Project" << endl;
- }else if(project->first("TEMPLATE") == "vcsubdirs") {
- ret = writeMakefile(t);
- }
-
- return ret;
-}
-
-const char _dswHeader60[] = "Microsoft Developer Studio Workspace File, Format Version 6.00\n";
-const char _dswWarning[] = "# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\n";
-const char _dswDevider[] = "###############################################################################\n";
-const char _dswProjectName[] = "Project: \"%1\"=%2 - Package Owner=<4>\n"; // %1 = project name, %2 = project path
-const char _dswPackage5Start[] = "Package=<5>\n{{{\n";
-const char _dswPackage5Stop[] = "}}}\n";
-const char _dswPackage4Start[] = "Package=<4>\n{{{\n";
-const char _dswPackage4Stop[] = "}}}\n";
-const char _dswProjectDep[] = " Begin Project Dependency\n Project_Dep_Name %1\n End Project Dependency\n"; // %1 = project name
-const char _dswGlobal[] = "Global:\n\nPackage=<5>\n{{{\n}}}\n\nPackage=<3>\n{{{\n}}}\n\n";
-
-
-struct WorkspaceDepend {
- QString dspProjectFile, orig_target, target;
- QStringList dependencies;
-};
-
-void DspMakefileGenerator::writeSubDirs(QTextStream &t)
-{
- // Output headers
- t << _dswHeader60;
- t << _dswWarning;
- t << endl;
-
- QHash<QString, WorkspaceDepend*> workspace_depends;
- QList<WorkspaceDepend*> workspace_cleanup;
- QStringList subdirs = project->values("SUBDIRS");
- QString oldpwd = qmake_getpwd();
-
- // Make sure that all temp projects are configured
- // for release so that the depends are created
- // without the debug <lib>dxxx.lib name mangling
- QStringList old_after_vars = Option::after_user_vars;
- Option::after_user_vars.append("CONFIG+=release");
-
- for(int i = 0; i < subdirs.size(); ++i) {
- QString tmp = subdirs.at(i);
- if(!project->isEmpty(tmp + ".file")) {
- if(!project->isEmpty(tmp + ".subdir"))
- warn_msg(WarnLogic, "Cannot assign both file and subdir for subdir %s",
- tmp.toLatin1().constData());
- tmp = project->first(tmp + ".file");
- } else if(!project->isEmpty(tmp + ".subdir")) {
- tmp = project->first(tmp + ".subdir");
- }
-
- QFileInfo fi(fileInfo(Option::fixPathToLocalOS(tmp, true)));
- if(fi.exists()) {
- if(fi.isDir()) {
- QString profile = tmp;
- if(!profile.endsWith(Option::dir_sep))
- profile += Option::dir_sep;
- profile += fi.baseName() + Option::pro_ext;
- subdirs.append(profile);
- } else {
- QMakeProject tmp_proj;
- QString dir = fi.path(), fn = fi.fileName();
- if(!dir.isEmpty()) {
- if(!qmake_setpwd(dir))
- fprintf(stderr, "Cannot find directory: %s\n", dir.toLatin1().constData());
- }
- if(tmp_proj.read(fn)) {
- // Check if all requirements are fulfilled
- if(!tmp_proj.variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty()) {
- fprintf(stderr, "Project file(%s) not added to Workspace because all requirements not met:\n\t%s\n",
- fn.toLatin1().constData(), tmp_proj.values("QMAKE_FAILED_REQUIREMENTS").join(" ").toLatin1().constData());
- continue;
- }
- if(tmp_proj.first("TEMPLATE") == "vcsubdirs") {
- QStringList tmp_proj_subdirs = tmp_proj.variables()["SUBDIRS"];
- for(int x = 0; x < tmp_proj_subdirs.size(); ++x) {
- QString tmpdir = tmp_proj_subdirs.at(x);
- if(!tmp_proj.isEmpty(tmpdir + ".file")) {
- if(!tmp_proj.isEmpty(tmpdir + ".subdir"))
- warn_msg(WarnLogic, "Cannot assign both file and subdir for subdir %s",
- tmpdir.toLatin1().constData());
- tmpdir = tmp_proj.first(tmpdir + ".file");
- } else if(!tmp_proj.isEmpty(tmpdir + ".subdir")) {
- tmpdir = tmp_proj.first(tmpdir + ".subdir");
- }
- subdirs += fileFixify(tmpdir);
- }
- } else if(tmp_proj.first("TEMPLATE") == "vcapp" || tmp_proj.first("TEMPLATE") == "vclib") {
- // Initialize a 'fake' project to get the correct variables
- // and to be able to extract all the dependencies
- DspMakefileGenerator tmp_dsp;
- tmp_dsp.setNoIO(true);
- tmp_dsp.setProjectFile(&tmp_proj);
- if(Option::debug_level) {
- QMap<QString, QStringList> &vars = tmp_proj.variables();
- for(QMap<QString, QStringList>::Iterator it = vars.begin();
- it != vars.end(); ++it) {
- if(it.key().left(1) != "." && !it.value().isEmpty())
- debug_msg(1, "%s: %s === %s", fn.toLatin1().constData(), it.key().toLatin1().constData(),
- it.value().join(" :: ").toLatin1().constData());
- }
- }
-
- // We assume project filename is [QMAKE_ORIG_TARGET].vcproj
- QString dsp = unescapeFilePath(tmp_dsp.project->first("MSVCDSP_PROJECT") + project->first("DSP_EXTENSION"));
-
- // If file doesn't exsist, then maybe the users configuration
- // doesn't allow it to be created. Skip to next...
- if(!exists(qmake_getpwd() + Option::dir_sep + dsp)) {
- warn_msg(WarnLogic, "Ignored (not found) '%s'", QString(qmake_getpwd() + Option::dir_sep + dsp).toLatin1().constData());
- goto nextfile; // # Dirty!
- }
-
- WorkspaceDepend *newDep = new WorkspaceDepend;
- newDep->dspProjectFile = fileFixify(dsp);
- newDep->orig_target = unescapeFilePath(tmp_proj.first("QMAKE_ORIG_TARGET"));
- newDep->target = tmp_proj.first("MSVCDSP_PROJECT").section(Option::dir_sep, -1) + tmp_proj.first("TARGET_EXT");
-
- // We want to store it as the .lib name.
- if(newDep->target.endsWith(".dll"))
- newDep->target = newDep->target.left(newDep->target.length()-3) + "lib";
-
- // All projects having mocable sourcefiles are dependent on moc.exe
- if(tmp_proj.variables()["CONFIG"].contains("moc"))
- newDep->dependencies << "moc.exe";
-
- // All extra compilers which has valid input are considered dependencies
- const QStringList &quc = tmp_proj.variables()["QMAKE_EXTRA_COMPILERS"];
- for(QStringList::ConstIterator it = quc.constBegin(); it != quc.constEnd(); ++it) {
- const QStringList &invar = tmp_proj.variables().value((*it) + ".input");
- for(QStringList::ConstIterator iit = invar.constBegin(); iit != invar.constEnd(); ++iit) {
- const QStringList fileList = tmp_proj.variables().value(*iit);
- if (!fileList.isEmpty()) {
- QString dep = tmp_proj.first((*it) + ".commands").section('/', -1).section('\\', -1);
- if (!newDep->dependencies.contains(dep))
- newDep->dependencies << dep;
- }
- }
- }
-
- // Add all unknown libs to the deps
- QStringList where("QMAKE_LIBS");
- if(!tmp_proj.isEmpty("QMAKE_INTERNAL_PRL_LIBS"))
- where = tmp_proj.variables()["QMAKE_INTERNAL_PRL_LIBS"];
-
- for(QStringList::iterator wit = where.begin();
- wit != where.end(); ++wit) {
- QStringList &l = tmp_proj.variables()[(*wit)];
- for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
- QString opt = (*it).trimmed();
- if(!opt.startsWith("/") && // Not a switch
- opt != newDep->target && // Not self
- opt != "opengl32.lib" && // We don't care about these libs
- opt != "glu32.lib" && // to make depgen alittle faster
- opt != "kernel32.lib" &&
- opt != "user32.lib" &&
- opt != "gdi32.lib" &&
- opt != "comdlg32.lib" &&
- opt != "advapi32.lib" &&
- opt != "shell32.lib" &&
- opt != "ole32.lib" &&
- opt != "oleaut32.lib" &&
- opt != "uuid.lib" &&
- opt != "imm32.lib" &&
- opt != "winmm.lib" &&
- opt != "wsock32.lib" &&
- opt != "ws2_32.lib" &&
- opt != "winspool.lib" &&
- opt != "delayimp.lib")
- {
- newDep->dependencies << opt.section(Option::dir_sep, -1);
- }
- }
- }
- workspace_cleanup.append(newDep);
- workspace_depends.insert(newDep->target, newDep);
-
- debug_msg(1, "Generator: MSVC: Added project (name:'%s' path:'%s' deps:'%s')",
- qPrintable(newDep->target) , qPrintable(newDep->dspProjectFile),
- qPrintable(newDep->dependencies.join(";")));
- }
- }
-nextfile:
- qmake_setpwd(oldpwd);
- }
- }
- }
-
- // Restore previous after_user_var options
- Option::after_user_vars = old_after_vars;
-
- // Output all projects
- QString dswProjectName = QLatin1String(_dswProjectName);
- QString dswProjectDep = QLatin1String(_dswProjectDep);
- for(QList<WorkspaceDepend*>::Iterator it = workspace_cleanup.begin(); it != workspace_cleanup.end(); ++it) {
- t << _dswDevider;
- t << endl;
- t << dswProjectName.arg((*it)->orig_target).arg((*it)->dspProjectFile);
- t << endl;
- t << _dswPackage5Start;
- t << _dswPackage5Stop;
- t << endl;
- t << _dswPackage4Start;
-
- // Output project dependencies
- for(QStringList::iterator dit = (*it)->dependencies.begin(); dit != (*it)->dependencies.end(); ++dit) {
- if(WorkspaceDepend *vc = workspace_depends[*dit])
- t << dswProjectDep.arg(vc->orig_target);
- }
-
- t << _dswPackage4Stop;
- }
-
- // Output global part
- t << _dswDevider << endl;
- t << _dswGlobal;
- t << _dswDevider;
- t << endl << endl;
-}
-
-class FolderGroup
-{
-public:
- QString name;
- QString filter;
- QMap<QString, FolderGroup *> subFolders;
- QMap<QString, QString> files;
-
- void insertStructured(const QString &file, const QString &fileListName)
- {
- QStringList path = QFileInfo(file).path().split("/");
- if (!path.isEmpty() && path.at(0) == ".")
- path.takeAt(0);
- FolderGroup *currentFolder = this;
- for (int i = 0; i < path.size(); i++) {
- if (currentFolder->subFolders.contains(path.at(i))) {
- currentFolder = currentFolder->subFolders.value(path.at(i));
- } else {
- FolderGroup *newFolder = new FolderGroup;
- newFolder->name = path.at(i);
- currentFolder->subFolders.insert(path.at(i), newFolder);
- currentFolder = newFolder;
- }
- }
- currentFolder->files.insert(file, fileListName);
- }
-
- void insertFlat(const QString &file, const QString &fileListName)
- {
- files.insert(file, fileListName);
- }
-
- ~FolderGroup()
- {
- qDeleteAll(subFolders.values());
- }
-};
-
-bool DspMakefileGenerator::writeFileGroup(QTextStream &t, const QStringList &listNames, const QString &group, const QString &filter)
-{
- FolderGroup root;
- root.name = group;
- root.filter = filter;
-
- for (int i = 0; i < listNames.count(); ++i) {
- QStringList list = project->values(listNames.at(i));
- for (int j = 0; j < list.count(); ++j) {
- const QString name = list.at(j);
- if (name.isEmpty())
- continue;
- if (project->isActiveConfig("flat"))
- root.insertFlat(name, listNames.at(i));
- else
- root.insertStructured(name, listNames.at(i));
- }
- }
-
- if (root.files.isEmpty() && root.subFolders.isEmpty())
- return true;
-
- writeSubFileGroup(t, &root);
-
- return true;
-}
-
-void DspMakefileGenerator::writeSubFileGroup(QTextStream &t, FolderGroup *folder)
-{
- t << "# Begin Group \"" << folder->name << "\"" << endl;
- t << "# PROP Default_Filter \"" << folder->filter << "\"" << endl;
- QMap<QString, FolderGroup *>::const_iterator folderIt = folder->subFolders.begin();
- while (folderIt != folder->subFolders.end()) {
- writeSubFileGroup(t, folderIt.value());
- ++folderIt;
- }
- QMap<QString, QString>::const_iterator it = folder->files.begin();
- while (it != folder->files.end()) {
- t << "# Begin Source File" << endl;
- t << "SOURCE=" << escapeFilePath(it.key()) << endl;
- writeBuildstepForFile(t, it.key(), it.value());
- t << "# End Source File" << endl;
- t << endl;
- ++it;
- }
- t << "# End Group" << endl;
- t << endl;
-}
-
-bool DspMakefileGenerator::writeBuildstepForFile(QTextStream &t, const QString &file, const QString &listName)
-{
-
- if (!mergedProjects.count()) {
- t << writeBuildstepForFileForConfig(file, listName, this);
- return true;
- }
-
- //only add special build rules when needed
-
- QStringList specialBuilds;
- int i = 0;
- for (i = 0; i < mergedProjects.count(); ++i)
- specialBuilds += writeBuildstepForFileForConfig(file, listName, mergedProjects.at(i));
-
- // no special build just return
- if (specialBuilds.join("").isEmpty())
- return true;
-
- for (i = 0; i < mergedProjects.count(); ++i) {
- if (i == 0)
- t << "!IF";
- else
- t << "!ELSEIF";
- t << " \"$(CFG)\" == \"" << configName(mergedProjects.at(i)) << "\"" << endl;
- t << endl;
- t << specialBuilds.at(i);
- t << endl;
- }
-
- t << "!ENDIF" << endl;
-
- return true;
-}
-
-bool DspMakefileGenerator::writeDspConfig(QTextStream &t, DspMakefileGenerator *config)
-{
-
- bool isDebug = config->project->isActiveConfig("debug");
- bool staticLibTarget = config->var("MSVCDSP_DSPTYPE") == "0x0104";
-
- QString outDir = Option::fixPathToTargetOS(config->project->first("DESTDIR"));
- while (outDir.endsWith(Option::dir_sep))
- outDir.chop(1);
- outDir = config->escapeFilePath(outDir);
-
- QString intDir = config->project->first("OBJECTS_DIR");
- while (intDir.endsWith(Option::dir_sep))
- intDir.chop(1);
- intDir = config->escapeFilePath(intDir);
-
- t << "# PROP BASE Use_MFC 0" << endl;
- t << "# PROP BASE Use_Debug_Libraries " << (isDebug ? "1" : "0") << endl;
- t << "# PROP BASE Output_Dir " << outDir << endl;
- t << "# PROP BASE Intermediate_Dir " << intDir << endl;
- t << "# PROP BASE Target_Dir \"\"" << endl;
- t << "# PROP Use_MFC 0" << endl;
- t << "# PROP Use_Debug_Libraries " << (isDebug ? "1" : "0") << endl;
-
- t << "# PROP Output_Dir " << outDir << endl;
- t << "# PROP Intermediate_Dir " << intDir << endl;
- if (config->project->isActiveConfig("dll") || config->project->isActiveConfig("plugin"))
- t << "# PROP Ignore_Export_Lib 1" << endl;
- t << "# PROP Target_Dir \"\"" << endl;
- t << "# ADD CPP " << config->var("MSVCDSP_INCPATH") << " /c /FD " << config->var("QMAKE_CXXFLAGS") << " " << config->var("MSVCDSP_DEFINES") << " " << config->var("PRECOMPILED_FLAGS") << endl;
- t << "# ADD MTL /nologo /mktyplib203 /win32 /D " << (isDebug ? "\"_DEBUG\"" : "\"NDEBUG\"") << endl;
- t << "# ADD RSC /l 0x409 /d " << (isDebug ? "\"_DEBUG\"" : "\"NDEBUG\"") << endl;
- t << "# ADD BSC32 /nologo" << endl;
- if (staticLibTarget) {
- t << "LIB32=" << config->var("QMAKE_LIB") << endl;
- t << "# ADD LIB32 " << config->var("MSVCDSP_TARGET") << " " << config->var("PRECOMPILED_OBJECT") << endl;
- } else {
- t << "LINK32=" << config->var("QMAKE_LINK") << endl;
- t << "# ADD LINK32 " << config->var("MSVCDSP_LFLAGS") << " " << config->var("MSVCDSP_LIBS") << " " << config->var("MSVCDSP_TARGET") << " " << config->var("PRECOMPILED_OBJECT") << endl;
- }
-
- if (!config->project->values("MSVCDSP_PRE_LINK").isEmpty())
- t << config->project->values("MSVCDSP_PRE_LINK").first();
-
- if (!config->project->values("MSVCDSP_POST_LINK").isEmpty())
- t << config->project->values("MSVCDSP_POST_LINK").first();
-
- return true;
-}
-
-QString DspMakefileGenerator::writeBuildstepForFileForConfig(const QString &file, const QString &listName, DspMakefileGenerator *config)
-{
- QString ret;
- QTextStream t(&ret);
-
- // exclude from build
- if (!config->project->values(listName).contains(file)) {
- t << "# PROP Exclude_From_Build 1" << endl;
- return ret;
- }
-
- if (config->usePCH) {
- bool c_file = false;
- for (QStringList::Iterator it = Option::c_ext.begin(); it != Option::c_ext.end(); ++it) {
- if (file.endsWith(*it)) {
- c_file = true;
- break;
- }
- }
- if(c_file) {
- t << "# SUBTRACT CPP /FI" << config->escapeFilePath(config->namePCH) << " /Yu" << config->escapeFilePath(config->namePCH) << " /Fp" << endl;
- return ret;
- } else if (config->precompH.endsWith(file)) {
- // ### dependency list quickly becomes too long for VS to grok...
- t << "USERDEP_" << file << "=" << config->valGlue(config->escapeFilePaths(config->findDependencies(config->precompH)), "", "\t", "") << endl;
- t << endl;
- t << "# Begin Custom Build - Creating precompiled header from " << file << "..." << endl;
- t << "InputPath=.\\" << config->escapeFilePath(file) << endl << endl;
- t << config->precompPch + ": $(SOURCE) \"$(IntDir)\" \"$(OUTDIR)\"" << endl;
- t << "\t" << config->var("QMAKE_CC") << " /TP /W3 /FD /c /Yc /Fp" << config->precompPch << " /Fo" << config->precompObj << " /Fd\"$(IntDir)\\\\\" " << file << " ";
- t << config->var("MSVCDSP_INCPATH") << " " << config->var("MSVCDSP_DEFINES") << " " << config->var("QMAKE_CXXFLAGS") << endl;
- t << "# End Custom Build" << endl << endl;
- return ret;
- }
- }
-
- QString fileBase = QFileInfo(file).completeBaseName();
-
- bool hasBuiltin = config->hasBuiltinCompiler(file);
- BuildStep allSteps;
-
- if (!config->swappedBuildSteps.contains(file)) {
- QStringList compilers = config->project->values("QMAKE_EXTRA_COMPILERS");
- for (int i = 0; i < compilers.count(); ++i) {
- QString compiler = compilers.at(i);
- if (config->project->values(compiler + ".input").isEmpty())
- continue;
- QString input = config->project->values(compiler + ".input").first();
- QStringList inputList = config->project->values(input);
- if (!inputList.contains(file))
- continue;
-
- QStringList compilerCommands = config->project->values(compiler + ".commands");
- QStringList compilerOutput = config->project->values(compiler + ".output");
- if (compilerCommands.isEmpty() || compilerOutput.isEmpty())
- continue;
-
- QStringList compilerName = config->project->values(compiler + ".name");
- if (compilerName.isEmpty())
- compilerName << compiler;
- QStringList compilerDepends = config->project->values(compiler + ".depends");
- QString compilerDependsCommand = config->project->values(compiler + ".depend_command").join(" ");
- if (!compilerDependsCommand.isEmpty()) {
- if(!config->canExecute(compilerDependsCommand))
- compilerDependsCommand = QString();
- }
- QStringList compilerConfig = config->project->values(compiler + ".CONFIG");
-
- if (!config->verifyExtraCompiler(compiler, file))
- continue;
-
- bool combineAll = compilerConfig.contains("combine");
- if (combineAll && inputList.first() != file)
- continue;
-
- QString fileIn("$(InputPath)");
-
- if (combineAll && !inputList.isEmpty()) {
- fileIn = inputList.join(" ");
- compilerDepends += inputList;
- }
-
- QString fileOut = compilerOutput.first();
- QString fileOutBase = QFileInfo(fileOut).completeBaseName();
- fileOut.replace("${QMAKE_FILE_IN}", fileIn);
- fileOut.replace("${QMAKE_FILE_BASE}", fileBase);
- fileOut.replace("${QMAKE_FILE_OUT_BASE}", fileOutBase);
- fileOut.replace('/', '\\');
-
- BuildStep step;
- for (int i2 = 0; i2 < compilerDepends.count(); ++i2) {
- QString dependency = compilerDepends.at(i2);
- dependency.replace("${QMAKE_FILE_IN}", fileIn);
- dependency.replace("${QMAKE_FILE_BASE}", fileBase);
- dependency.replace("${QMAKE_FILE_OUT_BASE}", fileOutBase);
- dependency.replace('/', '\\');
- if (!step.deps.contains(dependency, Qt::CaseInsensitive))
- step.deps << dependency;
- }
- // depends command
- if (!compilerDependsCommand.isEmpty() && config->doDepends()) {
- char buff[256];
- QString dep_cmd = config->replaceExtraCompilerVariables(compilerDependsCommand, file,
- fileOut);
- dep_cmd = Option::fixPathToLocalOS(dep_cmd, true, false);
- if(config->canExecute(dep_cmd)) {
- if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) {
- QString indeps;
- while(!feof(proc)) {
- int read_in = (int)fread(buff, 1, 255, proc);
- if(!read_in)
- break;
- indeps += QByteArray(buff, read_in);
- }
- QT_PCLOSE(proc);
- if(!indeps.isEmpty())
- step.deps += config->fileFixify(indeps.replace('\n', ' ').simplified().split(' '));
- }
- }
- }
-
-
- QString mappedFile;
- if (hasBuiltin) {
- mappedFile = fileOut;
- fileOut = fileIn;
- fileIn = file;
- }
-
- step.buildStep += " \\\n\t";
- QString command(compilerCommands.join(" "));
- // Replace any newlines with proper line-continuance
- command.replace("\n", " \\\n\t");
- // Might be a macro, and not a valid filename, so the replaceExtraCompilerVariables() would eat it
- command.replace("${QMAKE_FILE_IN}", config->escapeFilePath(fileIn));
- command.replace("${QMAKE_FILE_BASE}", config->escapeFilePath(fileBase));
- command.replace("${QMAKE_FILE_OUT_BASE}", config->escapeFilePath(fileOutBase));
- command.replace("${QMAKE_FILE_OUT}", config->escapeFilePath(fileOut));
-
- command = config->replaceExtraCompilerVariables(command, fileIn, fileOut);
-
- step.buildName = compilerName.first();
- step.buildStep += command;
- step.buildOutputs += fileOut;
-
- if (hasBuiltin) {
- step.deps << fileIn;
- config->swappedBuildSteps[mappedFile] = step;
- } else {
- allSteps << step;
- }
- }
- } else {
- allSteps << config->swappedBuildSteps.value(file);
- }
-
- if (allSteps.buildStep.isEmpty())
- return ret;
-
- int i;
- QStringList dependencyList;
- // remove dependencies that are also output
- for (i = 0; i < 1; ++i) {
- QStringList buildOutput(allSteps.buildOutputs.at(i));
-
- for (int i2 = 0; i2 < allSteps.deps.count(); ++i2) {
- QString dependency = allSteps.deps.at(i2);
- if (!buildOutput.contains(dependency) && !dependencyList.contains(dependency))
- dependencyList << dependency;
- }
- }
- QString allDependencies = config->valGlue(dependencyList, "", "\t", "");
- t << "USERDEP_" << file << "=" << allDependencies << endl;
- t << "# PROP Ignore_Default_Tool 1" << endl;
- t << "# Begin Custom Build - Running " << allSteps.buildName << " on " << file << endl;
- t << "InputPath=" << file << endl;
- t << "BuildCmds= " << allSteps.buildStep << endl;
- for (i = 0; i < allSteps.buildOutputs.count(); ++i) {
- t << config->escapeFilePath(allSteps.buildOutputs.at(i))
- << " : $(SOURCE) $(INTDIR) $(OUTDIR)\n\t$(BuildCmds)\n";
- }
- t << endl;
- t << "# End Custom Build" << endl;
-
- return ret;
-}
-
-QT_END_NAMESPACE
diff --git a/qmake/generators/win32/msvc_dsp.h b/qmake/generators/win32/msvc_dsp.h
deleted file mode 100644
index f3e2435..0000000
--- a/qmake/generators/win32/msvc_dsp.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the qmake application 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$
-**
-****************************************************************************/
-
-#ifndef MSVC_DSP_H
-#define MSVC_DSP_H
-
-#include "winmakefile.h"
-
-QT_BEGIN_NAMESPACE
-
-class FolderGroup;
-
-class DspMakefileGenerator : public Win32MakefileGenerator
-{
- bool init_flag;
- bool writeDspHeader(QTextStream &);
- bool writeDspParts(QTextStream &);
- bool writeFileGroup(QTextStream &t, const QStringList &listNames, const QString &group, const QString &filter);
- void writeSubFileGroup(QTextStream &t, FolderGroup *folder);
- bool writeBuildstepForFile(QTextStream &t, const QString &file, const QString &listName);
- static bool writeDspConfig(QTextStream &t, DspMakefileGenerator *config);
- static QString writeBuildstepForFileForConfig(const QString &file, const QString &listName, DspMakefileGenerator *config);
- QString configName(DspMakefileGenerator * config);
-
- bool writeMakefile(QTextStream &);
- bool writeProjectMakefile();
- void writeSubDirs(QTextStream &t);
- void init();
-
-public:
- DspMakefileGenerator();
- ~DspMakefileGenerator();
-
- bool openOutput(QFile &file, const QString &build) const;
- bool hasBuiltinCompiler(const QString &filename) const;
-
-protected:
- virtual bool doDepends() const { return false; } //never necesary
- virtual void processSources() { filterIncludedFiles("SOURCES"); filterIncludedFiles("GENERATED_SOURCES"); }
- virtual QString replaceExtraCompilerVariables(const QString &, const QStringList &, const QStringList &);
- inline QString replaceExtraCompilerVariables(const QString &val, const QString &in, const QString &out)
- { return MakefileGenerator::replaceExtraCompilerVariables(val, in, out); }
- virtual bool supportsMetaBuild() { return true; }
- virtual bool supportsMergedBuilds() { return true; }
- virtual bool mergeBuildProject(MakefileGenerator *other);
- virtual void processPrlVariable(const QString &, const QStringList &);
- virtual bool findLibraries();
-
- bool usePCH;
- QString precompH, namePCH,
- precompObj, precompPch;
-
- QString platform;
-
- struct BuildStep {
- BuildStep() {}
- BuildStep &operator<<(const BuildStep &other) {
- deps << other.deps;
- buildStep += other.buildStep;
- buildName += other.buildName;
- buildOutputs += other.buildOutputs;
- return *this;
- }
-
- QStringList deps;
- QString buildStep;
- QString buildName;
- QStringList buildOutputs;
- };
- QMap<QString, BuildStep> swappedBuildSteps;
-
- // Holds all configurations for glue (merged) project
- QList<DspMakefileGenerator*> mergedProjects;
-};
-
-inline DspMakefileGenerator::~DspMakefileGenerator()
-{ }
-
-inline bool DspMakefileGenerator::findLibraries()
-{ return Win32MakefileGenerator::findLibraries("MSVCDSP_LIBS"); }
-
-QT_END_NAMESPACE
-
-#endif // MSVC_DSP_H
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 47986f5..3536a02 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -1721,8 +1721,7 @@ QString VcprojGenerator::findTemplate(QString file)
!exists((ret = QString(QLibraryInfo::location(QLibraryInfo::DataPath) + "/win32-msvc2002/" + file))) &&
!exists((ret = QString(QLibraryInfo::location(QLibraryInfo::DataPath) + "/win32-msvc2003/" + file))) &&
!exists((ret = QString(QLibraryInfo::location(QLibraryInfo::DataPath) + "/win32-msvc2005/" + file))) &&
- !exists((ret = QString(QLibraryInfo::location(QLibraryInfo::DataPath) + "/win32-msvc2008/" + file))) &&
- !exists((ret = (QString(qgetenv("HOME")) + "/.tmake/" + file))))
+ !exists((ret = QString(QLibraryInfo::location(QLibraryInfo::DataPath) + "/win32-msvc2008/" + file))))
return "";
debug_msg(1, "Generator: MSVC.NET: Found template \'%s\'", ret.toLatin1().constData());
return ret;
diff --git a/qmake/option.cpp b/qmake/option.cpp
index 5e06721..18f0541 100644
--- a/qmake/option.cpp
+++ b/qmake/option.cpp
@@ -250,8 +250,6 @@ Option::parseCommandLine(int argc, char **argv, int skip)
Option::user_template = argv[++x];
} else if(opt == "tp" || opt == "template_prefix") {
Option::user_template_prefix = argv[++x];
- } else if(opt == "mac9") {
- Option::target_mode = TARG_MAC9_MODE;
} else if(opt == "macx") {
Option::target_mode = TARG_MACX_MODE;
} else if(opt == "unix") {
@@ -532,10 +530,7 @@ Option::init(int argc, char **argv)
Option::obj_ext = ".obj";
Option::res_ext = ".res";
} else {
- if(Option::target_mode == Option::TARG_MAC9_MODE)
- Option::dir_sep = ":";
- else
- Option::dir_sep = "/";
+ Option::dir_sep = "/";
Option::obj_ext = ".o";
}
Option::qmake_abslocation = Option::fixPathToTargetOS(Option::qmake_abslocation);
diff --git a/qmake/option.h b/qmake/option.h
index fe9a4ef..514e442 100644
--- a/qmake/option.h
+++ b/qmake/option.h
@@ -150,7 +150,7 @@ struct Option
static int warn_level;
static bool recursive;
static QStringList before_user_vars, after_user_vars, user_configs, after_user_configs;
- enum TARG_MODE { TARG_UNIX_MODE, TARG_WIN_MODE, TARG_MACX_MODE, TARG_MAC9_MODE };
+ enum TARG_MODE { TARG_UNIX_MODE, TARG_WIN_MODE, TARG_MACX_MODE };
static TARG_MODE target_mode;
static QString user_template, user_template_prefix;
static QStringList shellPath;
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 4ce8ba4..8871152 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -183,9 +183,7 @@ static QString remove_quotes(const QString &arg)
static QString varMap(const QString &x)
{
QString ret(x);
- if(ret.startsWith("TMAKE")) //tmake no more!
- ret = "QMAKE" + ret.mid(5);
- else if(ret == "INTERFACES")
+ if(ret == "INTERFACES")
ret = "FORMS";
else if(ret == "QMAKE_POST_BUILD")
ret = "QMAKE_POST_LINK";
@@ -612,10 +610,6 @@ QStringList qmake_feature_paths(QMakeProperty *prop=0)
concat << base_concat + QDir::separator() + "win32";
break;
}
- case Option::TARG_MAC9_MODE:
- concat << base_concat + QDir::separator() + "mac";
- concat << base_concat + QDir::separator() + "mac9";
- break;
}
concat << base_concat;
}
@@ -1456,9 +1450,6 @@ QMakeProject::read(uchar cmd)
while(qmakespec.endsWith(QString(QChar(QDir::separator()))))
qmakespec.truncate(qmakespec.length()-1);
QString spec = qmakespec + QDir::separator() + "qmake.conf";
- if(!QFile::exists(spec) &&
- QFile::exists(qmakespec + QDir::separator() + "tmake.conf"))
- spec = qmakespec + QDir::separator() + "tmake.conf";
debug_msg(1, "QMAKESPEC conf: reading %s", spec.toLatin1().constData());
if(!read(spec, base_vars)) {
fprintf(stderr, "Failure to read QMAKESPEC conf file %s.\n", spec.toLatin1().constData());
@@ -1617,12 +1608,7 @@ QMakeProject::isActiveConfig(const QString &x, bool regex, QMap<QString, QString
if((Option::target_mode == Option::TARG_MACX_MODE ||
Option::target_mode == Option::TARG_UNIX_MODE) && x == "unix")
return !isForSymbian();
- else if(Option::target_mode == Option::TARG_MACX_MODE && x == "macx")
- return !isForSymbian();
- else if(Option::target_mode == Option::TARG_MAC9_MODE && x == "mac9")
- return !isForSymbian();
- else if((Option::target_mode == Option::TARG_MAC9_MODE || Option::target_mode == Option::TARG_MACX_MODE) &&
- x == "mac")
+ else if(Option::target_mode == Option::TARG_MACX_MODE && (x == "macx" || x == "mac"))
return !isForSymbian();
else if(Option::target_mode == Option::TARG_WIN_MODE && x == "win32")
return !isForSymbian();
@@ -3080,8 +3066,6 @@ QStringList &QMakeProject::values(const QString &_var, QMap<QString, QStringList
QString orig_template = place["TEMPLATE"].first(), real_template;
if(!Option::user_template_prefix.isEmpty() && !orig_template.startsWith(Option::user_template_prefix))
real_template = Option::user_template_prefix + orig_template;
- if(real_template.endsWith(".t"))
- real_template = real_template.left(real_template.length()-2);
if(!real_template.isEmpty()) {
var = ".BUILTIN." + var;
place[var] = QStringList(real_template);
diff --git a/qmake/property.cpp b/qmake/property.cpp
index 34368cd..cab034f 100644
--- a/qmake/property.cpp
+++ b/qmake/property.cpp
@@ -104,7 +104,7 @@ QMakeProperty::value(QString v, bool just_check)
else if(v == "QT_INSTALL_DEMOS")
return QLibraryInfo::location(QLibraryInfo::DemosPath);
else if(v == "QMAKE_MKSPECS")
- return qmake_mkspec_paths().join(Option::target_mode == Option::TARG_WIN_MODE ? ";" : ":");
+ return qmake_mkspec_paths().join(Option::dirlist_sep);
else if(v == "QMAKE_VERSION")
return qmake_version();
#ifdef QT_VERSION_STR
diff --git a/qmake/qmake.pri b/qmake/qmake.pri
index efe4f36..17d9518 100644
--- a/qmake/qmake.pri
+++ b/qmake/qmake.pri
@@ -12,7 +12,7 @@ SOURCES += project.cpp property.cpp main.cpp generators/makefile.cpp \
generators/makefiledeps.cpp generators/metamakefile.cpp generators/mac/pbuilder_pbx.cpp \
generators/xmloutput.cpp generators/win32/borland_bmake.cpp \
generators/win32/msvc_nmake.cpp generators/projectgenerator.cpp \
- generators/win32/msvc_dsp.cpp generators/win32/msvc_vcproj.cpp \
+ generators/win32/msvc_vcproj.cpp \
generators/win32/msvc_objectmodel.cpp \
generators/symbian/symmake.cpp \
generators/symbian/symmake_abld.cpp \
@@ -24,7 +24,7 @@ HEADERS += project.h property.h generators/makefile.h \
generators/win32/winmakefile.h generators/projectgenerator.h \
generators/makefiledeps.h generators/metamakefile.h generators/mac/pbuilder_pbx.h \
generators/xmloutput.h generators/win32/borland_bmake.h generators/win32/msvc_nmake.h \
- generators/win32/msvc_dsp.h generators/win32/msvc_vcproj.h \
+ generators/win32/msvc_vcproj.h \
generators/win32/mingw_make.h generators/win32/msvc_objectmodel.h \
generators/symbian/symmake.h \
generators/symbian/symmake_abld.h \
diff --git a/qmake/qmake.pro b/qmake/qmake.pro
index 560aee9..00dcbce 100644
--- a/qmake/qmake.pro
+++ b/qmake/qmake.pro
@@ -17,9 +17,15 @@ VPATH += $$QT_SOURCE_TREE/src/corelib/global \
$$QT_SOURCE_TREE/src/corelib/kernel \
$$QT_SOURCE_TREE/src/corelib/codecs \
$$QT_SOURCE_TREE/src/corelib/plugin \
- $$QT_SOURCE_TREE/src/corelib/xml \
- $$QT_SOURCE_TREE/src/corelib/io
-INCPATH += generators generators/unix generators/win32 generators/mac generators/symbian \
- $$QT_SOURCE_TREE/include $$QT_SOURCE_TREE/include/QtCore
+ $$QT_SOURCE_TREE/src/corelib/xml \
+ $$QT_SOURCE_TREE/src/corelib/io
+INCPATH += generators \
+ generators/unix \
+ generators/win32 \
+ generators/mac \
+ generators/symbian \
+ $$QT_SOURCE_TREE/include \
+ $$QT_SOURCE_TREE/include/QtCore \
+ $$QT_SOURCE_TREE/qmake
include(qmake.pri)
diff --git a/src/3rdparty/s60/eiksoftkeyimage.h b/src/3rdparty/s60/eiksoftkeyimage.h
index 84f6108a..a658421 100644
--- a/src/3rdparty/s60/eiksoftkeyimage.h
+++ b/src/3rdparty/s60/eiksoftkeyimage.h
@@ -39,23 +39,6 @@
**
****************************************************************************/
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Changes cba button's label to image.
-*
-*/
-
#ifndef EIKSOFTKEYIMAGE_H
#define EIKSOFTKEYIMAGE_H
diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
index b943840..6446773 100644
--- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-02-09 Janne Koskinen <janne.p.koskinen@digia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] use nanval() for Symbian as nonInlineNaN
+ https://bugs.webkit.org/show_bug.cgi?id=34170
+
+ numeric_limits<double>::quiet_NaN is broken in Symbian
+ causing NaN to be evaluated as a number.
+
+ * runtime/JSValue.cpp:
+ (JSC::nonInlineNaN):
+
2010-01-07 Norbert Leser <norbert.leser@nokia.com>
Reviewed by NOBODY (OOPS!).
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp
index 699c1cd..bafb85b 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp
@@ -174,7 +174,11 @@ uint32_t toUInt32SlowCase(double d, bool& ok)
NEVER_INLINE double nonInlineNaN()
{
+#if PLATFORM(SYMBIAN)
+ return nanval();
+#else
return std::numeric_limits<double>::quiet_NaN();
+#endif
}
} // namespace JSC
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 4348cbc..cc0e04f 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -8,4 +8,4 @@ The commit imported was from the
and has the sha1 checksum
- da5d96a26e80162027bc95ce7e5725fe4b277ff7
+ ffae5e11181a3961193fa21ea405851cad714d4b
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 1f6f290..61c2227 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-01-14 Diego Gonzalez <diego.gonzalez@openbossa.org>
+
+ Reviewed by Kenneth Christiansen.
+
+ [Qt] Missing fileSystemPath() method in Qt KURL implementation
+ https://bugs.webkit.org/show_bug.cgi?id=33614
+
+ No new tests.
+
+ * platform/qt/KURLQt.cpp:
+ (WebCore::KURL::fileSystemPath):
+
2010-02-01 Andreas Kling <andreas.kling@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index 7b0366d..c9b622a 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -26,9 +26,7 @@ symbian: {
# RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target.
# Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000.
- MMP_RULES += "LINKEROPTION armcc --rw-base 0xE00000"
- MMP_RULES += ALWAYS_BUILD_AS_ARM
- QMAKE_CXXFLAGS.ARMCC += -OTime -O3
+ QMAKE_LFLAGS.ARMCC += --rw-base 0xE00000
}
include($$PWD/../WebKit.pri)
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/KURLQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/KURLQt.cpp
index 0763fe0..1f62006 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/KURLQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/KURLQt.cpp
@@ -95,8 +95,10 @@ KURL::operator QUrl() const
String KURL::fileSystemPath() const
{
- notImplemented();
- return String();
+ if (!isValid() || !protocolIs("file"))
+ return String();
+
+ return String(path());
}
}
diff --git a/src/corelib/arch/sparc/arch.pri b/src/corelib/arch/sparc/arch.pri
index 3113dd3..9bb3a88 100644
--- a/src/corelib/arch/sparc/arch.pri
+++ b/src/corelib/arch/sparc/arch.pri
@@ -1,7 +1,7 @@
#
# SPARC architecture
#
-*-64 {
+*-64* {
SOURCES += $$QT_ARCH_CPP/qatomic64.s
}
else {
diff --git a/src/corelib/codecs/qsimplecodec.cpp b/src/corelib/codecs/qsimplecodec.cpp
index 445565a..4cc7912 100644
--- a/src/corelib/codecs/qsimplecodec.cpp
+++ b/src/corelib/codecs/qsimplecodec.cpp
@@ -681,7 +681,7 @@ QByteArray QSimpleTextCodec::convertFromUnicode(const QChar *in, int length, Con
int u;
const QChar* ucp = in;
unsigned char* rp = (unsigned char *)r.data();
- const unsigned char* rmp = (const unsigned char *)reverseMap->data();
+ const unsigned char* rmp = (const unsigned char *)reverseMap->constData();
int rmsize = (int) reverseMap->size();
while(i--)
{
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index 43ea1c8..1c607a6 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -79,7 +79,7 @@
# endif
#endif // QT_NO_CODECS
#include "qlocale.h"
-#include "private/qmutexpool_p.h"
+#include "qmutex.h"
#include <stdlib.h>
#include <ctype.h>
@@ -659,13 +659,13 @@ static void setupLocaleMapper()
#endif
}
-
-static void setup()
-{
#ifndef QT_NO_THREAD
- QMutexLocker locker(QMutexPool::globalInstanceGet(&all));
+Q_GLOBAL_STATIC_WITH_ARGS(QMutex, textCodecsMutex, (QMutex::Recursive));
#endif
+// textCodecsMutex need to be locked to enter this function
+static void setup()
+{
if (all)
return;
@@ -903,8 +903,6 @@ QTextCodec::ConverterState::~ConverterState()
*/
/*!
- \nonreentrant
-
Constructs a QTextCodec, and gives it the highest precedence. The
QTextCodec should always be constructed on the heap (i.e. with \c
new). Qt takes ownership and will delete it when the application
@@ -912,6 +910,9 @@ QTextCodec::ConverterState::~ConverterState()
*/
QTextCodec::QTextCodec()
{
+#ifndef QT_NO_THREAD
+ QMutexLocker locker(textCodecsMutex());
+#endif
setup();
all->prepend(this);
}
@@ -929,8 +930,12 @@ QTextCodec::~QTextCodec()
if (!destroying_is_ok)
qWarning("QTextCodec::~QTextCodec: Called by application");
#endif
- if (all)
+ if (all) {
+#ifndef QT_NO_THREAD
+ QMutexLocker locker(textCodecsMutex());
+#endif
all->removeAll(this);
+ }
}
/*!
@@ -951,6 +956,9 @@ QTextCodec *QTextCodec::codecForName(const QByteArray &name)
if (name.isEmpty())
return 0;
+#ifndef QT_NO_THREAD
+ QMutexLocker locker(textCodecsMutex());
+#endif
setup();
for (int i = 0; i < all->size(); ++i) {
@@ -973,6 +981,9 @@ QTextCodec *QTextCodec::codecForName(const QByteArray &name)
*/
QTextCodec* QTextCodec::codecForMib(int mib)
{
+#ifndef QT_NO_THREAD
+ QMutexLocker locker(textCodecsMutex());
+#endif
setup();
// Qt 3 used 1000 (mib for UCS2) as its identifier for the utf16 codec. Map
@@ -1001,6 +1012,9 @@ QTextCodec* QTextCodec::codecForMib(int mib)
*/
QList<QByteArray> QTextCodec::availableCodecs()
{
+#ifndef QT_NO_THREAD
+ QMutexLocker locker(textCodecsMutex());
+#endif
setup();
QList<QByteArray> codecs;
@@ -1008,6 +1022,11 @@ QList<QByteArray> QTextCodec::availableCodecs()
codecs += all->at(i)->name();
codecs += all->at(i)->aliases();
}
+
+#ifndef QT_NO_THREAD
+ locker.unlock();
+#endif
+
#ifndef QT_NO_TEXTCODECPLUGIN
QFactoryLoader *l = loader();
QStringList keys = l->keys();
@@ -1031,11 +1050,19 @@ QList<QByteArray> QTextCodec::availableCodecs()
*/
QList<int> QTextCodec::availableMibs()
{
+#ifndef QT_NO_THREAD
+ QMutexLocker locker(textCodecsMutex());
+#endif
setup();
QList<int> codecs;
for (int i = 0; i < all->size(); ++i)
codecs += all->at(i)->mibEnum();
+
+#ifndef QT_NO_THREAD
+ locker.unlock();
+#endif
+
#ifndef QT_NO_TEXTCODECPLUGIN
QFactoryLoader *l = loader();
QStringList keys = l->keys();
@@ -1082,6 +1109,9 @@ QTextCodec* QTextCodec::codecForLocale()
if (localeMapper)
return localeMapper;
+#ifndef QT_NO_THREAD
+ QMutexLocker locker(textCodecsMutex());
+#endif
setup();
return localeMapper;
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index f48c1b3..c8f836a 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1994,7 +1994,6 @@ void qt_check_pointer(const char *n, int l)
qWarning("In file %s, line %d: Out of memory", n, l);
}
-#ifndef QT_NO_EXCEPTIONS
/* \internal
Allows you to throw an exception without including <new>
Called internally from Q_CHECK_PTR on certain OS combinations
@@ -2003,7 +2002,6 @@ void qBadAlloc()
{
QT_THROW(std::bad_alloc());
}
-#endif
/*
The Q_ASSERT macro calls this function when the test fails.
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index b237659..99bbe42 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -1676,10 +1676,7 @@ Q_CORE_EXPORT void qt_assert_x(const char *where, const char *what, const char *
#endif
Q_CORE_EXPORT void qt_check_pointer(const char *, int);
-
-#ifndef QT_NO_EXCEPTIONS
Q_CORE_EXPORT void qBadAlloc();
-#endif
#ifdef QT_NO_EXCEPTIONS
# if defined(QT_NO_DEBUG)
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 3d49d60..1f1c8f7 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -157,7 +157,7 @@
\value AA_MacDontSwapCtrlAndMeta On Mac OS X by default, Qt swaps the
Control and Meta (Command) keys (i.e., whenever Control is pressed, Qt
- sends Meta and whenever Meta is pressed Control is sent. When this
+ sends Meta, and whenever Meta is pressed Control is sent). When this
attribute is true, Qt will not do the flip. QKeySequence::StandardShortcuts
will also flip accordingly (i.e., QKeySequence::Copy will be
Command+C on the keyboard regardless of the value set, though what is output for
@@ -493,7 +493,7 @@
\omitvalue WordBreak
\omitvalue TextForceLeftToRight
\omitvalue TextForceRightToLeft
- \omitvalue TextLongestVariant Always use the longest variant when computing the size of a multi-variant string
+ \omitvalue TextLongestVariant Always use the longest variant when computing the size of a multi-variant string.
You can use as many modifier flags as you want, except that
Qt::TextSingleLine and Qt::TextWordWrap cannot be combined.
@@ -2115,7 +2115,7 @@
On some platforms this implies Qt::WindowSystemMenuHint for it to work.
\value MacWindowToolBarButtonHint On Mac OS X adds a tool bar button (i.e.,
- the oblong button that is on the top right of windows that have toolbars.
+ the oblong button that is on the top right of windows that have toolbars).
\value BypassGraphicsProxyWidget Prevents the window and its children from
automatically embedding themselves into a QGraphicsProxyWidget if the
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index 5e3b0fd..702a21a 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -595,7 +595,7 @@ private:
struct Data {
QBasicAtomicInt ref;
int alloc, size;
- ushort *data;
+ ushort *data; // QT5: put that after the bit field to fill alignment gap; don't use sizeof any more then
ushort clean : 1;
ushort simpletext : 1;
ushort righttoleft : 1;
diff --git a/src/declarative/debugger/qmldebugservice.cpp b/src/declarative/debugger/qmldebugservice.cpp
index 810fbed..2c9586f 100644
--- a/src/declarative/debugger/qmldebugservice.cpp
+++ b/src/declarative/debugger/qmldebugservice.cpp
@@ -61,9 +61,11 @@ class QmlDebugServer : public QObject
public:
static QmlDebugServer *instance();
void wait();
+ void registerForStartNotification(QObject *object, const char *receiver);
private Q_SLOTS:
void readyRead();
+ void registeredObjectDestroyed(QObject *object);
private:
friend class QmlDebugService;
@@ -83,6 +85,7 @@ public:
QPacketProtocol *protocol;
QHash<QString, QmlDebugService *> plugins;
QStringList enabledPlugins;
+ QList<QPair<QObject*, QByteArray> > notifyClients;
};
class QmlDebugServicePrivate : public QObjectPrivate
@@ -112,6 +115,14 @@ void QmlDebugServerPrivate::wait()
qWarning("QmlDebugServer: Waiting for connection on port %d...", port);
+ for (int i=0; i<notifyClients.count(); i++) {
+ if (!QMetaObject::invokeMethod(notifyClients[i].first, notifyClients[i].second)) {
+ qWarning() << "QmlDebugServer: unable to call method" << notifyClients[i].second
+ << "on object" << notifyClients[i].first << "to notify of debug server start";
+ }
+ }
+ notifyClients.clear();
+
if (!server.waitForNewConnection(-1)) {
qWarning("QmlDebugServer: Connection error");
return;
@@ -165,6 +176,23 @@ void QmlDebugServer::wait()
d->wait();
}
+void QmlDebugServer::registerForStartNotification(QObject *object, const char *methodName)
+{
+ Q_D(QmlDebugServer);
+ connect(object, SIGNAL(destroyed(QObject*)), SLOT(registeredObjectDestroyed(QObject*)));
+ d->notifyClients.append(qMakePair(object, QByteArray(methodName)));
+}
+
+void QmlDebugServer::registeredObjectDestroyed(QObject *object)
+{
+ Q_D(QmlDebugServer);
+ QMutableListIterator<QPair<QObject*, QByteArray> > i(d->notifyClients);
+ while (i.hasNext()) {
+ if (i.next().first == object)
+ i.remove();
+ }
+}
+
QmlDebugServer::QmlDebugServer(int port)
: QObject(*(new QmlDebugServerPrivate))
{
@@ -367,6 +395,11 @@ void QmlDebugService::waitForClients()
QmlDebugServer::instance()->wait();
}
+void QmlDebugService::notifyOnServerStart(QObject *object, const char *receiver)
+{
+ QmlDebugServer::instance()->registerForStartNotification(object, receiver);
+}
+
void QmlDebugService::sendMessage(const QByteArray &message)
{
Q_D(QmlDebugService);
diff --git a/src/declarative/debugger/qmldebugservice_p.h b/src/declarative/debugger/qmldebugservice_p.h
index b406a3c..ec90d95 100644
--- a/src/declarative/debugger/qmldebugservice_p.h
+++ b/src/declarative/debugger/qmldebugservice_p.h
@@ -68,17 +68,19 @@ public:
static int idForObject(QObject *);
static QObject *objectForId(int);
-
static bool isDebuggingEnabled();
static QString objectToString(QObject *obj);
static void waitForClients();
+ static void notifyOnServerStart(QObject *object, const char *receiver);
+
protected:
virtual void enabledChanged(bool);
virtual void messageReceived(const QByteArray &);
private:
+ void registerForStartNotification(QObject *object, const char *methodName);
friend class QmlDebugServer;
};
diff --git a/src/declarative/graphicsitems/graphicsitems.pri b/src/declarative/graphicsitems/graphicsitems.pri
index eb6e0ad..db9c29e 100644
--- a/src/declarative/graphicsitems/graphicsitems.pri
+++ b/src/declarative/graphicsitems/graphicsitems.pri
@@ -1,9 +1,11 @@
INCLUDEPATH += $$PWD
HEADERS += \
+ $$PWD/qmlgraphicsitemsmodule_p.h \
$$PWD/qmlgraphicsanchors_p.h \
$$PWD/qmlgraphicsanchors_p_p.h \
$$PWD/qmlgraphicsevents_p_p.h \
+ $$PWD/qmlgraphicseffects_p.h \
$$PWD/qmlgraphicsflickable_p.h \
$$PWD/qmlgraphicsflickable_p_p.h \
$$PWD/qmlgraphicsflipable_p.h \
@@ -52,6 +54,7 @@ HEADERS += \
$$PWD/qmlgraphicseffects.cpp
SOURCES += \
+ $$PWD/qmlgraphicsitemsmodule.cpp \
$$PWD/qmlgraphicsanchors.cpp \
$$PWD/qmlgraphicsevents.cpp \
$$PWD/qmlgraphicsflickable.cpp \
diff --git a/src/declarative/graphicsitems/qmlgraphicsanchors.cpp b/src/declarative/graphicsitems/qmlgraphicsanchors.cpp
index 93055fc..816e580 100644
--- a/src/declarative/graphicsitems/qmlgraphicsanchors.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsanchors.cpp
@@ -50,8 +50,6 @@
QT_BEGIN_NAMESPACE
-QML_DEFINE_NOCREATE_TYPE(QmlGraphicsAnchors)
-
//TODO: should we cache relationships, so we don't have to check each time (parent-child or sibling)?
//TODO: support non-parent, non-sibling (need to find lowest common ancestor)
diff --git a/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp b/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp
index e01e569..7d1c87a 100644
--- a/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp
@@ -78,7 +78,6 @@ Item {
\endqml
\endtable
*/
-QML_DEFINE_TYPE(Qt,4,6,AnimatedImage,QmlGraphicsAnimatedImage)
QmlGraphicsAnimatedImage::QmlGraphicsAnimatedImage(QmlGraphicsItem *parent)
: QmlGraphicsImage(*(new QmlGraphicsAnimatedImagePrivate), parent)
diff --git a/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp b/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp
index 877e141..19da151 100644
--- a/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp
@@ -50,8 +50,6 @@
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,BorderImage,QmlGraphicsBorderImage)
-
/*!
\qmlclass BorderImage QmlGraphicsBorderImage
\brief The BorderImage element provides an image that can be used as a border.
diff --git a/src/declarative/graphicsitems/qmlgraphicseffects.cpp b/src/declarative/graphicsitems/qmlgraphicseffects.cpp
index e1f5687..268ba28 100644
--- a/src/declarative/graphicsitems/qmlgraphicseffects.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicseffects.cpp
@@ -43,12 +43,6 @@
#include <QtGui/qgraphicseffect.h>
-QML_DECLARE_TYPE(QGraphicsEffect)
-QML_DEFINE_NOCREATE_TYPE(QGraphicsEffect)
-
-QML_DECLARE_TYPE(QGraphicsBlurEffect)
-QML_DEFINE_TYPE(Qt,4,6,Blur,QGraphicsBlurEffect)
-
/*!
\qmlclass Blur QGraphicsBlurEffect
\brief The Blur object provides a blur effect.
@@ -84,9 +78,6 @@ QML_DEFINE_TYPE(Qt,4,6,Blur,QGraphicsBlurEffect)
The default hint is Qt.PerformanceHint.
*/
-QML_DECLARE_TYPE(QGraphicsColorizeEffect)
-QML_DEFINE_TYPE(Qt,4,6,Colorize,QGraphicsColorizeEffect)
-
/*!
\qmlclass Colorize QGraphicsColorizeEffect
\brief The Colorize object provides a colorize effect.
@@ -112,8 +103,6 @@ QML_DEFINE_TYPE(Qt,4,6,Colorize,QGraphicsColorizeEffect)
while 1.0 means full colorization. By default, the strength is 1.0.
*/
-QML_DECLARE_TYPE(QGraphicsDropShadowEffect)
-QML_DEFINE_TYPE(Qt,4,6,DropShadow,QGraphicsDropShadowEffect)
/*!
\qmlclass DropShadow QGraphicsDropShadowEffect
@@ -155,8 +144,6 @@ QML_DEFINE_TYPE(Qt,4,6,DropShadow,QGraphicsDropShadowEffect)
By default, the drop color is a semi-transparent dark gray.
*/
-QML_DECLARE_TYPE(QGraphicsOpacityEffect)
-QML_DEFINE_TYPE(Qt,4,6,Opacity,QGraphicsOpacityEffect)
/*!
\qmlclass Opacity QGraphicsOpacityEffect
diff --git a/src/declarative/graphicsitems/qmlgraphicseffects_p.h b/src/declarative/graphicsitems/qmlgraphicseffects_p.h
new file mode 100644
index 0000000..2e561f8
--- /dev/null
+++ b/src/declarative/graphicsitems/qmlgraphicseffects_p.h
@@ -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 QtDeclarative 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$
+**
+****************************************************************************/
+
+#ifndef QMLGRAPHICSEFFECTS_P_H
+#define QMLGRAPHICSEFFECTS_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <qml.h>
+#include <QtGui/qgraphicseffect.h>
+
+QML_DECLARE_TYPE(QGraphicsEffect)
+QML_DECLARE_TYPE(QGraphicsBlurEffect)
+QML_DECLARE_TYPE(QGraphicsColorizeEffect)
+QML_DECLARE_TYPE(QGraphicsDropShadowEffect)
+QML_DECLARE_TYPE(QGraphicsOpacityEffect)
+
+#endif // QMLGRAPHICSEFFECTS_P_H
diff --git a/src/declarative/graphicsitems/qmlgraphicsevents.cpp b/src/declarative/graphicsitems/qmlgraphicsevents.cpp
index 9958dea..0d6adf6 100644
--- a/src/declarative/graphicsitems/qmlgraphicsevents.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsevents.cpp
@@ -189,7 +189,4 @@ MouseRegion {
\endqml
*/
-QML_DEFINE_NOCREATE_TYPE(QmlGraphicsKeyEvent)
-QML_DEFINE_NOCREATE_TYPE(QmlGraphicsMouseEvent)
-
QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qmlgraphicsflickable.cpp b/src/declarative/graphicsitems/qmlgraphicsflickable.cpp
index 2ff3b30..5143251 100644
--- a/src/declarative/graphicsitems/qmlgraphicsflickable.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsflickable.cpp
@@ -56,36 +56,6 @@ static const int FlickThreshold = 20;
// Really slow flicks can be annoying.
static const int minimumFlickVelocity = 200;
-class QmlGraphicsFlickableVisibleArea : public QObject
-{
- Q_OBJECT
-
- Q_PROPERTY(qreal xPosition READ xPosition NOTIFY pageChanged)
- Q_PROPERTY(qreal yPosition READ yPosition NOTIFY pageChanged)
- Q_PROPERTY(qreal widthRatio READ widthRatio NOTIFY pageChanged)
- Q_PROPERTY(qreal heightRatio READ heightRatio NOTIFY pageChanged)
-
-public:
- QmlGraphicsFlickableVisibleArea(QmlGraphicsFlickable *parent=0);
-
- qreal xPosition() const;
- qreal widthRatio() const;
- qreal yPosition() const;
- qreal heightRatio() const;
-
- void updateVisible();
-
-signals:
- void pageChanged();
-
-private:
- QmlGraphicsFlickable *flickable;
- qreal m_xPosition;
- qreal m_widthRatio;
- qreal m_yPosition;
- qreal m_heightRatio;
-};
-
QmlGraphicsFlickableVisibleArea::QmlGraphicsFlickableVisibleArea(QmlGraphicsFlickable *parent)
: QObject(parent), flickable(parent), m_xPosition(0.), m_widthRatio(0.)
, m_yPosition(0.), m_heightRatio(0.)
@@ -356,8 +326,6 @@ void QmlGraphicsFlickablePrivate::updateBeginningEnd()
visibleArea->updateVisible();
}
-QML_DEFINE_TYPE(Qt,4,6,Flickable,QmlGraphicsFlickable)
-
/*!
\qmlclass Flickable QmlGraphicsFlickable
\brief The Flickable item provides a surface that can be "flicked".
@@ -1367,8 +1335,3 @@ void QmlGraphicsFlickablePrivate::updateVelocity()
}
QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QmlGraphicsFlickableVisibleArea)
-QML_DEFINE_TYPE(Qt,4,6,VisibleArea,QmlGraphicsFlickableVisibleArea)
-
-#include <qmlgraphicsflickable.moc>
diff --git a/src/declarative/graphicsitems/qmlgraphicsflickable_p_p.h b/src/declarative/graphicsitems/qmlgraphicsflickable_p_p.h
index ae164cc..e83e81b 100644
--- a/src/declarative/graphicsitems/qmlgraphicsflickable_p_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsflickable_p_p.h
@@ -159,6 +159,38 @@ public:
QML_DECLARE_LIST_PROXY(QmlGraphicsFlickablePrivate, QObject *, data)
};
+class QmlGraphicsFlickableVisibleArea : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(qreal xPosition READ xPosition NOTIFY pageChanged)
+ Q_PROPERTY(qreal yPosition READ yPosition NOTIFY pageChanged)
+ Q_PROPERTY(qreal widthRatio READ widthRatio NOTIFY pageChanged)
+ Q_PROPERTY(qreal heightRatio READ heightRatio NOTIFY pageChanged)
+
+public:
+ QmlGraphicsFlickableVisibleArea(QmlGraphicsFlickable *parent=0);
+
+ qreal xPosition() const;
+ qreal widthRatio() const;
+ qreal yPosition() const;
+ qreal heightRatio() const;
+
+ void updateVisible();
+
+signals:
+ void pageChanged();
+
+private:
+ QmlGraphicsFlickable *flickable;
+ qreal m_xPosition;
+ qreal m_widthRatio;
+ qreal m_yPosition;
+ qreal m_heightRatio;
+};
+
QT_END_NAMESPACE
+QML_DECLARE_TYPE(QmlGraphicsFlickableVisibleArea)
+
#endif
diff --git a/src/declarative/graphicsitems/qmlgraphicsflipable.cpp b/src/declarative/graphicsitems/qmlgraphicsflipable.cpp
index ff8995b..4116817 100644
--- a/src/declarative/graphicsitems/qmlgraphicsflipable.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsflipable.cpp
@@ -49,8 +49,6 @@
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,Flipable,QmlGraphicsFlipable)
-
class QmlGraphicsFlipablePrivate : public QmlGraphicsItemPrivate
{
Q_DECLARE_PUBLIC(QmlGraphicsFlipable)
diff --git a/src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp b/src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp
index 333b689..4e1542a 100644
--- a/src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp
@@ -46,8 +46,6 @@
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,FocusPanel,QmlGraphicsFocusPanel)
-
/*!
\qmlclass FocusPanel QmlGraphicsFocusPanel
\brief The FocusPanel item explicitly creates a focus panel.
diff --git a/src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp b/src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp
index 828756c..ce0e376 100644
--- a/src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp
@@ -42,7 +42,6 @@
#include "qmlgraphicsfocusscope_p.h"
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,FocusScope,QmlGraphicsFocusScope)
/*!
\qmlclass FocusScope QmlGraphicsFocusScope
diff --git a/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp b/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp
index a5a7935..f2b3c00 100644
--- a/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp
@@ -131,9 +131,6 @@ public:
\brief The QmlGraphicsGraphicsObjectContainer class allows you to add QGraphicsObjects into Fluid UI applications.
*/
-QML_DEFINE_NOCREATE_TYPE(QGraphicsObject)
-QML_DEFINE_TYPE(Qt,4,6,GraphicsObjectContainer,QmlGraphicsGraphicsObjectContainer)
-
QmlGraphicsGraphicsObjectContainer::QmlGraphicsGraphicsObjectContainer(QmlGraphicsItem *parent)
: QmlGraphicsItem(*new QmlGraphicsGraphicsObjectContainerPrivate, parent)
{
diff --git a/src/declarative/graphicsitems/qmlgraphicsgridview.cpp b/src/declarative/graphicsitems/qmlgraphicsgridview.cpp
index 83911c0..ee711b4 100644
--- a/src/declarative/graphicsitems/qmlgraphicsgridview.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsgridview.cpp
@@ -51,63 +51,6 @@
QT_BEGIN_NAMESPACE
-class QmlGraphicsGridViewAttached : public QObject
-{
- Q_OBJECT
-public:
- QmlGraphicsGridViewAttached(QObject *parent)
- : QObject(parent), m_isCurrent(false), m_delayRemove(false) {}
- ~QmlGraphicsGridViewAttached() {
- attachedProperties.remove(parent());
- }
-
- Q_PROPERTY(QmlGraphicsGridView *view READ view CONSTANT)
- QmlGraphicsGridView *view() { return m_view; }
-
- Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY currentItemChanged)
- bool isCurrentItem() const { return m_isCurrent; }
- void setIsCurrentItem(bool c) {
- if (m_isCurrent != c) {
- m_isCurrent = c;
- emit currentItemChanged();
- }
- }
-
- Q_PROPERTY(bool delayRemove READ delayRemove WRITE setDelayRemove NOTIFY delayRemoveChanged)
- bool delayRemove() const { return m_delayRemove; }
- void setDelayRemove(bool delay) {
- if (m_delayRemove != delay) {
- m_delayRemove = delay;
- emit delayRemoveChanged();
- }
- }
-
- static QmlGraphicsGridViewAttached *properties(QObject *obj) {
- QmlGraphicsGridViewAttached *rv = attachedProperties.value(obj);
- if (!rv) {
- rv = new QmlGraphicsGridViewAttached(obj);
- attachedProperties.insert(obj, rv);
- }
- return rv;
- }
-
- void emitAdd() { emit add(); }
- void emitRemove() { emit remove(); }
-
-Q_SIGNALS:
- void currentItemChanged();
- void delayRemoveChanged();
- void add();
- void remove();
-
-public:
- QmlGraphicsGridView *m_view;
- bool m_isCurrent;
- bool m_delayRemove;
-
- static QHash<QObject*, QmlGraphicsGridViewAttached*> attachedProperties;
-};
-
QHash<QObject*, QmlGraphicsGridViewAttached*> QmlGraphicsGridViewAttached::attachedProperties;
@@ -1754,8 +1697,4 @@ QmlGraphicsGridViewAttached *QmlGraphicsGridView::qmlAttachedProperties(QObject
return QmlGraphicsGridViewAttached::properties(obj);
}
-QML_DEFINE_TYPE(Qt, 4,6, GridView, QmlGraphicsGridView)
-
QT_END_NAMESPACE
-
-#include <qmlgraphicsgridview.moc>
diff --git a/src/declarative/graphicsitems/qmlgraphicsgridview_p.h b/src/declarative/graphicsitems/qmlgraphicsgridview_p.h
index d2ef70e..25a76a3 100644
--- a/src/declarative/graphicsitems/qmlgraphicsgridview_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsgridview_p.h
@@ -154,6 +154,64 @@ private:
void refill();
};
+class QmlGraphicsGridViewAttached : public QObject
+{
+ Q_OBJECT
+public:
+ QmlGraphicsGridViewAttached(QObject *parent)
+ : QObject(parent), m_isCurrent(false), m_delayRemove(false) {}
+ ~QmlGraphicsGridViewAttached() {
+ attachedProperties.remove(parent());
+ }
+
+ Q_PROPERTY(QmlGraphicsGridView *view READ view CONSTANT)
+ QmlGraphicsGridView *view() { return m_view; }
+
+ Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY currentItemChanged)
+ bool isCurrentItem() const { return m_isCurrent; }
+ void setIsCurrentItem(bool c) {
+ if (m_isCurrent != c) {
+ m_isCurrent = c;
+ emit currentItemChanged();
+ }
+ }
+
+ Q_PROPERTY(bool delayRemove READ delayRemove WRITE setDelayRemove NOTIFY delayRemoveChanged)
+ bool delayRemove() const { return m_delayRemove; }
+ void setDelayRemove(bool delay) {
+ if (m_delayRemove != delay) {
+ m_delayRemove = delay;
+ emit delayRemoveChanged();
+ }
+ }
+
+ static QmlGraphicsGridViewAttached *properties(QObject *obj) {
+ QmlGraphicsGridViewAttached *rv = attachedProperties.value(obj);
+ if (!rv) {
+ rv = new QmlGraphicsGridViewAttached(obj);
+ attachedProperties.insert(obj, rv);
+ }
+ return rv;
+ }
+
+ void emitAdd() { emit add(); }
+ void emitRemove() { emit remove(); }
+
+Q_SIGNALS:
+ void currentItemChanged();
+ void delayRemoveChanged();
+ void add();
+ void remove();
+
+public:
+ QmlGraphicsGridView *m_view;
+ bool m_isCurrent;
+ bool m_delayRemove;
+
+ static QHash<QObject*, QmlGraphicsGridViewAttached*> attachedProperties;
+};
+
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QmlGraphicsGridView)
diff --git a/src/declarative/graphicsitems/qmlgraphicsimage.cpp b/src/declarative/graphicsitems/qmlgraphicsimage.cpp
index 7e63c8b..558511d 100644
--- a/src/declarative/graphicsitems/qmlgraphicsimage.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsimage.cpp
@@ -48,8 +48,6 @@
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,Image,QmlGraphicsImage)
-
/*!
\qmlclass Image QmlGraphicsImage
\brief The Image element allows you to add bitmaps to a scene.
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.cpp b/src/declarative/graphicsitems/qmlgraphicsitem.cpp
index 8973cb4..9fd8702 100644
--- a/src/declarative/graphicsitems/qmlgraphicsitem.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsitem.cpp
@@ -69,12 +69,6 @@ QT_BEGIN_NAMESPACE
#define FLT_MAX 1E+37
#endif
-QML_DEFINE_TYPE(Qt,4,6,Item,QmlGraphicsItem)
-
-QML_DEFINE_NOCREATE_TYPE(QGraphicsTransform);
-QML_DEFINE_TYPE(Qt,4,6,Scale,QGraphicsScale)
-QML_DEFINE_TYPE(Qt,4,6,Rotation,QGraphicsRotation)
-
#include "qmlgraphicseffects.cpp"
/*!
@@ -325,28 +319,6 @@ void QmlGraphicsContents::setItem(QmlGraphicsItem *item)
calcWidth();
}
-/*
- Key filters can be installed on a QmlGraphicsItem, but not removed. Currently they
- are only used by attached objects (which are only destroyed on Item
- destruction), so this isn't a problem. If in future this becomes any form
- of public API, they will have to support removal too.
-*/
-class QmlGraphicsItemKeyFilter
-{
-public:
- QmlGraphicsItemKeyFilter(QmlGraphicsItem * = 0);
- virtual ~QmlGraphicsItemKeyFilter();
-
- virtual void keyPressed(QKeyEvent *event);
- virtual void keyReleased(QKeyEvent *event);
- virtual void inputMethodEvent(QInputMethodEvent *event);
- virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
- virtual void componentComplete();
-
-private:
- QmlGraphicsItemKeyFilter *m_next;
-};
-
QmlGraphicsItemKeyFilter::QmlGraphicsItemKeyFilter(QmlGraphicsItem *item)
: m_next(0)
{
@@ -458,49 +430,6 @@ void QmlGraphicsItemKeyFilter::componentComplete()
pressed.
*/
-class QmlGraphicsKeyNavigationAttachedPrivate : public QObjectPrivate
-{
-public:
- QmlGraphicsKeyNavigationAttachedPrivate()
- : QObjectPrivate(), left(0), right(0), up(0), down(0) {}
-
- QmlGraphicsItem *left;
- QmlGraphicsItem *right;
- QmlGraphicsItem *up;
- QmlGraphicsItem *down;
-};
-
-class QmlGraphicsKeyNavigationAttached : public QObject, public QmlGraphicsItemKeyFilter
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QmlGraphicsKeyNavigationAttached)
-
- Q_PROPERTY(QmlGraphicsItem *left READ left WRITE setLeft NOTIFY changed)
- Q_PROPERTY(QmlGraphicsItem *right READ right WRITE setRight NOTIFY changed)
- Q_PROPERTY(QmlGraphicsItem *up READ up WRITE setUp NOTIFY changed)
- Q_PROPERTY(QmlGraphicsItem *down READ down WRITE setDown NOTIFY changed)
-public:
- QmlGraphicsKeyNavigationAttached(QObject * = 0);
-
- QmlGraphicsItem *left() const;
- void setLeft(QmlGraphicsItem *);
- QmlGraphicsItem *right() const;
- void setRight(QmlGraphicsItem *);
- QmlGraphicsItem *up() const;
- void setUp(QmlGraphicsItem *);
- QmlGraphicsItem *down() const;
- void setDown(QmlGraphicsItem *);
-
- static QmlGraphicsKeyNavigationAttached *qmlAttachedProperties(QObject *);
-
-Q_SIGNALS:
- void changed();
-
-private:
- virtual void keyPressed(QKeyEvent *event);
- virtual void keyReleased(QKeyEvent *event);
-};
-
QmlGraphicsKeyNavigationAttached::QmlGraphicsKeyNavigationAttached(QObject *parent)
: QObject(*(new QmlGraphicsKeyNavigationAttachedPrivate), parent),
QmlGraphicsItemKeyFilter(qobject_cast<QmlGraphicsItem*>(parent))
@@ -964,137 +893,6 @@ void QmlGraphicsKeyNavigationAttached::keyReleased(QKeyEvent *event)
*/
-class QmlGraphicsKeysAttachedPrivate : public QObjectPrivate
-{
-public:
- QmlGraphicsKeysAttachedPrivate()
- : QObjectPrivate(), inPress(false), inRelease(false)
- , inIM(false), enabled(true), imeItem(0), item(0)
- {}
-
- bool isConnected(const char *signalName);
-
- QGraphicsItem *finalFocusProxy(QGraphicsItem *item) const
- {
- QGraphicsItem *fp;
- while ((fp = item->focusProxy()))
- item = fp;
- return item;
- }
-
- //loop detection
- bool inPress:1;
- bool inRelease:1;
- bool inIM:1;
-
- bool enabled : 1;
-
- QGraphicsItem *imeItem;
- QList<QmlGraphicsItem *> targets;
- QmlGraphicsItem *item;
-};
-
-class QmlGraphicsKeysAttached : public QObject, public QmlGraphicsItemKeyFilter
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QmlGraphicsKeysAttached)
-
- Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
- Q_PROPERTY(QList<QmlGraphicsItem *> *forwardTo READ forwardTo)
-
-public:
- QmlGraphicsKeysAttached(QObject *parent=0);
- ~QmlGraphicsKeysAttached();
-
- bool enabled() const { Q_D(const QmlGraphicsKeysAttached); return d->enabled; }
- void setEnabled(bool enabled) {
- Q_D(QmlGraphicsKeysAttached);
- if (enabled != d->enabled) {
- d->enabled = enabled;
- emit enabledChanged();
- }
- }
-
- QList<QmlGraphicsItem *> *forwardTo() {
- Q_D(QmlGraphicsKeysAttached);
- return &d->targets;
- }
-
- virtual void componentComplete();
-
- static QmlGraphicsKeysAttached *qmlAttachedProperties(QObject *);
-
-Q_SIGNALS:
- void enabledChanged();
- void pressed(QmlGraphicsKeyEvent *event);
- void released(QmlGraphicsKeyEvent *event);
- void digit0Pressed(QmlGraphicsKeyEvent *event);
- void digit1Pressed(QmlGraphicsKeyEvent *event);
- void digit2Pressed(QmlGraphicsKeyEvent *event);
- void digit3Pressed(QmlGraphicsKeyEvent *event);
- void digit4Pressed(QmlGraphicsKeyEvent *event);
- void digit5Pressed(QmlGraphicsKeyEvent *event);
- void digit6Pressed(QmlGraphicsKeyEvent *event);
- void digit7Pressed(QmlGraphicsKeyEvent *event);
- void digit8Pressed(QmlGraphicsKeyEvent *event);
- void digit9Pressed(QmlGraphicsKeyEvent *event);
-
- void leftPressed(QmlGraphicsKeyEvent *event);
- void rightPressed(QmlGraphicsKeyEvent *event);
- void upPressed(QmlGraphicsKeyEvent *event);
- void downPressed(QmlGraphicsKeyEvent *event);
-
- void asteriskPressed(QmlGraphicsKeyEvent *event);
- void numberSignPressed(QmlGraphicsKeyEvent *event);
- void escapePressed(QmlGraphicsKeyEvent *event);
- void returnPressed(QmlGraphicsKeyEvent *event);
- void enterPressed(QmlGraphicsKeyEvent *event);
- void deletePressed(QmlGraphicsKeyEvent *event);
- void spacePressed(QmlGraphicsKeyEvent *event);
- void backPressed(QmlGraphicsKeyEvent *event);
- void cancelPressed(QmlGraphicsKeyEvent *event);
- void selectPressed(QmlGraphicsKeyEvent *event);
- void yesPressed(QmlGraphicsKeyEvent *event);
- void noPressed(QmlGraphicsKeyEvent *event);
- void context1Pressed(QmlGraphicsKeyEvent *event);
- void context2Pressed(QmlGraphicsKeyEvent *event);
- void context3Pressed(QmlGraphicsKeyEvent *event);
- void context4Pressed(QmlGraphicsKeyEvent *event);
- void callPressed(QmlGraphicsKeyEvent *event);
- void hangupPressed(QmlGraphicsKeyEvent *event);
- void flipPressed(QmlGraphicsKeyEvent *event);
- void menuPressed(QmlGraphicsKeyEvent *event);
- void volumeUpPressed(QmlGraphicsKeyEvent *event);
- void volumeDownPressed(QmlGraphicsKeyEvent *event);
-
-private:
- virtual void keyPressed(QKeyEvent *event);
- virtual void keyReleased(QKeyEvent *event);
- virtual void inputMethodEvent(QInputMethodEvent *);
- virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
-
- const QByteArray keyToSignal(int key) {
- QByteArray keySignal;
- if (key >= Qt::Key_0 && key <= Qt::Key_9) {
- keySignal = "digit0Pressed";
- keySignal[5] = '0' + (key - Qt::Key_0);
- } else {
- int i = 0;
- while (sigMap[i].key && sigMap[i].key != key)
- ++i;
- keySignal = sigMap[i].sig;
- }
- return keySignal;
- }
-
- struct SigMap {
- int key;
- const char *sig;
- };
-
- static const SigMap sigMap[];
-};
-
const QmlGraphicsKeysAttached::SigMap QmlGraphicsKeysAttached::sigMap[] = {
{ Qt::Key_Left, "leftPressed" },
{ Qt::Key_Right, "rightPressed" },
@@ -3086,14 +2884,6 @@ int QmlGraphicsItemPrivate::restart(QTime &t)
return n;
}
-#include <qmlgraphicsitem.moc>
#include <moc_qmlgraphicsitem.cpp>
QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QmlGraphicsKeysAttached)
-QML_DECLARE_TYPEINFO(QmlGraphicsKeysAttached, QML_HAS_ATTACHED_PROPERTIES)
-QML_DEFINE_TYPE(Qt,4,6,Keys,QmlGraphicsKeysAttached)
-QML_DECLARE_TYPE(QmlGraphicsKeyNavigationAttached)
-QML_DECLARE_TYPEINFO(QmlGraphicsKeyNavigationAttached, QML_HAS_ATTACHED_PROPERTIES)
-QML_DEFINE_TYPE(Qt,4,6,KeyNavigation,QmlGraphicsKeyNavigationAttached)
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.h b/src/declarative/graphicsitems/qmlgraphicsitem.h
index 8ae2d5c..e0f33c7 100644
--- a/src/declarative/graphicsitems/qmlgraphicsitem.h
+++ b/src/declarative/graphicsitems/qmlgraphicsitem.h
@@ -50,6 +50,7 @@
#include <QtGui/qgraphicsitem.h>
#include <QtGui/qgraphicstransform.h>
#include <QtGui/qfont.h>
+#include <QtGui/qaction.h>
QT_BEGIN_HEADER
@@ -233,6 +234,7 @@ QML_DECLARE_TYPE(QmlGraphicsItem)
QML_DECLARE_TYPE(QGraphicsTransform)
QML_DECLARE_TYPE(QGraphicsScale)
QML_DECLARE_TYPE(QGraphicsRotation)
+QML_DECLARE_TYPE(QAction)
QT_END_HEADER
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem_p.h b/src/declarative/graphicsitems/qmlgraphicsitem_p.h
index 1741808..9a77dbb 100644
--- a/src/declarative/graphicsitems/qmlgraphicsitem_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsitem_p.h
@@ -280,8 +280,209 @@ public:
static int restart(QTime &);
};
+/*
+ Key filters can be installed on a QmlGraphicsItem, but not removed. Currently they
+ are only used by attached objects (which are only destroyed on Item
+ destruction), so this isn't a problem. If in future this becomes any form
+ of public API, they will have to support removal too.
+*/
+class QmlGraphicsItemKeyFilter
+{
+public:
+ QmlGraphicsItemKeyFilter(QmlGraphicsItem * = 0);
+ virtual ~QmlGraphicsItemKeyFilter();
+
+ virtual void keyPressed(QKeyEvent *event);
+ virtual void keyReleased(QKeyEvent *event);
+ virtual void inputMethodEvent(QInputMethodEvent *event);
+ virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
+ virtual void componentComplete();
+
+private:
+ QmlGraphicsItemKeyFilter *m_next;
+};
+
+class QmlGraphicsKeyNavigationAttachedPrivate : public QObjectPrivate
+{
+public:
+ QmlGraphicsKeyNavigationAttachedPrivate()
+ : QObjectPrivate(), left(0), right(0), up(0), down(0) {}
+
+ QmlGraphicsItem *left;
+ QmlGraphicsItem *right;
+ QmlGraphicsItem *up;
+ QmlGraphicsItem *down;
+};
+
+class QmlGraphicsKeyNavigationAttached : public QObject, public QmlGraphicsItemKeyFilter
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QmlGraphicsKeyNavigationAttached)
+
+ Q_PROPERTY(QmlGraphicsItem *left READ left WRITE setLeft NOTIFY changed)
+ Q_PROPERTY(QmlGraphicsItem *right READ right WRITE setRight NOTIFY changed)
+ Q_PROPERTY(QmlGraphicsItem *up READ up WRITE setUp NOTIFY changed)
+ Q_PROPERTY(QmlGraphicsItem *down READ down WRITE setDown NOTIFY changed)
+public:
+ QmlGraphicsKeyNavigationAttached(QObject * = 0);
+
+ QmlGraphicsItem *left() const;
+ void setLeft(QmlGraphicsItem *);
+ QmlGraphicsItem *right() const;
+ void setRight(QmlGraphicsItem *);
+ QmlGraphicsItem *up() const;
+ void setUp(QmlGraphicsItem *);
+ QmlGraphicsItem *down() const;
+ void setDown(QmlGraphicsItem *);
+
+ static QmlGraphicsKeyNavigationAttached *qmlAttachedProperties(QObject *);
+
+Q_SIGNALS:
+ void changed();
+
+private:
+ virtual void keyPressed(QKeyEvent *event);
+ virtual void keyReleased(QKeyEvent *event);
+};
+
+class QmlGraphicsKeysAttachedPrivate : public QObjectPrivate
+{
+public:
+ QmlGraphicsKeysAttachedPrivate()
+ : QObjectPrivate(), inPress(false), inRelease(false)
+ , inIM(false), enabled(true), imeItem(0), item(0)
+ {}
+
+ bool isConnected(const char *signalName);
+
+ QGraphicsItem *finalFocusProxy(QGraphicsItem *item) const
+ {
+ QGraphicsItem *fp;
+ while ((fp = item->focusProxy()))
+ item = fp;
+ return item;
+ }
+
+ //loop detection
+ bool inPress:1;
+ bool inRelease:1;
+ bool inIM:1;
+
+ bool enabled : 1;
+
+ QGraphicsItem *imeItem;
+ QList<QmlGraphicsItem *> targets;
+ QmlGraphicsItem *item;
+};
+
+class QmlGraphicsKeysAttached : public QObject, public QmlGraphicsItemKeyFilter
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QmlGraphicsKeysAttached)
+
+ Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
+ Q_PROPERTY(QList<QmlGraphicsItem *> *forwardTo READ forwardTo)
+
+public:
+ QmlGraphicsKeysAttached(QObject *parent=0);
+ ~QmlGraphicsKeysAttached();
+
+ bool enabled() const { Q_D(const QmlGraphicsKeysAttached); return d->enabled; }
+ void setEnabled(bool enabled) {
+ Q_D(QmlGraphicsKeysAttached);
+ if (enabled != d->enabled) {
+ d->enabled = enabled;
+ emit enabledChanged();
+ }
+ }
+
+ QList<QmlGraphicsItem *> *forwardTo() {
+ Q_D(QmlGraphicsKeysAttached);
+ return &d->targets;
+ }
+
+ virtual void componentComplete();
+
+ static QmlGraphicsKeysAttached *qmlAttachedProperties(QObject *);
+
+Q_SIGNALS:
+ void enabledChanged();
+ void pressed(QmlGraphicsKeyEvent *event);
+ void released(QmlGraphicsKeyEvent *event);
+ void digit0Pressed(QmlGraphicsKeyEvent *event);
+ void digit1Pressed(QmlGraphicsKeyEvent *event);
+ void digit2Pressed(QmlGraphicsKeyEvent *event);
+ void digit3Pressed(QmlGraphicsKeyEvent *event);
+ void digit4Pressed(QmlGraphicsKeyEvent *event);
+ void digit5Pressed(QmlGraphicsKeyEvent *event);
+ void digit6Pressed(QmlGraphicsKeyEvent *event);
+ void digit7Pressed(QmlGraphicsKeyEvent *event);
+ void digit8Pressed(QmlGraphicsKeyEvent *event);
+ void digit9Pressed(QmlGraphicsKeyEvent *event);
+
+ void leftPressed(QmlGraphicsKeyEvent *event);
+ void rightPressed(QmlGraphicsKeyEvent *event);
+ void upPressed(QmlGraphicsKeyEvent *event);
+ void downPressed(QmlGraphicsKeyEvent *event);
+
+ void asteriskPressed(QmlGraphicsKeyEvent *event);
+ void numberSignPressed(QmlGraphicsKeyEvent *event);
+ void escapePressed(QmlGraphicsKeyEvent *event);
+ void returnPressed(QmlGraphicsKeyEvent *event);
+ void enterPressed(QmlGraphicsKeyEvent *event);
+ void deletePressed(QmlGraphicsKeyEvent *event);
+ void spacePressed(QmlGraphicsKeyEvent *event);
+ void backPressed(QmlGraphicsKeyEvent *event);
+ void cancelPressed(QmlGraphicsKeyEvent *event);
+ void selectPressed(QmlGraphicsKeyEvent *event);
+ void yesPressed(QmlGraphicsKeyEvent *event);
+ void noPressed(QmlGraphicsKeyEvent *event);
+ void context1Pressed(QmlGraphicsKeyEvent *event);
+ void context2Pressed(QmlGraphicsKeyEvent *event);
+ void context3Pressed(QmlGraphicsKeyEvent *event);
+ void context4Pressed(QmlGraphicsKeyEvent *event);
+ void callPressed(QmlGraphicsKeyEvent *event);
+ void hangupPressed(QmlGraphicsKeyEvent *event);
+ void flipPressed(QmlGraphicsKeyEvent *event);
+ void menuPressed(QmlGraphicsKeyEvent *event);
+ void volumeUpPressed(QmlGraphicsKeyEvent *event);
+ void volumeDownPressed(QmlGraphicsKeyEvent *event);
+
+private:
+ virtual void keyPressed(QKeyEvent *event);
+ virtual void keyReleased(QKeyEvent *event);
+ virtual void inputMethodEvent(QInputMethodEvent *);
+ virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
+
+ const QByteArray keyToSignal(int key) {
+ QByteArray keySignal;
+ if (key >= Qt::Key_0 && key <= Qt::Key_9) {
+ keySignal = "digit0Pressed";
+ keySignal[5] = '0' + (key - Qt::Key_0);
+ } else {
+ int i = 0;
+ while (sigMap[i].key && sigMap[i].key != key)
+ ++i;
+ keySignal = sigMap[i].sig;
+ }
+ return keySignal;
+ }
+
+ struct SigMap {
+ int key;
+ const char *sig;
+ };
+
+ static const SigMap sigMap[];
+};
+
Q_DECLARE_OPERATORS_FOR_FLAGS(QmlGraphicsItemPrivate::ChangeTypes);
QT_END_NAMESPACE
+QML_DECLARE_TYPE(QmlGraphicsKeysAttached)
+QML_DECLARE_TYPEINFO(QmlGraphicsKeysAttached, QML_HAS_ATTACHED_PROPERTIES)
+QML_DECLARE_TYPE(QmlGraphicsKeyNavigationAttached)
+QML_DECLARE_TYPEINFO(QmlGraphicsKeyNavigationAttached, QML_HAS_ATTACHED_PROPERTIES)
+
#endif // QMLGRAPHICSITEM_P_H
diff --git a/src/declarative/graphicsitems/qmlgraphicsitemsmodule.cpp b/src/declarative/graphicsitems/qmlgraphicsitemsmodule.cpp
new file mode 100644
index 0000000..127aec8
--- /dev/null
+++ b/src/declarative/graphicsitems/qmlgraphicsitemsmodule.cpp
@@ -0,0 +1,164 @@
+/****************************************************************************
+**
+** 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 QtDeclarative 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$
+**
+****************************************************************************/
+
+#include "qmlgraphicsitemsmodule_p.h"
+
+#include <QtGui/qaction.h>
+#include <QtGui/qvalidator.h>
+#include <QtGui/qgraphicseffect.h>
+
+#include "qmlgraphicsevents_p_p.h"
+#include "qmlgraphicseffects_p.h"
+#include "qmlgraphicsscalegrid_p_p.h"
+#include "qmlgraphicsanimatedimage_p.h"
+#include "qmlgraphicsborderimage_p.h"
+#include "qmlgraphicspositioners_p.h"
+#include "qmlgraphicsmouseregion_p.h"
+#include "qmlgraphicsflickable_p.h"
+#include "qmlgraphicsflickable_p_p.h"
+#include "qmlgraphicsflipable_p.h"
+#include "qmlgraphicsfocuspanel_p.h"
+#include "qmlgraphicsfocusscope_p.h"
+#include "qmlgraphicsgraphicsobjectcontainer_p.h"
+#include "qmlgraphicsgridview_p.h"
+#include "qmlgraphicsimage_p.h"
+#include "qmlgraphicsitem_p.h"
+#include "qmlgraphicslayoutitem_p.h"
+#include "qmlgraphicslistview_p.h"
+#include "qmlgraphicsloader_p.h"
+#include "qmlgraphicsmouseregion_p.h"
+#include "qmlgraphicsparticles_p.h"
+#include "qmlgraphicspath_p.h"
+#include "qmlgraphicspathview_p.h"
+#include "qmlgraphicsrectangle_p.h"
+#include "qmlgraphicsrepeater_p.h"
+#include "qmlgraphicstext_p.h"
+#include "qmlgraphicstextedit_p.h"
+#include "qmlgraphicstextinput_p.h"
+#include "qmlgraphicsvisualitemmodel_p.h"
+#ifdef QT_WEBKIT_LIB
+#include "qmlgraphicswebview_p.h"
+#include "qmlgraphicswebview_p_p.h"
+#endif
+#include "qmlgraphicsanchors_p.h"
+
+#define QML_REGISTER_TYPE(URI,VMAJ,VMIN,TYPE,CLASS) \
+ qmlRegisterType<CLASS>(#URI, VMAJ, VMIN, #TYPE, #CLASS)
+
+#define QML_REGISTER_NOCREATE_TYPE(CLASS) \
+ qmlRegisterType<CLASS>(#CLASS)
+
+void QmlGraphicsItemModule::defineModule()
+{
+ QML_REGISTER_TYPE(Qt,4,6,AnimatedImage,QmlGraphicsAnimatedImage);
+ QML_REGISTER_TYPE(Qt,4,6,Blur,QGraphicsBlurEffect);
+ QML_REGISTER_TYPE(Qt,4,6,BorderImage,QmlGraphicsBorderImage);
+ QML_REGISTER_TYPE(Qt,4,6,Colorize,QGraphicsColorizeEffect);
+ QML_REGISTER_TYPE(Qt,4,6,Column,QmlGraphicsColumn);
+ QML_REGISTER_TYPE(Qt,4,6,Drag,QmlGraphicsDrag);
+ QML_REGISTER_TYPE(Qt,4,6,DropShadow,QGraphicsDropShadowEffect);
+ QML_REGISTER_TYPE(Qt,4,6,Flickable,QmlGraphicsFlickable);
+ QML_REGISTER_TYPE(Qt,4,6,Flipable,QmlGraphicsFlipable);
+ QML_REGISTER_TYPE(Qt,4,6,Flow,QmlGraphicsFlow);
+ QML_REGISTER_TYPE(Qt,4,6,FocusPanel,QmlGraphicsFocusPanel);
+ QML_REGISTER_TYPE(Qt,4,6,FocusScope,QmlGraphicsFocusScope);
+ QML_REGISTER_TYPE(Qt,4,6,Gradient,QmlGraphicsGradient);
+ QML_REGISTER_TYPE(Qt,4,6,GradientStop,QmlGraphicsGradientStop);
+ QML_REGISTER_TYPE(Qt,4,6,GraphicsObjectContainer,QmlGraphicsGraphicsObjectContainer);
+ QML_REGISTER_TYPE(Qt,4,6,Grid,QmlGraphicsGrid);
+ QML_REGISTER_TYPE(Qt,4,6,GridView,QmlGraphicsGridView);
+ QML_REGISTER_TYPE(Qt,4,6,Image,QmlGraphicsImage);
+ QML_REGISTER_TYPE(Qt,4,6,Item,QmlGraphicsItem);
+ QML_REGISTER_TYPE(Qt,4,6,KeyNavigation,QmlGraphicsKeyNavigationAttached);
+ QML_REGISTER_TYPE(Qt,4,6,Keys,QmlGraphicsKeysAttached);
+ QML_REGISTER_TYPE(Qt,4,6,LayoutItem,QmlGraphicsLayoutItem);
+ QML_REGISTER_TYPE(Qt,4,6,ListView,QmlGraphicsListView);
+ QML_REGISTER_TYPE(Qt,4,6,Loader,QmlGraphicsLoader);
+ QML_REGISTER_TYPE(Qt,4,6,MouseRegion,QmlGraphicsMouseRegion);
+ QML_REGISTER_TYPE(Qt,4,6,Opacity,QGraphicsOpacityEffect);
+ QML_REGISTER_TYPE(Qt,4,6,ParticleMotion,QmlGraphicsParticleMotion);
+ QML_REGISTER_TYPE(Qt,4,6,ParticleMotionGravity,QmlGraphicsParticleMotionGravity);
+ QML_REGISTER_TYPE(Qt,4,6,ParticleMotionLinear,QmlGraphicsParticleMotionLinear);
+ QML_REGISTER_TYPE(Qt,4,6,ParticleMotionWander,QmlGraphicsParticleMotionWander);
+ QML_REGISTER_TYPE(Qt,4,6,Particles,QmlGraphicsParticles);
+ QML_REGISTER_TYPE(Qt,4,6,Path,QmlGraphicsPath);
+ QML_REGISTER_TYPE(Qt,4,6,PathAttribute,QmlGraphicsPathAttribute);
+ QML_REGISTER_TYPE(Qt,4,6,PathCubic,QmlGraphicsPathCubic);
+ QML_REGISTER_TYPE(Qt,4,6,PathLine,QmlGraphicsPathLine);
+ QML_REGISTER_TYPE(Qt,4,6,PathPercent,QmlGraphicsPathPercent);
+ QML_REGISTER_TYPE(Qt,4,6,PathQuad,QmlGraphicsPathQuad);
+ QML_REGISTER_TYPE(Qt,4,6,PathView,QmlGraphicsPathView);
+ QML_REGISTER_TYPE(Qt,4,6,Pen,QmlGraphicsPen);
+ QML_REGISTER_TYPE(Qt,4,6,QDoubleValidator,QDoubleValidator);
+ QML_REGISTER_TYPE(Qt,4,6,QIntValidator,QIntValidator);
+ QML_REGISTER_TYPE(Qt,4,6,QRegExpValidator,QRegExpValidator);
+ QML_REGISTER_TYPE(Qt,4,6,Rectangle,QmlGraphicsRectangle);
+ QML_REGISTER_TYPE(Qt,4,6,Repeater,QmlGraphicsRepeater);
+ QML_REGISTER_TYPE(Qt,4,6,Rotation,QGraphicsRotation);
+ QML_REGISTER_TYPE(Qt,4,6,Row,QmlGraphicsRow);
+ QML_REGISTER_TYPE(Qt,4,6,Scale,QGraphicsScale);
+ QML_REGISTER_TYPE(Qt,4,6,Text,QmlGraphicsText);
+ QML_REGISTER_TYPE(Qt,4,6,TextEdit,QmlGraphicsTextEdit);
+ QML_REGISTER_TYPE(Qt,4,6,TextInput,QmlGraphicsTextInput);
+ QML_REGISTER_TYPE(Qt,4,6,ViewSection,QmlGraphicsViewSection);
+ QML_REGISTER_TYPE(Qt,4,6,VisibleArea,QmlGraphicsFlickableVisibleArea);
+ QML_REGISTER_TYPE(Qt,4,6,VisualDataModel,QmlGraphicsVisualDataModel);
+ QML_REGISTER_TYPE(Qt,4,6,VisualItemModel,QmlGraphicsVisualItemModel);
+#ifdef QT_WEBKIT_LIB
+ QML_REGISTER_TYPE(Qt,4,6,WebView,QmlGraphicsWebView);
+#endif
+
+ QML_REGISTER_NOCREATE_TYPE(QmlGraphicsAnchors);
+ QML_REGISTER_NOCREATE_TYPE(QGraphicsEffect);
+ QML_REGISTER_NOCREATE_TYPE(QmlGraphicsKeyEvent);
+ QML_REGISTER_NOCREATE_TYPE(QmlGraphicsMouseEvent);
+ QML_REGISTER_NOCREATE_TYPE(QGraphicsObject);
+ QML_REGISTER_NOCREATE_TYPE(QGraphicsTransform);
+ QML_REGISTER_NOCREATE_TYPE(QmlGraphicsPathElement);
+ QML_REGISTER_NOCREATE_TYPE(QmlGraphicsCurve);
+ QML_REGISTER_NOCREATE_TYPE(QmlGraphicsScaleGrid);
+ QML_REGISTER_NOCREATE_TYPE(QValidator);
+ QML_REGISTER_NOCREATE_TYPE(QmlGraphicsVisualModel);
+ QML_REGISTER_NOCREATE_TYPE(QAction);
+#ifdef QT_WEBKIT_LIB
+ QML_REGISTER_NOCREATE_TYPE(QmlGraphicsWebSettings);
+#endif
+}
diff --git a/mkspecs/win32-msvc2002/qplatformdefs.h b/src/declarative/graphicsitems/qmlgraphicsitemsmodule_p.h
index 6d71abf..bf38c24 100644
--- a/mkspecs/win32-msvc2002/qplatformdefs.h
+++ b/src/declarative/graphicsitems/qmlgraphicsitemsmodule_p.h
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** 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 qmake spec of the Qt Toolkit.
+** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -39,4 +39,25 @@
**
****************************************************************************/
-#include "../win32-msvc.net/qplatformdefs.h"
+#ifndef QMLGRAPHICSITEMMODULE_H
+#define QMLGRAPHICSITEMMODULE_H
+
+#include <qml.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QmlGraphicsItemModule
+{
+public:
+ static void defineModule();
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QMLGRAPHICSITEMMODULE_H
diff --git a/src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp b/src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp
index 7227eb0..98361dc 100644
--- a/src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp
@@ -47,8 +47,6 @@
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,LayoutItem,QmlGraphicsLayoutItem)
-
/*!
\qmlclass LayoutItem QmlGraphicsLayoutItem
\brief The LayoutItem element allows you to place your Fluid UI elements inside a classical Qt layout.
diff --git a/src/declarative/graphicsitems/qmlgraphicslistview.cpp b/src/declarative/graphicsitems/qmlgraphicslistview.cpp
index d0b3739..db0afe1 100644
--- a/src/declarative/graphicsitems/qmlgraphicslistview.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicslistview.cpp
@@ -85,72 +85,6 @@ QString QmlGraphicsViewSection::sectionString(const QString &value)
return value;
}
-class QmlGraphicsListViewAttached : public QObject
-{
- Q_OBJECT
-public:
- QmlGraphicsListViewAttached(QObject *parent)
- : QObject(parent), m_view(0), m_isCurrent(false), m_delayRemove(false) {}
- ~QmlGraphicsListViewAttached() {}
-
- Q_PROPERTY(QmlGraphicsListView *view READ view CONSTANT)
- QmlGraphicsListView *view() { return m_view; }
-
- Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY currentItemChanged)
- bool isCurrentItem() const { return m_isCurrent; }
- void setIsCurrentItem(bool c) {
- if (m_isCurrent != c) {
- m_isCurrent = c;
- emit currentItemChanged();
- }
- }
-
- Q_PROPERTY(QString prevSection READ prevSection NOTIFY prevSectionChanged)
- QString prevSection() const { return m_prevSection; }
- void setPrevSection(const QString &sect) {
- if (m_prevSection != sect) {
- m_prevSection = sect;
- emit prevSectionChanged();
- }
- }
-
- Q_PROPERTY(QString section READ section NOTIFY sectionChanged)
- QString section() const { return m_section; }
- void setSection(const QString &sect) {
- if (m_section != sect) {
- m_section = sect;
- emit sectionChanged();
- }
- }
-
- Q_PROPERTY(bool delayRemove READ delayRemove WRITE setDelayRemove NOTIFY delayRemoveChanged)
- bool delayRemove() const { return m_delayRemove; }
- void setDelayRemove(bool delay) {
- if (m_delayRemove != delay) {
- m_delayRemove = delay;
- emit delayRemoveChanged();
- }
- }
-
- void emitAdd() { emit add(); }
- void emitRemove() { emit remove(); }
-
-Q_SIGNALS:
- void currentItemChanged();
- void sectionChanged();
- void prevSectionChanged();
- void delayRemoveChanged();
- void add();
- void remove();
-
-public:
- QmlGraphicsListView *m_view;
- bool m_isCurrent;
- mutable QString m_section;
- QString m_prevSection;
- bool m_delayRemove;
-};
-
//----------------------------------------------------------------------------
class FxListItem
@@ -2740,9 +2674,4 @@ QmlGraphicsListViewAttached *QmlGraphicsListView::qmlAttachedProperties(QObject
return new QmlGraphicsListViewAttached(obj);
}
-QML_DEFINE_TYPE(Qt,4,6,ListView,QmlGraphicsListView)
-QML_DEFINE_TYPE(Qt,4,6,ViewSection,QmlGraphicsViewSection)
-
QT_END_NAMESPACE
-
-#include <qmlgraphicslistview.moc>
diff --git a/src/declarative/graphicsitems/qmlgraphicslistview_p.h b/src/declarative/graphicsitems/qmlgraphicslistview_p.h
index 79d678a..42ace15 100644
--- a/src/declarative/graphicsitems/qmlgraphicslistview_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicslistview_p.h
@@ -227,6 +227,73 @@ private Q_SLOTS:
void animStopped();
};
+class QmlGraphicsListViewAttached : public QObject
+{
+ Q_OBJECT
+public:
+ QmlGraphicsListViewAttached(QObject *parent)
+ : QObject(parent), m_view(0), m_isCurrent(false), m_delayRemove(false) {}
+ ~QmlGraphicsListViewAttached() {}
+
+ Q_PROPERTY(QmlGraphicsListView *view READ view CONSTANT)
+ QmlGraphicsListView *view() { return m_view; }
+
+ Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY currentItemChanged)
+ bool isCurrentItem() const { return m_isCurrent; }
+ void setIsCurrentItem(bool c) {
+ if (m_isCurrent != c) {
+ m_isCurrent = c;
+ emit currentItemChanged();
+ }
+ }
+
+ Q_PROPERTY(QString prevSection READ prevSection NOTIFY prevSectionChanged)
+ QString prevSection() const { return m_prevSection; }
+ void setPrevSection(const QString &sect) {
+ if (m_prevSection != sect) {
+ m_prevSection = sect;
+ emit prevSectionChanged();
+ }
+ }
+
+ Q_PROPERTY(QString section READ section NOTIFY sectionChanged)
+ QString section() const { return m_section; }
+ void setSection(const QString &sect) {
+ if (m_section != sect) {
+ m_section = sect;
+ emit sectionChanged();
+ }
+ }
+
+ Q_PROPERTY(bool delayRemove READ delayRemove WRITE setDelayRemove NOTIFY delayRemoveChanged)
+ bool delayRemove() const { return m_delayRemove; }
+ void setDelayRemove(bool delay) {
+ if (m_delayRemove != delay) {
+ m_delayRemove = delay;
+ emit delayRemoveChanged();
+ }
+ }
+
+ void emitAdd() { emit add(); }
+ void emitRemove() { emit remove(); }
+
+Q_SIGNALS:
+ void currentItemChanged();
+ void sectionChanged();
+ void prevSectionChanged();
+ void delayRemoveChanged();
+ void add();
+ void remove();
+
+public:
+ QmlGraphicsListView *m_view;
+ bool m_isCurrent;
+ mutable QString m_section;
+ QString m_prevSection;
+ bool m_delayRemove;
+};
+
+
QT_END_NAMESPACE
QML_DECLARE_TYPEINFO(QmlGraphicsListView, QML_HAS_ATTACHED_PROPERTIES)
diff --git a/src/declarative/graphicsitems/qmlgraphicsloader.cpp b/src/declarative/graphicsitems/qmlgraphicsloader.cpp
index b3486ef..d778c83 100644
--- a/src/declarative/graphicsitems/qmlgraphicsloader.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsloader.cpp
@@ -108,8 +108,6 @@ void QmlGraphicsLoaderPrivate::initResize()
_q_updateSize();
}
-QML_DEFINE_TYPE(Qt,4,6,Loader,QmlGraphicsLoader)
-
/*!
\qmlclass Loader QmlGraphicsLoader
\inherits Item
diff --git a/src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp b/src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp
index bd21e7a..fe72e84 100644
--- a/src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp
@@ -49,7 +49,6 @@
QT_BEGIN_NAMESPACE
static const int PressAndHoldDelay = 800;
-QML_DEFINE_TYPE(Qt,4,6,Drag,QmlGraphicsDrag)
QmlGraphicsDrag::QmlGraphicsDrag(QObject *parent)
: QObject(parent), _target(0), _axis(XandYAxis), _xmin(0), _xmax(0), _ymin(0), _ymax(0)
{
@@ -231,8 +230,6 @@ QmlGraphicsMouseRegionPrivate::~QmlGraphicsMouseRegionPrivate()
The \e accepted property of the MouseEvent parameter is ignored in this handler.
*/
-QML_DEFINE_TYPE(Qt,4,6,MouseRegion,QmlGraphicsMouseRegion)
-
/*!
\internal
\class QmlGraphicsMouseRegion
diff --git a/src/declarative/graphicsitems/qmlgraphicsparticles.cpp b/src/declarative/graphicsitems/qmlgraphicsparticles.cpp
index 8c5fb4f..5edd59e 100644
--- a/src/declarative/graphicsitems/qmlgraphicsparticles.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsparticles.cpp
@@ -108,8 +108,6 @@ public:
//---------------------------------------------------------------------------
-QML_DEFINE_TYPE(Qt,4,6,ParticleMotion,QmlGraphicsParticleMotion)
-
/*!
\class QmlGraphicsParticleMotion
\ingroup group_effects
@@ -169,8 +167,6 @@ void QmlGraphicsParticleMotion::destroy(QmlGraphicsParticle &particle)
\brief The QmlGraphicsParticleMotionLinear class moves the particles linearly.
*/
-QML_DEFINE_TYPE(Qt,4,6,ParticleMotionLinear,QmlGraphicsParticleMotionLinear)
-
void QmlGraphicsParticleMotionLinear::advance(QmlGraphicsParticle &p, int interval)
{
p.x += interval * p.x_velocity;
@@ -191,8 +187,6 @@ void QmlGraphicsParticleMotionLinear::advance(QmlGraphicsParticle &p, int interv
\brief The QmlGraphicsParticleMotionGravity class moves the particles towards a point.
*/
-QML_DEFINE_TYPE(Qt,4,6,ParticleMotionGravity,QmlGraphicsParticleMotionGravity)
-
/*!
\qmlproperty int ParticleMotionGravity::xattractor
\qmlproperty int ParticleMotionGravity::yattractor
@@ -293,8 +287,6 @@ Rectangle {
This property holds how quickly the paricles will move from side to side.
*/
-QML_DEFINE_TYPE(Qt,4,6,ParticleMotionWander,QmlGraphicsParticleMotionWander)
-
void QmlGraphicsParticleMotionWander::advance(QmlGraphicsParticle &p, int interval)
{
if (!particles)
@@ -561,8 +553,6 @@ void QmlGraphicsParticlesPrivate::updateOpacity(QmlGraphicsParticle &p, int age)
}
}
-QML_DEFINE_TYPE(Qt,4,6,Particles,QmlGraphicsParticles)
-
/*!
\qmlclass Particles
\brief The Particles object generates and moves particles.
diff --git a/src/declarative/graphicsitems/qmlgraphicspath.cpp b/src/declarative/graphicsitems/qmlgraphicspath.cpp
index 18f27af..fae8161 100644
--- a/src/declarative/graphicsitems/qmlgraphicspath.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicspath.cpp
@@ -49,14 +49,6 @@
#include <private/qbezier_p.h>
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,Path,QmlGraphicsPath)
-QML_DEFINE_NOCREATE_TYPE(QmlGraphicsPathElement)
-QML_DEFINE_NOCREATE_TYPE(QmlGraphicsCurve)
-QML_DEFINE_TYPE(Qt,4,6,PathAttribute,QmlGraphicsPathAttribute)
-QML_DEFINE_TYPE(Qt,4,6,PathPercent,QmlGraphicsPathPercent)
-QML_DEFINE_TYPE(Qt,4,6,PathLine,QmlGraphicsPathLine)
-QML_DEFINE_TYPE(Qt,4,6,PathQuad,QmlGraphicsPathQuad)
-QML_DEFINE_TYPE(Qt,4,6,PathCubic,QmlGraphicsPathCubic)
/*!
\qmlclass PathElement QmlGraphicsPathElement
diff --git a/src/declarative/graphicsitems/qmlgraphicspathview.cpp b/src/declarative/graphicsitems/qmlgraphicspathview.cpp
index 6718d25..a1c9229 100644
--- a/src/declarative/graphicsitems/qmlgraphicspathview.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicspathview.cpp
@@ -54,9 +54,6 @@
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,PathView,QmlGraphicsPathView)
-
-
inline qreal qmlMod(qreal x, qreal y)
{
#ifdef QT_USE_MATH_H_FLOATS
diff --git a/src/declarative/graphicsitems/qmlgraphicspositioners.cpp b/src/declarative/graphicsitems/qmlgraphicspositioners.cpp
index 5b081a2..142cdce 100644
--- a/src/declarative/graphicsitems/qmlgraphicspositioners.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicspositioners.cpp
@@ -288,7 +288,6 @@ void QmlGraphicsBasePositioner::finishApplyTransitions()
d->moveActions.clear();
}
-QML_DEFINE_TYPE(Qt,4,6,Column,QmlGraphicsColumn)
/*!
\qmlclass Column QmlGraphicsColumn
\brief The Column item lines up its children vertically.
@@ -418,7 +417,6 @@ void QmlGraphicsColumn::doPositioning()
}
}
-QML_DEFINE_TYPE(Qt,4,6,Row,QmlGraphicsRow)
/*!
\qmlclass Row QmlGraphicsRow
\brief The Row item lines up its children horizontally.
@@ -523,7 +521,6 @@ void QmlGraphicsRow::doPositioning()
}
}
-QML_DEFINE_TYPE(Qt,4,6,Grid,QmlGraphicsGrid)
/*!
\qmlclass Grid QmlGraphicsGrid
@@ -711,7 +708,6 @@ void QmlGraphicsGrid::doPositioning()
}
-QML_DEFINE_TYPE(Qt,4,6,Flow,QmlGraphicsFlow)
/*!
\qmlclass Flow QmlGraphicsFlow
\brief The Flow item lines up its children side by side, wrapping as necessary.
diff --git a/src/declarative/graphicsitems/qmlgraphicsrectangle.cpp b/src/declarative/graphicsitems/qmlgraphicsrectangle.cpp
index cc09436..ec44d93 100644
--- a/src/declarative/graphicsitems/qmlgraphicsrectangle.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsrectangle.cpp
@@ -46,9 +46,6 @@
#include <QtCore/qmath.h>
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,Pen,QmlGraphicsPen)
-QML_DEFINE_TYPE(Qt,4,6,GradientStop,QmlGraphicsGradientStop)
-QML_DEFINE_TYPE(Qt,4,6,Gradient,QmlGraphicsGradient)
/*!
\internal
@@ -149,7 +146,6 @@ void QmlGraphicsGradient::doUpdate()
emit updated();
}
-QML_DEFINE_TYPE(Qt,4,6,Rectangle,QmlGraphicsRectangle)
/*!
\qmlclass Rectangle QmlGraphicsRectangle
diff --git a/src/declarative/graphicsitems/qmlgraphicsrepeater.cpp b/src/declarative/graphicsitems/qmlgraphicsrepeater.cpp
index 99f0faa..f0e5bb3 100644
--- a/src/declarative/graphicsitems/qmlgraphicsrepeater.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsrepeater.cpp
@@ -60,8 +60,6 @@ QmlGraphicsRepeaterPrivate::~QmlGraphicsRepeaterPrivate()
delete model;
}
-QML_DEFINE_TYPE(Qt,4,6,Repeater,QmlGraphicsRepeater)
-
/*!
\qmlclass Repeater QmlGraphicsRepeater
\inherits Item
diff --git a/src/declarative/graphicsitems/qmlgraphicsscalegrid.cpp b/src/declarative/graphicsitems/qmlgraphicsscalegrid.cpp
index f50b79b..94b562b 100644
--- a/src/declarative/graphicsitems/qmlgraphicsscalegrid.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsscalegrid.cpp
@@ -52,7 +52,6 @@ QT_BEGIN_NAMESPACE
\class QmlGraphicsScaleGrid
\brief The QmlGraphicsScaleGrid class allows you to specify a 3x3 grid to use in scaling an image.
*/
-QML_DEFINE_NOCREATE_TYPE(QmlGraphicsScaleGrid)
QmlGraphicsScaleGrid::QmlGraphicsScaleGrid(QObject *parent) : QObject(parent), _left(0), _top(0), _right(0), _bottom(0)
{
diff --git a/src/declarative/graphicsitems/qmlgraphicstext.cpp b/src/declarative/graphicsitems/qmlgraphicstext.cpp
index b13fb7c..89081eb 100644
--- a/src/declarative/graphicsitems/qmlgraphicstext.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicstext.cpp
@@ -55,7 +55,6 @@
#include <qmath.h>
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,Text,QmlGraphicsText)
/*!
\qmlclass Text QmlGraphicsText
diff --git a/src/declarative/graphicsitems/qmlgraphicstextedit.cpp b/src/declarative/graphicsitems/qmlgraphicstextedit.cpp
index fc80258..00f7e42 100644
--- a/src/declarative/graphicsitems/qmlgraphicstextedit.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicstextedit.cpp
@@ -56,7 +56,6 @@
#include <private/qtextcontrol_p.h>
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,TextEdit,QmlGraphicsTextEdit)
/*!
\qmlclass TextEdit QmlGraphicsTextEdit
diff --git a/src/declarative/graphicsitems/qmlgraphicstextinput.cpp b/src/declarative/graphicsitems/qmlgraphicstextinput.cpp
index 6d79c7a..ea54351 100644
--- a/src/declarative/graphicsitems/qmlgraphicstextinput.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicstextinput.cpp
@@ -51,12 +51,6 @@
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,TextInput,QmlGraphicsTextInput);
-QML_DEFINE_NOCREATE_TYPE(QValidator);
-QML_DEFINE_TYPE(Qt,4,6,QIntValidator,QIntValidator);
-QML_DEFINE_TYPE(Qt,4,6,QDoubleValidator,QDoubleValidator);
-QML_DEFINE_TYPE(Qt,4,6,QRegExpValidator,QRegExpValidator);
-
/*!
\qmlclass TextInput QmlGraphicsTextInput
The TextInput item allows you to add an editable line of text to a scene.
diff --git a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp
index 2fc143d..b4487a6 100644
--- a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp
@@ -66,44 +66,6 @@ QML_DECLARE_TYPE(QListModelInterface)
QT_BEGIN_NAMESPACE
-class QmlGraphicsVisualItemModelAttached : public QObject
-{
- Q_OBJECT
-
-public:
- QmlGraphicsVisualItemModelAttached(QObject *parent)
- : QObject(parent), m_index(0) {}
- ~QmlGraphicsVisualItemModelAttached() {
- attachedProperties.remove(parent());
- }
-
- Q_PROPERTY(int index READ index NOTIFY indexChanged)
- int index() const { return m_index; }
- void setIndex(int idx) {
- if (m_index != idx) {
- m_index = idx;
- emit indexChanged();
- }
- }
-
- static QmlGraphicsVisualItemModelAttached *properties(QObject *obj) {
- QmlGraphicsVisualItemModelAttached *rv = attachedProperties.value(obj);
- if (!rv) {
- rv = new QmlGraphicsVisualItemModelAttached(obj);
- attachedProperties.insert(obj, rv);
- }
- return rv;
- }
-
-Q_SIGNALS:
- void indexChanged();
-
-public:
- int m_index;
-
- static QHash<QObject*, QmlGraphicsVisualItemModelAttached*> attachedProperties;
-};
-
QHash<QObject*, QmlGraphicsVisualItemModelAttached*> QmlGraphicsVisualItemModelAttached::attachedProperties;
@@ -1146,10 +1108,6 @@ void QmlGraphicsVisualDataModel::_q_destroyingPackage(QmlPackage *package)
emit destroyingItem(qobject_cast<QmlGraphicsItem*>(package->part(d->m_part)));
}
-QML_DEFINE_NOCREATE_TYPE(QmlGraphicsVisualModel);
-QML_DEFINE_TYPE(Qt,4,6,VisualItemModel,QmlGraphicsVisualItemModel)
-QML_DEFINE_TYPE(Qt,4,6,VisualDataModel,QmlGraphicsVisualDataModel)
-
QT_END_NAMESPACE
#include <qmlgraphicsvisualitemmodel.moc>
diff --git a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel_p.h b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel_p.h
index ef849b0..9ebf626 100644
--- a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel_p.h
@@ -195,6 +195,45 @@ private:
Q_DISABLE_COPY(QmlGraphicsVisualDataModel)
};
+class QmlGraphicsVisualItemModelAttached : public QObject
+{
+ Q_OBJECT
+
+public:
+ QmlGraphicsVisualItemModelAttached(QObject *parent)
+ : QObject(parent), m_index(0) {}
+ ~QmlGraphicsVisualItemModelAttached() {
+ attachedProperties.remove(parent());
+ }
+
+ Q_PROPERTY(int index READ index NOTIFY indexChanged)
+ int index() const { return m_index; }
+ void setIndex(int idx) {
+ if (m_index != idx) {
+ m_index = idx;
+ emit indexChanged();
+ }
+ }
+
+ static QmlGraphicsVisualItemModelAttached *properties(QObject *obj) {
+ QmlGraphicsVisualItemModelAttached *rv = attachedProperties.value(obj);
+ if (!rv) {
+ rv = new QmlGraphicsVisualItemModelAttached(obj);
+ attachedProperties.insert(obj, rv);
+ }
+ return rv;
+ }
+
+Q_SIGNALS:
+ void indexChanged();
+
+public:
+ int m_index;
+
+ static QHash<QObject*, QmlGraphicsVisualItemModelAttached*> attachedProperties;
+};
+
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QmlGraphicsVisualModel)
diff --git a/src/declarative/graphicsitems/qmlgraphicswebview.cpp b/src/declarative/graphicsitems/qmlgraphicswebview.cpp
index 85fd0d7..c71a366 100644
--- a/src/declarative/graphicsitems/qmlgraphicswebview.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicswebview.cpp
@@ -64,13 +64,9 @@
#include <qlistmodelinterface_p.h>
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,WebView,QmlGraphicsWebView)
-QML_DEFINE_NOCREATE_TYPE(QAction)
static const int MAX_DOUBLECLICK_TIME=500; // XXX need better gesture system
-QML_DEFINE_NOCREATE_TYPE(QmlGraphicsWebSettings)
-
class QmlGraphicsWebViewPrivate : public QmlGraphicsPaintedItemPrivate
{
Q_DECLARE_PUBLIC(QmlGraphicsWebView)
@@ -461,30 +457,6 @@ QmlList<QObject *> *QmlGraphicsWebView::javaScriptWindowObjects()
return &d->windowObjects;
}
-class QmlGraphicsWebViewAttached : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString windowObjectName READ windowObjectName WRITE setWindowObjectName)
-public:
- QmlGraphicsWebViewAttached(QObject *parent)
- : QObject(parent)
- {
- }
-
- QString windowObjectName() const
- {
- return m_windowObjectName;
- }
-
- void setWindowObjectName(const QString &n)
- {
- m_windowObjectName = n;
- }
-
-private:
- QString m_windowObjectName;
-};
-
QmlGraphicsWebViewAttached *QmlGraphicsWebView::qmlAttachedProperties(QObject *o)
{
return new QmlGraphicsWebViewAttached(o);
diff --git a/src/declarative/graphicsitems/qmlgraphicswebview_p.h b/src/declarative/graphicsitems/qmlgraphicswebview_p.h
index f5edb7a..0aaf895 100644
--- a/src/declarative/graphicsitems/qmlgraphicswebview_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicswebview_p.h
@@ -246,11 +246,35 @@ private:
friend class QmlGraphicsWebPage;
};
+class QmlGraphicsWebViewAttached : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString windowObjectName READ windowObjectName WRITE setWindowObjectName)
+public:
+ QmlGraphicsWebViewAttached(QObject *parent)
+ : QObject(parent)
+ {
+ }
+
+ QString windowObjectName() const
+ {
+ return m_windowObjectName;
+ }
+
+ void setWindowObjectName(const QString &n)
+ {
+ m_windowObjectName = n;
+ }
+
+private:
+ QString m_windowObjectName;
+};
+
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QmlGraphicsWebView)
QML_DECLARE_TYPEINFO(QmlGraphicsWebView, QML_HAS_ATTACHED_PROPERTIES)
-QML_DECLARE_TYPE(QAction)
QT_END_HEADER
diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp
index 9e06016..343bd4b 100644
--- a/src/declarative/qml/qmlcomponent.cpp
+++ b/src/declarative/qml/qmlcomponent.cpp
@@ -539,7 +539,6 @@ QObject *QmlComponent::create(QmlContext *context)
QObject *QmlComponentPrivate::create(QmlContext *context,
const QBitField &bindings)
{
- QObject *create(QmlContext *context, const QBitField &);
if (!context)
context = engine->rootContext();
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index cdbe5f3..35fc3d4 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -95,6 +95,8 @@
#include <private/qobject_p.h>
#include <private/qscriptdeclarativeclass_p.h>
+#include <private/qmlgraphicsitemsmodule_p.h>
+
#ifdef Q_OS_WIN // for %APPDATA%
#include <qt_windows.h>
#include <qlibrary.h>
@@ -136,6 +138,8 @@ struct StaticQtMetaObject : public QObject
{ return &static_cast<StaticQtMetaObject*> (0)->staticQtMetaObject; }
};
+static bool qt_QmlQtModule_registered = false;
+
QmlEnginePrivate::QmlEnginePrivate(QmlEngine *e)
: captureProperties(false), rootContext(0), currentExpression(0), isDebugging(false),
contextClass(0), sharedContext(0), sharedScope(0), objectClass(0), valueTypeClass(0),
@@ -144,6 +148,10 @@ QmlEnginePrivate::QmlEnginePrivate(QmlEngine *e)
networkAccessManager(0), networkAccessManagerFactory(0),
typeManager(e), uniqueId(1)
{
+ if (!qt_QmlQtModule_registered) {
+ qt_QmlQtModule_registered = true;
+ QmlGraphicsItemModule::defineModule();
+ }
globalClass = new QmlGlobalScriptClass(&scriptEngine);
fileImportPath.append(QLibraryInfo::location(QLibraryInfo::DataPath)+QDir::separator()+QLatin1String("qml"));
}
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index b7d3c0d..63b0ec7 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -319,7 +319,7 @@
QGraphicsItem::keyPressEvent() and QGraphicsItem::keyReleaseEvent().
\value ItemClipsToShape The item clips to its own shape. The item cannot
- draw or receive mouse, tablet, drag and drop or hover events outside ts
+ draw or receive mouse, tablet, drag and drop or hover events outside its
shape. It is disabled by default. This behavior is enforced by
QGraphicsView::drawItems() or QGraphicsScene::drawItems(). This flag was
introduced in Qt 4.3.
@@ -1393,7 +1393,8 @@ QGraphicsItem::~QGraphicsItem()
}
delete d_ptr->transformData;
- qt_dataStore()->data.remove(this);
+ if (QGraphicsItemCustomDataStore *dataStore = qt_dataStore())
+ dataStore->data.remove(this);
}
/*!
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index ac1d303..bf6eb8d 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -104,6 +104,15 @@ QT_BEGIN_NAMESPACE
static QBasicAtomicInt serialNumCounter = Q_BASIC_ATOMIC_INITIALIZER(1);
+static void qt_cleanup_icon_cache();
+typedef QCache<QString, QIcon> IconCache;
+Q_GLOBAL_STATIC_WITH_INITIALIZER(IconCache, qtIconCache, qAddPostRoutine(qt_cleanup_icon_cache))
+
+static void qt_cleanup_icon_cache()
+{
+ qtIconCache()->clear();
+}
+
QIconPrivate::QIconPrivate()
: engine(0), ref(1),
serialNum(serialNumCounter.fetchAndAddRelaxed(1)),
@@ -963,15 +972,13 @@ QString QIcon::themeName()
*/
QIcon QIcon::fromTheme(const QString &name, const QIcon &fallback)
{
- static QCache <QString, QIcon> iconCache;
-
QIcon icon;
- if (iconCache.contains(name)) {
- icon = *iconCache.object(name);
+ if (qtIconCache()->contains(name)) {
+ icon = *qtIconCache()->object(name);
} else {
QIcon *cachedIcon = new QIcon(new QIconLoaderEngine(name));
- iconCache.insert(name, cachedIcon);
+ qtIconCache()->insert(name, cachedIcon);
icon = *cachedIcon;
}
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index c9e015c..9320cfc 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -263,25 +263,37 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
device->seek(pos);
}
- if (!handler && !testFormat.isEmpty() && autoDetectImageFormat && !ignoresFormatAndExtension) {
+ if (!handler && !testFormat.isEmpty() && !ignoresFormatAndExtension) {
// check if any plugin supports the format (they are not allowed to
// read from the device yet).
const qint64 pos = device ? device->pos() : 0;
- for (int i = 0; i < keys.size(); ++i) {
- if (i != suffixPluginIndex) {
- QImageIOPlugin *plugin = qobject_cast<QImageIOPlugin *>(l->instance(keys.at(i)));
- if (plugin && plugin->capabilities(device, testFormat) & QImageIOPlugin::CanRead) {
+
+ if (autoDetectImageFormat) {
+ for (int i = 0; i < keys.size(); ++i) {
+ if (i != suffixPluginIndex) {
+ QImageIOPlugin *plugin = qobject_cast<QImageIOPlugin *>(l->instance(keys.at(i)));
+ if (plugin && plugin->capabilities(device, testFormat) & QImageIOPlugin::CanRead) {
#ifdef QIMAGEREADER_DEBUG
- qDebug() << "QImageReader::createReadHandler: the" << keys.at(i) << "plugin can read this format";
+ qDebug() << "QImageReader::createReadHandler: the" << keys.at(i) << "plugin can read this format";
#endif
- handler = plugin->create(device, testFormat);
- break;
+ handler = plugin->create(device, testFormat);
+ break;
+ }
}
}
+ } else {
+ QImageIOPlugin *plugin = qobject_cast<QImageIOPlugin *>(l->instance(QLatin1String(testFormat)));
+ if (plugin && plugin->capabilities(device, testFormat) & QImageIOPlugin::CanRead) {
+#ifdef QIMAGEREADER_DEBUG
+ qDebug() << "QImageReader::createReadHandler: the" << testFormat << "plugin can read this format";
+#endif
+ handler = plugin->create(device, testFormat);
+ }
}
if (device && !device->isSequential())
device->seek(pos);
}
+
#endif // QT_NO_LIBRARY
// if we don't have a handler yet, check if we have built-in support for
diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp
index 37a6a18..2792e45 100644
--- a/src/gui/image/qpixmapfilter.cpp
+++ b/src/gui/image/qpixmapfilter.cpp
@@ -422,6 +422,9 @@ void QPixmapConvolutionFilter::draw(QPainter *painter, const QPointF &p, const Q
if(d->kernelWidth<=0 || d->kernelHeight <= 0)
return;
+ if (src.isNull())
+ return;
+
QPixmapFilter *filter = painter->paintEngine() && painter->paintEngine()->isExtended() ?
static_cast<QPaintEngineEx *>(painter->paintEngine())->pixmapFilter(type(), this) : 0;
QPixmapConvolutionFilter *convolutionFilter = static_cast<QPixmapConvolutionFilter*>(filter);
@@ -710,7 +713,8 @@ void expblur(QImage &img, qreal radius, bool improvedQuality = false, int transp
radius *= qreal(0.5);
Q_ASSERT(img.format() == QImage::Format_ARGB32_Premultiplied
- || img.format() == QImage::Format_RGB32);
+ || img.format() == QImage::Format_RGB32
+ || img.format() == QImage::Format_Indexed8);
// choose the alpha such that pixels at radius distance from a fully
// saturated pixel will have an alpha component of no greater than
@@ -902,6 +906,9 @@ void QPixmapBlurFilter::draw(QPainter *painter, const QPointF &p, const QPixmap
if (!painter->isActive())
return;
+ if (src.isNull())
+ return;
+
QRectF srcRect = rect;
if (srcRect.isNull())
srcRect = src.rect();
@@ -1082,6 +1089,10 @@ void QPixmapColorizeFilter::setStrength(qreal strength)
void QPixmapColorizeFilter::draw(QPainter *painter, const QPointF &dest, const QPixmap &src, const QRectF &srcRect) const
{
Q_D(const QPixmapColorizeFilter);
+
+ if (src.isNull())
+ return;
+
QPixmapFilter *filter = painter->paintEngine() && painter->paintEngine()->isExtended() ?
static_cast<QPaintEngineEx *>(painter->paintEngine())->pixmapFilter(type(), this) : 0;
QPixmapColorizeFilter *colorizeFilter = static_cast<QPixmapColorizeFilter*>(filter);
@@ -1312,6 +1323,10 @@ void QPixmapDropShadowFilter::draw(QPainter *p,
const QRectF &src) const
{
Q_D(const QPixmapDropShadowFilter);
+
+ if (px.isNull())
+ return;
+
QPixmapFilter *filter = p->paintEngine() && p->paintEngine()->isExtended() ?
static_cast<QPaintEngineEx *>(p->paintEngine())->pixmapFilter(type(), this) : 0;
QPixmapDropShadowFilter *dropShadowFilter = static_cast<QPixmapDropShadowFilter*>(filter);
diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp
index 19b1e8c..b2def39 100644
--- a/src/gui/itemviews/qlistview.cpp
+++ b/src/gui/itemviews/qlistview.cpp
@@ -2160,7 +2160,7 @@ void QListModeViewBase::scrollContentsBy(int dx, int dy, bool scrollElasticBand)
} else {
if (flowPositions.isEmpty())
return;
- const int max = flowPositions.count() - 1;
+ const int max = scrollValueMap.count() - 1;
if (vertical && flow() == QListView::TopToBottom && dy != 0) {
int currentValue = qBound(0, verticalValue, max);
int previousValue = qBound(0, currentValue + dy, max);
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index bb6aca9..336be91 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -5264,10 +5264,20 @@ QInputContext *QApplication::inputContext() const
qic = QInputContextFactory::create(QLatin1String("xim"), that);
that->d_func()->inputContext = qic;
}
-#elif defined(Q_WS_S60)
+#elif defined(Q_OS_SYMBIAN)
if (!d->inputContext) {
QApplication *that = const_cast<QApplication *>(this);
- that->d_func()->inputContext = QInputContextFactory::create(QString::fromLatin1("coefep"), that);
+ const QStringList keys = QInputContextFactory::keys();
+ // Try hbim and coefep first, then try others.
+ if (keys.contains("hbim")) {
+ that->d_func()->inputContext = QInputContextFactory::create(QLatin1String("hbim"), that);
+ } else if (keys.contains("coefep")) {
+ that->d_func()->inputContext = QInputContextFactory::create(QLatin1String("coefep"), that);
+ } else {
+ for (int c = 0; c < keys.size() && !d->inputContext; ++c) {
+ that->d_func()->inputContext = QInputContextFactory::create(keys[c], that);
+ }
+ }
}
#endif
return d->inputContext;
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index 3fba833..25c98c5 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -2168,6 +2168,7 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event
}
if (wheel_deltaX || wheel_deltaY) {
+#ifndef QT_NO_WHEELEVENT
if (wheel_deltaX) {
QWheelEvent qwe(plocal, p, wheel_deltaX, buttons, modifiers, Qt::Horizontal);
QApplication::sendSpontaneousEvent(widget, &qwe);
@@ -2190,6 +2191,7 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event
handled_event = false;
}
}
+#endif // QT_NO_WHEELEVENT
} else {
#ifdef QMAC_SPEAK_TO_ME
const int speak_keys = Qt::AltModifier | Qt::ShiftModifier;
@@ -2764,6 +2766,7 @@ int QApplication::keyboardInputInterval()
return QApplicationPrivate::keyboard_input_time;
}
+#ifndef QT_NO_WHEELEVENT
void QApplication::setWheelScrollLines(int n)
{
QApplicationPrivate::wheel_scroll_lines = n;
@@ -2773,6 +2776,7 @@ int QApplication::wheelScrollLines()
{
return QApplicationPrivate::wheel_scroll_lines;
}
+#endif
void QApplication::setEffectEnabled(Qt::UIEffect effect, bool enable)
{
@@ -2935,9 +2939,11 @@ bool QApplicationPrivate::qt_mac_apply_settings()
QApplication::cursorFlashTime()).toInt();
QApplication::setCursorFlashTime(num);
+#ifndef QT_NO_WHEELEVENT
num = settings.value(QLatin1String("wheelScrollLines"),
QApplication::wheelScrollLines()).toInt();
QApplication::setWheelScrollLines(num);
+#endif
QString colorspec = settings.value(QLatin1String("colorSpec"),
QVariant(QLatin1String("default"))).toString();
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index d19d86e..e0a6103 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -427,7 +427,9 @@ public:
static int cursor_flash_time;
static int mouse_double_click_time;
static int keyboard_input_time;
+#ifndef QT_NO_WHEELEVENT
static int wheel_scroll_lines;
+#endif
static bool animate_ui;
static bool animate_menu;
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 87de602..3e2e6f6 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -809,12 +809,15 @@ TCoeInputCapabilities QSymbianControl::InputCapabilities() const
void QSymbianControl::Draw(const TRect& controlRect) const
{
// Set flag to avoid calling DrawNow in window surface
- QWExtra *extra = qwidget->d_func()->extraData();
- if (extra && !extra->inExpose) {
- extra->inExpose = true;
+ QWidget *window = qwidget->window();
+ Q_ASSERT(window);
+ QTLWExtra *topExtra = window->d_func()->maybeTopData();
+ Q_ASSERT(topExtra);
+ if (!topExtra->inExpose) {
+ topExtra->inExpose = true;
QRect exposeRect = qt_TRect2QRect(controlRect);
qwidget->d_func()->syncBackingStore(exposeRect);
- extra->inExpose = false;
+ topExtra->inExpose = false;
}
QWindowSurface *surface = qwidget->windowSurface();
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 3355272..0a4869b 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -928,7 +928,11 @@ const QString qt_reg_winclass(QWidget *w) // register window class
uint style;
bool icon;
QString cname;
- if (flags & Qt::MSWindowsOwnDC) {
+ if (qt_widget_private(w)->isGLWidget) {
+ cname = QLatin1String("QGLWidget");
+ style = CS_DBLCLKS;
+ icon = true;
+ } else if (flags & Qt::MSWindowsOwnDC) {
cname = QLatin1String("QWidgetOwnDC");
style = CS_DBLCLKS;
#ifndef Q_WS_WINCE
@@ -1021,7 +1025,7 @@ const QString qt_reg_winclass(QWidget *w) // register window class
}
wc.hCursor = 0;
#ifndef Q_WS_WINCE
- wc.hbrBackground = (HBRUSH)GetSysColorBrush(COLOR_WINDOW);
+ wc.hbrBackground = qt_widget_private(w)->isGLWidget ? 0 : (HBRUSH)GetSysColorBrush(COLOR_WINDOW);
#else
wc.hbrBackground = 0;
#endif
@@ -3616,13 +3620,19 @@ bool QETWidget::translatePaintEvent(const MSG &msg)
return true;
setAttribute(Qt::WA_PendingUpdate, false);
- const QRegion dirtyInBackingStore(qt_dirtyRegion(this));
- // Make sure the invalidated region contains the region we're about to repaint.
- // BeginPaint will set the clip to the invalidated region and it is impossible
- // to enlarge it afterwards (only shrink it). Using GetDCEx is not suffient
- // as it may return an invalid context (especially on Windows Vista).
- if (!dirtyInBackingStore.isEmpty())
- InvalidateRgn(internalWinId(), dirtyInBackingStore.handle(), false);
+
+ if (d_func()->isGLWidget) {
+ if (d_func()->usesDoubleBufferedGLContext)
+ InvalidateRect(internalWinId(), 0, false);
+ } else {
+ const QRegion dirtyInBackingStore(qt_dirtyRegion(this));
+ // Make sure the invalidated region contains the region we're about to repaint.
+ // BeginPaint will set the clip to the invalidated region and it is impossible
+ // to enlarge it afterwards (only shrink it). Using GetDCEx is not suffient
+ // as it may return an invalid context (especially on Windows Vista).
+ if (!dirtyInBackingStore.isEmpty())
+ InvalidateRgn(internalWinId(), dirtyInBackingStore.handle(), false);
+ }
PAINTSTRUCT ps;
d_func()->hd = BeginPaint(internalWinId(), &ps);
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index 667db39..34865b5 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -949,10 +949,12 @@ bool QApplicationPrivate::x11_apply_settings()
QApplication::cursorFlashTime()).toInt();
QApplication::setCursorFlashTime(num);
+#ifndef QT_NO_WHEELEVENT
num =
settings.value(QLatin1String("wheelScrollLines"),
QApplication::wheelScrollLines()).toInt();
QApplication::setWheelScrollLines(num);
+#endif
QString colorspec = settings.value(QLatin1String("colorSpec"),
QVariant(QLatin1String("default"))).toString();
@@ -4406,8 +4408,10 @@ bool QETWidget::translateWheelEvent(int global_x, int global_y, int delta,
QWidget* popup = qApp->activePopupWidget();
if (popup && window() != popup)
popup->close();
+#ifndef QT_NO_WHEELEVENT
QWheelEvent e(pos, globalPos, delta, buttons, modifiers, orient);
if (QApplication::sendSpontaneousEvent(widget, &e))
+#endif
return true;
}
@@ -4418,8 +4422,10 @@ bool QETWidget::translateWheelEvent(int global_x, int global_y, int delta,
QWidget* popup = qApp->activePopupWidget();
if (popup && widget != popup)
popup->hide();
+#ifndef QT_NO_WHEELEVENT
QWheelEvent e(pos, globalPos, delta, buttons, modifiers, orient);
if (QApplication::sendSpontaneousEvent(widget, &e))
+#endif
return true;
}
return false;
@@ -5318,6 +5324,7 @@ int QApplication::keyboardInputInterval()
return QApplicationPrivate::keyboard_input_time;
}
+#ifndef QT_NO_WHEELEVENT
void QApplication::setWheelScrollLines(int n)
{
QApplicationPrivate::wheel_scroll_lines = n;
@@ -5327,6 +5334,7 @@ int QApplication::wheelScrollLines()
{
return QApplicationPrivate::wheel_scroll_lines;
}
+#endif
void QApplication::setEffectEnabled(Qt::UIEffect effect, bool enable)
{
diff --git a/src/gui/kernel/qclipboard_mac.cpp b/src/gui/kernel/qclipboard_mac.cpp
index f3a971d..49a6cc8 100644
--- a/src/gui/kernel/qclipboard_mac.cpp
+++ b/src/gui/kernel/qclipboard_mac.cpp
@@ -388,6 +388,18 @@ QMacPasteboard::setMimeData(QMimeData *mime_src)
clear_helper();
QStringList formats = mime_src->formats();
+#ifdef QT_MAC_USE_COCOA
+ // QMimeData sub classes reimplementing the formats() might not expose the
+ // temporary "application/x-qt-mime-type-name" mimetype. So check the existence
+ // of this mime type while doing drag and drop.
+ QString dummyMimeType(QLatin1String("application/x-qt-mime-type-name"));
+ if (!formats.contains(dummyMimeType)) {
+ QByteArray dummyType = mime_src->data(dummyMimeType);
+ if (!dummyType.isEmpty()) {
+ formats.append(dummyMimeType);
+ }
+ }
+#endif
for(int f = 0; f < formats.size(); ++f) {
QString mimeType = formats.at(f);
for (QList<QMacPasteboardMime *>::Iterator it = availableConverters.begin(); it != availableConverters.end(); ++it) {
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index 70c78c8..873fb7e 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -786,6 +786,7 @@ extern "C" {
deltaZ = qBound(-120, int([theEvent deltaZ] * 10000), 120);
}
+#ifndef QT_NO_WHEELEVENT
if (deltaX != 0) {
QWheelEvent qwe(qlocal, qglobal, deltaX, buttons, keyMods, Qt::Horizontal);
qt_sendSpontaneousEvent(widgetToGetMouse, &qwe);
@@ -826,6 +827,8 @@ extern "C" {
wheelOK = qwe2.isAccepted();
}
}
+#endif //QT_NO_WHEELEVENT
+
if (!wheelOK) {
return [super scrollWheel:theEvent];
}
@@ -1362,7 +1365,7 @@ Qt::DropAction QDragManager::drag(QDrag *o)
// setup the data
QMacPasteboard dragBoard((CFStringRef) NSDragPboard, QMacPasteboardMime::MIME_DND);
- dragPrivate()->data->setData(QLatin1String("application/x-qt-mime-type-name"), QByteArray());
+ dragPrivate()->data->setData(QLatin1String("application/x-qt-mime-type-name"), QByteArray("dummy"));
dragBoard.setMimeData(dragPrivate()->data);
// create the image
diff --git a/src/gui/kernel/qkeymapper_x11.cpp b/src/gui/kernel/qkeymapper_x11.cpp
index 70574e7..4e6c847 100644
--- a/src/gui/kernel/qkeymapper_x11.cpp
+++ b/src/gui/kernel/qkeymapper_x11.cpp
@@ -360,6 +360,13 @@ QList<int> QKeyMapperPrivate::possibleKeysXKB(QKeyEvent *event)
if (code && code < 0xfffe)
code = QChar(code).toUpper().unicode();
+
+ if (code == Qt::Key_Tab && (baseModifiers & Qt::ShiftModifier)) {
+ // map shift+tab to shift+backtab
+ code = Qt::Key_Backtab;
+ text = QString();
+ }
+
if (code == baseCode)
continue;
@@ -448,6 +455,13 @@ QList<int> QKeyMapperPrivate::possibleKeysCore(QKeyEvent *event)
if (code && code < 0xfffe)
code = QChar(code).toUpper().unicode();
+
+ if (code == Qt::Key_Tab && (baseModifiers & Qt::ShiftModifier)) {
+ // map shift+tab to shift+backtab
+ code = Qt::Key_Backtab;
+ text = QString();
+ }
+
if (code == baseCode)
continue;
diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp
index af84a8f..8ac1e31 100644
--- a/src/gui/kernel/qsoftkeymanager_s60.cpp
+++ b/src/gui/kernel/qsoftkeymanager_s60.cpp
@@ -66,17 +66,18 @@ QSoftKeyManagerPrivateS60::QSoftKeyManagerPrivateS60()
cachedCbaIconSize[1] = QSize(0,0);
cachedCbaIconSize[2] = QSize(0,0);
cachedCbaIconSize[3] = QSize(0,0);
- skipNextUpdate = false;
}
bool QSoftKeyManagerPrivateS60::skipCbaUpdate()
{
- // lets not update softkeys if
+ // Lets not update softkeys if
// 1. We don't have application panes, i.e. cba
- // 2. S60 native dialog or menu is shown
- if (QApplication::testAttribute(Qt::AA_S60DontConstructApplicationPanes) ||
- CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog() || skipNextUpdate) {
- skipNextUpdate = false;
+ // 2. Our CBA is not active, i.e. S60 native dialog or menu with custom CBA is shown
+ // Note: Cannot use IsDisplayingMenuOrDialog since CBA update can be triggered before
+ // menu/dialog CBA is actually displayed i.e. it is being costructed.
+ CEikButtonGroupContainer *appUiCba = S60->buttonGroupContainer();
+ CEikButtonGroupContainer *currentCba = CEikButtonGroupContainer::Current();
+ if (QApplication::testAttribute(Qt::AA_S60DontConstructApplicationPanes) || appUiCba != currentCba) {
return true;
}
return false;
@@ -384,9 +385,6 @@ bool QSoftKeyManagerPrivateS60::handleCommand(int command)
}
qt_symbian_next_menu_from_action(actionContainer);
QT_TRAP_THROWING(S60->menuBar()->TryDisplayMenuBarL());
- // TODO: hack remove, it can happen that IsDisplayingMenuOrDialog return false
- // in updateSoftKeys_sys, and we will override menu CBA with our own
- skipNextUpdate = true;
} else {
Q_ASSERT(action->softKeyRole() != QAction::NoSoftKey);
QWidget *actionParent = action->parentWidget();
diff --git a/src/gui/kernel/qsoftkeymanager_s60_p.h b/src/gui/kernel/qsoftkeymanager_s60_p.h
index f8bd6d9..823a2db 100644
--- a/src/gui/kernel/qsoftkeymanager_s60_p.h
+++ b/src/gui/kernel/qsoftkeymanager_s60_p.h
@@ -98,7 +98,6 @@ private:
private:
QHash<int, QAction*> realSoftKeyActions;
QSize cachedCbaIconSize[4];
- bool skipNextUpdate;
};
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 2e951b6..d433048 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -192,6 +192,7 @@ QWidgetPrivate::QWidgetPrivate(int version)
, inDirtyList(0)
, isScrolled(0)
, isMoved(0)
+ , isGLWidget(0)
, usesDoubleBufferedGLContext(0)
#if defined(Q_WS_X11)
, picture(0)
@@ -200,7 +201,6 @@ QWidgetPrivate::QWidgetPrivate(int version)
, nativeGesturePanEnabled(0)
#elif defined(Q_WS_MAC)
, needWindowChange(0)
- , isGLWidget(0)
, window_event(0)
, qd_hd(0)
#endif
@@ -8277,7 +8277,7 @@ bool QWidget::event(QEvent *event)
}
#ifdef QT_SOFTKEYS_ENABLED
- if (isWindow() && isActiveWindow())
+ if (isWindow())
QSoftKeyManager::updateSoftKeys();
#endif
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index ff8f276..75b4c12 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -174,6 +174,8 @@ struct QTLWExtra {
#ifndef QT_NO_QWS_MANAGER
QWSManager *qwsManager;
#endif
+#elif defined(Q_OS_SYMBIAN)
+ uint inExpose : 1; // Prevents drawing recursion
#endif
};
@@ -230,7 +232,6 @@ struct QWExtra {
#endif
#elif defined(Q_OS_SYMBIAN) // <----------------------------------------------------- Symbian
uint activated : 1; // RWindowBase::Activated has been called
- uint inExpose : 1; // Prevents drawing recursion
/**
* Defines the behaviour of QSymbianControl::Draw.
@@ -685,6 +686,7 @@ public:
uint inDirtyList : 1;
uint isScrolled : 1;
uint isMoved : 1;
+ uint isGLWidget : 1;
uint usesDoubleBufferedGLContext : 1;
// *************************** Platform specific ************************************
@@ -716,7 +718,6 @@ public:
#elif defined(Q_WS_MAC) // <--------------------------------------------------------- MAC
// This is new stuff
uint needWindowChange : 1;
- uint isGLWidget : 1;
// Each wiget keeps a list of all its child and grandchild OpenGL widgets.
// This list is used to update the gl context whenever a parent and a granparent
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index a844430..ebd289c 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -878,6 +878,7 @@ void QWidgetPrivate::registerDropSite(bool /* on */)
void QWidgetPrivate::createTLSysExtra()
{
extra->topextra->backingStore = 0;
+ extra->topextra->inExpose = 0;
}
void QWidgetPrivate::deleteTLSysExtra()
@@ -891,7 +892,6 @@ void QWidgetPrivate::createSysExtra()
extra->activated = 0;
extra->nativePaintMode = QWExtra::Default;
extra->receiveNativePaintEvents = 0;
- extra->inExpose = 0;
}
void QWidgetPrivate::deleteSysExtra()
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 660a2a8..7a3da20 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -1267,32 +1267,28 @@ static const uint L2CacheLineLengthInInts = L2CacheLineLength/sizeof(uint);
result = 0
d = d * cia
*/
+#define comp_func_Clear_impl(dest, length, const_alpha)\
+{\
+ if (const_alpha == 255) {\
+ QT_MEMFILL_UINT(dest, length, 0);\
+ } else {\
+ int ialpha = 255 - const_alpha;\
+ PRELOAD_INIT(dest)\
+ for (int i = 0; i < length; ++i) {\
+ PRELOAD_COND(dest)\
+ dest[i] = BYTE_MUL(dest[i], ialpha);\
+ }\
+ }\
+}
+
static void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint, uint const_alpha)
{
- if (const_alpha == 255) {
- QT_MEMFILL_UINT(dest, length, 0);
- } else {
- int ialpha = 255 - const_alpha;
- PRELOAD_INIT(dest)
- for (int i = 0; i < length; ++i) {
- PRELOAD_COND(dest)
- dest[i] = BYTE_MUL(dest[i], ialpha);
- }
- }
+ comp_func_Clear_impl(dest, length, const_alpha);
}
static void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- QT_MEMFILL_UINT(dest, length, 0);
- } else {
- int ialpha = 255 - const_alpha;
- PRELOAD_INIT(dest)
- for (int i = 0; i < length; ++i) {
- PRELOAD_COND(dest)
- dest[i] = BYTE_MUL(dest[i], ialpha);
- }
- }
+ comp_func_Clear_impl(dest, length, const_alpha);
}
/*
diff --git a/src/gui/painting/qdrawhelper_mmx_p.h b/src/gui/painting/qdrawhelper_mmx_p.h
index 8482262..59b3804 100644
--- a/src/gui/painting/qdrawhelper_mmx_p.h
+++ b/src/gui/painting/qdrawhelper_mmx_p.h
@@ -146,36 +146,30 @@ struct QMMXCommonIntrinsics
result = 0
d = d * cia
*/
+#define comp_func_Clear_impl(dest, length, const_alpha)\
+{\
+ if (const_alpha == 255) {\
+ qt_memfill(static_cast<quint32*>(dest), quint32(0), length);\
+ } else {\
+ C_FF; C_80; C_00;\
+ m64 ia = MM::negate(MM::load_alpha(const_alpha));\
+ for (int i = 0; i < length; ++i) {\
+ dest[i] = MM::store(MM::byte_mul(MM::load(dest[i]), ia));\
+ }\
+ MM::end();\
+ }\
+}
+
template <class MM>
static void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint, uint const_alpha)
{
- if (!length)
- return;
-
- if (const_alpha == 255) {
- qt_memfill(static_cast<quint32*>(dest), quint32(0), length);
- } else {
- C_FF; C_80; C_00;
- m64 ia = MM::negate(MM::load_alpha(const_alpha));
- for (int i = 0; i < length; ++i) {
- dest[i] = MM::store(MM::byte_mul(MM::load(dest[i]), ia));
- }
- }
- MM::end();
+ comp_func_Clear_impl(dest, length, const_alpha);
}
template <class MM>
static void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- qt_memfill(static_cast<quint32*>(dest), quint32(0), length);
- } else {
- C_FF; C_80; C_00;
- m64 ia = MM::negate(MM::load_alpha(const_alpha));
- for (int i = 0; i < length; ++i)
- dest[i] = MM::store(MM::byte_mul(MM::load(dest[i]), ia));
- }
- MM::end();
+ comp_func_Clear_impl(dest, length, const_alpha);
}
/*
@@ -246,7 +240,10 @@ static void QT_FASTCALL comp_func_SourceOver(uint *dest, const uint *src, int le
C_FF; C_80; C_00;
if (const_alpha == 255) {
for (int i = 0; i < length; ++i) {
- if ((0xff000000 & src[i]) == 0xff000000) {
+ const uint alphaMaskedSource = 0xff000000 & src[i];
+ if (alphaMaskedSource == 0)
+ continue;
+ if (alphaMaskedSource == 0xff000000) {
dest[i] = src[i];
} else {
m64 s = MM::load(src[i]);
@@ -257,6 +254,8 @@ static void QT_FASTCALL comp_func_SourceOver(uint *dest, const uint *src, int le
} else {
m64 ca = MM::load_alpha(const_alpha);
for (int i = 0; i < length; ++i) {
+ if ((0xff000000 & src[i]) == 0)
+ continue;
m64 s = MM::byte_mul(MM::load(src[i]), ca);
m64 ia = MM::negate(MM::alpha(s));
dest[i] = MM::store(MM::add(s, MM::byte_mul(MM::load(dest[i]), ia)));
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index 6c47aac..cb0db4f 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -1549,6 +1549,9 @@ template<> inline void qt_memfill(quint8 *dest, quint8 color, int count)
template <class T>
inline void qt_memfill(T *dest, T value, int count)
{
+ if (!count)
+ return;
+
int n = (count + 7) / 8;
switch (count & 0x07)
{
diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp
index 147491e..da48fcb 100644
--- a/src/gui/painting/qpaintengine_x11.cpp
+++ b/src/gui/painting/qpaintengine_x11.cpp
@@ -1989,6 +1989,9 @@ void QX11PaintEngine::drawPixmap(const QRectF &r, const QPixmap &px, const QRect
}
XFillRectangle(d->dpy, d->hd, d->gc, x, y, sw, sh);
restore_clip = true;
+ } else if (mono_dst && !mono_src) {
+ QBitmap bitmap(pixmap);
+ XCopyArea(d->dpy, bitmap.handle(), d->hd, d->gc, sx, sy, sw, sh, x, y);
} else {
XCopyArea(d->dpy, pixmap.handle(), d->hd, d->gc, sx, sy, sw, sh, x, y);
}
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index bf12c6b..3bcaf8c 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -1986,12 +1986,25 @@ QPaintEngine *QPainter::paintEngine() const
endNativePainting().
Note that only the states the underlying paint engine changes will be reset
- to their respective default states. If, for example, the OpenGL polygon
- mode is changed by the user inside a beginNativePaint()/endNativePainting()
- block, it will not be reset to the default state by endNativePainting().
+ to their respective default states. The states we reset may change from
+ release to release. The following states are currently reset in the OpenGL
+ 2 engine:
- Here is an example that shows intermixing of painter commands
- and raw OpenGL commands:
+ \list
+ \i blending is disabled
+ \i the depth, stencil and scissor tests are disabled
+ \i the active texture unit is reset to 0
+ \i the depth mask, depth function and the clear depth are reset to their
+ default values
+ \i the stencil mask, stencil operation and stencil function are reset to
+ their default values
+ \i the current color is reset to solid white
+ \endlist
+
+ If, for example, the OpenGL polygon mode is changed by the user inside a
+ beginNativePaint()/endNativePainting() block, it will not be reset to the
+ default state by endNativePainting(). Here is an example that shows
+ intermixing of painter commands and raw OpenGL commands:
\snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 21
diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp
index b41dc2c..6cbf3d9 100644
--- a/src/gui/painting/qwindowsurface_s60.cpp
+++ b/src/gui/painting/qwindowsurface_s60.cpp
@@ -145,12 +145,15 @@ QImage* QS60WindowSurface::buffer(const QWidget *widget)
void QS60WindowSurface::flush(QWidget *widget, const QRegion &region, const QPoint &)
{
- QWExtra *extra = widget->d_func()->extraData();
- if (extra && !extra->inExpose) {
- extra->inExpose = true; // Prevent DrawNow() from calling syncBackingStore() again
+ QWidget *window = widget->window();
+ Q_ASSERT(window);
+ QTLWExtra *topExtra = window->d_func()->maybeTopData();
+ Q_ASSERT(topExtra);
+ if (!topExtra->inExpose) {
+ topExtra->inExpose = true; // Prevent DrawNow() from calling syncBackingStore() again
TRect tr = qt_QRect2TRect(region.boundingRect());
widget->winId()->DrawNow(tr);
- extra->inExpose = false;
+ topExtra->inExpose = false;
}
}
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index bbd35f1..dd9e69e 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -629,8 +629,9 @@ QFontEngineData::~QFontEngineData()
Returns the name of the font within the underlying window system.
- Only on X11 when Qt was built without FontConfig support the XLFD (X Logical Font Description)
- is returned; otherwise an empty string.
+ On X11, this function will return an empty string if Qt is built with
+ FontConfig support; otherwise the XLFD (X Logical Font Description) is
+ returned.
Using the return value of this function is usually \e not \e
portable.
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp
index 9dd4af7..3ea084b 100644
--- a/src/gui/text/qfontengine_s60.cpp
+++ b/src/gui/text/qfontengine_s60.cpp
@@ -44,7 +44,7 @@
#include "qglobal.h"
#include <private/qapplication_p.h>
#include "qimage.h"
-#include "qt_s60_p.h"
+#include <private/qt_s60_p.h>
#include <e32base.h>
#include <e32std.h>
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index 26c7c1e..af91603 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -1331,7 +1331,7 @@ void QTextLayout::drawCursor(QPainter *p, const QPointF &pos, int cursorPosition
QTextLine l(line, d);
const QScriptLine &sl = d->lines[line];
- const qreal x = position.x() + l.cursorToX(cursorPosition);
+ qreal x = position.x() + l.cursorToX(cursorPosition);
int itm = d->findItem(cursorPosition - 1);
QFixed base = sl.base();
@@ -1350,6 +1350,10 @@ void QTextLayout::drawCursor(QPainter *p, const QPointF &pos, int cursorPosition
&& (p->transform().type() > QTransform::TxTranslate);
if (toggleAntialiasing)
p->setRenderHint(QPainter::Antialiasing);
+#if defined(QT_MAC_USE_COCOA)
+ // Always draw the cursor aligned to pixel boundary.
+ x = qRound(x);
+#endif
p->fillRect(QRectF(x, y, qreal(width), (base + descent + 1).toReal()), p->pen().brush());
if (toggleAntialiasing)
p->setRenderHint(QPainter::Antialiasing, false);
diff --git a/src/gui/util/qsystemtrayicon_p.h b/src/gui/util/qsystemtrayicon_p.h
index b881f68..e8bf197 100644
--- a/src/gui/util/qsystemtrayicon_p.h
+++ b/src/gui/util/qsystemtrayicon_p.h
@@ -164,7 +164,9 @@ protected:
bool x11Event(XEvent *event);
void mousePressEvent(QMouseEvent *event);
void mouseDoubleClickEvent(QMouseEvent *event);
+#ifndef QT_NO_WHEELEVENT
void wheelEvent(QWheelEvent *event);
+#endif
bool event(QEvent *e);
private:
diff --git a/src/gui/util/qsystemtrayicon_x11.cpp b/src/gui/util/qsystemtrayicon_x11.cpp
index a645050..82b4325 100644
--- a/src/gui/util/qsystemtrayicon_x11.cpp
+++ b/src/gui/util/qsystemtrayicon_x11.cpp
@@ -308,10 +308,12 @@ void QSystemTrayIconSys::mouseDoubleClickEvent(QMouseEvent *ev)
emit q->activated(QSystemTrayIcon::DoubleClick);
}
+#ifndef QT_NO_WHEELEVENT
void QSystemTrayIconSys::wheelEvent(QWheelEvent *e)
{
QApplication::sendEvent(q, e);
}
+#endif
bool QSystemTrayIconSys::event(QEvent *e)
{
diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp
index 73c17db..4bd7b5a 100644
--- a/src/gui/widgets/qabstractslider.cpp
+++ b/src/gui/widgets/qabstractslider.cpp
@@ -705,7 +705,11 @@ bool QAbstractSliderPrivate::scrollByDelta(Qt::Orientation orientation, Qt::Keyb
// Calculate how many lines to scroll. Depending on what delta is (and
// offset), we might end up with a fraction (e.g. scroll 1.3 lines). We can
// only scroll whole lines, so we keep the reminder until next event.
- qreal stepsToScrollF = offset * QApplication::wheelScrollLines() * effectiveSingleStep();
+ qreal stepsToScrollF =
+#ifndef QT_NO_WHEELEVENT
+ QApplication::wheelScrollLines() *
+#endif
+ offset * effectiveSingleStep();
// Check if wheel changed direction since last event:
if (offset_accumulated != 0 && (offset / offset_accumulated) < 0)
offset_accumulated = 0;
diff --git a/src/gui/widgets/qabstractspinbox.h b/src/gui/widgets/qabstractspinbox.h
index 059943a..6c062c0 100644
--- a/src/gui/widgets/qabstractspinbox.h
+++ b/src/gui/widgets/qabstractspinbox.h
@@ -137,7 +137,9 @@ protected:
void resizeEvent(QResizeEvent *event);
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);
+#ifndef QT_NO_WHEELEVENT
void wheelEvent(QWheelEvent *event);
+#endif
void focusInEvent(QFocusEvent *event);
void focusOutEvent(QFocusEvent *event);
void contextMenuEvent(QContextMenuEvent *event);
diff --git a/src/gui/widgets/qcombobox.h b/src/gui/widgets/qcombobox.h
index f332d31..9b19a66 100644
--- a/src/gui/widgets/qcombobox.h
+++ b/src/gui/widgets/qcombobox.h
@@ -245,7 +245,9 @@ protected:
void mouseReleaseEvent(QMouseEvent *e);
void keyPressEvent(QKeyEvent *e);
void keyReleaseEvent(QKeyEvent *e);
+#ifndef QT_NO_WHEELEVENT
void wheelEvent(QWheelEvent *e);
+#endif
void contextMenuEvent(QContextMenuEvent *e);
void inputMethodEvent(QInputMethodEvent *);
QVariant inputMethodQuery(Qt::InputMethodQuery) const;
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index b0a64ea..db099e8 100644
--- a/src/gui/widgets/qlinecontrol.cpp
+++ b/src/gui/widgets/qlinecontrol.cpp
@@ -1371,6 +1371,8 @@ bool QLineControl::processEvent(QEvent* ev)
processInputMethodEvent(static_cast<QInputMethodEvent*>(ev)); break;
#ifndef QT_NO_SHORTCUT
case QEvent::ShortcutOverride:{
+ if (isReadOnly())
+ return false;
QKeyEvent* ke = static_cast<QKeyEvent*>(ev);
if (ke == QKeySequence::Copy
|| ke == QKeySequence::Paste
diff --git a/src/gui/widgets/qmenu.h b/src/gui/widgets/qmenu.h
index 28bd859..a040afa 100644
--- a/src/gui/widgets/qmenu.h
+++ b/src/gui/widgets/qmenu.h
@@ -162,7 +162,9 @@ protected:
void mouseReleaseEvent(QMouseEvent *);
void mousePressEvent(QMouseEvent *);
void mouseMoveEvent(QMouseEvent *);
+#ifndef QT_NO_WHEELEVENT
void wheelEvent(QWheelEvent *);
+#endif
void enterEvent(QEvent *);
void leaveEvent(QEvent *);
void hideEvent(QHideEvent *);
diff --git a/src/gui/widgets/qscrollbar.cpp b/src/gui/widgets/qscrollbar.cpp
index 3eed3a9..4eff260 100644
--- a/src/gui/widgets/qscrollbar.cpp
+++ b/src/gui/widgets/qscrollbar.cpp
@@ -521,6 +521,7 @@ bool QScrollBar::event(QEvent *event)
if (const QHoverEvent *he = static_cast<const QHoverEvent *>(event))
d_func()->updateHoverControl(he->pos());
break;
+#ifndef QT_NO_WHEELEVENT
case QEvent::Wheel: {
// override wheel event without adding virtual function override
QWheelEvent *ev = static_cast<QWheelEvent *>(event);
@@ -537,6 +538,7 @@ bool QScrollBar::event(QEvent *event)
event->accept();
return true;
}
+#endif
default:
break;
}
diff --git a/src/multimedia/video/qabstractvideobuffer.cpp b/src/multimedia/video/qabstractvideobuffer.cpp
index 22b36f2..465a1e7 100644
--- a/src/multimedia/video/qabstractvideobuffer.cpp
+++ b/src/multimedia/video/qabstractvideobuffer.cpp
@@ -48,7 +48,6 @@ QT_BEGIN_NAMESPACE
/*!
\class QAbstractVideoBuffer
\brief The QAbstractVideoBuffer class is an abstraction for video data.
- \preliminary
\since 4.6
The QVideoFrame class makes use of a QAbstractVideoBuffer internally to reference a buffer of
diff --git a/src/multimedia/video/qabstractvideosurface.cpp b/src/multimedia/video/qabstractvideosurface.cpp
index 3f6bc08..3dabb6b 100644
--- a/src/multimedia/video/qabstractvideosurface.cpp
+++ b/src/multimedia/video/qabstractvideosurface.cpp
@@ -46,7 +46,6 @@ QT_BEGIN_NAMESPACE
/*!
\class QAbstractVideoSurface
\brief The QAbstractVideoSurface class is a base class for video presentation surfaces.
- \preliminary
\since 4.6
The QAbstractVideoSurface class defines the standard interface that video producers use to
diff --git a/src/multimedia/video/qvideoframe.cpp b/src/multimedia/video/qvideoframe.cpp
index f10ce97..2d66d9e 100644
--- a/src/multimedia/video/qvideoframe.cpp
+++ b/src/multimedia/video/qvideoframe.cpp
@@ -102,7 +102,6 @@ private:
/*!
\class QVideoFrame
\brief The QVideoFrame class provides a representation of a frame of video data.
- \preliminary
\since 4.6
A QVideoFrame encapsulates the data of a video frame, and information about the frame.
diff --git a/src/multimedia/video/qvideosurfaceformat.cpp b/src/multimedia/video/qvideosurfaceformat.cpp
index 6b16e6a..1fc13a6 100644
--- a/src/multimedia/video/qvideosurfaceformat.cpp
+++ b/src/multimedia/video/qvideosurfaceformat.cpp
@@ -136,7 +136,6 @@ public:
\class QVideoSurfaceFormat
\brief The QVideoSurfaceFormat class specifies the stream format of a video presentation
surface.
- \preliminary
\since 4.6
A video surface presents a stream of video frames. The surface's format describes the type of
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 70a301d..b0e632a 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -286,7 +286,6 @@ void QHttpNetworkConnectionChannel::_q_receiveReply()
if (!socket->bytesAvailable()) {
if (reply && reply->d_func()->state == QHttpNetworkReplyPrivate::ReadingDataState) {
reply->d_func()->state = QHttpNetworkReplyPrivate::AllDoneState;
- this->state = QHttpNetworkConnectionChannel::IdleState;
allDone();
} else {
// try to reconnect/resend before sending an error.
@@ -305,9 +304,12 @@ void QHttpNetworkConnectionChannel::_q_receiveReply()
while (socket->bytesAvailable()) {
QHttpNetworkReplyPrivate::ReplyState state = reply ? reply->d_func()->state : QHttpNetworkReplyPrivate::AllDoneState;
switch (state) {
- case QHttpNetworkReplyPrivate::NothingDoneState:
- case QHttpNetworkReplyPrivate::ReadingStatusState: {
+ case QHttpNetworkReplyPrivate::NothingDoneState: {
+ // only eat whitespace on the first call
eatWhitespace();
+ state = reply->d_func()->state = QHttpNetworkReplyPrivate::ReadingStatusState;
+ }
+ case QHttpNetworkReplyPrivate::ReadingStatusState: {
qint64 statusBytes = reply->d_func()->readStatus(socket);
if (statusBytes == -1 && reconnectAttempts <= 0) {
// too many errors reading/receiving/parsing the status, close the socket and emit error
@@ -344,7 +346,6 @@ void QHttpNetworkConnectionChannel::_q_receiveReply()
emit reply->headerChanged();
if (!replyPrivate->expectContent()) {
replyPrivate->state = QHttpNetworkReplyPrivate::AllDoneState;
- this->state = QHttpNetworkConnectionChannel::IdleState;
allDone();
return;
}
@@ -421,7 +422,6 @@ void QHttpNetworkConnectionChannel::_q_receiveReply()
// everything done, fall through
}
case QHttpNetworkReplyPrivate::AllDoneState:
- this->state = QHttpNetworkConnectionChannel::IdleState;
allDone();
break;
default:
@@ -567,6 +567,9 @@ void QHttpNetworkConnectionChannel::allDone()
// in case of failures, each channel will attempt two reconnects before emitting error.
reconnectAttempts = 2;
+ // now the channel can be seen as free/idle again, all signal emissions for the reply have been done
+ this->state = QHttpNetworkConnectionChannel::IdleState;
+
detectPipeliningSupport();
// move next from pipeline to current request
@@ -607,19 +610,19 @@ void QHttpNetworkConnectionChannel::allDone()
void QHttpNetworkConnectionChannel::detectPipeliningSupport()
{
// detect HTTP Pipelining support
- QByteArray serverHeaderField = reply->headerField("Server");
+ QByteArray serverHeaderField;
if (
- // check for broken servers in server reply header
- // this is adapted from http://mxr.mozilla.org/firefox/ident?i=SupportsPipelining
- (!serverHeaderField.contains("Microsoft-IIS/4."))
- && (!serverHeaderField.contains("Microsoft-IIS/5."))
- && (!serverHeaderField.contains("Netscape-Enterprise/3."))
// check for HTTP/1.1
- && (reply->d_func()->majorVersion == 1 && reply->d_func()->minorVersion == 1)
+ (reply->d_func()->majorVersion == 1 && reply->d_func()->minorVersion == 1)
// check for not having connection close
&& (!reply->d_func()->isConnectionCloseEnabled())
// check if it is still connected
&& (socket->state() == QAbstractSocket::ConnectedState)
+ // check for broken servers in server reply header
+ // this is adapted from http://mxr.mozilla.org/firefox/ident?i=SupportsPipelining
+ && (serverHeaderField = reply->headerField("Server"), !serverHeaderField.contains("Microsoft-IIS/4."))
+ && (!serverHeaderField.contains("Microsoft-IIS/5."))
+ && (!serverHeaderField.contains("Netscape-Enterprise/3."))
) {
pipeliningSupported = QHttpNetworkConnectionChannel::PipeliningProbablySupported;
} else {
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index a5223d1..512c045 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -423,13 +423,26 @@ int QHttpNetworkReplyPrivate::gunzipBodyPartially(QByteArray &compressed, QByteA
qint64 QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket)
{
+ if (fragment.isEmpty()) {
+ // reserve bytes for the status line. This is better than always append() which reallocs the byte array
+ fragment.reserve(32);
+ }
+
qint64 bytes = 0;
char c;
+ qint64 haveRead = 0;
+
+ do {
+ haveRead = socket->read(&c, 1);
+ if (haveRead == -1)
+ return -1; // unexpected EOF
+ else if (haveRead == 0)
+ break; // read more later
+
+ bytes++;
- while (socket->bytesAvailable()) {
// allow both CRLF & LF (only) line endings
- if (socket->peek(&c, 1) == 1 && c == '\n') {
- bytes += socket->read(&c, 1); // read the "n"
+ if (c == '\n') {
// remove the CR at the end
if (fragment.endsWith('\r')) {
fragment.truncate(fragment.length()-1);
@@ -442,11 +455,6 @@ qint64 QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket)
}
break;
} else {
- c = 0;
- int haveRead = socket->read(&c, 1);
- if (haveRead == -1)
- return -1;
- bytes += haveRead;
fragment.append(c);
}
@@ -456,8 +464,7 @@ qint64 QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket)
fragment.clear();
return -1;
}
-
- }
+ } while (haveRead == 1);
return bytes;
}
@@ -500,20 +507,41 @@ bool QHttpNetworkReplyPrivate::parseStatus(const QByteArray &status)
qint64 QHttpNetworkReplyPrivate::readHeader(QAbstractSocket *socket)
{
+ if (fragment.isEmpty()) {
+ // according to http://dev.opera.com/articles/view/mama-http-headers/ the average size of the header
+ // block is 381 bytes.
+ // reserve bytes. This is better than always append() which reallocs the byte array.
+ fragment.reserve(512);
+ }
+
qint64 bytes = 0;
char c = 0;
bool allHeaders = false;
- while (!allHeaders && socket->bytesAvailable()) {
- if (socket->peek(&c, 1) == 1 && c == '\n') {
- // check for possible header endings. As per HTTP rfc,
- // the header endings will be marked by CRLFCRLF. But
- // we will allow CRLFLF, LFLF & CRLFCRLF
- if (fragment.endsWith("\n\r") || fragment.endsWith('\n'))
- allHeaders = true;
+ qint64 haveRead = 0;
+ do {
+ haveRead = socket->read(&c, 1);
+ if (haveRead == 0) {
+ // read more later
+ break;
+ } else if (haveRead == -1) {
+ // connection broke down
+ return -1;
+ } else {
+ fragment.append(c);
+ bytes++;
+
+ if (c == '\n') {
+ // check for possible header endings. As per HTTP rfc,
+ // the header endings will be marked by CRLFCRLF. But
+ // we will allow CRLFCRLF, CRLFLF, LFLF
+ if (fragment.endsWith("\r\n\r\n")
+ || fragment.endsWith("\r\n\n")
+ || fragment.endsWith("\n\n"))
+ allHeaders = true;
+ }
}
- bytes += socket->read(&c, 1);
- fragment.append(c);
- }
+ } while (!allHeaders && haveRead > 0);
+
// we received all headers now parse them
if (allHeaders) {
parseHeader(fragment);
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index e16aedc..0b32533 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -549,7 +549,7 @@ void QNetworkAccessManager::setCookieJar(QNetworkCookieJar *cookieJar)
/*!
Posts a request to obtain the network headers for \a request
- and returns a new QNetworkReply object which will contain such headers
+ and returns a new QNetworkReply object which will contain such headers.
The function is named after the HTTP request associated (HEAD).
*/
diff --git a/src/network/access/qnetworkcookie.h b/src/network/access/qnetworkcookie.h
index f34396f..3cc4cee 100644
--- a/src/network/access/qnetworkcookie.h
+++ b/src/network/access/qnetworkcookie.h
@@ -114,7 +114,7 @@ Q_NETWORK_EXPORT QDebug operator<<(QDebug, const QNetworkCookie &);
QT_END_NAMESPACE
// ### Qt5 remove this include
-#include "qnetworkcookiejar.h"
+#include <QtNetwork/QNetworkCookieJar>
Q_DECLARE_METATYPE(QNetworkCookie)
Q_DECLARE_METATYPE(QList<QNetworkCookie>)
diff --git a/src/network/access/qnetworkcookiejar.h b/src/network/access/qnetworkcookiejar.h
index 813bf3e..8086f38 100644
--- a/src/network/access/qnetworkcookiejar.h
+++ b/src/network/access/qnetworkcookiejar.h
@@ -46,7 +46,7 @@
#include <QtCore/QUrl>
// ### Qt5 remove this include
-#include "qnetworkcookie.h"
+#include <QtNetwork/QNetworkCookie>
QT_BEGIN_HEADER
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 3e5c4fc..cfcbbf8 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -99,6 +99,10 @@ QT_BEGIN_NAMESPACE
QGLExtensionFuncs QGLContextPrivate::qt_extensionFuncs;
#endif
+#ifdef Q_WS_X11
+extern const QX11Info *qt_x11Info(const QPaintDevice *pd);
+#endif
+
struct QGLThreadContext {
QGLContext *context;
};
@@ -2448,7 +2452,10 @@ QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target,
#if defined(Q_WS_X11)
// Try to use texture_from_pixmap
- if (pd->classId() == QPixmapData::X11Class && pd->pixelType() == QPixmapData::PixmapType) {
+ const QX11Info *xinfo = qt_x11Info(paintDevice);
+ if (pd->classId() == QPixmapData::X11Class && pd->pixelType() == QPixmapData::PixmapType
+ && xinfo && xinfo->screen() == pixmap.x11Info().screen())
+ {
texture = bindTextureFromNativePixmap(pd, key, options);
if (texture) {
texture->options |= QGLContext::MemoryManagedBindOption;
diff --git a/src/opengl/qgl_mac.mm b/src/opengl/qgl_mac.mm
index c01575b..4d7532e 100644
--- a/src/opengl/qgl_mac.mm
+++ b/src/opengl/qgl_mac.mm
@@ -951,8 +951,6 @@ void QGLWidgetPrivate::init(QGLContext *context, const QGLWidget *shareWidget)
break;
current = current->parentWidget();
}
-
- isGLWidget = 1;
}
bool QGLWidgetPrivate::renderCxPm(QPixmap*)
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 18fc9c2..efd2090 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -173,7 +173,9 @@ public:
#if defined(Q_WS_X11) && defined(QT_OPENGL_ES)
, eglSurfaceWindowId(0)
#endif
- {}
+ {
+ isGLWidget = 1;
+ }
~QGLWidgetPrivate() {}
diff --git a/src/opengl/qglpixelbuffer_x11.cpp b/src/opengl/qglpixelbuffer_x11.cpp
index 5b34cbb..32a42a2 100644
--- a/src/opengl/qglpixelbuffer_x11.cpp
+++ b/src/opengl/qglpixelbuffer_x11.cpp
@@ -181,7 +181,11 @@ bool QGLPixelBufferPrivate::init(const QSize &size, const QGLFormat &f, QGLWidge
qt_format_to_attrib_list(f, attribs);
- GLXFBConfig *configs = glXChooseFBConfig(X11->display, X11->defaultScreen, attribs, &num_configs);
+ int screen = X11->defaultScreen;
+ if (shareWidget)
+ screen = shareWidget->x11Info().screen();
+
+ GLXFBConfig *configs = glXChooseFBConfig(X11->display, screen, attribs, &num_configs);
if (configs && num_configs) {
int res;
glXGetFBConfigAttrib(X11->display, configs[0], GLX_LEVEL, &res);
diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp
index 37bb7c0..d5a11d9 100644
--- a/src/opengl/qglpixmapfilter.cpp
+++ b/src/opengl/qglpixmapfilter.cpp
@@ -394,6 +394,7 @@ void QGLBlurTextureCache::insertBlurTextureInfo(const QPixmap &pixmap, QGLBlurTe
static bool hookAdded = false;
if (!hookAdded) {
QImagePixmapCleanupHooks::instance()->addPixmapDataDestructionHook(pixmapDestroyed);
+ QImagePixmapCleanupHooks::instance()->addPixmapDataModificationHook(pixmapDestroyed);
hookAdded = true;
}
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index f27440e..ba50329 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -593,6 +593,17 @@ void QDirectFBPixmapData::invalidate()
imageFormat = QImage::Format_Invalid;
}
+#ifndef QT_DIRECTFB_PLUGIN
+Q_GUI_EXPORT IDirectFBSurface *qt_directfb_surface_for_pixmap(const QPixmap &pixmap)
+{
+ const QPixmapData *data = pixmap.pixmapData();
+ if (!data || data->classId() != QPixmapData::DirectFBClass)
+ return 0;
+ const QDirectFBPixmapData *dfbData = static_cast<const QDirectFBPixmapData*>(data);
+ return dfbData->directFBSurface();
+}
+#endif
+
QT_END_NAMESPACE
#endif // QT_NO_QWS_DIRECTFB
diff --git a/src/qt3support/dialogs/q3filedialog.cpp b/src/qt3support/dialogs/q3filedialog.cpp
index 9b8e4d3..35f7890 100644
--- a/src/qt3support/dialogs/q3filedialog.cpp
+++ b/src/qt3support/dialogs/q3filedialog.cpp
@@ -475,9 +475,17 @@ static int sortFilesBy = (int)QDir::Name;
static bool sortAscending = true;
static bool detailViewMode = false;
-static Q3CleanupHandler<QPixmap> qfd_cleanup_pixmap;
static Q3CleanupHandler<QString> qfd_cleanup_string;
+static void qt_cleanup_fd_pixmaps();
+typedef QList<QPixmap *> FDPixmaps;
+Q_GLOBAL_STATIC_WITH_INITIALIZER(FDPixmaps, qfd_pixmaps, qAddPostRoutine(qt_cleanup_fd_pixmaps))
+
+static void qt_cleanup_fd_pixmaps()
+{
+ qDeleteAll(*qfd_pixmaps());
+}
+
static QString toRootIfNotExists( const QString &path )
{
if ( !path.isEmpty() )
@@ -533,37 +541,37 @@ static void makeVariables() {
qfd_cleanup_string.add(&workingDirectory);
openFolderIcon = new QPixmap((const char **)open_xpm);
- qfd_cleanup_pixmap.add(&openFolderIcon);
+ qfd_pixmaps()->append(openFolderIcon);
symLinkDirIcon = new QPixmap((const char **)link_dir_xpm);
- qfd_cleanup_pixmap.add(&symLinkDirIcon);
+ qfd_pixmaps()->append(symLinkDirIcon);
symLinkFileIcon = new QPixmap((const char **)link_file_xpm);
- qfd_cleanup_pixmap.add(&symLinkFileIcon);
+ qfd_pixmaps()->append(symLinkFileIcon);
fileIcon = new QPixmap((const char **)file_xpm);
- qfd_cleanup_pixmap.add(&fileIcon);
+ qfd_pixmaps()->append(fileIcon);
closedFolderIcon = new QPixmap((const char **)closed_xpm);
- qfd_cleanup_pixmap.add(&closedFolderIcon);
+ qfd_pixmaps()->append(closedFolderIcon);
detailViewIcon = new QPixmap((const char **)detailedview_xpm);
- qfd_cleanup_pixmap.add(&detailViewIcon);
+ qfd_pixmaps()->append(detailViewIcon);
multiColumnListViewIcon = new QPixmap((const char **)mclistview_xpm);
- qfd_cleanup_pixmap.add(&multiColumnListViewIcon);
+ qfd_pixmaps()->append(multiColumnListViewIcon);
cdToParentIcon = new QPixmap((const char **)cdtoparent_xpm);
- qfd_cleanup_pixmap.add(&cdToParentIcon);
+ qfd_pixmaps()->append(cdToParentIcon);
newFolderIcon = new QPixmap((const char **)newfolder_xpm);
- qfd_cleanup_pixmap.add(&newFolderIcon);
+ qfd_pixmaps()->append(newFolderIcon);
previewInfoViewIcon
= new QPixmap((const char **)previewinfoview_xpm);
- qfd_cleanup_pixmap.add(&previewInfoViewIcon);
+ qfd_pixmaps()->append(previewInfoViewIcon);
previewContentsViewIcon
= new QPixmap((const char **)previewcontentsview_xpm);
- qfd_cleanup_pixmap.add(&previewContentsViewIcon);
+ qfd_pixmaps()->append(previewContentsViewIcon);
startCopyIcon = new QPixmap((const char **)start_xpm);
- qfd_cleanup_pixmap.add(&startCopyIcon);
+ qfd_pixmaps()->append(startCopyIcon);
endCopyIcon = new QPixmap((const char **)end_xpm);
- qfd_cleanup_pixmap.add(&endCopyIcon);
+ qfd_pixmaps()->append(endCopyIcon);
goBackIcon = new QPixmap((const char **)back_xpm);
- qfd_cleanup_pixmap.add(&goBackIcon);
+ qfd_pixmaps()->append(goBackIcon);
fifteenTransparentPixels = new QPixmap(closedFolderIcon->width(), 1);
- qfd_cleanup_pixmap.add(&fifteenTransparentPixels);
+ qfd_pixmaps()->append(fifteenTransparentPixels);
QBitmap m(fifteenTransparentPixels->width(), 1);
m.fill(Qt::color0);
fifteenTransparentPixels->setMask(m);
diff --git a/src/qt3support/itemviews/q3iconview.cpp b/src/qt3support/itemviews/q3iconview.cpp
index 67c956e..683e3d6 100644
--- a/src/qt3support/itemviews/q3iconview.cpp
+++ b/src/qt3support/itemviews/q3iconview.cpp
@@ -132,14 +132,21 @@ static QPixmap *qiv_selection = 0;
#endif
static bool optimize_layout = false;
-static Q3CleanupHandler<QPixmap> qiv_cleanup_pixmap;
+static void qt_cleanup_iv_pixmaps();
+typedef QList<QPixmap *> IVPixmaps;
+Q_GLOBAL_STATIC_WITH_INITIALIZER(IVPixmaps, qiv_pixmaps, qAddPostRoutine(qt_cleanup_iv_pixmaps))
+
+static void qt_cleanup_iv_pixmaps()
+{
+ qDeleteAll(*qiv_pixmaps());
+}
static QPixmap *get_qiv_buffer_pixmap(const QSize &s)
{
if (!qiv_buffer_pixmap) {
qiv_buffer_pixmap = new QPixmap(s);
- qiv_cleanup_pixmap.add(&qiv_buffer_pixmap);
+ qiv_pixmaps()->append(qiv_buffer_pixmap);
return qiv_buffer_pixmap;
}
@@ -2580,7 +2587,7 @@ Q3IconView::Q3IconView(QWidget *parent, const char *name, Qt::WindowFlags f)
{
if (!unknown_icon) {
unknown_icon = new QPixmap((const char **)unknown_xpm);
- qiv_cleanup_pixmap.add(&unknown_icon);
+ qiv_pixmaps()->append(unknown_icon);
}
d = new Q3IconViewPrivate;
diff --git a/src/qt3support/itemviews/q3listview.cpp b/src/qt3support/itemviews/q3listview.cpp
index 2c15ad0..12dad84 100644
--- a/src/qt3support/itemviews/q3listview.cpp
+++ b/src/qt3support/itemviews/q3listview.cpp
@@ -70,9 +70,6 @@ QT_BEGIN_NAMESPACE
const int Unsorted = 16383;
-static Q3CleanupHandler<QBitmap> qlv_cleanup_bitmap;
-
-
struct Q3ListViewPrivate
{
// classes that are here to avoid polluting the global name space
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index be7a6a0..4f30cb5 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -12548,4 +12548,57 @@ EXPORTS
?timerEvent@QS60Style@@MAEXPAVQTimerEvent@@@Z @ 12547 NONAME ; void QS60Style::timerEvent(class QTimerEvent *)
?updateAncestorFlags@QGraphicsItemPrivate@@QAEXXZ @ 12548 NONAME ; void QGraphicsItemPrivate::updateAncestorFlags(void)
?updateChildWithGraphicsEffectFlagRecursively@QGraphicsItemPrivate@@QAEXXZ @ 12549 NONAME ; void QGraphicsItemPrivate::updateChildWithGraphicsEffectFlagRecursively(void)
+ ?isOpacityNull@QGraphicsItemPrivate@@SA_NM@Z @ 12550 NONAME ; bool QGraphicsItemPrivate::isOpacityNull(float)
+ ?isOpacityNull@QGraphicsItemPrivate@@QBE_NXZ @ 12551 NONAME ; bool QGraphicsItemPrivate::isOpacityNull(void) const
+ ?api@QEglContext@@QBE?AW4API@QEgl@@XZ @ 12552 NONAME ABSENT ; enum QEgl::API QEglContext::api(void) const
+ ?chooseConfig@QEglContext@@QAE_NABVQEglProperties@@W4PixelFormatMatch@QEgl@@@Z @ 12553 NONAME ABSENT ; bool QEglContext::chooseConfig(class QEglProperties const &, enum QEgl::PixelFormatMatch)
+ ?destroySurface@QEglContext@@QAEXH@Z @ 12554 NONAME ABSENT ; void QEglContext::destroySurface(int)
+ ?lazyDoneCurrent@QEglContext@@QAE_NXZ @ 12555 NONAME ABSENT ; bool QEglContext::lazyDoneCurrent(void)
+ ?waitNative@QEglContext@@QAEXXZ @ 12556 NONAME ABSENT ; void QEglContext::waitNative(void)
+ ?context@QEglContext@@QBEHXZ @ 12557 NONAME ABSENT ; int QEglContext::context(void) const
+ ?configAttrib@QEglContext@@QBE_NHPAH@Z @ 12558 NONAME ABSENT ; bool QEglContext::configAttrib(int, int *) const
+ ??0QEglProperties@@QAE@ABV0@@Z @ 12559 NONAME ABSENT ; QEglProperties::QEglProperties(class QEglProperties const &)
+ ?config@QEglContext@@QBEHXZ @ 12560 NONAME ABSENT ; int QEglContext::config(void) const
+ ?openDisplay@QEglContext@@QAE_NPAVQPaintDevice@@@Z @ 12561 NONAME ABSENT ; bool QEglContext::openDisplay(class QPaintDevice *)
+ ?error@QEglContext@@SAHXZ @ 12562 NONAME ABSENT ; int QEglContext::error(void)
+ ?swapBuffers@QEglContext@@QAE_NH@Z @ 12563 NONAME ABSENT ; bool QEglContext::swapBuffers(int)
+ ?setApi@QEglContext@@QAEXW4API@QEgl@@@Z @ 12564 NONAME ABSENT ; void QEglContext::setApi(enum QEgl::API)
+ ?makeCurrent@QEglContext@@QAE_NH@Z @ 12565 NONAME ABSENT ; bool QEglContext::makeCurrent(int)
+ ?createSurface@QEglContext@@QAEHPAVQPaintDevice@@PBVQEglProperties@@@Z @ 12566 NONAME ABSENT ; int QEglContext::createSurface(class QPaintDevice *, class QEglProperties const *)
+ ?dumpAllConfigs@QEglContext@@QAEXXZ @ 12567 NONAME ABSENT ; void QEglContext::dumpAllConfigs(void)
+ ?reduceConfiguration@QEglProperties@@QAE_NXZ @ 12568 NONAME ABSENT ; bool QEglProperties::reduceConfiguration(void)
+ ?removeValue@QEglProperties@@QAE_NH@Z @ 12569 NONAME ABSENT ; bool QEglProperties::removeValue(int)
+ ?toString@QEglProperties@@QBE?AVQString@@XZ @ 12570 NONAME ABSENT ; class QString QEglProperties::toString(void) const
+ ?dumpAllConfigs@QEglProperties@@SAXXZ @ 12571 NONAME ABSENT ; void QEglProperties::dumpAllConfigs(void)
+ ?defaultDisplay@QEglContext@@SAHPAVQPaintDevice@@@Z @ 12572 NONAME ABSENT ; int QEglContext::defaultDisplay(class QPaintDevice *)
+ ?configProperties@QEglContext@@QBE?AVQEglProperties@@H@Z @ 12573 NONAME ABSENT ; class QEglProperties QEglContext::configProperties(int) const
+ ?properties@QEglProperties@@QBEPBHXZ @ 12574 NONAME ABSENT ; int const * QEglProperties::properties(void) const
+ ??0QEglContext@@QAE@XZ @ 12575 NONAME ABSENT ; QEglContext::QEglContext(void)
+ ??1QEglContext@@QAE@XZ @ 12576 NONAME ABSENT ; QEglContext::~QEglContext(void)
+ ?isValid@QEglContext@@QBE_NXZ @ 12577 NONAME ABSENT ; bool QEglContext::isValid(void) const
+ ?value@QEglProperties@@QBEHH@Z @ 12578 NONAME ABSENT ; int QEglProperties::value(int) const
+ ?clearError@QEglContext@@SAXXZ @ 12579 NONAME ABSENT ; void QEglContext::clearError(void)
+ ??0QEglProperties@@QAE@H@Z @ 12580 NONAME ABSENT ; QEglProperties::QEglProperties(int)
+ ?setValue@QEglProperties@@QAEXHH@Z @ 12581 NONAME ABSENT ; void QEglProperties::setValue(int, int)
+ ?setPaintDeviceFormat@QEglProperties@@QAEXPAVQPaintDevice@@@Z @ 12582 NONAME ABSENT ; void QEglProperties::setPaintDeviceFormat(class QPaintDevice *)
+ ?destroy@QEglContext@@QAEXXZ @ 12583 NONAME ABSENT ; void QEglContext::destroy(void)
+ ?setRenderableType@QEglProperties@@QAEXW4API@QEgl@@@Z @ 12584 NONAME ABSENT ; void QEglProperties::setRenderableType(enum QEgl::API)
+ ?setContext@QEglContext@@QAEXH@Z @ 12585 NONAME ABSENT ; void QEglContext::setContext(int)
+ ?waitClient@QEglContext@@QAEXXZ @ 12586 NONAME ABSENT ; void QEglContext::waitClient(void)
+ ?isEmpty@QEglProperties@@QBE_NXZ @ 12587 NONAME ABSENT ; bool QEglProperties::isEmpty(void) const
+ ?getDisplay@QEglContext@@CAHPAVQPaintDevice@@@Z @ 12588 NONAME ABSENT ; int QEglContext::getDisplay(class QPaintDevice *)
+ ?isSharing@QEglContext@@QBE_NXZ @ 12589 NONAME ABSENT ; bool QEglContext::isSharing(void) const
+ ?isCurrent@QEglContext@@QBE_NXZ @ 12590 NONAME ABSENT ; bool QEglContext::isCurrent(void) const
+ ??0QEglProperties@@QAE@XZ @ 12591 NONAME ABSENT ; QEglProperties::QEglProperties(void)
+ ?extensions@QEglContext@@SA?AVQString@@XZ @ 12592 NONAME ABSENT ; class QString QEglContext::extensions(void)
+ ?setCurrentContext@QEglContext@@CAXW4API@QEgl@@PAV1@@Z @ 12593 NONAME ABSENT ; void QEglContext::setCurrentContext(enum QEgl::API, class QEglContext *)
+ ??1QEglProperties@@QAE@XZ @ 12594 NONAME ABSENT ; QEglProperties::~QEglProperties(void)
+ ?createContext@QEglContext@@QAE_NPAV1@PBVQEglProperties@@@Z @ 12595 NONAME ABSENT ; bool QEglContext::createContext(class QEglContext *, class QEglProperties const *)
+ ?setConfig@QEglContext@@QAEXH@Z @ 12596 NONAME ABSENT ; void QEglContext::setConfig(int)
+ ?hasExtension@QEglContext@@SA_NPBD@Z @ 12597 NONAME ABSENT ; bool QEglContext::hasExtension(char const *)
+ ?doneCurrent@QEglContext@@QAE_NXZ @ 12598 NONAME ABSENT ; bool QEglContext::doneCurrent(void)
+ ?display@QEglContext@@QBEHXZ @ 12599 NONAME ABSENT ; int QEglContext::display(void) const
+ ?setPixelFormat@QEglProperties@@QAEXW4Format@QImage@@@Z @ 12600 NONAME ABSENT ; void QEglProperties::setPixelFormat(enum QImage::Format)
+ ?currentContext@QEglContext@@CAPAV1@W4API@QEgl@@@Z @ 12601 NONAME ABSENT ; class QEglContext * QEglContext::currentContext(enum QEgl::API)
+ ?errorString@QEglContext@@SA?AVQString@@H@Z @ 12602 NONAME ABSENT ; class QString QEglContext::errorString(int)
diff --git a/src/s60installs/bwins/QtOpenVGu.def b/src/s60installs/bwins/QtOpenVGu.def
index 88e724f..26ee862 100644
--- a/src/s60installs/bwins/QtOpenVGu.def
+++ b/src/s60installs/bwins/QtOpenVGu.def
@@ -48,7 +48,7 @@ EXPORTS
?paintEngine@QVGWindowSurface@@UBEPAVQPaintEngine@@XZ @ 47 NONAME ; class QPaintEngine * QVGWindowSurface::paintEngine(void) const
??0QVGPainterState@@QAE@XZ @ 48 NONAME ; QVGPainterState::QVGPainterState(void)
?d_func@QVGPaintEngine@@ABEPBVQVGPaintEnginePrivate@@XZ @ 49 NONAME ; class QVGPaintEnginePrivate const * QVGPaintEngine::d_func(void) const
- ?qt_vg_create_context@@YAPAVQEglContext@@PAVQPaintDevice@@@Z @ 50 NONAME ; class QEglContext * qt_vg_create_context(class QPaintDevice *)
+ ?qt_vg_create_context@@YAPAVQEglContext@@PAVQPaintDevice@@@Z @ 50 NONAME ABSENT ; class QEglContext * qt_vg_create_context(class QPaintDevice *)
?clip@QVGPaintEngine@@UAEXABVQRegion@@W4ClipOperation@Qt@@@Z @ 51 NONAME ; void QVGPaintEngine::clip(class QRegion const &, enum Qt::ClipOperation)
?endNativePainting@QVGPaintEngine@@UAEXXZ @ 52 NONAME ; void QVGPaintEngine::endNativePainting(void)
?brushChanged@QVGPaintEngine@@UAEXXZ @ 53 NONAME ; void QVGPaintEngine::brushChanged(void)
@@ -78,7 +78,7 @@ EXPORTS
?beginPaint@QVGEGLWindowSurfaceVGImage@@UAEXPAVQWidget@@@Z @ 77 NONAME ; void QVGEGLWindowSurfaceVGImage::beginPaint(class QWidget *)
?createState@QVGPaintEngine@@UBEPAVQPainterState@@PAV2@@Z @ 78 NONAME ; class QPainterState * QVGPaintEngine::createState(class QPainterState *) const
?buffer@QVGPixmapData@@UAEPAVQImage@@XZ @ 79 NONAME ; class QImage * QVGPixmapData::buffer(void)
- ?qt_vg_destroy_context@@YAXPAVQEglContext@@@Z @ 80 NONAME ; void qt_vg_destroy_context(class QEglContext *)
+ ?qt_vg_destroy_context@@YAXPAVQEglContext@@@Z @ 80 NONAME ABSENT ; void qt_vg_destroy_context(class QEglContext *)
?clip@QVGPaintEngine@@UAEXABVQVectorPath@@W4ClipOperation@Qt@@@Z @ 81 NONAME ; void QVGPaintEngine::clip(class QVectorPath const &, enum Qt::ClipOperation)
?drawPolygon@QVGPaintEngine@@UAEXPBVQPoint@@HW4PolygonDrawMode@QPaintEngine@@@Z @ 82 NONAME ; void QVGPaintEngine::drawPolygon(class QPoint const *, int, enum QPaintEngine::PolygonDrawMode)
?fromImage@QVGPixmapData@@UAEXABVQImage@@V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 83 NONAME ; void QVGPixmapData::fromImage(class QImage const &, class QFlags<enum Qt::ImageConversionFlag>)
@@ -139,4 +139,29 @@ EXPORTS
??_EQVGPaintEngine@@UAE@I@Z @ 138 NONAME ; QVGPaintEngine::~QVGPaintEngine(unsigned int)
?clip@QVGPaintEngine@@UAEXABVQPainterPath@@W4ClipOperation@Qt@@@Z @ 139 NONAME ; void QVGPaintEngine::clip(class QPainterPath const &, enum Qt::ClipOperation)
?vgPrivate@QVGPaintEngine@@QAEPAVQVGPaintEnginePrivate@@XZ @ 140 NONAME ; class QVGPaintEnginePrivate * QVGPaintEngine::vgPrivate(void)
+ ?removeFromLRU@QVGImagePool@@IAEXPAVQVGPixmapData@@@Z @ 141 NONAME ; void QVGImagePool::removeFromLRU(class QVGPixmapData *)
+ ?releaseImage@QVGImagePool@@UAEXPAVQVGPixmapData@@K@Z @ 142 NONAME ; void QVGImagePool::releaseImage(class QVGPixmapData *, unsigned long)
+ ?d_func@QVGImagePool@@AAEPAVQVGImagePoolPrivate@@XZ @ 143 NONAME ; class QVGImagePoolPrivate * QVGImagePool::d_func(void)
+ ?detachImageFromPool@QVGPixmapData@@UAEXXZ @ 144 NONAME ; void QVGPixmapData::detachImageFromPool(void)
+ ?createImageForPixmap@QVGImagePool@@UAEKW4VGImageFormat@@JJKPAVQVGPixmapData@@@Z @ 145 NONAME ; unsigned long QVGImagePool::createImageForPixmap(enum VGImageFormat, long, long, unsigned long, class QVGPixmapData *)
+ ?destroyImageAndContext@QVGPixmapData@@IAEXXZ @ 146 NONAME ; void QVGPixmapData::destroyImageAndContext(void)
+ ?moveToHeadOfLRU@QVGImagePool@@IAEXPAVQVGPixmapData@@@Z @ 147 NONAME ; void QVGImagePool::moveToHeadOfLRU(class QVGPixmapData *)
+ ?instance@QVGImagePool@@SAPAV1@XZ @ 148 NONAME ; class QVGImagePool * QVGImagePool::instance(void)
+ ?useImage@QVGImagePool@@UAEXPAVQVGPixmapData@@@Z @ 149 NONAME ; void QVGImagePool::useImage(class QVGPixmapData *)
+ ??1QVGImagePool@@UAE@XZ @ 150 NONAME ; QVGImagePool::~QVGImagePool(void)
+ ?destroyImages@QVGPixmapData@@IAEXXZ @ 151 NONAME ; void QVGPixmapData::destroyImages(void)
+ ?reclaimSpace@QVGImagePool@@UAE_NW4VGImageFormat@@JJPAVQVGPixmapData@@@Z @ 152 NONAME ; bool QVGImagePool::reclaimSpace(enum VGImageFormat, long, long, class QVGPixmapData *)
+ ?detachImage@QVGImagePool@@UAEXPAVQVGPixmapData@@@Z @ 153 NONAME ; void QVGImagePool::detachImage(class QVGPixmapData *)
+ ?createPermanentImage@QVGImagePool@@UAEKW4VGImageFormat@@JJK@Z @ 154 NONAME ; unsigned long QVGImagePool::createPermanentImage(enum VGImageFormat, long, long, unsigned long)
+ ?d_func@QVGImagePool@@ABEPBVQVGImagePoolPrivate@@XZ @ 155 NONAME ; class QVGImagePoolPrivate const * QVGImagePool::d_func(void) const
+ ?createTemporaryImage@QVGImagePool@@UAEKW4VGImageFormat@@JJKPAVQVGPixmapData@@@Z @ 156 NONAME ; unsigned long QVGImagePool::createTemporaryImage(enum VGImageFormat, long, long, unsigned long, class QVGPixmapData *)
+ ??_EQVGImagePool@@UAE@I@Z @ 157 NONAME ; QVGImagePool::~QVGImagePool(unsigned int)
+ ?hibernate@QVGImagePool@@UAEXXZ @ 158 NONAME ; void QVGImagePool::hibernate(void)
+ ?qt_vg_destroy_context@@YAXPAVQEglContext@@H@Z @ 159 NONAME ; void qt_vg_destroy_context(class QEglContext *, int)
+ ??0QVGImagePool@@QAE@XZ @ 160 NONAME ; QVGImagePool::QVGImagePool(void)
+ ?setImagePool@QVGImagePool@@SAXPAV1@@Z @ 161 NONAME ; void QVGImagePool::setImagePool(class QVGImagePool *)
+ ?pixmapLRU@QVGImagePool@@IAEPAVQVGPixmapData@@XZ @ 162 NONAME ; class QVGPixmapData * QVGImagePool::pixmapLRU(void)
+ ?qt_vg_create_context@@YAPAVQEglContext@@PAVQPaintDevice@@H@Z @ 163 NONAME ; class QEglContext * qt_vg_create_context(class QPaintDevice *, int)
+ ?reclaimImages@QVGPixmapData@@UAEXXZ @ 164 NONAME ; void QVGPixmapData::reclaimImages(void)
+ ?hibernate@QVGPixmapData@@UAEXXZ @ 165 NONAME ; void QVGPixmapData::hibernate(void)
diff --git a/src/s60installs/eabi/QtOpenVGu.def b/src/s60installs/eabi/QtOpenVGu.def
index 7526632..eb4caef 100644
--- a/src/s60installs/eabi/QtOpenVGu.def
+++ b/src/s60installs/eabi/QtOpenVGu.def
@@ -173,4 +173,27 @@ EXPORTS
_Z21qt_vg_destroy_contextP11QEglContexti @ 172 NONAME
_ZN13QVGPixmapData22destroyImageAndContextEv @ 173 NONAME
_ZN13QVGPixmapData9hibernateEv @ 174 NONAME
+ _ZN12QVGImagePool11detachImageEP13QVGPixmapData @ 175 NONAME
+ _ZN12QVGImagePool12reclaimSpaceE13VGImageFormatllP13QVGPixmapData @ 176 NONAME
+ _ZN12QVGImagePool12releaseImageEP13QVGPixmapDatam @ 177 NONAME
+ _ZN12QVGImagePool12setImagePoolEPS_ @ 178 NONAME
+ _ZN12QVGImagePool13removeFromLRUEP13QVGPixmapData @ 179 NONAME
+ _ZN12QVGImagePool15moveToHeadOfLRUEP13QVGPixmapData @ 180 NONAME
+ _ZN12QVGImagePool20createImageForPixmapE13VGImageFormatllmP13QVGPixmapData @ 181 NONAME
+ _ZN12QVGImagePool20createPermanentImageE13VGImageFormatllm @ 182 NONAME
+ _ZN12QVGImagePool20createTemporaryImageE13VGImageFormatllmP13QVGPixmapData @ 183 NONAME
+ _ZN12QVGImagePool8instanceEv @ 184 NONAME
+ _ZN12QVGImagePool8useImageEP13QVGPixmapData @ 185 NONAME
+ _ZN12QVGImagePool9hibernateEv @ 186 NONAME
+ _ZN12QVGImagePool9pixmapLRUEv @ 187 NONAME
+ _ZN12QVGImagePoolC1Ev @ 188 NONAME
+ _ZN12QVGImagePoolC2Ev @ 189 NONAME
+ _ZN12QVGImagePoolD0Ev @ 190 NONAME
+ _ZN12QVGImagePoolD1Ev @ 191 NONAME
+ _ZN12QVGImagePoolD2Ev @ 192 NONAME
+ _ZN13QVGPixmapData13destroyImagesEv @ 193 NONAME
+ _ZN13QVGPixmapData13reclaimImagesEv @ 194 NONAME
+ _ZN13QVGPixmapData19detachImageFromPoolEv @ 195 NONAME
+ _ZTI12QVGImagePool @ 196 NONAME
+ _ZTV12QVGImagePool @ 197 NONAME
diff --git a/src/s60installs/qt.iby b/src/s60installs/qt.iby
index bdd668c..a6a96ec 100644
--- a/src/s60installs/qt.iby
+++ b/src/s60installs/qt.iby
@@ -113,6 +113,7 @@ data=\epoc32\data\z\resource\qt\plugins\phonon_backend\phonon_mmf.qtplugin resou
data=\epoc32\data\z\resource\qt\plugins\graphicssystems\qvggraphicssystem.qtplugin resource\qt\plugins\graphicssystems\qvggraphicssystem.qtplugin
// Stub sis file
-data=ZSYSTEM\install\qt.sis System\Install\qt.sis
+data=ZSYSTEM\install\qt_stub.sis System\Install\qt_stub.sis
+data=ZSYSTEM\install\qtwebkit_stub.sis System\Install\qtwebkit_stub.sis
#endif // __QT_IBY__
diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp
index 9fff552..d3be304 100644
--- a/src/sql/drivers/sqlite/qsql_sqlite.cpp
+++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp
@@ -500,32 +500,6 @@ bool QSQLiteDriver::hasFeature(DriverFeature f) const
return false;
}
-static int qGetSqliteTimeout(QString opts)
-{
- enum { DefaultTimeout = 5000 };
-
- opts.remove(QLatin1Char(' '));
- foreach(QString option, opts.split(QLatin1Char(';'))) {
- if (option.startsWith(QLatin1String("QSQLITE_BUSY_TIMEOUT="))) {
- bool ok;
- int nt = option.mid(21).toInt(&ok);
- if (ok)
- return nt;
- }
- }
- return DefaultTimeout;
-}
-
-static int qGetSqliteOpenMode(QString opts)
-{
- opts.remove(QLatin1Char(' '));
- foreach(QString option, opts.split(QLatin1Char(';'))) {
- if (option == QLatin1String("QSQLITE_OPEN_READONLY"))
- return SQLITE_OPEN_READONLY;
- }
- return SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
-}
-
/*
SQLite dbs have no user name, passwords, hosts or ports.
just file names.
@@ -537,9 +511,26 @@ bool QSQLiteDriver::open(const QString & db, const QString &, const QString &, c
if (db.isEmpty())
return false;
+ bool sharedCache = false;
+ int openMode = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, timeOut=5000;
+ QStringList opts=QString(conOpts).remove(QLatin1Char(' ')).split(QLatin1Char(';'));
+ foreach(const QString &option, opts) {
+ if (option.startsWith(QLatin1String("QSQLITE_BUSY_TIMEOUT="))) {
+ bool ok;
+ int nt = option.mid(21).toInt(&ok);
+ if (ok)
+ timeOut = nt;
+ }
+ if (option == QLatin1String("QSQLITE_OPEN_READONLY"))
+ openMode = SQLITE_OPEN_READONLY;
+ if (option == QLatin1String("QSQLITE_ENABLE_SHARED_CACHE"))
+ sharedCache = true;
+ }
+
+ sqlite3_enable_shared_cache(sharedCache);
- if (sqlite3_open_v2(db.toUtf8().constData(), &d->access, qGetSqliteOpenMode(conOpts), NULL) == SQLITE_OK) {
- sqlite3_busy_timeout(d->access, qGetSqliteTimeout(conOpts));
+ if (sqlite3_open_v2(db.toUtf8().constData(), &d->access, openMode, NULL) == SQLITE_OK) {
+ sqlite3_busy_timeout(d->access, timeOut);
setOpen(true);
setOpenError(false);
return true;
diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp
index 031261d..1416ee3 100644
--- a/src/sql/kernel/qsqldatabase.cpp
+++ b/src/sql/kernel/qsqldatabase.cpp
@@ -1267,6 +1267,7 @@ QSqlRecord QSqlDatabase::record(const QString& tablename) const
\list
\i QSQLITE_BUSY_TIMEOUT
\i QSQLITE_OPEN_READONLY
+ \i QSQLITE_ENABLE_SHARED_CACHE
\endlist
\i
diff --git a/src/xmlpatterns/data/qatomicvalue.cpp b/src/xmlpatterns/data/qatomicvalue.cpp
index 6858e27..c4f3578 100644
--- a/src/xmlpatterns/data/qatomicvalue.cpp
+++ b/src/xmlpatterns/data/qatomicvalue.cpp
@@ -226,6 +226,8 @@ ItemType::Ptr AtomicValue::qtToXDMType(const QXmlItem &item)
/* Fallthrough. */
case QVariant::Time:
return BuiltinTypes::xsDateTime;
+ case QMetaType::Float:
+ return BuiltinTypes::xsFloat;
case QVariant::Double:
return BuiltinTypes::xsDouble;
default:
diff --git a/src/xmlpatterns/schema/qxsdschemaparser.cpp b/src/xmlpatterns/schema/qxsdschemaparser.cpp
index 6d878e8..6ed28af 100644
--- a/src/xmlpatterns/schema/qxsdschemaparser.cpp
+++ b/src/xmlpatterns/schema/qxsdschemaparser.cpp
@@ -4832,7 +4832,7 @@ XsdTerm::Ptr XsdSchemaParser::parseLocalElement(const XsdParticle::Ptr &particle
if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
const XsdAnnotation::Ptr annotation = parseAnnotation();
- element->addAnnotation(annotation);
+ term->addAnnotation(annotation);
} else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) {
if (hasRefAttribute) {
error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute.")
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro
index 8773026..c0e807e 100644
--- a/tests/auto/declarative/declarative.pro
+++ b/tests/auto/declarative/declarative.pro
@@ -35,7 +35,6 @@ SUBDIRS += \
qmlgraphicstext \ # Cover
qmlgraphicstextedit \ # Cover
qmlgraphicstextinput \ # Cover
- qmlgraphicswebview \ # Cover
qmlinfo \ # Cover
qmlinstruction \ # Cover
qmllanguage \ # Cover
@@ -59,6 +58,10 @@ SUBDIRS += \
qmlxmlhttprequest \ # Cover
sql # Cover
+contains(QT_CONFIG, webkit) {
+ SUBDIRS += \
+ qmlgraphicswebview # Cover
+}
# Tests which should run in Pulse
PULSE_TESTS = $$SUBDIRS
diff --git a/tests/auto/declarative/qmldebug/tst_qmldebug.cpp b/tests/auto/declarative/qmldebug/tst_qmldebug.cpp
index 82e74ce..a51fd29 100644
--- a/tests/auto/declarative/qmldebug/tst_qmldebug.cpp
+++ b/tests/auto/declarative/qmldebug/tst_qmldebug.cpp
@@ -288,10 +288,11 @@ void tst_QmlDebug::watch_property()
QmlDebugPropertyWatch *watch;
- QmlEngineDebug unconnected(0);
- watch = unconnected.addWatch(prop, this);
+ QmlEngineDebug *unconnected = new QmlEngineDebug(0);
+ watch = unconnected->addWatch(prop, this);
QCOMPARE(watch->state(), QmlDebugWatch::Dead);
delete watch;
+ delete unconnected;
watch = m_dbg->addWatch(QmlDebugPropertyReference(), this);
QVERIFY(QmlDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QmlDebugWatch::State))));
@@ -346,10 +347,11 @@ void tst_QmlDebug::watch_object()
QmlDebugWatch *watch;
- QmlEngineDebug unconnected(0);
- watch = unconnected.addWatch(obj, this);
+ QmlEngineDebug *unconnected = new QmlEngineDebug(0);
+ watch = unconnected->addWatch(obj, this);
QCOMPARE(watch->state(), QmlDebugWatch::Dead);
delete watch;
+ delete unconnected;
watch = m_dbg->addWatch(QmlDebugObjectReference(), this);
QVERIFY(QmlDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QmlDebugWatch::State))));
@@ -409,10 +411,11 @@ void tst_QmlDebug::watch_expression()
QmlDebugObjectExpressionWatch *watch;
- QmlEngineDebug unconnected(0);
- watch = unconnected.addWatch(obj, expr, this);
+ QmlEngineDebug *unconnected = new QmlEngineDebug(0);
+ watch = unconnected->addWatch(obj, expr, this);
QCOMPARE(watch->state(), QmlDebugWatch::Dead);
delete watch;
+ delete unconnected;
watch = m_dbg->addWatch(QmlDebugObjectReference(), expr, this);
QVERIFY(QmlDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QmlDebugWatch::State))));
@@ -487,10 +490,11 @@ void tst_QmlDebug::queryAvailableEngines()
{
QmlDebugEnginesQuery *q_engines;
- QmlEngineDebug unconnected(0);
- q_engines = unconnected.queryAvailableEngines(0);
+ QmlEngineDebug *unconnected = new QmlEngineDebug(0);
+ q_engines = unconnected->queryAvailableEngines(0);
QCOMPARE(q_engines->state(), QmlDebugQuery::Error);
delete q_engines;
+ delete unconnected;
q_engines = m_dbg->queryAvailableEngines(this);
delete q_engines;
@@ -519,10 +523,11 @@ void tst_QmlDebug::queryRootContexts()
QmlDebugRootContextQuery *q_context;
- QmlEngineDebug unconnected(0);
- q_context = unconnected.queryRootContexts(engineId, this);
+ QmlEngineDebug *unconnected = new QmlEngineDebug(0);
+ q_context = unconnected->queryRootContexts(engineId, this);
QCOMPARE(q_context->state(), QmlDebugQuery::Error);
delete q_context;
+ delete unconnected;
q_context = m_dbg->queryRootContexts(engineId, this);
delete q_context;
@@ -563,10 +568,11 @@ void tst_QmlDebug::queryObject()
QmlDebugObjectQuery *q_obj = 0;
- QmlEngineDebug unconnected(0);
- q_obj = recursive ? unconnected.queryObjectRecursive(rootObject, this) : unconnected.queryObject(rootObject, this);
+ QmlEngineDebug *unconnected = new QmlEngineDebug(0);
+ q_obj = recursive ? unconnected->queryObjectRecursive(rootObject, this) : unconnected->queryObject(rootObject, this);
QCOMPARE(q_obj->state(), QmlDebugQuery::Error);
delete q_obj;
+ delete unconnected;
q_obj = recursive ? m_dbg->queryObjectRecursive(rootObject, this) : m_dbg->queryObject(rootObject, this);
delete q_obj;
@@ -637,10 +643,11 @@ void tst_QmlDebug::queryExpressionResult()
QmlDebugExpressionQuery *q_expr;
- QmlEngineDebug unconnected(0);
- q_expr = unconnected.queryExpressionResult(objectId, expr, this);
+ QmlEngineDebug *unconnected = new QmlEngineDebug(0);
+ q_expr = unconnected->queryExpressionResult(objectId, expr, this);
QCOMPARE(q_expr->state(), QmlDebugQuery::Error);
delete q_expr;
+ delete unconnected;
q_expr = m_dbg->queryExpressionResult(objectId, expr, this);
delete q_expr;
@@ -801,9 +808,10 @@ class tst_QmlDebug_Factory : public QmlTestFactory
public:
QObject *createTest(QmlDebugTestData *data)
{
- QmlContext *c = new QmlContext(data->engine->rootContext());
+ tst_QmlDebug *test = new tst_QmlDebug(data);
+ QmlContext *c = new QmlContext(data->engine->rootContext(), test);
c->setObjectName("tst_QmlDebug_childContext");
- return new tst_QmlDebug(data);
+ return test;
}
};
diff --git a/tests/auto/declarative/qmldebugservice/tst_qmldebugservice.cpp b/tests/auto/declarative/qmldebugservice/tst_qmldebugservice.cpp
index 4e7bc27..9abc5a5 100644
--- a/tests/auto/declarative/qmldebugservice/tst_qmldebugservice.cpp
+++ b/tests/auto/declarative/qmldebugservice/tst_qmldebugservice.cpp
@@ -167,6 +167,7 @@ void tst_QmlDebugService::objectToString()
obj->setObjectName("Hello");
QCOMPARE(QmlDebugService::objectToString(obj), QString("QObject: Hello"));
+ delete obj;
}
diff --git a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
index e5472bb..4edca69 100644
--- a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
+++ b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
@@ -45,7 +45,7 @@
#include <QtDeclarative/qmlcontext.h>
#include <QtCore/qfileinfo.h>
#include <QtCore/qdebug.h>
-#include <QtCore/private/qguard_p.h>
+#include <QtDeclarative/private/qmlguard_p.h>
#include <QtCore/qdir.h>
#include <QtCore/qnumeric.h>
#include <private/qmlengine_p.h>
@@ -835,9 +835,9 @@ void tst_qmlecmascript::dynamicCreation()
void tst_qmlecmascript::dynamicDestruction()
{
QmlComponent component(&engine, TEST_FILE("dynamicDeletion.qml"));
- QGuard<MyQmlObject> object = qobject_cast<MyQmlObject*>(component.create());
+ QmlGuard<MyQmlObject> object = qobject_cast<MyQmlObject*>(component.create());
QVERIFY(object != 0);
- QGuard<QObject> createdQmlObject = 0;
+ QmlGuard<QObject> createdQmlObject = 0;
QMetaObject::invokeMethod(object, "create");
createdQmlObject = object->objectProperty();
@@ -846,10 +846,9 @@ void tst_qmlecmascript::dynamicDestruction()
QMetaObject::invokeMethod(object, "killOther");
QVERIFY(createdQmlObject);
- QTest::qWait(0);
QCoreApplication::instance()->processEvents(QEventLoop::DeferredDeletion);
QVERIFY(createdQmlObject);
- for (int ii = 0; createdQmlObject && ii < 10; ++ii) {
+ for (int ii = 0; createdQmlObject && ii < 50; ++ii) { // After 5 seconds we should give up
if (createdQmlObject) {
QTest::qWait(100);
QCoreApplication::instance()->processEvents(QEventLoop::DeferredDeletion);
diff --git a/tests/auto/declarative/qmlengine/qmlengine.pro b/tests/auto/declarative/qmlengine/qmlengine.pro
index 21d55a4..1a0e5f4 100644
--- a/tests/auto/declarative/qmlengine/qmlengine.pro
+++ b/tests/auto/declarative/qmlengine/qmlengine.pro
@@ -1,5 +1,5 @@
load(qttest_p4)
-contains(QT_CONFIG,declarative): QT += declarative webkit network
+contains(QT_CONFIG,declarative): QT += declarative network
macx:CONFIG -= app_bundle
SOURCES += tst_qmlengine.cpp
diff --git a/tests/auto/declarative/qmlmetatype/tst_qmlmetatype.cpp b/tests/auto/declarative/qmlmetatype/tst_qmlmetatype.cpp
index ccb8f30..c336226 100644
--- a/tests/auto/declarative/qmlmetatype/tst_qmlmetatype.cpp
+++ b/tests/auto/declarative/qmlmetatype/tst_qmlmetatype.cpp
@@ -157,9 +157,12 @@ void tst_qmlmetatype::copy()
QT_COPY_TEST(QStringList, QStringList() << "QML" << "Rocks");
QT_COPY_TEST(QByteArray, QByteArray("0x1102DDD"));
QT_COPY_TEST(QBitArray, QBitArray(102, true));
- QT_COPY_TEST(QDate, QDate::currentDate());
- QT_COPY_TEST(QTime, QTime::currentTime());
- QT_COPY_TEST(QDateTime, QDateTime::currentDateTime());
+ QDate cd = QDate::currentDate();
+ QT_COPY_TEST(QDate, cd);
+ QTime ct = QTime::currentTime();
+ QT_COPY_TEST(QTime, ct);
+ QDateTime cdt = QDateTime::currentDateTime();
+ QT_COPY_TEST(QDateTime, cdt);
QT_COPY_TEST(QUrl, QUrl("http://www.nokia.com"));
QT_COPY_TEST(QLocale, QLocale(QLocale::English, QLocale::Australia));
QT_COPY_TEST(QRect, QRect(-10, 10, 102, 99));
diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/abort.reply b/tests/auto/declarative/qmlxmlhttprequest/data/abort.reply
index 35b11f4..7ae6951 100644
--- a/tests/auto/declarative/qmlxmlhttprequest/data/abort.reply
+++ b/tests/auto/declarative/qmlxmlhttprequest/data/abort.reply
@@ -1,2 +1,3 @@
HTTP/1.0 200 OK
+Connection: close
Content-type: text/html; charset=UTF-8
diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/getResponseHeader.reply b/tests/auto/declarative/qmlxmlhttprequest/data/getResponseHeader.reply
index 62ec67b..c4b4bb2 100644
--- a/tests/auto/declarative/qmlxmlhttprequest/data/getResponseHeader.reply
+++ b/tests/auto/declarative/qmlxmlhttprequest/data/getResponseHeader.reply
@@ -1,4 +1,5 @@
HTTP/1.0 200 OK
+Connection: close
Content-type: text/html; charset=UTF-8
Test-Header: TestValue
MultiTest-Header: TestValue
diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/open_network.reply b/tests/auto/declarative/qmlxmlhttprequest/data/open_network.reply
index 35b11f4..7ae6951 100644
--- a/tests/auto/declarative/qmlxmlhttprequest/data/open_network.reply
+++ b/tests/auto/declarative/qmlxmlhttprequest/data/open_network.reply
@@ -1,2 +1,3 @@
HTTP/1.0 200 OK
+Connection: close
Content-type: text/html; charset=UTF-8
diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/send_data.reply b/tests/auto/declarative/qmlxmlhttprequest/data/send_data.reply
index 35b11f4..7ae6951 100644
--- a/tests/auto/declarative/qmlxmlhttprequest/data/send_data.reply
+++ b/tests/auto/declarative/qmlxmlhttprequest/data/send_data.reply
@@ -1,2 +1,3 @@
HTTP/1.0 200 OK
+Connection: close
Content-type: text/html; charset=UTF-8
diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/send_ignoreData.reply b/tests/auto/declarative/qmlxmlhttprequest/data/send_ignoreData.reply
index 35b11f4..7ae6951 100644
--- a/tests/auto/declarative/qmlxmlhttprequest/data/send_ignoreData.reply
+++ b/tests/auto/declarative/qmlxmlhttprequest/data/send_ignoreData.reply
@@ -1,2 +1,3 @@
HTTP/1.0 200 OK
+Connection: close
Content-type: text/html; charset=UTF-8
diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/setRequestHeader.reply b/tests/auto/declarative/qmlxmlhttprequest/data/setRequestHeader.reply
index 35b11f4..7ae6951 100644
--- a/tests/auto/declarative/qmlxmlhttprequest/data/setRequestHeader.reply
+++ b/tests/auto/declarative/qmlxmlhttprequest/data/setRequestHeader.reply
@@ -1,2 +1,3 @@
HTTP/1.0 200 OK
+Connection: close
Content-type: text/html; charset=UTF-8
diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/setRequestHeader_illegalName.qml b/tests/auto/declarative/qmlxmlhttprequest/data/setRequestHeader_illegalName.qml
index bf31eca..e9535d5 100644
--- a/tests/auto/declarative/qmlxmlhttprequest/data/setRequestHeader_illegalName.qml
+++ b/tests/auto/declarative/qmlxmlhttprequest/data/setRequestHeader_illegalName.qml
@@ -46,6 +46,7 @@ QtObject {
x.onreadystatechange = function() {
if (x.readyState == XMLHttpRequest.DONE) {
dataOK = (x.responseText == "QML Rocks!\n");
+ print("DATA:" + x.responseText);
}
}
diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/status.200.reply b/tests/auto/declarative/qmlxmlhttprequest/data/status.200.reply
index 35b11f4..7ae6951 100644
--- a/tests/auto/declarative/qmlxmlhttprequest/data/status.200.reply
+++ b/tests/auto/declarative/qmlxmlhttprequest/data/status.200.reply
@@ -1,2 +1,3 @@
HTTP/1.0 200 OK
+Connection: close
Content-type: text/html; charset=UTF-8
diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/status.404.reply b/tests/auto/declarative/qmlxmlhttprequest/data/status.404.reply
index 964a7a8..2e29f56 100644
--- a/tests/auto/declarative/qmlxmlhttprequest/data/status.404.reply
+++ b/tests/auto/declarative/qmlxmlhttprequest/data/status.404.reply
@@ -1,2 +1,3 @@
HTTP/1.0 404 Document not found
+Connection: close
Content-type: text/html; charset=UTF-8
diff --git a/tests/auto/declarative/runall.sh b/tests/auto/declarative/runall.sh
index 33087a1..d9eddf9 100755
--- a/tests/auto/declarative/runall.sh
+++ b/tests/auto/declarative/runall.sh
@@ -5,13 +5,19 @@ sleep 1
trap "kill $!" EXIT
export DISPLAY=:7
-make -k -j1 install 2>&1 |
+( make -k -j1 install 2>&1;
+ for exe in $(make install | sed -n 's/^install .* "\([^"]*qt4\/tst_[^"]*\)".*/\1/p')
+ do
+ $exe
+ done
+) |
while read line
do
case "$line" in
make*Error) echo "$line";;
make*Stop) echo "$line";;
make*) ;;
+ install*) ;;
*/qmake*) ;;
*/bin/moc*) ;;
*targ.debug*) ;;
diff --git a/tests/auto/declarative/shared/debugutil.cpp b/tests/auto/declarative/shared/debugutil.cpp
index aa0cd31..0010508 100644
--- a/tests/auto/declarative/shared/debugutil.cpp
+++ b/tests/auto/declarative/shared/debugutil.cpp
@@ -47,6 +47,8 @@
#include "debugutil_p.h"
+#include <iostream>
+
bool QmlDebugTest::waitForSignal(QObject *receiver, const char *member, int timeout) {
QEventLoop loop;
QTimer timer;
@@ -117,21 +119,22 @@ void QmlDebugTestClient::messageReceived(const QByteArray &ba)
tst_QmlDebug_Thread::tst_QmlDebug_Thread(QmlDebugTestData *data, QmlTestFactory *factory)
- : m_ready(false), m_data(data), m_factory(factory)
+ : m_data(data), m_factory(factory)
{
}
void tst_QmlDebug_Thread::run()
{
- QTest::qWait(1000);
+ bool ok = false;
QmlDebugConnection conn;
conn.connectToHost("127.0.0.1", 3768);
- bool ok = conn.waitForConnected(5000);
+ ok = conn.waitForConnected();
Q_ASSERT(ok);
- while (!m_ready)
- QTest::qWait(100);
+ QEventLoop loop;
+ connect(m_data, SIGNAL(engineCreated()), &loop, SLOT(quit()));
+ loop.exec();
m_data->conn = &conn;
@@ -139,10 +142,10 @@ void tst_QmlDebug_Thread::run()
QObject *test = m_factory->createTest(m_data);
Q_ASSERT(test);
int code = QTest::qExec(test, QCoreApplication::arguments());
+ delete test;
emit testsFinished(code);
}
-
int QmlDebugTest::runTests(QmlTestFactory *factory, const QList<QByteArray> &qml)
{
qputenv("QML_DEBUG_SERVER_PORT", "3768");
@@ -152,7 +155,8 @@ int QmlDebugTest::runTests(QmlTestFactory *factory, const QList<QByteArray> &qml
tst_QmlDebug_Thread thread(&data, factory);
QObject::connect(&thread, SIGNAL(testsFinished(int)), &data, SLOT(testsFinished(int)));
- thread.start();
+
+ QmlDebugService::notifyOnServerStart(&thread, "start");
QmlEngine engine; // blocks until client connects
@@ -165,7 +169,7 @@ int QmlDebugTest::runTests(QmlTestFactory *factory, const QList<QByteArray> &qml
// start the test
data.engine = &engine;
- thread.m_ready = true;
+ emit data.engineCreated();
loop.exec();
thread.wait();
@@ -173,4 +177,3 @@ int QmlDebugTest::runTests(QmlTestFactory *factory, const QList<QByteArray> &qml
return data.exitCode;
}
-
diff --git a/tests/auto/declarative/shared/debugutil_p.h b/tests/auto/declarative/shared/debugutil_p.h
index 313d16c..6f23899 100644
--- a/tests/auto/declarative/shared/debugutil_p.h
+++ b/tests/auto/declarative/shared/debugutil_p.h
@@ -51,6 +51,15 @@
#include <private/qmldebugservice_p.h>
#include <private/qmlgraphicsitem_p.h>
+class QmlTestFactory;
+
+class QmlDebugTest
+{
+public:
+ static bool waitForSignal(QObject *receiver, const char *member, int timeout = 5000);
+
+ static int runTests(QmlTestFactory *factory, const QList<QByteArray> &qml = QList<QByteArray>());
+};
class QmlDebugTestData : public QObject
{
@@ -68,8 +77,14 @@ public:
QList<QmlGraphicsItem *> items;
+signals:
+ void engineCreated();
+
public slots:
void testsFinished(int code);
+
+private:
+ friend class QmlDebugTest;
};
@@ -82,14 +97,6 @@ public:
virtual QObject *createTest(QmlDebugTestData *data) = 0;
};
-
-namespace QmlDebugTest {
-
- bool waitForSignal(QObject *receiver, const char *member, int timeout = 5000);
-
- int runTests(QmlTestFactory *factory, const QList<QByteArray> &qml = QList<QByteArray>());
-}
-
class QmlDebugTestService : public QmlDebugService
{
Q_OBJECT
@@ -132,8 +139,6 @@ public:
void run();
- bool m_ready;
-
signals:
void testsFinished(int);
diff --git a/tests/auto/declarative/shared/testhttpserver.cpp b/tests/auto/declarative/shared/testhttpserver.cpp
index 490fc95..5740925 100644
--- a/tests/auto/declarative/shared/testhttpserver.cpp
+++ b/tests/auto/declarative/shared/testhttpserver.cpp
@@ -190,13 +190,14 @@ void TestHTTPServer::disconnected()
--ii;
}
}
+ socket->disconnect();
socket->deleteLater();
}
void TestHTTPServer::readyRead()
{
QTcpSocket *socket = qobject_cast<QTcpSocket *>(sender());
- if (!socket) return;
+ if (!socket || socket->state() == QTcpSocket::ClosingState) return;
QByteArray ba = socket->readAll();
@@ -222,14 +223,14 @@ void TestHTTPServer::readyRead()
QByteArray data = ba.mid(ii);
qWarning() << "TestHTTPServer: Unexpected data" << data << "\nExpected: " << waitData;
m_hasFailed = true;
- socket->disconnect();
+ socket->disconnectFromHost();
return;
}
}
if (waitData.isEmpty()) {
socket->write(replyData);
- socket->disconnect();
+ socket->disconnectFromHost();
}
}
@@ -316,8 +317,8 @@ void TestHTTPServer::serveGET(QTcpSocket *socket, const QByteArray &data)
}
dataCache.remove(socket);
- if (close)
- socket->close();
+ if (close)
+ socket->disconnectFromHost();
}
}
diff --git a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp
index 504ceac..ea86c16 100644
--- a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp
+++ b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp
@@ -1213,14 +1213,14 @@ void tst_QAbstractItemView::task250754_fontChange()
tree.setModel(m);
w.show();
- w.resize(150,150);
+ w.resize(150,240);
QTest::qWait(30);
QFont font = tree.font();
- font.setPointSize(5);
+ font.setPixelSize(10);
tree.setFont(font);
QTRY_VERIFY(!tree.verticalScrollBar()->isVisible());
- font.setPointSize(45);
+ font.setPixelSize(60);
tree.setFont(font);
//now with the huge items, the scrollbar must be visible
QTRY_VERIFY(tree.verticalScrollBar()->isVisible());
@@ -1444,7 +1444,10 @@ void tst_QAbstractItemView::QTBUG6407_extendedSelection()
for(int i = 0; i < 50; ++i)
view.addItem(QString::number(i));
- view.resize(200,200);
+ QFont font = view.font();
+ font.setPixelSize(10);
+ view.setFont(font);
+ view.resize(200,240);
view.show();
QApplication::setActiveWindow(&view);
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index 7b54a3b..7c1b97e 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -90,6 +90,8 @@ Q_DECLARE_METATYPE(QRectF)
#define COMPARE_REGIONS QTRY_COMPARE
#endif
+static QGraphicsRectItem staticItem; //QTBUG-7629, we should not crash at exit.
+
static void sendMousePress(QGraphicsScene *scene, const QPointF &point, Qt::MouseButton button = Qt::LeftButton)
{
QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress);
diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp
index 121a8fa..99244c2 100644
--- a/tests/auto/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/qimagereader/tst_qimagereader.cpp
@@ -1633,6 +1633,35 @@ void tst_QImageReader::autoDetectImageFormat()
QVERIFY(reader.canRead());
QVERIFY(!reader.read().isNull());
}
+
+#ifdef QTEST_HAVE_JPEG
+ {
+ QImageReader io(prefix + "YCbCr_rgb.jpg");
+ io.setAutoDetectImageFormat(false);
+ // This should fail since no format string is given
+ QImage image;
+ QVERIFY(!io.read(&image));
+ }
+ {
+ QImageReader io(prefix + "YCbCr_rgb.jpg", "jpg");
+ io.setAutoDetectImageFormat(false);
+ QImage image;
+ QVERIFY(io.read(&image));
+ }
+#endif
+ {
+ QImageReader io(prefix + "tst7.png");
+ io.setAutoDetectImageFormat(false);
+ // This should fail since no format string is given
+ QImage image;
+ QVERIFY(!io.read(&image));
+ }
+ {
+ QImageReader io(prefix + "tst7.png", "png");
+ io.setAutoDetectImageFormat(false);
+ QImage image;
+ QVERIFY(io.read(&image));
+ }
}
void tst_QImageReader::fileNameProbing()
diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp
index fcca58a..3b6400a 100644
--- a/tests/auto/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/qlineedit/tst_qlineedit.cpp
@@ -274,6 +274,7 @@ private slots:
#ifndef QT_NO_CONTEXTMENU
void taskQTBUG_7902_contextMenuCrash();
#endif
+ void taskQTBUG_7395_readOnlyShortcut();
protected slots:
#ifdef QT3_SUPPORT
@@ -3457,10 +3458,8 @@ void tst_QLineEdit::task210502_caseInsensitiveInlineCompletion()
completer.setCompletionMode(QCompleter::InlineCompletion);
lineEdit.setCompleter(&completer);
lineEdit.show();
-#ifdef Q_WS_X11
- // to be safe and avoid failing setFocus with window managers
- qt_x11_wait_for_window_manager(&lineEdit);
-#endif
+ QTest::qWaitForWindowShown(&lineEdit);
+ QApplication::setActiveWindow(&lineEdit);
lineEdit.setFocus();
QTRY_VERIFY(lineEdit.hasFocus());
QTest::keyPress(&lineEdit, 'a');
@@ -3641,6 +3640,27 @@ void tst_QLineEdit::taskQTBUG_4679_selectToStartEndOfBlock()
#endif // Q_OS_MAC
}
+void tst_QLineEdit::taskQTBUG_7395_readOnlyShortcut()
+{
+ //ReadOnly QLineEdit should not intercept shortcut.
+ QLineEdit le;
+ le.setReadOnly(true);
+
+ QAction action(QString::fromLatin1("hello"), &le);
+ action.setShortcut(QString::fromLatin1("p"));
+ QSignalSpy spy(&action, SIGNAL(triggered()));
+ le.addAction(&action);
+
+ le.show();
+ QTest::qWaitForWindowShown(&le);
+ QApplication::setActiveWindow(&le);
+ le.setFocus();
+ QTRY_VERIFY(le.hasFocus());
+
+ QTest::keyClick(0, Qt::Key_P);
+ QCOMPARE(spy.count(), 1);
+}
+
#ifndef QT_NO_CONTEXTMENU
void tst_QLineEdit::taskQTBUG_7902_contextMenuCrash()
{
diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp
index 7109213..d2181f8 100644
--- a/tests/auto/qlistview/tst_qlistview.cpp
+++ b/tests/auto/qlistview/tst_qlistview.cpp
@@ -606,9 +606,8 @@ void tst_QListView::indexAt()
view2.setWrapping(true);
// We really want to make sure it is shown, because the layout won't be known until it is shown
view2.show();
- for (int i = 0; i < 5 && !view2.m_shown; ++i) {
- QTest::qWait(500);
- }
+ QTest::qWaitForWindowShown(&view2);
+ QTRY_VERIFY(view2.m_shown);
QVERIFY(view2.m_index.isValid());
QVERIFY(view2.m_index.row() != 0);
@@ -760,7 +759,8 @@ void tst_QListView::hideFirstRow()
view.setUniformItemSizes(true);
view.setRowHidden(0,true);
view.show();
- QTest::qWait(100);
+ QTest::qWaitForWindowShown(&view);
+ QTest::qWait(10);
}
void tst_QListView::batchedMode()
@@ -778,10 +778,10 @@ void tst_QListView::batchedMode()
view.setBatchSize(2);
view.resize(200,400);
view.show();
-
-#if !defined(Q_OS_WINCE)
+ QTest::qWaitForWindowShown(&view);
QTest::qWait(100);
-#else
+
+#if defined(Q_OS_WINCE)
QTest::qWait(2000);
#endif
QBitArray ba;
@@ -1203,9 +1203,9 @@ void tst_QListView::scrollTo()
//we click the item
QPoint p = lv.visualRect(index).center();
QTest::mouseClick(lv.viewport(), Qt::LeftButton, Qt::NoModifier, p);
- //let's wait 1 second because the scrolling is delayed
- QTest::qWait(1000);
- QCOMPARE(lv.visualRect(index).y(),0);
+ //let's wait because the scrolling is delayed
+ QTest::qWait(QApplication::doubleClickInterval() + 150);
+ QTRY_COMPARE(lv.visualRect(index).y(),0);
//we scroll down. As the item is to tall for the view, it will disappear
QTest::keyClick(lv.viewport(), Qt::Key_Down, Qt::NoModifier);
@@ -1222,9 +1222,9 @@ void tst_QListView::scrollTo()
//we click the item
p = lv.visualRect(index).center();
QTest::mouseClick(lv.viewport(), Qt::LeftButton, Qt::NoModifier, p);
- //let's wait 1 second because the scrolling is delayed
- QTest::qWait(1000);
- QCOMPARE(lv.visualRect(index).x(),0);
+ //let's wait because the scrolling is delayed
+ QTest::qWait(QApplication::doubleClickInterval() + 150);
+ QTRY_COMPARE(lv.visualRect(index).x(),0);
//we scroll right. As the item is too wide for the view, it will disappear
QTest::keyClick(lv.viewport(), Qt::Key_Right, Qt::NoModifier);
@@ -1243,9 +1243,9 @@ void tst_QListView::scrollTo()
//we click the item
p = lv.visualRect(index).center();
QTest::mouseClick(lv.viewport(), Qt::LeftButton, Qt::NoModifier, p);
- //let's wait 1 second because the scrolling is delayed
- QTest::qWait(1000);
- QCOMPARE(lv.visualRect(index).y(),0);
+ //let's wait because the scrolling is delayed
+ QTest::qWait(QApplication::doubleClickInterval() + 150);
+ QTRY_COMPARE(lv.visualRect(index).y(),0);
//we scroll down. As the item is too tall for the view, it will partially disappear
QTest::keyClick(lv.viewport(), Qt::Key_Down, Qt::NoModifier);
@@ -1277,7 +1277,7 @@ void tst_QListView::scrollBarRanges()
for (int h = 30; h <= 210; ++h) {
lv.resize(250, h);
- QTest::qWait(100); // wait for the layout to be done
+ QApplication::processEvents(); // wait for the layout to be done
int visibleRowCount = lv.viewport()->size().height() / rowHeight;
int invisibleRowCount = rowCount - visibleRowCount;
QCOMPARE(lv.verticalScrollBar()->maximum(), invisibleRowCount);
@@ -1366,7 +1366,7 @@ void tst_QListView::scrollBarAsNeeded()
model.setStringList(list);
QApplication::processEvents();
- QTest::qWait(100);
+ QTest::qWait(50);
QStringList replacement;
for (i = 0; i < itemCount; ++i) {
@@ -1375,10 +1375,9 @@ void tst_QListView::scrollBarAsNeeded()
model.setStringList(replacement);
QApplication::processEvents();
- QTest::qWait(100);
- QCOMPARE(lv.horizontalScrollBar()->isVisible(), horizontalScrollBarVisible);
- QCOMPARE(lv.verticalScrollBar()->isVisible(), verticalScrollBarVisible);
+ QTRY_COMPARE(lv.horizontalScrollBar()->isVisible(), horizontalScrollBarVisible);
+ QTRY_COMPARE(lv.verticalScrollBar()->isVisible(), verticalScrollBarVisible);
}
}
@@ -1433,10 +1432,9 @@ void tst_QListView::wordWrap()
lv.setFixedSize(150, 150);
lv.show();
QApplication::processEvents();
- QTest::qWait(100);
- QCOMPARE(lv.horizontalScrollBar()->isVisible(), false);
- QCOMPARE(lv.verticalScrollBar()->isVisible(), true);
+ QTRY_COMPARE(lv.horizontalScrollBar()->isVisible(), false);
+ QTRY_COMPARE(lv.verticalScrollBar()->isVisible(), true);
}
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
@@ -1557,7 +1555,8 @@ void tst_QListView::task248430_crashWith0SizedItem()
QStringListModel model(QStringList() << QLatin1String("item1") << QString());
view.setModel(&model);
view.show();
- QTest::qWait(100);
+ QTest::qWaitForWindowShown(&view);
+ QTest::qWait(20);
}
void tst_QListView::task250446_scrollChanged()
@@ -1569,21 +1568,21 @@ void tst_QListView::task250446_scrollChanged()
QVERIFY(index.isValid());
view.setCurrentIndex(index);
view.show();
- QTest::qWait(100);
+ QTest::qWaitForWindowShown(&view);
const int scrollValue = view.verticalScrollBar()->maximum();
view.verticalScrollBar()->setValue(scrollValue);
QCOMPARE(view.verticalScrollBar()->value(), scrollValue);
QCOMPARE(view.currentIndex(), index);
view.showMinimized();
- QTest::qWait(100);
- QCOMPARE(view.verticalScrollBar()->value(), scrollValue);
- QCOMPARE(view.currentIndex(), index);
+ QTest::qWait(50);
+ QTRY_COMPARE(view.verticalScrollBar()->value(), scrollValue);
+ QTRY_COMPARE(view.currentIndex(), index);
view.showNormal();
- QTest::qWait(100);
- QCOMPARE(view.verticalScrollBar()->value(), scrollValue);
- QCOMPARE(view.currentIndex(), index);
+ QTest::qWait(50);
+ QTRY_COMPARE(view.verticalScrollBar()->value(), scrollValue);
+ QTRY_COMPARE(view.currentIndex(), index);
}
void tst_QListView::task196118_visualRegionForSelection()
@@ -1699,7 +1698,7 @@ void tst_QListView::shiftSelectionWithNonUniformItemSizes()
view.setViewMode(QListView::IconMode);
view.setModel(&model);
view.show();
- QTest::qWait(30);
+ QTest::qWaitForWindowShown(&view);
// Verfify that item sizes are non-uniform
QVERIFY(view.sizeHintForIndex(model.index(0, 0)).height() > view.sizeHintForIndex(model.index(1, 0)).height());
@@ -1729,7 +1728,7 @@ void tst_QListView::shiftSelectionWithNonUniformItemSizes()
view.setViewMode(QListView::IconMode);
view.setModel(&model);
view.show();
- QTest::qWait(30);
+ QTest::qWaitForWindowShown(&view);
// Verfify that item sizes are non-uniform
QVERIFY(view.sizeHintForIndex(model.index(0, 0)).width() > view.sizeHintForIndex(model.index(1, 0)).width());
@@ -1789,7 +1788,6 @@ void tst_QListView::task262152_setModelColumnNavigate()
view.show();
QApplication::setActiveWindow(&view);
QTest::qWaitForWindowShown(&view);
- QTest::qWait(30);
QTRY_COMPARE(static_cast<QWidget *>(&view), QApplication::activeWindow());
QTest::keyClick(&view, Qt::Key_Down);
QTest::qWait(30);
@@ -1834,6 +1832,24 @@ void tst_QListView::taskQTBUG_2233_scrollHiddenItems()
QVERIFY(index.isValid());
QCOMPARE(index.row(), 2 * i + 1);
}
+
+ //QTBUG-7929 should not crash
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+ QScrollBar *bar = view.flow() == QListView::TopToBottom
+ ? view.verticalScrollBar() : view.horizontalScrollBar();
+
+ int nbVisibleItem = rowCount / 2 - bar->maximum();
+
+ bar->setValue(bar->maximum());
+ QApplication::processEvents();
+ for (int i = rowCount; i > rowCount / 2; i--) {
+ view.setRowHidden(i, true);
+ }
+ QApplication::processEvents();
+ QTest::qWait(50);
+ QCOMPARE(bar->value(), bar->maximum());
+ QCOMPARE(bar->maximum(), rowCount/4 - nbVisibleItem);
}
void tst_QListView::taskQTBUG_633_changeModelData()
diff --git a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
index 8e26696..ac9ca46 100644
--- a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
+++ b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
@@ -832,6 +832,7 @@ void tst_QScriptEngineAgent::functionEntryAndExit_builtin_data()
/** check behaiviour of built-in function */
void tst_QScriptEngineAgent::functionEntryAndExit_builtin()
{
+ QSKIP("The test fails on platforms others than Linux. The issue will be fixed with next JSC update", SkipAll);
QFETCH(QString, script);
QFETCH(QString, result);
QScriptEngine eng;
diff --git a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
index b2a85d7..41df98c 100644
--- a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
+++ b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
@@ -683,8 +683,72 @@ tst_Suite::tst_Suite()
addExpectedFailure("ecma_3/String/15.5.4.11.js", "Section 7", willFixInNextReleaseMessage);
addExpectedFailure("ecma_3/String/15.5.4.11.js", "Section 26", willFixInNextReleaseMessage);
+#ifndef Q_CC_MINGW
addExpectedFailure("ecma/Expressions/11.4.7-02.js", "-(-2147483648) == 2147483648", willFixInNextReleaseMessage);
addExpectedFailure("ecma/TypeConversion/9.3.1-3.js", "- -\"0x80000000\"", willFixInNextReleaseMessage);
+#endif
+
+#ifdef Q_OS_WIN
+ addExpectedFailure("ecma_3/Expressions/11.7.3-01.js", "11.7.3 - >>> should evaluate operands in order: order", "QTBUG-8056");
+ addExpectedFailure("ecma_3/Operators/order-01.js", "operator evaluation order: 11.7.3 >>>", "QTBUG-8056");
+ addExpectedFailure("ecma_3/Operators/order-01.js", "operator evaluation order: 11.13.2 >>>=", "QTBUG-8056");
+#endif
+
+#ifdef Q_CC_MINGW
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(NaN,0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(NaN,-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(Infinity, Infinity)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(Infinity, -Infinity)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(-Infinity, Infinity)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(-Infinity, -Infinity)", willFixInNextReleaseMessage);
+#endif
+
+#ifdef Q_OS_SOLARIS
+ addExpectedFailure("ecma/Expressions/11.13.2-2.js", "VAR1 = -0; VAR2= Infinity; VAR2 /= VAR1", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Expressions/11.13.2-2.js", "VAR1 = -0; VAR2= -Infinity; VAR2 /= VAR1", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Expressions/11.13.2-2.js", "VAR1 = 1; VAR2= -0; VAR1 /= VAR2", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Expressions/11.13.2-2.js", "VAR1 = -1; VAR2= -0; VAR1 /= VAR2", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Expressions/11.5.2.js", "Number.POSITIVE_INFINITY / -0", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Expressions/11.5.2.js", "Number.NEGATIVE_INFINITY / -0", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Expressions/11.5.2.js", "1 / -0", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Expressions/11.5.2.js", "-1 / -0", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.10.js", "Math.log(-0.0000001)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.10.js", "Math.log(-1)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.11.js", "Infinity/Math.max(-0,-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.12.js", "Infinity/Math.min(0,-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.12.js", "Infinity/Math.min(-0,-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(NaN,0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(NaN,-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Infinity/Math.pow(-Infinity, -1)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(0, -1)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(0, -0.5)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(0, -1000)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Infinity/Math.pow(-0, 1)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Infinity/Math.pow(-0, 3)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(-0, -2)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.15.js", "Infinity/Math.round(-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.15.js", "Infinity/Math.round(-0.49)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.15.js", "Infinity/Math.round(-0.5)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.17.js", "Infinity/Math.sqrt(-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.18.js", "Infinity/Math.tan(-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.2.js", "Math.acos(1.00000001)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.2.js", "Math.acos(11.00000001)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.3.js", "Math.asin(1.000001)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.3.js", "Math.asin(-1.000001)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.3.js", "Infinity/Math.asin(-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.4.js", "Infinity/Math.atan(-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(0, -0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.5.js", "Infinity/Math.atan2(-0, 1)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(-0,\t-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(-0,\t-1)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.6.js", "Infinity/Math.ceil('-0')", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.6.js", "Infinity/Math.ceil(-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.6.js", "Infinity/Math.ceil(-Number.MIN_VALUE)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.6.js", "Infinity/Math.ceil(-0.9)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.9.js", "Infinity/Math.floor(-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/TypeConversion/9.3.1-3.js", "var z = 0; print(1/-z)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/TypeConversion/9.3.1-3.js", "1/-1e-2000", willFixInNextReleaseMessage);
+#endif
static const char klass[] = "tst_QScriptJsTestSuite";
diff --git a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
index 147896e..a3dfd6c 100644
--- a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
+++ b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
@@ -236,6 +236,16 @@ tst_Suite::tst_Suite()
addExpectedFailure("global-const-var-conflicts", "false", "true", willFixInNextReleaseMessage);
addExpectedFailure("string-lastindexof", "0", "-1", "test is wrong?");
+#ifndef Q_OS_LINUX
+ addExpectedFailure("to-precision", "1.235e+27", "1.234e+27", "QTBUG-8053: toPrecision(4) gives wrong result on Mac");
+#endif
+
+#ifdef Q_OS_SOLARIS
+ addExpectedFailure("math-min-max", "Infinity", "-Infinity", willFixInNextReleaseMessage);
+ addExpectedFailure("negate-zero", "false", "true", willFixInNextReleaseMessage);
+ addExpectedFailure("str-to-num", "Infinity", "-Infinity", willFixInNextReleaseMessage);
+#endif
+
addTestExclusion("debug-*", "not applicable");
addTestExclusion("mirror-*", "not applicable");
@@ -245,6 +255,10 @@ tst_Suite::tst_Suite()
addTestExclusion("string-case", "V8-specific behavior? (Doesn't pass on SpiderMonkey either)");
+#ifdef Q_CC_MINGW
+ addTestExclusion("date$", "QTBUG-7698: Date.prototype.setMonth() crashes on win32-g++");
+#endif
+
#ifdef Q_OS_WINCE
addTestExclusion("deep-recursion", "Demands too much memory on WinCE");
addTestExclusion("nested-repetition-count-overflow", "Demands too much memory on WinCE");
diff --git a/tests/auto/qscriptvalue/testgen/data.txt b/tests/auto/qscriptvalue/testgen/data.txt
index 8e7026e..a041c9b 100644
--- a/tests/auto/qscriptvalue/testgen/data.txt
+++ b/tests/auto/qscriptvalue/testgen/data.txt
@@ -114,3 +114,7 @@ engine->evaluate("/foo/")
engine->evaluate("new Object()")
engine->evaluate("new Array()")
engine->evaluate("new Error()")
+
+#other
+engine->nullValue()
+engine->undefinedValue() \ No newline at end of file
diff --git a/tests/auto/qscriptvalue/testgen/gen.py b/tests/auto/qscriptvalue/testgen/gen.py
index 7161e6b..b3c81b9 100755
--- a/tests/auto/qscriptvalue/testgen/gen.py
+++ b/tests/auto/qscriptvalue/testgen/gen.py
@@ -231,7 +231,7 @@ if __name__ == '__main__':
row_esc = escape(row)
out.append(qsvTempl.substitute(expr = row, expr_esc = row_esc))
- result = mainTempl.substitute(dump= "".join(out) \
+ result = mainTempl.safe_substitute(dump= "".join(out) \
, values = (11 * ' ' + '<< ').join(qsv) \
, count = len(qsv) \
, dataTags = (11 * ' ' + '<< ').join(map(lambda w: '"' + escape(w.replace('\n','')) + '"\n', qsv)))
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp
index 1d105b4..4e621b3 100644
--- a/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp
@@ -152,6 +152,8 @@ void tst_QScriptValue::initScriptValues()
DEFINE_TEST_VALUE(engine->evaluate("new Object()"));
DEFINE_TEST_VALUE(engine->evaluate("new Array()"));
DEFINE_TEST_VALUE(engine->evaluate("new Error()"));
+ DEFINE_TEST_VALUE(engine->nullValue());
+ DEFINE_TEST_VALUE(engine->undefinedValue());
}
@@ -267,6 +269,8 @@ void tst_QScriptValue::isValid_makeData(const char* expr)
<< "engine->evaluate(\"new Object()\")"
<< "engine->evaluate(\"new Array()\")"
<< "engine->evaluate(\"new Error()\")"
+ << "engine->nullValue()"
+ << "engine->undefinedValue()"
;
}
newRow(expr) << isValid.contains(expr);
@@ -453,6 +457,7 @@ void tst_QScriptValue::isNull_makeData(const char* expr)
isNull << "QScriptValue(QScriptValue::NullValue)"
<< "QScriptValue(0, QScriptValue::NullValue)"
<< "QScriptValue(engine, QScriptValue::NullValue)"
+ << "engine->nullValue()"
;
}
newRow(expr) << isNull.contains(expr);
@@ -535,6 +540,7 @@ void tst_QScriptValue::isUndefined_makeData(const char* expr)
<< "QScriptValue(0, QScriptValue::UndefinedValue)"
<< "QScriptValue(engine, QScriptValue::UndefinedValue)"
<< "engine->evaluate(\"{}\")"
+ << "engine->undefinedValue()"
;
}
newRow(expr) << isUndefined.contains(expr);
@@ -810,6 +816,8 @@ void tst_QScriptValue::toString_makeData(const char* expr)
toString.insert("engine->evaluate(\"new Object()\")", "[object Object]");
toString.insert("engine->evaluate(\"new Array()\")", "");
toString.insert("engine->evaluate(\"new Error()\")", "Error: Unknown error");
+ toString.insert("engine->nullValue()", "null");
+ toString.insert("engine->undefinedValue()", "undefined");
}
newRow(expr) << toString.value(expr);
}
@@ -936,6 +944,8 @@ void tst_QScriptValue::toNumber_makeData(const char* expr)
toNumber.insert("engine->evaluate(\"new Object()\")", qQNaN());
toNumber.insert("engine->evaluate(\"new Array()\")", 0);
toNumber.insert("engine->evaluate(\"new Error()\")", qQNaN());
+ toNumber.insert("engine->nullValue()", 0);
+ toNumber.insert("engine->undefinedValue()", qQNaN());
}
newRow(expr) << toNumber.value(expr);
}
@@ -1070,6 +1080,8 @@ void tst_QScriptValue::toBool_makeData(const char* expr)
toBool.insert("engine->evaluate(\"new Object()\")", true);
toBool.insert("engine->evaluate(\"new Array()\")", true);
toBool.insert("engine->evaluate(\"new Error()\")", true);
+ toBool.insert("engine->nullValue()", false);
+ toBool.insert("engine->undefinedValue()", false);
}
newRow(expr) << toBool.value(expr);
}
@@ -1196,6 +1208,8 @@ void tst_QScriptValue::toBoolean_makeData(const char* expr)
toBoolean.insert("engine->evaluate(\"new Object()\")", true);
toBoolean.insert("engine->evaluate(\"new Array()\")", true);
toBoolean.insert("engine->evaluate(\"new Error()\")", true);
+ toBoolean.insert("engine->nullValue()", false);
+ toBoolean.insert("engine->undefinedValue()", false);
}
newRow(expr) << toBoolean.value(expr);
}
@@ -1322,6 +1336,8 @@ void tst_QScriptValue::toInteger_makeData(const char* expr)
toInteger.insert("engine->evaluate(\"new Object()\")", 0);
toInteger.insert("engine->evaluate(\"new Array()\")", 0);
toInteger.insert("engine->evaluate(\"new Error()\")", 0);
+ toInteger.insert("engine->nullValue()", 0);
+ toInteger.insert("engine->undefinedValue()", 0);
}
newRow(expr) << toInteger.value(expr);
}
@@ -1452,6 +1468,8 @@ void tst_QScriptValue::toInt32_makeData(const char* expr)
toInt32.insert("engine->evaluate(\"new Object()\")", 0);
toInt32.insert("engine->evaluate(\"new Array()\")", 0);
toInt32.insert("engine->evaluate(\"new Error()\")", 0);
+ toInt32.insert("engine->nullValue()", 0);
+ toInt32.insert("engine->undefinedValue()", 0);
}
newRow(expr) << toInt32.value(expr);
}
@@ -1578,6 +1596,8 @@ void tst_QScriptValue::toUInt32_makeData(const char* expr)
toUInt32.insert("engine->evaluate(\"new Object()\")", 0);
toUInt32.insert("engine->evaluate(\"new Array()\")", 0);
toUInt32.insert("engine->evaluate(\"new Error()\")", 0);
+ toUInt32.insert("engine->nullValue()", 0);
+ toUInt32.insert("engine->undefinedValue()", 0);
}
newRow(expr) << toUInt32.value(expr);
}
@@ -1704,6 +1724,8 @@ void tst_QScriptValue::toUInt16_makeData(const char* expr)
toUInt16.insert("engine->evaluate(\"new Object()\")", 0);
toUInt16.insert("engine->evaluate(\"new Array()\")", 0);
toUInt16.insert("engine->evaluate(\"new Error()\")", 0);
+ toUInt16.insert("engine->nullValue()", 0);
+ toUInt16.insert("engine->undefinedValue()", 0);
}
newRow(expr) << toUInt16.value(expr);
}
@@ -1736,6 +1758,8 @@ void tst_QScriptValue::equals_makeData(const char *expr)
equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")");
+ equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->nullValue()");
+ equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->undefinedValue()");
equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)");
equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
@@ -1743,6 +1767,8 @@ void tst_QScriptValue::equals_makeData(const char *expr)
equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"{}\")");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->nullValue()");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->undefinedValue()");
equals.insert("QScriptValue(true) <=> QScriptValue(true)");
equals.insert("QScriptValue(true) <=> QScriptValue(0, true)");
equals.insert("QScriptValue(true) <=> QScriptValue(engine, true)");
@@ -1937,6 +1963,8 @@ void tst_QScriptValue::equals_makeData(const char *expr)
equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")");
+ equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->nullValue()");
+ equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->undefinedValue()");
equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)");
equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
@@ -1944,6 +1972,8 @@ void tst_QScriptValue::equals_makeData(const char *expr)
equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"{}\")");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->nullValue()");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->undefinedValue()");
equals.insert("QScriptValue(0, true) <=> QScriptValue(true)");
equals.insert("QScriptValue(0, true) <=> QScriptValue(0, true)");
equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, true)");
@@ -2138,6 +2168,8 @@ void tst_QScriptValue::equals_makeData(const char *expr)
equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")");
+ equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->nullValue()");
+ equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->undefinedValue()");
equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)");
equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
@@ -2145,6 +2177,8 @@ void tst_QScriptValue::equals_makeData(const char *expr)
equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"{}\")");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->nullValue()");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->undefinedValue()");
equals.insert("QScriptValue(engine, true) <=> QScriptValue(true)");
equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, true)");
equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, true)");
@@ -2355,6 +2389,8 @@ void tst_QScriptValue::equals_makeData(const char *expr)
equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::NullValue)");
equals.insert("engine->evaluate(\"{}\") <=> engine->evaluate(\"{}\")");
+ equals.insert("engine->evaluate(\"{}\") <=> engine->nullValue()");
+ equals.insert("engine->evaluate(\"{}\") <=> engine->undefinedValue()");
equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object.prototype\")");
equals.insert("engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Date.prototype\")");
equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(false)");
@@ -2401,6 +2437,24 @@ void tst_QScriptValue::equals_makeData(const char *expr)
equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString())");
equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Array()\")");
equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Error()\")");
+ equals.insert("engine->nullValue() <=> QScriptValue(QScriptValue::UndefinedValue)");
+ equals.insert("engine->nullValue() <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("engine->nullValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)");
+ equals.insert("engine->nullValue() <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("engine->nullValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
+ equals.insert("engine->nullValue() <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("engine->nullValue() <=> engine->evaluate(\"{}\")");
+ equals.insert("engine->nullValue() <=> engine->nullValue()");
+ equals.insert("engine->nullValue() <=> engine->undefinedValue()");
+ equals.insert("engine->undefinedValue() <=> QScriptValue(QScriptValue::UndefinedValue)");
+ equals.insert("engine->undefinedValue() <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("engine->undefinedValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)");
+ equals.insert("engine->undefinedValue() <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
+ equals.insert("engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("engine->undefinedValue() <=> engine->evaluate(\"{}\")");
+ equals.insert("engine->undefinedValue() <=> engine->nullValue()");
+ equals.insert("engine->undefinedValue() <=> engine->undefinedValue()");
}
QHash<QString, QScriptValue>::const_iterator it;
for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {
@@ -2435,9 +2489,11 @@ void tst_QScriptValue::strictlyEquals_makeData(const char *expr)
equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")");
+ equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->undefinedValue()");
equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)");
equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)");
equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->nullValue()");
equals.insert("QScriptValue(true) <=> QScriptValue(true)");
equals.insert("QScriptValue(true) <=> QScriptValue(0, true)");
equals.insert("QScriptValue(true) <=> QScriptValue(engine, true)");
@@ -2530,9 +2586,11 @@ void tst_QScriptValue::strictlyEquals_makeData(const char *expr)
equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")");
+ equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->undefinedValue()");
equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)");
equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)");
equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->nullValue()");
equals.insert("QScriptValue(0, true) <=> QScriptValue(true)");
equals.insert("QScriptValue(0, true) <=> QScriptValue(0, true)");
equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, true)");
@@ -2625,9 +2683,11 @@ void tst_QScriptValue::strictlyEquals_makeData(const char *expr)
equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")");
+ equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->undefinedValue()");
equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)");
equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)");
equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->nullValue()");
equals.insert("QScriptValue(engine, true) <=> QScriptValue(true)");
equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, true)");
equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, true)");
@@ -2721,6 +2781,7 @@ void tst_QScriptValue::strictlyEquals_makeData(const char *expr)
equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::UndefinedValue)");
equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
equals.insert("engine->evaluate(\"{}\") <=> engine->evaluate(\"{}\")");
+ equals.insert("engine->evaluate(\"{}\") <=> engine->undefinedValue()");
equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object.prototype\")");
equals.insert("engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Date.prototype\")");
equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array.prototype\")");
@@ -2737,6 +2798,15 @@ void tst_QScriptValue::strictlyEquals_makeData(const char *expr)
equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"new Object()\")");
equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Array()\")");
equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Error()\")");
+ equals.insert("engine->nullValue() <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("engine->nullValue() <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("engine->nullValue() <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("engine->nullValue() <=> engine->nullValue()");
+ equals.insert("engine->undefinedValue() <=> QScriptValue(QScriptValue::UndefinedValue)");
+ equals.insert("engine->undefinedValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)");
+ equals.insert("engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
+ equals.insert("engine->undefinedValue() <=> engine->evaluate(\"{}\")");
+ equals.insert("engine->undefinedValue() <=> engine->undefinedValue()");
}
QHash<QString, QScriptValue>::const_iterator it;
for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {
@@ -3090,6 +3160,7 @@ void tst_QScriptValue::lessThan_makeData(const char *expr)
equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"[]\")");
equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"Array.prototype\")");
equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(-6.37e-8) <=> engine->nullValue()");
equals.insert("QScriptValue(0x43211234) <=> QScriptValue(qInf())");
equals.insert("QScriptValue(0x43211234) <=> QScriptValue(\"Infinity\")");
equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, qInf())");
@@ -3180,6 +3251,7 @@ void tst_QScriptValue::lessThan_makeData(const char *expr)
equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"[]\")");
equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"Array.prototype\")");
equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(-qInf()) <=> engine->nullValue()");
equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(\"ciao\")");
equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, \"ciao\")");
@@ -3291,6 +3363,7 @@ void tst_QScriptValue::lessThan_makeData(const char *expr)
equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"/foo/\")");
equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Object()\")");
equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Error()\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> engine->nullValue()");
equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Function.prototype\")");
equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Object\")");
equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Array\")");
@@ -3903,6 +3976,7 @@ void tst_QScriptValue::lessThan_makeData(const char *expr)
equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"[]\")");
equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"Array.prototype\")");
equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> engine->nullValue()");
equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(qInf())");
equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(\"Infinity\")");
equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, qInf())");
@@ -3993,6 +4067,7 @@ void tst_QScriptValue::lessThan_makeData(const char *expr)
equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"[]\")");
equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"Array.prototype\")");
equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(0, -qInf()) <=> engine->nullValue()");
equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(\"ciao\")");
equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"ciao\")");
@@ -4104,6 +4179,7 @@ void tst_QScriptValue::lessThan_makeData(const char *expr)
equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"/foo/\")");
equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Object()\")");
equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Error()\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->nullValue()");
equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Function.prototype\")");
equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Object\")");
equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Array\")");
@@ -4717,6 +4793,7 @@ void tst_QScriptValue::lessThan_makeData(const char *expr)
equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"[]\")");
equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"Array.prototype\")");
equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->nullValue()");
equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(qInf())");
equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(\"Infinity\")");
equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, qInf())");
@@ -4807,6 +4884,7 @@ void tst_QScriptValue::lessThan_makeData(const char *expr)
equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"[]\")");
equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"Array.prototype\")");
equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(engine, -qInf()) <=> engine->nullValue()");
equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(\"ciao\")");
equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"ciao\")");
@@ -4918,6 +4996,7 @@ void tst_QScriptValue::lessThan_makeData(const char *expr)
equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"/foo/\")");
equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Object()\")");
equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Error()\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->nullValue()");
equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Function.prototype\")");
equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Object\")");
equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Array\")");
@@ -5533,6 +5612,42 @@ void tst_QScriptValue::lessThan_makeData(const char *expr)
equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Object()\")");
+ equals.insert("engine->nullValue() <=> QScriptValue(true)");
+ equals.insert("engine->nullValue() <=> QScriptValue(int(122))");
+ equals.insert("engine->nullValue() <=> QScriptValue(uint(124))");
+ equals.insert("engine->nullValue() <=> QScriptValue(123.0)");
+ equals.insert("engine->nullValue() <=> QScriptValue(6.37e-8)");
+ equals.insert("engine->nullValue() <=> QScriptValue(0x43211234)");
+ equals.insert("engine->nullValue() <=> QScriptValue(0x10000)");
+ equals.insert("engine->nullValue() <=> QScriptValue(0x10001)");
+ equals.insert("engine->nullValue() <=> QScriptValue(qInf())");
+ equals.insert("engine->nullValue() <=> QScriptValue(\"Infinity\")");
+ equals.insert("engine->nullValue() <=> QScriptValue(QString(\"123\"))");
+ equals.insert("engine->nullValue() <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("engine->nullValue() <=> QScriptValue(0, true)");
+ equals.insert("engine->nullValue() <=> QScriptValue(0, int(122))");
+ equals.insert("engine->nullValue() <=> QScriptValue(0, uint(124))");
+ equals.insert("engine->nullValue() <=> QScriptValue(0, 123.0)");
+ equals.insert("engine->nullValue() <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("engine->nullValue() <=> QScriptValue(0, 0x43211234)");
+ equals.insert("engine->nullValue() <=> QScriptValue(0, 0x10000)");
+ equals.insert("engine->nullValue() <=> QScriptValue(0, 0x10001)");
+ equals.insert("engine->nullValue() <=> QScriptValue(0, qInf())");
+ equals.insert("engine->nullValue() <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("engine->nullValue() <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("engine->nullValue() <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("engine->nullValue() <=> QScriptValue(engine, true)");
+ equals.insert("engine->nullValue() <=> QScriptValue(engine, int(122))");
+ equals.insert("engine->nullValue() <=> QScriptValue(engine, uint(124))");
+ equals.insert("engine->nullValue() <=> QScriptValue(engine, 123.0)");
+ equals.insert("engine->nullValue() <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("engine->nullValue() <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("engine->nullValue() <=> QScriptValue(engine, 0x10000)");
+ equals.insert("engine->nullValue() <=> QScriptValue(engine, 0x10001)");
+ equals.insert("engine->nullValue() <=> QScriptValue(engine, qInf())");
+ equals.insert("engine->nullValue() <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("engine->nullValue() <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("engine->nullValue() <=> QScriptValue(engine, QString(\"1.23\"))");
}
QHash<QString, QScriptValue>::const_iterator it;
for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {
@@ -5718,6 +5833,8 @@ void tst_QScriptValue::qscriptvalue_castQString_makeData(const char* expr)
value.insert("engine->evaluate(\"new Object()\")", "[object Object]");
value.insert("engine->evaluate(\"new Array()\")", "");
value.insert("engine->evaluate(\"new Error()\")", "Error: Unknown error");
+ value.insert("engine->nullValue()", "");
+ value.insert("engine->undefinedValue()", "");
}
newRow(expr) << value.value(expr);
}
@@ -5844,6 +5961,8 @@ void tst_QScriptValue::qscriptvalue_castqsreal_makeData(const char* expr)
value.insert("engine->evaluate(\"new Object()\")", qQNaN());
value.insert("engine->evaluate(\"new Array()\")", 0);
value.insert("engine->evaluate(\"new Error()\")", qQNaN());
+ value.insert("engine->nullValue()", 0);
+ value.insert("engine->undefinedValue()", qQNaN());
}
newRow(expr) << value.value(expr);
}
@@ -5978,6 +6097,8 @@ void tst_QScriptValue::qscriptvalue_castbool_makeData(const char* expr)
value.insert("engine->evaluate(\"new Object()\")", true);
value.insert("engine->evaluate(\"new Array()\")", true);
value.insert("engine->evaluate(\"new Error()\")", true);
+ value.insert("engine->nullValue()", false);
+ value.insert("engine->undefinedValue()", false);
}
newRow(expr) << value.value(expr);
}
@@ -6104,6 +6225,8 @@ void tst_QScriptValue::qscriptvalue_castqint32_makeData(const char* expr)
value.insert("engine->evaluate(\"new Object()\")", 0);
value.insert("engine->evaluate(\"new Array()\")", 0);
value.insert("engine->evaluate(\"new Error()\")", 0);
+ value.insert("engine->nullValue()", 0);
+ value.insert("engine->undefinedValue()", 0);
}
newRow(expr) << value.value(expr);
}
@@ -6230,6 +6353,8 @@ void tst_QScriptValue::qscriptvalue_castquint32_makeData(const char* expr)
value.insert("engine->evaluate(\"new Object()\")", 0);
value.insert("engine->evaluate(\"new Array()\")", 0);
value.insert("engine->evaluate(\"new Error()\")", 0);
+ value.insert("engine->nullValue()", 0);
+ value.insert("engine->undefinedValue()", 0);
}
newRow(expr) << value.value(expr);
}
@@ -6356,6 +6481,8 @@ void tst_QScriptValue::qscriptvalue_castquint16_makeData(const char* expr)
value.insert("engine->evaluate(\"new Object()\")", 0);
value.insert("engine->evaluate(\"new Array()\")", 0);
value.insert("engine->evaluate(\"new Error()\")", 0);
+ value.insert("engine->nullValue()", 0);
+ value.insert("engine->undefinedValue()", 0);
}
newRow(expr) << value.value(expr);
}
diff --git a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp
index 5b61da2..fe084fa 100644
--- a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp
+++ b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp
@@ -202,6 +202,8 @@ private slots:
void sqlStatementUseIsNull_189093_data() { generic_data(); }
void sqlStatementUseIsNull_189093();
+ void sqlite_enable_cache_mode_data() { generic_data("QSQLITE"); }
+ void sqlite_enable_cache_mode();
private:
void createTestTables(QSqlDatabase db);
@@ -2485,5 +2487,23 @@ void tst_QSqlDatabase::oci_tables()
QVERIFY(db.tables(QSql::SystemTables).contains(systemTableName.toUpper()));
}
+void tst_QSqlDatabase::sqlite_enable_cache_mode()
+{
+ QFETCH(QString, dbName);
+ if(dbName.endsWith(":memory:"))
+ QSKIP( "cache mode is meaningless for :memory: databases", SkipSingle );
+ QSqlDatabase db = QSqlDatabase::database(dbName);
+ CHECK_DATABASE(db);
+ db.close();
+ db.setConnectOptions("QSQLITE_ENABLE_SHARED_CACHE");
+ QVERIFY_SQL(db, open());
+ QSqlDatabase db2 = QSqlDatabase::cloneDatabase(db, dbName+":cachemodeconn2");
+ db2.setConnectOptions("QSQLITE_ENABLE_SHARED_CACHE");
+ QVERIFY_SQL(db2, open());
+ QSqlQuery q(db), q2(db2);
+ QVERIFY_SQL(q, exec("select * from "+qTableName("qtest")));
+ QVERIFY_SQL(q2, exec("select * from "+qTableName("qtest")));
+}
+
QTEST_MAIN(tst_QSqlDatabase)
#include "tst_qsqldatabase.moc"
diff --git a/tests/auto/qtextcodec/tst_qtextcodec.cpp b/tests/auto/qtextcodec/tst_qtextcodec.cpp
index eb348fb..65b0448 100644
--- a/tests/auto/qtextcodec/tst_qtextcodec.cpp
+++ b/tests/auto/qtextcodec/tst_qtextcodec.cpp
@@ -47,6 +47,8 @@
#include <qtextdocument.h>
#include <time.h>
#include <qprocess.h>
+#include <QtConcurrentMap>
+#include <QThreadPool>
#ifdef Q_OS_SYMBIAN
#define SRCDIR ""
@@ -58,6 +60,9 @@ class tst_QTextCodec : public QObject
Q_OBJECT
private slots:
+
+ void threadSafety();
+
void toUnicode_data();
void toUnicode();
void codecForName_data();
@@ -1904,5 +1909,46 @@ void tst_QTextCodec::toLocal8Bit()
}
#endif
+static QByteArray loadAndConvert(const QByteArray &codecName)
+{
+ QTextCodec *c = QTextCodec::codecForName(codecName);
+ if (!c) {
+ qDebug() << "WARNING " << codecName << " not found? ";
+ return QByteArray();
+ }
+ QString str = QString::fromLatin1(codecName);
+ QByteArray b = c->fromUnicode(str);
+ c->toUnicode(b);
+ return codecName;
+}
+
+static int loadAndConvertMIB(int mib)
+{
+ QTextCodec *c = QTextCodec::codecForMib(mib);
+ if (!c) {
+ qDebug() << "WARNING " << mib << " not found? ";
+ return 0;
+ }
+ QString str = QString::number(mib);
+ QByteArray b = c->fromUnicode(str);
+ c->toUnicode(b);
+ return mib;
+}
+
+
+void tst_QTextCodec::threadSafety()
+{
+ QThreadPool::globalInstance()->setMaxThreadCount(12);
+
+ QList<QByteArray> codecList = QTextCodec::availableCodecs();
+ QFuture<QByteArray> res = QtConcurrent::mapped(codecList, loadAndConvert);
+
+ QList<int> mibList = QTextCodec::availableMibs();
+ QFuture<int> res2 = QtConcurrent::mapped(mibList, loadAndConvertMIB);
+
+ QCOMPARE(res.results(), codecList);
+ QCOMPARE(res2.results(), mibList);
+}
+
QTEST_MAIN(tst_QTextCodec)
#include "tst_qtextcodec.moc"
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 03eddee..b59017b 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -250,6 +250,7 @@ private slots:
#else
void persistentWinId();
#endif
+ void showNativeChild();
void qobject_castInDestroyedSlot();
void showHideEvent_data();
@@ -4586,6 +4587,16 @@ void tst_QWidget::persistentWinId()
}
#endif // Q_OS_SYMBIAN
+void tst_QWidget::showNativeChild()
+{
+ QWidget topLevel;
+ topLevel.setGeometry(0, 0, 100, 100);
+ QWidget child(&topLevel);
+ child.winId();
+ topLevel.show();
+ QTest::qWaitForWindowShown(&topLevel);
+}
+
class ShowHideEventWidget : public QWidget
{
public:
diff --git a/tests/benchmarks/benchmarks.pro b/tests/benchmarks/benchmarks.pro
index a7ec85b..e318d02 100644
--- a/tests/benchmarks/benchmarks.pro
+++ b/tests/benchmarks/benchmarks.pro
@@ -1,47 +1,10 @@
TEMPLATE = subdirs
-SUBDIRS = containers-associative \
- containers-sequential \
- qanimation \
- qbytearray \
- qfileinfo \
- qfile_vs_qnetworkaccessmanager \
- qfontmetrics \
- qhostinfo \
- qpainter \
- qtestlib-simple events \
- qtext \
- qiodevice \
- qpixmap \
- blendbench \
- qstring \
- qstringlist \
- qmatrix4x4 \
- qnetworkreply \
- qobject \
- qrect \
- qregexp \
- qregion \
- qvariant \
- qwidget \
- qtwidgets \
- qapplication \
- qdir \
- qdiriterator \
- qgraphicsanchorlayout \
- qgraphicsitem \
- qgraphicswidget \
- qmetaobject \
- qpixmapcache \
- qquaternion \
- qscriptclass \
- qscriptengine \
- qscriptvalue \
- qstringbuilder \
- qstylesheetstyle \
- qsvgrenderer \
- qtcpserver \
- qtableview \
- qthreadstorage
+SUBDIRS = \
+ corelib \
+ gui \
+ network \
+ script \
+ svg
contains(QT_CONFIG, opengl): SUBDIRS += opengl
contains(QT_CONFIG, declarative): SUBDIRS += declarative
diff --git a/tests/benchmarks/corelib/corelib.pro b/tests/benchmarks/corelib/corelib.pro
new file mode 100644
index 0000000..72fca33
--- /dev/null
+++ b/tests/benchmarks/corelib/corelib.pro
@@ -0,0 +1,6 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ io \
+ kernel \
+ thread \
+ tools
diff --git a/tests/benchmarks/corelib/io/io.pro b/tests/benchmarks/corelib/io/io.pro
new file mode 100644
index 0000000..97445d7
--- /dev/null
+++ b/tests/benchmarks/corelib/io/io.pro
@@ -0,0 +1,9 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ qdir \
+ qdiriterator \
+ qfile \
+ qfileinfo \
+ qiodevice \
+ qtemporaryfile
+
diff --git a/tests/benchmarks/qdir/qdir.pro b/tests/benchmarks/corelib/io/qdir/qdir.pro
index 2cdebfd..2cdebfd 100644
--- a/tests/benchmarks/qdir/qdir.pro
+++ b/tests/benchmarks/corelib/io/qdir/qdir.pro
diff --git a/tests/benchmarks/qdir/tst_qdir.cpp b/tests/benchmarks/corelib/io/qdir/tst_qdir.cpp
index aea9fd0..aea9fd0 100644
--- a/tests/benchmarks/qdir/tst_qdir.cpp
+++ b/tests/benchmarks/corelib/io/qdir/tst_qdir.cpp
diff --git a/tests/benchmarks/qdiriterator/main.cpp b/tests/benchmarks/corelib/io/qdiriterator/main.cpp
index afa6b7b..afa6b7b 100644
--- a/tests/benchmarks/qdiriterator/main.cpp
+++ b/tests/benchmarks/corelib/io/qdiriterator/main.cpp
diff --git a/tests/benchmarks/qdiriterator/qdiriterator.pro b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
index e06d746..e06d746 100755
--- a/tests/benchmarks/qdiriterator/qdiriterator.pro
+++ b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
diff --git a/tests/benchmarks/qdiriterator/qfilesystemiterator.cpp b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp
index 267d53f..267d53f 100644
--- a/tests/benchmarks/qdiriterator/qfilesystemiterator.cpp
+++ b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp
diff --git a/tests/benchmarks/qdiriterator/qfilesystemiterator.h b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h
index 4aad3a1..4aad3a1 100644
--- a/tests/benchmarks/qdiriterator/qfilesystemiterator.h
+++ b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h
diff --git a/tests/benchmarks/qfile/main.cpp b/tests/benchmarks/corelib/io/qfile/main.cpp
index 103b77c..103b77c 100644
--- a/tests/benchmarks/qfile/main.cpp
+++ b/tests/benchmarks/corelib/io/qfile/main.cpp
diff --git a/tests/benchmarks/qfile/qfile.pro b/tests/benchmarks/corelib/io/qfile/qfile.pro
index 99505c3..99505c3 100644
--- a/tests/benchmarks/qfile/qfile.pro
+++ b/tests/benchmarks/corelib/io/qfile/qfile.pro
diff --git a/tests/benchmarks/qfileinfo/main.cpp b/tests/benchmarks/corelib/io/qfileinfo/main.cpp
index 025787f..025787f 100644
--- a/tests/benchmarks/qfileinfo/main.cpp
+++ b/tests/benchmarks/corelib/io/qfileinfo/main.cpp
diff --git a/tests/benchmarks/qfileinfo/qfileinfo.pro b/tests/benchmarks/corelib/io/qfileinfo/qfileinfo.pro
index 295cb50..295cb50 100644
--- a/tests/benchmarks/qfileinfo/qfileinfo.pro
+++ b/tests/benchmarks/corelib/io/qfileinfo/qfileinfo.pro
diff --git a/tests/benchmarks/qiodevice/main.cpp b/tests/benchmarks/corelib/io/qiodevice/main.cpp
index 4af697c..4af697c 100644
--- a/tests/benchmarks/qiodevice/main.cpp
+++ b/tests/benchmarks/corelib/io/qiodevice/main.cpp
diff --git a/tests/benchmarks/qiodevice/qiodevice.pro b/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro
index 749a4d6..749a4d6 100755
--- a/tests/benchmarks/qiodevice/qiodevice.pro
+++ b/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro
diff --git a/tests/benchmarks/qtemporaryfile/main.cpp b/tests/benchmarks/corelib/io/qtemporaryfile/main.cpp
index 8b71189..8b71189 100644
--- a/tests/benchmarks/qtemporaryfile/main.cpp
+++ b/tests/benchmarks/corelib/io/qtemporaryfile/main.cpp
diff --git a/tests/benchmarks/qtemporaryfile/qtemporaryfile.pro b/tests/benchmarks/corelib/io/qtemporaryfile/qtemporaryfile.pro
index c1b04f4..c1b04f4 100644
--- a/tests/benchmarks/qtemporaryfile/qtemporaryfile.pro
+++ b/tests/benchmarks/corelib/io/qtemporaryfile/qtemporaryfile.pro
diff --git a/tests/benchmarks/events/events.pro b/tests/benchmarks/corelib/kernel/events/events.pro
index adf2317..adf2317 100644
--- a/tests/benchmarks/events/events.pro
+++ b/tests/benchmarks/corelib/kernel/events/events.pro
diff --git a/tests/benchmarks/events/main.cpp b/tests/benchmarks/corelib/kernel/events/main.cpp
index 0dd2c18..0dd2c18 100644
--- a/tests/benchmarks/events/main.cpp
+++ b/tests/benchmarks/corelib/kernel/events/main.cpp
diff --git a/tests/benchmarks/corelib/kernel/kernel.pro b/tests/benchmarks/corelib/kernel/kernel.pro
new file mode 100644
index 0000000..91cf3c5
--- /dev/null
+++ b/tests/benchmarks/corelib/kernel/kernel.pro
@@ -0,0 +1,6 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ events \
+ qmetaobject \
+ qobject \
+ qvariant
diff --git a/tests/benchmarks/qmetaobject/main.cpp b/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp
index eef6020..eef6020 100644
--- a/tests/benchmarks/qmetaobject/main.cpp
+++ b/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp
diff --git a/tests/benchmarks/qmetaobject/qmetaobject.pro b/tests/benchmarks/corelib/kernel/qmetaobject/qmetaobject.pro
index 78300f6..78300f6 100644
--- a/tests/benchmarks/qmetaobject/qmetaobject.pro
+++ b/tests/benchmarks/corelib/kernel/qmetaobject/qmetaobject.pro
diff --git a/tests/benchmarks/qobject/main.cpp b/tests/benchmarks/corelib/kernel/qobject/main.cpp
index 7f24ebd..7f24ebd 100644
--- a/tests/benchmarks/qobject/main.cpp
+++ b/tests/benchmarks/corelib/kernel/qobject/main.cpp
diff --git a/tests/benchmarks/qobject/object.cpp b/tests/benchmarks/corelib/kernel/qobject/object.cpp
index d775a32..d775a32 100644
--- a/tests/benchmarks/qobject/object.cpp
+++ b/tests/benchmarks/corelib/kernel/qobject/object.cpp
diff --git a/tests/benchmarks/qobject/object.h b/tests/benchmarks/corelib/kernel/qobject/object.h
index 7e4933f..7e4933f 100644
--- a/tests/benchmarks/qobject/object.h
+++ b/tests/benchmarks/corelib/kernel/qobject/object.h
diff --git a/tests/benchmarks/qobject/qobject.pro b/tests/benchmarks/corelib/kernel/qobject/qobject.pro
index 2855de4..2855de4 100644
--- a/tests/benchmarks/qobject/qobject.pro
+++ b/tests/benchmarks/corelib/kernel/qobject/qobject.pro
diff --git a/tests/benchmarks/qvariant/qvariant.pro b/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro
index 63b5442..63b5442 100644
--- a/tests/benchmarks/qvariant/qvariant.pro
+++ b/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro
diff --git a/tests/benchmarks/qvariant/tst_qvariant.cpp b/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp
index 82dc7dd..82dc7dd 100644
--- a/tests/benchmarks/qvariant/tst_qvariant.cpp
+++ b/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp
diff --git a/tests/benchmarks/qthreadstorage/qthreadstorage.pro b/tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro
index f9c1978..f9c1978 100644
--- a/tests/benchmarks/qthreadstorage/qthreadstorage.pro
+++ b/tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro
diff --git a/tests/benchmarks/qthreadstorage/tst_qthreadstorage.cpp b/tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
index faae4d7..faae4d7 100644
--- a/tests/benchmarks/qthreadstorage/tst_qthreadstorage.cpp
+++ b/tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
diff --git a/tests/benchmarks/corelib/thread/thread.pro b/tests/benchmarks/corelib/thread/thread.pro
new file mode 100644
index 0000000..26570ba
--- /dev/null
+++ b/tests/benchmarks/corelib/thread/thread.pro
@@ -0,0 +1,3 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ qthreadstorage
diff --git a/tests/benchmarks/containers-associative/containers-associative.pro b/tests/benchmarks/corelib/tools/containers-associative/containers-associative.pro
index c6f3fa6..c6f3fa6 100644
--- a/tests/benchmarks/containers-associative/containers-associative.pro
+++ b/tests/benchmarks/corelib/tools/containers-associative/containers-associative.pro
diff --git a/tests/benchmarks/containers-associative/main.cpp b/tests/benchmarks/corelib/tools/containers-associative/main.cpp
index 4c6dae4..4c6dae4 100644
--- a/tests/benchmarks/containers-associative/main.cpp
+++ b/tests/benchmarks/corelib/tools/containers-associative/main.cpp
diff --git a/tests/benchmarks/containers-sequential/containers-sequential.pro b/tests/benchmarks/corelib/tools/containers-sequential/containers-sequential.pro
index bf6db44..bf6db44 100644
--- a/tests/benchmarks/containers-sequential/containers-sequential.pro
+++ b/tests/benchmarks/corelib/tools/containers-sequential/containers-sequential.pro
diff --git a/tests/benchmarks/containers-sequential/main.cpp b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
index a6e405c..a6e405c 100644
--- a/tests/benchmarks/containers-sequential/main.cpp
+++ b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
diff --git a/tests/benchmarks/qbytearray/main.cpp b/tests/benchmarks/corelib/tools/qbytearray/main.cpp
index 22d4815..22d4815 100644
--- a/tests/benchmarks/qbytearray/main.cpp
+++ b/tests/benchmarks/corelib/tools/qbytearray/main.cpp
diff --git a/tests/benchmarks/qbytearray/qbytearray.pro b/tests/benchmarks/corelib/tools/qbytearray/qbytearray.pro
index a0bf021..a0bf021 100755
--- a/tests/benchmarks/qbytearray/qbytearray.pro
+++ b/tests/benchmarks/corelib/tools/qbytearray/qbytearray.pro
diff --git a/tests/benchmarks/qrect/main.cpp b/tests/benchmarks/corelib/tools/qrect/main.cpp
index e293bfa..e293bfa 100644
--- a/tests/benchmarks/qrect/main.cpp
+++ b/tests/benchmarks/corelib/tools/qrect/main.cpp
diff --git a/tests/benchmarks/qrect/qrect.pro b/tests/benchmarks/corelib/tools/qrect/qrect.pro
index 6e35119..6e35119 100644
--- a/tests/benchmarks/qrect/qrect.pro
+++ b/tests/benchmarks/corelib/tools/qrect/qrect.pro
diff --git a/tests/benchmarks/qregexp/main.cpp b/tests/benchmarks/corelib/tools/qregexp/main.cpp
index ab9ed71..ab9ed71 100644
--- a/tests/benchmarks/qregexp/main.cpp
+++ b/tests/benchmarks/corelib/tools/qregexp/main.cpp
diff --git a/tests/benchmarks/qregexp/qregexp.pro b/tests/benchmarks/corelib/tools/qregexp/qregexp.pro
index 83d723c..83d723c 100644
--- a/tests/benchmarks/qregexp/qregexp.pro
+++ b/tests/benchmarks/corelib/tools/qregexp/qregexp.pro
diff --git a/tests/benchmarks/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp
index 12826eb..12826eb 100644
--- a/tests/benchmarks/qstring/main.cpp
+++ b/tests/benchmarks/corelib/tools/qstring/main.cpp
diff --git a/tests/benchmarks/qstring/qstring.pro b/tests/benchmarks/corelib/tools/qstring/qstring.pro
index 2e7c86a..2e7c86a 100644
--- a/tests/benchmarks/qstring/qstring.pro
+++ b/tests/benchmarks/corelib/tools/qstring/qstring.pro
diff --git a/tests/benchmarks/qstring/utf-8.txt b/tests/benchmarks/corelib/tools/qstring/utf-8.txt
index a8a58de..a8a58de 100644
--- a/tests/benchmarks/qstring/utf-8.txt
+++ b/tests/benchmarks/corelib/tools/qstring/utf-8.txt
diff --git a/tests/benchmarks/qstringbuilder/main.cpp b/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp
index 9bd146f..9bd146f 100644
--- a/tests/benchmarks/qstringbuilder/main.cpp
+++ b/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp
diff --git a/tests/benchmarks/qstringbuilder/qstringbuilder.pro b/tests/benchmarks/corelib/tools/qstringbuilder/qstringbuilder.pro
index 79171b4..79171b4 100644
--- a/tests/benchmarks/qstringbuilder/qstringbuilder.pro
+++ b/tests/benchmarks/corelib/tools/qstringbuilder/qstringbuilder.pro
diff --git a/tests/benchmarks/qstringlist/.gitignore b/tests/benchmarks/corelib/tools/qstringlist/.gitignore
index 3e0cdc9..3e0cdc9 100644
--- a/tests/benchmarks/qstringlist/.gitignore
+++ b/tests/benchmarks/corelib/tools/qstringlist/.gitignore
diff --git a/tests/benchmarks/qstringlist/main.cpp b/tests/benchmarks/corelib/tools/qstringlist/main.cpp
index 1717b88..1717b88 100644
--- a/tests/benchmarks/qstringlist/main.cpp
+++ b/tests/benchmarks/corelib/tools/qstringlist/main.cpp
diff --git a/tests/benchmarks/qstringlist/qstringlist.pro b/tests/benchmarks/corelib/tools/qstringlist/qstringlist.pro
index 5c64b34..5c64b34 100644
--- a/tests/benchmarks/qstringlist/qstringlist.pro
+++ b/tests/benchmarks/corelib/tools/qstringlist/qstringlist.pro
diff --git a/tests/benchmarks/corelib/tools/tools.pro b/tests/benchmarks/corelib/tools/tools.pro
new file mode 100644
index 0000000..12c23fc
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/tools.pro
@@ -0,0 +1,10 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ containers-associative \
+ containers-sequential \
+ qbytearray \
+ qrect \
+ qregexp \
+ qstring \
+ qstringbuilder \
+ qstringlist
diff --git a/tests/benchmarks/gui/animation/animation.pro b/tests/benchmarks/gui/animation/animation.pro
new file mode 100644
index 0000000..a4ba273
--- /dev/null
+++ b/tests/benchmarks/gui/animation/animation.pro
@@ -0,0 +1,2 @@
+TEMPLATE = subdirs
+SUBDIRS = qanimation
diff --git a/tests/benchmarks/qanimation/dummyanimation.cpp b/tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp
index f79cc5b..f79cc5b 100644
--- a/tests/benchmarks/qanimation/dummyanimation.cpp
+++ b/tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp
diff --git a/tests/benchmarks/qanimation/dummyanimation.h b/tests/benchmarks/gui/animation/qanimation/dummyanimation.h
index 1df76be..1df76be 100644
--- a/tests/benchmarks/qanimation/dummyanimation.h
+++ b/tests/benchmarks/gui/animation/qanimation/dummyanimation.h
diff --git a/tests/benchmarks/qanimation/dummyobject.cpp b/tests/benchmarks/gui/animation/qanimation/dummyobject.cpp
index 2b66cda..2b66cda 100644
--- a/tests/benchmarks/qanimation/dummyobject.cpp
+++ b/tests/benchmarks/gui/animation/qanimation/dummyobject.cpp
diff --git a/tests/benchmarks/qanimation/dummyobject.h b/tests/benchmarks/gui/animation/qanimation/dummyobject.h
index 31614fd..31614fd 100644
--- a/tests/benchmarks/qanimation/dummyobject.h
+++ b/tests/benchmarks/gui/animation/qanimation/dummyobject.h
diff --git a/tests/benchmarks/qanimation/main.cpp b/tests/benchmarks/gui/animation/qanimation/main.cpp
index 8b9884e..8b9884e 100644
--- a/tests/benchmarks/qanimation/main.cpp
+++ b/tests/benchmarks/gui/animation/qanimation/main.cpp
diff --git a/tests/benchmarks/qanimation/qanimation.pro b/tests/benchmarks/gui/animation/qanimation/qanimation.pro
index 55cd75e..55cd75e 100644
--- a/tests/benchmarks/qanimation/qanimation.pro
+++ b/tests/benchmarks/gui/animation/qanimation/qanimation.pro
diff --git a/tests/benchmarks/qanimation/rectanimation.cpp b/tests/benchmarks/gui/animation/qanimation/rectanimation.cpp
index e6d7a7e..e6d7a7e 100644
--- a/tests/benchmarks/qanimation/rectanimation.cpp
+++ b/tests/benchmarks/gui/animation/qanimation/rectanimation.cpp
diff --git a/tests/benchmarks/qanimation/rectanimation.h b/tests/benchmarks/gui/animation/qanimation/rectanimation.h
index 42b9376..42b9376 100644
--- a/tests/benchmarks/qanimation/rectanimation.h
+++ b/tests/benchmarks/gui/animation/qanimation/rectanimation.h
diff --git a/tests/benchmarks/gui/graphicsview/graphicsview.pro b/tests/benchmarks/gui/graphicsview/graphicsview.pro
new file mode 100644
index 0000000..93c00d2
--- /dev/null
+++ b/tests/benchmarks/gui/graphicsview/graphicsview.pro
@@ -0,0 +1,7 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ qgraphicsanchorlayout \
+ qgraphicsitem \
+ qgraphicsscene \
+ qgraphicsview \
+ qgraphicswidget
diff --git a/tests/benchmarks/qgraphicsanchorlayout/qgraphicsanchorlayout.pro b/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/qgraphicsanchorlayout.pro
index 0d563b9..0d563b9 100644
--- a/tests/benchmarks/qgraphicsanchorlayout/qgraphicsanchorlayout.pro
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/qgraphicsanchorlayout.pro
diff --git a/tests/benchmarks/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
index 01285d1..01285d1 100644
--- a/tests/benchmarks/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
diff --git a/tests/benchmarks/qgraphicsitem/qgraphicsitem.pro b/tests/benchmarks/gui/graphicsview/qgraphicsitem/qgraphicsitem.pro
index 726bb96..726bb96 100644
--- a/tests/benchmarks/qgraphicsitem/qgraphicsitem.pro
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsitem/qgraphicsitem.pro
diff --git a/tests/benchmarks/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
index ac51072..ac51072 100644
--- a/tests/benchmarks/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
diff --git a/tests/benchmarks/qgraphicsscene/qgraphicsscene.pro b/tests/benchmarks/gui/graphicsview/qgraphicsscene/qgraphicsscene.pro
index b460e2a..b460e2a 100644
--- a/tests/benchmarks/qgraphicsscene/qgraphicsscene.pro
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsscene/qgraphicsscene.pro
diff --git a/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
index 5bd07f9..5bd07f9 100644
--- a/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp
index 77b86c1..77b86c1 100644
--- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp
diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.debug b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.debug
index 8fe1e5b..8fe1e5b 100644
--- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.debug
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.debug
Binary files differ
diff --git a/tests/benchmarks/qgraphicsview/chiptester/chip.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h
index 9db23f9..9db23f9 100644
--- a/tests/benchmarks/qgraphicsview/chiptester/chip.h
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h
diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.pro b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.pro
index 53fa23b..53fa23b 100644
--- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.pro
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.pro
diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/fileprint.png b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/fileprint.png
index ba7c02d..ba7c02d 100644
--- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/fileprint.png
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/fileprint.png
Binary files differ
diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/images.qrc b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/images.qrc
index c7cdf0c..c7cdf0c 100644
--- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/images.qrc
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/images.qrc
diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/main.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp
index ea2f94a..ea2f94a 100644
--- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/main.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp
diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/mainwindow.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp
index 452b42c..452b42c 100644
--- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/mainwindow.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp
diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/mainwindow.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h
index 558bbef..558bbef 100644
--- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/mainwindow.h
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h
diff --git a/tests/benchmarks/qgraphicsview/chiptester/qt4logo.png b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/qt4logo.png
index 157e86e..157e86e 100644
--- a/tests/benchmarks/qgraphicsview/chiptester/qt4logo.png
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/qt4logo.png
Binary files differ
diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/rotateleft.png b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/rotateleft.png
index 8cfa931..8cfa931 100644
--- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/rotateleft.png
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/rotateleft.png
Binary files differ
diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/rotateright.png b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/rotateright.png
index ec5e866..ec5e866 100644
--- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/rotateright.png
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/rotateright.png
Binary files differ
diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/view.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp
index 1028f42..1028f42 100644
--- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/view.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp
diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/view.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h
index fc5c226..fc5c226 100644
--- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/view.h
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h
diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/zoomin.png b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/zoomin.png
index 8b0daee..8b0daee 100644
--- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/zoomin.png
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/zoomin.png
Binary files differ
diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/zoomout.png b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/zoomout.png
index 1575dd2..1575dd2 100644
--- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/zoomout.png
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/zoomout.png
Binary files differ
diff --git a/tests/benchmarks/qgraphicsview/benchapps/moveItems/main.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp
index 527713f..527713f 100644
--- a/tests/benchmarks/qgraphicsview/benchapps/moveItems/main.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp
diff --git a/tests/benchmarks/qgraphicsview/benchapps/moveItems/moveItems.pro b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/moveItems.pro
index 28dcadc..28dcadc 100644
--- a/tests/benchmarks/qgraphicsview/benchapps/moveItems/moveItems.pro
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/moveItems.pro
diff --git a/tests/benchmarks/qgraphicsview/benchapps/scrolltest/main.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp
index 7419206..7419206 100644
--- a/tests/benchmarks/qgraphicsview/benchapps/scrolltest/main.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp
diff --git a/tests/benchmarks/qgraphicsview/benchapps/scrolltest/scrolltest.pro b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/scrolltest.pro
index 28dcadc..28dcadc 100644
--- a/tests/benchmarks/qgraphicsview/benchapps/scrolltest/scrolltest.pro
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/scrolltest.pro
diff --git a/tests/benchmarks/qgraphicsview/chiptester/chip.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.cpp
index 4c1020a..4c1020a 100644
--- a/tests/benchmarks/qgraphicsview/chiptester/chip.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.cpp
diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h
index 9db23f9..9db23f9 100644
--- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.h
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h
diff --git a/tests/benchmarks/qgraphicsview/chiptester/chiptester.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp
index 8cada67..8cada67 100644
--- a/tests/benchmarks/qgraphicsview/chiptester/chiptester.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp
diff --git a/tests/benchmarks/qgraphicsview/chiptester/chiptester.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h
index 1a73bb7..1a73bb7 100644
--- a/tests/benchmarks/qgraphicsview/chiptester/chiptester.h
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h
diff --git a/tests/benchmarks/qgraphicsview/chiptester/chiptester.pri b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.pri
index a9e0bf8..a9e0bf8 100644
--- a/tests/benchmarks/qgraphicsview/chiptester/chiptester.pri
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.pri
diff --git a/tests/benchmarks/qgraphicsview/chiptester/images.qrc b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/images.qrc
index 73e8620..73e8620 100644
--- a/tests/benchmarks/qgraphicsview/chiptester/images.qrc
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/images.qrc
diff --git a/tests/benchmarks/qgraphicsview/benchapps/chipTest/qt4logo.png b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/qt4logo.png
index 157e86e..157e86e 100644
--- a/tests/benchmarks/qgraphicsview/benchapps/chipTest/qt4logo.png
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/qt4logo.png
Binary files differ
diff --git a/tests/benchmarks/qgraphicsview/images/designer.png b/tests/benchmarks/gui/graphicsview/qgraphicsview/images/designer.png
index 0988fce..0988fce 100644
--- a/tests/benchmarks/qgraphicsview/images/designer.png
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/images/designer.png
Binary files differ
diff --git a/tests/benchmarks/qgraphicsview/images/wine-big.jpeg b/tests/benchmarks/gui/graphicsview/qgraphicsview/images/wine-big.jpeg
index 9900a50..9900a50 100644
--- a/tests/benchmarks/qgraphicsview/images/wine-big.jpeg
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/images/wine-big.jpeg
Binary files differ
diff --git a/tests/benchmarks/qgraphicsview/images/wine.jpeg b/tests/benchmarks/gui/graphicsview/qgraphicsview/images/wine.jpeg
index 8fe1d3a..8fe1d3a 100644
--- a/tests/benchmarks/qgraphicsview/images/wine.jpeg
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/images/wine.jpeg
Binary files differ
diff --git a/tests/benchmarks/qgraphicsview/qgraphicsview.pro b/tests/benchmarks/gui/graphicsview/qgraphicsview/qgraphicsview.pro
index 927d731..927d731 100644
--- a/tests/benchmarks/qgraphicsview/qgraphicsview.pro
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/qgraphicsview.pro
diff --git a/tests/benchmarks/qgraphicsview/qgraphicsview.qrc b/tests/benchmarks/gui/graphicsview/qgraphicsview/qgraphicsview.qrc
index 3681648..3681648 100644
--- a/tests/benchmarks/qgraphicsview/qgraphicsview.qrc
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/qgraphicsview.qrc
diff --git a/tests/benchmarks/qgraphicsview/random.data b/tests/benchmarks/gui/graphicsview/qgraphicsview/random.data
index 190a36c..190a36c 100644
--- a/tests/benchmarks/qgraphicsview/random.data
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/random.data
Binary files differ
diff --git a/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index 4cb07db..10e00a6 100644
--- a/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -555,7 +555,11 @@ void tst_QGraphicsView::imageRiver()
QFile file(":/random.data");
QVERIFY(file.open(QIODevice::ReadOnly));
QDataStream str(&file);
+#if defined(Q_OS_SYMBIAN)
+ for (int i = 0; i < 50; ++i) {
+#else
for (int i = 0; i < 100; ++i) {
+#endif
AnimatedPixmapItem *item;
if (direction == 0) item = new AnimatedPixmapItem((i % 4) + 1, 0, rotation, scale);
if (direction == 1) item = new AnimatedPixmapItem(0, (i % 4) + 1, rotation, scale);
@@ -574,7 +578,11 @@ void tst_QGraphicsView::imageRiver()
#ifdef CALLGRIND_DEBUG
CALLGRIND_START_INSTRUMENTATION
#endif
+#if defined(Q_OS_SYMBIAN)
+ for (int i = 0; i < 50; ++i) {
+#else
for (int i = 0; i < 100; ++i) {
+#endif
scene.advance();
while (view.count < (i+1))
qApp->processEvents();
@@ -669,7 +677,11 @@ void tst_QGraphicsView::textRiver()
QFile file(":/random.data");
QVERIFY(file.open(QIODevice::ReadOnly));
QDataStream str(&file);
+#if defined(Q_OS_SYMBIAN)
+ for (int i = 0; i < 50; ++i) {
+#else
for (int i = 0; i < 100; ++i) {
+#endif
AnimatedTextItem *item;
if (direction == 0) item = new AnimatedTextItem((i % 4) + 1, 0, rotation, scale);
if (direction == 1) item = new AnimatedTextItem(0, (i % 4) + 1, rotation, scale);
@@ -687,7 +699,11 @@ void tst_QGraphicsView::textRiver()
#ifdef CALLGRIND_DEBUG
CALLGRIND_START_INSTRUMENTATION
#endif
+#if defined(Q_OS_SYMBIAN)
+ for (int i = 0; i < 50; ++i) {
+#else
for (int i = 0; i < 100; ++i) {
+#endif
scene.advance();
while (view.count < (i+1))
qApp->processEvents();
@@ -771,7 +787,11 @@ void tst_QGraphicsView::moveItemCache()
QFile file(":/random.data");
QVERIFY(file.open(QIODevice::ReadOnly));
QDataStream str(&file);
+#if defined(Q_OS_SYMBIAN)
+ for (int i = 0; i < 5; ++i) {
+#else
for (int i = 0; i < 50; ++i) {
+#endif
AnimatedPixmapCacheItem *item;
if (direction == 0) item = new AnimatedPixmapCacheItem((i % 4) + 1, 0);
if (direction == 1) item = new AnimatedPixmapCacheItem(0, (i % 4) + 1);
@@ -793,7 +813,11 @@ void tst_QGraphicsView::moveItemCache()
#ifdef CALLGRIND_DEBUG
CALLGRIND_START_INSTRUMENTATION
#endif
+#if defined(Q_OS_SYMBIAN)
+ for (int i = 0; i < 50; ++i) {
+#else
for (int i = 0; i < 100; ++i) {
+#endif
scene.advance();
while (view.count < (i+1))
qApp->processEvents();
@@ -893,7 +917,11 @@ void tst_QGraphicsView::paintItemCache()
#ifdef CALLGRIND_DEBUG
CALLGRIND_START_INSTRUMENTATION
#endif
+#if defined(Q_OS_SYMBIAN)
+ for (int i = 0; i < 5; ++i) {
+#else
for (int i = 0; i < 50; ++i) {
+#endif
scene.advance();
while (view.count < (i+1))
qApp->processEvents();
diff --git a/tests/benchmarks/qgraphicswidget/qgraphicswidget.pro b/tests/benchmarks/gui/graphicsview/qgraphicswidget/qgraphicswidget.pro
index f1ec54e..f1ec54e 100644
--- a/tests/benchmarks/qgraphicswidget/qgraphicswidget.pro
+++ b/tests/benchmarks/gui/graphicsview/qgraphicswidget/qgraphicswidget.pro
diff --git a/tests/benchmarks/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/benchmarks/gui/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
index 7db98ce..7db98ce 100644
--- a/tests/benchmarks/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
diff --git a/tests/benchmarks/gui/gui.pro b/tests/benchmarks/gui/gui.pro
new file mode 100644
index 0000000..946f184
--- /dev/null
+++ b/tests/benchmarks/gui/gui.pro
@@ -0,0 +1,11 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ animation \
+ graphicsview \
+ image \
+ itemviews \
+ kernel \
+ math3d \
+ painting \
+ styles \
+ text
diff --git a/tests/benchmarks/blendbench/blendbench.pro b/tests/benchmarks/gui/image/blendbench/blendbench.pro
index a3228c5..a3228c5 100644
--- a/tests/benchmarks/blendbench/blendbench.pro
+++ b/tests/benchmarks/gui/image/blendbench/blendbench.pro
diff --git a/tests/benchmarks/blendbench/main.cpp b/tests/benchmarks/gui/image/blendbench/main.cpp
index 92d1633..92d1633 100644
--- a/tests/benchmarks/blendbench/main.cpp
+++ b/tests/benchmarks/gui/image/blendbench/main.cpp
diff --git a/tests/benchmarks/gui/image/image.pro b/tests/benchmarks/gui/image/image.pro
new file mode 100644
index 0000000..3094e72
--- /dev/null
+++ b/tests/benchmarks/gui/image/image.pro
@@ -0,0 +1,6 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ blendbench \
+ qimagereader \
+ qpixmap \
+ qpixmapcache
diff --git a/tests/benchmarks/qimagereader/images/16bpp.bmp b/tests/benchmarks/gui/image/qimagereader/images/16bpp.bmp
index 74ce63e..74ce63e 100644
--- a/tests/benchmarks/qimagereader/images/16bpp.bmp
+++ b/tests/benchmarks/gui/image/qimagereader/images/16bpp.bmp
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/4bpp-rle.bmp b/tests/benchmarks/gui/image/qimagereader/images/4bpp-rle.bmp
index ae71e67..ae71e67 100644
--- a/tests/benchmarks/qimagereader/images/4bpp-rle.bmp
+++ b/tests/benchmarks/gui/image/qimagereader/images/4bpp-rle.bmp
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/YCbCr_cmyk.jpg b/tests/benchmarks/gui/image/qimagereader/images/YCbCr_cmyk.jpg
index b8aa9ea..b8aa9ea 100644
--- a/tests/benchmarks/qimagereader/images/YCbCr_cmyk.jpg
+++ b/tests/benchmarks/gui/image/qimagereader/images/YCbCr_cmyk.jpg
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/YCbCr_cmyk.png b/tests/benchmarks/gui/image/qimagereader/images/YCbCr_cmyk.png
index a24db1b..a24db1b 100644
--- a/tests/benchmarks/qimagereader/images/YCbCr_cmyk.png
+++ b/tests/benchmarks/gui/image/qimagereader/images/YCbCr_cmyk.png
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/YCbCr_rgb.jpg b/tests/benchmarks/gui/image/qimagereader/images/YCbCr_rgb.jpg
index 8771224..8771224 100644
--- a/tests/benchmarks/qimagereader/images/YCbCr_rgb.jpg
+++ b/tests/benchmarks/gui/image/qimagereader/images/YCbCr_rgb.jpg
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/away.png b/tests/benchmarks/gui/image/qimagereader/images/away.png
index 0e21a37..0e21a37 100644
--- a/tests/benchmarks/qimagereader/images/away.png
+++ b/tests/benchmarks/gui/image/qimagereader/images/away.png
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/ball.mng b/tests/benchmarks/gui/image/qimagereader/images/ball.mng
index 8154478..8154478 100644
--- a/tests/benchmarks/qimagereader/images/ball.mng
+++ b/tests/benchmarks/gui/image/qimagereader/images/ball.mng
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/bat1.gif b/tests/benchmarks/gui/image/qimagereader/images/bat1.gif
index cb6f4f7..cb6f4f7 100644
--- a/tests/benchmarks/qimagereader/images/bat1.gif
+++ b/tests/benchmarks/gui/image/qimagereader/images/bat1.gif
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/bat2.gif b/tests/benchmarks/gui/image/qimagereader/images/bat2.gif
index fbbda4e..fbbda4e 100644
--- a/tests/benchmarks/qimagereader/images/bat2.gif
+++ b/tests/benchmarks/gui/image/qimagereader/images/bat2.gif
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/beavis.jpg b/tests/benchmarks/gui/image/qimagereader/images/beavis.jpg
index d555047..d555047 100644
--- a/tests/benchmarks/qimagereader/images/beavis.jpg
+++ b/tests/benchmarks/gui/image/qimagereader/images/beavis.jpg
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/black.png b/tests/benchmarks/gui/image/qimagereader/images/black.png
index 6c94085..6c94085 100644
--- a/tests/benchmarks/qimagereader/images/black.png
+++ b/tests/benchmarks/gui/image/qimagereader/images/black.png
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/black.xpm b/tests/benchmarks/gui/image/qimagereader/images/black.xpm
index d7925bf..d7925bf 100644
--- a/tests/benchmarks/qimagereader/images/black.xpm
+++ b/tests/benchmarks/gui/image/qimagereader/images/black.xpm
diff --git a/tests/benchmarks/qimagereader/images/colorful.bmp b/tests/benchmarks/gui/image/qimagereader/images/colorful.bmp
index 8ea6f4a..8ea6f4a 100644
--- a/tests/benchmarks/qimagereader/images/colorful.bmp
+++ b/tests/benchmarks/gui/image/qimagereader/images/colorful.bmp
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/corrupt-colors.xpm b/tests/benchmarks/gui/image/qimagereader/images/corrupt-colors.xpm
index f8d80ed..f8d80ed 100644
--- a/tests/benchmarks/qimagereader/images/corrupt-colors.xpm
+++ b/tests/benchmarks/gui/image/qimagereader/images/corrupt-colors.xpm
diff --git a/tests/benchmarks/qimagereader/images/corrupt-data.tif b/tests/benchmarks/gui/image/qimagereader/images/corrupt-data.tif
index d63c688..d63c688 100644
--- a/tests/benchmarks/qimagereader/images/corrupt-data.tif
+++ b/tests/benchmarks/gui/image/qimagereader/images/corrupt-data.tif
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/corrupt-pixels.xpm b/tests/benchmarks/gui/image/qimagereader/images/corrupt-pixels.xpm
index 21031ee..21031ee 100644
--- a/tests/benchmarks/qimagereader/images/corrupt-pixels.xpm
+++ b/tests/benchmarks/gui/image/qimagereader/images/corrupt-pixels.xpm
diff --git a/tests/benchmarks/qimagereader/images/corrupt.bmp b/tests/benchmarks/gui/image/qimagereader/images/corrupt.bmp
index 824190b..824190b 100644
--- a/tests/benchmarks/qimagereader/images/corrupt.bmp
+++ b/tests/benchmarks/gui/image/qimagereader/images/corrupt.bmp
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/corrupt.gif b/tests/benchmarks/gui/image/qimagereader/images/corrupt.gif
index 0725945..0725945 100644
--- a/tests/benchmarks/qimagereader/images/corrupt.gif
+++ b/tests/benchmarks/gui/image/qimagereader/images/corrupt.gif
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/corrupt.jpg b/tests/benchmarks/gui/image/qimagereader/images/corrupt.jpg
index 1959662..1959662 100644
--- a/tests/benchmarks/qimagereader/images/corrupt.jpg
+++ b/tests/benchmarks/gui/image/qimagereader/images/corrupt.jpg
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/corrupt.mng b/tests/benchmarks/gui/image/qimagereader/images/corrupt.mng
index 17fd43a..17fd43a 100644
--- a/tests/benchmarks/qimagereader/images/corrupt.mng
+++ b/tests/benchmarks/gui/image/qimagereader/images/corrupt.mng
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/corrupt.png b/tests/benchmarks/gui/image/qimagereader/images/corrupt.png
index 9d8911c..9d8911c 100644
--- a/tests/benchmarks/qimagereader/images/corrupt.png
+++ b/tests/benchmarks/gui/image/qimagereader/images/corrupt.png
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/corrupt.xbm b/tests/benchmarks/gui/image/qimagereader/images/corrupt.xbm
index 8510634..8510634 100644
--- a/tests/benchmarks/qimagereader/images/corrupt.xbm
+++ b/tests/benchmarks/gui/image/qimagereader/images/corrupt.xbm
diff --git a/tests/benchmarks/qimagereader/images/crash-signed-char.bmp b/tests/benchmarks/gui/image/qimagereader/images/crash-signed-char.bmp
index b35cda6..b35cda6 100644
--- a/tests/benchmarks/qimagereader/images/crash-signed-char.bmp
+++ b/tests/benchmarks/gui/image/qimagereader/images/crash-signed-char.bmp
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/earth.gif b/tests/benchmarks/gui/image/qimagereader/images/earth.gif
index 2c229eb..2c229eb 100644
--- a/tests/benchmarks/qimagereader/images/earth.gif
+++ b/tests/benchmarks/gui/image/qimagereader/images/earth.gif
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/fire.mng b/tests/benchmarks/gui/image/qimagereader/images/fire.mng
index c6695c8..c6695c8 100644
--- a/tests/benchmarks/qimagereader/images/fire.mng
+++ b/tests/benchmarks/gui/image/qimagereader/images/fire.mng
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/font.bmp b/tests/benchmarks/gui/image/qimagereader/images/font.bmp
index 28b8c66..28b8c66 100644
--- a/tests/benchmarks/qimagereader/images/font.bmp
+++ b/tests/benchmarks/gui/image/qimagereader/images/font.bmp
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/gnus.xbm b/tests/benchmarks/gui/image/qimagereader/images/gnus.xbm
index 58d1ac8..58d1ac8 100644
--- a/tests/benchmarks/qimagereader/images/gnus.xbm
+++ b/tests/benchmarks/gui/image/qimagereader/images/gnus.xbm
diff --git a/tests/benchmarks/qimagereader/images/image.pbm b/tests/benchmarks/gui/image/qimagereader/images/image.pbm
index 67e5efa..67e5efa 100644
--- a/tests/benchmarks/qimagereader/images/image.pbm
+++ b/tests/benchmarks/gui/image/qimagereader/images/image.pbm
diff --git a/tests/benchmarks/qimagereader/images/image.pgm b/tests/benchmarks/gui/image/qimagereader/images/image.pgm
index 443bf40..443bf40 100644
--- a/tests/benchmarks/qimagereader/images/image.pgm
+++ b/tests/benchmarks/gui/image/qimagereader/images/image.pgm
diff --git a/tests/benchmarks/qimagereader/images/image.png b/tests/benchmarks/gui/image/qimagereader/images/image.png
index 7d4890a..7d4890a 100644
--- a/tests/benchmarks/qimagereader/images/image.png
+++ b/tests/benchmarks/gui/image/qimagereader/images/image.png
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/image.ppm b/tests/benchmarks/gui/image/qimagereader/images/image.ppm
index 2a5640e..2a5640e 100644
--- a/tests/benchmarks/qimagereader/images/image.ppm
+++ b/tests/benchmarks/gui/image/qimagereader/images/image.ppm
diff --git a/tests/benchmarks/qimagereader/images/kollada-noext b/tests/benchmarks/gui/image/qimagereader/images/kollada-noext
index 2abd4bb..2abd4bb 100644
--- a/tests/benchmarks/qimagereader/images/kollada-noext
+++ b/tests/benchmarks/gui/image/qimagereader/images/kollada-noext
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/kollada.png b/tests/benchmarks/gui/image/qimagereader/images/kollada.png
index 2abd4bb..2abd4bb 100644
--- a/tests/benchmarks/qimagereader/images/kollada.png
+++ b/tests/benchmarks/gui/image/qimagereader/images/kollada.png
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/marble.xpm b/tests/benchmarks/gui/image/qimagereader/images/marble.xpm
index 1c08049..1c08049 100644
--- a/tests/benchmarks/qimagereader/images/marble.xpm
+++ b/tests/benchmarks/gui/image/qimagereader/images/marble.xpm
diff --git a/tests/benchmarks/qimagereader/images/namedcolors.xpm b/tests/benchmarks/gui/image/qimagereader/images/namedcolors.xpm
index f6485d5..f6485d5 100644
--- a/tests/benchmarks/qimagereader/images/namedcolors.xpm
+++ b/tests/benchmarks/gui/image/qimagereader/images/namedcolors.xpm
diff --git a/tests/benchmarks/qimagereader/images/negativeheight.bmp b/tests/benchmarks/gui/image/qimagereader/images/negativeheight.bmp
index 875887a..875887a 100644
--- a/tests/benchmarks/qimagereader/images/negativeheight.bmp
+++ b/tests/benchmarks/gui/image/qimagereader/images/negativeheight.bmp
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/noclearcode.bmp b/tests/benchmarks/gui/image/qimagereader/images/noclearcode.bmp
index 1a5ca9c..1a5ca9c 100644
--- a/tests/benchmarks/qimagereader/images/noclearcode.bmp
+++ b/tests/benchmarks/gui/image/qimagereader/images/noclearcode.bmp
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/noclearcode.gif b/tests/benchmarks/gui/image/qimagereader/images/noclearcode.gif
index 27784d6..27784d6 100644
--- a/tests/benchmarks/qimagereader/images/noclearcode.gif
+++ b/tests/benchmarks/gui/image/qimagereader/images/noclearcode.gif
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/nontransparent.xpm b/tests/benchmarks/gui/image/qimagereader/images/nontransparent.xpm
index 00c21ef..00c21ef 100644
--- a/tests/benchmarks/qimagereader/images/nontransparent.xpm
+++ b/tests/benchmarks/gui/image/qimagereader/images/nontransparent.xpm
diff --git a/tests/benchmarks/qimagereader/images/pngwithcompressedtext.png b/tests/benchmarks/gui/image/qimagereader/images/pngwithcompressedtext.png
index 01b2270..01b2270 100644
--- a/tests/benchmarks/qimagereader/images/pngwithcompressedtext.png
+++ b/tests/benchmarks/gui/image/qimagereader/images/pngwithcompressedtext.png
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/pngwithtext.png b/tests/benchmarks/gui/image/qimagereader/images/pngwithtext.png
index 5d93799..5d93799 100644
--- a/tests/benchmarks/qimagereader/images/pngwithtext.png
+++ b/tests/benchmarks/gui/image/qimagereader/images/pngwithtext.png
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/rgba_adobedeflate_littleendian.tif b/tests/benchmarks/gui/image/qimagereader/images/rgba_adobedeflate_littleendian.tif
index 78868b0..78868b0 100644
--- a/tests/benchmarks/qimagereader/images/rgba_adobedeflate_littleendian.tif
+++ b/tests/benchmarks/gui/image/qimagereader/images/rgba_adobedeflate_littleendian.tif
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/rgba_lzw_littleendian.tif b/tests/benchmarks/gui/image/qimagereader/images/rgba_lzw_littleendian.tif
index 107eab7..107eab7 100644
--- a/tests/benchmarks/qimagereader/images/rgba_lzw_littleendian.tif
+++ b/tests/benchmarks/gui/image/qimagereader/images/rgba_lzw_littleendian.tif
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/rgba_nocompression_bigendian.tif b/tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_bigendian.tif
index c314bae..c314bae 100644
--- a/tests/benchmarks/qimagereader/images/rgba_nocompression_bigendian.tif
+++ b/tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_bigendian.tif
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/rgba_nocompression_littleendian.tif b/tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_littleendian.tif
index 4f820f6..4f820f6 100644
--- a/tests/benchmarks/qimagereader/images/rgba_nocompression_littleendian.tif
+++ b/tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_littleendian.tif
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/rgba_packbits_littleendian.tif b/tests/benchmarks/gui/image/qimagereader/images/rgba_packbits_littleendian.tif
index ddeec38..ddeec38 100644
--- a/tests/benchmarks/qimagereader/images/rgba_packbits_littleendian.tif
+++ b/tests/benchmarks/gui/image/qimagereader/images/rgba_packbits_littleendian.tif
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/rgba_zipdeflate_littleendian.tif b/tests/benchmarks/gui/image/qimagereader/images/rgba_zipdeflate_littleendian.tif
index 50a3024..50a3024 100644
--- a/tests/benchmarks/qimagereader/images/rgba_zipdeflate_littleendian.tif
+++ b/tests/benchmarks/gui/image/qimagereader/images/rgba_zipdeflate_littleendian.tif
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/runners.ppm b/tests/benchmarks/gui/image/qimagereader/images/runners.ppm
index fda1c97..fda1c97 100644
--- a/tests/benchmarks/qimagereader/images/runners.ppm
+++ b/tests/benchmarks/gui/image/qimagereader/images/runners.ppm
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/task210380.jpg b/tests/benchmarks/gui/image/qimagereader/images/task210380.jpg
index fd045ea..fd045ea 100644
--- a/tests/benchmarks/qimagereader/images/task210380.jpg
+++ b/tests/benchmarks/gui/image/qimagereader/images/task210380.jpg
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/teapot.ppm b/tests/benchmarks/gui/image/qimagereader/images/teapot.ppm
index b8ab85f..b8ab85f 100644
--- a/tests/benchmarks/qimagereader/images/teapot.ppm
+++ b/tests/benchmarks/gui/image/qimagereader/images/teapot.ppm
diff --git a/tests/benchmarks/qimagereader/images/test.ppm b/tests/benchmarks/gui/image/qimagereader/images/test.ppm
index 05d627c..05d627c 100644
--- a/tests/benchmarks/qimagereader/images/test.ppm
+++ b/tests/benchmarks/gui/image/qimagereader/images/test.ppm
diff --git a/tests/benchmarks/qimagereader/images/test.xpm b/tests/benchmarks/gui/image/qimagereader/images/test.xpm
index 5fcf075..5fcf075 100644
--- a/tests/benchmarks/qimagereader/images/test.xpm
+++ b/tests/benchmarks/gui/image/qimagereader/images/test.xpm
diff --git a/tests/benchmarks/qimagereader/images/transparent.xpm b/tests/benchmarks/gui/image/qimagereader/images/transparent.xpm
index 5ddcf0b..5ddcf0b 100644
--- a/tests/benchmarks/qimagereader/images/transparent.xpm
+++ b/tests/benchmarks/gui/image/qimagereader/images/transparent.xpm
diff --git a/tests/benchmarks/qimagereader/images/trolltech.gif b/tests/benchmarks/gui/image/qimagereader/images/trolltech.gif
index f674369..f674369 100644
--- a/tests/benchmarks/qimagereader/images/trolltech.gif
+++ b/tests/benchmarks/gui/image/qimagereader/images/trolltech.gif
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/tst7.bmp b/tests/benchmarks/gui/image/qimagereader/images/tst7.bmp
index 6d3ac92..6d3ac92 100644
--- a/tests/benchmarks/qimagereader/images/tst7.bmp
+++ b/tests/benchmarks/gui/image/qimagereader/images/tst7.bmp
Binary files differ
diff --git a/tests/benchmarks/qimagereader/images/tst7.png b/tests/benchmarks/gui/image/qimagereader/images/tst7.png
index 96efae4..96efae4 100644
--- a/tests/benchmarks/qimagereader/images/tst7.png
+++ b/tests/benchmarks/gui/image/qimagereader/images/tst7.png
Binary files differ
diff --git a/tests/benchmarks/qimagereader/qimagereader.pro b/tests/benchmarks/gui/image/qimagereader/qimagereader.pro
index 276ac33..276ac33 100644
--- a/tests/benchmarks/qimagereader/qimagereader.pro
+++ b/tests/benchmarks/gui/image/qimagereader/qimagereader.pro
diff --git a/tests/benchmarks/qimagereader/tst_qimagereader.cpp b/tests/benchmarks/gui/image/qimagereader/tst_qimagereader.cpp
index 3f38d19..3f38d19 100644
--- a/tests/benchmarks/qimagereader/tst_qimagereader.cpp
+++ b/tests/benchmarks/gui/image/qimagereader/tst_qimagereader.cpp
diff --git a/tests/benchmarks/qpixmap/qpixmap.pro b/tests/benchmarks/gui/image/qpixmap/qpixmap.pro
index e8330bd..e8330bd 100644
--- a/tests/benchmarks/qpixmap/qpixmap.pro
+++ b/tests/benchmarks/gui/image/qpixmap/qpixmap.pro
diff --git a/tests/benchmarks/qpixmap/tst_qpixmap.cpp b/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp
index 9ffbefb..9ffbefb 100644
--- a/tests/benchmarks/qpixmap/tst_qpixmap.cpp
+++ b/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp
diff --git a/tests/benchmarks/qpixmapcache/qpixmapcache.pro b/tests/benchmarks/gui/image/qpixmapcache/qpixmapcache.pro
index e0d7543..e0d7543 100644
--- a/tests/benchmarks/qpixmapcache/qpixmapcache.pro
+++ b/tests/benchmarks/gui/image/qpixmapcache/qpixmapcache.pro
diff --git a/tests/benchmarks/qpixmapcache/tst_qpixmapcache.cpp b/tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp
index 1031ba7..1031ba7 100644
--- a/tests/benchmarks/qpixmapcache/tst_qpixmapcache.cpp
+++ b/tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp
diff --git a/tests/benchmarks/gui/itemviews/itemviews.pro b/tests/benchmarks/gui/itemviews/itemviews.pro
new file mode 100644
index 0000000..be0ee55
--- /dev/null
+++ b/tests/benchmarks/gui/itemviews/itemviews.pro
@@ -0,0 +1,3 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ qtableview
diff --git a/tests/benchmarks/qtableview/qtableview.pro b/tests/benchmarks/gui/itemviews/qtableview/qtableview.pro
index 02bc530..02bc530 100644
--- a/tests/benchmarks/qtableview/qtableview.pro
+++ b/tests/benchmarks/gui/itemviews/qtableview/qtableview.pro
diff --git a/tests/benchmarks/qtableview/tst_qtableview.cpp b/tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp
index a84d8b5..a84d8b5 100644
--- a/tests/benchmarks/qtableview/tst_qtableview.cpp
+++ b/tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp
diff --git a/tests/benchmarks/gui/kernel/kernel.pro b/tests/benchmarks/gui/kernel/kernel.pro
new file mode 100644
index 0000000..a50aad2
--- /dev/null
+++ b/tests/benchmarks/gui/kernel/kernel.pro
@@ -0,0 +1,4 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ qapplication \
+ qwidget
diff --git a/tests/benchmarks/qapplication/main.cpp b/tests/benchmarks/gui/kernel/qapplication/main.cpp
index c912497..c912497 100644
--- a/tests/benchmarks/qapplication/main.cpp
+++ b/tests/benchmarks/gui/kernel/qapplication/main.cpp
diff --git a/tests/benchmarks/qapplication/qapplication.pro b/tests/benchmarks/gui/kernel/qapplication/qapplication.pro
index f8601e4..f8601e4 100644
--- a/tests/benchmarks/qapplication/qapplication.pro
+++ b/tests/benchmarks/gui/kernel/qapplication/qapplication.pro
diff --git a/tests/benchmarks/qwidget/qwidget.pro b/tests/benchmarks/gui/kernel/qwidget/qwidget.pro
index ff47445..ff47445 100644
--- a/tests/benchmarks/qwidget/qwidget.pro
+++ b/tests/benchmarks/gui/kernel/qwidget/qwidget.pro
diff --git a/tests/benchmarks/qwidget/tst_qwidget.cpp b/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp
index f21bd44..f21bd44 100644
--- a/tests/benchmarks/qwidget/tst_qwidget.cpp
+++ b/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp
diff --git a/tests/benchmarks/gui/math3d/math3d.pro b/tests/benchmarks/gui/math3d/math3d.pro
new file mode 100644
index 0000000..c511d9a
--- /dev/null
+++ b/tests/benchmarks/gui/math3d/math3d.pro
@@ -0,0 +1,4 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ qmatrix4x4 \
+ qquaternion
diff --git a/tests/benchmarks/qmatrix4x4/qmatrix4x4.pro b/tests/benchmarks/gui/math3d/qmatrix4x4/qmatrix4x4.pro
index e82d9de..e82d9de 100644
--- a/tests/benchmarks/qmatrix4x4/qmatrix4x4.pro
+++ b/tests/benchmarks/gui/math3d/qmatrix4x4/qmatrix4x4.pro
diff --git a/tests/benchmarks/qmatrix4x4/tst_qmatrix4x4.cpp b/tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp
index e962198..e962198 100644
--- a/tests/benchmarks/qmatrix4x4/tst_qmatrix4x4.cpp
+++ b/tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp
diff --git a/tests/benchmarks/qquaternion/qquaternion.pro b/tests/benchmarks/gui/math3d/qquaternion/qquaternion.pro
index cd68423..cd68423 100644
--- a/tests/benchmarks/qquaternion/qquaternion.pro
+++ b/tests/benchmarks/gui/math3d/qquaternion/qquaternion.pro
diff --git a/tests/benchmarks/qquaternion/tst_qquaternion.cpp b/tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp
index 7930092..7930092 100644
--- a/tests/benchmarks/qquaternion/tst_qquaternion.cpp
+++ b/tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp
diff --git a/tests/benchmarks/gui/painting/painting.pro b/tests/benchmarks/gui/painting/painting.pro
new file mode 100644
index 0000000..878567d
--- /dev/null
+++ b/tests/benchmarks/gui/painting/painting.pro
@@ -0,0 +1,5 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ qpainter \
+ qregion \
+ qtransform
diff --git a/tests/benchmarks/qpainter/qpainter.pro b/tests/benchmarks/gui/painting/qpainter/qpainter.pro
index 5ac8c64..5ac8c64 100644
--- a/tests/benchmarks/qpainter/qpainter.pro
+++ b/tests/benchmarks/gui/painting/qpainter/qpainter.pro
diff --git a/tests/benchmarks/qpainter/tst_qpainter.cpp b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
index 39b2244..39b2244 100644
--- a/tests/benchmarks/qpainter/tst_qpainter.cpp
+++ b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
diff --git a/tests/benchmarks/qregion/main.cpp b/tests/benchmarks/gui/painting/qregion/main.cpp
index 3d16e41..3d16e41 100644
--- a/tests/benchmarks/qregion/main.cpp
+++ b/tests/benchmarks/gui/painting/qregion/main.cpp
diff --git a/tests/benchmarks/qregion/qregion.pro b/tests/benchmarks/gui/painting/qregion/qregion.pro
index fc67177..fc67177 100644
--- a/tests/benchmarks/qregion/qregion.pro
+++ b/tests/benchmarks/gui/painting/qregion/qregion.pro
diff --git a/tests/benchmarks/qtransform/qtransform.pro b/tests/benchmarks/gui/painting/qtransform/qtransform.pro
index 8d87656..8d87656 100644
--- a/tests/benchmarks/qtransform/qtransform.pro
+++ b/tests/benchmarks/gui/painting/qtransform/qtransform.pro
diff --git a/tests/benchmarks/qtransform/tst_qtransform.cpp b/tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp
index b33cf58..b33cf58 100644
--- a/tests/benchmarks/qtransform/tst_qtransform.cpp
+++ b/tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp
diff --git a/tests/benchmarks/qstylesheetstyle/main.cpp b/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp
index 226b661..226b661 100644
--- a/tests/benchmarks/qstylesheetstyle/main.cpp
+++ b/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp
diff --git a/tests/benchmarks/qstylesheetstyle/qstylesheetstyle.pro b/tests/benchmarks/gui/styles/qstylesheetstyle/qstylesheetstyle.pro
index c097307..c097307 100644
--- a/tests/benchmarks/qstylesheetstyle/qstylesheetstyle.pro
+++ b/tests/benchmarks/gui/styles/qstylesheetstyle/qstylesheetstyle.pro
diff --git a/tests/benchmarks/gui/styles/styles.pro b/tests/benchmarks/gui/styles/styles.pro
new file mode 100644
index 0000000..7c1d069
--- /dev/null
+++ b/tests/benchmarks/gui/styles/styles.pro
@@ -0,0 +1,3 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ qstylesheetstyle
diff --git a/tests/benchmarks/qfontmetrics/main.cpp b/tests/benchmarks/gui/text/qfontmetrics/main.cpp
index d3f85ef..d3f85ef 100644
--- a/tests/benchmarks/qfontmetrics/main.cpp
+++ b/tests/benchmarks/gui/text/qfontmetrics/main.cpp
diff --git a/tests/benchmarks/qfontmetrics/qfontmetrics.pro b/tests/benchmarks/gui/text/qfontmetrics/qfontmetrics.pro
index b6c7b92..b6c7b92 100644
--- a/tests/benchmarks/qfontmetrics/qfontmetrics.pro
+++ b/tests/benchmarks/gui/text/qfontmetrics/qfontmetrics.pro
diff --git a/tests/benchmarks/qtext/bidi.txt b/tests/benchmarks/gui/text/qtext/bidi.txt
index 7c74cb4..7c74cb4 100644
--- a/tests/benchmarks/qtext/bidi.txt
+++ b/tests/benchmarks/gui/text/qtext/bidi.txt
diff --git a/tests/benchmarks/qtext/main.cpp b/tests/benchmarks/gui/text/qtext/main.cpp
index d4f3165..d4f3165 100644
--- a/tests/benchmarks/qtext/main.cpp
+++ b/tests/benchmarks/gui/text/qtext/main.cpp
diff --git a/tests/benchmarks/qtext/qtext.pro b/tests/benchmarks/gui/text/qtext/qtext.pro
index 9e8860f..9e8860f 100644
--- a/tests/benchmarks/qtext/qtext.pro
+++ b/tests/benchmarks/gui/text/qtext/qtext.pro
diff --git a/tests/benchmarks/gui/text/text.pro b/tests/benchmarks/gui/text/text.pro
new file mode 100644
index 0000000..34e548b
--- /dev/null
+++ b/tests/benchmarks/gui/text/text.pro
@@ -0,0 +1,4 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ qfontmetrics \
+ qtext
diff --git a/tests/benchmarks/network/access/access.pro b/tests/benchmarks/network/access/access.pro
new file mode 100644
index 0000000..43357e2
--- /dev/null
+++ b/tests/benchmarks/network/access/access.pro
@@ -0,0 +1,4 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ qfile_vs_qnetworkaccessmanager \
+ qnetworkreply
diff --git a/tests/benchmarks/qfile_vs_qnetworkaccessmanager/main.cpp b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp
index 23e07db..26308e9 100644
--- a/tests/benchmarks/qfile_vs_qnetworkaccessmanager/main.cpp
+++ b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp
@@ -46,7 +46,7 @@
#include <QtNetwork/qnetworkaccessmanager.h>
#include <QtCore/QTemporaryFile>
#include <QtCore/QFile>
-#include "../../auto/network-settings.h"
+#include "../../../../auto/network-settings.h"
class qfile_vs_qnetworkaccessmanager : public QObject
{
diff --git a/tests/benchmarks/qfile_vs_qnetworkaccessmanager/qfile_vs_qnetworkaccessmanager.pro b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/qfile_vs_qnetworkaccessmanager.pro
index 99d1935..99d1935 100644
--- a/tests/benchmarks/qfile_vs_qnetworkaccessmanager/qfile_vs_qnetworkaccessmanager.pro
+++ b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/qfile_vs_qnetworkaccessmanager.pro
diff --git a/tests/benchmarks/qnetworkreply/qnetworkreply.pro b/tests/benchmarks/network/access/qnetworkreply/qnetworkreply.pro
index 1e67d81..1e67d81 100644
--- a/tests/benchmarks/qnetworkreply/qnetworkreply.pro
+++ b/tests/benchmarks/network/access/qnetworkreply/qnetworkreply.pro
diff --git a/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
index a92359f..f173ed1 100644
--- a/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -48,7 +48,7 @@
#include <QtNetwork/qnetworkaccessmanager.h>
#include <QtNetwork/qtcpsocket.h>
#include <QtNetwork/qtcpserver.h>
-#include "../../auto/network-settings.h"
+#include "../../../../auto/network-settings.h"
class TimedSender: public QThread
diff --git a/tests/benchmarks/network/kernel/kernel.pro b/tests/benchmarks/network/kernel/kernel.pro
new file mode 100644
index 0000000..1ec3071
--- /dev/null
+++ b/tests/benchmarks/network/kernel/kernel.pro
@@ -0,0 +1,3 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ qhostinfo
diff --git a/tests/benchmarks/qhostinfo/main.cpp b/tests/benchmarks/network/kernel/qhostinfo/main.cpp
index 0ae1b7f..0ae1b7f 100644
--- a/tests/benchmarks/qhostinfo/main.cpp
+++ b/tests/benchmarks/network/kernel/qhostinfo/main.cpp
diff --git a/tests/benchmarks/qhostinfo/qhostinfo.pro b/tests/benchmarks/network/kernel/qhostinfo/qhostinfo.pro
index f18d6d7..f18d6d7 100755
--- a/tests/benchmarks/qhostinfo/qhostinfo.pro
+++ b/tests/benchmarks/network/kernel/qhostinfo/qhostinfo.pro
diff --git a/tests/benchmarks/network/network.pro b/tests/benchmarks/network/network.pro
new file mode 100644
index 0000000..4e83db2
--- /dev/null
+++ b/tests/benchmarks/network/network.pro
@@ -0,0 +1,5 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ access \
+ kernel \
+ socket
diff --git a/tests/benchmarks/qtcpserver/qtcpserver.pro b/tests/benchmarks/network/socket/qtcpserver/qtcpserver.pro
index e7bf13a..e7bf13a 100644
--- a/tests/benchmarks/qtcpserver/qtcpserver.pro
+++ b/tests/benchmarks/network/socket/qtcpserver/qtcpserver.pro
diff --git a/tests/benchmarks/qtcpserver/tst_qtcpserver.cpp b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp
index b6b55c3..022bf3d 100644
--- a/tests/benchmarks/qtcpserver/tst_qtcpserver.cpp
+++ b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp
@@ -58,7 +58,7 @@
Q_DECLARE_METATYPE(QNetworkProxy)
Q_DECLARE_METATYPE(QList<QNetworkProxy>)
-#include "../../auto/network-settings.h"
+#include "../../../../auto/network-settings.h"
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/benchmarks/network/socket/socket.pro b/tests/benchmarks/network/socket/socket.pro
new file mode 100644
index 0000000..2d676a2
--- /dev/null
+++ b/tests/benchmarks/network/socket/socket.pro
@@ -0,0 +1,3 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ qtcpserver
diff --git a/tests/benchmarks/qscriptclass/tst_qscriptclass.cpp b/tests/benchmarks/qscriptclass/tst_qscriptclass.cpp
deleted file mode 100644
index 7985028..0000000
--- a/tests/benchmarks/qscriptclass/tst_qscriptclass.cpp
+++ /dev/null
@@ -1,511 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the 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.h>
-#include <QtScript>
-
-Q_DECLARE_METATYPE(QScriptContext*)
-Q_DECLARE_METATYPE(QScriptValue)
-Q_DECLARE_METATYPE(QScriptValueList)
-
-//TESTED_FILES=
-
-class TestClass : public QScriptClass
-{
-public:
- struct CustomProperty {
- QueryFlags qflags;
- uint id;
- QScriptValue::PropertyFlags pflags;
- QScriptValue value;
-
- CustomProperty(QueryFlags qf, uint i, QScriptValue::PropertyFlags pf,
- const QScriptValue &val)
- : qflags(qf), id(i), pflags(pf), value(val) { }
- };
-
- enum CallableMode {
- NotCallable,
- CallableReturnsSum,
- CallableReturnsArgument,
- CallableReturnsInvalidVariant
- };
-
- TestClass(QScriptEngine *engine);
- ~TestClass();
-
- void addCustomProperty(const QScriptString &name, QueryFlags qflags,
- uint id, QScriptValue::PropertyFlags pflags,
- const QScriptValue &value);
- void removeCustomProperty(const QScriptString &name);
-
- QueryFlags queryProperty(const QScriptValue &object,
- const QScriptString &name,
- QueryFlags flags, uint *id);
-
- QScriptValue property(const QScriptValue &object,
- const QScriptString &name, uint id);
-
- void setProperty(QScriptValue &object, const QScriptString &name,
- uint id, const QScriptValue &value);
-
- QScriptValue::PropertyFlags propertyFlags(
- const QScriptValue &object, const QScriptString &name, uint id);
-
- QScriptClassPropertyIterator *newIterator(const QScriptValue &object);
-
- QScriptValue prototype() const;
-
- QString name() const;
-
- bool supportsExtension(Extension extension) const;
- QVariant extension(Extension extension,
- const QVariant &argument = QVariant());
-
- void setIterationEnabled(bool enable);
- bool isIterationEnabled() const;
-
- void setCallableMode(CallableMode mode);
- CallableMode callableMode() const;
-
- void setHasInstance(bool hasInstance);
- bool hasInstance() const;
-
-private:
- inline CustomProperty *findCustomProperty(const QScriptString &name);
-
- QHash<QScriptString, CustomProperty*> customProperties;
-
- QScriptValue m_prototype;
- bool m_iterationEnabled;
- CallableMode m_callableMode;
- bool m_hasInstance;
-};
-
-class TestClassPropertyIterator : public QScriptClassPropertyIterator
-{
-public:
- TestClassPropertyIterator(const QHash<QScriptString, TestClass::CustomProperty*> &props,
- const QScriptValue &object);
- ~TestClassPropertyIterator();
-
- bool hasNext() const;
- void next();
-
- bool hasPrevious() const;
- void previous();
-
- void toFront();
- void toBack();
-
- QScriptString name() const;
- uint id() const;
- QScriptValue::PropertyFlags flags() const;
-
-private:
- int m_index;
- int m_last;
- QHash<QScriptString, TestClass::CustomProperty*> m_props;
-};
-
-TestClass::TestClass(QScriptEngine *engine)
- : QScriptClass(engine), m_iterationEnabled(true),
- m_callableMode(NotCallable), m_hasInstance(false)
-{
- m_prototype = engine->newObject();
-}
-
-TestClass::~TestClass()
-{
- qDeleteAll(customProperties);
-}
-
-TestClass::CustomProperty* TestClass::findCustomProperty(const QScriptString &name)
-{
- QHash<QScriptString, CustomProperty*>::const_iterator it;
- it = customProperties.constFind(name);
- if (it == customProperties.constEnd())
- return 0;
- return it.value();
-
-}
-
-void TestClass::addCustomProperty(const QScriptString &name, QueryFlags qflags,
- uint id, QScriptValue::PropertyFlags pflags,
- const QScriptValue &value)
-{
- customProperties.insert(name, new CustomProperty(qflags, id, pflags, value));
-}
-
-void TestClass::removeCustomProperty(const QScriptString &name)
-{
- CustomProperty *prop = customProperties.take(name);
- if (prop)
- delete prop;
-}
-
-QScriptClass::QueryFlags TestClass::queryProperty(const QScriptValue &/*object*/,
- const QScriptString &name,
- QueryFlags flags, uint *id)
-{
- CustomProperty *prop = findCustomProperty(name);
- if (!prop)
- return 0;
- *id = prop->id;
- return prop->qflags & flags;
-}
-
-QScriptValue TestClass::property(const QScriptValue &/*object*/,
- const QScriptString &name, uint /*id*/)
-{
- CustomProperty *prop = findCustomProperty(name);
- if (!prop)
- return QScriptValue();
- return prop->value;
-}
-
-void TestClass::setProperty(QScriptValue &/*object*/, const QScriptString &name,
- uint /*id*/, const QScriptValue &value)
-{
- CustomProperty *prop = findCustomProperty(name);
- if (!prop)
- return;
- prop->value = value;
-}
-
-QScriptValue::PropertyFlags TestClass::propertyFlags(
- const QScriptValue &/*object*/, const QScriptString &name, uint /*id*/)
-{
- CustomProperty *prop = findCustomProperty(name);
- if (!prop)
- return 0;
- return prop->pflags;
-}
-
-QScriptClassPropertyIterator *TestClass::newIterator(const QScriptValue &object)
-{
- if (!m_iterationEnabled)
- return 0;
- return new TestClassPropertyIterator(customProperties, object);
-}
-
-QScriptValue TestClass::prototype() const
-{
- return m_prototype;
-}
-
-QString TestClass::name() const
-{
- return QLatin1String("TestClass");
-}
-
-bool TestClass::supportsExtension(Extension extension) const
-{
- if (extension == Callable)
- return (m_callableMode != NotCallable);
- if (extension == HasInstance)
- return m_hasInstance;
- return false;
-}
-
-QVariant TestClass::extension(Extension extension,
- const QVariant &argument)
-{
- if (extension == Callable) {
- Q_ASSERT(m_callableMode != NotCallable);
- QScriptContext *ctx = qvariant_cast<QScriptContext*>(argument);
- if (m_callableMode == CallableReturnsSum) {
- qsreal sum = 0;
- for (int i = 0; i < ctx->argumentCount(); ++i)
- sum += ctx->argument(i).toNumber();
- QScriptValueIterator it(ctx->thisObject());
- while (it.hasNext()) {
- it.next();
- sum += it.value().toNumber();
- }
- return sum;
- } else if (m_callableMode == CallableReturnsArgument) {
- return qVariantFromValue(ctx->argument(0));
- } else if (m_callableMode == CallableReturnsInvalidVariant) {
- return QVariant();
- }
- } else if (extension == HasInstance) {
- Q_ASSERT(m_hasInstance);
- QScriptValueList args = qvariant_cast<QScriptValueList>(argument);
- QScriptValue obj = args.at(0);
- QScriptValue value = args.at(1);
- return value.property("foo").equals(obj.property("foo"));
- }
- return QVariant();
-}
-
-void TestClass::setIterationEnabled(bool enable)
-{
- m_iterationEnabled = enable;
-}
-
-bool TestClass::isIterationEnabled() const
-{
- return m_iterationEnabled;
-}
-
-void TestClass::setCallableMode(CallableMode mode)
-{
- m_callableMode = mode;
-}
-
-TestClass::CallableMode TestClass::callableMode() const
-{
- return m_callableMode;
-}
-
-void TestClass::setHasInstance(bool hasInstance)
-{
- m_hasInstance = hasInstance;
-}
-
-bool TestClass::hasInstance() const
-{
- return m_hasInstance;
-}
-
-TestClassPropertyIterator::TestClassPropertyIterator(const QHash<QScriptString, TestClass::CustomProperty*> &props,
- const QScriptValue &object)
- : QScriptClassPropertyIterator(object)
-{
- m_props = props;
- toFront();
-}
-
-TestClassPropertyIterator::~TestClassPropertyIterator()
-{
-}
-
-bool TestClassPropertyIterator::hasNext() const
-{
- return m_index < m_props.size();
-}
-
-void TestClassPropertyIterator::next()
-{
- m_last = m_index;
- ++m_index;
-}
-
-bool TestClassPropertyIterator::hasPrevious() const
-{
- return m_index > 0;
-}
-
-void TestClassPropertyIterator::previous()
-{
- --m_index;
- m_last = m_index;
-}
-
-void TestClassPropertyIterator::toFront()
-{
- m_index = 0;
- m_last = -1;
-}
-
-void TestClassPropertyIterator::toBack()
-{
- m_index = m_props.size();
- m_last = -1;
-}
-
-QScriptString TestClassPropertyIterator::name() const
-{
- return m_props.keys().value(m_last);
-}
-
-uint TestClassPropertyIterator::id() const
-{
- QScriptString key = m_props.keys().value(m_last);
- if (!key.isValid())
- return 0;
- TestClass::CustomProperty *prop = m_props.value(key);
- return prop->id;
-}
-
-QScriptValue::PropertyFlags TestClassPropertyIterator::flags() const
-{
- QScriptString key = m_props.keys().value(m_last);
- if (!key.isValid())
- return 0;
- TestClass::CustomProperty *prop = m_props.value(key);
- return prop->pflags;
-}
-
-class tst_QScriptClass : public QObject
-{
- Q_OBJECT
-
-public:
- tst_QScriptClass();
- virtual ~tst_QScriptClass();
-
-public slots:
- void init();
- void cleanup();
-
-private slots:
- void noSuchProperty();
- void property();
- void setProperty();
- void propertyFlags();
- void call();
- void hasInstance();
- void iterate();
-};
-
-tst_QScriptClass::tst_QScriptClass()
-{
-}
-
-tst_QScriptClass::~tst_QScriptClass()
-{
-}
-
-void tst_QScriptClass::init()
-{
-}
-
-void tst_QScriptClass::cleanup()
-{
-}
-
-void tst_QScriptClass::noSuchProperty()
-{
- QScriptEngine eng;
- TestClass cls(&eng);
- QScriptValue obj = eng.newObject(&cls);
- QString propertyName = QString::fromLatin1("foo");
- QBENCHMARK {
- (void)obj.property(propertyName);
- }
-}
-
-void tst_QScriptClass::property()
-{
- QScriptEngine eng;
- TestClass cls(&eng);
- QScriptString foo = eng.toStringHandle("foo");
- cls.addCustomProperty(foo, QScriptClass::HandlesReadAccess, /*id=*/1, /*attributes=*/0, /*value=*/123);
- QScriptValue obj = eng.newObject(&cls);
- QBENCHMARK {
- (void)obj.property(foo);
- }
-}
-
-void tst_QScriptClass::setProperty()
-{
- QScriptEngine eng;
- TestClass cls(&eng);
- QScriptString foo = eng.toStringHandle("foo");
- cls.addCustomProperty(foo, QScriptClass::HandlesWriteAccess, /*id=*/1, /*attributes=*/0, /*value=*/123);
- QScriptValue obj = eng.newObject(&cls);
- QScriptValue value(456);
- QBENCHMARK {
- obj.setProperty(foo, value);
- }
-}
-
-void tst_QScriptClass::propertyFlags()
-{
- QScriptEngine eng;
- TestClass cls(&eng);
- QScriptString foo = eng.toStringHandle("foo");
- cls.addCustomProperty(foo, QScriptClass::HandlesReadAccess, /*id=*/1, QScriptValue::ReadOnly, /*value=*/123);
- QScriptValue obj = eng.newObject(&cls);
- QBENCHMARK {
- (void)obj.propertyFlags(foo);
- }
-}
-
-void tst_QScriptClass::call()
-{
- QScriptEngine eng;
- TestClass cls(&eng);
- cls.setCallableMode(TestClass::CallableReturnsArgument);
- QScriptValue obj = eng.newObject(&cls);
- QScriptValue thisObject;
- QScriptValueList args;
- args.append(123);
- QBENCHMARK {
- (void)obj.call(thisObject, args);
- }
-}
-
-void tst_QScriptClass::hasInstance()
-{
- QScriptEngine eng;
- TestClass cls(&eng);
- cls.setHasInstance(true);
- QScriptValue obj = eng.newObject(&cls);
- obj.setProperty("foo", 123);
- QScriptValue plain = eng.newObject();
- plain.setProperty("foo", obj.property("foo"));
- QBENCHMARK {
- (void)plain.instanceOf(obj);
- }
-}
-
-void tst_QScriptClass::iterate()
-{
- QScriptEngine eng;
- TestClass cls(&eng);
- cls.setIterationEnabled(true);
- cls.addCustomProperty(eng.toStringHandle("foo"), QScriptClass::HandlesReadAccess, /*id=*/1, /*attributes=*/0, /*value=*/123);
- cls.addCustomProperty(eng.toStringHandle("bar"), QScriptClass::HandlesReadAccess, /*id=*/2, /*attributes=*/0, /*value=*/456);
- QScriptValue obj = eng.newObject(&cls);
- QBENCHMARK {
- QScriptValueIterator it(obj);
- while (it.hasNext()) {
- it.next();
- (void)it.scriptName();
- }
- }
-}
-
-QTEST_MAIN(tst_QScriptClass)
-#include "tst_qscriptclass.moc"
diff --git a/tests/benchmarks/qtestlib-simple/main.cpp b/tests/benchmarks/qtestlib-simple/main.cpp
deleted file mode 100644
index a8dabe9..0000000
--- a/tests/benchmarks/qtestlib-simple/main.cpp
+++ /dev/null
@@ -1,117 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the 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 <QtGui>
-#include <QString>
-
-#include <qtest.h>
-
-
-class tst_QHash : public QObject
-{
- Q_OBJECT
-private slots:
- void foo1_data();
- void foo1();
- void foo2_data();
- void foo2();
- void foo3();
-};
-
-void tst_QHash::foo1_data()
-{
- QTest::addColumn<int>("x");
- QTest::addColumn<int>("y");
- QTest::newRow("tag1.1") << 16 << 17;
- QTest::newRow("tag2.1") << 18 << 19;
-}
-
-void tst_QHash::foo1()
-{
- QFETCH(int, x);
- QFETCH(int, y);
- Q_UNUSED(x);
- Q_UNUSED(y);
-
- QHash<int, int> testHash;
-
- QBENCHMARK {
- testHash.insertMulti(1, 1);
- }
-}
-
-void tst_QHash::foo2_data()
-{
- QTest::addColumn<int>("x");
- QTest::addColumn<int>("y");
- QTest::newRow("tag1.1") << 16 << 17;
- QTest::newRow("tag2.1") << 18 << 19;
-}
-
-void tst_QHash::foo2()
-{
- QFETCH(int, x);
- QFETCH(int, y);
- Q_UNUSED(x);
- Q_UNUSED(y);
-
- QHash<int, int> testHash;
-
- QBENCHMARK {
- testHash.insertMulti(1, 1);
- }
-
- QBENCHMARK {
- testHash.insertMulti(1, 1);
- }
-}
-
-void tst_QHash::foo3()
-{
- QHash<int, int> testHash;
-
- QBENCHMARK {
- testHash.insertMulti(1, 1);
- }
-}
-
-
-QTEST_MAIN(tst_QHash)
-#include "main.moc"
diff --git a/tests/benchmarks/qtestlib-simple/qtestlib-simple.pro b/tests/benchmarks/qtestlib-simple/qtestlib-simple.pro
deleted file mode 100644
index 7c49883..0000000
--- a/tests/benchmarks/qtestlib-simple/qtestlib-simple.pro
+++ /dev/null
@@ -1,8 +0,0 @@
-load(qttest_p4)
-TEMPLATE = app
-TARGET = tst_qtestlib-simple
-DEPENDPATH += .
-INCLUDEPATH += .
-
-# Input
-SOURCES += main.cpp
diff --git a/tests/benchmarks/qtwidgets/advanced.ui b/tests/benchmarks/qtwidgets/advanced.ui
deleted file mode 100644
index ce27374..0000000
--- a/tests/benchmarks/qtwidgets/advanced.ui
+++ /dev/null
@@ -1,319 +0,0 @@
-<ui version="4.0" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
- <class>Advanced</class>
- <widget class="QWidget" name="Advanced" >
- <property name="objectName" >
- <string notr="true" >Advanced</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>400</width>
- <height>300</height>
- </rect>
- </property>
- <layout class="QVBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <layout class="QHBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QPushButton" name="pushButton" >
- <property name="objectName" >
- <string notr="true" >pushButton</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>1</y>
- <width>80</width>
- <height>23</height>
- </rect>
- </property>
- <property name="text" >
- <string/>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="pushButton_2" >
- <property name="objectName" >
- <string notr="true" >pushButton_2</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>87</x>
- <y>1</y>
- <width>80</width>
- <height>23</height>
- </rect>
- </property>
- <property name="text" >
- <string>Text</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="checkBox" >
- <property name="objectName" >
- <string notr="true" >checkBox</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>173</x>
- <y>6</y>
- <width>23</width>
- <height>13</height>
- </rect>
- </property>
- <property name="text" >
- <string/>
- </property>
- <property name="icon" >
- <iconset/>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="radioButton" >
- <property name="objectName" >
- <string notr="true" >radioButton</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>202</x>
- <y>6</y>
- <width>22</width>
- <height>12</height>
- </rect>
- </property>
- <property name="text" >
- <string/>
- </property>
- <property name="icon" >
- <iconset/>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="checkBox_2" >
- <property name="objectName" >
- <string notr="true" >checkBox_2</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>230</x>
- <y>3</y>
- <width>44</width>
- <height>18</height>
- </rect>
- </property>
- <property name="text" >
- <string>Text</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="radioButton_2" >
- <property name="objectName" >
- <string notr="true" >radioButton_2</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>280</x>
- <y>3</y>
- <width>43</width>
- <height>18</height>
- </rect>
- </property>
- <property name="text" >
- <string>Text</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QGridLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="0" column="0" >
- <widget class="QListWidget" name="listWidget" >
- <property name="objectName" >
- <string notr="true" >listWidget</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>1</y>
- <width>186</width>
- <height>91</height>
- </rect>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QListWidget" name="listWidget_3" >
- <property name="objectName" >
- <string notr="true" >listWidget_3</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>193</x>
- <y>96</y>
- <width>188</width>
- <height>60</height>
- </rect>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QTreeWidget" name="treeWidget_2" >
- <property name="objectName" >
- <string notr="true" >treeWidget_2</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>96</y>
- <width>186</width>
- <height>60</height>
- </rect>
- </property>
- </widget>
- </item>
- <item row="0" column="1" >
- <layout class="QVBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QListWidget" name="listWidget_2" >
- <property name="objectName" >
- <string notr="true" >listWidget_2</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>1</y>
- <width>186</width>
- <height>43</height>
- </rect>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QTreeWidget" name="treeWidget" >
- <property name="objectName" >
- <string notr="true" >treeWidget</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>48</y>
- <width>186</width>
- <height>43</height>
- </rect>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QTabWidget" name="tabWidget" >
- <property name="objectName" >
- <string notr="true" >tabWidget</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>9</x>
- <y>201</y>
- <width>382</width>
- <height>90</height>
- </rect>
- </property>
- <property name="minimumSize" >
- <size>
- <width>0</width>
- <height>90</height>
- </size>
- </property>
- <property name="tabPosition" >
- <enum>QTabWidget::North</enum>
- </property>
- <property name="tabShape" >
- <enum>QTabWidget::Rounded</enum>
- </property>
- <widget class="QWidget" name="widget" >
- <property name="objectName" >
- <string notr="true" >widget</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>380</width>
- <height>63</height>
- </rect>
- </property>
- <attribute name="title" >
- <string>Tab Page 1</string>
- </attribute>
- </widget>
- <widget class="QWidget" name="widget" >
- <property name="objectName" >
- <string notr="true" >widget</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>459</width>
- <height>66</height>
- </rect>
- </property>
- <attribute name="title" >
- <string>Tab Page 2</string>
- </attribute>
- </widget>
- </widget>
- </item>
- </layout>
- </widget>
- <pixmapfunction></pixmapfunction>
- <connections/>
-</ui>
diff --git a/tests/benchmarks/qtwidgets/icons/big.png b/tests/benchmarks/qtwidgets/icons/big.png
deleted file mode 100644
index 6032804..0000000
--- a/tests/benchmarks/qtwidgets/icons/big.png
+++ /dev/null
Binary files differ
diff --git a/tests/benchmarks/qtwidgets/icons/folder.png b/tests/benchmarks/qtwidgets/icons/folder.png
deleted file mode 100644
index 981a25d..0000000
--- a/tests/benchmarks/qtwidgets/icons/folder.png
+++ /dev/null
Binary files differ
diff --git a/tests/benchmarks/qtwidgets/icons/icon.bmp b/tests/benchmarks/qtwidgets/icons/icon.bmp
deleted file mode 100644
index 196de6a..0000000
--- a/tests/benchmarks/qtwidgets/icons/icon.bmp
+++ /dev/null
Binary files differ
diff --git a/tests/benchmarks/qtwidgets/icons/icon.png b/tests/benchmarks/qtwidgets/icons/icon.png
deleted file mode 100644
index 8f9c562..0000000
--- a/tests/benchmarks/qtwidgets/icons/icon.png
+++ /dev/null
Binary files differ
diff --git a/tests/benchmarks/qtwidgets/mainwindow.cpp b/tests/benchmarks/qtwidgets/mainwindow.cpp
deleted file mode 100644
index bb19567..0000000
--- a/tests/benchmarks/qtwidgets/mainwindow.cpp
+++ /dev/null
@@ -1,313 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the 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 "mainwindow.h"
-#include <QSplitter>
-#include <QHeaderView>
-
-StyleWidget::StyleWidget(QWidget *parent, Qt::WFlags f)
- : QWidget(parent, f)
-{
- QHBoxLayout *hbox = new QHBoxLayout(this);
- QSplitter *spl = new QSplitter(this);
-
- // standard widgets
- QWidget *leftWidget = new QWidget(this);
- m_staWidget.setupUi(leftWidget);
-
- // advanced/system widgets
- QGroupBox *rightWidget = new QGroupBox("Advanced", this);
- QVBoxLayout *vbox = new QVBoxLayout(rightWidget);
- QWidget *adv = new QWidget(rightWidget);
- m_advWidget.setupUi(adv);
- QWidget *sys = new QWidget(rightWidget);
- m_sysWidget.setupUi(sys);
- vbox->addWidget(adv);
- vbox->addWidget(sys);
-
- spl->addWidget(leftWidget);
- spl->addWidget(rightWidget);
-
- hbox->setMargin(4);
- hbox->addWidget(spl);
-
- m_small1 = QIcon(":/icons/icon.bmp");
- m_small2 = QIcon(":/icons/icon.png");
- m_big = QIcon(":/icons/big.png");
-
- addComboBoxItems();
- addTreeItems();
- addTreeListItems();
- addListItems();
- addTextEdit();
- setupOtherWidgets();
- setupButtons();
-
- foreach(QWidget *w, qFindChildren<QWidget *>(parentWidget()))
- w->setWhatsThis(w->metaObject()->className());
-}
-
-StyleWidget::~StyleWidget()
-{
-
-}
-
-void StyleWidget::addTextEdit()
-{
- m_staWidget.textEdit->setPlainText(
- "Some Text\nSome Text\nSome Text\nSome Text\nSome Text\nSome Text\nSome Text\nSome Text");
- m_staWidget.textEdit_2->setPlainText(
- "Some Text, Some Text, Some Text, Some Text, Some Text, Some Text, Some Text, Some Text");
- m_staWidget.textEdit_3->setPlainText(
- "Some Text, Some Text, Some Text, Some Text, Some Text, Some Text, Some Text, Some Text" \
- "Some Text\nSome Text\nSome Text\nSome Text\nSome Text\nSome Text\nSome Text\nSome Text\n");
-}
-
-void StyleWidget::addComboBoxItems()
-{
- m_staWidget.comboBox->addItem("Item 1");
- m_staWidget.comboBox->addItem("Item 2");
- m_staWidget.comboBox->addItem("Item 3");
- m_staWidget.comboBox->addItem("Item 4");
- m_staWidget.comboBox->addItem("Item 5");
-}
-
-void StyleWidget::addListItems()
-{
- m_staWidget.listWidget->addItem("Item 1");
- m_staWidget.listWidget->addItem("Item 2");
- m_staWidget.listWidget->addItem("Item 3");
- m_staWidget.listWidget->addItem("Item 4");
- m_staWidget.listWidget->addItem("Item 5");
-
- QListWidgetItem *tmp = new QListWidgetItem("Item 1", m_staWidget.listWidget_2);
- tmp->setCheckState(Qt::Checked);
- tmp = new QListWidgetItem("Item 2", m_staWidget.listWidget_2);
- tmp->setCheckState(Qt::Checked);
- tmp = new QListWidgetItem("Item 3", m_staWidget.listWidget_2);
- tmp->setCheckState(Qt::Checked);
- tmp = new QListWidgetItem("Item 4", m_staWidget.listWidget_2);
- tmp->setCheckState(Qt::Checked);
- tmp = new QListWidgetItem("Item 5", m_staWidget.listWidget_2);
- tmp->setCheckState(Qt::Checked);
-
- tmp = new QListWidgetItem("Item 1", m_advWidget.listWidget_3);
- tmp->setCheckState(Qt::Checked);
- tmp->setIcon(m_small1);
- tmp = new QListWidgetItem("Item 2", m_advWidget.listWidget_3);
- tmp->setCheckState(Qt::Checked);
- tmp->setIcon(m_small1);
- tmp = new QListWidgetItem("Item 3", m_advWidget.listWidget_3);
- tmp->setCheckState(Qt::Checked);
- tmp->setIcon(m_small1);
- tmp = new QListWidgetItem("Item 4", m_advWidget.listWidget_3);
- tmp->setCheckState(Qt::Checked);
- tmp->setIcon(m_small1);
- tmp = new QListWidgetItem("Item 5", m_advWidget.listWidget_3);
- tmp->setCheckState(Qt::Checked);
- tmp->setIcon(m_small1);
-
- m_advWidget.listWidget->setViewMode(QListView::IconMode);
- QIcon folder(":/icons/folder.png");
- tmp = new QListWidgetItem("Item 1", m_advWidget.listWidget);
- tmp->setIcon(folder);
- tmp = new QListWidgetItem("Item 2", m_advWidget.listWidget);
- tmp->setIcon(folder);
- tmp = new QListWidgetItem("Item 3", m_advWidget.listWidget);
- tmp->setIcon(folder);
- tmp = new QListWidgetItem("Item 4", m_advWidget.listWidget);
- tmp->setIcon(folder);
- tmp = new QListWidgetItem("Item 5", m_advWidget.listWidget);
- tmp->setIcon(folder);
-
- tmp = new QListWidgetItem("Item 1", m_advWidget.listWidget_2);
- tmp->setIcon(m_small1);
- tmp = new QListWidgetItem("Item 2", m_advWidget.listWidget_2);
- tmp->setIcon(m_small1);
- tmp = new QListWidgetItem("Item 3", m_advWidget.listWidget_2);
- tmp->setIcon(m_small1);
- tmp = new QListWidgetItem("Item 4", m_advWidget.listWidget_2);
- tmp->setIcon(m_small1);
- tmp = new QListWidgetItem("Item 5", m_advWidget.listWidget_2);
- tmp->setIcon(m_small1);
-}
-
-void StyleWidget::setupOtherWidgets()
-{
- m_sysWidget.tableWidget->setRowCount(100);
- m_sysWidget.tableWidget->setColumnCount(100);
-}
-
-void StyleWidget::addTreeItems()
-{
- //standard tree
- m_staWidget.treeWidget_2->setColumnCount(1);
- m_staWidget.treeWidget_2->header()->hide();
-
- QTreeWidgetItem *tmp;
- QTreeWidgetItem *subtmp;
- QTreeWidgetItem *root1 = new QTreeWidgetItem(m_staWidget.treeWidget_2);
- root1->setText(0, "Root 1");
- QTreeWidgetItem *root2 = new QTreeWidgetItem(m_staWidget.treeWidget_2);
- root2->setText(0, "Root 2");
-
- for (int i=1; i<=10; ++i)
- {
- tmp = new QTreeWidgetItem(root1);
- tmp->setText(0, QString("Item %1").arg(i));
- for (int j=1; j<=5; ++j)
- {
- subtmp = new QTreeWidgetItem(tmp);
- subtmp->setText(0, QString("Sub Item %1").arg(j));
- }
- }
-
- // standard checked tree
- m_staWidget.treeWidget_4->setColumnCount(1);
- m_staWidget.treeWidget_4->header()->hide();
-
- root1 = new QTreeWidgetItem(m_staWidget.treeWidget_4);
- root1->setText(0, "Root 1");
- root1->setCheckState(0, Qt::Checked);
- root2 = new QTreeWidgetItem(m_staWidget.treeWidget_4);
- root2->setText(0, "Root 2");
- root2->setCheckState(0, Qt::Checked);
-
- for (int i=1; i<=10; ++i)
- {
- tmp = new QTreeWidgetItem(root1);
- tmp->setText(0, QString("Item %1").arg(i));
- tmp->setCheckState(0, Qt::Checked);
- for (int j=1; j<=5; ++j)
- {
- subtmp = new QTreeWidgetItem(tmp);
- subtmp->setText(0, QString("Sub Item %1").arg(j));
- subtmp->setCheckState(0, Qt::Checked);
- }
- }
-
- // advanced (images) tree
- m_advWidget.treeWidget_2->setColumnCount(1);
- m_advWidget.treeWidget_2->header()->hide();
-
- root1 = new QTreeWidgetItem(m_advWidget.treeWidget_2);
- root1->setText(0, "Root 1");
- root1->setIcon(0, m_small1);
- root2 = new QTreeWidgetItem(m_advWidget.treeWidget_2);
- root2->setText(0, "Root 2");
- root2->setIcon(0, m_small1);
-
- for (int i=1; i<=10; ++i)
- {
- tmp = new QTreeWidgetItem(root1);
- tmp->setText(0, QString("Item %1").arg(i));
- tmp->setIcon(0, m_small2);
- for (int j=1; j<=5; ++j)
- {
- subtmp = new QTreeWidgetItem(tmp);
- subtmp->setText(0, QString("Sub Item %1").arg(j));
- tmp->setIcon(0, m_small1);
- }
- }
-
-}
-
-void StyleWidget::addTreeListItems()
-{
- //standard list
- QTreeWidgetItem *tmp;
- m_staWidget.treeWidget->setColumnCount(3);
- m_staWidget.treeWidget->headerItem()->setText(0, "Col1");
- m_staWidget.treeWidget->headerItem()->setText(1, "Col2");
- m_staWidget.treeWidget->headerItem()->setText(2, "Col3");
-
- for (int i=1; i<10; ++i)
- {
- tmp = new QTreeWidgetItem(m_staWidget.treeWidget);
- tmp->setText(0, QString("Item%1").arg(i));
- tmp->setText(1, QString("Item%11").arg(i));
- tmp->setText(2, QString("Item%12").arg(i));
- }
-
- //standard checked list
- m_staWidget.treeWidget_3->setColumnCount(3);
- m_staWidget.treeWidget_3->headerItem()->setText(0, "Col1");
- m_staWidget.treeWidget_3->headerItem()->setText(1, "Col2");
- m_staWidget.treeWidget_3->headerItem()->setText(2, "Col3");
-
- for (int i=1; i<10; ++i)
- {
- tmp = new QTreeWidgetItem(m_staWidget.treeWidget_3);
- tmp->setText(0, QString("Item%1").arg(i));
- tmp->setCheckState(0, Qt::Checked);
- tmp->setText(1, QString("Item%11").arg(i));
- tmp->setText(2, QString("Item%12").arg(i));
- }
-
- //with images
- m_advWidget.treeWidget->setColumnCount(2);
- m_advWidget.treeWidget->headerItem()->setText(0, "Col1");
- m_advWidget.treeWidget->headerItem()->setIcon(0, m_small2);
- m_advWidget.treeWidget->headerItem()->setText(1, "Col2");
- m_advWidget.treeWidget->headerItem()->setIcon(1, m_small2);
-
- for (int i=1; i<10; ++i)
- {
- tmp = new QTreeWidgetItem(m_advWidget.treeWidget);
- tmp->setText(0, QString("Item%1").arg(i));
- tmp->setIcon(0, m_small1);
- tmp->setText(1, QString("Item%11").arg(i));
- }
-}
-
-void StyleWidget::setupButtons()
-{
- m_advWidget.pushButton->setIcon(m_small1);
- m_advWidget.pushButton_2->setIcon(m_small1);
- m_advWidget.checkBox->setIcon(m_small2);
- m_advWidget.checkBox_2->setIcon(m_small2);
- m_advWidget.radioButton->setIcon(m_small2);
- m_advWidget.radioButton_2->setIcon(m_small2);
-
- // tab page images
- m_advWidget.tabWidget->setTabIcon(0, m_small2);
- m_advWidget.tabWidget->setTabIcon(1, m_small2);
-}
diff --git a/tests/benchmarks/qtwidgets/mainwindow.h b/tests/benchmarks/qtwidgets/mainwindow.h
deleted file mode 100644
index 8a4521a..0000000
--- a/tests/benchmarks/qtwidgets/mainwindow.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the 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$
-**
-****************************************************************************/
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-
-#include <QWidget>
-#include <QWhatsThis>
-#include "ui_standard.h"
-#include "ui_advanced.h"
-#include "ui_system.h"
-
-class StyleWidget : public QWidget
-{
- Q_OBJECT
-
-public:
- StyleWidget(QWidget *parent = 0, Qt::WFlags f = 0);
- ~StyleWidget();
-
-public slots:
- void onWhatsThis() { QWhatsThis::enterWhatsThisMode(); }
-
-private:
- void addComboBoxItems();
- void addListItems();
- void addTextEdit();
- void setupOtherWidgets();
- void setupButtons();
- void addTreeItems();
- void addTreeListItems();
-
- Ui::Standard m_staWidget;
- Ui::Advanced m_advWidget;
- Ui::System m_sysWidget;
-
- QIcon m_small1;
- QIcon m_small2;
- QIcon m_big;
-};
-
-#endif //MAINWINDOW_H
-
diff --git a/tests/benchmarks/qtwidgets/qtstyles.qrc b/tests/benchmarks/qtwidgets/qtstyles.qrc
deleted file mode 100644
index 772891d..0000000
--- a/tests/benchmarks/qtwidgets/qtstyles.qrc
+++ /dev/null
@@ -1,8 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="/">
- <file name="icon.png">./icons/icon.png</file>
- <file name="icon.bmp">./icons/icon.bmp</file>
- <file name="big.png">./icons/big.png</file>
- <file name="folder.png">./icons/folder.png</file>
-</qresource>
-</RCC>
diff --git a/tests/benchmarks/qtwidgets/qtwidgets.pro b/tests/benchmarks/qtwidgets/qtwidgets.pro
deleted file mode 100644
index ad5e7ac..0000000
--- a/tests/benchmarks/qtwidgets/qtwidgets.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-load(qttest_p4)
-
-SOURCES += tst_qtwidgets.cpp mainwindow.cpp
-HEADERS += mainwindow.h
-QT += network
-RESOURCES = qtstyles.qrc
-FORMS += advanced.ui system.ui standard.ui
-
-
diff --git a/tests/benchmarks/qtwidgets/standard.ui b/tests/benchmarks/qtwidgets/standard.ui
deleted file mode 100644
index 9764a66..0000000
--- a/tests/benchmarks/qtwidgets/standard.ui
+++ /dev/null
@@ -1,1207 +0,0 @@
-<ui version="4.0" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
- <class>Standard</class>
- <widget class="QWidget" name="Standard" >
- <property name="objectName" >
- <string notr="true" >Standard</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>400</width>
- <height>300</height>
- </rect>
- </property>
- <layout class="QHBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>0</number>
- </property>
- <item>
- <widget class="QGroupBox" name="groupBox" >
- <property name="objectName" >
- <string notr="true" >groupBox</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>400</width>
- <height>300</height>
- </rect>
- </property>
- <property name="title" >
- <string>Standard</string>
- </property>
- <layout class="QVBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <layout class="QHBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <layout class="QVBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <layout class="QHBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QCheckBox" name="checkBox" >
- <property name="objectName" >
- <string notr="true" >checkBox</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>1</y>
- <width>114</width>
- <height>3</height>
- </rect>
- </property>
- <property name="text" >
- <string>Enabled &amp;CheckBox</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="checkBox_2" >
- <property name="objectName" >
- <string notr="true" >checkBox_2</string>
- </property>
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="geometry" >
- <rect>
- <x>121</x>
- <y>1</y>
- <width>116</width>
- <height>3</height>
- </rect>
- </property>
- <property name="text" >
- <string>Disabled Check&amp;Box</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="geometry" >
- <rect>
- <x>243</x>
- <y>1</y>
- <width>80</width>
- <height>3</height>
- </rect>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QComboBox" name="comboBox" >
- <property name="objectName" >
- <string notr="true" >comboBox</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>1</y>
- <width>41</width>
- <height>3</height>
- </rect>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="comboBox_2" >
- <property name="objectName" >
- <string notr="true" >comboBox_2</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>48</x>
- <y>1</y>
- <width>41</width>
- <height>3</height>
- </rect>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="comboBox_3" >
- <property name="objectName" >
- <string notr="true" >comboBox_3</string>
- </property>
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="geometry" >
- <rect>
- <x>95</x>
- <y>1</y>
- <width>41</width>
- <height>3</height>
- </rect>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QPushButton" name="pushButton" >
- <property name="objectName" >
- <string notr="true" >pushButton</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>1</y>
- <width>80</width>
- <height>3</height>
- </rect>
- </property>
- <property name="text" >
- <string>&amp;Enabled</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="pushButton_2" >
- <property name="objectName" >
- <string notr="true" >pushButton_2</string>
- </property>
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="geometry" >
- <rect>
- <x>87</x>
- <y>1</y>
- <width>80</width>
- <height>3</height>
- </rect>
- </property>
- <property name="text" >
- <string>Di&amp;sabled</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="geometry" >
- <rect>
- <x>173</x>
- <y>1</y>
- <width>150</width>
- <height>3</height>
- </rect>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QLabel" name="label" >
- <property name="objectName" >
- <string notr="true" >label</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>1</y>
- <width>99</width>
- <height>3</height>
- </rect>
- </property>
- <property name="frameShape" >
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Plain</enum>
- </property>
- <property name="text" >
- <string>Label with some text.</string>
- </property>
- <property name="textFormat" >
- <enum>Qt::AutoText</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_2" >
- <property name="objectName" >
- <string notr="true" >label_2</string>
- </property>
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="geometry" >
- <rect>
- <x>106</x>
- <y>1</y>
- <width>139</width>
- <height>3</height>
- </rect>
- </property>
- <property name="frameShape" >
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Plain</enum>
- </property>
- <property name="text" >
- <string>Disabled label with some text.</string>
- </property>
- <property name="textFormat" >
- <enum>Qt::AutoText</enum>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="geometry" >
- <rect>
- <x>251</x>
- <y>1</y>
- <width>72</width>
- <height>3</height>
- </rect>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QLineEdit" name="lineEdit" >
- <property name="objectName" >
- <string notr="true" >lineEdit</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>1</y>
- <width>135</width>
- <height>3</height>
- </rect>
- </property>
- <property name="text" >
- <string>Enabled</string>
- </property>
- <property name="echoMode" >
- <enum>QLineEdit::Normal</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="lineEdit_2" >
- <property name="objectName" >
- <string notr="true" >lineEdit_2</string>
- </property>
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="geometry" >
- <rect>
- <x>142</x>
- <y>1</y>
- <width>134</width>
- <height>3</height>
- </rect>
- </property>
- <property name="text" >
- <string>Disabled</string>
- </property>
- <property name="echoMode" >
- <enum>QLineEdit::Normal</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSpinBox" name="spinBox" >
- <property name="objectName" >
- <string notr="true" >spinBox</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>282</x>
- <y>1</y>
- <width>41</width>
- <height>3</height>
- </rect>
- </property>
- <property name="buttonSymbols" >
- <enum>QAbstractSpinBox::UpDownArrows</enum>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QRadioButton" name="radioButton" >
- <property name="objectName" >
- <string notr="true" >radioButton</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>1</y>
- <width>123</width>
- <height>3</height>
- </rect>
- </property>
- <property name="text" >
- <string>Enabled RadioButton</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="radioButton_2" >
- <property name="objectName" >
- <string notr="true" >radioButton_2</string>
- </property>
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="geometry" >
- <rect>
- <x>130</x>
- <y>1</y>
- <width>125</width>
- <height>3</height>
- </rect>
- </property>
- <property name="text" >
- <string>Disabled RadioButton</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="geometry" >
- <rect>
- <x>261</x>
- <y>1</y>
- <width>62</width>
- <height>3</height>
- </rect>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QScrollBar" name="horizontalScrollBar" >
- <property name="objectName" >
- <string notr="true" >horizontalScrollBar</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>1</y>
- <width>90</width>
- <height>3</height>
- </rect>
- </property>
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>90</width>
- <height>0</height>
- </size>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QScrollBar" name="horizontalScrollBar_2" >
- <property name="objectName" >
- <string notr="true" >horizontalScrollBar_2</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>97</x>
- <y>1</y>
- <width>30</width>
- <height>3</height>
- </rect>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QScrollBar" name="verticalScrollBar" >
- <property name="objectName" >
- <string notr="true" >verticalScrollBar</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>333</x>
- <y>1</y>
- <width>17</width>
- <height>37</height>
- </rect>
- </property>
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>1</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSlider" name="slider" >
- <property name="objectName" >
- <string notr="true" >slider</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>356</x>
- <y>1</y>
- <width>21</width>
- <height>37</height>
- </rect>
- </property>
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>1</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="tickPosition" >
- <enum>QSlider::TicksBelow</enum>
- </property>
- <property name="tickInterval" >
- <number>0</number>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QSlider" name="slider_2" >
- <property name="objectName" >
- <string notr="true" >slider_2</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>6</y>
- <width>90</width>
- <height>16</height>
- </rect>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="tickPosition" >
- <enum>QSlider::NoTicks</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSlider" name="slider_3" >
- <property name="objectName" >
- <string notr="true" >slider_3</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>97</x>
- <y>3</y>
- <width>89</width>
- <height>21</height>
- </rect>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="tickPosition" >
- <enum>QSlider::TicksBelow</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSlider" name="slider_4" >
- <property name="objectName" >
- <string notr="true" >slider_4</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>192</x>
- <y>3</y>
- <width>90</width>
- <height>21</height>
- </rect>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="tickPosition" >
- <enum>QSlider::TicksAbove</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSlider" name="slider_5" >
- <property name="objectName" >
- <string notr="true" >slider_5</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>288</x>
- <y>1</y>
- <width>89</width>
- <height>26</height>
- </rect>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="tickPosition" >
- <enum>QSlider::TicksBothSides</enum>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QTextEdit" name="textEdit" >
- <property name="objectName" >
- <string notr="true" >textEdit</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>1</y>
- <width>89</width>
- <height>37</height>
- </rect>
- </property>
- <property name="frameShape" >
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Sunken</enum>
- </property>
- <property name="verticalScrollBarPolicy" >
- <enum>Qt::ScrollBarAlwaysOn</enum>
- </property>
- <property name="horizontalScrollBarPolicy" >
- <enum>Qt::ScrollBarAlwaysOff</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QTextEdit" name="textEdit_2" >
- <property name="objectName" >
- <string notr="true" >textEdit_2</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>96</x>
- <y>1</y>
- <width>90</width>
- <height>37</height>
- </rect>
- </property>
- <property name="frameShape" >
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Sunken</enum>
- </property>
- <property name="verticalScrollBarPolicy" >
- <enum>Qt::ScrollBarAlwaysOff</enum>
- </property>
- <property name="horizontalScrollBarPolicy" >
- <enum>Qt::ScrollBarAlwaysOn</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QTextEdit" name="textEdit_3" >
- <property name="objectName" >
- <string notr="true" >textEdit_3</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>192</x>
- <y>1</y>
- <width>89</width>
- <height>100</height>
- </rect>
- </property>
- <property name="minimumSize" >
- <size>
- <width>0</width>
- <height>100</height>
- </size>
- </property>
- <property name="frameShape" >
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Sunken</enum>
- </property>
- <property name="verticalScrollBarPolicy" >
- <enum>Qt::ScrollBarAlwaysOn</enum>
- </property>
- <property name="horizontalScrollBarPolicy" >
- <enum>Qt::ScrollBarAlwaysOn</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QTextEdit" name="textEdit_4" >
- <property name="objectName" >
- <string notr="true" >textEdit_4</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>287</x>
- <y>1</y>
- <width>90</width>
- <height>37</height>
- </rect>
- </property>
- <property name="frameShape" >
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Sunken</enum>
- </property>
- <property name="verticalScrollBarPolicy" >
- <enum>Qt::ScrollBarAsNeeded</enum>
- </property>
- <property name="horizontalScrollBarPolicy" >
- <enum>Qt::ScrollBarAsNeeded</enum>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_2" >
- <property name="objectName" >
- <string notr="true" >groupBox_2</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>11</x>
- <y>132</y>
- <width>378</width>
- <height>39</height>
- </rect>
- </property>
- <property name="title" >
- <string>GroupBox</string>
- </property>
- <layout class="QVBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QProgressBar" name="progressBar" >
- <property name="objectName" >
- <string notr="true" >progressBar</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>11</x>
- <y>20</y>
- <width>356</width>
- <height>8</height>
- </rect>
- </property>
- <property name="value" >
- <number>50</number>
- </property>
- <property name="textVisible" >
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QListWidget" name="listWidget" >
- <property name="objectName" >
- <string notr="true" >listWidget</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>1</y>
- <width>107</width>
- <height>37</height>
- </rect>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QListWidget" name="listWidget_2" >
- <property name="objectName" >
- <string notr="true" >listWidget_2</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>114</x>
- <y>1</y>
- <width>107</width>
- <height>37</height>
- </rect>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QTabWidget" name="tabWidget" >
- <property name="objectName" >
- <string notr="true" >tabWidget</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>227</x>
- <y>1</y>
- <width>150</width>
- <height>37</height>
- </rect>
- </property>
- <property name="minimumSize" >
- <size>
- <width>150</width>
- <height>0</height>
- </size>
- </property>
- <property name="tabPosition" >
- <enum>QTabWidget::North</enum>
- </property>
- <property name="tabShape" >
- <enum>QTabWidget::Rounded</enum>
- </property>
- <widget class="QWidget" name="" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>148</width>
- <height>10</height>
- </rect>
- </property>
- <attribute name="title" >
- <string>Tab Page 1</string>
- </attribute>
- </widget>
- <widget class="QWidget" name="" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>116</width>
- <height>56</height>
- </rect>
- </property>
- <attribute name="title" >
- <string>Tab Page 2</string>
- </attribute>
- </widget>
- <widget class="QWidget" name="widget" >
- <property name="objectName" >
- <string notr="true" >widget</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>116</width>
- <height>56</height>
- </rect>
- </property>
- <attribute name="title" >
- <string>Tab Page 3</string>
- </attribute>
- </widget>
- <widget class="QWidget" name="widget" >
- <property name="objectName" >
- <string notr="true" >widget</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>146</width>
- <height>36</height>
- </rect>
- </property>
- <attribute name="title" >
- <string>Tab Page 4</string>
- </attribute>
- </widget>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QTabWidget" name="tabWidget_2" >
- <property name="objectName" >
- <string notr="true" >tabWidget_2</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>11</x>
- <y>214</y>
- <width>378</width>
- <height>90</height>
- </rect>
- </property>
- <property name="minimumSize" >
- <size>
- <width>0</width>
- <height>90</height>
- </size>
- </property>
- <property name="tabPosition" >
- <enum>QTabWidget::North</enum>
- </property>
- <property name="tabShape" >
- <enum>QTabWidget::Rounded</enum>
- </property>
- <widget class="QWidget" name="widget" >
- <property name="objectName" >
- <string notr="true" >widget</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>376</width>
- <height>63</height>
- </rect>
- </property>
- <attribute name="title" >
- <string>Tab Page 1</string>
- </attribute>
- </widget>
- <widget class="QWidget" name="widget" >
- <property name="objectName" >
- <string notr="true" >widget</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>424</width>
- <height>66</height>
- </rect>
- </property>
- <attribute name="title" >
- <string>Tab Page 2</string>
- </attribute>
- </widget>
- </widget>
- </item>
- <item>
- <layout class="QGridLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="0" column="1" >
- <widget class="QTreeWidget" name="treeWidget_2" >
- <property name="objectName" >
- <string notr="true" >treeWidget_2</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>192</x>
- <y>1</y>
- <width>185</width>
- <height>18</height>
- </rect>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QTreeWidget" name="treeWidget_3" >
- <property name="objectName" >
- <string notr="true" >treeWidget_3</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>20</y>
- <width>185</width>
- <height>18</height>
- </rect>
- </property>
- </widget>
- </item>
- <item row="0" column="0" >
- <widget class="QTreeWidget" name="treeWidget" >
- <property name="objectName" >
- <string notr="true" >treeWidget</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>1</y>
- <width>185</width>
- <height>18</height>
- </rect>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QTreeWidget" name="treeWidget_4" >
- <property name="objectName" >
- <string notr="true" >treeWidget_4</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>192</x>
- <y>20</y>
- <width>185</width>
- <height>18</height>
- </rect>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- <pixmapfunction></pixmapfunction>
- <connections/>
-</ui>
diff --git a/tests/benchmarks/qtwidgets/system.ui b/tests/benchmarks/qtwidgets/system.ui
deleted file mode 100644
index a641e0e..0000000
--- a/tests/benchmarks/qtwidgets/system.ui
+++ /dev/null
@@ -1,658 +0,0 @@
-<ui version="4.0" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
- <class>System</class>
- <widget class="QWidget" name="System" >
- <property name="objectName" >
- <string notr="true" >System</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>400</width>
- <height>604</height>
- </rect>
- </property>
- <layout class="QVBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <layout class="QGridLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="1" column="1" >
- <widget class="QToolButton" name="toolButton" >
- <property name="objectName" >
- <string notr="true" >toolButton</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>340</x>
- <y>138</y>
- <width>15</width>
- <height>19</height>
- </rect>
- </property>
- <property name="text" >
- <string>...</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QFrame" name="horizontalLine" >
- <property name="objectName" >
- <string notr="true" >horizontalLine</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>146</y>
- <width>333</width>
- <height>3</height>
- </rect>
- </property>
- <property name="frameShape" >
- <enum>QFrame::HLine</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Sunken</enum>
- </property>
- </widget>
- </item>
- <item row="0" column="2" >
- <widget class="QFrame" name="verticalLine" >
- <property name="objectName" >
- <string notr="true" >verticalLine</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>361</x>
- <y>1</y>
- <width>3</width>
- <height>131</height>
- </rect>
- </property>
- <property name="frameShape" >
- <enum>QFrame::VLine</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Sunken</enum>
- </property>
- </widget>
- </item>
- <item row="0" column="0" colspan="2" >
- <layout class="QGridLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="1" column="0" >
- <widget class="QDateTimeEdit" name="dateTimeEdit_2" >
- <property name="objectName" >
- <string notr="true" >dateTimeEdit_2</string>
- </property>
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>108</y>
- <width>113</width>
- <height>20</height>
- </rect>
- </property>
- <property name="buttonSymbols" >
- <enum>QAbstractSpinBox::UpDownArrows</enum>
- </property>
- </widget>
- </item>
- <item row="0" column="0" >
- <widget class="QDateTimeEdit" name="dateTimeEdit" >
- <property name="objectName" >
- <string notr="true" >dateTimeEdit</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>41</y>
- <width>113</width>
- <height>20</height>
- </rect>
- </property>
- <property name="buttonSymbols" >
- <enum>QAbstractSpinBox::UpDownArrows</enum>
- </property>
- </widget>
- </item>
- <item row="0" column="1" >
- <widget class="QDial" name="dial" >
- <property name="objectName" >
- <string notr="true" >dial</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>120</x>
- <y>1</y>
- <width>114</width>
- <height>100</height>
- </rect>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QLCDNumber" name="lcdNumber" >
- <property name="objectName" >
- <string notr="true" >lcdNumber</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>120</x>
- <y>107</y>
- <width>114</width>
- <height>23</height>
- </rect>
- </property>
- <property name="frameShape" >
- <enum>QFrame::Box</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Raised</enum>
- </property>
- <property name="mode" >
- <enum>QLCDNumber::Dec</enum>
- </property>
- <property name="segmentStyle" >
- <enum>QLCDNumber::Outline</enum>
- </property>
- </widget>
- </item>
- <item row="1" column="2" >
- <widget class="QLCDNumber" name="lcdNumber_2" >
- <property name="objectName" >
- <string notr="true" >lcdNumber_2</string>
- </property>
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="geometry" >
- <rect>
- <x>240</x>
- <y>107</y>
- <width>113</width>
- <height>23</height>
- </rect>
- </property>
- <property name="frameShape" >
- <enum>QFrame::Box</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Raised</enum>
- </property>
- <property name="mode" >
- <enum>QLCDNumber::Dec</enum>
- </property>
- <property name="segmentStyle" >
- <enum>QLCDNumber::Outline</enum>
- </property>
- </widget>
- </item>
- <item row="0" column="2" >
- <widget class="QDial" name="dial_2" >
- <property name="objectName" >
- <string notr="true" >dial_2</string>
- </property>
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="geometry" >
- <rect>
- <x>240</x>
- <y>1</y>
- <width>113</width>
- <height>100</height>
- </rect>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QTableWidget" name="tableWidget" >
- <property name="objectName" >
- <string notr="true" >tableWidget</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>1</y>
- <width>256</width>
- <height>193</height>
- </rect>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolBox" name="toolBox" >
- <property name="objectName" >
- <string notr="true" >toolBox</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>263</x>
- <y>1</y>
- <width>118</width>
- <height>193</height>
- </rect>
- </property>
- <property name="frameShape" >
- <enum>QFrame::Box</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Plain</enum>
- </property>
- <property name="currentIndex" >
- <number>0</number>
- </property>
- <widget class="QWidget" name="widget" >
- <property name="objectName" >
- <string notr="true" >widget</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>98</width>
- <height>119</height>
- </rect>
- </property>
- <attribute name="label" >
- <string>Tool Page 1</string>
- </attribute>
- </widget>
- <widget class="QWidget" name="widget" >
- <property name="objectName" >
- <string notr="true" >widget</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>115</width>
- <height>56</height>
- </rect>
- </property>
- <attribute name="label" >
- <string>Tool Page 2</string>
- </attribute>
- </widget>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QTabWidget" name="tabWidget" >
- <property name="objectName" >
- <string notr="true" >tabWidget</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>9</x>
- <y>375</y>
- <width>382</width>
- <height>220</height>
- </rect>
- </property>
- <property name="tabShape" >
- <enum>QTabWidget::Rounded</enum>
- </property>
- <widget class="QWidget" name="widget" >
- <property name="objectName" >
- <string notr="true" >widget</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>378</width>
- <height>196</height>
- </rect>
- </property>
- <attribute name="title" >
- <string>Tab Page 1</string>
- </attribute>
- <layout class="QGridLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="0" column="0" >
- <layout class="QVBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QComboBox" name="comboBox_3" >
- <property name="objectName" >
- <string notr="true" >comboBox_3</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>1</y>
- <width>332</width>
- <height>20</height>
- </rect>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QPushButton" name="pushButton_5" >
- <property name="objectName" >
- <string notr="true" >pushButton_5</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>1</y>
- <width>80</width>
- <height>23</height>
- </rect>
- </property>
- <property name="text" >
- <string>&amp;Enabled</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="pushButton_6" >
- <property name="objectName" >
- <string notr="true" >pushButton_6</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>87</x>
- <y>1</y>
- <width>80</width>
- <height>23</height>
- </rect>
- </property>
- <property name="text" >
- <string>Di&amp;sabled</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="geometry" >
- <rect>
- <x>173</x>
- <y>1</y>
- <width>158</width>
- <height>23</height>
- </rect>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QRadioButton" name="radioButton_3" >
- <property name="objectName" >
- <string notr="true" >radioButton_3</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>2</y>
- <width>123</width>
- <height>18</height>
- </rect>
- </property>
- <property name="text" >
- <string>Enabled RadioButton</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="radioButton_4" >
- <property name="objectName" >
- <string notr="true" >radioButton_4</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>130</x>
- <y>2</y>
- <width>125</width>
- <height>18</height>
- </rect>
- </property>
- <property name="text" >
- <string>Disabled RadioButton</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="geometry" >
- <rect>
- <x>261</x>
- <y>1</y>
- <width>70</width>
- <height>20</height>
- </rect>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QProgressBar" name="progressBar" >
- <property name="objectName" >
- <string notr="true" >progressBar</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>86</y>
- <width>332</width>
- <height>22</height>
- </rect>
- </property>
- <property name="value" >
- <number>24</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QScrollBar" name="horizontalScrollBar" >
- <property name="objectName" >
- <string notr="true" >horizontalScrollBar</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>114</y>
- <width>332</width>
- <height>17</height>
- </rect>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="0" column="1" >
- <widget class="QScrollBar" name="verticalScrollBar" >
- <property name="objectName" >
- <string notr="true" >verticalScrollBar</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>349</x>
- <y>9</y>
- <width>17</width>
- <height>132</height>
- </rect>
- </property>
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>1</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <spacer>
- <property name="objectName" >
- <string notr="true" />
- </property>
- <property name="geometry" >
- <rect>
- <x>9</x>
- <y>147</y>
- <width>334</width>
- <height>40</height>
- </rect>
- </property>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="widget" >
- <property name="objectName" >
- <string notr="true" >widget</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>377</width>
- <height>187</height>
- </rect>
- </property>
- <attribute name="title" >
- <string>Tab Page 2</string>
- </attribute>
- </widget>
- </widget>
- </item>
- </layout>
- </widget>
- <pixmapfunction></pixmapfunction>
- <connections/>
-</ui>
diff --git a/tests/benchmarks/qtwidgets/tst_qtwidgets.cpp b/tests/benchmarks/qtwidgets/tst_qtwidgets.cpp
deleted file mode 100644
index 8d2a31b..0000000
--- a/tests/benchmarks/qtwidgets/tst_qtwidgets.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the 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.h>
-#include <QtGui>
-#include <QtNetwork>
-
-#include "mainwindow.h"
-
-class tst_QtWidgets: public QObject
-{
- Q_OBJECT
-
-private slots:
- void snapshot();
-};
-
-void tst_QtWidgets::snapshot()
-{
- QBENCHMARK {
- StyleWidget widget(0, Qt::X11BypassWindowManagerHint);
- widget.show();
- QApplication::processEvents();
- }
-}
-
-QTEST_MAIN(tst_QtWidgets)
-
-#include "tst_qtwidgets.moc"
diff --git a/tests/benchmarks/qscriptclass/qscriptclass.pro b/tests/benchmarks/script/qscriptclass/qscriptclass.pro
index f0ffeb7..f0ffeb7 100644
--- a/tests/benchmarks/qscriptclass/qscriptclass.pro
+++ b/tests/benchmarks/script/qscriptclass/qscriptclass.pro
diff --git a/tests/benchmarks/script/qscriptclass/tst_qscriptclass.cpp b/tests/benchmarks/script/qscriptclass/tst_qscriptclass.cpp
new file mode 100644
index 0000000..6ab78b1
--- /dev/null
+++ b/tests/benchmarks/script/qscriptclass/tst_qscriptclass.cpp
@@ -0,0 +1,285 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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.h>
+#include <QtScript>
+
+Q_DECLARE_METATYPE(QScriptContext*)
+Q_DECLARE_METATYPE(QScriptValue)
+Q_DECLARE_METATYPE(QScriptValueList)
+
+// We want reliable numbers so we don't want to rely too much
+// on the number of iterations done by testlib.
+// this also make the results of valgrind more interesting
+const int iterationNumber = 5000;
+
+class tst_QScriptClass : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void noSuchProperty();
+ void property();
+ void setProperty();
+ void propertyFlags();
+ void call();
+ void hasInstance();
+ void iterate();
+};
+
+// Test the overhead of checking for an inexisting property of a QScriptClass
+void tst_QScriptClass::noSuchProperty()
+{
+ QScriptEngine eng;
+ QScriptClass cls(&eng);
+ QScriptValue obj = eng.newObject(&cls);
+ QString propertyName = QString::fromLatin1("foo");
+ QBENCHMARK {
+ for (int i = 0; i < iterationNumber; ++i)
+ (void)obj.property(propertyName);
+ }
+ Q_ASSERT(!obj.property(propertyName).isValid());
+}
+
+
+class FooScriptClass : public QScriptClass
+{
+public:
+ FooScriptClass(QScriptEngine *engine)
+ : QScriptClass(engine)
+ {
+ foo = engine->toStringHandle("foo");
+ }
+
+ QueryFlags queryProperty(const QScriptValue &,
+ const QScriptString &,
+ QueryFlags flags,
+ uint *id)
+ {
+ *id = 1;
+ return flags;
+ }
+
+ QScriptValue property(const QScriptValue &,
+ const QScriptString &,
+ uint)
+ {
+ return QScriptValue(engine(), 35);
+ }
+
+ void setProperty(QScriptValue &, const QScriptString &,
+ uint, const QScriptValue &)
+ {}
+
+ QScriptValue::PropertyFlags propertyFlags(const QScriptValue &, const QScriptString &, uint)
+ {
+ return QScriptValue::Undeletable;
+ }
+private:
+ QScriptString foo;
+};
+
+// Test the overhead of getting a value of QScriptClass accross the Javascript engine
+void tst_QScriptClass::property()
+{
+ QScriptEngine eng;
+ FooScriptClass cls(&eng);
+ QScriptValue obj = eng.newObject(&cls);
+ QScriptString foo = eng.toStringHandle("foo");
+ QBENCHMARK {
+ for (int i = 0; i < iterationNumber; ++i)
+ (void)obj.property(foo);
+ }
+}
+
+// Test the overhead of setting a value on QScriptClass accross the Javascript engine
+void tst_QScriptClass::setProperty()
+{
+ QScriptEngine eng;
+ FooScriptClass cls(&eng);
+ QScriptValue obj = eng.newObject(&cls);
+ QScriptValue value(456);
+ QScriptString foo = eng.toStringHandle("foo");
+ QBENCHMARK {
+ for (int i = 0; i < iterationNumber; ++i)
+ obj.setProperty(foo, value);
+ }
+}
+
+// Test the time taken to get the propeties flags accross the engine
+void tst_QScriptClass::propertyFlags()
+{
+ QScriptEngine eng;
+ FooScriptClass cls(&eng);
+ QScriptValue obj = eng.newObject(&cls);
+ QScriptString foo = eng.toStringHandle("foo");
+ QBENCHMARK {
+ for (int i = 0; i < iterationNumber; ++i)
+ (void)obj.propertyFlags(foo);
+ }
+}
+
+
+
+class ExtensionScriptClass : public QScriptClass
+{
+public:
+ ExtensionScriptClass(QScriptEngine *engine)
+ : QScriptClass(engine)
+ {
+ }
+
+ bool supportsExtension(Extension) const
+ {
+ return true;
+ }
+
+ QVariant extension(Extension, const QVariant &argument = QVariant())
+ {
+ Q_UNUSED(argument);
+ return QVariant();
+ }
+};
+
+// Check the overhead of the extension "call"
+void tst_QScriptClass::call()
+{
+ QScriptEngine eng;
+ ExtensionScriptClass cls(&eng);
+ QScriptValue obj = eng.newObject(&cls);
+ QScriptValue thisObject;
+ QScriptValueList args;
+ args.append(123);
+ QBENCHMARK {
+ for (int i = 0; i < iterationNumber; ++i)
+ (void)obj.call(thisObject, args);
+ }
+}
+
+// Check the overhead of the extension "instanceOf"
+void tst_QScriptClass::hasInstance()
+{
+ QScriptEngine eng;
+ ExtensionScriptClass cls(&eng);
+ QScriptValue obj = eng.newObject(&cls);
+ obj.setProperty("foo", 123);
+ QScriptValue plain = eng.newObject();
+ plain.setProperty("foo", obj.property("foo"));
+ QBENCHMARK {
+ for (int i = 0; i < iterationNumber; ++i)
+ (void)plain.instanceOf(obj);
+ }
+}
+
+
+
+static const int iteratorValuesNumber = 100;
+class TestClassPropertyIterator : public QScriptClassPropertyIterator
+{
+public:
+ TestClassPropertyIterator(const QScriptValue &object, QVector<QScriptString> names)
+ : QScriptClassPropertyIterator(object)
+ , m_index(0)
+ , names(names)
+ {
+ }
+
+ bool hasNext() const
+ {
+ return m_index < iteratorValuesNumber - 1;
+ }
+ void next() { ++m_index; }
+
+ bool hasPrevious() const { return m_index > 0; }
+ void previous() { --m_index; }
+
+ void toFront() { m_index = 0; }
+ void toBack() { m_index = iteratorValuesNumber - 1; }
+
+ QScriptString name() const { return names[m_index]; }
+ uint id() const { return m_index; }
+ QScriptValue::PropertyFlags flags() const { return 0; }
+
+private:
+ int m_index;
+ QVector<QScriptString> names;
+};
+
+
+class IteratorScriptClass : public QScriptClass
+{
+public:
+ IteratorScriptClass(QScriptEngine *engine)
+ : QScriptClass(engine)
+ {
+ for (int i = 0; i < iteratorValuesNumber; ++i)
+ names.append(engine->toStringHandle(QString("property%1").arg(i)));
+ }
+
+ QScriptClassPropertyIterator *newIterator(const QScriptValue &object)
+ {
+ return new TestClassPropertyIterator(object, names);
+ }
+private:
+ QVector<QScriptString> names;
+ friend class TestClassPropertyIterator;
+};
+
+// Measure the performance of the interface to iterate over QScriptClassPropertyIterator
+void tst_QScriptClass::iterate()
+{
+ QScriptEngine eng;
+ IteratorScriptClass cls(&eng);
+ QScriptValue obj = eng.newObject(&cls);
+ int iterationNumberIterate = iterationNumber / iteratorValuesNumber;
+ QBENCHMARK {
+ for (int i = 0; i < iterationNumberIterate; ++i) {
+ QScriptValueIterator it(obj);
+ while (it.hasNext()) {
+ it.next();
+ (void)it.scriptName();
+ }
+ }
+ }
+}
+
+QTEST_MAIN(tst_QScriptClass)
+#include "tst_qscriptclass.moc"
diff --git a/tests/benchmarks/qscriptengine/qscriptengine.pro b/tests/benchmarks/script/qscriptengine/qscriptengine.pro
index df6dbb3..df6dbb3 100644
--- a/tests/benchmarks/qscriptengine/qscriptengine.pro
+++ b/tests/benchmarks/script/qscriptengine/qscriptengine.pro
diff --git a/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp b/tests/benchmarks/script/qscriptengine/tst_qscriptengine.cpp
index 6c6f0b1..6c6f0b1 100644
--- a/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/benchmarks/script/qscriptengine/tst_qscriptengine.cpp
diff --git a/tests/benchmarks/qscriptvalue/qscriptvalue.pro b/tests/benchmarks/script/qscriptvalue/qscriptvalue.pro
index 04ea324..04ea324 100644
--- a/tests/benchmarks/qscriptvalue/qscriptvalue.pro
+++ b/tests/benchmarks/script/qscriptvalue/qscriptvalue.pro
diff --git a/tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp b/tests/benchmarks/script/qscriptvalue/tst_qscriptvalue.cpp
index 3bfc21c..3bfc21c 100644
--- a/tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp
+++ b/tests/benchmarks/script/qscriptvalue/tst_qscriptvalue.cpp
diff --git a/tests/benchmarks/script/script.pro b/tests/benchmarks/script/script.pro
new file mode 100644
index 0000000..8d689b6
--- /dev/null
+++ b/tests/benchmarks/script/script.pro
@@ -0,0 +1,5 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ qscriptclass \
+ qscriptengine \
+ qscriptvalue
diff --git a/tests/benchmarks/qsvgrenderer/data/tiger.svg b/tests/benchmarks/svg/qsvgrenderer/data/tiger.svg
index 983e570..983e570 100644
--- a/tests/benchmarks/qsvgrenderer/data/tiger.svg
+++ b/tests/benchmarks/svg/qsvgrenderer/data/tiger.svg
diff --git a/tests/benchmarks/qsvgrenderer/qsvgrenderer.pro b/tests/benchmarks/svg/qsvgrenderer/qsvgrenderer.pro
index 8222a09..8222a09 100644
--- a/tests/benchmarks/qsvgrenderer/qsvgrenderer.pro
+++ b/tests/benchmarks/svg/qsvgrenderer/qsvgrenderer.pro
diff --git a/tests/benchmarks/qsvgrenderer/qsvgrenderer.qrc b/tests/benchmarks/svg/qsvgrenderer/qsvgrenderer.qrc
index bdf4a31..bdf4a31 100644
--- a/tests/benchmarks/qsvgrenderer/qsvgrenderer.qrc
+++ b/tests/benchmarks/svg/qsvgrenderer/qsvgrenderer.qrc
diff --git a/tests/benchmarks/qsvgrenderer/tst_qsvgrenderer.cpp b/tests/benchmarks/svg/qsvgrenderer/tst_qsvgrenderer.cpp
index 895ffe0..895ffe0 100644
--- a/tests/benchmarks/qsvgrenderer/tst_qsvgrenderer.cpp
+++ b/tests/benchmarks/svg/qsvgrenderer/tst_qsvgrenderer.cpp
diff --git a/tests/benchmarks/svg/svg.pro b/tests/benchmarks/svg/svg.pro
new file mode 100644
index 0000000..cdc2ca5
--- /dev/null
+++ b/tests/benchmarks/svg/svg.pro
@@ -0,0 +1,3 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ qsvgrenderer
diff --git a/tests/tests.pro b/tests/tests.pro
index 7fbc8a9..75ca120 100644
--- a/tests/tests.pro
+++ b/tests/tests.pro
@@ -1,2 +1,3 @@
TEMPLATE = subdirs
-SUBDIRS = auto
+SUBDIRS = auto \
+ benchmarks
diff --git a/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp b/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp
index b65ba2a..6e49e54 100644
--- a/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp
+++ b/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp
@@ -614,67 +614,69 @@ void QHelpSearchIndexWriter::optimizeIndex()
void QHelpSearchIndexWriter::run()
{
- QMutexLocker mutexLocker(&mutex);
+#if !defined(QT_NO_EXCEPTIONS)
+ try {
+#endif
+ QMutexLocker mutexLocker(&mutex);
- if (m_cancel)
- return;
+ if (m_cancel)
+ return;
- const bool reindex = this->m_reindex;
- const QString collectionFile(this->m_collectionFile);
+ const bool reindex = this->m_reindex;
+ const QString collectionFile(this->m_collectionFile);
- mutexLocker.unlock();
+ mutexLocker.unlock();
- QHelpEngineCore engine(collectionFile, 0);
- if (!engine.setupData())
- return;
+ QHelpEngineCore engine(collectionFile, 0);
+ if (!engine.setupData())
+ return;
- const QLatin1String key("CluceneIndexedNamespaces");
- if (reindex)
- engine.setCustomValue(key, QLatin1String(""));
-
- QMap<QString, QDateTime> indexMap;
- const QLatin1String oldKey("CluceneSearchNamespaces");
- if (!engine.customValue(oldKey, QString()).isNull()) {
- // old style qhc file < 4.4.2, need to convert...
- const QStringList indexedNamespaces = engine.customValue(oldKey).
- toString().split(QLatin1String("|"), QString::SkipEmptyParts);
- foreach (const QString &nameSpace, indexedNamespaces)
- indexMap.insert(nameSpace, QDateTime());
- engine.removeCustomValue(oldKey);
- } else {
- QDataStream dataStream(engine.customValue(key).toByteArray());
- dataStream >> indexMap;
- }
+ const QLatin1String key("CluceneIndexedNamespaces");
+ if (reindex)
+ engine.setCustomValue(key, QLatin1String(""));
+
+ QMap<QString, QDateTime> indexMap;
+ const QLatin1String oldKey("CluceneSearchNamespaces");
+ if (!engine.customValue(oldKey, QString()).isNull()) {
+ // old style qhc file < 4.4.2, need to convert...
+ const QStringList indexedNamespaces
+ = engine.customValue(oldKey).toString()
+ .split(QLatin1String("|"), QString::SkipEmptyParts);
+ foreach (const QString &nameSpace, indexedNamespaces)
+ indexMap.insert(nameSpace, QDateTime());
+ engine.removeCustomValue(oldKey);
+ } else {
+ QDataStream dataStream(engine.customValue(key).toByteArray());
+ dataStream >> indexMap;
+ }
- QString indexPath = m_indexFilesFolder;
+ QString indexPath = m_indexFilesFolder;
- QFileInfo fInfo(indexPath);
- if (fInfo.exists() && !fInfo.isWritable()) {
- qWarning("Full Text Search, could not create index (missing permissions for '%s').", qPrintable(indexPath));
- return;
- }
+ QFileInfo fInfo(indexPath);
+ if (fInfo.exists() && !fInfo.isWritable()) {
+ qWarning("Full Text Search, could not create index (missing permissions for '%s').",
+ qPrintable(indexPath));
+ return;
+ }
- emit indexingStarted();
+ emit indexingStarted();
- QCLuceneIndexWriter *writer = 0;
- QCLuceneStandardAnalyzer analyzer;
- const QStringList registeredDocs = engine.registeredDocumentations();
+ QCLuceneIndexWriter *writer = 0;
+ QCLuceneStandardAnalyzer analyzer;
+ const QStringList registeredDocs = engine.registeredDocumentations();
- QLocalSocket localSocket;
- localSocket.connectToServer(QString(QLatin1String("QtAssistant%1"))
- .arg(QLatin1String(QT_VERSION_STR)));
+ QLocalSocket localSocket;
+ localSocket.connectToServer(QString(QLatin1String("QtAssistant%1"))
+ .arg(QLatin1String(QT_VERSION_STR)));
- QLocalServer localServer;
- bool otherInstancesRunning = true;
- if (!localSocket.waitForConnected()) {
- otherInstancesRunning = false;
- localServer.listen(QString(QLatin1String("QtAssistant%1"))
- .arg(QLatin1String(QT_VERSION_STR)));
- }
+ QLocalServer localServer;
+ bool otherInstancesRunning = true;
+ if (!localSocket.waitForConnected()) {
+ otherInstancesRunning = false;
+ localServer.listen(QString(QLatin1String("QtAssistant%1"))
+ .arg(QLatin1String(QT_VERSION_STR)));
+ }
-#if !defined(QT_NO_EXCEPTIONS)
- try {
-#endif
// check if it's locked, and if the other instance is running
if (!otherInstancesRunning && QCLuceneIndexReader::isLocked(indexPath))
QCLuceneIndexReader::unlock(indexPath);
@@ -706,7 +708,8 @@ void QHelpSearchIndexWriter::run()
removeDocuments(indexPath, namespaceName);
} else {
QString path = engine.documentationFileName(namespaceName);
- if (indexMap.value(namespaceName) < QFileInfo(path).lastModified()) {
+ if (indexMap.value(namespaceName)
+ < QFileInfo(path).lastModified()) {
// make sure we remove some outdated indexed stuff
indexMap.remove(namespaceName);
removeDocuments(indexPath, namespaceName);
@@ -727,94 +730,85 @@ void QHelpSearchIndexWriter::run()
indexMap.clear();
writer = new QCLuceneIndexWriter(indexPath, analyzer, true);
}
-#if !defined(QT_NO_EXCEPTIONS)
- } catch (...) {
- qWarning("Full Text Search, could not create index writer in '%s'.",
- qPrintable(indexPath));
- return;
- }
-#endif
-#if !defined(QT_NO_EXCEPTIONS)
- try {
-#endif
writer->setMergeFactor(100);
writer->setMinMergeDocs(1000);
writer->setMaxFieldLength(QCLuceneIndexWriter::DEFAULT_MAX_FIELD_LENGTH);
-#if !defined(QT_NO_EXCEPTIONS)
- } catch (...) {
- qWarning("Full Text Search, could not set writer properties.");
- return;
- }
-#endif
- QStringList namespaces;
- foreach(const QString &namespaceName, registeredDocs) {
- mutexLocker.relock();
- if (m_cancel) {
- closeIndexWriter(writer);
- emit indexingFinished();
- return;
- }
- mutexLocker.unlock();
+ QStringList namespaces;
+ foreach(const QString &namespaceName, registeredDocs) {
+ mutexLocker.relock();
+ if (m_cancel) {
+ closeIndexWriter(writer);
+ emit indexingFinished();
+ return;
+ }
+ mutexLocker.unlock();
- namespaces.append(namespaceName);
- if (indexMap.contains(namespaceName))
- continue;
+ namespaces.append(namespaceName);
+ if (indexMap.contains(namespaceName))
+ continue;
- const QList<QStringList> attributeSets =
- engine.filterAttributeSets(namespaceName);
+ const QList<QStringList> attributeSets =
+ engine.filterAttributeSets(namespaceName);
- if (attributeSets.isEmpty()) {
- const QList<QUrl> docFiles = indexableFiles(&engine, namespaceName,
- QStringList());
- if (!addDocuments(docFiles, engine, QStringList(), namespaceName,
- writer, analyzer))
- break;
- } else {
- bool bail = false;
- foreach (const QStringList &attributes, attributeSets) {
- const QList<QUrl> docFiles = indexableFiles(&engine,
- namespaceName, attributes);
- if (!addDocuments(docFiles, engine, attributes, namespaceName,
- writer, analyzer)) {
- bail = true;
+ if (attributeSets.isEmpty()) {
+ const QList<QUrl> docFiles = indexableFiles(&engine, namespaceName,
+ QStringList());
+ if (!addDocuments(docFiles, engine, QStringList(), namespaceName,
+ writer, analyzer))
break;
+ } else {
+ bool bail = false;
+ foreach (const QStringList &attributes, attributeSets) {
+ const QList<QUrl> docFiles = indexableFiles(&engine,
+ namespaceName, attributes);
+ if (!addDocuments(docFiles, engine, attributes, namespaceName,
+ writer, analyzer)) {
+ bail = true;
+ break;
+ }
}
+ if (bail)
+ break;
}
- if (bail)
- break;
- }
- mutexLocker.relock();
- if (!m_cancel) {
- QString path(engine.documentationFileName(namespaceName));
- indexMap.insert(namespaceName, QFileInfo(path).lastModified());
- writeIndexMap(engine, indexMap);
+ mutexLocker.relock();
+ if (!m_cancel) {
+ QString path(engine.documentationFileName(namespaceName));
+ indexMap.insert(namespaceName, QFileInfo(path).lastModified());
+ writeIndexMap(engine, indexMap);
+ }
+ mutexLocker.unlock();
}
- mutexLocker.unlock();
- }
- closeIndexWriter(writer);
+ closeIndexWriter(writer);
- mutexLocker.relock();
- if (!m_cancel) {
- mutexLocker.unlock();
-
- QStringList indexedNamespaces = indexMap.keys();
- foreach(const QString &namespaceName, indexedNamespaces) {
- mutexLocker.relock();
- if (m_cancel)
- break;
+ mutexLocker.relock();
+ if (!m_cancel) {
mutexLocker.unlock();
- if (!namespaces.contains(namespaceName)) {
- indexMap.remove(namespaceName);
- writeIndexMap(engine, indexMap);
- removeDocuments(indexPath, namespaceName);
+ QStringList indexedNamespaces = indexMap.keys();
+ foreach(const QString &namespaceName, indexedNamespaces) {
+ mutexLocker.relock();
+ if (m_cancel)
+ break;
+ mutexLocker.unlock();
+
+ if (!namespaces.contains(namespaceName)) {
+ indexMap.remove(namespaceName);
+ writeIndexMap(engine, indexMap);
+ removeDocuments(indexPath, namespaceName);
+ }
}
}
+
+#if !defined(QT_NO_EXCEPTIONS)
+ } catch (...) {
+ qWarning("%s: Failed because of CLucene exception.", Q_FUNC_INFO);
}
+#endif
+
emit indexingFinished();
}
diff --git a/tools/assistant/tools/assistant/aboutdialog.cpp b/tools/assistant/tools/assistant/aboutdialog.cpp
index 26d488d..a9bc352 100644
--- a/tools/assistant/tools/assistant/aboutdialog.cpp
+++ b/tools/assistant/tools/assistant/aboutdialog.cpp
@@ -70,7 +70,7 @@ void AboutLabel::setText(const QString &text, const QByteArray &resources)
TRACE_OBJ
QDataStream in(resources);
in >> m_resourceMap;
-
+
QTextBrowser::setText(text);
}
@@ -96,34 +96,34 @@ QVariant AboutLabel::loadResource(int type, const QUrl &name)
void AboutLabel::setSource(const QUrl &url)
{
TRACE_OBJ
- if (url.isValid() && (!HelpViewer::isLocalUrl(url)
- || !HelpViewer::canOpenPage(url.path()))) {
+ if (url.isValid() && (!AbstractHelpViewer::isLocalUrl(url)
+ || !AbstractHelpViewer::canOpenPage(url.path()))) {
if (!QDesktopServices::openUrl(url)) {
QMessageBox::warning(this, tr("Warning"),
- tr("Unable to launch external application.\n"),
- tr("OK"));
+ tr("Unable to launch external application.\n"), tr("OK"));
}
}
}
AboutDialog::AboutDialog(QWidget *parent)
- : QDialog(parent, Qt::MSWindowsFixedSizeDialogHint|Qt::WindowTitleHint|Qt::WindowSystemMenuHint)
+ : QDialog(parent, Qt::MSWindowsFixedSizeDialogHint |
+ Qt::WindowTitleHint|Qt::WindowSystemMenuHint)
{
TRACE_OBJ
m_pixmapLabel = 0;
m_aboutLabel = new AboutLabel();
-
+
m_closeButton = new QPushButton();
m_closeButton->setText(tr("&Close"));
- connect(m_closeButton, SIGNAL(clicked()),
- this, SLOT(close()));
+ connect(m_closeButton, SIGNAL(clicked()), this, SLOT(close()));
m_layout = new QGridLayout(this);
m_layout->addWidget(m_aboutLabel, 1, 0, 1, -1);
- m_layout->addItem(new QSpacerItem(20, 10, QSizePolicy::Minimum, QSizePolicy::Fixed), 2, 1, 1, 1);
+ m_layout->addItem(new QSpacerItem(20, 10, QSizePolicy::Minimum,
+ QSizePolicy::Fixed), 2, 1, 1, 1);
m_layout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding), 3, 0, 1, 1);
m_layout->addWidget(m_closeButton, 3, 1, 1, 1);
- m_layout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding), 3, 2, 1, 1);
+ m_layout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding), 3, 2, 1, 1);
}
void AboutDialog::setText(const QString &text, const QByteArray &resources)
@@ -153,7 +153,8 @@ QString AboutDialog::documentTitle() const
void AboutDialog::updateSize()
{
TRACE_OBJ
- QSize screenSize = QApplication::desktop()->availableGeometry(QCursor::pos()).size();
+ QSize screenSize = QApplication::desktop()->availableGeometry(QCursor::pos())
+ .size();
int limit = qMin(screenSize.width()/2, 500);
#ifdef Q_WS_MAC
@@ -165,7 +166,7 @@ void AboutDialog::updateSize()
if (width > limit)
width = limit;
-
+
QFontMetrics fm(qApp->font("QWorkspaceTitleBar"));
int windowTitleWidth = qMin(fm.width(windowTitle()) + 50, limit);
if (windowTitleWidth > width)
@@ -173,8 +174,8 @@ void AboutDialog::updateSize()
layout()->activate();
int height = (layout()->hasHeightForWidth())
- ? layout()->totalHeightForWidth(width)
- : layout()->totalMinimumSize().height();
+ ? layout()->totalHeightForWidth(width)
+ : layout()->totalMinimumSize().height();
setFixedSize(width, height);
QCoreApplication::removePostedEvents(this, QEvent::LayoutRequest);
}
diff --git a/tools/assistant/tools/assistant/assistant.pro b/tools/assistant/tools/assistant/assistant.pro
index edaf076..0733128 100644
--- a/tools/assistant/tools/assistant/assistant.pro
+++ b/tools/assistant/tools/assistant/assistant.pro
@@ -29,6 +29,8 @@ HEADERS += aboutdialog.h \
filternamedialog.h \
helpenginewrapper.h \
helpviewer.h \
+ helpviewer_qtb.h \
+ helpviewer_qwv.h \
indexwindow.h \
installdialog.h \
mainwindow.h \
@@ -55,6 +57,8 @@ SOURCES += aboutdialog.cpp \
filternamedialog.cpp \
helpenginewrapper.cpp \
helpviewer.cpp \
+ helpviewer_qtb.cpp \
+ helpviewer_qwv.cpp \
indexwindow.cpp \
installdialog.cpp \
main.cpp \
diff --git a/tools/assistant/tools/assistant/bookmarkdialog.cpp b/tools/assistant/tools/assistant/bookmarkdialog.cpp
index f081c15..c053b62 100644
--- a/tools/assistant/tools/assistant/bookmarkdialog.cpp
+++ b/tools/assistant/tools/assistant/bookmarkdialog.cpp
@@ -38,12 +38,12 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "tracer.h"
-
#include "bookmarkdialog.h"
#include "bookmarkfiltermodel.h"
#include "bookmarkitem.h"
#include "bookmarkmodel.h"
+#include "helpenginewrapper.h"
+#include "tracer.h"
#include <QtGui/QKeyEvent>
#include <QtGui/QMenu>
@@ -94,6 +94,10 @@ BookmarkDialog::BookmarkDialog(BookmarkModel *sourceModel, const QString &title,
ui.bookmarkFolders->setCurrentIndex(0);
ui.treeView->setCurrentIndex(ui.treeView->indexAt(QPoint(2, 2)));
+
+ const HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
+ if (helpEngine.usesAppFont())
+ setFont(helpEngine.appFont());
}
BookmarkDialog::~BookmarkDialog()
diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp
index 03af06c..dd91326 100644
--- a/tools/assistant/tools/assistant/centralwidget.cpp
+++ b/tools/assistant/tools/assistant/centralwidget.cpp
@@ -43,7 +43,8 @@
#include "centralwidget.h"
#include "findwidget.h"
#include "helpenginewrapper.h"
-#include "helpviewer.h"
+#include "helpviewer_qtb.h"
+#include "helpviewer_qwv.h"
#include "searchwidget.h"
#include "mainwindow.h"
#include "../shared/collectionconfiguration.h"
@@ -57,6 +58,7 @@
#include <QtGui/QPrinter>
#include <QtGui/QTabBar>
#include <QtGui/QTabWidget>
+#include <QtGui/QTextBrowser>
#include <QtGui/QToolButton>
#include <QtGui/QPageSetupDialog>
#include <QtGui/QPrintDialog>
@@ -70,6 +72,7 @@ namespace {
HelpViewer* helpViewerFromTabPosition(const QTabWidget *widget,
const QPoint &point)
{
+ TRACE_OBJ
QTabBar *tabBar = qFindChild<QTabBar*>(widget);
for (int i = 0; i < tabBar->count(); ++i) {
if (tabBar->tabRect(i).contains(point))
@@ -80,10 +83,8 @@ namespace {
CentralWidget *staticCentralWidget = 0;
}
-
// -- CentralWidget
-
CentralWidget::CentralWidget(MainWindow *parent)
: QWidget(parent)
, lastTabPage(0)
@@ -174,7 +175,7 @@ CentralWidget::~CentralWidget()
HelpViewer *viewer = qobject_cast<HelpViewer*>(tabWidget->widget(i));
if (viewer && viewer->source().isValid()) {
currentPages << viewer->source().toString();
- zoomFactors << QString::number(viewer->zoom());
+ zoomFactors << QString::number(viewer->scale());
}
}
@@ -208,7 +209,7 @@ void CentralWidget::zoomIn()
TRACE_OBJ
HelpViewer *viewer = currentHelpViewer();
if (viewer)
- viewer->zoomIn();
+ viewer->scaleUp();
if (tabWidget->currentWidget() == m_searchWidget)
m_searchWidget->zoomIn();
@@ -219,7 +220,7 @@ void CentralWidget::zoomOut()
TRACE_OBJ
HelpViewer *viewer = currentHelpViewer();
if (viewer)
- viewer->zoomOut();
+ viewer->scaleDown();
if (tabWidget->currentWidget() == m_searchWidget)
m_searchWidget->zoomOut();
@@ -237,9 +238,8 @@ void CentralWidget::nextPage()
void CentralWidget::resetZoom()
{
TRACE_OBJ
- HelpViewer *viewer = currentHelpViewer();
- if (viewer)
- viewer->resetZoom();
+ if (HelpViewer *viewer = currentHelpViewer())
+ viewer->resetScale();
if (tabWidget->currentWidget() == m_searchWidget)
m_searchWidget->resetZoom();
@@ -522,25 +522,12 @@ void CentralWidget::setSourceInNewTab(const QUrl &url, qreal zoom)
return;
#endif
- viewer = new HelpViewer(this);
+ viewer = new HelpViewer(this, zoom);
viewer->installEventFilter(this);
viewer->setSource(url);
viewer->setFocus(Qt::OtherFocusReason);
tabWidget->setCurrentIndex(tabWidget->addTab(viewer,
quoteTabTitle(viewer->documentTitle())));
-
- QFont font;
- getBrowserFontFor(viewer, &font);
-
-#if defined(QT_NO_WEBKIT)
- font.setPointSize((int)(font.pointSize() + zoom));
- setBrowserFontFor(viewer, font);
- viewer->setZoom((int)zoom);
-#else
- setBrowserFontFor(viewer, font);
- viewer->setTextSizeMultiplier(zoom == 0.0 ? 1.0 : zoom);
-#endif
-
connectSignals();
}
@@ -579,7 +566,13 @@ void CentralWidget::connectSignals()
}
}
-HelpViewer *CentralWidget::currentHelpViewer() const
+HelpViewer* CentralWidget::viewerAt(int index) const
+{
+ TRACE_OBJ
+ return qobject_cast<HelpViewer*>(tabWidget->widget(index));
+}
+
+HelpViewer* CentralWidget::currentHelpViewer() const
{
TRACE_OBJ
return qobject_cast<HelpViewer*>(tabWidget->currentWidget());
@@ -755,6 +748,7 @@ void CentralWidget::keyPressEvent(QKeyEvent *e)
void CentralWidget::findNext()
{
+ TRACE_OBJ
find(findWidget->text(), true);
}
@@ -876,21 +870,24 @@ bool CentralWidget::findInTextBrowser(const QString &ttf, bool forward)
void CentralWidget::updateBrowserFont()
{
TRACE_OBJ
- QFont font;
- bool searchAttached = searchWidgetAttached();
+ const bool searchAttached = searchWidgetAttached();
if (searchAttached) {
- getBrowserFontFor(m_searchWidget, &font);
- setBrowserFontFor(m_searchWidget, font);
+ HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
+ m_searchWidget->setFont(helpEngine.usesBrowserFont()
+ ? helpEngine.browserFont() : qApp->font());
}
- int i = searchAttached ? 1 : 0;
- getBrowserFontFor(tabWidget->widget(i), &font);
- for ( ; i < tabWidget->count(); ++i)
- setBrowserFontFor(tabWidget->widget(i), font);
+ const int count = tabWidget->count();
+ if (HelpViewer* viewer = viewerAt(count - 1)) {
+ const QFont &font = viewer->viewerFont();
+ for (int i = searchAttached ? 1 : 0; i < count; ++i)
+ viewerAt(i)->setViewerFont(font);
+ }
}
bool CentralWidget::searchWidgetAttached() const
{
+ TRACE_OBJ
return m_searchWidget && m_searchWidget->isAttached();
}
@@ -906,9 +903,9 @@ void CentralWidget::createSearchWidget(QHelpSearchEngine *searchEngine)
connect(m_searchWidget, SIGNAL(requestShowLinkInNewTab(QUrl)), this,
SLOT(setSourceFromSearchInNewTab(QUrl)));
- QFont font;
- getBrowserFontFor(m_searchWidget, &font);
- setBrowserFontFor(m_searchWidget, font);
+ HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
+ m_searchWidget->setFont(!helpEngine.usesBrowserFont() ? qApp->font()
+ : helpEngine.browserFont());
}
void CentralWidget::activateSearchWidget(bool updateLastTabPage)
@@ -1103,41 +1100,4 @@ QMap<int, QString> CentralWidget::currentSourceFileList() const
return sourceList;
}
-void CentralWidget::getBrowserFontFor(QWidget *viewer, QFont *font)
-{
- TRACE_OBJ
- HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
- if (!helpEngine.usesBrowserFont()) {
- *font = qApp->font(); // case for QTextBrowser and SearchWidget
-#if !defined(QT_NO_WEBKIT)
- QWebView *view = qobject_cast<QWebView*> (viewer);
- if (view) {
- QWebSettings *settings = QWebSettings::globalSettings();
- *font = QFont(settings->fontFamily(QWebSettings::StandardFont),
- settings->fontSize(QWebSettings::DefaultFontSize));
- }
-#endif
- } else {
- *font = helpEngine.browserFont();
- }
-}
-
-void CentralWidget::setBrowserFontFor(QWidget *widget, const QFont &font)
-{
- TRACE_OBJ
-#if !defined(QT_NO_WEBKIT)
- QWebView *view = qobject_cast<QWebView*> (widget);
- if (view) {
- QWebSettings *settings = view->settings();
- settings->setFontFamily(QWebSettings::StandardFont, font.family());
- settings->setFontSize(QWebSettings::DefaultFontSize, font.pointSize());
- } else if (widget && widget->font() != font) {
- widget->setFont(font);
- }
-#else
- if (widget && widget->font() != font)
- widget->setFont(font);
-#endif
-}
-
QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/centralwidget.h b/tools/assistant/tools/assistant/centralwidget.h
index 6c3e93c..f286ff7 100644
--- a/tools/assistant/tools/assistant/centralwidget.h
+++ b/tools/assistant/tools/assistant/centralwidget.h
@@ -70,6 +70,8 @@ public:
bool isBackwardAvailable() const;
QList<QAction*> globalActions() const;
void setGlobalActions(const QList<QAction*> &actions);
+
+ HelpViewer *viewerAt(int index) const;
HelpViewer *currentHelpViewer() const;
bool searchWidgetAttached() const;
@@ -143,9 +145,6 @@ private:
QString quoteTabTitle(const QString &title) const;
void setLastShownPages();
- void getBrowserFontFor(QWidget* viewer, QFont *font);
- void setBrowserFontFor(QWidget *widget, const QFont &font);
-
private:
int lastTabPage;
QList<QAction*> globalActionList;
diff --git a/tools/assistant/tools/assistant/contentwindow.cpp b/tools/assistant/tools/assistant/contentwindow.cpp
index 976ed7a..e0347c8 100644
--- a/tools/assistant/tools/assistant/contentwindow.cpp
+++ b/tools/assistant/tools/assistant/contentwindow.cpp
@@ -144,7 +144,7 @@ bool ContentWindow::eventFilter(QObject *o, QEvent *e)
qobject_cast<QHelpContentModel*>(m_contentWidget->model());
if (contentModel) {
QHelpContentItem *itm = contentModel->contentItemAt(index);
- if (itm && HelpViewer::canOpenPage(itm->url().path()))
+ if (itm && AbstractHelpViewer::canOpenPage(itm->url().path()))
CentralWidget::instance()->setSourceInNewTab(itm->url());
}
} else if (button == Qt::LeftButton) {
@@ -170,7 +170,7 @@ void ContentWindow::showContextMenu(const QPoint &pos)
QMenu menu;
QAction *curTab = menu.addAction(tr("Open Link"));
QAction *newTab = menu.addAction(tr("Open Link in New Tab"));
- if (!HelpViewer::canOpenPage(itm->url().path()))
+ if (!AbstractHelpViewer::canOpenPage(itm->url().path()))
newTab->setEnabled(false);
menu.move(m_contentWidget->mapToGlobal(pos));
diff --git a/tools/assistant/tools/assistant/helpviewer.cpp b/tools/assistant/tools/assistant/helpviewer.cpp
index 8e4d3ed..8597f6b 100644
--- a/tools/assistant/tools/assistant/helpviewer.cpp
+++ b/tools/assistant/tools/assistant/helpviewer.cpp
@@ -38,603 +38,31 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "tracer.h"
-
#include "helpviewer.h"
-#include "centralwidget.h"
-#include "helpenginewrapper.h"
-
-#include <QtCore/QDir>
-#include <QtCore/QEvent>
-#include <QtCore/QVariant>
-#include <QtCore/QByteArray>
-#include <QtCore/QStringBuilder>
-#include <QtCore/QTemporaryFile>
-#include <QtCore/QTimer>
-
-#include <QtGui/QMenu>
-#include <QtGui/QKeyEvent>
-#include <QtGui/QClipboard>
-#include <QtGui/QApplication>
-#include <QtGui/QMessageBox>
-#include <QtGui/QDesktopServices>
+#include "tracer.h"
-#include <QNetworkAccessManager>
-#include <QNetworkReply>
-#include <QNetworkRequest>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QUrl>
QT_BEGIN_NAMESPACE
-namespace {
- const QString PageNotFoundMessage =
- QCoreApplication::translate("HelpViewer",
- "<title>Error 404...</title><div align=\"center\"><br><br>"
- "<h1>The page could not be found</h1><br><h3>'%1'</h3></div>");
-}
-
-#if !defined(QT_NO_WEBKIT)
-
-class HelpNetworkReply : public QNetworkReply
-{
-public:
- HelpNetworkReply(const QNetworkRequest &request, const QByteArray &fileData,
- const QString &mimeType);
-
- virtual void abort();
-
- virtual qint64 bytesAvailable() const
- { return data.length() + QNetworkReply::bytesAvailable(); }
-
-protected:
- virtual qint64 readData(char *data, qint64 maxlen);
-
-private:
- QByteArray data;
- qint64 origLen;
-};
-
-HelpNetworkReply::HelpNetworkReply(const QNetworkRequest &request,
- const QByteArray &fileData, const QString& mimeType)
- : data(fileData), origLen(fileData.length())
-{
- TRACE_OBJ
- setRequest(request);
- setOpenMode(QIODevice::ReadOnly);
-
- setHeader(QNetworkRequest::ContentTypeHeader, mimeType);
- setHeader(QNetworkRequest::ContentLengthHeader, QByteArray::number(origLen));
- QTimer::singleShot(0, this, SIGNAL(metaDataChanged()));
- QTimer::singleShot(0, this, SIGNAL(readyRead()));
-}
-
-void HelpNetworkReply::abort()
-{
- TRACE_OBJ
- // nothing to do
-}
-
-qint64 HelpNetworkReply::readData(char *buffer, qint64 maxlen)
-{
- TRACE_OBJ
- qint64 len = qMin(qint64(data.length()), maxlen);
- if (len) {
- qMemCopy(buffer, data.constData(), len);
- data.remove(0, len);
- }
- if (!data.length())
- QTimer::singleShot(0, this, SIGNAL(finished()));
- return len;
-}
-
-class HelpNetworkAccessManager : public QNetworkAccessManager
-{
-public:
- HelpNetworkAccessManager(QObject *parent);
-
-protected:
- virtual QNetworkReply *createRequest(Operation op,
- const QNetworkRequest &request, QIODevice *outgoingData = 0);
-};
-
-HelpNetworkAccessManager::HelpNetworkAccessManager(QObject *parent)
- : QNetworkAccessManager(parent)
-{
- TRACE_OBJ
-}
-
-QNetworkReply *HelpNetworkAccessManager::createRequest(Operation /*op*/,
- const QNetworkRequest &request, QIODevice* /*outgoingData*/)
-{
- TRACE_OBJ
- 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 if (mimeType.endsWith(QLatin1String(".txt"))) {
- mimeType = QLatin1String("text/plain");
- } else {
- mimeType = QLatin1String("text/html");
- }
-
- HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
- const QByteArray &data = helpEngine.findFile(url).isValid()
- ? helpEngine.fileData(url)
- : PageNotFoundMessage.arg(url.toString()).toUtf8();
- return new HelpNetworkReply(request, data, mimeType);
-}
-
-class HelpPage : public QWebPage
-{
-public:
- HelpPage(CentralWidget *central, QObject *parent);
-
-protected:
- virtual QWebPage *createWindow(QWebPage::WebWindowType);
- virtual void triggerAction(WebAction action, bool checked = false);
-
- virtual bool acceptNavigationRequest(QWebFrame *frame,
- const QNetworkRequest &request, NavigationType type);
-
-private:
- CentralWidget *centralWidget;
- bool closeNewTabIfNeeded;
-
- friend class HelpViewer;
- Qt::MouseButtons m_pressedButtons;
- Qt::KeyboardModifiers m_keyboardModifiers;
-};
-
-HelpPage::HelpPage(CentralWidget *central, QObject *parent)
- : QWebPage(parent)
- , centralWidget(central)
- , closeNewTabIfNeeded(false)
- , m_pressedButtons(Qt::NoButton)
- , m_keyboardModifiers(Qt::NoModifier)
-{
- TRACE_OBJ
-}
-
-QWebPage *HelpPage::createWindow(QWebPage::WebWindowType)
-{
- TRACE_OBJ
- HelpPage* newPage = static_cast<HelpPage*>(centralWidget->newEmptyTab()->page());
- if (newPage)
- newPage->closeNewTabIfNeeded = closeNewTabIfNeeded;
- closeNewTabIfNeeded = false;
- return newPage;
-}
+QString AbstractHelpViewer::PageNotFoundMessage =
+ QCoreApplication::translate("HelpViewer", "<title>Error 404...</title><div "
+ "align=\"center\"><br><br><h1>The page could not be found</h1><br><h3>'%1'"
+ "</h3></div>");
-void HelpPage::triggerAction(WebAction action, bool checked)
+AbstractHelpViewer::AbstractHelpViewer()
{
- TRACE_OBJ
- switch (action) {
- case OpenLinkInNewWindow:
- closeNewTabIfNeeded = true;
- default: // fall through
- QWebPage::triggerAction(action, checked);
- break;
- }
}
-bool HelpPage::acceptNavigationRequest(QWebFrame *,
- const QNetworkRequest &request, QWebPage::NavigationType type)
+AbstractHelpViewer::~AbstractHelpViewer()
{
- TRACE_OBJ
- const QUrl &url = request.url();
- const bool closeNewTab = closeNewTabIfNeeded;
- closeNewTabIfNeeded = false;
-
- if (HelpViewer::isLocalUrl(url)) {
- const QString& path = url.path();
- if (!HelpViewer::canOpenPage(path)) {
- QTemporaryFile tmpTmpFile;
- if (!tmpTmpFile.open())
- return false;
- const QString extension = QFileInfo(path).completeSuffix();
- QFile actualTmpFile(tmpTmpFile.fileName() % QLatin1String(".")
- % extension);
- if (actualTmpFile.open(QIODevice::ReadWrite | QIODevice::Truncate)) {
- actualTmpFile.write(HelpEngineWrapper::instance().fileData(url));
- actualTmpFile.close();
- QDesktopServices::openUrl(QUrl(actualTmpFile.fileName()));
- }
-
- if (closeNewTab)
- QMetaObject::invokeMethod(CentralWidget::instance(), "closeTab");
- return false;
- }
-
- if (type == QWebPage::NavigationTypeLinkClicked
- && (m_keyboardModifiers & Qt::ControlModifier
- || m_pressedButtons == Qt::MidButton)) {
- HelpViewer* viewer = centralWidget->newEmptyTab();
- if (viewer)
- CentralWidget::instance()->setSource(url);
- m_pressedButtons = Qt::NoButton;
- m_keyboardModifiers = Qt::NoModifier;
- return false;
- }
- return true;
- }
-
- QDesktopServices::openUrl(url);
- return false;
}
-HelpViewer::HelpViewer(CentralWidget *parent)
- : QWebView(parent)
- , parentWidget(parent)
- , loadFinished(false)
- , helpEngine(HelpEngineWrapper::instance())
+bool AbstractHelpViewer::isLocalUrl(const QUrl &url)
{
TRACE_OBJ
- setAcceptDrops(false);
-
- setPage(new HelpPage(parent, this));
-
- page()->setNetworkAccessManager(new HelpNetworkAccessManager(this));
-
- QAction* action = pageAction(QWebPage::OpenLinkInNewWindow);
- action->setText(tr("Open Link in New Tab"));
- if (!parent)
- action->setVisible(false);
-
- pageAction(QWebPage::DownloadLinkToDisk)->setVisible(false);
- pageAction(QWebPage::DownloadImageToDisk)->setVisible(false);
- pageAction(QWebPage::OpenImageInNewWindow)->setVisible(false);
-
- connect(pageAction(QWebPage::Copy), SIGNAL(changed()), this,
- SLOT(actionChanged()));
- connect(pageAction(QWebPage::Back), SIGNAL(changed()), this,
- SLOT(actionChanged()));
- connect(pageAction(QWebPage::Forward), SIGNAL(changed()), this,
- SLOT(actionChanged()));
- connect(page(), SIGNAL(linkHovered(QString,QString,QString)), this,
- SIGNAL(highlighted(QString)));
- connect(this, SIGNAL(urlChanged(QUrl)), this, SIGNAL(sourceChanged(QUrl)));
- connect(this, SIGNAL(loadFinished(bool)), this, SLOT(setLoadFinished(bool)));
-}
-
-void HelpViewer::setSource(const QUrl &url)
-{
- TRACE_OBJ
- loadFinished = false;
- if (url.toString() == QLatin1String("help")) {
- load(QUrl(QLatin1String("qthelp://com.trolltech.com."
- "assistantinternal-1.0.0/assistant/assistant.html")));
- } else {
- load(url);
- }
-}
-
-void HelpViewer::resetZoom()
-{
- TRACE_OBJ
- setTextSizeMultiplier(1.0);
-}
-
-void HelpViewer::zoomIn(qreal range)
-{
- TRACE_OBJ
- setTextSizeMultiplier(textSizeMultiplier() + range / 10.0);
-}
-
-void HelpViewer::zoomOut(qreal range)
-{
- TRACE_OBJ
- setTextSizeMultiplier(qMax(0.0, textSizeMultiplier() - range / 10.0));
-}
-
-void HelpViewer::wheelEvent(QWheelEvent *e)
-{
- TRACE_OBJ
- if (e->modifiers() & Qt::ControlModifier) {
- const int delta = e->delta();
- if (delta > 0)
- zoomIn(delta / 120);
- else if (delta < 0)
- zoomOut(-delta / 120);
- e->accept();
- return;
- }
- QWebView::wheelEvent(e);
-}
-
-void HelpViewer::mouseReleaseEvent(QMouseEvent *e)
-{
- TRACE_OBJ
- if (e->button() == Qt::XButton1) {
- triggerPageAction(QWebPage::Back);
- return;
- }
-
- if (e->button() == Qt::XButton2) {
- triggerPageAction(QWebPage::Forward);
- return;
- }
-
- QWebView::mouseReleaseEvent(e);
-}
-
-void HelpViewer::actionChanged()
-{
- TRACE_OBJ
- QAction *a = qobject_cast<QAction *>(sender());
- if (a == pageAction(QWebPage::Copy))
- emit copyAvailable(a->isEnabled());
- else if (a == pageAction(QWebPage::Back))
- emit backwardAvailable(a->isEnabled());
- else if (a == pageAction(QWebPage::Forward))
- emit forwardAvailable(a->isEnabled());
-}
-
-void HelpViewer::mousePressEvent(QMouseEvent *event)
-{
- TRACE_OBJ
- HelpPage *currentPage = static_cast<HelpPage*>(page());
- if (currentPage) {
- currentPage->m_pressedButtons = event->buttons();
- currentPage->m_keyboardModifiers = event->modifiers();
- }
- QWebView::mousePressEvent(event);
-}
-
-void HelpViewer::setLoadFinished(bool ok)
-{
- TRACE_OBJ
- loadFinished = ok;
- emit sourceChanged(url());
-}
-
-#else // !defined(QT_NO_WEBKIT)
-
-HelpViewer::HelpViewer(CentralWidget *parent)
- : QTextBrowser(parent)
- , zoomCount(0)
- , controlPressed(false)
- , lastAnchor(QString())
- , parentWidget(parent)
- , helpEngine(HelpEngineWrapper::instance())
-{
- TRACE_OBJ
- document()->setDocumentMargin(8);
-}
-
-void HelpViewer::setSource(const QUrl &url)
-{
- TRACE_OBJ
- bool help = url.toString() == QLatin1String("help");
- if (url.isValid() && !help) {
- if (launchedWithExternalApp(url))
- return;
-
- QUrl u = helpEngine.findFile(url);
- if (u.isValid()) {
- QTextBrowser::setSource(u);
- return;
- }
- }
-
- if (help) {
- QTextBrowser::setSource(QUrl(QLatin1String("qthelp://com.trolltech.com."
- "assistantinternal-1.0.0/assistant/assistant.html")));
- } else {
- QTextBrowser::setSource(url);
- setHtml(PageNotFoundMessage.arg(url.toString()));
- emit sourceChanged(url);
- }
-}
-
-void HelpViewer::resetZoom()
-{
- TRACE_OBJ
- if (zoomCount == 0)
- return;
-
- QTextBrowser::zoomOut(zoomCount);
- zoomCount = 0;
-}
-
-void HelpViewer::zoomIn(int range)
-{
- TRACE_OBJ
- if (zoomCount == 10)
- return;
-
- QTextBrowser::zoomIn(range);
- zoomCount++;
-}
-
-void HelpViewer::zoomOut(int range)
-{
- TRACE_OBJ
- if (zoomCount == -5)
- return;
-
- QTextBrowser::zoomOut(range);
- zoomCount--;
-}
-
-bool HelpViewer::launchedWithExternalApp(const QUrl &url)
-{
- TRACE_OBJ
- const bool canOpen = canOpenPage(url.path());
- if (!isLocalUrl(url) || !canOpen) {
- bool launched = false;
- if (!canOpen && url.scheme() == QLatin1String("qthelp")) {
- const QString& path = url.path();
- const int lastDash = path.lastIndexOf(QChar('/'));
- QString fileName = QDir::tempPath() + QDir::separator();
- if (lastDash < 0)
- fileName += path;
- else
- fileName += path.mid(lastDash + 1, path.length());
-
- QFile tmpFile(QDir::cleanPath(fileName));
- if (tmpFile.open(QIODevice::ReadWrite)) {
- tmpFile.write(helpEngine.fileData(url));
- tmpFile.close();
- }
- launched = QDesktopServices::openUrl(QUrl(tmpFile.fileName()));
- } else {
- launched = QDesktopServices::openUrl(url);
- }
-
- if (!launched) {
- QMessageBox::information(this, tr("Help"),
- tr("Unable to launch external application.\n"), tr("OK"));
- }
- return true;
- }
- return false;
-}
-
-QVariant HelpViewer::loadResource(int type, const QUrl &name)
-{
- TRACE_OBJ
- QByteArray ba;
- if (type < 4) {
- ba = helpEngine.fileData(name);
- if (name.toString().endsWith(QLatin1String(".svg"), Qt::CaseInsensitive)) {
- QImage image;
- image.loadFromData(ba, "svg");
- if (!image.isNull())
- return image;
- }
- }
- return ba;
-}
-
-void HelpViewer::openLinkInNewTab()
-{
- TRACE_OBJ
- if(lastAnchor.isEmpty())
- return;
-
- parentWidget->setSourceInNewTab(QUrl(lastAnchor));
- lastAnchor.clear();
-}
-
-void HelpViewer::openLinkInNewTab(const QString &link)
-{
- TRACE_OBJ
- lastAnchor = link;
- openLinkInNewTab();
-}
-
-bool HelpViewer::hasAnchorAt(const QPoint& pos)
-{
- TRACE_OBJ
- lastAnchor = anchorAt(pos);
- if (lastAnchor.isEmpty())
- return false;
-
- lastAnchor = source().resolved(lastAnchor).toString();
- if (lastAnchor.at(0) == QLatin1Char('#')) {
- QString src = source().toString();
- int hsh = src.indexOf(QLatin1Char('#'));
- lastAnchor = (hsh>=0 ? src.left(hsh) : src) + lastAnchor;
- }
-
- return true;
-}
-
-void HelpViewer::contextMenuEvent(QContextMenuEvent *e)
-{
- TRACE_OBJ
- QMenu menu(QLatin1String(""), 0);
-
- QUrl link;
- QAction *copyAnchorAction = 0;
- if (hasAnchorAt(e->pos())) {
- link = anchorAt(e->pos());
- if (link.isRelative())
- link = source().resolved(link);
- copyAnchorAction = menu.addAction(tr("Copy &Link Location"));
- copyAnchorAction->setEnabled(!link.isEmpty() && link.isValid());
-
- menu.addAction(tr("Open Link in New Tab\tCtrl+LMB"), this,
- SLOT(openLinkInNewTab()));
- menu.addSeparator();
- }
- menu.addActions(parentWidget->globalActions());
- QAction *action = menu.exec(e->globalPos());
- if (action == copyAnchorAction)
- QApplication::clipboard()->setText(link.toString());
-}
-
-void HelpViewer::mouseReleaseEvent(QMouseEvent *e)
-{
- TRACE_OBJ
- if (e->button() == Qt::XButton1) {
- QTextBrowser::backward();
- return;
- }
-
- if (e->button() == Qt::XButton2) {
- QTextBrowser::forward();
- return;
- }
-
- controlPressed = e->modifiers() & Qt::ControlModifier;
- if ((controlPressed && hasAnchorAt(e->pos())) ||
- (e->button() == Qt::MidButton && hasAnchorAt(e->pos()))) {
- openLinkInNewTab();
- return;
- }
-
- QTextBrowser::mouseReleaseEvent(e);
-}
-
-void HelpViewer::keyPressEvent(QKeyEvent *e)
-{
- TRACE_OBJ
- if ((e->key() == Qt::Key_Home && e->modifiers() != Qt::NoModifier)
- || (e->key() == Qt::Key_End && e->modifiers() != Qt::NoModifier)) {
- QKeyEvent* event = new QKeyEvent(e->type(), e->key(), Qt::NoModifier,
- e->text(), e->isAutoRepeat(), e->count());
- e = event;
- }
- QTextBrowser::keyPressEvent(e);
-}
-
-void HelpViewer::wheelEvent(QWheelEvent *e)
-{
- TRACE_OBJ
- if (e->modifiers() == Qt::CTRL) {
- e->accept();
- (e->delta() > 0) ? zoomIn() : zoomOut();
- } else {
- e->ignore();
- QTextBrowser::wheelEvent(e);
- }
-}
-
-#endif // !defined(QT_NO_WEBKIT)
-
-void HelpViewer::home()
-{
- TRACE_OBJ
- setSource(helpEngine.homePage());
-}
-
-bool HelpViewer::canOpenPage(const QString &url)
-{
- TRACE_OBJ
- return url.endsWith(QLatin1String(".html"), Qt::CaseInsensitive)
- || url.endsWith(QLatin1String(".htm"), Qt::CaseInsensitive)
- || url == QLatin1String("blank");
-}
-
-bool HelpViewer::isLocalUrl(const QUrl &url)
-{
- TRACE_OBJ
- const QString scheme = url.scheme();
+ const QString &scheme = url.scheme();
return scheme.isEmpty()
|| scheme == QLatin1String("file")
|| scheme == QLatin1String("qrc")
@@ -643,5 +71,12 @@ bool HelpViewer::isLocalUrl(const QUrl &url)
|| scheme == QLatin1String("about");
}
+bool AbstractHelpViewer::canOpenPage(const QString &url)
+{
+ TRACE_OBJ
+ return url.endsWith(QLatin1String(".html"), Qt::CaseInsensitive)
+ || url.endsWith(QLatin1String(".htm"), Qt::CaseInsensitive)
+ || url == QLatin1String("blank");
+}
QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/helpviewer.h b/tools/assistant/tools/assistant/helpviewer.h
index 4dd8064..fe860fd 100644
--- a/tools/assistant/tools/assistant/helpviewer.h
+++ b/tools/assistant/tools/assistant/helpviewer.h
@@ -38,144 +38,37 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
#ifndef HELPVIEWER_H
#define HELPVIEWER_H
-#include <QtCore/QUrl>
-#include <QtCore/QVariant>
-#include <QtGui/QTextBrowser>
-#include <QtGui/QAction>
+#include <QtCore/QString>
-#if !defined(QT_NO_WEBKIT)
-#include <QWebView>
-#endif
+#include <QtGui/QFont>
QT_BEGIN_NAMESPACE
-class CentralWidget;
-class HelpEngineWrapper;
-
-class QPoint;
-class QString;
-class QKeyEvent;
-class QMouseEvent;
-class QContextMenuEvent;
+class QUrl;
-#if !defined(QT_NO_WEBKIT)
-
-class HelpViewer : public QWebView
+class AbstractHelpViewer
{
- Q_OBJECT
-
public:
- HelpViewer(CentralWidget *parent);
- void setSource(const QUrl &url);
-
- inline QUrl source() const
- { return url(); }
-
- inline QString documentTitle() const
- { return title(); }
-
- inline bool hasSelection() const
- { return !selectedText().isEmpty(); } // ### this is suboptimal
-
- void resetZoom();
- void zoomIn(qreal range = 1);
- void zoomOut(qreal range = 1);
+ AbstractHelpViewer();
+ ~AbstractHelpViewer();
- inline void copy()
- { return triggerPageAction(QWebPage::Copy); }
+ virtual QFont viewerFont() const = 0;
+ virtual void setViewerFont(const QFont &font) = 0;
- inline bool isForwardAvailable() const
- { return pageAction(QWebPage::Forward)->isEnabled(); }
- inline bool isBackwardAvailable() const
- { return pageAction(QWebPage::Back)->isEnabled(); }
- inline bool hasLoadFinished() const
- { return loadFinished; }
- inline qreal zoom() const
- { return textSizeMultiplier(); }
+ virtual void scaleUp() = 0;
+ virtual void scaleDown() = 0;
+
+ virtual void resetScale() = 0;
+ virtual qreal scale() const = 0;
- static bool canOpenPage(const QString &url);
+ static QString PageNotFoundMessage;
static bool isLocalUrl(const QUrl &url);
-
-public Q_SLOTS:
- void home();
- void backward() { back(); }
-
-Q_SIGNALS:
- void copyAvailable(bool enabled);
- void forwardAvailable(bool enabled);
- void backwardAvailable(bool enabled);
- void highlighted(const QString &);
- void sourceChanged(const QUrl &);
-
-protected:
- virtual void wheelEvent(QWheelEvent *);
- void mouseReleaseEvent(QMouseEvent *e);
- void mousePressEvent(QMouseEvent *event);
-
-private Q_SLOTS:
- void actionChanged();
- void setLoadFinished(bool ok);
-
-private:
- CentralWidget* parentWidget;
- bool loadFinished;
- HelpEngineWrapper &helpEngine;
-};
-
-#else
-
-class HelpViewer : public QTextBrowser
-{
- Q_OBJECT
-
-public:
- HelpViewer(CentralWidget *parent);
- void setSource(const QUrl &url);
-
- void resetZoom();
- void zoomIn(int range = 1);
- void zoomOut(int range = 1);
- int zoom() const { return zoomCount; }
- void setZoom(int zoom) { zoomCount = zoom; }
-
- inline bool hasSelection() const
- { return textCursor().hasSelection(); }
-
- bool launchedWithExternalApp(const QUrl &url);
static bool canOpenPage(const QString &url);
- static bool isLocalUrl(const QUrl &url);
-
-public Q_SLOTS:
- void home();
-
-protected:
- void wheelEvent(QWheelEvent *e);
-
-private:
- QVariant loadResource(int type, const QUrl &name);
- void openLinkInNewTab(const QString &link);
- bool hasAnchorAt(const QPoint& pos);
- void contextMenuEvent(QContextMenuEvent *e);
- void mouseReleaseEvent(QMouseEvent *e);
- void keyPressEvent(QKeyEvent *e);
-
-private slots:
- void openLinkInNewTab();
-
-private:
- int zoomCount;
- bool controlPressed;
- QString lastAnchor;
- CentralWidget* parentWidget;
- HelpEngineWrapper &helpEngine;
};
-#endif
-
QT_END_NAMESPACE
-#endif
+#endif // HELPVIEWER_H
diff --git a/tools/assistant/tools/assistant/helpviewer_qtb.cpp b/tools/assistant/tools/assistant/helpviewer_qtb.cpp
new file mode 100644
index 0000000..3aafe67
--- /dev/null
+++ b/tools/assistant/tools/assistant/helpviewer_qtb.cpp
@@ -0,0 +1,331 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Assistant 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$
+**
+****************************************************************************/
+#if defined(QT_NO_WEBKIT)
+
+#include "helpviewer_qtb.h"
+#include "helpviewer_qwv.h"
+
+#include "centralwidget.h"
+#include "helpenginewrapper.h"
+#include "tracer.h"
+
+#include <QtCore/QDir>
+#include <QtCore/QStringBuilder>
+
+#include <QtGui/QContextMenuEvent>
+#include <QtGui/QMenu>
+#include <QtGui/QClipboard>
+#include <QtGui/QApplication>
+#include <QtGui/QMessageBox>
+#include <QtGui/QDesktopServices>
+
+QT_BEGIN_NAMESPACE
+
+HelpViewer::HelpViewer(CentralWidget *parent, qreal zoom)
+ : QTextBrowser(parent)
+ , zoomCount(zoom)
+ , controlPressed(false)
+ , lastAnchor(QString())
+ , parentWidget(parent)
+ , helpEngine(HelpEngineWrapper::instance())
+ , forceFont(false)
+{
+ TRACE_OBJ
+ installEventFilter(this);
+ document()->setDocumentMargin(8);
+
+ QFont font = viewerFont();
+ font.setPointSize(int(font.pointSize() + zoom));
+ setViewerFont(font);
+}
+
+HelpViewer::~HelpViewer()
+{
+ TRACE_OBJ
+}
+
+QFont HelpViewer::viewerFont() const
+{
+ TRACE_OBJ
+ if (HelpEngineWrapper::instance().usesBrowserFont())
+ return helpEngine.browserFont();
+ return qApp->font();
+}
+
+void HelpViewer::setViewerFont(const QFont &newFont)
+{
+ TRACE_OBJ
+ if (font() != newFont) {
+ forceFont = true;
+ setFont(newFont);
+ forceFont = false;
+ }
+}
+
+void HelpViewer::scaleUp()
+{
+ TRACE_OBJ
+ if (zoomCount < 10) {
+ ++zoomCount;
+ forceFont = true;
+ zoomIn();
+ forceFont = false;
+ }
+}
+
+void HelpViewer::scaleDown()
+{
+ TRACE_OBJ
+ if (zoomCount > -5) {
+ --zoomCount;
+ forceFont = true;
+ zoomOut();
+ forceFont = false;
+ }
+}
+
+void HelpViewer::resetScale()
+{
+ TRACE_OBJ
+ if (zoomCount != 0) {
+ forceFont = true;
+ zoomOut(zoomCount);
+ forceFont = false;
+ }
+ zoomCount = 0;
+}
+
+void HelpViewer::setSource(const QUrl &url)
+{
+ TRACE_OBJ
+ bool help = url.toString() == QLatin1String("help");
+ if (url.isValid() && !help) {
+ if (launchedWithExternalApp(url))
+ return;
+
+ QUrl u = helpEngine.findFile(url);
+ if (u.isValid()) {
+ QTextBrowser::setSource(u);
+ return;
+ }
+ }
+
+ if (help) {
+ QTextBrowser::setSource(QUrl(QLatin1String("qthelp://com.trolltech.com."
+ "assistantinternal-1.0.0/assistant/assistant.html")));
+ } else {
+ QTextBrowser::setSource(url);
+ setHtml(PageNotFoundMessage.arg(url.toString()));
+ emit sourceChanged(url);
+ }
+}
+
+bool HelpViewer::launchedWithExternalApp(const QUrl &url)
+{
+ TRACE_OBJ
+ const bool canOpen = canOpenPage(url.path());
+ if (!isLocalUrl(url) || !canOpen) {
+ bool launched = false;
+ if (!canOpen && url.scheme() == QLatin1String("qthelp")) {
+ const QString& path = url.path();
+ const int lastDash = path.lastIndexOf(QChar('/'));
+ QString fileName = QDir::tempPath() + QDir::separator();
+ if (lastDash < 0)
+ fileName += path;
+ else
+ fileName += path.mid(lastDash + 1, path.length());
+
+ QFile tmpFile(QDir::cleanPath(fileName));
+ if (tmpFile.open(QIODevice::ReadWrite)) {
+ tmpFile.write(helpEngine.fileData(url));
+ tmpFile.close();
+ }
+ launched = QDesktopServices::openUrl(QUrl(tmpFile.fileName()));
+ } else {
+ launched = QDesktopServices::openUrl(url);
+ }
+
+ if (!launched) {
+ QMessageBox::information(this, tr("Help"),
+ tr("Unable to launch external application.\n"), tr("OK"));
+ }
+ return true;
+ }
+ return false;
+}
+
+QVariant HelpViewer::loadResource(int type, const QUrl &name)
+{
+ TRACE_OBJ
+ QByteArray ba;
+ if (type < 4) {
+ ba = helpEngine.fileData(name);
+ if (name.toString().endsWith(QLatin1String(".svg"), Qt::CaseInsensitive)) {
+ QImage image;
+ image.loadFromData(ba, "svg");
+ if (!image.isNull())
+ return image;
+ }
+ }
+ return ba;
+}
+
+void HelpViewer::openLinkInNewTab()
+{
+ TRACE_OBJ
+ if(lastAnchor.isEmpty())
+ return;
+
+ parentWidget->setSourceInNewTab(QUrl(lastAnchor));
+ lastAnchor.clear();
+}
+
+void HelpViewer::openLinkInNewTab(const QString &link)
+{
+ TRACE_OBJ
+ lastAnchor = link;
+ openLinkInNewTab();
+}
+
+bool HelpViewer::hasAnchorAt(const QPoint& pos)
+{
+ TRACE_OBJ
+ lastAnchor = anchorAt(pos);
+ if (lastAnchor.isEmpty())
+ return false;
+
+ lastAnchor = source().resolved(lastAnchor).toString();
+ if (lastAnchor.at(0) == QLatin1Char('#')) {
+ QString src = source().toString();
+ int hsh = src.indexOf(QLatin1Char('#'));
+ lastAnchor = (hsh>=0 ? src.left(hsh) : src) + lastAnchor;
+ }
+
+ return true;
+}
+
+void HelpViewer::contextMenuEvent(QContextMenuEvent *e)
+{
+ TRACE_OBJ
+ QMenu menu(QLatin1String(""), 0);
+
+ QUrl link;
+ QAction *copyAnchorAction = 0;
+ if (hasAnchorAt(e->pos())) {
+ link = anchorAt(e->pos());
+ if (link.isRelative())
+ link = source().resolved(link);
+ copyAnchorAction = menu.addAction(tr("Copy &Link Location"));
+ copyAnchorAction->setEnabled(!link.isEmpty() && link.isValid());
+
+ menu.addAction(tr("Open Link in New Tab\tCtrl+LMB"), this,
+ SLOT(openLinkInNewTab()));
+ menu.addSeparator();
+ }
+ menu.addActions(parentWidget->globalActions());
+ QAction *action = menu.exec(e->globalPos());
+ if (action == copyAnchorAction)
+ QApplication::clipboard()->setText(link.toString());
+}
+
+void HelpViewer::mouseReleaseEvent(QMouseEvent *e)
+{
+ TRACE_OBJ
+ if (e->button() == Qt::XButton1) {
+ QTextBrowser::backward();
+ return;
+ }
+
+ if (e->button() == Qt::XButton2) {
+ QTextBrowser::forward();
+ return;
+ }
+
+ controlPressed = e->modifiers() & Qt::ControlModifier;
+ if ((controlPressed && hasAnchorAt(e->pos())) ||
+ (e->button() == Qt::MidButton && hasAnchorAt(e->pos()))) {
+ openLinkInNewTab();
+ return;
+ }
+
+ QTextBrowser::mouseReleaseEvent(e);
+}
+
+void HelpViewer::keyPressEvent(QKeyEvent *e)
+{
+ TRACE_OBJ
+ if ((e->key() == Qt::Key_Home && e->modifiers() != Qt::NoModifier)
+ || (e->key() == Qt::Key_End && e->modifiers() != Qt::NoModifier)) {
+ QKeyEvent* event = new QKeyEvent(e->type(), e->key(), Qt::NoModifier,
+ e->text(), e->isAutoRepeat(), e->count());
+ e = event;
+ }
+ QTextBrowser::keyPressEvent(e);
+}
+
+void HelpViewer::home()
+{
+ TRACE_OBJ
+ setSource(helpEngine.homePage());
+}
+
+void HelpViewer::wheelEvent(QWheelEvent *e)
+{
+ TRACE_OBJ
+ if (e->modifiers() == Qt::ControlModifier) {
+ e->accept();
+ e->delta() > 0 ? scaleUp() : scaleDown();
+ } else {
+ QTextBrowser::wheelEvent(e);
+ }
+}
+
+bool HelpViewer::eventFilter(QObject *obj, QEvent *event)
+{
+ TRACE_OBJ
+ if (event->type() == QEvent::FontChange && !forceFont)
+ return true;
+ return QTextBrowser::eventFilter(obj, event);
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_WEBKIT
diff --git a/tools/assistant/tools/assistant/helpviewer_qtb.h b/tools/assistant/tools/assistant/helpviewer_qtb.h
new file mode 100644
index 0000000..e927b34
--- /dev/null
+++ b/tools/assistant/tools/assistant/helpviewer_qtb.h
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Assistant 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$
+**
+****************************************************************************/
+#if defined(QT_NO_WEBKIT)
+
+#ifndef HELPVIEWERQTB_H
+#define HELPVIEWERQTB_H
+
+#include "helpviewer.h"
+
+#include <QtCore/QUrl>
+#include <QtCore/QVariant>
+
+#include <QtGui/QTextBrowser>
+
+QT_BEGIN_NAMESPACE
+
+class CentralWidget;
+class HelpEngineWrapper;
+class QContextMenuEvent;
+class QKeyEvent;
+class QMouseEvent;
+
+class HelpViewer : public QTextBrowser, public AbstractHelpViewer
+{
+ Q_OBJECT
+
+public:
+ HelpViewer(CentralWidget *parent, qreal zoom = 0.0);
+ ~HelpViewer();
+
+ QFont viewerFont() const;
+ void setViewerFont(const QFont &font);
+
+ void scaleUp();
+ void scaleDown();
+ void resetScale();
+ qreal scale() const { return zoomCount; }
+
+ void setSource(const QUrl &url);
+
+ inline bool hasSelection() const
+ { return textCursor().hasSelection(); }
+
+ bool launchedWithExternalApp(const QUrl &url);
+
+public Q_SLOTS:
+ void home();
+
+protected:
+ void wheelEvent(QWheelEvent *e);
+ bool eventFilter(QObject *obj, QEvent *event);
+
+private:
+ QVariant loadResource(int type, const QUrl &name);
+ void openLinkInNewTab(const QString &link);
+ bool hasAnchorAt(const QPoint& pos);
+ void contextMenuEvent(QContextMenuEvent *e);
+ void mouseReleaseEvent(QMouseEvent *e);
+ void keyPressEvent(QKeyEvent *e);
+
+private slots:
+ void openLinkInNewTab();
+
+private:
+ int zoomCount;
+ bool controlPressed;
+ QString lastAnchor;
+ CentralWidget* parentWidget;
+ HelpEngineWrapper &helpEngine;
+
+ bool forceFont;
+};
+
+QT_END_NAMESPACE
+
+#endif // HELPVIEWERQTB_H
+
+#endif // QT_NO_WEBKIT
diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.cpp b/tools/assistant/tools/assistant/helpviewer_qwv.cpp
new file mode 100644
index 0000000..4857e00
--- /dev/null
+++ b/tools/assistant/tools/assistant/helpviewer_qwv.cpp
@@ -0,0 +1,413 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Assistant 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$
+**
+****************************************************************************/
+#if !defined(QT_NO_WEBKIT)
+
+#include "helpviewer_qwv.h"
+
+#include "centralwidget.h"
+#include "helpenginewrapper.h"
+#include "tracer.h"
+
+#include <QtCore/QFileInfo>
+#include <QtCore/QString>
+#include <QtCore/QStringBuilder>
+#include <QtCore/QTemporaryFile>
+#include <QtCore/QTimer>
+
+#include <QtGui/QDesktopServices>
+#include <QtGui/QWheelEvent>
+
+#include <QtNetwork/QNetworkAccessManager>
+#include <QtNetwork/QNetworkReply>
+#include <QtNetwork/QNetworkRequest>
+
+QT_BEGIN_NAMESPACE
+
+class HelpNetworkReply : public QNetworkReply
+{
+public:
+ HelpNetworkReply(const QNetworkRequest &request, const QByteArray &fileData,
+ const QString &mimeType);
+
+ virtual void abort();
+
+ virtual qint64 bytesAvailable() const
+ { return data.length() + QNetworkReply::bytesAvailable(); }
+
+protected:
+ virtual qint64 readData(char *data, qint64 maxlen);
+
+private:
+ QByteArray data;
+ qint64 origLen;
+};
+
+HelpNetworkReply::HelpNetworkReply(const QNetworkRequest &request,
+ const QByteArray &fileData, const QString& mimeType)
+ : data(fileData), origLen(fileData.length())
+{
+ TRACE_OBJ
+ setRequest(request);
+ setOpenMode(QIODevice::ReadOnly);
+
+ setHeader(QNetworkRequest::ContentTypeHeader, mimeType);
+ setHeader(QNetworkRequest::ContentLengthHeader, QByteArray::number(origLen));
+ QTimer::singleShot(0, this, SIGNAL(metaDataChanged()));
+ QTimer::singleShot(0, this, SIGNAL(readyRead()));
+}
+
+void HelpNetworkReply::abort()
+{
+ TRACE_OBJ
+}
+
+qint64 HelpNetworkReply::readData(char *buffer, qint64 maxlen)
+{
+ TRACE_OBJ
+ qint64 len = qMin(qint64(data.length()), maxlen);
+ if (len) {
+ qMemCopy(buffer, data.constData(), len);
+ data.remove(0, len);
+ }
+ if (!data.length())
+ QTimer::singleShot(0, this, SIGNAL(finished()));
+ return len;
+}
+
+class HelpNetworkAccessManager : public QNetworkAccessManager
+{
+public:
+ HelpNetworkAccessManager(QObject *parent);
+
+protected:
+ virtual QNetworkReply *createRequest(Operation op,
+ const QNetworkRequest &request, QIODevice *outgoingData = 0);
+};
+
+HelpNetworkAccessManager::HelpNetworkAccessManager(QObject *parent)
+ : QNetworkAccessManager(parent)
+{
+ TRACE_OBJ
+}
+
+QNetworkReply *HelpNetworkAccessManager::createRequest(Operation /*op*/,
+ const QNetworkRequest &request, QIODevice* /*outgoingData*/)
+{
+ TRACE_OBJ
+ 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 if (mimeType.endsWith(QLatin1String(".txt"))) {
+ mimeType = QLatin1String("text/plain");
+ } else {
+ mimeType = QLatin1String("text/html");
+ }
+
+ HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
+ const QByteArray &data = helpEngine.findFile(url).isValid()
+ ? helpEngine.fileData(url)
+ : AbstractHelpViewer::PageNotFoundMessage.arg(url.toString()).toUtf8();
+ return new HelpNetworkReply(request, data, mimeType);
+}
+
+class HelpPage : public QWebPage
+{
+public:
+ HelpPage(CentralWidget *central, QObject *parent);
+
+protected:
+ virtual QWebPage *createWindow(QWebPage::WebWindowType);
+ virtual void triggerAction(WebAction action, bool checked = false);
+
+ virtual bool acceptNavigationRequest(QWebFrame *frame,
+ const QNetworkRequest &request, NavigationType type);
+
+private:
+ CentralWidget *centralWidget;
+ bool closeNewTabIfNeeded;
+
+ friend class HelpViewer;
+ Qt::MouseButtons m_pressedButtons;
+ Qt::KeyboardModifiers m_keyboardModifiers;
+};
+
+HelpPage::HelpPage(CentralWidget *central, QObject *parent)
+ : QWebPage(parent)
+ , centralWidget(central)
+ , closeNewTabIfNeeded(false)
+ , m_pressedButtons(Qt::NoButton)
+ , m_keyboardModifiers(Qt::NoModifier)
+{
+ TRACE_OBJ
+}
+
+QWebPage *HelpPage::createWindow(QWebPage::WebWindowType)
+{
+ TRACE_OBJ
+ HelpPage* newPage = static_cast<HelpPage*>(centralWidget->newEmptyTab()->page());
+ if (newPage)
+ newPage->closeNewTabIfNeeded = closeNewTabIfNeeded;
+ closeNewTabIfNeeded = false;
+ return newPage;
+}
+
+void HelpPage::triggerAction(WebAction action, bool checked)
+{
+ TRACE_OBJ
+ switch (action) {
+ case OpenLinkInNewWindow:
+ closeNewTabIfNeeded = true;
+ default: // fall through
+ QWebPage::triggerAction(action, checked);
+ break;
+ }
+}
+
+bool HelpPage::acceptNavigationRequest(QWebFrame *,
+ const QNetworkRequest &request, QWebPage::NavigationType type)
+{
+ TRACE_OBJ
+ const QUrl &url = request.url();
+ const bool closeNewTab = closeNewTabIfNeeded;
+ closeNewTabIfNeeded = false;
+
+ if (AbstractHelpViewer::isLocalUrl(url)) {
+ const QString& path = url.path();
+ if (!AbstractHelpViewer::canOpenPage(path)) {
+ QTemporaryFile tmpTmpFile;
+ if (!tmpTmpFile.open())
+ return false;
+ const QString &extension = QFileInfo(path).completeSuffix();
+ QFile actualTmpFile(tmpTmpFile.fileName() % QLatin1String(".")
+ % extension);
+ if (actualTmpFile.open(QIODevice::ReadWrite | QIODevice::Truncate)) {
+ actualTmpFile.write(HelpEngineWrapper::instance().fileData(url));
+ actualTmpFile.close();
+ QDesktopServices::openUrl(QUrl(actualTmpFile.fileName()));
+ }
+
+ if (closeNewTab)
+ QMetaObject::invokeMethod(CentralWidget::instance(), "closeTab");
+ return false;
+ }
+
+ if (type == QWebPage::NavigationTypeLinkClicked
+ && (m_keyboardModifiers & Qt::ControlModifier
+ || m_pressedButtons == Qt::MidButton)) {
+ HelpViewer* viewer = centralWidget->newEmptyTab();
+ if (viewer)
+ CentralWidget::instance()->setSource(url);
+ m_pressedButtons = Qt::NoButton;
+ m_keyboardModifiers = Qt::NoModifier;
+ return false;
+ }
+ return true;
+ }
+
+ QDesktopServices::openUrl(url);
+ return false;
+}
+
+// -- HelpViewer
+
+HelpViewer::HelpViewer(CentralWidget *parent, qreal zoom)
+ : QWebView(parent)
+ , parentWidget(parent)
+ , loadFinished(false)
+ , helpEngine(HelpEngineWrapper::instance())
+{
+ TRACE_OBJ
+ setAcceptDrops(false);
+
+ setPage(new HelpPage(parent, this));
+
+ page()->setNetworkAccessManager(new HelpNetworkAccessManager(this));
+
+ QAction* action = pageAction(QWebPage::OpenLinkInNewWindow);
+ action->setText(tr("Open Link in New Tab"));
+ if (!parent)
+ action->setVisible(false);
+
+ pageAction(QWebPage::DownloadLinkToDisk)->setVisible(false);
+ pageAction(QWebPage::DownloadImageToDisk)->setVisible(false);
+ pageAction(QWebPage::OpenImageInNewWindow)->setVisible(false);
+
+ connect(pageAction(QWebPage::Copy), SIGNAL(changed()), this,
+ SLOT(actionChanged()));
+ connect(pageAction(QWebPage::Back), SIGNAL(changed()), this,
+ SLOT(actionChanged()));
+ connect(pageAction(QWebPage::Forward), SIGNAL(changed()), this,
+ SLOT(actionChanged()));
+ connect(page(), SIGNAL(linkHovered(QString,QString,QString)), this,
+ SIGNAL(highlighted(QString)));
+ connect(this, SIGNAL(urlChanged(QUrl)), this, SIGNAL(sourceChanged(QUrl)));
+ connect(this, SIGNAL(loadFinished(bool)), this, SLOT(setLoadFinished(bool)));
+
+ setFont(viewerFont());
+ setTextSizeMultiplier(zoom == 0.0 ? 1.0 : zoom);
+}
+
+HelpViewer::~HelpViewer()
+{
+ TRACE_OBJ
+}
+
+QFont HelpViewer::viewerFont() const
+{
+ TRACE_OBJ
+ if (helpEngine.usesBrowserFont())
+ return helpEngine.browserFont();
+
+ QWebSettings *webSettings = QWebSettings::globalSettings();
+ return QFont(webSettings->fontFamily(QWebSettings::StandardFont),
+ webSettings->fontSize(QWebSettings::DefaultFontSize));
+}
+
+void HelpViewer::setViewerFont(const QFont &font)
+{
+ TRACE_OBJ
+ QWebSettings *webSettings = settings();
+ webSettings->setFontFamily(QWebSettings::StandardFont, font.family());
+ webSettings->setFontSize(QWebSettings::DefaultFontSize, font.pointSize());
+}
+
+void HelpViewer::scaleUp()
+{
+ TRACE_OBJ
+ setTextSizeMultiplier(textSizeMultiplier() + 0.1);
+}
+
+void HelpViewer::scaleDown()
+{
+ TRACE_OBJ
+ setTextSizeMultiplier(qMax(0.0, textSizeMultiplier() - 0.1));
+}
+
+void HelpViewer::resetScale()
+{
+ TRACE_OBJ
+ setTextSizeMultiplier(1.0);
+}
+
+void HelpViewer::setSource(const QUrl &url)
+{
+ TRACE_OBJ
+ loadFinished = false;
+ if (url.toString() == QLatin1String("help")) {
+ load(QUrl(QLatin1String("qthelp://com.trolltech.com."
+ "assistantinternal-1.0.0/assistant/assistant.html")));
+ } else {
+ load(url);
+ }
+}
+
+void HelpViewer::home()
+{
+ TRACE_OBJ
+ setSource(helpEngine.homePage());
+}
+
+void HelpViewer::wheelEvent(QWheelEvent *e)
+{
+ TRACE_OBJ
+ if (e->modifiers()& Qt::ControlModifier) {
+ e->accept();
+ e->delta() > 0 ? scaleUp() : scaleDown();
+ } else {
+ QWebView::wheelEvent(e);
+ }
+}
+
+void HelpViewer::mouseReleaseEvent(QMouseEvent *e)
+{
+ TRACE_OBJ
+ if (e->button() == Qt::XButton1) {
+ triggerPageAction(QWebPage::Back);
+ return;
+ }
+
+ if (e->button() == Qt::XButton2) {
+ triggerPageAction(QWebPage::Forward);
+ return;
+ }
+
+ QWebView::mouseReleaseEvent(e);
+}
+
+void HelpViewer::actionChanged()
+{
+ TRACE_OBJ
+ QAction *a = qobject_cast<QAction *>(sender());
+ if (a == pageAction(QWebPage::Copy))
+ emit copyAvailable(a->isEnabled());
+ else if (a == pageAction(QWebPage::Back))
+ emit backwardAvailable(a->isEnabled());
+ else if (a == pageAction(QWebPage::Forward))
+ emit forwardAvailable(a->isEnabled());
+}
+
+void HelpViewer::mousePressEvent(QMouseEvent *event)
+{
+ TRACE_OBJ
+ HelpPage *currentPage = static_cast<HelpPage*>(page());
+ if (currentPage) {
+ currentPage->m_pressedButtons = event->buttons();
+ currentPage->m_keyboardModifiers = event->modifiers();
+ }
+ QWebView::mousePressEvent(event);
+}
+
+void HelpViewer::setLoadFinished(bool ok)
+{
+ TRACE_OBJ
+ loadFinished = ok;
+ emit sourceChanged(url());
+}
+
+QT_END_NAMESPACE
+
+#endif // !QT_NO_WEBKIT
diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.h b/tools/assistant/tools/assistant/helpviewer_qwv.h
new file mode 100644
index 0000000..3f2e537
--- /dev/null
+++ b/tools/assistant/tools/assistant/helpviewer_qwv.h
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Assistant 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$
+**
+****************************************************************************/
+#if !defined(QT_NO_WEBKIT)
+
+#ifndef HELPVIEWERQWV_H
+#define HELPVIEWERQWV_H
+
+#include "helpviewer.h"
+
+#include <QtGui/QAction>
+#include <QtWebKit/QWebView>
+
+QT_BEGIN_NAMESPACE
+
+class CentralWidget;
+class HelpEngineWrapper;
+class QMouseEvent;
+
+class HelpViewer : public QWebView, public AbstractHelpViewer
+{
+ Q_OBJECT
+
+public:
+ HelpViewer(CentralWidget *parent, qreal zoom = 0.0);
+ ~HelpViewer();
+
+ QFont viewerFont() const;
+ void setViewerFont(const QFont &font);
+
+ void scaleUp();
+ void scaleDown();
+ void resetScale();
+ qreal scale() const { return textSizeMultiplier(); }
+
+ void setSource(const QUrl &url);
+ inline QUrl source() const { return url(); }
+
+ inline QString documentTitle() const
+ { return title(); }
+
+ inline bool hasSelection() const
+ { return !selectedText().isEmpty(); } // ### this is suboptimal
+
+ inline void copy()
+ { return triggerPageAction(QWebPage::Copy); }
+
+ inline bool isForwardAvailable() const
+ { return pageAction(QWebPage::Forward)->isEnabled(); }
+ inline bool isBackwardAvailable() const
+ { return pageAction(QWebPage::Back)->isEnabled(); }
+ inline bool hasLoadFinished() const
+ { return loadFinished; }
+
+public Q_SLOTS:
+ void home();
+ void backward() { back(); }
+
+Q_SIGNALS:
+ void copyAvailable(bool enabled);
+ void forwardAvailable(bool enabled);
+ void backwardAvailable(bool enabled);
+ void highlighted(const QString &);
+ void sourceChanged(const QUrl &);
+
+protected:
+ virtual void wheelEvent(QWheelEvent *);
+ void mouseReleaseEvent(QMouseEvent *e);
+ void mousePressEvent(QMouseEvent *event);
+
+private Q_SLOTS:
+ void actionChanged();
+ void setLoadFinished(bool ok);
+
+private:
+ CentralWidget* parentWidget;
+ bool loadFinished;
+ HelpEngineWrapper &helpEngine;
+};
+
+QT_END_NAMESPACE
+
+#endif // HELPVIEWERQWV_H
+
+#endif // !QT_NO_WEBKIT
diff --git a/tools/assistant/tools/assistant/indexwindow.cpp b/tools/assistant/tools/assistant/indexwindow.cpp
index 82242e5..63ddbe4 100644
--- a/tools/assistant/tools/assistant/indexwindow.cpp
+++ b/tools/assistant/tools/assistant/indexwindow.cpp
@@ -219,7 +219,7 @@ void IndexWindow::open(QHelpIndexWidget* indexWidget, const QModelIndex &index)
return;
}
- if (!HelpViewer::canOpenPage(url.path()))
+ if (!AbstractHelpViewer::canOpenPage(url.path()))
CentralWidget::instance()->setSource(url);
else
CentralWidget::instance()->setSourceInNewTab(url);
diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp
index 2ff6b5e..4115d39 100644
--- a/tools/assistant/tools/assistant/mainwindow.cpp
+++ b/tools/assistant/tools/assistant/mainwindow.cpp
@@ -44,7 +44,6 @@
#include "bookmarkmanager.h"
#include "centralwidget.h"
-#include "helpviewer.h"
#include "indexwindow.h"
#include "topicchooser.h"
#include "contentwindow.h"
@@ -760,12 +759,10 @@ void MainWindow::showPreferences()
{
TRACE_OBJ
PreferencesDialog dia(this);
-
connect(&dia, SIGNAL(updateApplicationFont()), this,
SLOT(updateApplicationFont()));
connect(&dia, SIGNAL(updateBrowserFont()), m_centralWidget,
SLOT(updateBrowserFont()));
-
dia.showDialog();
}
@@ -970,7 +967,9 @@ void MainWindow::updateApplicationFont()
if (helpEngine.usesAppFont())
font = helpEngine.appFont();
- qApp->setFont(font, "QWidget");
+ const QWidgetList &widgets = qApp->allWidgets();
+ foreach (QWidget* widget, widgets)
+ widget->setFont(font);
}
void MainWindow::setupFilterCombo()
diff --git a/tools/assistant/tools/assistant/preferencesdialog.cpp b/tools/assistant/tools/assistant/preferencesdialog.cpp
index f0ef054..0e1d719 100644
--- a/tools/assistant/tools/assistant/preferencesdialog.cpp
+++ b/tools/assistant/tools/assistant/preferencesdialog.cpp
@@ -38,26 +38,24 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "tracer.h"
-
#include "preferencesdialog.h"
+
+#include "centralwidget.h"
#include "filternamedialog.h"
-#include "installdialog.h"
#include "fontpanel.h"
-#include "centralwidget.h"
-#include "aboutdialog.h"
#include "helpenginewrapper.h"
+#include "installdialog.h"
+#include "tracer.h"
#include <QtCore/QtAlgorithms>
#include <QtCore/QFileSystemWatcher>
-#include <QtGui/QHeaderView>
+#include <QtGui/QDesktopWidget>
#include <QtGui/QFileDialog>
-#include <QtGui/QMessageBox>
-#include <QtGui/QMenu>
#include <QtGui/QFontDatabase>
-#include <QtGui/QApplication>
-#include <QtGui/QDesktopWidget>
+#include <QtGui/QHeaderView>
+#include <QtGui/QMenu>
+#include <QtGui/QMessageBox>
#include <QtHelp/QHelpEngineCore>
@@ -115,6 +113,9 @@ PreferencesDialog::PreferencesDialog(QWidget *parent)
updateFontSettingsPage();
updateOptionsPage();
+
+ if (helpEngine.usesAppFont())
+ setFont(helpEngine.appFont());
}
PreferencesDialog::~PreferencesDialog()
@@ -124,16 +125,13 @@ PreferencesDialog::~PreferencesDialog()
helpEngine.setAppFont(m_appFontPanel->selectedFont());
helpEngine.setUseAppFont(m_appFontPanel->isChecked());
helpEngine.setAppWritingSystem(m_appFontPanel->writingSystem());
+ emit updateApplicationFont();
}
if (m_browserFontChanged) {
helpEngine.setBrowserFont(m_browserFontPanel->selectedFont());
helpEngine.setUseBrowserFont(m_browserFontPanel->isChecked());
helpEngine.setBrowserWritingSystem(m_browserFontPanel->writingSystem());
- }
-
- if (m_appFontChanged || m_browserFontChanged) {
- emit updateApplicationFont();
emit updateBrowserFont();
}
diff --git a/tools/designer/src/lib/shared/actionrepository.cpp b/tools/designer/src/lib/shared/actionrepository.cpp
index e3ff2c1..1076ff4 100644
--- a/tools/designer/src/lib/shared/actionrepository.cpp
+++ b/tools/designer/src/lib/shared/actionrepository.cpp
@@ -77,18 +77,12 @@ static inline QAction *actionOfItem(const QStandardItem* item)
return qvariant_cast<QAction*>(item->data(qdesigner_internal::ActionModel::ActionRole));
}
-static QIcon fixActionIcon(const QIcon &icon)
-{
- if (icon.isNull())
- return qdesigner_internal::emptyIcon();
- return icon;
-}
-
namespace qdesigner_internal {
// ----------- ActionModel
ActionModel::ActionModel(QWidget *parent ) :
QStandardItemModel(parent),
+ m_emptyIcon(emptyIcon()),
m_core(0)
{
QStringList headers;
@@ -127,7 +121,7 @@ void ActionModel::update(int row)
for (int i = 0; i < NumColumns; i++)
list += item(row, i);
- setItems(m_core, actionOfItem(list.front()), list);
+ setItems(m_core, actionOfItem(list.front()), m_emptyIcon, list);
}
void ActionModel::remove(int row)
@@ -150,7 +144,7 @@ QModelIndex ActionModel::addAction(QAction *action)
item->setFlags(flags);
items.push_back(item);
}
- setItems(m_core, action, items);
+ setItems(m_core, action, m_emptyIcon, items);
appendRow(items);
return indexFromItem(items.front());
}
@@ -185,7 +179,9 @@ PropertySheetKeySequenceValue ActionModel::actionShortCut(const QDesignerPropert
return qvariant_cast<PropertySheetKeySequenceValue>(sheet->property(index));
}
-void ActionModel::setItems(QDesignerFormEditorInterface *core, QAction *action, QStandardItemList &sl)
+void ActionModel::setItems(QDesignerFormEditorInterface *core, QAction *action,
+ const QIcon &defaultIcon,
+ QStandardItemList &sl)
{
// Tooltip, mostly for icon view mode
@@ -200,7 +196,10 @@ void ActionModel::setItems(QDesignerFormEditorInterface *core, QAction *action,
QStandardItem *item = sl[NameColumn];
item->setText(action->objectName());
- item->setIcon(fixActionIcon(action->icon()));
+ QIcon icon = action->icon();
+ if (icon.isNull())
+ icon = defaultIcon;
+ item->setIcon(icon);
item->setToolTip(firstTooltip);
item->setWhatsThis(firstTooltip);
// Used
diff --git a/tools/designer/src/lib/shared/actionrepository_p.h b/tools/designer/src/lib/shared/actionrepository_p.h
index 65adc5d..6e17e7b 100644
--- a/tools/designer/src/lib/shared/actionrepository_p.h
+++ b/tools/designer/src/lib/shared/actionrepository_p.h
@@ -59,6 +59,7 @@
#include <QtGui/QTreeView>
#include <QtGui/QListView>
#include <QtGui/QStackedWidget>
+#include <QtGui/QIcon>
QT_BEGIN_NAMESPACE
@@ -110,10 +111,14 @@ signals:
void resourceImageDropped(const QString &path, QAction *action);
private:
+ typedef QList<QStandardItem *> QStandardItemList;
+
void initializeHeaders();
+ static void setItems(QDesignerFormEditorInterface *core, QAction *a,
+ const QIcon &defaultIcon,
+ QStandardItemList &sl);
- typedef QList<QStandardItem *> QStandardItemList;
- static void setItems(QDesignerFormEditorInterface *core, QAction *a, QStandardItemList &sl);
+ const QIcon m_emptyIcon;
QDesignerFormEditorInterface *m_core;
};
diff --git a/tools/designer/src/lib/shared/iconloader.cpp b/tools/designer/src/lib/shared/iconloader.cpp
index df0bb7e..ed312b8 100644
--- a/tools/designer/src/lib/shared/iconloader.cpp
+++ b/tools/designer/src/lib/shared/iconloader.cpp
@@ -70,8 +70,7 @@ QDESIGNER_SHARED_EXPORT QIcon createIconSet(const QString &name)
QDESIGNER_SHARED_EXPORT QIcon emptyIcon()
{
- static const QIcon empty_icon(QLatin1String(":/trolltech/formeditor/images/emptyicon.png"));
- return empty_icon;
+ return QIcon(QLatin1String(":/trolltech/formeditor/images/emptyicon.png"));
}
} // namespace qdesigner_internal
diff --git a/tools/designer/src/lib/shared/qdesigner_menu.cpp b/tools/designer/src/lib/shared/qdesigner_menu.cpp
index c83abad..ba512e4 100644
--- a/tools/designer/src/lib/shared/qdesigner_menu.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_menu.cpp
@@ -88,6 +88,7 @@ static inline void extendClickableArea(QRect *subMenuRect, Qt::LayoutDirection d
QDesignerMenu::QDesignerMenu(QWidget *parent) :
QMenu(parent),
+ m_subMenuPixmap(QPixmap(QLatin1String(":/trolltech/formeditor/images/submenu.png"))),
m_currentIndex(0),
m_addItem(new SpecialMenuAction(this)),
m_addSeparator(new SpecialMenuAction(this)),
@@ -550,11 +551,10 @@ void QDesignerMenu::deleteAction(QAction *a)
QRect QDesignerMenu::subMenuPixmapRect(QAction *action) const
{
- static const QPixmap pm(QLatin1String(":/trolltech/formeditor/images/submenu.png"));
const QRect g = actionGeometry(action);
- const int x = layoutDirection() == Qt::LeftToRight ? (g.right() - pm.width() - 2) : 2;
- const int y = g.top() + (g.height() - pm.height())/2 + 1;
- return QRect(x, y, pm.width(), pm.height());
+ const int x = layoutDirection() == Qt::LeftToRight ? (g.right() - m_subMenuPixmap.width() - 2) : 2;
+ const int y = g.top() + (g.height() - m_subMenuPixmap.height())/2 + 1;
+ return QRect(x, y, m_subMenuPixmap.width(), m_subMenuPixmap.height());
}
bool QDesignerMenu::hasSubMenuPixmap(QAction *action) const
@@ -591,8 +591,7 @@ void QDesignerMenu::paintEvent(QPaintEvent *event)
p.fillRect(g, lg);
} else if (hasSubMenuPixmap(a)) {
- static const QPixmap pm(QLatin1String(":/trolltech/formeditor/images/submenu.png"));
- p.drawPixmap(subMenuPixmapRect(a).topLeft(), pm);
+ p.drawPixmap(subMenuPixmapRect(a).topLeft(), m_subMenuPixmap);
}
}
diff --git a/tools/designer/src/lib/shared/qdesigner_menu_p.h b/tools/designer/src/lib/shared/qdesigner_menu_p.h
index 9c9a311..ae1e0e7 100644
--- a/tools/designer/src/lib/shared/qdesigner_menu_p.h
+++ b/tools/designer/src/lib/shared/qdesigner_menu_p.h
@@ -57,6 +57,7 @@
#include <QtGui/QAction>
#include <QtGui/QMenu>
+#include <QtGui/QPixmap>
#include <QtCore/QHash>
QT_BEGIN_NAMESPACE
@@ -183,6 +184,7 @@ protected:
private:
bool hideSubMenuOnCursorKey();
bool showSubMenuOnCursorKey();
+ const QPixmap m_subMenuPixmap;
QPoint m_startPosition;
int m_currentIndex;
diff --git a/tools/linguist/linguist/images/transbox.png b/tools/linguist/linguist/images/transbox.png
deleted file mode 100644
index 2d7219b..0000000
--- a/tools/linguist/linguist/images/transbox.png
+++ /dev/null
Binary files differ
diff --git a/tools/linguist/linguist/linguist.qrc b/tools/linguist/linguist/linguist.qrc
index a43f0ce..b70b9cd 100644
--- a/tools/linguist/linguist/linguist.qrc
+++ b/tools/linguist/linguist/linguist.qrc
@@ -1,5 +1,5 @@
<RCC>
- <qresource prefix="/" >
+ <qresource prefix="/">
<file>images/appicon.png</file>
<file>images/mac/accelerator.png</file>
<file>images/mac/book.png</file>
@@ -28,7 +28,6 @@
<file>images/s_check_on.png</file>
<file>images/s_check_warning.png</file>
<file>images/splash.png</file>
- <file>images/transbox.png</file>
<file>images/up.png</file>
<file>images/down.png</file>
<file>images/editdelete.png</file>
diff --git a/tools/linguist/linguist/messageeditor.cpp b/tools/linguist/linguist/messageeditor.cpp
index b6c1688..3848723 100644
--- a/tools/linguist/linguist/messageeditor.cpp
+++ b/tools/linguist/linguist/messageeditor.cpp
@@ -98,14 +98,8 @@ MessageEditor::MessageEditor(MultiDataModel *dataModel, QMainWindow *parent)
{
setObjectName(QLatin1String("scroll area"));
- // Use white explicitly as the background color for the editor page.
QPalette p;
- p.setColor(QPalette::Active, QPalette::Base, Qt::white);
- p.setColor(QPalette::Inactive, QPalette::Base, Qt::white);
- p.setColor(QPalette::Disabled, QPalette::Base, Qt::white);
- p.setColor(QPalette::Active, QPalette::Window, Qt::white);
- p.setColor(QPalette::Inactive, QPalette::Window, Qt::white);
- p.setColor(QPalette::Disabled, QPalette::Window, Qt::white);
+ p.setBrush(QPalette::Window, p.brush(QPalette::Active, QPalette::Base));
setPalette(p);
setupEditorPage();
diff --git a/tools/linguist/linguist/messagemodel.cpp b/tools/linguist/linguist/messagemodel.cpp
index 6572059..4e2b473 100644
--- a/tools/linguist/linguist/messagemodel.cpp
+++ b/tools/linguist/linguist/messagemodel.cpp
@@ -584,12 +584,16 @@ void MultiContextItem::putMessageItem(int pos, MessageItem *m)
m_messageLists.last()[pos] = m;
}
-void MultiContextItem::appendMessageItem(MessageItem *m)
+void MultiContextItem::appendMessageItems(const QList<MessageItem *> &m)
{
+ QList<MessageItem *> nullItems = m; // Basically, just a reservation
+ for (int i = 0; i < nullItems.count(); ++i)
+ nullItems[i] = 0;
for (int i = 0; i < m_messageLists.count() - 1; ++i)
- m_messageLists[i].append(0);
- m_messageLists.last().append(m);
- m_multiMessageList.append(MultiMessageItem(m));
+ m_messageLists[i] += nullItems;
+ m_messageLists.last() += m;
+ foreach (MessageItem *mi, m)
+ m_multiMessageList.append(MultiMessageItem(mi));
}
void MultiContextItem::removeMultiMessageItem(int pos)
@@ -710,33 +714,43 @@ void MultiDataModel::append(DataModel *dm, bool readWrite)
m_msgModel->endInsertColumns();
}
m_msgModel->endInsertColumns();
+ int appendedContexts = 0;
for (int i = 0; i < dm->contextCount(); ++i) {
ContextItem *c = dm->contextItem(i);
int mcx = findContextIndex(c->context());
if (mcx >= 0) {
MultiContextItem *mc = multiContextItem(mcx);
mc->assignLastModel(c, readWrite);
+ QList<MessageItem *> appendItems;
for (int j = 0; j < c->messageCount(); ++j) {
MessageItem *m = c->messageItem(j);
int msgIdx = mc->findMessage(m->text(), m->comment());
- if (msgIdx >= 0) {
+ if (msgIdx >= 0)
mc->putMessageItem(msgIdx, m);
- } else {
- int msgCnt = mc->messageCount();
- m_msgModel->beginInsertRows(m_msgModel->createIndex(mcx, 0, 0), msgCnt, msgCnt);
- mc->appendMessageItem(m);
- m_msgModel->endInsertRows();
- ++m_numMessages;
- }
+ else
+ appendItems << m;
+ }
+ if (!appendItems.isEmpty()) {
+ int msgCnt = mc->messageCount();
+ m_msgModel->beginInsertRows(m_msgModel->createIndex(mcx, 0, 0),
+ msgCnt, msgCnt + appendItems.size() - 1);
+ mc->appendMessageItems(appendItems);
+ m_msgModel->endInsertRows();
+ m_numMessages += appendItems.size();
}
} else {
- MultiContextItem item(modelCount() - 1, c, readWrite);
- m_msgModel->beginInsertRows(QModelIndex(), contextCount(), contextCount());
- m_multiContextList.append(item);
- m_msgModel->endInsertRows();
- m_numMessages += item.messageCount();
+ m_multiContextList << MultiContextItem(modelCount() - 1, c, readWrite);
+ m_numMessages += c->messageCount();
+ ++appendedContexts;
}
}
+ if (appendedContexts) {
+ // Do that en block to avoid itemview inefficiency. It doesn't hurt that we
+ // announce the availability of the data "long" after it was actually added.
+ m_msgModel->beginInsertRows(QModelIndex(),
+ contextCount() - appendedContexts, contextCount() - 1);
+ m_msgModel->endInsertRows();
+ }
dm->setWritable(readWrite);
updateCountsOnAdd(modelCount() - 1, readWrite);
connect(dm, SIGNAL(modifiedChanged()), SLOT(onModifiedChanged()));
diff --git a/tools/linguist/linguist/messagemodel.h b/tools/linguist/linguist/messagemodel.h
index 3e0107e..7d98873 100644
--- a/tools/linguist/linguist/messagemodel.h
+++ b/tools/linguist/linguist/messagemodel.h
@@ -332,7 +332,7 @@ private:
void removeModel(int pos);
void moveModel(int oldPos, int newPos); // newPos is *before* removing at oldPos
void putMessageItem(int pos, MessageItem *m);
- void appendMessageItem(MessageItem *m);
+ void appendMessageItems(const QList<MessageItem *> &m);
void removeMultiMessageItem(int pos);
void incrementFinishedCount() { ++m_finishedCount; }
void decrementFinishedCount() { --m_finishedCount; }
diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp
index 1566473..8b3b7aa 100644
--- a/tools/qmlviewer/qmlviewer.cpp
+++ b/tools/qmlviewer/qmlviewer.cpp
@@ -52,8 +52,9 @@
#include <QAbstractAnimation>
#include "deviceskin.h"
-#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 3))
#include <private/qzipreader_p.h>
+#define QMLVIEWER_ZIP_SUPPORT
#endif
#include <QSettings>
@@ -866,7 +867,7 @@ void QmlViewer::reload()
void QmlViewer::open(const QString& doc)
{
-#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+#ifdef QMLVIEWER_ZIP_SUPPORT
if (doc.endsWith(".wgt",Qt::CaseInsensitive)
|| doc.endsWith(".wgz",Qt::CaseInsensitive)
|| doc.endsWith(".zip",Qt::CaseInsensitive))
@@ -878,7 +879,7 @@ void QmlViewer::open(const QString& doc)
void QmlViewer::openWgt(const QString& doc)
{
-#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+#ifdef QMLVIEWER_ZIP_SUPPORT
// XXX This functionality could be migrated to QmlView once refined
QUrl url(doc);
@@ -891,7 +892,7 @@ void QmlViewer::openWgt(const QString& doc)
#endif
}
-#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+#ifdef QMLVIEWER_ZIP_SUPPORT
static void removeRecursive(const QString& dirname)
{
QDir dir(dirname);
@@ -907,7 +908,7 @@ static void removeRecursive(const QString& dirname)
void QmlViewer::unpackWgt()
{
-#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+#ifdef QMLVIEWER_ZIP_SUPPORT
QByteArray all = wgtreply->readAll();
QBuffer buf(&all);
buf.open(QIODevice::ReadOnly);
diff --git a/tools/runonphone/main.cpp b/tools/runonphone/main.cpp
index a77e713..1a5cdee 100644
--- a/tools/runonphone/main.cpp
+++ b/tools/runonphone/main.cpp
@@ -174,11 +174,7 @@ int main(int argc, char *argv[])
}
if(loglevel > 0)
outstream << "Connecting to target via " << serialPortName << endl;
-#ifdef Q_OS_WIN
- launcher->setTrkServerName(QString("\\\\.\\") + serialPortName);
-#else
launcher->setTrkServerName(serialPortName);
-#endif
launcher->setFileName(QString("c:\\sys\\bin\\") + exeFile);
launcher->setCommandLineArgs(cmdLine);
diff --git a/tools/runonphone/runonphone.pro b/tools/runonphone/runonphone.pro
index 2c1be98..7bed3e5 100644
--- a/tools/runonphone/runonphone.pro
+++ b/tools/runonphone/runonphone.pro
@@ -4,7 +4,7 @@ QT -= gui
CONFIG += console
CONFIG -= app_bundle
-include(trk/trk.pri)
+include(symbianutils/symbianutils.pri)
SOURCES += main.cpp \
trksignalhandler.cpp
@@ -12,6 +12,8 @@ SOURCES += main.cpp \
HEADERS += trksignalhandler.h \
serenum.h
+DEFINES += SYMBIANUTILS_INCLUDE_PRI
+
windows {
SOURCES += serenum_win.cpp
LIBS += -lsetupapi \
diff --git a/tools/runonphone/trk/bluetoothlistener.cpp b/tools/runonphone/symbianutils/bluetoothlistener.cpp
index 8d45fb5..df04288 100644
--- a/tools/runonphone/trk/bluetoothlistener.cpp
+++ b/tools/runonphone/symbianutils/bluetoothlistener.cpp
@@ -184,7 +184,7 @@ bool BluetoothListener::start(const QString &device, QString *errorMessage)
return true;
}
-void BluetoothListener::slotStdOutput()
+void BluetoothListener::slotStdOutput()
{
emitMessage(QString::fromLocal8Bit(d->process.readAllStandardOutput()));
}
diff --git a/tools/runonphone/trk/bluetoothlistener.h b/tools/runonphone/symbianutils/bluetoothlistener.h
index 027f286..36894e7 100644
--- a/tools/runonphone/trk/bluetoothlistener.h
+++ b/tools/runonphone/symbianutils/bluetoothlistener.h
@@ -42,6 +42,8 @@
#ifndef BLUETOOTHLISTENER_H
#define BLUETOOTHLISTENER_H
+#include "symbianutils_global.h"
+
#include <QtCore/QObject>
#include <QtCore/QProcess>
@@ -53,7 +55,7 @@ struct BluetoothListenerPrivate;
* The rfcomm command is used. It process can be started in the background
* while connection attempts (TrkDevice::open()) are made in the foreground. */
-class BluetoothListener : public QObject
+class SYMBIANUTILS_EXPORT BluetoothListener : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(BluetoothListener)
diff --git a/tools/runonphone/trk/bluetoothlistener_gui.cpp b/tools/runonphone/symbianutils/bluetoothlistener_gui.cpp
index 6ffdaef..5994eb5 100644
--- a/tools/runonphone/trk/bluetoothlistener_gui.cpp
+++ b/tools/runonphone/symbianutils/bluetoothlistener_gui.cpp
@@ -50,7 +50,7 @@
namespace trk {
-PromptStartCommunicationResult
+SYMBIANUTILS_EXPORT PromptStartCommunicationResult
promptStartCommunication(BaseCommunicationStarter &starter,
const QString &msgBoxTitle,
const QString &msgBoxText,
@@ -88,7 +88,7 @@ PromptStartCommunicationResult
return PromptStartCommunicationConnected;
}
-PromptStartCommunicationResult
+SYMBIANUTILS_EXPORT PromptStartCommunicationResult
promptStartSerial(BaseCommunicationStarter &starter,
QWidget *msgBoxParent,
QString *errorMessage)
@@ -98,7 +98,7 @@ PromptStartCommunicationResult
return promptStartCommunication(starter, title, message, msgBoxParent, errorMessage);
}
-PromptStartCommunicationResult
+SYMBIANUTILS_EXPORT PromptStartCommunicationResult
promptStartBluetooth(BaseCommunicationStarter &starter,
QWidget *msgBoxParent,
QString *errorMessage)
diff --git a/tools/runonphone/trk/bluetoothlistener_gui.h b/tools/runonphone/symbianutils/bluetoothlistener_gui.h
index d673ffe..10e7145 100644
--- a/tools/runonphone/trk/bluetoothlistener_gui.h
+++ b/tools/runonphone/symbianutils/bluetoothlistener_gui.h
@@ -42,6 +42,8 @@
#ifndef BLUETOOTHLISTENER_GUI_H
#define BLUETOOTHLISTENER_GUI_H
+#include "symbianutils_global.h"
+
#include <QtCore/QtGlobal>
QT_BEGIN_NAMESPACE
@@ -62,7 +64,7 @@ enum PromptStartCommunicationResult {
PromptStartCommunicationError
};
-PromptStartCommunicationResult
+SYMBIANUTILS_EXPORT PromptStartCommunicationResult
promptStartCommunication(BaseCommunicationStarter &starter,
const QString &msgBoxTitle,
const QString &msgBoxText,
@@ -71,14 +73,14 @@ PromptStartCommunicationResult
// Convenience to start a serial connection (messages prompting
// to launch Trk).
-PromptStartCommunicationResult
+SYMBIANUTILS_EXPORT PromptStartCommunicationResult
promptStartSerial(BaseCommunicationStarter &starter,
QWidget *msgBoxParent,
QString *errorMessage);
// Convenience to start blue tooth connection (messages
// prompting to connect).
-PromptStartCommunicationResult
+SYMBIANUTILS_EXPORT PromptStartCommunicationResult
promptStartBluetooth(BaseCommunicationStarter &starter,
QWidget *msgBoxParent,
QString *errorMessage);
diff --git a/tools/runonphone/trk/callback.h b/tools/runonphone/symbianutils/callback.h
index edc2c74..3996d73 100644
--- a/tools/runonphone/trk/callback.h
+++ b/tools/runonphone/symbianutils/callback.h
@@ -42,7 +42,7 @@
#ifndef DEBUGGER_CALLBACK_H
#define DEBUGGER_CALLBACK_H
-#include <QtCore/QtGlobal>
+#include "symbianutils_global.h"
namespace trk {
namespace Internal {
diff --git a/tools/runonphone/trk/communicationstarter.cpp b/tools/runonphone/symbianutils/communicationstarter.cpp
index e5e556e..cdee49f 100644
--- a/tools/runonphone/trk/communicationstarter.cpp
+++ b/tools/runonphone/symbianutils/communicationstarter.cpp
@@ -58,7 +58,6 @@ struct BaseCommunicationStarterPrivate {
int intervalMS;
int attempts;
int n;
- QString device;
QString errorString;
BaseCommunicationStarter::State state;
};
@@ -70,7 +69,6 @@ BaseCommunicationStarterPrivate::BaseCommunicationStarterPrivate(const BaseCommu
intervalMS(1000),
attempts(-1),
n(0),
- device(QLatin1String("/dev/rfcomm0")),
state(BaseCommunicationStarter::TimedOut)
{
}
@@ -108,7 +106,7 @@ BaseCommunicationStarter::StartResult BaseCommunicationStarter::start()
// Before we instantiate timers, and such, try to open the device,
// which should succeed if another listener is already running in
// 'Watch' mode
- if (d->trkDevice->open(d->device , &(d->errorString)))
+ if (d->trkDevice->open(&(d->errorString)))
return ConnectionSucceeded;
// Pull up resources for next attempt
d->n = 0;
@@ -155,12 +153,7 @@ void BaseCommunicationStarter::setAttempts(int a)
QString BaseCommunicationStarter::device() const
{
- return d->device;
-}
-
-void BaseCommunicationStarter::setDevice(const QString &dv)
-{
- d->device = dv;
+ return d->trkDevice->port();
}
QString BaseCommunicationStarter::errorString() const
@@ -175,20 +168,20 @@ void BaseCommunicationStarter::slotTimer()
if (d->attempts >= 0 && d->n >= d->attempts) {
stopTimer();
d->errorString = tr("%1: timed out after %n attempts using an interval of %2ms.", 0, d->n)
- .arg(d->device).arg(d->intervalMS);
+ .arg(d->trkDevice->port()).arg(d->intervalMS);
d->state = TimedOut;
emit timeout();
} else {
// Attempt n to connect?
- if (d->trkDevice->open(d->device , &(d->errorString))) {
+ if (d->trkDevice->open(&(d->errorString))) {
stopTimer();
- const QString msg = tr("%1: Connection attempt %2 succeeded.").arg(d->device).arg(d->n);
+ const QString msg = tr("%1: Connection attempt %2 succeeded.").arg(d->trkDevice->port()).arg(d->n);
emit message(msg);
d->state = Connected;
emit connected();
} else {
const QString msg = tr("%1: Connection attempt %2 failed: %3 (retrying)...")
- .arg(d->device).arg(d->n).arg(d->errorString);
+ .arg(d->trkDevice->port()).arg(d->n).arg(d->errorString);
emit message(msg);
}
}
@@ -228,13 +221,11 @@ BluetoothListener *ConsoleBluetoothStarter::createListener()
bool ConsoleBluetoothStarter::startBluetooth(const TrkDevicePtr &trkDevice,
QObject *listenerParent,
- const QString &device,
int attempts,
QString *errorMessage)
{
// Set up a console starter to print to stdout.
ConsoleBluetoothStarter starter(trkDevice, listenerParent);
- starter.setDevice(device);
starter.setAttempts(attempts);
switch (starter.start()) {
case Started:
diff --git a/tools/runonphone/trk/communicationstarter.h b/tools/runonphone/symbianutils/communicationstarter.h
index 34cf398..0a060ee 100644
--- a/tools/runonphone/trk/communicationstarter.h
+++ b/tools/runonphone/symbianutils/communicationstarter.h
@@ -42,6 +42,8 @@
#ifndef COMMUNICATIONSTARTER_H
#define COMMUNICATIONSTARTER_H
+#include "symbianutils_global.h"
+
#include <QtCore/QSharedPointer>
#include <QtCore/QObject>
@@ -60,7 +62,7 @@ struct BaseCommunicationStarterPrivate;
* The base class can be used as is to prompt the user to launch App TRK for a
* serial communication as this requires no further resource setup. */
-class BaseCommunicationStarter : public QObject {
+class SYMBIANUTILS_EXPORT BaseCommunicationStarter : public QObject {
Q_OBJECT
Q_DISABLE_COPY(BaseCommunicationStarter)
public:
@@ -78,7 +80,6 @@ public:
void setAttempts(int a);
QString device() const;
- void setDevice(const QString &);
State state() const;
QString errorString() const;
@@ -117,7 +118,7 @@ private:
* implement as a factory function that creates and sets up the
* listener (mode, message connection, etc). */
-class AbstractBluetoothStarter : public BaseCommunicationStarter {
+class SYMBIANUTILS_EXPORT AbstractBluetoothStarter : public BaseCommunicationStarter {
Q_OBJECT
Q_DISABLE_COPY(AbstractBluetoothStarter)
public:
@@ -134,13 +135,12 @@ protected:
/* ConsoleBluetoothStarter: Convenience class for console processes. Creates a
* listener in "Listen" mode with the messages redirected to standard output. */
-class ConsoleBluetoothStarter : public AbstractBluetoothStarter {
+class SYMBIANUTILS_EXPORT ConsoleBluetoothStarter : public AbstractBluetoothStarter {
Q_OBJECT
Q_DISABLE_COPY(ConsoleBluetoothStarter)
public:
static bool startBluetooth(const TrkDevicePtr& trkDevice,
QObject *listenerParent,
- const QString &device,
int attempts,
QString *errorMessage);
diff --git a/tools/runonphone/trk/launcher.cpp b/tools/runonphone/symbianutils/launcher.cpp
index 1796fc5..408829b 100644
--- a/tools/runonphone/trk/launcher.cpp
+++ b/tools/runonphone/symbianutils/launcher.cpp
@@ -41,6 +41,7 @@
#include "launcher.h"
#include "trkutils.h"
+#include "trkutils_p.h"
#include "trkdevice.h"
#include "bluetoothlistener.h"
@@ -66,7 +67,6 @@ struct LauncherPrivate {
explicit LauncherPrivate(const TrkDevicePtr &d);
TrkDevicePtr m_device;
- QString m_trkServerName;
QByteArray m_trkReadBuffer;
Launcher::State m_state;
@@ -130,12 +130,12 @@ void Launcher::addStartupActions(trk::Launcher::Actions startupActions)
void Launcher::setTrkServerName(const QString &name)
{
- d->m_trkServerName = name;
+ d->m_device->setPort(name);
}
QString Launcher::trkServerName() const
{
- return d->m_trkServerName;
+ return d->m_device->port();
}
TrkDevicePtr Launcher::trkDevice() const
@@ -190,7 +190,7 @@ bool Launcher::startServer(QString *errorMessage)
errorMessage->clear();
if (d->m_verbose) {
const QString msg = QString::fromLatin1("Port=%1 Executable=%2 Arguments=%3 Package=%4 Remote Package=%5 Install file=%6")
- .arg(d->m_trkServerName, d->m_fileName,
+ .arg(trkServerName(), d->m_fileName,
d->m_commandLineArgs.join(QString(QLatin1Char(' '))),
d->m_copyState.sourceFileName, d->m_copyState.destinationFileName, d->m_installFileName);
logMessage(msg);
@@ -212,7 +212,7 @@ bool Launcher::startServer(QString *errorMessage)
qWarning("No remote executable given for running.");
return false;
}
- if (!d->m_device->isOpen() && !d->m_device->open(d->m_trkServerName, errorMessage))
+ if (!d->m_device->isOpen() && !d->m_device->open(errorMessage))
return false;
if (d->m_closeDevice) {
connect(this, SIGNAL(finished()), d->m_device.data(), SLOT(close()));
@@ -595,17 +595,19 @@ void Launcher::handleSupportMask(const TrkResult &result)
return;
const char *data = result.data.data() + 1;
- QByteArray str;
+ QString str = QLatin1String("SUPPORTED: ");
for (int i = 0; i < 32; ++i) {
//str.append(" [" + formatByte(data[i]) + "]: ");
- for (int j = 0; j < 8; ++j)
- if (data[i] & (1 << j))
- str.append(QByteArray::number(i * 8 + j, 16) + " ");
+ for (int j = 0; j < 8; ++j) {
+ if (data[i] & (1 << j)) {
+ str.append(QString::number(i * 8 + j, 16));
+ str.append(QLatin1Char(' '));
+ }
+ }
}
- logMessage("SUPPORTED: " + str);
+ logMessage(str);
}
-
void Launcher::cleanUp()
{
//
@@ -614,9 +616,7 @@ void Launcher::cleanUp()
// Sub Cmd: Delete Process
//ProcessID: 0x0000071F (1823)
// [41 24 00 00 00 00 07 1F]
- QByteArray ba;
- appendByte(&ba, 0x00);
- appendByte(&ba, 0x00);
+ QByteArray ba(2, char(0));
appendInt(&ba, d->m_session.pid);
d->m_device->sendTrkMessage(TrkDeleteItem, TrkCallback(), ba, "Delete process");
@@ -669,7 +669,7 @@ void Launcher::copyFileToRemote()
{
emit copyingStarted();
QByteArray ba;
- appendByte(&ba, 0x10);
+ ba.append(char(10));
appendString(&ba, d->m_copyState.destinationFileName.toLocal8Bit(), TargetByteOrder, false);
d->m_device->sendTrkMessage(TrkOpenFile, TrkCallback(this, &Launcher::handleFileCreation), ba);
}
@@ -678,7 +678,7 @@ void Launcher::installRemotePackageSilently()
{
emit installingStarted();
QByteArray ba;
- appendByte(&ba, 'C');
+ ba.append('C');
appendString(&ba, d->m_installFileName.toLocal8Bit(), TargetByteOrder, false);
d->m_device->sendTrkMessage(TrkInstallFile, TrkCallback(this, &Launcher::handleInstallPackageFinished), ba);
}
@@ -705,7 +705,7 @@ QByteArray Launcher::startProcessMessage(const QString &executable,
// It's not started yet
QByteArray ba;
appendShort(&ba, 0, TargetByteOrder); // create new process
- appendByte(&ba, 0); // options - currently unused
+ ba.append(char(0)); // options - currently unused
if(arguments.isEmpty()) {
appendString(&ba, executable.toLocal8Bit(), TargetByteOrder);
return ba;
diff --git a/tools/runonphone/trk/launcher.h b/tools/runonphone/symbianutils/launcher.h
index 8dc6ebe..2b23fd8 100644
--- a/tools/runonphone/trk/launcher.h
+++ b/tools/runonphone/symbianutils/launcher.h
@@ -56,7 +56,7 @@ struct LauncherPrivate;
typedef QSharedPointer<TrkDevice> TrkDevicePtr;
-class Launcher : public QObject
+class SYMBIANUTILS_EXPORT Launcher : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(Launcher)
diff --git a/tools/runonphone/symbianutils/symbiandevicemanager.cpp b/tools/runonphone/symbianutils/symbiandevicemanager.cpp
new file mode 100644
index 0000000..f663816
--- /dev/null
+++ b/tools/runonphone/symbianutils/symbiandevicemanager.cpp
@@ -0,0 +1,331 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the tools applications 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 "symbiandevicemanager.h"
+
+#include <QtCore/QSettings>
+#include <QtCore/QStringList>
+#include <QtCore/QFileInfo>
+#include <QtCore/QtDebug>
+#include <QtCore/QTextStream>
+#include <QtCore/QSharedData>
+#include <QtCore/QScopedPointer>
+
+namespace SymbianUtils {
+
+enum { debug = 0 };
+
+static const char REGKEY_CURRENT_CONTROL_SET[] = "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet";
+static const char USBSER[] = "Services/usbser/Enum";
+
+const char *SymbianDeviceManager::linuxBlueToothDeviceRootC = "/dev/rfcomm";
+
+// ------------- SymbianDevice
+class SymbianDeviceData : public QSharedData {
+public:
+ SymbianDeviceData() : type(SerialPortCommunication) {}
+
+ QString portName;
+ QString friendlyName;
+ QString deviceDesc;
+ QString manufacturer;
+ DeviceCommunicationType type;
+};
+
+SymbianDevice::SymbianDevice(SymbianDeviceData *data) :
+ m_data(data)
+{
+
+}
+
+SymbianDevice::SymbianDevice() :
+ m_data(new SymbianDeviceData)
+{
+}
+SymbianDevice::SymbianDevice(const SymbianDevice &rhs) :
+ m_data(rhs.m_data)
+{
+}
+
+SymbianDevice &SymbianDevice::operator=(const SymbianDevice &rhs)
+{
+ if (this != &rhs)
+ m_data = rhs.m_data;
+ return *this;
+}
+
+SymbianDevice::~SymbianDevice()
+{
+}
+
+QString SymbianDevice::portName() const
+{
+ return m_data->portName;
+}
+
+QString SymbianDevice::friendlyName() const
+{
+ return m_data->friendlyName;
+}
+
+QString SymbianDevice::deviceDesc() const
+{
+ return m_data->deviceDesc;
+}
+
+QString SymbianDevice::manufacturer() const
+{
+ return m_data->manufacturer;
+}
+
+DeviceCommunicationType SymbianDevice::type() const
+{
+ return m_data->type;
+}
+
+bool SymbianDevice::isNull() const
+{
+ return !m_data->portName.isEmpty();
+}
+
+QString SymbianDevice::toString() const
+{
+ QString rc;
+ QTextStream str(&rc);
+ format(str);
+ return rc;
+}
+
+void SymbianDevice::format(QTextStream &str) const
+{
+ str << (m_data->type == BlueToothCommunication ? "Bluetooth: " : "Serial: ")
+ << m_data->portName;
+ if (!m_data->friendlyName.isEmpty()) {
+ str << " (" << m_data->friendlyName;
+ if (!m_data->deviceDesc.isEmpty())
+ str << " / " << m_data->deviceDesc;
+ str << ')';
+ }
+ if (!m_data->manufacturer.isEmpty())
+ str << " [" << m_data->manufacturer << ']';
+}
+
+// Compare by port and friendly name
+int SymbianDevice::compare(const SymbianDevice &rhs) const
+{
+ if (const int prc = m_data->portName.compare(rhs.m_data->portName))
+ return prc;
+ if (const int frc = m_data->friendlyName.compare(rhs.m_data->friendlyName))
+ return frc;
+ return 0;
+}
+
+QDebug operator<<(QDebug d, const SymbianDevice &cd)
+{
+ d.nospace() << cd.toString();
+ return d;
+}
+
+// ------------- SymbianDeviceManagerPrivate
+struct SymbianDeviceManagerPrivate {
+ SymbianDeviceManagerPrivate() : m_initialized(false) {}
+
+ bool m_initialized;
+ SymbianDeviceManager::SymbianDeviceList m_devices;
+};
+
+SymbianDeviceManager::SymbianDeviceManager(QObject *parent) :
+ QObject(parent),
+ d(new SymbianDeviceManagerPrivate)
+{
+}
+
+SymbianDeviceManager::~SymbianDeviceManager()
+{
+ delete d;
+}
+
+SymbianDeviceManager::SymbianDeviceList SymbianDeviceManager::devices() const
+{
+ if (!d->m_initialized)
+ const_cast<SymbianDeviceManager*>(this)->update(false);
+ return d->m_devices;
+}
+
+QString SymbianDeviceManager::toString() const
+{
+ QString rc;
+ QTextStream str(&rc);
+ const int count = d->m_devices.size();
+ for (int i = 0; i < count; i++) {
+ str << '#' << i << ' ';
+ d->m_devices.at(i).format(str);
+ str << '\n';
+ }
+ return rc;
+}
+
+QString SymbianDeviceManager::friendlyNameForPort(const QString &port) const
+{
+ foreach (const SymbianDevice &device, d->m_devices) {
+ if (device.portName() == port)
+ return device.friendlyName();
+ }
+ return QString();
+}
+
+void SymbianDeviceManager::update()
+{
+ update(true);
+}
+
+void SymbianDeviceManager::update(bool emitSignals)
+{
+ typedef SymbianDeviceList::iterator SymbianDeviceListIterator;
+
+ if (debug)
+ qDebug(">SerialDeviceLister::update(%d)\n%s", int(emitSignals),
+ qPrintable(toString()));
+
+ d->m_initialized = true;
+ // Get ordered new list
+ SymbianDeviceList newDevices = serialPorts() + blueToothDevices();
+ if (newDevices.size() > 1)
+ qStableSort(newDevices.begin(), newDevices.end());
+ if (d->m_devices == newDevices) // Happy, nothing changed.
+ return;
+ // Merge the lists and emit the respective added/removed signals, assuming
+ // no one can plug a different device on the same port at the speed of lightning
+ if (!d->m_devices.isEmpty()) {
+ // Find deleted devices
+ for (SymbianDeviceListIterator oldIt = d->m_devices.begin(); oldIt != d->m_devices.end(); ) {
+ if (newDevices.contains(*oldIt)) {
+ ++oldIt;
+ } else {
+ const SymbianDevice toBeDeleted = *oldIt;
+ oldIt = d->m_devices.erase(oldIt);
+ if (emitSignals)
+ emit deviceRemoved(toBeDeleted);
+ }
+ }
+ }
+ if (!newDevices.isEmpty()) {
+ // Find new devices and insert in order
+ foreach(const SymbianDevice &newDevice, newDevices) {
+ if (!d->m_devices.contains(newDevice)) {
+ d->m_devices.append(newDevice);
+ if (emitSignals)
+ emit deviceAdded(newDevice);
+ }
+ }
+ if (d->m_devices.size() > 1)
+ qStableSort(d->m_devices.begin(), d->m_devices.end());
+ }
+ if (emitSignals)
+ emit updated();
+
+ if (debug)
+ qDebug("<SerialDeviceLister::update\n%s\n", qPrintable(toString()));
+}
+
+SymbianDeviceManager::SymbianDeviceList SymbianDeviceManager::serialPorts() const
+{
+ SymbianDeviceList rc;
+#ifdef Q_OS_WIN
+ const QSettings registry(REGKEY_CURRENT_CONTROL_SET, QSettings::NativeFormat);
+ const QString usbSerialRootKey = QLatin1String(USBSER) + QLatin1Char('/');
+ const int count = registry.value(usbSerialRootKey + QLatin1String("Count")).toInt();
+ for (int i = 0; i < count; ++i) {
+ QString driver = registry.value(usbSerialRootKey + QString::number(i)).toString();
+ if (driver.contains(QLatin1String("JAVACOMM"))) {
+ driver.replace(QLatin1Char('\\'), QLatin1Char('/'));
+ const QString driverRootKey = QLatin1String("Enum/") + driver + QLatin1Char('/');
+ if (debug > 1)
+ qDebug() << "SerialDeviceLister::serialPorts(): Checking " << i << count
+ << REGKEY_CURRENT_CONTROL_SET << usbSerialRootKey << driverRootKey;
+ QScopedPointer<SymbianDeviceData> device(new SymbianDeviceData);
+ device->type = SerialPortCommunication;
+ device->friendlyName = registry.value(driverRootKey + QLatin1String("FriendlyName")).toString();
+ device->portName = registry.value(driverRootKey + QLatin1String("Device Parameters/PortName")).toString();
+ device->deviceDesc = registry.value(driverRootKey + QLatin1String("DeviceDesc")).toString();
+ device->manufacturer = registry.value(driverRootKey + QLatin1String("Mfg")).toString();
+ rc.append(SymbianDevice(device.take()));
+ }
+ }
+#endif
+ return rc;
+}
+
+SymbianDeviceManager::SymbianDeviceList SymbianDeviceManager::blueToothDevices() const
+{
+ SymbianDeviceList rc;
+#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
+ // Bluetooth devices are created on connection. List the existing ones
+ // or at least the first one.
+ const QString prefix = QLatin1String(linuxBlueToothDeviceRootC);
+ const QString friendlyFormat = QLatin1String("Bluetooth device (%1)");
+ for (int d = 0; d < 4; d++) {
+ QScopedPointer<SymbianDeviceData> device(new SymbianDeviceData);
+ device->type = BlueToothCommunication;
+ device->portName = prefix + QString::number(d);
+ if (d == 0 || QFileInfo(device->portName).exists()) {
+ device->friendlyName = friendlyFormat.arg(device->portName);
+ rc.push_back(SymbianDevice(device.take()));
+ }
+ }
+#endif
+ return rc;
+}
+
+Q_GLOBAL_STATIC(SymbianDeviceManager, symbianDeviceManager)
+
+SymbianDeviceManager *SymbianDeviceManager::instance()
+{
+ return symbianDeviceManager();
+}
+
+QDebug operator<<(QDebug d, const SymbianDeviceManager &sdm)
+{
+ d.nospace() << sdm.toString();
+ return d;
+}
+
+} // namespace SymbianUtilsInternal
diff --git a/tools/runonphone/symbianutils/symbiandevicemanager.h b/tools/runonphone/symbianutils/symbiandevicemanager.h
new file mode 100644
index 0000000..dcf131a
--- /dev/null
+++ b/tools/runonphone/symbianutils/symbiandevicemanager.h
@@ -0,0 +1,145 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the tools applications 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$
+**
+****************************************************************************/
+
+#ifndef SYMBIANDEVICEMANAGER_H
+#define SYMBIANDEVICEMANAGER_H
+
+#include "symbianutils_global.h"
+
+#include <QtCore/QObject>
+#include <QtCore/QExplicitlySharedDataPointer>
+
+QT_BEGIN_NAMESPACE
+class QDebug;
+class QTextStream;
+QT_END_NAMESPACE
+
+namespace SymbianUtils {
+
+struct SymbianDeviceManagerPrivate;
+class SymbianDeviceData;
+
+enum DeviceCommunicationType {
+ SerialPortCommunication = 0,
+ BlueToothCommunication = 1
+};
+
+// SymbianDevice, explicitly shared.
+class SYMBIANUTILS_EXPORT SymbianDevice {
+ explicit SymbianDevice(SymbianDeviceData *data);
+ friend class SymbianDeviceManager;
+public:
+ SymbianDevice();
+ SymbianDevice(const SymbianDevice &rhs);
+ SymbianDevice &operator=(const SymbianDevice &rhs);
+ ~SymbianDevice();
+ int compare(const SymbianDevice &rhs) const;
+
+ DeviceCommunicationType type() const;
+ bool isNull() const;
+ QString portName() const;
+ QString friendlyName() const;
+
+ // Windows only.
+ QString deviceDesc() const;
+ QString manufacturer() const;
+
+ void format(QTextStream &str) const;
+ QString toString() const;
+
+private:
+ QExplicitlySharedDataPointer<SymbianDeviceData> m_data;
+};
+
+QDebug operator<<(QDebug d, const SymbianDevice &);
+
+inline bool operator==(const SymbianDevice &d1, const SymbianDevice &d2)
+ { return d1.compare(d2) == 0; }
+inline bool operator!=(const SymbianDevice &d1, const SymbianDevice &d2)
+ { return d1.compare(d2) != 0; }
+inline bool operator<(const SymbianDevice &d1, const SymbianDevice &d2)
+ { return d1.compare(d2) < 0; }
+
+/* SymbianDeviceManager: Singleton that maintains a list of Symbian devices.
+ * and emits change signals.
+ * On Windows, the update slot must be connected to a signal
+ * emitted from an event handler listening for WM_DEVICECHANGE. */
+class SYMBIANUTILS_EXPORT SymbianDeviceManager : public QObject
+{
+ Q_OBJECT
+public:
+ typedef QList<SymbianDevice> SymbianDeviceList;
+
+ static const char *linuxBlueToothDeviceRootC;
+
+ // Do not use this constructor, it is just public for Q_GLOBAL_STATIC
+ explicit SymbianDeviceManager(QObject *parent = 0);
+ virtual ~SymbianDeviceManager();
+
+ // Singleton access.
+ static SymbianDeviceManager *instance();
+
+ SymbianDeviceList devices() const;
+ QString toString() const;
+
+ QString friendlyNameForPort(const QString &port) const;
+
+public slots:
+ void update();
+
+signals:
+ void deviceRemoved(const SymbianDevice &d);
+ void deviceAdded(const SymbianDevice &d);
+ void updated();
+
+private:
+ void update(bool emitSignals);
+ SymbianDeviceList serialPorts() const;
+ SymbianDeviceList blueToothDevices() const;
+
+ SymbianDeviceManagerPrivate *d;
+};
+
+QDebug operator<<(QDebug d, const SymbianDeviceManager &);
+
+} // namespace SymbianUtils
+
+#endif // SYMBIANDEVICEMANAGER_H
diff --git a/tools/runonphone/trk/trk.pri b/tools/runonphone/symbianutils/symbianutils.pri
index 2ce17c0..6309517 100644
--- a/tools/runonphone/trk/trk.pri
+++ b/tools/runonphone/symbianutils/symbianutils.pri
@@ -1,18 +1,22 @@
INCLUDEPATH *= $$PWD
# Input
-HEADERS += $$PWD/callback.h \
+HEADERS += $$PWD/symbianutils_global.h \
+ $$PWD/callback.h \
$$PWD/trkutils.h \
+ $$PWD/trkutils_p.h \
$$PWD/trkdevice.h \
$$PWD/launcher.h \
$$PWD/bluetoothlistener.h \
- $$PWD/communicationstarter.h
+ $$PWD/communicationstarter.h \
+ $$PWD/symbiandevicemanager.h
SOURCES += $$PWD/trkutils.cpp \
$$PWD/trkdevice.cpp \
$$PWD/launcher.cpp \
$$PWD/bluetoothlistener.cpp \
- $$PWD/communicationstarter.cpp
+ $$PWD/communicationstarter.cpp \
+ $$PWD/symbiandevicemanager.cpp
# Tests/trklauncher is a console application
contains(QT, gui) {
diff --git a/tools/runonphone/symbianutils/symbianutils_global.h b/tools/runonphone/symbianutils/symbianutils_global.h
new file mode 100644
index 0000000..a6ffbe7
--- /dev/null
+++ b/tools/runonphone/symbianutils/symbianutils_global.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the tools applications 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$
+**
+****************************************************************************/
+
+#ifndef SYMBIANUTILS_GLOBAL_H
+#define SYMBIANUTILS_GLOBAL_H
+
+#include <QtCore/qglobal.h>
+
+#if defined(SYMBIANUTILS_BUILD_LIB)
+# define SYMBIANUTILS_EXPORT Q_DECL_EXPORT
+#elif defined(SYMBIANUTILS_BUILD_STATIC_LIB) || defined(SYMBIANUTILS_INCLUDE_PRI)
+# define SYMBIANUTILS_EXPORT
+#else
+# define SYMBIANUTILS_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif // SYMBIANUTILS_GLOBAL_H
diff --git a/tools/runonphone/trk/trkdevice.cpp b/tools/runonphone/symbianutils/trkdevice.cpp
index fe3261b..b327ab3 100644
--- a/tools/runonphone/trk/trkdevice.cpp
+++ b/tools/runonphone/symbianutils/trkdevice.cpp
@@ -41,6 +41,7 @@
#include "trkdevice.h"
#include "trkutils.h"
+#include "trkutils_p.h"
#include <QtCore/QString>
#include <QtCore/QDebug>
@@ -516,7 +517,7 @@ static inline bool overlappedSyncWrite(HANDLE file,
bool WriterThread::write(const QByteArray &data, QString *errorMessage)
{
if (verboseTrk)
- qDebug() << "Write raw data: " << data.toHex();
+ qDebug() << "Write raw data: " << stringFromArray(data).toLatin1();
QMutexLocker locker(&m_context->mutex);
#ifdef Q_OS_WIN
DWORD charsWritten;
@@ -856,8 +857,8 @@ void UnixReaderThread::terminate()
{
// Trigger select() by writing to the pipe
char c = 0;
- int written = write(m_terminatePipeFileDescriptors[1], &c, 1);
- // FIXME: Use result.
+ const int written = write(m_terminatePipeFileDescriptors[1], &c, 1);
+ Q_UNUSED(written)
wait();
}
@@ -882,6 +883,7 @@ struct TrkDevicePrivate
QByteArray trkReadBuffer;
int verbose;
QString errorString;
+ QString port;
};
///////////////////////////////////////////////////////////////////////
@@ -913,13 +915,19 @@ TrkDevice::~TrkDevice()
delete d;
}
-bool TrkDevice::open(const QString &port, QString *errorMessage)
+bool TrkDevice::open(QString *errorMessage)
{
if (d->verbose)
- qDebug() << "Opening" << port << "is open: " << isOpen() << " serialFrame=" << serialFrame();
+ qDebug() << "Opening" << port() << "is open: " << isOpen() << " serialFrame=" << serialFrame();
+ if (d->port.isEmpty()) {
+ *errorMessage = QLatin1String("Internal error: No port set on TrkDevice");
+ return false;
+ }
+
close();
#ifdef Q_OS_WIN
- d->deviceContext->device = CreateFile(port.toStdWString().c_str(),
+ const QString fullPort = QLatin1String("\\\\.\\") + d->port;
+ d->deviceContext->device = CreateFile(reinterpret_cast<const WCHAR*>(fullPort.utf16()),
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
@@ -928,7 +936,7 @@ bool TrkDevice::open(const QString &port, QString *errorMessage)
NULL);
if (INVALID_HANDLE_VALUE == d->deviceContext->device) {
- *errorMessage = QString::fromLatin1("Could not open device '%1': %2").arg(port, winErrorMessage(GetLastError()));
+ *errorMessage = QString::fromLatin1("Could not open device '%1': %2").arg(port(), winErrorMessage(GetLastError()));
return false;
}
memset(&d->deviceContext->readOverlapped, 0, sizeof(OVERLAPPED));
@@ -940,9 +948,9 @@ bool TrkDevice::open(const QString &port, QString *errorMessage)
return false;
}
#else
- d->deviceContext->file.setFileName(port);
+ d->deviceContext->file.setFileName(d->port);
if (!d->deviceContext->file.open(QIODevice::ReadWrite|QIODevice::Unbuffered)) {
- *errorMessage = QString::fromLatin1("Cannot open %1: %2").arg(port, d->deviceContext->file.errorString());
+ *errorMessage = QString::fromLatin1("Cannot open %1: %2").arg(d->port, d->deviceContext->file.errorString());
return false;
}
@@ -981,7 +989,7 @@ bool TrkDevice::open(const QString &port, QString *errorMessage)
d->writerThread->start();
if (d->verbose)
- qDebug() << "Opened" << port;
+ qDebug() << "Opened" << d->port;
return true;
}
@@ -1015,6 +1023,16 @@ bool TrkDevice::isOpen() const
#endif
}
+QString TrkDevice::port() const
+{
+ return d->port;
+}
+
+void TrkDevice::setPort(const QString &p)
+{
+ d->port = p;
+}
+
QString TrkDevice::errorString() const
{
return d->errorString;
@@ -1061,8 +1079,13 @@ void TrkDevice::sendTrkMessage(byte code, TrkCallback callback,
const QByteArray &data, const QVariant &cookie)
{
if (!d->writerThread.isNull()) {
- if (d->verbose > 1)
- qDebug() << "Sending " << code << data.toHex();
+ if (d->verbose > 1) {
+ QByteArray msg = "Sending: ";
+ msg += QByteArray::number(code, 16);
+ msg += ": ";
+ msg += stringFromArray(data).toLatin1();
+ qDebug("%s", msg.data());
+ }
d->writerThread->queueTrkMessage(code, callback, data, cookie);
}
}
diff --git a/tools/runonphone/trk/trkdevice.h b/tools/runonphone/symbianutils/trkdevice.h
index e04f791..78012fd 100644
--- a/tools/runonphone/trk/trkdevice.h
+++ b/tools/runonphone/symbianutils/trkdevice.h
@@ -42,6 +42,7 @@
#ifndef TRKDEVICE_H
#define TRKDEVICE_H
+#include "symbianutils_global.h"
#include "callback.h"
#include <QtCore/QObject>
@@ -74,18 +75,22 @@ enum { TRK_WRITE_QUEUE_NOOP_CODE = 0x7f };
typedef trk::Callback<const TrkResult &> TrkCallback;
-class TrkDevice : public QObject
+class SYMBIANUTILS_EXPORT TrkDevice : public QObject
{
Q_OBJECT
Q_PROPERTY(bool serialFrame READ serialFrame WRITE setSerialFrame)
Q_PROPERTY(bool verbose READ verbose WRITE setVerbose)
+ Q_PROPERTY(QString port READ port WRITE setPort)
public:
explicit TrkDevice(QObject *parent = 0);
virtual ~TrkDevice();
- bool open(const QString &port, QString *errorMessage);
+ bool open(QString *errorMessage);
bool isOpen() const;
+ QString port() const;
+ void setPort(const QString &p);
+
QString errorString() const;
bool serialFrame() const;
diff --git a/tools/runonphone/trk/trkutils.cpp b/tools/runonphone/symbianutils/trkutils.cpp
index 3a96053..9b43c96 100644
--- a/tools/runonphone/trk/trkutils.cpp
+++ b/tools/runonphone/symbianutils/trkutils.cpp
@@ -86,7 +86,7 @@ void Session::reset()
trkAppVersion.reset();
}
-QString formatCpu(int major, int minor)
+static QString formatCpu(int major, int minor)
{
//: CPU description of an S60 device
//: %1 major verison, %2 minor version
@@ -143,14 +143,46 @@ QString Session::deviceDescription(unsigned verbose) const
return msg.arg(formatTrkVersion(trkAppVersion));
}
+// --------------
+
+QByteArray decode7d(const QByteArray &ba)
+{
+ QByteArray res;
+ res.reserve(ba.size());
+ for (int i = 0; i < ba.size(); ++i) {
+ byte c = byte(ba.at(i));
+ if (c == 0x7d) {
+ ++i;
+ c = 0x20 ^ byte(ba.at(i));
+ }
+ res.append(c);
+ }
+ return res;
+}
+
+QByteArray encode7d(const QByteArray &ba)
+{
+ QByteArray res;
+ res.reserve(ba.size() + 2);
+ for (int i = 0; i < ba.size(); ++i) {
+ byte c = byte(ba.at(i));
+ if (c == 0x7e || c == 0x7d) {
+ res.append(0x7d);
+ res.append(0x20 ^ c);
+ } else {
+ res.append(c);
+ }
+ }
+ return res;
+}
// FIXME: Use the QByteArray based version below?
-QString stringFromByte(byte c)
+static inline QString stringFromByte(byte c)
{
- return QString("%1 ").arg(c, 2, 16, QChar('0'));
+ return QString::fromLatin1("%1").arg(c, 2, 16, QChar('0'));
}
-QString stringFromArray(const QByteArray &ba, int maxLen)
+SYMBIANUTILS_EXPORT QString stringFromArray(const QByteArray &ba, int maxLen)
{
QString str;
QString ascii;
@@ -170,7 +202,7 @@ QString stringFromArray(const QByteArray &ba, int maxLen)
return str + " " + ascii;
}
-QByteArray hexNumber(uint n, int digits)
+SYMBIANUTILS_EXPORT QByteArray hexNumber(uint n, int digits)
{
QByteArray ba = QByteArray::number(n, 16);
if (digits == 0 || ba.size() == digits)
@@ -178,7 +210,7 @@ QByteArray hexNumber(uint n, int digits)
return QByteArray(digits - ba.size(), '0') + ba;
}
-QByteArray hexxNumber(uint n, int digits)
+SYMBIANUTILS_EXPORT QByteArray hexxNumber(uint n, int digits)
{
return "0x" + hexNumber(n, digits);
}
@@ -200,9 +232,13 @@ void TrkResult::clear()
QString TrkResult::toString() const
{
- QString res = stringFromByte(code) + "[" + stringFromByte(token);
- res.chop(1);
- return res + "] " + stringFromArray(data);
+ QString res = stringFromByte(code);
+ res += QLatin1String(" [");
+ res += stringFromByte(token);
+ res += QLatin1Char(']');
+ res += QLatin1Char(' ');
+ res += stringFromArray(data);
+ return res;
}
QByteArray frameMessage(byte command, byte token, const QByteArray &data, bool serialFrame)
@@ -303,12 +339,12 @@ bool extractResult(QByteArray *buffer, bool serialFrame, TrkResult *result, QByt
return true;
}
-ushort extractShort(const char *data)
+SYMBIANUTILS_EXPORT ushort extractShort(const char *data)
{
return byte(data[0]) * 256 + byte(data[1]);
}
-uint extractInt(const char *data)
+SYMBIANUTILS_EXPORT uint extractInt(const char *data)
{
uint res = byte(data[0]);
res *= 256; res += byte(data[1]);
@@ -317,7 +353,7 @@ uint extractInt(const char *data)
return res;
}
-QString quoteUnprintableLatin1(const QByteArray &ba)
+SYMBIANUTILS_EXPORT QString quoteUnprintableLatin1(const QByteArray &ba)
{
QString res;
char buf[10];
@@ -333,49 +369,7 @@ QString quoteUnprintableLatin1(const QByteArray &ba)
return res;
}
-QByteArray decode7d(const QByteArray &ba)
-{
- QByteArray res;
- res.reserve(ba.size());
- for (int i = 0; i < ba.size(); ++i) {
- byte c = byte(ba.at(i));
- if (c == 0x7d) {
- ++i;
- c = 0x20 ^ byte(ba.at(i));
- }
- res.append(c);
- }
- //if (res != ba)
- // logMessage("DECODED: " << stringFromArray(ba)
- // << " -> " << stringFromArray(res));
- return res;
-}
-
-QByteArray encode7d(const QByteArray &ba)
-{
- QByteArray res;
- res.reserve(ba.size() + 2);
- for (int i = 0; i < ba.size(); ++i) {
- byte c = byte(ba.at(i));
- if (c == 0x7e || c == 0x7d) {
- res.append(0x7d);
- res.append(0x20 ^ c);
- } else {
- res.append(c);
- }
- }
- //if (res != ba)
- // logMessage("ENCODED: " << stringFromArray(ba)
- // << " -> " << stringFromArray(res));
- return res;
-}
-
-void appendByte(QByteArray *ba, byte b)
-{
- ba->append(b);
-}
-
-void appendShort(QByteArray *ba, ushort s, Endianness endian)
+SYMBIANUTILS_EXPORT void appendShort(QByteArray *ba, ushort s, Endianness endian)
{
if (endian == BigEndian) {
ba->append(s / 256);
@@ -386,7 +380,7 @@ void appendShort(QByteArray *ba, ushort s, Endianness endian)
}
}
-void appendInt(QByteArray *ba, uint i, Endianness endian)
+SYMBIANUTILS_EXPORT void appendInt(QByteArray *ba, uint i, Endianness endian)
{
const uchar b3 = i % 256; i /= 256;
const uchar b2 = i % 256; i /= 256;
diff --git a/tools/runonphone/trk/trkutils.h b/tools/runonphone/symbianutils/trkutils.h
index 328dd2b..3a485c7 100644
--- a/tools/runonphone/trk/trkutils.h
+++ b/tools/runonphone/symbianutils/trkutils.h
@@ -42,19 +42,20 @@
#ifndef DEBUGGER_TRK_UTILS
#define DEBUGGER_TRK_UTILS
+#include "symbianutils_global.h"
#include <QtCore/QByteArray>
#include <QtCore/QHash>
#include <QtCore/QStringList>
#include <QtCore/QVariant>
-typedef unsigned char byte;
-
QT_BEGIN_NAMESPACE
class QDateTime;
QT_END_NAMESPACE
namespace trk {
+typedef unsigned char byte;
+
enum Command {
TrkPing = 0x00,
TrkConnect = 0x01,
@@ -85,17 +86,14 @@ enum Command {
TrkNotifyProcessorReset = 0xa7
};
-QByteArray decode7d(const QByteArray &ba);
-QByteArray encode7d(const QByteArray &ba);
-
inline byte extractByte(const char *data) { return *data; }
-ushort extractShort(const char *data);
-uint extractInt(const char *data);
+SYMBIANUTILS_EXPORT ushort extractShort(const char *data);
+SYMBIANUTILS_EXPORT uint extractInt(const char *data);
-QString quoteUnprintableLatin1(const QByteArray &ba);
+SYMBIANUTILS_EXPORT QString quoteUnprintableLatin1(const QByteArray &ba);
// produces "xx xx xx "
-QString stringFromArray(const QByteArray &ba, int maxLen = - 1);
+SYMBIANUTILS_EXPORT QString stringFromArray(const QByteArray &ba, int maxLen = - 1);
enum Endianness
{
@@ -104,13 +102,11 @@ enum Endianness
TargetByteOrder = BigEndian,
};
-void appendByte(QByteArray *ba, byte b);
-void appendShort(QByteArray *ba, ushort s, Endianness = TargetByteOrder);
-void appendInt(QByteArray *ba, uint i, Endianness = TargetByteOrder);
-void appendString(QByteArray *ba, const QByteArray &str, Endianness = TargetByteOrder, bool appendNullTerminator = true);
-void appendDateTime(QByteArray *ba, QDateTime dateTime, Endianness = TargetByteOrder);
+SYMBIANUTILS_EXPORT void appendShort(QByteArray *ba, ushort s, Endianness = TargetByteOrder);
+SYMBIANUTILS_EXPORT void appendInt(QByteArray *ba, uint i, Endianness = TargetByteOrder);
+SYMBIANUTILS_EXPORT void appendString(QByteArray *ba, const QByteArray &str, Endianness = TargetByteOrder, bool appendNullTerminator = true);
-struct Library
+struct SYMBIANUTILS_EXPORT Library
{
Library() {}
@@ -119,7 +115,7 @@ struct Library
uint dataseg;
};
-struct TrkAppVersion
+struct SYMBIANUTILS_EXPORT TrkAppVersion
{
TrkAppVersion();
void reset();
@@ -130,7 +126,7 @@ struct TrkAppVersion
int protocolMinor;
};
-struct Session
+struct SYMBIANUTILS_EXPORT Session
{
Session();
void reset();
@@ -163,7 +159,7 @@ struct Session
QStringList modules;
};
-struct TrkResult
+struct SYMBIANUTILS_EXPORT TrkResult
{
TrkResult();
void clear();
@@ -179,15 +175,10 @@ struct TrkResult
bool isDebugOutput;
};
-// returns a QByteArray containing optionally
-// the serial frame [0x01 0x90 <len>] and 0x7e encoded7d(ba) 0x7e
-QByteArray frameMessage(byte command, byte token, const QByteArray &data, bool serialFrame);
-ushort isValidTrkResult(const QByteArray &buffer, bool serialFrame);
-bool extractResult(QByteArray *buffer, bool serialFrame, TrkResult *r, QByteArray *rawData = 0);
-QByteArray errorMessage(byte code);
-QByteArray hexNumber(uint n, int digits = 0);
-QByteArray hexxNumber(uint n, int digits = 0); // prepends '0x', too
-uint swapEndian(uint in);
+SYMBIANUTILS_EXPORT QByteArray errorMessage(byte code);
+SYMBIANUTILS_EXPORT QByteArray hexNumber(uint n, int digits = 0);
+SYMBIANUTILS_EXPORT QByteArray hexxNumber(uint n, int digits = 0); // prepends '0x', too
+SYMBIANUTILS_EXPORT uint swapEndian(uint in);
} // namespace trk
diff --git a/tools/runonphone/symbianutils/trkutils_p.h b/tools/runonphone/symbianutils/trkutils_p.h
new file mode 100644
index 0000000..12b0109
--- /dev/null
+++ b/tools/runonphone/symbianutils/trkutils_p.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the tools applications 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$
+**
+****************************************************************************/
+
+#ifndef DEBUGGER_TRK_PRIVATE_UTILS
+#define DEBUGGER_TRK_PRIVATE_UTILS
+
+#include "trkutils.h"
+#include "symbianutils_global.h"
+
+QT_BEGIN_NAMESPACE
+class QDateTime;
+QT_END_NAMESPACE
+
+namespace trk {
+
+void appendDateTime(QByteArray *ba, QDateTime dateTime, Endianness = TargetByteOrder);
+// returns a QByteArray containing optionally
+// the serial frame [0x01 0x90 <len>] and 0x7e encoded7d(ba) 0x7e
+QByteArray frameMessage(byte command, byte token, const QByteArray &data, bool serialFrame);
+bool extractResult(QByteArray *buffer, bool serialFrame, TrkResult *r, QByteArray *rawData = 0);
+
+} // namespace trk
+
+#endif // DEBUGGER_TRK_PRIVATE_UTILS
diff --git a/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp b/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp
index b84de11..0b14292 100644
--- a/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp
+++ b/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp
@@ -93,15 +93,23 @@ QtCursorDatabase::QtCursorDatabase()
QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-busy.png")));
}
+void QtCursorDatabase::clear()
+{
+ m_cursorNames.clear();
+ m_cursorIcons.clear();
+ m_valueToCursorShape.clear();
+ m_cursorShapeToValue.clear();
+}
+
void QtCursorDatabase::appendCursor(Qt::CursorShape shape, const QString &name, const QIcon &icon)
{
if (m_cursorShapeToValue.contains(shape))
return;
- int value = m_cursorNames.count();
+ const int value = m_cursorNames.count();
m_cursorNames.append(name);
- m_cursorIcons[value] = icon;
- m_valueToCursorShape[value] = shape;
- m_cursorShapeToValue[shape] = value;
+ m_cursorIcons.insert(value, icon);
+ m_valueToCursorShape.insert(value, shape);
+ m_cursorShapeToValue.insert(shape, value);
}
QStringList QtCursorDatabase::cursorShapeNames() const
diff --git a/tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h b/tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h
index b60fb94..baa7a4a 100644
--- a/tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h
+++ b/tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h
@@ -68,6 +68,7 @@ class QtCursorDatabase
{
public:
QtCursorDatabase();
+ void clear();
QStringList cursorShapeNames() const;
QMap<int, QIcon> cursorShapeIcons() const;
diff --git a/tools/shared/qtpropertybrowser/qtpropertymanager.cpp b/tools/shared/qtpropertybrowser/qtpropertymanager.cpp
index 67ab2fb..d9ff10a 100644
--- a/tools/shared/qtpropertybrowser/qtpropertymanager.cpp
+++ b/tools/shared/qtpropertybrowser/qtpropertymanager.cpp
@@ -1391,16 +1391,54 @@ void QtStringPropertyManager::uninitializeProperty(QtProperty *property)
}
// QtBoolPropertyManager
+// Return an icon containing a check box indicator
+static QIcon drawCheckBox(bool value)
+{
+ QStyleOptionButton opt;
+ opt.state |= value ? QStyle::State_On : QStyle::State_Off;
+ opt.state |= QStyle::State_Enabled;
+ const QStyle *style = QApplication::style();
+ // Figure out size of an indicator and make sure it is not scaled down in a list view item
+ // by making the pixmap as big as a list view icon and centering the indicator in it.
+ // (if it is smaller, it can't be helped)
+ const int indicatorWidth = style->pixelMetric(QStyle::PM_IndicatorWidth, &opt);
+ const int indicatorHeight = style->pixelMetric(QStyle::PM_IndicatorHeight, &opt);
+ const int listViewIconSize = indicatorWidth;
+ const int pixmapWidth = indicatorWidth;
+ const int pixmapHeight = qMax(indicatorHeight, listViewIconSize);
+
+ opt.rect = QRect(0, 0, indicatorWidth, indicatorHeight);
+ QPixmap pixmap = QPixmap(pixmapWidth, pixmapHeight);
+ pixmap.fill(Qt::transparent);
+ {
+ // Center?
+ const int xoff = (pixmapWidth > indicatorWidth) ? (pixmapWidth - indicatorWidth) / 2 : 0;
+ const int yoff = (pixmapHeight > indicatorHeight) ? (pixmapHeight - indicatorHeight) / 2 : 0;
+ QPainter painter(&pixmap);
+ painter.translate(xoff, yoff);
+ style->drawPrimitive(QStyle::PE_IndicatorCheckBox, &opt, &painter);
+ }
+ return QIcon(pixmap);
+}
class QtBoolPropertyManagerPrivate
{
QtBoolPropertyManager *q_ptr;
Q_DECLARE_PUBLIC(QtBoolPropertyManager)
public:
+ QtBoolPropertyManagerPrivate();
QMap<const QtProperty *, bool> m_values;
+ const QIcon m_checkedIcon;
+ const QIcon m_uncheckedIcon;
};
+QtBoolPropertyManagerPrivate::QtBoolPropertyManagerPrivate() :
+ m_checkedIcon(drawCheckBox(true)),
+ m_uncheckedIcon(drawCheckBox(false))
+{
+}
+
/*!
\class QtBoolPropertyManager
\internal
@@ -1471,36 +1509,6 @@ QString QtBoolPropertyManager::valueText(const QtProperty *property) const
return it.value() ? trueText : falseText;
}
-// Return an icon containing a check box indicator
-static QIcon drawCheckBox(bool value)
-{
- QStyleOptionButton opt;
- opt.state |= value ? QStyle::State_On : QStyle::State_Off;
- opt.state |= QStyle::State_Enabled;
- const QStyle *style = QApplication::style();
- // Figure out size of an indicator and make sure it is not scaled down in a list view item
- // by making the pixmap as big as a list view icon and centering the indicator in it.
- // (if it is smaller, it can't be helped)
- const int indicatorWidth = style->pixelMetric(QStyle::PM_IndicatorWidth, &opt);
- const int indicatorHeight = style->pixelMetric(QStyle::PM_IndicatorHeight, &opt);
- const int listViewIconSize = indicatorWidth;
- const int pixmapWidth = indicatorWidth;
- const int pixmapHeight = qMax(indicatorHeight, listViewIconSize);
-
- opt.rect = QRect(0, 0, indicatorWidth, indicatorHeight);
- QPixmap pixmap = QPixmap(pixmapWidth, pixmapHeight);
- pixmap.fill(Qt::transparent);
- {
- // Center?
- const int xoff = (pixmapWidth > indicatorWidth) ? (pixmapWidth - indicatorWidth) / 2 : 0;
- const int yoff = (pixmapHeight > indicatorHeight) ? (pixmapHeight - indicatorHeight) / 2 : 0;
- QPainter painter(&pixmap);
- painter.translate(xoff, yoff);
- style->drawPrimitive(QStyle::PE_IndicatorCheckBox, &opt, &painter);
- }
- return QIcon(pixmap);
-}
-
/*!
\reimp
*/
@@ -1510,9 +1518,7 @@ QIcon QtBoolPropertyManager::valueIcon(const QtProperty *property) const
if (it == d_ptr->m_values.constEnd())
return QIcon();
- static const QIcon checkedIcon = drawCheckBox(true);
- static const QIcon uncheckedIcon = drawCheckBox(false);
- return it.value() ? checkedIcon : uncheckedIcon;
+ return it.value() ? d_ptr->m_checkedIcon : d_ptr->m_uncheckedIcon;
}
/*!
@@ -6287,7 +6293,15 @@ void QtColorPropertyManager::uninitializeProperty(QtProperty *property)
// QtCursorPropertyManager
-Q_GLOBAL_STATIC(QtCursorDatabase, cursorDatabase)
+// Make sure icons are removed as soon as QApplication is destroyed, otherwise,
+// handles are leaked on X11.
+static void clearCursorDatabase();
+Q_GLOBAL_STATIC_WITH_INITIALIZER(QtCursorDatabase, cursorDatabase, qAddPostRoutine(clearCursorDatabase))
+
+static void clearCursorDatabase()
+{
+ cursorDatabase()->clear();
+}
class QtCursorPropertyManagerPrivate
{
diff --git a/translations/qt_de.ts b/translations/qt_de.ts
index 8cbf402..6447451 100644
--- a/translations/qt_de.ts
+++ b/translations/qt_de.ts
@@ -7572,7 +7572,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<location line="+2"/>
<source>Play movie in full-screen mode</source>
<comment>Media controller element</comment>
- <translation>FIlm im Vollbildmodus abspielen</translation>
+ <translation>Film im Vollbildmodus abspielen</translation>
</message>
<message>
<location line="+2"/>
@@ -8245,7 +8245,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<message>
<location filename="../src/xmlpatterns/api/qcoloringmessagehandler.cpp" line="+87"/>
<source>Warning in %1, at line %2, column %3: %4</source>
- <translation>Fehler in %1, bei Zeile %2, Spalte %3: %4</translation>
+ <translation>Warnung in %1, bei Zeile %2, Spalte %3: %4</translation>
</message>
<message>
<location line="+7"/>
@@ -9466,7 +9466,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<location line="-470"/>
<location line="+451"/>
<source>%1 is not allowed to derive from %2 by list as the latter defines it as final.</source>
- <translation>%1 darf nicht durch Listen von %2 abgeleitet werden, da sie letzterer sie als final deklariert.</translation>
+ <translation>%1 darf nicht durch Listen von %2 abgeleitet werden, da letzterer sie als final deklariert.</translation>
</message>
<message>
<location line="-431"/>
@@ -9917,7 +9917,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<message>
<location line="+6"/>
<source>Complex type %1 cannot be derived by extension from %2 as the latter contains %3 element in its content model.</source>
- <translation>Der komplexe Typ % kann nicht durch Erweiterung von %2 abgeleitet werden, da letzterer ein &apos;%3&apos;-Element in seinem Inhaltsmodell hat.</translation>
+ <translation>Der komplexe Typ %1 kann nicht durch Erweiterung von %2 abgeleitet werden, da letzterer ein &apos;%3&apos;-Element in seinem Inhaltsmodell hat.</translation>
</message>
<message>
<location line="+101"/>
diff --git a/util/qlalr/cppgenerator.cpp b/util/qlalr/cppgenerator.cpp
index a95f5e4..f52a86f 100644
--- a/util/qlalr/cppgenerator.cpp
+++ b/util/qlalr/cppgenerator.cpp
@@ -457,7 +457,7 @@ void CppGenerator::generateDecl (QTextStream &out)
out << "class " << grammar.table_name << endl
<< "{" << endl
<< "public:" << endl
- << " enum {" << endl;
+ << " enum VariousConstants {" << endl;
foreach (Name t, grammar.terminals)
{