summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2010-06-21 17:02:54 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2010-06-21 17:02:54 (GMT)
commit84ce7cc25b925d493a048ce5b00290483cd974f4 (patch)
tree0f4e709ca90e9bf3e683668460734282f426089d
parenta2a5a8c5e203fe9d55f9addba1533a30c6f2ba19 (diff)
parent32e532743dc6243612ade017e8c326ca0e7e0dec (diff)
downloadQt-84ce7cc25b925d493a048ce5b00290483cd974f4.zip
Qt-84ce7cc25b925d493a048ce5b00290483cd974f4.tar.gz
Qt-84ce7cc25b925d493a048ce5b00290483cd974f4.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
-rw-r--r--.gitignore1
-rwxr-xr-xbin/createpackage.pl33
-rwxr-xr-xbin/patch_capabilities.pl3
-rwxr-xr-xbin/syncqt776
-rwxr-xr-xconfig.tests/unix/compile.test6
-rw-r--r--config.tests/unix/getaddrinfo/getaddrinfotest.cpp7
-rw-r--r--config.tests/unix/iconv/iconv.pro2
-rw-r--r--config.tests/unix/ipv6/ipv6test.cpp5
-rw-r--r--config.tests/unix/odbc/odbc.cpp3
-rw-r--r--config.tests/unix/odbc/odbc.pro3
-rw-r--r--config.tests/unix/psql/psql.pro2
-rw-r--r--config.tests/x11/opengl/opengl.pro3
-rwxr-xr-xconfigure90
-rw-r--r--demos/declarative/flickr/mobile/TitleBar.qml2
-rw-r--r--demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml2
-rw-r--r--demos/declarative/samegame/SamegameCore/Dialog.qml5
-rw-r--r--demos/declarative/samegame/samegame.qml22
-rw-r--r--demos/declarative/snake/content/HighScoreModel.qml2
-rw-r--r--demos/declarative/snake/content/Link.qml2
-rw-r--r--demos/declarative/snake/content/snake.js1
-rw-r--r--demos/declarative/snake/snake.qml12
-rw-r--r--demos/declarative/twitter/TwitterCore/HomeTitleBar.qml2
-rw-r--r--demos/declarative/twitter/TwitterCore/TitleBar.qml2
-rw-r--r--demos/declarative/twitter/twitter.qml5
-rw-r--r--demos/declarative/webbrowser/content/Button.qml10
-rw-r--r--demos/declarative/webbrowser/content/Header.qml22
-rw-r--r--demos/declarative/webbrowser/content/UrlInput.qml11
-rw-r--r--demos/declarative/webbrowser/content/pics/go-jump-locationbar.pngbin0 -> 714 bytes
-rw-r--r--demos/declarative/webbrowser/webbrowser.qml1
-rw-r--r--demos/spectrum/app/mainwidget.h1
-rw-r--r--dist/changes-4.6.4158
-rw-r--r--dist/changes-4.7.06
-rw-r--r--doc/doc.pri17
-rw-r--r--doc/src/declarative/animation.qdoc149
-rw-r--r--doc/src/declarative/declarativeui.qdoc1
-rw-r--r--doc/src/declarative/elements.qdoc2
-rw-r--r--doc/src/declarative/examples.qdoc2
-rw-r--r--doc/src/declarative/extending.qdoc13
-rw-r--r--doc/src/declarative/pics/anchorchanges.pngbin0 -> 566 bytes
-rw-r--r--doc/src/declarative/pics/listmodel-nested.pngbin0 -> 7493 bytes
-rw-r--r--doc/src/declarative/pics/listmodel.pngbin0 -> 3407 bytes
-rw-r--r--doc/src/declarative/pics/parentchange.pngbin0 -> 509 bytes
-rw-r--r--doc/src/declarative/pics/repeater-simple.pngbin0 -> 404 bytes
-rw-r--r--doc/src/declarative/qdeclarativedebugging.qdoc31
-rw-r--r--doc/src/declarative/qdeclarativedocument.qdoc18
-rw-r--r--doc/src/declarative/qdeclarativeperformance.qdoc120
-rw-r--r--doc/src/declarative/qdeclarativestates.qdoc52
-rw-r--r--doc/src/declarative/qmlruntime.qdoc22
-rw-r--r--doc/src/declarative/qtbinding.qdoc5
-rw-r--r--doc/src/examples/qml-examples.qdoc16
-rw-r--r--doc/src/images/qml-image-example.pngbin0 -> 58184 bytes
-rw-r--r--doc/src/ja_JP/development/designer-manual.qdoc175
-rw-r--r--doc/src/ja_JP/development/qmake-manual.qdoc212
-rw-r--r--doc/src/ja_JP/development/qtestlib.qdoc432
-rw-r--r--doc/src/ja_JP/examples/arrowpad.qdoc248
-rw-r--r--doc/src/ja_JP/examples/hellotr.qdoc200
-rw-r--r--doc/src/ja_JP/examples/trollprint.qdoc286
-rw-r--r--doc/src/ja_JP/getting-started/tutorials.qdoc101
-rw-r--r--doc/src/ja_JP/images/linguist-hellotr_en.pngbin0 -> 4424 bytes
-rw-r--r--doc/src/ja_JP/images/linguist-hellotr_ja.pngbin0 -> 5624 bytes
-rw-r--r--doc/src/ja_JP/snippets/code/doc_src_examples_hellotr.qdoc72
-rw-r--r--doc/src/ja_JP/tutorials/addressbook.qdoc1070
-rw-r--r--doc/src/ja_JP/tutorials/widgets-tutorial.qdoc257
-rw-r--r--doc/src/platforms/symbian-introduction.qdoc2
-rw-r--r--doc/src/snippets/declarative/anchorchanges.qml69
-rw-r--r--doc/src/snippets/declarative/animation.qml181
-rw-r--r--doc/src/snippets/declarative/createQmlObject.qml4
-rw-r--r--doc/src/snippets/declarative/listmodel-modify.qml97
-rw-r--r--doc/src/snippets/declarative/listmodel-nested.qml103
-rw-r--r--doc/src/snippets/declarative/listmodel-simple.qml80
-rw-r--r--doc/src/snippets/declarative/listmodel.qml (renamed from doc/src/snippets/declarative/repeater-modeldata.qml)24
-rw-r--r--doc/src/snippets/declarative/parentchange.qml69
-rw-r--r--doc/src/snippets/declarative/repeater.qml53
-rw-r--r--doc/src/snippets/declarative/rotation.qml56
-rw-r--r--doc/src/snippets/declarative/state.qml69
-rw-r--r--doc/src/snippets/declarative/states.qml81
-rw-r--r--doc/src/snippets/declarative/systempalette.qml (renamed from doc/src/snippets/declarative/repeater-index.qml)19
-rw-r--r--doc/src/snippets/declarative/visualdatamodel.qml65
-rw-r--r--doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp63
-rw-r--r--doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml66
-rw-r--r--doc/src/snippets/declarative/visualdatamodel_rootindex/visualdatamodel_rootindex.pro4
-rw-r--r--examples/activeqt/activeqt.pro2
-rw-r--r--examples/declarative/imageelements/image/ImageCell.qml60
-rw-r--r--examples/declarative/imageelements/image/face-smile.pngbin0 -> 15408 bytes
-rw-r--r--examples/declarative/imageelements/image/image.qml66
-rw-r--r--examples/declarative/imageelements/image/image.qmlproject16
-rw-r--r--examples/declarative/modelviews/listview/PetsModel.qml (renamed from examples/declarative/modelviews/listview/dummydata/MyPetsModel.qml)0
-rw-r--r--examples/declarative/modelviews/listview/RecipesModel.qml (renamed from examples/declarative/modelviews/listview/dummydata/Recipes.qml)0
-rw-r--r--examples/declarative/modelviews/listview/content/PressAndHoldButton.qml (renamed from examples/declarative/modelviews/listview/content/ClickAutoRepeating.qml)42
-rw-r--r--examples/declarative/modelviews/listview/content/TextButton.qml (renamed from examples/declarative/modelviews/listview/content/MediaButton.qml)47
-rw-r--r--examples/declarative/modelviews/listview/content/pics/add.pngbin1577 -> 0 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/del.pngbin1661 -> 0 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/trash.pngbin989 -> 0 bytes
-rw-r--r--examples/declarative/modelviews/listview/dynamic.qml248
-rw-r--r--examples/declarative/modelviews/listview/dynamiclist.qml203
-rw-r--r--examples/declarative/modelviews/listview/expandingdelegates.qml (renamed from examples/declarative/modelviews/listview/recipes.qml)74
-rw-r--r--examples/declarative/modelviews/listview/highlight.qml34
-rw-r--r--examples/declarative/modelviews/listview/highlightranges.qml (renamed from examples/declarative/modelviews/listview/listview-example.qml)70
-rw-r--r--examples/declarative/modelviews/listview/sections.qml77
-rw-r--r--examples/declarative/modelviews/visualitemmodel/visualitemmodel.qml (renamed from examples/declarative/modelviews/listview/itemlist.qml)0
-rw-r--r--examples/declarative/modelviews/visualitemmodel/visualitemmodel.qmlproject16
-rw-r--r--examples/declarative/text/edit/edit.qml3
-rw-r--r--[-rwxr-xr-x]examples/declarative/toys/clocks/content/center.pngbin765 -> 765 bytes
-rw-r--r--[-rwxr-xr-x]examples/declarative/toys/clocks/content/clock-night.pngbin23359 -> 23359 bytes
-rw-r--r--[-rwxr-xr-x]examples/declarative/toys/clocks/content/clock.pngbin20653 -> 20653 bytes
-rw-r--r--[-rwxr-xr-x]examples/declarative/toys/clocks/content/hour.pngbin625 -> 625 bytes
-rw-r--r--[-rwxr-xr-x]examples/declarative/toys/clocks/content/minute.pngbin625 -> 625 bytes
-rw-r--r--[-rwxr-xr-x]examples/declarative/toys/clocks/content/second.pngbin303 -> 303 bytes
-rw-r--r--examples/declarative/toys/corkboards/Day.qml7
-rw-r--r--examples/declarative/toys/dynamicscene/dynamicscene.qml7
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml12
-rw-r--r--examples/declarative/ui-components/searchbox/SearchBox.qml4
-rw-r--r--examples/declarative/ui-components/searchbox/main.qml5
-rw-r--r--examples/ja_JP/linguist/hellotr/hellotr.pro13
-rw-r--r--examples/ja_JP/linguist/hellotr/main.cpp71
-rw-r--r--examples/multimedia/videographicsitem/videoplayer.cpp15
-rw-r--r--examples/multimedia/videowidget/videoplayer.cpp15
-rw-r--r--examples/tutorials/addressbook/part3/addressbook.cpp1
-rw-r--r--examples/tutorials/addressbook/part4/addressbook.cpp1
-rw-r--r--examples/tutorials/addressbook/part5/addressbook.cpp1
-rw-r--r--examples/tutorials/addressbook/part6/addressbook.cpp1
-rw-r--r--examples/tutorials/addressbook/part7/addressbook.cpp1
-rw-r--r--mkspecs/common/symbian/symbian-makefile.conf1
-rw-r--r--mkspecs/common/symbian/symbian.conf2
-rw-r--r--mkspecs/features/sis_targets.prf40
-rw-r--r--mkspecs/features/symbian/def_files.prf3
-rw-r--r--mkspecs/features/symbian/def_files_disabled.prf2
-rw-r--r--mkspecs/features/symbian/platform_paths.prf20
-rw-r--r--mkspecs/features/symbian/run_on_phone.prf32
-rw-r--r--mkspecs/features/symbian/symbian_building.prf4
-rw-r--r--mkspecs/linux-icc/qmake.conf23
-rw-r--r--mkspecs/modules/qt_webkit_version.pri6
-rw-r--r--mkspecs/unsupported/win32-g++-cross/qmake.conf101
-rw-r--r--mkspecs/unsupported/win32-g++-cross/qplatformdefs.h42
-rw-r--r--qmake/generators/metamakefile.cpp11
-rw-r--r--qmake/generators/symbian/symbiancommon.cpp3
-rw-r--r--qmake/generators/symbian/symmake.cpp14
-rw-r--r--qmake/generators/symbian/symmake.h1
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp2
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp6
-rw-r--r--qmake/generators/win32/mingw_make.cpp7
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp1
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp7
-rw-r--r--qmake/qmake.pri2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-buffer.h16
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-dump.c10
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-external.h6
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h25
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gdef.c4
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gdef.h21
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-global.h4
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h35
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gpos.c73
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gpos.h6
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h151
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gsub.h23
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-open-private.h6
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-open.c38
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-open.h48
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp13
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper.h8
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-stream.h10
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-thai.c64
-rw-r--r--src/3rdparty/harfbuzz/tests/fuzzing/fuzz.cc124
-rw-r--r--src/3rdparty/harfbuzz/tests/linebreaking/harfbuzz-qt.cpp25
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog17
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp18
-rw-r--r--src/3rdparty/javascriptcore/VERSION4
-rw-r--r--src/3rdparty/javascriptcore/WebKit.pri2
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_evr.cpp16
-rw-r--r--src/3rdparty/webkit/.tag2
-rw-r--r--src/3rdparty/webkit/ChangeLog13
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog13
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro2
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog320
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pri16
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro11
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.cpp11
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.h3
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/page/FocusController.cpp176
-rw-r--r--src/3rdparty/webkit/WebCore/page/FrameView.cpp54
-rw-r--r--src/3rdparty/webkit/WebCore/page/FrameView.h14
-rw-r--r--src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp25
-rw-r--r--src/3rdparty/webkit/WebCore/page/SpatialNavigation.h7
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/ImageSource.h17
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp1
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp18
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp64
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp23
-rw-r--r--src/3rdparty/webkit/WebKit.pri2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp65
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp7
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h3
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog87
-rw-r--r--src/3rdparty/webkit/WebKit/qt/docs/qtwebkit-bridge.qdoc100
-rw-r--r--src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp204
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp17
-rw-r--r--src/activeqt/container/container.pro2
-rw-r--r--src/activeqt/control/control.pro4
-rw-r--r--src/corelib/global/qendian.h24
-rw-r--r--src/corelib/global/qglobal.cpp27
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp10
-rw-r--r--src/corelib/io/qiodevice.cpp21
-rw-r--r--src/corelib/io/qiodevice_p.h9
-rw-r--r--src/corelib/kernel/qabstracteventdispatcher.cpp24
-rw-r--r--src/corelib/kernel/qabstractitemmodel.cpp2
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp4
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib.cpp3
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp6
-rw-r--r--src/corelib/kernel/qmetatype.cpp2
-rw-r--r--src/corelib/tools/qharfbuzz.cpp34
-rw-r--r--src/corelib/tools/qstring.cpp4
-rw-r--r--src/corelib/tools/qtextboundaryfinder.cpp12
-rw-r--r--src/corelib/tools/tools.pri5
-rw-r--r--src/declarative/3rdparty/3rdparty.pri7
-rw-r--r--src/declarative/QmlChanges.txt2
-rw-r--r--src/declarative/declarative.pro1
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanchors.cpp51
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp7
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp9
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp290
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview_p.h11
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimage.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp66
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.h1
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem_p.h7
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp16
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp104
-rw-r--r--src/declarative/graphicsitems/qdeclarativeloader.cpp28
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea_p_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp7
-rw-r--r--src/declarative/graphicsitems/qdeclarativepositioners.cpp32
-rw-r--r--src/declarative/graphicsitems/qdeclarativepositioners_p_p.h16
-rw-r--r--src/declarative/graphicsitems/qdeclarativerepeater.cpp94
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext.cpp20
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp90
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit_p.h1
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp169
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput_p.h3
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput_p_p.h1
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp110
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h5
-rw-r--r--src/declarative/qml/qdeclarativecompiledbindings.cpp2
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp39
-rw-r--r--src/declarative/qml/qdeclarativecontext.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp22
-rw-r--r--src/declarative/qml/qdeclarativemetatype.cpp19
-rw-r--r--src/declarative/qml/qdeclarativemetatype_p.h2
-rw-r--r--src/declarative/qml/qdeclarativeprivate.h4
-rw-r--r--src/declarative/qml/qdeclarativevaluetype.cpp12
-rw-r--r--src/declarative/qml/qdeclarativevaluetype_p.h2
-rw-r--r--src/declarative/qml/qdeclarativeworkerscript.cpp5
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp94
-rw-r--r--src/declarative/util/qdeclarativeanimation_p.h2
-rw-r--r--src/declarative/util/qdeclarativeanimation_p_p.h20
-rw-r--r--src/declarative/util/qdeclarativeconnections.cpp29
-rw-r--r--src/declarative/util/qdeclarativefontloader.cpp21
-rw-r--r--src/declarative/util/qdeclarativelistmodel.cpp128
-rw-r--r--src/declarative/util/qdeclarativepackage.cpp15
-rw-r--r--src/declarative/util/qdeclarativepackage_p.h6
-rw-r--r--src/declarative/util/qdeclarativepropertychanges.cpp6
-rw-r--r--src/declarative/util/qdeclarativestate.cpp42
-rw-r--r--src/declarative/util/qdeclarativestate_p.h1
-rw-r--r--src/declarative/util/qdeclarativestate_p_p.h3
-rw-r--r--src/declarative/util/qdeclarativestategroup.cpp8
-rw-r--r--src/declarative/util/qdeclarativestateoperations.cpp42
-rw-r--r--src/declarative/util/qdeclarativesystempalette.cpp42
-rw-r--r--src/declarative/util/qdeclarativeview.cpp20
-rw-r--r--src/declarative/util/qdeclarativeview.h1
-rw-r--r--src/declarative/util/qdeclarativexmllistmodel.cpp10
-rw-r--r--src/declarative/util/qlistmodelinterface.cpp (renamed from src/declarative/3rdparty/qlistmodelinterface.cpp)0
-rw-r--r--src/declarative/util/qlistmodelinterface_p.h (renamed from src/declarative/3rdparty/qlistmodelinterface_p.h)0
-rw-r--r--src/declarative/util/util.pri6
-rw-r--r--src/gui/graphicsview/qgraphicsgridlayout.cpp12
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp3
-rw-r--r--src/gui/graphicsview/qgraphicslinearlayout.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp12
-rw-r--r--src/gui/graphicsview/qgridlayoutengine_p.h4
-rw-r--r--src/gui/image/image.pri14
-rw-r--r--src/gui/image/qbmphandler.cpp10
-rw-r--r--src/gui/image/qimage.cpp287
-rw-r--r--src/gui/image/qimage_p.h3
-rw-r--r--src/gui/image/qpixmap.cpp3
-rw-r--r--src/gui/image/qpixmap_raster.cpp201
-rw-r--r--src/gui/image/qpixmap_raster_p.h3
-rw-r--r--src/gui/image/qpixmap_x11.cpp6
-rw-r--r--src/gui/image/qpixmapcache.cpp29
-rw-r--r--src/gui/image/qpixmapdata.cpp2
-rw-r--r--src/gui/image/qpnghandler.cpp10
-rw-r--r--src/gui/image/qppmhandler.cpp10
-rw-r--r--src/gui/image/qxbmhandler.cpp10
-rw-r--r--src/gui/image/qxpmhandler.cpp8
-rw-r--r--src/gui/itemviews/qabstractitemdelegate.cpp10
-rw-r--r--src/gui/itemviews/qtreewidget.cpp4
-rw-r--r--src/gui/kernel/qapplication.cpp1
-rw-r--r--src/gui/kernel/qapplication_s60.cpp25
-rw-r--r--src/gui/kernel/qapplication_win.cpp35
-rw-r--r--src/gui/kernel/qgesturemanager.cpp8
-rw-r--r--src/gui/kernel/qstandardgestures.cpp3
-rw-r--r--src/gui/kernel/qt_s60_p.h26
-rw-r--r--src/gui/kernel/qwidget.cpp3
-rw-r--r--src/gui/kernel/qwidget_mac.mm9
-rw-r--r--src/gui/kernel/qwidget_p.h5
-rw-r--r--src/gui/kernel/qwidget_qws.cpp2
-rw-r--r--src/gui/kernel/qwidget_s60.cpp1
-rw-r--r--src/gui/kernel/qwidget_win.cpp1
-rw-r--r--src/gui/kernel/qwidget_x11.cpp1
-rw-r--r--src/gui/kernel/qwinnativepangesturerecognizer_win_p.h33
-rw-r--r--src/gui/painting/painting.pri9
-rw-r--r--src/gui/painting/qgraphicssystem_runtime_p.h2
-rw-r--r--src/gui/painting/qgrayraster.c35
-rw-r--r--src/gui/painting/qgrayraster_p.h4
-rw-r--r--src/gui/painting/qoutlinemapper.cpp12
-rw-r--r--src/gui/painting/qoutlinemapper_p.h2
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp24
-rw-r--r--src/gui/painting/qpaintengine_x11.cpp5
-rw-r--r--src/gui/painting/qpaintengineex.cpp4
-rw-r--r--src/gui/painting/qpainter.cpp6
-rw-r--r--src/gui/painting/qrasterdefs_p.h6
-rw-r--r--src/gui/styles/qcleanlooksstyle.cpp2
-rw-r--r--src/gui/styles/qcommonstyle.cpp4
-rw-r--r--src/gui/styles/qgtkstyle.cpp3
-rw-r--r--src/gui/styles/qs60style.cpp122
-rw-r--r--src/gui/styles/qs60style_p.h48
-rw-r--r--src/gui/styles/qs60style_s60.cpp70
-rw-r--r--src/gui/text/qfontdatabase.cpp13
-rw-r--r--src/gui/text/qfontdatabase_s60.cpp20
-rw-r--r--src/gui/text/qfontengine_ft.cpp2
-rw-r--r--src/gui/text/qfontengine_mac.mm3
-rw-r--r--src/gui/text/qfontengine_s60.cpp2
-rw-r--r--src/gui/text/qstatictext.cpp34
-rw-r--r--src/gui/text/qstatictext.h5
-rw-r--r--src/gui/text/qstatictext_p.h6
-rw-r--r--src/gui/text/qtextcursor.cpp3
-rw-r--r--src/gui/text/qtextdocument_p.cpp19
-rw-r--r--src/gui/text/qtextdocument_p.h2
-rw-r--r--src/gui/text/qtextoption.cpp10
-rw-r--r--src/gui/text/qtextoption.h2
-rw-r--r--src/gui/text/text.pri3
-rw-r--r--src/gui/util/qsystemtrayicon.cpp5
-rw-r--r--src/gui/util/qsystemtrayicon_mac.mm5
-rw-r--r--src/gui/util/qsystemtrayicon_p.h2
-rw-r--r--src/gui/util/qsystemtrayicon_qws.cpp5
-rw-r--r--src/gui/util/qsystemtrayicon_win.cpp163
-rw-r--r--src/gui/util/qsystemtrayicon_wince.cpp15
-rw-r--r--src/gui/util/qsystemtrayicon_x11.cpp5
-rw-r--r--src/gui/widgets/qslider.cpp2
-rw-r--r--src/imports/particles/qdeclarativeparticles.cpp26
-rw-r--r--src/imports/qimportbase.pri2
-rw-r--r--src/imports/webkit/qdeclarativewebview.cpp4
-rw-r--r--src/network/access/access.pri7
-rw-r--r--src/network/network.qrc5
-rw-r--r--src/network/socket/qlocalserver_p.h1
-rw-r--r--src/network/socket/qlocalserver_win.cpp6
-rw-r--r--src/network/socket/qlocalsocket_p.h2
-rw-r--r--src/network/socket/qlocalsocket_win.cpp38
-rw-r--r--src/network/ssl/qsslcertificate.cpp9
-rw-r--r--src/network/ssl/qsslsocket.cpp8
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp126
-rw-r--r--src/network/ssl/qsslsocket_p.h28
-rw-r--r--src/network/ssl/qt-ca-bundle.crt1984
-rw-r--r--src/network/ssl/ssl.pri3
-rw-r--r--src/opengl/qgl.cpp2
-rw-r--r--src/opengl/qgl_egl.cpp5
-rw-r--r--src/opengl/qgl_p.h4
-rw-r--r--src/opengl/qgl_x11.cpp10
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.mm25
-rw-r--r--src/plugins/bearer/symbian/3_1/3_1.pro5
-rw-r--r--src/plugins/bearer/symbian/3_2/3_2.pro13
-rw-r--r--src/plugins/bearer/symbian/symbian.pri28
-rw-r--r--src/plugins/bearer/symbian/symbian.pro42
-rw-r--r--src/plugins/bearer/symbian/symbian_3/symbian_3.pro16
-rw-r--r--src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp6
-rw-r--r--src/plugins/imageformats/gif/qgifhandler.cpp20
-rw-r--r--src/plugins/imageformats/jpeg/jpeg.pro7
-rw-r--r--src/plugins/imageformats/jpeg/qjpeghandler.cpp10
-rw-r--r--src/plugins/imageformats/mng/mng.pro16
-rw-r--r--src/plugins/imageformats/mng/qmnghandler.cpp9
-rw-r--r--src/plugins/imageformats/tiff/tiff.pro21
-rw-r--r--src/plugins/sqldrivers/psql/psql.pro4
-rw-r--r--src/qbase.pri1
-rw-r--r--src/s60installs/bwins/QtDeclarativeu.def38
-rw-r--r--src/s60installs/bwins/QtGuiu.def8
-rw-r--r--src/s60installs/eabi/QtDeclarativeu.def39
-rw-r--r--src/s60installs/eabi/QtGuiu.def6
-rw-r--r--src/s60installs/qsymbianbearer.qtplugin1
-rw-r--r--src/s60installs/s60installs.pro29
-rw-r--r--src/script/api/qscriptengine.cpp30
-rw-r--r--src/script/api/qscriptengine_p.h6
-rw-r--r--src/script/api/qscriptvalue.cpp4
-rw-r--r--src/sql/drivers/drivers.pri20
-rw-r--r--src/src.pro2
-rw-r--r--src/svg/svg.pro6
-rw-r--r--src/tools/bootstrap/bootstrap.pri5
-rw-r--r--src/tools/bootstrap/bootstrap.pro4
-rw-r--r--src/tools/moc/main.cpp7
-rw-r--r--src/winmain/winmain.pro4
-rw-r--r--src/xmlpatterns/schema/qxsdparticlechecker.cpp30
-rw-r--r--src/xmlpatterns/schema/qxsdparticlechecker_p.h7
-rw-r--r--tests/auto/declarative/declarative.pro2
-rw-r--r--tests/auto/declarative/examples/examples.pro3
-rw-r--r--tests/auto/declarative/examples/tst_examples.cpp6
-rw-r--r--tests/auto/declarative/parserstress/parserstress.pro3
-rw-r--r--tests/auto/declarative/parserstress/tst_parserstress.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro3
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro4
-rw-r--r--tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro4
-rw-r--r--tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro4
-rw-r--r--tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro3
-rw-r--r--tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro8
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro5
-rw-r--r--tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro3
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro4
-rw-r--r--tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro4
-rw-r--r--tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro4
-rw-r--r--tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp25
-rw-r--r--tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/childrenRectBug.qml23
-rw-r--r--tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp22
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro3
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro6
-rw-r--r--tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro4
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro4
-rw-r--r--tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp13
-rw-r--r--tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro4
-rw-r--r--tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro4
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro4
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeparticles/tst_qdeclarativeparticles.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro4
-rw-r--r--tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro3
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro4
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml5
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro4
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp49
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro4
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro4
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedfollow/tst_qdeclarativesmoothedfollow.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro4
-rw-r--r--tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro4
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml20
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/returnToBase.qml21
-rw-r--r--tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro4
-rw-r--r--tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp68
-rw-r--r--tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro5
-rw-r--r--tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro3
-rw-r--r--tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro4
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp83
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro4
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp83
-rw-r--r--tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro4
-rw-r--r--tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro3
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp11
-rw-r--r--tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp10
-rw-r--r--tests/auto/declarative/qdeclarativeviewer/data/orientation.qml20
-rw-r--r--tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp212
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro3
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro4
-rw-r--r--tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/data/BaseWorker.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp11
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro4
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro3
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp5
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml9
-rw-r--r--tests/auto/declarative/qmlvisual/qmlvisual.pro4
-rw-r--r--tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp5
-rw-r--r--tests/auto/gestures/tst_gestures.cpp66
-rw-r--r--tests/auto/mediaobject/dummy/dummy.pro2
-rw-r--r--tests/auto/qapplication/tst_qapplication.cpp19
-rw-r--r--tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp2
-rw-r--r--tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp86
-rw-r--r--tests/auto/qimagereader/tst_qimagereader.cpp32
-rw-r--r--tests/auto/qlocale/test/test.pro2
-rw-r--r--tests/auto/qlocalsocket/example/client/client.pro6
-rw-r--r--tests/auto/qlocalsocket/example/server/server.pro6
-rw-r--r--tests/auto/qlocalsocket/tst_qlocalsocket.cpp85
-rw-r--r--tests/auto/qmetatype/tst_qmetatype.cpp8
-rw-r--r--tests/auto/qpixmap/loadFromData/designer_argb32.pngbin0 -> 4189 bytes
-rw-r--r--tests/auto/qpixmap/loadFromData/designer_indexed8_no_alpha.gifbin0 -> 3317 bytes
-rw-r--r--tests/auto/qpixmap/loadFromData/designer_indexed8_no_alpha.pngbin0 -> 2431 bytes
-rw-r--r--tests/auto/qpixmap/loadFromData/designer_indexed8_with_alpha.gifbin0 -> 2086 bytes
-rw-r--r--tests/auto/qpixmap/loadFromData/designer_indexed8_with_alpha.pngbin0 -> 1405 bytes
-rw-r--r--tests/auto/qpixmap/loadFromData/designer_rgb32.jpgbin0 -> 11810 bytes
-rw-r--r--tests/auto/qpixmap/loadFromData/designer_rgb32.pngbin0 -> 4282 bytes
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp37
-rw-r--r--tests/auto/qprocess/testProcessEOF/testProcessEOF.pro2
-rw-r--r--tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp140
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.cpp89
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.h2
-rw-r--r--tests/auto/qsqldriver/qsqldriver.pro2
-rw-r--r--tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro2
-rw-r--r--tests/auto/qsslcertificate/tst_qsslcertificate.cpp3
-rw-r--r--tests/auto/qtcpserver/crashingServer/crashingServer.pro2
-rw-r--r--tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp111
-rw-r--r--tests/auto/qtextcursor/tst_qtextcursor.cpp18
-rw-r--r--tests/auto/qtextformat/tst_qtextformat.cpp5
-rw-r--r--tests/auto/qtextlayout/tst_qtextlayout.cpp9
-rw-r--r--tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp9
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp6
-rw-r--r--tests/auto/selftests/expected_badxml.txt2
-rw-r--r--tests/auto/selftests/expected_xunit.txt2
-rw-r--r--tests/auto/uic/baseline/config_fromuic3.ui.h2
-rw-r--r--tests/auto/xmlpatternsxqts/tst_suitetest.cpp4
-rw-r--r--tools/activeqt/testcon/testcon.pro2
-rw-r--r--tools/assistant/lib/fulltextsearch/fulltextsearch.pro2
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qwv.cpp23
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qwv.h3
-rw-r--r--tools/configure/configure.pro2
-rw-r--r--tools/configure/configureapp.cpp4
-rw-r--r--tools/configure/configureapp.h1
-rw-r--r--tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp10
-rw-r--r--tools/designer/src/components/signalsloteditor/signalsloteditorwindow.h2
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp2050
-rw-r--r--tools/qdoc3/ditaxmlgenerator.h88
-rw-r--r--tools/qdoc3/main.cpp2
-rw-r--r--tools/qdoc3/node.cpp49
-rw-r--r--tools/qdoc3/node.h9
-rw-r--r--tools/qdoc3/pagegenerator.cpp4
-rw-r--r--tools/qdoc3/test/qt-api-only_ja_JP.qdocconf30
-rw-r--r--tools/qdoc3/test/qt-build-docs.qdocconf1
-rw-r--r--tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf110
-rw-r--r--tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf53
-rw-r--r--tools/qdoc3/test/qt-ditaxml.qdocconf11
-rw-r--r--tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf178
-rw-r--r--tools/qdoc3/test/qt.qdocconf1
-rw-r--r--tools/qdoc3/test/qt_ja_JP.qdocconf125
-rw-r--r--tools/qdoc3/test/qt_zh_CN.qdocconf45
-rw-r--r--tools/qml/content/Browser.qml2
-rw-r--r--tools/qml/deviceorientation.cpp2
-rw-r--r--tools/qml/deviceorientation.h8
-rw-r--r--tools/qml/deviceorientation_maemo.cpp123
-rw-r--r--tools/qml/main.cpp7
-rw-r--r--tools/qml/qml.pri1
-rw-r--r--tools/qml/qmlruntime.cpp36
-rw-r--r--tools/shared/symbian/epocroot.cpp4
-rwxr-xr-xtranslations/check-ts.pl85
-rw-r--r--translations/check-ts.xq3
-rw-r--r--translations/qt_de.ts477
-rw-r--r--translations/qt_ja.ts (renamed from translations/qt_ja_JP.ts)0
-rw-r--r--translations/translations.pri7
609 files changed, 14035 insertions, 6932 deletions
diff --git a/.gitignore b/.gitignore
index d88e69a..f187b23 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,7 @@ examples/*/*/*
!examples/*/*/README
examples/*/*/*[.]app
!examples/declarative/*
+!examples/ja_JP/*/*
demos/*/*
!demos/spectrum/*
demos/spectrum/bin
diff --git a/bin/createpackage.pl b/bin/createpackage.pl
index 939c38e..8b787cb 100755
--- a/bin/createpackage.pl
+++ b/bin/createpackage.pl
@@ -78,6 +78,7 @@ Where supported options are as follows:
as a comments. Also empty lines are ignored. The paths in
<file> can be absolute or relative to <file>.
[-u|unsigned] = Preserves the unsigned package.
+ [-o|only-unsigned] = Creates only unsigned package.
[-s|stub] = Generates stub sis for ROM.
[-n|sisname <name>] = Specifies the final sis name.
Where parameters are as follows:
@@ -121,11 +122,13 @@ my $certfile = "";
my $preserveUnsigned = "";
my $stub = "";
my $signed_sis_name = "";
+my $onlyUnsigned = "";
unless (GetOptions('i|install' => \$install,
'p|preprocess' => \$preprocessonly,
'c|certfile=s' => \$certfile,
'u|unsigned' => \$preserveUnsigned,
+ 'o|only-unsigned' => \$onlyUnsigned,
's|stub' => \$stub,
'n|sisname=s' => \$signed_sis_name,)) {
Usage();
@@ -292,7 +295,10 @@ if($stub) {
# Create stub SIS.
system ("makesis -s $pkgoutput $stub_sis_name");
} else {
- if ($certtext eq "Self Signed" && !@certificates && $templatepkg !~ m/_installer\.pkg$/i) {
+ if ($certtext eq "Self Signed"
+ && !@certificates
+ && $templatepkg !~ m/_installer\.pkg$/i
+ && !$onlyUnsigned) {
print("Auto-patching capabilities for self signed package.\n");
system ("patch_capabilities $pkgoutput");
}
@@ -302,6 +308,25 @@ if($stub) {
system ("makesis $pkgoutput $unsigned_sis_name") and die ("makesis failed");
print("\n");
+ my $targetInsert = "";
+ if ($targetplatform ne "-") {
+ $targetInsert = " for $targetplatform";
+ }
+
+ if ($onlyUnsigned) {
+ stat($unsigned_sis_name);
+ if( -e _ ) {
+ print ("Successfully created unsigned package ${unsigned_sis_name}${targetInsert}!\n");
+ } else {
+ print ("\nUnsigned package creation failed!\n");
+ }
+
+ if (!$preservePkgOutput) {
+ unlink $pkgoutput;
+ }
+ exit;
+ }
+
# Sign SIS with certificate info given as an argument.
my $relcert = File::Spec->abs2rel($certificate);
my $relkey = File::Spec->abs2rel($key);
@@ -311,11 +336,7 @@ if($stub) {
# 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");
+ print ("Successfully created signed package ${signed_sis_name}${targetInsert} using certificate: $certtext!\n");
# Sign with additional certificates & keys
for my $row ( @certificates ) {
diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl
index 9741bc3..501939a 100755
--- a/bin/patch_capabilities.pl
+++ b/bin/patch_capabilities.pl
@@ -269,7 +269,8 @@ if (@ARGV)
}
print ("\n");
- print ("NOTE: A patched package should not be used for distribution!\n");
+ print ("NOTE: A patched package may not work as expected due to reduced capabilities.\n");
+ print (" Therefore it should not be used for any kind of Symbian signing or distribution!\n");
print ("\n");
}
}
diff --git a/bin/syncqt b/bin/syncqt
index 71f2eab..f499bbc 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -146,12 +146,12 @@ sub shouldMasterInclude {
return 0 if(basename($iheader) =~ /qconfig/);
if(open(F, "<$iheader")) {
while(<F>) {
- chomp;
- return 0 if(/^\#pragma qt_no_master_include$/);
- }
- close(F);
+ chomp;
+ return 0 if(/^\#pragma qt_no_master_include$/);
+ }
+ close(F);
} else {
- return 0;
+ return 0;
}
return 1;
}
@@ -168,17 +168,17 @@ sub classNames {
my @ret;
my ($iheader) = @_;
if(basename($iheader) eq "qglobal.h") {
- push @ret, "QtGlobal";
+ push @ret, "QtGlobal";
} elsif(basename($iheader) eq "qendian.h") {
- push @ret, "QtEndian";
+ push @ret, "QtEndian";
} elsif(basename($iheader) eq "qconfig.h") {
push @ret, "QtConfig";
} elsif(basename($iheader) eq "qplugin.h") {
- push @ret, "QtPlugin";
+ push @ret, "QtPlugin";
} elsif(basename($iheader) eq "qalgorithms.h") {
- push @ret, "QtAlgorithms";
+ push @ret, "QtAlgorithms";
} elsif(basename($iheader) eq "qcontainerfwd.h") {
- push @ret, "QtContainerFwd";
+ push @ret, "QtContainerFwd";
} elsif(basename($iheader) eq "qdebug.h") {
push @ret, "QtDebug";
} elsif(basename($iheader) eq "qevent.h") {
@@ -186,7 +186,7 @@ sub classNames {
} elsif(basename($iheader) eq "qnamespace.h") {
push @ret, "Qt"
} elsif(basename($iheader) eq "qssl.h") {
- push @ret, "QSsl";
+ push @ret, "QSsl";
} elsif(basename($iheader) eq "qtest.h") {
push @ret, "QTest"
} elsif(basename($iheader) eq "qtconcurrentmap.h") {
@@ -204,7 +204,7 @@ sub classNames {
while(<F>) {
my $line = $_;
chomp $line;
- chop $line if ($line =~ /\r$/);
+ chop $line if ($line =~ /\r$/);
if($line =~ /^\#/) {
if($line =~ /\\$/) {
while($line = <F>) {
@@ -212,18 +212,18 @@ sub classNames {
last unless($line =~ /\\$/);
}
}
- return @ret if($line =~ m/^#pragma qt_sync_stop_processing/);
+ return @ret if($line =~ m/^#pragma qt_sync_stop_processing/);
push(@ret, "$1") if($line =~ m/^#pragma qt_class\(([^)]*)\)[\r\n]*$/);
- $line = 0;
+ $line = 0;
}
- if($line) {
+ if($line) {
$line =~ s,//.*$,,; #remove c++ comments
- $line .= ";" if($line =~ m/^Q_[A-Z_]*\(.*\)[\r\n]*$/); #qt macro
- $line .= ";" if($line =~ m/^QT_(BEGIN|END)_HEADER[\r\n]*$/); #qt macro
- $line .= ";" if($line =~ m/^QT_(BEGIN|END)_NAMESPACE[\r\n]*$/); #qt macro
- $line .= ";" if($line =~ m/^QT_MODULE\(.*\)[\r\n]*$/); # QT_MODULE macro
+ $line .= ";" if($line =~ m/^Q_[A-Z_]*\(.*\)[\r\n]*$/); #qt macro
+ $line .= ";" if($line =~ m/^QT_(BEGIN|END)_HEADER[\r\n]*$/); #qt macro
+ $line .= ";" if($line =~ m/^QT_(BEGIN|END)_NAMESPACE[\r\n]*$/); #qt macro
+ $line .= ";" if($line =~ m/^QT_MODULE\(.*\)[\r\n]*$/); # QT_MODULE macro
$parsable .= " " . $line;
- }
+ }
}
close(F);
}
@@ -259,7 +259,7 @@ sub classNames {
$i = $i2 if($end eq ";");
$last_definition = $i + 1;
last BLOCK;
- }
+ }
}
}
}
@@ -267,42 +267,42 @@ sub classNames {
} elsif($character eq ";") {
$definition = substr($parsable, $last_definition, $i - $last_definition + 1);
$last_definition = $i + 1;
- } elsif($character eq "}") {
- # a naked } must be a namespace ending
- # if it's not a namespace, it's eaten by the loop above
- pop @namespaces;
- $last_definition = $i + 1;
- }
+ } elsif($character eq "}") {
+ # a naked } must be a namespace ending
+ # if it's not a namespace, it's eaten by the loop above
+ pop @namespaces;
+ $last_definition = $i + 1;
+ }
- if (substr($parsable, $last_definition, $i - $last_definition + 1) =~ m/ namespace ([^ ]*) /
- && substr($parsable, $i+1, 1) eq "{") {
- push @namespaces, $1;
+ if (substr($parsable, $last_definition, $i - $last_definition + 1) =~ m/ namespace ([^ ]*) /
+ && substr($parsable, $i+1, 1) eq "{") {
+ push @namespaces, $1;
- # Eat the opening { so that the condensing loop above doesn't see it
- $i++;
- $last_definition = $i + 1;
- }
+ # Eat the opening { so that the condensing loop above doesn't see it
+ $i++;
+ $last_definition = $i + 1;
+ }
if($definition) {
- $definition =~ s=[\n\r]==g;
+ $definition =~ s=[\n\r]==g;
my @symbols;
if($definition =~ m/^ *typedef *.*\(\*([^\)]*)\)\(.*\);$/) {
- push @symbols, $1;
+ push @symbols, $1;
} elsif($definition =~ m/^ *typedef +(.*) +([^ ]*);$/) {
- push @symbols, $2;
+ push @symbols, $2;
} elsif($definition =~ m/^ *(template *<.*> *)?(class|struct) +([^ ]* +)?([^<\s]+) ?(<[^>]*> ?)?\s*((,|:)\s*(public|protected|private) *.*)? *\{\}$/) {
- push @symbols, $4;
+ push @symbols, $4;
} elsif($definition =~ m/^ *Q_DECLARE_.*ITERATOR\((.*)\);$/) {
- push @symbols, "Q" . $1 . "Iterator";
- push @symbols, "QMutable" . $1 . "Iterator";
- }
+ push @symbols, "Q" . $1 . "Iterator";
+ push @symbols, "QMutable" . $1 . "Iterator";
+ }
- foreach (@symbols) {
- my $symbol = $_;
- $symbol = (join("::", @namespaces) . "::" . $symbol) if (scalar @namespaces);
- push @ret, $symbol
- if ($symbol =~ /^Q[^:]*$/ # no-namespace, starting with Q
- || $symbol =~ /^Phonon::/); # or in the Phonon namespace
+ foreach (@symbols) {
+ my $symbol = $_;
+ $symbol = (join("::", @namespaces) . "::" . $symbol) if (scalar @namespaces);
+ push @ret, $symbol
+ if ($symbol =~ /^Q[^:]*$/ # no-namespace, starting with Q
+ || $symbol =~ /^Phonon::/); # or in the Phonon namespace
}
}
}
@@ -453,37 +453,37 @@ sub copyFile
$filecontents = <I>;
close I;
if ( open(I, "< " . $ifile) ) {
- local $/;
- binmode I;
- $ifilecontents = <I>;
- close I;
- $copy = fileCompare($file, $ifile);
- $knowdiff = 0,
+ local $/;
+ binmode I;
+ $ifilecontents = <I>;
+ close I;
+ $copy = fileCompare($file, $ifile);
+ $knowdiff = 0,
} else {
- $copy = -1;
- $knowdiff = 1;
+ $copy = -1;
+ $knowdiff = 1;
}
if ( $knowdiff || ($filecontents ne $ifilecontents) ) {
- if ( $copy > 0 ) {
- my $file_dir = dirname($file);
- mkpath $file_dir, !$quiet unless(-e "$file_dir");
- open(O, "> " . $file) || die "Could not open $file for writing (no write permission?)";
- local $/;
- binmode O;
- print O $ifilecontents;
- close O;
- return 1;
- } elsif ( $copy < 0 ) {
- my $ifile_dir = dirname($ifile);
- mkpath $ifile_dir, !$quiet unless(-e "$ifile_dir");
- open(O, "> " . $ifile) || die "Could not open $ifile for writing (no write permission?)";
- local $/;
- binmode O;
- print O $filecontents;
- close O;
- return 1;
- }
+ if ( $copy > 0 ) {
+ my $file_dir = dirname($file);
+ mkpath $file_dir, !$quiet unless(-e "$file_dir");
+ open(O, "> " . $file) || die "Could not open $file for writing (no write permission?)";
+ local $/;
+ binmode O;
+ print O $ifilecontents;
+ close O;
+ return 1;
+ } elsif ( $copy < 0 ) {
+ my $ifile_dir = dirname($ifile);
+ mkpath $ifile_dir, !$quiet unless(-e "$ifile_dir");
+ open(O, "> " . $ifile) || die "Could not open $ifile for writing (no write permission?)";
+ local $/;
+ binmode O;
+ print O $filecontents;
+ close O;
+ return 1;
+ }
}
return 0;
}
@@ -568,37 +568,37 @@ while ( @ARGV ) {
#parse
my $arg = shift @ARGV;
if ("$arg" eq "-h" || "$arg" eq "-help" || "$arg" eq "?") {
- $var = "show_help";
- $val = "yes";
+ $var = "show_help";
+ $val = "yes";
} elsif("$arg" eq "-copy") {
- $var = "copy";
- $val = "yes";
+ $var = "copy";
+ $val = "yes";
} elsif("$arg" eq "-o" || "$arg" eq "-outdir") {
- $var = "output";
- $val = shift @ARGV;
+ $var = "output";
+ $val = shift @ARGV;
} elsif("$arg" eq "-showonly" || "$arg" eq "-remove-stale" || "$arg" eq "-windows" ||
- "$arg" eq "-relative" || "$arg" eq "-check-includes") {
- $var = substr($arg, 1);
- $val = "yes";
+ "$arg" eq "-relative" || "$arg" eq "-check-includes") {
+ $var = substr($arg, 1);
+ $val = "yes";
} elsif("$arg" =~ /^-no-(.*)$/) {
- $var = $1;
- $val = "no";
- #these are for commandline compat
+ $var = $1;
+ $val = "no";
+ #these are for commandline compat
} elsif("$arg" eq "-inc") {
- $var = "output";
- $val = shift @ARGV;
+ $var = "output";
+ $val = shift @ARGV;
} elsif("$arg" eq "-module") {
- $var = "module";
- $val = shift @ARGV;
+ $var = "module";
+ $val = shift @ARGV;
} elsif("$arg" eq "-separate-module") {
- $var = "separate-module";
- $val = shift @ARGV;
+ $var = "separate-module";
+ $val = shift @ARGV;
} elsif("$arg" eq "-show") {
- $var = "showonly";
- $val = "yes";
+ $var = "showonly";
+ $val = "yes";
} elsif("$arg" eq "-quiet") {
- $var = "quiet";
- $val = "yes";
+ $var = "quiet";
+ $val = "yes";
} elsif("$arg" eq "-base-dir") {
# skip, it's been dealt with at the top of the file
shift @ARGV;
@@ -607,54 +607,54 @@ while ( @ARGV ) {
#do something
if(!$var || "$var" eq "show_help") {
- print "Unknown option: $arg\n\n" if(!$var);
- showUsage();
+ print "Unknown option: $arg\n\n" if(!$var);
+ showUsage();
} elsif ("$var" eq "copy") {
- if("$val" eq "yes") {
- $copy_headers++;
- } elsif($showonly) {
- $copy_headers--;
- }
+ if("$val" eq "yes") {
+ $copy_headers++;
+ } elsif($showonly) {
+ $copy_headers--;
+ }
} elsif ("$var" eq "showonly") {
- if("$val" eq "yes") {
- $showonly++;
- } elsif($showonly) {
- $showonly--;
- }
+ if("$val" eq "yes") {
+ $showonly++;
+ } elsif($showonly) {
+ $showonly--;
+ }
} elsif ("$var" eq "quiet") {
- if("$val" eq "yes") {
- $quiet++;
- } elsif($quiet) {
- $quiet--;
- }
+ if("$val" eq "yes") {
+ $quiet++;
+ } elsif($quiet) {
+ $quiet--;
+ }
} elsif ("$var" eq "check-includes") {
- if("$val" eq "yes") {
- $check_includes++;
- } elsif($check_includes) {
- $check_includes--;
- }
+ if("$val" eq "yes") {
+ $check_includes++;
+ } elsif($check_includes) {
+ $check_includes--;
+ }
} elsif ("$var" eq "remove-stale") {
- if("$val" eq "yes") {
- $remove_stale++;
- } elsif($remove_stale) {
- $remove_stale--;
- }
+ if("$val" eq "yes") {
+ $remove_stale++;
+ } elsif($remove_stale) {
+ $remove_stale--;
+ }
} elsif ("$var" eq "windows") {
- if("$val" eq "yes") {
- $force_win++;
- } elsif($force_win) {
- $force_win--;
- }
+ if("$val" eq "yes") {
+ $force_win++;
+ } elsif($force_win) {
+ $force_win--;
+ }
} elsif ("$var" eq "relative") {
- if("$val" eq "yes") {
- $force_relative++;
- } elsif($force_relative) {
- $force_relative--;
- }
+ if("$val" eq "yes") {
+ $force_relative++;
+ } elsif($force_relative) {
+ $force_relative--;
+ }
} elsif ("$var" eq "module") {
- print "module :$val:\n" unless $quiet;
- die "No such module: $val" unless(defined $modules{$val});
- push @modules_to_sync, $val;
+ print "module :$val:\n" unless $quiet;
+ die "No such module: $val" unless(defined $modules{$val});
+ push @modules_to_sync, $val;
} elsif ("$var" eq "separate-module") {
my ($module, $prodir, $headerdir) = split(/:/, $val);
$modules{$module} = $prodir;
@@ -663,16 +663,16 @@ while ( @ARGV ) {
$create_uic_class_map = 0;
$create_private_headers = 0;
} elsif ("$var" eq "output") {
- my $outdir = $val;
- if(checkRelative($outdir)) {
- $out_basedir = getcwd();
- chomp $out_basedir;
- $out_basedir .= "/" . $outdir;
- } else {
- $out_basedir = $outdir;
- }
- # \ -> /
- $out_basedir =~ s=\\=/=g;
+ my $outdir = $val;
+ if(checkRelative($outdir)) {
+ $out_basedir = getcwd();
+ chomp $out_basedir;
+ $out_basedir .= "/" . $outdir;
+ } else {
+ $out_basedir = $outdir;
+ }
+ # \ -> /
+ $out_basedir =~ s=\\=/=g;
}
}
@modules_to_sync = keys(%modules) if($#modules_to_sync == -1);
@@ -681,6 +681,7 @@ $isunix = checkUnix; #cache checkUnix
# create path
mkpath "$out_basedir/include", !$quiet;
+mkpath "$out_basedir/include/Qt", !$quiet;
my @ignore_headers = ();
my $class_lib_map_contents = "";
@@ -689,6 +690,7 @@ my @ignore_for_include_check = ( "qatomic.h" );
my @ignore_for_qt_begin_header_check = ( "qiconset.h", "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qt_windows.h" );
my @ignore_for_qt_begin_namespace_check = ( "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qatomic_arch.h", "qatomic_windowsce.h", "qt_windows.h", "qatomic_macosx.h" );
my @ignore_for_qt_module_check = ( "$modules{QtCore}/arch", "$modules{QtCore}/global", "$modules{QtSql}/drivers", "$modules{QtTest}", "$modules{QtDesigner}", "$modules{QtUiTools}", "$modules{QtDBus}", "$modules{phonon}" );
+my %colliding_headers = ();
foreach (@modules_to_sync) {
#iteration info
@@ -708,77 +710,77 @@ foreach (@modules_to_sync) {
#get dependencies
if(-e "$dir/" . basename($dir) . ".pro") {
- if(open(F, "<$dir/" . basename($dir) . ".pro")) {
- while(<F>) {
- my $line = $_;
- chomp $line;
- if($line =~ /^ *QT *\+?= *([^\r\n]*)/) {
- foreach(split(/ /, "$1")) {
- $master_contents .= "#include <QtCore/QtCore>\n" if("$_" eq "core");
- $master_contents .= "#include <QtGui/QtGui>\n" if("$_" eq "gui");
- $master_contents .= "#include <QtNetwork/QtNetwork>\n" if("$_" eq "network");
- $master_contents .= "#include <QtSvg/QtSvg>\n" if("$_" eq "svg");
- $master_contents .= "#include <QtDeclarative/QtDeclarative>\n" if("$_" eq "declarative");
- $master_contents .= "#include <QtScript/QtScript>\n" if("$_" eq "script");
- $master_contents .= "#include <QtScriptTools/QtScriptTools>\n" if("$_" eq "scripttools");
- $master_contents .= "#include <Qt3Support/Qt3Support>\n" if("$_" eq "qt3support");
- $master_contents .= "#include <QtSql/QtSql>\n" if("$_" eq "sql");
- $master_contents .= "#include <QtXml/QtXml>\n" if("$_" eq "xml");
- $master_contents .= "#include <QtXmlPatterns/QtXmlPatterns>\n" if("$_" eq "xmlpatterns");
- $master_contents .= "#include <QtOpenGL/QtOpenGL>\n" if("$_" eq "opengl");
- $master_contents .= "#include <QtOpenVG/QtOpenVG>\n" if("$_" eq "openvg");
- }
- }
- }
- close(F);
- }
+ if(open(F, "<$dir/" . basename($dir) . ".pro")) {
+ while(<F>) {
+ my $line = $_;
+ chomp $line;
+ if($line =~ /^ *QT *\+?= *([^\r\n]*)/) {
+ foreach(split(/ /, "$1")) {
+ $master_contents .= "#include <QtCore/QtCore>\n" if("$_" eq "core");
+ $master_contents .= "#include <QtGui/QtGui>\n" if("$_" eq "gui");
+ $master_contents .= "#include <QtNetwork/QtNetwork>\n" if("$_" eq "network");
+ $master_contents .= "#include <QtSvg/QtSvg>\n" if("$_" eq "svg");
+ $master_contents .= "#include <QtDeclarative/QtDeclarative>\n" if("$_" eq "declarative");
+ $master_contents .= "#include <QtScript/QtScript>\n" if("$_" eq "script");
+ $master_contents .= "#include <QtScriptTools/QtScriptTools>\n" if("$_" eq "scripttools");
+ $master_contents .= "#include <Qt3Support/Qt3Support>\n" if("$_" eq "qt3support");
+ $master_contents .= "#include <QtSql/QtSql>\n" if("$_" eq "sql");
+ $master_contents .= "#include <QtXml/QtXml>\n" if("$_" eq "xml");
+ $master_contents .= "#include <QtXmlPatterns/QtXmlPatterns>\n" if("$_" eq "xmlpatterns");
+ $master_contents .= "#include <QtOpenGL/QtOpenGL>\n" if("$_" eq "opengl");
+ $master_contents .= "#include <QtOpenVG/QtOpenVG>\n" if("$_" eq "openvg");
+ }
+ }
+ }
+ close(F);
+ }
}
#remove the old files
if($remove_stale) {
- my @subdirs = ("$out_basedir/include/$lib");
- foreach (@subdirs) {
- my $subdir = "$_";
- if (opendir DIR, "$subdir") {
- while(my $t = readdir(DIR)) {
- my $file = "$subdir/$t";
- if(-d "$file") {
- push @subdirs, "$file" unless($t eq "." || $t eq "..");
- } else {
- my @files = ("$file");
- #push @files, "$out_basedir/include/Qt/$t" if(-e "$out_basedir/include/Qt/$t");
- foreach (@files) {
- my $file = $_;
- my $remove_file = 0;
- if(open(F, "<$file")) {
- while(<F>) {
- my $line = $_;
- chomp $line;
- if($line =~ /^\#include \"([^\"]*)\"$/) {
- my $include = $1;
- $include = $subdir . "/" . $include unless(substr($include, 0, 1) eq "/");
- $remove_file = 1 unless(-e "$include");
- } else {
- $remove_file = 0;
- last;
- }
- }
- close(F);
- unlink "$file" if($remove_file);
- }
- }
- }
- }
- closedir DIR;
+ my @subdirs = ("$out_basedir/include/$lib");
+ foreach (@subdirs) {
+ my $subdir = "$_";
+ if (opendir DIR, "$subdir") {
+ while(my $t = readdir(DIR)) {
+ my $file = "$subdir/$t";
+ if(-d "$file") {
+ push @subdirs, "$file" unless($t eq "." || $t eq "..");
+ } else {
+ my @files = ("$file");
+ #push @files, "$out_basedir/include/Qt/$t" if(-e "$out_basedir/include/Qt/$t");
+ foreach (@files) {
+ my $file = $_;
+ my $remove_file = 0;
+ if(open(F, "<$file")) {
+ while(<F>) {
+ my $line = $_;
+ chomp $line;
+ if($line =~ /^\#include \"([^\"]*)\"$/) {
+ my $include = $1;
+ $include = $subdir . "/" . $include unless(substr($include, 0, 1) eq "/");
+ $remove_file = 1 unless(-e "$include");
+ } else {
+ $remove_file = 0;
+ last;
+ }
+ }
+ close(F);
+ unlink "$file" if($remove_file);
+ }
+ }
+ }
+ }
+ closedir DIR;
}
- }
+ }
}
#create the new ones
foreach (split(/;/, $dir)) {
- my $current_dir = "$_";
- my $headers_dir = $current_dir;
+ my $current_dir = "$_";
+ my $headers_dir = $current_dir;
$headers_dir .= "/$pathtoheaders" if ($pathtoheaders);
#calc subdirs
my @subdirs = ($headers_dir);
@@ -787,7 +789,7 @@ foreach (@modules_to_sync) {
opendir DIR, "$subdir" or next;
while(my $t = readdir(DIR)) {
push @subdirs, "$subdir/$t" if(-d "$subdir/$t" && !($t eq ".") &&
- !($t eq "..") && !($t eq ".obj") &&
+ !($t eq "..") && !($t eq ".obj") &&
!($t eq ".moc") && !($t eq ".rcc") &&
!($t eq ".uic") && !($t eq "build"));
}
@@ -805,85 +807,105 @@ foreach (@modules_to_sync) {
$header = 0 if("$header" eq "$_");
}
if($header) {
- my $header_copies = 0;
- #figure out if it is a public header
- my $public_header = $header;
- if($public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) {
- $public_header = 0;
- } else {
- foreach (@ignore_for_master_contents) {
- $public_header = 0 if("$header" eq "$_");
- }
- }
+ my $header_copies = 0;
+ #figure out if it is a public header
+ my $public_header = $header;
+ if($public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) {
+ $public_header = 0;
+ } else {
+ foreach (@ignore_for_master_contents) {
+ $public_header = 0 if("$header" eq "$_");
+ }
+ }
my $iheader = $subdir . "/" . $header;
- my @classes = $public_header ? classNames($iheader) : ();
+ my @classes = $public_header ? classNames($iheader) : ();
if($showonly) {
print "$header [$lib]\n";
- foreach(@classes) {
- print "SYMBOL: $_\n";
- }
+ foreach(@classes) {
+ print "SYMBOL: $_\n";
+ }
} else {
- #find out all the places it goes..
- my @headers;
- if ($public_header) {
- @headers = ( "$out_basedir/include/$lib/$header" );
- push @headers, "$out_basedir/include/Qt/$header"
- if ("$lib" ne "phonon" && "$subdir" =~ /^$basedir\/src/);
+ #find out all the places it goes..
+ my @headers;
+ if ($public_header) {
+ @headers = ( "$out_basedir/include/$lib/$header" );
+
+ # write forwarding headers to include/Qt
+ if ("$lib" ne "phonon" && "$subdir" =~ /^$basedir\/src/) {
+ my $file_name = "$out_basedir/include/Qt/$header";
+ my $header_content = '';
+ if (exists $colliding_headers{$file_name}) {
+ $file_name = ">>$file_name";
+ } else {
+ $colliding_headers{$file_name} = 1;
+ $file_name = ">$file_name";
+ my $warning_msg = 'Inclusion of header files from include/Qt is deprecated.';
+ $header_content = "#ifndef QT_NO_QT_INCLUDE_WARN\n" .
+ " #if defined(__GNUC__)\n" .
+ " #pragma warning \"$warning_msg\"\n" .
+ " #elif defined(_MSC_VER)\n" .
+ " #pragma message \"WARNING: $warning_msg\"\n" .
+ " #endif\n".
+ "#endif\n\n";
+ }
+ $header_content .= '#include "' . "../$lib/$header" . "\"\n";
+ open HEADERFILE, $file_name;
+ print HEADERFILE $header_content;
+ close HEADERFILE;
+ }
- foreach(@classes) {
- my $header_base = basename($header);
- my $class = $_;
- # Strip namespaces:
- $class =~ s/^.*:://;
-# if ($class =~ m/::/) {
-# class =~ s,::,/,g;
-# }
- $class_lib_map_contents .= "QT_CLASS_LIB($_, $lib, $header_base)\n";
- $header_copies++ if(syncHeader("$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0));
+ foreach(@classes) {
+ my $header_base = basename($header);
+ my $class = $_;
+ # Strip namespaces:
+ $class =~ s/^.*:://;
+# if ($class =~ m/::/) {
+# class =~ s,::,/,g;
+# }
+ $class_lib_map_contents .= "QT_CLASS_LIB($_, $lib, $header_base)\n";
+ $header_copies++ if(syncHeader("$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0));
- # KDE-Compat headers for Phonon
- if ($lib eq "phonon") {
- $header_copies++ if (syncHeader("$out_basedir/include/phonon_compat/Phonon/$class", "$out_basedir/include/$lib/$header", 0));
- }
- }
- } elsif ($create_private_headers) {
- @headers = ( "$out_basedir/include/$lib/private/$header" );
- push @headers, "$out_basedir/include/Qt/private/$header"
- if ("$lib" ne "phonon");
- }
- foreach(@headers) { #sync them
- $header_copies++ if(syncHeader($_, $iheader, $copy_headers));
- }
+ # KDE-Compat headers for Phonon
+ if ($lib eq "phonon") {
+ $header_copies++ if (syncHeader("$out_basedir/include/phonon_compat/Phonon/$class", "$out_basedir/include/$lib/$header", 0));
+ }
+ }
+ } elsif ($create_private_headers) {
+ @headers = ( "$out_basedir/include/$lib/private/$header" );
+ }
+ foreach(@headers) { #sync them
+ $header_copies++ if(syncHeader($_, $iheader, $copy_headers));
+ }
- if($public_header) {
- #put it into the master file
- $master_contents .= "#include \"$public_header\"\n" if(shouldMasterInclude($iheader));
+ if($public_header) {
+ #put it into the master file
+ $master_contents .= "#include \"$public_header\"\n" if(shouldMasterInclude($iheader));
- #deal with the install directives
- if($public_header) {
- my $pri_install_iheader = fixPaths($iheader, $current_dir);
- foreach(@classes) {
- my $class = $_;
- # Strip namespaces:
- $class =~ s/^.*:://;
-# if ($class =~ m/::/) {
-# $class =~ s,::,/,g;
-# }
- my $class_header = fixPaths("$out_basedir/include/$lib/$class",
- $current_dir) . " ";
- $pri_install_classes .= $class_header
- unless($pri_install_classes =~ $class_header);
- }
- $pri_install_files.= "$pri_install_iheader ";;
- }
- }
- else {
- my $pri_install_iheader = fixPaths($iheader, $current_dir);
- $pri_install_pfiles.= "$pri_install_iheader ";;
- }
+ #deal with the install directives
+ if($public_header) {
+ my $pri_install_iheader = fixPaths($iheader, $current_dir);
+ foreach(@classes) {
+ my $class = $_;
+ # Strip namespaces:
+ $class =~ s/^.*:://;
+# if ($class =~ m/::/) {
+# $class =~ s,::,/,g;
+# }
+ my $class_header = fixPaths("$out_basedir/include/$lib/$class",
+ $current_dir) . " ";
+ $pri_install_classes .= $class_header
+ unless($pri_install_classes =~ $class_header);
+ }
+ $pri_install_files.= "$pri_install_iheader ";;
+ }
+ }
+ else {
+ my $pri_install_iheader = fixPaths($iheader, $current_dir);
+ $pri_install_pfiles.= "$pri_install_iheader ";;
+ }
}
- print "header created for $iheader ($header_copies)\n" if($header_copies > 0 && !$quiet);
+ print "header created for $iheader ($header_copies)\n" if($header_copies > 0 && !$quiet);
}
}
}
@@ -894,8 +916,8 @@ foreach (@modules_to_sync) {
unless($showonly) {
my @master_includes;
- push @master_includes, "$out_basedir/include/$lib/$lib";
- push @master_includes, "$out_basedir/include/phonon_compat/Phonon/Phonon" if ($lib eq "phonon");
+ push @master_includes, "$out_basedir/include/$lib/$lib";
+ push @master_includes, "$out_basedir/include/phonon_compat/Phonon/Phonon" if ($lib eq "phonon");
foreach my $master_include (@master_includes) {
#generate the "master" include file
my @tmp = split(/;/,$modules{$lib});
@@ -920,10 +942,10 @@ foreach (@modules_to_sync) {
}
#handle the headers.pri for each module
- my $headers_pri_contents = "";
- $headers_pri_contents .= "SYNCQT.HEADER_FILES = $pri_install_files\n";
- $headers_pri_contents .= "SYNCQT.HEADER_CLASSES = $pri_install_classes\n";
- $headers_pri_contents .= "SYNCQT.PRIVATE_HEADER_FILES = $pri_install_pfiles\n";
+ my $headers_pri_contents = "";
+ $headers_pri_contents .= "SYNCQT.HEADER_FILES = $pri_install_files\n";
+ $headers_pri_contents .= "SYNCQT.HEADER_CLASSES = $pri_install_classes\n";
+ $headers_pri_contents .= "SYNCQT.PRIVATE_HEADER_FILES = $pri_install_pfiles\n";
my $headers_pri_file = "$out_basedir/include/$lib/headers.pri";
if(-e "$headers_pri_file") {
open HEADERS_PRI_FILE, "<$headers_pri_file";
@@ -947,125 +969,125 @@ foreach (@modules_to_sync) {
unless($showonly || !$create_uic_class_map) {
my $class_lib_map = "$out_basedir/src/tools/uic/qclass_lib_map.h";
if(-e "$class_lib_map") {
- open CLASS_LIB_MAP, "<$class_lib_map";
- local $/;
- binmode CLASS_LIB_MAP;
- my $old_class_lib_map_contents = <CLASS_LIB_MAP>;
- close CLASS_LIB_MAP;
- $old_class_lib_map_contents =~ s/\r//g; # remove \r's , so comparison is ok on all platforms
- $class_lib_map = 0 if($old_class_lib_map_contents eq $class_lib_map_contents);
+ open CLASS_LIB_MAP, "<$class_lib_map";
+ local $/;
+ binmode CLASS_LIB_MAP;
+ my $old_class_lib_map_contents = <CLASS_LIB_MAP>;
+ close CLASS_LIB_MAP;
+ $old_class_lib_map_contents =~ s/\r//g; # remove \r's , so comparison is ok on all platforms
+ $class_lib_map = 0 if($old_class_lib_map_contents eq $class_lib_map_contents);
}
if($class_lib_map) {
- my $class_lib_map_dir = dirname($class_lib_map);
- mkpath $class_lib_map_dir, !$quiet;
- open CLASS_LIB_MAP, ">$class_lib_map";
- print CLASS_LIB_MAP "$class_lib_map_contents";
- close CLASS_LIB_MAP;
+ my $class_lib_map_dir = dirname($class_lib_map);
+ mkpath $class_lib_map_dir, !$quiet;
+ open CLASS_LIB_MAP, ">$class_lib_map";
+ print CLASS_LIB_MAP "$class_lib_map_contents";
+ close CLASS_LIB_MAP;
}
}
if($check_includes) {
for (keys(%modules)) {
- #iteration info
- my $lib = $_;
- my $dir = "$modules{$lib}";
- foreach (split(/;/, $dir)) {
- my $current_dir = "$_";
- #calc subdirs
- my @subdirs = ($current_dir);
- foreach (@subdirs) {
- my $subdir = "$_";
- opendir DIR, "$subdir";
- while(my $t = readdir(DIR)) {
+ #iteration info
+ my $lib = $_;
+ my $dir = "$modules{$lib}";
+ foreach (split(/;/, $dir)) {
+ my $current_dir = "$_";
+ #calc subdirs
+ my @subdirs = ($current_dir);
+ foreach (@subdirs) {
+ my $subdir = "$_";
+ opendir DIR, "$subdir";
+ while(my $t = readdir(DIR)) {
push @subdirs, "$subdir/$t" if(-d "$subdir/$t" && !($t eq ".") &&
!($t eq "..") && !($t eq ".obj") &&
!($t eq ".moc") && !($t eq ".rcc") &&
!($t eq ".uic") && !($t eq "build"));
- }
- closedir DIR;
- }
+ }
+ closedir DIR;
+ }
- foreach (@subdirs) {
- my $subdir = "$_";
+ foreach (@subdirs) {
+ my $subdir = "$_";
my $header_skip_qt_module_test = 0;
foreach(@ignore_for_qt_module_check) {
foreach (split(/;/, $_)) {
$header_skip_qt_module_test = 1 if ("$subdir" =~ /^$_/);
}
}
- my @headers = findFiles("$subdir", "^[-a-z0-9_]*\\.h\$" , 0);
- foreach (@headers) {
- my $header = "$_";
+ my @headers = findFiles("$subdir", "^[-a-z0-9_]*\\.h\$" , 0);
+ foreach (@headers) {
+ my $header = "$_";
my $header_skip_qt_begin_header_test = 0;
my $header_skip_qt_begin_namespace_test = 0;
- $header = 0 if("$header" =~ /^ui_.*.h/);
- foreach (@ignore_headers) {
- $header = 0 if("$header" eq "$_");
- }
- if($header) {
- my $public_header = $header;
- if($public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) {
- $public_header = 0;
- } else {
- foreach (@ignore_for_master_contents) {
- $public_header = 0 if("$header" eq "$_");
- }
- if($public_header) {
- foreach (@ignore_for_include_check) {
- $public_header = 0 if("$header" eq "$_");
- }
+ $header = 0 if("$header" =~ /^ui_.*.h/);
+ foreach (@ignore_headers) {
+ $header = 0 if("$header" eq "$_");
+ }
+ if($header) {
+ my $public_header = $header;
+ if($public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) {
+ $public_header = 0;
+ } else {
+ foreach (@ignore_for_master_contents) {
+ $public_header = 0 if("$header" eq "$_");
+ }
+ if($public_header) {
+ foreach (@ignore_for_include_check) {
+ $public_header = 0 if("$header" eq "$_");
+ }
foreach(@ignore_for_qt_begin_header_check) {
$header_skip_qt_begin_header_test = 1 if ("$header" eq "$_");
}
foreach(@ignore_for_qt_begin_namespace_check) {
$header_skip_qt_begin_namespace_test = 1 if ("$header" eq "$_");
}
- }
- }
+ }
+ }
- my $iheader = $subdir . "/" . $header;
- if($public_header) {
- if(open(F, "<$iheader")) {
+ my $iheader = $subdir . "/" . $header;
+ if($public_header) {
+ if(open(F, "<$iheader")) {
my $qt_module_found = 0;
- my $qt_begin_header_found = 0;
- my $qt_end_header_found = 0;
- my $qt_begin_namespace_found = 0;
- my $qt_end_namespace_found = 0;
- my $line;
- while($line = <F>) {
- chomp $line;
- my $output_line = 1;
+ my $qt_begin_header_found = 0;
+ my $qt_end_header_found = 0;
+ my $qt_begin_namespace_found = 0;
+ my $qt_end_namespace_found = 0;
+ my $line;
+ while($line = <F>) {
+ chomp $line;
+ my $output_line = 1;
if($line =~ /^ *\# *pragma (qt_no_included_check|qt_sync_stop_processing)/) {
- last;
- } elsif($line =~ /^ *\# *include/) {
- my $include = $line;
- if($line =~ /<.*>/) {
- $include =~ s,.*<(.*)>.*,$1,;
- } elsif($line =~ /".*"/) {
- $include =~ s,.*"(.*)".*,$1,;
- } else {
- $include = 0;
- }
- if($include) {
- for (keys(%modules)) {
- my $trylib = $_;
- if(-e "$out_basedir/include/$trylib/$include") {
- print "WARNING: $iheader includes $include when it should include $trylib/$include\n";
- }
- }
- }
- } elsif ($header_skip_qt_begin_header_test == 0 and $line =~ /^QT_BEGIN_HEADER\s*$/) {
- $qt_begin_header_found = 1;
- } elsif ($header_skip_qt_begin_header_test == 0 and $line =~ /^QT_END_HEADER\s*$/) {
- $qt_end_header_found = 1;
- } elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_BEGIN_NAMESPACE\s*$/) {
- $qt_begin_namespace_found = 1;
- } elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_END_NAMESPACE\s*$/) {
- $qt_end_namespace_found = 1;
+ last;
+ } elsif($line =~ /^ *\# *include/) {
+ my $include = $line;
+ if($line =~ /<.*>/) {
+ $include =~ s,.*<(.*)>.*,$1,;
+ } elsif($line =~ /".*"/) {
+ $include =~ s,.*"(.*)".*,$1,;
+ } else {
+ $include = 0;
+ }
+ if($include) {
+ for (keys(%modules)) {
+ my $trylib = $_;
+ if(-e "$out_basedir/include/$trylib/$include") {
+ print "WARNING: $iheader includes $include when it should include $trylib/$include\n";
+ }
+ }
+ }
+ } elsif ($header_skip_qt_begin_header_test == 0 and $line =~ /^QT_BEGIN_HEADER\s*$/) {
+ $qt_begin_header_found = 1;
+ } elsif ($header_skip_qt_begin_header_test == 0 and $line =~ /^QT_END_HEADER\s*$/) {
+ $qt_end_header_found = 1;
+ } elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_BEGIN_NAMESPACE\s*$/) {
+ $qt_begin_namespace_found = 1;
+ } elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_END_NAMESPACE\s*$/) {
+ $qt_end_namespace_found = 1;
} elsif ($header_skip_qt_module_test == 0 and $line =~ /^QT_MODULE\(.*\)\s*$/) {
$qt_module_found = 1;
}
- }
+ }
if ($header_skip_qt_begin_header_test == 0) {
if ($qt_begin_header_found == 0) {
print "WARNING: $iheader does not include QT_BEGIN_HEADER\n";
@@ -1091,13 +1113,13 @@ if($check_includes) {
print "WARNING: $iheader does not include QT_MODULE\n";
}
}
- close(F);
- }
- }
- }
- }
- }
- }
+ close(F);
+ }
+ }
+ }
+ }
+ }
+ }
}
}
diff --git a/config.tests/unix/compile.test b/config.tests/unix/compile.test
index 67a4636..99ebfd2 100755
--- a/config.tests/unix/compile.test
+++ b/config.tests/unix/compile.test
@@ -65,8 +65,10 @@ test -d "$OUTDIR/$TEST" || mkdir -p "$OUTDIR/$TEST"
cd "$OUTDIR/$TEST"
test -r Makefile && $MAKE distclean >/dev/null 2>&1
+# Make sure output from possible previous tests is gone
+rm -f "$EXE" "${EXE}.exe"
-"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
+"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
if [ "$VERBOSE" = "yes" ]; then
$MAKE
@@ -74,7 +76,7 @@ else
$MAKE >/dev/null 2>&1
fi
-[ -x "$EXE" ] && SUCCESS=yes
+( [ -x "$EXE" ] || [ -x "${EXE}.exe" ] ) && SUCCESS=yes
# done
if [ "$SUCCESS" != "yes" ]; then
diff --git a/config.tests/unix/getaddrinfo/getaddrinfotest.cpp b/config.tests/unix/getaddrinfo/getaddrinfotest.cpp
index 0c482cc..df6ae10 100644
--- a/config.tests/unix/getaddrinfo/getaddrinfotest.cpp
+++ b/config.tests/unix/getaddrinfo/getaddrinfotest.cpp
@@ -42,9 +42,16 @@
/* Sample program for configure to test for getaddrinfo on the unix
platform. we check for all structures and functions required. */
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef __MINGW32__
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#else
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
+#endif
int main()
{
diff --git a/config.tests/unix/iconv/iconv.pro b/config.tests/unix/iconv/iconv.pro
index 8cdc776..d642da2 100644
--- a/config.tests/unix/iconv/iconv.pro
+++ b/config.tests/unix/iconv/iconv.pro
@@ -1,3 +1,3 @@
SOURCES = iconv.cpp
CONFIG -= qt dylib app_bundle
-mac:LIBS += -liconv
+mac|win32-g++*:LIBS += -liconv
diff --git a/config.tests/unix/ipv6/ipv6test.cpp b/config.tests/unix/ipv6/ipv6test.cpp
index 4fb27f2..4243f2d 100644
--- a/config.tests/unix/ipv6/ipv6test.cpp
+++ b/config.tests/unix/ipv6/ipv6test.cpp
@@ -46,9 +46,14 @@ platforms. We check for the required IPv6 data structures. */
#define _HPUX_SOURCE
#endif
+#ifdef __MINGW32__
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#else
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
+#endif
int main()
{
diff --git a/config.tests/unix/odbc/odbc.cpp b/config.tests/unix/odbc/odbc.cpp
index 32602c0..98f3571 100644
--- a/config.tests/unix/odbc/odbc.cpp
+++ b/config.tests/unix/odbc/odbc.cpp
@@ -39,6 +39,9 @@
**
****************************************************************************/
+#ifdef __MINGW32__
+#include <windows.h>
+#endif
#include <sql.h>
#include <sqlext.h>
diff --git a/config.tests/unix/odbc/odbc.pro b/config.tests/unix/odbc/odbc.pro
index c588ede..06a548f 100644
--- a/config.tests/unix/odbc/odbc.pro
+++ b/config.tests/unix/odbc/odbc.pro
@@ -1,4 +1,5 @@
SOURCES = odbc.cpp
CONFIG -= qt dylib
mac:CONFIG -= app_bundle
-LIBS += -lodbc
+win32-g++*:LIBS += -lodbc32
+else:LIBS += -lodbc
diff --git a/config.tests/unix/psql/psql.pro b/config.tests/unix/psql/psql.pro
index 64bb3d6..38bfb3e 100644
--- a/config.tests/unix/psql/psql.pro
+++ b/config.tests/unix/psql/psql.pro
@@ -1,4 +1,4 @@
SOURCES = psql.cpp
CONFIG -= qt dylib
mac:CONFIG -= app_bundle
-LIBS += -lpq
+LIBS *= -lpq
diff --git a/config.tests/x11/opengl/opengl.pro b/config.tests/x11/opengl/opengl.pro
index 432bd8d..5fd41d3 100644
--- a/config.tests/x11/opengl/opengl.pro
+++ b/config.tests/x11/opengl/opengl.pro
@@ -7,4 +7,5 @@ for(p, QMAKE_LIBDIR_OPENGL) {
}
CONFIG -= qt
-LIBS += -lGL -lGLU
+win32-g++*:LIBS += -lopengl32
+else:LIBS += -lGL -lGLU
diff --git a/configure b/configure
index 89cd97d..f61ac6c 100755
--- a/configure
+++ b/configure
@@ -779,6 +779,7 @@ RPATH_FLAGS=
l_FLAGS=
QCONFIG_FLAGS=
XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" or "symbian/linux-gcce"
+XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
PLATFORM=$QMAKESPEC
QT_CROSS_COMPILE=no
OPT_CONFIRM_LICENSE=no
@@ -1326,7 +1327,9 @@ while [ "$#" -gt 0 ]; do
fi
;;
arch)
- if [ "$PLATFORM_MAC" = "yes" ]; then
+ # if this is a Mac then "windows" probably means
+ # we are cross-compiling for MinGW
+ if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
else
CFG_ARCH=$VAL
@@ -1444,6 +1447,7 @@ while [ "$#" -gt 0 ]; do
;;
xplatform)
XPLATFORM="$VAL"
+ case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
;;
debug-and-release)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
@@ -2578,9 +2582,13 @@ if [ -z "$PLATFORM" ]; then
"
;;
SunOS:5*)
- #PLATFORM=solaris-g++
- PLATFORM=solaris-cc
- #PLATFORM=solaris-cc64
+ if [ "$XPLATFORM_MINGW" = "yes" ]; then
+ PLATFORM="solaris-g++"
+ else
+ #PLATFORM=solaris-g++
+ PLATFORM=solaris-cc
+ #PLATFORM=solaris-cc64
+ fi
PLATFORM_NOTES="
- Also available for Solaris: solaris-g++ solaris-cc-64
"
@@ -2650,6 +2658,9 @@ else
fi
[ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
+
+case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
+
if [ -d "$PLATFORM" ]; then
QMAKESPEC="$PLATFORM"
else
@@ -2922,6 +2933,8 @@ if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
CFG_ARCH="$CFG_EMBEDDED"
;;
esac
+elif [ "$XPLATFORM_MINGW" = "yes" ]; then
+ [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
CFG_ARCH=$CFG_HOST_ARCH
fi
@@ -4087,6 +4100,8 @@ elif [ "$PLATFORM_MAC" = "yes" ]; then
Platform="Qt for Mac OS X"
elif echo "$XPLATFORM" | grep "symbian" > /dev/null ; then
Platform="Qt for Symbian"
+elif [ "$XPLATFORM_MINGW" = "yes" ]; then
+ Platform="Qt for Windows"
elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
PLATFORM_X11=yes
Platform="Qt for Linux/X11"
@@ -4668,7 +4683,7 @@ if [ "$CFG_IWMMXT" = "yes" ]; then
fi
# detect neon support
-if ([ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]) && [ "${CFG_NEON}" = "auto" ]; then
+if ( [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ] ) && [ "${CFG_NEON}" = "auto" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/neon "neon" $L_FLAGS $I_FLAGS $l_FLAGS "-mfpu=neon"; then
CFG_NEON=yes
else
@@ -4698,6 +4713,8 @@ if [ "$CFG_ZLIB" = "auto" ]; then
fi
fi
+[ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
+
case "$XPLATFORM" in *symbian*)
QMakeVar set styles "windows s60" #overwrite previous default
CFG_LIBFREETYPE=no
@@ -4897,12 +4914,15 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do
;;
psql)
if [ "$CFG_SQL_psql" != "no" ]; then
- if "$WHICH" pg_config >/dev/null 2>&1; then
+ # Be careful not to use native pg_config when cross building.
+ if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
fi
[ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
[ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
+ # But, respect PSQL_LIBS if set
+ [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/psql "PostgreSQL" $QT_LFLAGS_PSQL $L_FLAGS $QT_CFLAGS_PSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
if [ "$CFG_SQL_psql" = "auto" ]; then
CFG_SQL_psql=plugin
@@ -4924,7 +4944,7 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do
;;
odbc)
if [ "$CFG_SQL_odbc" != "no" ]; then
- if [ "$PLATFORM_MAC" != "yes" ] && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/odbc "ODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
+ if ( [ "$PLATFORM_MAC" != "yes" ] || [ "$XPLATFORM_MINGW" = "yes" ] ) && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/odbc "ODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
if [ "$CFG_SQL_odbc" = "auto" ]; then
CFG_SQL_odbc=plugin
fi
@@ -5190,6 +5210,7 @@ if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
QT_NAMESPACE_MAC_CRC=`"$mactests/crc.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/crc $QT_NAMESPACE $L_FLAGS $I_FLAGS $l_FLAGS`
fi
+# X11/QWS
if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
# auto-detect Glib support
@@ -5354,7 +5375,7 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
fi
fi # X11/QWS
-# x11
+# X11
if [ "$PLATFORM_X11" = "yes" ]; then
x11tests="$relpath/config.tests/x11"
X11TESTS_FLAGS=
@@ -5375,7 +5396,10 @@ if [ "$PLATFORM_X11" = "yes" ]; then
echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
exit 1
fi
+fi
+# X11/MINGW OpenGL
+if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
# auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es2 = OpenGL ES 2.x)
if [ "$CFG_GUI" = "no" ]; then
if [ "$CFG_OPENGL" = "auto" ]; then
@@ -5471,7 +5495,10 @@ if [ "$PLATFORM_X11" = "yes" ]; then
echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
CFG_GRAPHICS_SYSTEM=default
fi
+fi # X11/MINGW OpenGL
+# X11
+if [ "$PLATFORM_X11" = "yes" ]; then
# auto-detect Xcursor support
if [ "$CFG_XCURSOR" != "no" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xcursor "Xcursor" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
@@ -5834,14 +5861,12 @@ if [ "$PLATFORM_QWS" = "yes" ]; then
fi
if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
- if [ -n "$PKG_CONFIG" ]; then
- if $PKG_CONFIG --exists directfb 2>/dev/null; then
- QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
- QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
- elif directfb-config --version >/dev/null 2>&1; then
- QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
- QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
- fi
+ if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
+ QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
+ QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
+ elif directfb-config --version >/dev/null 2>&1; then
+ QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
+ QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
fi
# QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
@@ -5919,9 +5944,12 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
fi
fi
+[ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
+
# freetype support
[ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
[ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
+[ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
if [ "$CFG_LIBFREETYPE" = "auto" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/freetype "FreeType" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
CFG_LIBFREETYPE=system
@@ -5931,7 +5959,9 @@ if [ "$CFG_LIBFREETYPE" = "auto" ]; then
fi
if [ "$CFG_ENDIAN" = "auto" ]; then
- if [ "$PLATFORM_MAC" = "yes" ]; then
+ if [ "$XPLATFORM_MINGW" = "yes" ]; then
+ CFG_ENDIAN="Q_LITTLE_ENDIAN"
+ elif [ "$PLATFORM_MAC" = "yes" ]; then
true #leave as auto
elif [ "$XPLATFORM" = "symbian-sbsv2" ]; then
CFG_ENDIAN="Q_LITTLE_ENDIAN"
@@ -6257,6 +6287,11 @@ if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
fi
fi
+if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
+ echo "Warning: largefile support cannot be disabled for win32."
+ CFG_LARGEFILE="yes"
+fi
+
#-------------------------------------------------------------------------------
# ask for all that hasn't been auto-detected or specified in the arguments
#-------------------------------------------------------------------------------
@@ -6359,6 +6394,9 @@ if [ "$PLATFORM_MAC" = "yes" ]; then
fi
fi
+# but disable Cocoa if cross-building for mingw
+[ "$XPLATFORM_MINGW" = "yes" ] && CFG_MAC_COCOA="no"
+
# set the global Mac deployment target. This is overridden on an arch-by-arch basis
# in some cases, see code further down
case "$PLATFORM,$CFG_MAC_COCOA" in
@@ -6497,7 +6535,7 @@ QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
-if [ "$CFG_LARGEFILE" = "yes" ]; then
+if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG largefile"
fi
if [ "$CFG_STL" = "no" ]; then
@@ -6613,7 +6651,7 @@ else
fi
-if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM" != "win32-g++" ]; then
+if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
#On Mac we implicitly link against libz, so we
#never use the 3rdparty stuff.
[ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
@@ -6752,6 +6790,12 @@ if [ "$CFG_EXCEPTIONS" != "no" ]; then
QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
fi
+if [ "$XPLATFORM_MINGW" = "yes" ]; then
+ # mkspecs/features/win32/default_pre.prf sets "no-rtti".
+ # Follow default behavior of configure.exe by overriding with "rtti".
+ QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
+fi
+
if [ "$CFG_ALSA" = "yes" ]; then
QT_CONFIG="$QT_CONFIG alsa"
fi
@@ -7345,7 +7389,7 @@ EOF
echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
[ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
-if [ "$CFG_LARGEFILE" = "yes" ]; then
+if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
fi
@@ -7690,7 +7734,7 @@ QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
EOF
# Ensure we can link to uninistalled libraries
-if linkerSupportsFlag -rpath-link "$outpath/lib"; then
+if [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
echo "QMAKE_LFLAGS += -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib" >> "$CACHEFILE.tmp"
fi
@@ -8228,7 +8272,9 @@ for file in .projects .projects.3; do
[ "$IN_ROOT" = "no" ] && continue
case $a in
- *winmain/winmain.pro) continue ;;
+ *winmain/winmain.pro)
+ [ "$XPLATFORM_MINGW" = "yes" ] || continue
+ SPEC=$XQMAKESPEC ;;
*s60main/s60main.pro) continue ;;
*examples/activeqt/*) continue ;;
*/qmake/qmake.pro) continue ;;
diff --git a/demos/declarative/flickr/mobile/TitleBar.qml b/demos/declarative/flickr/mobile/TitleBar.qml
index da144d4..c7e1a53 100644
--- a/demos/declarative/flickr/mobile/TitleBar.qml
+++ b/demos/declarative/flickr/mobile/TitleBar.qml
@@ -118,7 +118,7 @@ Item {
name: "Tags"
PropertyChanges { target: container; x: -tagButton.x + 5 }
PropertyChanges { target: tagButton; text: "OK" }
- PropertyChanges { target: lineEdit; focus: true }
+ PropertyChanges { target: editor; focus: true }
}
transitions: Transition {
diff --git a/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml b/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml
index e15adbc..6109535 100644
--- a/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml
+++ b/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml
@@ -77,6 +77,6 @@ Item {
MouseArea {
anchors { fill: parent; leftMargin: -20; topMargin: -20; rightMargin: -20; bottomMargin: -20 }
- onClicked: textInput.forceFocus()
+ onClicked: { textInput.forceFocus(); textInput.openSoftwareInputPanel(); }
}
}
diff --git a/demos/declarative/samegame/SamegameCore/Dialog.qml b/demos/declarative/samegame/SamegameCore/Dialog.qml
index 8dd12f6..c71a4b3 100644
--- a/demos/declarative/samegame/SamegameCore/Dialog.qml
+++ b/demos/declarative/samegame/SamegameCore/Dialog.qml
@@ -47,13 +47,14 @@ Rectangle {
property Item text: dialogText
signal closed
-
+ signal opened
function forceClose() {
page.closed();
page.opacity = 0;
}
function show(txt) {
+ page.opened();
dialogText.text = txt;
page.opacity = 1;
}
@@ -62,7 +63,7 @@ Rectangle {
color: "white"
border.width: 1
opacity: 0
-
+ visible: opacity > 0
Behavior on opacity {
NumberAnimation { duration: 1000 }
}
diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml
index 54c18d6..9c4bfa8 100644
--- a/demos/declarative/samegame/samegame.qml
+++ b/demos/declarative/samegame/samegame.qml
@@ -90,17 +90,33 @@ Rectangle {
enabled: initialWidth != 0
}
+ onOpened: nameInputText.focus = true;
+ onClosed: {
+ nameInputText.focus = false;
+ if (nameInputText.text != "")
+ Logic.saveHighScore(nameInputText.text);
+ }
Text {
id: dialogText
anchors { left: nameInputDialog.left; leftMargin: 20; verticalCenter: parent.verticalCenter }
text: "You won! Please enter your name: "
}
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (nameInputText.text == "")
+ nameInputText.openSoftwareInputPanel();
+ else
+ nameInputDialog.forceClose();
+ }
+ }
TextInput {
id: nameInputText
anchors { verticalCenter: parent.verticalCenter; left: dialogText.right }
- focus: true
-
+ focus: false
+ autoScroll: false
+ maximumLength: 24
onTextChanged: {
var newWidth = nameInputText.width + dialogText.width + 40;
if ( (newWidth > nameInputDialog.width && newWidth < screen.width)
@@ -108,8 +124,6 @@ Rectangle {
nameInputDialog.width = newWidth;
}
onAccepted: {
- if (nameInputDialog.opacity == 1 && nameInputText.text != "")
- Logic.saveHighScore(nameInputText.text);
nameInputDialog.forceClose();
}
}
diff --git a/demos/declarative/snake/content/HighScoreModel.qml b/demos/declarative/snake/content/HighScoreModel.qml
index 99799c8..42482f8 100644
--- a/demos/declarative/snake/content/HighScoreModel.qml
+++ b/demos/declarative/snake/content/HighScoreModel.qml
@@ -106,7 +106,7 @@ ListModel {
}
if (rs.rows.length > maxScores)
tx.executeSql("DELETE FROM HighScores WHERE game=? AND score <= ?",
- [rs.rows.item(maxScores).score]);
+ [game, rs.rows.item(maxScores).score]);
}
}
)
diff --git a/demos/declarative/snake/content/Link.qml b/demos/declarative/snake/content/Link.qml
index 9aa6006..f4d7165 100644
--- a/demos/declarative/snake/content/Link.qml
+++ b/demos/declarative/snake/content/Link.qml
@@ -73,12 +73,14 @@ Item { id:link
}
}
+ /*
transform: Rotation {
id: actualImageRotation
origin.x: width/2; origin.y: height/2;
angle: rotation * 90
Behavior on angle { NumberAnimation { duration: spawned ? 200 : 0} }
}
+ */
}
Image {
diff --git a/demos/declarative/snake/content/snake.js b/demos/declarative/snake/content/snake.js
index 6f78b33..4d05e33 100644
--- a/demos/declarative/snake/content/snake.js
+++ b/demos/declarative/snake/content/snake.js
@@ -37,6 +37,7 @@ function startNewGame()
startNewGameTimer.running = true;
return;
}
+
numRows = numRowsAvailable;
numColumns = numColumnsAvailable;
board = new Array(numRows * numColumns);
diff --git a/demos/declarative/snake/snake.qml b/demos/declarative/snake/snake.qml
index 565e92c..46114f5 100644
--- a/demos/declarative/snake/snake.qml
+++ b/demos/declarative/snake/snake.qml
@@ -86,7 +86,7 @@ Rectangle {
onTriggered: { Logic.moveSkull() }
}
Timer {
-
+ id: startNewGameTimer;
interval: 700;
onTriggered: { Logic.startNewGame(); }
}
@@ -177,7 +177,6 @@ Rectangle {
id: progressIndicator
color: "#221edd";
width: 0;
- Behavior on width { NumberAnimation { duration: startHeartbeatTimer.running ? 1000 : 0}}
height: 30;
}
}
@@ -227,4 +226,13 @@ Rectangle {
}
]
+ transitions: [
+ Transition {
+ from: "*"
+ to: "starting"
+ NumberAnimation { target: progressIndicator; property: "width"; duration: 1000 }
+
+ }
+ ]
+
}
diff --git a/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml b/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml
index 3828a40..52164ed 100644
--- a/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml
+++ b/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml
@@ -148,7 +148,7 @@ Item {
PropertyChanges { target: tagButton; text: "OK" }
PropertyChanges { target: tagButton; width: 28 }
PropertyChanges { target: tagButton; height: 24 }
- PropertyChanges { target: txtEdit; focus: true }
+ PropertyChanges { target: editor; focus: true }
}
]
transitions: [
diff --git a/demos/declarative/twitter/TwitterCore/TitleBar.qml b/demos/declarative/twitter/TwitterCore/TitleBar.qml
index 0cf79a3..6cd0a50 100644
--- a/demos/declarative/twitter/TwitterCore/TitleBar.qml
+++ b/demos/declarative/twitter/TwitterCore/TitleBar.qml
@@ -107,7 +107,7 @@ Item {
name: "Tags"
PropertyChanges { target: container; x: -tagButton.x + 5 }
PropertyChanges { target: tagButton; text: "OK" }
- PropertyChanges { target: lineEdit; focus: true }
+ PropertyChanges { target: editor; focus: true }
}
transitions: Transition {
diff --git a/demos/declarative/twitter/twitter.qml b/demos/declarative/twitter/twitter.qml
index aa216cc..08cecb0 100644
--- a/demos/declarative/twitter/twitter.qml
+++ b/demos/declarative/twitter/twitter.qml
@@ -70,6 +70,11 @@ Item {
Image { source: "TwitterCore/images/stripes.png"; fillMode: Image.Tile; anchors.fill: parent; opacity: 0.3 }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: screen.focus = false;
+ }
+
Twitter.RssModel { id: rssModel }
Twitter.Loading { anchors.centerIn: parent; visible: rssModel.status==XmlListModel.Loading && state!='unauthed'}
Text {
diff --git a/demos/declarative/webbrowser/content/Button.qml b/demos/declarative/webbrowser/content/Button.qml
index 4642cc7..2a2e7ef 100644
--- a/demos/declarative/webbrowser/content/Button.qml
+++ b/demos/declarative/webbrowser/content/Button.qml
@@ -45,15 +45,21 @@ Item {
property alias image: icon.source
property variant action
+ signal clicked
+
width: 40; height: parent.height
Image {
id: icon; anchors.centerIn: parent
- opacity: if(action != undefined) {action.enabled ? 1.0 : 0.4} else 0
+ opacity: if (action != undefined) { action.enabled ? 1.0 : 0.4 } else 1
}
MouseArea {
anchors { fill: parent; topMargin: -10; bottomMargin: -10 }
- onClicked: action.trigger()
+ onClicked: {
+ if (action != undefined)
+ action.trigger()
+ parent.clicked()
+ }
}
}
diff --git a/demos/declarative/webbrowser/content/Header.qml b/demos/declarative/webbrowser/content/Header.qml
index 2c9d0fb..5abf440 100644
--- a/demos/declarative/webbrowser/content/Header.qml
+++ b/demos/declarative/webbrowser/content/Header.qml
@@ -42,7 +42,10 @@
import Qt 4.7
Image {
+ id: header
+
property alias editUrl: urlInput.url
+ property bool urlChanged: false
source: "pics/titlebar-bg.png"; fillMode: Image.TileHorizontally
@@ -91,19 +94,34 @@ Image {
onUrlEntered: {
webBrowser.urlString = url
webBrowser.focus = true
+ header.urlChanged = false
}
+ onUrlChanged: header.urlChanged = true
}
Button {
id: reloadButton
anchors { right: parent.right; rightMargin: 4 }
- action: webView.reload; image: "pics/view-refresh.png"; visible: webView.progress == 1.0
+ action: webView.reload; image: "pics/view-refresh.png"
+ visible: webView.progress == 1.0 && !header.urlChanged
}
Button {
id: stopButton
anchors { right: parent.right; rightMargin: 4 }
- action: webView.stop; image: "pics/edit-delete.png"; visible: webView.progress < 1.0
+ action: webView.stop; image: "pics/edit-delete.png"
+ visible: webView.progress < 1.0 && !header.urlChanged
+ }
+
+ Button {
+ id: goButton
+ anchors { right: parent.right; rightMargin: 4 }
+ onClicked: {
+ webBrowser.urlString = urlInput.url
+ webBrowser.focus = true
+ header.urlChanged = false
+ }
+ image: "pics/go-jump-locationbar.png"; visible: header.urlChanged
}
}
}
diff --git a/demos/declarative/webbrowser/content/UrlInput.qml b/demos/declarative/webbrowser/content/UrlInput.qml
index 9ea1904..9992456 100644
--- a/demos/declarative/webbrowser/content/UrlInput.qml
+++ b/demos/declarative/webbrowser/content/UrlInput.qml
@@ -48,6 +48,7 @@ Item {
property alias url: urlText.text
signal urlEntered(string url)
+ signal urlChanged
width: parent.height; height: parent.height
@@ -69,14 +70,24 @@ Item {
id: urlText
horizontalAlignment: TextEdit.AlignLeft
font.pixelSize: 14; focusOnPress: true
+
+ onTextChanged: container.urlChanged()
+
Keys.onEscapePressed: {
urlText.text = webView.url
webView.focus = true
}
+
+ Keys.onEnterPressed: {
+ container.urlEntered(urlText.text)
+ webView.focus = true
+ }
+
Keys.onReturnPressed: {
container.urlEntered(urlText.text)
webView.focus = true
}
+
anchors {
left: parent.left; right: parent.right; leftMargin: 18; rightMargin: 18
verticalCenter: parent.verticalCenter
diff --git a/demos/declarative/webbrowser/content/pics/go-jump-locationbar.png b/demos/declarative/webbrowser/content/pics/go-jump-locationbar.png
new file mode 100644
index 0000000..636fe38
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/go-jump-locationbar.png
Binary files differ
diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml
index a923c92..53ba6da 100644
--- a/demos/declarative/webbrowser/webbrowser.qml
+++ b/demos/declarative/webbrowser/webbrowser.qml
@@ -55,6 +55,7 @@ Rectangle {
FlickableWebView {
id: webView
url: webBrowser.urlString
+ onProgressChanged: header.urlChanged = false
anchors { top: headerSpace.bottom; left: parent.left; right: parent.right; bottom: parent.bottom }
}
diff --git a/demos/spectrum/app/mainwidget.h b/demos/spectrum/app/mainwidget.h
index b3dc352..ddab8b7 100644
--- a/demos/spectrum/app/mainwidget.h
+++ b/demos/spectrum/app/mainwidget.h
@@ -59,7 +59,6 @@ QT_FORWARD_DECLARE_CLASS(QLabel)
QT_FORWARD_DECLARE_CLASS(QPushButton)
QT_FORWARD_DECLARE_CLASS(QMenu)
QT_FORWARD_DECLARE_CLASS(QAction)
-QT_END_NAMESPACE
/**
* Main application widget, responsible for connecting the various UI
diff --git a/dist/changes-4.6.4 b/dist/changes-4.6.4
new file mode 100644
index 0000000..381023f
--- /dev/null
+++ b/dist/changes-4.6.4
@@ -0,0 +1,158 @@
+Qt 4.6.4 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.6.0. For more details,
+refer to the online documentation included in this distribution. The
+documentation is also available online:
+
+ http://qt.nokia.com/doc/4.6
+
+The Qt version 4.6 series is binary compatible with the 4.5.x series.
+Applications compiled for 4.5 will continue to run with 4.6.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker or the Merge Request queue
+of the public source repository.
+
+Qt Bug Tracker: http://bugreports.qt.nokia.com
+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 *
+****************************************************************************
+
+QtCore
+------
+
+ - foo
+ * bar
+
+QtGui
+-----
+
+ - foo
+ * bar
+
+QtDBus
+------
+
+ - foo
+ * bar
+
+QtNetwork
+---------
+
+ - foo
+ * bar
+
+QtOpenGL
+--------
+
+ - foo
+ * bar
+
+QtScript
+--------
+
+ - foo
+ * bar
+
+QtSql
+-----
+
+ - foo
+ * bar
+
+QtXml
+-----
+
+ - foo
+ * bar
+
+Qt Plugins
+----------
+
+ - foo
+ * bar
+
+Third party components
+----------------------
+
+ - Updated foo to version 2.3.9.
+
+ - Updated bar to the latest version from baz.org.
+
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+Qt for Unix (X11 and Mac OS X)
+------------------------------
+
+ -
+
+Qt for Linux/X11
+----------------
+
+ -
+
+Qt for Windows
+--------------
+
+ -
+
+Qt for Mac OS X
+---------------
+
+ -
+
+Qt for Embedded Linux
+---------------------
+
+ -
+
+DirectFB
+--------
+
+ -
+
+Qt for Windows CE
+-----------------
+
+ -
+
+****************************************************************************
+* Tools *
+****************************************************************************
+
+ - Designer
+ * foo
+
+ - qdoc3
+ * bar
+
+ - Linguist
+ * baz
+
+****************************************************************************
+* Important Behavior Changes *
+****************************************************************************
+
+ -
+
diff --git a/dist/changes-4.7.0 b/dist/changes-4.7.0
index 95cff56..c19bf15 100644
--- a/dist/changes-4.7.0
+++ b/dist/changes-4.7.0
@@ -377,3 +377,9 @@ QtCore:
ABIs, but it also allowed for unaligned access. Qt never generates
or uses unaligned access and the new EABI aligns as expected, so
the flag was removed.
+
+QtNetwork:
+ - Qt does no longer provide its own CA bundle, but uses system APIs for
+ retrieving the default system certificates. On Symbian,
+ QSslSocket::systemCaCertificates() provides an empty list of
+ certificates.
diff --git a/doc/doc.pri b/doc/doc.pri
index 3180a61..f748f3d 100644
--- a/doc/doc.pri
+++ b/doc/doc.pri
@@ -5,9 +5,9 @@
DOCS_GENERATION_DEFINES =
GENERATOR = $$QT_BUILD_TREE/bin/qhelpgenerator
-win32:!win32-g++ {
+win32:!win32-g++* {
unixstyle = false
-} else :win32-g++:isEmpty(QMAKE_SH) {
+} else :win32-g++*:isEmpty(QMAKE_SH) {
unixstyle = false
} else {
unixstyle = true
@@ -36,9 +36,15 @@ QT_ZH_CN_DOCUMENTATION = ($$QDOC qt-api-only_zh_CN.qdocconf) && \
$$GENERATOR doc-build/html-qt_zh_CN/qt.qhp -o doc/qch/qt_zh_CN.qch \
)
-win32-g++:isEmpty(QMAKE_SH) {
+QT_JA_JP_DOCUMENTATION = ($$QDOC qt-api-only_ja_JP.qdocconf) && \
+ (cd $$QT_BUILD_TREE && \
+ $$GENERATOR doc-build/html-qt_ja_JP/qt.qhp -o doc/qch/qt_ja_JP.qch \
+ )
+
+win32-g++*:isEmpty(QMAKE_SH) {
QT_DOCUMENTATION = $$replace(QT_DOCUMENTATION, "/", "\\\\")
QT_ZH_CN_DOCUMENTATION = $$replace(QT_ZH_CN_DOCUMENTATION, "/", "\\\\")
+ QT_JA_JP_DOCUMENTATION = $$replace(QT_JA_JP_DOCUMENTATION, "/", "\\\\")
}
# Build rules:
@@ -52,6 +58,9 @@ docs.depends = sub-qdoc3 adp_docs qch_docs
docs_zh_CN.depends = docs
docs_zh_CN.commands = $$QT_ZH_CN_DOCUMENTATION
+docs_ja_JP.depends = docs
+docs_ja_JP.commands = $$QT_JA_JP_DOCUMENTATION
+
# Install rules
htmldocs.files = $$QT_BUILD_TREE/doc/html
htmldocs.path = $$[QT_INSTALL_DOCS]
@@ -67,5 +76,5 @@ docimages.path = $$[QT_INSTALL_DOCS]/src
sub-qdoc3.depends = sub-corelib sub-xml
sub-qdoc3.commands += (cd tools/qdoc3 && $(MAKE))
-QMAKE_EXTRA_TARGETS += sub-qdoc3 adp_docs qch_docs docs docs_zh_CN
+QMAKE_EXTRA_TARGETS += sub-qdoc3 adp_docs qch_docs docs docs_zh_CN docs_ja_JP
INSTALLS += htmldocs qchdocs docimages
diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc
index 6e98949..c320898 100644
--- a/doc/src/declarative/animation.qdoc
+++ b/doc/src/declarative/animation.qdoc
@@ -46,14 +46,14 @@
Animation in QML is done by animating properties of objects. Properties of type
real, int, color, rect, point, size, and vector3d can all be animated.
-QML supports three main forms of animation - basic property animation,
+QML supports three main forms of animation: basic property animation,
transitions, and property behaviors.
\tableofcontents
\section1 Basic Property Animation
-The simplest form of animation is directly using \l PropertyAnimation, which can animate all of the property
+The simplest form of animation is a \l PropertyAnimation, which can animate all of the property
types listed above. If the property you are animating is a number or color, you can alternatively use
NumberAnimation or ColorAnimation. These elements don't add any additional functionality,
but will help enforce type correctness and are slightly more efficient.
@@ -62,61 +62,23 @@ A property animation can be specified as a value source using the \e Animation \
for repeating animations.
The following example creates a bouncing effect:
-\qml
-Rectangle {
- id: rect
- width: 120; height: 200;
- Image {
- id: img
- source: "qt-logo.png"
- x: 60-img.width/2
- y: 0
- SequentialAnimation on y {
- loops: Animation.Infinite
- NumberAnimation { to: 200-img.height; easing.type: Easing.OutBounce; duration: 2000 }
- PauseAnimation { duration: 1000 }
- NumberAnimation { to: 0; easing.type: Easing.OutQuad; duration: 1000 }
- }
- }
-}
-\endqml
+\snippet doc/src/snippets/declarative/animation.qml property-anim-1
\image propanim.gif
When you assign an animation as a value source, you do not need to specify \c property
-or \c target; they are automatically selected for you. You do, however, need to specify \c to.
+or \c target values; they are automatically selected for you. You do, however, need to specify a \c to value.
An animation specified as a value source will be \c running by default.
-\qml
-Rectangle {
- id: rect
- width: 200; height: 200;
- Rectangle {
- color: "red"
- width: 50; height: 50
- NumberAnimation on x { to: 50 }
- }
-}
-\endqml
+For example, here is a rectangle that uses a \l NumberAnimation value source to animate the movement
+from its current position to an \c x value of 50. The animation starts immediately, and only the \c to
+property is required:
+
+\snippet doc/src/snippets/declarative/animation.qml property-anim-2
A property animation can also be specified as a resource that is manipulated from script.
-\qml
-PropertyAnimation {
- id: animation
- target: image
- property: "scale"
- from: 1; to: .5
-}
-Image {
- id: image
- source: "image.png"
- MouseArea {
- anchors.fill: parent
- onPressed: animation.start()
- }
-}
-\endqml
+\snippet doc/src/snippets/declarative/animation.qml property-anim-3
As can be seen, when an animation is used like this (as opposed to as a value source) you will need
to explicitly set the \c target and \c property to animate.
@@ -131,50 +93,20 @@ can only be triggered by a state change.
For example, a transition could describe how an item moves from its initial position to its new position:
-\code
-transitions: [
- Transition {
- NumberAnimation {
- properties: "x,y"
- easing.type: Easing.OutBounce
- duration: 200
- }
- }
-]
-\endcode
+\snippet doc/src/snippets/declarative/animation.qml transitions-1
As can be seen, transitions make use of the same basic animation classes introduced above.
In the above example we have specified that we want to animate the \c x and \c y properties, but have not
-specified the objects to animate or the \c to values. By default these values are supplied by the framework --
+specified the objects to animate or the \c to values. By default these values are supplied by the framework;
the animation will animate any \c targets whose \c x and \c y have changed, and the \c to values will be those
defined in the end state. You can always supply explicit values to override these implicit values when needed.
-\code
-Transition {
- from: "*"
- to: "MyState"
- reversible: true
- SequentialAnimation {
- NumberAnimation {
- duration: 1000
- easing.type: Easing.OutBounce
- // animate myItem's x and y if they have changed in the state
- target: myItem
- properties: "x,y"
- }
- NumberAnimation {
- duration: 1000
- // animate myItem2's y to 200, regardless of what happens in the state
- target: myItem2
- property: "y"
- to: 200
- }
- }
-}
-\endcode
+\snippet doc/src/snippets/declarative/animation.qml transitions-2
QML transitions have selectors to determine which state changes a transition should apply to.
The following transition will only be triggered when we enter into the \c "details" state.
+(The "*" value is a wildcard value that specifies the transition should be applied when changing
+from \e any state to the "details" state.)
\code
Transition {
@@ -188,30 +120,7 @@ Transitions can happen in parallel, in sequence, or in any combination of the tw
animations in a transition will happen in parallel. The following example shows a rather complex transition
making use of both sequential and parallel animations:
-\code
-Transition {
- from: "*"
- to: "MyState"
- reversible: true
- SequentialAnimation {
- ColorAnimation { duration: 1000 }
- PauseAnimation { duration: 1000 }
- ParallelAnimation {
- NumberAnimation {
- duration: 1000
- easing.type: Easing.OutBounce
- targets: box1
- properties: "x,y"
- }
- NumberAnimation {
- duration: 1000
- targets: box2
- properties: "x,y"
- }
- }
- }
-}
-\endcode
+\snippet doc/src/snippets/declarative/animation.qml transitions-3
\section1 Property Behaviors
@@ -219,24 +128,15 @@ A \l{Behavior}{property behavior} specifies a default animation to run whenever
of what caused the change. The \c enabled property can be used to force a \l Behavior
to only apply under certain circumstances.
-In the following snippet, we specify that we want the x position of redRect to be animated
-whenever it changes. The animation will last 300 milliseconds and use an InOutQuad easing curve.
+In the following snippet, we specify that we want the \c x position of \c redRect to be animated
+whenever it changes. The animation will last 300 milliseconds and use an \l{PropertyAnimation::easing.type}{Easing.InOutQuad} easing curve.
-\qml
-Rectangle {
- id: redRect
- color: "red"
- width: 100; height: 100
- Behavior on x { NumberAnimation { duration: 300; easing.type: Easing.InOutQuad } }
-}
-\endqml
+\snippet doc/src/snippets/declarative/animation.qml behavior
Like using an animation as a value source, when used in a Behavior and animation does not need to specify
a \c target or \c property.
-To trigger this behavior, we could:
-\list
-\o Enter a state that changes x
+To trigger this behavior, we could enter a state that changes \c x:
\qml
State {
@@ -249,7 +149,7 @@ State {
}
\endqml
-\o Update x from a script
+Or, update \c x from a script:
\qml
MouseArea {
@@ -257,11 +157,10 @@ MouseArea {
onClicked: redRect.x = 24;
}
\endqml
-\endlist
-If x were bound to another property, triggering the binding would also trigger the behavior.
+If \c x were bound to another property, triggering the binding would also trigger the behavior.
-If a state change has a transition animation matching a property with a Behavior, the transition animation
-will override the Behavior for that state change.
+If a state change has a transition animation matching a property with a \l Behavior, the transition animation
+will override the \l Behavior for that state change.
*/
diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc
index 1199b26..7a49d0a 100644
--- a/doc/src/declarative/declarativeui.qdoc
+++ b/doc/src/declarative/declarativeui.qdoc
@@ -118,6 +118,7 @@ application or to build completely new applications. QML is fully \l
\o \l {QML Security}
\o \l {QtDeclarative Module}
\o \l {Debugging QML}
+\o \l {QML Performance}
\o \l {QML Coding Conventions}
\endlist
*/
diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc
index aa48bcb..31fa948 100644
--- a/doc/src/declarative/elements.qdoc
+++ b/doc/src/declarative/elements.qdoc
@@ -211,6 +211,4 @@ The following table lists the QML elements provided by the \l {QtDeclarative}{Qt
\endlist
\endtable
-\o
-
*/
diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc
index 8f39685..ad8c10c 100644
--- a/doc/src/declarative/examples.qdoc
+++ b/doc/src/declarative/examples.qdoc
@@ -79,6 +79,7 @@ For example, from your build directory, run:
\section2 Image Elements
\list
\o \l{declarative/imageelements/borderimage}{BorderImage}
+\o \l{declarative/imageelements/image}{Image}
\endlist
\section2 Positioners
@@ -117,6 +118,7 @@ For example, from your build directory, run:
\o \l{declarative/modelviews/package}{Package}
\o \l{declarative/modelviews/parallax}{Parallax}
\o \l{declarative/modelviews/stringlistmodel}{String ListModel}
+\o \l{declarative/modelviews/visualitemmodel}{VisualItemModel}
\o \l{declarative/modelviews/webview}{WebView}
\endlist
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
index 574b0b2..03c0ec4 100644
--- a/doc/src/declarative/extending.qdoc
+++ b/doc/src/declarative/extending.qdoc
@@ -425,6 +425,9 @@ value will not be accessible from script.
\l {Extending QML - Signal Support Example} shows the complete code used to
implement the onPartyStarted signal property.
+If you want to use signals from items not created in QML, you can access their
+signals with the \l {Connections} element.
+
\section1 Property Value Sources
\snippet examples/declarative/cppextensions/referenceexamples/valuesource/example.qml 0
@@ -896,9 +899,13 @@ in other projects without the use of C++. Components can also help to reduce
duplication inside one project by limiting the need for large numbers of
copy-and-pasted blocks.
-Any snippet of QML code can become a component, just by placing it in the file
-"<Name>.qml" where <Name> is the new element name, and begins with an uppercase
-letter. These QML files automatically become available as new QML element types
+Any snippet of QML code can become a component, just by placing it in the file "<Name>.qml"
+where <Name> is the new element name, and begins with an uppercase letter. Note that
+the case of all characters in the <Name> are significant on some filesystems, notably
+UNIX filesystems. It is recommended that the case of the filename matches the case of
+the component name in QML exactly, regardless of the platform the QML will be deployed to.
+
+These QML files automatically become available as new QML element types
to other QML components and applications in the same directory.
For example, here we show how a component named "Box" is defined and used
diff --git a/doc/src/declarative/pics/anchorchanges.png b/doc/src/declarative/pics/anchorchanges.png
new file mode 100644
index 0000000..4973e4e
--- /dev/null
+++ b/doc/src/declarative/pics/anchorchanges.png
Binary files differ
diff --git a/doc/src/declarative/pics/listmodel-nested.png b/doc/src/declarative/pics/listmodel-nested.png
new file mode 100644
index 0000000..ee7ffba
--- /dev/null
+++ b/doc/src/declarative/pics/listmodel-nested.png
Binary files differ
diff --git a/doc/src/declarative/pics/listmodel.png b/doc/src/declarative/pics/listmodel.png
new file mode 100644
index 0000000..7ab1771
--- /dev/null
+++ b/doc/src/declarative/pics/listmodel.png
Binary files differ
diff --git a/doc/src/declarative/pics/parentchange.png b/doc/src/declarative/pics/parentchange.png
new file mode 100644
index 0000000..93206fb
--- /dev/null
+++ b/doc/src/declarative/pics/parentchange.png
Binary files differ
diff --git a/doc/src/declarative/pics/repeater-simple.png b/doc/src/declarative/pics/repeater-simple.png
new file mode 100644
index 0000000..6da6295
--- /dev/null
+++ b/doc/src/declarative/pics/repeater-simple.png
Binary files differ
diff --git a/doc/src/declarative/qdeclarativedebugging.qdoc b/doc/src/declarative/qdeclarativedebugging.qdoc
index 4ff7fde..99dd2d2 100644
--- a/doc/src/declarative/qdeclarativedebugging.qdoc
+++ b/doc/src/declarative/qdeclarativedebugging.qdoc
@@ -60,8 +60,35 @@ Rectangle {
\section1 Debugging Transitions
When a transition doesn't look quite right, it can be helpful to view it in slow
-motion to see what is happening more clearly. The \l {Qt Declarative UI Runtime}{qml} tool provides a
-"Slow Down Animations" menu option to facilitate this.
+motion to see what is happening more clearly. This functionality is supported
+in the \l {Qt Declarative UI Runtime}{qmlviewer} tool: to enable this,
+click on the "Debugging" menu, then "Slow Down Animations".
+
+
+\section1 Debugging module imports
+
+The \c QML_IMPORT_TRACE environment variable can be set to enable debug output
+from QML's import loading mechanisms.
+
+For example, for a simple QML file like this:
+
+\qml
+import Qt 4.7
+
+Rectangle { width: 100; height: 100 }
+\endqml
+
+If you set \c {QML_IMPORT_TRACE=1} before running the \l {Qt Declarative UI Runtime}{qmlviewer}
+(or your QML C++ application), you will see output similar to this:
+
+\code
+QDeclarativeImportDatabase::addImportPath "/qt-sdk/imports"
+QDeclarativeImportDatabase::addImportPath "/qt-sdk/bin/QMLViewer.app/Contents/MacOS"
+QDeclarativeImportDatabase::addToImport 0x106237370 "." -1.-1 File as ""
+QDeclarativeImportDatabase::addToImport 0x106237370 "Qt" 4.7 Library as ""
+QDeclarativeImportDatabase::resolveType "Rectangle" = "QDeclarativeRectangle"
+\endcode
+
\section1 Debugging with Qt Creator
diff --git a/doc/src/declarative/qdeclarativedocument.qdoc b/doc/src/declarative/qdeclarativedocument.qdoc
index bc099ce..8336512 100644
--- a/doc/src/declarative/qdeclarativedocument.qdoc
+++ b/doc/src/declarative/qdeclarativedocument.qdoc
@@ -96,9 +96,6 @@ Once created, instances are not dependent on the component that created them, so
operate on independent data. Here is an example of a simple "Button" component that is
instantiated four times, each with a different value for its \c text property.
-\table
-\row
-\o
\raw HTML
<table><tr><td>
\endraw
@@ -125,10 +122,19 @@ BorderImage {
\raw HTML
</td> </tr> </table>
\endraw
-\endtable
-In addition to the top-level component that all QML documents define, documents may also
-include additional \e inline components. Inline components are declared using the
+Any snippet of QML code can become a component, just by placing it in the file "<Name>.qml"
+where <Name> is the new element name, and begins with an uppercase letter. Note that
+the case of all characters in the <Name> are significant on some filesystems, notably
+UNIX filesystems. It is recommended that the case of the filename matches the case of
+the component name in QML exactly, regardless of the platform the QML will be deployed to.
+
+These QML files automatically become available as new QML element types
+to other QML components and applications in the same directory.
+
+In addition to the top-level component that all QML documents define, and any reusable
+components placed in separate files, documents may also
+include \e inline components. Inline components are declared using the
\l Component element, as can be seen in the first example above. Inline components share
all the characteristics of regular top-level components and use the same \c import list as their
containing QML document. Components are one of the most basic building blocks in QML, and are
diff --git a/doc/src/declarative/qdeclarativeperformance.qdoc b/doc/src/declarative/qdeclarativeperformance.qdoc
new file mode 100644
index 0000000..b535e4b
--- /dev/null
+++ b/doc/src/declarative/qdeclarativeperformance.qdoc
@@ -0,0 +1,120 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qdeclarativeperformance.html
+\title QML Performance
+
+\section1 Opaque Items
+
+Items hidden behind an opaque item incur a cost. If an item will be enitrely
+obscured by an opaque item, set its opacity to 0. One common example of
+this is when a "details" page is shown over the main application view.
+
+\section1 Clipping
+
+\e clip is set to false by default. Enable clipping only when necessary.
+
+\section1 Anchors vs. Binding
+
+It is more efficient to use anchors rather than bindings to position items
+relative to each other. Consider this use of bindings to position rect2
+relative to rect1:
+
+\code
+Rectangle {
+ id: rect1
+ x: 20
+ width: 200; height: 200
+}
+Rectange {
+ id: rect2
+ x: rect1.x
+ y: rect1.y + rect1.height
+ width: rect1.width - 20
+ height: 200
+}
+\endcode
+
+This is achieved more efficiently using anchors:
+
+\code
+Rectangle {
+ id: rect1
+ x: 20
+ width: 200; height: 200
+}
+Rectange {
+ id: rect2
+ height: 200
+ anchors.left: rect1.left
+ anchors.top: rect1.bottom
+ anchors.right: rect1.right
+ anchors.rightMargin: 20
+}
+\endcode
+
+\section1 Images
+
+Images consume a great deal of memory and may also be costly to load. In order
+to deal with large images efficiently it is recommended that the Image::sourceSize
+property be set to a size no greater than that necessary to render it. Beware that
+changing the sourceSize will cause the image to be reloaded.
+
+Images on the local filesystem are usually loaded synchronously. This is usually
+the desired behavior for user interface elements, however for large images that
+do not necessarily need to be visible immediately, set the Image::asynchronous
+property to true. This will load the image in a low priority thread.
+
+\section1 View Delegates
+
+Delegates must be created quickly as the view is flicked. There are two important
+aspects to maintaining a smooth view:
+
+\list
+\o Small delegates - keep the amount of QML to a minimum. Have just enough
+QML in the delegate to display the necessary information. Any additional functionality
+that is only needed when the delegate is clicked, for example, should be created by
+a Loader as needed.
+\o Fast data access - ensure the data model is as fast as possible.
+\endlist
+
+*/
diff --git a/doc/src/declarative/qdeclarativestates.qdoc b/doc/src/declarative/qdeclarativestates.qdoc
index fd0c677..43b5c31 100644
--- a/doc/src/declarative/qdeclarativestates.qdoc
+++ b/doc/src/declarative/qdeclarativestates.qdoc
@@ -70,58 +70,30 @@ In QML:
\o A state can affect the properties of other objects, not just the object owning the state (and not just that object's children).
\endlist
+To define a state for an item, add a \l State element to the \l{Item::states}{states} property. To
+change the current state of an \l Item, set the \l{Item::state}{state} property to the name
+of the required state.
+
Here is an example of using states. In the default state \c myRect is positioned at 0,0. In the 'moved' state it is positioned at 50,50. Clicking within the mouse area changes the state from the default state to the 'moved' state, thus moving the rectangle.
-\qml
-Item {
- id: myItem
-
- Rectangle {
- id: myRect
- width: 100
- height: 100
- color: "red"
- }
-
- states: [
- State {
- name: "moved"
- PropertyChanges {
- target: myRect
- x: 50
- y: 50
- }
- }
- ]
-
- MouseArea {
- anchors.fill: parent
- onClicked: myItem.state = 'moved'
- }
-}
-\endqml
+\snippet doc/src/snippets/declarative/states.qml 0
+\snippet doc/src/snippets/declarative/states.qml 1
State changes can be animated using \l{state-transitions}{Transitions}.
-For example, adding this code to the above \c {Item {}} element animates the transition to the "moved" state:
+For example, adding this code to the above \c Item element animates the transition to the "moved" state:
-\qml
- transitions: [
- Transition {
- NumberAnimation { properties: "x,y"; duration: 500 }
- }
- ]
-\endqml
+\snippet doc/src/snippets/declarative/states.qml transitions
See \l{state-transitions}{Transitions} for more information.
Other things you can do in a state change:
\list
-\o override signal handlers with PropertyChanges
-\o change an item's visual parent with ParentChange
-\o change an item's anchors with AnchorChanges
-\o run some script with StateChangeScript
+\o Override signal handlers with PropertyChanges
+\o Change an item's visual parent with ParentChange
+\o Change an item's anchors with AnchorChanges
+\o Run some script with StateChangeScript
\endlist
*/
diff --git a/doc/src/declarative/qmlruntime.qdoc b/doc/src/declarative/qmlruntime.qdoc
index cef5e63..66b4b2b 100644
--- a/doc/src/declarative/qmlruntime.qdoc
+++ b/doc/src/declarative/qmlruntime.qdoc
@@ -152,7 +152,7 @@
\section2 Runtime Object
- All applications using the launcher will have access to the 'runtime'
+ All applications using the launcher will have access to the \c runtime
property on the root context. This property contains several pieces of
information about the runtime environment of the application.
@@ -160,11 +160,19 @@
A special piece of dummy data which is integrated into the launcher is
a simple orientation property. The orientation can be set via the
- settings menu in the application, or by pressing Ctrl+T to toggle it.
+ settings menu in the application, or by pressing Ctrl+T to rotate it.
- To use this from within your QML file, access runtime.orientation,
- which can be either Orientation.Landscape or Orientation.Portrait and which can be bound to in your
- application. An example is below:
+ To use this from within your QML file, access \c runtime.orientation,
+ which can be one of the following values:
+
+ \list
+ \o \c Orientation.Portrait
+ \o \c Orientation.Landscape
+ \o \c Orientation.PortraitInverted (Portrait orientation, upside-down)
+ \o \c Orientation.LandscapeInverted (Landscape orientation, upside-down)
+ \endlist
+
+ These values can be bound to in your application. For example:
\code
Item {
@@ -172,13 +180,13 @@
}
\endcode
- This allows your application to respond to the orientation of the screen changing. The launcher
+ This allows your application to respond to changes in the screen's orientation. The launcher
will automatically update this on some platforms (currently the N900 only) to match the physical
screen's orientation. On other plaforms orientation changes will only happen when explictly asked for.
\section3 Window Active
- The runtime.isActiveWindow property tells whether the main window of the launcher is currently active
+ The \c runtime.isActiveWindow property tells whether the main window of the launcher is currently active
or not. This is especially useful for embedded devices when you want to pause parts of your application,
including animations, when your application loses focus or goes to the background.
diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc
index 7d696d7..784c59a 100644
--- a/doc/src/declarative/qtbinding.qdoc
+++ b/doc/src/declarative/qtbinding.qdoc
@@ -269,5 +269,10 @@ For example:
\c [project/main.qml]
\snippet doc/src/snippets/declarative/qtbinding/resources/main.qml 0
+Note that the resource system cannot be accessed from QML directly. If the main QML file is
+loaded as a resource, all files specifed as relative paths in QML will also be loaded from
+the resource system. Using the resource system is completely transparent to the QML layer.
+This also means that if the main QML file is not loaded as a resource then files in the resource
+system cannot be accessed from QML.
*/
diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc
index 035628e..b6069f2 100644
--- a/doc/src/examples/qml-examples.qdoc
+++ b/doc/src/examples/qml-examples.qdoc
@@ -75,6 +75,15 @@
*/
/*!
+ \title Image Elements: Image
+ \example declarative/imageelements/image
+
+ This example shows how to use the Image element and its \l{Image::fillMode}{fillModes}.
+
+ \image qml-image-example.png
+*/
+
+/*!
\page declarative-cppextensions-reference.html
\title C++ Extensions: Reference examples
@@ -238,6 +247,13 @@
*/
/*!
+ \title Models and Views: VisualItemModel
+ \example declarative/modelviews/visualitemmodel
+
+ This example shows how to use the VisualItemModel element.
+*/
+
+/*!
\title Models and Views: WebView
\example declarative/modelviews/webview
diff --git a/doc/src/images/qml-image-example.png b/doc/src/images/qml-image-example.png
new file mode 100644
index 0000000..c1951c0
--- /dev/null
+++ b/doc/src/images/qml-image-example.png
Binary files differ
diff --git a/doc/src/ja_JP/development/designer-manual.qdoc b/doc/src/ja_JP/development/designer-manual.qdoc
new file mode 100644
index 0000000..585af16
--- /dev/null
+++ b/doc/src/ja_JP/development/designer-manual.qdoc
@@ -0,0 +1,175 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page designer-quick-start.html
+
+ \title Qt Designer クイックガイド
+
+ \QD を使うための基本的な手順は、以下の\bold{四つ}です。
+
+ \list 1
+ \o フォームとオブジェクトを選択する
+ \o フォームにオブジェクトを配置する
+ \o スロットにシグナルを接続する
+ \o フォームをプレビューする
+ \endlist
+
+ \image rgbController-screenshot.png
+
+ Red、Green、Blue(RGB)の値を操作するために必要なコントロールを含む
+ 小さなウィジェット(上記スクリーンショット参照)を設計する場合を想定します。
+ このウィジェットは、画像処理プログラム内のどこからでも表示できるウィジェットです。
+
+ \table
+ \row
+ \i \inlineimage designer-choosing-form.png
+ \i \bold{フォームを選択する}
+
+ \gui{新しいフォーム} ダイアログから \gui Widget を選択して開始します。
+ \endtable
+
+
+ \table
+ \row
+ \i \inlineimage rgbController-arrangement.png
+ \i \bold{フォームにウィジェットを配置する}
+
+ 3つのラベル(Label)、スピンボックス(Spin Box)、垂直方向のスライダ(Vertical Slider)をフォーム上へドラッグします。
+ ラベルの既定の文字列を変更するには、文字列をダブルクリックします。
+ 希望するレイアウトに合わせて配置します。
+ \endtable
+
+ 画像のようにこれらのウィジェットを配置するには、
+ レイアウトにウィジェットを配置する必要があります。
+ これを3つグループに対して行います。
+ まず "RED" ラベルを選択します。
+ 次に、\key Ctrl (Mac OS X では \key Command)キーを押したまま、対応するスピンボックスとスライダを選択します。
+ \gui{フォーム} メニューで、\gui{格子状に並べる}を選択します。
+
+ \table
+ \row
+ \i \inlineimage rgbController-form-gridLayout.png
+ \i \inlineimage rgbController-selectForLayout.png
+ \endtable
+
+ 他の2つのラベルに対しても、対応するスピンボックスとスライダごとにこの手順を繰り返します。
+
+ 次の手順は、これら3つのレイアウトを組み合わせて、1つの\bold{メインレイアウト}を作成することです。
+ メインレイアウトとは、トップレベルウィジェット(この場合は QWidget)のレイアウトです。
+ トップレベルウィジェットにレイアウトを配置することは重要です。
+ そうでなければ、ウィンドウをサイズ変更したときにウィンドウ上のウィジェットのサイズが変更されません。
+ レイアウトを設定するには、フォーム上の3つのレイアウト以外の任意の場所で\gui{右クリック}し、\gui{水平に並べる}を選択します。
+ または、\gui{格子状に並べる}を選択することもできます。
+ そのどちらでも同じ配置(以下を参照)で表示されます。
+
+ \image rgbController-final-layout.png
+
+ \note メインレイアウトはフォームに表示できません。
+ メインレイアウトがインストールされているかどうかを確認するには、
+ フォームをサイズ変更してみます。
+ インストールされている場合は、各ウィジェットのサイズが適宜変更されます。
+ または、\QD の \gui{Object Inspector} で確認することもできます。
+ トップレベルウィジェットにレイアウトが配置されていない場合、
+ その横に崩れたレイアウトのアイコン \inlineimage rgbController-no-toplevel-layout.png
+ が表示されます。
+
+ スライダをクリックして特定の値までドラッグするときに、
+ スピンボックスにスライダの位置を反映させます。
+ この操作を行うには、スライダの \l{QAbstractSlider::}{valueChanged()}
+ シグナルをスピンボックスの \l{QSpinBox::}{setValue()}
+ スロットに接続する必要があります。
+ また、逆方向、すなわちスピンボックスの \l{QSpinBox::}{valueChanged()}
+ シグナルをスライダの \l{QAbstractSlider::value()}{setValue()} スロットに接続する必要があります。
+
+ この操作を行うには、\key{F4} キーを押すか、\gui{編集|シグナル/スロットの編集} を選択し、
+ \gui{シグナル/スロットの編集}モードに切り替える必要があります。
+
+ \table
+ \row
+ \i \inlineimage rgbController-signalsAndSlots.png
+ \i \bold{シグナルをスロットに接続する}
+
+ スライダをクリックし、カーソルをスピンボックスまでドラッグします。
+ 以下のような \gui{シグナルスロットを設定} ダイアログがポップアップ表示されます。
+ 適切なシグナルとスロットを選択し、\gui OK をクリックします。
+ \endtable
+
+ \image rgbController-configure-connection1.png
+
+ 手順を(逆の順序で)繰り返し、
+ スピンボックスをクリックしてカーソルをスライダまでドラッグし、
+ スピンボックスの \l{QSpinBox::}{valueChanged()} シグナルを、
+ スライダの \l{QAbstractSlider::value()}{setValue()} スロットに接続します。
+
+ 以下のスクリーンショットは、適切なシグナルとスロットを選択するためのガイドとして利用できます。
+
+ \image rgbController-configure-connection2.png
+
+ RGBコントローラーの "RED" コンポーネントのオブジェクトが正常に接続されたので、
+ "GREEN" および "BLUE" コンポーネントにも同じ手順を繰り返します。
+
+ RGB値の範囲は 0 ~ 255 であるため、
+ スピンボックスとスライダを特定の範囲に制限する必要があります。
+
+ \table
+ \row
+ \i \inlineimage rgbController-property-editing.png
+ \i \bold{ウィジェットのプロパティを設定する}
+
+ 最初のスピンボックスをクリックします。
+ \gui{プロパティエディタ}に \l{QSpinBox} のプロパティが表示されます。
+ \l{QSpinBox::}{maximum} のプロパティに、"255" と入力します。
+ 次に、最初の垂直方向のスライダをクリックすると、
+ \l{QAbstractSlider} のプロパティが表示されます。
+ \l{QAbstractSlider::}{maximum} のプロパティにも、"255" と入力します。
+ 残りのスピンボックスとスライダに対しても、この処理を繰り返します。
+ \endtable
+
+ ここで、フォームをプレビューし、アプリケーションの外観を確認します。
+ この操作を行うには、\key{Ctrl + R} を押すか、
+ \gui{フォーム}メニューから\gui{プレビュー}を選択します。
+ スライダをドラッグすると、
+ スピンボックスにその値が反映されます(逆の場合も同じ)。
+ またサイズを変更し、子ウィジェットの管理に使用するレイアウトが
+ どのようにウィンドウのさまざまなサイズに対応しているか確認します。
+*/
+
diff --git a/doc/src/ja_JP/development/qmake-manual.qdoc b/doc/src/ja_JP/development/qmake-manual.qdoc
new file mode 100644
index 0000000..8c9297f
--- /dev/null
+++ b/doc/src/ja_JP/development/qmake-manual.qdoc
@@ -0,0 +1,212 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qmake-tutorial.html
+ \title qmake チュートリアル
+
+ このチュートリアルでは \c qmake の使い方を説明します。
+ このチュートリアルを読み終わったら \c qmake
+ のユーザガイドを読むことをお勧めします。
+
+ \section1 簡単な例
+
+ アプリケーションの基本的な実装は既に完了していて、
+ 次のファイルが作成されていると仮定します。
+
+ \list
+ \o hello.cpp
+ \o hello.h
+ \o main.cpp
+ \endlist
+
+ これらのファイルは Qt ディストリビューションの
+ \c{examples/qmake/tutorial} ディレクトリにあります。
+ アプリケーションの設定について知っておくべきことは、
+ それが Qt で書かれているということだけです。
+ まず、テキストエディタで \c{examples/qmake/tutorial} に
+ \c hello.pro というファイルを作成します。
+ 最初にすることは、開発プロジェクトに含まれるソースファイルとヘッダファイルを
+ \c qmake に教える行を追加することです。
+
+ ソースファイルをプロジェクトファイルに追加します。
+ これには \l{qmake Variable Reference#SOURCES}{SOURCES} 変数を使います。
+ 新しい行を作り、\c{SOURCES +=}、続いて hello.cpp を入力します。
+ つまり、以下のようになります:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 108
+
+ これを以下のようになるまでプロジェクトの各ソースファイルに対して行います:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 109
+
+ make に似たシンタックスを使いたい場合は、
+ 以下のように改行をエスケープしてすべてのファイルを 1 行に書きます:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 110
+
+ ソースファイルの一覧をプロジェクトファイルに追加しました。
+ 次にヘッダファイルを追加します。
+ ヘッダファイルはソースファイルと全く同じ方法で追加することができます。
+ ただし変数は \l{qmake Variable Reference#HEADERS}{HEADERS}
+ を使います。
+
+ これを終えると、プロジェクトファイルは以下のようになるでしょう:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 111
+
+ ターゲットの名前は自動的に設定され、
+ プロジェクトファイルと同じ名前になります。
+ ただしプラットフォームに合わせたサフィックスがつけられます。
+ 例えば、プロジェクトファイルが \c hello.pro である場合、
+ ターゲットは Windows では \c hello.exe 、Unix では \c hello になります。
+ プロジェクトファイルで別の名前を指定することもできます:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 112
+
+ 最後に \l{qmake Variable Reference#CONFIG}{CONFIG} 変数を設定します。
+ このアプリケーションは Qt アプリケーションなので \c CONFIG に
+ \c qt を追加する必要があります。
+ \c qmake は リンクの必要があるライブラリを追加し、
+ \c moc と \c uic の実行コマンドが Makefile に含まれるようにします。
+
+ 最終的なプロジェクトファイルは以下のようになります:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 113
+
+ \c qmake を使って、このアプリケーションのための Makefile を生成します。
+ プロジェクトのディレクトリでコマンドラインに次のように入力します:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 114
+
+ そして、使用するコンパイラによって \c make または \c nmake を入力します。
+
+ Visual Studio ユーザの場合、\c qmake は、以下のように
+ \c .dsp ファイルまたは \c .vcproj ファイルも作成できます:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 115
+
+ \section1 アプリケーションをデバッグできるようにする
+
+ アプリケーションのリリースバージョンはデバッグシンボルなどのデバッグ情報を含みません。
+ 開発中は、関連情報を含むアプリケーションのデバッグバージョンを作成するのが便利です。
+ これは、プロジェクトファイルの \c CONFIG 変数に \c debug
+ を追加することで簡単に実現できます。
+
+ たとえば:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 116
+
+ 直前の例と同様に、Makefile を生成するには \c qmake を使います。
+ アプリケーションをデバッグ環境で実行する際に役に立つ情報を得られるようになります。
+
+ \section1 プラットフォーム固有のソースファイルを追加する
+
+ 数時間コーディングをしていると、
+ アプリケーションにプラットフォーム固有な部分が出てきて
+ プラットフォーム固有のコードを別のファイルに分けたい場合があるかもしれません。
+ ここでは 2 つのファイル \c hellowin.cpp と \c hellounix.cpp があるとして、
+ これをプロジェクトファイルに追加します。
+ これらのファイルをそのまま \c SOURCES 変数に追加することはできません。
+ なぜなら、両方のファイルが Makefile に追加されてしまうからです。
+ \c qmake が実行されたプラットフォームにしたがって処理されるスコープを使う必要があります。
+
+ Windows 用のファイルを追加するシンプルなスコープは以下のようになります:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 117
+
+ \c qmake が Windows 上で実行されると、ソースファイルのリストに
+ \c hellowin.cpp が追加されます。
+ \c qmake が他のプラットフォームで実行された場合、この部分は無視されます。
+ 次に Unix 用ファイルのスコープを作成します。
+
+ これを終えると、プロジェクトファイルは以下のようになります:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 118
+
+ これまでと同様に、Makefile を生成するには \c qmake を使います。
+
+ \section1 ファイルが存在しない場合に qmake を中止する
+
+ 特定のファイルが存在しない場合に Makefile を作成したくない場合、
+ exists() 関数を使ってファイルが存在するかどうかを確認することができます。
+ また error() 関数を使って \c qmake の処理を中止させることができます。
+ これらの関数はスコープとして動作します。
+ 使い方はスコープの条件をこれらの関数で置き換えるだけです。
+ \c main.cpp ファイルの確認は以下のようになります :
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 119
+
+ 記号 \c{!} はテストを否定します。
+ つまり \c{exists( main.cpp )} はファイルが存在する場合に真になり、
+ \c{!exists( main.cpp )} はファイルが存在しない場合に真になります。
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 120
+
+ 前と同様に、\c qmake を実行して Makefile を生成します。
+ 仮に \c main.cpp の名前を変更すると、上記のメッセージが表示され、
+ \c qmake は処理を中止します。
+
+ \section1 複数の条件をチェックする
+
+ Windows を使っていて、
+ コマンドラインからこのアプリケーションを実行したときに
+ qDebug() の出力を見ることができるようにしたい場合、
+ アプリケーションをコンソールの設定を追加してビルドする必要があります。
+ Windows で Makefile をこの設定にするには、
+ \c CONFIG に \c console を追加します。
+ Windows で実行されていて、\e{かつ} \c CONFIG にすでに \c debug
+ がある場合にのみ \c CONFIG を追加したい場合があるかもしれません。
+ このような場合、2 つのスコープをネストさせて使います。
+ まず 1 つのスコープを作成し、その中にもう 1 つスコープを作成します。
+ そして 2 つのスコープの中に設定を書きます。例えば:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 121
+
+ ネストされたスコープはコロンを使ってつなぐことができます。
+ 最終的なプロジェクトファイルは以下のようになります:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 122
+
+ 以上です。\c qmake のチュートリアルが終了しました。
+ それでは、あなたの開発プロジェクトのプロジェクトファイルを作成してみましょう。
+*/
+
diff --git a/doc/src/ja_JP/development/qtestlib.qdoc b/doc/src/ja_JP/development/qtestlib.qdoc
new file mode 100644
index 0000000..65c4c3f
--- /dev/null
+++ b/doc/src/ja_JP/development/qtestlib.qdoc
@@ -0,0 +1,432 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtestlib-tutorial.html
+ \brief QTestLib を使ったテストの導入ガイド
+ \contentspage QTestLib マニュアル
+ \nextpage {第1章: ユニットテストの作成}{第1章}
+
+ \title QTestLib チュートリアル
+
+ このチュートリアルでは QTestLib フレームワークの機能の初歩的な使い方を説明します。
+ このチュートリアルは全5章で構成されています:
+
+ \list 1
+ \o \l {第1章: ユニットテストの作成}{ユニットテストの作成}
+ \o \l {第2章: データドリブンテスト}{データドリブンテスト}
+ \o \l {第3章: GUI イベントのシミュレート}{GUI イベントのシミュレート}
+ \o \l {第4章: GUI イベントの再現}{GUI イベントの再現}
+ \o \l {第5章: ベンチマークの作成}{ベンチマークの作成}
+ \endlist
+
+*/
+
+
+/*!
+ \example qtestlib/tutorial1
+
+ \contentspage {QTestLib チュートリアル}{目次}
+ \nextpage {第2章: データドリブンテスト}{第2章}
+
+ \title 第1章: ユニットテストの作成
+
+ 第1章では、クラスのテストを行うシンプルなユニットテストを作成して実行する方法を説明します。
+
+ \section1 テストを作成する
+
+ QString クラスの挙動をテストすると仮定しましょう。
+ まず、テスト関数を含むクラスが必要です。
+ このクラスは、 QObject を継承する必要があります:
+
+ \snippet examples/qtestlib/tutorial1/testqstring.cpp 0
+
+ QTest ヘッダーを include してください。
+ それから、テストフレームワークがテスト関数を検索して実行できるよう、
+ テスト関数を private slot として宣言する必要があります。
+
+ 次に、テスト関数を実装します。実装は以下のようになります:
+
+ \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 8
+
+ \l QVERIFY() マクロは、引数として渡される式を評価します。
+ 式が真と評価されるとテスト関数の実行が継続されます。
+ そうでなければ、エラーメッセージがテストログに追加されテスト関数の実行が停止します。
+
+ テストログに詳細情報を追加したい場合は、
+ \l QCOMPARE() マクロを代わりに使用してください:
+
+ \snippet examples/qtestlib/tutorial1/testqstring.cpp 1
+
+ 文字列が等しくない場合、両方の文字列の内容がテストログに追加され、
+ 比較に失敗した理由を直ちに確認できます。
+
+ 最後に、テストケースを実行可能にするために以下の2行が必要となります:
+
+ \snippet examples/qtestlib/tutorial1/testqstring.cpp 2
+
+ \l QTEST_MAIN() マクロは、すべてのテスト関数を実行するシンプルな
+ \c main() 関数に展開されます。
+ テストクラスの宣言と実装が \c .cpp ファイルに存在する場合、
+ Qt のメタオブジェクト機能を動作させるために、
+ 生成された moc ファイルを include する必要があります。
+
+ \section1 テストを実行する
+
+ 作成したテストを実行してみましょう。
+ テストが \c testqstring.cpp
+ として空のディレクトリに保存されていると仮定して、
+ qmake を使用してプロジェクトを作成し、makefile を生成します。
+
+ \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 9
+
+ \bold {注:} Windows をお使いの場合、 \c make を \c nmake または、
+ 任意のビルドツールに置き換えてください。
+
+ 作成した実行ファイルを実行すると、次の出力が表示されます:
+
+ \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 10
+
+ おめでとうございます!
+ QTestLib フレームワークを使用して、
+ 最初のユニットテストの作成と実行に成功しました。
+*/
+
+/*!
+ \example qtestlib/tutorial2
+
+ \previouspage {第1章: ユニットテストの作成}{第1章}
+ \contentspage {QTestLib チュートリアル}{目次}
+ \nextpage {第3章: GUI イベントのシミュレート}{第3章}
+
+ \title 第2章: データドリブンテスト
+
+ 本章ではテストを複数回、それぞれ異なるテストデータを使用して行う方法について、
+ 例を示しながら説明します。
+
+ これまでは、テストデータをテスト関数にハードコードしていました。
+ この場合、テストデータを追加した関数は以下のようになります:
+
+ \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 11
+
+ 関数が繰り返しを行うコードによって分散するのを防ぐために、
+ QTestLib はテストデータのテスト関数への追加をサポートします。
+ そのために、別の private slot をテストクラスに追加する必要があります:
+
+ \snippet examples/qtestlib/tutorial2/testqstring.cpp 0
+
+ \section1 データ関数を記述する
+
+ テスト関数に関連するデータ関数では、テスト関数と同じ関数名を使用して、
+ 末尾に \c{_data} を追加します。
+ データ関数は以下のようになります:
+
+ \snippet examples/qtestlib/tutorial2/testqstring.cpp 1
+
+ まず、 \l QTest::addColumn() 関数を使用して、
+ テストテーブルの2つの要素(テスト文字列(\c{"string"})および、
+ QString::toUpper() 関数をその文字列に適用するときに予期された結果(\c{"result"}))
+ を定義します。
+
+ 次に、 \l QTest::newRow() 関数を使用して、
+ データをテーブルに追加します。
+ それぞれのデータセットは、テストテーブルでは別々の行(Row)になります。
+
+ \l QTest::newRow() は、データセット名をその引数として受け付けます。
+ テストに失敗した場合、テストログでこのデータセット名が使用され、
+ 失敗したデータの一覧が表示されます。
+ 続いて、最初に任意の文字列(\c{"string"})を、次に
+ QString::toUpper() 関数をその文字列(\c{"string"})に適用するときに予期された結果(\c{"result"})の順に、
+ テーブル行にデータセットをストリーミングします。
+
+ テストデータとは、二次元テーブルを指します。
+ ここでは、\c string および \c result と呼ばれる2つの列と3つの行が含まれます。
+ さらに、インデックスと同様に、各行に名前を関連付けます:
+
+ \table
+ \header
+ \o index
+ \o name
+ \o string
+ \o result
+ \row
+ \o 0
+ \o all lower
+ \o "hello"
+ \o HELLO
+ \row
+ \o 1
+ \o mixed
+ \o "Hello"
+ \o HELLO
+ \row
+ \o 2
+ \o all upper
+ \o "HELLO"
+ \o HELLO
+ \endtable
+
+ \section1 テスト関数を書き換える
+
+ ここで、テスト関数の書き換えを行います:
+
+ \snippet examples/qtestlib/tutorial2/testqstring.cpp 2
+
+ TestQString::toUpper() 関数は 3 回実行されます。
+ すなわち、関連する TestQString::toUpper_data()
+ 関数で作成したテストテーブルの各エントリ毎に一度実行されます。
+
+ TestQString::toUpper() 関数では
+ まず、 \l QFETCH() マクロを使用して、データセットの2つの要素を取得します。
+ \l QFETCH() は、要素のデータタイプと要素名の、
+ 2 つの引数を取ります。
+ 次に \l QCOMPARE() マクロを使用して、テストを実行します。
+
+ このアプローチにより、テストの修正を行うことなく
+ テストに新規データを非常に簡単に追加できます。
+
+ このテストの場合も、テストケースを実行可能にするには、
+ 同様に以下の2行が必要です:
+
+ \snippet examples/qtestlib/tutorial2/testqstring.cpp 3
+
+ これまでと同様に、 \l QTEST_MAIN() マクロは
+ すべてのテスト関数を実行するシンプルな
+ \c main() 関数に展開されます。
+ テストクラスの宣言と実装が \c .cpp ファイルに存在する場合、
+ Qt のメタオブジェクト機能を動作させるために、
+ 生成された moc ファイルを include する必要があります。
+
+*/
+
+/*!
+ \example qtestlib/tutorial3
+
+ \previouspage {第2章: データドリブンテスト}{第2章}
+ \contentspage {QTestLib チュートリアル}{目次}
+ \nextpage {第4章: GUI イベントの再現}{第4章}
+
+ \title 第3章: GUI イベントのシミュレート
+
+ QTestLib にはグラフィカルユーザインターフェースをテストするための機能があります。
+ QTestLib は、ネイティブなウィンドウシステムのイベントをシミュレートする代わりに、
+ Qt の内部で使われるイベントを送信します。
+ このため、テストが実行されるコンピュータには
+ 副次的な悪影響が発生しません。
+
+ 本章では、シンプルな GUI テストを作成する方法を確認します。
+
+ \section1 GUI テストを作成する
+
+ 今回は、 QLineEdit クラスの挙動をテストすると仮定しましょう。
+ これまでと同様に、テスト関数を含むクラスが必要です:
+
+ \snippet examples/qtestlib/tutorial3/testgui.cpp 0
+
+ 唯一の違いは、 QTest だけでなく、 QtGui クラスの宣言を
+ include する必要があることです。
+
+ \snippet examples/qtestlib/tutorial3/testgui.cpp 1
+
+ テスト関数を実装する際は、最初に QLineEdit を作成します。
+ 次に、 \l QTest::keyClicks() 関数を使用して、
+ "hello world" をラインエディットに入力する操作をシミュレートします。
+
+ \note キーボードショートカットを正しくテストするには、
+ ウィジェットの表示も必要になります。
+
+ QTest::keyClicks() は、
+ ウィジェットのキーシーケンスの入力をシミュレートします。
+ 必要に応じてキーボード修飾子の指定や、
+ 各キー入力後の遅延(ミリ秒単位)を指定することができます。
+ 同様に、 QTest::keyClick() 、 QTest::keyPress() 、 QTest::keyRelease() 、
+ QTest::mouseClick() 、 QTest::mouseDClick() 、 QTest::mouseMove() 、
+ QTest::mousePress() 及び QTest::mouseRelease() 関数を使用して、
+ 関連付けられた GUI イベントをシミュレートできます。
+
+ 最後に、 \l QCOMPARE() マクロを使用して、
+ ラインエディットの文字列が正しいかどうか確認します。
+
+ これまでと同様に、
+ テストケースを実行可能にするには、
+ 以下の2行が必要です:
+
+ \snippet examples/qtestlib/tutorial3/testgui.cpp 2
+
+ QTEST_MAIN() マクロは
+ すべてのテスト関数を実行するシンプルな
+ \c main() 関数に展開されます。
+ テストクラスの宣言と実装が \c .cpp ファイルに存在する場合、
+ Qt のメタオブジェクト機能を動作させるために、
+ 生成された moc ファイルを include する必要があります。
+*/
+
+/*!
+ \example qtestlib/tutorial4
+
+ \previouspage {第3章: GUI イベントのシミュレート}{第3章}
+ \contentspage {QTestLib チュートリアル}{目次}
+ \nextpage {第5章: ベンチマークの作成}{第5章}
+
+ \title 第4章: GUI イベントの再現
+
+ 本章では、GUI イベントをシミュレートしたり、
+ あるウィジェットで一連の GUI イベントを再生したり保存したりする方法について説明します。
+
+ 一連のイベントを保存して再生するアプローチは、
+ \l{第2章: データドリブンテスト}{第2章}
+ で説明したアプローチとよく似ています。
+ 必要な変更は、テストクラスにデータ関数を追加することです:
+
+ \snippet examples/qtestlib/tutorial4/testgui.cpp 0
+
+ \section1 データ関数を記述する
+
+ これまでと同様にテスト関数に関連するデータ関数では、
+ テスト関数と同じ名前を使用して末尾に \c{_data} を追加します。
+
+ \snippet examples/qtestlib/tutorial4/testgui.cpp 1
+
+ まず、 QTest::addColumn() 関数を使用して、
+ テーブルの2つの要素(GUI イベントのリスト(\c{"events"})および、
+ QWidget のイベントのリストを適用するときに予期された結果(\c{"expected"}))を定義します。
+ 最初の要素の型は \l QTestEventList であることに注意してください。
+
+ QTestEventList では、後で使用するテストデータの保存を行うために
+ GUI イベントを読み込んだり、 QWidget ウィジェットで再生したりできます。
+
+ 現在のデータ関数で、 \l QTestEventList を2つ作成します。
+ 最初のリストには 'a' キーを一度だけ入力します。
+ QTestEventList::addKeyClick() 関数を使用して、
+ リストにイベントを追加します。
+ 次に、QTest::newRow() 関数を使用してデータセットに名前を付けて、
+ テーブルにイベントリストおよび予期された結果をストリーミングします。
+
+ 2つ目のリストには、2つのキー入力('a' に続いてバックスペース(Qt::Key_Backspace))を設定します。
+ QTestEventList::addKeyClick() を使用してリストにイベントを追加し、
+ QTest::newRow() を使用して名前を関連付けたテーブルにイベントリストおよび予期された結果を挿入します。
+
+ \section1 テスト関数を書き換える
+
+ ここで、テストの書き換えを行います:
+
+ \snippet examples/qtestlib/tutorial4/testgui.cpp 2
+
+ TestGui::testGui() 関数は2回実行されます。
+ 関連する TestGui::testGui_data()
+ 関数で作成したテストデータの各エントリ毎にそれぞれ実行されます。
+
+ まず、\l QFETCH() マクロを使用して、データセットの2つの要素を取得します。
+ \l QFETCH() は、要素のデータ型と要素名の2つの引数を取ります。
+ 次に QLineEdit を作成し、 QTestEventList::simulate() 関数を使用して
+ ウィジェットにイベントのリストを適用します。
+
+ 最後に、 QCOMPARE() マクロを使用してラインエディットの文字列が正しいかどうか確認します。
+
+ これまでと同様に、
+ テストケースを実行可能にするには、
+ 以下の2行が必要です:
+
+ \snippet examples/qtestlib/tutorial4/testgui.cpp 3
+
+ \l QTEST_MAIN() マクロは
+ すべてのテスト関数を実行するシンプルな
+ \c main() 関数に展開されます。
+ テストクラスの宣言と実装が \c .cpp ファイルに存在する場合、
+ Qt のメタオブジェクト機能を動作させるために、
+ 生成された moc ファイルを include する必要があります。
+*/
+
+/*!
+ \example qtestlib/tutorial5
+
+ \previouspage {第4章: GUI イベントの再現}{第4章}
+ \contentspage {QTestLib チュートリアル}{目次}
+
+ \title 第5章: ベンチマークの作成
+
+ 最終章となる本章では QTestLib を使ってベンチマークを作成する方法について説明します。
+
+ \section1 ベンチマークの作成
+ ベンチマークを作成するには QBENCHMARK マクロを用いてテスト関数を拡張します。
+ ベンチマークテスト関数には通常、テストの準備コードと測定するコードを含む
+ QBENCHMARK マクロが一つ含まれます。
+ QString::localeAwareCompare() のベンチマークを行う関数は以下のようになります。
+
+ \snippet examples/qtestlib/tutorial5/benchmarking.cpp 0
+
+ 測定の準備は関数の最初に行われています。
+ この時点では測定は始まっていません。
+ QBENCHMARK マクロで囲まれたブロックの中身のみが計測されます。
+ このブロックの内部は正確な測定を行うために、何度か繰り返し実行される場合があります。
+
+ \l {testlib-benchmarking-measurement}{ベンチマークの方法}(バックエンド)は何種類か用意されており、
+ コマンドライン引数から選択することが出来ます。
+
+ \section1 データ関数
+
+ データ関数は複数のデータでベンチマークを行うテストを作成するのに有用です。
+ たとえば、ロケール準拠と標準的な比較を行う場合は以下のようになります。
+
+ \snippet examples/qtestlib/tutorial5/benchmarking.cpp 1
+
+ テスト関数ではデータに従ってベンチマークする手法を決定します。
+
+ \snippet examples/qtestlib/tutorial5/benchmarking.cpp 2
+
+ "if (useLocaleCompare)" 文はそのオーバヘッドを測定対象外とするために
+ QBENCHMARK マクロのブロックの外部にあります。
+ ベンチマークの実行時にはそれぞれどちらか一つの QBENCHMARK マクロが実行されます。
+
+ \section1 外部ツール
+
+ テストデータの可視化を行うためのツールが Qt Labs Web サイトの
+ \l{qtestlib-tools} プロジェクトに含まれています。
+ そこには実行したテストの結果からパフォーマンスを比較したり、
+ パフォーマンスのWeb用グラフを作成するツールが含まれています。
+
+ それらのツールの詳細と簡単なグラフの例は
+ \l{qtestlib-tools Announcement} を参照してください。
+
+*/
+
+
+
diff --git a/doc/src/ja_JP/examples/arrowpad.qdoc b/doc/src/ja_JP/examples/arrowpad.qdoc
new file mode 100644
index 0000000..2518264
--- /dev/null
+++ b/doc/src/ja_JP/examples/arrowpad.qdoc
@@ -0,0 +1,248 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example linguist/arrowpad
+ \title サンプル: アローパッド
+
+ この例では、\e {Qt Linguist} の主なコンセプトである"文脈"について、
+ 少し詳しく取り上げて説明します。
+ また、2つ以上の言語を使用する方法についても説明します。
+
+ \image linguist-arrowpad_en.png
+
+ アプリケーションで使用可能な言語の数に制限はありませんが、
+ ここではフランス語とオランダ語の2言語の翻訳を使用します。
+ \c arrowpad.pro の関連する行は以下のとおりです。
+
+ \snippet examples/linguist/arrowpad/arrowpad.pro 0
+ \codeline
+ \snippet examples/linguist/arrowpad/arrowpad.pro 1
+
+ \c lupdate を実行すると、2つの類似したメッセージファイル
+ \c arrowpad_fr.ts と \c arrowpad_nl.ts が作成されます。
+ これらのファイルにはすべてのソーステキストとその文脈が含まれます。
+ それらのテキストは \c tr() の呼び出しを通じて翻訳対象として
+ ソースコード内でマークされているものです。
+
+ Qt アプリケーションの翻訳の詳細については、
+ \l{Qt Linguist manual}{Qt Linguist マニュアル} をご覧ください。
+
+ \section1 各行の簡単な解説
+
+ \c arrowpad.h では、 QWidget の派生クラスである \c ArrowPad
+ クラスを定義します。
+ 上記のスクリーンショットで
+ 中央の 4 つのボタンを持つウィジェットが \c ArrowPad です。
+
+ \snippet examples/linguist/arrowpad/arrowpad.h 0
+ \snippet examples/linguist/arrowpad/arrowpad.h 1
+ \snippet examples/linguist/arrowpad/arrowpad.h 2
+
+ \c lupdate を実行するとソーステキストの抽出だけでなく、
+ 文脈へのグループ化を行うことができます。
+ ソーステキストが表示されるクラスの名前が文脈となります。
+ 従って、この例では、"ArrowPad" が
+ \c ArrowPad クラスの文字列の文脈です。
+ \c Q_OBJECT のマクロは、以下の内容で
+ \c ArrowPad に \c tr(x) を定義します:
+
+ \snippet doc/src/snippets/code/doc_src_examples_arrowpad.qdoc 0
+
+ 各ソーステキストが表示されるクラスを把握しておくと、
+ \e {Qt Linguist} で論理的に関連のある文字列をグループ化することが出来ます。
+ 例えば、ダイアログ内のすべての文字列には
+ ダイアログのクラス名の文脈が含まれるため、同時に表示されます。
+ 文字列が表示される文脈によって翻訳の内容が影響を受ける場合があるため、
+ 翻訳者にとって有用な情報となります。
+ 一部の翻訳では、キーボードショートカットを変更する必要があります。
+ また、同じグループにまとめられた特定の文脈(クラス)
+ にすべてのソーステキストを含めることにより、
+ 翻訳者はコンフリクトを起こすことなく、
+ より簡単にショートカットを変更できます。
+
+ \c arrowpad.cpp で、\c ArrowPad クラスを実装します。
+
+ \snippet examples/linguist/arrowpad/arrowpad.cpp 0
+ \snippet examples/linguist/arrowpad/arrowpad.cpp 1
+ \snippet examples/linguist/arrowpad/arrowpad.cpp 2
+ \snippet examples/linguist/arrowpad/arrowpad.cpp 3
+
+ ラベルはユーザ表示可能な文字列であるため、
+ ボタンのラベルごとに \c ArrowPad::tr() を呼び出します。
+
+ \image linguist-arrowpad_en.png
+
+ \snippet examples/linguist/arrowpad/mainwindow.h 0
+ \snippet examples/linguist/arrowpad/mainwindow.h 1
+
+ 上記のスクリーンショットでは、ウィンドウ全体が \c MainWindow です。
+ これは、\c mainwindow.h ヘッダーファイルで定義します。
+ ここでも、\c MainWindow が \e {Qt Linguist} の文脈になるよう、
+ \c Q_OBJECT を使用します。
+
+ \snippet examples/linguist/arrowpad/mainwindow.cpp 0
+
+ \c MainWindow と \c mainwindow.cpp を実装する際に、
+ \c ArrowPad クラスのインスタンスを作成します。
+
+ \snippet examples/linguist/arrowpad/mainwindow.cpp 1
+
+ また、\c MainWindow::tr() を、
+ アクションおよびショートカット用に、計 2 回呼び出します。
+
+ \c tr() を使用して、言語によって異なるキーをサポートします。
+ 英語の場合、"Ctrl+Q" は Quit (終了) に適していますが、
+ オランダ語の翻訳者は "Ctrl+A" (Afsluiten の場合) を、
+ ドイツ語の翻訳者は "Strg+E" (Beenden の場合) を使うといいでしょう。
+ \key Ctrl キーショートカットを \c tr() で使用する場合は
+ 引数を 2 つ使用して、
+ ショートカットが実行する機能を2番目の引数に記述してください。
+
+ \c main.cpp で定義した標準的な \c main() 関数は、以下のようになります。
+
+ \snippet examples/linguist/arrowpad/main.cpp 2
+ \snippet examples/linguist/arrowpad/main.cpp 3
+
+ 現在のロケールに基づいて、使用する翻訳を選択します。
+ 例えば、QLocale::system() は、
+ \c LANG 環境変数の設定によって影響を受ける場合があります。
+ \c .qm メッセージファイル(および TS ファイル)の命名規則に
+ ロケールを使用すると、
+ 簡単にロケールに基づいて翻訳ファイルを選択することが
+ できるようになります。
+
+ 選択したロケールに QM メッセージファイルが存在しない場合、
+ 元のソーステキストが使用され、エラーは生成されません。
+
+ \section1 フランス語からオランダ語に翻訳する
+
+ ここでは、サンプルアプリケーションをフランス語に翻訳することから始めます。
+ \e {Qt Linguist} を起動し、\c arrowpad_fr.ts の作業を行います。
+ 2つの文脈 ("ArrowPad" および "MainWindow")
+ にグループ化された7つのソーステキスト ("\&Up", "\&Left" 等)
+ が含まれているはずです。
+
+ 次に、以下の翻訳を入力します:
+
+ \list
+ \o \c ArrowPad
+ \list
+ \o \&Up - \&Haut
+ \o \&Left - \&Gauche
+ \o \&Right - \&Droite
+ \o \&Down - \&Bas
+ \endlist
+ \o \c MainWindow
+ \list
+ \o E\&xit - \&Quitter
+ \o Ctrl+Q - Ctrl+Q
+ \o \&File - \&Fichier
+ \endlist
+ \endlist
+
+ 翻訳の入力が終わったら、 \key{Ctrl+Return} (もしくは\gui {完了にして次へ}
+ ボタン)を押すと、
+ 翻訳が完了とマークされ次のソーステキストに移動するため便利です。
+
+ ファイルを保存して、オランダ語の翻訳でも同じ手順を実行し、
+ \c arrowpad_nl.ts の作業を行います:
+
+ \list
+ \o \c ArrowPad
+ \list
+ \o \&Up - \&Omhoog
+ \o \&Left - \&Links
+ \o \&Right - \&Rechts
+ \o \&Down - Omlaa\&g
+ \endlist
+ \o \c MainWindow
+ \list
+ \o E\&xit - \&Afsluiten
+ \o Ctrl+Q - Ctrl+A
+ \o File - \&Bestand
+ \endlist
+ \endlist
+
+ \c tt1_fr.ts と \c tt1_nl.ts の翻訳ソースファイルは
+ QM ファイルに変換する必要があります。
+ 以前と同様の方法で \e {Qt Linguist} を使用して変換できますが、
+ コマンドラインツール \c lrelease を使うと
+ \e {Qt Linguist} から個々の \gui {ファイル|リリース} を読み込まなくても、
+ アプリケーションの\e{すべての} QM ァイルを作成できます。
+
+ 以下を入力します:
+
+ \snippet doc/src/snippets/code/doc_src_examples_arrowpad.qdoc 1
+
+ これにより、\c arrowpad_fr.qm と \c arrowpad_nl.qm が作成されます。
+ \c LANG 環境変数を \c fr に設定します。
+ Unix では、以下の2つのコマンドのいずれかが機能します。
+
+ \snippet doc/src/snippets/code/doc_src_examples_arrowpad.qdoc 2
+
+ Windows では、\c autoexec.bat を修正するか、以下を実行します。
+
+ \snippet doc/src/snippets/code/doc_src_examples_arrowpad.qdoc 3
+
+ プログラムを実行すると、フランス語版が表示されます:
+
+ \image linguist-arrowpad_fr.png
+
+ \c LANG=nl を設定し、オランダ語でも同じ手順を実行します。
+ これで、オランダ語版が表示されます:
+
+ \image linguist-arrowpad_nl.png
+
+ \section1 エクササイズ
+
+ \e {Qt Linguist} で未完了の翻訳を行います。
+ 例えば、各テキストのチェックマークをクリックして翻訳を未完了の状態にして保存します。
+ その後、 \c lupdate 、\c lrelease 、サンプルの順に実行します。
+ この変更がどのような影響を及ぼしましたか。
+
+ \c LANG=fr_CA (フランス語(カナダ))に設定し、
+ サンプルプログラムを再実行します。
+ \c LANG=fr の場合と同じ結果になる理由を説明してください。
+
+ オランダ語翻訳のショートカットのいずれかを変更し、
+ \e \&Bestand と \e \&Boven の競合を解消します。
+*/
diff --git a/doc/src/ja_JP/examples/hellotr.qdoc b/doc/src/ja_JP/examples/hellotr.qdoc
new file mode 100644
index 0000000..cc01b81
--- /dev/null
+++ b/doc/src/ja_JP/examples/hellotr.qdoc
@@ -0,0 +1,200 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example linguist/hellotr
+ \title サンプル: こんにちは tr()
+
+ これは、小さな Hello World プログラムを日本語に翻訳する例です。
+ 以下のスクリーンショットは英語版です。
+
+ \image linguist-hellotr_en.png
+
+ Qt アプリケーションの翻訳に関する詳細は、\l{Qt Linguist manual}
+ をご覧ください。
+
+ \section1 各行の簡単な解説
+
+ \snippet examples/ja_JP/linguist/hellotr/main.cpp 0
+
+ この行では、 QTranslator クラスの宣言を読み込みます。
+ QTranslator クラスのオブジェクトは、
+ ユーザに表示する文字列を翻訳します。
+
+ \snippet examples/ja_JP/linguist/hellotr/main.cpp 5
+
+ 親をもたない QTranslator オブジェクトを作成します。
+
+ \snippet examples/ja_JP/linguist/hellotr/main.cpp 6
+
+ プログラムで使用するソーステキストの日本語の翻訳を含む、
+ \c hellotr_ja.qm ( \c .qm というファイル拡張子は省略します)
+ と呼ばれるファイルを読み込みます。
+ ファイルが見つからなくてもエラーは発生しません。
+
+ \snippet examples/ja_JP/linguist/hellotr/main.cpp 7
+
+ \c hellotr_ja.qm の翻訳を、プログラムで使用する翻訳プールに追加します。
+
+ \snippet examples/ja_JP/linguist/hellotr/main.cpp 8
+
+ "Hello world!" を表示するプッシュボタンを作成します。
+ 検索した \c hellotr_ja.qm に "Hello world!" の翻訳が含まれている場合、
+ その翻訳が表示されます。
+ 含まれていない場合、翻訳前のテキストがそのまま表示されます。
+
+ QObject を継承するすべてのクラスには、\c tr() 関数が含まれます。
+ QObject クラスのメンバ関数内では、\c QPushButton::tr("Hello world!")
+ や \c QObject::tr("Hello world!") の代わりに、シンプルに
+ \c tr("Hello world!") を使います。
+
+ \section1 英語版のアプリケーションを実行する
+
+ 翻訳ファイル \c hellotr_ja.qm の作成が終わっていないため、
+ 以下のアプリケーションを起動したときに元の文字列が表示されます。
+
+ \image linguist-hellotr_en.png
+
+ \section1 日本語のメッセージファイルを作成する
+
+ 最初のステップは、プロジェクトのすべてのソースファイルを列挙する
+ \c hellotr.pro を作成することです。
+ プロジェクトファイルは、qmake プロジェクトファイルまたは、通常の
+ makefile である可能性があります。
+ 以下の記述を含むプロジェクトファイルを作成してください。
+
+ \snippet examples/ja_JP/linguist/hellotr/hellotr.pro 0
+ \snippet examples/ja_JP/linguist/hellotr/hellotr.pro 1
+
+ \c TRANSLATIONS は、管理するメッセージファイルを指します。
+ この例では、日本語の翻訳のみ管理します。
+
+ ファイル拡張子は、\c .qm ではなく、\c .ts であることにご注意ください。
+ \c .ts は翻訳のソースファイルのフォーマットであり、
+ アプリケーションの開発時に使用します。
+ プログラマーまたはリリースマネージャーは \c lupdate プログラムを実行し、
+ ソースコードから抽出したソーステキストを使用して
+ TS ファイルの生成と更新を行います。
+ 翻訳者は、 \e {Qt Linguist} を使用して TS ファイルの読み取りと更新を行い、
+ 翻訳の追加と編集を行います。
+
+ TS の形式は、ユーザが直接閲覧可能な XML 形式であるため、
+ 直接Eメールで送信したり、簡単にバージョン管理の対象にすることが出来ます。
+ このファイルを手動で編集する場合、XML の既定のエンコードは UTF-8 で、
+ Latin1(ISO 8859-1)ではないことに気をつけてください。
+ '\oslash'(ノルウェー語の o にスラッシュが付いたもの)などの
+ Latin1 文字を入力する1つの方法は、XML エンティティ "&#xf8;"
+ を使用することです。
+ これはすべての Unicode 4.0 文字に対して有効です。
+
+ 翻訳が完了したら、\c lrelease プログラムを使用して、
+ TS ファイルを QM ファイル(Qt Message ファイル)形式に変換します。
+ QM 形式は、極めて高速な検索性能を実現するようにデザインされた
+ コンパクトなライブラリ形式です。
+ \c lupdate と \c lrelease はどちらも、
+ プロジェクト全体のソースファイルとヘッダーファイル
+ (プロジェクトファイルの HEADERS および SOURCES 行で指定されている)
+ を読み取り、\c tr() 関数呼び出しの際に表示される文字列を抽出します。
+
+ \c lupdate は、メッセージファイル(この場合は \c hellotr_ja.ts)
+ の作成と更新を行い、これらをソースコードと同期させるために使用します。
+ \c lupdate にはデータの削除機能がないため、
+ \c lupdate はいつでも安全に実行できます。
+ 例えば、ソースが変更されるたびに TS ファイルが更新されるよう、
+ makefile に記述できます。
+
+ それでは、以下のように \c lupdate を実行してみましょう:
+
+ \snippet doc/src/ja_JP/snippets/code/doc_src_examples_hellotr.qdoc 0
+
+ (\c -verbose オプションは、操作を説明するメッセージを表示するよう
+ \c lupdate に指示します。)
+ 現在のディレクトリに、以下の内容で
+ \c hellotr_ja.ts ファイルが作成されていると思います:
+
+ \snippet doc/src/ja_JP/snippets/code/doc_src_examples_hellotr.qdoc 1
+
+ ツール (\c lupdate、 \e {Qt Linguist}、\c lrelease)
+ を使用して読み取りと更新を行うため、
+ ファイル形式を理解する必要はありません。
+
+ \section1 Qt Linguist を使用して日本語に翻訳する
+
+ XML やテキストエディタを使用して、TS ファイルを翻訳することも出来ますが、
+ ここでは \e {Qt Linguist} を使用して翻訳を行います。
+
+ \e {Qt Linguist} を起動するには、以下を入力します。
+
+ \snippet doc/src/ja_JP/snippets/code/doc_src_examples_hellotr.qdoc 2
+
+ 左上のペインに "QPushButton" が表示されるはずです。
+ これをダブルクリックし、次に "Hello world!" をクリックして、
+ \gui Translation ペイン (ウィンドウ右中央)に
+ "こんにちは、世界!" と入力します。
+ 感嘆符(!)を忘れないように付けてください!
+
+ \gui{完了} チェックボックスをオンにして、
+ メニューバーから \gui{ファイル|保存} を選択します。
+ TS ファイルから、以下の記述がなくなります。
+
+ \snippet doc/src/ja_JP/snippets/code/doc_src_examples_hellotr.qdoc 3
+
+ その代わりに以下が含まれます。
+
+ \snippet doc/src/ja_JP/snippets/code/doc_src_examples_hellotr.qdoc 4
+
+ \section1 日本語版のアプリケーションを実行する
+
+ 日本語版のアプリケーションを実行する前に、
+ TS ファイルから QM ファイルを生成する必要があります。
+ QM ファイルは、\e {Qt Linguist}(単一の TS ファイルの場合)のメニューから、
+ もしくは、コマンドラインプログラム \c lrelease を使用して生成できます。
+ \c lrelease を使用する場合、
+ プロジェクトファイルに列挙されている TS ファイルごとに
+ 1 つの QM ファイルを作成することが出来ます。
+ \e {Qt Linguist} のメニューバーから \gui{ファイル|リリース} を選択し、
+ ポップアップ表示される \gui{ファイルの保存} ダイアログで\gui{保存}を選択し、
+ \c hellotr_ja.ts から \c hellotr_ja.qm を生成します。
+ 今すぐ \c hellotr プログラムを再実行してみましょう。
+ これで、ボタンに "こんにちは、世界!" と表示されます。
+
+ \image linguist-hellotr_ja.png
+*/
diff --git a/doc/src/ja_JP/examples/trollprint.qdoc b/doc/src/ja_JP/examples/trollprint.qdoc
new file mode 100644
index 0000000..1686774
--- /dev/null
+++ b/doc/src/ja_JP/examples/trollprint.qdoc
@@ -0,0 +1,286 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example linguist/trollprint
+ \title サンプル: トロールプリント
+
+ トロールプリント(Troll Print)は、
+ ユーザがプリンタの設定をするためのサンプルアプリケーションです。
+ これには、英語とポルトガル語の2つのバージョンが用意されています。
+
+ \image linguist-trollprint_10_en.png
+
+ この例では、いくつかのポルトガル語の翻訳を含む翻訳ファイル
+ \c trollprint_pt.ts を用意しました。
+
+ 同じアプリケーションの2つのバージョン、
+ Troll Print 1.0 と 1.1 をリリースすることを想定します。
+ 1つのバージョンで作成した翻訳を次のリリースで再利用する方法を習得します。
+ (このチュートリアルでは、いくつかのソースファイルの編集が必要です。
+ 新しい一時ディレクトリにすべてのファイルをコピーして、
+ ここで作業を行うのがベストでしょう。)
+
+ Qtアプリケーションの翻訳の詳細については、
+ \l{Qt Linguist manual}{Qt Linguist マニュアル} をご覧ください。
+
+ \section1 各行の簡単な解説
+
+ \c PrintPanel クラスを \c printpanel.h で宣言します。
+
+ \snippet examples/linguist/trollprint/printpanel.h 0
+
+ \c PrintPanel は QWidget の派生クラスです。
+ \c tr() が正しく動作するには、\c Q_OBJECT マクロが必要です。
+
+ 実装ファイルは \c printpanel.cpp です。
+
+ \snippet examples/linguist/trollprint/printpanel.cpp 0
+
+ Troll Print 1.0 で一部のコードがコメントアウトされています。
+ Troll Print 1.1 にバージョンアップする際に、
+ コメントから戻してください。
+
+ \snippet examples/linguist/trollprint/printpanel.cpp 1
+ \snippet examples/linguist/trollprint/printpanel.cpp 2
+
+ PrintPanel では、\c tr("Enabled") と \c tr("Disabled")
+ を2回ずつ使用することに注意してください。
+ "Enabled" と "Disabled" はどちらも同じ文脈で表示されるため、
+ \e {Qt Linguist} では、それぞれ1回目の使用に対してのみ表示され、
+ 2回目以降の使用に対しては翻訳が流用されるため表示されません。
+ これは便利な時間短縮ツールですが、ポルトガル語などの一部の言語では、
+ 2回目の使用に対して異なる翻訳が必要になります。
+ これから、\e {Qt Linguist}で、
+ すべての \c tr() に対して異なる翻訳を表示できるように設定する方法を学習します。
+
+ \c MainWindow, \c mainwindow.h はシンプルなヘッダーファイルです。
+ \c mainwindow.cpp の実装には、翻訳対象としてマークする必要のある
+ ユーザに表示するソーステキストがあります。
+
+ \snippet examples/linguist/trollprint/mainwindow.cpp 0
+
+ ウィンドウのタイトルは翻訳する必要があります。
+
+ \snippet examples/linguist/trollprint/mainwindow.cpp 1
+ \snippet examples/linguist/trollprint/mainwindow.cpp 3
+
+ また、アクションとメニューも翻訳する必要があります。
+ キーボードショートカット "Ctrl+Q" に対して使用している \c tr()
+ の第 2 引数は、このショートカットがどのような機能を有しているかを
+ 翻訳者に示す唯一の情報であることに注意してください。
+
+ \snippet examples/linguist/trollprint/main.cpp 0
+
+ \c main.cpp の \c main() 関数は、
+ \l{linguist/arrowpad}{アローパッド} の例の場合と同じになります。
+ 具体的には、現在のロケールに基づいて、翻訳ファイルを選択します。
+
+ \section1 英語とポルトガル語で Troll Print 1.0 を実行する
+
+ 既存の \c trollprint_pt.ts ファイルの翻訳を使用します。
+
+ \c LANG 環境変数を \c pt に設定して、\c trollprint を実行します。
+ QM ファイルがないため、スクリーンショットは英語版のままです。
+ ここで、\c lrelease (例: \c {lrelease trollprint.pro})を実行し、
+ サンプルを再実行します。
+ これで、ポルトガル語版(Troll Imprimir 1.0)になりました:
+
+ \image linguist-trollprint_10_pt_bad.png
+
+ 翻訳は正しく表示されていますが、誤りがあります。
+ 文法的に正しいポルトガル語では、
+ "Enabled" が2回目に使用されるときの正しい翻訳は、
+ "Ativado" ではなく "Ativadas" であり、
+ "Disabled" が2回目に翻訳されるときも、
+ 語尾を同様に変化させる必要があります。
+
+ \e {Qt Linguist} で \c trollprint_pt.ts を開くと、
+ ソースコードには "Enabled" と "Disabled" が2回ずつ使われていますが、
+ 翻訳ソースファイルでは1回ずつしか使われていません。
+ これは、\e {Qt Linguist} では、
+ ソーステキストが重複する場合は翻訳を流用することにより、
+ 翻訳者の作業を最小限に抑えようとするためです。
+ このように類似した翻訳に誤りがある場合、
+ プログラマは繰り返し使用する際に翻訳の曖昧さを排除する必要があります。
+ これは、2個の引数を取る\c tr() を使用することにより、
+ 容易に実行できます。
+
+ 実際には、翻訳者の"文脈"は変更する必要のある文字列が表示されるクラスに対するクラス名であるため、
+ どのファイルを変更すべきか簡単に特定できます。
+ この場合、ファイルは \c printpanel.cpp であり、
+ 変更すべき行は4行あります。
+ ラジオボタンの最初のペアの \c tr() 呼び出しに、2つ目の引数 "two-sided"(両面) をに追加します:
+
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 0
+
+ そして、ラジオボタンの2番目のペアの \c tr() 呼び出しに、
+ 2つ目の引数 "colors"(色) を追加します。
+
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 1
+
+ ここで、\c lupdate を実行し、\e {Qt Linguist} で
+ \c trollprint_pt.ts を開きます。2 つの変更個所がわかるはずです。
+
+ まず、翻訳ソースファイルには、\e{3組}の "Enabled" と
+ "Disabled" のペアが含まれています。
+ 最初のペアは、既に利用されていないテキストであることを意味する灰色になっています。
+ これは、 \c tr() 内の文字列が第二引数を追加した新たな
+ \c tr() の文字列で置き換えられたからです。
+ 2番目のペアには、"two-sided"(両面) というコメントが含まれており、
+ 3番目のペアには、"colors"(色) というコメントが含まれています。
+ これらのコメントは、\e {Qt Linguist} に
+ \gui {開発者のコメント} として表示されます。
+
+ 次に、翻訳者の作業を最小限に抑えるために、
+ 新たに使用される "Enabled" と "Disabled" の文字列に対して、
+ 訳語 "Ativado" と "Desativado" が自動的に使用されます。
+ これらの訳語は、これらの原語が2回目に使用される場合の正しい翻訳ではありません。
+ ここからが、チュートリアルの出発点です。
+
+ 2番目の "Ativado" を "Ativadas" に、
+ 2番目の "Desativado" を "Desativadas" に変更し、保存して終了します。
+ \c lrelease を実行して最新のバイナリ \c trollprint_pt.qm ファイルを作成し、
+ Troll Print (または Troll Imprimir) を実行します。
+
+ \image linguist-trollprint_10_pt_good.png
+
+ \e {Qt Linguist} では "comments" と呼ばれる
+ \c tr() 呼び出しの2つ目の引数は、
+ 同じ文脈(クラス)で発生する類似したソーステキストを識別します。
+ コメントは、たとえば Ctrl キーによるキーボードショートカットが
+ ショートカットによって実行される機能を伝達する唯一の手段である場合等に、
+ 翻訳者に情報を提供するのに便利です。
+
+ 翻訳者に情報を提供する他の手段は、
+ 翻訳の必要があるソーステキストを含むアプリケーションの
+ 特定の部分への移動方法に関する情報を提供することです。
+ これにより、翻訳者は、翻訳が表示される文脈を確認し、
+ 翻訳を検索してテストを行うことができます。
+ これは、ソースコードで \c TRANSLATOR
+ コメントを使用して行います:
+
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 2
+
+ 一部のソースファイル、特にダイアログクラスのコメントに
+ ダイアログに到達するまでに必要な操作を記述します。
+ また、\c mainwindow.cpp や \c printpanel.cpp など、
+ 適切なサンプルファイルにこれらを追加することもできます。
+ \c lupdate を実行して \e {Qt Linguist} を起動し、
+ \c trollprint_pt.ts を読み込みます。
+ ソーステキストの一覧を参照する際に、
+ \gui{ソーステキスト}と\gui{開発者のコメント}
+ の領域に表示されるコメントを確認できます。
+
+ 特に大きなプログラムでは、翻訳者が自分の翻訳を探し、
+ それが適切かどうかを確認することが困難な場合があります。
+ コメントは役立つナビゲーション情報を提供するため、
+ 翻訳に要する時間を節約できます:
+
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 3
+
+ \section1 Troll Print 1.1
+
+ これから、Troll Print のバージョン 1.1 のリリースの準備を行います。
+ テキストエディターを起動して、次の手順に従って変更を行ってください:
+
+ \list
+ \o \c printpanel.cpp の文字列 "\<b\>TROLL PRINT\</b\>" を引数に
+ QLabel を作成する2つの行のコメントを解除します。
+ \o ソースの変更: \c printpanel.cpp で、"2-sided" を
+ "Two-sided" に置き換えます。
+ \o \c mainwindow.cpp で、すべての "1.0" を "1.1" に置き換えます。
+ \o \c mainwindow.cpp で、著作権表示の年号を 1999-2000 に更新します。
+ \endlist
+
+ (実際のアプリケーションでは、バージョン番号と著作権表示の年号は
+ const または #define をつかって定義するでしょう。)
+
+ 終了したら、\c lupdate を実行し、\e {Qt Linguist} で
+ \c trollprint_pt.ts を開きます。以下の項目は、特別なコンテンツです:
+
+ \list
+ \o \c MainWindow
+ \list
+ \o Troll Print 1.0 - 古いテキストとして灰色でマーク
+ \o About Troll Print 1.0 - 古いテキストとして灰色でマーク
+ \o Troll Print 1.0. Copyright 1999 Software, Inc. -
+ 古いテキストとして灰色でマーク
+ \o Troll Print 1.1 - 自動的に "Troll Imprimir 1.1" に翻訳(未完了)
+ \o About Troll Print 1.1 - 自動的に "Troll Imprimir 1.1" に翻訳(未完了)
+ \o Troll Print 1.1. Copyright 1999-2000 Software,
+ Inc. - 自動的に "Troll Imprimir 1.1.
+ Copyright 1999-2000 Software, Inc." に翻訳(未完了)
+ \endlist
+ \o \c PrintPanel
+ \list
+ \o 2-sided - 古いテキストとして灰色でマーク
+ \o \<b\>TROLL PRINT\</b\> - 未翻訳のテキストとして"?"マーク
+ \o Two-sided - 未翻訳のテキストとして"?"マーク
+ \endlist
+ \endlist
+
+ \c lupdate は、修正を容易に行い、数字の処理を効率的に行うために、
+ 様々な処理を行っています。
+
+ \c MainWindow の翻訳の見直しを行います。
+ "\<b\>TROLL PRINT\</b\>" を "\<b\>TROLL IMPRIMIR\</b\>" と翻訳します。
+ "Two-sided" を翻訳する際には、\gui{フレーズと推測} の欄から
+ "2-lados" をダブルクリックして訳に選択した後に、
+ "2" を "Dois" に変更します。
+
+ 保存して終了し、\c lrelease を実行します。
+ ポルトガル語版の表示は以下のようになります:
+
+ \image linguist-trollprint_11_pt.png
+
+ \gui{Ajuda|Sobre} (\gui{Help|About}) を選択し、
+ バージョン情報ボックスを確認します。
+
+ \gui{Ajuda|Sobre Qt} (\gui{Help|About Qt}) を選択した場合、
+ 英語版のダイアログが表示されます。
+ Qt の翻訳はまだ終わっていません。
+ 詳細については、\l{Internationalization with Qt} を参照してください。
+
+ ここで、\c LANG=en を設定し、元の英語版を実行してみてください:
+
+ \image linguist-trollprint_11_en.png
+*/
diff --git a/doc/src/ja_JP/getting-started/tutorials.qdoc b/doc/src/ja_JP/getting-started/tutorials.qdoc
new file mode 100644
index 0000000..701ba88
--- /dev/null
+++ b/doc/src/ja_JP/getting-started/tutorials.qdoc
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page tutorials.html
+ \title チュートリアル
+
+ \contentspage How to Learn Qt
+ \nextpage Qt Examples
+
+ \brief Qt の学習を助けるチュートリアルやガイドの概要
+
+ \nextpage Qt Examples
+
+ Qt で提供されているこれらのチュートリアルやガイドは
+ 新たに Qt の開発を始めるユーザの良い助けとなります。
+ これらのドキュメントでは ウィジェットの基本的な使い方から始まり
+ ステップバイステップでアプリケーションの使い方を学ぶことが出来ます。
+
+ \table
+ \row
+ \o{2,1} \l{ウィジェットのチュートリアル}{\bold ウィジェット}
+ \o{2,1} \l{チュートリアル: アドレス帳}{\bold {アドレス帳}}
+ \row
+ \o \image widget-examples.png Widgets
+ \o
+ ウィジェットとレイアウトを使って GUI アプリケーションを作成する
+ 初心者向けのガイドです。
+
+ \o \image addressbook-tutorial.png AddressBook
+ \o
+ 完全な機能を持つアドレス帳アプリケーションを作成する 7 章で構成されたガイドです。
+
+ \row
+ \o{2,1} \l{Qt Designer クイックガイド}{\bold{Qt Designer}}
+ \o{2,1} \l{Qt Linguist Manual: Programmers#Tutorials}{\bold {Qt Linguist}}
+ \row
+ \o \image designer-examples.png QtDesigner
+ \o
+ \QD を使ってフォームを生成する基本的な手順を説明するクイックガイドです。
+
+ \o \image linguist-examples.png QtLinguist
+ \o
+ \l{サンプル: こんにちは tr()}{こんにちは tr()}、
+ \l{サンプル: アローパッド}{アローパッド}、
+ \l{サンプル: トロールプリント}{トロールプリント}
+ の三例を通じて翻訳の方法を説明します。
+
+ \row
+ \o{2,1} \l{QTestLib チュートリアル}{\bold QTestLib}
+ \o{2,1} \l{qmake チュートリアル}{\bold qmake}
+ \row
+ \o{2,1}
+ Qt のユニットテストフレームワークである QTestLib の機能の初歩的な使い方を説明するチュートリアルです。
+ このチュートリアルは4章で構成されています。
+
+ \o{2,1}
+ \c qmake の使い方を説明するチュートリアルです。
+ このチュートリアルを卒業した後は \l{qmake Manual}{qmake user guide}(英語)
+ を読むことをお勧めします。
+
+ \endtable
+*/
diff --git a/doc/src/ja_JP/images/linguist-hellotr_en.png b/doc/src/ja_JP/images/linguist-hellotr_en.png
new file mode 100644
index 0000000..05aa945
--- /dev/null
+++ b/doc/src/ja_JP/images/linguist-hellotr_en.png
Binary files differ
diff --git a/doc/src/ja_JP/images/linguist-hellotr_ja.png b/doc/src/ja_JP/images/linguist-hellotr_ja.png
new file mode 100644
index 0000000..d9beb01
--- /dev/null
+++ b/doc/src/ja_JP/images/linguist-hellotr_ja.png
Binary files differ
diff --git a/doc/src/ja_JP/snippets/code/doc_src_examples_hellotr.qdoc b/doc/src/ja_JP/snippets/code/doc_src_examples_hellotr.qdoc
new file mode 100644
index 0000000..e05cd12
--- /dev/null
+++ b/doc/src/ja_JP/snippets/code/doc_src_examples_hellotr.qdoc
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+lupdate -verbose hellotr.pro
+//! [0]
+
+
+//! [1]
+<!DOCTYPE TS><TS>
+<context>
+ <name>QPushButton</name>
+ <message>
+ <source>Hello world!</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
+//! [1]
+
+
+//! [2]
+linguist hellotr_ja.ts
+//! [2]
+
+
+//! [3]
+<translation type='unfinished'></translation>
+//! [3]
+
+
+//! [4]
+<translation>こんにちは、世界!</translation>
+//! [4]
diff --git a/doc/src/ja_JP/tutorials/addressbook.qdoc b/doc/src/ja_JP/tutorials/addressbook.qdoc
new file mode 100644
index 0000000..9fb1059
--- /dev/null
+++ b/doc/src/ja_JP/tutorials/addressbook.qdoc
@@ -0,0 +1,1070 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page tutorials-addressbook.html
+
+ \title チュートリアル: アドレス帳
+ \brief シンプルだが、完全な機能を持つアプリケーションの作成を通じた
+ GUI プログラミングへの導入。
+
+ このチュートリアルでは、Qt クロスプラットフォームフレームワークを使用した
+ GUI プログラミングの概要について説明しています。
+
+ \image addressbook-tutorial-screenshot.png
+
+ \omit
+ It doesn't cover everything; the emphasis is on teaching the programming
+ philosophy of GUI programming, and Qt's features are introduced as needed.
+ Some commonly used features are never used in this tutorial.
+ \endomit
+
+ このチュートリアルでは以下に示す Qt の基本的な機能を学ぶことが出来ます:
+
+ \list
+ \o ウィジェットとレイアウトマネージャ
+ \o コンテナクラス
+ \o シグナル/スロット
+ \o 入力デバイスと出力デバイス
+ \endlist
+
+ Qt を初めて利用する方は、最初に \l{How to Learn Qt} をご覧ください。
+
+ チュートリアルの目次:
+
+ \list 1
+ \o \l{tutorials/addressbook/part1}{ユーザインターフェースの設計}
+ \o \l{tutorials/addressbook/part2}{アドレスの追加}
+ \o \l{tutorials/addressbook/part3}{項目間のナビゲーション}
+ \o \l{tutorials/addressbook/part4}{アドレスの編集と削除}
+ \o \l{tutorials/addressbook/part5}{検索機能の追加}
+ \o \l{tutorials/addressbook/part6}{読み込みと保存}
+ \o \l{tutorials/addressbook/part7}{その他の機能}
+ \endlist
+
+ このチュートリアルのソースコードは、Qt の
+ \c examples/tutorials/addressbook ディレクトリに置かれています。
+
+ この小さなアプリケーションは本格的な最新の GUI
+ アプリケーションのようには見えませんが、
+ 複雑なアプリケーションで使用される多くの基本的な技術が採用されています。
+ このチュートリアルが終わったら、
+ メニューやツールバー、ステータスバーなどを表示する
+ 小さな GUI アプリケーションである
+ \l{mainwindows/application}{Application}
+ のサンプルをチェックすることをお勧めします。
+
+*/
+
+/*!
+ \page tutorials-addressbook-part1.html
+
+ \example tutorials/addressbook/part1
+ \title 第1章 - ユーザインターフェースのデザイン
+
+ 本チュートリアルの第1章では
+ アドレス帳アプリケーションで使用する基本的なインターフェース
+ (GUI) の設計について説明します。
+
+ GUI プログラム作成の最初のステップは、
+ ユーザインターフェースを設計することです。
+ 本章の目標は、基本的なアドレス帳アプリケーションを実装するのに必要な
+ ラベルと入力フィールドを設定することです。
+ 下図は、ここで作成しようとしているアドレス帳のスクリーンショットです。
+
+ \image addressbook-tutorial-part1-screenshot.png
+
+ ユーザがアドレス帳に名前や住所を入力できるようにするには、
+ 2つの QLabel のオブジェクトである \c nameLabel 及び \c addressLabel と、
+ 入力フィールドとして QLineEdit オブジェクトの \c nameLine と
+ QTextEdit オブジェクトの \c addressText が必要です。
+ 使用するウィジェットとその配置は下図に示してあります。
+
+ \image addressbook-tutorial-part1-labeled-screenshot.png
+
+ 以下の3つのファイルを使用してこのアドレス帳を実装します:
+
+ \list
+ \o \c{addressbook.h} - \c AddressBook クラスを宣言するファイル、
+ \o \c{addressbook.cpp} - \c AddressBook クラスを実装するファイル、
+ \o \c{main.cpp} - \c AddressBook クラスのインスタンスを持つ
+ \c main() 関数を含むファイル。
+ \endlist
+
+ \section1 Qt プログラミング - 派生クラスの作成
+
+ Qt プログラムを作成する際は、
+ 通常 Qt オブジェクトの派生クラスを作成して機能を追加します。
+ これは、カスタムウィジットや標準的なウィジェットの集合体を作成する場合の
+ 重要なコンセプトの1つです。
+ ウィジェットの挙動の拡張や変更のために派生クラスを作成することには
+ 以下のような利点があります:
+
+ \list
+ \o 仮想関数または純粋仮想関数の実装を行って要求される機能を実装できます。
+ 必要によっては基底クラスの実装にフォールバックして利用できます。
+
+ \o これにより、アプリケーションのその他の部分が
+ ユーザインターフェースの個々のウィジェットを指定する必要がないよう、
+ ユーザインターフェースの一部をクラス内にカプセル化できます。
+
+ \o 派生クラスは、同一のアプリケーションまたはライブラリに
+ 複数のカスタムウィジットを作成するために使用できます。
+ また、派生クラスのコードは、他のプロジェクトで再利用可能です。
+
+ \endlist
+
+ Qt ではアドレス帳ウィジェットを提供していないため、
+ 標準的な Qt ウィジェットクラスを継承して機能を追加します。
+ 本チュートリアルで作成する \c AddressBook クラスは、
+ 基本的なアドレス帳ウィジェットが必要な場合に再利用できます。
+
+ \section1 AddressBook クラスの宣言
+
+ \l{tutorials/addressbook/part1/addressbook.h}{\c addressbook.h}
+ ファイルは、 \c AddressBook クラスを宣言するために使用します。
+
+ ここでは \c AddressBook を QWidget の派生クラスとし、
+ コンストラクタを宣言することから始めます。
+ また、 Q_OBJECT マクロを使用して、クラスで多言語化機能及び、
+ Qt のシグナル/スロット機能が使われていることを示します。
+ ただし、現段階ではこれらの機能の全てを使わない場合もあります。
+
+ \snippet tutorials/addressbook/part1/addressbook.h class definition
+
+ クラスは、 前述した QLineEdit と QTextEdit のプライベートなインスタンス
+ \c nameLine と \c addressText の宣言を保有します。
+ 後述の章で、 \c nameLine 及び \c addressText に保存したデータが、
+ 多くのアドレス帳の機能で必要になることがわかるでしょう。
+
+ 我々が使用する QLabel オブジェクトは、
+ 一旦作成すると後で参照する必要がないため、宣言する必要はありません。
+ Qt でオブジェクトの所有権を追跡する方法については、次節で説明します。
+
+ Q_OBJECT マクロ自体は、Qt のより高度な機能を実装します。
+ ここでは、 Q_OBJECT マクロを、 \l{QObject::}{tr()} 及び
+ \l{QObject::}{connect()} 関数を使用可能にする
+ ショートカットとみなしたほうが良いでしょう。
+
+ これで、 \c addressbook.h ファイルが完成しました。
+ 次は対応する \c addressbook.cpp ファイルの実装を行います。
+
+ \section1 AddressBook クラスの実装
+
+ \c AddressBook のコンストラクタは、 \a{parent} パラメータとして
+ QWidget を受け取ります。
+ 慣例により、このパラメータを基底クラスのコンストラクタに渡します。
+ 親が複数の子を所有できるというこの所有概念は、
+ Qt でウィジェットのグループ化を行う場合に有用です。
+ 例えば、親を削除すると、親に属する子も全て削除されます。
+
+ \snippet tutorials/addressbook/part1/addressbook.cpp constructor and input fields
+
+ このコンストラクタ内で、 \c nameLine と \c addressText のインスタンスを生成し、
+ 2つのローカル QLabel オブジェクトの \c nameLabel と \c addressLabel
+ を宣言し、そのインスタンスを生成します。
+ \l{QObject::tr()}{tr()} 関数は、
+ 翻訳した文字列が存在する場合にそれを返します。
+ そうでない場合は、引数の文字列自体を返します。
+ この関数は文字列が他の言語に翻訳されるようにマークする役目を持ちます。
+ 翻訳可能な文字列を使用するたびに、マークしてください。
+
+ Qt を使用してプログラミングを行う場合、
+ レイアウトが機能する仕組みを理解していると便利です。
+ Qt は主に、以下の3つのレイアウトクラスを提供します。
+ ウィジェットの配置を処理するための QHBoxLayout 、 QVBoxLayout 及び
+ QGridLayout です。
+
+ \image addressbook-tutorial-part1-labeled-layout.png
+
+ ここでは、 QGridLayout を使って、
+ ラベルと入力フィールドを配置します。
+ QGridLayout は、有効なスペースを格子状に分割し、
+ 行/列番号により指定するセルに、ウィジェットを配置します。
+ 上図は、レイアウトセルとウィジェットの位置を示しており、
+ 以下のコードを使用して、この配置を指定します:
+
+ \snippet tutorials/addressbook/part1/addressbook.cpp layout
+
+ \c addressLabel は、追加引数として Qt::AlignTop を用いて配置されていることに注意してください。
+ これは、セル(1,0) で縦方向の中央に配置されないようにするためです。
+ Qt のレイアウトにおける基本概念については、
+ \l{Layout Management} のドキュメントをご覧ください。
+
+ ウィジェットにレイアウトオブジェクトをインストールするには、
+ ウィジェットの \l{QWidget::setLayout()}{setLayout()}
+ 関数を呼び出す必要があります。
+
+ \snippet tutorials/addressbook/part1/addressbook.cpp setting the layout
+
+ 最後に、ウィジェットのタイトルを "Simple Address Book" とします。
+
+ \section1 アプリケーションを実行する
+
+ 別のファイル \c main.cpp に、 \c main() 関数に実装します。
+ この関数内で、QApplication である \c app のインスタンスを生成します。
+ QApplication は、既定のフォントやカーソルなど
+ アプリケーションに共通な複数のリソース及び、
+ イベントループの実行に関与しています。
+ 従って、Qt を使用する全ての GUI アプリケーションでは、
+ 必ず QApplication が存在します。
+
+ \snippet tutorials/addressbook/part1/main.cpp main function
+
+ スタックに新しい \c AddressBook ウィジェットを生成し、
+ \l{QWidget::show()}{show()} 関数を呼び出して表示します。
+ ただし、ウィジェットはアプリケーションのイベントループが
+ 開始されるまで表示されません。
+ アプリケーションの \l{QApplication::}{exec()} 関数を呼び出して、
+ イベントループを開始します。
+ この関数により返された結果は、 \c main() 関数の戻り値として使用されます。
+ この時点で、スタックで \c AddressBook
+ をインスタンス化した理由が明らかになります。
+ イベントループが終了すると \c main() 関数のスコープの外に移動します。
+ それに伴って \c AddressBook 及び、
+ これに属する全ての子ウィジェットが削除されるため、
+ メモリリークを防ぐことができます。
+*/
+
+/*!
+ \page tutorials-addressbook-part2.html
+
+ \example tutorials/addressbook/part2
+ \title 第2章 - アドレスの追加
+
+ 基本的なアドレス帳アプリケーションを作成するための次の手順は、
+ ユーザからの操作を可能にすることです。
+
+ \image addressbook-tutorial-part2-add-contact.png
+
+ 新しい連絡先を追加するために、
+ ユーザがクリックするプッシュボタンを作成します。
+ また、これらの連絡先を整理して保存するために、
+ 何らかのデータ構造が必要になります。
+
+ \section1 AddressBook クラスの宣言
+
+ ラベルと入力フィールドの設定が完了しているため、
+ 連絡先を追加する際に必要なプッシュボタンを追加します。
+ \c addressbook.h ファイルに、
+ 3つの QPushButton オブジェクトを宣言し、
+ 対応する3つの public slot を作成します。
+
+ \snippet tutorials/addressbook/part2/addressbook.h slots
+
+ スロットとは特定のシグナルに応答して呼び出される関数をいいます。
+ このコンセプトについては、 \c AddressBook
+ クラスを実装する際にさらに詳細に取り上げます。
+ なお、Qt のシグナル/スロットのコンセプトの概要については、
+ \l{Signals and Slots} のドキュメントを参照してください。
+
+ 3つの QPushButton オブジェクト \c addButton 、 \c submitButton 、
+ \c cancelButton は、前章の \c nameLine と \c addressText とともに、
+ プライベート変数宣言に含まれています。
+
+ \snippet tutorials/addressbook/part2/addressbook.h pushbutton declaration
+
+ アドレス帳の連絡先を横断して表示するには、
+ 連絡先保持用のコンテナが必要です。
+ QMap のオブジェクトである \c contacts をこの目的に使用します。
+ \c contacts にはキーとして連絡先の名前 \e key
+ とそれに対応する値として連絡先の住所 \e value を格納します。
+
+ \snippet tutorials/addressbook/part2/addressbook.h remaining private variables
+
+ QString の2つのプライベートオブジェクトとして \c oldName と \c oldAddress
+ も宣言します。
+ これらのオブジェクトは、ユーザが \gui Add
+ をクリックする前に最後に表示した連絡先の名前と住所が含まれている必要があります。
+ ユーザが \gui Cancel
+ をクリックすると、最後に表示した連絡先の詳細に戻って表示することが出来ます。
+
+ \section1 AddressBook クラスの実装
+
+ \c AddressBook のコンストラクタ内で、連絡先の詳細を編集することなく
+ 表示のみを行えるよう、 \c nameLine と \c addressText
+ を読み取り専用に設定します。
+
+ \dots
+ \snippet tutorials/addressbook/part2/addressbook.cpp setting readonly 1
+ \dots
+ \snippet tutorials/addressbook/part2/addressbook.cpp setting readonly 2
+
+ 次に、プッシュボタン \c addButton 、 \c submitButton 、 \c cancelButton
+ のインスタンスを生成します。
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp pushbutton declaration
+
+ \c addButton を、 \l{QPushButton::show()} 関数を呼び出して表示します。
+ \c submitButton と \c cancelButton は、
+ \l{QPushButton::hide()}{hide()} を呼び出して非表示にします。
+ これら2つのプッシュボタンはユーザが \gui Add
+ をクリックした場合にのみ表示され、後に説明する
+ \c addContact() によって処理されます。
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp connecting signals and slots
+
+ 各プッシュボタンの \l{QPushButton::clicked()}{clicked()} を、
+ それぞれのスロットに接続します。
+ 下図はこれを説明したものです。
+
+ \image addressbook-tutorial-part2-signals-and-slots.png
+
+ 次に、 QVBoxLayout を使用して、
+ アドレス帳ウィジェットの右側にプッシュボタンを
+ 上下一列に配置します。
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp vertical layout
+
+ \l{QBoxLayout::addStretch()}{addStretch()} 関数は、
+ プッシュボタンを等間隔に並べるのではなく、
+ ウィジェット上部に近づけて配置するために使用します。
+ 下図は、\l{QBoxLayout::addStretch()}{addStretch()} を使用した場合と、
+ 使用しない場合の違いを示しています。
+
+ \image addressbook-tutorial-part2-stretch-effects.png
+
+ 次に、\l{QGridLayout::addLayout()}{addLayout()} を使用して、
+ \c buttonLayout1 を \c mainLayout に追加します。
+ \c buttonLayout1 は \c mainLayout の子となり、
+ レイアウトが入れ子になりました。
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp grid layout
+
+ レイアウトの配置は以下のようになります:
+
+ \image addressbook-tutorial-part2-labeled-layout.png
+
+ \c addContact() では、最後に表示した連絡先の詳細を、
+ \c oldName と \c oldAddress に保存します。
+ 次に、これらの入力フィールドをクリアし、読み取り専用モードを解除します。
+ \c nameLine にフォーカスをセットして、 \c submitButton と \c cancelButton を表示します。
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp addContact
+
+ \c submitContact() 関数は、以下の次の3つの要素から成ります:
+
+ \list 1
+
+ \o \c nameLine 及び \c addressText から連絡先の詳細を抽出し、
+ QString オブジェクトに保存します。
+ また、ユーザが入力フィールドに何も入力せずに
+ \gui Submit をクリックしないよう確認します。
+ どちらかのフィールドが空であれば、ユーザに名前と住所の入力を求める
+ QMessageBox が表示されます。
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp submitContact part1
+
+ \o 続けて、連絡先が既に存在するかどうか確認します。
+ 存在しない場合は \c contacts に連絡先を追加して QMessageBox を表示し、
+ 連絡先が追加されたことをユーザに知らせます。
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp submitContact part2
+
+ 連絡先が既に存在する場合、 QMessageBox を表示し、
+ 連絡先が重複して追加されないように
+ 連絡先が存在することをユーザに知らせます。
+ \c contacts オブジェクトは、名前と住所のキー値のペアで構成されているため、
+ \e key が一意であることを確認します。
+
+ \o 上記の両方の事例に対処したら、
+ 以下のコードを使ってプッシュボタンを通常の状態に戻します:
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp submitContact part3
+
+ \endlist
+
+ 以下のスクリーンショットは、ユーザに情報メッセージを表示するために使用する
+ QMessageBox オブジェクトです。
+
+ \image addressbook-tutorial-part2-add-successful.png
+
+ \c cancel() 関数は、最後に表示した連絡先の詳細を復元して
+ \c addButton を有効にし、 \c submitButton と \c cancelButton
+ を非表示にします。
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp cancel
+
+ 連絡先を追加する際の概念は、ユーザがいつでも自由に
+ \gui{送信} または \gui{キャンセル} をクリックできるようにすることです。
+ 以下のフローチャートは、この概念を詳細に説明しています:
+
+ \image addressbook-tutorial-part2-add-flowchart.png
+*/
+
+/*!
+ \page tutorials-addressbook-part3.html
+
+ \example tutorials/addressbook/part3
+ \title 第3章 - 項目間のナビゲーション
+
+ アドレス帳アプリケーションは、半分完成しました。
+ 次に表示する連絡先を変更するために、いくつかの関数を追加します。
+ しかし、最初に、これらの連絡先を保存するために使用するデータ構造の種類を決める必要があります。
+
+ 第2章では、連絡先の名前 \e key 及び、連絡先の住所 \e value
+ の鍵と値のペアで QMap を使用しました。
+ これは、この事例で使用するのに適した構造です。
+ ただし、各項目間を移動して表示するには、多少の機能拡張が必要です。
+
+ QMap を、最初の要素と最後の要素を含むすべての要素が接続された
+ 循環リストに似たデータ構造に、機能拡張します。
+ 下図はこのデータ構造を説明したものです。
+
+ \image addressbook-tutorial-part3-linkedlist.png
+
+ \section1 AddressBook クラスの宣言
+
+ アドレス帳アプリケーションにナビゲーション機能を追加するには、
+ \c AddressBook クラスに2つのスロットを追加する必要があります。
+ next() 及び \c previous() を
+ \c addressbook.h ファイルに追加します。
+
+ \snippet tutorials/addressbook/part3/addressbook.h navigation functions
+
+ また、新たに2つの QPushButton オブジェクトが必要になります。
+ プライベート変数として
+ \c nextButton と \c previousButton を宣言します。
+
+ \snippet tutorials/addressbook/part3/addressbook.h navigation pushbuttons
+
+ \section1 AddressBook クラスの実装
+
+ \c addressbook.cpp の \c AddressBook コンストラクタでは、
+ \c nextButton と \c previousButton のインスタンスを生成し
+ 初期設定で無効にします。
+ これは、アドレス帳に複数の連絡先が存在しない場合、
+ ナビゲーションを有効にしないためです。
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp navigation pushbuttons
+
+ これらのプッシュボタンを、それぞれスロットに接続します:
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp connecting navigation signals
+
+ 以下の画像は、ここで作成しようとしている
+ グラフィカルユーザインターフェースです。
+ 最終アプリケーションが完成間近であることがわかるでしょう。
+
+ \image addressbook-tutorial-part3-screenshot.png
+
+ \c next() と \c previous() では基本的な規約に従って、
+ \c nextButton を右側に、 \c previousButton を左側に配置します。
+ 直感的でわかりやすいレイアウトに仕上げるために、
+ QHBoxLayout を使用してウィジェットを横に並べて配置します:
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp navigation layout
+
+ 次に、 \c mainLayout に、QHBoxLayout のオブジェクトである
+ \c buttonLayout2 を追加します。
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp adding navigation layout
+
+ 下図は、 \c mainLayout のウィジェットの配置を示します。
+ \image addressbook-tutorial-part3-labeled-layout.png
+
+ \c addContact() 関数内部では、
+ ユーザが連絡先を追加しているときに移動しないよう、
+ これらのボタンを無効にする必要があります。
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp disabling navigation
+
+ また、 \c submitContact() 関数では、 \c contacts のサイズに応じて、
+ ナビゲーションボタン \c nextButton 及び \c previousButton を有効にします。
+ 前述のように、アドレス帳に複数の連絡先が存在しない場合は、
+ ナビゲーションを有効にできません。
+ 以下のコードは、その処理方法を示しています。
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp enabling navigation
+
+ \c cancel() 関数にも、これらの処理を含めます。
+
+ ここで、QMap のオブジェクト \c contacts を使って、
+ 循環リストをエミュレートしましょう。
+ \c next() 関数で、 \c contacts のイテレータを作成し、次に:
+
+ \list
+ \o イテレータが \c contacts の末尾にない場合は、次の項目に移動します。
+
+ \o イテレータが \c contacts の末尾にある場合は、
+ \c contacts の先頭に移動します。
+ これによって、QMap が循環リストのように機能するという印象を与えます。
+ \endlist
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp next() function
+
+ \c contacts 内の正しいオブジェクトに移動したら、
+ \c nameLine と \c addressText に内容を表示します。
+
+ 同様に、 \c previous() 関数で、 \c contacts のイテレータを作成し、次に:
+ \list
+ \o イテレータが \c contacts の末尾にある場合は、
+ 表示をクリアして戻ります。
+
+ \o イテレータが \c contacts の先頭にある場合は、末尾に移動します。
+
+ \o イテレータを直前の項目に移動します。
+ \endlist
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp previous() function
+
+ もう一度、 \c contacts に現在のオブジェクトの内容を表示します。
+*/
+
+/*!
+ \page tutorials-addressbook-part4.html
+
+ \example tutorials/addressbook/part4
+ \title 第4章 - アドレスの編集と削除
+
+ 本章では、アドレス帳アプリケーションに保存されている
+ 連絡先の内容を変更する方法について説明します。
+
+ \image addressbook-tutorial-screenshot.png
+
+ ここでは、連絡先を整理して保存するだけでなく、
+ ナビゲーションが可能なアドレス帳を作成します。
+ 必要に応じて連絡先の詳細を変更できるよう、
+ 編集・削除機能を追加すると便利です。
+ ただし、列挙型書式の若干の改善が必要になります。
+ 前章では、次の2つのモードを扱いました:
+ \c AddingMode 及び \c NavigationMode -
+ ただし、これらは列挙型として定義しませんでした。
+ 代わりに、対応するボタンを手動で有効または無効にし、
+ 複数行のコードを繰り返します。
+
+ 本章では、以下のような2つの異なる値を持つ \c Mode 列挙型を定義します:
+
+ \list
+ \o \c{NavigationMode}
+ \o \c{AddingMode}
+ \o \c{EditingMode}
+ \endlist
+
+ \section1 AddressBook クラスの宣言
+
+ \c addressbook.h ファイルをアップデートし、 \c Mode 列挙型を追加します:
+
+ \snippet tutorials/addressbook/part4/addressbook.h Mode enum
+
+ また、public slot として2つの新しいスロット
+ \c editContact() 及び \c removeContact() を追加します。
+
+ \snippet tutorials/addressbook/part4/addressbook.h edit and remove slots
+
+ モードを切り替えるために、すべての QPushButton オブジェクトの
+ 有効化/無効化を制御する \c updateInterface() 関数を導入します。
+ また、前述の編集と削除を行うスロット用に、2つの新しいボタン
+ \c editButton 及び \c removeButton を追加します。
+
+ \snippet tutorials/addressbook/part4/addressbook.h updateInterface() declaration
+ \dots
+ \snippet tutorials/addressbook/part4/addressbook.h buttons declaration
+ \dots
+ \snippet tutorials/addressbook/part4/addressbook.h mode declaration
+
+ 最後に、現在のモードを保持する列挙型の \c currentMode を宣言します。
+
+ \section1 AddressBook クラスの実装
+
+ ここで、アドレス帳アプリケーションのモード変更機能を実装する必要があります。
+ アドレス帳をはじめて起動するときは、
+ メモリに連絡先が保存されていないため、
+ コンストラクタでは、 \c editButton 及び \c removeButton
+ のインスタンスの生成と無効化を行います。
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp edit and remove buttons
+
+ また、ボタンをそれぞれのスロット \c editContact() 及び \c removeContact()
+ に接続し、 \c buttonLayout1 に追加します。
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp connecting edit and remove
+ \dots
+ \snippet tutorials/addressbook/part4/addressbook.cpp adding edit and remove to the layout
+
+ \c editContact() は、モードを \c EditingMode に切り替える前に、
+ 連絡先の古い詳細情報を、 \c oldName と \c oldAddress に保存します。
+ このモードでは、 \c submitButton と \c cancelButton
+ の両方が有効になるため、ユーザは連絡先の詳細を変更し、
+ どちらか一方のボタンをクリックできます。
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp editContact() function
+
+ \c submitContact() 関数は、 \c{if-else} ステートメントにより、
+ 2つの処理に分割しています。
+ \c currentMode が \c AddingMode であるかどうかを確認します。
+ その場合、連絡先追加の処理を行います。
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp submitContact() function beginning
+ \dots
+ \snippet tutorials/addressbook/part4/addressbook.cpp submitContact() function part1
+
+ \c AddingMode でない場合、 \c currentMode が \c EditingMode
+ であるかどうか確認します。
+ その場合、 \c oldName を \c name と比較します。
+ 名前を変更した場合、 \c contacts から古い連絡先を削除し、
+ 新たに更新した連絡先を挿入します。
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp submitContact() function part2
+
+ 住所のみを変更した場合 (たとえば、 \c oldAddress は \c address と異なる)、
+ 連絡先の住所を更新します。
+ 最後に、 \c currentMode を \c NavigationMode に設定します。
+ これは、無効にしたプッシュボタンをすべて再び有効にするための重要なステップです。
+
+ アドレス帳から連絡先の削除を行う
+ \c removeContact() 関数を実装します。
+ この関数では、まず連絡先が \c contacts に存在するかどうか確認します。
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp removeContact() function
+
+ 存在する場合、ユーザに削除を確認するために、QMessageBox を表示します。
+ ユーザが確認したら、 \c previous() を呼び出して、
+ ユーザインターフェースで他の連絡先を表示できることを確認し、
+ QMap の \l{QMap::remove()}{remove()} 関数を使用して連絡先を削除します。
+ 念のため、QMessageBox を表示してユーザに知らせます。
+ この関数で使用するメッセージボックスを以下に示します:
+
+ \image addressbook-tutorial-part4-remove.png
+
+ \section2 ユーザインターフェースを更新する
+
+ 既に、 \c updateInterface() 関数が
+ 現在のモードに応じてプッシュボタンの有効化と無効化を行うための
+ 手段であることを説明しました。
+ この関数は、渡される \c mode 引数に応じて現在のモードを更新します。
+ なお、引数の値を確認する前に \c currentMode に代入しています。
+
+ このとき、それぞれのプッシュボタンは、
+ 現在のモードに応じて有効または無効になります。
+ \c AddingMode 及び \c EditingMode でのコードを以下に示します:
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp update interface() part 1
+
+ \c NavigationMode の場合、 QPushButton::setEnabled()
+ 関数のパラメータに条件を含めます。
+ これは、アドレス帳に少なくとも1つ以上の連絡先が存在する場合に、
+ \c editButton と \c removeButton が有効であることを確認するためのものです。
+ \c nextButton と \c previousButton は、
+ アドレス帳に少なくとも2つ以上の連絡先が存在する場合にのみ有効になります。
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp update interface() part 2
+
+ モードの設定及び、同一関数内でのユーザインターフェースの更新を行うタスクを実行することにより、
+ アプリケーションの内部状態により
+ ユーザインターフェースが「非同期」になる可能性を防ぎます。
+*/
+
+/*!
+ \page tutorials-addressbook-part5.html
+
+ \example tutorials/addressbook/part5
+ \title 第5章 - 検索機能の追加
+
+ 本章では、アドレス帳アプリケーションの連絡先と住所を
+ 検索する方法について説明します。
+
+ \image addressbook-tutorial-part5-screenshot.png
+
+ アドレス帳アプリケーションへ連絡先の追加を繰り返すと、
+ \e Next 及び \e Previous ボタンによる連絡先のナビゲートが面倒になります。
+ この場合、\e{検索(Find)}機能を使うと、
+ 連絡先の検索をより効率的に行うことができます。
+ 上記スクリーンショットは、\e Find ボタン及び、
+ パネル上のボタンの位置を示します。
+
+ ユーザーが \e Find ボタンをクリックすると、
+ 連絡先の名前の入力を求めるダイアログを表示します。
+ Qt が提供する QDialog クラスを継承して \c FindDialog クラスを導入します。
+
+ \section1 FindDialog クラスの宣言
+
+ \image addressbook-tutorial-part5-finddialog.png
+
+ QDialog を継承するには、最初に、QDialog のヘッダーを
+ \c finddialog.h ファイルで include する必要があります。
+ また、これらのウィジェットをダイアログクラスで使用するため、
+ 前方宣言を使用して QLineEdit と QPushButton を宣言します。
+
+ \c AddressBook クラスと同様に、 \c FindDialog クラスには Q_OBJECT
+ マクロが含まれ、ダイアログが別のウィンドウとして開かれる場合でも、
+ コンストラクタは親 QWidget を取るように定義されます。
+
+ \snippet tutorials/addressbook/part5/finddialog.h FindDialog header
+
+ \c FindDialog のインスタンスを保持するクラスにより使用される
+ パブリック関数 \c getFindText() を定義します。
+ この関数を経由してユーザが入力した検索文字列を取得します。
+ また、ユーザが \gui Find ボタンをクリックしたときに検索文字列を処理するために、
+ public slot として \c findClicked() を定義します。
+
+ 最後に、\gui Find ボタンに対応するプライベート変数として \c findButton 、
+ ユーザが検索文字列を入力するラインエディット \c lineEdit 及び、
+ 後の作業で使用する検索文字列を保存するために使用する内部文字列として
+ \c findText の定義を行います。
+
+ \section1 FindDialog クラスの実装
+
+ \c FindDialog のコンストラクタ内で、プライベート変数の
+ \c lineEdit 、 \c findButton 及び \c findText を設定します。
+ QHBoxLayout を用いてウィジェットを配置します。
+
+ \snippet tutorials/addressbook/part5/finddialog.cpp constructor
+
+ シグナルをそれぞれのスロットに接続し、
+ レイアウトとウィンドウのタイトルを設定します。
+ \c findButton の \l{QPushButton::clicked()} シグナルは、
+ \c findClicked() と \l{QDialog::accept()}{accept()}
+ に接続されていることがわかります。
+ QDialog により提供される \l{QDialog::accept()}{accept()} スロットは
+ ダイアログを非表示にして、結果コードを \l{QDialog::}{Accepted}
+ に設定します。
+ この関数を使用して、 \c AddressBook の \c findContact() 関数に、
+ \c FindDialog オブジェクトが閉じていることを知らせます。
+ この論理については、 \c findContact() 関数について取り上げる際に、
+ さらに詳細に説明します。
+
+ \image addressbook-tutorial-part5-signals-and-slots.png
+
+ \c findClicked() で、ユーザが連絡先の名前を入力せずに
+ \gui Find ボタンをクリックしたかどうか確認するために
+ \c lineEdit を検証します。
+ 次に、 \c lineEdit から抽出した検索文字列を \c findText に設定します。
+ その後、 \c lineEdit のコンテンツをクリアし、ダイアログを非表示にします。
+
+ \snippet tutorials/addressbook/part5/finddialog.cpp findClicked() function
+
+ \c findText 変数用のパブリックな取得関数
+ \c getFindText() を実装します。
+ コンストラクタ及び \c findClicked() 関数でのみ
+ \c findText を直接設定するため、
+ \c getFindText() に対応する設定関数は作成しません。
+ \c getFindText() はパブリックであるため、インスタンスを生成し
+ \c FindDialog を使用するクラスは、
+ ユーザが入力して確定した検索文字列にいつでもアクセスできます。
+
+ \snippet tutorials/addressbook/part5/finddialog.cpp getFindText() function
+
+ \section1 AddressBook クラスの宣言
+
+ \c AddressBook クラス内部から \c FindDialog を使用できるよう、
+ \c addressbook.h ファイルに \c finddialog.h を含めます。
+
+ \snippet tutorials/addressbook/part5/addressbook.h include finddialog's header
+
+ これまでのところ、アドレス帳の全機能に、
+ QPushButton とそのボタンに対応するスロットが含まれています。
+ 同様に、\gui{検索(Find)}機能には、
+ \c findButton 及び \c findContact() が含まれています。
+
+ \c findButton はプライベート変数として宣言され、
+ \c findContact() 関数は public slot として宣言されます。
+
+ \snippet tutorials/addressbook/part5/addressbook.h findContact() declaration
+ \dots
+ \snippet tutorials/addressbook/part5/addressbook.h findButton declaration
+
+ 最後に、 \c FindDialog のインスタンスを参照するためのプライベート変数
+ \c dialog を宣言します。
+
+ \snippet tutorials/addressbook/part5/addressbook.h FindDialog declaration
+
+ インスタンス化されたダイアログは複数回使用します。
+ プライベート変数を使用すると、
+ クラスの複数の場所から参照できるようになります。
+
+ \section1 AddressBook クラスの実装
+
+ \c AddressBook クラスのコンストラクタ内で、
+ プライベートオブジェクトの \c findButton と \c findDialog
+ のインスタンスを生成します:
+
+ \snippet tutorials/addressbook/part5/addressbook.cpp instantiating findButton
+ \dots
+ \snippet tutorials/addressbook/part5/addressbook.cpp instantiating FindDialog
+
+ 次に、 \c findButton の \l{QPushButton::clicked()}{clicked()} シグナルを、
+ \c findContact() に接続します。
+
+ \snippet tutorials/addressbook/part5/addressbook.cpp signals and slots for find
+
+ 後は、 \c findContact() 関数のコードだけです:
+
+ \snippet tutorials/addressbook/part5/addressbook.cpp findContact() function
+
+ \c FindDialog インスタンスの \c dialog を表示することから始めます。
+ これは、ユーザが検索用に連絡先の名前を入力するためのものです。
+ ユーザがダイアログの \c findButton をクリックすると
+ ダイアログが非表示になり、結果コードが QDialog::Accepted に設定されます。
+ これにより、 \c if ステートメントが常に真になります。
+
+ 続けて、検索文字列の抽出を行います。
+ この場合、検索文字列は \c contactName で、
+ \c FindDialog の \c getFindText() 関数を使用して取得します。
+ アドレス帳に連絡先が存在する場合、直ちに表示します。
+ 存在しない場合、検索が失敗したことを示す以下の QMessageBox が表示されます。
+
+ \image addressbook-tutorial-part5-notfound.png
+*/
+
+/*!
+ \page tutorials-addressbook-part6.html
+
+ \example tutorials/addressbook/part6
+ \title 第6章 - 読み込みと保存
+
+ 本章では、アドレス帳アプリケーションの読み込みと保存処理で使用する、
+ Qt のファイル処理機能について説明します。
+
+ \image addressbook-tutorial-part6-screenshot.png
+
+ 連絡先の参照及び検索機能は便利な機能ですが、
+ 連絡先の保存と読み込みが可能になるまではアドレス帳は完成しません。
+
+ Qt は \l{Input/Output and Networking}{入出力}
+ 用のクラスを様々提供していますが、
+ 今回は簡単に組み合わせて使用できる QFile と QDataStream の2つのクラスを選択しました。
+
+ QFile のオブジェクトは、
+ 読み込みと書き込みが可能なディスク上のファイルを表します。
+ QFile は、さまざまなデバイスを表すより一般的な QIODevice クラスの派生クラスです。
+
+ QDataStream オブジェクトは、バイナリデータを QIODevice に保存して、
+ 後でもう一度取得できるようシリアライズするために使用します。
+ パラメータとしてそれぞれのデバイスを使用すると、
+ ストリームを開くのと同じくらい簡単に、 QIODevice
+ からの読み込みと書き込みを行うことができます。
+
+ \section1 AddressBook クラスの宣言
+
+ 2つの QPushButton オブジェクトの \c loadButton と \c saveButton
+ に加えて、2つの public slot の \c saveToFile() と \c loadFromFile()
+ を宣言します。
+
+ \snippet tutorials/addressbook/part6/addressbook.h save and load functions declaration
+ \dots
+ \snippet tutorials/addressbook/part6/addressbook.h save and load buttons declaration
+
+ \section1 AddressBook クラスの実装
+
+ コンストラクタで、 \c loadButton と \c saveButton のインスタンスを生成します。
+ 理想的には、プッシュボタンのラベルを、
+ "Load contacts from a file"(「ファイルから連絡先を読み込む」)及び、
+ "Save contacts to a file"(「連絡先をファイルに保存する」)
+ に設定するほうがよりユーザーフレンドリーです。
+ ただし、他のプッシュボタンのサイズを考慮して、
+ \gui{Load...}及び\gui{Save...}に設定します。
+ Qt は、 \l{QWidget::setToolTip()}{setToolTip()} を使用して
+ ツールチップを簡単に設定する方法を提供していますので、
+ 以下のコードでプッシュボタンにツールチップを設定します:
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp tooltip 1
+ \dots
+ \snippet tutorials/addressbook/part6/addressbook.cpp tooltip 2
+
+ ここには記載していませんが、
+ これまで実装した他の機能のように右側のレイアウトパネル
+ \c button1Layout にプッシュボタンを追加し、
+ プッシュボタンの \l{QPushButton::clicked()}{clicked()}
+ シグナルをそれぞれのスロットに接続します。
+
+ 保存機能の場合、最初に QFileDialog::getSaveFileName() を使用して、
+ \c fileName を取得します。
+ これは、QFileDialog により提供される簡易関数で、
+ モーダルなファイルダイアログをポップアップ表示させ、
+ ユーザはファイル名を入力したり、既存の \c{.abk} ファイルを選択することが出来ます。
+ \c{.abk} ファイルは、
+ 連絡先を保存したときに作成されるアドレス帳の拡張子です。
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp saveToFile() function part1
+
+ 以下のスクリーンショットのようなネイティブのファイルダイアログが表示されます:
+
+ \image addressbook-tutorial-part6-save.png
+
+ \c fileName が空ではない場合、 \c fileName を用いて
+ QFile のオブジェクト \c file を作成します。
+ QFile は QIODevice の派生クラスであるため、
+ QDataStream から使用できます。
+
+ 次に、ファイルを \l{QIODevice::}{WriteOnly} モードでオープンします。
+ オープンに失敗した場合、 QMessageBox を表示してユーザに知らせます。
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp saveToFile() function part2
+
+ オープンに成功した場合、 QDataStream のインスタンス \c out を生成して、
+ 開いているファイルに書き込みます。
+ QDataStream では、同じバージョンのストリームを使用して、
+ 読み込みと書き込みを行う必要があります。
+ \c file にシリアライズする前に、
+ \l{QDataStream::Qt_4_5}{Qt 4.5で導入されたバージョン}
+ を今回使用するバージョンとして設定します。
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp saveToFile() function part3
+
+ 読み込み機能の場合も QFileDialog::getOpenFileName() を使用して
+ \c fileName を取得します。
+ この関数は QFileDialog::getSaveFileName() に対応するものであり、
+ モーダルなファイルダイアログをポップアップ表示させ、
+ ユーザはファイル名を入力したり、既存の \c{.abk}
+ ファイルを選択してアドレス帳に読み込ことができます。
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part1
+
+ たとえば、 Windows では、この関数は、以下のスクリーンショットのような
+ ネイティブのファイルダイアログをポップアップ表示させます。
+
+ \image addressbook-tutorial-part6-load.png
+
+ \c fileName が空ではない場合、 QFile のオブジェクト
+ \c file を使用して、 \l{QIODevice::}{ReadOnly} モードでオープンします。
+ \c saveToFile() の実装の場合と同様に、オープンに失敗した場合は
+ QMessageBox を表示して、ユーザに知らせます。
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part2
+
+ オープンに成功した場合、
+ QDataStream のインスタンス \c in を生成して前記のようにバージョン設定を行い、
+ シリアライズしたデータを \c contacts のデータ構造に読み込みます。
+ \c contacts オブジェクトはデータが読み込まれる前に空にするので、
+ ファイルの読み込みプロセスは簡素化されます。
+ より高度な方法では、一時オブジェクトの QMap に読み込んで、
+ 重複していない連絡先を \c contacts にコピーします。
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part3
+
+ ファイルから読み込んだ連絡先を表示するには、
+ 最初に取得したデータを検証し、
+ 読み込んだファイルにアドレス帳の連絡先が実際に含まれているか確認します。
+ 含まれている場合、最初の連絡先を表示します。
+ 含まれていない場合、QMessageBox を表示して、
+ 問題があることをユーザに知らせます。
+ 最後にインターフェースを更新し、適宜
+ プッシュボタンの有効化と無効化を行います。
+*/
+
+/*!
+ \page tutorials-addressbook-part7.html
+
+ \example tutorials/addressbook/part7
+ \title 第7章 - 追加機能
+
+ 本章では、アドレス帳アプリケーションを
+ 普段の生活で便利に使用するための追加機能について説明します。
+
+ \image addressbook-tutorial-part7-screenshot.png
+
+ アドレス帳アプリケーションは、それ自体で便利ですが、
+ 他のアプリケーションとデータの交換ができればなお便利です。
+ vCard 形式は、この目的で使用可能な一般的なファイル形式です。
+ 本章では、連絡先を vCard ファイル(\c{.vcf})
+ にエクスポートできるよう、アドレス帳クライアントを拡張します。
+
+ \section1 AddressBook クラスの宣言
+
+ QPushButton のオブジェクト \c exportButton 及び、
+ 対応する public slot の \c exportAsVCard() を
+ \c addressbook.h ファイルの \c AddressBook クラスに追加します。
+
+ \snippet tutorials/addressbook/part7/addressbook.h exportAsVCard() declaration
+ \dots
+ \snippet tutorials/addressbook/part7/addressbook.h exportButton declaration
+
+ \section1 AddressBook クラスの実装
+
+ \c AddressBook のコンストラクタで、 \c exportButton の
+ \l{QPushButton::clicked()}{clicked()} シグナルを
+ \c exportAsVCard() に接続します。
+ このボタンも、右側のボタンのパネルの処理を行うレイアウトである
+ \c buttonLayout1 に追加します。
+
+ \c exportAsVCard() 関数では、
+ 連絡先の名前を \c name に抽出することから始めます。
+ \c firstName 、 \c lastName 及び \c nameList を宣言します。
+ 次に \c name を検索し、最初の空白のインデックスを取得します。
+ 空白が存在する場合、連絡先の名前を \c firstName と
+ \c lastName に分割します。
+ 次に、空白をアンダースコア ("_") に置き換えます。
+ 空白が存在しない場合は、連絡先にファーストネーム(名)
+ しか保存されていない可能性があります。
+
+ \snippet tutorials/addressbook/part7/addressbook.cpp export function part1
+
+ \c saveToFile() 関数と同様に、ユーザがファイルの場所を選択できるよう
+ ファイルダイアログを開きます。
+ 選択したファイル名を使用して、
+ 書き込みを行うための QFile のインスタンスを生成します。
+
+ ファイルを \l{QIODevice::}{WriteOnly} モードでオープンします。
+ オープンに失敗した場合、 QMessageBox を表示して、
+ 問題があることをユーザに知らせて戻ります。
+ オープンに成功した場合、 QTextStream のオブジェクト \c out へ
+ パラメータファイルを渡します。
+ QDataStream のように、QTextStream クラスは、
+ プレーンテキストファイルの読み込みと書き込みを行う機能を提供します。
+ 結果として、生成された \c{.vcf} は
+ テキストエディターで開いて編集することができます。
+
+ \snippet tutorials/addressbook/part7/addressbook.cpp export function part2
+
+ まず \c{BEGIN:VCARD} タグ、次に \c{VERSION:2.1} タグの順に
+ vCard ファイルに書き込みます。
+ 連絡先の名前は、 \c{N:} タグを使用して書き込みます。
+ vCard の "File as" プロパティを設定する \c{FN:} タグを書き込む際は、
+ 連絡先にラストネーム(姓)が含まれているかどうかを確認する必要があります。
+ 含まれている場合、 \c nameList の情報を使用して入力します。
+ 含まれていない場合、 \c firstName のみを書き込みます。
+
+ \snippet tutorials/addressbook/part7/addressbook.cpp export function part3
+
+ 続けて連絡先の住所の書き込みを行います。
+ 住所のセミコロンには、"\\" をエスケープ文字として追加する必要があります。
+ 改行はセミコロンに置き換えられ、コンマはスペースに置き換えられます。
+ 次に、 \c{ADR;HOME:;} タグ、 \c address 、
+ \c{END:VCARD} タグの順に書き込みます。
+
+ \snippet tutorials/addressbook/part7/addressbook.cpp export function part4
+
+ 最後に、vCard のエクスポートに成功したことをユーザに知らせるために、
+ QMessageBox が表示されます。
+
+ \e{vCard は、\l{http://www.imc.org}{Internet Mail Consortium} の登録商標です。}
+*/
diff --git a/doc/src/ja_JP/tutorials/widgets-tutorial.qdoc b/doc/src/ja_JP/tutorials/widgets-tutorial.qdoc
new file mode 100644
index 0000000..6a6b1a2
--- /dev/null
+++ b/doc/src/ja_JP/tutorials/widgets-tutorial.qdoc
@@ -0,0 +1,257 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page widgets-tutorial.html
+ \title ウィジェットのチュートリアル
+ \brief 本チュートリアルではウィジェットとレイアウトの基本的な使い方を説明し、それらが GUI アプリケーションの開発でどのように使われるかを説明します。
+
+ \section1 はじめに
+
+ ウィジェットは Qt によるグラフィカルユーザインターフェース(GUI)アプリケーションの基本構成要素です。
+ ボタン、ラベル、テキストエディターなどの各 GUI コンポーネントはウィジェットであり、
+ 既存のウィンドウのユーザーインタフェース内に配置したり、独立したウィンドウとして表示することができます。
+ それぞれのコンポーネントは QWidget の派生クラスとして実装されます。
+ QWidget 自体は QObject の派生クラスです。
+
+ QWidget は抽象クラスではなく、
+ 他のウィジェット用のコンテナとして使用されたり、
+ カスタムウィジェットを作る場合の基底クラスとして使用されます。
+ 他のウィジェットを配置するウィンドウとしてもよく使われます。
+
+ \l{QObject} と同様に QWidget は所有権を示すために親オブジェクトを指定して生成できるため、
+ 親オブジェクトが使用されなくなった場合には破棄されます。
+ ウィジェットではこの親子関係が他の意味も持ちます。
+ 子ウィジェットは親ウィジェットが使用する領域内に表示されます。
+ これは、ウィンドウを削除するとそのウィンドウに含まれる全てのウィジェットが自動的に破棄されることを意味します。
+
+ \section1 main 関数の記述
+
+ Qt の GUI サンプルの多くは標準的なアプリケーションの初期化コードを含む
+ \c{main.cpp} ファイルと、アプリケーションのロジックやカスタム
+ GUI コンポーネントを含むいくつかのソース/ヘッダファイルから構成されています。
+
+ \c{main.cpp} 内の典型的な \c main() 関数は以下のようになります:
+
+ \snippet doc/src/snippets/widgets-tutorial/template.cpp main.cpp body
+
+ 最初に、コマンドラインから渡される引数を渡して QApplication のオブジェクトを生成します。
+ ウィジェットを生成して表示した後、 QApplication::exec() を呼び出して Qt のイベントループを開始します。
+ この関数から戻ってくるまでアプリケーションの制御は Qt 側にて行われます。最後に、\c{main()} は QApplication::exec() から取得された値を返します。
+
+ \section1 簡単なウィジェットのサンプル
+
+ 以下の簡単なウィジェットのサンプルでは \c main() 関数の中にコードを記述しています。
+
+ \list
+ \o \l {tutorials/widgets/toplevel}{ウィンドウの作成}
+
+ \o \l {tutorials/widgets/childwidget}{子ウィジェット}
+
+ \o \l {tutorials/widgets/windowlayout}{レイアウトの利用}
+
+ \o \l {tutorials/widgets/nestedlayouts}{複雑なレイアウト}
+ \endlist
+
+ \section1 複雑なウィジェットのサンプル
+
+ \l{Widgets examples}{より高度なサンプル} の場合、ウィジェットやレイアウトのためのコードは他のファイルに記述されています。
+ 例えば、メインウインドウ用の GUI は、 QMainWindow 派生クラスのコンストラクタで作成されるでしょう。
+
+ \section1 サンプルのビルド
+
+ Qt のバイナリパッケージを取得してインストールするか、Qt を自分でコンパイルした場合には既にこのチュートリアルで説明されているサンプルはビルドされ、実行する準備ができています。
+ これらを変更し再コンパイルをしたい場合は、次の手順に従う必要があります:
+
+ \list 1
+ \o コマンドラインで、再コンパイルしたいサンプルを含むディレクトリに移動します。
+ \o \c qmake と入力し、\key{Return} キーを押します。
+ うまくいかない場合は、現在のパス内にこの実行ファイルが存在することを確認するか、
+ フルパスを指定して実行してください。
+ \o Linux/Unix および Mac OS X の場合、\c make と入力し、\key{Return} キーを押します。
+ Windows 上の Visual Studio の場合、\c nmake と入力し、\key{Return} キーを押します。
+ \endlist
+
+ 現在のディレクトリに実行ファイルが生成されます。
+ Windows では、このファイルは \c debug または \c release
+ ディレクトリに配置されているかもしれません。
+ このファイルを実行すると、作業中のサンプルコードの動作を確認できます。
+*/
+
+/*!
+ \example tutorials/widgets/toplevel
+ \title ウィジェットのチュートリアル - ウィンドウの作成
+
+ 親を持たないウィジェットを作成した場合、そのウィジェットは表示時にウィンドウ(\e{トップレベルウィジェット})として扱われます。
+ このウィジェットが必要なくなった場合にそれを破棄してくれる親ウィジェットがないため、トップレベルウィジェットの管理は開発者が行ってください。
+
+ 以下のサンプルでは QWidget を使用してウィンドウを作成し、サイズを指定して表示します:
+
+ \raw HTML
+ <table align="left" width="100%">
+ <tr class="qt-code"><td>
+ \endraw
+ \snippet tutorials/widgets/toplevel/main.cpp main program
+ \raw HTML
+ </td><td align="right">
+ \endraw
+ \inlineimage widgets-tutorial-toplevel.png
+ \raw HTML
+ </td></tr>
+ </table>
+ \endraw
+
+ 実際の GUI を作成するには、ウィンドウ内にウィジェットを配置する必要があります。
+ これは、ウィジェットのコンストラクタに QWidget のインスタンスを渡すことで実現します。
+ 詳細は本チュートリアルの次の章で示します。
+*/
+
+/*!
+ \example tutorials/widgets/childwidget
+ \title ウィジェットのチュートリアル - 子ウィジェット
+
+ 前のサンプルで作成したウィンドウに子ウィジェットを追加するために、
+ 親として \c window を子ウィジェットのコンストラクタに渡します。
+ ここでは、ウィンドウにボタンを追加し特定の場所に配置します:
+
+ \raw HTML
+ <table align="left" width="100%">
+ <tr class="qt-code"><td>
+ \endraw
+ \snippet tutorials/widgets/childwidget/main.cpp main program
+ \raw HTML
+ </td><td align="right">
+ \endraw
+ \inlineimage widgets-tutorial-childwidget.png
+ \raw HTML
+ </td></tr>
+ </table>
+ \endraw
+
+ このボタンはウィンドウの子になり、
+ ウィンドウが破棄された場合にはボタンも破棄されるでしょう。
+ ウィンドウを非表示化したり閉じた際には、自動的に破棄はされません。
+ サンプルが終了する場合には破棄されるでしょう。
+*/
+
+/*!
+ \example tutorials/widgets/windowlayout
+ \title ウィジェットのチュートリアル - レイアウトの利用
+
+ 一般的に子ウィジェットは、位置とサイズを明確に指定するのではなく、
+ レイアウトオブジェクトを使用してウィンドウ内に配置します。
+ ここでは、ラベルとラインエディットを生成し、横に並べて配置します。
+
+ \raw HTML
+ <table align="left" width="100%">
+ <tr class="qt-code"><td>
+ \endraw
+ \snippet tutorials/widgets/windowlayout/main.cpp main program
+ \raw HTML
+ </td><td align="right">
+ \endraw
+ \inlineimage widgets-tutorial-windowlayout.png
+ \raw HTML
+ </td></tr>
+ </table>
+ \endraw
+
+ 生成する \c layout オブジェクトは、 \l{QHBoxLayout::}{addWidget()} 関数を使って設定されたウィジェットの位置とサイズを管理します。
+ また、\l{QWidget::}{setLayout()} を使用してレイアウトをウィンドウに設定します。
+ レイアウトはそれ自体は目には見えない存在です。
+ レイアウトの管理対象となっているウィジェット(や他のレイアウト)に対しての効果としてのみ、その存在を確認できます。
+
+ 上記サンプルにおいて、各ウィジェットの所有権はあまり明確ではありません。
+ 親オブジェクトのない3つのウィジェットと1つのレイアウトを作成するため、
+ 空のウィンドウと、ラベルとラインエディットをそれぞれ含む別々のウィンドウが表示されるように見えるかもしれません。
+ しかし、レイアウトにラベルとラインエディットを管理するように指定すると、
+ ウィンドウにそのレイアウトを設定した際に「親の再指定」が行われるため、
+ ウィジェットおよびレイアウト自体がそのウィンドウの子になります。
+*/
+
+/*!
+ \example tutorials/widgets/nestedlayouts
+ \title ウィジェットのチュートリアル - 複雑なレイアウト
+
+ ウィジェットの中に他のウィジェットを含めることができるように、
+ レイアウトは異なるレベルでのウィジェットのグループ化にも使用されます。
+ ここではウィンドウ上部にラベルとラインエディットを隣り合わせに配置し、
+ その下に検索結果が表示されるテーブルビューを表示します。
+
+ これは、レイアウトを2つ作成して行います。\c{queryLayout} は、QLabel と QLineEdit を左右に並べて表示する QHBoxLayout です。
+ \c{mainLayout} は、\c{queryLayout} と QTableView を上下に並べて表示する QVBoxLayout です。
+
+ \raw HTML
+ <table align="left" width="100%">
+ <tr class="qt-code"><td>
+ \endraw
+ \snippet tutorials/widgets/nestedlayouts/main.cpp first part
+ \snippet tutorials/widgets/nestedlayouts/main.cpp last part
+ \raw HTML
+ </td><td align="right">
+ \endraw
+ \inlineimage widgets-tutorial-nestedlayouts.png
+ \raw HTML
+ </td></tr>
+ </table>
+ \endraw
+
+ \c{mainLayout} の \l{QBoxLayout::}{addLayout()} 関数にて追加された
+ \c{queryLayout} と \c{resultView} は追加された順番で上から並べられます。
+
+ ここでは QTableView ウィジェット \c resultView に表示されるデータを含むモデルの設定のコードは省略していますが、
+ 後ほど示します。
+
+ QHBoxLayout や QVBoxLayout と共に Qt から提供される QGridLayout および QFormLayout を使用することにより、
+ より複雑なユーザインターフェースの構築が可能になります。
+ これらのレイアウトの効果は、\l{Qt Designer} を実行して確認できます。
+
+ \section1 モデルを設定する
+
+ 上記のコードでは、レイアウトの有効利用に重点を置いていたため、
+ テーブルのデータについては示していませんでした。
+ 以下のコードで、モデルには行に対応する項目が含まれ、それぞれの行には2つの列のデータが設定されていることがわかるでしょう。
+
+ \snippet tutorials/widgets/nestedlayouts/main.cpp set up the model
+
+ モデルとビューの有効利用については、\l{Item Views Examples} および
+ \l{Model/View Programming} の概要に含まれています。
+*/
diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc
index 9563a8e..fb84f05 100644
--- a/doc/src/platforms/symbian-introduction.qdoc
+++ b/doc/src/platforms/symbian-introduction.qdoc
@@ -134,6 +134,7 @@
\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 unsigned_sis \o Create unsigned \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
@@ -211,6 +212,7 @@
\row \o -p \o Only preprocess the template \c .pkg file.
\row \o -c <file> \o Read certificate information from a file.
\row \o -u \o Preserves unsigned package.
+ \row \o -o \o Creates only unsigned package.
\row \o -s \o Generates stub sis for ROM.
\row \o -n <name> \o Specifies the final sis name.
\endtable
diff --git a/doc/src/snippets/declarative/anchorchanges.qml b/doc/src/snippets/declarative/anchorchanges.qml
new file mode 100644
index 0000000..993618b
--- /dev/null
+++ b/doc/src/snippets/declarative/anchorchanges.qml
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** 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 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$
+**
+****************************************************************************/
+//![0]
+import Qt 4.7
+
+Rectangle {
+ id: window
+ width: 120; height: 120
+ color: "black"
+
+ Rectangle { id: myRect; width: 50; height: 50; color: "red" }
+
+ states: State {
+ name: "reanchored"
+
+ AnchorChanges {
+ target: myRect
+ anchors.top: window.top
+ anchors.bottom: window.bottom
+ }
+ PropertyChanges {
+ target: myRect
+ anchors.topMargin: 10
+ anchors.bottomMargin: 10
+ }
+ }
+
+ MouseArea { anchors.fill: parent; onClicked: window.state = "reanchored" }
+}
+//![0]
+
diff --git a/doc/src/snippets/declarative/animation.qml b/doc/src/snippets/declarative/animation.qml
new file mode 100644
index 0000000..65acd36
--- /dev/null
+++ b/doc/src/snippets/declarative/animation.qml
@@ -0,0 +1,181 @@
+/****************************************************************************
+**
+** 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 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$
+**
+****************************************************************************/
+import Qt 4.7
+
+Row {
+
+//![property-anim-1]
+Rectangle {
+ id: rect
+ width: 120; height: 200
+
+ Image {
+ id: img
+ source: "pics/qt.png"
+ x: 60 - img.width/2
+ y: 0
+
+ SequentialAnimation on y {
+ loops: Animation.Infinite
+ NumberAnimation { to: 200 - img.height; easing.type: Easing.OutBounce; duration: 2000 }
+ PauseAnimation { duration: 1000 }
+ NumberAnimation { to: 0; easing.type: Easing.OutQuad; duration: 1000 }
+ }
+ }
+}
+//![property-anim-1]
+
+//![property-anim-2]
+Rectangle {
+ width: 200; height: 200
+
+ Rectangle {
+ color: "red"
+ width: 50; height: 50
+ NumberAnimation on x { to: 50 }
+ }
+}
+//![property-anim-2]
+
+
+Item {
+//![property-anim-3]
+PropertyAnimation {
+ id: animation
+ target: image
+ property: "scale"
+ from: 1; to: 0.5
+}
+
+Image {
+ id: image
+ source: "pics/qt.png"
+ MouseArea {
+ anchors.fill: parent
+ onPressed: animation.start()
+ }
+}
+//![property-anim-3]
+}
+
+
+//![transitions-1]
+transitions: [
+ Transition {
+ NumberAnimation {
+ properties: "x,y"
+ easing.type: Easing.OutBounce
+ duration: 200
+ }
+ }
+]
+//![transitions-1]
+
+
+//![transitions-2]
+Transition {
+ from: "*"
+ to: "MyState"
+ reversible: true
+
+ SequentialAnimation {
+ NumberAnimation {
+ duration: 1000
+ easing.type: Easing.OutBounce
+
+ // animate myItem's x and y if they have changed in the state
+ target: myItem
+ properties: "x,y"
+ }
+
+ NumberAnimation {
+ duration: 1000
+
+ // animate myItem2's y to 200, regardless of what happens in the state
+ target: myItem2
+ property: "y"
+ to: 200
+ }
+ }
+}
+//![transitions-2]
+
+
+//![transitions-3]
+Transition {
+ from: "*"
+ to: "MyState"
+ reversible: true
+
+ SequentialAnimation {
+ ColorAnimation { duration: 1000 }
+ PauseAnimation { duration: 1000 }
+
+ ParallelAnimation {
+ NumberAnimation {
+ duration: 1000
+ easing.type: Easing.OutBounce
+ targets: box1
+ properties: "x,y"
+ }
+ NumberAnimation {
+ duration: 1000
+ targets: box2
+ properties: "x,y"
+ }
+ }
+ }
+}
+//![transitions-3]
+
+//![behavior]
+Rectangle {
+ id: redRect
+ color: "red"
+ width: 100; height: 100
+
+ Behavior on x {
+ NumberAnimation { duration: 300; easing.type: Easing.InOutQuad }
+ }
+}
+//![behavior]
+
+}
diff --git a/doc/src/snippets/declarative/createQmlObject.qml b/doc/src/snippets/declarative/createQmlObject.qml
index f2ac6e6..f274e40 100644
--- a/doc/src/snippets/declarative/createQmlObject.qml
+++ b/doc/src/snippets/declarative/createQmlObject.qml
@@ -42,7 +42,7 @@
import Qt 4.7
Rectangle {
- id: targetItem
+ id: parentItem
property QtObject newObject
width: 100
@@ -51,7 +51,7 @@ Rectangle {
function createIt() {
//![0]
newObject = Qt.createQmlObject('import Qt 4.7; Rectangle {color: "red"; width: 20; height: 20}',
- targetItem, "dynamicSnippet1");
+ parentItem, "dynamicSnippet1");
//![0]
}
diff --git a/doc/src/snippets/declarative/listmodel-modify.qml b/doc/src/snippets/declarative/listmodel-modify.qml
new file mode 100644
index 0000000..03fb314
--- /dev/null
+++ b/doc/src/snippets/declarative/listmodel-modify.qml
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** 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 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$
+**
+****************************************************************************/
+import Qt 4.7
+
+Rectangle {
+ width: 200; height: 200
+
+ListModel {
+ id: fruitModel
+
+ ListElement {
+ name: "Apple"
+ cost: 2.45
+ attributes: [
+ ListElement { description: "Core" },
+ ListElement { description: "Deciduous" }
+ ]
+ }
+ ListElement {
+ name: "Orange"
+ cost: 3.25
+ attributes: [
+ ListElement { description: "Citrus" }
+ ]
+ }
+ ListElement {
+ name: "Banana"
+ cost: 1.95
+ attributes: [
+ ListElement { description: "Tropical" },
+ ListElement { description: "Seedless" }
+ ]
+ }
+}
+
+//![delegate]
+ Component {
+ id: fruitDelegate
+ Item {
+ width: 200; height: 50
+ Text { text: name }
+ Text { text: '$' + cost; anchors.right: parent.right }
+
+ // Double the price when clicked.
+ MouseArea {
+ anchors.fill: parent
+ onClicked: fruitModel.setProperty(index, "cost", cost * 2)
+ }
+ }
+ }
+//![delegate]
+
+ListView {
+ width: 200; height: 200
+ model: fruitModel
+ delegate: fruitDelegate
+}
+
+}
diff --git a/doc/src/snippets/declarative/listmodel-nested.qml b/doc/src/snippets/declarative/listmodel-nested.qml
new file mode 100644
index 0000000..4ae43ff
--- /dev/null
+++ b/doc/src/snippets/declarative/listmodel-nested.qml
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** 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 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$
+**
+****************************************************************************/
+import Qt 4.7
+
+Rectangle {
+ width: 200; height: 200
+
+
+//![model]
+ListModel {
+ id: fruitModel
+
+ ListElement {
+ name: "Apple"
+ cost: 2.45
+ attributes: [
+ ListElement { description: "Core" },
+ ListElement { description: "Deciduous" }
+ ]
+ }
+ ListElement {
+ name: "Orange"
+ cost: 3.25
+ attributes: [
+ ListElement { description: "Citrus" }
+ ]
+ }
+ ListElement {
+ name: "Banana"
+ cost: 1.95
+ attributes: [
+ ListElement { description: "Tropical" },
+ ListElement { description: "Seedless" }
+ ]
+ }
+}
+//![model]
+
+//![delegate]
+Component {
+ id: fruitDelegate
+ Item {
+ width: 200; height: 50
+ Text { id: nameField; text: name }
+ Text { text: '$' + cost; anchors.left: nameField.right }
+ Row {
+ anchors.top: nameField.bottom
+ spacing: 5
+ Text { text: "Attributes:" }
+ Repeater {
+ model: attributes
+ Text { text: description }
+ }
+ }
+ }
+}
+//![delegate]
+
+ListView {
+ width: 200; height: 200
+ model: fruitModel
+ delegate: fruitDelegate
+}
+
+}
diff --git a/doc/src/snippets/declarative/listmodel-simple.qml b/doc/src/snippets/declarative/listmodel-simple.qml
new file mode 100644
index 0000000..00b8cb0
--- /dev/null
+++ b/doc/src/snippets/declarative/listmodel-simple.qml
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** 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 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$
+**
+****************************************************************************/
+//![0]
+import Qt 4.7
+
+Rectangle {
+ width: 200; height: 200
+
+ ListModel {
+ id: fruitModel
+//![0]
+ ListElement {
+ name: "Apple"
+ cost: 2.45
+ }
+ ListElement {
+ name: "Orange"
+ cost: 3.25
+ }
+ ListElement {
+ name: "Banana"
+ cost: 1.95
+ }
+//![1]
+ }
+
+ Component {
+ id: fruitDelegate
+ Row {
+ spacing: 10
+ Text { text: name }
+ Text { text: '$' + cost }
+ }
+ }
+
+ ListView {
+ anchors.fill: parent
+ model: fruitModel
+ delegate: fruitDelegate
+ }
+}
+//![1]
diff --git a/doc/src/snippets/declarative/repeater-modeldata.qml b/doc/src/snippets/declarative/listmodel.qml
index 3b4cc6d..91b8230 100644
--- a/doc/src/snippets/declarative/repeater-modeldata.qml
+++ b/doc/src/snippets/declarative/listmodel.qml
@@ -38,15 +38,23 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
+//![0]
import Qt 4.7
-//! [0]
-Column {
- Repeater {
- model: ["apples", "oranges", "pears"]
- Text { text: "Data: " + modelData }
+ListModel {
+ id: fruitModel
+
+ ListElement {
+ name: "Apple"
+ cost: 2.45
+ }
+ ListElement {
+ name: "Orange"
+ cost: 3.25
+ }
+ ListElement {
+ name: "Banana"
+ cost: 1.95
}
}
-//! [0]
-
+//![0]
diff --git a/doc/src/snippets/declarative/parentchange.qml b/doc/src/snippets/declarative/parentchange.qml
new file mode 100644
index 0000000..7f5718a
--- /dev/null
+++ b/doc/src/snippets/declarative/parentchange.qml
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** 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 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$
+**
+****************************************************************************/
+//![0]
+import Qt 4.7
+
+Rectangle {
+ width: 200
+ height: 100
+
+ Rectangle {
+ id: redRect
+ width: 100; height: 100
+ color: "red"
+ }
+
+ Rectangle {
+ id: blueRect
+ x: redRect.width
+ width: 50; height: 50
+ color: "blue"
+
+ states: State {
+ name: "reparented"
+ ParentChange { target: blueRect; parent: redRect; x: 10; y: 10 }
+ }
+
+ MouseArea { anchors.fill: parent; onClicked: blueRect.state = "reparented" }
+ }
+}
+//![0]
+
diff --git a/doc/src/snippets/declarative/repeater.qml b/doc/src/snippets/declarative/repeater.qml
index 8b4d9cb..be5d62d 100644
--- a/doc/src/snippets/declarative/repeater.qml
+++ b/doc/src/snippets/declarative/repeater.qml
@@ -39,19 +39,52 @@
**
****************************************************************************/
+//! [import]
import Qt 4.7
+//! [import]
-Rectangle {
- width: 220; height: 20; color: "white"
+Row {
-//! [0]
- Row {
- Rectangle { width: 10; height: 20; color: "red" }
- Repeater {
- model: 10
- Rectangle { width: 20; height: 20; radius: 10; color: "green" }
+//! [simple]
+Row {
+ Repeater {
+ model: 3
+ Rectangle {
+ width: 100; height: 40
+ border.width: 1
+ color: "yellow"
}
- Rectangle { width: 10; height: 20; color: "blue" }
}
-//! [0]
+}
+//! [simple]
+
+//! [index]
+Column {
+ Repeater {
+ model: 10
+ Text { text: "I'm item " + index }
+ }
+}
+//! [index]
+
+//! [modeldata]
+Column {
+ Repeater {
+ model: ["apples", "oranges", "pears"]
+ Text { text: "Data: " + modelData }
+ }
+}
+//! [modeldata]
+
+//! [layout]
+Row {
+ Rectangle { width: 10; height: 20; color: "red" }
+ Repeater {
+ model: 10
+ Rectangle { width: 20; height: 20; radius: 10; color: "green" }
+ }
+ Rectangle { width: 10; height: 20; color: "blue" }
+}
+//! [layout]
+
}
diff --git a/doc/src/snippets/declarative/rotation.qml b/doc/src/snippets/declarative/rotation.qml
index 0fb9a61..5437292 100644
--- a/doc/src/snippets/declarative/rotation.qml
+++ b/doc/src/snippets/declarative/rotation.qml
@@ -38,37 +38,33 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
+//! [0]
import Qt 4.7
-Rectangle {
- width: 360; height: 80
- color: "white"
-//! [0]
- Row {
- x: 10; y: 10
- spacing: 10
- Image { source: "pics/qt.png" }
- Image {
- source: "pics/qt.png"
- transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 18 }
- smooth: true
- }
- Image {
- source: "pics/qt.png"
- transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 36 }
- smooth: true
- }
- Image {
- source: "pics/qt.png"
- transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 54 }
- smooth: true
- }
- Image {
- source: "pics/qt.png"
- transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 72 }
- smooth: true
- }
+Row {
+ x: 10; y: 10
+ spacing: 10
+
+ Image { source: "pics/qt.png" }
+ Image {
+ source: "pics/qt.png"
+ transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 18 }
+ smooth: true
+ }
+ Image {
+ source: "pics/qt.png"
+ transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 36 }
+ smooth: true
+ }
+ Image {
+ source: "pics/qt.png"
+ transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 54 }
+ smooth: true
+ }
+ Image {
+ source: "pics/qt.png"
+ transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 72 }
+ smooth: true
}
-//! [0]
}
+//! [0]
diff --git a/doc/src/snippets/declarative/state.qml b/doc/src/snippets/declarative/state.qml
new file mode 100644
index 0000000..a99c2e2
--- /dev/null
+++ b/doc/src/snippets/declarative/state.qml
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** 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 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$
+**
+****************************************************************************/
+//![0]
+import Qt 4.7
+
+Rectangle {
+ id: myRect
+ width: 100; height: 100
+ color: "black"
+
+ states: [
+ State {
+ name: "clicked"
+ PropertyChanges {
+ target: myRect
+ color: "red"
+ }
+ }
+ ]
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (myRect.state == "") // i.e. the default state
+ myRect.state = "clicked";
+ else
+ myRect.state = "";
+ }
+ }
+}
+//![0]
diff --git a/doc/src/snippets/declarative/states.qml b/doc/src/snippets/declarative/states.qml
new file mode 100644
index 0000000..c3b1796
--- /dev/null
+++ b/doc/src/snippets/declarative/states.qml
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** 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 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$
+**
+****************************************************************************/
+//![0]
+import Qt 4.7
+
+Item {
+ id: myItem
+ width: 200; height: 200
+
+ Rectangle {
+ id: myRect
+ width: 100; height: 100
+ color: "red"
+ }
+
+ states: [
+ State {
+ name: "moved"
+ PropertyChanges {
+ target: myRect
+ x: 50
+ y: 50
+ }
+ }
+ ]
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: myItem.state = 'moved'
+ }
+//![0]
+
+//![transitions]
+transitions: [
+ Transition {
+ NumberAnimation { properties: "x,y"; duration: 500 }
+ }
+]
+//![transitions]
+
+//![1]
+}
+//![1]
diff --git a/doc/src/snippets/declarative/repeater-index.qml b/doc/src/snippets/declarative/systempalette.qml
index 3eee742..98b333e 100644
--- a/doc/src/snippets/declarative/repeater-index.qml
+++ b/doc/src/snippets/declarative/systempalette.qml
@@ -38,19 +38,18 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
+//![0]
import Qt 4.7
Rectangle {
- width: 50; height: childrenRect.height; color: "white"
+ SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
+
+ width: 640; height: 480
+ color: myPalette.window
-//! [0]
- Column {
- Repeater {
- model: 10
- Text { text: "I'm item " + index }
- }
+ Text {
+ anchors.fill: parent
+ text: "Hello!"; color: myPalette.windowText
}
-//! [0]
}
-
+//![0]
diff --git a/doc/src/snippets/declarative/visualdatamodel.qml b/doc/src/snippets/declarative/visualdatamodel.qml
new file mode 100644
index 0000000..cdde513
--- /dev/null
+++ b/doc/src/snippets/declarative/visualdatamodel.qml
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** 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 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$
+**
+****************************************************************************/
+//![0]
+import Qt 4.7
+
+Rectangle {
+ width: 200; height: 100
+
+ VisualDataModel {
+ id: visualModel
+ model: ListModel {
+ ListElement { name: "Apple" }
+ ListElement { name: "Orange" }
+ }
+ delegate: Rectangle {
+ height: 25
+ width: 100
+ Text { text: "Name: " + name}
+ }
+ }
+
+ ListView {
+ anchors.fill: parent
+ model: visualModel
+ }
+}
+//![0]
diff --git a/doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp b/doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp
new file mode 100644
index 0000000..174adee
--- /dev/null
+++ b/doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** 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 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 <QDeclarativeView>
+#include <QDeclarativeContext>
+
+#include <QApplication>
+#include <QDirModel>
+
+//![0]
+int main(int argc, char ** argv)
+{
+ QApplication app(argc, argv);
+
+ QDeclarativeView view;
+
+ QDirModel model;
+ view.rootContext()->setContextProperty("dirModel", &model);
+
+ view.setSource(QUrl::fromLocalFile("view.qml"));
+ view.show();
+
+ return app.exec();
+}
+//![0]
+
diff --git a/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml b/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml
new file mode 100644
index 0000000..e623faa
--- /dev/null
+++ b/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** 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 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$
+**
+****************************************************************************/
+//![0]
+import Qt 4.7
+
+ListView {
+ id: view
+ width: 300
+ height: 400
+
+ model: VisualDataModel {
+ model: dirModel
+
+ delegate: Rectangle {
+ width: 200; height: 25
+ Text { text: filePath }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (hasModelChildren)
+ view.model.rootIndex = view.model.modelIndex(index)
+ }
+ }
+ }
+ }
+}
+//![0]
diff --git a/doc/src/snippets/declarative/visualdatamodel_rootindex/visualdatamodel_rootindex.pro b/doc/src/snippets/declarative/visualdatamodel_rootindex/visualdatamodel_rootindex.pro
new file mode 100644
index 0000000..fec070c
--- /dev/null
+++ b/doc/src/snippets/declarative/visualdatamodel_rootindex/visualdatamodel_rootindex.pro
@@ -0,0 +1,4 @@
+TEMPLATE = app
+QT += gui declarative
+
+SOURCES += main.cpp
diff --git a/examples/activeqt/activeqt.pro b/examples/activeqt/activeqt.pro
index 262e1a1..79d257a 100644
--- a/examples/activeqt/activeqt.pro
+++ b/examples/activeqt/activeqt.pro
@@ -11,7 +11,7 @@ contains(QT_CONFIG, opengl):SUBDIRS += opengl
# For now only the contain examples with mingw, for the others you need
# an IDL compiler
-win32-g++|wince*:SUBDIRS = webbrowser
+win32-g++*|wince*:SUBDIRS = webbrowser
# install
target.path = $$[QT_INSTALL_EXAMPLES]/activeqt
diff --git a/examples/declarative/imageelements/image/ImageCell.qml b/examples/declarative/imageelements/image/ImageCell.qml
new file mode 100644
index 0000000..bd232b9
--- /dev/null
+++ b/examples/declarative/imageelements/image/ImageCell.qml
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+import Qt 4.7
+
+Item {
+ property alias mode: image.fillMode
+ property alias caption: captionItem.text
+
+ width: parent.cellWidth; height: parent.cellHeight
+
+ Image {
+ id: image
+ width: parent.width; height: parent.height - captionItem.height
+ source: "face-smile.png"
+ clip: true // only makes a difference if mode is PreserveAspectCrop
+ smooth: true
+ }
+
+ Text {
+ id: captionItem
+ anchors.horizontalCenter: parent.horizontalCenter; anchors.bottom: parent.bottom
+ }
+}
diff --git a/examples/declarative/imageelements/image/face-smile.png b/examples/declarative/imageelements/image/face-smile.png
new file mode 100644
index 0000000..3d66d72
--- /dev/null
+++ b/examples/declarative/imageelements/image/face-smile.png
Binary files differ
diff --git a/examples/declarative/imageelements/image/image.qml b/examples/declarative/imageelements/image/image.qml
new file mode 100644
index 0000000..bc5ae37
--- /dev/null
+++ b/examples/declarative/imageelements/image/image.qml
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import Qt 4.7
+
+Rectangle {
+ width: 490
+ height: 285
+
+ Grid {
+ property int cellWidth: (width - (spacing * (columns - 1))) / columns
+ property int cellHeight: (height - (spacing * (rows - 1))) / rows
+
+ anchors.fill: parent
+ anchors.margins: 30
+
+ columns: 3
+ rows: 2
+ spacing: 30
+
+ ImageCell { mode: Image.Stretch; caption: "Stretch" }
+ ImageCell { mode: Image.PreserveAspectFit; caption: "PreserveAspectFit" }
+ ImageCell { mode: Image.PreserveAspectCrop; caption: "PreserveAspectCrop" }
+
+ ImageCell { mode: Image.Tile; caption: "Tile" }
+ ImageCell { mode: Image.TileHorizontally; caption: "TileHorizontally" }
+ ImageCell { mode: Image.TileVertically; caption: "TileVertically" }
+ }
+}
diff --git a/examples/declarative/imageelements/image/image.qmlproject b/examples/declarative/imageelements/image/image.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/imageelements/image/image.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/modelviews/listview/dummydata/MyPetsModel.qml b/examples/declarative/modelviews/listview/PetsModel.qml
index 70cdcdd..70cdcdd 100644
--- a/examples/declarative/modelviews/listview/dummydata/MyPetsModel.qml
+++ b/examples/declarative/modelviews/listview/PetsModel.qml
diff --git a/examples/declarative/modelviews/listview/dummydata/Recipes.qml b/examples/declarative/modelviews/listview/RecipesModel.qml
index 03ab961..03ab961 100644
--- a/examples/declarative/modelviews/listview/dummydata/Recipes.qml
+++ b/examples/declarative/modelviews/listview/RecipesModel.qml
diff --git a/examples/declarative/modelviews/listview/content/ClickAutoRepeating.qml b/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml
index dc23b78..7c174e3 100644
--- a/examples/declarative/modelviews/listview/content/ClickAutoRepeating.qml
+++ b/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml
@@ -40,32 +40,40 @@
import Qt 4.7
-Item {
- id: page
- property int repeatdelay: 300
- property int repeatperiod: 75
- property bool isPressed: false
+Image {
+ id: container
+
+ property int repeatDelay: 300
+ property int repeatDuration: 75
+ property bool pressed: false
- signal pressed
- signal released
signal clicked
- SequentialAnimation on isPressed {
+ scale: pressed ? 0.9 : 1
+
+ SequentialAnimation on pressed {
+ id: autoRepeatClicks
running: false
- id: autoRepeat
- PropertyAction { target: page; property: "isPressed"; value: true }
- ScriptAction { script: page.pressed() }
- ScriptAction { script: page.clicked() }
- PauseAnimation { duration: repeatdelay }
+
+ PropertyAction { target: container; property: "pressed"; value: true }
+ ScriptAction { script: container.clicked() }
+ PauseAnimation { duration: repeatDelay }
+
SequentialAnimation {
loops: Animation.Infinite
- ScriptAction { script: page.clicked() }
- PauseAnimation { duration: repeatperiod }
+ ScriptAction { script: container.clicked() }
+ PauseAnimation { duration: repeatDuration }
}
}
+
MouseArea {
anchors.fill: parent
- onPressed: autoRepeat.start()
- onReleased: { autoRepeat.stop(); parent.isPressed = false; page.released() }
+
+ onPressed: autoRepeatClicks.start()
+ onReleased: {
+ autoRepeatClicks.stop()
+ container.pressed = false
+ }
}
}
+
diff --git a/examples/declarative/modelviews/listview/content/MediaButton.qml b/examples/declarative/modelviews/listview/content/TextButton.qml
index 2aed6e0..ded7a11 100644
--- a/examples/declarative/modelviews/listview/content/MediaButton.qml
+++ b/examples/declarative/modelviews/listview/content/TextButton.qml
@@ -40,36 +40,39 @@
import Qt 4.7
-Item {
- property variant text
+Rectangle {
+ id: container
+
+ property alias text: label.text
+
signal clicked
- id: container
- Image {
- id: normal
- source: "pics/button.png"
- }
- Image {
- id: pressed
- source: "pics/button-pressed.png"
- opacity: 0
+ width: label.width + 20; height: label.height + 6
+ smooth: true
+ radius: 10
+
+ gradient: Gradient {
+ GradientStop { id: gradientStop; position: 0.0; color: palette.light }
+ GradientStop { position: 1.0; color: palette.button }
}
+
+ SystemPalette { id: palette }
+
MouseArea {
- id: clickRegion
- anchors.fill: normal
- onClicked: { container.clicked(); }
+ id: mouseArea
+ anchors.fill: parent
+ onClicked: { container.clicked() }
}
+
Text {
- font.bold: true
- color: "white"
- anchors.centerIn: normal
- text: container.text
+ id: label
+ anchors.centerIn: parent
}
- width: normal.width
states: State {
- name: "Pressed"
- when: clickRegion.pressed == true
- PropertyChanges { target: pressed; opacity: 1 }
+ name: "pressed"
+ when: mouseArea.pressed
+ PropertyChanges { target: gradientStop; color: palette.dark }
}
}
+
diff --git a/examples/declarative/modelviews/listview/content/pics/add.png b/examples/declarative/modelviews/listview/content/pics/add.png
deleted file mode 100644
index f29d84b..0000000
--- a/examples/declarative/modelviews/listview/content/pics/add.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/del.png b/examples/declarative/modelviews/listview/content/pics/del.png
deleted file mode 100644
index 1d753a3..0000000
--- a/examples/declarative/modelviews/listview/content/pics/del.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/trash.png b/examples/declarative/modelviews/listview/content/pics/trash.png
deleted file mode 100644
index 2042595..0000000
--- a/examples/declarative/modelviews/listview/content/pics/trash.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/modelviews/listview/dynamic.qml b/examples/declarative/modelviews/listview/dynamic.qml
deleted file mode 100644
index cf0e387..0000000
--- a/examples/declarative/modelviews/listview/dynamic.qml
+++ /dev/null
@@ -1,248 +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 QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import Qt 4.7
-import "content"
-import "../../ui-components/scrollbar"
-
-Rectangle {
- id: container
- width: 640; height: 480
- color: "#343434"
-
- ListModel {
- id: fruitModel
-
- ListElement {
- name: "Apple"; cost: 2.45
- attributes: [
- ListElement { description: "Core" },
- ListElement { description: "Deciduous" }
- ]
- }
- ListElement {
- name: "Banana"; cost: 1.95
- attributes: [
- ListElement { description: "Tropical" },
- ListElement { description: "Seedless" }
- ]
- }
- ListElement {
- name: "Cumquat"; cost: 3.25
- attributes: [
- ListElement { description: "Citrus" }
- ]
- }
- ListElement {
- name: "Durian"; cost: 9.95
- attributes: [
- ListElement { description: "Tropical" },
- ListElement { description: "Smelly" }
- ]
- }
- ListElement {
- name: "Elderberry"; cost: 0.05
- attributes: [
- ListElement { description: "Berry" }
- ]
- }
- ListElement {
- name: "Fig"; cost: 0.25
- attributes: [
- ListElement { description: "Flower" }
- ]
- }
- }
-
- Component {
- id: fruitDelegate
-
- Item {
- width: container.width; height: 55
-
- Column {
- id: moveButtons
- x: 5; width: childrenRect.width; anchors.verticalCenter: parent.verticalCenter
-
- Image {
- source: "content/pics/go-up.png"
- MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index,index-1,1) }
- }
- Image { source: "content/pics/go-down.png"
- MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index,index+1,1) }
- }
- }
-
- Column {
- anchors { right: itemButtons.left; verticalCenter: parent.verticalCenter; left: moveButtons.right; leftMargin: 10 }
-
- Text {
- id: label
- width: parent.width
- color: "White"
- font.bold: true; font.pixelSize: 15
- text: name; elide: Text.ElideRight
- }
- Row {
- spacing: 5
- Repeater {
- model: attributes
- Component {
- Text { text: description; color: "White" }
- }
- }
- }
- }
-
- Row {
- id: itemButtons
-
- anchors { right: removeButton.left; rightMargin: 35; verticalCenter: parent.verticalCenter }
- width: childrenRect.width
- spacing: 10
-
- Image {
- source: "content/pics/list-add.png"
- scale: clickUp.isPressed ? 0.9 : 1
-
- ClickAutoRepeating {
- id: clickUp
- anchors.fill: parent
- onClicked: fruitModel.setProperty(index, "cost", cost+0.25)
- }
- }
-
- Text { id: costText; text: '$'+Number(cost).toFixed(2); font.pixelSize: 15; color: "White"; font.bold: true; }
-
- Image {
- source: "content/pics/list-remove.png"
- scale: clickDown.isPressed ? 0.9 : 1
-
- ClickAutoRepeating {
- id: clickDown
- anchors.fill: parent
- onClicked: fruitModel.setProperty(index, "cost", Math.max(0,cost-0.25))
- }
- }
- }
- Image {
- id: removeButton
- anchors { verticalCenter: parent.verticalCenter; right: parent.right; rightMargin: 10 }
- source: "content/pics/archive-remove.png"
-
- MouseArea { anchors.fill:parent; onClicked: fruitModel.remove(index) }
- }
- }
- }
-
- ListView {
- id: view
- anchors { top: parent.top; left: parent.left; right: parent.right; bottom: buttons.top }
- model: fruitModel
- delegate: fruitDelegate
- }
-
- // Attach scrollbar to the right edge of the view.
- ScrollBar {
- id: verticalScrollBar
-
- width: 8; height: view.height; anchors.right: view.right
- opacity: 0
- orientation: Qt.Vertical
- position: view.visibleArea.yPosition
- pageSize: view.visibleArea.heightRatio
-
- // Only show the scrollbar when the view is moving.
- states: State {
- name: "ShowBars"; when: view.movingVertically
- PropertyChanges { target: verticalScrollBar; opacity: 1 }
- }
- transitions: Transition {
- NumberAnimation { properties: "opacity"; duration: 400 }
- }
- }
-
- Row {
- id: buttons
-
- x: 8; width: childrenRect.width; height: childrenRect.height
- anchors { bottom: parent.bottom; bottomMargin: 8 }
- spacing: 8
-
- Image {
- source: "content/pics/archive-insert.png"
-
- MouseArea {
- anchors.fill: parent
- onClicked: {
- fruitModel.append({
- "name": "Pizza Margarita",
- "cost": 5.95,
- "attributes": [{"description": "Cheese"},{"description": "Tomato"}]
- })
- }
- }
- }
-
- Image {
- source: "content/pics/archive-insert.png"
-
- MouseArea {
- anchors.fill: parent;
- onClicked: {
- fruitModel.insert(0, {
- "name": "Pizza Supreme",
- "cost": 9.95,
- "attributes": [{"description": "Cheese"},{"description": "Tomato"},{"description": "The Works"}]
- })
- }
- }
- }
-
- Image {
- source: "content/pics/archive-remove.png"
-
- MouseArea {
- anchors.fill: parent
- onClicked: fruitModel.clear()
- }
- }
- }
-}
diff --git a/examples/declarative/modelviews/listview/dynamiclist.qml b/examples/declarative/modelviews/listview/dynamiclist.qml
new file mode 100644
index 0000000..0e290f5
--- /dev/null
+++ b/examples/declarative/modelviews/listview/dynamiclist.qml
@@ -0,0 +1,203 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+import Qt 4.7
+import "content"
+
+// This example shows how items can be dynamically added to and removed from
+// a ListModel, and how these list modifications can be animated.
+
+Rectangle {
+ id: container
+ width: 640; height: 480
+ color: "#343434"
+
+ // The model:
+ ListModel {
+ id: fruitModel
+
+ ListElement {
+ name: "Apple"; cost: 2.45
+ attributes: [
+ ListElement { description: "Core" },
+ ListElement { description: "Deciduous" }
+ ]
+ }
+ ListElement {
+ name: "Banana"; cost: 1.95
+ attributes: [
+ ListElement { description: "Tropical" },
+ ListElement { description: "Seedless" }
+ ]
+ }
+ ListElement {
+ name: "Cumquat"; cost: 3.25
+ attributes: [
+ ListElement { description: "Citrus" }
+ ]
+ }
+ ListElement {
+ name: "Durian"; cost: 9.95
+ attributes: [
+ ListElement { description: "Tropical" },
+ ListElement { description: "Smelly" }
+ ]
+ }
+ }
+
+ // The delegate for each fruit in the model:
+ Component {
+ id: listDelegate
+
+ Item {
+ id: delegateItem
+ width: listView.width; height: 55
+ clip: true
+
+ Row {
+ anchors.verticalCenter: parent.verticalCenter
+ spacing: 10
+
+ Column {
+ Image {
+ source: "content/pics/go-up.png"
+ MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index,index-1,1) }
+ }
+ Image { source: "content/pics/go-down.png"
+ MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index,index+1,1) }
+ }
+ }
+
+ Column {
+ anchors.verticalCenter: parent.verticalCenter
+
+ Text {
+ text: name
+ font.pixelSize: 15
+ color: "white"
+ }
+ Row {
+ spacing: 5
+ Repeater {
+ model: attributes
+ Text { text: description; color: "White" }
+ }
+ }
+ }
+ }
+
+ Row {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: parent.right
+ spacing: 10
+
+ PressAndHoldButton {
+ anchors.verticalCenter: parent.verticalCenter
+ source: "content/pics/list-add.png"
+ onClicked: fruitModel.setProperty(index, "cost", cost + 0.25)
+ }
+
+ Text {
+ id: costText
+ anchors.verticalCenter: parent.verticalCenter
+ text: '$' + Number(cost).toFixed(2)
+ font.pixelSize: 15
+ color: "white"
+ font.bold: true
+ }
+
+ PressAndHoldButton {
+ anchors.verticalCenter: parent.verticalCenter
+ source: "content/pics/list-remove.png"
+ onClicked: fruitModel.setProperty(index, "cost", Math.max(0,cost-0.25))
+ }
+
+ Image {
+ source: "content/pics/archive-remove.png"
+ MouseArea { anchors.fill:parent; onClicked: fruitModel.remove(index) }
+ }
+ }
+
+ // Animate adding and removing of items:
+
+ ListView.onAdd: SequentialAnimation {
+ PropertyAction { target: delegateItem; property: "height"; value: 0 }
+ NumberAnimation { target: delegateItem; property: "height"; to: 55; duration: 250; easing.type: Easing.InOutQuad }
+ }
+
+ ListView.onRemove: SequentialAnimation {
+ PropertyAction { target: delegateItem; property: "ListView.delayRemove"; value: true }
+ NumberAnimation { target: delegateItem; property: "height"; to: 0; duration: 250; easing.type: Easing.InOutQuad }
+
+ // Make sure delayRemove is set back to false so that the item can be destroyed
+ PropertyAction { target: delegateItem; property: "ListView.delayRemove"; value: false }
+ }
+ }
+ }
+
+ // The view:
+ ListView {
+ id: listView
+ anchors.fill: parent; anchors.margins: 20
+ model: fruitModel
+ delegate: listDelegate
+ }
+
+ Row {
+ anchors { left: parent.left; bottom: parent.bottom; margins: 20 }
+ spacing: 10
+
+ TextButton {
+ text: "Add an item"
+ onClicked: {
+ fruitModel.append({
+ "name": "Pizza Margarita",
+ "cost": 5.95,
+ "attributes": [{"description": "Cheese"}, {"description": "Tomato"}]
+ })
+ }
+ }
+
+ TextButton {
+ text: "Remove all items"
+ onClicked: fruitModel.clear()
+ }
+ }
+}
+
diff --git a/examples/declarative/modelviews/listview/recipes.qml b/examples/declarative/modelviews/listview/expandingdelegates.qml
index f4b97ea..94ea48f 100644
--- a/examples/declarative/modelviews/listview/recipes.qml
+++ b/examples/declarative/modelviews/listview/expandingdelegates.qml
@@ -41,7 +41,7 @@
import Qt 4.7
import "content"
-// This example illustrates expanding a list item to show a more detailed view
+// This example illustrates expanding a list item to show a more detailed view.
Rectangle {
id: page
@@ -49,13 +49,13 @@ Rectangle {
color: "black"
// Delegate for the recipes. This delegate has two modes:
- // 1. the list mode (default), which just shows the picture and title of the recipe.
- // 2. the details mode, which also shows the ingredients and method.
+ // 1. List mode (default), which just shows the picture and title of the recipe.
+ // 2. Details mode, which also shows the ingredients and method.
Component {
id: recipeDelegate
Item {
- id: wrapper
+ id: recipe
// Create a property to contain the visibility of the details.
// We can bind multiple element's opacity to this one property,
@@ -63,14 +63,15 @@ Rectangle {
// want to fade.
property real detailsOpacity : 0
- width: list.width
+ width: listView.width
+ height: 70
// A simple rounded rectangle for the background
Rectangle {
id: background
- x: 1; y: 2; width: parent.width - 2; height: parent.height - 4
- color: "#FEFFEE"
- border.color: "#FFBE4F"
+ x: 2; y: 2; width: parent.width - x*2; height: parent.height - y*2
+ color: "ivory"
+ border.color: "orange"
radius: 5
}
@@ -78,50 +79,53 @@ Rectangle {
// When clicked it changes mode to 'Details'. If we are already
// in Details mode, then no change will happen.
MouseArea {
- id: pageMouse
anchors.fill: parent
- onClicked: wrapper.state = 'Details';
+ onClicked: recipe.state = 'Details';
}
- // Layout the page. Picture, title and ingredients at the top, method at the
+ // Lay out the page: picture, title and ingredients at the top, and method at the
// bottom. Note that elements that should not be visible in the list
- // mode have their opacity set to wrapper.detailsOpacity.
+ // mode have their opacity set to recipe.detailsOpacity.
Row {
id: topLayout
- x: 10; y: 10; height: recipePic.height; width: parent.width
+ x: 10; y: 10; height: recipeImage.height; width: parent.width
spacing: 10
Image {
- id: recipePic
- source: picture; width: 48; height: 48
+ id: recipeImage
+ width: 50; height: 50
+ source: picture
}
Column {
- width: background.width-recipePic.width-20; height: recipePic.height;
+ width: background.width - recipeImage.width - 20; height: recipeImage.height
spacing: 5
- Text { id: name; text: title; font.bold: true; font.pointSize: 16 }
+ Text {
+ text: title
+ font.bold: true; font.pointSize: 16
+ }
Text {
text: "Ingredients"
font.pointSize: 12; font.bold: true
- opacity: wrapper.detailsOpacity
+ opacity: recipe.detailsOpacity
}
Text {
text: ingredients
wrapMode: Text.WordWrap
width: parent.width
- opacity: wrapper.detailsOpacity
+ opacity: recipe.detailsOpacity
}
}
}
Item {
id: details
- x: 10; width: parent.width-20
+ x: 10; width: parent.width - 20
anchors { top: topLayout.bottom; topMargin: 10; bottom: parent.bottom; bottomMargin: 10 }
- opacity: wrapper.detailsOpacity
+ opacity: recipe.detailsOpacity
Text {
id: methodTitle
@@ -153,30 +157,28 @@ Rectangle {
}
// A button to close the detailed view, i.e. set the state back to default ('').
- MediaButton {
- y: 10; anchors { right: background.right; rightMargin: 5 }
- opacity: wrapper.detailsOpacity
+ TextButton {
+ y: 10
+ anchors { right: background.right; rightMargin: 10 }
+ opacity: recipe.detailsOpacity
text: "Close"
- onClicked: wrapper.state = '';
+ onClicked: recipe.state = '';
}
- // Set the default height to the height of the picture, plus margin.
- height: 68
-
states: State {
name: "Details"
PropertyChanges { target: background; color: "white" }
- PropertyChanges { target: recipePic; width: 128; height: 128 } // Make picture bigger
- PropertyChanges { target: wrapper; detailsOpacity: 1; x: 0 } // Make details visible
- PropertyChanges { target: wrapper; height: list.height } // Fill the entire list area with the detailed view
+ PropertyChanges { target: recipeImage; width: 130; height: 130 } // Make picture bigger
+ PropertyChanges { target: recipe; detailsOpacity: 1; x: 0 } // Make details visible
+ PropertyChanges { target: recipe; height: listView.height } // Fill the entire list area with the detailed view
// Move the list so that this item is at the top.
- PropertyChanges { target: wrapper.ListView.view; explicit: true; contentY: wrapper.y }
+ PropertyChanges { target: recipe.ListView.view; explicit: true; contentY: recipe.y }
// Disallow flicking while we're in detailed view
- PropertyChanges { target: wrapper.ListView.view; interactive: false }
+ PropertyChanges { target: recipe.ListView.view; interactive: false }
}
transitions: Transition {
@@ -191,10 +193,10 @@ Rectangle {
// The actual list
ListView {
- id: list
+ id: listView
anchors.fill: parent
- clip: true
- model: Recipes
+ model: RecipesModel {}
delegate: recipeDelegate
+ clip: true
}
}
diff --git a/examples/declarative/modelviews/listview/highlight.qml b/examples/declarative/modelviews/listview/highlight.qml
index 239272a..5748974 100644
--- a/examples/declarative/modelviews/listview/highlight.qml
+++ b/examples/declarative/modelviews/listview/highlight.qml
@@ -41,12 +41,7 @@
import Qt 4.7
Rectangle {
- width: 400; height: 300
-
- // MyPets model is defined in dummydata/MyPetsModel.qml
- // The launcher automatically loads files in dummydata/* to assist
- // development without a real data source.
- // This one contains my pets.
+ width: 200; height: 300
// Define a delegate component. A component will be
// instantiated for each visible item in the list.
@@ -54,42 +49,45 @@ Rectangle {
id: petDelegate
Item {
id: wrapper
- width: 200; height: 50
+ width: 200; height: 55
Column {
Text { text: 'Name: ' + name }
Text { text: 'Type: ' + type }
Text { text: 'Age: ' + age }
}
- // Use the ListView.isCurrentItem attached property to
- // indent the item if it is the current item.
+ // indent the item if it is the current item
states: State {
name: "Current"
when: wrapper.ListView.isCurrentItem
- PropertyChanges { target: wrapper; x: 10 }
+ PropertyChanges { target: wrapper; x: 20 }
}
transitions: Transition {
NumberAnimation { properties: "x"; duration: 200 }
}
}
}
- // Specify a highlight with custom movement. Note that highlightFollowsCurrentItem
- // is set to false in the ListView so that we can control how the
- // highlight moves to the current item.
+
+ // Define a highlight with customised movement between items.
Component {
- id: petHighlight
+ id: highlightBar
Rectangle {
width: 200; height: 50
color: "#FFFF88"
- SpringFollow on y { to: list1.currentItem.y; spring: 3; damping: 0.1 }
+ SpringFollow on y { to: listView.currentItem.y; spring: 3; damping: 0.1 }
}
}
ListView {
- id: list1
+ id: listView
width: 200; height: parent.height
- model: MyPetsModel
+
+ model: PetsModel {}
delegate: petDelegate
- highlight: petHighlight; highlightFollowsCurrentItem: false
focus: true
+
+ // Set the highlight delegate. Note we must also set highlightFollowsCurrentItem
+ // to false so the highlight delegate can control how the highlight is moved.
+ highlight: highlightBar
+ highlightFollowsCurrentItem: false
}
}
diff --git a/examples/declarative/modelviews/listview/listview-example.qml b/examples/declarative/modelviews/listview/highlightranges.qml
index a8a95c4..162d8b7 100644
--- a/examples/declarative/modelviews/listview/listview-example.qml
+++ b/examples/declarative/modelviews/listview/highlightranges.qml
@@ -43,46 +43,20 @@ import Qt 4.7
Rectangle {
width: 600; height: 300
- // MyPets model is defined in dummydata/MyPetsModel.qml
- // The viewer automatically loads files in dummydata/* to assist
- // development without a real data source.
- // This one contains my pets.
-
- // Define a delegate component. A component will be
- // instantiated for each visible item in the list.
- Component {
- id: petDelegate
- Item {
- width: 200; height: 50
- Column {
- Text { text: 'Name: ' + name }
- Text { text: 'Type: ' + type }
- Text { text: 'Age: ' + age }
- }
- }
- }
-
- // Define a highlight component. Just one of these will be instantiated
- // by each ListView and placed behind the current item.
- Component {
- id: petHighlight
- Rectangle { color: "#FFFF88" }
- }
-
// Show the model in three lists, with different highlight ranges.
// preferredHighlightBegin and preferredHighlightEnd set the
// range in which to attempt to maintain the highlight.
//
- // Note that the second and third ListView
- // set their currentIndex to be the same as the first, and that
- // the first ListView is given keyboard focus.
+ // The second and third ListView set their currentIndex to be the
+ // same as the first, and the first ListView is given keyboard focus.
//
- // The default mode allows the currentItem to move freely
- // within the visible area. If it would move outside the visible
- // area, the view is scrolled to keep it visible.
+ // The first list does not set a highlight range, so its currentItem
+ // can move freely within the visible area. If it moves outside the
+ // visible area, the view is automatically scrolled to keep the current
+ // item visible.
//
// The second list sets a highlight range which attempts to keep the
- // current item within the the bounds of the range, however
+ // current item within the the bounds of the range. However,
// items will not scroll beyond the beginning or end of the view,
// forcing the highlight to move outside the range at the ends.
//
@@ -98,21 +72,22 @@ Rectangle {
ListView {
id: list1
width: 200; height: parent.height
- model: MyPetsModel
+ model: PetsModel {}
delegate: petDelegate
- highlight: petHighlight
+ highlight: Rectangle { color: "lightsteelblue" }
currentIndex: list3.currentIndex
focus: true
}
ListView {
id: list2
- x: 200; width: 200; height: parent.height
- model: MyPetsModel
+ x: list1.width
+ width: 200; height: parent.height
+ model: PetsModel {}
delegate: petDelegate
- highlight: petHighlight
+ highlight: Rectangle { color: "yellow" }
currentIndex: list1.currentIndex
preferredHighlightBegin: 80; preferredHighlightEnd: 220
highlightRangeMode: ListView.ApplyRange
@@ -120,14 +95,25 @@ Rectangle {
ListView {
id: list3
- x: 400; width: 200; height: parent.height
- model: MyPetsModel
+ x: list1.width + list2.width
+ width: 200; height: parent.height
+ model: PetsModel {}
delegate: petDelegate
- highlight: Rectangle { color: "lightsteelblue" }
+ highlight: Rectangle { color: "yellow" }
currentIndex: list1.currentIndex
preferredHighlightBegin: 125; preferredHighlightEnd: 125
highlightRangeMode: ListView.StrictlyEnforceRange
- flickDeceleration: 1000
+ }
+
+ // The delegate for each list
+ Component {
+ id: petDelegate
+ Column {
+ width: 200
+ Text { text: 'Name: ' + name }
+ Text { text: 'Type: ' + type }
+ Text { text: 'Age: ' + age }
+ }
}
}
diff --git a/examples/declarative/modelviews/listview/sections.qml b/examples/declarative/modelviews/listview/sections.qml
index d2f9aba..8c038a0 100644
--- a/examples/declarative/modelviews/listview/sections.qml
+++ b/examples/declarative/modelviews/listview/sections.qml
@@ -42,70 +42,43 @@ import Qt 4.7
//! [0]
Rectangle {
+ id: container
width: 200
- height: 240
+ height: 250
- // MyPets model is defined in dummydata/MyPetsModel.qml
- // The viewer automatically loads files in dummydata/* to assist
- // development without a real data source.
- // This one contains my pets.
-
- // Define a delegate component that includes a separator for sections.
- Component {
- id: petDelegate
-
- Item {
- id: wrapper
- width: 200
- height: desc.height // height is the combined height of the description and the section separator
+ ListModel {
+ id: animalsModel
+ ListElement { name: "Parrot"; size: "Small" }
+ ListElement { name: "Guinea pig"; size: "Small" }
+ ListElement { name: "Dog"; size: "Medium" }
+ ListElement { name: "Cat"; size: "Medium" }
+ ListElement { name: "Elephant"; size: "Large" }
+ }
- Item {
- id: desc
- x: 5; height: layout.height + 4
+ // The delegate for each section header
+ Component {
+ id: sectionHeading
+ Rectangle {
+ width: container.width
+ height: childrenRect.height
+ color: "lightsteelblue"
- Column {
- id: layout
- y: 2
- Text { text: 'Name: ' + name }
- Text { text: 'Type: ' + type }
- Text { text: 'Age: ' + age }
- }
+ Text {
+ text: section
+ font.bold: true
}
}
}
- // Define a highlight component. Just one of these will be instantiated
- // by each ListView and placed behind the current item.
- Component {
- id: petHighlight
- Rectangle { color: "#FFFF88" }
- }
-
- // The list
ListView {
- id: myList
+ anchors.fill: parent
+ model: animalsModel
+ delegate: Text { text: name }
- width: 200; height: parent.height
- model: MyPetsModel
- delegate: petDelegate
- highlight: petHighlight
- focus: true
-
- // The sectionExpression is simply the size of the pet.
- // We use this to determine which section we are in above.
section.property: "size"
section.criteria: ViewSection.FullString
- section.delegate: Rectangle {
- color: "lightsteelblue"
- width: 200
- height: 20
- Text {
- x: 2; height: parent.height
- verticalAlignment: Text.AlignVCenter
- text: section
- font.bold: true
- }
- }
+ section.delegate: sectionHeading
}
}
//! [0]
+
diff --git a/examples/declarative/modelviews/listview/itemlist.qml b/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qml
index 1b44e05..1b44e05 100644
--- a/examples/declarative/modelviews/listview/itemlist.qml
+++ b/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qml
diff --git a/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qmlproject b/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/text/edit/edit.qml b/examples/declarative/text/edit/edit.qml
index 0be42e9..4668ab2 100644
--- a/examples/declarative/text/edit/edit.qml
+++ b/examples/declarative/text/edit/edit.qml
@@ -121,6 +121,9 @@ Rectangle {
onClicked: {
if (editor.state == "") {
edit.cursorPosition = edit.positionAt(mouse.x+x,mouse.y+y);
+ if (!edit.focus)
+ edit.focus = true;
+ edit.openSoftwareInputPanel();
}
}
function hitHandle(h,x,y) { return x>=h.x+flick.contentX && x<h.x+flick.contentX+h.width && y>=h.y+flick.contentY && y<h.y+flick.contentY+h.height }
diff --git a/examples/declarative/toys/clocks/content/center.png b/examples/declarative/toys/clocks/content/center.png
index 7fbd802..7fbd802 100755..100644
--- a/examples/declarative/toys/clocks/content/center.png
+++ b/examples/declarative/toys/clocks/content/center.png
Binary files differ
diff --git a/examples/declarative/toys/clocks/content/clock-night.png b/examples/declarative/toys/clocks/content/clock-night.png
index cc7151a..cc7151a 100755..100644
--- a/examples/declarative/toys/clocks/content/clock-night.png
+++ b/examples/declarative/toys/clocks/content/clock-night.png
Binary files differ
diff --git a/examples/declarative/toys/clocks/content/clock.png b/examples/declarative/toys/clocks/content/clock.png
index 462edac..462edac 100755..100644
--- a/examples/declarative/toys/clocks/content/clock.png
+++ b/examples/declarative/toys/clocks/content/clock.png
Binary files differ
diff --git a/examples/declarative/toys/clocks/content/hour.png b/examples/declarative/toys/clocks/content/hour.png
index f8061a1..f8061a1 100755..100644
--- a/examples/declarative/toys/clocks/content/hour.png
+++ b/examples/declarative/toys/clocks/content/hour.png
Binary files differ
diff --git a/examples/declarative/toys/clocks/content/minute.png b/examples/declarative/toys/clocks/content/minute.png
index 1297ec7..1297ec7 100755..100644
--- a/examples/declarative/toys/clocks/content/minute.png
+++ b/examples/declarative/toys/clocks/content/minute.png
Binary files differ
diff --git a/examples/declarative/toys/clocks/content/second.png b/examples/declarative/toys/clocks/content/second.png
index 4aa9fb5..4aa9fb5 100755..100644
--- a/examples/declarative/toys/clocks/content/second.png
+++ b/examples/declarative/toys/clocks/content/second.png
Binary files differ
diff --git a/examples/declarative/toys/corkboards/Day.qml b/examples/declarative/toys/corkboards/Day.qml
index f9c901f..cc297b1 100644
--- a/examples/declarative/toys/corkboards/Day.qml
+++ b/examples/declarative/toys/corkboards/Day.qml
@@ -49,6 +49,11 @@ Component {
Image { source: "cork.jpg" }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: page.focus = false;
+ }
+
Text {
text: name; x: 15; y: 8; height: 40; width: 370
font.pixelSize: 18; font.bold: true; color: "white"
@@ -106,7 +111,7 @@ Component {
drag.maximumY: page.height - 80
drag.minimumX: 100
drag.maximumX: page.width - 140
- onClicked: { myText.focus = true }
+ onClicked: { myText.focus = true; myText.openSoftwareInputPanel(); }
}
}
}
diff --git a/examples/declarative/toys/dynamicscene/dynamicscene.qml b/examples/declarative/toys/dynamicscene/dynamicscene.qml
index 659a257..1edb841 100644
--- a/examples/declarative/toys/dynamicscene/dynamicscene.qml
+++ b/examples/declarative/toys/dynamicscene/dynamicscene.qml
@@ -50,7 +50,12 @@ Item {
//This is a desktop-sized example
width: 800; height: 480
-
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: window.focus = false;
+ }
+
//This is the message box that pops up when there's an error
Rectangle {
id: dialog
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
index d235d35..c216c08 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
@@ -58,10 +58,12 @@ Rectangle {
function showWithInput(text) {
show(text);
textInput.opacity = 1;
+ textInput.focus = true;
textInput.text = ""
}
function hide() {
+ textInput.focus = false;
container.opacity = 0;
container.closed();
}
@@ -70,6 +72,7 @@ Rectangle {
width: dialogText.width + textInput.width + 20
height: dialogText.height + 20
opacity: 0
+ visible: opacity > 0
Text {
id: dialogText
@@ -82,7 +85,6 @@ Rectangle {
id: textInput
anchors { verticalCenter: parent.verticalCenter; left: dialogText.right }
width: 80
- focus: true
text: ""
onAccepted: container.hide() // close dialog when Enter is pressed
@@ -91,7 +93,13 @@ Rectangle {
MouseArea {
anchors.fill: parent
- onClicked: hide();
+
+ onClicked: {
+ if (textInput.text == "" && textInput.opacity > 0)
+ textInput.openSoftwareInputPanel();
+ else
+ hide();
+ }
}
//![3]
diff --git a/examples/declarative/ui-components/searchbox/SearchBox.qml b/examples/declarative/ui-components/searchbox/SearchBox.qml
index c022626..eaa6b6b 100644
--- a/examples/declarative/ui-components/searchbox/SearchBox.qml
+++ b/examples/declarative/ui-components/searchbox/SearchBox.qml
@@ -66,7 +66,7 @@ FocusScope {
font.italic: true
}
- MouseArea { anchors.fill: parent; onClicked: focusScope.focus = true }
+ MouseArea { anchors.fill: parent; onClicked: { focusScope.focus = true; textInput.openSoftwareInputPanel(); } }
TextInput {
id: textInput
@@ -82,7 +82,7 @@ FocusScope {
MouseArea {
anchors.fill: parent
- onClicked: { textInput.text = ''; focusScope.focus = true }
+ onClicked: { textInput.text = ''; focusScope.focus = true; textInput.openSoftwareInputPanel(); }
}
}
diff --git a/examples/declarative/ui-components/searchbox/main.qml b/examples/declarative/ui-components/searchbox/main.qml
index 0508d5a..bf3bed8 100644
--- a/examples/declarative/ui-components/searchbox/main.qml
+++ b/examples/declarative/ui-components/searchbox/main.qml
@@ -41,9 +41,14 @@
import Qt 4.7
Rectangle {
+ id: page
width: 500; height: 250
color: "#edecec"
+ MouseArea {
+ anchors.fill: parent
+ onClicked: page.focus = false;
+ }
Column {
anchors { horizontalCenter: parent.horizontalCenter; verticalCenter: parent.verticalCenter }
spacing: 10
diff --git a/examples/ja_JP/linguist/hellotr/hellotr.pro b/examples/ja_JP/linguist/hellotr/hellotr.pro
new file mode 100644
index 0000000..3846bfb
--- /dev/null
+++ b/examples/ja_JP/linguist/hellotr/hellotr.pro
@@ -0,0 +1,13 @@
+#! [0]
+SOURCES = main.cpp
+#! [0] #! [1]
+TRANSLATIONS = hellotr_ja.ts
+#! [1]
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/linguist/hellotr
+sources.files = $$SOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/linguist/hellotr
+INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
diff --git a/examples/ja_JP/linguist/hellotr/main.cpp b/examples/ja_JP/linguist/hellotr/main.cpp
new file mode 100644
index 0000000..ad122e9
--- /dev/null
+++ b/examples/ja_JP/linguist/hellotr/main.cpp
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** 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 examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QPushButton>
+//! [0]
+#include <QTranslator>
+//! [0]
+
+//! [1] //! [2]
+int main(int argc, char *argv[])
+//! [1] //! [3] //! [4]
+{
+ QApplication app(argc, argv);
+//! [3]
+
+//! [5]
+ QTranslator translator;
+//! [5] //! [6]
+ translator.load("hellotr_ja");
+//! [6] //! [7]
+ app.installTranslator(&translator);
+//! [4] //! [7]
+
+//! [8]
+ QPushButton hello(QPushButton::tr("Hello world!"));
+//! [8]
+ hello.resize(100, 30);
+
+ hello.show();
+ return app.exec();
+}
+//! [2]
diff --git a/examples/multimedia/videographicsitem/videoplayer.cpp b/examples/multimedia/videographicsitem/videoplayer.cpp
index 281cd6e..f98f542 100644
--- a/examples/multimedia/videographicsitem/videoplayer.cpp
+++ b/examples/multimedia/videographicsitem/videoplayer.cpp
@@ -115,7 +115,20 @@ VideoPlayer::~VideoPlayer()
void VideoPlayer::openFile()
{
- QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie"));
+ QStringList supportedFormats;
+ foreach (QString fmt, QMovie::supportedFormats())
+ supportedFormats << fmt;
+ foreach (QString fmt, QImageReader::supportedImageFormats())
+ supportedFormats << fmt;
+
+ QString filter = "Images (";
+ foreach ( QString fmt, supportedFormats) {
+ filter.append(QString("*.%1 ").arg(fmt));
+ }
+ filter.append(")");
+
+ QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie"),
+ QDir::homePath(), filter);
if (!fileName.isEmpty()) {
videoItem->stop();
diff --git a/examples/multimedia/videowidget/videoplayer.cpp b/examples/multimedia/videowidget/videoplayer.cpp
index 87a2621..ad12069 100644
--- a/examples/multimedia/videowidget/videoplayer.cpp
+++ b/examples/multimedia/videowidget/videoplayer.cpp
@@ -96,7 +96,20 @@ VideoPlayer::~VideoPlayer()
void VideoPlayer::openFile()
{
- QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie"));
+ QStringList supportedFormats;
+ foreach (QString fmt, QMovie::supportedFormats())
+ supportedFormats << fmt;
+ foreach (QString fmt, QImageReader::supportedImageFormats())
+ supportedFormats << fmt;
+
+ QString filter = "Images (";
+ foreach ( QString fmt, supportedFormats) {
+ filter.append(QString("*.%1 ").arg(fmt));
+ }
+ filter.append(")");
+
+ QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie"),
+ QDir::homePath(), filter);
if (!fileName.isEmpty()) {
surface->stop();
diff --git a/examples/tutorials/addressbook/part3/addressbook.cpp b/examples/tutorials/addressbook/part3/addressbook.cpp
index adb87ef..28a570a 100644
--- a/examples/tutorials/addressbook/part3/addressbook.cpp
+++ b/examples/tutorials/addressbook/part3/addressbook.cpp
@@ -125,6 +125,7 @@ void AddressBook::submitContact()
if (name == "" || address == "") {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
+ return;
}
if (!contacts.contains(name)) {
diff --git a/examples/tutorials/addressbook/part4/addressbook.cpp b/examples/tutorials/addressbook/part4/addressbook.cpp
index 1b7a6c4..55d551f 100644
--- a/examples/tutorials/addressbook/part4/addressbook.cpp
+++ b/examples/tutorials/addressbook/part4/addressbook.cpp
@@ -134,6 +134,7 @@ void AddressBook::submitContact()
if (name == "" || address == "") {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
+ return;
}
//! [submitContact() function part1]
if (currentMode == AddingMode) {
diff --git a/examples/tutorials/addressbook/part5/addressbook.cpp b/examples/tutorials/addressbook/part5/addressbook.cpp
index 80c18c3..1b3f451 100644
--- a/examples/tutorials/addressbook/part5/addressbook.cpp
+++ b/examples/tutorials/addressbook/part5/addressbook.cpp
@@ -141,6 +141,7 @@ void AddressBook::submitContact()
if (name == "" || address == "") {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
+ return;
}
if (currentMode == AddingMode) {
diff --git a/examples/tutorials/addressbook/part6/addressbook.cpp b/examples/tutorials/addressbook/part6/addressbook.cpp
index fc41190..724971c 100644
--- a/examples/tutorials/addressbook/part6/addressbook.cpp
+++ b/examples/tutorials/addressbook/part6/addressbook.cpp
@@ -147,6 +147,7 @@ void AddressBook::submitContact()
if (name == "" || address == "") {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
+ return;
}
if (currentMode == AddingMode) {
diff --git a/examples/tutorials/addressbook/part7/addressbook.cpp b/examples/tutorials/addressbook/part7/addressbook.cpp
index 3ab8702..bf00298 100644
--- a/examples/tutorials/addressbook/part7/addressbook.cpp
+++ b/examples/tutorials/addressbook/part7/addressbook.cpp
@@ -149,6 +149,7 @@ void AddressBook::submitContact()
if (name == "" || address == "") {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
+ return;
}
if (currentMode == AddingMode) {
diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf
index a3aade7..ab0c5b9 100644
--- a/mkspecs/common/symbian/symbian-makefile.conf
+++ b/mkspecs/common/symbian/symbian-makefile.conf
@@ -26,7 +26,6 @@ include(../../common/unix.conf)
QMAKE_PREFIX_SHLIB =
QMAKE_EXTENSION_SHLIB = dll
CONFIG *= no_plugin_name_prefix
-CONFIG += run_on_phone
QMAKE_EXTENSION_PLUGIN = dll
QMAKE_PREFIX_STATICLIB =
QMAKE_EXTENSION_STATICLIB = lib
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index b8bfd7c..b037d3c 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -3,7 +3,7 @@
#
TEMPLATE = app
-CONFIG += qt warn_on release incremental link_prl sis_targets
+CONFIG += qt warn_on release incremental link_prl sis_targets run_on_phone
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
diff --git a/mkspecs/features/sis_targets.prf b/mkspecs/features/sis_targets.prf
index 0023b54..37b758b 100644
--- a/mkspecs/features/sis_targets.prf
+++ b/mkspecs/features/sis_targets.prf
@@ -1,5 +1,15 @@
# Sis file creation
-contains(TEMPLATE, app)|!equals(DEPLOYMENT, default_deployment) {
+GENERATE_SIS_TARGETS = false
+
+contains(TEMPLATE, app): GENERATE_SIS_TARGETS = true
+else:!equals(DEPLOYMENT, default_deployment) {
+ for(dep_item, $$list($$DEPLOYMENT)) {
+ dep_item_sources = $$eval($${dep_item}.sources)
+ !isEmpty(dep_item_sources): GENERATE_SIS_TARGETS = true
+ }
+}
+
+equals(GENERATE_SIS_TARGETS, true) {
symbian-abld|symbian-sbsv2 {
sis_destdir =
make_cache_name = .make.cache
@@ -22,6 +32,24 @@ contains(TEMPLATE, app)|!equals(DEPLOYMENT, default_deployment) {
ok_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \
$(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+ unsigned_sis_target.target = unsigned_sis
+ unsigned_sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \
+ $(if $(wildcard $$make_cache_name), \
+ $(MAKE) -f $(MAKEFILE) ok_unsigned_sis MAKEFILES=$$make_cache_name \
+ , \
+ $(if $(QT_SIS_TARGET), \
+ $(MAKE) -f $(MAKEFILE) ok_unsigned_sis \
+ , \
+ $(MAKE) -f $(MAKEFILE) fail_sis_nocache \
+ ) \
+ ) \
+ , \
+ $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \
+ )
+
+ ok_unsigned_sis_target.target = ok_unsigned_sis
+ ok_unsigned_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) -o $$basename(TARGET)_template.pkg $(QT_SIS_TARGET)
+
target_sis_target.target = $${sis_destdir}$${TARGET}.sis
target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis
@@ -64,6 +92,8 @@ contains(TEMPLATE, app)|!equals(DEPLOYMENT, default_deployment) {
QMAKE_EXTRA_TARGETS += sis_target \
ok_sis_target \
+ unsigned_sis_target \
+ ok_unsigned_sis_target \
target_sis_target \
installer_sis_target \
ok_installer_sis_target \
@@ -104,6 +134,10 @@ contains(TEMPLATE, app)|!equals(DEPLOYMENT, default_deployment) {
- $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
sis_target.depends = first
+ unsigned_sis_target.target = unsigned_sis
+ unsigned_sis_target.commands = createpackage $(QT_SIS_OPTIONS) -o $$basename(TARGET)_template.pkg
+ unsigned_sis_target.depends = first
+
target_sis_target.target = $${sis_destdir}$${TARGET}.sis
target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis
@@ -118,6 +152,7 @@ contains(TEMPLATE, app)|!equals(DEPLOYMENT, default_deployment) {
}
QMAKE_EXTRA_TARGETS += sis_target \
+ unsigned_sis_target \
target_sis_target \
installer_sis_target
}
@@ -129,7 +164,8 @@ contains(TEMPLATE, app)|!equals(DEPLOYMENT, default_deployment) {
} else {
# Make sure we build everything, since other sis targets in a recursive invocation
# may depend on them, even if this one is empty.
- sis_target.depends = first
+ # In abld/sbsv2, we assume that subdir has been built already, as all builds are recursive.
+ !symbian-abld:!symbian-sbsv2: sis_target.depends = first
}
sis_target.commands =
sis_target.target = sis
diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf
index 6a95763..1b8e551 100644
--- a/mkspecs/features/symbian/def_files.prf
+++ b/mkspecs/features/symbian/def_files.prf
@@ -7,7 +7,8 @@ symbian-abld|symbian-sbsv2 {
# Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one
# (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements
# in a defBlock variable; but otherwise we have to expand MMP_RULES then scan for the DEFFILE keyword)
- !contains(MMP_RULES, defBlock) {
+ # Similarly, explicit EXPORTUNFROZEN should block adding defBlock
+ !contains(MMP_RULES, defBlock):!contains(MMP_RULES, EXPORTUNFROZEN) {
# Apps are executables on Symbian, so don't have exports, and therefore don't have DEF files
# Plugins use standard DEF files, which qmake generates, so shouldn't be using these DEFFILE
# statements - they use the qmake generated statements instead
diff --git a/mkspecs/features/symbian/def_files_disabled.prf b/mkspecs/features/symbian/def_files_disabled.prf
index 557c5e3..0344911 100644
--- a/mkspecs/features/symbian/def_files_disabled.prf
+++ b/mkspecs/features/symbian/def_files_disabled.prf
@@ -8,6 +8,6 @@ CONFIG -= def_files
!contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): {
# with EXPORTUNFROZEN enabled, new exports are included in the dll and dso/lib without
# needing to run abld/sbs freeze
- MMP_RULES += EXPORTUNFROZEN
+ MMP_RULES *= EXPORTUNFROZEN
}
}
diff --git a/mkspecs/features/symbian/platform_paths.prf b/mkspecs/features/symbian/platform_paths.prf
index 0e8770d..5c190c8 100644
--- a/mkspecs/features/symbian/platform_paths.prf
+++ b/mkspecs/features/symbian/platform_paths.prf
@@ -45,8 +45,17 @@
# INCLUDEPATH += $$OS_LAYER_DBUS_SYSTEMINCLUDE
# INCLUDEPATH += $$OS_LAYER_LIBUTILITY_SYSTEMINCLUDE
#
+# These paths are primarily meant to be used as is in bld.inf and .mmp
+# files, so they do not contain epocroot when using official symbian
+# toolchains (symbian-abld or symbian-sbsv2).
+# For makefile based mkspecs, epocroot is prepended to all paths for
+# convenience.
#
-#
+# To use paths defined here in other contexts that require epocroot to be
+# prepended always, such as exists checks, please use prependEpocroot
+# replacement function:
+#
+# exists($$prependEpocroot($$MW_LAYER_PUBLIC_EXPORT_PATH(foobar.h)))
#
# ==============================================================================
@@ -472,4 +481,13 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
STLLIB_USAGE_CW_FLAGS = "-wchar_t on"
STLLIB_USAGE_DEFINES = _WCHAR_T_DECLARED
+ # Smart prepend of EPOCROOT to a string
+ defineReplace(prependEpocroot) {
+ contains(1, ^$${EPOCROOT}) {
+ return($$1)
+ } else {
+ return($${EPOCROOT}$$replace(1,"^/",))
+ }
+ }
+
}
diff --git a/mkspecs/features/symbian/run_on_phone.prf b/mkspecs/features/symbian/run_on_phone.prf
index c4c7baf..6948a48 100644
--- a/mkspecs/features/symbian/run_on_phone.prf
+++ b/mkspecs/features/symbian/run_on_phone.prf
@@ -1,9 +1,31 @@
# make sure we have a sis file and then call 'runonphone' to execute it on the phone
-contains(TEMPLATE, app) {
- run_target.target = runonphone
- run_target.depends = sis
- run_target.commands = runonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis "$${sis_destdir}$${TARGET}.sis" "$${TARGET}.exe" $(QT_RUN_OPTIONS)
+GENERATE_RUN_TARGETS = false
- QMAKE_EXTRA_TARGETS += run_target
+contains(TEMPLATE, app): GENERATE_RUN_TARGETS = true
+else:!equals(DEPLOYMENT, default_deployment) {
+ for(dep_item, $$list($$DEPLOYMENT)) {
+ dep_item_sources = $$eval($${dep_item}.sources)
+ !isEmpty(dep_item_sources): GENERATE_RUN_TARGETS = true
+ }
+}
+
+equals(GENERATE_RUN_TARGETS, true) {
+ sis_destdir = $$DESTDIR
+ !isEmpty(sis_destdir):!contains(sis_destdir, "[/\\\\]$"):sis_destdir = $${sis_destdir}/
+ contains(QMAKE_HOST.os, "Windows"):sis_destdir = $$replace(sis_destdir, "/", "\\")
+
+ contains(SYMBIAN_PLATFORMS, "WINSCW"):contains(TEMPLATE, "app") {
+ run_target.target = run
+ run_target.commands = call "$${EPOCROOT}epoc32/release/winscw/udeb/$${TARGET}.exe" $(QT_RUN_OPTIONS)
+
+ QMAKE_EXTRA_TARGETS += run_target
+ }
+
+ runonphone_target.target = runonphone
+ runonphone_target.depends = sis
+ runonphone_target.commands = runonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis "$${sis_destdir}$${TARGET}.sis"
+ contains(TEMPLATE, "app"):runonphone_target.commands += "$${TARGET}.exe" $(QT_RUN_OPTIONS)
+
+ QMAKE_EXTRA_TARGETS += runonphone_target
}
diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf
index 92988aa..9fc4d1e 100644
--- a/mkspecs/features/symbian/symbian_building.prf
+++ b/mkspecs/features/symbian/symbian_building.prf
@@ -1,7 +1,7 @@
# we have some module specific options (defined in qt.prf) lets add them
-!contains(TARGET, ".*[ -].*"):eval(TMPVAR = \$\$QMAKE_$${TARGET}_CXXFLAGS)
+!contains(TARGET, ".*[ -/].*"):eval(TMPVAR = \$\$QMAKE_$${TARGET}_CXXFLAGS)
!isEmpty(TMPVAR):QMAKE_CXXFLAGS += $$TMPVAR
-!contains(TARGET, ".*[ -].*"):eval(TMPVAR = \$\$QMAKE_$${TARGET}_LFLAGS)
+!contains(TARGET, ".*[ -/].*"):eval(TMPVAR = \$\$QMAKE_$${TARGET}_LFLAGS)
!isEmpty(TMPVAR) {
QMAKE_LFLAGS += $$TMPVAR
} else :linux-gcce { # lets provide a simple default. Without elf2e32 complains
diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf
index 3353180..3b26f7d 100644
--- a/mkspecs/linux-icc/qmake.conf
+++ b/mkspecs/linux-icc/qmake.conf
@@ -21,13 +21,13 @@ QMAKE_LEX = flex
QMAKE_LEXFLAGS =
QMAKE_YACC = yacc
QMAKE_YACCFLAGS = -d
-QMAKE_CFLAGS = -wd654,1572
+QMAKE_CFLAGS =
QMAKE_CFLAGS_DEPS = -M
-QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_ON = -w1 -Wcheck -wd654,1572,411,873,1125
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
-QMAKE_CFLAGS_DEBUG = -g
-QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_RELEASE = -O2 -falign-functions=16 -ansi-alias -fstrict-aliasing
+QMAKE_CFLAGS_DEBUG = -O0 -g
+QMAKE_CFLAGS_SHLIB = -fPIC -fno-jump-tables
QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CFLAGS_YACC =
QMAKE_CFLAGS_THREAD = -D_REENTRANT
@@ -58,11 +58,12 @@ QMAKE_LINK_SHLIB = icpc
QMAKE_LFLAGS =
QMAKE_LFLAGS_RELEASE =
QMAKE_LFLAGS_DEBUG =
-QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_SHLIB = -shared -shared-intel
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
-QMAKE_LFLAGS_SONAME = -Qoption,ld,-soname,
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
QMAKE_LFLAGS_THREAD =
-QMAKE_LFLAGS_RPATH = -Qoption,ld,-rpath,
+QMAKE_LFLAGS_NOUNDEF = -Wl,-z,defs
+QMAKE_LFLAGS_RPATH = -Wl,-rpath,
QMAKE_LIBS =
QMAKE_LIBS_DYNLOAD = -ldl
@@ -76,7 +77,7 @@ QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
-QMAKE_AR = ar cqs
+QMAKE_AR = xiar cqs
QMAKE_OBJCOPY = objcopy
QMAKE_RANLIB =
@@ -99,8 +100,8 @@ QMAKE_CXXFLAGS_USE_PRECOMPILE = -pch-use ${QMAKE_PCH_OUTPUT} -include ${QMAKE_PC
QMAKE_CXXFLAGS_PRECOMPILE = -c -pch-create ${QMAKE_PCH_OUTPUT} -include ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_TEMP_OBJECT} ${QMAKE_PCH_TEMP_SOURCE}
# -Bsymbolic-functions (ld) support
-QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Qoption,ld,-Bsymbolic-functions
-QMAKE_LFLAGS_DYNAMIC_LIST = -Qoption,ld,--dynamic-list,
+QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions
+QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list,
# Symbol visibility control
QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
diff --git a/mkspecs/modules/qt_webkit_version.pri b/mkspecs/modules/qt_webkit_version.pri
index 0370720..ffd192c 100644
--- a/mkspecs/modules/qt_webkit_version.pri
+++ b/mkspecs/modules/qt_webkit_version.pri
@@ -1,2 +1,4 @@
-# The version information comes from our copy of
-include($$PWD/../../src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri)
+QT_WEBKIT_VERSION = 4.7.0
+QT_WEBKIT_MAJOR_VERSION = 4
+QT_WEBKIT_MINOR_VERSION = 7
+QT_WEBKIT_PATCH_VERSION = 0
diff --git a/mkspecs/unsupported/win32-g++-cross/qmake.conf b/mkspecs/unsupported/win32-g++-cross/qmake.conf
new file mode 100644
index 0000000..e338a22
--- /dev/null
+++ b/mkspecs/unsupported/win32-g++-cross/qmake.conf
@@ -0,0 +1,101 @@
+#
+# qmake configuration for win32-g++-cross
+#
+# Written for MinGW cross building on Unix
+#
+
+MAKEFILE_GENERATOR = MINGW
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl copy_dir_files debug_and_release debug_and_release_target precompile_header
+QT += core gui
+DEFINES += UNICODE QT_LARGEFILE_SUPPORT
+QMAKE_COMPILER_DEFINES += __GNUC__ WIN32
+
+QMAKE_EXT_OBJ = .o
+QMAKE_EXT_RES = _res.o
+
+QMAKE_CC = i686-pc-mingw32-gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = byacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -pipe
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+
+QMAKE_CXX = i686-pc-mingw32-g++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+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_THREAD = $$QMAKE_CFLAGS_THREAD
+QMAKE_CXXFLAGS_RTTI_ON = -frtti
+QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
+QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads
+QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions
+
+QMAKE_INCDIR =
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+
+QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src
+QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
+QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
+QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+QMAKE_LINK = i686-pc-mingw32-g++
+QMAKE_LINK_C = i686-pc-mingw32-gcc
+QMAKE_LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
+QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads -Wl
+QMAKE_LFLAGS_EXCEPTIONS_OFF =
+QMAKE_LFLAGS_RELEASE = -Wl,-s
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console
+QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows
+QMAKE_LFLAGS_DLL = -shared
+QMAKE_LINK_OBJECT_MAX = 10
+QMAKE_LINK_OBJECT_SCRIPT= object_script
+
+
+QMAKE_LIBS =
+QMAKE_LIBS_CORE = -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32
+QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 -ladvapi32
+QMAKE_LIBS_NETWORK = -lws2_32
+QMAKE_LIBS_OPENGL = -lopengl32 -lglu32 -lgdi32 -luser32
+QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
+QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain
+
+QMAKE_SH = bash
+
+MINGW_IN_SHELL = 1
+QMAKE_DIR_SEP = /
+QMAKE_COPY = cp
+QMAKE_COPY_DIR = cp -r
+QMAKE_MOVE = mv
+QMAKE_DEL_FILE = rm -f
+QMAKE_MKDIR = mkdir -p
+QMAKE_DEL_DIR = rmdir
+QMAKE_SYMBOLIC_LINK = ln -s
+QMAKE_CHK_DIR_EXISTS = test -d
+
+#QMAKE_IDC = i686-pc-mingw32-idc
+QMAKE_MOC = i686-pc-mingw32-moc
+QMAKE_RCC = i686-pc-mingw32-rcc
+QMAKE_UIC = i686-pc-mingw32-uic
+
+#QMAKE_IDL = midl
+QMAKE_LIB = i686-pc-mingw32-ar -ru
+QMAKE_RC = i686-pc-mingw32-windres
+QMAKE_ZIP = zip -r -9
+
+QMAKE_STRIP = i686-pc-mingw32-strip
+QMAKE_STRIPFLAGS_LIB += --strip-unneeded
+PKG_CONFIG = i686-pc-mingw32-pkg-config
+load(qt_config)
diff --git a/mkspecs/unsupported/win32-g++-cross/qplatformdefs.h b/mkspecs/unsupported/win32-g++-cross/qplatformdefs.h
new file mode 100644
index 0000000..309e24a
--- /dev/null
+++ b/mkspecs/unsupported/win32-g++-cross/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#include "../../win32-g++/qplatformdefs.h"
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp
index ad8750b..e98831d 100644
--- a/qmake/generators/metamakefile.cpp
+++ b/qmake/generators/metamakefile.cpp
@@ -529,9 +529,18 @@ MetaMakefileGenerator::modesForGenerator(const QString &gen,
*host_mode = Option::HOST_UNIX_MODE;
*target_mode = Option::TARG_UNIX_MODE;
#endif
- } else if (gen == "MSVC.NET" || gen == "MINGW" || gen == "BMAKE" || gen == "MSBUILD") {
+ } else if (gen == "MSVC.NET" || gen == "BMAKE" || gen == "MSBUILD") {
*host_mode = Option::HOST_WIN_MODE;
*target_mode = Option::TARG_WIN_MODE;
+ } else if (gen == "MINGW") {
+#if defined(Q_OS_MAC)
+ *host_mode = Option::HOST_MACX_MODE;
+#elif defined(Q_OS_UNIX)
+ *host_mode = Option::HOST_UNIX_MODE;
+#else
+ *host_mode = Option::HOST_WIN_MODE;
+#endif
+ *target_mode = Option::TARG_WIN_MODE;
} else if (gen == "PROJECTBUILDER" || gen == "XCODE") {
*host_mode = Option::HOST_MACX_MODE;
*target_mode = Option::TARG_MACX_MODE;
diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp
index 58729d2..3a4bdbc 100644
--- a/qmake/generators/symbian/symbiancommon.cpp
+++ b/qmake/generators/symbian/symbiancommon.cpp
@@ -433,9 +433,6 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB
if (from.size() > 1 && from.at(1) == QLatin1Char(':'))
from = from.mid(2);
from.prepend(zDir);
- } else {
- if (from.size() > 1 && from.at(1) == QLatin1Char(':'))
- from = from.mid(2);
}
}
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 6082aeb..ff58270 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -1112,17 +1112,3 @@ void SymbianMakefileGenerator::generateDistcleanTargets(QTextStream& t)
t << "distclean: clean dodistclean" << endl;
t << endl;
}
-
-void SymbianMakefileGenerator::generateExecutionTargets(QTextStream& t, const QStringList& platforms)
-{
- // create execution targets
- if (targetType == TypeExe) {
- if (platforms.contains("winscw")) {
- t << "run:" << endl;
- t << "\t-call " << epocRoot() << "epoc32/release/winscw/udeb/" << fixedTarget << ".exe " << "$(QT_RUN_OPTIONS)" << endl;
- }
- t << "runonphone: sis" << endl;
- t << "\trunonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis " << fixedTarget << ".sis " << fixedTarget << ".exe " << "$(QT_RUN_OPTIONS)" << endl;
- t << endl;
- }
-}
diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h
index c5b6907..9853790 100644
--- a/qmake/generators/symbian/symmake.h
+++ b/qmake/generators/symbian/symmake.h
@@ -129,7 +129,6 @@ protected:
const QString& itemSuffix);
void generateDistcleanTargets(QTextStream& t);
- void generateExecutionTargets(QTextStream& t, const QStringList& platforms);
// Subclass implements
virtual void writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile) = 0;
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index 7e3fb45..d60528b 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -409,8 +409,6 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
t << "\t$(ABLD)" << testClause << " reallyclean " << item << " urel" << endl;
}
t << endl;
-
- generateExecutionTargets(t, debugPlatforms);
}
void SymbianAbldMakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile)
diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
index feacbef..78f6f85 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -99,7 +99,9 @@ void SymbianSbsv2MakefileGenerator::writeSbsDeploymentList(const DeploymentList&
fromItem.replace("\\", "/");
toItem.replace("\\", "/");
#if defined(Q_OS_WIN)
- toItem.prepend(QDir::current().absolutePath().left(2)); // add drive
+ // add drive if it doesn't have one yet
+ if (toItem.size() > 1 && toItem[1] != QLatin1Char(':'))
+ toItem.prepend(QDir::current().absolutePath().left(2));
#endif
t << "OPTION DEPLOY_SOURCE " << fromItem << endl;
t << "OPTION DEPLOY_TARGET " << toItem << endl;
@@ -282,8 +284,6 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo
t << "\t$(SBS) reallyclean -c " << item << "_urel" << testClause << endl;
}
t << endl;
-
- generateExecutionTargets(t, debugPlatforms);
}
void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile)
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index 0936d15..5685d6b 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -371,7 +371,12 @@ void MingwMakefileGenerator::writeObjectsPart(QTextStream &t)
ar_script_file += "." + var("BUILD_NAME");
}
createArObjectScriptFile(ar_script_file, var("DEST_TARGET"), project->values("OBJECTS"));
- objectsLinkLine = "ar -M < " + ar_script_file;
+ // QMAKE_LIB is used for win32, including mingw, whereas QMAKE_AR is used on Unix.
+ // Strip off any options since the ar commands will be read from file.
+ QString ar_cmd = var("QMAKE_LIB").section(" ", 0, 0);;
+ if (ar_cmd.isEmpty())
+ ar_cmd = "ar";
+ objectsLinkLine = ar_cmd + " -M < " + ar_script_file;
} else {
QString ld_script_file = var("QMAKE_LINK_OBJECT_SCRIPT") + "." + var("TARGET");
if (!var("BUILD_NAME").isEmpty()) {
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index 75fc910..bf874b2 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -385,6 +385,7 @@ VCXCLCompilerTool::VCXCLCompilerTool()
DisableLanguageExtensions(unset),
EnableFiberSafeOptimizations(unset),
EnablePREfast(unset),
+ ExceptionHandling("false"),
ExpandAttributedSource(unset),
FloatingPointExceptions(unset),
ForceConformanceInForLoopScope(unset),
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 1e060a0..e23e119 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -360,8 +360,11 @@ inline XmlOutput::xml_output xformUsePrecompiledHeaderForNET2005(pchOption whatP
inline XmlOutput::xml_output xformExceptionHandlingNET2005(exceptionHandling eh, DotNET compilerVersion)
{
- if (eh == ehDefault)
- return noxml();
+ if (eh == ehDefault) {
+ if (compilerVersion >= NET2005)
+ return attrE(_ExceptionHandling, ehNone);
+ return attrS(_ExceptionHandling, "false");
+ }
if (compilerVersion >= NET2005)
return attrE(_ExceptionHandling, eh);
diff --git a/qmake/qmake.pri b/qmake/qmake.pri
index 6e0f8a2..a7e0ab1 100644
--- a/qmake/qmake.pri
+++ b/qmake/qmake.pri
@@ -134,7 +134,7 @@ bootstrap { #Qt code
} else:win32 {
SOURCES += qfsfileengine_win.cpp qfsfileengine_iterator_win.cpp qsettings_win.cpp
win32-msvc*:LIBS += ole32.lib advapi32.lib
- win32-g++:LIBS += -lole32 -luuid
+ win32-g++*:LIBS += -lole32 -luuid
}
qnx {
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-buffer.h b/src/3rdparty/harfbuzz/src/harfbuzz-buffer.h
index b134407..0d7c2c2 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-buffer.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-buffer.h
@@ -32,6 +32,10 @@
HB_BEGIN_HEADER
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(push, 1)
+#endif
+
typedef struct HB_GlyphItemRec_ {
HB_UInt gindex;
HB_UInt properties;
@@ -48,13 +52,13 @@ typedef struct HB_PositionRec_ {
HB_Fixed y_advance;
HB_UShort back; /* number of glyphs to go back
for drawing current glyph */
+ HB_Short cursive_chain; /* character to which this connects,
+ may be positive or negative; used
+ only internally */
HB_Bool new_advance; /* if set, the advance width values are
absolute, i.e., they won't be
added to the original glyph's value
but rather replace them. */
- HB_Short cursive_chain; /* character to which this connects,
- may be positive or negative; used
- only internally */
} HB_PositionRec, *HB_Position;
@@ -66,12 +70,12 @@ typedef struct HB_BufferRec_{
HB_UInt in_pos;
HB_UInt out_pos;
- HB_Bool separate_out;
HB_GlyphItem in_string;
HB_GlyphItem out_string;
HB_GlyphItem alt_string;
HB_Position positions;
HB_UShort max_ligID;
+ HB_Bool separate_out;
} HB_BufferRec, *HB_Buffer;
HB_Error
@@ -89,6 +93,10 @@ hb_buffer_add_glyph( HB_Buffer buffer,
HB_UInt properties,
HB_UInt cluster );
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(pop)
+#endif
+
HB_END_HEADER
#endif /* HARFBUZZ_BUFFER_H */
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-dump.c b/src/3rdparty/harfbuzz/src/harfbuzz-dump.c
index 8c81da1..a1ef6b6 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-dump.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-dump.c
@@ -519,13 +519,14 @@ Dump_ValueRecord (HB_ValueRecord *ValueRecord, FILE *stream, int indent, HB_Type
if (value_format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE)
DUMP_FINT (ValueRecord, XAdvance);
if (value_format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT_DEVICE)
- RECURSE (Device, Device, &ValueRecord->XPlacementDevice);
+ RECURSE (Device, Device, &*ValueRecord->XPlacementDevice);
if (value_format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT_DEVICE)
- RECURSE (Device, Device, &ValueRecord->YPlacementDevice);
+ RECURSE (Device, Device, &*ValueRecord->YPlacementDevice);
if (value_format & HB_GPOS_FORMAT_HAVE_X_ADVANCE_DEVICE)
- RECURSE (Device, Device, &ValueRecord->XAdvanceDevice);
+ RECURSE (Device, Device, &*ValueRecord->XAdvanceDevice);
if (value_format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE_DEVICE)
- RECURSE (Device, Device, &ValueRecord->YAdvanceDevice);
+ RECURSE (Device, Device, &*ValueRecord->YAdvanceDevice);
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
if (value_format & HB_GPOS_FORMAT_HAVE_X_ID_PLACEMENT)
DUMP_FUINT (ValueRecord, XIdPlacement);
if (value_format & HB_GPOS_FORMAT_HAVE_Y_ID_PLACEMENT)
@@ -534,6 +535,7 @@ Dump_ValueRecord (HB_ValueRecord *ValueRecord, FILE *stream, int indent, HB_Type
DUMP_FUINT (ValueRecord, XIdAdvance);
if (value_format & HB_GPOS_FORMAT_HAVE_Y_ID_ADVANCE)
DUMP_FUINT (ValueRecord, XIdAdvance);
+#endif
}
static void
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-external.h b/src/3rdparty/harfbuzz/src/harfbuzz-external.h
index 760749b..7644f0d 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-external.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-external.h
@@ -146,11 +146,7 @@ HB_CharCategory HB_GetUnicodeCharCategory(HB_UChar32 ch);
int HB_GetUnicodeCharCombiningClass(HB_UChar32 ch);
HB_UChar16 HB_GetMirroredChar(HB_UChar16 ch);
-void *HB_Library_Resolve(const char *library, const char *symbol);
-
-void *HB_TextCodecForMib(int mib);
-char *HB_TextCodec_ConvertFromUnicode(void *codec, const HB_UChar16 *unicode, hb_uint32 length, hb_uint32 *outputLength);
-void HB_TextCodec_FreeResult(char *);
+void *HB_Library_Resolve(const char *library, int version, const char *symbol);
HB_END_HEADER
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h
index da06b6f..2a6d958 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h
@@ -34,12 +34,16 @@
HB_BEGIN_HEADER
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(push, 1)
+#endif
+
/* Attachment related structures */
struct HB_AttachPoint_
{
- HB_UShort PointCount; /* size of the PointIndex array */
HB_UShort* PointIndex; /* array of contour points */
+ HB_UShort PointCount; /* size of the PointIndex array */
};
/* Ligature Caret related structures */
@@ -62,32 +66,36 @@ typedef struct HB_CaretValueFormat2_ HB_CaretValueFormat2;
struct HB_CaretValueFormat3_
{
+ HB_Device* Device; /* Device table for x or y value */
HB_Short Coordinate; /* x or y value (in design units) */
- HB_Device Device; /* Device table for x or y value */
};
typedef struct HB_CaretValueFormat3_ HB_CaretValueFormat3;
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
struct HB_CaretValueFormat4_
{
HB_UShort IdCaretValue; /* metric ID */
};
typedef struct HB_CaretValueFormat4_ HB_CaretValueFormat4;
+#endif
struct HB_CaretValue_
{
- HB_UShort CaretValueFormat; /* 1, 2, 3, or 4 */
-
union
{
HB_CaretValueFormat1 cvf1;
HB_CaretValueFormat2 cvf2;
HB_CaretValueFormat3 cvf3;
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
HB_CaretValueFormat4 cvf4;
+#endif
} cvf;
+
+ HB_Byte CaretValueFormat; /* 1, 2, 3, or 4 */
};
typedef struct HB_CaretValue_ HB_CaretValue;
@@ -95,10 +103,9 @@ typedef struct HB_CaretValue_ HB_CaretValue;
struct HB_LigGlyph_
{
- HB_Bool loaded;
-
- HB_UShort CaretCount; /* number of caret values */
HB_CaretValue* CaretValue; /* array of caret values */
+ HB_UShort CaretCount; /* number of caret values */
+ HB_Bool loaded;
};
@@ -119,6 +126,10 @@ _HB_GDEF_LoadMarkAttachClassDef_From_LookupFlags( HB_GDEFHeader* gdef,
HB_Lookup* lo,
HB_UShort num_lookups );
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(pop)
+#endif
+
HB_END_HEADER
#endif /* HARFBUZZ_GDEF_PRIVATE_H */
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gdef.c b/src/3rdparty/harfbuzz/src/harfbuzz-gdef.c
index ff3a1f4..c0c6f2c 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gdef.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gdef.c
@@ -442,7 +442,11 @@ static HB_Error Load_CaretValue( HB_CaretValue* cv,
if ( ACCESS_Frame( 2L ) )
return error;
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
cv->cvf.cvf4.IdCaretValue = GET_UShort();
+#else
+ (void) GET_UShort();
+#endif
FORGET_Frame();
break;
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gdef.h b/src/3rdparty/harfbuzz/src/harfbuzz-gdef.h
index b6dcadc..f9a03dd 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gdef.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gdef.h
@@ -31,6 +31,10 @@
HB_BEGIN_HEADER
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(push, 1)
+#endif
+
/* GDEF glyph properties. Note that HB_GDEF_COMPONENT has no corresponding
* flag in the LookupFlag field. */
#define HB_GDEF_BASE_GLYPH 0x0002
@@ -44,12 +48,11 @@ typedef struct HB_AttachPoint_ HB_AttachPoint;
struct HB_AttachList_
{
- HB_Bool loaded;
-
+ HB_AttachPoint* AttachPoint; /* array of AttachPoint tables */
HB_Coverage Coverage; /* Coverage table */
HB_UShort GlyphCount; /* number of glyphs with
attachments */
- HB_AttachPoint* AttachPoint; /* array of AttachPoint tables */
+ HB_Bool loaded;
};
typedef struct HB_AttachList_ HB_AttachList;
@@ -58,11 +61,10 @@ typedef struct HB_LigGlyph_ HB_LigGlyph;
struct HB_LigCaretList_
{
- HB_Bool loaded;
-
+ HB_LigGlyph* LigGlyph; /* array of LigGlyph tables */
HB_Coverage Coverage; /* Coverage table */
HB_UShort LigGlyphCount; /* number of ligature glyphs */
- HB_LigGlyph* LigGlyph; /* array of LigGlyph tables */
+ HB_Bool loaded;
};
typedef struct HB_LigCaretList_ HB_LigCaretList;
@@ -91,18 +93,18 @@ typedef struct HB_LigCaretList_ HB_LigCaretList;
struct HB_GDEFHeader_
{
+ HB_UShort** NewGlyphClasses;
HB_UInt offset;
+ HB_UInt MarkAttachClassDef_offset;
HB_16Dot16 Version;
HB_ClassDefinition GlyphClassDef;
HB_AttachList AttachList;
HB_LigCaretList LigCaretList;
- HB_UInt MarkAttachClassDef_offset;
HB_ClassDefinition MarkAttachClassDef; /* new in OT 1.2 */
HB_UShort LastGlyph;
- HB_UShort** NewGlyphClasses;
};
typedef struct HB_GDEFHeader_ HB_GDEFHeader;
@@ -129,6 +131,9 @@ HB_Error HB_GDEF_Build_ClassDefinition( HB_GDEFHeader* gdef,
HB_UShort* glyph_array,
HB_UShort* class_array );
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(pop)
+#endif
HB_END_HEADER
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-global.h b/src/3rdparty/harfbuzz/src/harfbuzz-global.h
index d4e6b46..bccd6a2 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-global.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-global.h
@@ -39,6 +39,10 @@
#define HB_END_HEADER /* nothing */
#endif
+#if defined(__GNUC__) || defined(_MSC_VER)
+#define HB_USE_PACKED_STRUCTS
+#endif
+
HB_BEGIN_HEADER
#ifndef FALSE
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h
index 4110700..d513c27 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h
@@ -32,6 +32,9 @@
HB_BEGIN_HEADER
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(push, 1)
+#endif
/* shared tables */
@@ -45,18 +48,20 @@ struct HB_ValueRecord_
advance */
HB_Short YAdvance; /* vertical adjustment for
advance */
- HB_Device XPlacementDevice; /* device table for horizontal
+ HB_Device* XPlacementDevice; /* device table for horizontal
placement */
- HB_Device YPlacementDevice; /* device table for vertical
+ HB_Device* YPlacementDevice; /* device table for vertical
placement */
- HB_Device XAdvanceDevice; /* device table for horizontal
+ HB_Device* XAdvanceDevice; /* device table for horizontal
advance */
- HB_Device YAdvanceDevice; /* device table for vertical
+ HB_Device* YAdvanceDevice; /* device table for vertical
advance */
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
HB_UShort XIdPlacement; /* horizontal placement metric ID */
HB_UShort YIdPlacement; /* vertical placement metric ID */
HB_UShort XIdAdvance; /* horizontal advance metric ID */
HB_UShort YIdAdvance; /* vertical advance metric ID */
+#endif
};
typedef struct HB_ValueRecord_ HB_ValueRecord;
@@ -102,13 +107,14 @@ struct HB_AnchorFormat3_
{
HB_Short XCoordinate; /* horizontal value */
HB_Short YCoordinate; /* vertical value */
- HB_Device XDeviceTable; /* device table for X coordinate */
- HB_Device YDeviceTable; /* device table for Y coordinate */
+ HB_Device* XDeviceTable; /* device table for X coordinate */
+ HB_Device* YDeviceTable; /* device table for Y coordinate */
};
typedef struct HB_AnchorFormat3_ HB_AnchorFormat3;
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
struct HB_AnchorFormat4_
{
HB_UShort XIdAnchor; /* horizontal metric ID */
@@ -116,11 +122,12 @@ struct HB_AnchorFormat4_
};
typedef struct HB_AnchorFormat4_ HB_AnchorFormat4;
+#endif
struct HB_Anchor_
{
- HB_UShort PosFormat; /* 1, 2, 3, or 4 -- 0 indicates
+ HB_Byte PosFormat; /* 1, 2, 3, or 4 -- 0 indicates
that there is no Anchor table */
union
@@ -128,7 +135,9 @@ struct HB_Anchor_
HB_AnchorFormat1 af1;
HB_AnchorFormat2 af2;
HB_AnchorFormat3 af3;
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
HB_AnchorFormat4 af4;
+#endif
} af;
};
@@ -175,7 +184,7 @@ typedef struct HB_SinglePosFormat2_ HB_SinglePosFormat2;
struct HB_SinglePos_
{
- HB_UShort PosFormat; /* 1 or 2 */
+ HB_Byte PosFormat; /* 1 or 2 */
HB_Coverage Coverage; /* Coverage table */
HB_UShort ValueFormat; /* format of ValueRecord table */
@@ -255,7 +264,7 @@ typedef struct HB_PairPosFormat2_ HB_PairPosFormat2;
struct HB_PairPos_
{
- HB_UShort PosFormat; /* 1 or 2 */
+ HB_Byte PosFormat; /* 1 or 2 */
HB_Coverage Coverage; /* Coverage table */
HB_UShort ValueFormat1; /* format of ValueRecord table
for first glyph */
@@ -507,7 +516,7 @@ typedef struct HB_ContextPosFormat3_ HB_ContextPosFormat3;
struct HB_ContextPos_
{
- HB_UShort PosFormat; /* 1, 2, or 3 */
+ HB_Byte PosFormat; /* 1, 2, or 3 */
union
{
@@ -656,7 +665,7 @@ typedef struct HB_ChainContextPosFormat3_ HB_ChainContextPosFormat3;
struct HB_ChainContextPos_
{
- HB_UShort PosFormat; /* 1, 2, or 3 */
+ HB_Byte PosFormat; /* 1, 2, or 3 */
union
{
@@ -707,6 +716,10 @@ HB_INTERNAL void
_HB_GPOS_Free_SubTable( HB_GPOS_SubTable* st,
HB_UShort lookup_type );
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(pop)
+#endif
+
HB_END_HEADER
#endif /* HARFBUZZ_GPOS_PRIVATE_H */
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c
index 356dc01..61e42fd 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c
@@ -57,6 +57,7 @@ static HB_Error GPOS_Do_Glyph_Lookup( GPOS_Instance* gpi,
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
/* the client application must replace this with something more
meaningful if multiple master fonts are to be supported. */
@@ -71,6 +72,7 @@ static HB_Error default_mmfunc( HB_Font font,
HB_UNUSED(data);
return ERR(HB_Err_Not_Covered); /* ERR() call intended */
}
+#endif
@@ -97,7 +99,9 @@ HB_Error HB_Load_GPOS_Table( HB_Stream stream,
if ( ALLOC ( gpos, sizeof( *gpos ) ) )
return error;
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
gpos->mmfunc = default_mmfunc;
+#endif
/* skip version */
@@ -278,9 +282,7 @@ static HB_Error Load_ValueRecord( HB_ValueRecord* vr,
else
{
empty1:
- vr->XPlacementDevice.StartSize = 0;
- vr->XPlacementDevice.EndSize = 0;
- vr->XPlacementDevice.DeltaValue = NULL;
+ vr->XPlacementDevice = 0;
}
if ( format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT_DEVICE )
@@ -309,9 +311,7 @@ static HB_Error Load_ValueRecord( HB_ValueRecord* vr,
else
{
empty2:
- vr->YPlacementDevice.StartSize = 0;
- vr->YPlacementDevice.EndSize = 0;
- vr->YPlacementDevice.DeltaValue = NULL;
+ vr->YPlacementDevice = 0;
}
if ( format & HB_GPOS_FORMAT_HAVE_X_ADVANCE_DEVICE )
@@ -340,9 +340,7 @@ static HB_Error Load_ValueRecord( HB_ValueRecord* vr,
else
{
empty3:
- vr->XAdvanceDevice.StartSize = 0;
- vr->XAdvanceDevice.EndSize = 0;
- vr->XAdvanceDevice.DeltaValue = NULL;
+ vr->XAdvanceDevice = 0;
}
if ( format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE_DEVICE )
@@ -371,9 +369,7 @@ static HB_Error Load_ValueRecord( HB_ValueRecord* vr,
else
{
empty4:
- vr->YAdvanceDevice.StartSize = 0;
- vr->YAdvanceDevice.EndSize = 0;
- vr->YAdvanceDevice.DeltaValue = NULL;
+ vr->YAdvanceDevice = 0;
}
if ( format & HB_GPOS_FORMAT_HAVE_X_ID_PLACEMENT )
@@ -381,48 +377,72 @@ static HB_Error Load_ValueRecord( HB_ValueRecord* vr,
if ( ACCESS_Frame( 2L ) )
goto Fail1;
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
vr->XIdPlacement = GET_UShort();
+#else
+ (void) GET_UShort();
+#endif
FORGET_Frame();
}
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
else
vr->XIdPlacement = 0;
+#endif
if ( format & HB_GPOS_FORMAT_HAVE_Y_ID_PLACEMENT )
{
if ( ACCESS_Frame( 2L ) )
goto Fail1;
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
vr->YIdPlacement = GET_UShort();
+#else
+ (void) GET_UShort();
+#endif
FORGET_Frame();
}
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
else
vr->YIdPlacement = 0;
+#endif
if ( format & HB_GPOS_FORMAT_HAVE_X_ID_ADVANCE )
{
if ( ACCESS_Frame( 2L ) )
goto Fail1;
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
vr->XIdAdvance = GET_UShort();
+#else
+ (void) GET_UShort();
+#endif
FORGET_Frame();
}
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
else
vr->XIdAdvance = 0;
+#endif
if ( format & HB_GPOS_FORMAT_HAVE_Y_ID_ADVANCE )
{
if ( ACCESS_Frame( 2L ) )
goto Fail1;
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
vr->YIdAdvance = GET_UShort();
+#else
+ (void) GET_UShort();
+#endif
FORGET_Frame();
}
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
else
vr->YIdAdvance = 0;
+#endif
return HB_Err_Ok;
@@ -457,10 +477,12 @@ static HB_Error Get_ValueRecord( GPOS_Instance* gpi,
HB_UShort format,
HB_Position gd )
{
- HB_Fixed value;
HB_Short pixel_value;
HB_Error error = HB_Err_Ok;
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
HB_GPOSHeader* gpos = gpi->gpos;
+ HB_Fixed value;
+#endif
HB_UShort x_ppem, y_ppem;
HB_16Dot16 x_scale, y_scale;
@@ -511,6 +533,7 @@ static HB_Error Get_ValueRecord( GPOS_Instance* gpi,
}
}
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
/* values returned from mmfunc() are already in fractional pixels */
if ( format & HB_GPOS_FORMAT_HAVE_X_ID_PLACEMENT )
@@ -545,6 +568,7 @@ static HB_Error Get_ValueRecord( GPOS_Instance* gpi,
return error;
gd->y_advance += value;
}
+#endif
return error;
}
@@ -619,9 +643,7 @@ static HB_Error Load_Anchor( HB_Anchor* an,
}
else
{
- an->af.af3.XDeviceTable.StartSize = 0;
- an->af.af3.XDeviceTable.EndSize = 0;
- an->af.af3.XDeviceTable.DeltaValue = NULL;
+ an->af.af3.XDeviceTable = 0;
}
if ( ACCESS_Frame( 2L ) )
@@ -644,9 +666,7 @@ static HB_Error Load_Anchor( HB_Anchor* an,
}
else
{
- an->af.af3.YDeviceTable.StartSize = 0;
- an->af.af3.YDeviceTable.EndSize = 0;
- an->af.af3.YDeviceTable.DeltaValue = NULL;
+ an->af.af3.YDeviceTable = 0;
}
break;
@@ -654,8 +674,13 @@ static HB_Error Load_Anchor( HB_Anchor* an,
if ( ACCESS_Frame( 4L ) )
return error;
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
an->af.af4.XIdAnchor = GET_UShort();
an->af.af4.YIdAnchor = GET_UShort();
+#else
+ (void) GET_UShort();
+ (void) GET_UShort();
+#endif
FORGET_Frame();
break;
@@ -690,7 +715,9 @@ static HB_Error Get_Anchor( GPOS_Instance* gpi,
{
HB_Error error = HB_Err_Ok;
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
HB_GPOSHeader* gpos = gpi->gpos;
+#endif
HB_UShort ap;
HB_Short pixel_value;
@@ -756,6 +783,7 @@ static HB_Error Get_Anchor( GPOS_Instance* gpi,
break;
case 4:
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
error = (gpos->mmfunc)( gpi->font, an->af.af4.XIdAnchor,
x_value, gpos->data );
if ( error )
@@ -766,6 +794,9 @@ static HB_Error Get_Anchor( GPOS_Instance* gpi,
if ( error )
return error;
break;
+#else
+ return ERR(HB_Err_Not_Covered);
+#endif
}
return error;
@@ -5966,8 +5997,7 @@ HB_Error HB_GPOS_Clear_Features( HB_GPOSHeader* gpos )
return HB_Err_Ok;
}
-
-
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
HB_Error HB_GPOS_Register_MM_Function( HB_GPOSHeader* gpos,
HB_MMFunction mmfunc,
void* data )
@@ -5980,6 +6010,7 @@ HB_Error HB_GPOS_Register_MM_Function( HB_GPOSHeader* gpos,
return HB_Err_Ok;
}
+#endif
/* If `dvi' is TRUE, glyph contour points for anchor points and device
tables are ignored -- you will get device independent values. */
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.h b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.h
index 2840dae..92bff84 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.h
@@ -44,6 +44,7 @@ HB_BEGIN_HEADER
#define HB_GPOS_LOOKUP_CHAIN 8
#define HB_GPOS_LOOKUP_EXTENSION 9
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
/* A pointer to a function which accesses the PostScript interpreter.
Multiple Master fonts need this interface to convert a metric ID
(as stored in an OpenType font version 1.2 or higher) `metric_id'
@@ -59,6 +60,7 @@ typedef HB_Error (*HB_MMFunction)(HB_Font font,
HB_UShort metric_id,
HB_Fixed* metric_value,
void* data );
+#endif
struct HB_GPOSHeader_
@@ -71,12 +73,14 @@ struct HB_GPOSHeader_
HB_GDEFHeader* gdef;
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
/* this is OpenType 1.2 -- Multiple Master fonts need this
callback function to get various metric values from the
PostScript interpreter. */
HB_MMFunction mmfunc;
void* data;
+#endif
};
typedef struct HB_GPOSHeader_ HB_GPOSHeader;
@@ -129,9 +133,11 @@ HB_Error HB_GPOS_Add_Feature( HB_GPOSHeader* gpos,
HB_Error HB_GPOS_Clear_Features( HB_GPOSHeader* gpos );
+#ifdef HB_SUPPORT_MULTIPLE_MASTER
HB_Error HB_GPOS_Register_MM_Function( HB_GPOSHeader* gpos,
HB_MMFunction mmfunc,
void* data );
+#endif
/* If `dvi' is TRUE, glyph contour points for anchor points and device
tables are ignored -- you will get device independent values. */
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h
index dd5ffdf..7eb329e 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h
@@ -32,6 +32,9 @@
HB_BEGIN_HEADER
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(push, 1)
+#endif
typedef union HB_GSUB_SubTable_ HB_GSUB_SubTable;
@@ -48,9 +51,9 @@ typedef struct HB_SingleSubstFormat1_ HB_SingleSubstFormat1;
struct HB_SingleSubstFormat2_
{
+ HB_UShort* Substitute; /* array of substitute glyph IDs */
HB_UShort GlyphCount; /* number of glyph IDs in
Substitute array */
- HB_UShort* Substitute; /* array of substitute glyph IDs */
};
typedef struct HB_SingleSubstFormat2_ HB_SingleSubstFormat2;
@@ -58,14 +61,14 @@ typedef struct HB_SingleSubstFormat2_ HB_SingleSubstFormat2;
struct HB_SingleSubst_
{
- HB_UShort SubstFormat; /* 1 or 2 */
- HB_Coverage Coverage; /* Coverage table */
-
union
{
HB_SingleSubstFormat1 ssf1;
HB_SingleSubstFormat2 ssf2;
} ssf;
+
+ HB_Coverage Coverage; /* Coverage table */
+ HB_Byte SubstFormat; /* 1 or 2 */
};
typedef struct HB_SingleSubst_ HB_SingleSubst;
@@ -75,10 +78,10 @@ typedef struct HB_SingleSubst_ HB_SingleSubst;
struct HB_Sequence_
{
- HB_UShort GlyphCount; /* number of glyph IDs in the
- Substitute array */
HB_UShort* Substitute; /* string of glyph IDs to
substitute */
+ HB_UShort GlyphCount; /* number of glyph IDs in the
+ Substitute array */
};
typedef struct HB_Sequence_ HB_Sequence;
@@ -86,10 +89,10 @@ typedef struct HB_Sequence_ HB_Sequence;
struct HB_MultipleSubst_
{
- HB_UShort SubstFormat; /* always 1 */
+ HB_Sequence* Sequence; /* array of Sequence tables */
HB_Coverage Coverage; /* Coverage table */
+ HB_UShort SubstFormat; /* always 1 */
HB_UShort SequenceCount; /* number of Sequence tables */
- HB_Sequence* Sequence; /* array of Sequence tables */
};
typedef struct HB_MultipleSubst_ HB_MultipleSubst;
@@ -99,9 +102,9 @@ typedef struct HB_MultipleSubst_ HB_MultipleSubst;
struct HB_AlternateSet_
{
+ HB_UShort* Alternate; /* array of alternate glyph IDs */
HB_UShort GlyphCount; /* number of glyph IDs in the
Alternate array */
- HB_UShort* Alternate; /* array of alternate glyph IDs */
};
typedef struct HB_AlternateSet_ HB_AlternateSet;
@@ -109,11 +112,11 @@ typedef struct HB_AlternateSet_ HB_AlternateSet;
struct HB_AlternateSubst_
{
- HB_UShort SubstFormat; /* always 1 */
+ HB_AlternateSet* AlternateSet; /* array of AlternateSet tables */
HB_Coverage Coverage; /* Coverage table */
+ HB_UShort SubstFormat; /* always 1 */
HB_UShort AlternateSetCount;
/* number of AlternateSet tables */
- HB_AlternateSet* AlternateSet; /* array of AlternateSet tables */
};
typedef struct HB_AlternateSubst_ HB_AlternateSubst;
@@ -123,10 +126,10 @@ typedef struct HB_AlternateSubst_ HB_AlternateSubst;
struct HB_Ligature_
{
+ HB_UShort* Component; /* array of component glyph IDs */
HB_UShort LigGlyph; /* glyphID of ligature
to substitute */
HB_UShort ComponentCount; /* number of components in ligature */
- HB_UShort* Component; /* array of component glyph IDs */
};
typedef struct HB_Ligature_ HB_Ligature;
@@ -134,8 +137,8 @@ typedef struct HB_Ligature_ HB_Ligature;
struct HB_LigatureSet_
{
- HB_UShort LigatureCount; /* number of Ligature tables */
HB_Ligature* Ligature; /* array of Ligature tables */
+ HB_UShort LigatureCount; /* number of Ligature tables */
};
typedef struct HB_LigatureSet_ HB_LigatureSet;
@@ -143,10 +146,10 @@ typedef struct HB_LigatureSet_ HB_LigatureSet;
struct HB_LigatureSubst_
{
- HB_UShort SubstFormat; /* always 1 */
+ HB_LigatureSet* LigatureSet; /* array of LigatureSet tables */
HB_Coverage Coverage; /* Coverage table */
+ HB_UShort SubstFormat; /* always 1 */
HB_UShort LigatureSetCount; /* number of LigatureSet tables */
- HB_LigatureSet* LigatureSet; /* array of LigatureSet tables */
};
typedef struct HB_LigatureSubst_ HB_LigatureSubst;
@@ -168,13 +171,13 @@ typedef struct HB_SubstLookupRecord_ HB_SubstLookupRecord;
struct HB_SubRule_
{
- HB_UShort GlyphCount; /* total number of input glyphs */
- HB_UShort SubstCount; /* number of SubstLookupRecord
- tables */
HB_UShort* Input; /* array of input glyph IDs */
HB_SubstLookupRecord* SubstLookupRecord;
/* array of SubstLookupRecord
tables */
+ HB_UShort GlyphCount; /* total number of input glyphs */
+ HB_UShort SubstCount; /* number of SubstLookupRecord
+ tables */
};
typedef struct HB_SubRule_ HB_SubRule;
@@ -182,8 +185,8 @@ typedef struct HB_SubRule_ HB_SubRule;
struct HB_SubRuleSet_
{
- HB_UShort SubRuleCount; /* number of SubRule tables */
HB_SubRule* SubRule; /* array of SubRule tables */
+ HB_UShort SubRuleCount; /* number of SubRule tables */
};
typedef struct HB_SubRuleSet_ HB_SubRuleSet;
@@ -191,9 +194,9 @@ typedef struct HB_SubRuleSet_ HB_SubRuleSet;
struct HB_ContextSubstFormat1_
{
+ HB_SubRuleSet* SubRuleSet; /* array of SubRuleSet tables */
HB_Coverage Coverage; /* Coverage table */
HB_UShort SubRuleSetCount; /* number of SubRuleSet tables */
- HB_SubRuleSet* SubRuleSet; /* array of SubRuleSet tables */
};
typedef struct HB_ContextSubstFormat1_ HB_ContextSubstFormat1;
@@ -201,13 +204,13 @@ typedef struct HB_ContextSubstFormat1_ HB_ContextSubstFormat1;
struct HB_SubClassRule_
{
- HB_UShort GlyphCount; /* total number of context classes */
- HB_UShort SubstCount; /* number of SubstLookupRecord
- tables */
HB_UShort* Class; /* array of classes */
HB_SubstLookupRecord* SubstLookupRecord;
/* array of SubstLookupRecord
tables */
+ HB_UShort GlyphCount; /* total number of context classes */
+ HB_UShort SubstCount; /* number of SubstLookupRecord
+ tables */
};
typedef struct HB_SubClassRule_ HB_SubClassRule;
@@ -215,9 +218,9 @@ typedef struct HB_SubClassRule_ HB_SubClassRule;
struct HB_SubClassSet_
{
+ HB_SubClassRule* SubClassRule; /* array of SubClassRule tables */
HB_UShort SubClassRuleCount;
/* number of SubClassRule tables */
- HB_SubClassRule* SubClassRule; /* array of SubClassRule tables */
};
typedef struct HB_SubClassSet_ HB_SubClassSet;
@@ -229,13 +232,13 @@ typedef struct HB_SubClassSet_ HB_SubClassSet;
struct HB_ContextSubstFormat2_
{
- HB_UShort MaxContextLength;
- /* maximal context length */
+ HB_SubClassSet* SubClassSet; /* array of SubClassSet tables */
HB_Coverage Coverage; /* Coverage table */
HB_ClassDefinition ClassDef; /* ClassDef table */
HB_UShort SubClassSetCount;
/* number of SubClassSet tables */
- HB_SubClassSet* SubClassSet; /* array of SubClassSet tables */
+ HB_UShort MaxContextLength;
+ /* maximal context length */
};
typedef struct HB_ContextSubstFormat2_ HB_ContextSubstFormat2;
@@ -243,11 +246,11 @@ typedef struct HB_ContextSubstFormat2_ HB_ContextSubstFormat2;
struct HB_ContextSubstFormat3_
{
- HB_UShort GlyphCount; /* number of input glyphs */
- HB_UShort SubstCount; /* number of SubstLookupRecords */
HB_Coverage* Coverage; /* array of Coverage tables */
HB_SubstLookupRecord* SubstLookupRecord;
/* array of substitution lookups */
+ HB_UShort GlyphCount; /* number of input glyphs */
+ HB_UShort SubstCount; /* number of SubstLookupRecords */
};
typedef struct HB_ContextSubstFormat3_ HB_ContextSubstFormat3;
@@ -255,14 +258,14 @@ typedef struct HB_ContextSubstFormat3_ HB_ContextSubstFormat3;
struct HB_ContextSubst_
{
- HB_UShort SubstFormat; /* 1, 2, or 3 */
-
union
{
HB_ContextSubstFormat1 csf1;
HB_ContextSubstFormat2 csf2;
HB_ContextSubstFormat3 csf3;
} csf;
+
+ HB_Byte SubstFormat; /* 1, 2, or 3 */
};
typedef struct HB_ContextSubst_ HB_ContextSubst;
@@ -272,18 +275,18 @@ typedef struct HB_ContextSubst_ HB_ContextSubst;
struct HB_ChainSubRule_
{
+ HB_UShort* Backtrack; /* array of backtrack glyph IDs */
+ HB_UShort* Input; /* array of input glyph IDs */
+ HB_UShort* Lookahead; /* array of lookahead glyph IDs */
+ HB_SubstLookupRecord* SubstLookupRecord;
+ /* array of SubstLookupRecords */
HB_UShort BacktrackGlyphCount;
/* total number of backtrack glyphs */
- HB_UShort* Backtrack; /* array of backtrack glyph IDs */
HB_UShort InputGlyphCount;
/* total number of input glyphs */
- HB_UShort* Input; /* array of input glyph IDs */
HB_UShort LookaheadGlyphCount;
/* total number of lookahead glyphs */
- HB_UShort* Lookahead; /* array of lookahead glyph IDs */
HB_UShort SubstCount; /* number of SubstLookupRecords */
- HB_SubstLookupRecord* SubstLookupRecord;
- /* array of SubstLookupRecords */
};
typedef struct HB_ChainSubRule_ HB_ChainSubRule;
@@ -291,9 +294,9 @@ typedef struct HB_ChainSubRule_ HB_ChainSubRule;
struct HB_ChainSubRuleSet_
{
+ HB_ChainSubRule* ChainSubRule; /* array of ChainSubRule tables */
HB_UShort ChainSubRuleCount;
/* number of ChainSubRule tables */
- HB_ChainSubRule* ChainSubRule; /* array of ChainSubRule tables */
};
typedef struct HB_ChainSubRuleSet_ HB_ChainSubRuleSet;
@@ -301,11 +304,11 @@ typedef struct HB_ChainSubRuleSet_ HB_ChainSubRuleSet;
struct HB_ChainContextSubstFormat1_
{
+ HB_ChainSubRuleSet* ChainSubRuleSet;
+ /* array of ChainSubRuleSet tables */
HB_Coverage Coverage; /* Coverage table */
HB_UShort ChainSubRuleSetCount;
/* number of ChainSubRuleSet tables */
- HB_ChainSubRuleSet* ChainSubRuleSet;
- /* array of ChainSubRuleSet tables */
};
typedef struct HB_ChainContextSubstFormat1_ HB_ChainContextSubstFormat1;
@@ -313,20 +316,20 @@ typedef struct HB_ChainContextSubstFormat1_ HB_ChainContextSubstFormat1;
struct HB_ChainSubClassRule_
{
+ HB_UShort* Backtrack; /* array of backtrack classes */
+ HB_UShort* Input; /* array of context classes */
+ HB_UShort* Lookahead; /* array of lookahead classes */
+ HB_SubstLookupRecord* SubstLookupRecord;
+ /* array of substitution lookups */
HB_UShort BacktrackGlyphCount;
/* total number of backtrack
classes */
- HB_UShort* Backtrack; /* array of backtrack classes */
HB_UShort InputGlyphCount;
/* total number of context classes */
- HB_UShort* Input; /* array of context classes */
HB_UShort LookaheadGlyphCount;
/* total number of lookahead
classes */
- HB_UShort* Lookahead; /* array of lookahead classes */
HB_UShort SubstCount; /* number of SubstLookupRecords */
- HB_SubstLookupRecord* SubstLookupRecord;
- /* array of substitution lookups */
};
typedef struct HB_ChainSubClassRule_ HB_ChainSubClassRule;
@@ -334,12 +337,12 @@ typedef struct HB_ChainSubClassRule_ HB_ChainSubClassRule;
struct HB_ChainSubClassSet_
{
- HB_UShort ChainSubClassRuleCount;
- /* number of ChainSubClassRule
- tables */
HB_ChainSubClassRule* ChainSubClassRule;
/* array of ChainSubClassRule
tables */
+ HB_UShort ChainSubClassRuleCount;
+ /* number of ChainSubClassRule
+ tables */
};
typedef struct HB_ChainSubClassSet_ HB_ChainSubClassSet;
@@ -351,27 +354,27 @@ typedef struct HB_ChainSubClassSet_ HB_ChainSubClassSet;
struct HB_ChainContextSubstFormat2_
{
+ HB_ChainSubClassSet* ChainSubClassSet;
+ /* array of ChainSubClassSet
+ tables */
HB_Coverage Coverage; /* Coverage table */
- HB_UShort MaxBacktrackLength;
- /* maximal backtrack length */
HB_ClassDefinition BacktrackClassDef;
/* BacktrackClassDef table */
- HB_UShort MaxInputLength;
- /* maximal input length */
HB_ClassDefinition InputClassDef;
/* InputClassDef table */
- HB_UShort MaxLookaheadLength;
- /* maximal lookahead length */
HB_ClassDefinition LookaheadClassDef;
/* LookaheadClassDef table */
HB_UShort ChainSubClassSetCount;
/* number of ChainSubClassSet
tables */
- HB_ChainSubClassSet* ChainSubClassSet;
- /* array of ChainSubClassSet
- tables */
+ HB_UShort MaxBacktrackLength;
+ /* maximal backtrack length */
+ HB_UShort MaxLookaheadLength;
+ /* maximal lookahead length */
+ HB_UShort MaxInputLength;
+ /* maximal input length */
};
typedef struct HB_ChainContextSubstFormat2_ HB_ChainContextSubstFormat2;
@@ -379,24 +382,24 @@ typedef struct HB_ChainContextSubstFormat2_ HB_ChainContextSubstFormat2;
struct HB_ChainContextSubstFormat3_
{
- HB_UShort BacktrackGlyphCount;
- /* number of backtrack glyphs */
HB_Coverage* BacktrackCoverage;
/* array of backtrack Coverage
tables */
- HB_UShort InputGlyphCount;
- /* number of input glyphs */
HB_Coverage* InputCoverage;
/* array of input coverage
tables */
- HB_UShort LookaheadGlyphCount;
- /* number of lookahead glyphs */
HB_Coverage* LookaheadCoverage;
/* array of lookahead coverage
tables */
- HB_UShort SubstCount; /* number of SubstLookupRecords */
HB_SubstLookupRecord* SubstLookupRecord;
/* array of substitution lookups */
+ HB_UShort BacktrackGlyphCount;
+ /* number of backtrack glyphs */
+ HB_UShort InputGlyphCount;
+ /* number of input glyphs */
+ HB_UShort LookaheadGlyphCount;
+ /* number of lookahead glyphs */
+ HB_UShort SubstCount; /* number of SubstLookupRecords */
};
typedef struct HB_ChainContextSubstFormat3_ HB_ChainContextSubstFormat3;
@@ -404,14 +407,14 @@ typedef struct HB_ChainContextSubstFormat3_ HB_ChainContextSubstFormat3;
struct HB_ChainContextSubst_
{
- HB_UShort SubstFormat; /* 1, 2, or 3 */
-
union
{
HB_ChainContextSubstFormat1 ccsf1;
HB_ChainContextSubstFormat2 ccsf2;
HB_ChainContextSubstFormat3 ccsf3;
} ccsf;
+
+ HB_Byte SubstFormat; /* 1, 2, or 3 */
};
typedef struct HB_ChainContextSubst_ HB_ChainContextSubst;
@@ -421,9 +424,9 @@ typedef struct HB_ChainContextSubst_ HB_ChainContextSubst;
/* LookupType 7 */
struct HB_ExtensionSubst_
{
+ HB_GSUB_SubTable *subtable; /* referenced subtable */
HB_UShort SubstFormat; /* always 1 */
HB_UShort LookuptType; /* lookup-type of referenced subtable */
- HB_GSUB_SubTable *subtable; /* referenced subtable */
};
typedef struct HB_ExtensionSubst_ HB_ExtensionSubst;
@@ -433,16 +436,16 @@ typedef struct HB_ExtensionSubst_ HB_ExtensionSubst;
/* LookupType 8 */
struct HB_ReverseChainContextSubst_
{
- HB_UShort SubstFormat; /* always 1 */
- HB_Coverage Coverage; /* coverage table for input glyphs */
- HB_UShort BacktrackGlyphCount; /* number of backtrack glyphs */
+ HB_Coverage* LookaheadCoverage; /* array of lookahead Coverage
+ tables */
+ HB_UShort* Substitute; /* array of substitute Glyph ID */
HB_Coverage* BacktrackCoverage; /* array of backtrack Coverage
tables */
+ HB_Coverage Coverage; /* coverage table for input glyphs */
+ HB_UShort SubstFormat; /* always 1 */
+ HB_UShort BacktrackGlyphCount; /* number of backtrack glyphs */
HB_UShort LookaheadGlyphCount; /* number of lookahead glyphs */
- HB_Coverage* LookaheadCoverage; /* array of lookahead Coverage
- tables */
HB_UShort GlyphCount; /* number of Glyph IDs */
- HB_UShort* Substitute; /* array of substitute Glyph ID */
};
typedef struct HB_ReverseChainContextSubst_ HB_ReverseChainContextSubst;
@@ -471,6 +474,10 @@ HB_INTERNAL void
_HB_GSUB_Free_SubTable( HB_GSUB_SubTable* st,
HB_UShort lookup_type );
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(pop)
+#endif
+
HB_END_HEADER
#endif /* HARFBUZZ_GSUB_PRIVATE_H */
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gsub.h b/src/3rdparty/harfbuzz/src/harfbuzz-gsub.h
index 1ca3f0c..b00df44 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gsub.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gsub.h
@@ -32,6 +32,10 @@
HB_BEGIN_HEADER
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(push, 1)
+#endif
+
/* Lookup types for glyph substitution */
#define HB_GSUB_LOOKUP_SINGLE 1
@@ -60,6 +64,14 @@ typedef HB_UShort (*HB_AltFunction)(HB_UInt pos,
struct HB_GSUBHeader_
{
+ HB_GDEFHeader* gdef;
+
+ /* the next two fields are used for an alternate substitution callback
+ function to select the proper alternate glyph. */
+
+ void* data;
+ HB_AltFunction altfunc;
+
HB_UInt offset;
HB_16Dot16 Version;
@@ -67,14 +79,6 @@ struct HB_GSUBHeader_
HB_ScriptList ScriptList;
HB_FeatureList FeatureList;
HB_LookupList LookupList;
-
- HB_GDEFHeader* gdef;
-
- /* the next two fields are used for an alternate substitution callback
- function to select the proper alternate glyph. */
-
- HB_AltFunction altfunc;
- void* data;
};
typedef struct HB_GSUBHeader_ HB_GSUBHeader;
@@ -135,6 +139,9 @@ HB_Error HB_GSUB_Register_Alternate_Function( HB_GSUBHeader* gsub,
HB_Error HB_GSUB_Apply_String( HB_GSUBHeader* gsub,
HB_Buffer buffer );
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(pop)
+#endif
HB_END_HEADER
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-open-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-open-private.h
index 73dd383..1f7b353 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-open-private.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-open-private.h
@@ -69,7 +69,7 @@ _HB_OPEN_Load_EmptyOrClassDefinition( HB_ClassDefinition* cd,
HB_UInt base_offset,
HB_Stream input );
HB_INTERNAL HB_Error
-_HB_OPEN_Load_Device( HB_Device* d,
+_HB_OPEN_Load_Device( HB_Device** d,
HB_Stream input );
HB_INTERNAL void _HB_OPEN_Free_ScriptList( HB_ScriptList* sl );
@@ -79,7 +79,7 @@ HB_INTERNAL void _HB_OPEN_Free_LookupList( HB_LookupList* ll,
HB_INTERNAL void _HB_OPEN_Free_Coverage( HB_Coverage* c );
HB_INTERNAL void _HB_OPEN_Free_ClassDefinition( HB_ClassDefinition* cd );
-HB_INTERNAL void _HB_OPEN_Free_Device( HB_Device* d );
+HB_INTERNAL void _HB_OPEN_Free_Device( HB_Device** d );
@@ -93,7 +93,7 @@ _HB_OPEN_Get_Class( HB_ClassDefinition* cd,
HB_UShort* klass,
HB_UShort* index );
HB_INTERNAL HB_Error
-_HB_OPEN_Get_Device( HB_Device* d,
+_HB_OPEN_Get_Device( HB_Device** d,
HB_UShort size,
HB_Short* value );
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-open.c b/src/3rdparty/harfbuzz/src/harfbuzz-open.c
index 0fe1e4d..255b7e6 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-open.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-open.c
@@ -1282,9 +1282,10 @@ _HB_OPEN_Get_Class( HB_ClassDefinition* cd,
HB_INTERNAL HB_Error
-_HB_OPEN_Load_Device( HB_Device* d,
+_HB_OPEN_Load_Device( HB_Device** device,
HB_Stream stream )
{
+ HB_Device* d;
HB_Error error;
HB_UShort n, count;
@@ -1295,6 +1296,14 @@ _HB_OPEN_Load_Device( HB_Device* d,
if ( ACCESS_Frame( 6L ) )
return error;
+ if ( ALLOC( *device, sizeof(HB_Device)) )
+ {
+ *device = 0;
+ return error;
+ }
+
+ d = *device;
+
d->StartSize = GET_UShort();
d->EndSize = GET_UShort();
d->DeltaFormat = GET_UShort();
@@ -1318,11 +1327,17 @@ _HB_OPEN_Load_Device( HB_Device* d,
( 4 - d->DeltaFormat ) ) + 1;
if ( ALLOC_ARRAY( d->DeltaValue, count, HB_UShort ) )
+ {
+ FREE( *device );
+ *device = 0;
return error;
+ }
if ( ACCESS_Frame( count * 2L ) )
{
FREE( d->DeltaValue );
+ FREE( *device );
+ *device = 0;
return error;
}
@@ -1338,9 +1353,13 @@ _HB_OPEN_Load_Device( HB_Device* d,
HB_INTERNAL void
-_HB_OPEN_Free_Device( HB_Device* d )
+_HB_OPEN_Free_Device( HB_Device** d )
{
- FREE( d->DeltaValue );
+ if ( *d )
+ {
+ FREE( (*d)->DeltaValue );
+ FREE( *d );
+ }
}
@@ -1380,12 +1399,21 @@ _HB_OPEN_Free_Device( HB_Device* d )
mask = 0x00FF */
HB_INTERNAL HB_Error
-_HB_OPEN_Get_Device( HB_Device* d,
+_HB_OPEN_Get_Device( HB_Device** device,
HB_UShort size,
HB_Short* value )
{
+ HB_Device* d;
HB_UShort byte, bits, mask, f, s;
+ HB_Error error;
+
+ if ( ALLOC( *device, sizeof(HB_Device)) )
+ {
+ *device = 0;
+ return error;
+ }
+ d = *device;
f = d->DeltaFormat;
@@ -1408,6 +1436,8 @@ _HB_OPEN_Get_Device( HB_Device* d,
else
{
*value = 0;
+ FREE( *device );
+ *device = 0;
return HB_Err_Not_Covered;
}
}
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-open.h b/src/3rdparty/harfbuzz/src/harfbuzz-open.h
index bdc6358..4ba6cf5 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-open.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-open.h
@@ -30,6 +30,10 @@
HB_BEGIN_HEADER
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(push, 1)
+#endif
+
/* Use this if a feature applies to all glyphs */
#define HB_ALL_GLYPHS 0xFFFF
@@ -42,10 +46,10 @@ HB_BEGIN_HEADER
struct HB_LangSys_
{
+ HB_UShort* FeatureIndex; /* array of Feature indices */
HB_UShort LookupOrderOffset; /* always 0 for TT Open 1.0 */
HB_UShort ReqFeatureIndex; /* required FeatureIndex */
HB_UShort FeatureCount; /* number of Feature indices */
- HB_UShort* FeatureIndex; /* array of Feature indices */
};
typedef struct HB_LangSys_ HB_LangSys;
@@ -53,8 +57,8 @@ typedef struct HB_LangSys_ HB_LangSys;
struct HB_LangSysRecord_
{
- HB_UInt LangSysTag; /* LangSysTag identifier */
HB_LangSys LangSys; /* LangSys table */
+ HB_UInt LangSysTag; /* LangSysTag identifier */
};
typedef struct HB_LangSysRecord_ HB_LangSysRecord;
@@ -62,9 +66,9 @@ typedef struct HB_LangSysRecord_ HB_LangSysRecord;
struct HB_ScriptTable_
{
+ HB_LangSysRecord* LangSysRecord; /* array of LangSysRecords */
HB_LangSys DefaultLangSys; /* DefaultLangSys table */
HB_UShort LangSysCount; /* number of LangSysRecords */
- HB_LangSysRecord* LangSysRecord; /* array of LangSysRecords */
};
typedef struct HB_ScriptTable_ HB_ScriptTable;
@@ -81,8 +85,8 @@ typedef struct HB_ScriptRecord_ HB_ScriptRecord;
struct HB_ScriptList_
{
- HB_UShort ScriptCount; /* number of ScriptRecords */
HB_ScriptRecord* ScriptRecord; /* array of ScriptRecords */
+ HB_UShort ScriptCount; /* number of ScriptRecords */
};
typedef struct HB_ScriptList_ HB_ScriptList;
@@ -92,9 +96,9 @@ typedef struct HB_ScriptList_ HB_ScriptList;
struct HB_Feature_
{
+ HB_UShort* LookupListIndex; /* array of LookupList indices */
HB_UShort FeatureParams; /* always 0 for TT Open 1.0 */
HB_UShort LookupListCount; /* number of LookupList indices */
- HB_UShort* LookupListIndex; /* array of LookupList indices */
};
typedef struct HB_Feature_ HB_Feature;
@@ -111,9 +115,9 @@ typedef struct HB_FeatureRecord_ HB_FeatureRecord;
struct HB_FeatureList_
{
- HB_UShort FeatureCount; /* number of FeatureRecords */
- HB_FeatureRecord* FeatureRecord; /* array of FeatureRecords */
HB_UShort* ApplyOrder; /* order to apply features */
+ HB_FeatureRecord* FeatureRecord; /* array of FeatureRecords */
+ HB_UShort FeatureCount; /* number of FeatureRecords */
HB_UShort ApplyCount; /* number of elements in ApplyOrder */
};
@@ -127,10 +131,10 @@ typedef struct HB_SubTable_ HB_SubTable;
struct HB_Lookup_
{
+ HB_SubTable* SubTable; /* array of SubTables */
HB_UShort LookupType; /* Lookup type */
HB_UShort LookupFlag; /* Lookup qualifiers */
HB_UShort SubTableCount; /* number of SubTables */
- HB_SubTable* SubTable; /* array of SubTables */
};
typedef struct HB_Lookup_ HB_Lookup;
@@ -144,9 +148,9 @@ typedef struct HB_Lookup_ HB_Lookup;
struct HB_LookupList_
{
- HB_UShort LookupCount; /* number of Lookups */
HB_Lookup* Lookup; /* array of Lookup records */
HB_UInt* Properties; /* array of flags */
+ HB_UShort LookupCount; /* number of Lookups */
};
typedef struct HB_LookupList_ HB_LookupList;
@@ -167,8 +171,8 @@ typedef struct HB_LookupList_ HB_LookupList;
struct HB_CoverageFormat1_
{
- HB_UShort GlyphCount; /* number of glyphs in GlyphArray */
HB_UShort* GlyphArray; /* array of glyph IDs */
+ HB_UShort GlyphCount; /* number of glyphs in GlyphArray */
};
typedef struct HB_CoverageFormat1_ HB_CoverageFormat1;
@@ -187,8 +191,8 @@ typedef struct HB_RangeRecord_ HB_RangeRecord;
struct HB_CoverageFormat2_
{
- HB_UShort RangeCount; /* number of RangeRecords */
HB_RangeRecord* RangeRecord; /* array of RangeRecords */
+ HB_UShort RangeCount; /* number of RangeRecords */
};
typedef struct HB_CoverageFormat2_ HB_CoverageFormat2;
@@ -196,7 +200,7 @@ typedef struct HB_CoverageFormat2_ HB_CoverageFormat2;
struct HB_Coverage_
{
- HB_UShort CoverageFormat; /* 1 or 2 */
+ HB_Byte CoverageFormat; /* 1 or 2 */
union
{
@@ -210,10 +214,10 @@ typedef struct HB_Coverage_ HB_Coverage;
struct HB_ClassDefFormat1_
{
+ HB_UShort* ClassValueArray; /* array of class values */
HB_UShort StartGlyph; /* first glyph ID of the
ClassValueArray */
HB_UShort GlyphCount; /* size of the ClassValueArray */
- HB_UShort* ClassValueArray; /* array of class values */
};
typedef struct HB_ClassDefFormat1_ HB_ClassDefFormat1;
@@ -231,10 +235,10 @@ typedef struct HB_ClassRangeRecord_ HB_ClassRangeRecord;
struct HB_ClassDefFormat2_
{
- HB_UShort ClassRangeCount;
- /* number of ClassRangeRecords */
HB_ClassRangeRecord* ClassRangeRecord;
/* array of ClassRangeRecords */
+ HB_UShort ClassRangeCount;
+ /* number of ClassRangeRecords */
};
typedef struct HB_ClassDefFormat2_ HB_ClassDefFormat2;
@@ -242,15 +246,14 @@ typedef struct HB_ClassDefFormat2_ HB_ClassDefFormat2;
struct HB_ClassDefinition_
{
- HB_Bool loaded;
-
- HB_UShort ClassFormat; /* 1 or 2 */
-
union
{
HB_ClassDefFormat1 cd1;
HB_ClassDefFormat2 cd2;
} cd;
+
+ HB_Byte ClassFormat; /* 1 or 2 */
+ HB_Bool loaded;
};
typedef struct HB_ClassDefinition_ HB_ClassDefinition;
@@ -258,11 +261,11 @@ typedef struct HB_ClassDefinition_ HB_ClassDefinition;
struct HB_Device_
{
+ HB_UShort* DeltaValue; /* array of compressed data */
HB_UShort StartSize; /* smallest size to correct */
HB_UShort EndSize; /* largest size to correct */
- HB_UShort DeltaFormat; /* DeltaValue array data format:
+ HB_Byte DeltaFormat; /* DeltaValue array data format:
1, 2, or 3 */
- HB_UShort* DeltaValue; /* array of compressed data */
};
typedef struct HB_Device_ HB_Device;
@@ -276,6 +279,9 @@ enum HB_Type_
typedef enum HB_Type_ HB_Type;
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(pop)
+#endif
HB_END_HEADER
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
index 4bc53c8..ce4d4ac 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
@@ -183,18 +183,15 @@ static void calcLineBreaks(const HB_UChar16 *uc, hb_uint32 len, HB_CharAttribute
if (ncls >= HB_LineBreak_CR)
goto next;
- // two complex chars (thai or lao), thai_attributes might override, but here we do a best guess
- if (cls == HB_LineBreak_SA && ncls == HB_LineBreak_SA) {
- lineBreakType = HB_Break;
- goto next;
- }
-
{
int tcls = ncls;
+ // for south east asian chars that require a complex (dictionary analysis), the unicode
+ // standard recommends to treat them as AL. thai_attributes and other attribute methods that
+ // do dictionary analysis can override
if (tcls >= HB_LineBreak_SA)
- tcls = HB_LineBreak_ID;
+ tcls = HB_LineBreak_AL;
if (cls >= HB_LineBreak_SA)
- cls = HB_LineBreak_ID;
+ cls = HB_LineBreak_AL;
int brk = breakTable[cls][tcls];
switch (brk) {
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
index 470e27b..32f5781 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
@@ -34,6 +34,10 @@
HB_BEGIN_HEADER
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(push, 1)
+#endif
+
/*
using anything else than signed or unsigned for bitfields in C is non standard,
but accepted by almost all compilers. And it gives a significant reduction in
@@ -281,6 +285,10 @@ struct HB_ShaperItem_ {
HB_Bool HB_ShapeItem(HB_ShaperItem *item);
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(pop)
+#endif
+
HB_END_HEADER
#endif
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-stream.h b/src/3rdparty/harfbuzz/src/harfbuzz-stream.h
index 9991936..a155cc2 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-stream.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-stream.h
@@ -30,15 +30,21 @@
HB_BEGIN_HEADER
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(push, 1)
+#endif
+
typedef struct HB_StreamRec_
{
HB_Byte* base;
+ HB_Byte* cursor;
HB_UInt size;
HB_UInt pos;
-
- HB_Byte* cursor;
} HB_StreamRec;
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(pop)
+#endif
HB_END_HEADER
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
index 1d1aa2f..fc2bdbf 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
@@ -27,57 +27,79 @@
#include "harfbuzz-external.h"
#include <assert.h>
+#include <stdio.h>
+
+typedef int (*th_brk_def)(const char*, int[], int);
+static th_brk_def th_brk = 0;
+static int libthai_resolved = 0;
+
+static void resolve_libthai()
+{
+ if (!th_brk)
+ th_brk = (th_brk_def)HB_Library_Resolve("thai", 0, "th_brk");
+ libthai_resolved = 1;
+}
+
+static void to_tis620(const HB_UChar16 *string, hb_uint32 len, const char *cstr)
+{
+ hb_uint32 i;
+ unsigned char *result = (unsigned char *)cstr;
+
+ for (i = 0; i < len; ++i) {
+ if (string[i] <= 0xa0)
+ result[i] = (unsigned char)string[i];
+ if (string[i] >= 0xe01 && string[i] <= 0xe5b)
+ result[i] = (unsigned char)(string[i] - 0xe00 + 0xa0);
+ else
+ result[i] = '?';
+ }
+}
static void thaiWordBreaks(const HB_UChar16 *string, hb_uint32 len, HB_CharAttributes *attributes)
{
- typedef int (*th_brk_def)(const char*, int[], int);
- static void *thaiCodec = 0;
- static th_brk_def th_brk = 0;
- char *cstr = 0;
+ char s[128];
+ char *cstr = s;
int brp[128];
int *break_positions = brp;
hb_uint32 numbreaks;
hb_uint32 i;
- if (!thaiCodec)
- thaiCodec = HB_TextCodecForMib(2259);
-
- /* load libthai dynamically */
- if (!th_brk && thaiCodec) {
- th_brk = (th_brk_def)HB_Library_Resolve("thai", "th_brk");
- if (!th_brk)
- thaiCodec = 0;
- }
+ if (!libthai_resolved)
+ resolve_libthai();
if (!th_brk)
return;
- cstr = HB_TextCodec_ConvertFromUnicode(thaiCodec, string, len, 0);
- if (!cstr)
- return;
+ if (len > 128)
+ cstr = (char *)malloc(len*sizeof(char));
+
+ to_tis620(string, len, cstr);
- break_positions = brp;
numbreaks = th_brk(cstr, break_positions, 128);
if (numbreaks > 128) {
break_positions = (int *)malloc(numbreaks * sizeof(int));
numbreaks = th_brk(cstr, break_positions, numbreaks);
}
- for (i = 0; i < len; ++i)
+ for (i = 0; i < len; ++i) {
attributes[i].lineBreakType = HB_NoBreak;
+ attributes[i].wordBoundary = FALSE;
+ }
for (i = 0; i < numbreaks; ++i) {
- if (break_positions[i] > 0)
+ if (break_positions[i] > 0) {
attributes[break_positions[i]-1].lineBreakType = HB_Break;
+ attributes[i].wordBoundary = TRUE;
+ }
}
if (break_positions != brp)
free(break_positions);
- HB_TextCodec_FreeResult(cstr);
+ if (len > 128)
+ free(cstr);
}
-
void HB_ThaiAttributes(HB_Script script, const HB_UChar16 *text, hb_uint32 from, hb_uint32 len, HB_CharAttributes *attributes)
{
assert(script == HB_Script_Thai);
diff --git a/src/3rdparty/harfbuzz/tests/fuzzing/fuzz.cc b/src/3rdparty/harfbuzz/tests/fuzzing/fuzz.cc
new file mode 100644
index 0000000..133577a
--- /dev/null
+++ b/src/3rdparty/harfbuzz/tests/fuzzing/fuzz.cc
@@ -0,0 +1,124 @@
+// This is a fuzzing harness for Harfbuzz. Since Harfbuzz's input is generally
+// expected to be controlled by a remote party it's a possible vector for
+// security issues.
+//
+// Fuzzing is a black-box testing scheme where the black-box (Harfbuzz's shaping
+// engine in this case) is fed random input to see if it will misbehave.
+// Misbehaviours can often be turned into security or crash issues.
+//
+// It's expected that one will generally run this under valgrind in order to get
+// better detection of problems.
+
+#include <stdint.h>
+#include <stdio.h>
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#include "../../src/harfbuzz-shaper.h"
+#include "../../src/harfbuzz-global.h"
+#include "../../src/harfbuzz-gpos.h"
+
+extern "C" {
+#include "../../contrib/harfbuzz-unicode.h"
+#include "../../contrib/harfbuzz-freetype.h"
+}
+
+static FT_Library freetype;
+
+static FT_Face loadFace(const char *path)
+{
+ FT_Face face;
+
+ if (FT_New_Face(freetype, path, /* index */ 0, &face))
+ return 0;
+ return face;
+}
+
+static const int kWidth = 100;
+static const int kHeight = 100;
+
+static int
+usage(const char *argv0) {
+ fprintf(stderr, "Usage: %s <TTF file>\n", argv0);
+ return 1;
+}
+
+int
+main(int argc, char **argv) {
+ FT_Init_FreeType(&freetype);
+
+ if (argc != 2)
+ return usage(argv[0]);
+
+ FT_Face face;
+ if (FT_New_Face(freetype, argv[1], 0 /* face index */, &face)) {
+ fprintf(stderr, "Failed to load font file\n");
+ return 1;
+ }
+
+ HB_Face hbFace = HB_NewFace(face, hb_freetype_table_sfnt_get);
+
+ HB_FontRec hbFont;
+ hbFont.klass = &hb_freetype_class;
+ hbFont.userData = face;
+ hbFont.x_ppem = face->size->metrics.x_ppem;
+ hbFont.y_ppem = face->size->metrics.y_ppem;
+ hbFont.x_scale = face->size->metrics.x_scale;
+ hbFont.y_scale = face->size->metrics.y_scale;
+
+ // This is the maximum number of bytes of input which we'll feed to Harfbuzz
+ // in one shot. We also overload it and make it the size of the output arrays
+ // as well. (Must be a power of two.)
+ static const unsigned kMaxInputBytes = 1024;
+ uint8_t str[kMaxInputBytes];
+
+ HB_ShaperItem shaper_item;
+ shaper_item.kerning_applied = false;
+ shaper_item.string = (HB_UChar16 *) str;
+ shaper_item.stringLength = 0;
+ shaper_item.item.bidiLevel = 0;
+ shaper_item.shaperFlags = 0;
+ shaper_item.font = &hbFont;
+ shaper_item.face = hbFace;
+ shaper_item.glyphIndicesPresent = false;
+ shaper_item.initialGlyphCount = 0;
+
+ HB_Glyph out_glyphs[kMaxInputBytes];
+ HB_GlyphAttributes out_attrs[kMaxInputBytes];
+ HB_Fixed out_advs[kMaxInputBytes];
+ HB_FixedPoint out_offsets[kMaxInputBytes];
+ unsigned short out_logClusters[kMaxInputBytes];
+
+ shaper_item.glyphs = out_glyphs;
+ shaper_item.attributes = out_attrs;
+ shaper_item.advances = out_advs;
+ shaper_item.offsets = out_offsets;
+ shaper_item.log_clusters = out_logClusters;
+ shaper_item.num_glyphs = kMaxInputBytes;
+
+ FILE *urandom = fopen("/dev/urandom", "rb");
+ if (!urandom) {
+ fprintf(stderr, "Cannot open /dev/urandom\n");
+ return 1;
+ }
+
+ for (;;) {
+ uint16_t len;
+ fread(&len, sizeof(len), 1, urandom);
+ len &= (kMaxInputBytes - 1);
+ len &= ~1;
+ fread(str, len, 1, urandom);
+
+ ssize_t iterator = 0;
+
+ for (;;) {
+ if (!hb_utf16_script_run_next(NULL, &shaper_item.item, (uint16_t *) str, len >> 1, &iterator))
+ break;
+
+ HB_ShapeItem(&shaper_item);
+ }
+ }
+
+ HB_FreeFace(hbFace);
+}
diff --git a/src/3rdparty/harfbuzz/tests/linebreaking/harfbuzz-qt.cpp b/src/3rdparty/harfbuzz/tests/linebreaking/harfbuzz-qt.cpp
index ea03052..f0048b7 100644
--- a/src/3rdparty/harfbuzz/tests/linebreaking/harfbuzz-qt.cpp
+++ b/src/3rdparty/harfbuzz/tests/linebreaking/harfbuzz-qt.cpp
@@ -79,30 +79,9 @@ void HB_GetGraphemeAndLineBreakClass(HB_UChar32 ch, HB_GraphemeClass *grapheme,
*lineBreak = (HB_LineBreakClass) prop->line_break_class;
}
-void *HB_Library_Resolve(const char *library, const char *symbol)
+void *HB_Library_Resolve(const char *library, int version, const char *symbol)
{
- return QLibrary::resolve(library, symbol);
-}
-
-void *HB_TextCodecForMib(int mib)
-{
- return QTextCodec::codecForMib(mib);
-}
-
-char *HB_TextCodec_ConvertFromUnicode(void *codec, const HB_UChar16 *unicode, hb_uint32 length, hb_uint32 *outputLength)
-{
- QByteArray data = reinterpret_cast<QTextCodec *>(codec)->fromUnicode((const QChar *)unicode, length);
- // ### suboptimal
- char *output = (char *)malloc(data.length() + 1);
- memcpy(output, data.constData(), data.length() + 1);
- if (outputLength)
- *outputLength = data.length();
- return output;
-}
-
-void HB_TextCodec_FreeResult(char *string)
-{
- free(string);
+ return QLibrary::resolve(library, version, symbol);
}
}
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
index fd6125f..b0873ab 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
@@ -12,6 +12,23 @@
* wtf/Platform.h:
+2010-04-28 Simon Hausmann <simon.hausmann@nokia.com>, Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ JSC's currentThreadStackBase is not reentrant on some platforms
+ https://bugs.webkit.org/show_bug.cgi?id=37195
+
+ This function needs to be reentrant to avoid memory corruption on platforms where
+ the implementation uses global variables.
+
+ This patch adds a mutex lock where necessary and makes the Symbian implementation
+ reentrant.
+
+ * runtime/Collector.cpp:
+ (JSC::currentThreadStackBaseMutex):
+ (JSC::currentThreadStackBase):
+
2010-04-14 Kent Hansen <kent.hansen@nokia.com>
Reviewed by Maciej Stachowiak.
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
index 57f2a92..eafcc23 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
@@ -637,6 +637,8 @@ static inline void* currentThreadStackBase()
#elif OS(HPUX)
return hpux_get_stack_base();
#elif OS(QNX)
+ AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex);
+ MutexLocker locker(mutex);
return currentThreadStackBaseQNX();
#elif OS(SOLARIS)
stack_t s;
@@ -660,19 +662,17 @@ static inline void* currentThreadStackBase()
pthread_stackseg_np(thread, &stack);
return stack.ss_sp;
#elif OS(SYMBIAN)
- static void* stackBase = 0;
- if (stackBase == 0) {
- TThreadStackInfo info;
- RThread thread;
- thread.StackInfo(info);
- stackBase = (void*)info.iBase;
- }
- return (void*)stackBase;
+ TThreadStackInfo info;
+ RThread thread;
+ thread.StackInfo(info);
+ return (void*)info.iBase;
#elif OS(HAIKU)
thread_info threadInfo;
get_thread_info(find_thread(NULL), &threadInfo);
return threadInfo.stack_end;
#elif OS(UNIX)
+ AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex);
+ MutexLocker locker(mutex);
static void* stackBase = 0;
static size_t stackSize = 0;
static pthread_t stackThread;
@@ -695,6 +695,8 @@ static inline void* currentThreadStackBase()
}
return static_cast<char*>(stackBase) + stackSize;
#elif OS(WINCE)
+ AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex);
+ MutexLocker locker(mutex);
if (g_stackBase)
return g_stackBase;
else {
diff --git a/src/3rdparty/javascriptcore/VERSION b/src/3rdparty/javascriptcore/VERSION
index 1b5109a..daecc37 100644
--- a/src/3rdparty/javascriptcore/VERSION
+++ b/src/3rdparty/javascriptcore/VERSION
@@ -4,8 +4,8 @@ This is a snapshot of JavaScriptCore from
The commit imported was from the
- javascriptcore-snapshot-19052010 branch/tag
+ javascriptcore-snapshot-16062010 branch/tag
and has the sha1 checksum
- 8039ba79702d6516cf6841c9f15b324ec499bbf3
+ 8b2d3443afca194f8ac50a63151dc9d19a150582
diff --git a/src/3rdparty/javascriptcore/WebKit.pri b/src/3rdparty/javascriptcore/WebKit.pri
index 0dd0799..9aaaa99 100644
--- a/src/3rdparty/javascriptcore/WebKit.pri
+++ b/src/3rdparty/javascriptcore/WebKit.pri
@@ -36,7 +36,7 @@ building-libs {
win32-*|wince* {
CONFIG(debug, debug|release):build_pass: QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}d
QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}$${QT_MAJOR_VERSION}
- win32-g++: LIBS += -l$$QTWEBKITLIBNAME
+ win32-g++*: LIBS += -l$$QTWEBKITLIBNAME
else: LIBS += $${QTWEBKITLIBNAME}.lib
} else {
LIBS += -lQtWebKit
diff --git a/src/3rdparty/phonon/ds9/videorenderer_evr.cpp b/src/3rdparty/phonon/ds9/videorenderer_evr.cpp
index d23d9ce..de3f46f 100644
--- a/src/3rdparty/phonon/ds9/videorenderer_evr.cpp
+++ b/src/3rdparty/phonon/ds9/videorenderer_evr.cpp
@@ -43,14 +43,12 @@ namespace Phonon
{
//normally we should use IID_IMFGetService but this introduces another dependency
//so here we simply define our own IId with the same value
+ ComPointer<T> ret;
ComPointer<IMFGetService> getService(filter, IID_IMFGetService);
- Q_ASSERT(getService);
- T *ptr = 0;
- HRESULT hr = getService->GetService(guidService, riid, reinterpret_cast<void **>(&ptr));
- if (!SUCCEEDED(hr) || ptr == 0)
- Q_ASSERT(!SUCCEEDED(hr) && ptr != 0);
- ComPointer<T> service(ptr);
- return service;
+ if (getService) {
+ getService->GetService(guidService, riid, reinterpret_cast<void**>(ret.pparam()));
+ }
+ return ret;
}
VideoRendererEVR::~VideoRendererEVR()
@@ -70,6 +68,10 @@ namespace Phonon
}
ComPointer<IMFVideoDisplayControl> filterControl = getService<IMFVideoDisplayControl>(m_filter, MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl);
+ if (!filterControl) {
+ m_filter = Filter(); //will release the interface
+ return;
+ }
filterControl->SetVideoWindow(reinterpret_cast<HWND>(target->winId()));
filterControl->SetAspectRatioMode(MFVideoARMode_None); // We're in control of the size
diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag
index 09a4fe2..f5b6af3 100644
--- a/src/3rdparty/webkit/.tag
+++ b/src/3rdparty/webkit/.tag
@@ -1 +1 @@
-f943ead2759537527faa7f3cb057d995291663b9
+6623b5da196390748dc619461739f9cb84524736
diff --git a/src/3rdparty/webkit/ChangeLog b/src/3rdparty/webkit/ChangeLog
index c2862fd..51d08a0 100644
--- a/src/3rdparty/webkit/ChangeLog
+++ b/src/3rdparty/webkit/ChangeLog
@@ -1,3 +1,16 @@
+2010-06-17 Mark Brand <mabrand@mabrand.nl>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] use "win32-g++*" scope to match all MinGW makespecs
+
+ The scope "win32-g++" comes from the name of the makespec. However, it
+ is frequently used to check for MinGW. This works fine as long as
+ win32-g++ is the only makespec for MinGW. Now we need the wildcard
+ to cover "win32-g++-cross" as well.
+
+ * WebKit.pri:
+
2010-05-04 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Unreviewed, build fix for Symbian.
diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
index d9b2987..adaf390 100644
--- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-06-17 Mark Brand <mabrand@mabrand.nl>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] use "win32-g++*" scope to match all MinGW makespecs
+
+ The scope "win32-g++" comes from the name of the makespec. However, it
+ is frequently used to check for MinGW. This works fine as long as
+ win32-g++ is the only makespec for MinGW. Now we need the wildcard
+ to cover "win32-g++-cross" as well.
+
+ * JavaScriptCore.pro:
+
2010-06-07 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
index 22fcc91..3f1ac86 100644
--- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
+++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
@@ -43,7 +43,7 @@ CONFIG(QTDIR_build) {
}
# Pick up 3rdparty libraries from INCLUDE/LIB just like with MSVC
-win32-g++ {
+win32-g++* {
TMPPATH = $$quote($$(INCLUDE))
QMAKE_INCDIR_POST += $$split(TMPPATH,";")
TMPPATH = $$quote($$(LIB))
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index a19b85a..1e7351f 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from
and has the sha1 checksum
- 6db5de6d18c3ab8b74809303e4d79abacfc570a8
+ 6623b5da196390748dc619461739f9cb84524736
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 1d9d739..c17a8aa 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,323 @@
+2010-06-17 Mark Brand <mabrand@mabrand.nl>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] use "win32-g++*" scope to match all MinGW makespecs
+
+ The scope "win32-g++" comes from the name of the makespec. However, it
+ is frequently used to check for MinGW. This works fine as long as
+ win32-g++ is the only makespec for MinGW. Now we need the wildcard
+ to cover "win32-g++-cross" as well.
+
+ * WebCore.pro:
+
+2010-06-16 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Kenneth Christiansen.
+
+ Spatial Navigation: using offset{Left,Top} is not enough to get the proper inner frames position
+ https://bugs.webkit.org/show_bug.cgi?id=39439
+
+ As pointed out by Darin Adler in https://bugs.webkit.org/show_bug.cgi?id=18662#c20,
+ "It's not correct to use the offsetLeft and offsetTop of the frame owner element's renderer because
+ that's just the distance from the offsetParent, not the absolute position".
+
+ Patch fixes that behavior by now considering the offsetTop and offsetLeft the offsetParent recursively,
+ starting from the HtmlFrameOwnerElement. Previously, only calling offsetTop and offsetLeft works
+ because all tests were done in htmls where the {i}frame element was a directly a child of the body,
+ e.g. <html>...<body><iframe src=xxx>....<body></html>.
+
+ Test: fast/events/spatial-navigation/snav-iframe-recursive-offset-parent.html
+
+ * page/SpatialNavigation.cpp:
+ (WebCore::renderRectRelativeToRootDocument):
+
+2010-06-16 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Simon Fraser.
+
+ Spatial Navigation: refactor scrollInDirection to work with scrollable content
+ https://bugs.webkit.org/show_bug.cgi?id=39195
+
+ scrollInDirection now receives as parameter the node that the Spatial Navigation
+ found as the more appropriated to move focus to. If it is in a scrollable container
+ (e.g. <div> with clipped overflow content), it scrolls recursively starting from
+ the container, not the current focused node.
+
+ Test: fast/events/spatial-navigation/snav-only-clipped-overflow-content.html
+
+ * page/FocusController.cpp:
+ (WebCore::FocusController::advanceFocusDirectionally):
+ * page/SpatialNavigation.cpp:
+ (WebCore::scrollInDirection):
+ * page/SpatialNavigation.h:
+
+2010-05-28 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
+
+ Reviewed by Simon Hausmann, Antti Koivisto
+
+ Make repaint throttling parameters runtime configurable.
+ https://bugs.webkit.org/show_bug.cgi?id=38401
+
+ REPAINT_THROTTLING now chooses default values for throttling parameters.
+ Should be removed when applications start using runtime configuration.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::reset):
+ (WebCore::FrameView::updateDeferredRepaintDelay):
+ (WebCore::FrameView::setRepaintThrottlingDeferredRepaintDelay):
+ (WebCore::FrameView::setRepaintThrottlingnInitialDeferredRepaintDelayDuringLoading):
+ (WebCore::FrameView::setRepaintThrottlingMaxDeferredRepaintDelayDuringLoading):
+ (WebCore::FrameView::setRepaintThrottlingDeferredRepaintDelayIncrementDuringLoading):
+ * page/FrameView.h:
+
+2010-06-16 Dawit Alemayehu <adawit@kde.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] QtWebKit crashes while initializing flash plugin 10.1.53.64.
+ https://bugs.webkit.org/show_bug.cgi?id=40567
+
+ Avoid preventable crashes by ensuring gtk_init() is called in the
+ flash viewer plugins before calling NP_Initialize.
+
+ * plugins/qt/PluginPackageQt.cpp:
+ (WebCore::PluginPackage::load):
+
+2010-04-21 Zoltan Herczeg <zherczeg@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] startAnimation() is not needed to preceede nativeImageForCurrentFrame()
+ https://bugs.webkit.org/show_bug.cgi?id=37844
+
+ nativeImageForCurrentFrame() resets the m_decoder parameter under Qt,
+ which is required by startAnimation() to detect frame and repetition counts.
+ Hence, Image::drawTiled cannot start animations under Qt:
+ <html><body background="animated.gif"></body></html> does not work
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::internalHandleCurrentImage):
+
+2010-05-28 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=39857
+ Make GIFs loop the correct number of times. Previously, everyone looped
+ one time too few for non-infinitely-looping GIFs.
+
+ Modified a Qt manual test to be correct and moved it to the general
+ manual test directory.
+
+ * manual-tests/animated-gif-looping.html: Copied from WebCore/manual-tests/qt/qt-gif-test.html.
+ * manual-tests/qt/qt-10loop-anim.gif: Removed.
+ * manual-tests/qt/qt-anim.gif: Removed.
+ * manual-tests/qt/qt-gif-test.html: Removed.
+ * manual-tests/qt/qt-noanim.gif: Removed.
+ * manual-tests/resources/animated-10x.gif: Copied from WebCore/manual-tests/qt/qt-10loop-anim.gif and modified.
+ * manual-tests/resources/animated-infinite.gif: Copied from WebCore/manual-tests/qt/qt-anim.gif.
+ * manual-tests/resources/non-animated.gif: Copied from WebCore/manual-tests/qt/qt-noanim.gif.
+ * platform/graphics/BitmapImage.cpp:
+ (WebCore::BitmapImage::internalAdvanceAnimation): For a loop count of n, show a total of n + 1 animation cycles.
+ * platform/graphics/ImageSource.h:
+ * platform/graphics/cg/ImageSourceCG.cpp:
+ (WebCore::ImageSource::repetitionCount):
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::repetitionCount): Remove translation code now that WebCore matches Qt's internal handling of the loop count. Qt itself may still have a bug here.
+ * platform/image-decoders/gif/GIFImageDecoder.cpp:
+ (WebCore::GIFImageDecoder::repetitionCount):
+ * platform/image-decoders/gif/GIFImageReader.cpp:
+ (GIFImageReader::read): Translate loop count 0 to "loop infinitely" (by restoring one piece of the Mozilla code we'd removed).
+
+2010-05-04 Tucker Jay <jay.tucker@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ Animated GIF images does not animate 10x as expected by default.
+ https://bugs.webkit.org/show_bug.cgi?id=36818
+
+ Added test case to existing manual test to test the
+ fixed functionality.
+
+ * manual-tests/qt/qt-10loop-anim.gif: Added.
+ * manual-tests/qt/qt-gif-test.html:
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::repetitionCount):
+
+2010-05-16 Antonio Gomes <tonikitoo@webkit.org>
+
+ Unreviewed naming fixes of local variables used in Spatial Navigation methods.
+
+ Summary:
+ * "candidate" renamed to "node";
+ * "currentFocusCandidate" renamed to "candidate"
+ * "closestFocusCandidate" renamed to "closest"
+
+ That way naming is more consistent in the various Spatial Navigation methods.
+
+ * page/FocusController.cpp:
+ (WebCore::FocusController::findFocusableNodeInDirection):
+ (WebCore::FocusController::deepFindFocusableNodeInDirection):
+
+2010-06-14 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Simon Fraser and Kenneth Christiansen.
+
+ Spatial Navigation: make it work with focusable elements in overflow content
+ https://bugs.webkit.org/show_bug.cgi?id=36463
+
+ This patch addresses the problem with Spatial Navigation. It currently does not
+ properly traverse scrollable contents, including scrollable div's. For this to work,
+ a new class member called scrollableEnclosingBox was introduced to FocusCandidate class which
+ keeps track of the current scrollable box Node wrapping a FocusCandidate.
+
+ To make use of enclosingScrollableBox of FocusCandidate, the DOM traversal routine
+ (FocusController::findNextFocusableInDirection) was changed as follows: when it
+ encounters a scrollable Node, each focusable node which is 'inner' keeps track of
+ the container reference. By the time a sibling of the scrollable Node is encountered,
+ there is no need to track this reference any more and the traversal algorithm continues
+ normally.
+
+ The common case is obviously that there is no scrollable container wrapping it.
+
+ updateFocusCandiditeIfCloser logic was also adapted to fit the need of the
+ newly introduced enclosingScrollableBox class member, getting simpler and more
+ easily maintainable.
+
+ Tests: fast/events/spatial-navigation/snav-div-scrollable-but-without-focusable-content.html
+ fast/events/spatial-navigation/snav-clipped-overflow-content.html
+
+ * page/FocusController.cpp:
+ (WebCore::updateFocusCandidateInSameContainer):
+ (WebCore::updateFocusCandidateIfCloser):
+ (WebCore::FocusController::findFocusableNodeInDirection):
+ (WebCore::FocusController::deepFindFocusableNodeInDirection):
+ * page/SpatialNavigation.cpp:
+ (WebCore::isScrollableContainerNode):
+ * page/SpatialNavigation.h:
+ (WebCore::FocusCandidate::FocusCandidate):
+ (WebCore::FocusCandidate::isInScrollableContainer):
+
+2010-06-15 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] The qt_webkit_version.pri file gets overwritten on install
+ https://bugs.webkit.org/show_bug.cgi?id=40487
+
+ Don't install qt_webkit_version.pri when building WebKit inside of Qt.
+ The import of WebKit into Qt will take care of providing the file
+ in mkspecs/modules and it'll be installed through projects.pro.
+
+ * WebCore.pro:
+
+2010-06-13 Noam Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] GraphicsLayer: recaching images creates an unnecessary deep copy
+ https://bugs.webkit.org/show_bug.cgi?id=40535
+
+ Made sure the painter ends its operation before copying the pixmap.
+
+ No new tests: this is an optimization.
+
+ * platform/graphics/qt/GraphicsLayerQt.cpp:
+ (WebCore::GraphicsLayerQtImpl::recache):
+
+2010-03-24 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Changing the V8 and JSC implementations of
+ SQLStatementErrorCallback to interpret as false all results that
+ could be converted to a false boolean. Pretty much a revert of
+ r54981.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36569
+
+ * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
+ (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
+ * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
+ (WebCore::V8CustomSQLStatementErrorCallback::handleEvent):
+ * bindings/v8/custom/V8CustomVoidCallback.cpp:
+ (WebCore::invokeCallback):
+ * bindings/v8/custom/V8CustomVoidCallback.h:
+
+2010-06-13 Noam Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] tests/hybridPixmap fails
+ https://bugs.webkit.org/show_bug.cgi?id=37316
+
+ The problem was that JSC::Instance::createRuntimeObject was never called.
+ This is fixed by overloading newRuntimeObject and calling Instance::createRuntimeObject
+ in between, instead of creating the runtime object directly inside the static function
+ QtPixmapInstance::createRuntimeObject, which had to be renamed as to not overshadow the virtual function.
+
+ This fixes an existing test, tests/hybridPixmap
+
+ * bridge/qt/qt_pixmapruntime.cpp:
+ (JSC::Bindings::QtPixmapInstance::newRuntimeObject):
+ (JSC::Bindings::QtPixmapInstance::createPixmapRuntimeObject):
+ * bridge/qt/qt_pixmapruntime.h:
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::convertQVariantToValue):
+
+2010-06-07 Mahesh Kulakrni <mahesh.kulkarni@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [QT] QT_BEARER flag is not enabled on S60 properly
+ https://bugs.webkit.org/show_bug.cgi?id=39357
+
+ enable QT_BEARER for all platform based on qtmobility +
+ bearer module availability or for qt 4.7+
+
+ * WebCore.pri:
+
+2010-06-09 Csaba Osztrogonác <ossy@webkit.org>
+
+ Reviewed by Dirk Schulze.
+
+ [Qt] Imperfect dependency for generated SVGNames.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=40359
+
+ * WebCore.pri: Missing dependency added.
+
+2010-06-08 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
+
+ Unreviewed Buildbot fix.
+
+ Reset the Qt TextBreakIterator when reusing it.
+
+ * platform/text/qt/TextBreakIteratorQt.cpp:
+ (WebCore::setUpIterator):
+
+2010-06-08 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
+
+ Reviewed by Antti Koivisto.
+
+ [Qt] TextBreakIterator Qt performance
+ https://bugs.webkit.org/show_bug.cgi?id=39958
+
+ Rework TextBreakIteratorQt to be more in line with the ICU version.
+
+ We now reuse iterators where ever possible. The string data is compared
+ with memcmp, which should be faster than using a hash, as you need
+ to traverse the full buffer in the case the strings don't match,
+ where as the compare would fail quickly.
+
+ * platform/text/qt/TextBreakIteratorQt.cpp:
+ (WebCore::TextBreakIterator::TextBreakIterator):
+ (WebCore::setUpIterator):
+ (WebCore::wordBreakIterator):
+ (WebCore::characterBreakIterator):
+ (WebCore::lineBreakIterator):
+ (WebCore::sentenceBreakIterator):
+
2010-06-07 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pri b/src/3rdparty/webkit/WebCore/WebCore.pri
index 5f5987f..97ae526 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pri
+++ b/src/3rdparty/webkit/WebCore/WebCore.pri
@@ -101,18 +101,19 @@ greaterThan(QT_MINOR_VERSION, 5) {
DEFINES += ENABLE_XSLT=0
}
-!CONFIG(QTDIR_build):!contains(DEFINES, ENABLE_QT_BEARER=.) {
- symbian: {
- exists($${EPOCROOT}epoc32/release/winscw/udeb/QtBearer.lib)| \
- exists($${EPOCROOT}epoc32/release/armv5/lib/QtBearer.lib) {
+# Bearer management is part of Qt 4.7
+# for older version, check for mobility with bearer
+!contains(DEFINES, ENABLE_QT_BEARER=.) {
+ !lessThan(QT_MINOR_VERSION, 7) {
+ DEFINES += ENABLE_QT_BEARER=1
+ } else {
+ load(mobilityconfig, true)
+ contains(MOBILITY_CONFIG, bearer) {
DEFINES += ENABLE_QT_BEARER=1
}
}
}
-# Bearer management is part of Qt 4.7
-!lessThan(QT_MINOR_VERSION, 7):!contains(DEFINES, ENABLE_QT_BEARER=.):DEFINES += ENABLE_QT_BEARER=1
-
# Enable touch event support with Qt 4.6
!lessThan(QT_MINOR_VERSION, 6): DEFINES += ENABLE_TOUCH_EVENTS=1
@@ -593,6 +594,7 @@ contains(DEFINES, ENABLE_SVG=1) {
# GENERATOR 5-C:
svgnames.output = $${WC_GENERATED_SOURCES_DIR}/SVGNames.cpp
svgnames.input = SVG_NAMES
+ svgnames.depends = $$PWD/svg/svgattrs.in
svgnames.wkScript = $$PWD/dom/make_names.pl
svgnames.commands = perl -I$$PWD/bindings/scripts $$svgnames.wkScript --tags $$PWD/svg/svgtags.in --attrs $$PWD/svg/svgattrs.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir $$WC_GENERATED_SOURCES_DIR
svgnames.wkExtraSources = $${WC_GENERATED_SOURCES_DIR}/SVGElementFactory.cpp $${WC_GENERATED_SOURCES_DIR}/JSSVGElementWrapperFactory.cpp
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index 048fc93..e0b4905 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -103,7 +103,7 @@ win32-msvc2005|win32-msvc2008:{
}
# Pick up 3rdparty libraries from INCLUDE/LIB just like with MSVC
-win32-g++ {
+win32-g++* {
TMPPATH = $$quote($$(INCLUDE))
QMAKE_INCDIR_POST += $$split(TMPPATH,";")
TMPPATH = $$quote($$(LIB))
@@ -2845,12 +2845,7 @@ contains(DEFINES, ENABLE_SYMBIAN_DIALOG_PROVIDERS) {
include($$PWD/../WebKit/qt/Api/headers.pri)
HEADERS += $$WEBKIT_API_HEADERS
-CONFIG(QTDIR_build) {
- modfile.files = $$moduleFile
- modfile.path = $$[QMAKE_MKSPECS]/modules
-
- INSTALLS += modfile
-} else {
+!CONFIG(QTDIR_build) {
exists($$OUTPUT_DIR/include/QtWebKit/classheaders.pri): include($$OUTPUT_DIR/include/QtWebKit/classheaders.pri)
WEBKIT_INSTALL_HEADERS = $$WEBKIT_API_HEADERS $$WEBKIT_CLASS_HEADERS
@@ -2935,7 +2930,7 @@ CONFIG(QTDIR_build) {
CONFIG += no_debug_info
}
-!win32-g++:win32:contains(QMAKE_HOST.arch, x86_64):{
+win32:!win32-g++*:contains(QMAKE_HOST.arch, x86_64):{
asm_compiler.commands = ml64 /c
asm_compiler.commands += /Fo ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
asm_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp
index 4d5de79..6178509 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp
@@ -77,7 +77,7 @@ bool JSCustomSQLStatementErrorCallback::handleEvent(SQLTransaction* transaction,
// Therefore an exception and returning true are the same thing - so, return true on an exception
return true;
}
- return !result.isFalse();
+ return result.toBoolean(exec);
}
}
diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.cpp
index 803316d..3e6197f 100644
--- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.cpp
+++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.cpp
@@ -346,10 +346,17 @@ returnEmptyVariant:
return QVariant::fromValue<QImage>(QImage());
return QVariant();
}
-JSObject* QtPixmapInstance::createRuntimeObject(ExecState* exec, PassRefPtr<RootObject> root, const QVariant& data)
+
+RuntimeObject* QtPixmapInstance::newRuntimeObject(ExecState* exec)
+{
+ return new(exec) QtPixmapRuntimeObject(exec, this);
+}
+
+JSObject* QtPixmapInstance::createPixmapRuntimeObject(ExecState* exec, PassRefPtr<RootObject> root, const QVariant& data)
{
JSLock lock(SilenceAssertionsOnly);
- return new(exec) QtPixmapRuntimeObject(exec, new QtPixmapInstance(root, data));
+ QtPixmapInstance* instance = new QtPixmapInstance(root, data);
+ return instance->createRuntimeObject(exec);
}
bool QtPixmapInstance::canHandle(QMetaType::Type hint)
diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.h b/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.h
index a0e0e26..de1bcee 100644
--- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.h
+++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.h
@@ -42,7 +42,8 @@ public:
int height() const;
QPixmap toPixmap();
QImage toImage();
- static JSObject* createRuntimeObject(ExecState*, PassRefPtr<RootObject>, const QVariant&);
+ RuntimeObject* newRuntimeObject(ExecState* exec);
+ static JSObject* createPixmapRuntimeObject(ExecState*, PassRefPtr<RootObject>, const QVariant&);
static QVariant variantFromObject(JSObject*, QMetaType::Type hint);
static bool canHandle(QMetaType::Type hint);
};
diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
index 4524d97..a39dc7a 100644
--- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
+++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
@@ -877,7 +877,7 @@ JSValue convertQVariantToValue(ExecState* exec, PassRefPtr<RootObject> root, con
}
if (QtPixmapInstance::canHandle(static_cast<QMetaType::Type>(variant.type())))
- return QtPixmapInstance::createRuntimeObject(exec, root, variant);
+ return QtPixmapInstance::createPixmapRuntimeObject(exec, root, variant);
if (type == qMetaTypeId<QWebElement>()) {
if (!root->globalObject()->inherits(&JSDOMWindow::s_info))
diff --git a/src/3rdparty/webkit/WebCore/page/FocusController.cpp b/src/3rdparty/webkit/WebCore/page/FocusController.cpp
index 6c2a956..a285e52 100644
--- a/src/3rdparty/webkit/WebCore/page/FocusController.cpp
+++ b/src/3rdparty/webkit/WebCore/page/FocusController.cpp
@@ -319,7 +319,7 @@ bool FocusController::advanceFocusDirectionally(FocusDirection direction, Keyboa
// if |node| element is not in the viewport.
if (hasOffscreenRect(node)) {
Frame* frame = node->document()->view()->frame();
- scrollInDirection(frame, direction);
+ scrollInDirection(frame, direction, focusCandidate);
return true;
}
@@ -341,105 +341,152 @@ bool FocusController::advanceFocusDirectionally(FocusDirection direction, Keyboa
return true;
}
-// FIXME: Make this method more modular, and simpler to understand and maintain.
-static void updateFocusCandidateIfCloser(Node* focusedNode, const FocusCandidate& candidate, FocusCandidate& closest)
+static void updateFocusCandidateInSameContainer(const FocusCandidate& candidate, FocusCandidate& closest)
{
- bool sameDocument = candidate.document() == closest.document();
- if (sameDocument) {
- if (closest.alignment > candidate.alignment
- || (closest.parentAlignment && candidate.alignment > closest.parentAlignment))
- return;
- } else if (closest.alignment > candidate.alignment
- && (closest.parentAlignment && candidate.alignment > closest.parentAlignment))
+ if (closest.isNull()) {
+ closest = candidate;
return;
+ }
- if (candidate.alignment != None
- || (closest.parentAlignment >= candidate.alignment
- && closest.document() == candidate.document())) {
+ if (candidate.alignment == closest.alignment) {
+ if (candidate.distance < closest.distance)
+ closest = candidate;
+ return;
+ }
- // If we are now in an higher precedent case, lets reset the current closest's
- // distance so we force it to be bigger than any result we will get from
- // spatialDistance().
- if (closest.alignment < candidate.alignment
- && closest.parentAlignment < candidate.alignment)
- closest.distance = maxDistance();
+ if (candidate.alignment > closest.alignment)
+ closest = candidate;
+}
- closest.alignment = candidate.alignment;
+static void updateFocusCandidateIfCloser(Node* focusedNode, const FocusCandidate& candidate, FocusCandidate& closest)
+{
+ // First, check the common case: neither candidate nor closest are
+ // inside scrollable content, then no need to care about enclosingScrollableBox
+ // heuristics or parent{Distance,Alignment}, but only distance and alignment.
+ if (!candidate.inScrollableContainer() && !closest.inScrollableContainer()) {
+ updateFocusCandidateInSameContainer(candidate, closest);
+ return;
}
- // Bail out if candidate's distance is larger than that of the closest candidate.
- if (candidate.distance >= closest.distance)
+ bool sameContainer = candidate.document() == closest.document() && candidate.enclosingScrollableBox == closest.enclosingScrollableBox;
+
+ // Second, if candidate and closest are in the same "container" (i.e. {i}frame or any
+ // scrollable block element), we can handle them as common case.
+ if (sameContainer) {
+ updateFocusCandidateInSameContainer(candidate, closest);
return;
+ }
- if (closest.isNull()) {
+ // Last, we are considering moving to a candidate located in a different enclosing
+ // scrollable box than closest.
+ bool isInInnerDocument = !isInRootDocument(focusedNode);
+
+ bool sameContainerAsCandidate = isInInnerDocument ? focusedNode->document() == candidate.document() :
+ focusedNode->isDescendantOf(candidate.enclosingScrollableBox);
+
+ bool sameContainerAsClosest = isInInnerDocument ? focusedNode->document() == closest.document() :
+ focusedNode->isDescendantOf(closest.enclosingScrollableBox);
+
+ // sameContainerAsCandidate and sameContainerAsClosest are mutually exclusive.
+ ASSERT(!(sameContainerAsCandidate && sameContainerAsClosest));
+
+ if (sameContainerAsCandidate) {
closest = candidate;
return;
}
- // If the focused node and the candadate are in the same document and current
- // closest candidate is not in an {i}frame that is preferable to get focused ...
- if (focusedNode->document() == candidate.document()
- && candidate.distance < closest.parentDistance)
- closest = candidate;
- else if (focusedNode->document() != candidate.document()) {
- // If the focusedNode is in an inner document and candidate is in a
- // different document, we only consider to change focus if there is not
- // another already good focusable candidate in the same document as focusedNode.
- if (!((isInRootDocument(candidate.node) && !isInRootDocument(focusedNode))
- && focusedNode->document() == closest.document()))
+ if (sameContainerAsClosest) {
+ // Nothing to be done.
+ return;
+ }
+
+ // NOTE: !sameContainerAsCandidate && !sameContainerAsClosest
+ // If distance is shorter, and we are talking about scrollable container,
+ // lets compare parent distance and alignment before anything.
+ if (candidate.distance < closest.distance) {
+ if (candidate.alignment >= closest.parentAlignment
+ || candidate.parentAlignment == closest.parentAlignment) {
closest = candidate;
+ return;
+ }
+
+ } else if (candidate.parentDistance < closest.distance) {
+ if (candidate.parentAlignment >= closest.alignment) {
+ closest = candidate;
+ return;
+ }
}
}
void FocusController::findFocusableNodeInDirection(Node* outer, Node* focusedNode,
FocusDirection direction, KeyboardEvent* event,
- FocusCandidate& closestFocusCandidate,
- const FocusCandidate& candidateParent)
+ FocusCandidate& closest, const FocusCandidate& candidateParent)
{
ASSERT(outer);
ASSERT(candidateParent.isNull()
|| candidateParent.node->hasTagName(frameTag)
- || candidateParent.node->hasTagName(iframeTag));
+ || candidateParent.node->hasTagName(iframeTag)
+ || isScrollableContainerNode(candidateParent.node));
+
+ // Walk all the child nodes and update closest if we find a nearer node.
+ Node* node = outer;
+ while (node) {
- // Walk all the child nodes and update closestFocusCandidate if we find a nearer node.
- Node* candidate = outer;
- while (candidate) {
// Inner documents case.
+ if (node->isFrameOwnerElement()) {
+ deepFindFocusableNodeInDirection(node, focusedNode, direction, event, closest);
- if (candidate->isFrameOwnerElement())
- deepFindFocusableNodeInDirection(candidate, focusedNode, direction, event, closestFocusCandidate);
- else if (candidate != focusedNode && candidate->isKeyboardFocusable(event)) {
- FocusCandidate currentFocusCandidate(candidate);
+ // Scrollable block elements (e.g. <div>, etc) case.
+ } else if (isScrollableContainerNode(node)) {
+ deepFindFocusableNodeInDirection(node, focusedNode, direction, event, closest);
+ node = node->traverseNextSibling();
+ continue;
+
+ } else if (node != focusedNode && node->isKeyboardFocusable(event)) {
+ FocusCandidate candidate(node);
+
+ // There are two ways to identify we are in a recursive call from deepFindFocusableNodeInDirection
+ // (i.e. processing an element in an iframe, frame or a scrollable block element):
+
+ // 1) If candidateParent is not null, and it holds the distance and alignment data of the
+ // parent container element itself;
+ // 2) Parent of outer is <frame> or <iframe>;
+ // 3) Parent is any other scrollable block element.
+ if (!candidateParent.isNull()) {
+ candidate.parentAlignment = candidateParent.alignment;
+ candidate.parentDistance = candidateParent.distance;
+ candidate.enclosingScrollableBox = candidateParent.node;
+
+ } else if (!isInRootDocument(outer)) {
+ if (Document* document = static_cast<Document*>(outer->parent()))
+ candidate.enclosingScrollableBox = static_cast<Node*>(document->ownerElement());
+
+ } else if (isScrollableContainerNode(outer->parent()))
+ candidate.enclosingScrollableBox = outer->parent();
// Get distance and alignment from current candidate.
- distanceDataForNode(direction, focusedNode, currentFocusCandidate);
+ distanceDataForNode(direction, focusedNode, candidate);
// Bail out if distance is maximum.
- if (currentFocusCandidate.distance == maxDistance()) {
- candidate = candidate->traverseNextNode(outer->parent());
+ if (candidate.distance == maxDistance()) {
+ node = node->traverseNextNode(outer->parent());
continue;
}
- // If candidateParent is not null, it means that we are in a recursive call
- // from deepFineFocusableNodeInDirection (i.e. processing an element in an iframe),
- // and holds the distance and alignment data of the iframe element itself.
- if (!candidateParent.isNull()) {
- currentFocusCandidate.parentAlignment = candidateParent.alignment;
- currentFocusCandidate.parentDistance = candidateParent.distance;
- }
-
- updateFocusCandidateIfCloser(focusedNode, currentFocusCandidate, closestFocusCandidate);
+ updateFocusCandidateIfCloser(focusedNode, candidate, closest);
}
- candidate = candidate->traverseNextNode(outer->parent());
+ node = node->traverseNextNode(outer->parent());
}
}
void FocusController::deepFindFocusableNodeInDirection(Node* container, Node* focusedNode,
FocusDirection direction, KeyboardEvent* event,
- FocusCandidate& closestFocusCandidate)
+ FocusCandidate& closest)
{
- ASSERT(container->hasTagName(frameTag) || container->hasTagName(iframeTag));
+ ASSERT(container->hasTagName(frameTag)
+ || container->hasTagName(iframeTag)
+ || isScrollableContainerNode(container));
// Track if focusedNode is a descendant of the current container node being processed.
bool descendantOfContainer = false;
@@ -459,10 +506,15 @@ void FocusController::deepFindFocusableNodeInDirection(Node* container, Node* fo
descendantOfContainer = innerDocument == focusedNode->document();
firstChild = innerDocument->firstChild();
+ // Scrollable block elements (e.g. <div>, etc)
+ } else if (isScrollableContainerNode(container)) {
+
+ firstChild = container->firstChild();
+ descendantOfContainer = focusedNode->isDescendantOf(container);
}
if (descendantOfContainer) {
- findFocusableNodeInDirection(firstChild, focusedNode, direction, event, closestFocusCandidate);
+ findFocusableNodeInDirection(firstChild, focusedNode, direction, event, closest);
return;
}
@@ -476,8 +528,8 @@ void FocusController::deepFindFocusableNodeInDirection(Node* container, Node* fo
return;
// FIXME: Consider alignment?
- if (candidateParent.distance < closestFocusCandidate.distance)
- findFocusableNodeInDirection(firstChild, focusedNode, direction, event, closestFocusCandidate, candidateParent);
+ if (candidateParent.distance < closest.distance)
+ findFocusableNodeInDirection(firstChild, focusedNode, direction, event, closest, candidateParent);
}
static bool relinquishesEditingFocus(Node *node)
diff --git a/src/3rdparty/webkit/WebCore/page/FrameView.cpp b/src/3rdparty/webkit/WebCore/page/FrameView.cpp
index bc0519f..a53db36 100644
--- a/src/3rdparty/webkit/WebCore/page/FrameView.cpp
+++ b/src/3rdparty/webkit/WebCore/page/FrameView.cpp
@@ -80,23 +80,25 @@ using namespace HTMLNames;
double FrameView::sCurrentPaintTimeStamp = 0.0;
+// REPAINT_THROTTLING now chooses default values for throttling parameters.
+// Should be removed when applications start using runtime configuration.
#if ENABLE(REPAINT_THROTTLING)
// Normal delay
-static const double deferredRepaintDelay = 0.025;
+double FrameView::s_deferredRepaintDelay = 0.025;
// Negative value would mean that first few repaints happen without a delay
-static const double initialDeferredRepaintDelayDuringLoading = 0;
+double FrameView::s_initialDeferredRepaintDelayDuringLoading = 0;
// The delay grows on each repaint to this maximum value
-static const double maxDeferredRepaintDelayDuringLoading = 2.5;
+double FrameView::s_maxDeferredRepaintDelayDuringLoading = 2.5;
// On each repaint the delay increses by this amount
-static const double deferredRepaintDelayIncrementDuringLoading = 0.5;
+double FrameView::s_deferredRepaintDelayIncrementDuringLoading = 0.5;
#else
// FIXME: Repaint throttling could be good to have on all platform.
// The balance between CPU use and repaint frequency will need some tuning for desktop.
// More hooks may be needed to reset the delay on things like GIF and CSS animations.
-static const double deferredRepaintDelay = 0;
-static const double initialDeferredRepaintDelayDuringLoading = 0;
-static const double maxDeferredRepaintDelayDuringLoading = 0;
-static const double deferredRepaintDelayIncrementDuringLoading = 0;
+double FrameView::s_deferredRepaintDelay = 0;
+double FrameView::s_initialDeferredRepaintDelayDuringLoading = 0;
+double FrameView::s_maxDeferredRepaintDelayDuringLoading = 0;
+double FrameView::s_deferredRepaintDelayIncrementDuringLoading = 0;
#endif
// The maximum number of updateWidgets iterations that should be done before returning.
@@ -200,7 +202,7 @@ void FrameView::reset()
m_deferringRepaints = 0;
m_repaintCount = 0;
m_repaintRects.clear();
- m_deferredRepaintDelay = initialDeferredRepaintDelayDuringLoading;
+ m_deferredRepaintDelay = s_initialDeferredRepaintDelayDuringLoading;
m_deferredRepaintTimer.stop();
m_lastPaintTime = 0;
m_paintBehavior = PaintBehaviorNormal;
@@ -1218,13 +1220,13 @@ void FrameView::updateDeferredRepaintDelay()
{
Document* document = m_frame->document();
if (!document || (!document->parsing() && !document->docLoader()->requestCount())) {
- m_deferredRepaintDelay = deferredRepaintDelay;
+ m_deferredRepaintDelay = s_deferredRepaintDelay;
return;
}
- if (m_deferredRepaintDelay < maxDeferredRepaintDelayDuringLoading) {
- m_deferredRepaintDelay += deferredRepaintDelayIncrementDuringLoading;
- if (m_deferredRepaintDelay > maxDeferredRepaintDelayDuringLoading)
- m_deferredRepaintDelay = maxDeferredRepaintDelayDuringLoading;
+ if (m_deferredRepaintDelay < s_maxDeferredRepaintDelayDuringLoading) {
+ m_deferredRepaintDelay += s_deferredRepaintDelayIncrementDuringLoading;
+ if (m_deferredRepaintDelay > s_maxDeferredRepaintDelayDuringLoading)
+ m_deferredRepaintDelay = s_maxDeferredRepaintDelayDuringLoading;
}
}
@@ -2143,4 +2145,28 @@ IntPoint FrameView::convertFromContainingView(const IntPoint& parentPoint) const
return parentPoint;
}
+// Normal delay
+void FrameView::setRepaintThrottlingDeferredRepaintDelay(double p)
+{
+ s_deferredRepaintDelay = p;
+}
+
+// Negative value would mean that first few repaints happen without a delay
+void FrameView::setRepaintThrottlingnInitialDeferredRepaintDelayDuringLoading(double p)
+{
+ s_initialDeferredRepaintDelayDuringLoading = p;
+}
+
+// The delay grows on each repaint to this maximum value
+void FrameView::setRepaintThrottlingMaxDeferredRepaintDelayDuringLoading(double p)
+{
+ s_maxDeferredRepaintDelayDuringLoading = p;
+}
+
+// On each repaint the delay increases by this amount
+void FrameView::setRepaintThrottlingDeferredRepaintDelayIncrementDuringLoading(double p)
+{
+ s_deferredRepaintDelayIncrementDuringLoading = p;
+}
+
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/page/FrameView.h b/src/3rdparty/webkit/WebCore/page/FrameView.h
index 71e2966..71fa8cd 100644
--- a/src/3rdparty/webkit/WebCore/page/FrameView.h
+++ b/src/3rdparty/webkit/WebCore/page/FrameView.h
@@ -210,6 +210,15 @@ public:
bool isFrameViewScrollCorner(RenderScrollbarPart* scrollCorner) const { return m_scrollCorner == scrollCorner; }
void invalidateScrollCorner();
+ // Normal delay
+ static void setRepaintThrottlingDeferredRepaintDelay(double p);
+ // Negative value would mean that first few repaints happen without a delay
+ static void setRepaintThrottlingnInitialDeferredRepaintDelayDuringLoading(double p);
+ // The delay grows on each repaint to this maximum value
+ static void setRepaintThrottlingMaxDeferredRepaintDelayDuringLoading(double p);
+ // On each repaint the delay increses by this amount
+ static void setRepaintThrottlingDeferredRepaintDelayIncrementDuringLoading(double p);
+
protected:
virtual bool scrollContentsFastPath(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect);
@@ -340,6 +349,11 @@ private:
// Renderer to hold our custom scroll corner.
RenderScrollbarPart* m_scrollCorner;
+
+ static double s_deferredRepaintDelay;
+ static double s_initialDeferredRepaintDelayDuringLoading;
+ static double s_maxDeferredRepaintDelayDuringLoading;
+ static double s_deferredRepaintDelayIncrementDuringLoading;
};
#if ENABLE(INSPECTOR)
diff --git a/src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp b/src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp
index d7eaf25..1ce61c3 100644
--- a/src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp
+++ b/src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp
@@ -124,8 +124,11 @@ static IntRect renderRectRelativeToRootDocument(RenderObject* render)
// Handle nested frames.
for (Frame* frame = render->document()->frame(); frame; frame = frame->tree()->parent()) {
- if (HTMLFrameOwnerElement* ownerElement = frame->ownerElement())
- rect.move(ownerElement->offsetLeft(), ownerElement->offsetTop());
+ if (Element* element = static_cast<Element*>(frame->ownerElement())) {
+ do {
+ rect.move(element->offsetLeft(), element->offsetTop());
+ } while ((element = element->offsetParent()));
+ }
}
return rect;
@@ -444,7 +447,7 @@ bool hasOffscreenRect(Node* node)
// In a bottom-up way, this method tries to scroll |frame| in a given direction
// |direction|, going up in the frame tree hierarchy in case it does not succeed.
-bool scrollInDirection(Frame* frame, FocusDirection direction)
+bool scrollInDirection(Frame* frame, FocusDirection direction, const FocusCandidate& candidate)
{
if (!frame)
return false;
@@ -468,6 +471,9 @@ bool scrollInDirection(Frame* frame, FocusDirection direction)
return false;
}
+ if (!candidate.isNull() && isScrollableContainerNode(candidate.enclosingScrollableBox))
+ return frame->eventHandler()->scrollRecursively(scrollDirection, ScrollByLine, candidate.enclosingScrollableBox);
+
return frame->eventHandler()->scrollRecursively(scrollDirection, ScrollByLine);
}
@@ -526,4 +532,17 @@ static bool checkNegativeCoordsForNode(Node* node, const IntRect& curRect)
return canBeScrolled;
}
+bool isScrollableContainerNode(Node* node)
+{
+ if (!node)
+ return false;
+
+ if (RenderObject* renderer = node->renderer()) {
+ return (renderer->isBox() && toRenderBox(renderer)->canBeScrolledAndHasScrollableArea()
+ && node->hasChildNodes() && !node->isDocumentNode());
+ }
+
+ return false;
+}
+
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/page/SpatialNavigation.h b/src/3rdparty/webkit/WebCore/page/SpatialNavigation.h
index 309b095..06389a3 100644
--- a/src/3rdparty/webkit/WebCore/page/SpatialNavigation.h
+++ b/src/3rdparty/webkit/WebCore/page/SpatialNavigation.h
@@ -97,6 +97,7 @@ enum RectsAlignment {
struct FocusCandidate {
FocusCandidate()
: node(0)
+ , enclosingScrollableBox(0)
, distance(maxDistance())
, parentDistance(maxDistance())
, alignment(None)
@@ -106,6 +107,7 @@ struct FocusCandidate {
FocusCandidate(Node* n)
: node(n)
+ , enclosingScrollableBox(0)
, distance(maxDistance())
, parentDistance(maxDistance())
, alignment(None)
@@ -114,9 +116,11 @@ struct FocusCandidate {
}
bool isNull() const { return !node; }
+ bool inScrollableContainer() const { return node && enclosingScrollableBox; }
Document* document() const { return node ? node->document() : 0; }
Node* node;
+ Node* enclosingScrollableBox;
long long distance;
long long parentDistance;
RectsAlignment alignment;
@@ -124,10 +128,11 @@ struct FocusCandidate {
};
void distanceDataForNode(FocusDirection direction, Node* start, FocusCandidate& candidate);
-bool scrollInDirection(Frame*, FocusDirection);
+bool scrollInDirection(Frame*, FocusDirection, const FocusCandidate& candidate = FocusCandidate());
void scrollIntoView(Element*);
bool hasOffscreenRect(Node*);
bool isInRootDocument(Node*);
+bool isScrollableContainerNode(Node*);
} // namspace WebCore
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.cpp
index 910d39a..799055d 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.cpp
@@ -404,7 +404,9 @@ bool BitmapImage::internalAdvanceAnimation(bool skippingFrames)
// Get the repetition count again. If we weren't able to get a
// repetition count before, we should have decoded the whole image by
// now, so it should now be available.
- if (repetitionCount(true) && m_repetitionsComplete >= m_repetitionCount) {
+ // Note that we don't need to special-case cAnimationLoopOnce here
+ // because it is 0 (see comments on its declaration in ImageSource.h).
+ if (repetitionCount(true) != cAnimationLoopInfinite && m_repetitionsComplete > m_repetitionCount) {
m_animationFinished = true;
m_desiredFrameStartTime = 0;
--m_currentFrame;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/ImageSource.h b/src/3rdparty/webkit/WebCore/platform/graphics/ImageSource.h
index 258fd0f..0853d7b 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/ImageSource.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/ImageSource.h
@@ -86,7 +86,22 @@ typedef RefPtr<SharedBitmap> NativeImagePtr;
#endif
#endif
-const int cAnimationLoopOnce = -1;
+// Right now GIFs are the only recognized image format that supports animation.
+// The animation system and the constants below are designed with this in mind.
+// GIFs have an optional 16-bit unsigned loop count that describes how an
+// animated GIF should be cycled. If the loop count is absent, the animation
+// cycles once; if it is 0, the animation cycles infinitely; otherwise the
+// animation plays n + 1 cycles (where n is the specified loop count). If the
+// GIF decoder defaults to cAnimationLoopOnce in the absence of any loop count
+// and translates an explicit "0" loop count to cAnimationLoopInfinite, then we
+// get a couple of nice side effects:
+// * By making cAnimationLoopOnce be 0, we allow the animation cycling code in
+// BitmapImage.cpp to avoid special-casing it, and simply treat all
+// non-negative loop counts identically.
+// * By making the other two constants negative, we avoid conflicts with any
+// real loop count values.
+const int cAnimationLoopOnce = 0;
+const int cAnimationLoopInfinite = -1;
const int cAnimationNone = -2;
class ImageSource : public Noncopyable {
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
index be44fca..ad2ec9c 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
@@ -330,6 +330,7 @@ QPixmap GraphicsLayerQtImpl::recache(const QRegion& regionToUpdate)
// Render the actual contents into the cache
painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
m_layer->paintGraphicsLayerContents(gc, region.boundingRect());
+ painter.end();
m_backingStoreKey = QPixmapCache::insert(pixmap);
return pixmap;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
index b10cc71..cc707da 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
@@ -115,22 +115,8 @@ size_t ImageDecoderQt::frameCount()
int ImageDecoderQt::repetitionCount() const
{
- if (m_reader && m_reader->supportsAnimation()) {
+ if (m_reader && m_reader->supportsAnimation())
m_repetitionCount = m_reader->loopCount();
-
- // Qt and WebCore have a incompatible understanding of
- // the loop count and we can not completely map everything.
- // Qt | WebCore | description
- // -1 | 0 | infinite animation
- // 0 | cAnimationLoopOnce | show every frame once
- // n | n | no idea if that is supported
- // n/a | cAnimationNone | show only the first frame
- if (m_repetitionCount == -1)
- m_repetitionCount = 0;
- else if (m_repetitionCount == 0)
- m_repetitionCount = cAnimationLoopOnce;
- }
-
return m_repetitionCount;
}
@@ -205,6 +191,8 @@ bool ImageDecoderQt::internalHandleCurrentImage(size_t frameIndex)
// Now get the QImage from Qt and place it in the RGBA32Buffer
QImage img;
if (!m_reader->read(&img)) {
+ frameCount();
+ repetitionCount();
clearPointers();
return false;
}
diff --git a/src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp b/src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp
index 5a8a812..dda443f 100644
--- a/src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp
@@ -33,31 +33,49 @@
namespace WebCore {
+ static unsigned char buffer[1024];
+
class TextBreakIterator : public QTextBoundaryFinder {
+ public:
+ TextBreakIterator(QTextBoundaryFinder::BoundaryType type, const UChar* string, int length)
+ : QTextBoundaryFinder(type, (const QChar*)string, length, buffer, sizeof(buffer))
+ , length(length)
+ , string(string) {}
+ TextBreakIterator()
+ : QTextBoundaryFinder()
+ , length(0)
+ , string(0) {}
+
+ int length;
+ const UChar* string;
};
- static QTextBoundaryFinder* iterator = 0;
- static unsigned char buffer[1024];
- TextBreakIterator* wordBreakIterator(const UChar* string, int length)
+ TextBreakIterator* setUpIterator(TextBreakIterator& iterator, QTextBoundaryFinder::BoundaryType type, const UChar* string, int length)
{
if (!string || !length)
return 0;
- if (!iterator)
- iterator = new QTextBoundaryFinder;
- *iterator = QTextBoundaryFinder(QTextBoundaryFinder::Word, (const QChar *)string, length, buffer, sizeof(buffer));
- return static_cast<TextBreakIterator*>(iterator);
+ if (iterator.isValid() && type == iterator.type() && length == iterator.length
+ && memcmp(string, iterator.string, length) == 0) {
+ iterator.toStart();
+ return &iterator;
+ }
+
+ iterator = TextBreakIterator(type, string, length);
+
+ return &iterator;
}
- TextBreakIterator* characterBreakIterator(const UChar* string, int length)
+ TextBreakIterator* wordBreakIterator(const UChar* string, int length)
{
- if (!string || !length)
- return 0;
- if (!iterator)
- iterator = new QTextBoundaryFinder;
+ static TextBreakIterator staticWordBreakIterator;
+ return setUpIterator(staticWordBreakIterator, QTextBoundaryFinder::Word, string, length);
+ }
- *iterator = QTextBoundaryFinder(QTextBoundaryFinder::Grapheme, (const QChar *)string, length, buffer, sizeof(buffer));
- return static_cast<TextBreakIterator*>(iterator);
+ TextBreakIterator* characterBreakIterator(const UChar* string, int length)
+ {
+ static TextBreakIterator staticCharacterBreakIterator;
+ return setUpIterator(staticCharacterBreakIterator, QTextBoundaryFinder::Grapheme, string, length);
}
TextBreakIterator* cursorMovementIterator(const UChar* string, int length)
@@ -67,25 +85,15 @@ namespace WebCore {
TextBreakIterator* lineBreakIterator(const UChar* string, int length)
{
- static QTextBoundaryFinder *iterator = 0;
- if (!string || !length)
- return 0;
- if (!iterator)
- iterator = new QTextBoundaryFinder;
-
- *iterator = QTextBoundaryFinder(QTextBoundaryFinder::Line, (const QChar *)string, length, buffer, sizeof(buffer));
- return static_cast<TextBreakIterator*>(iterator);
+ static TextBreakIterator staticLineBreakIterator;
+ return setUpIterator(staticLineBreakIterator, QTextBoundaryFinder::Line, string, length);
}
TextBreakIterator* sentenceBreakIterator(const UChar* string, int length)
{
- if (!string || !length)
- return 0;
- if (!iterator)
- iterator = new QTextBoundaryFinder;
+ static TextBreakIterator staticSentenceBreakIterator;
+ return setUpIterator(staticSentenceBreakIterator, QTextBoundaryFinder::Sentence, string, length);
- *iterator = QTextBoundaryFinder(QTextBoundaryFinder::Sentence, (const QChar *)string, length, buffer, sizeof(buffer));
- return static_cast<TextBreakIterator*>(iterator);
}
int textBreakFirst(TextBreakIterator* bi)
diff --git a/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp b/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp
index 74deaf6..d5292fe 100644
--- a/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp
+++ b/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp
@@ -35,6 +35,8 @@
namespace WebCore {
+typedef void gtkInitFunc(int *argc, char ***argv);
+
bool PluginPackage::fetchInfo()
{
if (!load())
@@ -109,6 +111,7 @@ bool PluginPackage::load()
NP_InitializeFuncPtr NP_Initialize;
NPError npErr;
+ gtkInitFunc* gtkInit;
NP_Initialize = (NP_InitializeFuncPtr)m_module->resolve("NP_Initialize");
m_NPP_Shutdown = (NPP_ShutdownProcPtr)m_module->resolve("NP_Shutdown");
@@ -127,6 +130,26 @@ bool PluginPackage::load()
m_browserFuncs.getvalue = staticPluginQuirkRequiresGtkToolKit_NPN_GetValue;
}
+ // WORKAROUND: Prevent gtk based plugin crashes such as BR# 40567 by
+ // explicitly forcing the initializing of Gtk, i.e. calling gtk_init,
+ // whenver the symbol is present in the plugin library loaded above.
+ // Note that this workaround is based on code from the NSPluginClass ctor
+ // in KDE's kdebase/apps/nsplugins/viewer/nsplugin.cpp file.
+ gtkInit = (gtkInitFunc*)m_module->resolve("gtk_init");
+ if (gtkInit) {
+ // Prevent gtk_init() from replacing the X error handlers, since the Gtk
+ // handlers abort when they receive an X error, thus killing the viewer.
+#ifdef Q_WS_X11
+ int (*old_error_handler)(Display*, XErrorEvent*) = XSetErrorHandler(0);
+ int (*old_io_error_handler)(Display*) = XSetIOErrorHandler(0);
+#endif
+ gtkInit(0, 0);
+#ifdef Q_WS_X11
+ XSetErrorHandler(old_error_handler);
+ XSetIOErrorHandler(old_io_error_handler);
+#endif
+ }
+
#if defined(XP_UNIX)
npErr = NP_Initialize(&m_browserFuncs, &m_pluginFuncs);
#else
diff --git a/src/3rdparty/webkit/WebKit.pri b/src/3rdparty/webkit/WebKit.pri
index 921a6e0..fcd2891 100644
--- a/src/3rdparty/webkit/WebKit.pri
+++ b/src/3rdparty/webkit/WebKit.pri
@@ -24,7 +24,7 @@ building-libs {
win32-*|wince* {
!CONFIG(release, debug|release):build_pass: QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}d
QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}$${QT_MAJOR_VERSION}
- win32-g++: LIBS += -l$$QTWEBKITLIBNAME
+ win32-g++*: LIBS += -l$$QTWEBKITLIBNAME
else: LIBS += $${QTWEBKITLIBNAME}.lib
} else {
LIBS += -lQtWebKit
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro b/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro
index 22d4c8d..62546f6 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro
+++ b/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro
@@ -12,7 +12,7 @@ DOUBLE_ESCAPED_QUOTE = ""
ESCAPE = ""
win32-msvc*|symbian {
ESCAPE = "^"
-} else:win32-g++:isEmpty(QMAKE_SH) {
+} else:win32-g++*:isEmpty(QMAKE_SH) {
# MinGW's make will run makefile commands using sh, even if make
# was run from the Windows shell, if it finds sh in the path.
ESCAPE = "^"
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
index 2788085..4460ad3 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
@@ -1175,7 +1175,7 @@ void QWebPagePrivate::dragEnterEvent(QGraphicsSceneDragDropEvent* ev)
Qt::DropAction action = dragOpToDropAction(page->dragController()->dragEntered(&dragData));
ev->setDropAction(action);
if (action != Qt::IgnoreAction)
- ev->accept();
+ ev->acceptProposedAction();
#endif
}
@@ -1188,7 +1188,7 @@ void QWebPagePrivate::dragEnterEvent(QDragEnterEvent* ev)
ev->setDropAction(action);
// We must accept this event in order to receive the drag move events that are sent
// while the drag and drop action is in progress.
- ev->accept();
+ ev->acceptProposedAction();
#endif
}
@@ -1218,7 +1218,7 @@ void QWebPagePrivate::dragMoveEvent(QGraphicsSceneDragDropEvent* ev)
Qt::DropAction action = dragOpToDropAction(page->dragController()->dragUpdated(&dragData));
ev->setDropAction(action);
if (action != Qt::IgnoreAction)
- ev->accept();
+ ev->acceptProposedAction();
#endif
}
@@ -1232,7 +1232,7 @@ void QWebPagePrivate::dragMoveEvent(QDragMoveEvent* ev)
ev->setDropAction(action);
// We must accept this event in order to receive the drag move events that are sent
// while the drag and drop action is in progress.
- ev->accept();
+ ev->acceptProposedAction();
#endif
}
@@ -1242,7 +1242,7 @@ void QWebPagePrivate::dropEvent(QGraphicsSceneDragDropEvent* ev)
DragData dragData(ev->mimeData(), ev->pos().toPoint(),
QCursor::pos(), dropActionToDragOp(ev->possibleActions()));
if (page->dragController()->performDrag(&dragData))
- ev->accept();
+ ev->acceptProposedAction();
#endif
}
@@ -1254,7 +1254,7 @@ void QWebPagePrivate::dropEvent(QDropEvent* ev)
DragData dragData(ev->mimeData(), ev->pos(), QCursor::pos(),
dropActionToDragOp(Qt::DropAction(ev->dropAction())));
if (page->dragController()->performDrag(&dragData))
- ev->accept();
+ ev->acceptProposedAction();
#endif
}
@@ -1371,6 +1371,14 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
}
#ifndef QT_NO_PROPERTIES
+typedef struct {
+ const char* name;
+ double deferredRepaintDelay;
+ double initialDeferredRepaintDelayDuringLoading;
+ double maxDeferredRepaintDelayDuringLoading;
+ double deferredRepaintDelayIncrementDuringLoading;
+} QRepaintThrottlingPreset;
+
void QWebPagePrivate::dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent* event)
{
if (event->propertyName() == "_q_viewMode") {
@@ -1388,7 +1396,42 @@ void QWebPagePrivate::dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent* ev
} else if (event->propertyName() == "_q_HTMLTokenizerTimeDelay") {
double timeDelay = q->property("_q_HTMLTokenizerTimeDelay").toDouble();
q->handle()->page->setCustomHTMLTokenizerTimeDelay(timeDelay);
- }
+ } else if (event->propertyName() == "_q_RepaintThrottlingDeferredRepaintDelay") {
+ double p = q->property("_q_RepaintThrottlingDeferredRepaintDelay").toDouble();
+ FrameView::setRepaintThrottlingDeferredRepaintDelay(p);
+ } else if (event->propertyName() == "_q_RepaintThrottlingnInitialDeferredRepaintDelayDuringLoading") {
+ double p = q->property("_q_RepaintThrottlingnInitialDeferredRepaintDelayDuringLoading").toDouble();
+ FrameView::setRepaintThrottlingnInitialDeferredRepaintDelayDuringLoading(p);
+ } else if (event->propertyName() == "_q_RepaintThrottlingMaxDeferredRepaintDelayDuringLoading") {
+ double p = q->property("_q_RepaintThrottlingMaxDeferredRepaintDelayDuringLoading").toDouble();
+ FrameView::setRepaintThrottlingMaxDeferredRepaintDelayDuringLoading(p);
+ } else if (event->propertyName() == "_q_RepaintThrottlingDeferredRepaintDelayIncrementDuringLoading") {
+ double p = q->property("_q_RepaintThrottlingDeferredRepaintDelayIncrementDuringLoading").toDouble();
+ FrameView::setRepaintThrottlingDeferredRepaintDelayIncrementDuringLoading(p);
+ } else if (event->propertyName() == "_q_RepaintThrottlingPreset") {
+ static const QRepaintThrottlingPreset presets[] = {
+ { "NoThrottling", 0, 0, 0, 0 },
+ { "Legacy", 0.025, 0, 2.5, 0.5 },
+ { "Minimal", 0.01, 0, 1, 0.2 },
+ { "Medium", 0.025, 1, 5, 0.5 },
+ { "Heavy", 0.1, 2, 10, 1 }
+ };
+
+ QString p = q->property("_q_RepaintThrottlingPreset").toString();
+ for(int i = 0; i < sizeof(presets) / sizeof(presets[0]); i++) {
+ if(p == presets[i].name) {
+ FrameView::setRepaintThrottlingDeferredRepaintDelay(
+ presets[i].deferredRepaintDelay);
+ FrameView::setRepaintThrottlingnInitialDeferredRepaintDelayDuringLoading(
+ presets[i].initialDeferredRepaintDelayDuringLoading);
+ FrameView::setRepaintThrottlingMaxDeferredRepaintDelayDuringLoading(
+ presets[i].maxDeferredRepaintDelayDuringLoading);
+ FrameView::setRepaintThrottlingDeferredRepaintDelayIncrementDuringLoading(
+ presets[i].deferredRepaintDelayIncrementDuringLoading);
+ break;
+ }
+ }
+ }
#if ENABLE(TILED_BACKING_STORE)
else if (event->propertyName() == "_q_TiledBackingStoreTileSize") {
WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame());
@@ -3267,6 +3310,14 @@ bool QWebPage::findText(const QString &subString, FindFlags options)
} else
return d->page->markAllMatchesForText(subString, caseSensitivity, true, 0);
} else {
+ if (subString.isEmpty()) {
+ d->page->mainFrame()->selection()->clear();
+ Frame* frame = d->page->mainFrame()->tree()->firstChild();
+ while (frame) {
+ frame->selection()->clear();
+ frame = frame->tree()->traverseNextWithWrap(false);
+ }
+ }
::FindDirection direction = ::FindDirectionForward;
if (options & FindBackward)
direction = ::FindDirectionBackward;
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp
index f715430..b9180be 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp
@@ -63,7 +63,7 @@
/*!
\class QWebPluginFactory::Plugin
\since 4.4
- \brief the QWebPluginFactory::Plugin structure describes the properties of a plugin a QWebPluginFactory can create.
+ \brief The QWebPluginFactory::Plugin structure describes the properties of a plugin a QWebPluginFactory can create.
\inmodule QtWebKit
*/
@@ -147,7 +147,7 @@ QWebPluginFactory::~QWebPluginFactory()
supported plugins the factory can create.
\note Currently, this function is only called when JavaScript programs
- access the global \c plugins or \c mimetypes objects.
+ access the global \c plugins or \c mimetypes objects.
*/
/*!
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
index a5fc794..47b4f3b 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
@@ -245,6 +245,10 @@ void QWebSettingsPrivate::apply()
settings->setTiledBackingStoreEnabled(value);
#endif
+ value = attributes.value(QWebSettings::SiteSpecificQuirksEnabled,
+ global->attributes.value(QWebSettings::SiteSpecificQuirksEnabled));
+ settings->setNeedsSiteSpecificQuirks(value);
+
settings->setUsesPageCache(WebCore::pageCache()->capacity());
} else {
QList<QWebSettingsPrivate*> settings = *::allSettings();
@@ -426,6 +430,8 @@ QWebSettings* QWebSettings::globalSettings()
and at other times scrolling the page itself. For this reason iframes and framesets are
barely usable on touch devices. This will flatten all the frames to become one scrollable page.
This is disabled by default.
+ \value SiteSpecificQuirksEnabled This setting enables WebKit's workaround for broken sites. It is
+ enabled by default.
*/
/*!
@@ -461,6 +467,7 @@ QWebSettings::QWebSettings()
d->attributes.insert(QWebSettings::AcceleratedCompositingEnabled, true);
d->attributes.insert(QWebSettings::TiledBackingStoreEnabled, false);
d->attributes.insert(QWebSettings::FrameFlatteningEnabled, false);
+ d->attributes.insert(QWebSettings::SiteSpecificQuirksEnabled, true);
d->offlineStorageDefaultQuota = 5 * 1024 * 1024;
d->defaultTextEncoding = QLatin1String("iso-8859-1");
}
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h
index b978f5e..207a9b6 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h
@@ -73,7 +73,8 @@ public:
SpatialNavigationEnabled,
LocalContentCanAccessFileUrls,
TiledBackingStoreEnabled,
- FrameFlatteningEnabled
+ FrameFlatteningEnabled,
+ SiteSpecificQuirksEnabled
};
enum WebGraphic {
MissingImageGraphic,
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 3deb9ac..475d22d 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,90 @@
+2010-06-17 Mark Brand <mabrand@mabrand.nl>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] use "win32-g++*" scope to match all MinGW makespecs
+
+ The scope "win32-g++" comes from the name of the makespec. However, it
+ is frequently used to check for MinGW. This works fine as long as
+ win32-g++ is the only makespec for MinGW. Now we need the wildcard
+ to cover "win32-g++-cross" as well.
+
+ * Api/DerivedSources.pro:
+
+2010-05-28 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
+
+ Reviewed by Simon Hausmann, Antti Koivisto
+
+ [Qt] Add internal Qt Api to configure repaint throttling parameters.
+ https://bugs.webkit.org/show_bug.cgi?id=38401
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::dynamicPropertyChangeEvent):
+
+2010-06-12 Dawit Alemayehu <adawit@kde.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added an attribute to enable/disable site specific quirks mode in WebKit.
+ The attribute is enabled by default.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40073
+
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply):
+ (QWebSettings::QWebSettings):
+ * Api/qwebsettings.h:
+
+2010-06-09 Pierre Rossi <pierre.rossi@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ QWebPage::findText() does not clear selection when passed empty string
+ https://bugs.webkit.org/show_bug.cgi?id=31779
+
+ * Api/qwebpage.cpp:
+ (QWebPage::findText):
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::findText):
+
+2010-06-12 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Add documentation to the QtWebkit bridge
+ https://bugs.webkit.org/show_bug.cgi?id=35861
+
+ The previous accepted patch was actually a faulty one; It was hard to trace since it's just a documentation
+ change. The new patch amends that, with the correct snippets and grammar fixes.
+
+ * docs/qtwebkit-bridge.qdoc:
+ * docs/webkitsnippets/qtwebkit_bridge_snippets.cpp:
+ (wrapInFunction):
+
+2010-06-11 Jesus Sanchez-Palencia <jesus@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Typo error in QWebPluginFactory Documentation
+ https://bugs.webkit.org/show_bug.cgi?id=40490
+
+ * Api/qwebpluginfactory.cpp:
+
+2010-06-10 Andy Shaw <andy.shaw@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ REGRESSION: [Qt] When dragging onto a page that handles the drag in Javascript it will be a move and not a copy by default
+ https://bugs.webkit.org/show_bug.cgi?id=40401
+
+ The correct pattern in Qt for Dnd events is to use acceptProposedAction() instead
+ of accept().
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::dragEnterEvent):
+ (QWebPagePrivate::dragMoveEvent):
+ (QWebPagePrivate::dropEvent):
+
2010-06-02 Tasuku Suzuki <tasuku.suzuki@nokia.com>
Reviewed by Shinichiro Hamaji.
diff --git a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit-bridge.qdoc b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit-bridge.qdoc
index 4f41d29..fa93293 100644
--- a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit-bridge.qdoc
+++ b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit-bridge.qdoc
@@ -7,25 +7,26 @@
\section2 The technology
The QtWebKit bridge is a mechanism that extends WebKit's JavaScript environment to access native
- objects that are represented as QObjects. It takes advantage of the inherent introspection of the
- \l{Qt Object Model}, which has a natural alignment to the way JavaScript worked.
+ objects that are represented as \l{QObject}s. It takes advantage of the \l{QObject} introspection,
+ a part of the \l{Qt Object Model}, which makes it easy to integrate with the dynamic JavaScript environment,
+ for example \l{QObject} properties map directly to JavaScript properties.
For example, both JavaScript and QObjects have properties: a construct that represent a getter/setter
pair under one name.
\section2 Use Cases
- There are two main use cases for the QtWebKit bridge. Web content in a native application, and Thin Client.
+ There are two main use cases for the QtWebKit bridge. Web content in a native application, and Thin Clients.
\section3 Web Content in a Native Application
This is a common use case in classic Qt application, and a design pattern used by several modern
- applications. For example, an application that contains both a media-player, playlist manager, and
- a music store. The playlist manager is usually best authored as a classic desktop application,
+ applications. For example, an application that contains a media-player, playlist manager, and music store.
+ The playlist manager is usually best authored as a classic desktop application,
with the native-looking robust \l{QWidget}s helping with producing that application.
The media-player control, which usually looks custom, can be written using \l{The Graphics View framework}
or with in a declarative way with \l{QtDeclarative}. The music store, which shows dynamic content
- from the internet, and gets modified rapidly, is best authored in HTML and maintained on the server.
+ from the internet and gets modified rapidly, is best authored in HTML and maintained on the server.
With the QtWebKit bridge, that music store component can interact with native parts of the application,
for example, if a file needs to be saved to a specific location.
@@ -38,7 +39,7 @@
access to native features not usually exposed to the web, or to enable helper components that
are best written with C++.
- An example for such client is a UI for a video-on-demand service on a TV. The entire content and
+ An example for such a client is a UI for a video-on-demand service on a TV. The entire content and
UI can be kept on the server, served dynamically through HTTP and rendered with WebKit, with additional
native components for accessing hardware-specific features like extracting the list of images
out of the video.
@@ -67,7 +68,7 @@
\section2 Creating the link via QWebFrame
By default, no QObjects are accessible through the web environment, for security reasons.
- To enable web content access to a native QObject, the application has to explicitly grant it access,
+ To enable web content access for a native QObject, the application must explicitly grant it access,
using the following call:
\snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 0
@@ -76,13 +77,13 @@
\section2 Using Signals and Slots
- Qt Script adapts Qt's central \l{Signals and Slots} feature for
+ The QtWebKit bridge adapts Qt's central \l{Signals and Slots} feature for
scripting. There are three principal ways to use signals and slots
- with Qt Script:
+ with the QtWebKit bridge:
\list
\i \bold{Hybrid C++/script}: C++ application code connects a
- signal to a script function. The script function can, for example, be
+ signal to a script function. For example, the script function can be
a function that the user has typed in, or one that you have read from a
file. This approach is useful if you have a QObject but don't want
to expose the object itself to the scripting environment; you just
@@ -97,7 +98,7 @@
the connections is fully dynamic (script-defined).
\i \bold{Purely script-defined}: A script can both define signal
- handler functions (effectively "slots written in Qt Script"),
+ handler functions (effectively "slots written in JavaScript"),
\e{and} set up the connections that utilize those handlers. For
example, a script can define a function that will handle the
QLineEdit::returnPressed() signal, and then connect that signal to the
@@ -108,36 +109,36 @@
\section3 Signal to Function Connections
- \c{connect(function)}
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 6
In this form of connection, the argument to \c{connect()} is the
function to connect to the signal.
- \snippet webkitsnippets/doc_src_qtscript.qdoc 2
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 7
- The argument can be a Qt Script function, as in the above
+ The argument can be a JavaScript function, as in the above
example, or it can be a QObject slot, as in
the following example:
- \snippet webkitsnippets/doc_src_qtscript.qdoc 3
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 8
When the argument is a QObject slot, the argument types of the
signal and slot do not necessarily have to be compatible;
- the QtWebKit bridge will, if necessary, perform conversion of the signal
+ If necessary, the QtWebKit bridge will, perform conversion of the signal
arguments to match the argument types of the slot.
To disconnect from a signal, you invoke the signal's
\c{disconnect()} function, passing the function to disconnect
as argument:
- \snippet webkitsnippets/doc_src_qtscript.qdoc 4
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 9
When a script function is invoked in response to a signal, the
\c this object will be the Global Object.
\section3 Signal to Member Function Connections
- \c{connect(thisObject, function)}
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 10
In this form of the \c{connect()} function, the first argument
is the object that will be bound to the variable, \c this, when
@@ -148,31 +149,31 @@
\c{clicked} signal; passing the form as the \c this object
makes sense in such a case.
- \snippet webkitsnippets/doc_src_qtscript.qdoc 5
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 11
To disconnect from the signal, pass the same arguments to \c{disconnect()}:
- \snippet webkitsnippets/doc_src_qtscript.qdoc 6
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 12
\section3 Signal to Named Member Function Connections
- \c{connect(thisObject, functionName)}
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 14
- In this form of the \c{connect()} function, the first argument is
- the object that will be bound to the variable, \c this, when
- a function is invoked in response to the signal. The second argument
- specifies the name of a function that is connected to the signal,
- and this refers to a member function of the object passed as the
- first argument (\c thisObject in the above scheme).
+ This form of the \c{connect()} function requires that the first argument is
+ the object that will be bound to the variable \c{this} when a function is
+ invoked in response to the signal. The second argument specifies the
+ name of a function that is connected to the signal, and this refers to a
+ member function of the object passed as the first argument (thisObject
+ in the above scheme).
Note that the function is resolved when the connection is made, not
when the signal is emitted.
- \snippet webkitsnippets/doc_src_qtscript.qdoc 7
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 15
To disconnect from the signal, pass the same arguments to \c{disconnect()}:
- \snippet webkitsnippets/doc_src_qtscript.qdoc 8
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 17
\section3 Error Handling
@@ -181,14 +182,14 @@
You can obtain an error message from the resulting \c{Error} object.
Example:
- \snippet webkitsnippets/doc_src_qtscript.qdoc 9
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 18
\section3 Emitting Signals from Scripts
To emit a signal from script code, you simply invoke the signal
function, passing the relevant arguments:
- \snippet webkitsnippets/doc_src_qtscript.qdoc 10
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 19
It is currently not possible to define a new signal in a script;
i.e., all signals must be defined by C++ classes.
@@ -201,13 +202,13 @@
\c{myOverloadedSlot(int)} and \c{myOverloadedSlot(QString)}, the following
script code will behave reasonably:
- \snippet webkitsnippets/doc_src_qtscript.qdoc 11
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 20
You can specify a particular overload by using array-style property access
with the \l{QMetaObject::normalizedSignature()}{normalized signature} of
the C++ function as the property name:
- \snippet webkitsnippets/doc_src_qtscript.qdoc 12
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 21
If the overloads have different number of arguments, the QtWebKit bridge will
pick the overload with the argument count that best matches the
@@ -225,7 +226,7 @@
(it would be meaningless to return values from a slot, as the connected signals don't handle the returned data).
To make a non-slot method invokable, simply add the Q_INVOKABLE macro before its definition:
- \snippet webkitsnippets/doc_src_qtscript.qdoc 20
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 22
\section2 Accessing Properties
@@ -235,11 +236,11 @@
property will automatically be invoked. For example, if your
C++ class has a property declared as follows:
- \snippet webkitsnippets/doc_src_qtscript.qdoc 13
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 23
then script code can do things like the following:
- \snippet webkitsnippets/doc_src_qtscript.qdoc 14
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 24
\section2 Accessing Child QObjects
@@ -250,12 +251,12 @@
\c{"okButton"}, you can access this object in script code through
the expression
- \snippet webkitsnippets/doc_src_qtscript.qdoc 15
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 25
Since \c{objectName} is itself a Q_PROPERTY, you can manipulate
the name in script code to, for example, rename an object:
- \snippet webkitsnippets/doc_src_qtscript.qdoc 16
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 26
\section2 Data types
@@ -283,7 +284,7 @@
\section3 Strings
When JavaScript accesses methods or properties that expect a \l{QString}, the QtWebKit bridge
- will automatically convert the value to a string (if it's not already a string), using the
+ will automatically convert the value to a string (if it is not already a string), using the
built-in JavaScript toString method.
When a QString is passed to JavaScript from a signal or a property, The QtWebKit bridge will
@@ -292,7 +293,7 @@
\section3 Date & Time
Both \l{QDate}, \l{QTime} and \l{QDateTime} are automatically translated to or from the JavaScript
- Date object. If a number is passed as an argument to a method that expects one of the date/time
+ Date object. If a number were passed as an argument to a method that expects one of the date/time
types, the QtWebKit bridge would treat it as a timestamp. If a sting is passed, QtWebKit would
try different Qt date parsing functions to find the right one.
@@ -314,7 +315,7 @@
\section3 Compound (JSON) objects
- JavaScript compound objects, also known as JSON objects, are variables which hold a list
+ JavaScript compound objects, also known as JSON objects, are variables that hold a list
of key-value pairs, where all the keys are strings and the values can have any type.
This translates very well to \l{QVariantMap}, which is nothing more than a \l{QMap} of \l{QString}
to \l{QVariant}.
@@ -334,7 +335,7 @@
a normal JSON object would become a \l{QVariantMap}, and a JavaScript array would become a \l{QVariantList}.
Using \l{QVariant}s generously in C++ in that way makes C++ programming feel a bit more like JavaScript programming,
- as it adds another level of indirection - passing \l{QVariant}s around is very flexible, as the program can figure out
+ as it adds another level of indirection. Passing \l{QVariant}s around like this q is very flexible, as the program can figure out
the type of argument in runtime just like JavaScript would do, but it also takes away from the type-safety and robust
nature of C++. It's recommended to use \l{QVariant}s only for convenience high-level functions, and to keep most of your
\l{QObject}s somewhat type-safe.
@@ -348,7 +349,7 @@
a \l{QObject}.
In general its advised to use care when passing \l{QObject}s as arguments, as those objects don't become owned by
- the Javascipt engine; That means that the application developer has to be extra careful not to try to access
+ the JavaScript engine; That means that the application developer has to be extra careful not to try to access
\l{QObject}s that have already been deleted by the native environment.
\section3 Pixmaps and Images
@@ -401,25 +402,26 @@
\section2 Limiting the Scope of the Hybrid Layer
- When using QtWebKit's hybrid features, it's a common pitfall to make the API exposed to JavaScript very rich and
+ When using QtWebKit's hybrid features, it is a common pitfall to make the API exposed to JavaScript very rich and
use all its features. This, however, leads to complexity and can create bugs that are hard to trace.
- Instead, it's advisable to keep the hybrid layer small and manageable: create a gate only when
+ Instead, it is advisable to keep the hybrid layer small and manageable: create a gate only when
there's an actual need for it, i.e. there's a new native enabler that requires a direct interface
to the application layer. Sometimes new functionality is better handled internally in the native layer
or in the web layer; simplicity is your friend.
This usually becomes more apparent when the hybrid layer can create or destroy objects, or uses
- signals slots or properties with a \l{QObject}* argument. It's advised to be very careful and to treat
+ signals slots or properties with a \l{QObject}* argument. It is advised to be very careful and to treat
an exposed \l{QObject} as a system - with careful attention to memory management and object ownership.
\section2 Internet Security
- When exposing native object to an open web environment, it's important to understand the security
+ When exposing native object to an open web environment, it is importwhichant to understand the security
implications. Think whether the exposed object enables the web environment access to things that
shouldn't be open, and whether the web content loaded by that web page comes from a trusted. In general, when
exposing native QObjects that give the web environment access to private information or to functionality
that's potentially harmful to the client, such exposure should be balanced by limiting the web page's
- access to trusted URLs only with HTTPS and other security measures.
+ access to trusted URLs only with HTTPS, and by utilizing other measures as part of a security strategy.
+
*/
diff --git a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp
index d83ab3f..62eeeca 100644
--- a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp
@@ -2,82 +2,176 @@
void wrapInFunction()
{
-//! [0]
+ //! [0]
// ...
QWebFrame *frame = myWebPage->mainFrame();
frame->addToJavaScriptWindowObject("someNameForMyObject", myObject);
// ...
-//! [0]
+ //! [0]
#if 0
//! [1]
- {
- width: ...,
- height: ...,
- toDataURL: function() { ... },
- assignToHTMLImageElement: function(element) { ... }
- }
- //! [1]
+ {
+ width: ...,
+ height: ...,
+ toDataURL: function() { ... },
+ assignToHTMLImageElement: function(element) { ... }
+ }
+ //! [1]
#endif
//! [2]
- class MyObject : QObject {
- Q_OBJECT
- Q_PROPERTY(QPixmap myPixmap READ getPixmap)
+ class MyObject : QObject {
+ Q_OBJECT
+ Q_PROPERTY(QPixmap myPixmap READ getPixmap)
- public:
- QPixmap getPixmap() const;
- };
+ public:
+ QPixmap getPixmap() const;
+ };
- /* ... */
+ /* ... */
- MyObject myObject;
- myWebPage.mainFrame()->addToJavaScriptWindowObject("myObject", &myObject);
+ MyObject myObject;
+ myWebPage.mainFrame()->addToJavaScriptWindowObject("myObject", &myObject);
//! [2]
- #if 0
- //! [3]
- <html>
- <head>
- <script>
- function loadImage() {
- myObject.myPixmap.assignToHTMLImageElement(document.getElementById("imageElement"));
- }
- </script>
- </head>
- <body onload="loadImage()">
- <img id="imageElement" width="300" height="200" />
- </body>
- </html>
+#if 0
//! [3]
- #endif
- //! [4]
- class MyObject : QObject {
- Q_OBJECT
+ <html>
+ <head>
+ <script>
+ function loadImage() {
+ myObject.myPixmap.assignToHTMLImageElement(document.getElementById("imageElement"));
+ }
+ </script>
+ </head>
+ <body onload="loadImage()">
+ <img id="imageElement" width="300" height="200" />
+ </body>
+ </html>
+ //! [3]
+#endif
+ //! [4]
+ class MyObject : QObject {
+ Q_OBJECT
- public slots:
- void doSomethingWithWebElement(const QWebElement&);
- };
+ public slots:
+ void doSomethingWithWebElement(const QWebElement&);
+ };
- /* ... */
+ /* ... */
- MyObject myObject;
- myWebPage.mainFrame()->addToJavaScriptWindowObject("myObject", &myObject);
+ MyObject myObject;
+ myWebPage.mainFrame()->addToJavaScriptWindowObject("myObject", &myObject);
- //! [4]
- #if 0
- //! [5]
- <html>
+ //! [4]
+#if 0
+ //! [5]
+ <html>
<head>
- <script>
- function runExample() {
- myObject.doSomethingWithWebElement(document.getElementById("someElement"));
- }
- </script>
+ <script>
+ function runExample() {
+ myObject.doSomethingWithWebElement(document.getElementById("someElement"));
+ }
+ </script>
</head>
<body onload="runExample()">
- <span id="someElement">Text</span>
+ <span id="someElement">Text</span>
</body>
- </html>
- //! [5]
- #endif
+ </html>
+ //! [5]
+ //! [6]
+ connect(function);
+ //! [6]
+ //! [7]
+ function myInterestingScriptFunction() { ... }
+ ...
+ myQObject.somethingChanged.connect(myInterestingScriptFunction);
+ //! [7]
+ //! [8]
+ myQObject.somethingChanged.connect(myOtherQObject.doSomething);
+ //! [8]
+ //! [9]
+ myQObject.somethingChanged.disconnect(myInterestingFunction);
+ myQObject.somethingChanged.disconnect(myOtherQObject.doSomething);
+ //! [9]
+ //! [10]
+ connect(thisObject, function)
+ //! [10]
+ //! [11]
+ var obj = { x: 123 };
+ var fun = function() { print(this.x); };
+ myQObject.somethingChanged.connect(obj, fun);
+ //! [11]
+ //! [12]
+ myQObject.somethingChanged.disconnect(obj, fun);
+ //! [12]
+ //! [13]
+ connect(function);
+ //! [13]
+ //! [14]
+ connect(thisObject, functionName)
+ //! [14]
+ //! [15]
+ var obj = { x: 123, fun: function() { print(this.x); } };
+ myQObject.somethingChanged.connect(obj, "fun");
+ //! [15]
+ //! [16]
+ connect(function);
+ //! [16]
+ //! [17]
+ myQObject.somethingChanged.disconnect(obj, "fun");
+ //! [17]
+ //! [18]
+ try {
+ myQObject.somethingChanged.connect(myQObject, "slotThatDoesntExist");
+ } catch (e) {
+ print(e);
+ }
+ //! [18]
+ //! [19]
+ myQObject.somethingChanged("hello");
+ //! [19]
+ //! [20]
+ myQObject.myOverloadedSlot(10); // will call the int overload
+ myQObject.myOverloadedSlot("10"); // will call the QString overload
+ //! [20]
+ //! [21]
+ myQObject['myOverloadedSlot(int)']("10"); // call int overload; the argument is converted to an int
+ myQObject['myOverloadedSlot(QString)'](10); // call QString overload; the argument is converted to a string
+ //! [21]
+ //! [22]
+ class MyObject : public QObject
+ {
+ Q_OBJECT
+
+ public:
+ Q_INVOKABLE void thisMethodIsInvokableInQtScript();
+ void thisMethodIsNotInvokableInQtScript();
+
+ ...
+ };
+ //! [22]
+ //! [23]
+ Q_PROPERTY(bool enabled READ enabled WRITE setEnabled)
+ //! [23]
+ //! [24]
+ myQObject.enabled = true;
+
+ ...
+
+ myQObject.enabled = !myQObject.enabled;
+ //! [24]
+ //! [25]
+ myQObject.enabled = true;
+
+ ...
+
+ myQObject.enabled = !myQObject.enabled;
+ //! [25]
+ //! [26]
+ myDialog.okButton
+ myDialog.okButton.objectName = "cancelButton";
+ // from now on, myDialog.cancelButton references the button
+ //! [26]
+#endif
}
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 27f4b27..0f2ca22 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -122,6 +122,7 @@ private slots:
void testJSPrompt();
void showModalDialog();
void testStopScheduledPageRefresh();
+ void findText();
private:
QWebView* m_view;
@@ -2121,5 +2122,21 @@ void tst_QWebPage::testStopScheduledPageRefresh()
QCOMPARE(page2.mainFrame()->url().toString(), QString("about:blank"));
}
+void tst_QWebPage::findText()
+{
+ m_view->setHtml(QString("<html><head></head><body><div>foo bar</div></body></html>"));
+ m_page->triggerAction(QWebPage::SelectAll);
+ QVERIFY(!m_page->selectedText().isEmpty());
+ m_page->findText("");
+ QVERIFY(m_page->selectedText().isEmpty());
+ QStringList words = (QStringList() << "foo" << "bar");
+ foreach (QString subString, words) {
+ m_page->findText(subString, QWebPage::FindWrapsAroundDocument);
+ QCOMPARE(m_page->selectedText(), subString);
+ m_page->findText("");
+ QVERIFY(m_page->selectedText().isEmpty());
+ }
+}
+
QTEST_MAIN(tst_QWebPage)
#include "tst_qwebpage.moc"
diff --git a/src/activeqt/container/container.pro b/src/activeqt/container/container.pro
index d654f92..4c9b3a8 100644
--- a/src/activeqt/container/container.pro
+++ b/src/activeqt/container/container.pro
@@ -19,7 +19,7 @@ QTDIR_build:DESTDIR = $$QT_BUILD_TREE/lib
LIBS += -lole32 -loleaut32
!wince*:LIBS += -luser32 -lgdi32 -ladvapi32
-win32-g++:LIBS += -luuid
+win32-g++*:LIBS += -luuid
HEADERS = ../control/qaxaggregated.h \
qaxbase.h \
diff --git a/src/activeqt/control/control.pro b/src/activeqt/control/control.pro
index 44eb928..361ca29 100644
--- a/src/activeqt/control/control.pro
+++ b/src/activeqt/control/control.pro
@@ -18,11 +18,11 @@ CONFIG += qt warn_off staticlib
QTDIR_build:DESTDIR = $$QT_BUILD_TREE\\lib
DEFINES += QAX_SERVER
-win32-g++:DEFINES += QT_NEEDS_QMAIN
+win32-g++*:DEFINES += QT_NEEDS_QMAIN
win32-borland:DEFINES += QT_NEEDS_QMAIN
LIBS += -luser32 -lole32 -loleaut32 -lgdi32
-win32-g++:LIBS += -luuid
+win32-g++*:LIBS += -luuid
HEADERS = qaxaggregated.h \
qaxbindable.h \
diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
index 107854c..d53504a 100644
--- a/src/corelib/global/qendian.h
+++ b/src/corelib/global/qendian.h
@@ -44,6 +44,14 @@
#include <QtCore/qglobal.h>
+#ifdef Q_OS_LINUX
+# include <features.h>
+#endif
+
+#ifdef __GLIBC__
+#include <byteswap.h>
+#endif
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -264,6 +272,21 @@ template <> inline qint16 qFromBigEndian<qint16>(const uchar *src)
* and it is therefore a bit more convenient and in most cases more efficient.
*/
template <typename T> T qbswap(T source);
+
+#ifdef __GLIBC__
+template <> inline quint64 qbswap<quint64>(quint64 source)
+{
+ return bswap_64(source);
+}
+template <> inline quint32 qbswap<quint32>(quint32 source)
+{
+ return bswap_32(source);
+}
+template <> inline quint16 qbswap<quint16>(quint16 source)
+{
+ return bswap_16(source);
+}
+#else
template <> inline quint64 qbswap<quint64>(quint64 source)
{
return 0
@@ -292,6 +315,7 @@ template <> inline quint16 qbswap<quint16>(quint16 source)
| ((source & 0x00ff) << 8)
| ((source & 0xff00) >> 8) );
}
+#endif // __GLIBC__
// signed specializations
template <> inline qint64 qbswap<qint64>(qint64 source)
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 373c0b4..b31c83b 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -2503,6 +2503,19 @@ void qFatal(const char *msg, ...)
// getenv is declared as deprecated in VS2005. This function
// makes use of the new secure getenv function.
+/*!
+ \relates <QtGlobal>
+
+ Returns the value of the environment variable with name \a
+ varName. To get the variable string, use QByteArray::constData().
+
+ \note qgetenv() was introduced because getenv() from the standard
+ C library was deprecated in VC2005 (and later versions). qgetenv()
+ uses the new replacement function in VC, and calls the standard C
+ library's implementation on all other platforms.
+
+ \sa qputenv()
+*/
QByteArray qgetenv(const char *varName)
{
#if defined(_MSC_VER) && _MSC_VER >= 1400
@@ -2522,6 +2535,20 @@ QByteArray qgetenv(const char *varName)
#endif
}
+/*!
+ \relates <QtGlobal>
+
+ This function sets the \a value of the environment variable named
+ \a varName. It will create the variable if it does not exist. It
+ returns 0 if the variable could not be set.
+
+ \note qputenv() was introduced because putenv() from the standard
+ C library was deprecated in VC2005 (and later versions). qputenv()
+ uses the replacement function in VC, and calls the standard C
+ library's implementation on all other platforms.
+
+ \sa qgetenv()
+*/
bool qputenv(const char *varName, const QByteArray& value)
{
#if defined(_MSC_VER) && _MSC_VER >= 1400
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index ec49f1a..21930e1 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -1162,7 +1162,15 @@ bool QFSFileEnginePrivate::doStat() const
if (filePath.isEmpty())
return could_stat;
- QString fname = filePath.endsWith(QLatin1String(".lnk")) ? readLink(filePath) : filePath;
+ QString fname;
+ if(filePath.endsWith(QLatin1String(".lnk"))) {
+ fname = readLink(filePath);
+ if(fname.isEmpty())
+ return could_stat;
+ }
+ else
+ fname = filePath;
+
fname = fixIfRelativeUncPath(fname);
UINT oldmode = SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 223df9b..d2e4f75 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -1476,10 +1476,13 @@ bool QIODevice::getChar(char *c)
*/
qint64 QIODevice::peek(char *data, qint64 maxSize)
{
+ Q_D(QIODevice);
qint64 readBytes = read(data, maxSize);
- int i = readBytes;
- while (i > 0)
- ungetChar(data[i-- - 1]);
+ if (readBytes <= 0)
+ return readBytes;
+
+ d->buffer.ungetBlock(data, readBytes);
+ d->pos -= readBytes;
return readBytes;
}
@@ -1502,11 +1505,15 @@ qint64 QIODevice::peek(char *data, qint64 maxSize)
*/
QByteArray QIODevice::peek(qint64 maxSize)
{
+ Q_D(QIODevice);
QByteArray result = read(maxSize);
- int i = result.size();
- const char *data = result.constData();
- while (i > 0)
- ungetChar(data[i-- - 1]);
+
+ if (result.isEmpty())
+ return result;
+
+ d->buffer.ungetBlock(result.constData(), result.size());
+ d->pos -= result.size();
+
return result;
}
diff --git a/src/corelib/io/qiodevice_p.h b/src/corelib/io/qiodevice_p.h
index 94dadca..225a0b9 100644
--- a/src/corelib/io/qiodevice_p.h
+++ b/src/corelib/io/qiodevice_p.h
@@ -151,6 +151,15 @@ public:
len++;
*first = c;
}
+ void ungetBlock(const char* block, int size) {
+ if ((first - buf) < size) {
+ // underflow, the existing valid data needs to move to the end of the (potentially bigger) buffer
+ makeSpace(len + size, freeSpaceAtStart);
+ memcpy(first - size, block, size);
+ }
+ first -= size;
+ len += size;
+ }
private:
enum FreeSpacePos {freeSpaceAtStart, freeSpaceAtEnd};
diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp
index ee3c4f2..bcf4477 100644
--- a/src/corelib/kernel/qabstracteventdispatcher.cpp
+++ b/src/corelib/kernel/qabstracteventdispatcher.cpp
@@ -393,6 +393,27 @@ void QAbstractEventDispatcher::closingDown()
\snippet doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp 0
+ Note that the type of the \a message is platform dependent. The
+ following table shows the \a {message}'s type on Windows, Mac, and
+ X11. You can do a static cast to these types.
+
+ \table
+ \header
+ \o Platform
+ \o type
+ \row
+ \o Windows
+ \o MSG
+ \row
+ \o X11
+ \o XEvent
+ \row
+ \o Mac
+ \o NSEvent
+ \endtable
+
+
+
\sa setEventFilter(), filterEvent()
*/
@@ -434,6 +455,9 @@ QAbstractEventDispatcher::EventFilter QAbstractEventDispatcher::setEventFilter(E
compatibility with any extensions that may be used in the
application.
+ Note that the type of \a message is platform dependent. See
+ QAbstractEventDispatcher::EventFilter for details.
+
\sa setEventFilter()
*/
bool QAbstractEventDispatcher::filterEvent(void *message)
diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp
index b0e2f48..8415259 100644
--- a/src/corelib/kernel/qabstractitemmodel.cpp
+++ b/src/corelib/kernel/qabstractitemmodel.cpp
@@ -2854,7 +2854,7 @@ void QAbstractItemModel::endMoveColumns()
\note Use beginResetModel() and endResetModel() instead whenever possible.
Use this method only if there is no way to call beginResetModel() before invalidating the model.
- Otherwise it could lead to unexcpected behaviour, especially when used with proxy models.
+ Otherwise it could lead to unexpected behaviour, especially when used with proxy models.
*/
void QAbstractItemModel::reset()
{
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 4e6e6b9..0a5e06e 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -1073,7 +1073,7 @@ void QCoreApplication::exit(int returnCode)
The event must be allocated on the heap since the post event queue
will take ownership of the event and delete it once it has been
- posted. It is \e {not safe} to modify or delete the event after
+ posted. It is \e {not safe} to access the event after
it has been posted.
When control returns to the main event loop, all events that are
@@ -1104,7 +1104,7 @@ void QCoreApplication::postEvent(QObject *receiver, QEvent *event)
The event must be allocated on the heap since the post event queue
will take ownership of the event and delete it once it has been
- posted. It is \e {not safe} to modify or delete the event after
+ posted. It is \e {not safe} to access the event after
it has been posted.
When control returns to the main event loop, all events that are
diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp
index fd36be4..9c1c827 100644
--- a/src/corelib/kernel/qeventdispatcher_glib.cpp
+++ b/src/corelib/kernel/qeventdispatcher_glib.cpp
@@ -246,6 +246,7 @@ struct GPostEventSource
GSource source;
QAtomicInt serialNumber;
int lastSerialNumber;
+ QEventDispatcherGlibPrivate *d;
};
static gboolean postEventSourcePrepare(GSource *s, gint *timeout)
@@ -274,6 +275,7 @@ static gboolean postEventSourceDispatch(GSource *s, GSourceFunc, gpointer)
GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);
source->lastSerialNumber = source->serialNumber;
QCoreApplication::sendPostedEvents();
+ source->d->runTimersOnceWithNormalPriority();
return true; // i dunno, george...
}
@@ -313,6 +315,7 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context)
postEventSource = reinterpret_cast<GPostEventSource *>(g_source_new(&postEventSourceFuncs,
sizeof(GPostEventSource)));
postEventSource->serialNumber = 1;
+ postEventSource->d = this;
g_source_set_can_recurse(&postEventSource->source, true);
g_source_attach(&postEventSource->source, mainContext);
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index cede810..e3f537f 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -516,8 +516,12 @@ LRESULT QT_WIN_CALLBACK qt_GetMessageHook(int code, WPARAM wp, LPARAM lp)
if (q) {
QEventDispatcherWin32Private *d = q->d_func();
int localSerialNumber = d->serialNumber;
+#ifdef Q_OS_WINCE
+ MSG dummyMsg;
+ if (HIWORD(GetQueueStatus(QS_INPUT)) == 0
+ && PeekMessage(&dummyMsg, 0, WM_TIMER, WM_TIMER, PM_NOREMOVE) == 0
+#else
if (HIWORD(GetQueueStatus(QS_INPUT | QS_RAWINPUT | QS_TIMER)) == 0
-#ifndef Q_OS_WINCE
|| GetMessageTime() - d->lastMessageTime >= 10
#endif
) {
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index ce9ed58..6ebaaa3 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -378,6 +378,8 @@ void QMetaType::registerStreamOperators(const char *typeName, SaveOperator saveO
void QMetaType::registerStreamOperators(int idx, SaveOperator saveOp,
LoadOperator loadOp)
{
+ if (idx < User)
+ return; //builtin types should not be registered;
QVector<QCustomTypeInfo> *ct = customTypes();
if (!ct)
return;
diff --git a/src/corelib/tools/qharfbuzz.cpp b/src/corelib/tools/qharfbuzz.cpp
index 1b6d334..9166a14 100644
--- a/src/corelib/tools/qharfbuzz.cpp
+++ b/src/corelib/tools/qharfbuzz.cpp
@@ -102,45 +102,15 @@ HB_UChar16 HB_GetMirroredChar(HB_UChar16 ch)
return QChar::mirroredChar(ch);
}
-void *HB_Library_Resolve(const char *library, const char *symbol)
+void *HB_Library_Resolve(const char *library, int version, const char *symbol)
{
#ifdef QT_NO_LIBRARY
return 0;
#else
- return QLibrary::resolve(QLatin1String(library), symbol);
+ return QLibrary::resolve(QLatin1String(library), version, symbol);
#endif
}
-void *HB_TextCodecForMib(int mib)
-{
-#ifndef QT_NO_TEXTCODEC
- return QTextCodec::codecForMib(mib);
-#else
- return 0;
-#endif
-}
-
-char *HB_TextCodec_ConvertFromUnicode(void *codec, const HB_UChar16 *unicode, hb_uint32 length, hb_uint32 *outputLength)
-{
-#ifndef QT_NO_TEXTCODEC
- QByteArray data = reinterpret_cast<QTextCodec *>(codec)->fromUnicode((const QChar *)unicode, length);
- // ### suboptimal
- char *output = (char *)malloc(data.length() + 1);
- Q_CHECK_PTR(output);
- memcpy(output, data.constData(), data.length() + 1);
- if (outputLength)
- *outputLength = data.length();
- return output;
-#else
- return 0;
-#endif
-}
-
-void HB_TextCodec_FreeResult(char *string)
-{
- free(string);
-}
-
} // extern "C"
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 1d5fab3..57f79a0 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -4768,6 +4768,10 @@ int QString::localeAwareCompare_helper(const QChar *data1, int length1,
CFRelease(thisString);
CFRelease(otherString);
return result;
+#elif defined(Q_OS_SYMBIAN)
+ TPtrC p1 = TPtrC16(reinterpret_cast<const TUint16 *>(data1), length1);
+ TPtrC p2 = TPtrC16(reinterpret_cast<const TUint16 *>(data2), length2);
+ return p1.CompareC(p2);
#elif defined(Q_OS_UNIX)
// declared in <string.h>
int delta = strcoll(toLocal8Bit_helper(data1, length1), toLocal8Bit_helper(data2, length2));
diff --git a/src/corelib/tools/qtextboundaryfinder.cpp b/src/corelib/tools/qtextboundaryfinder.cpp
index 9205297..bcddcb2 100644
--- a/src/corelib/tools/qtextboundaryfinder.cpp
+++ b/src/corelib/tools/qtextboundaryfinder.cpp
@@ -131,6 +131,11 @@ static void init(QTextBoundaryFinder::BoundaryType type, const QChar *chars, int
Line break boundaries give possible places where a line break
might happen and sentence boundaries will show the beginning and
end of whole sentences.
+
+ The first position in a string is always a valid boundary and
+ refers to the position before the first character. The last
+ position at the length of the string is also valid and refers
+ to the position after the last character.
*/
/*!
@@ -363,7 +368,8 @@ int QTextBoundaryFinder::toNextBoundary()
++pos;
break;
case Line:
- while (pos < length && d->attributes[pos].lineBreakType < HB_Break)
+ Q_ASSERT(pos);
+ while (pos < length && d->attributes[pos-1].lineBreakType < HB_Break)
++pos;
break;
}
@@ -405,7 +411,7 @@ int QTextBoundaryFinder::toPreviousBoundary()
--pos;
break;
case Line:
- while (pos > 0 && d->attributes[pos].lineBreakType < HB_Break)
+ while (pos > 0 && d->attributes[pos-1].lineBreakType < HB_Break)
--pos;
break;
}
@@ -430,7 +436,7 @@ bool QTextBoundaryFinder::isAtBoundary() const
case Word:
return d->attributes[pos].wordBoundary;
case Line:
- return d->attributes[pos].lineBreakType >= HB_Break;
+ return (pos > 0) ? d->attributes[pos-1].lineBreakType >= HB_Break : true;
case Sentence:
return d->attributes[pos].sentenceBoundary;
}
diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri
index 4e0ebbc..e579dd5 100644
--- a/src/corelib/tools/tools.pri
+++ b/src/corelib/tools/tools.pri
@@ -106,8 +106,9 @@ contains(QT_CONFIG, zlib) {
../3rdparty/zlib/uncompr.c \
../3rdparty/zlib/zutil.c
} else:!contains(QT_CONFIG, no-zlib) {
- unix:LIBS_PRIVATE += -lz
-# win32:LIBS += libz.lib
+ symbian:LIBS_PRIVATE += -llibz
+ else:if(unix|win32-g++*):LIBS_PRIVATE += -lz
+ else:LIBS += zdll.lib
}
DEFINES += HB_EXPORT=Q_CORE_EXPORT
diff --git a/src/declarative/3rdparty/3rdparty.pri b/src/declarative/3rdparty/3rdparty.pri
deleted file mode 100644
index fbdcc11..0000000
--- a/src/declarative/3rdparty/3rdparty.pri
+++ /dev/null
@@ -1,7 +0,0 @@
-INCLUDEPATH += $$PWD
-
-HEADERS += \
- $$PWD/qlistmodelinterface_p.h\
-
-SOURCES += \
- $$PWD/qlistmodelinterface.cpp \
diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt
index 5735b1e..8b6b83f 100644
--- a/src/declarative/QmlChanges.txt
+++ b/src/declarative/QmlChanges.txt
@@ -1,6 +1,8 @@
=============================================================================
The changes below are pre Qt 4.7.0 RC
+QDeclarativeView
+ - initialSize() function added
TextInput and TextEdit:
- openSoftwareInputPanel() and closeSoftwareInputPanel() functions added
Flickable:
diff --git a/src/declarative/declarative.pro b/src/declarative/declarative.pro
index 8037a16..510e7a5 100644
--- a/src/declarative/declarative.pro
+++ b/src/declarative/declarative.pro
@@ -20,7 +20,6 @@ include(../qbase.pri)
#DESTDIR=.
#modules
-include(3rdparty/3rdparty.pri)
include(util/util.pri)
include(graphicsitems/graphicsitems.pri)
include(qml/qml.pri)
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors.cpp b/src/declarative/graphicsitems/qdeclarativeanchors.cpp
index aa53aba..7ac2b17 100644
--- a/src/declarative/graphicsitems/qdeclarativeanchors.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeanchors.cpp
@@ -53,6 +53,30 @@ QT_BEGIN_NAMESPACE
//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)
+static qreal hcenter(QGraphicsItem *i)
+{
+ QGraphicsItemPrivate *item = QGraphicsItemPrivate::get(i);
+
+ qreal width = item->width();
+ int iw = width;
+ if (iw % 2)
+ return (width + 1) / 2;
+ else
+ return width / 2;
+}
+
+static qreal vcenter(QGraphicsItem *i)
+{
+ QGraphicsItemPrivate *item = QGraphicsItemPrivate::get(i);
+
+ qreal height = item->height();
+ int ih = height;
+ if (ih % 2)
+ return (height + 1) / 2;
+ else
+ return height / 2;
+}
+
//### const item?
//local position
static qreal position(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
@@ -73,10 +97,10 @@ static qreal position(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine
ret = item->y() + d->height();
break;
case QDeclarativeAnchorLine::HCenter:
- ret = item->x() + d->width()/2;
+ ret = item->x() + hcenter(item);
break;
case QDeclarativeAnchorLine::VCenter:
- ret = item->y() + d->height()/2;
+ ret = item->y() + vcenter(item);
break;
case QDeclarativeAnchorLine::Baseline:
if (d->isDeclarativeItem)
@@ -108,10 +132,10 @@ static qreal adjustedPosition(QGraphicsObject *item, QDeclarativeAnchorLine::Anc
ret = d->height();
break;
case QDeclarativeAnchorLine::HCenter:
- ret = d->width()/2;
+ ret = hcenter(item);
break;
case QDeclarativeAnchorLine::VCenter:
- ret = d->height()/2;
+ ret = vcenter(item);
break;
case QDeclarativeAnchorLine::Baseline:
if (d->isDeclarativeItem)
@@ -189,17 +213,14 @@ void QDeclarativeAnchorsPrivate::centerInChanged()
if (updatingCenterIn < 2) {
++updatingCenterIn;
- QGraphicsItemPrivate *itemPrivate = QGraphicsItemPrivate::get(item);
if (centerIn == item->parentItem()) {
- QGraphicsItemPrivate *parentPrivate = QGraphicsItemPrivate::get(item->parentItem());
- QPointF p((parentPrivate->width() - itemPrivate->width()) / 2. + hCenterOffset,
- (parentPrivate->height() - itemPrivate->height()) / 2. + vCenterOffset);
+ QPointF p(hcenter(item->parentItem()) - hcenter(item) + hCenterOffset,
+ vcenter(item->parentItem()) - vcenter(item) + vCenterOffset);
setItemPos(p);
} else if (centerIn->parentItem() == item->parentItem()) {
- QGraphicsItemPrivate *centerPrivate = QGraphicsItemPrivate::get(centerIn);
- QPointF p(centerIn->x() + (centerPrivate->width() - itemPrivate->width()) / 2. + hCenterOffset,
- centerIn->y() + (centerPrivate->height() - itemPrivate->height()) / 2. + vCenterOffset);
+ QPointF p(centerIn->x() + hcenter(centerIn) - hcenter(item) + hCenterOffset,
+ centerIn->y() + vcenter(centerIn) - vcenter(item) + vCenterOffset);
setItemPos(p);
}
@@ -535,9 +556,9 @@ void QDeclarativeAnchorsPrivate::updateVerticalAnchors()
//Handle vCenter
if (vCenter.item == item->parentItem()) {
setItemY(adjustedPosition(vCenter.item, vCenter.anchorLine)
- - itemPrivate->height()/2 + vCenterOffset);
+ - vcenter(item) + vCenterOffset);
} else if (vCenter.item->parentItem() == item->parentItem()) {
- setItemY(position(vCenter.item, vCenter.anchorLine) - itemPrivate->height()/2 + vCenterOffset);
+ setItemY(position(vCenter.item, vCenter.anchorLine) - vcenter(item) + vCenterOffset);
}
} else if (usedAnchors & QDeclarativeAnchors::BaselineAnchor) {
//Handle baseline
@@ -604,9 +625,9 @@ void QDeclarativeAnchorsPrivate::updateHorizontalAnchors()
} else if (usedAnchors & QDeclarativeAnchors::HCenterAnchor) {
//Handle hCenter
if (hCenter.item == item->parentItem()) {
- setItemX(adjustedPosition(hCenter.item, hCenter.anchorLine) - itemPrivate->width()/2 + hCenterOffset);
+ setItemX(adjustedPosition(hCenter.item, hCenter.anchorLine) - hcenter(item) + hCenterOffset);
} else if (hCenter.item->parentItem() == item->parentItem()) {
- setItemX(position(hCenter.item, hCenter.anchorLine) - itemPrivate->width()/2 + hCenterOffset);
+ setItemX(position(hCenter.item, hCenter.anchorLine) - hcenter(item) + hCenterOffset);
}
}
diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
index 261cc5c..d8527d3 100644
--- a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
@@ -63,9 +63,10 @@ QT_BEGIN_NAMESPACE
\inherits Image
\since 4.7
- This item provides for playing animations stored as images containing a series of frames,
- such as GIF files. The full list of supported formats can be determined with
- QMovie::supportedFormats().
+ The AnimatedImage element provides for playing animations stored as images containing a series of frames,
+ such as GIF files.
+
+ The full list of supported formats can be determined with QMovie::supportedFormats().
\table
\row
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
index 1f1e453..cf458da 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
@@ -138,7 +138,7 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage()
BorderImage can handle any image format supported by Qt, loaded from any URL scheme supported by Qt.
- It can also handle .sci files, which are a Qml-specific format. A .sci file uses a simple text-based format that specifies
+ It can also handle .sci files, which are a QML-specific format. A .sci file uses a simple text-based format that specifies
the borders, the image file and the tile rules.
The following .sci file sets the borders to 10 on each side for the image \c picture.png:
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index 10dc0f8..6dfd4d9 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -351,6 +351,8 @@ void QDeclarativeFlickablePrivate::updateBeginningEnd()
Flickable places its children on a surface that can be dragged and flicked.
\code
+ import Qt 4.7
+
Flickable {
width: 200; height: 200
contentWidth: image.width; contentHeight: image.height
@@ -1039,11 +1041,11 @@ QDeclarativeListProperty<QGraphicsObject> QDeclarativeFlickable::flickableChildr
The \c boundsBehavior can be one of:
\list
- \o \e Flickable.StopAtBounds - the contents can not be dragged beyond the boundary
+ \o Flickable.StopAtBounds - the contents can not be dragged beyond the boundary
of the flickable, and flicks will not overshoot.
- \o \e Flickable.DragOverBounds - the contents can be dragged beyond the boundary
+ \o Flickable.DragOverBounds - the contents can be dragged beyond the boundary
of the Flickable, but flicks will not overshoot.
- \o \e Flickable.DragAndOvershootBounds (default) - the contents can be dragged
+ \o Flickable.DragAndOvershootBounds (default) - the contents can be dragged
beyond the boundary of the Flickable, and can overshoot the
boundary when flicked.
\endlist
@@ -1212,6 +1214,7 @@ bool QDeclarativeFlickable::sendMouseEvent(QGraphicsSceneMouseEvent *event)
default:
break;
}
+ stealThisEvent = d->stealMouse; // Update stealThisEvent and grabber in case changed by function calls above
grabber = qobject_cast<QDeclarativeItem*>(s->mouseGrabberItem());
if (grabber && stealThisEvent && !grabber->keepMouseGrab() && grabber != this) {
d->clearDelayedPress();
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index ffffc2f..3792595 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -108,6 +108,7 @@ public:
, highlightComponent(0), highlight(0), trackedItem(0)
, moveReason(Other), buffer(0), highlightXAnimator(0), highlightYAnimator(0)
, highlightMoveDuration(150)
+ , footerComponent(0), footer(0), headerComponent(0), header(0)
, bufferMode(BufferBefore | BufferAfter), snapMode(QDeclarativeGridView::NoSnap)
, ownModel(false), wrap(false), autoHighlight(true)
, fixCurrentVisibility(false), lazyRelease(false), layoutScheduled(false)
@@ -128,6 +129,8 @@ public:
void createHighlight();
void updateHighlight();
void updateCurrent(int modelIndex);
+ void updateHeader();
+ void updateFooter();
void fixupPosition();
FxGridItem *visibleItem(int modelIndex) const {
@@ -230,6 +233,18 @@ public:
return visibleItems.count() ? visibleItems.first() : 0;
}
+ int lastVisibleIndex() const {
+ int lastIndex = -1;
+ for (int i = visibleItems.count()-1; i >= 0; --i) {
+ FxGridItem *gridItem = visibleItems.at(i);
+ if (gridItem->index != -1) {
+ lastIndex = gridItem->index;
+ break;
+ }
+ }
+ return lastIndex;
+ }
+
// Map a model index to visibleItems list index.
// These may differ if removed items are still present in the visible list,
// e.g. doing a removal animation
@@ -246,16 +261,37 @@ public:
return -1; // Not in visibleList
}
- qreal snapPosAt(qreal pos) {
+ qreal snapPosAt(qreal pos) const {
+ Q_Q(const QDeclarativeGridView);
qreal snapPos = 0;
if (!visibleItems.isEmpty()) {
pos += rowSize()/2;
snapPos = visibleItems.first()->rowPos() - visibleIndex / columns * rowSize();
snapPos = pos - fmodf(pos - snapPos, qreal(rowSize()));
+ qreal maxExtent = flow == QDeclarativeGridView::LeftToRight ? -q->maxYExtent() : -q->maxXExtent();
+ qreal minExtent = flow == QDeclarativeGridView::LeftToRight ? -q->minYExtent() : -q->minXExtent();
+ if (snapPos > maxExtent)
+ snapPos = maxExtent;
+ if (snapPos < minExtent)
+ snapPos = minExtent;
}
return snapPos;
}
+ FxGridItem *snapItemAt(qreal pos) {
+ for (int i = 0; i < visibleItems.count(); ++i) {
+ FxGridItem *item = visibleItems[i];
+ if (item->index == -1)
+ continue;
+ qreal itemTop = item->rowPos();
+ if (item->index == model->count()-1 || (itemTop+rowSize()/2 >= pos))
+ return item;
+ }
+ if (visibleItems.count() && visibleItems.first()->rowPos() <= pos)
+ return visibleItems.first();
+ return 0;
+ }
+
int snapIndex() {
int index = currentIndex;
for (int i = 0; i < visibleItems.count(); ++i) {
@@ -283,6 +319,9 @@ public:
scheduleLayout();
}
}
+ } else if ((header && header->item == item) || (footer && footer->item == item)) {
+ updateHeader();
+ updateFooter();
}
}
@@ -330,6 +369,10 @@ public:
QSmoothedAnimation *highlightXAnimator;
QSmoothedAnimation *highlightYAnimator;
int highlightMoveDuration;
+ QDeclarativeComponent *footerComponent;
+ FxGridItem *footer;
+ QDeclarativeComponent *headerComponent;
+ FxGridItem *header;
enum BufferMode { NoBuffer = 0x00, BufferBefore = 0x01, BufferAfter = 0x02 };
int bufferMode;
QDeclarativeGridView::SnapMode snapMode;
@@ -412,7 +455,6 @@ void QDeclarativeGridViewPrivate::refill(qreal from, qreal to, bool doBuffer)
Q_Q(QDeclarativeGridView);
if (!isValid() || !q->isComponentComplete())
return;
-
itemCount = model->count();
qreal bufferFrom = from - buffer;
qreal bufferTo = to + buffer;
@@ -522,6 +564,10 @@ void QDeclarativeGridViewPrivate::refill(qreal from, qreal to, bool doBuffer)
deferredRelease = true;
}
if (changed) {
+ if (header)
+ updateHeader();
+ if (footer)
+ updateFooter();
if (flow == QDeclarativeGridView::LeftToRight)
q->setContentHeight(endPosition() - startPosition());
else
@@ -557,7 +603,7 @@ void QDeclarativeGridViewPrivate::layout()
{
Q_Q(QDeclarativeGridView);
layoutScheduled = false;
- if (!isValid()) {
+ if (!isValid() && !visibleItems.count()) {
clear();
return;
}
@@ -579,6 +625,10 @@ void QDeclarativeGridViewPrivate::layout()
item->setPosition(colPos, rowPos);
}
}
+ if (header)
+ updateHeader();
+ if (footer)
+ updateFooter();
q->refill();
updateHighlight();
moveReason = Other;
@@ -742,6 +792,94 @@ void QDeclarativeGridViewPrivate::updateCurrent(int modelIndex)
releaseItem(oldCurrentItem);
}
+void QDeclarativeGridViewPrivate::updateFooter()
+{
+ Q_Q(QDeclarativeGridView);
+ if (!footer && footerComponent) {
+ QDeclarativeItem *item = 0;
+ QDeclarativeContext *context = new QDeclarativeContext(qmlContext(q));
+ QObject *nobj = footerComponent->create(context);
+ if (nobj) {
+ QDeclarative_setParent_noEvent(context, nobj);
+ item = qobject_cast<QDeclarativeItem *>(nobj);
+ if (!item)
+ delete nobj;
+ } else {
+ delete context;
+ }
+ if (item) {
+ QDeclarative_setParent_noEvent(item, q->viewport());
+ item->setParentItem(q->viewport());
+ item->setZValue(1);
+ QDeclarativeItemPrivate *itemPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(item));
+ itemPrivate->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
+ footer = new FxGridItem(item, q);
+ }
+ }
+ if (footer) {
+ if (visibleItems.count()) {
+ qreal endPos = endPosition();
+ if (lastVisibleIndex() == model->count()-1) {
+ footer->setPosition(0, endPos);
+ } else {
+ qreal visiblePos = position() + q->height();
+ if (endPos <= visiblePos || footer->endRowPos() < endPos)
+ footer->setPosition(0, endPos);
+ }
+ } else {
+ qreal endPos = 0;
+ if (header) {
+ endPos += flow == QDeclarativeGridView::LeftToRight
+ ? header->item->height()
+ : header->item->width();
+ }
+ footer->setPosition(0, endPos);
+ }
+ }
+}
+
+void QDeclarativeGridViewPrivate::updateHeader()
+{
+ Q_Q(QDeclarativeGridView);
+ if (!header && headerComponent) {
+ QDeclarativeItem *item = 0;
+ QDeclarativeContext *context = new QDeclarativeContext(qmlContext(q));
+ QObject *nobj = headerComponent->create(context);
+ if (nobj) {
+ QDeclarative_setParent_noEvent(context, nobj);
+ item = qobject_cast<QDeclarativeItem *>(nobj);
+ if (!item)
+ delete nobj;
+ } else {
+ delete context;
+ }
+ if (item) {
+ QDeclarative_setParent_noEvent(item, q->viewport());
+ item->setParentItem(q->viewport());
+ item->setZValue(1);
+ QDeclarativeItemPrivate *itemPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(item));
+ itemPrivate->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
+ header = new FxGridItem(item, q);
+ }
+ }
+ if (header) {
+ if (visibleItems.count()) {
+ qreal startPos = startPosition();
+ qreal headerSize = flow == QDeclarativeGridView::LeftToRight
+ ? header->item->height()
+ : header->item->width();
+ if (visibleIndex == 0) {
+ header->setPosition(0, startPos - headerSize);
+ } else {
+ if (position() <= startPos || header->rowPos() > startPos - headerSize)
+ header->setPosition(0, startPos - headerSize);
+ }
+ } else {
+ header->setPosition(0, 0);
+ }
+ }
+}
+
void QDeclarativeGridViewPrivate::fixupPosition()
{
moveReason = Other;
@@ -753,7 +891,6 @@ void QDeclarativeGridViewPrivate::fixupPosition()
void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal maxExtent)
{
- Q_Q(QDeclarativeGridView);
if ((flow == QDeclarativeGridView::TopToBottom && &data == &vData)
|| (flow == QDeclarativeGridView::LeftToRight && &data == &hData))
return;
@@ -761,7 +898,41 @@ void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m
int oldDuration = fixupDuration;
fixupDuration = moveReason == Mouse ? fixupDuration : 0;
- if (haveHighlightRange && highlightRange == QDeclarativeGridView::StrictlyEnforceRange) {
+ if (snapMode != QDeclarativeGridView::NoSnap) {
+ FxGridItem *topItem = snapItemAt(position()+highlightRangeStart);
+ FxGridItem *bottomItem = snapItemAt(position()+highlightRangeEnd);
+ qreal pos;
+ if (topItem && bottomItem && haveHighlightRange && highlightRange == QDeclarativeGridView::StrictlyEnforceRange) {
+ qreal topPos = qMin(topItem->rowPos() - highlightRangeStart, -maxExtent);
+ qreal bottomPos = qMax(bottomItem->rowPos() - highlightRangeEnd, -minExtent);
+ pos = qAbs(data.move + topPos) < qAbs(data.move + bottomPos) ? topPos : bottomPos;
+ } else if (topItem) {
+ pos = qMax(qMin(topItem->rowPos() - highlightRangeStart, -maxExtent), -minExtent);
+ } else if (bottomItem) {
+ pos = qMax(qMin(bottomItem->rowPos() - highlightRangeStart, -maxExtent), -minExtent);
+ } else {
+ fixupDuration = oldDuration;
+ return;
+ }
+ if (currentItem && haveHighlightRange && highlightRange == QDeclarativeGridView::StrictlyEnforceRange) {
+ updateHighlight();
+ qreal currPos = currentItem->rowPos();
+ if (pos < currPos + rowSize() - highlightRangeEnd)
+ pos = currPos + rowSize() - highlightRangeEnd;
+ if (pos > currPos - highlightRangeStart)
+ pos = currPos - highlightRangeStart;
+ }
+
+ qreal dist = qAbs(data.move + pos);
+ if (dist > 0) {
+ timeline.reset(data.move);
+ if (fixupDuration)
+ timeline.move(data.move, -pos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2);
+ else
+ timeline.set(data.move, -pos);
+ vTime = timeline.time();
+ }
+ } else if (haveHighlightRange && highlightRange == QDeclarativeGridView::StrictlyEnforceRange) {
if (currentItem) {
updateHighlight();
qreal pos = currentItem->rowPos();
@@ -773,26 +944,10 @@ void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m
timeline.reset(data.move);
if (viewPos != position()) {
- if (fixupDuration) {
+ if (fixupDuration)
timeline.move(data.move, -viewPos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2);
- } else {
- data.move.setValue(-viewPos);
- q->viewportMoved();
- }
- }
- vTime = timeline.time();
- }
- } else if (snapMode != QDeclarativeGridView::NoSnap) {
- qreal pos = -snapPosAt(-(data.move.value() - highlightRangeStart)) + highlightRangeStart;
- pos = qMin(qMax(pos, maxExtent), minExtent);
- qreal dist = qAbs(data.move.value() - pos);
- if (dist > 0) {
- timeline.reset(data.move);
- if (fixupDuration) {
- timeline.move(data.move, pos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2);
- } else {
- data.move.setValue(pos);
- q->viewportMoved();
+ else
+ timeline.set(data.move, -viewPos);
}
vTime = timeline.time();
}
@@ -806,7 +961,6 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
QDeclarativeTimeLineCallback::Callback fixupCallback, qreal velocity)
{
Q_Q(QDeclarativeGridView);
-
moveReason = Mouse;
if ((!haveHighlightRange || highlightRange != QDeclarativeGridView::StrictlyEnforceRange)
&& snapMode == QDeclarativeGridView::NoSnap) {
@@ -851,9 +1005,10 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
qreal accel = deceleration;
qreal v2 = v * v;
qreal overshootDist = 0.0;
- if (maxDistance > 0.0 && v2 / (2.0f * maxDistance) < accel) {
+ if ((maxDistance > 0.0 && v2 / (2.0f * maxDistance) < accel) || snapMode == QDeclarativeGridView::SnapOneRow) {
// + rowSize()/4 to encourage moving at least one item in the flick direction
qreal dist = v2 / (accel * 2.0) + rowSize()/4;
+ dist = qMin(dist, maxDistance);
if (v > 0)
dist = -dist;
data.flickTarget = -snapPosAt(-(data.move.value() - highlightRangeStart) + dist) + highlightRangeStart;
@@ -958,11 +1113,13 @@ QDeclarativeGridView::~QDeclarativeGridView()
d->clear();
if (d->ownModel)
delete d->model;
+ delete d->header;
+ delete d->footer;
}
/*!
\qmlattachedproperty bool GridView::isCurrentItem
- This attched property is true if this delegate is the current item; otherwise false.
+ This attached property is true if this delegate is the current item; otherwise false.
It is attached to each instance of the delegate.
*/
@@ -1524,6 +1681,67 @@ void QDeclarativeGridView::setSnapMode(SnapMode mode)
}
}
+/*!
+ \qmlproperty Component GridView::footer
+ This property holds the component to use as the footer.
+
+ An instance of the footer component is created for each view. The
+ footer is positioned at the end of the view, after any items.
+
+ \sa header
+*/
+QDeclarativeComponent *QDeclarativeGridView::footer() const
+{
+ Q_D(const QDeclarativeGridView);
+ return d->footerComponent;
+}
+
+void QDeclarativeGridView::setFooter(QDeclarativeComponent *footer)
+{
+ Q_D(QDeclarativeGridView);
+ if (d->footerComponent != footer) {
+ if (d->footer) {
+ delete d->footer;
+ d->footer = 0;
+ }
+ d->footerComponent = footer;
+ d->updateFooter();
+ d->updateGrid();
+ emit footerChanged();
+ }
+}
+
+/*!
+ \qmlproperty Component GridView::header
+ This property holds the component to use as the header.
+
+ An instance of the header component is created for each view. The
+ header is positioned at the beginning of the view, before any items.
+
+ \sa footer
+*/
+QDeclarativeComponent *QDeclarativeGridView::header() const
+{
+ Q_D(const QDeclarativeGridView);
+ return d->headerComponent;
+}
+
+void QDeclarativeGridView::setHeader(QDeclarativeComponent *header)
+{
+ Q_D(QDeclarativeGridView);
+ if (d->headerComponent != header) {
+ if (d->header) {
+ delete d->header;
+ d->header = 0;
+ }
+ d->headerComponent = header;
+ d->updateHeader();
+ d->updateFooter();
+ d->updateGrid();
+ emit headerChanged();
+ }
+}
+
bool QDeclarativeGridView::event(QEvent *event)
{
Q_D(QDeclarativeGridView);
@@ -1590,6 +1808,8 @@ qreal QDeclarativeGridView::minYExtent() const
if (d->flow == QDeclarativeGridView::TopToBottom)
return QDeclarativeFlickable::minYExtent();
qreal extent = -d->startPosition();
+ if (d->header && d->visibleItems.count())
+ extent += d->header->item->height();
if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) {
extent += d->highlightRangeStart;
extent = qMax(extent, -(d->rowPosAt(0) + d->rowSize() - d->highlightRangeEnd));
@@ -1603,13 +1823,17 @@ qreal QDeclarativeGridView::maxYExtent() const
if (d->flow == QDeclarativeGridView::TopToBottom)
return QDeclarativeFlickable::maxYExtent();
qreal extent;
- if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) {
+ if (!d->model || !d->model->count()) {
+ extent = 0;
+ } else if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) {
extent = -(d->rowPosAt(d->model->count()-1) - d->highlightRangeStart);
if (d->highlightRangeEnd != d->highlightRangeStart)
extent = qMin(extent, -(d->endPosition() - d->highlightRangeEnd + 1));
} else {
extent = -(d->endPosition() - height());
}
+ if (d->footer)
+ extent -= d->footer->item->height();
const qreal minY = minYExtent();
if (extent > minY)
extent = minY;
@@ -1622,6 +1846,8 @@ qreal QDeclarativeGridView::minXExtent() const
if (d->flow == QDeclarativeGridView::LeftToRight)
return QDeclarativeFlickable::minXExtent();
qreal extent = -d->startPosition();
+ if (d->header && d->visibleItems.count())
+ extent += d->header->item->width();
if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) {
extent += d->highlightRangeStart;
extent = qMax(extent, -(d->rowPosAt(0) + d->rowSize() - d->highlightRangeEnd));
@@ -1635,13 +1861,17 @@ qreal QDeclarativeGridView::maxXExtent() const
if (d->flow == QDeclarativeGridView::LeftToRight)
return QDeclarativeFlickable::maxXExtent();
qreal extent;
- if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) {
+ if (!d->model || !d->model->count()) {
+ extent = 0;
+ } if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) {
extent = -(d->rowPosAt(d->model->count()-1) - d->highlightRangeStart);
if (d->highlightRangeEnd != d->highlightRangeStart)
extent = qMin(extent, -(d->endPosition() - d->highlightRangeEnd + 1));
} else {
- extent = -(d->endPosition() - height());
+ extent = -(d->endPosition() - width());
}
+ if (d->footer)
+ extent -= d->footer->item->width();
const qreal minX = minXExtent();
if (extent > minX)
extent = minX;
diff --git a/src/declarative/graphicsitems/qdeclarativegridview_p.h b/src/declarative/graphicsitems/qdeclarativegridview_p.h
index 2bf154c..021aad9 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview_p.h
+++ b/src/declarative/graphicsitems/qdeclarativegridview_p.h
@@ -80,6 +80,9 @@ class Q_DECLARATIVE_EXPORT QDeclarativeGridView : public QDeclarativeFlickable
Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged)
+ Q_PROPERTY(QDeclarativeComponent *header READ header WRITE setHeader NOTIFY headerChanged)
+ Q_PROPERTY(QDeclarativeComponent *footer READ footer WRITE setFooter NOTIFY footerChanged)
+
Q_ENUMS(HighlightRangeMode)
Q_ENUMS(SnapMode)
Q_ENUMS(Flow)
@@ -142,6 +145,12 @@ public:
SnapMode snapMode() const;
void setSnapMode(SnapMode mode);
+ QDeclarativeComponent *footer() const;
+ void setFooter(QDeclarativeComponent *);
+
+ QDeclarativeComponent *header() const;
+ void setHeader(QDeclarativeComponent *);
+
enum PositionMode { Beginning, Center, End, Visible, Contain };
Q_INVOKABLE void positionViewAtIndex(int index, int mode);
@@ -172,6 +181,8 @@ Q_SIGNALS:
void keyNavigationWrapsChanged();
void cacheBufferChanged();
void snapModeChanged();
+ void headerChanged();
+ void footerChanged();
protected:
virtual bool event(QEvent *event);
diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp
index 94240c2..ec08517 100644
--- a/src/declarative/graphicsitems/qdeclarativeimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp
@@ -83,6 +83,8 @@ QT_BEGIN_NAMESPACE
that images which do not form part of the user interface have their
size bounded via the \l sourceSize property. This is especially important for content
that is loaded from external sources or provided by the user.
+
+ \sa {declarative/imageelements/image}{Image example}
*/
/*!
@@ -95,7 +97,7 @@ QT_BEGIN_NAMESPACE
Image { source: "pics/star.png" }
\endqml
- A QDeclarativeImage object can be instantiated in Qml using the tag \l Image.
+ A QDeclarativeImage object can be instantiated in QML using the tag \l Image.
*/
QDeclarativeImage::QDeclarativeImage(QDeclarativeItem *parent)
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 9949e65..42b370b 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -86,8 +86,8 @@ QT_BEGIN_NAMESPACE
The Transform elements let you create and control advanced transformations that can be configured
independently using specialized properties.
- You can assign any number of Transform elements to an Item. Each Transform is applied in order,
- one at a time, to the Item it's assigned to.
+ You can assign any number of Transform elements to an \l Item. Each Transform is applied in order,
+ one at a time.
*/
/*!
@@ -134,9 +134,9 @@ QT_BEGIN_NAMESPACE
/*!
\qmlclass Scale QGraphicsScale
\since 4.7
- \brief The Scale object provides a way to scale an Item.
+ \brief The Scale element provides a way to scale an Item.
- The Scale object gives more control over scaling than using Item's scale property. Specifically,
+ The Scale element gives more control over scaling than using \l Item's \l{Item::scale}{scale} property. Specifically,
it allows a different scale for the x and y axes, and allows the scale to be relative to an
arbitrary point.
@@ -148,6 +148,8 @@ QT_BEGIN_NAMESPACE
transform: Scale { origin.x: 25; origin.y: 25; xScale: 3}
}
\endqml
+
+ \sa Rotate, Translate
*/
/*!
@@ -175,7 +177,7 @@ QT_BEGIN_NAMESPACE
\since 4.7
\brief The Rotation object provides a way to rotate an Item.
- The Rotation object gives more control over rotation than using Item's rotation property.
+ The Rotation object gives more control over rotation than using \l Item's \l{Item::rotation}{rotation} property.
Specifically, it allows (z axis) rotation to be relative to an arbitrary point.
The following example rotates a Rectangle around its interior point 25, 25:
@@ -229,9 +231,10 @@ QT_BEGIN_NAMESPACE
\brief The QDeclarativeContents class gives access to the height and width of an item's contents.
*/
-
-QDeclarativeContents::QDeclarativeContents() : m_x(0), m_y(0), m_width(0), m_height(0)
+QDeclarativeContents::QDeclarativeContents(QDeclarativeItem *item) : m_item(item), m_x(0), m_y(0), m_width(0), m_height(0)
{
+ //### optimize
+ connect(this, SIGNAL(rectChanged(QRectF)), m_item, SIGNAL(childrenRectChanged(QRectF)));
}
QDeclarativeContents::~QDeclarativeContents()
@@ -326,12 +329,8 @@ void QDeclarativeContents::calcWidth(QDeclarativeItem *changed)
emit rectChanged(rectF());
}
-void QDeclarativeContents::setItem(QDeclarativeItem *item)
+void QDeclarativeContents::complete()
{
- m_item = item;
- //### optimize
- connect(this, SIGNAL(rectChanged(QRectF)), m_item, SIGNAL(childrenRectChanged(QRectF)));
-
QList<QGraphicsItem *> children = m_item->childItems();
for (int i = 0; i < children.count(); ++i) {
QDeclarativeItem *child = qobject_cast<QDeclarativeItem *>(children.at(i));
@@ -341,9 +340,7 @@ void QDeclarativeContents::setItem(QDeclarativeItem *item)
//###what about changes to visibility?
}
- //### defer until componentComplete
- calcHeight();
- calcWidth();
+ calcGeometry();
}
void QDeclarativeContents::itemGeometryChanged(QDeclarativeItem *changed, const QRectF &newGeometry, const QRectF &oldGeometry)
@@ -358,16 +355,14 @@ void QDeclarativeContents::itemDestroyed(QDeclarativeItem *item)
{
if (item)
QDeclarativeItemPrivate::get(item)->removeItemChangeListener(this, QDeclarativeItemPrivate::Geometry | QDeclarativeItemPrivate::Destroyed);
- calcWidth();
- calcHeight();
+ calcGeometry();
}
void QDeclarativeContents::childRemoved(QDeclarativeItem *item)
{
if (item)
QDeclarativeItemPrivate::get(item)->removeItemChangeListener(this, QDeclarativeItemPrivate::Geometry | QDeclarativeItemPrivate::Destroyed);
- calcWidth();
- calcHeight();
+ calcGeometry();
}
void QDeclarativeContents::childAdded(QDeclarativeItem *item)
@@ -726,7 +721,7 @@ void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event, bool post)
The signal properties have a \l KeyEvent parameter, named
\e event which contains details of the event. If a key is
handled \e event.accepted should be set to true to prevent the
- event from propagating up the item heirarchy.
+ event from propagating up the item hierarchy.
\code
Item {
@@ -1633,7 +1628,7 @@ void QDeclarativeItemPrivate::data_append(QDeclarativeListProperty<QObject> *pro
QObject *QDeclarativeItemPrivate::resources_at(QDeclarativeListProperty<QObject> *prop, int index)
{
- QObjectList children = prop->object->children();
+ const QObjectList children = prop->object->children();
if (index < children.count())
return children.at(index);
else
@@ -1750,8 +1745,9 @@ QRectF QDeclarativeItem::childrenRect()
{
Q_D(QDeclarativeItem);
if (!d->_contents) {
- d->_contents = new QDeclarativeContents;
- d->_contents->setItem(this);
+ d->_contents = new QDeclarativeContents(this);
+ if (d->_componentComplete)
+ d->_contents->complete();
}
return d->_contents->rectF();
}
@@ -2391,6 +2387,28 @@ void QDeclarativeItem::forceFocus()
}
}
+
+/*!
+ \qmlmethod Item::childAt(real x, real y)
+
+ Returns the visible child item at point (\a x, \a y), which is in this
+ item's coordinate system, or \c null if there is no such item.
+ */
+QDeclarativeItem *QDeclarativeItem::childAt(qreal x, qreal y) const
+{
+ const QList<QGraphicsItem *> children = childItems();
+ for (int i = children.count()-1; i >= 0; --i) {
+ if (QDeclarativeItem *child = qobject_cast<QDeclarativeItem *>(children.at(i))) {
+ if (child->isVisible() && child->x() <= x
+ && child->x() + child->width() >= x
+ && child->y() <= y
+ && child->y() + child->height() >= y)
+ return child;
+ }
+ }
+ return 0;
+}
+
void QDeclarativeItemPrivate::focusChanged(bool flag)
{
Q_Q(QDeclarativeItem);
@@ -2595,6 +2613,8 @@ void QDeclarativeItem::componentComplete()
}
if (d->keyHandler)
d->keyHandler->componentComplete();
+ if (d->_contents)
+ d->_contents->complete();
}
QDeclarativeStateGroup *QDeclarativeItemPrivate::_states()
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.h b/src/declarative/graphicsitems/qdeclarativeitem.h
index 77e316b..4f420f8 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.h
+++ b/src/declarative/graphicsitems/qdeclarativeitem.h
@@ -148,6 +148,7 @@ public:
Q_INVOKABLE QScriptValue mapFromItem(const QScriptValue &item, qreal x, qreal y) const;
Q_INVOKABLE QScriptValue mapToItem(const QScriptValue &item, qreal x, qreal y) const;
Q_INVOKABLE void forceFocus();
+ Q_INVOKABLE QDeclarativeItem *childAt(qreal x, qreal y) const;
Q_SIGNALS:
void childrenChanged();
diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h
index 184d6f1..fb416c2 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h
@@ -83,16 +83,17 @@ class QDeclarativeContents : public QObject, public QDeclarativeItemChangeListen
{
Q_OBJECT
public:
- QDeclarativeContents();
+ QDeclarativeContents(QDeclarativeItem *item);
~QDeclarativeContents();
QRectF rectF() const;
- void setItem(QDeclarativeItem *item);
-
void childRemoved(QDeclarativeItem *item);
void childAdded(QDeclarativeItem *item);
+ void calcGeometry() { calcWidth(); calcHeight(); }
+ void complete();
+
Q_SIGNALS:
void rectChanged(QRectF);
diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
index 0be8dac..b198077 100644
--- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
@@ -79,8 +79,24 @@
#endif
#include "private/qdeclarativeanchors_p.h"
+static QDeclarativePrivate::AutoParentResult qgraphicsobject_autoParent(QObject *obj, QObject *parent)
+{
+ QGraphicsObject* gobj = qobject_cast<QGraphicsObject*>(obj);
+ if (!gobj)
+ return QDeclarativePrivate::IncompatibleObject;
+
+ QGraphicsObject* gparent = qobject_cast<QGraphicsObject*>(parent);
+ if (!gparent)
+ return QDeclarativePrivate::IncompatibleParent;
+
+ gobj->setParentItem(gparent);
+ return QDeclarativePrivate::Parented;
+}
+
void QDeclarativeItemModule::defineModule()
{
+ QDeclarativePrivate::registerAutoParentFunction(qgraphicsobject_autoParent);
+
#ifdef QT_NO_MOVIE
qmlRegisterTypeNotAvailable("Qt",4,7,"AnimatedImage",
qApp->translate("QDeclarativeAnimatedImage","Qt was built without support for QMovie"));
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index dbd1976..48ac4a4 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -427,6 +427,10 @@ public:
scheduleLayout();
}
}
+ if ((header && header->item == item) || (footer && footer->item == item)) {
+ updateHeader();
+ updateFooter();
+ }
if (currentItem && currentItem->item == item)
updateHighlight();
if (trackedItem && trackedItem->item == item)
@@ -733,7 +737,7 @@ void QDeclarativeListViewPrivate::layout()
{
Q_Q(QDeclarativeListView);
layoutScheduled = false;
- if (!isValid()) {
+ if (!isValid() && !visibleItems.count()) {
clear();
setPosition(0);
return;
@@ -1045,6 +1049,8 @@ void QDeclarativeListViewPrivate::updateFooter()
QDeclarative_setParent_noEvent(item, q->viewport());
item->setParentItem(q->viewport());
item->setZValue(1);
+ QDeclarativeItemPrivate *itemPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(item));
+ itemPrivate->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
footer = new FxListItem(item, q);
}
}
@@ -1083,6 +1089,8 @@ void QDeclarativeListViewPrivate::updateHeader()
QDeclarative_setParent_noEvent(item, q->viewport());
item->setParentItem(q->viewport());
item->setZValue(1);
+ QDeclarativeItemPrivate *itemPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(item));
+ itemPrivate->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
header = new FxListItem(item, q);
if (visibleItems.isEmpty())
visiblePos = header->size();
@@ -1116,7 +1124,6 @@ void QDeclarativeListViewPrivate::fixupPosition()
void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal maxExtent)
{
- Q_Q(QDeclarativeListView);
if ((orient == QDeclarativeListView::Horizontal && &data == &vData)
|| (orient == QDeclarativeListView::Vertical && &data == &hData))
return;
@@ -1124,7 +1131,41 @@ void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m
int oldDuration = fixupDuration;
fixupDuration = moveReason == Mouse ? fixupDuration : 0;
- if (haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange) {
+ if (snapMode != QDeclarativeListView::NoSnap) {
+ FxListItem *topItem = snapItemAt(position()+highlightRangeStart);
+ FxListItem *bottomItem = snapItemAt(position()+highlightRangeEnd);
+ qreal pos;
+ if (topItem && bottomItem && haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange) {
+ qreal topPos = qMin(topItem->position() - highlightRangeStart, -maxExtent);
+ qreal bottomPos = qMax(bottomItem->position() - highlightRangeEnd, -minExtent);
+ pos = qAbs(data.move + topPos) < qAbs(data.move + bottomPos) ? topPos : bottomPos;
+ } else if (topItem) {
+ pos = qMax(qMin(topItem->position() - highlightRangeStart, -maxExtent), -minExtent);
+ } else if (bottomItem) {
+ pos = qMax(qMin(bottomItem->position() - highlightRangeStart, -maxExtent), -minExtent);
+ } else {
+ fixupDuration = oldDuration;
+ return;
+ }
+ if (currentItem && haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange) {
+ updateHighlight();
+ qreal currPos = currentItem->position();
+ if (pos < currPos + currentItem->size() - highlightRangeEnd)
+ pos = currPos + currentItem->size() - highlightRangeEnd;
+ if (pos > currPos - highlightRangeStart)
+ pos = currPos - highlightRangeStart;
+ }
+
+ qreal dist = qAbs(data.move + pos);
+ if (dist > 0) {
+ timeline.reset(data.move);
+ if (fixupDuration)
+ timeline.move(data.move, -pos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2);
+ else
+ timeline.set(data.move, -pos);
+ vTime = timeline.time();
+ }
+ } else if (haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange) {
if (currentItem) {
updateHighlight();
qreal pos = currentItem->position();
@@ -1136,30 +1177,13 @@ void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m
timeline.reset(data.move);
if (viewPos != position()) {
- if (fixupDuration) {
+ if (fixupDuration)
timeline.move(data.move, -viewPos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2);
- } else {
- data.move.setValue(-viewPos);
- q->viewportMoved();
- }
+ else
+ timeline.set(data.move, -viewPos);
}
vTime = timeline.time();
}
- } else if (snapMode != QDeclarativeListView::NoSnap) {
- if (FxListItem *item = snapItemAt(position())) {
- qreal pos = qMin(item->position() - highlightRangeStart, -maxExtent);
- qreal dist = qAbs(data.move + pos);
- if (dist > 0) {
- timeline.reset(data.move);
- if (fixupDuration) {
- timeline.move(data.move, -pos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2);
- } else {
- data.move.setValue(-pos);
- q->viewportMoved();
- }
- vTime = timeline.time();
- }
- }
} else {
QDeclarativeFlickablePrivate::fixup(data, minExtent, maxExtent);
}
@@ -1354,6 +1378,8 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
is not clipped by another item or the screen, it will be necessary
to set \e {clip: true} in order to have the out of view items clipped
nicely.
+
+ \sa ListModel, GridView
*/
QDeclarativeListView::QDeclarativeListView(QDeclarativeItem *parent)
@@ -1910,6 +1936,8 @@ void QDeclarativeListView::setCacheBuffer(int b)
/*!
\qmlproperty string ListView::section.property
\qmlproperty enumeration ListView::section.criteria
+ \qmlproperty Component ListView::section.delegate
+
These properties hold the expression to be evaluated for the \l section attached property.
\c section.property hold the name of the property to use to determine
@@ -1923,6 +1951,8 @@ void QDeclarativeListView::setCacheBuffer(int b)
\o ViewSection.FirstCharacter - section is the first character of the property value.
\endlist
+ \c section.delegate holds the delegate component for each section.
+
Each item in the list has attached properties named \c ListView.section and
\c ListView.prevSection. These may be used to place a section header for
related items. The example below assumes that the model is sorted by size of
@@ -1959,7 +1989,7 @@ QString QDeclarativeListView::currentSection() const
These properties hold the move and resize animation speed of the highlight delegate.
- \c highlightFollowsCurrentItem must be true for these properties
+ \l highlightFollowsCurrentItem must be true for these properties
to have effect.
The default value for the speed properties is 400 pixels/second.
@@ -2074,6 +2104,15 @@ void QDeclarativeListView::setSnapMode(SnapMode mode)
}
}
+/*!
+ \qmlproperty Component ListView::footer
+ This property holds the component to use as the footer.
+
+ An instance of the footer component is created for each view. The
+ footer is positioned at the end of the view, after any items.
+
+ \sa header
+*/
QDeclarativeComponent *QDeclarativeListView::footer() const
{
Q_D(const QDeclarativeListView);
@@ -2097,6 +2136,15 @@ void QDeclarativeListView::setFooter(QDeclarativeComponent *footer)
}
}
+/*!
+ \qmlproperty Component ListView::header
+ This property holds the component to use as the header.
+
+ An instance of the header component is created for each view. The
+ header is positioned at the beginning of the view, before any items.
+
+ \sa footer
+*/
QDeclarativeComponent *QDeclarativeListView::header() const
{
Q_D(const QDeclarativeListView);
@@ -2222,7 +2270,9 @@ qreal QDeclarativeListView::maxYExtent() const
if (d->orient == QDeclarativeListView::Horizontal)
return height();
if (d->maxExtentDirty) {
- if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) {
+ if (!d->model || !d->model->count()) {
+ d->maxExtent = 0;
+ } else if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) {
d->maxExtent = -(d->positionAt(d->model->count()-1) - d->highlightRangeStart);
if (d->highlightRangeEnd != d->highlightRangeStart)
d->maxExtent = qMin(d->maxExtent, -(d->endPosition() - d->highlightRangeEnd + 1));
@@ -2264,7 +2314,9 @@ qreal QDeclarativeListView::maxXExtent() const
if (d->orient == QDeclarativeListView::Vertical)
return width();
if (d->maxExtentDirty) {
- if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) {
+ if (!d->model || !d->model->count()) {
+ d->maxExtent = 0;
+ } else if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) {
d->maxExtent = -(d->positionAt(d->model->count()-1) - d->highlightRangeStart);
if (d->highlightRangeEnd != d->highlightRangeStart)
d->maxExtent = qMin(d->maxExtent, -(d->endPosition() - d->highlightRangeEnd + 1));
diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp
index 898c5a5..25b1119 100644
--- a/src/declarative/graphicsitems/qdeclarativeloader.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp
@@ -112,27 +112,35 @@ void QDeclarativeLoaderPrivate::initResize()
\inherits Item
\brief The Loader item allows dynamically loading an Item-based
- subtree from a QML URL or Component.
+ subtree from a URL or Component.
- Loader instantiates an item from a component. The component to
- instantiate may be specified directly by the \l sourceComponent
+ The Loader element instantiates an item from a component. The component to
+ be instantiated may be specified directly by the \l sourceComponent
property, or loaded from a URL via the \l source property.
- It is also an effective means of delaying the creation of a component
- until it is required:
+ Loader can be used to delay the creation of a component until it is required.
+ For example, this loads "Page1.qml" as a component into the \l Loader element
+ when the \l MouseArea is clicked:
+
\code
import Qt 4.7
- Loader { id: pageLoader }
+ Item {
+ width: 200; height: 200
- Rectangle {
MouseArea {
anchors.fill: parent
onClicked: pageLoader.source = "Page1.qml"
}
+
+ Loader { id: pageLoader }
}
\endcode
+ Note that Loader is like any other graphical Item and needs to be positioned
+ and sized accordingly to become visible. When a component is loaded, the
+ Loader is automatically resized to the size of the component.
+
If the Loader source is changed, any previous items instantiated
will be destroyed. Setting \l source to an empty string, or setting
sourceComponent to \e undefined
@@ -225,7 +233,7 @@ void QDeclarativeLoader::setSource(const QUrl &url)
/*!
\qmlproperty Component Loader::sourceComponent
- The sourceComponent property holds the \l{Component} to instantiate.
+ This property holds the \l{Component} to instantiate.
\qml
Item {
@@ -239,6 +247,8 @@ void QDeclarativeLoader::setSource(const QUrl &url)
}
\endqml
+ Note this value must hold a \l Component object; it cannot be a \l Item.
+
\sa source, progress
*/
@@ -401,7 +411,7 @@ void QDeclarativeLoader::componentComplete()
/*!
\qmlsignal Loader::onLoaded()
- This handler is called when the \l status becomes Loader.Ready, or on successful
+ This handler is called when the \l status becomes \c Loader.Ready, or on successful
initial load.
*/
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index 6fca283..c4956df 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -305,12 +305,12 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate()
/*!
\internal
\class QDeclarativeMouseArea
- \brief The QDeclarativeMouseArea class provides a simple mouse handling abstraction for use within Qml.
+ \brief The QDeclarativeMouseArea class provides a simple mouse handling abstraction for use within QML.
All QDeclarativeItem derived classes can do mouse handling but the QDeclarativeMouseArea class exposes mouse
handling data as properties and tracks flicking and dragging of the mouse.
- A QDeclarativeMouseArea object can be instantiated in Qml using the tag \l MouseArea.
+ A QDeclarativeMouseArea object can be instantiated in QML using the tag \l MouseArea.
*/
QDeclarativeMouseArea::QDeclarativeMouseArea(QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativeMouseAreaPrivate), parent)
@@ -410,7 +410,7 @@ void QDeclarativeMouseArea::mousePressEvent(QGraphicsSceneMouseEvent *event)
setHovered(true);
d->startScene = event->scenePos();
// we should only start timer if pressAndHold is connected to.
- if (d->isConnected("pressAndHold(QDeclarativeMouseEvent*)"))
+ if (d->isPressAndHoldConnected())
d->pressAndHoldTimer.start(PressAndHoldDelay, this);
setKeepMouseGrab(false);
event->setAccepted(setPressed(true));
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h b/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h
index 4e909ff..3d7bd1e 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h
@@ -88,9 +88,9 @@ public:
lastModifiers = event->modifiers();
}
- bool isConnected(const char *signal) {
+ bool isPressAndHoldConnected() {
Q_Q(QDeclarativeMouseArea);
- int idx = QObjectPrivate::get(q)->signalIndex(signal);
+ static int idx = QObjectPrivate::get(q)->signalIndex("pressAndHold(QDeclarativeMouseEvent*)");
return QObjectPrivate::get(q)->isSignalConnected(idx);
}
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index f58b054..0c2d249 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -358,6 +358,13 @@ QDeclarativePathView::~QDeclarativePathView()
}
/*!
+ \qmlattachedproperty PathView PathView::view
+ This attached property holds the view that manages this delegate instance.
+
+ It is attached to each instance of the delegate.
+*/
+
+/*!
\qmlattachedproperty bool PathView::onPath
This attached property holds whether the item is currently on the path.
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
index 20cc46b..b9231a1 100644
--- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
@@ -219,6 +219,7 @@ void QDeclarativeBasePositioner::prePositioning()
QDeclarativeItem *child = qobject_cast<QDeclarativeItem *>(children.at(ii));
if (!child)
continue;
+ QDeclarativeItemPrivate *childPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(child));
PositionedItem *item = 0;
PositionedItem posItem(child);
int wIdx = oldItems.find(posItem);
@@ -227,11 +228,13 @@ void QDeclarativeBasePositioner::prePositioning()
positionedItems.append(posItem);
item = &positionedItems[positionedItems.count()-1];
item->isNew = true;
- if (child->opacity() <= 0.0 || !child->isVisible())
+ if (child->opacity() <= 0.0 || childPrivate->explicitlyHidden)
item->isVisible = false;
} else {
item = &oldItems[wIdx];
- if (child->opacity() <= 0.0 || !child->isVisible()) {
+ // Items are only omitted from positioning if they are explicitly hidden
+ // i.e. their positioning is not affected if an ancestor is hidden.
+ if (child->opacity() <= 0.0 || childPrivate->explicitlyHidden) {
item->isVisible = false;
} else if (!item->isVisible) {
item->isVisible = true;
@@ -299,6 +302,12 @@ void QDeclarativeBasePositioner::finishApplyTransitions()
d->moveActions.clear();
}
+static inline bool isInvisible(QDeclarativeItem *child)
+{
+ QDeclarativeItemPrivate *childPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(child));
+ return child->opacity() == 0.0 || childPrivate->explicitlyHidden || !child->width() || !child->height();
+}
+
/*!
\qmlclass Column QDeclarativeColumn
\since 4.7
@@ -349,6 +358,9 @@ Column {
positioner may exhibit strange behaviour. If you need to perform any of these
actions, consider positioning the items without the use of a Column.
+ Items with a width or height of 0 will not be positioned.
+
+ \sa Row, {declarative/positioners}{Positioners example}
*/
/*!
\qmlproperty Transition Column::add
@@ -416,11 +428,6 @@ QDeclarativeColumn::QDeclarativeColumn(QDeclarativeItem *parent)
{
}
-static inline bool isInvisible(QDeclarativeItem *child)
-{
- return child->opacity() == 0.0 || !child->isVisible() || !child->width() || !child->height();
-}
-
void QDeclarativeColumn::doPositioning(QSizeF *contentSize)
{
int voffset = 0;
@@ -496,6 +503,10 @@ Row {
width of a child depend on the position of a child, then the
positioner may exhibit strange behaviour. If you need to perform any of these
actions, consider positioning the items without the use of a Row.
+
+ Items with a width or height of 0 will not be positioned.
+
+ \sa Column, {declarative/positioners}{Positioners example}
*/
/*!
\qmlproperty Transition Row::add
@@ -649,6 +660,10 @@ Grid {
width or height of a child depend on the position of a child, then the
positioner may exhibit strange behaviour. If you need to perform any of these
actions, consider positioning the items without the use of a Grid.
+
+ Items with a width or height of 0 will not be positioned.
+
+ \sa Flow, {declarative/positioners}{Positioners example}
*/
/*!
\qmlproperty Transition Grid::add
@@ -904,6 +919,9 @@ void QDeclarativeGrid::reportConflictingAnchors()
positioner may exhibit strange behaviour. If you need to perform any of these
actions, consider positioning the items without the use of a Flow.
+ Items with a width or height of 0 will not be positioned.
+
+ \sa Grid, {declarative/positioners}{Positioners example}
*/
/*!
\qmlproperty Transition Flow::add
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners_p_p.h b/src/declarative/graphicsitems/qdeclarativepositioners_p_p.h
index 04f0181..822079b 100644
--- a/src/declarative/graphicsitems/qdeclarativepositioners_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepositioners_p_p.h
@@ -100,18 +100,23 @@ public:
bool doingPositioning : 1;
bool anchorConflict : 1;
- virtual void itemSiblingOrderChanged(QDeclarativeItem* other)
+ void schedulePositioning()
{
Q_Q(QDeclarativeBasePositioner);
- Q_UNUSED(other);
if(!queuedPositioning){
- //Delay is due to many children often being reordered at once
- //And we only want to reposition them all once
QTimer::singleShot(0,q,SLOT(prePositioning()));
queuedPositioning = true;
}
}
+ virtual void itemSiblingOrderChanged(QDeclarativeItem* other)
+ {
+ Q_UNUSED(other);
+ //Delay is due to many children often being reordered at once
+ //And we only want to reposition them all once
+ schedulePositioning();
+ }
+
void itemGeometryChanged(QDeclarativeItem *, const QRectF &newGeometry, const QRectF &oldGeometry)
{
Q_Q(QDeclarativeBasePositioner);
@@ -120,8 +125,7 @@ public:
}
virtual void itemVisibilityChanged(QDeclarativeItem *)
{
- Q_Q(QDeclarativeBasePositioner);
- q->prePositioning();
+ schedulePositioning();
}
virtual void itemOpacityChanged(QDeclarativeItem *)
{
diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
index 691cfa2..995e22a 100644
--- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
@@ -65,55 +65,75 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate()
\since 4.7
\inherits Item
- \brief The Repeater item allows you to repeat an Item-based component using a model.
+ \brief The Repeater element allows you to repeat an Item-based component using a model.
- The Repeater item is used to create a large number of
- similar items. For each entry in the model, an item is instantiated
- in a context seeded with data from the model. If the repeater will
- be instantiating a large number of instances, it may be more efficient to
- use one of Qt Declarative's \l {xmlViews}{view items}.
+ The Repeater element is used to create a large number of
+ similar items. Like other view elements, a Repeater has a \l model and a \l delegate:
+ for each entry in the model, the delegate is instantiated
+ in a context seeded with data from the model. A Repeater item is usually
+ enclosed in a positioner element such as \l Row or \l Column to visually
+ position the multiple delegate items created by the Repeater.
- The model may be either an object list, a string list, a number or a Qt model.
- In each case, the data element and the index is exposed to each instantiated
- component.
-
- The index is always exposed as an accessible \c index property.
- In the case of an object or string list, the data element (of type string
- or object) is available as the \c modelData property. In the case of a Qt model,
- all roles are available as named properties just like in the view classes.
+ The following Repeater creates three instances of a \l Rectangle item within
+ a \l Row:
+
+ \snippet doc/src/snippets/declarative/repeater.qml import
+ \codeline
+ \snippet doc/src/snippets/declarative/repeater.qml simple
+
+ \image repeater-simple.png
+
+ The \l model of a Repeater can be specified as a model object, a number, a string list
+ or an object list. If a model object is used, the
+ \l delegate can access the model roles as named properties, just as for view elements like
+ ListView and GridView.
- The following example shows how to use the \c index property inside the instantiated
- items:
+ The \l delegate can also access two additional properties:
- \snippet doc/src/snippets/declarative/repeater-index.qml 0
- \image repeater-index.png
+ \list
+ \o \c index - the index of the delegate's item
+ \o \c modelData - the data element for the delegate, which is useful where the \l model is a string or object list
+ \endlist
- The repeater could also use the \c modelData property to reference the data for a
+ Here is a Repeater that uses the \c index property inside the instantiated items:
+
+ \table
+ \row
+ \o \snippet doc/src/snippets/declarative/repeater.qml index
+ \o \image repeater-index.png
+ \endtable
+
+ Here is another Repeater that uses the \c modelData property to reference the data for a
particular index:
- \snippet doc/src/snippets/declarative/repeater-modeldata.qml 0
- \image repeater-modeldata.png
+ \table
+ \row
+ \o \snippet doc/src/snippets/declarative/repeater.qml modeldata
+ \o \image repeater-modeldata.png
+ \endtable
Items instantiated by the Repeater are inserted, in order, as
children of the Repeater's parent. The insertion starts immediately after
- the repeater's position in its parent stacking list. This is to allow
- you to use a Repeater inside a layout. The following QML example shows how
- the instantiated items would visually appear stacked between the red and
- blue rectangles.
-
- \snippet doc/src/snippets/declarative/repeater.qml 0
+ the repeater's position in its parent stacking list. This allows
+ a Repeater to be used inside a layout. For example, the following Repeater's
+ items are stacked between a red rectangle and a blue rectangle:
+
+ \snippet doc/src/snippets/declarative/repeater.qml layout
\image repeater.png
- The repeater instance continues to own all items it instantiates, even
- if they are otherwise manipulated. It is illegal to manually remove an item
- created by the Repeater.
+ A Repeater item owns all items it instantiates. Removing or dynamically destroying
+ an item created by a Repeater results in unpredictable behavior.
- \note Repeater is Item-based, and cannot be used to repeat non-Item-derived objects.
+ Note that if a repeater is
+ required to instantiate a large number of items, it may be more efficient to
+ use other view elements such as ListView.
+
+ \note Repeater is \l {Item}-based, and can only repeat \l {Item}-derived objects.
For example, it cannot be used to repeat QtObjects.
\badcode
Item {
- //XXX illegal. Can't repeat QtObject as it doesn't derive from Item.
+ //XXX does not work! Can't repeat QtObject as it doesn't derive from Item.
Repeater {
model: 10
QtObject {}
@@ -149,7 +169,15 @@ QDeclarativeRepeater::~QDeclarativeRepeater()
The model providing data for the repeater.
- The model may be either an object list, a string list, a number or a Qt model.
+ This property can be set to any of the following:
+
+ \list
+ \o A number that indicates the number of delegates to be created
+ \o A model (e.g. a ListModel item, or a QAbstractItemModel subclass)
+ \o A string list
+ \o An object list
+ \endlist
+
In each case, the data element and the index is exposed to each instantiated
component. The index is always exposed as an accessible \c index property.
In the case of an object or string list, the data element (of type string
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
index f4722c3..c2e0d67 100644
--- a/src/declarative/graphicsitems/qdeclarativetext.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
@@ -119,8 +119,6 @@ QSet<QUrl> QTextDocumentWithImageResources::errors;
A Text item can display both plain and rich text. For example:
\qml
- import Qt 4.7
-
Text { text: "Hello World!"; font.family: "Helvetica"; font.pointSize: 24; color: "red" }
Text { text: "<b>Hello</b> <i>World!</i>" }
\endqml
@@ -128,10 +126,10 @@ QSet<QUrl> QTextDocumentWithImageResources::errors;
\image declarative-text.png
If height and width are not explicitly set, Text will attempt to determine how
- much room is needed and set it accordingly. Unless \c wrapMode is set, it will always
+ much room is needed and set it accordingly. Unless \l wrapMode is set, it will always
prefer width to height (all text will be placed on a single line).
- The \c elide property can alternatively be used to fit a single line of
+ The \l elide property can alternatively be used to fit a single line of
plain text to a set width.
Note that the \l{Supported HTML Subset} is limited. Also, if the text contains
@@ -163,7 +161,7 @@ QSet<QUrl> QTextDocumentWithImageResources::errors;
The \c elide property can alternatively be used to fit a line of plain text to a set width.
- A QDeclarativeText object can be instantiated in Qml using the tag \c Text.
+ A QDeclarativeText object can be instantiated in QML using the tag \c Text.
*/
QDeclarativeText::QDeclarativeText(QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativeTextPrivate), parent)
@@ -507,13 +505,11 @@ void QDeclarativeText::setVAlign(VAlignment align)
wrap if an explicit width has been set. wrapMode can be one of:
\list
- \o Text.NoWrap - no wrapping will be performed. If the text contains insufficient newlines, then implicitWidth will exceed a set width.
- \o Text.WordWrap - wrapping is done on word boundaries only. If a word is too long, implicitWidth will exceed a set width.
+ \o Text.NoWrap (default) - no wrapping will be performed. If the text contains insufficient newlines, then \l paintedWidth will exceed a set width.
+ \o Text.WordWrap - wrapping is done on word boundaries only. If a word is too long, \l paintedWidth will exceed a set width.
\o Text.WrapAnywhere - wrapping is done at any point on a line, even if it occurs in the middle of a word.
\o Text.Wrap - if possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word.
\endlist
-
- The default is Text.NoWrap.
*/
QDeclarativeText::WrapMode QDeclarativeText::wrapMode() const
{
@@ -543,13 +539,13 @@ void QDeclarativeText::setWrapMode(WrapMode mode)
Supported text formats are:
\list
- \o Text.AutoText
+ \o Text.AutoText (default)
\o Text.PlainText
\o Text.RichText
\o Text.StyledText
\endlist
- The default is Text.AutoText. If the text format is Text.AutoText the text element
+ If the text format is \c Text.AutoText the text element
will automatically determine whether the text should be treated as
rich text. This determination is made using Qt::mightBeRichText().
@@ -1171,7 +1167,7 @@ void QDeclarativeText::mousePressEvent(QGraphicsSceneMouseEvent *event)
}
/*!
- \qmlsignal Text::linkActivated(link)
+ \qmlsignal Text::onLinkActivated(link)
This handler is called when the user clicks on a link embedded in the text.
*/
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index 94973f2..3106daf 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -62,25 +62,28 @@ QT_BEGIN_NAMESPACE
/*!
\qmlclass TextEdit QDeclarativeTextEdit
\since 4.7
- \brief The TextEdit item allows you to add editable formatted text to a scene.
+ \brief The TextEdit item displays multiple lines of editable formatted text.
\inherits Item
+ The TextEdit item displays a block of editable, formatted text.
+
It can display both plain and rich text. For example:
\qml
TextEdit {
- id: edit
+ width: 240
text: "<b>Hello</b> <i>World!</i>"
- focus: true
font.family: "Helvetica"
font.pointSize: 20
color: "blue"
- width: 240
+ focus: true
}
\endqml
\image declarative-textedit.gif
+ Setting \l {Item::focus}{focus} to \c true enables the TextEdit item to receive keyboard focus.
+
Note that the TextEdit does not implement scrolling, following the cursor, or other behaviors specific
to a look-and-feel. For example, to add flickable scrolling that follows the cursor:
@@ -96,7 +99,7 @@ TextEdit {
You can translate between cursor positions (characters from the start of the document) and pixel
points using positionAt() and positionToRectangle().
- \sa Text
+ \sa Text, TextInput
*/
/*!
@@ -110,7 +113,7 @@ TextEdit {
\image declarative-textedit.png
- A QDeclarativeTextEdit object can be instantiated in Qml using the tag \c &lt;TextEdit&gt;.
+ A QDeclarativeTextEdit object can be instantiated in QML using the tag \c &lt;TextEdit&gt;.
*/
/*!
@@ -206,7 +209,7 @@ QString QDeclarativeTextEdit::text() const
Sets the font size in pixels.
Using this function makes the font device dependent.
- Use \c pointSize to set the size of the font in a device independent manner.
+ Use \l pointSize to set the size of the font in a device independent manner.
*/
/*!
@@ -453,12 +456,22 @@ void QDeclarativeTextEdit::setSelectedTextColor(const QColor &color)
\qmlproperty enumeration TextEdit::horizontalAlignment
\qmlproperty enumeration TextEdit::verticalAlignment
- Sets the horizontal and vertical alignment of the text within the TextEdit items
+ Sets the horizontal and vertical alignment of the text within the TextEdit item's
width and height. By default, the text is top-left aligned.
- The valid values for \c horizontalAlignment are \c TextEdit.AlignLeft, \c TextEdit.AlignRight and
- \c TextEdit.AlignHCenter. The valid values for \c verticalAlignment are \c TextEdit.AlignTop, \c TextEdit.AlignBottom
- and \c TextEdit.AlignVCenter.
+ Valid values for \c horizontalAlignment are:
+ \list
+ \o TextEdit.AlignLeft (default)
+ \o TextEdit.AlignRight
+ \o TextEdit.AlignHCenter
+ \endlist
+
+ Valid values for \c verticalAlignment are:
+ \list
+ \o TextEdit.AlignTop (default)
+ \o TextEdit.AlignBottom
+ \c TextEdit.AlignVCenter
+ \endlist
*/
QDeclarativeTextEdit::HAlignment QDeclarativeTextEdit::hAlign() const
{
@@ -529,8 +542,8 @@ void QDeclarativeTextEdit::setWrapMode(WrapMode mode)
/*!
\qmlproperty real TextEdit::paintedWidth
- Returns the width of the text, including width past the width
- which is covered due to insufficient wrapping if WrapMode is set.
+ Returns the width of the text, including the width past the width
+ which is covered due to insufficient wrapping if \l wrapMode is set.
*/
qreal QDeclarativeTextEdit::paintedWidth() const
{
@@ -540,8 +553,8 @@ qreal QDeclarativeTextEdit::paintedWidth() const
/*!
\qmlproperty real TextEdit::paintedHeight
- Returns the height of the text, including height past the height
- which is covered due to there being more text than fits in the set height.
+ Returns the height of the text, including the height past the height
+ that is covered if the text does not fit within the set height.
*/
qreal QDeclarativeTextEdit::paintedHeight() const
{
@@ -567,10 +580,10 @@ QRectF QDeclarativeTextEdit::positionToRectangle(int pos) const
/*!
\qmlmethod int TextEdit::positionAt(x,y)
- Returns the text position closest to pixel position (\a x,\a y).
+ Returns the text position closest to pixel position (\a x, \a y).
Position 0 is before the first character, position 1 is after the first character
- but before the second, and so on until position text.length, which is after all characters.
+ but before the second, and so on until position \l {text}.length, which is after all characters.
*/
int QDeclarativeTextEdit::positionAt(int x, int y) const
{
@@ -1082,7 +1095,7 @@ void QDeclarativeTextEdit::copy()
/*!
\qmlmethod TextEdit::paste()
- Relaces the currently selected text by the contents of the system clipboard.
+ Replaces the currently selected text by the contents of the system clipboard.
*/
void QDeclarativeTextEdit::paste()
{
@@ -1100,13 +1113,7 @@ void QDeclarativeTextEdit::mousePressEvent(QGraphicsSceneMouseEvent *event)
Q_D(QDeclarativeTextEdit);
if (d->focusOnPress){
bool hadFocus = hasFocus();
- QGraphicsItem *p = parentItem();//###Is there a better way to find my focus scope?
- while(p) {
- if (p->flags() & QGraphicsItem::ItemIsFocusScope)
- p->setFocus();
- p = p->parentItem();
- }
- setFocus(true);
+ forceFocus();
if (d->showInputPanelOnFocus) {
if (hasFocus() && hadFocus && !isReadOnly()) {
// re-open input panel on press if already focused
@@ -1391,11 +1398,11 @@ void QDeclarativeTextEditPrivate::updateDefaultTextOption()
your application.
By default the opening of input panels follows the platform style. On Symbian^1 and
- Symbian^3 -based devices the panels are opened by clicking TextEdit and need to be
- manually closed by the user. On other platforms the panels are automatically opened
- when TextEdit element gains focus and closed when the focus is lost.
+ Symbian^3 -based devices the panels are opened by clicking TextEdit. On other platforms
+ the panels are automatically opened when TextEdit element gains focus. Input panels are
+ always closed if no editor owns focus.
- . You can disable the automatic behavior by setting the property \c focusOnPress to false
+ You can disable the automatic behavior by setting the property \c focusOnPress to false
and use functions openSoftwareInputPanel() and closeSoftwareInputPanel() to implement
the behavior you want.
@@ -1415,9 +1422,9 @@ void QDeclarativeTextEditPrivate::updateDefaultTextOption()
textEdit.openSoftwareInputPanel();
} else {
textEdit.focus = false;
- textEdit.closeSoftwareInputPanel();
}
}
+ onPressAndHold: textEdit.closeSoftwareInputPanel();
}
}
\endcode
@@ -1442,11 +1449,11 @@ void QDeclarativeTextEdit::openSoftwareInputPanel()
your application.
By default the opening of input panels follows the platform style. On Symbian^1 and
- Symbian^3 -based devices the panels are opened by clicking TextEdit and need to be
- manually closed by the user. On other platforms the panels are automatically opened
- when TextEdit element gains focus and closed when the focus is lost.
+ Symbian^3 -based devices the panels are opened by clicking TextEdit. On other platforms
+ the panels are automatically opened when TextEdit element gains focus. Input panels are
+ always closed if no editor owns focus.
- . You can disable the automatic behavior by setting the property \c focusOnPress to false
+ You can disable the automatic behavior by setting the property \c focusOnPress to false
and use functions openSoftwareInputPanel() and closeSoftwareInputPanel() to implement
the behavior you want.
@@ -1466,9 +1473,9 @@ void QDeclarativeTextEdit::openSoftwareInputPanel()
textEdit.openSoftwareInputPanel();
} else {
textEdit.focus = false;
- textEdit.closeSoftwareInputPanel();
}
}
+ onPressAndHold: textEdit.closeSoftwareInputPanel();
}
}
\endcode
@@ -1489,22 +1496,11 @@ void QDeclarativeTextEdit::focusInEvent(QFocusEvent *event)
{
Q_D(const QDeclarativeTextEdit);
if (d->showInputPanelOnFocus) {
- if (d->focusOnPress && !isReadOnly() && event->reason() != Qt::ActiveWindowFocusReason) {
+ if (d->focusOnPress && !isReadOnly()) {
openSoftwareInputPanel();
}
}
QDeclarativePaintedItem::focusInEvent(event);
}
-void QDeclarativeTextEdit::focusOutEvent(QFocusEvent *event)
-{
- Q_D(const QDeclarativeTextEdit);
- if (d->showInputPanelOnFocus) {
- if (d->focusOnPress && !isReadOnly()) {
- closeSoftwareInputPanel();
- }
- }
- QDeclarativePaintedItem::focusOutEvent(event);
-}
-
QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h
index 0ecb2f3..d08f607 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h
@@ -247,7 +247,6 @@ protected:
void keyPressEvent(QKeyEvent *);
void keyReleaseEvent(QKeyEvent *);
void focusInEvent(QFocusEvent *event);
- void focusOutEvent(QFocusEvent *event);
// mouse filter?
void mousePressEvent(QGraphicsSceneMouseEvent *event);
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index 8d320f4..9e5dfb5 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -56,17 +56,20 @@ QT_BEGIN_NAMESPACE
/*!
\qmlclass TextInput QDeclarativeTextInput
\since 4.7
- \brief The TextInput item allows you to add an editable line of text to a scene.
+ \brief The TextInput item displays an editable line of text.
\inherits Item
- TextInput can only display a single line of text, and can only display
- plain text. However it can provide addition input constraints on the text.
+ The TextInput element displays a single line of editable plain text.
- Input constraints include setting a QValidator, an input mask, or a
- maximum input length.
+ TextInput is used to accept a line of text input. Input constraints
+ can be placed on a TextInput item (for example, through a \l validator or \l inputMask),
+ and setting \l echoMode to an appropriate value enables TextInput to be used for
+ a password input field.
On Mac OS X, the Up/Down key bindings for Home/End are explicitly disabled.
If you want such bindings (on any platform), you will need to construct them in QML.
+
+ \sa TextEdit, Text
*/
QDeclarativeTextInput::QDeclarativeTextInput(QDeclarativeItem* parent)
: QDeclarativePaintedItem(*(new QDeclarativeTextInputPrivate), parent)
@@ -97,6 +100,7 @@ void QDeclarativeTextInput::setText(const QString &s)
if(s == text())
return;
d->control->setText(s);
+ d->updateHorizontalScroll();
//emit textChanged();
}
@@ -249,7 +253,12 @@ QColor QDeclarativeTextInput::color() const
void QDeclarativeTextInput::setColor(const QColor &c)
{
Q_D(QDeclarativeTextInput);
- d->color = c;
+ if (c != d->color) {
+ d->color = c;
+ clearCache();
+ update();
+ emit colorChanged(c);
+ }
}
@@ -329,6 +338,7 @@ void QDeclarativeTextInput::setHAlign(HAlignment align)
return;
d->hAlign = align;
updateRect();
+ d->updateHorizontalScroll();
emit horizontalAlignmentChanged(d->hAlign);
}
@@ -546,14 +556,16 @@ void QDeclarativeTextInput::setAutoScroll(bool b)
return;
d->autoScroll = b;
-
+ d->updateHorizontalScroll();
+ //We need to repaint so that the scrolling is taking into account.
+ updateSize(true);
emit autoScrollChanged(d->autoScroll);
}
/*!
\qmlclass IntValidator QIntValidator
- This element provides a validator for integer values
+ This element provides a validator for integer values.
*/
/*!
\qmlproperty int IntValidator::top
@@ -596,10 +608,14 @@ void QDeclarativeTextInput::setAutoScroll(bool b)
\qmlproperty enumeration DoubleValidator::notation
This property holds the notation of how a string can describe a number.
- The values for this property are DoubleValidator.StandardNotation or DoubleValidator.ScientificNotation.
- If this property is set to DoubleValidator.ScientificNotation, the written number may have an exponent part(i.e. 1.5E-2).
+ The possible values for this property are:
+
+ \list
+ \o DoubleValidator.StandardNotation
+ \o DoubleValidator.ScientificNotation (default)
+ \endlist
- By default, this property is set to DoubleValidator.ScientificNotation.
+ If this property is set to DoubleValidator.ScientificNotation, the written number may have an exponent part (e.g. 1.5E-2).
*/
/*!
@@ -824,17 +840,23 @@ void QDeclarativeTextInput::moveCursor()
Q_D(QDeclarativeTextInput);
if(!d->cursorItem)
return;
+ d->updateHorizontalScroll();
d->cursorItem->setX(d->control->cursorToX() - d->hscroll);
}
/*!
- \qmlmethod rect TextInput::positionToRectangle(int x)
+ \qmlmethod rect TextInput::positionToRectangle(int pos)
+
+ This function takes a character position and returns the rectangle that the
+ cursor would occupy, if it was placed at that character position.
+
+ This is similar to setting the cursorPosition, and then querying the cursor
+ rectangle, but the cursorPosition is not changed.
*/
-QRectF QDeclarativeTextInput::positionToRectangle(int x) const
+QRectF QDeclarativeTextInput::positionToRectangle(int pos) const
{
Q_D(const QDeclarativeTextInput);
- QFontMetrics fm = QFontMetrics(d->font);
- return QRectF(d->control->cursorToX(x)-d->hscroll,
+ return QRectF(d->control->cursorToX(pos)-d->hscroll,
0.0,
d->control->cursorWidth(),
cursorRectangle().height());
@@ -912,13 +934,7 @@ void QDeclarativeTextInput::mousePressEvent(QGraphicsSceneMouseEvent *event)
Q_D(QDeclarativeTextInput);
if(d->focusOnPress){
bool hadFocus = hasFocus();
- QGraphicsItem *p = parentItem();//###Is there a better way to find my focus scope?
- while(p) {
- if (p->flags() & QGraphicsItem::ItemIsFocusScope)
- p->setFocus();
- p = p->parentItem();
- }
- setFocus(true);
+ forceFocus();
if (d->showInputPanelOnFocus) {
if (hasFocus() && hadFocus && !isReadOnly()) {
// re-open input panel on press if already focused
@@ -1000,61 +1016,73 @@ void QDeclarativeTextInput::geometryChanged(const QRectF &newGeometry,
QDeclarativePaintedItem::geometryChanged(newGeometry, oldGeometry);
}
-void QDeclarativeTextInput::drawContents(QPainter *p, const QRect &r)
+void QDeclarativeTextInputPrivate::updateHorizontalScroll()
{
- Q_D(QDeclarativeTextInput);
- p->setRenderHint(QPainter::TextAntialiasing, true);
- p->save();
- p->setPen(QPen(d->color));
- int flags = QLineControl::DrawText;
- if(!isReadOnly() && d->cursorVisible && !d->cursorItem)
- flags |= QLineControl::DrawCursor;
- if (d->control->hasSelectedText())
- flags |= QLineControl::DrawSelections;
- QPoint offset = QPoint(0,0);
- QFontMetrics fm = QFontMetrics(d->font);
- int cix = qRound(d->control->cursorToX());
- QRect br(boundingRect().toRect());
+ Q_Q(QDeclarativeTextInput);
+ QFontMetrics fm = QFontMetrics(font);
+ int cix = qRound(control->cursorToX());
+ QRect br(q->boundingRect().toRect());
//###Is this using bearing appropriately?
int minLB = qMax(0, -fm.minLeftBearing());
int minRB = qMax(0, -fm.minRightBearing());
- int widthUsed = qRound(d->control->naturalTextWidth()) + 1 + minRB;
- if (d->autoScroll) {
+ int widthUsed = qRound(control->naturalTextWidth()) + 1 + minRB;
+ if (autoScroll) {
if ((minLB + widthUsed) <= br.width()) {
// text fits in br; use hscroll for alignment
- switch (d->hAlign & ~(Qt::AlignAbsolute|Qt::AlignVertical_Mask)) {
+ switch (hAlign & ~(Qt::AlignAbsolute|Qt::AlignVertical_Mask)) {
case Qt::AlignRight:
- d->hscroll = widthUsed - br.width() + 1;
+ hscroll = widthUsed - br.width() + 1;
break;
case Qt::AlignHCenter:
- d->hscroll = (widthUsed - br.width()) / 2;
+ hscroll = (widthUsed - br.width()) / 2;
break;
default:
// Left
- d->hscroll = 0;
+ hscroll = 0;
break;
}
- d->hscroll -= minLB;
- } else if (cix - d->hscroll >= br.width()) {
+ hscroll -= minLB;
+ } else if (cix - hscroll >= br.width()) {
// text doesn't fit, cursor is to the right of br (scroll right)
- d->hscroll = cix - br.width() + 1;
- } else if (cix - d->hscroll < 0 && d->hscroll < widthUsed) {
+ hscroll = cix - br.width() + 1;
+ } else if (cix - hscroll < 0 && hscroll < widthUsed) {
// text doesn't fit, cursor is to the left of br (scroll left)
- d->hscroll = cix;
- } else if (widthUsed - d->hscroll < br.width()) {
+ hscroll = cix;
+ } else if (widthUsed - hscroll < br.width()) {
// text doesn't fit, text document is to the left of br; align
// right
- d->hscroll = widthUsed - br.width() + 1;
+ hscroll = widthUsed - br.width() + 1;
}
+ } else {
+ if(hAlign == QDeclarativeTextInput::AlignRight){
+ hscroll = q->width() - widthUsed;
+ }else if(hAlign == QDeclarativeTextInput::AlignHCenter){
+ hscroll = (q->width() - widthUsed) / 2;
+ } else {
+ hscroll = 0;
+ }
+ hscroll -= minLB;
+ }
+}
+
+void QDeclarativeTextInput::drawContents(QPainter *p, const QRect &r)
+{
+ Q_D(QDeclarativeTextInput);
+ p->setRenderHint(QPainter::TextAntialiasing, true);
+ p->save();
+ p->setPen(QPen(d->color));
+ int flags = QLineControl::DrawText;
+ if(!isReadOnly() && d->cursorVisible && !d->cursorItem)
+ flags |= QLineControl::DrawCursor;
+ if (d->control->hasSelectedText())
+ flags |= QLineControl::DrawSelections;
+ QPoint offset = QPoint(0,0);
+ QFontMetrics fm = QFontMetrics(d->font);
+ QRect br(boundingRect().toRect());
+ if (d->autoScroll) {
// the y offset is there to keep the baseline constant in case we have script changes in the text.
offset = br.topLeft() - QPoint(d->hscroll, d->control->ascent() - fm.ascent());
} else {
- if(d->hAlign == AlignRight){
- d->hscroll = width() - widthUsed;
- }else if(d->hAlign == AlignHCenter){
- d->hscroll = (width() - widthUsed) / 2;
- }
- d->hscroll -= minLB;
offset = QPoint(d->hscroll, 0);
}
d->control->draw(p, offset, r, flags);
@@ -1224,6 +1252,7 @@ void QDeclarativeTextInput::moveCursorSelection(int position)
{
Q_D(QDeclarativeTextInput);
d->control->moveCursor(position, true);
+ d->updateHorizontalScroll();
}
/*!
@@ -1234,9 +1263,9 @@ void QDeclarativeTextInput::moveCursorSelection(int position)
your application.
By default the opening of input panels follows the platform style. On Symbian^1 and
- Symbian^3 -based devices the panels are opened by clicking TextInput and need to be
- manually closed by the user. On other platforms the panels are automatically opened
- when TextInput element gains focus and closed when the focus is lost.
+ Symbian^3 -based devices the panels are opened by clicking TextInput. On other platforms
+ the panels are automatically opened when TextInput element gains focus. Input panels are
+ always closed if no editor owns focus.
. You can disable the automatic behavior by setting the property \c focusOnPress to false
and use functions openSoftwareInputPanel() and closeSoftwareInputPanel() to implement
@@ -1258,9 +1287,9 @@ void QDeclarativeTextInput::moveCursorSelection(int position)
textInput.openSoftwareInputPanel();
} else {
textInput.focus = false;
- textInput.closeSoftwareInputPanel();
}
}
+ onPressAndHold: textInput.closeSoftwareInputPanel();
}
}
\endqml
@@ -1285,9 +1314,9 @@ void QDeclarativeTextInput::openSoftwareInputPanel()
your application.
By default the opening of input panels follows the platform style. On Symbian^1 and
- Symbian^3 -based devices the panels are opened by clicking TextInput and need to be
- manually closed by the user. On other platforms the panels are automatically opened
- when TextInput element gains focus and closed when the focus is lost.
+ Symbian^3 -based devices the panels are opened by clicking TextInput. On other platforms
+ the panels are automatically opened when TextInput element gains focus. Input panels are
+ always closed if no editor owns focus.
. You can disable the automatic behavior by setting the property \c focusOnPress to false
and use functions openSoftwareInputPanel() and closeSoftwareInputPanel() to implement
@@ -1309,9 +1338,9 @@ void QDeclarativeTextInput::openSoftwareInputPanel()
textInput.openSoftwareInputPanel();
} else {
textInput.focus = false;
- textInput.closeSoftwareInputPanel();
}
}
+ onPressAndHold: textInput.closeSoftwareInputPanel();
}
}
\endqml
@@ -1333,24 +1362,13 @@ void QDeclarativeTextInput::focusInEvent(QFocusEvent *event)
{
Q_D(const QDeclarativeTextInput);
if (d->showInputPanelOnFocus) {
- if (d->focusOnPress && !isReadOnly() && event->reason() != Qt::ActiveWindowFocusReason) {
+ if (d->focusOnPress && !isReadOnly()) {
openSoftwareInputPanel();
}
}
QDeclarativePaintedItem::focusInEvent(event);
}
-void QDeclarativeTextInput::focusOutEvent(QFocusEvent *event)
-{
- Q_D(const QDeclarativeTextInput);
- if (d->showInputPanelOnFocus) {
- if (d->focusOnPress && !isReadOnly()) {
- closeSoftwareInputPanel();
- }
- }
- QDeclarativePaintedItem::focusOutEvent(event);
-}
-
void QDeclarativeTextInputPrivate::init()
{
Q_Q(QDeclarativeTextInput);
@@ -1425,6 +1443,7 @@ void QDeclarativeTextInput::selectionChanged()
void QDeclarativeTextInput::q_textChanged()
{
Q_D(QDeclarativeTextInput);
+ d->updateHorizontalScroll();
updateSize();
emit textChanged();
if(hasAcceptableInput() != d->oldValidity){
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h
index e34634a..03f55ae 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h
@@ -112,7 +112,7 @@ public:
//Auxilliary functions needed to control the TextInput from QML
Q_INVOKABLE int positionAt(int x) const;
- Q_INVOKABLE QRectF positionToRectangle(int x) const;
+ Q_INVOKABLE QRectF positionToRectangle(int pos) const;
Q_INVOKABLE void moveCursorSelection(int pos);
Q_INVOKABLE void openSoftwareInputPanel();
@@ -224,7 +224,6 @@ protected:
void keyPressEvent(QKeyEvent* ev);
bool event(QEvent *e);
void focusInEvent(QFocusEvent *event);
- void focusOutEvent(QFocusEvent *event);
public Q_SLOTS:
void selectAll();
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
index 6865147..8b74bcc 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
@@ -99,6 +99,7 @@ public:
void init();
void startCreatingCursor();
void focusChanged(bool hasFocus);
+ void updateHorizontalScroll();
QLineControl* control;
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index 2a88a80..5092349 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -113,16 +113,18 @@ public:
\since 4.7
\brief The VisualItemModel allows items to be provided to a view.
- The children of the VisualItemModel are provided in a model which
- can be used in a view. Note that no delegate should be
- provided to a view since the VisualItemModel contains the
- visual delegate (items).
+ A VisualItemModel contains the visual items to be used in a view.
+ When a VisualItemModel is used in a view, the view does not require
+ a delegate since the VisualItemModel already contains the visual
+ delegate (items).
An item can determine its index within the
- model via the \c VisualItemModel.index attached property.
+ model via the \l{VisualItemModel::index}{index} attached property.
The example below places three colored rectangles in a ListView.
\code
+ import Qt 4.7
+
Rectangle {
VisualItemModel {
id: itemModel
@@ -139,12 +141,21 @@ public:
\endcode
\image visualitemmodel.png
+
+ \sa {declarative/modelviews/visualitemmodel}{VisualItemModel example}
*/
QDeclarativeVisualItemModel::QDeclarativeVisualItemModel(QObject *parent)
: QDeclarativeVisualModel(*(new QDeclarativeVisualItemModelPrivate), parent)
{
}
+/*!
+ \qmlattachedproperty int VisualItemModel::index
+ This attached property holds the index of this delegate's item within the model.
+
+ It is attached to each instance of the delegate.
+*/
+
QDeclarativeListProperty<QDeclarativeItem> QDeclarativeVisualItemModel::children()
{
Q_D(QDeclarativeVisualItemModel);
@@ -607,30 +618,15 @@ QDeclarativeVisualDataModelData *QDeclarativeVisualDataModelPrivate::data(QObjec
A VisualDataModel encapsulates a model and the delegate that will
be instantiated for items in the model.
- It is usually not necessary to create a VisualDataModel directly,
- since the QML views will create one internally.
+ It is usually not necessary to create VisualDataModel elements.
+ However, it can be useful for manipulating and accessing the \l modelIndex
+ when a QAbstractItemModel subclass is used as the
+ model. Also, VisualDataModel is used together with \l Package to
+ provide delegates to multiple views.
The example below illustrates using a VisualDataModel with a ListView.
- \code
- VisualDataModel {
- id: visualModel
- model: myModel
- delegate: Component {
- Rectangle {
- height: 25
- width: 100
- Text { text: "Name:" + name}
- }
- }
- }
- ListView {
- width: 100
- height: 100
- anchors.fill: parent
- model: visualModel
- }
- \endcode
+ \snippet doc/src/snippets/declarative/visualdatamodel.qml 0
*/
QDeclarativeVisualDataModel::QDeclarativeVisualDataModel()
@@ -805,56 +801,22 @@ void QDeclarativeVisualDataModel::setDelegate(QDeclarativeComponent *delegate)
/*!
\qmlproperty QModelIndex VisualDataModel::rootIndex
- QAbstractItemModel provides a heirachical tree of data, whereas
+ QAbstractItemModel provides a hierarchical tree of data, whereas
QML only operates on list data. \c rootIndex allows the children of
any node in a QAbstractItemModel to be provided by this model.
This property only affects models of type QAbstractItemModel.
- \code
- // main.cpp
-
- int main(int argc, char ** argv)
- {
- QApplication app(argc, argv);
-
- QDeclarativeView view;
-
- QDirModel model;
- view.rootContext()->setContextProperty("myModel", &model);
-
- view.setSource(QUrl("qrc:view.qml"));
- view.show();
-
- return app.exec();
- }
-
- #include "main.moc"
- \endcode
-
- \code
- // view.qml
- import Qt 4.7
+ For example, here is a simple interactive file system browser.
+ When a directory name is clicked, the view's \c rootIndex is set to the
+ QModelIndex node of the clicked directory, thus updating the view to show
+ the new directory's contents.
- ListView {
- id: view
- width: 200
- height: 200
- model: VisualDataModel {
- model: myModel
- delegate: Component {
- Rectangle {
- height: 25; width: 200
- Text { text: filePath }
- MouseArea {
- anchors.fill: parent;
- onClicked: if (hasModelChildren) view.model.rootIndex = view.model.modelIndex(index)
- }
- }
- }
- }
- }
- \endcode
+ \c main.cpp:
+ \snippet doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp 0
+
+ \c view.qml:
+ \snippet doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml 0
\sa modelIndex(), parentModelIndex()
*/
@@ -886,7 +848,7 @@ void QDeclarativeVisualDataModel::setRootIndex(const QVariant &root)
/*!
\qmlmethod QModelIndex VisualDataModel::modelIndex(int index)
- QAbstractItemModel provides a heirachical tree of data, whereas
+ QAbstractItemModel provides a hierarchical tree of data, whereas
QML only operates on list data. This function assists in using
tree models in QML.
@@ -906,7 +868,7 @@ QVariant QDeclarativeVisualDataModel::modelIndex(int idx) const
/*!
\qmlmethod QModelIndex VisualDataModel::parentModelIndex()
- QAbstractItemModel provides a heirachical tree of data, whereas
+ QAbstractItemModel provides a hierarchical tree of data, whereas
QML only operates on list data. This function assists in using
tree models in QML.
@@ -1000,10 +962,10 @@ QDeclarativeVisualDataModel::ReleaseFlags QDeclarativeVisualDataModel::release(Q
The \a parts property selects a VisualDataModel which creates
delegates from the part named. This is used in conjunction with
- the Package element.
+ the \l Package element.
For example, the code below selects a model which creates
- delegates named \e list from a Package:
+ delegates named \e list from a \l Package:
\code
VisualDataModel {
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h b/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
index 0bdbbcf..079c9e6 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
@@ -54,11 +54,6 @@ Q_DECLARE_METATYPE(QModelIndex)
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-/*****************************************************************************
- *****************************************************************************
- XXX Experimental
- *****************************************************************************
-*****************************************************************************/
class QDeclarativeItem;
class QDeclarativeComponent;
diff --git a/src/declarative/qml/qdeclarativecompiledbindings.cpp b/src/declarative/qml/qdeclarativecompiledbindings.cpp
index ad05e80..507e47b 100644
--- a/src/declarative/qml/qdeclarativecompiledbindings.cpp
+++ b/src/declarative/qml/qdeclarativecompiledbindings.cpp
@@ -64,7 +64,7 @@ DEFINE_BOOL_CONFIG_OPTION(bindingsDump, QML_BINDINGS_DUMP);
Q_GLOBAL_STATIC(QDeclarativeFastProperties, fastProperties);
-#ifdef __GNUC__
+#if defined(Q_CC_GNU) && (!defined(Q_CC_INTEL) || __INTEL_COMPILER >= 1200)
# define QML_THREADED_INTERPRETER
#endif
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
index 9847079..b4919ff 100644
--- a/src/declarative/qml/qdeclarativecomponent.cpp
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -60,7 +60,6 @@
#include <QFileInfo>
#include <QtCore/qdebug.h>
#include <QApplication>
-#include <QGraphicsObject>
QT_BEGIN_NAMESPACE
@@ -78,7 +77,7 @@ class QByteArray;
\since 4.7
\brief The Component element encapsulates a QML component description.
- Components are reusable, encapsulated Qml element with a well-defined interface.
+ Components are reusable, encapsulated QML elements with well-defined interfaces.
They are often defined in \l {qdeclarativedocuments.html}{Component Files}.
The \e Component element allows defining components within a QML file.
@@ -547,16 +546,18 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeComponentPrivate &dd, Q
/*!
\qmlmethod object Component::createObject(parent)
- Returns an object instance from this component, or null if object creation fails.
+
+ Creates and returns an object instance of this component that will have the given
+ \a parent. Returns null if object creation fails.
The object will be created in the same context as the one in which the component
was created. This function will always return null when called on components
which were not created in QML.
- Note that if the returned object is to be displayed, its \c parent must be set to
- an existing item in a scene, or else the object will not be visible. The parent
- argument is required to help you avoid this, you must explicitly pass in null if
- you wish to create an object without setting a parent.
+ If you wish to create an object without setting a parent, specify \c null for
+ the \a parent value. Note that if the returned object is to be displayed, you
+ must provide a valid \a parent value or set the returned object's \l{Item::parent}{parent}
+ property, or else the object will not be visible.
*/
/*!
@@ -577,20 +578,26 @@ QScriptValue QDeclarativeComponent::createObject(QObject* parent)
if (!ret)
return QScriptValue(QScriptValue::NullValue);
- QGraphicsObject* gobj = qobject_cast<QGraphicsObject*>(ret);
- bool needParent = (gobj != 0);
- if(parent){
+
+ if (parent) {
ret->setParent(parent);
- if (gobj) {
- QGraphicsObject* gparent = qobject_cast<QGraphicsObject*>(parent);
- if(gparent){
- gobj->setParentItem(gparent);
+ QList<QDeclarativePrivate::AutoParentFunction> functions = QDeclarativeMetaType::parentFunctions();
+
+ bool needParent = false;
+
+ for (int ii = 0; ii < functions.count(); ++ii) {
+ QDeclarativePrivate::AutoParentResult res = functions.at(ii)(ret, parent);
+ if (res == QDeclarativePrivate::Parented) {
needParent = false;
+ break;
+ } else if (res == QDeclarativePrivate::IncompatibleParent) {
+ needParent = true;
}
}
+
+ if (needParent)
+ qWarning("QDeclarativeComponent: Created graphical object was not placed in the graphics scene.");
}
- if(needParent)
- qWarning("QDeclarativeComponent: Created graphical object was not placed in the graphics scene.");
QDeclarativeEnginePrivate *priv = QDeclarativeEnginePrivate::get(d->engine);
QDeclarativeData::get(ret, true)->setImplicitDestructible();
diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp
index 6a13f15..2221d78 100644
--- a/src/declarative/qml/qdeclarativecontext.cpp
+++ b/src/declarative/qml/qdeclarativecontext.cpp
@@ -116,7 +116,7 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
All properties added explicitly by QDeclarativeContext::setContextProperty() take
precedence over the context object's properties.
- Contexts form a hierarchy. The root of this heirarchy is the QDeclarativeEngine's
+ Contexts form a hierarchy. The root of this hierarchy is the QDeclarativeEngine's
\l {QDeclarativeEngine::rootContext()}{root context}. A component instance can
access the data in its own context, as well as all its ancestor contexts. Data
can be made available to all instances by modifying the
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 39b0802..5c4d229 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -93,7 +93,6 @@
#include <QtGui/qcolor.h>
#include <QtGui/qvector3d.h>
#include <QtGui/qsound.h>
-#include <QGraphicsObject>
#include <QtCore/qcryptographichash.h>
#include <private/qobject_p.h>
@@ -191,7 +190,7 @@ when the property has one of the following types:
\o \c vector3d - use \l{Qt::vector3d()}{Qt.vector3d()}
\endlist
-There are also string based constructors for these types, see \l{qdeclarativebasictypes.html}{QML Basic Types}.
+There are also string based constructors for these types. See \l{qdeclarativebasictypes.html}{QML Basic Types} for more information.
\section1 Date/Time Formatters
@@ -1054,8 +1053,9 @@ or \c null if there was an error in creating the component.
Call \l {Component::createObject()}{Component.createObject()} on the returned
component to create an object instance of the component.
-Here is an example. Remember that QML files that might be loaded
-over the network cannot be expected to be ready immediately.
+Here is an example. Notice it checks whether the component \l{Component::status}{status} is
+\c Component.Ready before calling \l {Component::createObject()}{createObject()}
+in case the QML file is loaded over a network and thus is not ready immediately.
\snippet doc/src/snippets/declarative/componentCreation.js 0
\codeline
@@ -1095,12 +1095,12 @@ QScriptValue QDeclarativeEnginePrivate::createComponent(QScriptContext *ctxt, QS
/*!
\qmlmethod object Qt::createQmlObject(string qml, object parent, string filepath)
-Returns a new object created from the given \a string of QML with the specified \a parent,
+Returns a new object created from the given \a string of QML which will have the specified \a parent,
or \c null if there was an error in creating the object.
If \a filepath is specified, it will be used for error reporting for the created object.
-Example (where \c targetItem is the id of an existing QML item):
+Example (where \c parentItem is the id of an existing QML item):
\snippet doc/src/snippets/declarative/createQmlObject.qml 0
@@ -1194,10 +1194,12 @@ QScriptValue QDeclarativeEnginePrivate::createQmlObject(QScriptContext *ctxt, QS
Q_ASSERT(obj);
obj->setParent(parentArg);
- QGraphicsObject* gobj = qobject_cast<QGraphicsObject*>(obj);
- QGraphicsObject* gparent = qobject_cast<QGraphicsObject*>(parentArg);
- if(gobj && gparent)
- gobj->setParentItem(gparent);
+
+ QList<QDeclarativePrivate::AutoParentFunction> functions = QDeclarativeMetaType::parentFunctions();
+ for (int ii = 0; ii < functions.count(); ++ii) {
+ if (QDeclarativePrivate::Parented == functions.at(ii)(obj, parentArg))
+ break;
+ }
QDeclarativeData::get(obj, true)->setImplicitDestructible();
return activeEnginePriv->objectClass->newQObject(obj, QMetaType::QObjectStar);
diff --git a/src/declarative/qml/qdeclarativemetatype.cpp b/src/declarative/qml/qdeclarativemetatype.cpp
index 5fcb7ee..c32cab6 100644
--- a/src/declarative/qml/qdeclarativemetatype.cpp
+++ b/src/declarative/qml/qdeclarativemetatype.cpp
@@ -112,6 +112,8 @@ struct QDeclarativeMetaTypeData
QBitArray objects;
QBitArray interfaces;
QBitArray lists;
+
+ QList<QDeclarativePrivate::AutoParentFunction> parentFunctions;
};
Q_GLOBAL_STATIC(QDeclarativeMetaTypeData, metaTypeData)
Q_GLOBAL_STATIC(QReadWriteLock, metaTypeDataLock)
@@ -483,6 +485,16 @@ int QDeclarativeType::index() const
return d->m_index;
}
+int QDeclarativePrivate::registerAutoParentFunction(AutoParentFunction function)
+{
+ QWriteLocker lock(metaTypeDataLock());
+ QDeclarativeMetaTypeData *data = metaTypeData();
+
+ data->parentFunctions.append(function);
+
+ return data->parentFunctions.count() - 1;
+}
+
int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterInterface &interface)
{
if (interface.version > 0)
@@ -583,6 +595,13 @@ bool QDeclarativeMetaType::isModule(const QByteArray &module, int versionMajor,
((*it).vmajor_min == versionMajor && (*it).vminor_min <= versionMinor))));
}
+QList<QDeclarativePrivate::AutoParentFunction> QDeclarativeMetaType::parentFunctions()
+{
+ QReadLocker lock(metaTypeDataLock());
+ QDeclarativeMetaTypeData *data = metaTypeData();
+ return data->parentFunctions;
+}
+
QObject *QDeclarativeMetaType::toQObject(const QVariant &v, bool *ok)
{
if (!isQObject(v.userType())) {
diff --git a/src/declarative/qml/qdeclarativemetatype_p.h b/src/declarative/qml/qdeclarativemetatype_p.h
index bf6a700..4c98b6f 100644
--- a/src/declarative/qml/qdeclarativemetatype_p.h
+++ b/src/declarative/qml/qdeclarativemetatype_p.h
@@ -99,6 +99,8 @@ public:
static StringConverter customStringConverter(int);
static bool isModule(const QByteArray &module, int versionMajor, int versionMinor);
+
+ static QList<QDeclarativePrivate::AutoParentFunction> parentFunctions();
};
class QDeclarativeTypePrivate;
diff --git a/src/declarative/qml/qdeclarativeprivate.h b/src/declarative/qml/qdeclarativeprivate.h
index e657dd5..cd859fe 100644
--- a/src/declarative/qml/qdeclarativeprivate.h
+++ b/src/declarative/qml/qdeclarativeprivate.h
@@ -214,6 +214,10 @@ namespace QDeclarativePrivate
const char *iid;
};
+ enum AutoParentResult { Parented, IncompatibleObject, IncompatibleParent };
+ typedef AutoParentResult (*AutoParentFunction)(QObject *object, QObject *parent);
+
+ int Q_DECLARATIVE_EXPORT registerAutoParentFunction(AutoParentFunction);
int Q_DECLARATIVE_EXPORT registerType(const RegisterType &);
int Q_DECLARATIVE_EXPORT registerType(const RegisterInterface &);
diff --git a/src/declarative/qml/qdeclarativevaluetype.cpp b/src/declarative/qml/qdeclarativevaluetype.cpp
index dbc25bb..c17ec95 100644
--- a/src/declarative/qml/qdeclarativevaluetype.cpp
+++ b/src/declarative/qml/qdeclarativevaluetype.cpp
@@ -47,6 +47,8 @@
QT_BEGIN_NAMESPACE
+Q_DECL_IMPORT extern int qt_defaultDpi();
+
template<typename T>
int qmlRegisterValueTypeEnums(const char *qmlName)
{
@@ -909,6 +911,11 @@ void QDeclarativeFontValueType::setStrikeout(bool b)
qreal QDeclarativeFontValueType::pointSize() const
{
+ if (font.pointSizeF() == -1) {
+ if (dpi.isNull)
+ dpi = qt_defaultDpi();
+ return font.pixelSize() * qreal(72.) / qreal(dpi);
+ }
return font.pointSizeF();
}
@@ -929,6 +936,11 @@ void QDeclarativeFontValueType::setPointSize(qreal size)
int QDeclarativeFontValueType::pixelSize() const
{
+ if (font.pixelSize() == -1) {
+ if (dpi.isNull)
+ dpi = qt_defaultDpi();
+ return (font.pointSizeF() * dpi) / qreal(72.);
+ }
return font.pixelSize();
}
diff --git a/src/declarative/qml/qdeclarativevaluetype_p.h b/src/declarative/qml/qdeclarativevaluetype_p.h
index 3eaecc1..4b1bbd6 100644
--- a/src/declarative/qml/qdeclarativevaluetype_p.h
+++ b/src/declarative/qml/qdeclarativevaluetype_p.h
@@ -55,6 +55,7 @@
#include "qdeclarativeproperty.h"
#include "private/qdeclarativeproperty_p.h"
+#include "private/qdeclarativenullablevalue_p_p.h"
#include <QtCore/qobject.h>
#include <QtCore/qrect.h>
@@ -547,6 +548,7 @@ private:
QFont font;
bool pixelSizeSet;
bool pointSizeSet;
+ mutable QDeclarativeNullableValue<int> dpi;
};
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp
index e0ee84f..aec84a6 100644
--- a/src/declarative/qml/qdeclarativeworkerscript.cpp
+++ b/src/declarative/qml/qdeclarativeworkerscript.cpp
@@ -523,7 +523,7 @@ void QDeclarativeWorkerScriptEngine::run()
Messages can be passed between the new thread and the parent thread
using \l sendMessage() and the \l {WorkerScript::onMessage}{onMessage()} handler.
- Here is an example:
+ An example:
\snippet doc/src/snippets/declarative/workerscript.qml 0
@@ -541,6 +541,9 @@ void QDeclarativeWorkerScriptEngine::run()
called, triggering the \tt WorkerScript.onMessage() handler in
\tt script.js. This in turn sends a reply message that is then received
by the \tt onMessage() handler of \tt myWorker.
+
+ \sa {declarative/threading/workerscript}{WorkerScript example},
+ {declarative/threading/threadedlistmodel}{Threaded ListModel example}
*/
QDeclarativeWorkerScript::QDeclarativeWorkerScript(QObject *parent)
: QObject(parent), m_engine(0), m_scriptId(-1), m_componentComplete(true)
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index 0eae136..25cf133 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -1774,7 +1774,7 @@ void QDeclarativePropertyAnimation::setTo(const QVariant &t)
To specify an easing curve you need to specify at least the type. For some curves you can also specify
amplitude, period and/or overshoot (more details provided after the table). The default easing curve is
- Linear.
+ \c Easing.Linear.
\qml
PropertyAnimation { properties: "y"; easing.type: Easing.InOutElastic; easing.amplitude: 2.0; easing.period: 1.5 }
@@ -1951,15 +1951,15 @@ void QDeclarativePropertyAnimation::setTo(const QVariant &t)
\o \inlineimage qeasingcurve-outinbounce.png
\endtable
- easing.amplitude is only applicable for bounce and elastic curves (curves of type
- Easing.InBounce, Easing.OutBounce, Easing.InOutBounce, Easing.OutInBounce, Easing.InElastic,
- Easing.OutElastic, Easing.InOutElastic or Easing.OutInElastic).
+ \c easing.amplitude is only applicable for bounce and elastic curves (curves of type
+ \c Easing.InBounce, \c Easing.OutBounce, \c Easing.InOutBounce, \c Easing.OutInBounce, \c Easing.InElastic,
+ \c Easing.OutElastic, \c Easing.InOutElastic or \c Easing.OutInElastic).
- easing.overshoot is only applicable if type is: Easing.InBack, Easing.OutBack,
- Easing.InOutBack or Easing.OutInBack.
+ \c easing.overshoot is only applicable if \c easing.type is: \c Easing.InBack, \c Easing.OutBack,
+ \c Easing.InOutBack or \c Easing.OutInBack.
- easing.period is only applicable if type is: Easing.InElastic, Easing.OutElastic,
- Easing.InOutElastic or Easing.OutInElastic.
+ \c easing.period is only applicable if easing.type is: \c Easing.InElastic, \c Easing.OutElastic,
+ \c Easing.InOutElastic or \c Easing.OutInElastic.
See the \l {declarative/animation/easing}{easing} example for a demonstration of
the different easing settings.
@@ -2045,8 +2045,9 @@ void QDeclarativePropertyAnimation::setProperties(const QString &prop)
The singular forms are slightly optimized, so if you do have only a single target/property
to animate you should try to use them.
- In many cases these properties do not need to be explicitly specified -- they can be
- inferred from the animation framework.
+ In many cases these properties do not need to be explicitly specified, as they can be
+ inferred from the animation framework:
+
\table 80%
\row
\o Value Source / Behavior
@@ -2132,52 +2133,39 @@ QAbstractAnimation *QDeclarativePropertyAnimation::qtAnimation()
return d->va;
}
-struct PropertyUpdater : public QDeclarativeBulkValueUpdater
+void QDeclarativeAnimationPropertyUpdater::setValue(qreal v)
{
- QDeclarativeStateActions actions;
- int interpolatorType; //for Number/ColorAnimation
- int prevInterpolatorType; //for generic
- QVariantAnimation::Interpolator interpolator;
- bool reverse;
- bool fromSourced;
- bool fromDefined;
- bool *wasDeleted;
- PropertyUpdater() : prevInterpolatorType(0), wasDeleted(0) {}
- ~PropertyUpdater() { if (wasDeleted) *wasDeleted = true; }
- void setValue(qreal v)
- {
- bool deleted = false;
- wasDeleted = &deleted;
- if (reverse) //QVariantAnimation sends us 1->0 when reversed, but we are expecting 0->1
- v = 1 - v;
- for (int ii = 0; ii < actions.count(); ++ii) {
- QDeclarativeAction &action = actions[ii];
-
- if (v == 1.)
- QDeclarativePropertyPrivate::write(action.property, action.toValue, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
- else {
- if (!fromSourced && !fromDefined) {
- action.fromValue = action.property.read();
- if (interpolatorType)
- QDeclarativePropertyAnimationPrivate::convertVariant(action.fromValue, interpolatorType);
- }
- if (!interpolatorType) {
- int propType = action.property.propertyType();
- if (!prevInterpolatorType || prevInterpolatorType != propType) {
- prevInterpolatorType = propType;
- interpolator = QVariantAnimationPrivate::getInterpolator(prevInterpolatorType);
- }
+ bool deleted = false;
+ wasDeleted = &deleted;
+ if (reverse) //QVariantAnimation sends us 1->0 when reversed, but we are expecting 0->1
+ v = 1 - v;
+ for (int ii = 0; ii < actions.count(); ++ii) {
+ QDeclarativeAction &action = actions[ii];
+
+ if (v == 1.)
+ QDeclarativePropertyPrivate::write(action.property, action.toValue, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
+ else {
+ if (!fromSourced && !fromDefined) {
+ action.fromValue = action.property.read();
+ if (interpolatorType)
+ QDeclarativePropertyAnimationPrivate::convertVariant(action.fromValue, interpolatorType);
+ }
+ if (!interpolatorType) {
+ int propType = action.property.propertyType();
+ if (!prevInterpolatorType || prevInterpolatorType != propType) {
+ prevInterpolatorType = propType;
+ interpolator = QVariantAnimationPrivate::getInterpolator(prevInterpolatorType);
}
- if (interpolator)
- QDeclarativePropertyPrivate::write(action.property, interpolator(action.fromValue.constData(), action.toValue.constData(), v), QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
}
- if (deleted)
- return;
+ if (interpolator)
+ QDeclarativePropertyPrivate::write(action.property, interpolator(action.fromValue.constData(), action.toValue.constData(), v), QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
}
- wasDeleted = 0;
- fromSourced = true;
+ if (deleted)
+ return;
}
-};
+ wasDeleted = 0;
+ fromSourced = true;
+}
void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions,
QDeclarativeProperties &modified,
@@ -2207,7 +2195,7 @@ void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions
props << d->defaultProperties.split(QLatin1Char(','));
}
- PropertyUpdater *data = new PropertyUpdater;
+ QDeclarativeAnimationPropertyUpdater *data = new QDeclarativeAnimationPropertyUpdater;
data->interpolatorType = d->interpolatorType;
data->interpolator = d->interpolator;
data->reverse = direction == Backward ? true : false;
@@ -2786,7 +2774,7 @@ void QDeclarativeAnchorAnimation::transition(QDeclarativeStateActions &actions,
{
Q_UNUSED(modified);
Q_D(QDeclarativeAnchorAnimation);
- PropertyUpdater *data = new PropertyUpdater;
+ QDeclarativeAnimationPropertyUpdater *data = new QDeclarativeAnimationPropertyUpdater;
data->interpolatorType = QMetaType::QReal;
data->interpolator = d->interpolator;
diff --git a/src/declarative/util/qdeclarativeanimation_p.h b/src/declarative/util/qdeclarativeanimation_p.h
index e7cd8a8..3f8fbdd 100644
--- a/src/declarative/util/qdeclarativeanimation_p.h
+++ b/src/declarative/util/qdeclarativeanimation_p.h
@@ -384,7 +384,7 @@ Q_SIGNALS:
};
class QDeclarativeAnimationGroupPrivate;
-class QDeclarativeAnimationGroup : public QDeclarativeAbstractAnimation
+class Q_AUTOTEST_EXPORT QDeclarativeAnimationGroup : public QDeclarativeAbstractAnimation
{
Q_OBJECT
Q_DECLARE_PRIVATE(QDeclarativeAnimationGroup)
diff --git a/src/declarative/util/qdeclarativeanimation_p_p.h b/src/declarative/util/qdeclarativeanimation_p_p.h
index 3b0f52e..b6d6bbb 100644
--- a/src/declarative/util/qdeclarativeanimation_p_p.h
+++ b/src/declarative/util/qdeclarativeanimation_p_p.h
@@ -96,7 +96,7 @@ private:
};
//performs an action of type QAbstractAnimationAction
-class QActionAnimation : public QAbstractAnimation
+class Q_AUTOTEST_EXPORT QActionAnimation : public QAbstractAnimation
{
Q_OBJECT
public:
@@ -143,7 +143,7 @@ public:
};
//animates QDeclarativeBulkValueUpdater (assumes start and end values will be reals or compatible)
-class QDeclarativeBulkValueAnimator : public QVariantAnimation
+class Q_AUTOTEST_EXPORT QDeclarativeBulkValueAnimator : public QVariantAnimation
{
Q_OBJECT
public:
@@ -378,6 +378,22 @@ public:
QList<QDeclarativeItem*> targets;
};
+class Q_AUTOTEST_EXPORT QDeclarativeAnimationPropertyUpdater : public QDeclarativeBulkValueUpdater
+{
+public:
+ QDeclarativeStateActions actions;
+ int interpolatorType; //for Number/ColorAnimation
+ int prevInterpolatorType; //for generic
+ QVariantAnimation::Interpolator interpolator;
+ bool reverse;
+ bool fromSourced;
+ bool fromDefined;
+ bool *wasDeleted;
+ QDeclarativeAnimationPropertyUpdater() : prevInterpolatorType(0), wasDeleted(0) {}
+ ~QDeclarativeAnimationPropertyUpdater() { if (wasDeleted) *wasDeleted = true; }
+ void setValue(qreal v);
+};
+
QT_END_NAMESPACE
#endif // QDECLARATIVEANIMATION_P_H
diff --git a/src/declarative/util/qdeclarativeconnections.cpp b/src/declarative/util/qdeclarativeconnections.cpp
index 808d196..b364821 100644
--- a/src/declarative/util/qdeclarativeconnections.cpp
+++ b/src/declarative/util/qdeclarativeconnections.cpp
@@ -72,7 +72,9 @@ public:
/*!
\qmlclass Connections QDeclarativeConnections
\since 4.7
- \brief A Connections object describes generalized connections to signals.
+ \brief A Connections element describes generalized connections to signals.
+
+ A Connections object creates a connection to a QML signal.
When connecting to signals in QML, the usual way is to create an
"on<Signal>" handler that reacts when a signal is received, like this:
@@ -83,16 +85,16 @@ public:
}
\endqml
- However, in some cases, it is not possible to connect to a signal in this
- way, such as:
+ However, it is not possible to connect to a signal in this way in some
+ cases, such as when:
\list
- \i multiple connections to the same signal
- \i connections outside the scope of the signal sender
- \i connections to targets not defined in QML
+ \i Multiple connections to the same signal are required
+ \i Creating connections outside the scope of the signal sender
+ \i Connecting to targets not defined in QML
\endlist
- When any of these are needed, the Connections object can be used instead.
+ When any of these are needed, the Connections element can be used instead.
For example, the above code can be changed to use a Connections object,
like this:
@@ -105,7 +107,7 @@ public:
}
\endqml
- More generally, the Connections object can be a child of some other object than
+ More generally, the Connections object can be a child of some object other than
the sender of the signal:
\qml
@@ -141,7 +143,7 @@ QDeclarativeConnections::~QDeclarativeConnections()
\qmlproperty Object Connections::target
This property holds the object that sends the signal.
- If not set at all, the target defaults to be the parent of the Connections.
+ If this property is not set, the \c target defaults to the parent of the Connection.
If set to null, no connection is made and any signal handlers are ignored
until the target is not null.
@@ -175,12 +177,11 @@ void QDeclarativeConnections::setTarget(QObject *obj)
/*!
\qmlproperty bool Connections::ignoreUnknownSignals
- Normally, you will get a runtime error if you try to connect
- to signals on an object which the object does not have.
+ Normally, a connection to a non-existent signal produces runtime errors.
- By setting this flag to true, such errors are ignored. This is
- useful if you intend to connect to different types of object, handling
- a different set of signals for each.
+ If this property is set to \c true, such errors are ignored.
+ This is useful if you intend to connect to different types of objects, handling
+ a different set of signals for each object.
*/
bool QDeclarativeConnections::ignoreUnknownSignals() const
{
diff --git a/src/declarative/util/qdeclarativefontloader.cpp b/src/declarative/util/qdeclarativefontloader.cpp
index 3c2e239..83bdb17 100644
--- a/src/declarative/util/qdeclarativefontloader.cpp
+++ b/src/declarative/util/qdeclarativefontloader.cpp
@@ -79,18 +79,27 @@ public:
/*!
\qmlclass FontLoader QDeclarativeFontLoader
\since 4.7
- \brief This item allows using fonts by name or url.
+ \brief The FontLoader element allows fonts to be loaded by name or URL.
- Example:
+ The FontLoader element is used to load fonts by name or URL.
+
+ The \l status indicates when the font has been loaded, which is useful
+ for fonts loaded from remote sources.
+
+ For example:
\qml
import Qt 4.7
- FontLoader { id: fixedFont; name: "Courier" }
- FontLoader { id: webFont; source: "http://www.mysite.com/myfont.ttf" }
+ Column {
+ FontLoader { id: fixedFont; name: "Courier" }
+ FontLoader { id: webFont; source: "http://www.mysite.com/myfont.ttf" }
- Text { text: "Fixed-size font"; font.family: fixedFont.name }
- Text { text: "Fancy font"; font.family: webFont.name }
+ Text { text: "Fixed-size font"; font.family: fixedFont.name }
+ Text { text: "Fancy font"; font.family: webFont.name }
+ }
\endqml
+
+ \sa {declarative/text/fonts}{Fonts example}
*/
QDeclarativeFontLoader::QDeclarativeFontLoader(QObject *parent)
: QObject(*(new QDeclarativeFontLoaderPrivate), parent)
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp
index 7518eb7..ff83227 100644
--- a/src/declarative/util/qdeclarativelistmodel.cpp
+++ b/src/declarative/util/qdeclarativelistmodel.cpp
@@ -76,125 +76,41 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM
For example:
- \code
- ListModel {
- id: fruitModel
- ListElement {
- name: "Apple"
- cost: 2.45
- }
- ListElement {
- name: "Orange"
- cost: 3.25
- }
- ListElement {
- name: "Banana"
- cost: 1.95
- }
- }
- \endcode
+ \snippet doc/src/snippets/declarative/listmodel.qml 0
- Roles (properties) must begin with a lower-case letter.The above example defines a
+ Roles (properties) must begin with a lower-case letter. The above example defines a
ListModel containing three elements, with the roles "name" and "cost".
Values must be simple constants - either strings (quoted), bools (true, false), numbers,
or enum values (like Text.AlignHCenter).
The defined model can be used in views such as ListView:
- \code
- Component {
- id: fruitDelegate
- Item {
- width: 200; height: 50
- Text { text: name }
- Text { text: '$'+cost; anchors.right: parent.right }
- }
- }
- ListView {
- model: fruitModel
- delegate: fruitDelegate
- anchors.fill: parent
- }
- \endcode
+ \snippet doc/src/snippets/declarative/listmodel-simple.qml 0
+ \dots 8
+ \snippet doc/src/snippets/declarative/listmodel-simple.qml 1
+ \image listmodel.png
It is possible for roles to contain list data. In the example below we create a list of fruit attributes:
- \code
- ListModel {
- id: fruitModel
- ListElement {
- name: "Apple"
- cost: 2.45
- attributes: [
- ListElement { description: "Core" },
- ListElement { description: "Deciduous" }
- ]
- }
- ListElement {
- name: "Orange"
- cost: 3.25
- attributes: [
- ListElement { description: "Citrus" }
- ]
- }
- ListElement {
- name: "Banana"
- cost: 1.95
- attributes: [
- ListElement { description: "Tropical" },
- ListElement { description: "Seedless" }
- ]
- }
- }
- \endcode
+ \snippet doc/src/snippets/declarative/listmodel-nested.qml model
+
+ The delegate below displays all the fruit attributes:
+
+ \snippet doc/src/snippets/declarative/listmodel-nested.qml delegate
+ \image listmodel-nested.png
- The delegate below will list all the fruit attributes:
- \code
- Component {
- id: fruitDelegate
- Item {
- width: 200; height: 50
- Text { id: name; text: name }
- Text { text: '$'+cost; anchors.right: parent.right }
- Row {
- anchors.top: name.bottom
- spacing: 5
- Text { text: "Attributes:" }
- Repeater {
- model: attributes
- Component { Text { text: description } }
- }
- }
- }
- }
- \endcode
\section2 Modifying list models
The content of a ListModel may be created and modified using the clear(),
- append(), and set() methods. For example:
-
- \code
- Component {
- id: fruitDelegate
- Item {
- width: 200; height: 50
- Text { text: name }
- Text { text: '$'+cost; anchors.right: parent.right }
-
- // Double the price when clicked.
- MouseArea {
- anchors.fill: parent
- onClicked: fruitModel.set(index, "cost", cost*2)
- }
- }
- }
- \endcode
+ append(), set() and setProperty() methods. For example:
+
+ \snippet doc/src/snippets/declarative/listmodel-modify.qml delegate
When creating content dynamically, note that the set of available properties cannot be changed
- except by first clearing the model - whatever properties are first added are then the
- only permitted properties in the model.
+ except by first clearing the model. Whatever properties are first added to the model are then the
+ only permitted properties in the model until it is cleared.
\section2 Using threaded list models with WorkerScript
@@ -214,11 +130,11 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM
\snippet examples/declarative/threading/threadedlistmodel/dataloader.js 0
The application's \tt Timer object periodically sends a message to the
- worker script by calling \tt WorkerScript::sendMessage(). When this message
- is received, \tt WorkerScript.onMessage() is invoked in
+ worker script by calling \l WorkerScript::sendMessage(). When this message
+ is received, \l {WorkerScript::onMessage}{WorkerScript.onMessage()} is invoked in
\tt dataloader.js, which appends the current time to the list model.
- Note the call to sync() from the \c WorkerScript.onMessage() handler.
+ Note the call to sync() from the \l {WorkerScript::onMessage}{WorkerScript.onMessage()} handler.
You must call sync() or else the changes made to the list from the external
thread will not be reflected in the list model in the main thread.
@@ -244,7 +160,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM
In addition, the WorkerScript cannot add any list data to the model.
- \sa {qmlmodels}{Data Models}, WorkerScript, QtDeclarative
+ \sa {qmlmodels}{Data Models}, {declarative/threading/threadedlistmodel}{Threaded ListModel example}, QtDeclarative
*/
@@ -454,7 +370,7 @@ void QDeclarativeListModel::insert(int index, const QScriptValue& valuemap)
to the end of the list:
\code
- fruitModel.move(0,fruitModel.count-3,3)
+ fruitModel.move(0, fruitModel.count - 3, 3)
\endcode
\sa append()
diff --git a/src/declarative/util/qdeclarativepackage.cpp b/src/declarative/util/qdeclarativepackage.cpp
index 9617b86..b149120 100644
--- a/src/declarative/util/qdeclarativepackage.cpp
+++ b/src/declarative/util/qdeclarativepackage.cpp
@@ -48,17 +48,17 @@ QT_BEGIN_NAMESPACE
/*!
\qmlclass Package QDeclarativePackage
- \brief Package provides a collection of named items
+ \brief Package provides a collection of named items.
- The Package class is currently used in conjunction with
+ The Package class is used in conjunction with
VisualDataModel to enable delegates with a shared context
to be provided to multiple views.
Any item within a Package may be assigned a name via the
- \e {Package.name} attached property.
+ \l{Package::name}{Package.name} attached property.
The example below creates a Package containing two named items;
- \e list and \e grid. The third element in the package is parented to whichever
+ \e list and \e grid. The third element in the package (the \l Rectangle) is parented to whichever
delegate it should appear in. This allows an item to move
between views.
@@ -70,7 +70,12 @@ QT_BEGIN_NAMESPACE
\snippet examples/declarative/modelviews/package/view.qml 0
- \sa QtDeclarative
+ \sa {declarative/modelviews/package}{Package example}, QtDeclarative
+*/
+
+/*!
+ \qmlattachedproperty bool Package::name
+ This attached property holds the name of an item within a Package.
*/
diff --git a/src/declarative/util/qdeclarativepackage_p.h b/src/declarative/util/qdeclarativepackage_p.h
index 57d9c22..6b12ef7 100644
--- a/src/declarative/util/qdeclarativepackage_p.h
+++ b/src/declarative/util/qdeclarativepackage_p.h
@@ -50,12 +50,6 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-/*****************************************************************************
- *****************************************************************************
- XXX Experimental
- *****************************************************************************
-*****************************************************************************/
-
class QDeclarativePackagePrivate;
class QDeclarativePackageAttached;
class Q_AUTOTEST_EXPORT QDeclarativePackage : public QObject
diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp
index e98afeb..8e3ec82 100644
--- a/src/declarative/util/qdeclarativepropertychanges.cpp
+++ b/src/declarative/util/qdeclarativepropertychanges.cpp
@@ -91,7 +91,7 @@ QT_BEGIN_NAMESPACE
\endqml
By default, PropertyChanges will establish new bindings where appropriate.
- For example, the following creates a new binding for myItem's height property.
+ For example, the following creates a new binding for myItem's \c height property.
\qml
PropertyChanges {
@@ -500,8 +500,8 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions()
If explicit is set to true, any potential bindings will be interpreted as
once-off assignments that occur when the state is entered.
- In the following example, the addition of explicit prevents myItem.width from
- being bound to parent.width. Instead, it is assigned the value of parent.width
+ In the following example, the addition of explicit prevents \c myItem.width from
+ being bound to \c parent.width. Instead, it is assigned the value of \c parent.width
at the time of the state change.
\qml
PropertyChanges {
diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp
index dc2b2cc..ae19a9c 100644
--- a/src/declarative/util/qdeclarativestate.cpp
+++ b/src/declarative/util/qdeclarativestate.cpp
@@ -136,12 +136,31 @@ QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObje
\since 4.7
\brief The State element defines configurations of objects and properties.
- A state is specified as a set of batched changes from the default configuration.
+ A \e state is a set of batched changes from the default configuration.
+
+ All items have a default state that defines the default configuration of objects
+ and property values. New states can be defined by adding State items to the \l {Item::states}{states} property to
+ allow items to switch between different configurations. These configurations
+ can, for example, be used to apply different sets of property values or execute
+ different scripts.
+
+ The following example displays a single Rectangle. In the default state, the rectangle
+ is colored black. In the "clicked" state, a PropertyChanges element changes the
+ rectangle's color to red. Clicking within the MouseArea toggles the rectangle's state
+ between the default state and the "clicked" state, thus toggling the color of the
+ rectangle between black and red.
+
+ \snippet doc/src/snippets/declarative/state.qml 0
+
+ Notice the default state is referred to using an empty string ("").
+
+ States are commonly used together with \l {state-transitions}{Transitions} to provide
+ animations when state changes occur.
\note setting the state of an object from within another state of the same object is
not allowed.
- \sa {qmlstates}{States}, {state-transitions}{Transitions}, QtDeclarative
+ \sa {declarative/animation/states}{states example}, {qmlstates}{States}, {state-transitions}{Transitions}, QtDeclarative
*/
/*!
@@ -173,7 +192,7 @@ QDeclarativeState::~QDeclarativeState()
/*!
\qmlproperty string State::name
- This property holds the name of the state
+ This property holds the name of the state.
Each state should have a unique name.
*/
@@ -187,6 +206,13 @@ void QDeclarativeState::setName(const QString &n)
{
Q_D(QDeclarativeState);
d->name = n;
+ d->named = true;
+}
+
+bool QDeclarativeState::isNamed() const
+{
+ Q_D(const QDeclarativeState);
+ return d->named;
}
bool QDeclarativeState::isWhenKnown() const
@@ -197,12 +223,12 @@ bool QDeclarativeState::isWhenKnown() const
/*!
\qmlproperty bool State::when
- This property holds when the state should be applied
+ This property holds when the state should be applied.
- This should be set to an expression that evaluates to true when you want the state to
+ This should be set to an expression that evaluates to \c true when you want the state to
be applied.
- If multiple states in a group have \c when clauses that evaluate to true at the same time,
+ If multiple states in a group have \c when clauses that evaluate to \c true at the same time,
the first matching state will be applied. For example, in the following snippet
\c state1 will always be selected rather than \c state2 when sharedCondition becomes
\c true.
@@ -229,7 +255,9 @@ void QDeclarativeState::setWhen(QDeclarativeBinding *when)
/*!
\qmlproperty string State::extend
- This property holds the state that this state extends
+ This property holds the state that this state extends.
+
+ When a state extends another state, it inherits all the changes of that state.
The state being extended is treated as the base state in regards to
the changes specified by the extending state.
diff --git a/src/declarative/util/qdeclarativestate_p.h b/src/declarative/util/qdeclarativestate_p.h
index 37b24cb..2e2ce7b 100644
--- a/src/declarative/util/qdeclarativestate_p.h
+++ b/src/declarative/util/qdeclarativestate_p.h
@@ -146,6 +146,7 @@ public:
QString name() const;
void setName(const QString &);
+ bool isNamed() const;
/*'when' is a QDeclarativeBinding to limit state changes oscillation
due to the unpredictable order of evaluation of bound expressions*/
diff --git a/src/declarative/util/qdeclarativestate_p_p.h b/src/declarative/util/qdeclarativestate_p_p.h
index 4a2af0f..2ef9bb0 100644
--- a/src/declarative/util/qdeclarativestate_p_p.h
+++ b/src/declarative/util/qdeclarativestate_p_p.h
@@ -101,12 +101,13 @@ class QDeclarativeStatePrivate : public QObjectPrivate
public:
QDeclarativeStatePrivate()
- : when(0), inState(false), group(0) {}
+ : when(0), named(false), inState(false), group(0) {}
typedef QList<QDeclarativeSimpleAction> SimpleActionList;
QString name;
QDeclarativeBinding *when;
+ bool named;
struct OperationGuard : public QDeclarativeGuard<QDeclarativeStateOperation>
{
diff --git a/src/declarative/util/qdeclarativestategroup.cpp b/src/declarative/util/qdeclarativestategroup.cpp
index 9b042d7..67cd12e 100644
--- a/src/declarative/util/qdeclarativestategroup.cpp
+++ b/src/declarative/util/qdeclarativestategroup.cpp
@@ -91,8 +91,8 @@ public:
\since 4.7
\brief The StateGroup element provides state support for non-Item elements.
- Item (and all dervied elements) provides built in support for states and transitions
- via its state, states and transitions properties. StateGroup provides an easy way to
+ Item (and all derived elements) provides built in support for states and transitions
+ via its \l{Item::state}{state}, \l{Item::states}{states} and \l{Item::transitions}{transitions} properties. StateGroup provides an easy way to
use this support in other (non-Item-derived) elements.
\qml
@@ -263,7 +263,7 @@ void QDeclarativeStateGroup::componentComplete()
for (int ii = 0; ii < d->states.count(); ++ii) {
QDeclarativeState *state = d->states.at(ii);
- if (state->name().isEmpty())
+ if (!state->isNamed())
state->setName(QLatin1String("anonymousState") % QString::number(++d->unnamedCount));
}
@@ -295,7 +295,7 @@ bool QDeclarativeStateGroupPrivate::updateAutoState()
for (int ii = 0; ii < states.count(); ++ii) {
QDeclarativeState *state = states.at(ii);
if (state->isWhenKnown()) {
- if (!state->name().isEmpty()) {
+ if (state->isNamed()) {
if (state->when() && state->when()->evaluate().toBool()) {
if (stateChangeDebug())
qWarning() << "Setting auto state due to:"
diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp
index 99f163e..51e6f99 100644
--- a/src/declarative/util/qdeclarativestateoperations.cpp
+++ b/src/declarative/util/qdeclarativestateoperations.cpp
@@ -172,6 +172,14 @@ void QDeclarativeParentChangePrivate::doChange(QDeclarativeItem *targetParent, Q
items involved in the reparenting (i.e. items in the common ancestor tree
for the original and new parent).
+ The example below displays a large red rectangle and a small blue rectangle, side by side.
+ When the \c blueRect is clicked, it changes to the "reparented" state: its parent is changed to \c redRect and it is
+ positioned at (10, 10) within the red rectangle, as specified in the ParentChange.
+
+ \snippet doc/src/snippets/declarative/parentchange.qml 0
+
+ \image parentchange.png
+
You can specify at which point in a transition you want a ParentChange to occur by
using a ParentAnimation.
*/
@@ -583,9 +591,9 @@ public:
\qmlclass StateChangeScript QDeclarativeStateChangeScript
\brief The StateChangeScript element allows you to run a script in a state.
- StateChangeScripts are run when entering the state. You can use
- ScriptAction to specify at which point in the transition
- you want the StateChangeScript to be run.
+ A StateChangeScript is run upon entering a state. You can optionally use
+ ScriptAction to specify the point in the transition at which
+ the StateChangeScript should to be run.
\qml
State {
@@ -687,22 +695,18 @@ QString QDeclarativeStateChangeScript::typeName() const
\qmlclass AnchorChanges QDeclarativeAnchorChanges
\brief The AnchorChanges element allows you to change the anchors of an item in a state.
- In the following example we change the top and bottom anchors of an item:
- \qml
- State {
- name: "reanchored"
- AnchorChanges {
- target: content;
- anchors.top: window.top;
- anchors.bottom: window.bottom
- }
- PropertyChanges {
- target: content;
- anchors.topMargin: 3
- anchors.bottomMargin: 3;
- }
- }
- \endqml
+ The AnchorChanges element is used to modify the anchors of an item in a \l State.
+
+ AnchorChanges cannot be used to modify the margins on an item. For this, use
+ PropertyChanges intead.
+
+ In the following example we change the top and bottom anchors of an item
+ using AnchorChanges, and the top and bottom anchor margins using
+ PropertyChanges:
+
+ \snippet doc/src/snippets/declarative/anchorchanges.qml 0
+
+ \image anchorchanges.png
AnchorChanges can be animated using AnchorAnimation.
\qml
diff --git a/src/declarative/util/qdeclarativesystempalette.cpp b/src/declarative/util/qdeclarativesystempalette.cpp
index 6c62446..c334859 100644
--- a/src/declarative/util/qdeclarativesystempalette.cpp
+++ b/src/declarative/util/qdeclarativesystempalette.cpp
@@ -59,22 +59,25 @@ public:
/*!
\qmlclass SystemPalette QDeclarativeSystemPalette
\since 4.7
- \brief The SystemPalette item gives access to the Qt palettes.
- \sa QPalette
+ \brief The SystemPalette element provides access to the Qt palettes.
- Example:
- \qml
- SystemPalette { id: myPalette; colorGroup: Qt.Active }
+ The SystemPalette element provides access to the Qt application
+ palettes. This provides information about the standard colors used
+ for application windows, buttons and other features. These colors
+ are grouped into three \e {color groups}: \c Active, \c Inactive,
+ and \c Disabled. See the QPalette documentation for details about
+ color groups and the properties provided by SystemPalette.
- Rectangle {
- width: 640; height: 480
- color: myPalette.window
- Text {
- anchors.fill: parent
- text: "Hello!"; color: myPalette.windowText
- }
- }
- \endqml
+ This can be used to color items in a way that provides a more
+ native look and feel.
+
+ The following example creates a palette from the \c Active color
+ group and uses this to color the window and text items
+ appropriately:
+
+ \snippet doc/src/snippets/declarative/systempalette.qml 0
+
+ \sa QPalette
*/
QDeclarativeSystemPalette::QDeclarativeSystemPalette(QObject *parent)
: QObject(*(new QDeclarativeSystemPalettePrivate), parent)
@@ -258,10 +261,15 @@ QColor QDeclarativeSystemPalette::highlightedText() const
}
/*!
- \qmlproperty QDeclarativeSystemPalette::ColorGroup SystemPalette::colorGroup
+ \qmlproperty enumeration SystemPalette::colorGroup
+
+ The color group of the palette. This can be one of:
- The color group of the palette. It can be Active, Inactive or Disabled.
- Active is the default.
+ \list
+ \o SystemPalette.Active (default)
+ \o SystemPalette.Inactive
+ \o SystemPalette.Disabled
+ \endlist
\sa QPalette::ColorGroup
*/
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp
index 6059ad6..0414e65 100644
--- a/src/declarative/util/qdeclarativeview.cpp
+++ b/src/declarative/util/qdeclarativeview.cpp
@@ -131,7 +131,7 @@ class QDeclarativeViewPrivate : public QGraphicsViewPrivate, public QDeclarative
Q_DECLARE_PUBLIC(QDeclarativeView)
public:
QDeclarativeViewPrivate()
- : root(0), declarativeItemRoot(0), graphicsWidgetRoot(0), component(0), resizeMode(QDeclarativeView::SizeViewToRootObject) {}
+ : root(0), declarativeItemRoot(0), graphicsWidgetRoot(0), component(0), resizeMode(QDeclarativeView::SizeViewToRootObject), initialSize(0,0) {}
~QDeclarativeViewPrivate() { delete root; }
void execute();
void itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry);
@@ -150,6 +150,7 @@ public:
QBasicTimer resizetimer;
QDeclarativeView::ResizeMode resizeMode;
+ QSize initialSize;
QElapsedTimer frameTimer;
void init();
@@ -586,9 +587,11 @@ void QDeclarativeView::setRootObject(QObject *obj)
}
if (d->root) {
- QSize initialSize = d->rootObjectSize();
- if (initialSize != size()) {
- resize(initialSize);
+ d->initialSize = d->rootObjectSize();
+ if (d->initialSize != size()) {
+ if (!(parentWidget() && parentWidget()->layout())) {
+ resize(d->initialSize);
+ }
}
d->initResize();
}
@@ -638,6 +641,15 @@ QSize QDeclarativeView::sizeHint() const
}
/*!
+ Returns the initial size of the root object
+*/
+QSize QDeclarativeView::initialSize() const
+{
+ Q_D(const QDeclarativeView);
+ return d->initialSize;
+}
+
+/*!
Returns the view's root \l {QGraphicsObject} {item}.
*/
QGraphicsObject *QDeclarativeView::rootObject() const
diff --git a/src/declarative/util/qdeclarativeview.h b/src/declarative/util/qdeclarativeview.h
index e9cff32..cdcf134 100644
--- a/src/declarative/util/qdeclarativeview.h
+++ b/src/declarative/util/qdeclarativeview.h
@@ -90,6 +90,7 @@ public:
QList<QDeclarativeError> errors() const;
QSize sizeHint() const;
+ QSize initialSize() const;
Q_SIGNALS:
void sceneResized(QSize size); // ???
diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp
index 4f9355b..4adef25 100644
--- a/src/declarative/util/qdeclarativexmllistmodel.cpp
+++ b/src/declarative/util/qdeclarativexmllistmodel.cpp
@@ -523,10 +523,13 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla
A XmlListModel could create a model from this data, like this:
\qml
+ import Qt 4.7
+
XmlListModel {
id: xmlModel
source: "http://www.mysite.com/feed.xml"
query: "/rss/channel/item"
+
XmlRole { name: "title"; query: "title/string()" }
XmlRole { name: "pubDate"; query: "pubDate/string()" }
}
@@ -536,7 +539,7 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla
a model item for each \c <item> in the XML document.
The XmlRole objects define the
- model item attributes; here, each model item will have \c title and \c pubDate
+ model item attributes. Here, each model item will have \c title and \c pubDate
attributes that match the \c title and \c pubDate values of its corresponding \c <item>.
(See \l XmlRole::query for more examples of valid XPath expressions for XmlRole.)
@@ -672,11 +675,11 @@ void QDeclarativeXmlListModel::setSource(const QUrl &src)
/*!
\qmlproperty string XmlListModel::xml
- This property holds XML text set directly.
+ This property holds the XML data for this model, if set.
The text is assumed to be UTF-8 encoded.
- If both source and xml are set, xml will be used.
+ If both \l source and \c xml are set, \c xml will be used.
*/
QString QDeclarativeXmlListModel::xml() const
{
@@ -733,6 +736,7 @@ void QDeclarativeXmlListModel::setQuery(const QString &query)
source: "http://mysite.com/feed.xml"
query: "/feed/entry"
namespaceDeclarations: "declare default element namespace 'http://www.w3.org/2005/Atom';"
+
XmlRole { name: "title"; query: "title/string()" }
}
\endqml
diff --git a/src/declarative/3rdparty/qlistmodelinterface.cpp b/src/declarative/util/qlistmodelinterface.cpp
index 98d6a5b..98d6a5b 100644
--- a/src/declarative/3rdparty/qlistmodelinterface.cpp
+++ b/src/declarative/util/qlistmodelinterface.cpp
diff --git a/src/declarative/3rdparty/qlistmodelinterface_p.h b/src/declarative/util/qlistmodelinterface_p.h
index 07592ad..07592ad 100644
--- a/src/declarative/3rdparty/qlistmodelinterface_p.h
+++ b/src/declarative/util/qlistmodelinterface_p.h
diff --git a/src/declarative/util/util.pri b/src/declarative/util/util.pri
index f20bba1..04cfc68 100644
--- a/src/declarative/util/util.pri
+++ b/src/declarative/util/util.pri
@@ -27,7 +27,8 @@ SOURCES += \
$$PWD/qdeclarativebehavior.cpp \
$$PWD/qdeclarativefontloader.cpp \
$$PWD/qdeclarativestyledtext.cpp \
- $$PWD/qdeclarativelistmodelworkeragent.cpp
+ $$PWD/qdeclarativelistmodelworkeragent.cpp \
+ $$PWD/qlistmodelinterface.cpp
HEADERS += \
$$PWD/qdeclarativeutilmodule_p.h\
@@ -61,7 +62,8 @@ HEADERS += \
$$PWD/qdeclarativebehavior_p.h \
$$PWD/qdeclarativefontloader_p.h \
$$PWD/qdeclarativestyledtext_p.h \
- $$PWD/qdeclarativelistmodelworkeragent_p.h
+ $$PWD/qdeclarativelistmodelworkeragent_p.h \
+ $$PWD/qlistmodelinterface_p.h
contains(QT_CONFIG, xmlpatterns) {
QT+=xmlpatterns
diff --git a/src/gui/graphicsview/qgraphicsgridlayout.cpp b/src/gui/graphicsview/qgraphicsgridlayout.cpp
index 6ca799d..83db3ec 100644
--- a/src/gui/graphicsview/qgraphicsgridlayout.cpp
+++ b/src/gui/graphicsview/qgraphicsgridlayout.cpp
@@ -572,6 +572,18 @@ void QGraphicsGridLayout::removeAt(int index)
if (QGraphicsLayoutItem *layoutItem = gridItem->layoutItem())
layoutItem->setParentLayoutItem(0);
d->engine.removeItem(gridItem);
+
+ // recalculate rowInfo.count if we remove an item that is on the right/bottommost row
+ for (int j = 0; j < NOrientations; ++j) {
+ // 0: Hor, 1: Ver
+ const Qt::Orientation orient = (j == 0 ? Qt::Horizontal : Qt::Vertical);
+ const int oldCount = d->engine.rowCount(orient);
+ if (gridItem->lastRow(orient) == oldCount - 1) {
+ const int newCount = d->engine.effectiveLastRow(orient) + 1;
+ d->engine.removeRows(newCount, oldCount - newCount, orient);
+ }
+ }
+
delete gridItem;
invalidate();
}
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 8042c46..c9176d1 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -3277,7 +3277,8 @@ void QGraphicsItemPrivate::setFocusHelper(Qt::FocusReason focusReason, bool clim
*/
void QGraphicsItem::clearFocus()
{
- d_ptr->clearFocusHelper(/* giveFocusToParent = */ true);
+ if (hasFocus())
+ d_ptr->clearFocusHelper(/* giveFocusToParent = */ true);
}
/*!
diff --git a/src/gui/graphicsview/qgraphicslinearlayout.cpp b/src/gui/graphicsview/qgraphicslinearlayout.cpp
index 9722683..b828722 100644
--- a/src/gui/graphicsview/qgraphicslinearlayout.cpp
+++ b/src/gui/graphicsview/qgraphicslinearlayout.cpp
@@ -147,7 +147,7 @@ void QGraphicsLinearLayoutPrivate::removeGridItem(QGridLayoutItem *gridItem)
{
int index = gridItem->firstRow(orientation);
engine.removeItem(gridItem);
- engine.removeRow(index, orientation);
+ engine.removeRows(index, 1, orientation);
}
void QGraphicsLinearLayoutPrivate::fixIndex(int *index) const
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 7b0722e..ca3b56f 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -6100,8 +6100,15 @@ void QGraphicsScenePrivate::gestureEventHandler(QGestureEvent *event)
if (ev.isAccepted() || ev.isAccepted(g)) {
conflictedGestures.remove(g);
// mark the item as a gesture target
- if (item)
+ if (item) {
gestureTargets.insert(g, item.data());
+ QHash<QGraphicsObject *, QSet<QGesture *> >::iterator it, e;
+ it = cachedItemGestures.begin();
+ e = cachedItemGestures.end();
+ for(; it != e; ++it)
+ it.value().remove(g);
+ cachedItemGestures[item.data()].insert(g);
+ }
DEBUG() << "QGraphicsScenePrivate::gestureEventHandler:"
<< "override was accepted:"
<< g << item.data();
@@ -6270,7 +6277,8 @@ void QGraphicsScenePrivate::cancelGesturesForChildren(QGesture *original)
{
Q_ASSERT(original);
QGraphicsItem *originalItem = gestureTargets.value(original);
- Q_ASSERT(originalItem);
+ if (originalItem == 0) // we only act on accepted gestures, which implies it has a target.
+ return;
// iterate over all active gestures and for each find the owner
// if the owner is part of our sub-hierarchy, cancel it.
diff --git a/src/gui/graphicsview/qgridlayoutengine_p.h b/src/gui/graphicsview/qgridlayoutengine_p.h
index cbf704e..9ac9a8e 100644
--- a/src/gui/graphicsview/qgridlayoutengine_p.h
+++ b/src/gui/graphicsview/qgridlayoutengine_p.h
@@ -363,8 +363,8 @@ public:
QGridLayoutItem *itemAt(int row, int column, Qt::Orientation orientation = Qt::Vertical) const;
inline void insertRow(int row, Qt::Orientation orientation = Qt::Vertical)
{ insertOrRemoveRows(row, +1, orientation); }
- inline void removeRow(int row, Qt::Orientation orientation = Qt::Vertical)
- { insertOrRemoveRows(row, -1, orientation); }
+ inline void removeRows(int row, int count, Qt::Orientation orientation)
+ { insertOrRemoveRows(row, -count, orientation); }
void invalidate();
void setGeometries(const QLayoutStyleInfo &styleInfo, const QRectF &contentsGeometry);
diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri
index 8d75fdd..c4eac95 100644
--- a/src/gui/image/image.pri
+++ b/src/gui/image/image.pri
@@ -93,12 +93,12 @@ SOURCES += \
SOURCES += image/qpnghandler.cpp
contains(QT_CONFIG, system-png) {
- unix:LIBS_PRIVATE += -lpng
- win32:LIBS += libpng.lib
+ unix|win32-g++*:LIBS_PRIVATE += -lpng
+ win32:!win32-g++*:LIBS += libpng.lib
} else {
DEFINES *= QT_USE_BUNDLED_LIBPNG
!isEqual(QT_ARCH, i386):!isEqual(QT_ARCH, x86_64):DEFINES += PNG_NO_ASSEMBLER_CODE
- INCLUDEPATH += ../3rdparty/libpng ../3rdparty/zlib
+ INCLUDEPATH += ../3rdparty/libpng
SOURCES += ../3rdparty/libpng/png.c \
../3rdparty/libpng/pngerror.c \
../3rdparty/libpng/pngget.c \
@@ -114,6 +114,14 @@ SOURCES += \
../3rdparty/libpng/pngwrite.c \
../3rdparty/libpng/pngwtran.c \
../3rdparty/libpng/pngwutil.c
+
+ contains(QT_CONFIG, system-zlib) {
+ symbian:LIBS_PRIVATE += -llibz
+ else:if(unix|win32-g++*):LIBS_PRIVATE += -lz
+ else:LIBS += zdll.lib
+ } else {
+ INCLUDEPATH += ../3rdparty/zlib
+ }
}
} else {
DEFINES *= QT_NO_IMAGEFORMAT_PNG
diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp
index 42e19b8..074b8f0 100644
--- a/src/gui/image/qbmphandler.cpp
+++ b/src/gui/image/qbmphandler.cpp
@@ -674,13 +674,15 @@ bool QBmpHandler::readHeader()
bool QBmpHandler::canRead() const
{
- if (state == Ready) {
- if (!canRead(device()))
- return false;
+ if (state == Ready && !canRead(device()))
+ return false;
+
+ if (state != Error) {
setFormat("bmp");
return true;
}
- return state != Error;
+
+ return false;
}
bool QBmpHandler::canRead(QIODevice *device)
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index d89ffe6..bb8a994 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -2274,6 +2274,8 @@ bool QImage::create(const QSize& size, int depth, int numColors, QImage::Endian
typedef void (*Image_Converter)(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags);
+typedef bool (*InPlace_Image_Converter)(QImageData *data, Qt::ImageConversionFlags);
+
static void convert_ARGB_to_ARGB_PM(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
{
Q_ASSERT(src->format == QImage::Format_ARGB32);
@@ -2298,6 +2300,169 @@ static void convert_ARGB_to_ARGB_PM(QImageData *dest, const QImageData *src, Qt:
}
}
+static bool convert_ARGB_to_ARGB_PM_inplace(QImageData *data, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(data->format == QImage::Format_ARGB32);
+
+ const int pad = (data->bytes_per_line >> 2) - data->width;
+ QRgb *rgb_data = (QRgb *) data->data;
+
+ for (int i = 0; i < data->height; ++i) {
+ const QRgb *end = rgb_data + data->width;
+ while (rgb_data < end) {
+ *rgb_data = PREMUL(*rgb_data);
+ ++rgb_data;
+ }
+ rgb_data += pad;
+ }
+ data->format = QImage::Format_ARGB32_Premultiplied;
+ return true;
+}
+
+static bool convert_indexed8_to_ARGB_PM_inplace(QImageData *data, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(data->format == QImage::Format_Indexed8);
+ const int depth = 32;
+
+ const int dst_bytes_per_line = ((data->width * depth + 31) >> 5) << 2;
+ const int nbytes = dst_bytes_per_line * data->height;
+ uchar *const newData = (uchar *)realloc(data->data, nbytes);
+ if (!newData)
+ return false;
+
+ data->data = newData;
+
+ // start converting from the end because the end image is bigger than the source
+ uchar *src_data = newData + data->nbytes; // end of src
+ quint32 *dest_data = (quint32 *) (newData + nbytes); // end of dest > end of src
+ const int width = data->width;
+ const int src_pad = data->bytes_per_line - width;
+ const int dest_pad = (dst_bytes_per_line >> 2) - width;
+
+ for (int i = 0; i < data->height; ++i) {
+ src_data -= src_pad;
+ dest_data -= dest_pad;
+ for (int pixI = 0; pixI < width; ++pixI) {
+ --src_data;
+ --dest_data;
+ const uint pixel = data->colortable[*src_data];
+ *dest_data = (quint32) PREMUL(pixel);
+ }
+ }
+
+ data->format = QImage::Format_ARGB32_Premultiplied;
+ data->bytes_per_line = dst_bytes_per_line;
+ data->depth = depth;
+ data->nbytes = nbytes;
+
+ return true;
+}
+
+static bool convert_indexed8_to_RGB_inplace(QImageData *data, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(data->format == QImage::Format_Indexed8);
+ const int depth = 32;
+
+ const int dst_bytes_per_line = ((data->width * depth + 31) >> 5) << 2;
+ const int nbytes = dst_bytes_per_line * data->height;
+ uchar *const newData = (uchar *)realloc(data->data, nbytes);
+ if (!newData)
+ return false;
+
+ data->data = newData;
+
+ // start converting from the end because the end image is bigger than the source
+ uchar *src_data = newData + data->nbytes;
+ quint32 *dest_data = (quint32 *) (newData + nbytes);
+ const int width = data->width;
+ const int src_pad = data->bytes_per_line - width;
+ const int dest_pad = (dst_bytes_per_line >> 2) - width;
+
+ for (int i = 0; i < data->height; ++i) {
+ src_data -= src_pad;
+ dest_data -= dest_pad;
+ for (int pixI = 0; pixI < width; ++pixI) {
+ --src_data;
+ --dest_data;
+ *dest_data = (quint32) data->colortable[*src_data];
+ }
+ }
+
+ data->format = QImage::Format_RGB32;
+ data->bytes_per_line = dst_bytes_per_line;
+ data->depth = depth;
+ data->nbytes = nbytes;
+
+ return true;
+}
+
+static bool convert_indexed8_to_RGB16_inplace(QImageData *data, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(data->format == QImage::Format_Indexed8);
+ const int depth = 16;
+
+ const int dst_bytes_per_line = ((data->width * depth + 31) >> 5) << 2;
+ const int nbytes = dst_bytes_per_line * data->height;
+ uchar *const newData = (uchar *)realloc(data->data, nbytes);
+ if (!newData)
+ return false;
+
+ data->data = newData;
+
+ // start converting from the end because the end image is bigger than the source
+ uchar *src_data = newData + data->nbytes;
+ quint16 *dest_data = (quint16 *) (newData + nbytes);
+ const int width = data->width;
+ const int src_pad = data->bytes_per_line - width;
+ const int dest_pad = (dst_bytes_per_line >> 1) - width;
+
+ for (int i = 0; i < data->height; ++i) {
+ src_data -= src_pad;
+ dest_data -= dest_pad;
+ for (int pixI = 0; pixI < width; ++pixI) {
+ --src_data;
+ --dest_data;
+ const uint pixel = data->colortable[*src_data];
+ *dest_data = qt_colorConvert<quint16, quint32>(pixel, 0);
+ }
+ }
+
+ data->format = QImage::Format_RGB16;
+ data->bytes_per_line = dst_bytes_per_line;
+ data->depth = depth;
+ data->nbytes = nbytes;
+
+ return true;
+}
+
+static bool convert_RGB_to_RGB16_inplace(QImageData *data, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(data->format == QImage::Format_RGB32);
+ const int depth = 16;
+
+ const int dst_bytes_per_line = ((data->width * depth + 31) >> 5) << 2;
+ const int src_bytes_per_line = data->bytes_per_line;
+ quint32 *src_data = (quint32 *) data->data;
+ quint16 *dst_data = (quint16 *) data->data;
+
+ for (int i = 0; i < data->height; ++i) {
+ qt_memconvert(dst_data, src_data, data->width);
+ src_data = (quint32 *) (((char*)src_data) + src_bytes_per_line);
+ dst_data = (quint16 *) (((char*)dst_data) + dst_bytes_per_line);
+ }
+ data->format = QImage::Format_RGB16;
+ data->bytes_per_line = dst_bytes_per_line;
+ data->depth = depth;
+ data->nbytes = dst_bytes_per_line * data->height;
+ uchar *const newData = (uchar *)realloc(data->data, data->nbytes);
+ if (newData) {
+ data->data = newData;
+ return true;
+ } else {
+ return false;
+ }
+}
+
static void convert_ARGB_PM_to_ARGB(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
{
Q_ASSERT(src->format == QImage::Format_ARGB32_Premultiplied);
@@ -3447,6 +3612,103 @@ static const Image_Converter converter_map[QImage::NImageFormats][QImage::NImage
} // Format_ARGB4444_Premultiplied
};
+static const InPlace_Image_Converter inplace_converter_map[QImage::NImageFormats][QImage::NImageFormats] =
+{
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }, // Format_Mono
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }, // Format_MonoLSB
+ {
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ convert_indexed8_to_RGB_inplace,
+ convert_indexed8_to_ARGB_PM_inplace,
+ convert_indexed8_to_RGB16_inplace,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ }, // Format_Indexed8
+ {
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ convert_RGB_to_RGB16_inplace,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ }, // Format_ARGB32
+ {
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ convert_ARGB_to_ARGB_PM_inplace,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ }, // Format_ARGB32
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }, // Format_ARGB32_Premultiplied
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }, // Format_RGB16
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }, // Format_ARGB8565_Premultiplied
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }, // Format_RGB666
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }, // Format_ARGB6666_Premultiplied
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }, // Format_RGB555
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }, // Format_ARGB8555_Premultiplied
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }, // Format_RGB888
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }, // Format_RGB444
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ } // Format_ARGB4444_Premultiplied
+};
+
/*!
Returns a copy of the image in the given \a format.
@@ -4210,6 +4472,7 @@ QImage QImage::createHeuristicMask(bool clipTight) const
int w = width();
int h = height();
QImage m(w, h, Format_MonoLSB);
+ QIMAGE_SANITYCHECK_MEMORY(m);
m.setColorCount(2);
m.setColor(0, QColor(Qt::color0).rgba());
m.setColor(1, QColor(Qt::color1).rgba());
@@ -4302,6 +4565,7 @@ QImage QImage::createMaskFromColor(QRgb color, Qt::MaskMode mode) const
if (!d)
return QImage();
QImage maskImage(size(), QImage::Format_MonoLSB);
+ QIMAGE_SANITYCHECK_MEMORY(maskImage);
maskImage.fill(0);
uchar *s = maskImage.bits();
@@ -4362,6 +4626,7 @@ QImage QImage::mirrored(bool horizontal, bool vertical) const
int h = d->height;
// Create result image, copy colormap
QImage result(d->width, d->height, d->format);
+ QIMAGE_SANITYCHECK_MEMORY(result);
// check if we ran out of of memory..
if (!result.d)
@@ -4499,6 +4764,7 @@ QImage QImage::rgbSwapped() const
case Format_ARGB32:
case Format_ARGB32_Premultiplied:
res = QImage(d->width, d->height, d->format);
+ QIMAGE_SANITYCHECK_MEMORY(res);
for (int i = 0; i < d->height; i++) {
uint *q = (uint*)res.scanLine(i);
uint *p = (uint*)scanLine(i);
@@ -4512,6 +4778,7 @@ QImage QImage::rgbSwapped() const
break;
case Format_RGB16:
res = QImage(d->width, d->height, d->format);
+ QIMAGE_SANITYCHECK_MEMORY(res);
for (int i = 0; i < d->height; i++) {
ushort *q = (ushort*)res.scanLine(i);
const ushort *p = (const ushort*)scanLine(i);
@@ -4525,6 +4792,7 @@ QImage QImage::rgbSwapped() const
break;
case Format_ARGB8565_Premultiplied:
res = QImage(d->width, d->height, d->format);
+ QIMAGE_SANITYCHECK_MEMORY(res);
for (int i = 0; i < d->height; i++) {
quint8 *p = (quint8*)scanLine(i);
const quint8 *end = p + d->width * sizeof(qargb8565);
@@ -4537,6 +4805,7 @@ QImage QImage::rgbSwapped() const
break;
case Format_RGB666:
res = QImage(d->width, d->height, d->format);
+ QIMAGE_SANITYCHECK_MEMORY(res);
for (int i = 0; i < d->height; i++) {
qrgb666 *q = reinterpret_cast<qrgb666*>(res.scanLine(i));
const qrgb666 *p = reinterpret_cast<const qrgb666*>(scanLine(i));
@@ -4549,6 +4818,7 @@ QImage QImage::rgbSwapped() const
break;
case Format_ARGB6666_Premultiplied:
res = QImage(d->width, d->height, d->format);
+ QIMAGE_SANITYCHECK_MEMORY(res);
for (int i = 0; i < d->height; i++) {
qargb6666 *q = reinterpret_cast<qargb6666*>(res.scanLine(i));
const qargb6666 *p = reinterpret_cast<const qargb6666*>(scanLine(i));
@@ -4561,6 +4831,7 @@ QImage QImage::rgbSwapped() const
break;
case Format_RGB555:
res = QImage(d->width, d->height, d->format);
+ QIMAGE_SANITYCHECK_MEMORY(res);
for (int i = 0; i < d->height; i++) {
ushort *q = (ushort*)res.scanLine(i);
const ushort *p = (const ushort*)scanLine(i);
@@ -4574,6 +4845,7 @@ QImage QImage::rgbSwapped() const
break;
case Format_ARGB8555_Premultiplied:
res = QImage(d->width, d->height, d->format);
+ QIMAGE_SANITYCHECK_MEMORY(res);
for (int i = 0; i < d->height; i++) {
quint8 *p = (quint8*)scanLine(i);
const quint8 *end = p + d->width * sizeof(qargb8555);
@@ -4586,6 +4858,7 @@ QImage QImage::rgbSwapped() const
break;
case Format_RGB888:
res = QImage(d->width, d->height, d->format);
+ QIMAGE_SANITYCHECK_MEMORY(res);
for (int i = 0; i < d->height; i++) {
quint8 *q = reinterpret_cast<quint8*>(res.scanLine(i));
const quint8 *p = reinterpret_cast<const quint8*>(scanLine(i));
@@ -4601,6 +4874,7 @@ QImage QImage::rgbSwapped() const
break;
case Format_RGB444:
res = QImage(d->width, d->height, d->format);
+ QIMAGE_SANITYCHECK_MEMORY(res);
for (int i = 0; i < d->height; i++) {
quint8 *q = reinterpret_cast<quint8*>(res.scanLine(i));
const quint8 *p = reinterpret_cast<const quint8*>(scanLine(i));
@@ -4615,6 +4889,7 @@ QImage QImage::rgbSwapped() const
break;
case Format_ARGB4444_Premultiplied:
res = QImage(d->width, d->height, d->format);
+ QIMAGE_SANITYCHECK_MEMORY(res);
for (int i = 0; i < d->height; i++) {
quint8 *q = reinterpret_cast<quint8*>(res.scanLine(i));
const quint8 *p = reinterpret_cast<const quint8*>(scanLine(i));
@@ -6263,6 +6538,18 @@ QTransform QImage::trueMatrix(const QTransform &matrix, int w, int h)
return matrix * QTransform().translate(-delta.x(), -delta.y());
}
+bool QImageData::convertInPlace(QImage::Format newFormat, Qt::ImageConversionFlags flags)
+{
+ if (format == newFormat)
+ return true;
+
+ const InPlace_Image_Converter *const converterPtr = &inplace_converter_map[format][newFormat];
+ InPlace_Image_Converter converter = *converterPtr;
+ if (converter)
+ return converter(this, flags);
+ else
+ return false;
+}
/*!
\typedef QImage::DataPtr
diff --git a/src/gui/image/qimage_p.h b/src/gui/image/qimage_p.h
index 0c19647..f1a0c47 100644
--- a/src/gui/image/qimage_p.h
+++ b/src/gui/image/qimage_p.h
@@ -96,6 +96,9 @@ struct Q_GUI_EXPORT QImageData { // internal image data
bool checkForAlphaPixels() const;
+ // Convert the image in-place, minimizing memory reallocation
+ // Return false if the conversion cannot be done in-place.
+ bool convertInPlace(QImage::Format newFormat, Qt::ImageConversionFlags);
#ifndef QT_NO_IMAGE_TEXT
QMap<QString, QString> text;
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 20e4b50..fd2c139 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -1766,6 +1766,9 @@ QPixmap QPixmap::transformed(const QMatrix &matrix, Qt::TransformationMode mode)
function returns the actual matrix used for transforming the
pixmap.
+ \note When using the native X11 graphics system, the pixmap
+ becomes invalid when the QApplication instance is destroyed.
+
\sa QBitmap, QImage, QImageReader, QImageWriter
*/
diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp
index 9dc15fc..13c03a1 100644
--- a/src/gui/image/qpixmap_raster.cpp
+++ b/src/gui/image/qpixmap_raster.cpp
@@ -47,6 +47,9 @@
#include "qbitmap.h"
#include "qimage.h"
+#include <QBuffer>
+#include <QImageReader>
+#include <private/qsimd_p.h>
#include <private/qwidget_p.h>
#include <private/qdrawhelper_p.h>
@@ -127,91 +130,26 @@ void QRasterPixmapData::resize(int width, int height)
setSerialNumber(image.serialNumber());
}
+bool QRasterPixmapData::fromData(const uchar *buffer, uint len, const char *format,
+ Qt::ImageConversionFlags flags)
+{
+ QByteArray a = QByteArray::fromRawData(reinterpret_cast<const char *>(buffer), len);
+ QBuffer b(&a);
+ b.open(QIODevice::ReadOnly);
+ QImage image = QImageReader(&b, format).read();
+ if (image.isNull())
+ return false;
+
+ createPixmapForImage(image, flags, /* inplace = */true);
+ return !isNull();
+}
+
void QRasterPixmapData::fromImage(const QImage &sourceImage,
Qt::ImageConversionFlags flags)
{
Q_UNUSED(flags);
-
-#ifdef Q_WS_QWS
- QImage::Format format;
- if (pixelType() == BitmapType) {
- format = QImage::Format_Mono;
- } else {
- format = QScreen::instance()->pixelFormat();
- if (format == QImage::Format_Invalid)
- format = QImage::Format_ARGB32_Premultiplied;
- else if (format == QImage::Format_Indexed8) // currently not supported
- format = QImage::Format_RGB444;
- }
-
- if (sourceImage.hasAlphaChannel()
- && ((flags & Qt::NoOpaqueDetection)
- || const_cast<QImage &>(sourceImage).data_ptr()->checkForAlphaPixels())) {
- switch (format) {
- case QImage::Format_RGB16:
- format = QImage::Format_ARGB8565_Premultiplied;
- break;
- case QImage::Format_RGB666:
- format = QImage::Format_ARGB6666_Premultiplied;
- break;
- case QImage::Format_RGB555:
- format = QImage::Format_ARGB8555_Premultiplied;
- break;
- case QImage::Format_RGB444:
- format = QImage::Format_ARGB4444_Premultiplied;
- break;
- default:
- format = QImage::Format_ARGB32_Premultiplied;
- break;
- }
- } else if (format == QImage::Format_Invalid) {
- format = QImage::Format_ARGB32_Premultiplied;
- }
-
- image = sourceImage.convertToFormat(format);
-#else
- if (pixelType() == BitmapType) {
- image = sourceImage.convertToFormat(QImage::Format_MonoLSB);
- } else {
- if (sourceImage.depth() == 1) {
- image = sourceImage.hasAlphaChannel()
- ? sourceImage.convertToFormat(QImage::Format_ARGB32_Premultiplied)
- : sourceImage.convertToFormat(QImage::Format_RGB32);
- } else {
-
- QImage::Format opaqueFormat = QNativeImage::systemFormat();
- QImage::Format alphaFormat = QImage::Format_ARGB32_Premultiplied;
-
-#ifndef QT_HAVE_NEON
- switch (opaqueFormat) {
- case QImage::Format_RGB16:
- alphaFormat = QImage::Format_ARGB8565_Premultiplied;
- break;
- default: // We don't care about the others...
- break;
- }
-#endif
-
- if (!sourceImage.hasAlphaChannel()
- || ((flags & Qt::NoOpaqueDetection) == 0
- && !const_cast<QImage &>(sourceImage).data_ptr()->checkForAlphaPixels())) {
- image = sourceImage.convertToFormat(opaqueFormat);
- } else {
- image = sourceImage.convertToFormat(alphaFormat);
- }
- }
- }
-#endif
- if (image.d) {
- w = image.d->width;
- h = image.d->height;
- d = image.d->depth;
- } else {
- w = h = d = 0;
- }
- is_null = (w <= 0 || h <= 0);
-
- setSerialNumber(image.serialNumber());
+ QImage image = sourceImage;
+ createPixmapForImage(image, flags, /* inplace = */false);
}
// from qwindowsurface.cpp
@@ -240,7 +178,7 @@ void QRasterPixmapData::fill(const QColor &color)
if (alpha != 255) {
if (!image.hasAlphaChannel()) {
QImage::Format toFormat;
-#ifndef QT_HAVE_NEON
+#if !(defined(QT_HAVE_NEON) || defined(QT_ALWAYS_HAVE_SSE2))
if (image.format() == QImage::Format_RGB16)
toFormat = QImage::Format_ARGB8565_Premultiplied;
else if (image.format() == QImage::Format_RGB666)
@@ -398,6 +336,105 @@ int QRasterPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
return 0;
}
+void QRasterPixmapData::createPixmapForImage(QImage &sourceImage, Qt::ImageConversionFlags flags, bool inPlace)
+{
+ QImage::Format format;
+#ifdef Q_WS_QWS
+ if (pixelType() == BitmapType) {
+ format = QImage::Format_Mono;
+ } else {
+ format = QScreen::instance()->pixelFormat();
+ if (format == QImage::Format_Invalid)
+ format = QImage::Format_ARGB32_Premultiplied;
+ else if (format == QImage::Format_Indexed8) // currently not supported
+ format = QImage::Format_RGB444;
+ }
+
+ if (sourceImage.hasAlphaChannel()
+ && ((flags & Qt::NoOpaqueDetection)
+ || const_cast<QImage &>(sourceImage).data_ptr()->checkForAlphaPixels())) {
+ switch (format) {
+ case QImage::Format_RGB16:
+ format = QImage::Format_ARGB8565_Premultiplied;
+ break;
+ case QImage::Format_RGB666:
+ format = QImage::Format_ARGB6666_Premultiplied;
+ break;
+ case QImage::Format_RGB555:
+ format = QImage::Format_ARGB8555_Premultiplied;
+ break;
+ case QImage::Format_RGB444:
+ format = QImage::Format_ARGB4444_Premultiplied;
+ break;
+ default:
+ format = QImage::Format_ARGB32_Premultiplied;
+ break;
+ }
+ } else if (format == QImage::Format_Invalid) {
+ format = QImage::Format_ARGB32_Premultiplied;
+ }
+#else
+ if (pixelType() == BitmapType) {
+ format = QImage::Format_MonoLSB;
+ } else {
+ if (sourceImage.depth() == 1) {
+ format = sourceImage.hasAlphaChannel()
+ ? QImage::Format_ARGB32_Premultiplied
+ : QImage::Format_RGB32;
+ } else {
+ QImage::Format opaqueFormat = QNativeImage::systemFormat();
+ QImage::Format alphaFormat = QImage::Format_ARGB32_Premultiplied;
+
+#if !defined(QT_HAVE_NEON) && !defined(QT_ALWAYS_HAVE_SSE2)
+ switch (opaqueFormat) {
+ case QImage::Format_RGB16:
+ alphaFormat = QImage::Format_ARGB8565_Premultiplied;
+ break;
+ default: // We don't care about the others...
+ break;
+ }
+#endif
+
+ if (!sourceImage.hasAlphaChannel()) {
+ format = opaqueFormat;
+ } else if ((flags & Qt::NoOpaqueDetection) == 0
+ && !const_cast<QImage &>(sourceImage).data_ptr()->checkForAlphaPixels())
+ {
+ // image has alpha format but is really opaque, so try to do a
+ // more efficient conversion
+ if (sourceImage.format() == QImage::Format_ARGB32
+ || sourceImage.format() == QImage::Format_ARGB32_Premultiplied)
+ {
+ if (!inPlace)
+ sourceImage.detach();
+ sourceImage.d->format = QImage::Format_RGB32;
+ }
+ format = opaqueFormat;
+ } else {
+ format = alphaFormat;
+ }
+ }
+ }
+#endif
+
+ if (inPlace && sourceImage.d->convertInPlace(format, flags)) {
+ image = sourceImage;
+ } else {
+ image = sourceImage.convertToFormat(format);
+ }
+
+ if (image.d) {
+ w = image.d->width;
+ h = image.d->height;
+ d = image.d->depth;
+ } else {
+ w = h = d = 0;
+ }
+ is_null = (w <= 0 || h <= 0);
+
+ setSerialNumber(image.serialNumber());
+}
+
QImage* QRasterPixmapData::buffer()
{
return &image;
diff --git a/src/gui/image/qpixmap_raster_p.h b/src/gui/image/qpixmap_raster_p.h
index 6cdd3d7..d7e3f85 100644
--- a/src/gui/image/qpixmap_raster_p.h
+++ b/src/gui/image/qpixmap_raster_p.h
@@ -72,6 +72,7 @@ public:
void resize(int width, int height);
void fromFile(const QString &filename, Qt::ImageConversionFlags flags);
+ bool fromData(const uchar *buffer, uint len, const char *format, Qt::ImageConversionFlags flags);
void fromImage(const QImage &image, Qt::ImageConversionFlags flags);
bool scroll(int dx, int dy, const QRect &rect);
@@ -85,6 +86,8 @@ public:
protected:
int metric(QPaintDevice::PaintDeviceMetric metric) const;
+ void createPixmapForImage(QImage &sourceImage, Qt::ImageConversionFlags flags, bool inPlace);
+ void setImage(const QImage &image);
QImage image;
private:
diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp
index 6bebefc..e8dc5ae 100644
--- a/src/gui/image/qpixmap_x11.cpp
+++ b/src/gui/image/qpixmap_x11.cpp
@@ -1250,10 +1250,8 @@ void QX11PixmapData::release()
pengine = 0;
if (!X11) {
-#ifndef QT_NO_DEBUG
- qWarning("~QX11PixmapData(): QPixmap objects must be destroyed before the QApplication"
- " object, otherwise the native pixmap object will be leaked.");
-#endif
+ // At this point, the X server will already have freed our resources,
+ // so there is nothing to do.
return;
}
diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp
index 7a6a73f..ca21a0c 100644
--- a/src/gui/image/qpixmapcache.cpp
+++ b/src/gui/image/qpixmapcache.cpp
@@ -196,9 +196,10 @@ public:
static QPixmapCache::KeyData* getKeyData(QPixmapCache::Key *key);
QList< QPair<QString,QPixmap> > allPixmaps() const;
- void flushDetachedPixmaps(bool nt);
+ bool flushDetachedPixmaps(bool nt);
private:
+ enum { soon_time = 10000, flush_time = 30000 };
int *keyArray;
int theid;
int ps;
@@ -236,38 +237,44 @@ QPMCache::~QPMCache()
cleaning-up, and to not cut down the size of the cache while the
cache is in active use.
- When the last pixmap has been deleted from the cache, kill the
- timer so Qt won't keep the CPU from going into sleep mode.
+ When the last detached pixmap has been deleted from the cache, kill the
+ timer so Qt won't keep the CPU from going into sleep mode. Currently
+ the timer is not restarted when the pixmap becomes unused, but it does
+ restart once something else is added (i.e. the cache space is actually needed).
+
+ Returns true if any were removed.
*/
-void QPMCache::flushDetachedPixmaps(bool nt)
+bool QPMCache::flushDetachedPixmaps(bool nt)
{
int mc = maxCost();
setMaxCost(nt ? totalCost() * 3 / 4 : totalCost() -1);
setMaxCost(mc);
ps = totalCost();
+ bool any = false;
QHash<QString, QPixmapCache::Key>::iterator it = cacheKeys.begin();
while (it != cacheKeys.end()) {
if (!contains(it.value())) {
releaseKey(it.value());
it = cacheKeys.erase(it);
+ any = true;
} else {
++it;
}
}
+
+ return any;
}
void QPMCache::timerEvent(QTimerEvent *)
{
bool nt = totalCost() == ps;
- flushDetachedPixmaps(nt);
-
- if (!size()) {
+ if (!flushDetachedPixmaps(nt)) {
killTimer(theid);
theid = 0;
} else if (nt != t) {
killTimer(theid);
- theid = startTimer(nt ? 10000 : 30000);
+ theid = startTimer(nt ? soon_time : flush_time);
t = nt;
}
}
@@ -315,7 +322,7 @@ bool QPMCache::insert(const QString& key, const QPixmap &pixmap, int cost)
if (success) {
cacheKeys.insert(key, cacheKey);
if (!theid) {
- theid = startTimer(30000);
+ theid = startTimer(flush_time);
t = false;
}
} else {
@@ -331,7 +338,7 @@ QPixmapCache::Key QPMCache::insert(const QPixmap &pixmap, int cost)
bool success = QCache<QPixmapCache::Key, QPixmapCacheEntry>::insert(cacheKey, new QPixmapCacheEntry(cacheKey, pixmap), cost);
if (success) {
if (!theid) {
- theid = startTimer(30000);
+ theid = startTimer(flush_time);
t = false;
}
} else {
@@ -352,7 +359,7 @@ bool QPMCache::replace(const QPixmapCache::Key &key, const QPixmap &pixmap, int
bool success = QCache<QPixmapCache::Key, QPixmapCacheEntry>::insert(cacheKey, new QPixmapCacheEntry(cacheKey, pixmap), cost);
if (success) {
if(!theid) {
- theid = startTimer(30000);
+ theid = startTimer(flush_time);
t = false;
}
const_cast<QPixmapCache::Key&>(key) = cacheKey;
diff --git a/src/gui/image/qpixmapdata.cpp b/src/gui/image/qpixmapdata.cpp
index ea4fe6b..31ca909 100644
--- a/src/gui/image/qpixmapdata.cpp
+++ b/src/gui/image/qpixmapdata.cpp
@@ -146,7 +146,7 @@ bool QPixmapData::fromData(const uchar *buf, uint len, const char *format, Qt::I
void QPixmapData::copy(const QPixmapData *data, const QRect &rect)
{
- fromImage(data->toImage().copy(rect), Qt::AutoColor);
+ fromImage(data->toImage().copy(rect), Qt::NoOpaqueDetection);
}
bool QPixmapData::scroll(int dx, int dy, const QRect &rect)
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index dd31834..2cf8222 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -892,13 +892,15 @@ QPngHandler::~QPngHandler()
bool QPngHandler::canRead() const
{
- if (d->state == QPngHandlerPrivate::Ready) {
- if (!canRead(device()))
- return false;
+ if (d->state == QPngHandlerPrivate::Ready && !canRead(device()))
+ return false;
+
+ if (d->state != QPngHandlerPrivate::Error) {
setFormat("png");
return true;
}
- return d->state != QPngHandlerPrivate::Error;
+
+ return false;
}
bool QPngHandler::canRead(QIODevice *device)
diff --git a/src/gui/image/qppmhandler.cpp b/src/gui/image/qppmhandler.cpp
index cbbbef4..a9e796c 100644
--- a/src/gui/image/qppmhandler.cpp
+++ b/src/gui/image/qppmhandler.cpp
@@ -409,13 +409,15 @@ bool QPpmHandler::readHeader()
bool QPpmHandler::canRead() const
{
- if (state == Ready) {
- if (!canRead(device(), &subType))
- return false;
+ if (state == Ready && !canRead(device(), &subType))
+ return false;
+
+ if (state != Error) {
setFormat(subType);
return true;
}
- return state != Error;
+
+ return false;
}
bool QPpmHandler::canRead(QIODevice *device, QByteArray *subType)
diff --git a/src/gui/image/qxbmhandler.cpp b/src/gui/image/qxbmhandler.cpp
index 385340a..0dd4e99 100644
--- a/src/gui/image/qxbmhandler.cpp
+++ b/src/gui/image/qxbmhandler.cpp
@@ -261,13 +261,15 @@ bool QXbmHandler::readHeader()
bool QXbmHandler::canRead() const
{
- if (state == Ready) {
- if (!canRead(device()))
- return false;
+ if (state == Ready && !canRead(device()))
+ return false;
+
+ if (state != Error) {
setFormat("xbm");
return true;
}
- return state != Error;
+
+ return false;
}
bool QXbmHandler::canRead(QIODevice *device)
diff --git a/src/gui/image/qxpmhandler.cpp b/src/gui/image/qxpmhandler.cpp
index a475cd0..b97afd3 100644
--- a/src/gui/image/qxpmhandler.cpp
+++ b/src/gui/image/qxpmhandler.cpp
@@ -1225,11 +1225,15 @@ bool QXpmHandler::readImage(QImage *image)
bool QXpmHandler::canRead() const
{
- if (state == Ready && canRead(device())) {
+ if (state == Ready && !canRead(device()))
+ return false;
+
+ if (state != Error) {
setFormat("xpm");
return true;
}
- return state != Error;
+
+ return false;
}
bool QXpmHandler::canRead(QIODevice *device)
diff --git a/src/gui/itemviews/qabstractitemdelegate.cpp b/src/gui/itemviews/qabstractitemdelegate.cpp
index 775bf7d..0ea6d67 100644
--- a/src/gui/itemviews/qabstractitemdelegate.cpp
+++ b/src/gui/itemviews/qabstractitemdelegate.cpp
@@ -291,8 +291,14 @@ void QAbstractItemDelegate::updateEditorGeometry(QWidget *,
}
/*!
- Whenever an event occurs, this function is called with the \a event
- \a model \a option and the \a index that corresponds to the item being edited.
+ When editing of an item starts, this function is called with the
+ \a event that triggered the editing, the \a model, the \a index of
+ the item, and the \a option used for rendering the item.
+
+ Mouse events are sent to editorEvent() even if they don't start
+ editing of the item. This can, for instance, be useful if you wish
+ to open a context menu when the right mouse button is pressed on
+ an item.
The base implementation returns false (indicating that it has not
handled the event).
diff --git a/src/gui/itemviews/qtreewidget.cpp b/src/gui/itemviews/qtreewidget.cpp
index 0e06f34..8f55734 100644
--- a/src/gui/itemviews/qtreewidget.cpp
+++ b/src/gui/itemviews/qtreewidget.cpp
@@ -1472,6 +1472,10 @@ QTreeWidgetItem::QTreeWidgetItem(QTreeWidgetItem *parent, QTreeWidgetItem *after
/*!
Destroys this tree widget item.
+
+ The item will be removed from \l{QTreeWidget}s to which it has
+ been added. This makes it safe to delete an item at any time.
+
*/
QTreeWidgetItem::~QTreeWidgetItem()
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 52767b8..1680ef4 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -5313,6 +5313,7 @@ void QApplication::setInputContext(QInputContext *inputContext)
}
delete QApplicationPrivate::inputContext;
QApplicationPrivate::inputContext = inputContext;
+ QApplicationPrivate::inputContext->setParent(this);
}
/*!
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index a50fd95..d5d4be6 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -2196,4 +2196,29 @@ void QApplication::restoreOverrideCursor()
#endif // QT_NO_CURSOR
+QS60ThreadLocalData::QS60ThreadLocalData()
+{
+ CCoeEnv *env = CCoeEnv::Static();
+ if (env) {
+ //if this is the UI thread, share objects owned by CONE
+ usingCONEinstances = true;
+ wsSession = env->WsSession();
+ screenDevice = env->ScreenDevice();
+ }
+ else {
+ usingCONEinstances = false;
+ qt_symbian_throwIfError(wsSession.Connect(qt_s60GetRFs()));
+ screenDevice = new CWsScreenDevice(wsSession);
+ screenDevice->Construct();
+ }
+}
+
+QS60ThreadLocalData::~QS60ThreadLocalData()
+{
+ if (!usingCONEinstances) {
+ delete screenDevice;
+ wsSession.Close();
+ }
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 09535fa..0edb8fb 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -118,8 +118,6 @@ extern void qt_wince_hide_taskbar(HWND hwnd); //defined in qguifunctions_wince.c
# include <winable.h>
#endif
-#include "private/qwinnativepangesturerecognizer_win_p.h"
-
#ifndef WM_TOUCH
# define WM_TOUCH 0x0240
@@ -4066,36 +4064,9 @@ PtrCloseTouchInputHandle QApplicationPrivate::CloseTouchInputHandle = 0;
void QApplicationPrivate::initializeMultitouch_sys()
{
- static const IID QT_IID_IInkTablets = {0x112086D9, 0x7779, 0x4535, {0xA6, 0x99, 0x86, 0x2B, 0x43, 0xAC, 0x18, 0x63} };
- static const IID QT_IID_IInkTablet2 = {0x90c91ad2, 0xfa36, 0x49d6, {0x95, 0x16, 0xce, 0x8d, 0x57, 0x0f, 0x6f, 0x85} };
- static const CLSID QT_CLSID_InkTablets = {0x6E4FCB12, 0x510A, 0x4d40, {0x93, 0x04, 0x1D, 0xA1, 0x0A, 0xE9, 0x14, 0x7C} };
-
- IInkTablets *iInkTablets = 0;
- HRESULT hr = CoCreateInstance(QT_CLSID_InkTablets, NULL, CLSCTX_ALL, QT_IID_IInkTablets, (void**)&iInkTablets);
- if (SUCCEEDED(hr)) {
- long count = 0;
- iInkTablets->get_Count(&count);
- for (long i = 0; i < count; ++i) {
- IInkTablet *iInkTablet = 0;
- hr = iInkTablets->Item(i, &iInkTablet);
- if (FAILED(hr))
- continue;
- IInkTablet2 *iInkTablet2 = 0;
- hr = iInkTablet->QueryInterface(QT_IID_IInkTablet2, (void**)&iInkTablet2);
- iInkTablet->Release();
- if (FAILED(hr))
- continue;
- TabletDeviceKind kind;
- hr = iInkTablet2->get_DeviceKind(&kind);
- iInkTablet2->Release();
- if (FAILED(hr))
- continue;
- if (kind == TDK_Touch) {
- QApplicationPrivate::HasTouchSupport = true;
- break;
- }
- }
- iInkTablets->Release();
+ if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) {
+ static const int QT_SM_DIGITIZER = 94;
+ QApplicationPrivate::HasTouchSupport = GetSystemMetrics(QT_SM_DIGITIZER);
}
QLibrary library(QLatin1String("user32"));
diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp
index 2af031b..e43a560 100644
--- a/src/gui/kernel/qgesturemanager.cpp
+++ b/src/gui/kernel/qgesturemanager.cpp
@@ -286,6 +286,9 @@ bool QGestureManager::filterEventThroughContexts(const QMultiMap<QObject *,
// check if a running gesture switched back to maybe state
QSet<QGesture *> activeToMaybeGestures = m_activeGestures & newMaybeGestures;
+ // check if a maybe gesture switched to canceled - reset it but don't send an event
+ QSet<QGesture *> maybeToCanceledGestures = m_maybeGestures & notGestures;
+
// check if a running gesture switched back to not gesture state,
// i.e. were canceled
QSet<QGesture *> canceledGestures = m_activeGestures & notGestures;
@@ -345,7 +348,8 @@ bool QGestureManager::filterEventThroughContexts(const QMultiMap<QObject *,
<< "\n\tstarted:" << startedGestures
<< "\n\ttriggered:" << triggeredGestures
<< "\n\tfinished:" << finishedGestures
- << "\n\tcanceled:" << canceledGestures;
+ << "\n\tcanceled:" << canceledGestures
+ << "\n\tmaybe-canceled:" << maybeToCanceledGestures;
}
QSet<QGesture *> undeliveredGestures;
@@ -366,7 +370,7 @@ bool QGestureManager::filterEventThroughContexts(const QMultiMap<QObject *,
// reset gestures that ended
QSet<QGesture *> endedGestures =
- finishedGestures + canceledGestures + undeliveredGestures;
+ finishedGestures + canceledGestures + undeliveredGestures + maybeToCanceledGestures;
foreach (QGesture *gesture, endedGestures) {
recycle(gesture);
m_gestureTargets.remove(gesture);
diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp
index 6960838..8a3e89e 100644
--- a/src/gui/kernel/qstandardgestures.cpp
+++ b/src/gui/kernel/qstandardgestures.cpp
@@ -112,6 +112,7 @@ QGestureRecognizer::Result QPanGestureRecognizer::recognize(QGesture *state,
p1.pos().y() - p1.startPos().y() + p2.pos().y() - p2.startPos().y()) / 2;
if (d->offset.x() > 10 || d->offset.y() > 10 ||
d->offset.x() < -10 || d->offset.y() < -10) {
+ q->setHotSpot(p1.startScreenPos());
result = QGestureRecognizer::TriggerGesture;
} else {
result = QGestureRecognizer::MayBeGesture;
@@ -441,6 +442,7 @@ QGestureRecognizer::Result QTapGestureRecognizer::recognize(QGesture *state,
switch (event->type()) {
case QEvent::TouchBegin: {
d->position = ev->touchPoints().at(0).pos();
+ q->setHotSpot(ev->touchPoints().at(0).screenPos());
result = QGestureRecognizer::TriggerGesture;
break;
}
@@ -523,6 +525,7 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
if (d->timerId)
q->killTimer(d->timerId);
d->timerId = q->startTimer(TimerInterval);
+ q->setHotSpot(ev->touchPoints().at(0).startScreenPos());
result = QGestureRecognizer::TriggerGesture;
break;
case QEvent::TouchEnd:
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index fe3fa57..ed53ccf 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -63,6 +63,7 @@
#include "qpointer.h"
#include "qapplication.h"
#include "qelapsedtimer.h"
+#include "QtCore/qthreadstorage.h"
#include <w32std.h>
#include <coecntrl.h>
#include <eikenv.h>
@@ -86,10 +87,21 @@ const TInt KInternalStatusPaneChange = 0x50000000;
//this macro exists because EColor16MAP enum value doesn't exist in Symbian OS 9.2
#define Q_SYMBIAN_ECOLOR16MAP TDisplayMode(13)
+class QS60ThreadLocalData
+{
+public:
+ QS60ThreadLocalData();
+ ~QS60ThreadLocalData();
+ bool usingCONEinstances;
+ RWsSession wsSession;
+ CWsScreenDevice *screenDevice;
+};
+
class QS60Data
{
public:
QS60Data();
+ QThreadStorage<QS60ThreadLocalData *> tls;
TUid uid;
int screenDepth;
QPoint lastCursorPos;
@@ -132,9 +144,9 @@ public:
int memoryLimitForHwRendering;
QApplication::QS60MainApplicationFactory s60ApplicationFactory; // typedef'ed pointer type
static inline void updateScreenSize();
- static inline RWsSession& wsSession();
+ inline RWsSession& wsSession();
static inline RWindowGroup& windowGroup();
- static inline CWsScreenDevice* screenDevice();
+ inline CWsScreenDevice* screenDevice();
static inline CCoeAppUi* appUi();
static inline CEikMenuBar* menuBar();
#ifdef Q_WS_S60
@@ -265,7 +277,10 @@ inline void QS60Data::updateScreenSize()
inline RWsSession& QS60Data::wsSession()
{
- return CCoeEnv::Static()->WsSession();
+ if(!tls.hasLocalData()) {
+ tls.setLocalData(new QS60ThreadLocalData);
+ }
+ return tls.localData()->wsSession;
}
inline RWindowGroup& QS60Data::windowGroup()
@@ -275,7 +290,10 @@ inline RWindowGroup& QS60Data::windowGroup()
inline CWsScreenDevice* QS60Data::screenDevice()
{
- return CCoeEnv::Static()->ScreenDevice();
+ if(!tls.hasLocalData()) {
+ tls.setLocalData(new QS60ThreadLocalData);
+ }
+ return tls.localData()->screenDevice;
}
inline CCoeAppUi* QS60Data::appUi()
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 492954a..dd568cd 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -380,6 +380,8 @@ void QWidget::setInputContext(QInputContext *context)
if (d->ic)
delete d->ic;
d->ic = context;
+ if (d->ic)
+ d->ic->setParent(this);
#endif
}
@@ -1067,7 +1069,6 @@ struct QWidgetExceptionCleaner
\sa windowFlags
*/
-
QWidget::QWidget(QWidget *parent, Qt::WindowFlags f)
: QObject(*new QWidgetPrivate, 0), QPaintDevice()
{
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 1928599..280712a 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -2688,6 +2688,7 @@ QWidget::macCGHandle() const
void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
{
Q_D(QWidget);
+ d->aboutToDestroy();
if (!isWindow() && parentWidget())
parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry()));
d->deactivateWidgetCleanup();
@@ -3994,10 +3995,10 @@ static void qt_mac_update_widget_position(QWidget *q, QRect oldRect, QRect newRe
(oldRect.isValid() == false || newRect.isValid() == false) ||
// the position update is a part of a drag-and-drop operation
- QDragManager::self()->object ||
-
- // we are on Panther (no HIViewSetNeedsDisplayInRect)
- QSysInfo::MacintoshVersion < QSysInfo::MV_10_4
+ QDragManager::self()->object ||
+
+ // we are on Panther (no HIViewSetNeedsDisplayInRect)
+ QSysInfo::MacintoshVersion < QSysInfo::MV_10_4
){
HIViewSetFrame(view, &bounds);
return;
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index 4247c3a..587d7fb 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -551,6 +551,11 @@ public:
void setLayoutItemMargins(int left, int top, int right, int bottom);
void setLayoutItemMargins(QStyle::SubElement element, const QStyleOption *opt = 0);
+ // aboutToDestroy() is called just before the contents of
+ // QWidget::destroy() is executed. It's used to signal QWidget
+ // sub-classes that their internals are about to be released.
+ virtual void aboutToDestroy() {}
+
QInputContext *inputContext() const;
inline QWidget *effectiveFocusWidget() {
QWidget *w = q_func();
diff --git a/src/gui/kernel/qwidget_qws.cpp b/src/gui/kernel/qwidget_qws.cpp
index b827e8b..3145136 100644
--- a/src/gui/kernel/qwidget_qws.cpp
+++ b/src/gui/kernel/qwidget_qws.cpp
@@ -256,7 +256,7 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool /*destro
void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
{
Q_D(QWidget);
-
+ d->aboutToDestroy();
if (!isWindow() && parentWidget())
parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry()));
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 86b858d..68f9470 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -1177,6 +1177,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
{
Q_D(QWidget);
+ d->aboutToDestroy();
if (!isWindow() && parentWidget())
parentWidget()->d_func()->invalidateBuffer(geometry());
d->deactivateWidgetCleanup();
diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp
index a7e66bf..9c65aa0 100644
--- a/src/gui/kernel/qwidget_win.cpp
+++ b/src/gui/kernel/qwidget_win.cpp
@@ -544,6 +544,7 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
{
Q_D(QWidget);
+ d->aboutToDestroy();
if (!isWindow() && parentWidget())
parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry()));
d->deactivateWidgetCleanup();
diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
index 43f510c..e01489f 100644
--- a/src/gui/kernel/qwidget_x11.cpp
+++ b/src/gui/kernel/qwidget_x11.cpp
@@ -1023,6 +1023,7 @@ bool QWidgetPrivate::isBackgroundInherited() const
void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
{
Q_D(QWidget);
+ d->aboutToDestroy();
if (!isWindow() && parentWidget())
parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry()));
d->deactivateWidgetCleanup();
diff --git a/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h b/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h
index 64addeb..9d0e6f7 100644
--- a/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h
+++ b/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h
@@ -55,39 +55,6 @@
#include <QGestureRecognizer>
-#include <objbase.h>
-
-class IInkRectangle;
-class TabletHardwareCapabilities;
-class TabletPropertyMetricUnit;
-DECLARE_INTERFACE_(IInkTablet, IDispatch)
-{
- STDMETHOD(get_Name)(THIS_ BSTR *Name) PURE;
- STDMETHOD(get_PlugAndPlayId)(THIS_ BSTR *Id) PURE;
- STDMETHOD(get_MaximumInputRectangle)(THIS_ IInkRectangle **Rectangle) PURE;
- STDMETHOD(get_HardwareCapabilities)(THIS_ TabletHardwareCapabilities *Capabilities) PURE;
- STDMETHOD(IsPacketPropertySupported)(THIS_ BSTR packetPropertyName) PURE;
- STDMETHOD(GetPropertyMetrics)(THIS_ BSTR propertyName, long *Minimum, long *Maximum, TabletPropertyMetricUnit *Units, float *Resolution) PURE;
-};
-enum TabletDeviceKind
-{
- TDK_Mouse = 0,
- TDK_Pen = 1,
- TDK_Touch = 2
-};
-DECLARE_INTERFACE_(IInkTablet2, IDispatch)
-{
- STDMETHOD(get_DeviceKind)(THIS_ TabletDeviceKind *Kind) PURE;
-};
-DECLARE_INTERFACE_(IInkTablets, IDispatch)
-{
- STDMETHOD(get_Count)(THIS_ long *Count) PURE;
- STDMETHOD(get__NewEnum)(THIS_ IUnknown **_NewEnum) PURE;
- STDMETHOD(get_DefaultTablet)(THIS_ IInkTablet **DefaultTablet) PURE;
- STDMETHOD(Item)(THIS_ long Index, IInkTablet **Tablet) PURE;
- STDMETHOD(IsPacketPropertySupported)(THIS_ BSTR packetPropertyName, VARIANT_BOOL *Supported) PURE;
-};
-
#ifndef QT_NO_GESTURES
QT_BEGIN_NAMESPACE
diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri
index 123af1c..a5cfb84 100644
--- a/src/gui/painting/painting.pri
+++ b/src/gui/painting/painting.pri
@@ -234,7 +234,7 @@ contains(QMAKE_MAC_XARCH, no) {
IWMMXT_SOURCES += painting/qdrawhelper_iwmmxt.cpp
}
- win32-g++|!win32:!*-icc* {
+ win32-g++*|!win32:!*-icc* {
mmx {
mmx_compiler.commands = $$QMAKE_CXX -c -Winline
@@ -403,9 +403,10 @@ neon:*-g++* {
}
contains(QT_CONFIG, zlib) {
- INCLUDEPATH += ../3rdparty/zlib
+ INCLUDEPATH += ../3rdparty/zlib
} else:!contains(QT_CONFIG, no-zlib) {
- unix:LIBS_PRIVATE += -lz
-# win32:LIBS += libz.lib
+ symbian:LIBS_PRIVATE += -llibz
+ else:if(unix|win32-g++*):LIBS_PRIVATE += -lz
+ else:LIBS += zdll.lib
}
diff --git a/src/gui/painting/qgraphicssystem_runtime_p.h b/src/gui/painting/qgraphicssystem_runtime_p.h
index 445f83d..101a8e7 100644
--- a/src/gui/painting/qgraphicssystem_runtime_p.h
+++ b/src/gui/painting/qgraphicssystem_runtime_p.h
@@ -170,7 +170,7 @@ public:
int windowSurfaceDestroyPolicy() const { return m_windowSurfaceDestroyPolicy; }
- int memoryUsage() const { return m_memoryUsage; }
+ uint memoryUsage() const { return m_memoryUsage; }
private:
diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c
index ff2469c..5e7c67a 100644
--- a/src/gui/painting/qgrayraster.c
+++ b/src/gui/painting/qgrayraster.c
@@ -156,6 +156,7 @@
#define ErrRaster_Invalid_Outline -1
#define ErrRaster_Invalid_Argument -3
#define ErrRaster_Memory_Overflow -4
+#define ErrRaster_OutOfMemory -6
#define QT_FT_BEGIN_HEADER
#define QT_FT_END_HEADER
@@ -222,7 +223,6 @@
#define DOWNSCALE( x ) ( (x) << ( 6 - PIXEL_BITS ) )
#endif
-
/*************************************************************************/
/* */
/* TYPE DEFINITIONS */
@@ -1757,8 +1757,7 @@
#ifdef DEBUG_GRAYS
fprintf( stderr, "Rotten glyph!\n" );
#endif
- /* == Raster_Err_OutOfMemory in qblackraster.c */
- return -6;
+ return ErrRaster_OutOfMemory;
}
if ( bottom-top >= ras.band_size )
@@ -1784,7 +1783,7 @@
static int
- gray_raster_render( PRaster raster,
+ gray_raster_render( QT_FT_Raster raster,
const QT_FT_Raster_Params* params )
{
const QT_FT_Outline* outline = (const QT_FT_Outline*)params->source;
@@ -1795,6 +1794,12 @@
if ( !raster || !raster->buffer || !raster->buffer_size )
return ErrRaster_Invalid_Argument;
+ // If raster object and raster buffer are allocated, but
+ // raster size isn't of the minimum size, indicate out of
+ // memory.
+ if (raster && raster->buffer && raster->buffer_size < MINIMUM_POOL_SIZE )
+ return ErrRaster_OutOfMemory;
+
/* return immediately if the outline is empty */
if ( outline->n_points == 0 || outline->n_contours <= 0 )
return 0;
@@ -1874,19 +1879,15 @@
/**** a static object. *****/
static int
- gray_raster_new( void * memory,
- QT_FT_Raster* araster )
+ gray_raster_new( QT_FT_Raster* araster )
{
- if (memory)
- fprintf(stderr, "gray_raster_new(), memory ignored");
- memory = malloc(sizeof(TRaster));
- if (!memory) {
+ *araster = malloc(sizeof(TRaster));
+ if (!*araster) {
*araster = 0;
return ErrRaster_Memory_Overflow;
}
- QT_FT_MEM_ZERO(memory, sizeof(TRaster));
+ QT_FT_MEM_ZERO(*araster, sizeof(TRaster));
- *araster = (QT_FT_Raster) memory;
return 0;
}
@@ -1905,10 +1906,9 @@
{
PRaster rast = (PRaster)raster;
-
if ( raster )
{
- if ( pool_base && pool_size >= (long)sizeof ( TWorker ) + 2048 )
+ if ( pool_base && ( pool_size >= MINIMUM_POOL_SIZE ) )
{
PWorker worker = (PWorker)pool_base;
@@ -1923,6 +1923,13 @@
rast->band_size = (int)( rast->buffer_size /
( sizeof ( TCell ) * 8 ) );
}
+ else if ( pool_base)
+ { // Case when there is a raster pool allocated, but it
+ // doesn't have the minimum size (and so memory will be reallocated)
+ rast->buffer = pool_base;
+ rast->worker = NULL;
+ rast->buffer_size = pool_size;
+ }
else
{
rast->buffer = NULL;
diff --git a/src/gui/painting/qgrayraster_p.h b/src/gui/painting/qgrayraster_p.h
index 4463fc9..ad595b8 100644
--- a/src/gui/painting/qgrayraster_p.h
+++ b/src/gui/painting/qgrayraster_p.h
@@ -89,6 +89,10 @@
#define QT_FT_EXPORT_VAR( x ) extern x
#endif
+/* Minimum buffer size for raster object, that accounts
+ for TWorker and TCell sizes.*/
+#define MINIMUM_POOL_SIZE 4096
+
QT_FT_EXPORT_VAR( const QT_FT_Raster_Funcs ) qt_ft_grays_raster;
diff --git a/src/gui/painting/qoutlinemapper.cpp b/src/gui/painting/qoutlinemapper.cpp
index 1b01960..bf03545 100644
--- a/src/gui/painting/qoutlinemapper.cpp
+++ b/src/gui/painting/qoutlinemapper.cpp
@@ -234,12 +234,12 @@ void QOutlineMapper::endOutline()
// Check for out of dev bounds...
- const bool do_clip = (controlPointRect.left() < -QT_RASTER_COORD_LIMIT
+ const bool do_clip = !m_in_clip_elements && ((controlPointRect.left() < -QT_RASTER_COORD_LIMIT
|| controlPointRect.right() > QT_RASTER_COORD_LIMIT
|| controlPointRect.top() < -QT_RASTER_COORD_LIMIT
|| controlPointRect.bottom() > QT_RASTER_COORD_LIMIT
|| controlPointRect.width() > QT_RASTER_COORD_LIMIT
- || controlPointRect.height() > QT_RASTER_COORD_LIMIT);
+ || controlPointRect.height() > QT_RASTER_COORD_LIMIT));
if (do_clip) {
clipElements(elements, elementTypes(), element_count);
@@ -353,7 +353,13 @@ void QOutlineMapper::clipElements(const QPointF *elements,
// instead of going through convenience functionallity, but since
// this part of code hardly every used, it shouldn't matter.
+ m_in_clip_elements = true;
+
QPainterPath path;
+
+ if (!(m_outline.flags & QT_FT_OUTLINE_EVEN_ODD_FILL))
+ path.setFillRule(Qt::WindingFill);
+
if (types) {
for (int i=0; i<element_count; ++i) {
switch (types[i]) {
@@ -389,6 +395,8 @@ void QOutlineMapper::clipElements(const QPointF *elements,
else
convertPath(clippedPath);
m_txop = old_txop;
+
+ m_in_clip_elements = false;
}
QT_END_NAMESPACE
diff --git a/src/gui/painting/qoutlinemapper_p.h b/src/gui/painting/qoutlinemapper_p.h
index 39b7593..d534f76 100644
--- a/src/gui/painting/qoutlinemapper_p.h
+++ b/src/gui/painting/qoutlinemapper_p.h
@@ -95,6 +95,7 @@ public:
m_tags(0),
m_contours(0),
m_polygon_dev(0),
+ m_in_clip_elements(false),
m_round_coords(false)
{
}
@@ -235,6 +236,7 @@ public:
qreal m_dy;
bool m_valid;
+ bool m_in_clip_elements;
private:
bool m_round_coords;
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 08e14fb..a212718 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -345,7 +345,7 @@ void QRasterPaintEngine::init()
// The antialiasing raster.
d->grayRaster.reset(new QT_FT_Raster);
Q_CHECK_PTR(d->grayRaster.data());
- if (qt_ft_grays_raster.raster_new(0, d->grayRaster.data()))
+ if (qt_ft_grays_raster.raster_new(d->grayRaster.data()))
QT_THROW(std::bad_alloc()); // an error creating the raster is caused by a bad malloc
@@ -459,13 +459,12 @@ bool QRasterPaintEngine::begin(QPaintDevice *device)
QRasterPaintEngineState *s = state();
ensureOutlineMapper();
- d->outlineMapper->m_clip_rect = d->deviceRect.adjusted(-10, -10, 10, 10);
-
- // This is the upp
- QRect bounds(-QT_RASTER_COORD_LIMIT, -QT_RASTER_COORD_LIMIT,
- QT_RASTER_COORD_LIMIT*2 - 1, QT_RASTER_COORD_LIMIT * 2 - 1);
- d->outlineMapper->m_clip_rect = bounds.intersected(d->outlineMapper->m_clip_rect);
+ d->outlineMapper->m_clip_rect = d->deviceRect;
+ if (d->outlineMapper->m_clip_rect.width() > QT_RASTER_COORD_LIMIT)
+ d->outlineMapper->m_clip_rect.setWidth(QT_RASTER_COORD_LIMIT);
+ if (d->outlineMapper->m_clip_rect.height() > QT_RASTER_COORD_LIMIT)
+ d->outlineMapper->m_clip_rect.setHeight(QT_RASTER_COORD_LIMIT);
d->rasterizer->setClipRect(d->deviceRect);
@@ -3789,6 +3788,7 @@ void QRasterPaintEngine::drawEllipse(const QRectF &rect)
if (((qpen_style(s->lastPen) == Qt::SolidLine && s->flags.fast_pen)
|| (qpen_style(s->lastPen) == Qt::NoPen && !s->flags.antialiased))
&& qMax(rect.width(), rect.height()) < QT_RASTER_COORD_LIMIT
+ && !rect.isEmpty()
&& s->matrix.type() <= QTransform::TxScale) // no shear
{
ensureBrush();
@@ -4185,7 +4185,11 @@ void QRasterPaintEnginePrivate::rasterize(QT_FT_Outline *outline,
return;
}
- const int rasterPoolInitialSize = 8192;
+ // Initial size for raster pool is MINIMUM_POOL_SIZE so as to
+ // minimize memory reallocations. However if initial size for
+ // raster pool is changed for lower value, reallocations will
+ // occur normally.
+ const int rasterPoolInitialSize = MINIMUM_POOL_SIZE;
int rasterPoolSize = rasterPoolInitialSize;
unsigned char *rasterPoolBase;
#if defined(Q_WS_WIN64)
@@ -4229,7 +4233,7 @@ void QRasterPaintEnginePrivate::rasterize(QT_FT_Outline *outline,
error = qt_ft_grays_raster.raster_render(*grayRaster.data(), &rasterParams);
// Out of memory, reallocate some more and try again...
- if (error == -6) { // -6 is Result_err_OutOfMemory
+ if (error == -6) { // ErrRaster_OutOfMemory from qgrayraster.c
int new_size = rasterPoolSize * 2;
if (new_size > 1024 * 1024) {
qWarning("QPainter: Rasterization of primitive failed");
@@ -4255,7 +4259,7 @@ void QRasterPaintEnginePrivate::rasterize(QT_FT_Outline *outline,
Q_CHECK_PTR(rasterPoolBase); // note: we just freed the old rasterPoolBase. I hope it's not fatal.
qt_ft_grays_raster.raster_done(*grayRaster.data());
- qt_ft_grays_raster.raster_new(0, grayRaster.data());
+ qt_ft_grays_raster.raster_new(grayRaster.data());
qt_ft_grays_raster.raster_reset(*grayRaster.data(), rasterPoolBase, rasterPoolSize);
} else {
done = true;
diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp
index b8ad9b3..910b2df 100644
--- a/src/gui/painting/qpaintengine_x11.cpp
+++ b/src/gui/painting/qpaintengine_x11.cpp
@@ -1453,6 +1453,11 @@ void QX11PaintEngine::drawEllipse(const QRectF &rect)
void QX11PaintEngine::drawEllipse(const QRect &rect)
{
+ if (rect.isEmpty()) {
+ drawRects(&rect, 1);
+ return;
+ }
+
Q_D(QX11PaintEngine);
QRect devclip(SHRT_MIN, SHRT_MIN, SHRT_MAX*2 - 1, SHRT_MAX*2 - 1);
QRect r(rect);
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index ff82d59..e0746fb 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -494,11 +494,9 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
} else {
d->activeStroker->moveTo(points[0], points[1]);
points += 2;
- ++types;
while (points < lastPoint) {
d->activeStroker->lineTo(points[0], points[1]);
points += 2;
- ++types;
}
if (path.hasImplicitClose())
d->activeStroker->lineTo(path.points()[0], path.points()[1]);
@@ -561,12 +559,10 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
QPointF p = ((QPointF *)points)[0] * state()->matrix;
d->activeStroker->moveTo(p.x(), p.y());
points += 2;
- ++types;
while (points < lastPoint) {
QPointF p = ((QPointF *)points)[0] * state()->matrix;
d->activeStroker->lineTo(p.x(), p.y());
points += 2;
- ++types;
}
if (path.hasImplicitClose())
d->activeStroker->lineTo(p.x(), p.y());
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index e8c4599..71bc990 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -2391,6 +2391,8 @@ void QPainter::setCompositionMode(CompositionMode mode)
qWarning("QPainter::setCompositionMode: Painter not active");
return;
}
+ if (d->state->composition_mode == mode)
+ return;
if (d->extended) {
d->state->composition_mode = mode;
d->extended->compositionModeChanged();
@@ -4238,8 +4240,6 @@ void QPainter::drawEllipse(const QRectF &r)
return;
QRectF rect(r.normalized());
- if (rect.isEmpty())
- return;
if (d->extended) {
d->extended->drawEllipse(rect);
@@ -4281,8 +4281,6 @@ void QPainter::drawEllipse(const QRect &r)
return;
QRect rect(r.normalized());
- if (rect.isEmpty())
- return;
if (d->extended) {
d->extended->drawEllipse(rect);
diff --git a/src/gui/painting/qrasterdefs_p.h b/src/gui/painting/qrasterdefs_p.h
index c33fa57..19a0b16 100644
--- a/src/gui/painting/qrasterdefs_p.h
+++ b/src/gui/painting/qrasterdefs_p.h
@@ -81,7 +81,6 @@
QT_FT_BEGIN_HEADER
-
/*************************************************************************/
/* */
/* <Section> */
@@ -837,7 +836,7 @@ QT_FT_BEGIN_HEADER
/* A handle (pointer) to a raster object. Each object can be used */
/* independently to convert an outline into a bitmap or pixmap. */
/* */
- typedef struct QT_FT_RasterRec_* QT_FT_Raster;
+ typedef struct TRaster_ *QT_FT_Raster;
/*************************************************************************/
@@ -1118,8 +1117,7 @@ QT_FT_BEGIN_HEADER
/* ignored by a given raster implementation. */
/* */
typedef int
- (*QT_FT_Raster_NewFunc)( void* memory,
- QT_FT_Raster* raster );
+ (*QT_FT_Raster_NewFunc)( QT_FT_Raster* raster );
#define QT_FT_Raster_New_Func QT_FT_Raster_NewFunc
diff --git a/src/gui/styles/qcleanlooksstyle.cpp b/src/gui/styles/qcleanlooksstyle.cpp
index 883f511..ada5293 100644
--- a/src/gui/styles/qcleanlooksstyle.cpp
+++ b/src/gui/styles/qcleanlooksstyle.cpp
@@ -884,7 +884,7 @@ void QCleanlooksStyle::drawPrimitive(PrimitiveElement elem,
}
painter->restore();
break;
-#ifndef QT_NO_LINEDIT
+#ifndef QT_NO_LINEEDIT
case PE_FrameLineEdit:
// fall through
#endif // QT_NO_LINEEDIT
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index 4978565..039a6da 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -762,7 +762,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
#ifndef QT_NO_ITEMVIEWS
case PE_PanelItemViewRow:
if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(opt)) {
- QPalette::ColorGroup cg = vopt->state & QStyle::State_Enabled
+ QPalette::ColorGroup cg = (widget ? widget->isEnabled() : (vopt->state & QStyle::State_Enabled))
? QPalette::Normal : QPalette::Disabled;
if (cg == QPalette::Normal && !(vopt->state & QStyle::State_Active))
cg = QPalette::Inactive;
@@ -775,7 +775,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
break;
case PE_PanelItemViewItem:
if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(opt)) {
- QPalette::ColorGroup cg = vopt->state & QStyle::State_Enabled
+ QPalette::ColorGroup cg = (widget ? widget->isEnabled() : (vopt->state & QStyle::State_Enabled))
? QPalette::Normal : QPalette::Disabled;
if (cg == QPalette::Normal && !(vopt->state & QStyle::State_Active))
cg = QPalette::Inactive;
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index b59a033..c989bd3 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -855,9 +855,10 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
key = QLS("a");
GTK_WIDGET_SET_FLAGS(gtkTreeView, GTK_HAS_FOCUS);
}
+ bool isEnabled = (widget ? widget->isEnabled() : (vopt->state & QStyle::State_Enabled));
gtkPainter.paintFlatBox(gtkTreeView, detail, option->rect,
option->state & State_Selected ? GTK_STATE_SELECTED :
- option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE,
+ isEnabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE,
GTK_SHADOW_OUT, gtkTreeView->style, key);
if (isActive )
GTK_WIDGET_UNSET_FLAGS(gtkTreeView, GTK_HAS_FOCUS);
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index d28e1d9..45bcc00 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -135,13 +135,13 @@ const struct QS60StylePrivate::frameElementCenter QS60StylePrivate::m_frameEleme
{SE_TableHeaderItem, QS60StyleEnums::SP_QsnFrCaleHeadingCenter},
{SE_ToolTip, QS60StyleEnums::SP_QsnFrPopupPreviewCenter},
{SE_ToolBar, QS60StyleEnums::SP_QsnFrPopupSubCenter},
- {SE_ToolBarButton, QS60StyleEnums::SP_QsnFrSctrlButtonCenter},
- {SE_ToolBarButtonPressed, QS60StyleEnums::SP_QsnFrSctrlButtonCenterPressed},
+ {SE_ToolBarButton, QS60StyleEnums::SP_QgnFrSctrlButtonCenter},
+ {SE_ToolBarButtonPressed, QS60StyleEnums::SP_QgnFrSctrlButtonCenterPressed},
{SE_PanelBackground, QS60StyleEnums::SP_QsnFrSetOptCenter},
{SE_ButtonInactive, QS60StyleEnums::SP_QsnFrButtonCenterInactive},
{SE_Editor, QS60StyleEnums::SP_QsnFrInputCenter},
{SE_TableItemPressed, QS60StyleEnums::SP_QsnFrGridCenterPressed},
- {SE_ListItemPressed, QS60StyleEnums::SP_QsnFrListPressed},
+ {SE_ListItemPressed, QS60StyleEnums::SP_QsnFrListCenterPressed},
};
static const int frameElementsCount =
@@ -1750,45 +1750,77 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
}
const bool enabled = optionMenuItem.state & State_Enabled;
const bool checkable = optionMenuItem.checkType != QStyleOptionMenuItem::NotCheckable;
+ bool ignoreCheckMark = false;
+
+#ifndef QT_NO_COMBOBOX
+ if (qobject_cast<const QComboBox*>(widget))
+ ignoreCheckMark = true; //ignore the checkmarks provided by the QComboMenuDelegate
+#endif
uint text_flags = Qt::AlignLeading | Qt::TextShowMnemonic | Qt::TextDontClip
| Qt::TextSingleLine | Qt::AlignVCenter;
if (!styleHint(SH_UnderlineShortcut, menuItem, widget))
text_flags |= Qt::TextHideMnemonic;
- const bool selected = (option->state & State_Selected) && (option->state & State_Enabled);
- if (selected)
- QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_ListHighlight, painter, option->rect, flags);
-
QRect iconRect = subElementRect(SE_ItemViewItemDecoration, &optionMenuItem, widget);
QRect textRect = subElementRect(SE_ItemViewItemText, &optionMenuItem, widget);
//todo: move the vertical spacing stuff into subElementRect
const int vSpacing = QS60StylePrivate::pixelMetric(PM_LayoutVerticalSpacing);
- if (checkable){
- const int hSpacing = QS60StylePrivate::pixelMetric(PM_LayoutHorizontalSpacing);
- QStyleOptionMenuItem optionCheckBox;
- optionCheckBox.QStyleOptionMenuItem::operator=(*menuItem);
- optionCheckBox.rect.setWidth(pixelMetric(PM_IndicatorWidth));
- optionCheckBox.rect.setHeight(pixelMetric(PM_IndicatorHeight));
- optionCheckBox.rect.moveCenter(QPoint(
- optionCheckBox.rect.center().x(),
- menuItem->rect.center().y()));
- const int moveByX = optionCheckBox.rect.width() + vSpacing;
- if (optionMenuItem.direction == Qt::LeftToRight) {
- textRect.translate(moveByX, 0);
+ QStyleOptionMenuItem optionCheckBox;
+
+ //Regardless of checkbox visibility, make room for it, this mirrors native implementation,
+ //where text and icon placement is static regardless of content of menu item.
+ const int hSpacing = QS60StylePrivate::pixelMetric(PM_LayoutHorizontalSpacing);
+ optionCheckBox.QStyleOptionMenuItem::operator=(*menuItem);
+ optionCheckBox.rect.setWidth(pixelMetric(PM_IndicatorWidth));
+ optionCheckBox.rect.setHeight(pixelMetric(PM_IndicatorHeight));
+ optionCheckBox.rect.moveCenter(QPoint(
+ optionCheckBox.rect.center().x(),
+ menuItem->rect.center().y()));
+ const int moveByX = optionCheckBox.rect.width() + vSpacing +
+ pixelMetric(PM_DefaultFrameWidth);
+ if (optionMenuItem.direction == Qt::LeftToRight) {
+ if (iconRect.isValid()) {
iconRect.translate(moveByX, 0);
iconRect.setWidth(iconRect.width() + vSpacing);
+ }
+ if (textRect.isValid()) {
+ textRect.translate(moveByX, 0);
textRect.setWidth(textRect.width() - moveByX - vSpacing);
- optionCheckBox.rect.translate(vSpacing >> 1, hSpacing >> 1);
- } else {
+ }
+ optionCheckBox.rect.translate(vSpacing + pixelMetric(PM_DefaultFrameWidth), hSpacing >> 1);
+ } else {
+ if (textRect.isValid())
textRect.setWidth(textRect.width() - moveByX);
+ if (iconRect.isValid()) {
iconRect.setWidth(iconRect.width() + vSpacing);
iconRect.translate(-optionCheckBox.rect.width() - vSpacing, 0);
- optionCheckBox.rect.translate(textRect.width() + iconRect.width(), 0);
}
- drawPrimitive(PE_IndicatorMenuCheckMark, &optionCheckBox, painter, widget);
+ optionCheckBox.rect.translate(textRect.width() + iconRect.width(), 0);
}
+
+ const bool selected = (option->state & State_Selected) && (option->state & State_Enabled);
+ if (selected) {
+ const int spacing = pixelMetric(PM_DefaultFrameWidth) * 2;
+ int start; int end;
+ if (QApplication::layoutDirection() == Qt::LeftToRight) {
+ start = optionMenuItem.rect.left() + spacing;
+ end = qMax(textRect.right(), iconRect.right() + spacing);
+ } else {
+ start = qMax(spacing, qMin(textRect.left(), iconRect.left() - spacing));
+ end = optionMenuItem.rect.right() - spacing;
+ }
+ //-1 adjustment to avoid highlight being on top of possible separator item
+ const QRect highlightRect = QRect(
+ QPoint(start, option->rect.top()),
+ QPoint(end, option->rect.bottom() - 1));
+ QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_ListHighlight, painter, highlightRect, flags);
+ }
+
+ if (checkable && !ignoreCheckMark)
+ drawPrimitive(PE_IndicatorMenuCheckMark, &optionCheckBox, painter, widget);
+
//draw icon and/or checkState
QPixmap pix = menuItem->icon.pixmap(pixelMetric(PM_SmallIconSize),
enabled ? QIcon::Normal : QIcon::Disabled);
@@ -1799,7 +1831,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
textRect.translate(vSpacing, 0);
else
textRect.translate(-vSpacing, 0);
- textRect.setWidth(textRect.width()-vSpacing);
+ textRect.setWidth(textRect.width() - vSpacing);
}
//draw indicators
@@ -1817,7 +1849,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
QS60StylePrivate::SF_PointNorth : QS60StylePrivate::SF_PointSouth;
painter->save();
painter->setPen(option->palette.windowText().color());
- QS60StylePrivate::drawSkinPart(QS60StyleEnums::SP_QgnIndiSubMenu, painter, arrowOptions.rect,
+ QS60StylePrivate::drawSkinPart(QS60StyleEnums::SP_QgnIndiSubmenu, painter, arrowOptions.rect,
(flags | QS60StylePrivate::SF_ColorSkinned | arrowDirection));
painter->restore();
}
@@ -1837,6 +1869,24 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
QCommonStyle::drawItemText(painter, textRect, text_flags,
optionMenuItem.palette, enabled,
optionMenuItem.text, QPalette::Text);
+
+ //In Sym^3, native menu items have "lines" between them
+ if (QS60StylePrivate::isSingleClickUi()) {
+ const QColor lineColorAlpha = QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors, 15, 0);
+ const int spacing = QS60StylePrivate::pixelMetric(PM_FrameCornerWidth);
+ //native platform sets each color byte to same value for "line 16" which just defines alpha for
+ //menuitem lines; lets use first byte "red".
+ QColor lineColor = optionMenuItem.palette.text().color();
+ if (lineColorAlpha.isValid())
+ lineColor.setAlpha(lineColorAlpha.red());
+ painter->save();
+ painter->setPen(lineColor);
+
+ const int lineStartX = optionMenuItem.rect.left() + (QS60StylePrivate::pixelMetric(PM_FrameCornerWidth) - 2) + spacing;
+ const int lineEndX = optionMenuItem.rect.right() - (QS60StylePrivate::pixelMetric(PM_FrameCornerWidth) - 2) - spacing;
+ painter->drawLine(QPoint(lineStartX, optionMenuItem.rect.bottom()), QPoint(lineEndX, optionMenuItem.rect.bottom()));
+ painter->restore();
+ }
if (!enabled)
painter->restore();
}
@@ -2233,6 +2283,8 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
if (QS60StylePrivate::canDrawThemeBackground(option->palette.base(), widget) &&
option->palette.window().texture().cacheKey() ==
QS60StylePrivate::m_themePalette->window().texture().cacheKey())
+ //todo: for combobox listviews, the background should include area for menu scrollers,
+ //but this produces drawing issues as we need to turn clipping off.
QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_PopupBackground, painter, option->rect, flags);
else
commonStyleDraws = true;
@@ -2548,10 +2600,12 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
}
}
sz = QCommonStyle::sizeFromContents( ct, opt, csz, widget);
+ //native items have small empty areas at the beginning and end of menu item
+ sz.setWidth(sz.width() + 2 * pixelMetric(PM_MenuHMargin) + 2 * QS60StylePrivate::pixelMetric(PM_FrameCornerWidth));
if (QS60StylePrivate::isTouchSupported())
//Make itemview easier to use in touch devices
//QCommonStyle does not adjust height with horizontal margin, it only adjusts width
- sz.setHeight(sz.height() + 2 * pixelMetric(PM_FocusFrameVMargin));
+ sz.setHeight(sz.height() + 2 * pixelMetric(PM_FocusFrameVMargin) - 8); //QCommonstyle adds 8 to height that this style handles through PM values
break;
#ifndef QT_NO_COMBOBOX
case CT_ComboBox: {
@@ -2816,16 +2870,7 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple
}
break;
case SC_ComboBoxListBoxPopup: {
- const QRect desktopContent = QApplication::desktop()->availableGeometry();
-
- // take the size of this and position bottom above available area
- QRect popupRect;
- const int width = desktopContent.width() - pixelMetric(PM_LayoutRightMargin) - pixelMetric(PM_LayoutLeftMargin);
- popupRect.setWidth(width);
- popupRect.setHeight(desktopContent.height()); //combobox resets height anyway based on content
- popupRect.setBottom(desktopContent.bottom());
- popupRect.translate(pixelMetric(PM_LayoutLeftMargin), 0);
- ret = popupRect;
+ ret = QApplication::desktop()->availableGeometry();
}
break;
default:
@@ -2989,7 +3034,6 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con
ret.setWidth(indicatorWidth);
}
} else {
- ret = menuItem->rect;
if (!menuItem->icon.isNull())
if (menuItem->direction == Qt::LeftToRight)
ret.adjust(indicatorWidth, 0, 0, 0);
@@ -3321,13 +3365,13 @@ QIcon QS60Style::standardIconImplementation(StandardPixmap standardIcon,
part = QS60StyleEnums::SP_QgnNoteErased;
break;
case SP_ToolBarHorizontalExtensionButton:
- part = QS60StyleEnums::SP_QgnIndiSubMenu;
+ part = QS60StyleEnums::SP_QgnIndiSubmenu;
if (QApplication::layoutDirection() == Qt::RightToLeft)
adjustedFlags |= QS60StylePrivate::SF_PointSouth;
break;
case SP_ToolBarVerticalExtensionButton:
adjustedFlags |= QS60StylePrivate::SF_PointEast;
- part = QS60StyleEnums::SP_QgnIndiSubMenu;
+ part = QS60StyleEnums::SP_QgnIndiSubmenu;
break;
default:
diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h
index d8c31f8..836969a 100644
--- a/src/gui/styles/qs60style_p.h
+++ b/src/gui/styles/qs60style_p.h
@@ -154,7 +154,7 @@ public:
SP_QgnIndiRadiobuttOn,
SP_QgnGrafNsliderMarker,
SP_QgnGrafNsliderMarkerSelected,
- SP_QgnIndiSubMenu,
+ SP_QgnIndiSubmenu,
SP_QgnNoteErased,
SP_QgnNoteError,
SP_QgnNoteInfo,
@@ -166,6 +166,24 @@ public:
SP_QgnPropFolderSmall,
SP_QgnPropFolderSmallNew,
SP_QgnPropPhoneMemcLarge,
+ SP_QgnFrSctrlButtonCornerTl, // Toolbar button
+ SP_QgnFrSctrlButtonCornerTr,
+ SP_QgnFrSctrlButtonCornerBl,
+ SP_QgnFrSctrlButtonCornerBr,
+ SP_QgnFrSctrlButtonSideT,
+ SP_QgnFrSctrlButtonSideB,
+ SP_QgnFrSctrlButtonSideL,
+ SP_QgnFrSctrlButtonSideR,
+ SP_QgnFrSctrlButtonCenter,
+ SP_QgnFrSctrlButtonCornerTlPressed, // Toolbar button, pressed
+ SP_QgnFrSctrlButtonCornerTrPressed,
+ SP_QgnFrSctrlButtonCornerBlPressed,
+ SP_QgnFrSctrlButtonCornerBrPressed,
+ SP_QgnFrSctrlButtonSideTPressed,
+ SP_QgnFrSctrlButtonSideBPressed,
+ SP_QgnFrSctrlButtonSideLPressed,
+ SP_QgnFrSctrlButtonSideRPressed,
+ SP_QgnFrSctrlButtonCenterPressed,
SP_QsnCpScrollHandleBottomPressed, //ScrollBar handle, pressed state
SP_QsnCpScrollHandleMiddlePressed,
SP_QsnCpScrollHandleTopPressed,
@@ -198,10 +216,10 @@ public:
SP_QsnFrCaleCornerTr,
SP_QsnFrCaleCornerBl,
SP_QsnFrCaleCornerBr,
- SP_QsnFrCaleGSideT,
- SP_QsnFrCaleGSideB,
- SP_QsnFrCaleGSideL,
- SP_QsnFrCaleGSideR,
+ SP_QsnFrCaleSideT,
+ SP_QsnFrCaleSideB,
+ SP_QsnFrCaleSideL,
+ SP_QsnFrCaleSideR,
SP_QsnFrCaleCenter,
SP_QsnFrCaleHeadingCornerTl, // calendar grid header
SP_QsnFrCaleHeadingCornerTr,
@@ -266,24 +284,6 @@ public:
SP_QsnFrPopupSubSideL,
SP_QsnFrPopupSubSideR,
SP_QsnFrPopupSubCenter,
- SP_QsnFrSctrlButtonCornerTl, // Toolbar button
- SP_QsnFrSctrlButtonCornerTr,
- SP_QsnFrSctrlButtonCornerBl,
- SP_QsnFrSctrlButtonCornerBr,
- SP_QsnFrSctrlButtonSideT,
- SP_QsnFrSctrlButtonSideB,
- SP_QsnFrSctrlButtonSideL,
- SP_QsnFrSctrlButtonSideR,
- SP_QsnFrSctrlButtonCenter,
- SP_QsnFrSctrlButtonCornerTlPressed, // Toolbar button, pressed
- SP_QsnFrSctrlButtonCornerTrPressed,
- SP_QsnFrSctrlButtonCornerBlPressed,
- SP_QsnFrSctrlButtonCornerBrPressed,
- SP_QsnFrSctrlButtonSideTPressed,
- SP_QsnFrSctrlButtonSideBPressed,
- SP_QsnFrSctrlButtonSideLPressed,
- SP_QsnFrSctrlButtonSideRPressed,
- SP_QsnFrSctrlButtonCenterPressed,
SP_QsnFrButtonCornerTlInactive, // Inactive button
SP_QsnFrButtonCornerTrInactive,
SP_QsnFrButtonCornerBlInactive,
@@ -310,7 +310,7 @@ public:
SP_QsnFrListSideBPressed,
SP_QsnFrListSideLPressed,
SP_QsnFrListSideRPressed,
- SP_QsnFrListPressed,
+ SP_QsnFrListCenterPressed,
};
enum ColorLists {
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index c1223af..4bb2ea8 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -179,7 +179,7 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = {
/* SP_QgnGrafBarFrameSideR */ {KAknsIIDQgnGrafBarFrameSideR, EDrawIcon, ES60_All, -1,-1},
/* SP_QgnGrafBarProgress */ {KAknsIIDQgnGrafBarProgress, EDrawIcon, ES60_All, -1,-1},
// No drop area for 3.x non-touch devices
- /* SP_QgnGrafOrgBgGrid */ {KAknsIIDNone, EDrawIcon, ES60_3_X, EAknsMajorGeneric ,0x1eba}, //KAknsIIDQgnGrafOrgBgGrid
+ /* SP_QgnGrafOrgBgGrid */ {KAknsIIDNone, EDrawIcon, ES60_3_X, EAknsMajorGeneric ,0x1eba}, //KAknsIIDQgnGrafOrgBgGrid
/* SP_QgnGrafScrollArrowDown */ {KAknsIIDQgnGrafScrollArrowDown, EDrawGulIcon, ES60_All, -1,-1},
/* SP_QgnGrafScrollArrowLeft */ {KAknsIIDQgnGrafScrollArrowLeft, EDrawGulIcon, ES60_All, -1,-1},
/* SP_QgnGrafScrollArrowRight */ {KAknsIIDQgnGrafScrollArrowRight, EDrawGulIcon, ES60_All, -1,-1},
@@ -214,7 +214,7 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = {
// In 3.1 there different slider graphic and no pressed state.
/* SP_QgnGrafNsliderMarker */ {KAknsIIDQgnIndiSliderEdit, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x19d1 /* KAknsIIDQgnGrafNsliderMarker */},
/* SP_QgnGrafNsliderMarkerSelected */ {KAknsIIDQgnIndiSliderEdit, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x1a4a /* KAknsIIDQgnGrafNsliderMarkerSelected */},
- /* SP_QgnIndiSubMenu */ {KAknsIIDQgnIndiSubmenu, EDrawIcon, ES60_All, -1,-1},
+ /* SP_QgnIndiSubmenu */ {KAknsIIDQgnIndiSubmenu, EDrawIcon, ES60_All, -1,-1},
/* SP_QgnNoteErased */ {KAknsIIDQgnNoteErased, EDrawIcon, ES60_All, -1,-1},
/* SP_QgnNoteError */ {KAknsIIDQgnNoteError, EDrawIcon, ES60_All, -1,-1},
/* SP_QgnNoteInfo */ {KAknsIIDQgnNoteInfo, EDrawIcon, ES60_All, -1,-1},
@@ -227,6 +227,28 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = {
/* SP_QgnPropFolderSmallNew */ {KAknsIIDQgnPropFolderSmallNew, EDrawIcon, ES60_All, -1,-1},
/* SP_QgnPropPhoneMemcLarge */ {KAknsIIDQgnPropPhoneMemcLarge, EDrawIcon, ES60_All, -1,-1},
+ // Toolbar graphics is different in 3.1/3.2 vs. 5.0
+ /* SP_QgnFrSctrlButtonCornerTl */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2301}, /* KAknsIIDQgnFrSctrlButtonCornerTl*/
+ /* SP_QgnFrSctrlButtonCornerTr */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2302},
+ /* SP_QgnFrSctrlButtonCornerBl */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2303},
+ /* SP_QgnFrSctrlButtonCornerBr */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2304},
+ /* SP_QgnFrSctrlButtonSideT */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2305},
+ /* SP_QgnFrSctrlButtonSideB */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2306},
+ /* SP_QgnFrSctrlButtonSideL */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2307},
+ /* SP_QgnFrSctrlButtonSideR */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2308},
+ /* SP_QgnFrSctrlButtonCenter */ {KAknsIIDQsnFrButtonTbCenter, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2309}, /*KAknsIIDQgnFrSctrlButtonCenter*/
+
+ // No pressed state for toolbar button in 3.1/3.2.
+ /* SP_QgnFrSctrlButtonCornerTlPressed */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2621}, /*KAknsIIDQgnFrSctrlButtonCornerTlPressed*/
+ /* SP_QgnFrSctrlButtonCornerTrPressed */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2622},
+ /* SP_QgnFrSctrlButtonCornerBlPressed */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2623},
+ /* SP_QgnFrSctrlButtonCornerBrPressed */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2624},
+ /* SP_QgnFrSctrlButtonSideTPressed */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2625},
+ /* SP_QgnFrSctrlButtonSideBPressed */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2626},
+ /* SP_QgnFrSctrlButtonSideLPressed */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2627},
+ /* SP_QgnFrSctrlButtonSideRPressed */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2628},
+ /* SP_QgnFrSctrlButtonCenterPressed */ {KAknsIIDQsnFrButtonTbCenter, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2629},
+
// 3.1 & 3.2 do not have pressed state for scrollbar, so use normal scrollbar graphics instead.
/* SP_QsnCpScrollHandleBottomPressed*/ {KAknsIIDQsnCpScrollHandleBottom, EDrawIcon, ES60_3_X, EAknsMajorGeneric, 0x20f8}, /*KAknsIIDQsnCpScrollHandleBottomPressed*/
/* SP_QsnCpScrollHandleMiddlePressed*/ {KAknsIIDQsnCpScrollHandleMiddle, EDrawIcon, ES60_3_X, EAknsMajorGeneric, 0x20f9}, /*KAknsIIDQsnCpScrollHandleMiddlePressed*/
@@ -266,10 +288,10 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = {
/* SP_QsnFrCaleCornerTr */ {KAknsIIDQsnFrCaleCornerTr, ENoDraw, ES60_All, -1,-1},
/* SP_QsnFrCaleCornerBl */ {KAknsIIDQsnFrCaleCornerBl, ENoDraw, ES60_All, -1,-1},
/* SP_QsnFrCaleCornerBr */ {KAknsIIDQsnFrCaleCornerBr, ENoDraw, ES60_All, -1,-1},
- /* SP_QsnFrCaleGSideT */ {KAknsIIDQsnFrCaleSideT, ENoDraw, ES60_All, -1,-1},
- /* SP_QsnFrCaleGSideB */ {KAknsIIDQsnFrCaleSideB, ENoDraw, ES60_All, -1,-1},
- /* SP_QsnFrCaleGSideL */ {KAknsIIDQsnFrCaleSideL, ENoDraw, ES60_All, -1,-1},
- /* SP_QsnFrCaleGSideR */ {KAknsIIDQsnFrCaleSideR, ENoDraw, ES60_All, -1,-1},
+ /* SP_QsnFrCaleSideT */ {KAknsIIDQsnFrCaleSideT, ENoDraw, ES60_All, -1,-1},
+ /* SP_QsnFrCaleSideB */ {KAknsIIDQsnFrCaleSideB, ENoDraw, ES60_All, -1,-1},
+ /* SP_QsnFrCaleSideL */ {KAknsIIDQsnFrCaleSideL, ENoDraw, ES60_All, -1,-1},
+ /* SP_QsnFrCaleSideR */ {KAknsIIDQsnFrCaleSideR, ENoDraw, ES60_All, -1,-1},
/* SP_QsnFrCaleCenter */ {KAknsIIDQsnFrCaleCenter, ENoDraw, ES60_All, -1,-1},
/* SP_QsnFrCaleHeadingCornerTl */ {KAknsIIDQsnFrCaleHeadingCornerTl, ENoDraw, ES60_All, -1,-1},
@@ -344,28 +366,6 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = {
/* SP_QsnFrPopupSubSideR */ {KAknsIIDQsnFrPopupSubSideR, ENoDraw, ES60_3_X, -1,-1},
/* SP_QsnFrPopupSubCenter */ {KAknsIIDQsnFrPopupCenterSubmenu, ENoDraw, ES60_3_X, -1,-1},
- // Toolbar graphics is different in 3.1/3.2 vs. 5.0
- /* SP_QsnFrSctrlButtonCornerTl */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2301}, /* KAknsIIDQgnFrSctrlButtonCornerTl*/
- /* SP_QsnFrSctrlButtonCornerTr */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2302},
- /* SP_QsnFrSctrlButtonCornerBl */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2303},
- /* SP_QsnFrSctrlButtonCornerBr */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2304},
- /* SP_QsnFrSctrlButtonSideT */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2305},
- /* SP_QsnFrSctrlButtonSideB */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2306},
- /* SP_QsnFrSctrlButtonSideL */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2307},
- /* SP_QsnFrSctrlButtonSideR */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2308},
- /* SP_QsnFrSctrlButtonCenter */ {KAknsIIDQsnFrButtonTbCenter, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2309}, /*KAknsIIDQgnFrSctrlButtonCenter*/
-
- // No pressed state for toolbar button in 3.1/3.2.
- /* SP_QsnFrSctrlButtonCornerTlPressed */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2621}, /*KAknsIIDQsnFrSctrlButtonCornerTlPressed*/
- /* SP_QsnFrSctrlButtonCornerTrPressed */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2622},
- /* SP_QsnFrSctrlButtonCornerBlPressed */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2623},
- /* SP_QsnFrSctrlButtonCornerBrPressed */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2624},
- /* SP_QsnFrSctrlButtonSideTPressed */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2625},
- /* SP_QsnFrSctrlButtonSideBPressed */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2626},
- /* SP_QsnFrSctrlButtonSideLPressed */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2627},
- /* SP_QsnFrSctrlButtonSideRPressed */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2628},
- /* SP_QsnFrSctrlButtonCenterPressed */ {KAknsIIDQsnFrButtonTbCenter, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2629},
-
// No inactive button graphics in 3.1/3.2
/* SP_QsnFrButtonCornerTlInactive */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x21b1}, /*KAknsIIDQsnFrButtonCornerTlInactive*/
/* SP_QsnFrButtonCornerTrInactive */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x21b2},
@@ -397,7 +397,7 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = {
/* SP_QsnFrListSideBPressed */ {KAknsIIDQsnFrListSideB, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2690},
/* SP_QsnFrListSideLPressed */ {KAknsIIDQsnFrListSideL, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2691},
/* SP_QsnFrListSideRPressed */ {KAknsIIDQsnFrListSideR, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2692},
- /* SP_QsnFrListPressed */ {KAknsIIDQsnFrList, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2693},
+ /* SP_QsnFrListCenterPressed */ {KAknsIIDQsnFrListCenter, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2693},
};
QPixmap QS60StyleModeSpecifics::skinnedGraphics(
@@ -514,7 +514,7 @@ void QS60StyleModeSpecifics::fallbackInfo(const QS60StyleEnums::SkinParts &style
case QS60StyleEnums::SP_QgnGrafNsliderMarkerSelected:
fallbackIndex = 17574; /* EMbmAvkonQgn_graf_nslider_marker_selected */
break;
- case QS60StyleEnums::SP_QgnIndiSubMenu:
+ case QS60StyleEnums::SP_QgnIndiSubmenu:
fallbackIndex = EMbmAvkonQgn_indi_submenu;
break;
case QS60StyleEnums::SP_QgnNoteErased:
@@ -1023,8 +1023,14 @@ TRect QS60StyleModeSpecifics::innerRectFromElement(QS60StylePrivate::SkinFrameEl
heightShrink = heightShrink >> 1;
break;
case QS60StylePrivate::SF_ListHighlight:
- widthShrink = widthShrink - 2;
- heightShrink = heightShrink - 2;
+ //In Sym^3 devices highlights are less blocky
+ if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0) {
+ widthShrink += 2;
+ heightShrink += 2;
+ } else {
+ widthShrink -= 2;
+ heightShrink -= 2;
+ }
break;
case QS60StylePrivate::SF_PopupBackground:
widthShrink = widthShrink + 5;
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index ff29462..139139f 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -145,18 +145,18 @@ struct QtFontEncoding
struct QtFontSize
{
- unsigned short pixelSize;
-
#ifdef Q_WS_X11
- int count;
QtFontEncoding *encodings;
QtFontEncoding *encodingID(int id, uint xpoint = 0, uint xres = 0,
uint yres = 0, uint avgwidth = 0, bool add = false);
+ unsigned short count : 16;
#endif // Q_WS_X11
#if defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)
QByteArray fileName;
int fileIndex;
#endif // defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)
+
+ unsigned short pixelSize : 16;
};
@@ -284,7 +284,12 @@ QtFontSize *QtFontStyle::pixelSize(unsigned short size, bool add)
if (!add)
return 0;
- if (!(count % 8)) {
+ if (!pixelSizes) {
+ // Most style have only one font size, we avoid waisting memory
+ QtFontSize *newPixelSizes = (QtFontSize *)malloc(sizeof(QtFontSize));
+ Q_CHECK_PTR(newPixelSizes);
+ pixelSizes = newPixelSizes;
+ } else if (!(count % 8) || count == 1) {
QtFontSize *newPixelSizes = (QtFontSize *)
realloc(pixelSizes,
(((count+8) >> 3) << 3) * sizeof(QtFontSize));
diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp
index 943df7f..cdfba3d 100644
--- a/src/gui/text/qfontdatabase_s60.cpp
+++ b/src/gui/text/qfontdatabase_s60.cpp
@@ -118,7 +118,7 @@ public:
{
if (!font)
return;
- QS60Data::screenDevice()->ReleaseFont(font);
+ S60->screenDevice()->ReleaseFont(font);
}
};
@@ -205,7 +205,7 @@ const QSymbianTypeFaceExtras *QSymbianFontDatabaseExtrasImplementation::extras(c
CFont* font = NULL;
#ifdef Q_SYMBIAN_HAS_FONTTABLE_API
- const TInt err = QS60Data::screenDevice()->GetNearestFontToDesignHeightInPixels(font, searchSpec);
+ const TInt err = S60->screenDevice()->GetNearestFontToDesignHeightInPixels(font, searchSpec);
Q_ASSERT(err == KErrNone && font);
QScopedPointer<CFont, CFontFromScreenDeviceReleaser> sFont(font);
QSymbianTypeFaceExtras *extras = new QSymbianTypeFaceExtras(font);
@@ -260,17 +260,19 @@ QFontEngineFTS60::QFontEngineFTS60(const QFontDef &fd)
*/
qreal QFontEngineS60::pixelsToPoints(qreal pixels, Qt::Orientation orientation)
{
+ CWsScreenDevice* device = S60->screenDevice();
return (orientation == Qt::Horizontal?
- S60->screenDevice()->HorizontalPixelsToTwips(pixels)
- :S60->screenDevice()->VerticalPixelsToTwips(pixels)) / KTwipsPerPoint;
+ device->HorizontalPixelsToTwips(pixels)
+ :device->VerticalPixelsToTwips(pixels)) / KTwipsPerPoint;
}
qreal QFontEngineS60::pointsToPixels(qreal points, Qt::Orientation orientation)
{
+ CWsScreenDevice* device = S60->screenDevice();
const int twips = points * KTwipsPerPoint;
return orientation == Qt::Horizontal?
- S60->screenDevice()->HorizontalTwipsToPixels(twips)
- :S60->screenDevice()->VerticalTwipsToPixels(twips);
+ device->HorizontalTwipsToPixels(twips)
+ :device->VerticalTwipsToPixels(twips);
}
QFontEngineMultiS60::QFontEngineMultiS60(QFontEngine *first, int script, const QStringList &fallbackFamilies)
@@ -309,16 +311,16 @@ static void initializeDb()
QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock);
- const int numTypeFaces = QS60Data::screenDevice()->NumTypefaces();
+ const int numTypeFaces = S60->screenDevice()->NumTypefaces();
const QSymbianFontDatabaseExtrasImplementation *dbExtras =
static_cast<const QSymbianFontDatabaseExtrasImplementation*>(db->symbianExtras);
bool fontAdded = false;
for (int i = 0; i < numTypeFaces; i++) {
TTypefaceSupport typefaceSupport;
- QS60Data::screenDevice()->TypefaceSupport(typefaceSupport, i);
+ S60->screenDevice()->TypefaceSupport(typefaceSupport, i);
CFont *font; // We have to get a font instance in order to know all the details
TFontSpec fontSpec(typefaceSupport.iTypeface.iName, 11);
- if (QS60Data::screenDevice()->GetNearestFontInPixels(font, fontSpec) != KErrNone)
+ if (S60->screenDevice()->GetNearestFontInPixels(font, fontSpec) != KErrNone)
continue;
QScopedPointer<CFont, QSymbianFontDatabaseExtrasImplementation::CFontFromScreenDeviceReleaser> sFont(font);
if (font->TypeUid() == KCFbsFontUid) {
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index 9056012..2c4fbab 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -690,7 +690,7 @@ bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format)
if (fake_oblique)
transform = true;
// fake bold
- if ((fontDef.weight == QFont::Bold) && !(face->style_flags & FT_STYLE_FLAG_BOLD))
+ if ((fontDef.weight == QFont::Bold) && !(face->style_flags & FT_STYLE_FLAG_BOLD) && !FT_IS_FIXED_WIDTH(face))
embolden = true;
// underline metrics
line_thickness = QFixed::fromFixed(FT_MulFix(face->underline_thickness, face->size->metrics.y_scale));
diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm
index 3be6d28..7ceed61 100644
--- a/src/gui/text/qfontengine_mac.mm
+++ b/src/gui/text/qfontengine_mac.mm
@@ -237,7 +237,8 @@ bool QCoreTextFontEngineMulti::stringToCMap(const QChar *str, int len, QGlyphLay
*nglyphs = len;
for (int i = 0; i < len; ++i) {
outGlyphs[i] = 0;
- logClusters[i] = i;
+ if (logClusters)
+ logClusters[i] = i;
outAdvances_x[i] = QFixed();
outAdvances_y[i] = QFixed();
outAttributes[i].clusterStart = true;
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp
index 925b3bf..f691413 100644
--- a/src/gui/text/qfontengine_s60.cpp
+++ b/src/gui/text/qfontengine_s60.cpp
@@ -66,7 +66,7 @@ QSymbianTypeFaceExtras::QSymbianTypeFaceExtras(CFont* cFont, COpenFont *openFont
QSymbianTypeFaceExtras::~QSymbianTypeFaceExtras()
{
- QS60Data::screenDevice()->ReleaseFont(m_cFont);
+ S60->screenDevice()->ReleaseFont(m_cFont);
}
QByteArray QSymbianTypeFaceExtras::getSfntTable(uint tag) const
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index 10870aa..c742455 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -324,6 +324,26 @@ QStaticText::PerformanceHint QStaticText::performanceHint() const
}
/*!
+ Sets the text option structure that controls the layout process to the given \a textOption.
+
+ \sa textOption()
+*/
+void QStaticText::setTextOption(const QTextOption &textOption)
+{
+ detach();
+ data->textOption = textOption;
+ data->invalidate();
+}
+
+/*!
+ Returns the current text option used to control the layout process.
+*/
+QTextOption QStaticText::textOption() const
+{
+ return data->textOption;
+}
+
+/*!
Sets the preferred width for this QStaticText. If the text is wider than the specified width,
it will be broken into multiple lines and grow vertically. If the text cannot be split into
multiple lines, it will be larger than the specified \a textWidth.
@@ -580,6 +600,7 @@ void QStaticTextPrivate::paintText(const QPointF &topLeftPosition, QPainter *p)
QTextLayout textLayout;
textLayout.setText(text);
textLayout.setFont(font);
+ textLayout.setTextOption(textOption);
qreal leading = QFontMetricsF(font).leading();
qreal height = -leading;
@@ -610,21 +631,26 @@ void QStaticTextPrivate::paintText(const QPointF &topLeftPosition, QPainter *p)
.arg(QString::number(color.blue(), 16), 2, QLatin1Char('0')));
#endif
document.setDefaultFont(font);
- document.setDocumentMargin(0.0);
- if (textWidth >= 0.0)
- document.setTextWidth(textWidth);
+ document.setDocumentMargin(0.0);
#ifndef QT_NO_TEXTHTMLPARSER
document.setHtml(text);
#else
document.setPlainText(text);
#endif
+ if (textWidth >= 0.0)
+ document.setTextWidth(textWidth);
+ else
+ document.adjustSize();
+ document.setDefaultTextOption(textOption);
- document.adjustSize();
p->save();
p->translate(topLeftPosition);
document.drawContents(p);
p->restore();
+ if (textWidth >= 0.0)
+ document.adjustSize(); // Find optimal size
+
actualSize = document.size();
}
}
diff --git a/src/gui/text/qstatictext.h b/src/gui/text/qstatictext.h
index f3bef93..4febde2 100644
--- a/src/gui/text/qstatictext.h
+++ b/src/gui/text/qstatictext.h
@@ -48,7 +48,7 @@
#include <QtGui/qtransform.h>
#include <QtGui/qfont.h>
-
+#include <QtGui/qtextoption.h>
QT_BEGIN_HEADER
@@ -79,6 +79,9 @@ public:
void setTextWidth(qreal textWidth);
qreal textWidth() const;
+ void setTextOption(const QTextOption &textOption);
+ QTextOption textOption() const;
+
QSizeF size() const;
void prepare(const QTransform &matrix = QTransform(), const QFont &font = QFont());
diff --git a/src/gui/text/qstatictext_p.h b/src/gui/text/qstatictext_p.h
index 1a96291..cb60626 100644
--- a/src/gui/text/qstatictext_p.h
+++ b/src/gui/text/qstatictext_p.h
@@ -53,6 +53,8 @@
// We mean it.
//
+#include "qstatictext.h"
+
#include <private/qtextureglyphcache_p.h>
#include <QtGui/qcolor.h>
@@ -148,12 +150,14 @@ public:
QFixedPoint *positionPool; // 4 bytes per text
QChar *charPool; // 4 bytes per text
+ QTextOption textOption; // 28 bytes per text
+
unsigned char needsRelayout : 1; // 1 byte per text
unsigned char useBackendOptimizations : 1;
unsigned char textFormat : 2;
unsigned char untransformedCoordinates : 1;
// ================
- // 167 bytes per text
+ // 195 bytes per text
static QStaticTextPrivate *get(const QStaticText *q);
};
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
index 23849bc..a9caa6b 100644
--- a/src/gui/text/qtextcursor.cpp
+++ b/src/gui/text/qtextcursor.cpp
@@ -2437,6 +2437,9 @@ void QTextCursor::beginEditBlock()
if (!d || !d->priv)
return;
+ if (d->priv->editBlock == 0) // we are the initial edit block, store current cursor position for undo
+ d->priv->editBlockCursorPosition = d->position;
+
d->priv->beginEditBlock();
}
diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp
index e2bca04..f3cd481 100644
--- a/src/gui/text/qtextdocument_p.cpp
+++ b/src/gui/text/qtextdocument_p.cpp
@@ -192,6 +192,7 @@ QTextDocumentPrivate::QTextDocumentPrivate()
initialBlockCharFormatIndex(-1) // set correctly later in init()
{
editBlock = 0;
+ editBlockCursorPosition = -1;
docChangeFrom = -1;
undoState = 0;
@@ -967,6 +968,10 @@ int QTextDocumentPrivate::undoRedo(bool undo)
editPos = -1;
break;
}
+ case QTextUndoCommand::CursorMoved:
+ editPos = c.pos;
+ editLength = 0;
+ break;
case QTextUndoCommand::Custom:
resetBlockRevision = -1; // ## TODO
if (undo)
@@ -1046,6 +1051,18 @@ void QTextDocumentPrivate::appendUndoItem(const QTextUndoCommand &c)
if (undoState < undoStack.size())
clearUndoRedoStacks(QTextDocument::RedoStack);
+ if (editBlock != 0 && editBlockCursorPosition >= 0) { // we had a beginEditBlock() with a cursor position
+ if (c.pos != (quint32) editBlockCursorPosition) { // and that cursor position is different from the command
+ // generate a CursorMoved undo item
+ QT_INIT_TEXTUNDOCOMMAND(cc, QTextUndoCommand::CursorMoved, true, QTextUndoCommand::MoveCursor,
+ 0, 0, editBlockCursorPosition, 0, 0);
+ undoStack.append(cc);
+ undoState++;
+ editBlockCursorPosition = -1;
+ }
+ }
+
+
if (!undoStack.isEmpty() && modified) {
QTextUndoCommand &last = undoStack[undoState - 1];
@@ -1167,6 +1184,8 @@ void QTextDocumentPrivate::endEditBlock()
}
}
+ editBlockCursorPosition = -1;
+
finishEdit();
}
diff --git a/src/gui/text/qtextdocument_p.h b/src/gui/text/qtextdocument_p.h
index ac5ed3c..d1bd698 100644
--- a/src/gui/text/qtextdocument_p.h
+++ b/src/gui/text/qtextdocument_p.h
@@ -132,6 +132,7 @@ public:
BlockAdded = 6,
BlockDeleted = 7,
GroupFormatChange = 8,
+ CursorMoved = 9,
Custom = 256
};
enum Operation {
@@ -315,6 +316,7 @@ private:
bool modified;
int editBlock;
+ int editBlockCursorPosition;
int docChangeFrom;
int docChangeOldLength;
int docChangeLength;
diff --git a/src/gui/text/qtextoption.cpp b/src/gui/text/qtextoption.cpp
index 3b02ebe..8f31e46 100644
--- a/src/gui/text/qtextoption.cpp
+++ b/src/gui/text/qtextoption.cpp
@@ -145,7 +145,7 @@ QTextOption &QTextOption::operator=(const QTextOption &o)
\sa tabArray(), setTabStop(), setTabs()
*/
-void QTextOption::setTabArray(QList<qreal> tabStops)
+void QTextOption::setTabArray(QList<qreal> tabStops) // Qt5: const ref
{
if (!d)
d = new QTextOptionPrivate;
@@ -165,7 +165,7 @@ void QTextOption::setTabArray(QList<qreal> tabStops)
\sa tabStops()
*/
-void QTextOption::setTabs(QList<QTextOption::Tab> tabStops)
+void QTextOption::setTabs(QList<QTextOption::Tab> tabStops) // Qt5: const ref
{
if (!d)
d = new QTextOptionPrivate;
@@ -391,6 +391,12 @@ QList<QTextOption::Tab> QTextOption::tabs() const
*/
/*!
+ \fn Tab::Tab(qreal pos, TabType tabType, QChar delim = QChar())
+ Creates a tab with the given position, tab type, and (for DelimiterTab) delimiter
+ \since 4.7
+*/
+
+/*!
\fn bool Tab::operator==(const Tab &other) const
Returns true if tab \a other is equal to this tab;
diff --git a/src/gui/text/qtextoption.h b/src/gui/text/qtextoption.h
index fa8c6f2..a48efc1 100644
--- a/src/gui/text/qtextoption.h
+++ b/src/gui/text/qtextoption.h
@@ -68,6 +68,8 @@ public:
struct Q_GUI_EXPORT Tab {
inline Tab() : position(80), type(QTextOption::LeftTab) { }
+ inline Tab(qreal pos, TabType tabType, QChar delim = QChar())
+ : position(pos), type(tabType), delimiter(delim) {}
inline bool operator==(const Tab &other) const {
return type == other.type
diff --git a/src/gui/text/text.pri b/src/gui/text/text.pri
index 9ec3142..34311a9 100644
--- a/src/gui/text/text.pri
+++ b/src/gui/text/text.pri
@@ -138,7 +138,8 @@ contains(QT_CONFIG, freetype) {
../3rdparty/freetype/src/base/ftinit.c \
../3rdparty/freetype/src/base/ftmm.c \
../3rdparty/freetype/src/base/fttype1.c \
- ../3rdparty/freetype/src/base/ftbitmap.c\
+ ../3rdparty/freetype/src/base/ftsynth.c \
+ ../3rdparty/freetype/src/base/ftbitmap.c \
../3rdparty/freetype/src/bdf/bdf.c \
../3rdparty/freetype/src/cache/ftcache.c \
../3rdparty/freetype/src/cff/cff.c \
diff --git a/src/gui/util/qsystemtrayicon.cpp b/src/gui/util/qsystemtrayicon.cpp
index d7dde87..941961b 100644
--- a/src/gui/util/qsystemtrayicon.cpp
+++ b/src/gui/util/qsystemtrayicon.cpp
@@ -356,10 +356,7 @@ bool QSystemTrayIcon::isSystemTrayAvailable()
*/
bool QSystemTrayIcon::supportsMessages()
{
-#if defined(Q_WS_QWS)
- return false;
-#endif
- return true;
+ return QSystemTrayIconPrivate::supportsMessages_sys();
}
/*!
diff --git a/src/gui/util/qsystemtrayicon_mac.mm b/src/gui/util/qsystemtrayicon_mac.mm
index 8aaaa0f..22134cb 100644
--- a/src/gui/util/qsystemtrayicon_mac.mm
+++ b/src/gui/util/qsystemtrayicon_mac.mm
@@ -226,6 +226,11 @@ bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys()
return true;
}
+bool QSystemTrayIconPrivate::supportsMessages_sys()
+{
+ return true;
+}
+
void QSystemTrayIconPrivate::showMessage_sys(const QString &title, const QString &message, QSystemTrayIcon::MessageIcon icon, int)
{
diff --git a/src/gui/util/qsystemtrayicon_p.h b/src/gui/util/qsystemtrayicon_p.h
index e8bf197..4592e43 100644
--- a/src/gui/util/qsystemtrayicon_p.h
+++ b/src/gui/util/qsystemtrayicon_p.h
@@ -83,7 +83,9 @@ public:
void updateMenu_sys();
QRect geometry_sys() const;
void showMessage_sys(const QString &msg, const QString &title, QSystemTrayIcon::MessageIcon icon, int secs);
+
static bool isSystemTrayAvailable_sys();
+ static bool supportsMessages_sys();
QPointer<QMenu> menu;
QIcon icon;
diff --git a/src/gui/util/qsystemtrayicon_qws.cpp b/src/gui/util/qsystemtrayicon_qws.cpp
index b1b895b..cda47aa 100644
--- a/src/gui/util/qsystemtrayicon_qws.cpp
+++ b/src/gui/util/qsystemtrayicon_qws.cpp
@@ -75,6 +75,11 @@ bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys()
return false;
}
+bool QSystemTrayIconPrivate::supportsMessages_sys()
+{
+ return false;
+}
+
void QSystemTrayIconPrivate::showMessage_sys(const QString &message,
const QString &title,
QSystemTrayIcon::MessageIcon icon,
diff --git a/src/gui/util/qsystemtrayicon_win.cpp b/src/gui/util/qsystemtrayicon_win.cpp
index c89fbae..a9585b9 100644
--- a/src/gui/util/qsystemtrayicon_win.cpp
+++ b/src/gui/util/qsystemtrayicon_win.cpp
@@ -41,23 +41,21 @@
#include "qsystemtrayicon_p.h"
#ifndef QT_NO_SYSTEMTRAYICON
-#define _WIN32_IE 0x0600 //required for NOTIFYICONDATA_V2_SIZE
-//missing defines for MINGW :
-#ifndef NIN_BALLOONTIMEOUT
-#define NIN_BALLOONTIMEOUT (WM_USER + 4)
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0600
#endif
-#ifndef NIN_BALLOONUSERCLICK
-#define NIN_BALLOONUSERCLICK (WM_USER + 5)
+
+#ifndef _WIN32_IE
+#define _WIN32_IE 0x600
#endif
#include <qt_windows.h>
+#include <windowsx.h>
#include <commctrl.h>
-#include <QBitmap>
+
#include <QLibrary>
#include <QApplication>
-#include <QToolTip>
-#include <QDesktopWidget>
#include <QSettings>
QT_BEGIN_NAMESPACE
@@ -74,6 +72,30 @@ struct Q_NOTIFYICONIDENTIFIER {
GUID guidItem;
};
+#ifndef NOTIFYICON_VERSION_4
+#define NOTIFYICON_VERSION_4 4
+#endif
+
+#ifndef NIN_SELECT
+#define NIN_SELECT (WM_USER + 0)
+#endif
+
+#ifndef NIN_KEYSELECT
+#define NIN_KEYSELECT (WM_USER + 1)
+#endif
+
+#ifndef NIN_BALLOONTIMEOUT
+#define NIN_BALLOONTIMEOUT (WM_USER + 4)
+#endif
+
+#ifndef NIN_BALLOONUSERCLICK
+#define NIN_BALLOONUSERCLICK (WM_USER + 5)
+#endif
+
+#ifndef NIF_SHOWTIP
+#define NIF_SHOWTIP 0x00000080
+#endif
+
#define Q_MSGFLT_ALLOW 1
typedef HRESULT (WINAPI *PtrShell_NotifyIconGetRect)(const Q_NOTIFYICONIDENTIFIER* identifier, RECT* iconLocation);
@@ -87,11 +109,8 @@ public:
~QSystemTrayIconSys();
bool winEvent( MSG *m, long *result );
bool trayMessage(DWORD msg);
- bool iconDrawItem(LPDRAWITEMSTRUCT lpdi);
void setIconContents(NOTIFYICONDATA &data);
bool showMessage(const QString &title, const QString &message, QSystemTrayIcon::MessageIcon type, uint uSecs);
- bool allowsMessages();
- bool supportsMessages();
QRect findIconGeometry(const int a_iButtonID);
void createIcon();
HICON hIcon;
@@ -100,10 +119,11 @@ public:
private:
uint notifyIconSize;
int maxTipLength;
+ int version;
bool ignoreNextMouseRelease;
};
-bool QSystemTrayIconSys::allowsMessages()
+static bool allowsMessages()
{
#ifndef QT_NO_SETTINGS
QSettings settings(QLatin1String("HKEY_CURRENT_USER\\Software\\Microsoft"
@@ -114,16 +134,18 @@ bool QSystemTrayIconSys::allowsMessages()
#endif
}
-bool QSystemTrayIconSys::supportsMessages()
-{
- return allowsMessages();
-}
-
QSystemTrayIconSys::QSystemTrayIconSys(QSystemTrayIcon *object)
: hIcon(0), q(object), ignoreNextMouseRelease(false)
{
- notifyIconSize = FIELD_OFFSET(NOTIFYICONDATA, guidItem); // NOTIFYICONDATAW_V2_SIZE;
+ if (QSysInfo::windowsVersion() >= QSysInfo::WV_VISTA) {
+ notifyIconSize = sizeof(NOTIFYICONDATA);
+ version = NOTIFYICON_VERSION_4;
+ } else {
+ notifyIconSize = NOTIFYICONDATA_V2_SIZE;
+ version = NOTIFYICON_VERSION;
+ }
+
maxTipLength = 128;
// For restoring the tray icon after explorer crashes
@@ -157,7 +179,7 @@ QSystemTrayIconSys::~QSystemTrayIconSys()
void QSystemTrayIconSys::setIconContents(NOTIFYICONDATA &tnd)
{
- tnd.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP;
+ tnd.uFlags |= NIF_MESSAGE | NIF_ICON | NIF_TIP;
tnd.uCallbackMessage = MYWM_NOTIFYICON;
tnd.hIcon = hIcon;
QString tip = q->toolTip();
@@ -170,7 +192,6 @@ void QSystemTrayIconSys::setIconContents(NOTIFYICONDATA &tnd)
static int iconFlag( QSystemTrayIcon::MessageIcon icon )
{
-#if NOTIFYICON_VERSION >= 3
switch (icon) {
case QSystemTrayIcon::Information:
return NIIF_INFO;
@@ -184,20 +205,13 @@ static int iconFlag( QSystemTrayIcon::MessageIcon icon )
Q_ASSERT_X(false, "QSystemTrayIconSys::showMessage", "Invalid QSystemTrayIcon::MessageIcon value");
return NIIF_NONE;
}
-#else
- Q_UNUSED(icon);
- return 0;
-#endif
}
bool QSystemTrayIconSys::showMessage(const QString &title, const QString &message, QSystemTrayIcon::MessageIcon type, uint uSecs)
{
-#if NOTIFYICON_VERSION >= 3
NOTIFYICONDATA tnd;
memset(&tnd, 0, notifyIconSize);
- Q_ASSERT(testAttribute(Qt::WA_WState_Created));
- setIconContents(tnd);
memcpy(tnd.szInfo, message.utf16(), qMin(message.length() + 1, 256) * sizeof(wchar_t));
memcpy(tnd.szInfoTitle, title.utf16(), qMin(title.length() + 1, 64) * sizeof(wchar_t));
@@ -206,42 +220,36 @@ bool QSystemTrayIconSys::showMessage(const QString &title, const QString &messag
tnd.cbSize = notifyIconSize;
tnd.hWnd = winId();
tnd.uTimeout = uSecs;
- tnd.uFlags = NIF_INFO;
+ tnd.uFlags = NIF_INFO | NIF_SHOWTIP;
+
+ Q_ASSERT(testAttribute(Qt::WA_WState_Created));
return Shell_NotifyIcon(NIM_MODIFY, &tnd);
-#else
- Q_UNUSED(title);
- Q_UNUSED(message);
- Q_UNUSED(type);
- Q_UNUSED(uSecs);
- return false;
-#endif
}
bool QSystemTrayIconSys::trayMessage(DWORD msg)
{
NOTIFYICONDATA tnd;
memset(&tnd, 0, notifyIconSize);
+
tnd.uID = q_uNOTIFYICONID;
tnd.cbSize = notifyIconSize;
tnd.hWnd = winId();
+ tnd.uFlags = NIF_SHOWTIP;
+ tnd.uVersion = version;
Q_ASSERT(testAttribute(Qt::WA_WState_Created));
- if (msg != NIM_DELETE) {
+ if (msg == NIM_ADD || msg == NIM_MODIFY) {
setIconContents(tnd);
}
- return Shell_NotifyIcon(msg, &tnd);
-}
+ bool success = Shell_NotifyIcon(msg, &tnd);
-bool QSystemTrayIconSys::iconDrawItem(LPDRAWITEMSTRUCT lpdi)
-{
- if (!hIcon)
- return false;
-
- DrawIconEx(lpdi->hDC, lpdi->rcItem.left, lpdi->rcItem.top, hIcon, 0, 0, 0, 0, DI_NORMAL);
- return true;
+ if (msg == NIM_ADD)
+ return success && Shell_NotifyIcon(NIM_SETVERSION, &tnd);
+ else
+ return success;
}
void QSystemTrayIconSys::createIcon()
@@ -264,27 +272,24 @@ void QSystemTrayIconSys::createIcon()
bool QSystemTrayIconSys::winEvent( MSG *m, long *result )
{
switch(m->message) {
- case WM_CREATE:
-#ifdef GWLP_USERDATA
- SetWindowLongPtr(winId(), GWLP_USERDATA, (LONG_PTR)((CREATESTRUCTW*)m->lParam)->lpCreateParams);
-#else
- SetWindowLong(winId(), GWL_USERDATA, (LONG)((CREATESTRUCTW*)m->lParam)->lpCreateParams);
-#endif
- break;
-
- case WM_DRAWITEM:
- return iconDrawItem((LPDRAWITEMSTRUCT)m->lParam);
-
case MYWM_NOTIFYICON:
{
- RECT r;
- GetWindowRect(winId(), &r);
- QEvent *e = 0;
- Qt::KeyboardModifiers keys = QApplication::keyboardModifiers();
- QPoint gpos = QCursor::pos();
-
- switch (m->lParam) {
- case WM_LBUTTONUP:
+ int message = 0;
+ QPoint gpos;
+
+ if (version == NOTIFYICON_VERSION_4) {
+ Q_ASSERT(q_uNOTIFYICONID == HIWORD(m->lParam));
+ message = LOWORD(m->lParam);
+ gpos = QPoint(GET_X_LPARAM(m->wParam), GET_Y_LPARAM(m->wParam));
+ } else {
+ Q_ASSERT(q_uNOTIFYICONID == m->wParam);
+ message = m->lParam;
+ gpos = QCursor::pos();
+ }
+
+ switch (message) {
+ case NIN_SELECT:
+ case NIN_KEYSELECT:
if (ignoreNextMouseRelease)
ignoreNextMouseRelease = false;
else
@@ -297,7 +302,7 @@ bool QSystemTrayIconSys::winEvent( MSG *m, long *result )
emit q->activated(QSystemTrayIcon::DoubleClick);
break;
- case WM_RBUTTONUP:
+ case WM_CONTEXTMENU:
if (q->contextMenu()) {
q->contextMenu()->popup(gpos);
}
@@ -311,13 +316,9 @@ bool QSystemTrayIconSys::winEvent( MSG *m, long *result )
case WM_MBUTTONUP:
emit q->activated(QSystemTrayIcon::MiddleClick);
break;
+
default:
- break;
- }
- if (e) {
- bool res = QApplication::sendEvent(q, e);
- delete e;
- return res;
+ break;
}
break;
}
@@ -441,7 +442,7 @@ QRect QSystemTrayIconSys::findIconGeometry(const int iconId)
void QSystemTrayIconPrivate::showMessage_sys(const QString &title, const QString &message, QSystemTrayIcon::MessageIcon type, int timeOut)
{
- if (!sys || !sys->allowsMessages())
+ if (!sys || !allowsMessages())
return;
uint uSecs = 0;
@@ -459,21 +460,14 @@ void QSystemTrayIconPrivate::showMessage_sys(const QString &title, const QString
//title is limited to 63 chars + NULL
QString titleString = title.left(63) + QChar();
- if (sys->supportsMessages()) {
- sys->showMessage(titleString, messageString, type, (unsigned int)uSecs);
- } else {
- //use fallback
- QRect iconPos = sys->findIconGeometry(q_uNOTIFYICONID);
- if (iconPos.isValid()) {
- QBalloonTip::showBalloon(type, title, message, sys->q, iconPos.center(), uSecs, true);
- }
- }
+ sys->showMessage(titleString, messageString, type, uSecs);
}
QRect QSystemTrayIconPrivate::geometry_sys() const
{
if (!sys)
return QRect();
+
return sys->findIconGeometry(q_uNOTIFYICONID);
}
@@ -519,6 +513,11 @@ bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys()
return true;
}
+bool QSystemTrayIconPrivate::supportsMessages_sys()
+{
+ return allowsMessages();
+}
+
QT_END_NAMESPACE
#endif
diff --git a/src/gui/util/qsystemtrayicon_wince.cpp b/src/gui/util/qsystemtrayicon_wince.cpp
index 0a0d340..e5cf0fd 100644
--- a/src/gui/util/qsystemtrayicon_wince.cpp
+++ b/src/gui/util/qsystemtrayicon_wince.cpp
@@ -155,10 +155,6 @@ bool QSystemTrayIconSys::winEvent( MSG *m, long *result )
case MYWM_NOTIFYICON:
{
- RECT r;
- GetWindowRect(winId(), &r);
- QEvent *e = 0;
- Qt::KeyboardModifiers keys = QApplication::keyboardModifiers();
QPoint gpos = QCursor::pos();
switch (m->lParam) {
@@ -193,14 +189,10 @@ bool QSystemTrayIconSys::winEvent( MSG *m, long *result )
case WM_MBUTTONUP:
emit q->activated(QSystemTrayIcon::MiddleClick);
break;
+
default:
break;
}
- if (e) {
- bool res = QApplication::sendEvent(q, e);
- delete e;
- return res;
- }
break;
}
default:
@@ -291,6 +283,11 @@ bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys()
return true;
}
+bool QSystemTrayIconPrivate::supportsMessages_sys()
+{
+ return true;
+}
+
QT_END_NAMESPACE
#endif
diff --git a/src/gui/util/qsystemtrayicon_x11.cpp b/src/gui/util/qsystemtrayicon_x11.cpp
index 82b4325..59fdc07 100644
--- a/src/gui/util/qsystemtrayicon_x11.cpp
+++ b/src/gui/util/qsystemtrayicon_x11.cpp
@@ -381,6 +381,11 @@ bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys()
return QSystemTrayIconSys::locateSystemTray() != XNone;
}
+bool QSystemTrayIconPrivate::supportsMessages_sys()
+{
+ return true;
+}
+
void QSystemTrayIconPrivate::showMessage_sys(const QString &message, const QString &title,
QSystemTrayIcon::MessageIcon icon, int msecs)
{
diff --git a/src/gui/widgets/qslider.cpp b/src/gui/widgets/qslider.cpp
index a5e62cf..5755202 100644
--- a/src/gui/widgets/qslider.cpp
+++ b/src/gui/widgets/qslider.cpp
@@ -621,7 +621,7 @@ QSlider::TickPosition QSlider::tickPosition() const
\brief the interval between tickmarks
This is a value interval, not a pixel interval. If it is 0, the
- slider will choose between lineStep() and pageStep().
+ slider will choose between singleStep() and pageStep().
The default value is 0.
diff --git a/src/imports/particles/qdeclarativeparticles.cpp b/src/imports/particles/qdeclarativeparticles.cpp
index ecc6604..630c068 100644
--- a/src/imports/particles/qdeclarativeparticles.cpp
+++ b/src/imports/particles/qdeclarativeparticles.cpp
@@ -241,11 +241,13 @@ void QDeclarativeParticleMotionGravity::setAcceleration(qreal accel)
void QDeclarativeParticleMotionGravity::advance(QDeclarativeParticle &p, int interval)
{
- qreal xdiff = p.x - _xAttr;
- qreal ydiff = p.y - _yAttr;
+ qreal xdiff = _xAttr - p.x;
+ qreal ydiff = _yAttr - p.y;
+ qreal absXdiff = qAbs(xdiff);
+ qreal absYdiff = qAbs(ydiff);
- qreal xcomp = xdiff / (xdiff + ydiff);
- qreal ycomp = ydiff / (xdiff + ydiff);
+ qreal xcomp = xdiff / (absXdiff + absYdiff);
+ qreal ycomp = ydiff / (absXdiff + absYdiff);
p.x_velocity += xcomp * _accel * interval;
p.y_velocity += ycomp * _accel * interval;
@@ -1284,11 +1286,7 @@ void QDeclarativeParticlesPainter::paint(QPainter *p, const QStyleOptionGraphics
const int myX = x() + parentItem()->x();
const int myY = y() + parentItem()->y();
-#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0))
QVarLengthArray<QPainter::PixmapFragment, 256> pixmapData;
-#else
- QVarLengthArray<QDrawPixmaps::Data, 256> pixmapData;
-#endif
pixmapData.resize(d->particles.count());
const QRectF sourceRect = d->image.rect();
@@ -1296,32 +1294,20 @@ void QDeclarativeParticlesPainter::paint(QPainter *p, const QStyleOptionGraphics
qreal halfPHeight = sourceRect.height()/2.;
for (int i = 0; i < d->particles.count(); ++i) {
const QDeclarativeParticle &particle = d->particles.at(i);
-#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0))
pixmapData[i].x = particle.x - myX + halfPWidth;
pixmapData[i].y = particle.y - myY + halfPHeight;
-#else
- pixmapData[i].point = QPointF(particle.x - myX + halfPWidth, particle.y - myY + halfPHeight);
-#endif
pixmapData[i].opacity = particle.opacity;
//these never change
pixmapData[i].rotation = 0;
pixmapData[i].scaleX = 1;
pixmapData[i].scaleY = 1;
-#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0))
pixmapData[i].sourceLeft = sourceRect.left();
pixmapData[i].sourceTop = sourceRect.top();
pixmapData[i].width = sourceRect.width();
pixmapData[i].height = sourceRect.height();
-#else
- pixmapData[i].source = sourceRect;
-#endif
}
-#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0))
p->drawPixmapFragments(pixmapData.data(), d->particles.count(), d->image);
-#else
- qDrawPixmaps(p, pixmapData.data(), d->particles.count(), d->image);
-#endif
}
void QDeclarativeParticles::componentComplete()
diff --git a/src/imports/qimportbase.pri b/src/imports/qimportbase.pri
index 612ff20..0f70030 100644
--- a/src/imports/qimportbase.pri
+++ b/src/imports/qimportbase.pri
@@ -18,6 +18,8 @@ copy2build.output = $$QT_BUILD_TREE/imports/$$TARGETPATH/qmldir
copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
copy2build.name = COPY ${QMAKE_FILE_IN}
copy2build.CONFIG += no_link
+# `clean' should leave the build in a runnable state, which means it shouldn't delete qmldir
+copy2build.CONFIG += no_clean
QMAKE_EXTRA_COMPILERS += copy2build
TARGET = $$qtLibraryTarget($$TARGET)
diff --git a/src/imports/webkit/qdeclarativewebview.cpp b/src/imports/webkit/qdeclarativewebview.cpp
index 9e5647f..383f1ce 100644
--- a/src/imports/webkit/qdeclarativewebview.cpp
+++ b/src/imports/webkit/qdeclarativewebview.cpp
@@ -1163,9 +1163,9 @@ QString QDeclarativeWebPage::chooseFile(QWebFrame *originatingFrame, const QStri
}
/*!
- \qmlsignal WebView::alert(message)
+ \qmlsignal WebView::onAlert(message)
- This signal is emitted when the web engine sends a JavaScript alert. The \a message is the text
+ This handler is called when the web engine sends a JavaScript alert. The \a message is the text
to be displayed in the alert to the user.
*/
diff --git a/src/network/access/access.pri b/src/network/access/access.pri
index aa36890..173a087 100644
--- a/src/network/access/access.pri
+++ b/src/network/access/access.pri
@@ -59,8 +59,9 @@ SOURCES += access/qftp.cpp \
#zlib support
contains(QT_CONFIG, zlib) {
- INCLUDEPATH += ../3rdparty/zlib
+ INCLUDEPATH += ../3rdparty/zlib
} else:!contains(QT_CONFIG, no-zlib) {
- unix:LIBS_PRIVATE += -lz
-# win32:LIBS += libz.lib
+ symbian:LIBS_PRIVATE += -llibz
+ else:if(unix|win32-g++*):LIBS_PRIVATE += -lz
+ else:LIBS += zdll.lib
}
diff --git a/src/network/network.qrc b/src/network/network.qrc
deleted file mode 100644
index 06f98cb..0000000
--- a/src/network/network.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="/trolltech/network">
-<file>ssl/qt-ca-bundle.crt</file>
-</qresource>
-</RCC>
diff --git a/src/network/socket/qlocalserver_p.h b/src/network/socket/qlocalserver_p.h
index feaaae0..4f92b64 100644
--- a/src/network/socket/qlocalserver_p.h
+++ b/src/network/socket/qlocalserver_p.h
@@ -99,6 +99,7 @@ public:
struct Listener {
HANDLE handle;
OVERLAPPED overlapped;
+ bool connected;
};
void setError(const QString &function);
diff --git a/src/network/socket/qlocalserver_win.cpp b/src/network/socket/qlocalserver_win.cpp
index 07baf1e..61220e4 100644
--- a/src/network/socket/qlocalserver_win.cpp
+++ b/src/network/socket/qlocalserver_win.cpp
@@ -85,8 +85,10 @@ bool QLocalServerPrivate::addListener()
if (!ConnectNamedPipe(listener.handle, &listener.overlapped)) {
switch (GetLastError()) {
case ERROR_IO_PENDING:
+ listener.connected = false;
break;
case ERROR_PIPE_CONNECTED:
+ listener.connected = true;
SetEvent(eventHandle);
break;
default:
@@ -155,7 +157,9 @@ void QLocalServerPrivate::_q_onNewConnection()
// a client connection first, so there is no way around polling all of them.
for (int i = 0; i < listeners.size(); ) {
HANDLE handle = listeners[i].handle;
- if (GetOverlappedResult(handle, &listeners[i].overlapped, &dummy, FALSE)) {
+ if (listeners[i].connected
+ || GetOverlappedResult(handle, &listeners[i].overlapped, &dummy, FALSE))
+ {
listeners.removeAt(i);
addListener();
diff --git a/src/network/socket/qlocalsocket_p.h b/src/network/socket/qlocalsocket_p.h
index 0f1c23c..57ca3c2 100644
--- a/src/network/socket/qlocalsocket_p.h
+++ b/src/network/socket/qlocalsocket_p.h
@@ -135,7 +135,7 @@ public:
void _q_canWrite();
void _q_pipeClosed();
void _q_emitReadyRead();
- DWORD bytesAvailable();
+ DWORD checkPipeState();
void startAsyncRead();
bool completeAsyncRead();
void checkReadyRead();
diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp
index 5f46ecb..5486f47 100644
--- a/src/network/socket/qlocalsocket_win.cpp
+++ b/src/network/socket/qlocalsocket_win.cpp
@@ -192,6 +192,9 @@ qint64 QLocalSocket::readData(char *data, qint64 maxSize)
{
Q_D(QLocalSocket);
+ if (d->pipeClosed && d->actualReadBufferSize == 0)
+ return -1; // signal EOF
+
qint64 readSoFar;
// If startAsyncRead() read data, copy it to its destination.
if (maxSize == 1 && d->actualReadBufferSize > 0) {
@@ -213,10 +216,8 @@ qint64 QLocalSocket::readData(char *data, qint64 maxSize)
}
if (d->pipeClosed) {
- if (readSoFar == 0) {
+ if (d->actualReadBufferSize == 0)
QTimer::singleShot(0, this, SLOT(_q_pipeClosed()));
- return -1; // signal EOF
- }
} else {
if (!d->readSequenceStarted)
d->startAsyncRead();
@@ -250,7 +251,10 @@ void QLocalSocketPrivate::checkReadyRead()
void QLocalSocketPrivate::startAsyncRead()
{
do {
- DWORD bytesToRead = bytesAvailable();
+ DWORD bytesToRead = checkPipeState();
+ if (pipeClosed)
+ return;
+
if (bytesToRead == 0) {
// There are no bytes in the pipe but we need to
// start the overlapped read with some buffer size.
@@ -333,9 +337,11 @@ void QLocalSocket::abort()
}
/*!
- The number of bytes available from the pipe
- */
-DWORD QLocalSocketPrivate::bytesAvailable()
+ \internal
+ Returns the number of available bytes in the pipe.
+ Sets QLocalSocketPrivate::pipeClosed to true if the connection is broken.
+ */
+DWORD QLocalSocketPrivate::checkPipeState()
{
Q_Q(QLocalSocket);
DWORD bytes;
@@ -345,7 +351,8 @@ DWORD QLocalSocketPrivate::bytesAvailable()
if (!pipeClosed) {
pipeClosed = true;
emit q->readChannelFinished();
- QTimer::singleShot(0, q, SLOT(_q_pipeClosed()));
+ if (actualReadBufferSize == 0)
+ QTimer::singleShot(0, q, SLOT(_q_pipeClosed()));
}
}
return 0;
@@ -478,6 +485,8 @@ void QLocalSocketPrivate::_q_notified()
if (!completeAsyncRead()) {
pipeClosed = true;
emit q->readChannelFinished();
+ if (actualReadBufferSize == 0)
+ QTimer::singleShot(0, q, SLOT(_q_pipeClosed()));
return;
}
startAsyncRead();
@@ -529,7 +538,7 @@ bool QLocalSocket::waitForDisconnected(int msecs)
}
QIncrementalSleepTimer timer(msecs);
forever {
- d->bytesAvailable(); // to check if PeekNamedPipe fails
+ d->checkPipeState();
if (d->pipeClosed)
close();
if (state() == UnconnectedState)
@@ -561,11 +570,22 @@ bool QLocalSocket::waitForReadyRead(int msecs)
if (d->state != QLocalSocket::ConnectedState)
return false;
+ // We already know that the pipe is gone, but did not enter the event loop yet.
+ if (d->pipeClosed) {
+ close();
+ return false;
+ }
+
Q_ASSERT(d->readSequenceStarted);
DWORD result = WaitForSingleObject(d->overlapped.hEvent, msecs == -1 ? INFINITE : msecs);
switch (result) {
case WAIT_OBJECT_0:
d->_q_notified();
+ // We just noticed that the pipe is gone.
+ if (d->pipeClosed) {
+ close();
+ return false;
+ }
return true;
case WAIT_TIMEOUT:
return false;
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index 31c5ed1..a3ea555 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -548,8 +548,13 @@ QList<QSslCertificate> QSslCertificate::fromPath(const QString &path,
// chop off the first two characters from the glob'ed paths.
int startIndex = 0;
if (pathPrefix.trimmed().isEmpty()) {
- startIndex = 2;
- pathPrefix = QLatin1String(".");
+ if(path.startsWith(QLatin1Char('/'))) {
+ pathPrefix = path.left(path.indexOf(QRegExp(QLatin1String("[\\*\\?\\[]"))));
+ pathPrefix = path.left(path.lastIndexOf(QLatin1Char('/')));
+ } else {
+ startIndex = 2;
+ pathPrefix = QLatin1String(".");
+ }
}
// The path is a file.
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index 0918539..a8c602a 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -1329,8 +1329,8 @@ void QSslSocket::setDefaultCaCertificates(const QList<QSslCertificate> &certific
/*!
Returns the current default CA certificate database. This database
is originally set to your system's default CA certificate database.
- If no system default database is found, Qt will provide its own
- default database. You can override the default CA certificate database
+ If no system default database is found, an empty database will be
+ returned. You can override the default CA certificate database
with your own CA certificate database using setDefaultCaCertificates().
Each SSL socket's CA certificate database is initialized to the
@@ -1344,8 +1344,8 @@ QList<QSslCertificate> QSslSocket::defaultCaCertificates()
}
/*!
- This function provides a default CA certificate database
- shipped together with Qt. The CA certificate database
+ This function provides the CA certificate database
+ provided by the operating system. The CA certificate database
returned by this function is used to initialize the database
returned by defaultCaCertificates(). You can replace that database
with your own with setDefaultCaCertificates().
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 050fb1b..36a0cc7 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -57,12 +57,18 @@
#include <QtCore/qthread.h>
#include <QtCore/qurl.h>
#include <QtCore/qvarlengtharray.h>
-
-static void initNetworkResources()
-{
- // Initialize resources
- Q_INIT_RESOURCE(network);
-}
+#include <QLibrary> // for loading the security lib for the CA store
+
+#if defined(Q_OS_MAC)
+#define kSecTrustSettingsDomainSystem 2 // so we do not need to include the header file
+ PtrSecCertificateGetData QSslSocketPrivate::ptrSecCertificateGetData = 0;
+ PtrSecTrustSettingsCopyCertificates QSslSocketPrivate::ptrSecTrustSettingsCopyCertificates = 0;
+ PtrSecTrustCopyAnchorCertificates QSslSocketPrivate::ptrSecTrustCopyAnchorCertificates = 0;
+#elif defined(Q_OS_WIN)
+ PtrCertOpenSystemStoreW QSslSocketPrivate::ptrCertOpenSystemStoreW = 0;
+ PtrCertFindCertificateInStore QSslSocketPrivate::ptrCertFindCertificateInStore = 0;
+ PtrCertCloseStore QSslSocketPrivate::ptrCertCloseStore = 0;
+#endif
QT_BEGIN_NAMESPACE
@@ -406,9 +412,6 @@ bool QSslSocketPrivate::ensureInitialized()
if (!q_initialized) {
q_initialized = true;
- // Initialize resources
- initNetworkResources();
-
// Initialize OpenSSL.
q_CRYPTO_set_id_callback(id_function);
q_CRYPTO_set_locking_callback(locking_function);
@@ -448,6 +451,36 @@ bool QSslSocketPrivate::ensureInitialized()
resetDefaultCiphers();
setDefaultCaCertificates(systemCaCertificates());
}
+
+ //load symbols needed to receive certificates from system store
+#if defined(Q_OS_MAC)
+ QLibrary securityLib("/System/Library/Frameworks/Security.framework/Versions/Current/Security");
+ if (securityLib.load()) {
+ ptrSecCertificateGetData = (PtrSecCertificateGetData) securityLib.resolve("SecCertificateGetData");
+ if (!ptrSecCertificateGetData)
+ qWarning("could not resolve symbols in security library"); // should never happen
+
+ ptrSecTrustSettingsCopyCertificates = (PtrSecTrustSettingsCopyCertificates) securityLib.resolve("SecTrustSettingsCopyCertificates");
+ if (!ptrSecTrustSettingsCopyCertificates) { // method was introduced in Leopard, use legacy method if it's not there
+ ptrSecTrustCopyAnchorCertificates = (PtrSecTrustCopyAnchorCertificates) securityLib.resolve("SecTrustCopyAnchorCertificates");
+ if (!ptrSecTrustCopyAnchorCertificates)
+ qWarning("could not resolve symbols in security library"); // should never happen
+ }
+ } else {
+ qWarning("could not load security library");
+ }
+#elif defined(Q_OS_WIN)
+ HINSTANCE hLib = LoadLibraryW(L"Crypt32");
+ if (hLib) {
+ ptrCertOpenSystemStoreW = (PtrCertOpenSystemStoreW)GetProcAddress(hLib, "CertOpenSystemStoreW");
+ ptrCertFindCertificateInStore = (PtrCertFindCertificateInStore)GetProcAddress(hLib, "CertFindCertificateInStore");
+ ptrCertCloseStore = (PtrCertCloseStore)GetProcAddress(hLib, "CertCloseStore");
+ if (!ptrCertOpenSystemStoreW || !ptrCertFindCertificateInStore || !ptrCertCloseStore)
+ qWarning("could not resolve symbols in crypt32 library"); // should never happen
+ } else {
+ qWarning("could not load crypt32 library"); // should never happen
+ }
+#endif
return true;
}
@@ -486,13 +519,74 @@ void QSslSocketPrivate::resetDefaultCiphers()
QList<QSslCertificate> QSslSocketPrivate::systemCaCertificates()
{
- // Qt provides a default bundle of certificates
- QFile caBundle(QLatin1String(":/trolltech/network/ssl/qt-ca-bundle.crt"));
- if (caBundle.open(QIODevice::ReadOnly | QIODevice::Text))
- return QSslCertificate::fromDevice(&caBundle);
-
- // Unreachable; return no bundle.
- return QList<QSslCertificate>();
+ ensureInitialized();
+ QList<QSslCertificate> systemCerts;
+#if defined(Q_OS_MAC)
+ CFArrayRef cfCerts;
+ OSStatus status = 1;
+
+ OSStatus SecCertificateGetData (
+ SecCertificateRef certificate,
+ CSSM_DATA_PTR data
+ );
+
+ if (ptrSecCertificateGetData) {
+ if (ptrSecTrustSettingsCopyCertificates)
+ status = ptrSecTrustSettingsCopyCertificates(kSecTrustSettingsDomainSystem, &cfCerts);
+ else if (ptrSecTrustCopyAnchorCertificates)
+ status = ptrSecTrustCopyAnchorCertificates(&cfCerts);
+ if (!status) {
+ CFIndex size = CFArrayGetCount(cfCerts);
+ for (CFIndex i = 0; i < size; ++i) {
+ SecCertificateRef cfCert = (SecCertificateRef)CFArrayGetValueAtIndex(cfCerts, i);
+ CSSM_DATA data;
+ CSSM_DATA_PTR dataPtr = &data;
+ if (ptrSecCertificateGetData(cfCert, dataPtr)) {
+ qWarning("error retrieving a CA certificate from the system store");
+ } else {
+ int len = data.Length;
+ char *rawData = reinterpret_cast<char *>(data.Data);
+ QByteArray rawCert(rawData, len);
+ systemCerts.append(QSslCertificate::fromData(rawCert, QSsl::Der));
+ }
+ }
+ }
+ else {
+ // no detailed error handling here
+ qWarning("could not retrieve system CA certificates");
+ }
+ }
+#elif defined(Q_OS_WIN)
+ if (ptrCertOpenSystemStoreW && ptrCertFindCertificateInStore && ptrCertCloseStore) {
+ HCERTSTORE hSystemStore;
+ hSystemStore = ptrCertOpenSystemStoreW(0, L"ROOT");
+ if(hSystemStore) {
+ PCCERT_CONTEXT pc = NULL;
+ while(1) {
+ pc = ptrCertFindCertificateInStore( hSystemStore, X509_ASN_ENCODING, 0, CERT_FIND_ANY, NULL, pc);
+ if(!pc)
+ break;
+ QByteArray der((const char *)(pc->pbCertEncoded), static_cast<int>(pc->cbCertEncoded));
+ QSslCertificate cert(der,QSsl::Der);
+ systemCerts.append(cert);
+ }
+ ptrCertCloseStore(hSystemStore, 0);
+ }
+ }
+#elif defined(Q_OS_AIX)
+ systemCerts.append(QSslCertificate::fromPath("/var/ssl/certs/*.pem", QSsl::Pem, QRegExp::Wildcard));
+#elif defined(Q_OS_SOLARIS)
+ systemCerts.append(QSslCertificate::fromPath("/usr/local/ssl/certs/*.pem", QSsl::Pem, QRegExp::Wildcard));
+#elif defined(Q_OS_HPUX)
+ systemCerts.append(QSslCertificate::fromPath("/opt/openssl/certs/*.pem", QSsl::Pem, QRegExp::Wildcard));
+#elif defined(Q_OS_LINUX)
+ systemCerts.append(QSslCertificate::fromPath("/etc/ssl/certs/*.pem", QSsl::Pem, QRegExp::Wildcard)); // (K)ubuntu, OpenSUSE, Mandriva, ...
+ systemCerts.append(QSslCertificate::fromPath("/etc/pki/tls/certs/ca-bundle.crt", QSsl::Pem)); // Fedora
+ systemCerts.append(QSslCertificate::fromPath("/usr/lib/ssl/certs/*.pem", QSsl::Pem, QRegExp::Wildcard)); // Gentoo, Mandrake
+ systemCerts.append(QSslCertificate::fromPath("/usr/share/ssl/*.pem", QSsl::Pem, QRegExp::Wildcard)); // Centos, Redhat, SuSE
+ systemCerts.append(QSslCertificate::fromPath("/usr/local/ssl/*.pem", QSsl::Pem, QRegExp::Wildcard)); // Normal OpenSSL Tarball
+#endif
+ return systemCerts;
}
void QSslSocketBackendPrivate::startClientEncryption()
diff --git a/src/network/ssl/qsslsocket_p.h b/src/network/ssl/qsslsocket_p.h
index 8e22664..42ae98f 100644
--- a/src/network/ssl/qsslsocket_p.h
+++ b/src/network/ssl/qsslsocket_p.h
@@ -66,6 +66,24 @@
QT_BEGIN_NAMESPACE
+#if defined(Q_OS_MAC)
+#include <Security/SecCertificate.h>
+#include <CoreFoundation/CFArray.h>
+ typedef OSStatus (*PtrSecCertificateGetData)(SecCertificateRef, CSSM_DATA_PTR);
+ typedef OSStatus (*PtrSecTrustSettingsCopyCertificates)(int, CFArrayRef*);
+ typedef OSStatus (*PtrSecTrustCopyAnchorCertificates)(CFArrayRef*);
+#elif defined(Q_OS_WIN)
+#include <Wincrypt.h>
+#ifndef HCRYPTPROV_LEGACY
+#define HCRYPTPROV_LEGACY HCRYPTPROV
+#endif
+ typedef HCERTSTORE (WINAPI *PtrCertOpenSystemStoreW)(HCRYPTPROV_LEGACY, LPCWSTR);
+ typedef PCCERT_CONTEXT (WINAPI *PtrCertFindCertificateInStore)(HCERTSTORE, DWORD, DWORD, DWORD, const void*, PCCERT_CONTEXT);
+ typedef BOOL (WINAPI *PtrCertCloseStore)(HCERTSTORE, DWORD);
+#endif
+
+
+
class QSslSocketPrivate : public QTcpSocketPrivate
{
Q_DECLARE_PUBLIC(QSslSocket)
@@ -106,6 +124,16 @@ public:
static void addDefaultCaCertificate(const QSslCertificate &cert);
static void addDefaultCaCertificates(const QList<QSslCertificate> &certs);
+#if defined(Q_OS_MAC)
+ static PtrSecCertificateGetData ptrSecCertificateGetData;
+ static PtrSecTrustSettingsCopyCertificates ptrSecTrustSettingsCopyCertificates;
+ static PtrSecTrustCopyAnchorCertificates ptrSecTrustCopyAnchorCertificates;
+#elif defined(Q_OS_WIN)
+ static PtrCertOpenSystemStoreW ptrCertOpenSystemStoreW;
+ static PtrCertFindCertificateInStore ptrCertFindCertificateInStore;
+ static PtrCertCloseStore ptrCertCloseStore;
+#endif
+
// The socket itself, including private slots.
QTcpSocket *plainSocket;
void createPlainSocket(QIODevice::OpenMode openMode);
diff --git a/src/network/ssl/qt-ca-bundle.crt b/src/network/ssl/qt-ca-bundle.crt
deleted file mode 100644
index 7755ca0..0000000
--- a/src/network/ssl/qt-ca-bundle.crt
+++ /dev/null
@@ -1,1984 +0,0 @@
-##
-## ca-bundle.crt -- Bundle of CA Certificates
-##
-## This is a bundle of X.509 certificates of public
-## Certificate Authorities (CA).
-##
-
------BEGIN CERTIFICATE-----
-MIICfTCCAeagAwIBAgIEAgAAuDANBg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cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7
-TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==
------END CERTIFICATE-----
diff --git a/src/network/ssl/ssl.pri b/src/network/ssl/ssl.pri
index 72ea80f..8b2e2c1 100644
--- a/src/network/ssl/ssl.pri
+++ b/src/network/ssl/ssl.pri
@@ -31,9 +31,6 @@ symbian {
ssl/qsslsocket_openssl.cpp \
ssl/qsslsocket_openssl_symbols.cpp
- # Include Qt's default CA bundle
- RESOURCES += network.qrc
-
# Add optional SSL libs
LIBS_PRIVATE += $$OPENSSL_LIBS
}
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 5c5d3d1..b4c85ac 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -3674,8 +3674,10 @@ QGLWidget::~QGLWidget()
bool doRelease = (glcx && glcx->windowCreated());
#endif
delete d->glcx;
+ d->glcx = 0;
#if defined(Q_WGL)
delete d->olcx;
+ d->olcx = 0;
#endif
#if defined(GLX_MESA_release_buffers) && defined(QGL_USE_MESA_EXT)
if (doRelease)
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp
index 44e8ae9..0a19531 100644
--- a/src/opengl/qgl_egl.cpp
+++ b/src/opengl/qgl_egl.cpp
@@ -190,7 +190,7 @@ void QGLContext::makeCurrent()
if (!d->workaroundsCached) {
d->workaroundsCached = true;
const char *renderer = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
- if (strstr(renderer, "SGX") || strstr(renderer, "MBX")) {
+ if (renderer && (strstr(renderer, "SGX") || strstr(renderer, "MBX"))) {
// PowerVR MBX/SGX chips needs to clear all buffers when starting to render
// a new frame, otherwise there will be a performance penalty to pay for
// each frame.
@@ -200,7 +200,8 @@ void QGLContext::makeCurrent()
// bug which prevents glCopyTexSubImage2D() to work with a POT
// or GL_ALPHA texture bound to an FBO. The only way to
// identify that driver is to check the EGL version number for it.
- if (strstr(eglQueryString(d->eglContext->display(), EGL_VERSION), "1.3"))
+ const char *egl_version = eglQueryString(d->eglContext->display(), EGL_VERSION);
+ if (egl_version && strstr(egl_version, "1.3"))
d->workaround_brokenFBOReadBack = true;
}
}
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 16c225f..1727a41 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -177,6 +177,10 @@ public:
void initContext(QGLContext *context, const QGLWidget* shareWidget);
bool renderCxPm(QPixmap *pixmap);
void cleanupColormaps();
+ void aboutToDestroy() {
+ if (glcx)
+ glcx->reset();
+ }
QGLContext *glcx;
QGLWidgetGLPaintDevice glDevice;
diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp
index 3e71a48..bfb232d 100644
--- a/src/opengl/qgl_x11.cpp
+++ b/src/opengl/qgl_x11.cpp
@@ -672,8 +672,12 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
GLX_CONTEXT_PROFILE_MASK_ARB, profile,
0 };
- PFNGLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribs =
- (PFNGLXCREATECONTEXTATTRIBSARBPROC) qglx_getProcAddress("glXCreateContextAttribsARB");
+ typedef GLXContext ( * Q_PFNGLXCREATECONTEXTATTRIBSARBPROC)
+ (Display* dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
+
+
+ Q_PFNGLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribs =
+ (Q_PFNGLXCREATECONTEXTATTRIBSARBPROC) qglx_getProcAddress("glXCreateContextAttribsARB");
if (glXCreateContextAttribs) {
int spec[45];
@@ -924,7 +928,7 @@ void QGLContext::makeCurrent()
} else if (d->paintDevice->devType() == QInternal::Pbuffer) {
ok = glXMakeCurrent(xinfo->display(), (GLXPbuffer)d->pbuf, (GLXContext)d->cx);
} else if (d->paintDevice->devType() == QInternal::Widget) {
- ok = glXMakeCurrent(xinfo->display(), ((QWidget *)d->paintDevice)->winId(), (GLXContext)d->cx);
+ ok = glXMakeCurrent(xinfo->display(), ((QWidget *)d->paintDevice)->internalWinId(), (GLXContext)d->cx);
}
if (!ok)
qWarning("QGLContext::makeCurrent(): Failed.");
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
index a9cb65b..6ba9504 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
@@ -70,9 +70,10 @@
#include <net/if.h>
#include <ifaddrs.h>
-@interface QNSListener : NSObject
+
+@interface QT_MANGLE_NAMESPACE(QNSListener) : NSObject
{
- NSNotificationCenter *center;
+ NSNotificationCenter *notificationCenter;
CWInterface *currentInterface;
QCoreWlanEngine *engine;
NSLock *locker;
@@ -86,16 +87,16 @@
@end
-@implementation QNSListener
+@implementation QT_MANGLE_NAMESPACE(QNSListener)
@synthesize engine;
- (id) init
{
[locker lock];
QMacCocoaAutoReleasePool pool;
- center = [NSNotificationCenter defaultCenter];
+ notificationCenter = [NSNotificationCenter defaultCenter];
currentInterface = [CWInterface interfaceWithName:nil];
- [center addObserver:self selector:@selector(notificationHandler:) name:kCWPowerDidChangeNotification object:nil];
+ [notificationCenter addObserver:self selector:@selector(notificationHandler:) name:kCWPowerDidChangeNotification object:nil];
[locker unlock];
return self;
}
@@ -116,7 +117,7 @@
-(void)remove
{
[locker lock];
- [center removeObserver:self];
+ [notificationCenter removeObserver:self];
[locker unlock];
}
@@ -126,7 +127,7 @@
}
@end
-QNSListener *listener = 0;
+QT_MANGLE_NAMESPACE(QNSListener) *listener = 0;
QT_BEGIN_NAMESPACE
@@ -296,6 +297,9 @@ void QScanThread::getUserConfigurations()
for(uint row=0; row < [wifiInterfaces count]; row++ ) {
CWInterface *wifiInterface = [CWInterface interfaceWithName: [wifiInterfaces objectAtIndex:row]];
+ if ( ![wifiInterface power] )
+ continue;
+
NSString *nsInterfaceName = [wifiInterface name];
// add user configured system networks
SCDynamicStoreRef dynRef = SCDynamicStoreCreate(kCFAllocatorSystemDefault, (CFStringRef)@"Qt corewlan", nil, nil);
@@ -430,7 +434,7 @@ void QCoreWlanEngine::initialize()
QMacCocoaAutoReleasePool pool;
if([[CWInterface supportedInterfaces] count] > 0 && !listener) {
- listener = [[QNSListener alloc] init];
+ listener = [[QT_MANGLE_NAMESPACE(QNSListener) alloc] init];
listener.engine = this;
hasWifi = true;
} else {
@@ -785,6 +789,11 @@ void QCoreWlanEngine::networksChanged()
changed = true;
}
+ if (ptr->bearer != cpPriv->bearer) {
+ ptr->bearer = cpPriv->bearer;
+ changed = true;
+ }
+
if (ptr->state != cpPriv->state) {
ptr->state = cpPriv->state;
changed = true;
diff --git a/src/plugins/bearer/symbian/3_1/3_1.pro b/src/plugins/bearer/symbian/3_1/3_1.pro
new file mode 100644
index 0000000..2d721a8
--- /dev/null
+++ b/src/plugins/bearer/symbian/3_1/3_1.pro
@@ -0,0 +1,5 @@
+include(../symbian.pri)
+
+LIBS += -lapengine
+TARGET = $${TARGET}_3_1
+TARGET.UID3 = 0x2002131C
diff --git a/src/plugins/bearer/symbian/3_2/3_2.pro b/src/plugins/bearer/symbian/3_2/3_2.pro
new file mode 100644
index 0000000..3404dde
--- /dev/null
+++ b/src/plugins/bearer/symbian/3_2/3_2.pro
@@ -0,0 +1,13 @@
+include(../symbian.pri)
+
+exists($${EPOCROOT}epoc32/release/winscw/udeb/cmmanager.lib)| \
+exists($${EPOCROOT}epoc32/release/armv5/lib/cmmanager.lib) {
+ DEFINES += SNAP_FUNCTIONALITY_AVAILABLE
+ LIBS += -lcmmanager
+} else {
+ # Fall back to 3_1 implementation on platforms that do not have cmmanager
+ LIBS += -lapengine
+}
+
+TARGET = $${TARGET}_3_2
+TARGET.UID3 = 0x2002131D
diff --git a/src/plugins/bearer/symbian/symbian.pri b/src/plugins/bearer/symbian/symbian.pri
new file mode 100644
index 0000000..afe84dc
--- /dev/null
+++ b/src/plugins/bearer/symbian/symbian.pri
@@ -0,0 +1,28 @@
+TARGET = qsymbianbearer
+include(../../qpluginbase.pri)
+
+QT += network
+
+HEADERS += ../symbianengine.h \
+ ../qnetworksession_impl.h
+
+SOURCES += ../symbianengine.cpp \
+ ../qnetworksession_impl.cpp \
+ ../main.cpp
+
+INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+symbian-abld:INCLUDEPATH += $$QT_BUILD_TREE/include/QtNetwork/private
+
+LIBS += -lcommdb \
+ -lapsettingshandlerui \
+ -lconnmon \
+ -lcentralrepository \
+ -lesock \
+ -linsock \
+ -lecom \
+ -lefsrv \
+ -lnetmeta
+
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer
+target.path += $$[QT_INSTALL_PLUGINS]/bearer
+INSTALLS += target
diff --git a/src/plugins/bearer/symbian/symbian.pro b/src/plugins/bearer/symbian/symbian.pro
index 4f1e51c..f320eb6 100644
--- a/src/plugins/bearer/symbian/symbian.pro
+++ b/src/plugins/bearer/symbian/symbian.pro
@@ -1,41 +1,3 @@
-TARGET = qsymbianbearer
-include(../../qpluginbase.pri)
+TEMPLATE = subdirs
-QT += network
-
-HEADERS += symbianengine.h \
- qnetworksession_impl.h
-
-SOURCES += symbianengine.cpp \
- qnetworksession_impl.cpp \
- main.cpp
-
-symbian {
- TARGET.UID3=0x20021319
- exists($${EPOCROOT}epoc32/release/winscw/udeb/cmmanager.lib)| \
- exists($${EPOCROOT}epoc32/release/armv5/lib/cmmanager.lib) {
- message("Building with SNAP support")
- DEFINES += SNAP_FUNCTIONALITY_AVAILABLE
- LIBS += -lcmmanager
- } else {
- message("Building without SNAP support")
- LIBS += -lapengine
- }
-}
-
-INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-symbian-abld:INCLUDEPATH += $$QT_BUILD_TREE/include/QtNetwork/private
-
-LIBS += -lcommdb \
- -lapsettingshandlerui \
- -lconnmon \
- -lcentralrepository \
- -lesock \
- -linsock \
- -lecom \
- -lefsrv \
- -lnetmeta
-
-QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer
-target.path += $$[QT_INSTALL_PLUGINS]/bearer
-INSTALLS += target
+SUBDIRS += 3_1 3_2 symbian_3 \ No newline at end of file
diff --git a/src/plugins/bearer/symbian/symbian_3/symbian_3.pro b/src/plugins/bearer/symbian/symbian_3/symbian_3.pro
new file mode 100644
index 0000000..f9d486e
--- /dev/null
+++ b/src/plugins/bearer/symbian/symbian_3/symbian_3.pro
@@ -0,0 +1,16 @@
+include(../symbian.pri)
+
+exists($${EPOCROOT}epoc32/release/winscw/udeb/cmmanager.lib)| \
+exists($${EPOCROOT}epoc32/release/armv5/lib/cmmanager.lib) {
+ DEFINES += SNAP_FUNCTIONALITY_AVAILABLE
+ LIBS += -lcmmanager
+
+ exists($$MW_LAYER_PUBLIC_EXPORT_PATH(extendedconnpref.h)) {
+ DEFINES += OCC_FUNCTIONALITY_AVAILABLE
+ }
+} else {
+ # Fall back to 3_1 implementation on platforms that do not have cmmanager
+ LIBS += -lapengine
+}
+
+TARGET.UID3 = 0x20021319
diff --git a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp
index f5ad70c..3bafd97 100644
--- a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp
+++ b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp
@@ -1053,7 +1053,7 @@ void QVNCServer::clientCutText()
{
QRfbClientCutText ev;
- if (ev.read(client)) {
+ if (cutTextPending == 0 && ev.read(client)) {
cutTextPending = ev.length;
if (!cutTextPending)
handleMsg = false;
@@ -1481,7 +1481,7 @@ void QVNCServer::convertPixels(char *dst, const char *src, int count) const
}
if (count & 0x1) {
const quint16 *src16 = reinterpret_cast<const quint16*>(src);
- dst32[count - 1] = qt_conv16ToRgb(src16[count - 1]);
+ *dst32 = qt_conv16ToRgb(src16[count - 1]);
}
return;
#endif
@@ -2038,7 +2038,7 @@ void QVNCServer::discardClient()
delete qvnc_cursor;
qvnc_cursor = 0;
#endif
- if (!qvnc_screen->screen() && !qvnc_screen->d_ptr->noDisablePainting)
+ if (!qvnc_screen->screen() && !qvnc_screen->d_ptr->noDisablePainting && QWSServer::instance())
QWSServer::instance()->enablePainting(false);
}
diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp
index 8abc2d1..129a11b 100644
--- a/src/plugins/imageformats/gif/qgifhandler.cpp
+++ b/src/plugins/imageformats/gif/qgifhandler.cpp
@@ -132,8 +132,8 @@ private:
int code_size, clear_code, end_code, max_code_size, max_code;
int firstcode, oldcode, incode;
- short table[2][1<< max_lzw_bits];
- short stack[(1<<(max_lzw_bits))*2];
+ short* table[2];
+ short* stack;
short *sp;
bool needfirst;
int x, y;
@@ -162,6 +162,9 @@ QGIFFormat::QGIFFormat()
lcmap = false;
newFrame = false;
partialNewFrame = false;
+ table[0] = 0;
+ table[1] = 0;
+ stack = 0;
}
/*!
@@ -171,6 +174,7 @@ QGIFFormat::~QGIFFormat()
{
if (globalcmap) delete[] globalcmap;
if (localcmap) delete[] localcmap;
+ delete [] stack;
}
void QGIFFormat::disposePrevious(QImage *image)
@@ -237,6 +241,12 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length,
// CompuServe Incorporated. GIF(sm) is a Service Mark property of
// CompuServe Incorporated."
+ if (!stack) {
+ stack = new short[(1 << max_lzw_bits) * 4];
+ table[0] = &stack[(1 << max_lzw_bits) * 2];
+ table[1] = &stack[(1 << max_lzw_bits) * 3];
+ }
+
image->detach();
int bpl = image->bytesPerLine();
unsigned char *bits = image->bits();
@@ -1026,7 +1036,7 @@ inline QRgb QGIFFormat::color(uchar index) const
QGifHandler::QGifHandler()
{
gifFormat = new QGIFFormat;
- nextDelay = 0;
+ nextDelay = 100;
loopCnt = 1;
frameNumber = -1;
scanIsCached = false;
@@ -1061,12 +1071,12 @@ bool QGifHandler::imageIsComing() const
bool QGifHandler::canRead() const
{
- if (!nextDelay && canRead(device())) {
+ if (canRead(device()) || imageIsComing()) {
setFormat("gif");
return true;
}
- return imageIsComing();
+ return false;
}
bool QGifHandler::canRead(QIODevice *device)
diff --git a/src/plugins/imageformats/jpeg/jpeg.pro b/src/plugins/imageformats/jpeg/jpeg.pro
index 5b45422..0b5d389 100644
--- a/src/plugins/imageformats/jpeg/jpeg.pro
+++ b/src/plugins/imageformats/jpeg/jpeg.pro
@@ -22,10 +22,9 @@ symbian: {
}
contains(QT_CONFIG, system-jpeg) {
- unix:LIBS += -ljpeg
- win32:LIBS += libjpeg.lib
-}
-!contains(QT_CONFIG, system-jpeg) {
+ unix|win32-g++*:LIBS += -ljpeg
+ win32:!win32-g++*:LIBS += libjpeg.lib
+} else {
INCLUDEPATH += ../../../3rdparty/libjpeg
SOURCES += \
../../../3rdparty/libjpeg/jaricom.c \
diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
index 72dde15..60e7cce 100644
--- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp
+++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
@@ -802,13 +802,15 @@ QJpegHandler::~QJpegHandler()
bool QJpegHandler::canRead() const
{
- if(d->state == QJpegHandlerPrivate::Ready) {
- if (!canRead(device()))
- return false;
+ if(d->state == QJpegHandlerPrivate::Ready && !canRead(device()))
+ return false;
+
+ if (d->state != QJpegHandlerPrivate::Error) {
setFormat("jpeg");
return true;
}
- return d->state != QJpegHandlerPrivate::Error;
+
+ return false;
}
bool QJpegHandler::canRead(QIODevice *device)
diff --git a/src/plugins/imageformats/mng/mng.pro b/src/plugins/imageformats/mng/mng.pro
index de7dfa7..c188b47 100644
--- a/src/plugins/imageformats/mng/mng.pro
+++ b/src/plugins/imageformats/mng/mng.pro
@@ -14,10 +14,9 @@ symbian: {
}
contains(QT_CONFIG, system-mng) {
- unix:LIBS += -lmng
- win32:LIBS += libmng.lib
-}
-!contains(QT_CONFIG, system-mng) {
+ unix|win32-g++*:LIBS += -lmng
+ win32:!win32-g++*:LIBS += libmng.lib
+} else {
DEFINES += MNG_BUILD_SO
DEFINES += MNG_NO_INCLUDE_JNG
INCLUDEPATH += ../../../3rdparty/libmng
@@ -44,10 +43,11 @@ contains(QT_CONFIG, system-mng) {
}
contains(QT_CONFIG, system-zlib) {
- LIBS += -lz
-}
-!contains(QT_CONFIG, system-zlib) {
- INCLUDEPATH += ../../../3rdparty/zlib
+ symbian:LIBS_PRIVATE += -llibz
+ else:if(unix|win32-g++*):LIBS_PRIVATE += -lz
+ else:LIBS += zdll.lib
+} else {
+ INCLUDEPATH += ../../../3rdparty/zlib
}
QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/imageformats
diff --git a/src/plugins/imageformats/mng/qmnghandler.cpp b/src/plugins/imageformats/mng/qmnghandler.cpp
index d408e6c..ec442a1 100644
--- a/src/plugins/imageformats/mng/qmnghandler.cpp
+++ b/src/plugins/imageformats/mng/qmnghandler.cpp
@@ -271,7 +271,6 @@ bool QMngHandlerPrivate::getNextImage(QImage *result)
}
if ((MNG_NOERROR == ret) || (MNG_NEEDTIMERWAIT == ret)) {
*result = image;
- image.fill(0);
frameIndex = nextIndex++;
if (haveReadAll && (frameCount == 0))
frameCount = nextIndex;
@@ -381,10 +380,10 @@ QMngHandler::~QMngHandler()
bool QMngHandler::canRead() const
{
Q_D(const QMngHandler);
- if (!d->haveReadNone)
- return (!d->haveReadAll || (d->haveReadAll && (d->nextIndex < d->frameCount)));
-
- if (canRead(device())) {
+ if ((!d->haveReadNone
+ && (!d->haveReadAll || (d->haveReadAll && (d->nextIndex < d->frameCount))))
+ || canRead(device()))
+ {
setFormat("mng");
return true;
}
diff --git a/src/plugins/imageformats/tiff/tiff.pro b/src/plugins/imageformats/tiff/tiff.pro
index 3cb64ad..90868e8 100644
--- a/src/plugins/imageformats/tiff/tiff.pro
+++ b/src/plugins/imageformats/tiff/tiff.pro
@@ -8,10 +8,14 @@ SOURCES += main.cpp \
qtiffhandler.cpp
contains(QT_CONFIG, system-tiff) {
- unix:LIBS += -ltiff
- win32:LIBS += libtiff.lib
-}
-!contains(QT_CONFIG, system-tiff) {
+ unix|win32-g++*:LIBS += -ltiff
+ win32:!win32-g++*:LIBS += libtiff.lib
+
+ contains(QT_CONFIG, system-jpeg) {
+ unix|win32-g++*:LIBS += -ljpeg
+ win32:!win32-g++*:LIBS += libjpeg.lib
+ }
+} else {
INCLUDEPATH += ../../../3rdparty/libtiff/libtiff
SOURCES += \
../../../3rdparty/libtiff/libtiff/tif_aux.c \
@@ -64,10 +68,11 @@ contains(QT_CONFIG, system-tiff) {
}
contains(QT_CONFIG, system-zlib) {
- LIBS += -lz
-}
-!contains(QT_CONFIG, system-zlib) {
- INCLUDEPATH += ../../../3rdparty/zlib
+ symbian:LIBS_PRIVATE += -llibz
+ else:if(unix|win32-g++*):LIBS_PRIVATE += -lz
+ else:LIBS += zdll.lib
+} else {
+ INCLUDEPATH += ../../../3rdparty/zlib
}
QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/imageformats
diff --git a/src/plugins/sqldrivers/psql/psql.pro b/src/plugins/sqldrivers/psql/psql.pro
index 0a38ee4..80a5348 100644
--- a/src/plugins/sqldrivers/psql/psql.pro
+++ b/src/plugins/sqldrivers/psql/psql.pro
@@ -4,7 +4,7 @@ HEADERS = ../../../sql/drivers/psql/qsql_psql.h
SOURCES = main.cpp \
../../../sql/drivers/psql/qsql_psql.cpp
-unix|win32-g++: {
+unix|win32-g++*: {
!isEmpty(QT_LFLAGS_PSQL) {
!contains(QT_CONFIG, system-zlib): QT_LFLAGS_PSQL -= -lz
!static:LIBS *= $$QT_LFLAGS_PSQL
@@ -13,6 +13,6 @@ unix|win32-g++: {
!contains(LIBS, .*pq.*):LIBS *= -lpq
}
-win32:!win32-g++:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32
+win32:!win32-g++*:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32
include(../qsqldriverbase.pri)
diff --git a/src/qbase.pri b/src/qbase.pri
index 83ae069..064e67c 100644
--- a/src/qbase.pri
+++ b/src/qbase.pri
@@ -85,7 +85,6 @@ win32-borland {
}
win32 {
- CONFIG += zlib
INCLUDEPATH += tmp
!static: DEFINES+=QT_MAKEDLL
}
diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def
index 3df0f47..2992cf6 100644
--- a/src/s60installs/bwins/QtDeclarativeu.def
+++ b/src/s60installs/bwins/QtDeclarativeu.def
@@ -862,7 +862,7 @@ EXPORTS
?cursorPositionChanged@QDeclarativeTextEdit@@IAEXXZ @ 861 NONAME ; void QDeclarativeTextEdit::cursorPositionChanged(void)
?cursorPositionChanged@QDeclarativeTextInput@@IAEXXZ @ 862 NONAME ; void QDeclarativeTextInput::cursorPositionChanged(void)
?cursorRect@QDeclarativeTextEdit@@QBE?AVQRect@@XZ @ 863 NONAME ABSENT ; class QRect QDeclarativeTextEdit::cursorRect(void) const
- ?cursorRect@QDeclarativeTextInput@@QBE?AVQRect@@XZ @ 864 NONAME ; class QRect QDeclarativeTextInput::cursorRect(void) const
+ ?cursorRect@QDeclarativeTextInput@@QBE?AVQRect@@XZ @ 864 NONAME ABSENT ; class QRect QDeclarativeTextInput::cursorRect(void) const
?cursorVisibleChanged@QDeclarativeTextEdit@@IAEX_N@Z @ 865 NONAME ; void QDeclarativeTextEdit::cursorVisibleChanged(bool)
?cursorVisibleChanged@QDeclarativeTextInput@@IAEX_N@Z @ 866 NONAME ; void QDeclarativeTextInput::cursorVisibleChanged(bool)
?customParser@QDeclarativeType@@QBEPAVQDeclarativeCustomParser@@XZ @ 867 NONAME ; class QDeclarativeCustomParser * QDeclarativeType::customParser(void) const
@@ -2568,10 +2568,10 @@ EXPORTS
?setSelectedTextColor@QDeclarativeTextInput@@QAEXABVQColor@@@Z @ 2567 NONAME ; void QDeclarativeTextInput::setSelectedTextColor(class QColor const &)
?setSelectionColor@QDeclarativeTextEdit@@QAEXABVQColor@@@Z @ 2568 NONAME ; void QDeclarativeTextEdit::setSelectionColor(class QColor const &)
?setSelectionColor@QDeclarativeTextInput@@QAEXABVQColor@@@Z @ 2569 NONAME ; void QDeclarativeTextInput::setSelectionColor(class QColor const &)
- ?setSelectionEnd@QDeclarativeTextEdit@@QAEXH@Z @ 2570 NONAME ; void QDeclarativeTextEdit::setSelectionEnd(int)
- ?setSelectionEnd@QDeclarativeTextInput@@QAEXH@Z @ 2571 NONAME ; void QDeclarativeTextInput::setSelectionEnd(int)
- ?setSelectionStart@QDeclarativeTextEdit@@QAEXH@Z @ 2572 NONAME ; void QDeclarativeTextEdit::setSelectionStart(int)
- ?setSelectionStart@QDeclarativeTextInput@@QAEXH@Z @ 2573 NONAME ; void QDeclarativeTextInput::setSelectionStart(int)
+ ?setSelectionEnd@QDeclarativeTextEdit@@QAEXH@Z @ 2570 NONAME ABSENT ; void QDeclarativeTextEdit::setSelectionEnd(int)
+ ?setSelectionEnd@QDeclarativeTextInput@@QAEXH@Z @ 2571 NONAME ABSENT ; void QDeclarativeTextInput::setSelectionEnd(int)
+ ?setSelectionStart@QDeclarativeTextEdit@@QAEXH@Z @ 2572 NONAME ABSENT ; void QDeclarativeTextEdit::setSelectionStart(int)
+ ?setSelectionStart@QDeclarativeTextInput@@QAEXH@Z @ 2573 NONAME ABSENT ; void QDeclarativeTextInput::setSelectionStart(int)
?setSmooth@QDeclarativeItem@@QAEX_N@Z @ 2574 NONAME ; void QDeclarativeItem::setSmooth(bool)
?setSmoothCache@QDeclarativePaintedItem@@QAEX_N@Z @ 2575 NONAME ; void QDeclarativePaintedItem::setSmoothCache(bool)
?setSnapMode@QDeclarativeListView@@QAEXW4SnapMode@1@@Z @ 2576 NONAME ; void QDeclarativeListView::setSnapMode(enum QDeclarativeListView::SnapMode)
@@ -3891,7 +3891,7 @@ EXPORTS
?wrapMode@QDeclarativeTextEdit@@QBE?AW4WrapMode@1@XZ @ 3890 NONAME ; enum QDeclarativeTextEdit::WrapMode QDeclarativeTextEdit::wrapMode(void) const
?wrapModeChanged@QDeclarativeText@@IAEXXZ @ 3891 NONAME ; void QDeclarativeText::wrapModeChanged(void)
?wrapModeChanged@QDeclarativeTextEdit@@IAEXXZ @ 3892 NONAME ; void QDeclarativeTextEdit::wrapModeChanged(void)
- ?xToPosition@QDeclarativeTextInput@@QAEHH@Z @ 3893 NONAME ; int QDeclarativeTextInput::xToPosition(int)
+ ?xToPosition@QDeclarativeTextInput@@QAEHH@Z @ 3893 NONAME ABSENT ; int QDeclarativeTextInput::xToPosition(int)
?staticMetaObject@QDeclarativeSmoothedFollow@@2UQMetaObject@@B @ 3894 NONAME ; struct QMetaObject const QDeclarativeSmoothedFollow::staticMetaObject
?trUtf8@QDeclarativeCompiler@@SA?AVQString@@PBD0H@Z @ 3895 NONAME ; class QString QDeclarativeCompiler::trUtf8(char const *, char const *, int)
?findSignalByName@QDeclarativePropertyPrivate@@SA?AVQMetaMethod@@PBUQMetaObject@@ABVQByteArray@@@Z @ 3896 NONAME ; class QMetaMethod QDeclarativePropertyPrivate::findSignalByName(struct QMetaObject const *, class QByteArray const &)
@@ -4024,10 +4024,10 @@ EXPORTS
?restart@QDeclarativeItemPrivate@@SA_JAAVQElapsedTimer@@@Z @ 4023 NONAME ; long long QDeclarativeItemPrivate::restart(class QElapsedTimer &)
?get@QDeclarativeXmlListModel@@QBE?AVQScriptValue@@H@Z @ 4024 NONAME ; class QScriptValue QDeclarativeXmlListModel::get(int) const
?setScale@QDeclarativeParentChange@@QAEXVQDeclarativeScriptString@@@Z @ 4025 NONAME ; void QDeclarativeParentChange::setScale(class QDeclarativeScriptString)
- ?showInputPanelOnFocusChanged@QDeclarativeTextEdit@@IAEX_N@Z @ 4026 NONAME ; void QDeclarativeTextEdit::showInputPanelOnFocusChanged(bool)
+ ?showInputPanelOnFocusChanged@QDeclarativeTextEdit@@IAEX_N@Z @ 4026 NONAME ABSENT ; void QDeclarativeTextEdit::showInputPanelOnFocusChanged(bool)
?focusOutEvent@QDeclarativeTextInput@@MAEXPAVQFocusEvent@@@Z @ 4027 NONAME ; void QDeclarativeTextInput::focusOutEvent(class QFocusEvent *)
?height@QDeclarativeParentChange@@QBE?AVQDeclarativeScriptString@@XZ @ 4028 NONAME ; class QDeclarativeScriptString QDeclarativeParentChange::height(void) const
- ?showInputPanelOnFocus@QDeclarativeTextEdit@@QBE_NXZ @ 4029 NONAME ; bool QDeclarativeTextEdit::showInputPanelOnFocus(void) const
+ ?showInputPanelOnFocus@QDeclarativeTextEdit@@QBE_NXZ @ 4029 NONAME ABSENT ; bool QDeclarativeTextEdit::showInputPanelOnFocus(void) const
?errorString@QDeclarativeComponent@@QBE?AVQString@@XZ @ 4030 NONAME ; class QString QDeclarativeComponent::errorString(void) const
?elapsed@QDeclarativeItemPrivate@@SA_JAAVQElapsedTimer@@@Z @ 4031 NONAME ; long long QDeclarativeItemPrivate::elapsed(class QElapsedTimer &)
?focusInEvent@QDeclarativeTextInput@@MAEXPAVQFocusEvent@@@Z @ 4032 NONAME ; void QDeclarativeTextInput::focusInEvent(class QFocusEvent *)
@@ -4042,15 +4042,15 @@ EXPORTS
?errorString@QDeclarativeXmlListModel@@QBE?AVQString@@XZ @ 4041 NONAME ; class QString QDeclarativeXmlListModel::errorString(void) const
?consistentTime@QDeclarativeItemPrivate@@2_JA @ 4042 NONAME ; long long QDeclarativeItemPrivate::consistentTime
?scale@QDeclarativeParentChange@@QBE?AVQDeclarativeScriptString@@XZ @ 4043 NONAME ; class QDeclarativeScriptString QDeclarativeParentChange::scale(void) const
- ?showInputPanelOnFocus@QDeclarativeTextInput@@QBE_NXZ @ 4044 NONAME ; bool QDeclarativeTextInput::showInputPanelOnFocus(void) const
+ ?showInputPanelOnFocus@QDeclarativeTextInput@@QBE_NXZ @ 4044 NONAME ABSENT ; bool QDeclarativeTextInput::showInputPanelOnFocus(void) const
?focusInEvent@QDeclarativeTextEdit@@MAEXPAVQFocusEvent@@@Z @ 4045 NONAME ; void QDeclarativeTextEdit::focusInEvent(class QFocusEvent *)
?y@QDeclarativeParentChange@@QBE?AVQDeclarativeScriptString@@XZ @ 4046 NONAME ; class QDeclarativeScriptString QDeclarativeParentChange::y(void) const
?setY@QDeclarativeParentChange@@QAEXVQDeclarativeScriptString@@@Z @ 4047 NONAME ; void QDeclarativeParentChange::setY(class QDeclarativeScriptString)
- ?setShowInputPanelOnFocus@QDeclarativeTextEdit@@QAEX_N@Z @ 4048 NONAME ; void QDeclarativeTextEdit::setShowInputPanelOnFocus(bool)
+ ?setShowInputPanelOnFocus@QDeclarativeTextEdit@@QAEX_N@Z @ 4048 NONAME ABSENT ; void QDeclarativeTextEdit::setShowInputPanelOnFocus(bool)
?paintedSizeChanged@QDeclarativeText@@IAEXXZ @ 4049 NONAME ; void QDeclarativeText::paintedSizeChanged(void)
?selectByMouseChanged@QDeclarativeTextEdit@@IAEX_N@Z @ 4050 NONAME ; void QDeclarativeTextEdit::selectByMouseChanged(bool)
?openSoftwareInputPanel@QDeclarativeTextInput@@QAEXXZ @ 4051 NONAME ; void QDeclarativeTextInput::openSoftwareInputPanel(void)
- ?setShowInputPanelOnFocus@QDeclarativeTextInput@@QAEX_N@Z @ 4052 NONAME ; void QDeclarativeTextInput::setShowInputPanelOnFocus(bool)
+ ?setShowInputPanelOnFocus@QDeclarativeTextInput@@QAEX_N@Z @ 4052 NONAME ABSENT ; void QDeclarativeTextInput::setShowInputPanelOnFocus(bool)
?boundingRect@QDeclarativePaintedItem@@MBE?AVQRectF@@XZ @ 4053 NONAME ; class QRectF QDeclarativePaintedItem::boundingRect(void) const
?closeSoftwareInputPanel@QDeclarativeTextInput@@QAEXXZ @ 4054 NONAME ; void QDeclarativeTextInput::closeSoftwareInputPanel(void)
?setWidth@QDeclarativeParentChange@@QAEXVQDeclarativeScriptString@@@Z @ 4055 NONAME ; void QDeclarativeParentChange::setWidth(class QDeclarativeScriptString)
@@ -4067,11 +4067,25 @@ EXPORTS
?selectByMouse@QDeclarativeTextEdit@@QBE_NXZ @ 4066 NONAME ; bool QDeclarativeTextEdit::selectByMouse(void) const
?setHeight@QDeclarativeParentChange@@QAEXVQDeclarativeScriptString@@@Z @ 4067 NONAME ; void QDeclarativeParentChange::setHeight(class QDeclarativeScriptString)
?start@QDeclarativeItemPrivate@@SAXAAVQElapsedTimer@@@Z @ 4068 NONAME ; void QDeclarativeItemPrivate::start(class QElapsedTimer &)
- ?showInputPanelOnFocusChanged@QDeclarativeTextInput@@IAEX_N@Z @ 4069 NONAME ; void QDeclarativeTextInput::showInputPanelOnFocusChanged(bool)
+ ?showInputPanelOnFocusChanged@QDeclarativeTextInput@@IAEX_N@Z @ 4069 NONAME ABSENT ; void QDeclarativeTextInput::showInputPanelOnFocusChanged(bool)
?x@QDeclarativeParentChange@@QBE?AVQDeclarativeScriptString@@XZ @ 4070 NONAME ; class QDeclarativeScriptString QDeclarativeParentChange::x(void) const
?selectByMouseChanged@QDeclarativeTextInput@@IAEX_N@Z @ 4071 NONAME ; void QDeclarativeTextInput::selectByMouseChanged(bool)
?width@QDeclarativeParentChange@@QBE?AVQDeclarativeScriptString@@XZ @ 4072 NONAME ; class QDeclarativeScriptString QDeclarativeParentChange::width(void) const
?openSoftwareInputPanel@QDeclarativeTextEdit@@QAEXXZ @ 4073 NONAME ; void QDeclarativeTextEdit::openSoftwareInputPanel(void)
?cursorRectangleChanged@QDeclarativeTextEdit@@IAEXXZ @ 4074 NONAME ; void QDeclarativeTextEdit::cursorRectangleChanged(void)
?cursorRectangle@QDeclarativeTextEdit@@QBE?AVQRect@@XZ @ 4075 NONAME ; class QRect QDeclarativeTextEdit::cursorRectangle(void) const
+ ?selectWord@QDeclarativeTextInput@@QAEXXZ @ 4076 NONAME ; void QDeclarativeTextInput::selectWord(void)
+ ?positionToRectangle@QDeclarativeTextEdit@@QBE?AVQRectF@@H@Z @ 4077 NONAME ; class QRectF QDeclarativeTextEdit::positionToRectangle(int) const
+ ?cursorRectangle@QDeclarativeTextInput@@QBE?AVQRect@@XZ @ 4078 NONAME ; class QRect QDeclarativeTextInput::cursorRectangle(void) const
+ ?mouseDoubleClickEvent@QDeclarativeTextInput@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 4079 NONAME ; void QDeclarativeTextInput::mouseDoubleClickEvent(class QGraphicsSceneMouseEvent *)
+ ?positionAt@QDeclarativeTextEdit@@QBEHHH@Z @ 4080 NONAME ; int QDeclarativeTextEdit::positionAt(int, int) const
+ ?cut@QDeclarativeTextEdit@@QAEXXZ @ 4081 NONAME ; void QDeclarativeTextEdit::cut(void)
+ ?copy@QDeclarativeTextEdit@@QAEXXZ @ 4082 NONAME ; void QDeclarativeTextEdit::copy(void)
+ ?select@QDeclarativeTextEdit@@QAEXHH@Z @ 4083 NONAME ; void QDeclarativeTextEdit::select(int, int)
+ ?moveCursorSelection@QDeclarativeTextEdit@@QAEXH@Z @ 4084 NONAME ; void QDeclarativeTextEdit::moveCursorSelection(int)
+ ?select@QDeclarativeTextInput@@QAEXHH@Z @ 4085 NONAME ; void QDeclarativeTextInput::select(int, int)
+ ?paste@QDeclarativeTextEdit@@QAEXXZ @ 4086 NONAME ; void QDeclarativeTextEdit::paste(void)
+ ?positionToRectangle@QDeclarativeTextInput@@QBE?AVQRectF@@H@Z @ 4087 NONAME ; class QRectF QDeclarativeTextInput::positionToRectangle(int) const
+ ?positionAt@QDeclarativeTextInput@@QBEHH@Z @ 4088 NONAME ; int QDeclarativeTextInput::positionAt(int) const
+ ?selectWord@QDeclarativeTextEdit@@QAEXXZ @ 4089 NONAME ; void QDeclarativeTextEdit::selectWord(void)
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index a1e05e2..9b4ecc2 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -12805,4 +12805,12 @@ EXPORTS
?setPerformanceHint@QStaticText@@QAEXW4PerformanceHint@1@@Z @ 12804 NONAME ; void QStaticText::setPerformanceHint(enum QStaticText::PerformanceHint)
??0QStaticText@@QAE@ABV0@@Z @ 12805 NONAME ; QStaticText::QStaticText(class QStaticText const &)
??0QImageTextureGlyphCache@@QAE@W4Type@QFontEngineGlyphCache@@ABVQTransform@@@Z @ 12806 NONAME ; QImageTextureGlyphCache::QImageTextureGlyphCache(enum QFontEngineGlyphCache::Type, class QTransform const &)
+ ?verticalMovementX@QTextCursor@@QBEHXZ @ 12807 NONAME ; int QTextCursor::verticalMovementX(void) const
+ ?runtime_graphics_system@QApplicationPrivate@@2_NA @ 12808 NONAME ; bool QApplicationPrivate::runtime_graphics_system
+ ?keepPositionOnInsert@QTextCursor@@QBE_NXZ @ 12809 NONAME ; bool QTextCursor::keepPositionOnInsert(void) const
+ ?setKeepPositionOnInsert@QTextCursor@@QAEX_N@Z @ 12810 NONAME ; void QTextCursor::setKeepPositionOnInsert(bool)
+ ?textDirection@QProgressBar@@QBE?AW4Direction@1@XZ @ 12811 NONAME ; enum QProgressBar::Direction QProgressBar::textDirection(void) const
+ ?setVerticalMovementX@QTextCursor@@QAEXH@Z @ 12812 NONAME ; void QTextCursor::setVerticalMovementX(int)
+ ?invertedAppearance@QProgressBar@@QBE_NXZ @ 12813 NONAME ; bool QProgressBar::invertedAppearance(void) const
+ ?width@QFontMetrics@@QBEHABVQString@@HH@Z @ 12814 NONAME ; int QFontMetrics::width(class QString const &, int, int) const
diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def
index 320a780..1c4cd5d 100644
--- a/src/s60installs/eabi/QtDeclarativeu.def
+++ b/src/s60installs/eabi/QtDeclarativeu.def
@@ -911,7 +911,7 @@ EXPORTS
_ZN20QDeclarativeTextEdit15mousePressEventEP24QGraphicsSceneMouseEvent @ 910 NONAME
_ZN20QDeclarativeTextEdit15readOnlyChangedEb @ 911 NONAME
_ZN20QDeclarativeTextEdit15setFocusOnPressEb @ 912 NONAME
- _ZN20QDeclarativeTextEdit15setSelectionEndEi @ 913 NONAME
+ _ZN20QDeclarativeTextEdit15setSelectionEndEi @ 913 NONAME ABSENT
_ZN20QDeclarativeTextEdit16inputMethodEventEP17QInputMethodEvent @ 914 NONAME
_ZN20QDeclarativeTextEdit16selectionChangedEv @ 915 NONAME
_ZN20QDeclarativeTextEdit16setCursorVisibleEb @ 916 NONAME
@@ -921,7 +921,7 @@ EXPORTS
_ZN20QDeclarativeTextEdit17setCursorDelegateEP21QDeclarativeComponent @ 920 NONAME
_ZN20QDeclarativeTextEdit17setCursorPositionEi @ 921 NONAME
_ZN20QDeclarativeTextEdit17setSelectionColorERK6QColor @ 922 NONAME
- _ZN20QDeclarativeTextEdit17setSelectionStartEi @ 923 NONAME
+ _ZN20QDeclarativeTextEdit17setSelectionStartEi @ 923 NONAME ABSENT
_ZN20QDeclarativeTextEdit17textFormatChangedENS_10TextFormatE @ 924 NONAME
_ZN20QDeclarativeTextEdit17textMarginChangedEf @ 925 NONAME
_ZN20QDeclarativeTextEdit18loadCursorDelegateEv @ 926 NONAME
@@ -1207,7 +1207,7 @@ EXPORTS
_ZN21QDeclarativeTextInput15mousePressEventEP24QGraphicsSceneMouseEvent @ 1206 NONAME
_ZN21QDeclarativeTextInput15readOnlyChangedEb @ 1207 NONAME
_ZN21QDeclarativeTextInput15setFocusOnPressEb @ 1208 NONAME
- _ZN21QDeclarativeTextInput15setSelectionEndEi @ 1209 NONAME
+ _ZN21QDeclarativeTextInput15setSelectionEndEi @ 1209 NONAME ABSENT
_ZN21QDeclarativeTextInput16cursorPosChangedEv @ 1210 NONAME
_ZN21QDeclarativeTextInput16inputMaskChangedERK7QString @ 1211 NONAME
_ZN21QDeclarativeTextInput16selectionChangedEv @ 1212 NONAME
@@ -1218,7 +1218,7 @@ EXPORTS
_ZN21QDeclarativeTextInput17setCursorDelegateEP21QDeclarativeComponent @ 1217 NONAME
_ZN21QDeclarativeTextInput17setCursorPositionEi @ 1218 NONAME
_ZN21QDeclarativeTextInput17setSelectionColorERK6QColor @ 1219 NONAME
- _ZN21QDeclarativeTextInput17setSelectionStartEi @ 1220 NONAME
+ _ZN21QDeclarativeTextInput17setSelectionStartEi @ 1220 NONAME ABSENT
_ZN21QDeclarativeTextInput19focusOnPressChangedEb @ 1221 NONAME
_ZN21QDeclarativeTextInput19getStaticMetaObjectEv @ 1222 NONAME
_ZN21QDeclarativeTextInput19selectedTextChangedEv @ 1223 NONAME
@@ -2627,7 +2627,7 @@ EXPORTS
_ZNK21QDeclarativeRectangle8gradientEv @ 2626 NONAME
_ZNK21QDeclarativeScaleGrid10metaObjectEv @ 2627 NONAME
_ZNK21QDeclarativeScaleGrid6isNullEv @ 2628 NONAME
- _ZNK21QDeclarativeTextInput10cursorRectEv @ 2629 NONAME
+ _ZNK21QDeclarativeTextInput10cursorRectEv @ 2629 NONAME ABSENT
_ZNK21QDeclarativeTextInput10isReadOnlyEv @ 2630 NONAME
_ZNK21QDeclarativeTextInput10metaObjectEv @ 2631 NONAME
_ZNK21QDeclarativeTextInput12focusOnPressEv @ 2632 NONAME
@@ -3413,7 +3413,7 @@ EXPORTS
_ZN20QDeclarativePathView28highlightMoveDurationChangedEv @ 3412 NONAME
_ZN20QDeclarativeTextEdit11setWrapModeENS_8WrapModeE @ 3413 NONAME
_ZN20QDeclarativeTextEdit15wrapModeChangedEv @ 3414 NONAME
- _ZN21QDeclarativeTextInput11xToPositionEi @ 3415 NONAME
+ _ZN21QDeclarativeTextInput11xToPositionEi @ 3415 NONAME ABSENT
_ZN21QDeclarativeTextInput13setAutoScrollEb @ 3416 NONAME
_ZN21QDeclarativeTextInput14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 3417 NONAME
_ZN21QDeclarativeTextInput17autoScrollChangedEb @ 3418 NONAME
@@ -3612,16 +3612,16 @@ EXPORTS
_ZN20QDeclarativeTextEdit22cursorRectangleChangedEv @ 3611 NONAME
_ZN20QDeclarativeTextEdit22openSoftwareInputPanelEv @ 3612 NONAME
_ZN20QDeclarativeTextEdit23closeSoftwareInputPanelEv @ 3613 NONAME
- _ZN20QDeclarativeTextEdit24setShowInputPanelOnFocusEb @ 3614 NONAME
- _ZN20QDeclarativeTextEdit28showInputPanelOnFocusChangedEb @ 3615 NONAME
+ _ZN20QDeclarativeTextEdit24setShowInputPanelOnFocusEb @ 3614 NONAME ABSENT
+ _ZN20QDeclarativeTextEdit28showInputPanelOnFocusChangedEb @ 3615 NONAME ABSENT
_ZN21QDeclarativeTextInput12focusInEventEP11QFocusEvent @ 3616 NONAME
_ZN21QDeclarativeTextInput13focusOutEventEP11QFocusEvent @ 3617 NONAME
_ZN21QDeclarativeTextInput16setSelectByMouseEb @ 3618 NONAME
_ZN21QDeclarativeTextInput20selectByMouseChangedEb @ 3619 NONAME
_ZN21QDeclarativeTextInput22openSoftwareInputPanelEv @ 3620 NONAME
_ZN21QDeclarativeTextInput23closeSoftwareInputPanelEv @ 3621 NONAME
- _ZN21QDeclarativeTextInput24setShowInputPanelOnFocusEb @ 3622 NONAME
- _ZN21QDeclarativeTextInput28showInputPanelOnFocusChangedEb @ 3623 NONAME
+ _ZN21QDeclarativeTextInput24setShowInputPanelOnFocusEb @ 3622 NONAME ABSENT
+ _ZN21QDeclarativeTextInput28showInputPanelOnFocusChangedEb @ 3623 NONAME ABSENT
_ZN22QDeclarativeExpressionC1EP19QDeclarativeContextP7QObjectRK7QStringS3_ @ 3624 NONAME
_ZN22QDeclarativeExpressionC1EP23QDeclarativeContextDataP7QObjectRK7QString @ 3625 NONAME
_ZN22QDeclarativeExpressionC1EP23QDeclarativeContextDataP7QObjectRK7QStringR29QDeclarativeExpressionPrivate @ 3626 NONAME
@@ -3645,10 +3645,10 @@ EXPORTS
_ZNK20QDeclarativeTextEdit13paintedHeightEv @ 3644 NONAME
_ZNK20QDeclarativeTextEdit13selectByMouseEv @ 3645 NONAME
_ZNK20QDeclarativeTextEdit15cursorRectangleEv @ 3646 NONAME
- _ZNK20QDeclarativeTextEdit21showInputPanelOnFocusEv @ 3647 NONAME
+ _ZNK20QDeclarativeTextEdit21showInputPanelOnFocusEv @ 3647 NONAME ABSENT
_ZNK21QDeclarativeComponent11errorStringEv @ 3648 NONAME
_ZNK21QDeclarativeTextInput13selectByMouseEv @ 3649 NONAME
- _ZNK21QDeclarativeTextInput21showInputPanelOnFocusEv @ 3650 NONAME
+ _ZNK21QDeclarativeTextInput21showInputPanelOnFocusEv @ 3650 NONAME ABSENT
_ZNK23QDeclarativePaintedItem12boundingRectEv @ 3651 NONAME
_ZNK24QDeclarativeXmlListModel11errorStringEv @ 3652 NONAME
_ZNK24QDeclarativeXmlListModel3getEi @ 3653 NONAME
@@ -3657,4 +3657,19 @@ EXPORTS
_ZThn8_N21QDeclarativeTextInput12focusInEventEP11QFocusEvent @ 3656 NONAME
_ZThn8_N21QDeclarativeTextInput13focusOutEventEP11QFocusEvent @ 3657 NONAME
_ZThn8_NK23QDeclarativePaintedItem12boundingRectEv @ 3658 NONAME
+ _ZN20QDeclarativeTextEdit10selectWordEv @ 3659 NONAME
+ _ZN20QDeclarativeTextEdit19moveCursorSelectionEi @ 3660 NONAME
+ _ZN20QDeclarativeTextEdit3cutEv @ 3661 NONAME
+ _ZN20QDeclarativeTextEdit4copyEv @ 3662 NONAME
+ _ZN20QDeclarativeTextEdit5pasteEv @ 3663 NONAME
+ _ZN20QDeclarativeTextEdit6selectEii @ 3664 NONAME
+ _ZN21QDeclarativeTextInput10selectWordEv @ 3665 NONAME
+ _ZN21QDeclarativeTextInput21mouseDoubleClickEventEP24QGraphicsSceneMouseEvent @ 3666 NONAME
+ _ZN21QDeclarativeTextInput6selectEii @ 3667 NONAME
+ _ZNK20QDeclarativeTextEdit10positionAtEii @ 3668 NONAME
+ _ZNK20QDeclarativeTextEdit19positionToRectangleEi @ 3669 NONAME
+ _ZNK21QDeclarativeTextInput10positionAtEi @ 3670 NONAME
+ _ZNK21QDeclarativeTextInput15cursorRectangleEv @ 3671 NONAME
+ _ZNK21QDeclarativeTextInput19positionToRectangleEi @ 3672 NONAME
+ _ZThn8_N21QDeclarativeTextInput21mouseDoubleClickEventEP24QGraphicsSceneMouseEvent @ 3673 NONAME
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index 8aafde9..9c1002d 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -12006,4 +12006,10 @@ EXPORTS
_ZTV20QGraphicsViewPrivate @ 12005 NONAME
_ZTV23QImageTextureGlyphCache @ 12006 NONAME
_ZTV26QAbstractScrollAreaPrivate @ 12007 NONAME
+ _ZN11QTextCursor20setVerticalMovementXEi @ 12008 NONAME
+ _ZN11QTextCursor23setKeepPositionOnInsertEb @ 12009 NONAME
+ _ZN19QApplicationPrivate23runtime_graphics_systemE @ 12010 NONAME DATA 1
+ _ZNK11QTextCursor17verticalMovementXEv @ 12011 NONAME
+ _ZNK11QTextCursor20keepPositionOnInsertEv @ 12012 NONAME
+ _ZNK12QFontMetrics5widthERK7QStringii @ 12013 NONAME
diff --git a/src/s60installs/qsymbianbearer.qtplugin b/src/s60installs/qsymbianbearer.qtplugin
new file mode 100644
index 0000000..5c45bdd
--- /dev/null
+++ b/src/s60installs/qsymbianbearer.qtplugin
@@ -0,0 +1 @@
+This file is a Qt plugin stub file. The real Qt plugin is located in /sys/bin. Created:2010-06-02T14:02:21
diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro
index d751134..6d8513e 100644
--- a/src/s60installs/s60installs.pro
+++ b/src/s60installs/s60installs.pro
@@ -16,8 +16,8 @@ symbian: {
# It is also expected that devices newer than those based on S60 5.0 all have sqlite3.dll.
contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
BLD_INF_RULES.prj_exports += \
- "sqlite3.sis $${EPOCROOT}epoc32/data/qt/sis/sqlite3.sis" \
- "sqlite3_selfsigned.sis $${EPOCROOT}epoc32/data/qt/sis/sqlite3_selfsigned.sis"
+ "sqlite3.sis /epoc32/data/qt/sis/sqlite3.sis" \
+ "sqlite3_selfsigned.sis /epoc32/data/qt/sis/sqlite3_selfsigned.sis"
symbian-abld|symbian-sbsv2 {
sqlitedeployment = \
"; Deploy sqlite onto phone that does not have it already" \
@@ -54,20 +54,35 @@ symbian: {
symbian-abld|symbian-sbsv2 {
pluginLocations = $${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)
+ bearerPluginLocation = $${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)
+ bearerStubZ = $${EPOCROOT}$${HW_ZDIR}$${QT_PLUGINS_BASE_DIR}/bearer/qsymbianbearer$${QT_LIBINFIX}.qtplugin
+ BLD_INF_RULES.prj_exports += \
+ "qsymbianbearer.qtplugin $$bearerStubZ" \
+ "qsymbianbearer.qtplugin $${EPOCROOT}epoc32/winscw/c$${QT_PLUGINS_BASE_DIR}/bearer/qsymbianbearer$${QT_LIBINFIX}.qtplugin"
} else {
pluginLocations = $$QT_BUILD_TREE/plugins/s60
+ bearerPluginLocation = $$QT_BUILD_TREE/plugins/bearer
+ bearerStubZ = $${PWD}/qsymbianbearer.qtplugin
}
qts60plugindeployment = \
- "IF package(0x1028315F)" \
+ "IF package(0x20022E6D)" \
" \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" \
+ " \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \
+ "ELSEIF package(0x1028315F)" \
+ " \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" \
+ " \"$$bearerPluginLocation/qsymbianbearer_3_2$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \
"ELSEIF package(0x102752AE)" \
" \"$$pluginLocations/qts60plugin_3_2$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_3_2$${QT_LIBINFIX}.dll\"" \
+ " \"$$bearerPluginLocation/qsymbianbearer_3_2$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \
"ELSEIF package(0x102032BE)" \
" \"$$pluginLocations/qts60plugin_3_1$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_3_1$${QT_LIBINFIX}.dll\"" \
+ " \"$$bearerPluginLocation/qsymbianbearer_3_1$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \
"ELSE" \
" \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" \
- "ENDIF"
+ " \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \
+ "ENDIF" \
+ " \"$$bearerStubZ\" - \"c:$$replace(QT_PLUGINS_BASE_DIR,/,\\)\\bearer\\qsymbianbearer$${QT_LIBINFIX}.qtplugin\"
qtlibraries.pkg_postrules += qts60plugindeployment
@@ -118,15 +133,11 @@ symbian: {
qtbackup.sources = backup_registration.xml
qtbackup.path = c:/private/10202D56/import/packages/$$replace(TARGET.UID3, 0x,)
- bearer_plugins.path = c:$$QT_PLUGINS_BASE_DIR/bearer
- bearer_plugins.sources += $$QT_BUILD_TREE/plugins/bearer/qsymbianbearer$${QT_LIBINFIX}.dll
-
DEPLOYMENT += qtlibraries \
qtbackup \
imageformats_plugins \
codecs_plugins \
- graphicssystems_plugins \
- bearer_plugins
+ graphicssystems_plugins
contains(QT_CONFIG, svg): {
qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtSvg$${QT_LIBINFIX}.dll
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index f02ea52..e2999c1 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -1011,12 +1011,17 @@ JSC::JSValue QScriptEnginePrivate::arrayFromVariantList(JSC::ExecState *exec, co
return arr;
}
-QVariantList QScriptEnginePrivate::variantListFromArray(JSC::ExecState *exec, JSC::JSValue arr)
+QVariantList QScriptEnginePrivate::variantListFromArray(JSC::ExecState *exec, JSC::JSArray *arr)
{
+ QScriptEnginePrivate *eng = QScript::scriptEngineFromExec(exec);
+ if (eng->visitedConversionObjects.contains(arr))
+ return QVariantList(); // Avoid recursion.
+ eng->visitedConversionObjects.insert(arr);
QVariantList lst;
uint len = toUInt32(exec, property(exec, arr, exec->propertyNames().length));
for (uint i = 0; i < len; ++i)
lst.append(toVariant(exec, property(exec, arr, i)));
+ eng->visitedConversionObjects.remove(arr);
return lst;
}
@@ -1029,14 +1034,19 @@ JSC::JSValue QScriptEnginePrivate::objectFromVariantMap(JSC::ExecState *exec, co
return obj;
}
-QVariantMap QScriptEnginePrivate::variantMapFromObject(JSC::ExecState *exec, JSC::JSValue obj)
+QVariantMap QScriptEnginePrivate::variantMapFromObject(JSC::ExecState *exec, JSC::JSObject *obj)
{
+ QScriptEnginePrivate *eng = QScript::scriptEngineFromExec(exec);
+ if (eng->visitedConversionObjects.contains(obj))
+ return QVariantMap(); // Avoid recursion.
+ eng->visitedConversionObjects.insert(obj);
JSC::PropertyNameArray propertyNames(exec);
- JSC::asObject(obj)->getOwnPropertyNames(exec, propertyNames, JSC::IncludeDontEnumProperties);
+ obj->getOwnPropertyNames(exec, propertyNames, JSC::IncludeDontEnumProperties);
QVariantMap vmap;
JSC::PropertyNameArray::const_iterator it = propertyNames.begin();
for( ; it != propertyNames.end(); ++it)
vmap.insert(it->ustring(), toVariant(exec, property(exec, obj, *it)));
+ eng->visitedConversionObjects.remove(obj);
return vmap;
}
@@ -1661,16 +1671,10 @@ QVariant QScriptEnginePrivate::toVariant(JSC::ExecState *exec, JSC::JSValue valu
return QVariant(toRegExp(exec, value));
#endif
else if (isArray(value))
- return variantListFromArray(exec, value);
+ return variantListFromArray(exec, JSC::asArray(value));
else if (QScriptDeclarativeClass *dc = declarativeClass(value))
return dc->toVariant(declarativeObject(value));
- // try to convert to primitive
- JSC::JSValue savedException;
- saveException(exec, &savedException);
- JSC::JSValue prim = value.toPrimitive(exec);
- restoreException(exec, savedException);
- if (!prim.isObject())
- return toVariant(exec, prim);
+ return variantMapFromObject(exec, JSC::asObject(value));
} else if (value.isNumber()) {
return QVariant(toNumber(exec, value));
} else if (value.isString()) {
@@ -3129,12 +3133,12 @@ bool QScriptEnginePrivate::convertValue(JSC::ExecState *exec, JSC::JSValue value
} break;
case QMetaType::QVariantList:
if (isArray(value)) {
- *reinterpret_cast<QVariantList *>(ptr) = variantListFromArray(exec, value);
+ *reinterpret_cast<QVariantList *>(ptr) = variantListFromArray(exec, JSC::asArray(value));
return true;
} break;
case QMetaType::QVariantMap:
if (isObject(value)) {
- *reinterpret_cast<QVariantMap *>(ptr) = variantMapFromObject(exec, value);
+ *reinterpret_cast<QVariantMap *>(ptr) = variantMapFromObject(exec, JSC::asObject(value));
return true;
} break;
case QMetaType::QVariant:
diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h
index fd47208..56366e2 100644
--- a/src/script/api/qscriptengine_p.h
+++ b/src/script/api/qscriptengine_p.h
@@ -215,10 +215,10 @@ public:
static QStringList stringListFromArray(JSC::ExecState*, JSC::JSValue arr);
static JSC::JSValue arrayFromVariantList(JSC::ExecState*, const QVariantList &lst);
- static QVariantList variantListFromArray(JSC::ExecState*, JSC::JSValue arr);
+ static QVariantList variantListFromArray(JSC::ExecState*, JSC::JSArray *arr);
static JSC::JSValue objectFromVariantMap(JSC::ExecState*, const QVariantMap &vmap);
- static QVariantMap variantMapFromObject(JSC::ExecState*, JSC::JSValue obj);
+ static QVariantMap variantMapFromObject(JSC::ExecState*, JSC::JSObject *obj);
JSC::JSValue defaultPrototype(int metaTypeId) const;
void setDefaultPrototype(int metaTypeId, JSC::JSValue prototype);
@@ -378,6 +378,8 @@ public:
QHash<intptr_t, QScript::UStringSourceProviderWithFeedback*> loadedScripts;
QScriptValue m_currentException;
+ QSet<JSC::JSObject*> visitedConversionObjects;
+
#ifndef QT_NO_QOBJECT
QHash<QObject*, QScript::QObjectData*> m_qobjectData;
#endif
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp
index 1310c8c..451d1b0 100644
--- a/src/script/api/qscriptvalue.cpp
+++ b/src/script/api/qscriptvalue.cpp
@@ -1215,8 +1215,8 @@ qsreal QScriptValue::toInteger() const
\row \o QObject Object \o A QVariant containing a pointer to the QObject.
\row \o Date Object \o A QVariant containing the date value (toDateTime()).
\row \o RegExp Object \o A QVariant containing the regular expression value (toRegExp()).
- \row \o Array Object \o The array is converted to a QVariantList.
- \row \o Object \o If the value is primitive, then the result is converted to a QVariant according to the above rules; otherwise, an invalid QVariant is returned.
+ \row \o Array Object \o The array is converted to a QVariantList. Each element is converted to a QVariant, recursively; cyclic references are not followed.
+ \row \o Object \o The object is converted to a QVariantMap. Each property is converted to a QVariant, recursively; cyclic references are not followed.
\endtable
\sa isVariant()
diff --git a/src/sql/drivers/drivers.pri b/src/sql/drivers/drivers.pri
index 8dfc50f..05e7265 100644
--- a/src/sql/drivers/drivers.pri
+++ b/src/sql/drivers/drivers.pri
@@ -6,16 +6,14 @@ contains(sql-drivers, psql) {
HEADERS += drivers/psql/qsql_psql.h
SOURCES += drivers/psql/qsql_psql.cpp
- unix|win32-g++ {
+ unix|win32-g++* {
!static:!isEmpty(QT_LFLAGS_PSQL) {
!contains(QT_CONFIG, system-zlib): QT_LFLAGS_PSQL -= -lz
!static:LIBS *= $$QT_LFLAGS_PSQL
QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL
}
!contains(LIBS, .*pq.*):LIBS *= -lpq
- }
-
- win32:!win32-g++:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32
+ } else:win32:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32
}
contains(sql-drivers, mysql) {
@@ -35,8 +33,8 @@ contains(sql-drivers, mysql) {
}
win32:!contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*) {
- !win32-g++:LIBS *= -llibmysql
- win32-g++:LIBS *= -lmysql
+ !win32-g++*:LIBS *= -llibmysql
+ else:LIBS *= -lmysql
}
}
@@ -49,8 +47,8 @@ contains(sql-drivers, odbc) {
unix:DEFINES += UNICODE
win32 {
- !win32-borland:LIBS *= -lodbc32
- win32-borland:LIBS *= $(BCB)/lib/PSDK/odbc32.lib
+ !win32-borland:LIBS *= -lodbc32
+ else:LIBS *= $(BCB)/lib/PSDK/odbc32.lib
}
}
@@ -71,7 +69,7 @@ contains(sql-drivers, tds) {
win32 {
!win32-borland:LIBS += -lNTWDBLIB
- win32-borland:LIBS += $(BCB)/lib/PSDK/NTWDBLIB.LIB
+ else:LIBS += $(BCB)/lib/PSDK/NTWDBLIB.LIB
}
}
@@ -83,7 +81,7 @@ contains(sql-drivers, db2) {
win32 {
!win32-borland:LIBS += -ldb2cli
-# win32-borland:LIBS += $(BCB)/lib/PSDK/db2cli.lib
+# else:LIBS += $(BCB)/lib/PSDK/db2cli.lib
}
}
@@ -95,7 +93,7 @@ contains(sql-drivers, ibase) {
win32 {
!win32-borland:LIBS *= -lgds32_ms
- win32-borland:LIBS += gds32.lib
+ else:LIBS += gds32.lib
}
}
diff --git a/src/src.pro b/src/src.pro
index 5436c4a..3ac69be 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -84,7 +84,7 @@ src_declarative.subdir = $$QT_SOURCE_TREE/src/declarative
src_declarative.target = sub-declarative
#CONFIG += ordered
-!wince*:!ordered {
+!wince*:!ordered:!symbian-abld:!symbian-sbsv2 {
src_corelib.depends = src_tools_moc src_tools_rcc
src_gui.depends = src_corelib src_tools_uic
embedded: src_gui.depends += src_network
diff --git a/src/svg/svg.pro b/src/svg/svg.pro
index d2a4227..de4bba6 100644
--- a/src/svg/svg.pro
+++ b/src/svg/svg.pro
@@ -44,7 +44,9 @@ symbian:TARGET.UID3=0x2001B2E2
#zlib support
contains(QT_CONFIG, zlib) {
- INCLUDEPATH += ../3rdparty/zlib
+ INCLUDEPATH += ../3rdparty/zlib
} else:!contains(QT_CONFIG, no-zlib) {
- unix:LIBS_PRIVATE += -lz
+ symbian:LIBS_PRIVATE += -llibz
+ else:if(unix|win32-g++*):LIBS_PRIVATE += -lz
+ else:LIBS += zdll.lib
}
diff --git a/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri
index 1de7b18..1aa8121 100644
--- a/src/tools/bootstrap/bootstrap.pri
+++ b/src/tools/bootstrap/bootstrap.pri
@@ -52,8 +52,9 @@ hpux-acc*|hpuxi-acc* {
LIBS += -lbootstrap
}
!contains(QT_CONFIG, zlib):!contains(QT_CONFIG, no-zlib):!cross_compile {
- unix:LIBS += -lz
-# win32:LIBS += libz.lib
+ symbian:LIBS_PRIVATE += -llibz
+ else:if(unix|win32-g++*):LIBS_PRIVATE += -lz
+ else:LIBS += zdll.lib
}
win32:LIBS += -luser32
diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro
index 44dd625..149291a 100644
--- a/src/tools/bootstrap/bootstrap.pro
+++ b/src/tools/bootstrap/bootstrap.pro
@@ -109,6 +109,10 @@ contains(QT_CONFIG, zlib)|cross_compile {
../3rdparty/zlib/trees.c \
../3rdparty/zlib/uncompr.c \
../3rdparty/zlib/zutil.c
+} else:!contains(QT_CONFIG, no-zlib) {
+ symbian:LIBS_PRIVATE += -llibz
+ else:if(unix|win32-g++*):LIBS_PRIVATE += -lz
+ else:LIBS += zdll.lib
}
lib.CONFIG = dummy_install
diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp
index ebe1834..4997690 100644
--- a/src/tools/moc/main.cpp
+++ b/src/tools/moc/main.cpp
@@ -359,11 +359,10 @@ int runMoc(int _argc, char **_argv)
if (autoInclude) {
+ int spos = filename.lastIndexOf(QDir::separator().toLatin1());
int ppos = filename.lastIndexOf('.');
- moc.noInclude = (ppos >= 0
- && tolower(filename[ppos + 1]) != 'h'
- && tolower(filename[ppos + 1]) != QDir::separator().toLatin1()
- );
+ // spos >= -1 && ppos > spos => ppos >= 0
+ moc.noInclude = (ppos > spos && tolower(filename[ppos + 1]) != 'h');
}
if (moc.includeFiles.isEmpty()) {
if (moc.includePath.isEmpty()) {
diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro
index bc322b9..0c9b214 100644
--- a/src/winmain/winmain.pro
+++ b/src/winmain/winmain.pro
@@ -8,10 +8,10 @@ CONFIG += staticlib warn_on
CONFIG -= qt shared
win32 {
- win32-g++:DEFINES += QT_NEEDS_QMAIN
+ win32-g++*:DEFINES += QT_NEEDS_QMAIN
win32-borland:DEFINES += QT_NEEDS_QMAIN
SOURCES = qtmain_win.cpp
- CONFIG += png zlib
+ CONFIG += png
CONFIG -= jpeg
INCLUDEPATH += tmp $$QMAKE_INCDIR_QT/QtCore
}
diff --git a/src/xmlpatterns/schema/qxsdparticlechecker.cpp b/src/xmlpatterns/schema/qxsdparticlechecker.cpp
index ef1d135..15c2afe 100644
--- a/src/xmlpatterns/schema/qxsdparticlechecker.cpp
+++ b/src/xmlpatterns/schema/qxsdparticlechecker.cpp
@@ -344,6 +344,19 @@ bool XsdParticleChecker::hasDuplicatedElements(const XsdParticle::Ptr &particle,
bool XsdParticleChecker::isUPAConform(const XsdParticle::Ptr &particle, const NamePool::Ptr &namePool)
{
+
+ /**
+ * In case we encounter an <xsd:all> element, don't construct a state machine, but use the approach
+ * described at http://www.w3.org/TR/xmlschema-1/#non-ambig
+ * Reason: For n elements inside the <xsd:all>, represented in the NDA, the state machine
+ * constructs n! states in the DFA, which does not scale.
+ */
+ if (particle->term()->isModelGroup()) {
+ const XsdModelGroup::Ptr group(particle->term());
+ if (group->compositor() == XsdModelGroup::AllCompositor)
+ return isUPAConformXsdAll(particle, namePool);
+ }
+
/**
* The algorithm is implemented like described in http://www.ltg.ed.ac.uk/~ht/XML_Europe_2003.html#S2.2
*/
@@ -414,6 +427,23 @@ bool XsdParticleChecker::isUPAConform(const XsdParticle::Ptr &particle, const Na
return true;
}
+bool XsdParticleChecker::isUPAConformXsdAll(const XsdParticle::Ptr &particle, const NamePool::Ptr &namePool)
+{
+ /**
+ * see http://www.w3.org/TR/xmlschema-1/#non-ambig
+ */
+ const XsdModelGroup::Ptr group(particle->term());
+ const XsdParticle::List particles = group->particles();
+ const int count = particles.count();
+ for (int left = 0; left < count; ++left) {
+ for (int right = left+1; right < count; ++right) {
+ if (termMatches(particles.at(left)->term(), particles.at(right)->term(), namePool))
+ return false;
+ }
+ }
+ return true;
+}
+
bool XsdParticleChecker::subsumes(const XsdParticle::Ptr &particle, const XsdParticle::Ptr &derivedParticle, const XsdSchemaContext::Ptr &context, QString &errorMsg)
{
/**
diff --git a/src/xmlpatterns/schema/qxsdparticlechecker_p.h b/src/xmlpatterns/schema/qxsdparticlechecker_p.h
index 742f0d0..40c525a 100644
--- a/src/xmlpatterns/schema/qxsdparticlechecker_p.h
+++ b/src/xmlpatterns/schema/qxsdparticlechecker_p.h
@@ -85,6 +85,13 @@ namespace QPatternist
static bool isUPAConform(const XsdParticle::Ptr &particle, const NamePool::Ptr &namePool);
/**
+ * Checks whether the given @p particle, which must be an xsd:all element,
+ * is valid according the UPA (http://www.w3.org/TR/xmlschema-1/#cos-nonambig) constraint.
+ * For xsd:all elements, we do not want to construct a state machine.
+ */
+ static bool isUPAConformXsdAll(const XsdParticle::Ptr &particle, const NamePool::Ptr &namePool);
+
+ /**
* Checks whether the given @p particle subsumes the given @p derivedParticle.
* (http://www.w3.org/TR/xmlschema-1/#cos-particle-restrict)
*/
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro
index 484fbef..3d2dbf0 100644
--- a/tests/auto/declarative/declarative.pro
+++ b/tests/auto/declarative/declarative.pro
@@ -1,12 +1,12 @@
TEMPLATE = subdirs
!symbian: {
SUBDIRS += \
- examples \
qdeclarativemetatype \
qmetaobjectbuilder
}
SUBDIRS += \
+ examples \
parserstress \
qdeclarativeanchors \
qdeclarativeanimatedimage \
diff --git a/tests/auto/declarative/examples/examples.pro b/tests/auto/declarative/examples/examples.pro
index 92a16f1..2e243b4 100644
--- a/tests/auto/declarative/examples/examples.pro
+++ b/tests/auto/declarative/examples/examples.pro
@@ -7,9 +7,8 @@ SOURCES += tst_examples.cpp
include(../../../../tools/qml/qml.pri)
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/examples/tst_examples.cpp b/tests/auto/declarative/examples/tst_examples.cpp
index 605345e..cff0b46 100644
--- a/tests/auto/declarative/examples/tst_examples.cpp
+++ b/tests/auto/declarative/examples/tst_examples.cpp
@@ -47,6 +47,11 @@
#include <QDeclarativeView>
#include <QDeclarativeError>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_examples : public QObject
{
Q_OBJECT
@@ -80,6 +85,7 @@ tst_examples::tst_examples()
// Add directories you want excluded here
+ excludedDirs << "doc/src/snippets/declarative/visualdatamodel_rootindex";
#ifdef QT_NO_WEBKIT
excludedDirs << "examples/declarative/modelviews/webview";
diff --git a/tests/auto/declarative/parserstress/parserstress.pro b/tests/auto/declarative/parserstress/parserstress.pro
index 3a675e4..bb1d69f 100644
--- a/tests/auto/declarative/parserstress/parserstress.pro
+++ b/tests/auto/declarative/parserstress/parserstress.pro
@@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle
SOURCES += tst_parserstress.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = ..\\..\\qscriptjstestsuite\\tests
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/parserstress/tst_parserstress.cpp b/tests/auto/declarative/parserstress/tst_parserstress.cpp
index c86908b..522a63a 100644
--- a/tests/auto/declarative/parserstress/tst_parserstress.cpp
+++ b/tests/auto/declarative/parserstress/tst_parserstress.cpp
@@ -46,6 +46,11 @@
#include <QDir>
#include <QFile>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_parserstress : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro b/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro
index 452ad55..9798bb6 100644
--- a/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro
+++ b/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro
@@ -4,9 +4,8 @@ SOURCES += tst_qdeclarativeanchors.cpp
macx:CONFIG -= app_bundle
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp b/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
index 22f7966..97b77d0 100644
--- a/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
+++ b/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
@@ -50,6 +50,11 @@
#include <QtDeclarative/private/qdeclarativeanchors_p_p.h>
#include <QtDeclarative/private/qdeclarativeitem_p.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
Q_DECLARE_METATYPE(QDeclarativeAnchors::Anchor)
Q_DECLARE_METATYPE(QDeclarativeAnchorLine::AnchorLine)
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro b/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro
index 7213abd..0a2f0f2 100644
--- a/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro
@@ -5,9 +5,8 @@ SOURCES += tst_qdeclarativeanimatedimage.cpp ../shared/testhttpserver.cpp
macx:CONFIG -= app_bundle
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp
index 237a436..1001278 100644
--- a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp
@@ -48,6 +48,11 @@
#include "../shared/testhttpserver.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
#define TRY_WAIT(expr) \
do { \
for (int ii = 0; ii < 6; ++ii) { \
diff --git a/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro b/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro
index f7ed371..ed47dca 100644
--- a/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro
+++ b/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro
@@ -4,9 +4,8 @@ SOURCES += tst_qdeclarativeanimations.cpp
macx:CONFIG -= app_bundle
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
index ed7e506..5cf4c23 100644
--- a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
+++ b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
@@ -48,6 +48,11 @@
#include <QVariantAnimation>
#include <QEasingCurve>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativeanimations : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro b/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro
index 7137af1..cfb59ef 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro
+++ b/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro
@@ -4,9 +4,8 @@ SOURCES += tst_qdeclarativebehaviors.cpp
macx:CONFIG -= app_bundle
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
index 45e5304..70739fb 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
+++ b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
@@ -49,6 +49,11 @@
#include <private/qdeclarativeitem_p.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativebehaviors : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro b/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro
index 04535db..a7ba2a8 100644
--- a/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro
+++ b/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativebinding.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp
index 8ab7b0b..653b34a 100644
--- a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp
+++ b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp
@@ -45,6 +45,11 @@
#include <private/qdeclarativerectangle_p.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativebinding : public QObject
{
diff --git a/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro b/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro
index 3aa2197..a21761b 100644
--- a/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro
+++ b/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro
@@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle
HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativeborderimage.cpp ../shared/testhttpserver.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
index 69b4a89..1b73cf7 100644
--- a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
+++ b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
@@ -54,6 +54,10 @@
#include "../shared/testhttpserver.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
#define SERVER_PORT 14446
#define SERVER_ADDR "http://127.0.0.1:14446"
diff --git a/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro b/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro
index 98c38ad..4124f94 100644
--- a/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro
+++ b/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro
@@ -5,9 +5,7 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativecomponent.cpp
-symbian: {
- DEFINES += SRCDIR=\".\"
-} else {
+!symbian: {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
index faa1c21..8a19b8b 100644
--- a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
+++ b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
@@ -45,6 +45,11 @@
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativecomponent.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativecomponent : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro b/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro
index bbf8630..d06ce4f 100644
--- a/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro
+++ b/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeconnection.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp b/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp
index 00e97ca..d384372 100644
--- a/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp
+++ b/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp
@@ -46,6 +46,11 @@
#include "../../../shared/util.h"
#include <QtDeclarative/qdeclarativescriptstring.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativeconnection : public QObject
{
diff --git a/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro b/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro
index 0e1a5b1..74bb78c 100644
--- a/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro
+++ b/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro
@@ -3,9 +3,7 @@ contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_qdeclarativecontext.cpp
macx:CONFIG -= app_bundle
-symbian: {
- DEFINES += SRCDIR=\".\"
-} else {
+!symbian: {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
index 7f0e6c0..605cf8e 100644
--- a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
+++ b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
@@ -46,6 +46,11 @@
#include <QDeclarativeComponent>
#include <QDeclarativeExpression>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativecontext : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro b/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro
index 9f1e50c..415d4e2 100644
--- a/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro
+++ b/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro
@@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativedom.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
index 6c19566..13960b1 100644
--- a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
+++ b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
@@ -46,6 +46,11 @@
#include <QtCore/QDebug>
#include <QtCore/QFile>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativedom : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro b/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro
index c907be5..58cad34 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro
+++ b/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro
@@ -12,7 +12,13 @@ INCLUDEPATH += ../shared
# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
# LIBS += -lgcov
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ importFiles.sources = data
+ importFiles.path = .
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index e75abac..16e7ec5 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -53,6 +53,11 @@
#include "testtypes.h"
#include "testhttpserver.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
/*
This test covers evaluation of ECMAScript expressions and bindings from within
QML. This does not include static QML language issues.
diff --git a/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro b/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro
index 23afd07..7119ad9 100644
--- a/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro
+++ b/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro
@@ -4,10 +4,7 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeengine.cpp
-# Define SRCDIR equal to test's source directory
-symbian: {
- DEFINES += SRCDIR=\".\"
-} else {
+!symbian: {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp b/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp
index 0aebea1..56ebd73 100644
--- a/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp
+++ b/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp
@@ -50,6 +50,11 @@
#include <QDeclarativeComponent>
#include <QDeclarativeNetworkAccessManagerFactory>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativeengine : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro b/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro
index fae11f9..29b7149 100644
--- a/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro
+++ b/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro
@@ -3,9 +3,7 @@ contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_qdeclarativeerror.cpp
macx:CONFIG -= app_bundle
-symbian: {
- DEFINES += SRCDIR=\".\"
-} else {
+!symbian: {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp b/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp
index ba1ebae..0279953 100644
--- a/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp
+++ b/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp
@@ -43,6 +43,11 @@
#include <QDeclarativeError>
#include <QDebug>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativeerror : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro b/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro
index 7a70109..be0ba6c 100644
--- a/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro
+++ b/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeflickable.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp
index 2c6890e..2ba5574 100644
--- a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp
+++ b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp
@@ -46,6 +46,11 @@
#include <private/qdeclarativevaluetype_p.h>
#include <math.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativeflickable : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro b/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro
index 9b4fbc9..759e80b 100644
--- a/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro
+++ b/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeflipable.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp b/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
index f32cdbd..f56c032 100644
--- a/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
+++ b/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
@@ -48,6 +48,11 @@
#include <private/qdeclarativerectangle_p.h>
#include <math.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativeflipable : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro b/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro
index c021fcf..24749c6 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro
+++ b/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro
@@ -4,9 +4,8 @@ SOURCES += tst_qdeclarativefocusscope.cpp
macx:CONFIG -= app_bundle
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp b/tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp
index 04bb1c5..7732e6d 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp
+++ b/tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp
@@ -48,6 +48,10 @@
#include <private/qdeclarativetext_p.h>
#include <QtDeclarative/private/qdeclarativefocusscope_p.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
class tst_qdeclarativefocusscope : public QObject
{
diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro b/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro
index 487d0e1..91bf4a7 100644
--- a/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro
+++ b/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativefolderlistmodel.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp b/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp
index 3cf9613..b2e3a5b 100644
--- a/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp
@@ -48,6 +48,11 @@
#include <QtCore/qabstractitemmodel.h>
#include <QDebug>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
// From qdeclarastivefolderlistmodel.h
const int FileNameRole = Qt::UserRole+1;
const int FilePathRole = Qt::UserRole+2;
diff --git a/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro b/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro
index dbe0dcb..01dca26 100644
--- a/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro
+++ b/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro
@@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle
HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativefontloader.cpp ../shared/testhttpserver.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp
index 36908d9..ae23017 100644
--- a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp
+++ b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp
@@ -47,6 +47,11 @@
#define SERVER_PORT 14448
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativefontloader : public QObject
{
diff --git a/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro b/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro
index 033e20e..a99a1b9 100644
--- a/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro
+++ b/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativegridview.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
index 2db3ee6..4e35bc0 100644
--- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
+++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
@@ -52,6 +52,11 @@
#include <QtDeclarative/private/qdeclarativelistmodel_p.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_QDeclarativeGridView : public QObject
{
Q_OBJECT
@@ -833,21 +838,34 @@ void tst_QDeclarativeGridView::componentChanges()
QSignalSpy highlightSpy(gridView, SIGNAL(highlightChanged()));
QSignalSpy delegateSpy(gridView, SIGNAL(delegateChanged()));
+ QSignalSpy headerSpy(gridView, SIGNAL(headerChanged()));
+ QSignalSpy footerSpy(gridView, SIGNAL(footerChanged()));
gridView->setHighlight(&component);
gridView->setDelegate(&delegateComponent);
+ gridView->setHeader(&component);
+ gridView->setFooter(&component);
QTRY_COMPARE(gridView->highlight(), &component);
QTRY_COMPARE(gridView->delegate(), &delegateComponent);
+ QTRY_COMPARE(gridView->header(), &component);
+ QTRY_COMPARE(gridView->footer(), &component);
QTRY_COMPARE(highlightSpy.count(),1);
QTRY_COMPARE(delegateSpy.count(),1);
+ QTRY_COMPARE(headerSpy.count(),1);
+ QTRY_COMPARE(footerSpy.count(),1);
gridView->setHighlight(&component);
gridView->setDelegate(&delegateComponent);
+ gridView->setHeader(&component);
+ gridView->setFooter(&component);
QTRY_COMPARE(highlightSpy.count(),1);
QTRY_COMPARE(delegateSpy.count(),1);
+ QTRY_COMPARE(headerSpy.count(),1);
+ QTRY_COMPARE(footerSpy.count(),1);
+
delete canvas;
}
@@ -1092,6 +1110,13 @@ void tst_QDeclarativeGridView::enforceRange()
gridview->setCurrentIndex(5);
QTRY_COMPARE(gridview->contentY(), 100.);
+ TestModel model2;
+ for (int i = 0; i < 5; i++)
+ model2.addItem("Item" + QString::number(i), "");
+
+ ctxt->setContextProperty("testModel", &model2);
+ QCOMPARE(gridview->count(), 5);
+
delete canvas;
}
diff --git a/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro b/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro
index a8b8eca..244a1e1 100644
--- a/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro
+++ b/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro
@@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle
HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativeimage.cpp ../shared/testhttpserver.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
index 720702a..c09f7fc 100644
--- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
+++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
@@ -55,6 +55,10 @@
#include "../shared/testhttpserver.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
#define SERVER_PORT 14451
#define SERVER_ADDR "http://127.0.0.1:14451"
diff --git a/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro b/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro
index 1b828a5..bdb6423 100644
--- a/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro
+++ b/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro
@@ -8,11 +8,9 @@ SOURCES += tst_qdeclarativeimageprovider.cpp
# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
# LIBS += -lgcov
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
index cc4ec20..4185790 100644
--- a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
+++ b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
@@ -45,6 +45,11 @@
#include <private/qdeclarativeimage_p.h>
#include <QImageReader>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
// QDeclarativeImageProvider::request() is run in an idle thread where possible
// Be generous in our timeout.
#define TRY_WAIT(expr) \
diff --git a/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro b/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro
index c6719c0..2c20e7e 100644
--- a/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro
+++ b/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro
@@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeinfo.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp b/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp
index 36db448..03df71f 100644
--- a/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp
+++ b/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp
@@ -46,6 +46,11 @@
#include <QDeclarativeContext>
#include <qdeclarativeinfo.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativeinfo : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro b/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro
index 350f6c6..c8a48c9 100644
--- a/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro
+++ b/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro
@@ -3,9 +3,7 @@ contains(QT_CONFIG,declarative): QT += declarative script
SOURCES += tst_qdeclarativeinstruction.cpp
macx:CONFIG -= app_bundle
-symbian: {
- DEFINES += SRCDIR=\".\"
-} else {
+!symbian: {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
index 1e88255..d5a911a 100644
--- a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
+++ b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
@@ -42,6 +42,11 @@
#include <qtest.h>
#include <private/qdeclarativecompiler_p.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativeinstruction : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug.qml b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug.qml
new file mode 100644
index 0000000..4a2f056
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug.qml
@@ -0,0 +1,23 @@
+import Qt 4.7
+
+Rectangle {
+ width: 400
+ height: 200
+
+ Item {
+ objectName: "theItem"
+ anchors.centerIn: parent
+ width: childrenRect.width
+ height: childrenRect.height
+ Rectangle {
+ id: text1
+ anchors.verticalCenter: parent.verticalCenter
+ width: 100; height: 100; color: "green"
+ }
+ Rectangle {
+ anchors.left: text1.right
+ anchors.verticalCenter: parent.verticalCenter
+ width: 100; height: 100; color: "green"
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro b/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro
index f494ef1..f4901c4 100644
--- a/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro
+++ b/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro
@@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeitem.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
index ecc813e..0a66245 100644
--- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
+++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
@@ -47,6 +47,11 @@
#include <QtDeclarative/qdeclarativeitem.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_QDeclarativeItem : public QObject
{
@@ -67,6 +72,7 @@ private slots:
void transforms();
void transforms_data();
void childrenRect();
+ void childrenRectBug();
void childrenProperty();
void resourcesProperty();
@@ -731,6 +737,22 @@ void tst_QDeclarativeItem::childrenRect()
delete o;
}
+// QTBUG-11383
+void tst_QDeclarativeItem::childrenRectBug()
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/childrenRectBug.qml"));
+ canvas->show();
+
+ QGraphicsObject *o = canvas->rootObject();
+ QDeclarativeItem *item = o->findChild<QDeclarativeItem*>("theItem");
+ QCOMPARE(item->width(), qreal(200));
+ QCOMPARE(item->height(), qreal(100));
+ QCOMPARE(item->x(), qreal(100));
+
+ delete canvas;
+}
+
template<typename T>
T *tst_QDeclarativeItem::findItem(QGraphicsObject *parent, const QString &objectName)
{
diff --git a/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro b/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro
index 2b7eb1c..43c451f 100644
--- a/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro
+++ b/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro
@@ -12,9 +12,8 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += ../shared/testhttpserver.cpp
symbian: {
- DEFINES += SRCDIR=\".\"\"\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index 011870c..413843a 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -55,6 +55,11 @@
#include "../../../shared/util.h"
#include "testhttpserver.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
DEFINE_BOOL_CONFIG_OPTION(qmlCheckTypes, QML_CHECK_TYPES)
diff --git a/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro b/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro
index 79954fe..5076e51 100644
--- a/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro
+++ b/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro
@@ -4,12 +4,10 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativelayoutitem.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
-} \ No newline at end of file
+}
diff --git a/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp b/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp
index c0c5abc..bbdba74 100644
--- a/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp
+++ b/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp
@@ -49,6 +49,11 @@
#include <qgraphicslinearlayout.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativelayoutitem : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro b/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro
index 53bb9ec..e90db49 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro
+++ b/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro
@@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativelistmodel.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
index be4ffe8..b3b6c20 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
@@ -51,6 +51,11 @@
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativelistmodel : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro b/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro
index b406fde..2c5a859 100644
--- a/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro
+++ b/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativelistview.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
index 2aef9bb..cd42b63 100644
--- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
+++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
@@ -52,6 +52,11 @@
#include <QtDeclarative/private/qlistmodelinterface_p.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_QDeclarativeListView : public QObject
{
Q_OBJECT
@@ -802,6 +807,14 @@ void tst_QDeclarativeListView::enforceRange()
QTRY_COMPARE(listview->currentIndex(), 6);
+ // change model
+ TestModel model2;
+ for (int i = 0; i < 5; i++)
+ model2.addItem("Item" + QString::number(i), "");
+
+ ctxt->setContextProperty("testModel", &model2);
+ QCOMPARE(listview->count(), 5);
+
delete canvas;
}
diff --git a/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro b/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro
index 9334928..b07bf9e 100644
--- a/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro
+++ b/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro
@@ -8,9 +8,8 @@ SOURCES += tst_qdeclarativeloader.cpp \
../shared/testhttpserver.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
index 11cc61b..d047a2a 100644
--- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
+++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
@@ -50,6 +50,11 @@
#define SERVER_PORT 14450
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
inline QUrl TEST_FILE(const QString &filename)
{
return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename);
diff --git a/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro b/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro
index 0d32ab8..f13250e 100644
--- a/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro
+++ b/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro
@@ -3,9 +3,7 @@ contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_qdeclarativemetatype.cpp
macx:CONFIG -= app_bundle
-symbian: {
- DEFINES += SRCDIR=\".\"
-} else {
+!symbian: {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp b/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp
index 76e86c9..8964f8a 100644
--- a/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp
+++ b/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp
@@ -54,6 +54,11 @@
#include <private/qdeclarativemetatype_p.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativemetatype : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
index 6d17acc..2081f0e 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
@@ -56,6 +56,11 @@ private slots:
void importsPlugin();
};
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
#define VERIFY_ERRORS(errorfile) \
if (!errorfile) { \
if (qgetenv("DEBUG") != "" && !component.errors().isEmpty()) \
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro
index 29a1009..fb3630f 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro
@@ -2,10 +2,10 @@ load(qttest_p4)
SOURCES = tst_qdeclarativemoduleplugin.cpp
QT += declarative
CONFIG -= app_bundle
+
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro b/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro
index 6f9c98c..3d39aa8 100644
--- a/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro
+++ b/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro
@@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle
HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativemousearea.cpp ../shared/testhttpserver.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
index ff3bf45..5a10372 100644
--- a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
+++ b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
@@ -46,6 +46,11 @@
#include <QtDeclarative/qdeclarativeview.h>
#include <QtDeclarative/qdeclarativecontext.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_QDeclarativeMouseArea: public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro b/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro
index 31172a9..f9ca90f 100644
--- a/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro
+++ b/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeparticles.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeparticles/tst_qdeclarativeparticles.cpp b/tests/auto/declarative/qdeclarativeparticles/tst_qdeclarativeparticles.cpp
index 093190c..caf69fc 100644
--- a/tests/auto/declarative/qdeclarativeparticles/tst_qdeclarativeparticles.cpp
+++ b/tests/auto/declarative/qdeclarativeparticles/tst_qdeclarativeparticles.cpp
@@ -43,6 +43,11 @@
#include <qdeclarativeview.h>
#include <QGraphicsObject>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_QDeclarativeParticles : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro b/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro
index 6bef61c..04fd26b 100644
--- a/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro
+++ b/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativepathview.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
index dffc7ac..bf1e13a 100644
--- a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
+++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
@@ -57,6 +57,11 @@
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_QDeclarativePathView : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro b/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro
index 99a94bc..3130364 100644
--- a/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro
+++ b/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro
@@ -10,9 +10,8 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += ../shared/testhttpserver.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp b/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
index 0cc13ad..f1018b2 100644
--- a/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
+++ b/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
@@ -49,6 +49,11 @@
// These don't let normal people run tests!
//#include "../network-settings.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativepixmapcache : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro b/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro
index 2c5b473..5dc7bb8 100644
--- a/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro
+++ b/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro
@@ -3,11 +3,9 @@ contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_qdeclarativepositioners.cpp
macx:CONFIG -= app_bundle
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
index e639014..62ec707 100644
--- a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
+++ b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
@@ -48,6 +48,11 @@
#include <qdeclarativeexpression.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_QDeclarativePositioners : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro
index f37d952..4121a33 100644
--- a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro
+++ b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro
@@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeproperty.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp b/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp
index 53614fe..0ca0e03 100644
--- a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp
+++ b/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp
@@ -48,6 +48,11 @@
#include <QtCore/qfileinfo.h>
#include <QtCore/qdir.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
inline QUrl TEST_FILE(const QString &filename)
{
QFileInfo fileInfo(__FILE__);
diff --git a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro
index b381a9b..6af6500 100644
--- a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro
+++ b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro
@@ -4,9 +4,8 @@ SOURCES += tst_qdeclarativeqt.cpp
macx:CONFIG -= app_bundle
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
index 5095be8..06561fa 100644
--- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
+++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
@@ -51,6 +51,11 @@
#include <QCryptographicHash>
#include <QDeclarativeItem>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativeqt : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml b/tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml
index c8b863c..7f2f85a 100644
--- a/tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml
+++ b/tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml
@@ -9,12 +9,13 @@ Rectangle {
Item {
objectName: "myDelegate"
height: 20
+ width: 240
Text {
- y: index*20
+ objectName: "myName"
text: name
}
Text {
- y: index*20
+ objectName: "myNumber"
x: 100
text: number
}
diff --git a/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro b/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro
index 51667af..f3ff9ed 100644
--- a/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro
+++ b/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativerepeater.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
index e6b2fdd..7299a43 100644
--- a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
+++ b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
@@ -45,9 +45,15 @@
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativeview.h>
#include <QtDeclarative/qdeclarativecontext.h>
+#include <QtDeclarative/qdeclarativeexpression.h>
#include <private/qdeclarativerepeater_p.h>
#include <private/qdeclarativetext_p.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
inline QUrl TEST_FILE(const QString &filename)
{
return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename);
@@ -70,6 +76,8 @@ private slots:
private:
QDeclarativeView *createView();
template<typename T>
+ T *findItem(QGraphicsObject *parent, const QString &objectName, int index);
+ template<typename T>
T *findItem(QGraphicsObject *parent, const QString &id);
};
@@ -307,6 +315,20 @@ void tst_QDeclarativeRepeater::dataModel()
testModel.removeItem(2);
QCOMPARE(container->childItems().count(), 4);
+ // Check that model changes are propagated
+ QDeclarativeText *text = findItem<QDeclarativeText>(canvas->rootObject(), "myName", 1);
+ QVERIFY(text);
+ QCOMPARE(text->text(), QString("two"));
+
+ testModel.modifyItem(1, "Item two", "_2");
+ text = findItem<QDeclarativeText>(canvas->rootObject(), "myName", 1);
+ QVERIFY(text);
+ QCOMPARE(text->text(), QString("Item two"));
+
+ text = findItem<QDeclarativeText>(canvas->rootObject(), "myNumber", 1);
+ QVERIFY(text);
+ QCOMPARE(text->text(), QString("_2"));
+
delete testObject;
delete canvas;
}
@@ -382,6 +404,33 @@ QDeclarativeView *tst_QDeclarativeRepeater::createView()
}
template<typename T>
+T *tst_QDeclarativeRepeater::findItem(QGraphicsObject *parent, const QString &objectName, int index)
+{
+ const QMetaObject &mo = T::staticMetaObject;
+ //qDebug() << parent->childItems().count() << "children";
+ for (int i = 0; i < parent->childItems().count(); ++i) {
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(parent->childItems().at(i));
+ if(!item)
+ continue;
+ //qDebug() << "try" << item;
+ if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) {
+ if (index != -1) {
+ QDeclarativeExpression e(qmlContext(item), item, "index");
+ if (e.evaluate().toInt() == index)
+ return static_cast<T*>(item);
+ } else {
+ return static_cast<T*>(item);
+ }
+ }
+ item = findItem<T>(item, objectName, index);
+ if (item)
+ return static_cast<T*>(item);
+ }
+
+ return 0;
+}
+
+template<typename T>
T *tst_QDeclarativeRepeater::findItem(QGraphicsObject *parent, const QString &objectName)
{
const QMetaObject &mo = T::staticMetaObject;
diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro b/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro
index 6b98f1e..872aeb9 100644
--- a/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro
+++ b/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativesmoothedanimation.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp b/tests/auto/declarative/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp
index 7cf318a..d9164f6 100644
--- a/tests/auto/declarative/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp
+++ b/tests/auto/declarative/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp
@@ -46,6 +46,11 @@
#include <private/qdeclarativevaluetype_p.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativesmoothedanimation : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro b/tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro
index eb7d793..dff4922 100644
--- a/tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro
+++ b/tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativesmoothedfollow.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativesmoothedfollow/tst_qdeclarativesmoothedfollow.cpp b/tests/auto/declarative/qdeclarativesmoothedfollow/tst_qdeclarativesmoothedfollow.cpp
index ac750d9..b9ac23f 100644
--- a/tests/auto/declarative/qdeclarativesmoothedfollow/tst_qdeclarativesmoothedfollow.cpp
+++ b/tests/auto/declarative/qdeclarativesmoothedfollow/tst_qdeclarativesmoothedfollow.cpp
@@ -48,6 +48,11 @@
#include <private/qdeclarativevaluetype_p.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativesmoothedfollow : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro b/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro
index 6ed8924..1c17ba0 100644
--- a/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro
+++ b/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativespringfollow.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp b/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp
index 8a07d6b..e0e2892 100644
--- a/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp
+++ b/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp
@@ -45,6 +45,11 @@
#include <private/qdeclarativevaluetype_p.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativespringfollow : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro b/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro
index 9cdb884..1462c9a 100644
--- a/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro
+++ b/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro
@@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativesqldatabase.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp b/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp
index 7486a4b..f92d7e8 100644
--- a/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp
+++ b/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp
@@ -53,6 +53,11 @@
#include <QtCore/qdir.h>
#include <QtCore/qfile.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativesqldatabase : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml b/tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml
new file mode 100644
index 0000000..e17823b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml
@@ -0,0 +1,20 @@
+import Qt.test 1.0
+import Qt 4.7
+
+Item {
+ id: item
+ width: 100; height: 100
+ MyRectangle.foo: 0
+
+ states: State {
+ name: "foo1"
+ PropertyChanges {
+ target: item
+ MyRectangle.foo: 1
+ width: 50
+ }
+ }
+
+ Component.onCompleted: item.state = "foo1"
+}
+
diff --git a/tests/auto/declarative/qdeclarativestates/data/returnToBase.qml b/tests/auto/declarative/qdeclarativestates/data/returnToBase.qml
new file mode 100644
index 0000000..e342331
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/returnToBase.qml
@@ -0,0 +1,21 @@
+import Qt 4.7
+
+Rectangle {
+ id: theRect
+ property bool triggerState: false
+ property string stateString: ""
+ states: [ State {
+ when: triggerState
+ PropertyChanges {
+ target: theRect
+ stateString: "inState"
+ }
+ },
+ State {
+ name: ""
+ PropertyChanges {
+ target: theRect
+ stateString: "originalState"
+ }
+ }]
+}
diff --git a/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro b/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
index 6f4ecb3..2bae041 100644
--- a/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
+++ b/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativestates.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
index ea074a4..2913ddd 100644
--- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
+++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
@@ -49,6 +49,24 @@
#include <private/qdeclarativestategroup_p.h>
#include <private/qdeclarativeitem_p.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
+class MyAttached : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int foo READ foo WRITE setFoo)
+public:
+ MyAttached(QObject *parent) : QObject(parent), m_foo(13) {}
+
+ int foo() const { return m_foo; }
+ void setFoo(int f) { m_foo = f; }
+
+private:
+ int m_foo;
+};
class MyRect : public QDeclarativeRectangle
{
@@ -61,6 +79,10 @@ public:
int propertyWithNotify() const { return m_prop; }
void setPropertyWithNotify(int i) { m_prop = i; emit oddlyNamedNotifySignal(); }
+
+ static MyAttached *qmlAttachedProperties(QObject *o) {
+ return new MyAttached(o);
+ }
Q_SIGNALS:
void didSomething();
void oddlyNamedNotifySignal();
@@ -69,6 +91,8 @@ private:
int m_prop;
};
+QML_DECLARE_TYPE(MyRect)
+QML_DECLARE_TYPEINFO(MyRect, QML_HAS_ATTACHED_PROPERTIES)
class tst_qdeclarativestates : public QObject
{
@@ -83,6 +107,7 @@ private slots:
void initTestCase();
void basicChanges();
+ void attachedPropertyChanges();
void basicExtension();
void basicBinding();
void signalOverride();
@@ -112,6 +137,7 @@ private slots:
void whenOrdering();
void urlResolution();
void unnamedWhen();
+ void returnToBase();
};
void tst_qdeclarativestates::initTestCase()
@@ -219,6 +245,28 @@ void tst_qdeclarativestates::basicChanges()
}
}
+void tst_qdeclarativestates::attachedPropertyChanges()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent component(&engine, SRCDIR "/data/attachedPropertyChanges.qml");
+ QVERIFY(component.isReady());
+
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item != 0);
+ QCOMPARE(item->width(), 50.0);
+
+ // Ensure attached property has been changed
+ QObject *attObj = qmlAttachedPropertiesObject<MyRect>(item, false);
+ QVERIFY(attObj);
+
+ MyAttached *att = qobject_cast<MyAttached*>(attObj);
+ QVERIFY(att);
+
+ QEXPECT_FAIL("", "QTBUG-11283", Abort);
+ QCOMPARE(att->foo(), 1);
+}
+
void tst_qdeclarativestates::basicExtension()
{
QDeclarativeEngine engine;
@@ -1085,6 +1133,26 @@ void tst_qdeclarativestates::unnamedWhen()
QCOMPARE(rect->property("stateString").toString(), QLatin1String(""));
}
+void tst_qdeclarativestates::returnToBase()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent c(&engine, SRCDIR "/data/returnToBase.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect != 0);
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+
+ QCOMPARE(rectPrivate->state(), QLatin1String(""));
+ QCOMPARE(rect->property("stateString").toString(), QLatin1String(""));
+ rect->setProperty("triggerState", true);
+ QCOMPARE(rectPrivate->state(), QLatin1String("anonymousState1"));
+ QCOMPARE(rect->property("stateString").toString(), QLatin1String("inState"));
+ rect->setProperty("triggerState", false);
+ QCOMPARE(rectPrivate->state(), QLatin1String(""));
+ QCOMPARE(rect->property("stateString").toString(), QLatin1String("originalState"));
+}
+
+
QTEST_MAIN(tst_qdeclarativestates)
#include "tst_qdeclarativestates.moc"
diff --git a/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro b/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro
index 786bc1b..0062688 100644
--- a/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro
+++ b/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro
@@ -4,10 +4,7 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativesystempalette.cpp
-# Define SRCDIR equal to test's source directory
-symbian: {
- DEFINES += SRCDIR=\".\"
-} else {
+!symbian: {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp b/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp
index 7927d97..dd1fd7a 100644
--- a/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp
+++ b/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp
@@ -47,6 +47,11 @@
#include <qpalette.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativesystempalette : public QObject
{
diff --git a/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro b/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro
index 51c7f43..c1a36fd 100644
--- a/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro
+++ b/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro
@@ -10,9 +10,8 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += ../shared/testhttpserver.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
index 551e17b..01120b1 100644
--- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
+++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
@@ -51,6 +51,11 @@
#include "../../../shared/util.h"
#include "testhttpserver.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativetext : public QObject
{
diff --git a/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro b/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro
index 2adb2b8..4b6bd49 100644
--- a/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro
+++ b/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro
@@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativetextedit.cpp ../shared/testhttpserver.cpp
HEADERS += ../shared/testhttpserver.h
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
index fbab30e..f7ba7a1 100644
--- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
+++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
@@ -56,6 +56,11 @@
#include <QStyle>
#include <QInputContext>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativetextedit : public QObject
{
@@ -862,6 +867,7 @@ void tst_qdeclarativetextedit::openInputPanelOnClick()
edit.setFocus(false);
edit.setFocus(true);
edit.setFocus(false);
+ QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, false);
QCOMPARE(ic.closeInputPanelReceived, false);
}
@@ -887,6 +893,7 @@ void tst_qdeclarativetextedit::openInputPanelOnFocus()
QDeclarativeTextEditPrivate *editPrivate = static_cast<QDeclarativeTextEditPrivate*>(pri);
editPrivate->showInputPanelOnFocus = true;
+ // test default values
QVERIFY(edit.focusOnPress());
QCOMPARE(ic.openInputPanelReceived, false);
QCOMPARE(ic.closeInputPanelReceived, false);
@@ -896,76 +903,94 @@ void tst_qdeclarativetextedit::openInputPanelOnFocus()
QApplication::processEvents();
QVERIFY(edit.hasFocus());
QCOMPARE(ic.openInputPanelReceived, true);
- QCOMPARE(ic.closeInputPanelReceived, false);
ic.openInputPanelReceived = false;
// no events on release
QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos()));
QCOMPARE(ic.openInputPanelReceived, false);
- QCOMPARE(ic.closeInputPanelReceived, false);
ic.openInputPanelReceived = false;
- // Even with focus already gained, user needs
- // to be able to open panel by pressing on the editor
+ // if already focused, input panel can be opened on press
+ QVERIFY(edit.hasFocus());
QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos()));
QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, true);
- QCOMPARE(ic.closeInputPanelReceived, false);
ic.openInputPanelReceived = false;
- // input panel closed on focus lost
- edit.setFocus(false);
+ // input method should stay enabled if focus
+ // is lost to an item that also accepts inputs
+ QDeclarativeTextEdit anotherEdit;
+ scene.addItem(&anotherEdit);
+ anotherEdit.setFocus(true);
+ QApplication::processEvents();
+ QCOMPARE(ic.openInputPanelReceived, true);
+ ic.openInputPanelReceived = false;
+ QCOMPARE(view.inputContext(), &ic);
+ QVERIFY(view.testAttribute(Qt::WA_InputMethodEnabled));
+
+ // input method should be disabled if focus
+ // is lost to an item that doesn't accept inputs
+ QDeclarativeItem item;
+ scene.addItem(&item);
+ item.setFocus(true);
QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, false);
- QCOMPARE(ic.closeInputPanelReceived, true);
- ic.closeInputPanelReceived = false;
+ QVERIFY(view.inputContext() == 0);
+ QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled));
- // no automatic input panel events if focusOnPress is false
+ // no automatic input panel events should
+ // be sent if focusOnPress is false
+ edit.setFocusOnPress(false);
+ QCOMPARE(focusOnPressSpy.count(),1);
edit.setFocusOnPress(false);
QCOMPARE(focusOnPressSpy.count(),1);
- QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos()));
- QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos()));
edit.setFocus(false);
edit.setFocus(true);
+ QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos()));
+ QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos()));
+ QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, false);
QCOMPARE(ic.closeInputPanelReceived, false);
- edit.setFocusOnPress(false);
- QCOMPARE(focusOnPressSpy.count(),1);
-
- // one show input panel event when openSoftwareInputPanel is called
+ // one show input panel event should
+ // be set when openSoftwareInputPanel is called
edit.openSoftwareInputPanel();
QCOMPARE(ic.openInputPanelReceived, true);
QCOMPARE(ic.closeInputPanelReceived, false);
ic.openInputPanelReceived = false;
- // one close input panel event when closeSoftwareInputPanel is called
+ // one close input panel event should
+ // be sent when closeSoftwareInputPanel is called
edit.closeSoftwareInputPanel();
QCOMPARE(ic.openInputPanelReceived, false);
QCOMPARE(ic.closeInputPanelReceived, true);
- ic.openInputPanelReceived = false;
+ ic.closeInputPanelReceived = false;
// set focusOnPress back to true
edit.setFocusOnPress(true);
QCOMPARE(focusOnPressSpy.count(),2);
- edit.setFocus(false);
- QCOMPARE(ic.openInputPanelReceived, false);
- QCOMPARE(ic.closeInputPanelReceived, true);
- ic.closeInputPanelReceived = false;
-
edit.setFocusOnPress(true);
QCOMPARE(focusOnPressSpy.count(),2);
-
- // active window focus reason should not cause input panel to open
- QGraphicsObject * editObject = qobject_cast<QGraphicsObject*>(&edit);
- editObject->setFocus(Qt::ActiveWindowFocusReason);
+ edit.setFocus(false);
+ QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, false);
QCOMPARE(ic.closeInputPanelReceived, false);
+ ic.closeInputPanelReceived = false;
- // and input panel should not open if focus has already been set
+ // input panel should not re-open
+ // if focus has already been set
+ edit.setFocus(true);
+ QCOMPARE(ic.openInputPanelReceived, true);
+ ic.openInputPanelReceived = false;
edit.setFocus(true);
QCOMPARE(ic.openInputPanelReceived, false);
- QCOMPARE(ic.closeInputPanelReceived, false);
+
+ // input method should be disabled
+ // if TextEdit loses focus
+ edit.setFocus(false);
+ QApplication::processEvents();
+ QVERIFY(view.inputContext() == 0);
+ QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled));
}
void tst_qdeclarativetextedit::geometrySignals()
diff --git a/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro b/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro
index 2953567..8f42448 100644
--- a/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro
+++ b/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativetextinput.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index 3cb4da0..a55b42e 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -50,6 +50,11 @@
#include <QStyle>
#include <QInputContext>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativetextinput : public QObject
{
@@ -391,7 +396,6 @@ void tst_qdeclarativetextinput::positionAt()
#endif
// Check without autoscroll...
- QEXPECT_FAIL("", "QTBUG-11127", Abort);
textinputObject->setAutoScroll(false);
pos = textinputObject->positionAt(textinputObject->width()/2);
diff = abs(fm.width(textinputObject->text().left(pos))-textinputObject->width()/2);
@@ -833,6 +837,7 @@ void tst_qdeclarativetextinput::openInputPanelOnFocus()
QDeclarativeTextInputPrivate *inputPrivate = static_cast<QDeclarativeTextInputPrivate*>(pri);
inputPrivate->showInputPanelOnFocus = true;
+ // test default values
QVERIFY(input.focusOnPress());
QCOMPARE(ic.openInputPanelReceived, false);
QCOMPARE(ic.closeInputPanelReceived, false);
@@ -842,76 +847,94 @@ void tst_qdeclarativetextinput::openInputPanelOnFocus()
QApplication::processEvents();
QVERIFY(input.hasFocus());
QCOMPARE(ic.openInputPanelReceived, true);
- QCOMPARE(ic.closeInputPanelReceived, false);
ic.openInputPanelReceived = false;
// no events on release
QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos()));
QCOMPARE(ic.openInputPanelReceived, false);
- QCOMPARE(ic.closeInputPanelReceived, false);
ic.openInputPanelReceived = false;
- // Even with focus already gained, user needs
- // to be able to open panel by pressing on the editor
+ // if already focused, input panel can be opened on press
+ QVERIFY(input.hasFocus());
QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos()));
QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, true);
- QCOMPARE(ic.closeInputPanelReceived, false);
ic.openInputPanelReceived = false;
- // input panel closed on focus lost
- input.setFocus(false);
+ // input method should stay enabled if focus
+ // is lost to an item that also accepts inputs
+ QDeclarativeTextInput anotherInput;
+ scene.addItem(&anotherInput);
+ anotherInput.setFocus(true);
+ QApplication::processEvents();
+ QCOMPARE(ic.openInputPanelReceived, true);
+ ic.openInputPanelReceived = false;
+ QCOMPARE(view.inputContext(), &ic);
+ QVERIFY(view.testAttribute(Qt::WA_InputMethodEnabled));
+
+ // input method should be disabled if focus
+ // is lost to an item that doesn't accept inputs
+ QDeclarativeItem item;
+ scene.addItem(&item);
+ item.setFocus(true);
QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, false);
- QCOMPARE(ic.closeInputPanelReceived, true);
- ic.closeInputPanelReceived = false;
+ QVERIFY(view.inputContext() == 0);
+ QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled));
- // no automatic input panel events if focusOnPress is false
+ // no automatic input panel events should
+ // be sent if focusOnPress is false
+ input.setFocusOnPress(false);
+ QCOMPARE(focusOnPressSpy.count(),1);
input.setFocusOnPress(false);
QCOMPARE(focusOnPressSpy.count(),1);
- QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos()));
- QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos()));
input.setFocus(false);
input.setFocus(true);
+ QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos()));
+ QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos()));
+ QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, false);
QCOMPARE(ic.closeInputPanelReceived, false);
- input.setFocusOnPress(false);
- QCOMPARE(focusOnPressSpy.count(),1);
-
- // one show input panel event when openSoftwareInputPanel is called
+ // one show input panel event should
+ // be set when openSoftwareInputPanel is called
input.openSoftwareInputPanel();
QCOMPARE(ic.openInputPanelReceived, true);
QCOMPARE(ic.closeInputPanelReceived, false);
ic.openInputPanelReceived = false;
- // one close input panel event when closeSoftwareInputPanel is called
+ // one close input panel event should
+ // be sent when closeSoftwareInputPanel is called
input.closeSoftwareInputPanel();
QCOMPARE(ic.openInputPanelReceived, false);
QCOMPARE(ic.closeInputPanelReceived, true);
- ic.openInputPanelReceived = false;
+ ic.closeInputPanelReceived = false;
// set focusOnPress back to true
input.setFocusOnPress(true);
QCOMPARE(focusOnPressSpy.count(),2);
- input.setFocus(false);
- QCOMPARE(ic.openInputPanelReceived, false);
- QCOMPARE(ic.closeInputPanelReceived, true);
- ic.closeInputPanelReceived = false;
-
input.setFocusOnPress(true);
QCOMPARE(focusOnPressSpy.count(),2);
-
- // active window focus reason should not cause input panel to open
- QGraphicsObject * inputObject = qobject_cast<QGraphicsObject*>(&input);
- inputObject->setFocus(Qt::ActiveWindowFocusReason);
+ input.setFocus(false);
+ QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, false);
QCOMPARE(ic.closeInputPanelReceived, false);
+ ic.closeInputPanelReceived = false;
- // and input panel should not open if focus has already been set
+ // input panel should not re-open
+ // if focus has already been set
+ input.setFocus(true);
+ QCOMPARE(ic.openInputPanelReceived, true);
+ ic.openInputPanelReceived = false;
input.setFocus(true);
QCOMPARE(ic.openInputPanelReceived, false);
- QCOMPARE(ic.closeInputPanelReceived, false);
+
+ // input method should be disabled
+ // if TextEdit loses focus
+ input.setFocus(false);
+ QApplication::processEvents();
+ QVERIFY(view.inputContext() == 0);
+ QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled));
}
class MyTextInput : public QDeclarativeTextInput
diff --git a/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro b/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro
index d95165c..398139a 100644
--- a/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro
+++ b/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro
@@ -4,9 +4,7 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativetimer.cpp
-symbian: {
- DEFINES += SRCDIR=\".\"
-} else {
+!symbian: {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp b/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp
index da2d173..f49cbd0 100644
--- a/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp
+++ b/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp
@@ -46,6 +46,11 @@
#include <QtDeclarative/qdeclarativeitem.h>
#include <QDebug>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativetimer : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro b/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro
index 02c480c..90e46d3 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro
+++ b/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro
@@ -8,9 +8,8 @@ SOURCES += tst_qdeclarativevaluetypes.cpp \
testtypes.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp
index 53fd68c..81334f2 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp
+++ b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp
@@ -46,6 +46,15 @@
#include <private/qdeclarativevaluetype_p.h>
#include "testtypes.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
+QT_BEGIN_NAMESPACE
+extern int qt_defaultDpi();
+QT_END_NAMESPACE
+
class tst_qdeclarativevaluetypes : public QObject
{
Q_OBJECT
@@ -464,7 +473,7 @@ void tst_qdeclarativevaluetypes::font()
QCOMPARE(object->property("f_overline").toBool(), object->font().overline());
QCOMPARE(object->property("f_strikeout").toBool(), object->font().strikeOut());
QCOMPARE(object->property("f_pointSize").toDouble(), object->font().pointSizeF());
- QCOMPARE(object->property("f_pixelSize").toInt(), object->font().pixelSize());
+ QCOMPARE(object->property("f_pixelSize").toInt(), int((object->font().pointSizeF() * qt_defaultDpi()) / qreal(72.)));
QCOMPARE(object->property("f_capitalization").toInt(), (int)object->font().capitalization());
QCOMPARE(object->property("f_letterSpacing").toDouble(), object->font().letterSpacing());
QCOMPARE(object->property("f_wordSpacing").toDouble(), object->font().wordSpacing());
diff --git a/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro b/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro
index ad54713..21a9195 100644
--- a/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro
+++ b/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro
@@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeview.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
index b183105..6450e38 100644
--- a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
+++ b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
@@ -47,6 +47,11 @@
#include <QtGui/qgraphicswidget.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_QDeclarativeView : public QObject
{
@@ -75,6 +80,7 @@ void tst_QDeclarativeView::resizemodedeclarativeitem()
QVERIFY(canvas);
QSignalSpy sceneResizedSpy(canvas, SIGNAL(sceneResized(QSize)));
canvas->setResizeMode(QDeclarativeView::SizeRootObjectToView);
+ QCOMPARE(QSize(0,0), canvas->initialSize());
canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/resizemodedeclarativeitem.qml"));
QDeclarativeItem* declarativeItem = qobject_cast<QDeclarativeItem*>(canvas->rootObject());
QVERIFY(declarativeItem);
@@ -85,6 +91,7 @@ void tst_QDeclarativeView::resizemodedeclarativeitem()
QCOMPARE(declarativeItem->height(), 200.0);
QCOMPARE(canvas->size(), QSize(200, 200));
QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(canvas->size(), canvas->initialSize());
QCOMPARE(sceneResizedSpy.count(), 1);
// size update from view
@@ -130,6 +137,7 @@ void tst_QDeclarativeView::resizemodedeclarativeitem()
QCOMPARE(declarativeItem->width(), 200.0);
QCOMPARE(declarativeItem->height(), 200.0);
QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(canvas->size(), canvas->initialSize());
QCOMPARE(sceneResizedSpy2.count(), 1);
// size update from root object
@@ -179,6 +187,7 @@ void tst_QDeclarativeView::resizemodegraphicswidget()
QCOMPARE(canvas->size(), QSize(200, 200));
QCOMPARE(canvas->size(), QSize(200, 200));
QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(canvas->size(), canvas->initialSize());
QCOMPARE(sceneResizedSpy.count(), 1);
// size update from view
@@ -218,6 +227,7 @@ void tst_QDeclarativeView::resizemodegraphicswidget()
QCOMPARE(graphicsWidget->size(), QSizeF(200.0, 200.0));
QCOMPARE(canvas->size(), QSize(200, 200));
QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(canvas->size(), canvas->initialSize());
QCOMPARE(sceneResizedSpy2.count(), 1);
// size update from root object
diff --git a/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml b/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml
index be911a3..57db82d 100644
--- a/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml
+++ b/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml
@@ -1,18 +1,18 @@
import Qt 4.7
Rectangle {
color: "black"
- width: (runtime.orientation == Orientation.RightUp || runtime.orientation == Orientation.LeftUp) ? 300 : 200
- height: (runtime.orientation == Orientation.RightUp || runtime.orientation == Orientation.LeftUp) ? 200 : 300
+ width: (runtime.orientation == Orientation.Landscape || runtime.orientation == Orientation.LandscapeInverted) ? 300 : 200
+ height: (runtime.orientation == Orientation.Landscape || runtime.orientation == Orientation.LandscapeInverted) ? 200 : 300
Text {
text: {
- if (runtime.orientation == Orientation.TopUp)
- return "TopUp"
- if (runtime.orientation == Orientation.TopDown)
- return "TopDown"
- if (runtime.orientation == Orientation.LeftUp)
- return "LeftUp"
- if (runtime.orientation == Orientation.RightUp)
- return "RightUp"
+ if (runtime.orientation == Orientation.Portrait)
+ return "Portrait"
+ if (runtime.orientation == Orientation.PortraitInverted)
+ return "PortraitInverted"
+ if (runtime.orientation == Orientation.Landscape)
+ return "Landscape"
+ if (runtime.orientation == Orientation.LandscapeInverted)
+ return "LandscapeInverted"
}
color: "white"
}
diff --git a/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro b/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro
index 9bb6161..6189916 100644
--- a/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro
+++ b/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro
@@ -7,9 +7,8 @@ include(../../../../tools/qml/qml.pri)
SOURCES += tst_qdeclarativeviewer.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
index f296d9e..f30f758 100644
--- a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
+++ b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
@@ -43,7 +43,14 @@
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativeview.h>
#include <QtDeclarative/qdeclarativeitem.h>
+#include "../../../shared/util.h"
#include "qmlruntime.h"
+#include "../../../shared/util.h"
+
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
class tst_QDeclarativeViewer : public QObject
@@ -54,6 +61,11 @@ public:
private slots:
void orientation();
+ void loading();
+ void fileBrowser();
+ void resizing();
+ void paths();
+ void slowMode();
private:
QDeclarativeEngine engine;
@@ -75,9 +87,13 @@ void tst_QDeclarativeViewer::orientation()
QVERIFY(rootItem);
window.show();
+ QApplication::setActiveWindow(&window);
+ QTest::qWaitForWindowShown(&window);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&window));
+
QCOMPARE(rootItem->width(), 200.0);
QCOMPARE(rootItem->height(), 300.0);
- QCOMPARE(viewer->view()->size(), QSize(200, 300));
+ QTRY_COMPARE(viewer->view()->size(), QSize(200, 300));
QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300));
QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height()));
QCOMPARE(viewer->size(), viewer->sizeHint());
@@ -87,7 +103,7 @@ void tst_QDeclarativeViewer::orientation()
QCOMPARE(rootItem->width(), 300.0);
QCOMPARE(rootItem->height(), 200.0);
- QCOMPARE(viewer->view()->size(), QSize(300, 200));
+ QTRY_COMPARE(viewer->view()->size(), QSize(300, 200));
QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(300, 200));
QCOMPARE(viewer->size(), QSize(300, 200+viewer->menuBar()->height()));
QCOMPARE(viewer->size(), viewer->sizeHint());
@@ -97,10 +113,202 @@ void tst_QDeclarativeViewer::orientation()
QCOMPARE(rootItem->width(), 200.0);
QCOMPARE(rootItem->height(), 300.0);
+ QTRY_COMPARE(viewer->view()->size(), QSize(200, 300));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300));
+ QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height()));
+ QCOMPARE(viewer->size(), viewer->sizeHint());
+}
+
+void tst_QDeclarativeViewer::loading()
+{
+ QDeclarativeViewer *viewer = new QDeclarativeViewer();
+ QVERIFY(viewer);
+ viewer->setSizeToView(true);
+ viewer->open(SRCDIR "/data/orientation.qml");
+ QVERIFY(viewer->view());
+ QVERIFY(viewer->menuBar());
+ QDeclarativeItem* rootItem = qobject_cast<QDeclarativeItem*>(viewer->view()->rootObject());
+ QVERIFY(rootItem);
+ viewer->show();
+
+ QApplication::setActiveWindow(viewer);
+ QTest::qWaitForWindowShown(viewer);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(viewer));
+
+ // initial size
+ QTRY_COMPARE(rootItem->width(), 200.0);
+ QTRY_COMPARE(rootItem->height(), 300.0);
QCOMPARE(viewer->view()->size(), QSize(200, 300));
QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300));
QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height()));
QCOMPARE(viewer->size(), viewer->sizeHint());
+
+ viewer->resize(QSize(400, 500));
+ qApp->processEvents();
+
+ // window resized
+ QTRY_COMPARE(rootItem->width(), 400.0);
+ QTRY_COMPARE(rootItem->height(), 500.0-viewer->menuBar()->height());
+ QCOMPARE(viewer->view()->size(), QSize(400, 500-viewer->menuBar()->height()));
+ QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(400, 500-viewer->menuBar()->height()));
+ QCOMPARE(viewer->size(), QSize(400, 500));
+ QCOMPARE(viewer->size(), viewer->sizeHint());
+
+ viewer->reload();
+ rootItem = qobject_cast<QDeclarativeItem*>(viewer->view()->rootObject());
+ QVERIFY(rootItem);
+
+ // reload cause the window to return back to initial size
+ QTRY_COMPARE(rootItem->width(), 200.0);
+ QTRY_COMPARE(rootItem->height(), 300.0);
+ QCOMPARE(viewer->view()->size(), QSize(200, 300));
+ QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300));
+ QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height()));
+ QCOMPARE(viewer->size(), viewer->sizeHint());
+
+ viewer->resize(QSize(400, 500));
+ qApp->processEvents();
+
+ // window resized again
+ QTRY_COMPARE(rootItem->width(), 400.0);
+ QTRY_COMPARE(rootItem->height(), 500.0-viewer->menuBar()->height());
+ QCOMPARE(viewer->view()->size(), QSize(400, 500-viewer->menuBar()->height()));
+ QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(400, 500-viewer->menuBar()->height()));
+ QCOMPARE(viewer->size(), QSize(400, 500));
+ QCOMPARE(viewer->size(), viewer->sizeHint());
+
+ viewer->open(SRCDIR "/data/orientation.qml");
+ rootItem = qobject_cast<QDeclarativeItem*>(viewer->view()->rootObject());
+ QVERIFY(rootItem);
+
+ // open also causes the window to return back to initial size
+ QTRY_COMPARE(rootItem->width(), 200.0);
+ QTRY_COMPARE(rootItem->height(), 300.0);
+ QCOMPARE(viewer->view()->size(), QSize(200, 300));
+ QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300));
+ QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height()));
+ QCOMPARE(viewer->size(), viewer->sizeHint());
+}
+
+void tst_QDeclarativeViewer::fileBrowser()
+{
+ QDeclarativeViewer *viewer = new QDeclarativeViewer();
+ QVERIFY(viewer);
+ viewer->setUseNativeFileBrowser(false);
+ viewer->openFile();
+ viewer->show();
+
+ QApplication::setActiveWindow(viewer);
+ QTest::qWaitForWindowShown(viewer);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(viewer));
+
+ // Browser.qml successfully loaded
+ QDeclarativeItem* browserItem = qobject_cast<QDeclarativeItem*>(viewer->view()->rootObject());
+ QVERIFY(viewer->view());
+ QVERIFY(viewer->menuBar());
+ QVERIFY(browserItem);
+
+ // load something
+ viewer->open(SRCDIR "/data/orientation.qml");
+ QVERIFY(viewer->view());
+ QVERIFY(viewer->menuBar());
+ QDeclarativeItem* rootItem = qobject_cast<QDeclarativeItem*>(viewer->view()->rootObject());
+ QVERIFY(rootItem);
+ QVERIFY(browserItem != rootItem);
+
+ // go back to Browser.qml
+ viewer->openFile();
+ browserItem = qobject_cast<QDeclarativeItem*>(viewer->view()->rootObject());
+ QVERIFY(viewer->view());
+ QVERIFY(viewer->menuBar());
+ QVERIFY(browserItem);
+}
+
+void tst_QDeclarativeViewer::resizing()
+{
+ QDeclarativeViewer *viewer = new QDeclarativeViewer();
+ QVERIFY(viewer);
+ viewer->open(SRCDIR "/data/orientation.qml");
+ QVERIFY(viewer->view());
+ QVERIFY(viewer->menuBar());
+ QDeclarativeItem* rootItem = qobject_cast<QDeclarativeItem*>(viewer->view()->rootObject());
+ QVERIFY(rootItem);
+ viewer->show();
+
+ QApplication::setActiveWindow(viewer);
+ QTest::qWaitForWindowShown(viewer);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(viewer));
+
+ // initial size
+ QCOMPARE(rootItem->width(), 200.0);
+ QCOMPARE(rootItem->height(), 300.0);
+ QCOMPARE(viewer->view()->size(), QSize(200, 300));
+ QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300));
+ QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height()));
+ QCOMPARE(viewer->size(), viewer->sizeHint());
+
+ viewer->setSizeToView(false);
+
+ // size view to root object
+ rootItem->setWidth(150);
+ rootItem->setHeight(200);
+ qApp->processEvents();
+
+ QCOMPARE(rootItem->width(), 150.0);
+ QCOMPARE(rootItem->height(), 200.0);
+ QCOMPARE(viewer->view()->size(), QSize(150, 200));
+ QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(150, 200));
+ QCOMPARE(viewer->size(), QSize(150, 200+viewer->menuBar()->height()));
+
+ // do not size root object to view
+ viewer->resize(QSize(180,250));
+ QCOMPARE(rootItem->width(), 150.0);
+ QCOMPARE(rootItem->height(), 200.0);
+
+ viewer->setSizeToView(true);
+
+ // size root object to view
+ viewer->resize(QSize(250,350));
+ qApp->processEvents();
+
+ QTRY_COMPARE(rootItem->width(), 250.0);
+ QTRY_COMPARE(rootItem->height(), 350.0-viewer->menuBar()->height());
+ QCOMPARE(viewer->view()->size(), QSize(250, 350-viewer->menuBar()->height()));
+ QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(250, 350-viewer->menuBar()->height()));
+ QCOMPARE(viewer->size(), QSize(250, 350));
+
+ // do not size view to root object
+ rootItem->setWidth(150);
+ rootItem->setHeight(200);
+ QTRY_COMPARE(viewer->size(), QSize(250, 350));
+}
+
+void tst_QDeclarativeViewer::paths()
+{
+ QDeclarativeViewer *viewer = new QDeclarativeViewer();
+ QVERIFY(viewer);
+
+ viewer->addLibraryPath("miscImportPath");
+ viewer->view()->engine()->importPathList().contains("miscImportPath");
+
+ viewer->addPluginPath("miscPluginPath");
+ viewer->view()->engine()->pluginPathList().contains("miscPluginPath");
+}
+
+void tst_QDeclarativeViewer::slowMode()
+{
+ QDeclarativeViewer *viewer = new QDeclarativeViewer();
+ QVERIFY(viewer);
+
+ viewer->setSlowMode(true);
+ viewer->setSlowMode(false);
}
QTEST_MAIN(tst_QDeclarativeViewer)
diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro b/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro
index c87171b..92e5f60 100644
--- a/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro
+++ b/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro
@@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativevisualdatamodel.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
index 8f3fb16..90c9c6f 100644
--- a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
+++ b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
@@ -52,6 +52,11 @@
#include <private/qdeclarativevaluetype_p.h>
#include <math.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
static void initStandardTreeModel(QStandardItemModel *model)
{
QStandardItem *item;
diff --git a/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro b/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro
index 8caa393..562a9fb 100644
--- a/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro
+++ b/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro
@@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativewebview.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp b/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp
index beabf86..f33e5a4 100644
--- a/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp
+++ b/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp
@@ -50,6 +50,11 @@
#include <QtCore/qfile.h>
#include <QtGui/qpainter.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativewebview : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/BaseWorker.qml b/tests/auto/declarative/qdeclarativeworkerscript/data/BaseWorker.qml
index d275ca8..e06afa2 100644
--- a/tests/auto/declarative/qdeclarativeworkerscript/data/BaseWorker.qml
+++ b/tests/auto/declarative/qdeclarativeworkerscript/data/BaseWorker.qml
@@ -13,7 +13,7 @@ WorkerScript {
function compareLiteralResponse(expected) {
var e = eval('(' + expected + ')')
- return worker.response == e
+ return JSON.stringify(worker.response) == JSON.stringify(e)
}
onMessage: {
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro
index 36b3449..2f8f23d 100644
--- a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro
+++ b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeworkerscript.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
index 7a4315a..8e98874 100644
--- a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
+++ b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
@@ -53,6 +53,11 @@
Q_DECLARE_METATYPE(QScriptValue)
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_QDeclarativeWorkerScript : public QObject
{
Q_OBJECT
@@ -165,13 +170,15 @@ void tst_QDeclarativeWorkerScript::messaging_sendJsObject()
QDeclarativeWorkerScript *worker = qobject_cast<QDeclarativeWorkerScript*>(component.create());
QVERIFY(worker != 0);
- QString jsObject = "{'name': 'zyz', 'spell power': 3101, 'haste': 1125}";
+ // Properties are in alphabetical order to enable string-based comparison after
+ // QVariant roundtrip, since the properties will be stored in a QVariantMap.
+ QString jsObject = "{'haste': 1125, 'name': 'zyz', 'spell power': 3101}";
QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(qmlEngine(worker));
QScriptValue sv = engine->newObject();
+ sv.setProperty("haste", 1125);
sv.setProperty("name", "zyz");
sv.setProperty("spell power", 3101);
- sv.setProperty("haste", 1125);
QVERIFY(QMetaObject::invokeMethod(worker, "testSend", Q_ARG(QVariant, qVariantFromValue(sv))));
waitForEchoMessage(worker);
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro b/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro
index b54f670..619b239 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro
@@ -8,11 +8,9 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativexmlhttprequest.cpp \
../shared/testhttpserver.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp b/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp
index 1d26f2c..8141fcb 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp
@@ -48,6 +48,11 @@
#define SERVER_PORT 14445
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativexmlhttprequest : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro
index 7c006f1..472cffb 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro
@@ -9,9 +9,8 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativexmllistmodel.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
index 35790e4..bd19bd3 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
@@ -50,6 +50,11 @@
#include <private/qdeclarativexmllistmodel_p.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
typedef QPair<int, int> QDeclarativeXmlListRange;
typedef QList<QVariantList> QDeclarativeXmlModelData;
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml
index 69f57c6..e863262 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml
@@ -30,13 +30,14 @@ Item {
y: 5
//Below function implements all scrolling logic
onCursorPositionChanged: {
- if(cursorRect.x < leftMargin - textInp.x){//Cursor went off the front
- textInp.x = leftMargin - Math.max(0, cursorRect.x);
- }else if(cursorRect.x > parent.width - leftMargin - rightMargin - textInp.x){//Cusor went off the end
- textInp.x = leftMargin - Math.max(0, cursorRect.x - (parent.width - leftMargin - rightMargin));
+ if(cursorRectangle.x < leftMargin - textInp.x){//Cursor went off the front
+ textInp.x = leftMargin - Math.max(0, cursorRectangle.x);
+ }else if(cursorRectangle.x > parent.width - leftMargin - rightMargin - textInp.x){//Cusor went off the end
+ textInp.x = leftMargin - Math.max(0, cursorRectangle.x - (parent.width - leftMargin - rightMargin));
}
}
+ autoScroll: false //It is preferable to implement your own scrolling
text:""
horizontalAlignment: TextInput.AlignLeft
font.pixelSize:15
diff --git a/tests/auto/declarative/qmlvisual/qmlvisual.pro b/tests/auto/declarative/qmlvisual/qmlvisual.pro
index dca9b04..cb7e5d7 100644
--- a/tests/auto/declarative/qmlvisual/qmlvisual.pro
+++ b/tests/auto/declarative/qmlvisual/qmlvisual.pro
@@ -5,7 +5,7 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qmlvisual.cpp
symbian: {
- importFiles.path =
+ importFiles.path = .
importFiles.sources = animation \
fillmode \
focusscope \
@@ -28,8 +28,6 @@ symbian: {
selftest_noimages \
webview
DEPLOYMENT = importFiles
-
- DEFINES += QT_TEST_SOURCE_DIR=\".\"
} else {
DEFINES += QT_TEST_SOURCE_DIR=\"\\\"$$PWD\\\"\"
}
diff --git a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
index 71dc451..a2d3273 100644
--- a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
+++ b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
@@ -47,6 +47,11 @@
#include <QProcess>
#include <QFile>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define QT_TEST_SOURCE_DIR "."
+#endif
+
enum Mode { Record, RecordNoVisuals, RecordSnapshot, Play, TestVisuals, RemoveVisuals, UpdateVisuals, UpdatePlatformVisuals, Test };
static QString testdir;
diff --git a/tests/auto/gestures/tst_gestures.cpp b/tests/auto/gestures/tst_gestures.cpp
index 7c1170c..a968520 100644
--- a/tests/auto/gestures/tst_gestures.cpp
+++ b/tests/auto/gestures/tst_gestures.cpp
@@ -334,6 +334,7 @@ private slots:
void gestureOverChild();
void multipleWidgetOnlyGestureInTree();
void conflictingGestures();
+ void conflictingGesturesInGraphicsView();
void finishedWithoutStarted();
void unknownGesture();
void graphicsItemGesture();
@@ -2235,5 +2236,70 @@ void tst_Gestures::testReuseCanceledGestures()
QCOMPARE(target->canceled(), 1);
}
+void tst_Gestures::conflictingGesturesInGraphicsView()
+{
+ QGraphicsScene scene;
+ GraphicsView view(&scene);
+ view.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ GestureItem *item1 = new GestureItem("item1");
+ item1->grabGesture(CustomGesture::GestureType);
+ item1->size = QRectF(0, 0, 100, 100);
+ item1->setZValue(2);
+ scene.addItem(item1);
+
+ GestureItem *item2 = new GestureItem("item2");
+ item2->grabGesture(CustomGesture::GestureType);
+ item2->size = QRectF(0, 0, 100, 100);
+ item2->setZValue(5);
+ scene.addItem(item2);
+
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+ view.ensureVisible(scene.sceneRect());
+
+ static const int TotalGestureEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialStartedThreshold + 1;
+
+ CustomEvent event;
+
+ // nobody accepts override
+ item1->acceptGestureOverride = false;
+ item2->acceptGestureOverride = false;
+ event.hotSpot = mapToGlobal(item2->boundingRect().center(), item2, &view);
+ event.hasHotSpot = true;
+ sendCustomGesture(&event, item2, &scene);
+ QCOMPARE(item2->gestureOverrideEventsReceived, 1);
+ QCOMPARE(item2->gestureEventsReceived, TotalGestureEventsCount);
+ QCOMPARE(item1->gestureOverrideEventsReceived, 1);
+ QCOMPARE(item1->gestureEventsReceived, 0);
+
+ item1->reset(); item2->reset();
+
+ // the original target accepts override
+ item1->acceptGestureOverride = false;
+ item2->acceptGestureOverride = true;
+ event.hotSpot = mapToGlobal(item2->boundingRect().center(), item2, &view);
+ event.hasHotSpot = true;
+ sendCustomGesture(&event, item2, &scene);
+ QCOMPARE(item2->gestureOverrideEventsReceived, 1);
+ QCOMPARE(item2->gestureEventsReceived, TotalGestureEventsCount);
+ QCOMPARE(item1->gestureOverrideEventsReceived, 0);
+ QCOMPARE(item1->gestureEventsReceived, 0);
+
+ item1->reset(); item2->reset();
+
+ // the item behind accepts override
+ item1->acceptGestureOverride = true;
+ item2->acceptGestureOverride = false;
+ event.hotSpot = mapToGlobal(item2->boundingRect().center(), item2, &view);
+ event.hasHotSpot = true;
+ sendCustomGesture(&event, item2, &scene);
+
+ QCOMPARE(item2->gestureOverrideEventsReceived, 1);
+ QCOMPARE(item2->gestureEventsReceived, 0);
+ QCOMPARE(item1->gestureOverrideEventsReceived, 1);
+ QCOMPARE(item1->gestureEventsReceived, TotalGestureEventsCount);
+}
+
QTEST_MAIN(tst_Gestures)
#include "tst_gestures.moc"
diff --git a/tests/auto/mediaobject/dummy/dummy.pro b/tests/auto/mediaobject/dummy/dummy.pro
index cf1010e..88b864b 100644
--- a/tests/auto/mediaobject/dummy/dummy.pro
+++ b/tests/auto/mediaobject/dummy/dummy.pro
@@ -1,7 +1,7 @@
TEMPLATE = lib
isEmpty(QT_MAJOR_VERSION) {
- VERSION=4.6.3
+ VERSION=4.6.4
} else {
VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}
}
diff --git a/tests/auto/qapplication/tst_qapplication.cpp b/tests/auto/qapplication/tst_qapplication.cpp
index 43fbba1..1a38070 100644
--- a/tests/auto/qapplication/tst_qapplication.cpp
+++ b/tests/auto/qapplication/tst_qapplication.cpp
@@ -189,15 +189,22 @@ void tst_QApplication::getSetCheck()
{
int argc = 0;
QApplication obj1(argc, 0, QApplication::GuiServer);
- // QInputContext * QApplication::inputContext()
- // void QApplication::setInputContext(QInputContext *)
MyInputContext *var1 = new MyInputContext;
+
+ // QApplication takes ownership, so check for reparenting:
obj1.setInputContext(var1);
- QCOMPARE((QInputContext *)var1, obj1.inputContext());
+ QCOMPARE(var1->parent(), static_cast<QObject *>(&obj1));
+
+ // Test for self-assignment:
+ obj1.setInputContext(obj1.inputContext());
+ QVERIFY(obj1.inputContext());
+ QCOMPARE(static_cast<QInputContext *>(var1), obj1.inputContext());
+
+ // Resetting the input context to 0 is not allowed:
QTest::ignoreMessage(QtWarningMsg, "QApplication::setInputContext: called with 0 input context");
- obj1.setInputContext((QInputContext *)0);
- QCOMPARE((QInputContext *)var1, obj1.inputContext());
- // delete var1; // No delete, since QApplication takes ownership
+ obj1.setInputContext(0);
+
+ QCOMPARE(static_cast<QInputContext *>(var1), obj1.inputContext());
}
class CloseEventTestWindow : public QWidget
diff --git a/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp
index 558d4de..3125258 100644
--- a/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp
+++ b/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp
@@ -3148,8 +3148,8 @@ void tst_QDateTimeEdit::nextPrevSection()
EditorDateEdit edit;
edit.setDisplayFormat("hh/mm/bc9ss");
edit.setTime(QTime(12, 34, 56));
- edit.setSelectedSection(QDateTimeEdit::MinuteSection);
edit.show();
+ edit.setSelectedSection(QDateTimeEdit::MinuteSection);
QCOMPARE(edit.lineEdit()->selectedText(), QString("34")); // selftest
QTest::keyClick(&edit, key, modifiers);
QCOMPARE(edit.lineEdit()->selectedText(), selectedText);
diff --git a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
index 8127f84..b9a5c66 100644
--- a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
+++ b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
@@ -741,31 +741,73 @@ void tst_QGraphicsGridLayout::setColumnFixedWidth()
// public qreal columnSpacing(int column) const
void tst_QGraphicsGridLayout::columnSpacing()
{
- QGraphicsScene scene;
- QGraphicsView view(&scene);
- QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window);
- QGraphicsGridLayout *layout = new QGraphicsGridLayout();
- scene.addItem(widget);
- widget->setLayout(layout);
- populateLayout(layout, 3, 2);
- layout->setContentsMargins(0, 0, 0, 0);
- layout->setSpacing(0);
- QCOMPARE(layout->columnSpacing(0), 0.0);
+ {
+ QGraphicsScene scene;
+ QGraphicsView view(&scene);
+ QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window);
+ QGraphicsGridLayout *layout = new QGraphicsGridLayout();
+ scene.addItem(widget);
+ widget->setLayout(layout);
+ populateLayout(layout, 3, 2);
+ layout->setContentsMargins(0, 0, 0, 0);
+ layout->setSpacing(0);
+ QCOMPARE(layout->columnSpacing(0), 0.0);
+
+ layout->setColumnSpacing(0, 20);
+ view.show();
+ widget->show();
+ widget->resize(widget->effectiveSizeHint(Qt::PreferredSize));
+ QApplication::processEvents();
- layout->setColumnSpacing(0, 20);
- view.show();
- widget->show();
- widget->resize(widget->effectiveSizeHint(Qt::PreferredSize));
- QApplication::processEvents();
+ QCOMPARE(layout->itemAt(0,0)->geometry().left(), 0.0);
+ QCOMPARE(layout->itemAt(0,0)->geometry().right(), 25.0);
+ QCOMPARE(layout->itemAt(0,1)->geometry().left(), 45.0);
+ QCOMPARE(layout->itemAt(0,1)->geometry().right(), 70.0);
+ QCOMPARE(layout->itemAt(0,2)->geometry().left(), 70.0);
+ QCOMPARE(layout->itemAt(0,2)->geometry().right(), 95.0);
- QCOMPARE(layout->itemAt(0,0)->geometry().left(), 0.0);
- QCOMPARE(layout->itemAt(0,0)->geometry().right(), 25.0);
- QCOMPARE(layout->itemAt(0,1)->geometry().left(), 45.0);
- QCOMPARE(layout->itemAt(0,1)->geometry().right(), 70.0);
- QCOMPARE(layout->itemAt(0,2)->geometry().left(), 70.0);
- QCOMPARE(layout->itemAt(0,2)->geometry().right(), 95.0);
+ delete widget;
+ }
+
+ {
+ // don't include items and spacings that was previously part of the layout
+ // (horizontal)
+ QGraphicsGridLayout *layout = new QGraphicsGridLayout;
+ populateLayout(layout, 3, 1);
+ layout->setContentsMargins(0, 0, 0, 0);
+ layout->setSpacing(0);
+ layout->setColumnSpacing(0, 10);
+ layout->setColumnSpacing(1, 10);
+ layout->setColumnSpacing(2, 10);
+ layout->setColumnSpacing(3, 10);
+ QCOMPARE(layout->preferredSize(), QSizeF(95, 25));
+ layout->removeAt(2);
+ QCOMPARE(layout->preferredSize(), QSizeF(60, 25));
+ layout->removeAt(1);
+ QCOMPARE(layout->preferredSize(), QSizeF(25, 25));
+ delete layout;
+ }
+ {
+ // don't include items and spacings that was previously part of the layout
+ // (vertical)
+ QGraphicsGridLayout *layout = new QGraphicsGridLayout;
+ populateLayout(layout, 2, 2);
+ layout->setContentsMargins(0, 0, 0, 0);
+ layout->setSpacing(0);
+ layout->setColumnSpacing(0, 10);
+ layout->setColumnSpacing(1, 10);
+ layout->setRowSpacing(0, 10);
+ layout->setRowSpacing(1, 10);
+ QCOMPARE(layout->preferredSize(), QSizeF(60, 60));
+ layout->removeAt(3);
+ QCOMPARE(layout->preferredSize(), QSizeF(60, 60));
+ layout->removeAt(2);
+ QCOMPARE(layout->preferredSize(), QSizeF(60, 25));
+ layout->removeAt(1);
+ QCOMPARE(layout->preferredSize(), QSizeF(25, 25));
+ delete layout;
+ }
- delete widget;
}
// public int columnStretchFactor(int column) const
diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp
index aadee5b..fe2a719 100644
--- a/tests/auto/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/qimagereader/tst_qimagereader.cpp
@@ -138,6 +138,9 @@ private slots:
void sizeBeforeRead_data();
void sizeBeforeRead();
+ void sizeBeforeFormat_data();
+ void sizeBeforeFormat();
+
void imageFormatBeforeRead_data();
void imageFormatBeforeRead();
@@ -706,6 +709,31 @@ void tst_QImageReader::sizeBeforeRead()
QCOMPARE(size, image.size());
}
+void tst_QImageReader::sizeBeforeFormat_data()
+{
+ imageFormat_data();
+}
+
+void tst_QImageReader::sizeBeforeFormat()
+{
+ QFETCH(QString, fileName);
+
+ QByteArray formatA, formatB;
+
+ {
+ QImageReader reader(prefix + fileName);
+ formatA = reader.format();
+ }
+
+ {
+ QImageReader reader(prefix + fileName);
+ QSize size = reader.size();
+ formatB = reader.format();
+ }
+
+ QCOMPARE(formatA, formatB);
+}
+
void tst_QImageReader::imageFormatBeforeRead_data()
{
imageFormat_data();
@@ -1884,14 +1912,14 @@ void tst_QImageReader::testIgnoresFormatAndExtension()
QFETCH(QString, expected);
QList<QByteArray> formats = QImageReader::supportedImageFormats();
- QString fileNameBase = "images/" + name + ".";
+ QString fileNameBase = prefix + name + ".";
foreach (const QByteArray &f, formats) {
if (f == extension)
continue;
QFile tmp(QDir::tempPath() + "/" + name + "_" + expected + "." + f);
- QFile::copy(fileNameBase + extension, QFileInfo(tmp).absoluteFilePath());
+ QVERIFY(QFile::copy(fileNameBase + extension, QFileInfo(tmp).absoluteFilePath()));
QString format;
QImage image;
diff --git a/tests/auto/qlocale/test/test.pro b/tests/auto/qlocale/test/test.pro
index d57f2d1..e33d0fe 100644
--- a/tests/auto/qlocale/test/test.pro
+++ b/tests/auto/qlocale/test/test.pro
@@ -36,4 +36,4 @@ symbian:contains(S60_VERSION,3.2) {
"PAGED" \
"$${LITERAL_HASH}endif"
MMP_RULES += custom_paged_rule
-} \ No newline at end of file
+}
diff --git a/tests/auto/qlocalsocket/example/client/client.pro b/tests/auto/qlocalsocket/example/client/client.pro
index eb7e6e6..84f20d6 100644
--- a/tests/auto/qlocalsocket/example/client/client.pro
+++ b/tests/auto/qlocalsocket/example/client/client.pro
@@ -1,14 +1,8 @@
-######################################################################
-# Automatically generated by qmake (2.01a) Wed Jun 6 17:07:12 2007
-######################################################################
-
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
CONFIG += console
-include(../../src/src.pri)
-# Input
QT = core network
SOURCES += main.cpp
diff --git a/tests/auto/qlocalsocket/example/server/server.pro b/tests/auto/qlocalsocket/example/server/server.pro
index 438462d..bfd14d2 100644
--- a/tests/auto/qlocalsocket/example/server/server.pro
+++ b/tests/auto/qlocalsocket/example/server/server.pro
@@ -1,7 +1,3 @@
-######################################################################
-# Automatically generated by qmake (2.01a) Wed Jun 6 15:16:48 2007
-######################################################################
-
TEMPLATE = app
TARGET =
DEPENDPATH += .
@@ -11,8 +7,6 @@ CONFIG += console
QT = core network
-include(../../src/src.pri)
-
# Input
SOURCES += main.cpp
diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
index 44f3c12..9c09917 100644
--- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
+++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
@@ -115,7 +115,8 @@ private slots:
void writeToClientAndDisconnect();
void debug();
void bytesWrittenSignal();
-
+ void syncDisconnectNotify();
+ void asyncDisconnectNotify();
#ifdef Q_OS_SYMBIAN
private:
@@ -683,25 +684,11 @@ public:
QString testLine = "test";
LocalSocket socket;
QSignalSpy spyReadyRead(&socket, SIGNAL(readyRead()));
- int tries = 0;
- do {
- socket.connectToServer("qlocalsocket_threadtest");
- if (socket.error() != QLocalSocket::ServerNotFoundError
- && socket.error() != QLocalSocket::ConnectionRefusedError)
- break;
- QTest::qWait(100);
- ++tries;
- } while ((socket.error() == QLocalSocket::ServerNotFoundError
- || socket.error() == QLocalSocket::ConnectionRefusedError)
- && tries < 1000);
- if (tries == 0 && socket.state() != QLocalSocket::ConnectedState) {
- QVERIFY(socket.waitForConnected(7000));
- QVERIFY(socket.state() == QLocalSocket::ConnectedState);
- }
+ socket.connectToServer("qlocalsocket_threadtest");
+ QVERIFY(socket.waitForConnected(1000));
// We should *not* have this signal yet!
- if (tries == 0)
- QCOMPARE(spyReadyRead.count(), 0);
+ QCOMPARE(spyReadyRead.count(), 0);
socket.waitForReadyRead();
QCOMPARE(spyReadyRead.count(), 1);
QTextStream in(&socket);
@@ -715,6 +702,8 @@ class Server : public QThread
public:
int clients;
+ QMutex mutex;
+ QWaitCondition wc;
void run()
{
QString testLine = "test";
@@ -722,6 +711,9 @@ public:
server.setMaxPendingConnections(10);
QVERIFY2(server.listen("qlocalsocket_threadtest"),
server.errorString().toLatin1().constData());
+ mutex.lock();
+ wc.wakeAll();
+ mutex.unlock();
int done = clients;
while (done > 0) {
bool timedOut = true;
@@ -746,14 +738,9 @@ void tst_QLocalSocket::threadedConnection_data()
QTest::addColumn<int>("threads");
QTest::newRow("1 client") << 1;
QTest::newRow("2 clients") << 2;
-#ifdef Q_OS_WINCE
- QTest::newRow("4 clients") << 4;
-#endif
-#ifndef Q_OS_WIN
QTest::newRow("5 clients") << 5;
- QTest::newRow("10 clients") << 10;
-#endif
#ifndef Q_OS_WINCE
+ QTest::newRow("10 clients") << 10;
QTest::newRow("20 clients") << 20;
#endif
}
@@ -770,7 +757,9 @@ void tst_QLocalSocket::threadedConnection()
server.setStackSize(0x14000);
#endif
server.clients = threads;
+ server.mutex.lock();
server.start();
+ server.wc.wait(&server.mutex);
QList<Client*> clients;
for (int i = 0; i < threads; ++i) {
@@ -784,9 +773,7 @@ void tst_QLocalSocket::threadedConnection()
server.wait();
while (!clients.isEmpty()) {
QVERIFY(clients.first()->wait(3000));
- Client *client =clients.takeFirst();
- client->terminate();
- delete client;
+ delete clients.takeFirst();
}
}
@@ -994,6 +981,7 @@ void tst_QLocalSocket::writeToClientAndDisconnect()
QLocalServer server;
QLocalSocket client;
+ QSignalSpy readChannelFinishedSpy(&client, SIGNAL(readChannelFinished()));
QVERIFY(server.listen("writeAndDisconnectServer"));
client.connectToServer("writeAndDisconnectServer");
@@ -1006,10 +994,12 @@ void tst_QLocalSocket::writeToClientAndDisconnect()
memset(buffer, 0, sizeof(buffer));
QCOMPARE(clientSocket->write(buffer, sizeof(buffer)), (qint64)sizeof(buffer));
clientSocket->waitForBytesWritten();
- clientSocket->disconnectFromServer();
- QVERIFY(client.waitForReadyRead());
+ clientSocket->close();
+ server.close();
+
+ QTRY_COMPARE(readChannelFinishedSpy.count(), 1);
QCOMPARE(client.read(buffer, sizeof(buffer)), (qint64)sizeof(buffer));
- QVERIFY(client.waitForDisconnected());
+ client.waitForDisconnected();
QCOMPARE(client.state(), QLocalSocket::UnconnectedState);
}
@@ -1065,6 +1055,41 @@ void tst_QLocalSocket::bytesWrittenSignal()
QVERIFY(writeThread.wait(2000));
}
+void tst_QLocalSocket::syncDisconnectNotify()
+{
+#ifdef Q_OS_SYMBIAN
+ unlink("syncDisconnectNotify");
+#endif
+
+ QLocalServer server;
+ QVERIFY(server.listen("syncDisconnectNotify"));
+ QLocalSocket client;
+ client.connectToServer("syncDisconnectNotify");
+ QVERIFY(server.waitForNewConnection());
+ QLocalSocket* serverSocket = server.nextPendingConnection();
+ QVERIFY(serverSocket);
+ delete serverSocket;
+ QCOMPARE(client.waitForReadyRead(), false);
+}
+
+void tst_QLocalSocket::asyncDisconnectNotify()
+{
+#ifdef Q_OS_SYMBIAN
+ unlink("asyncDisconnectNotify");
+#endif
+
+ QLocalServer server;
+ QVERIFY(server.listen("asyncDisconnectNotify"));
+ QLocalSocket client;
+ QSignalSpy disconnectedSpy(&client, SIGNAL(disconnected()));
+ client.connectToServer("asyncDisconnectNotify");
+ QVERIFY(server.waitForNewConnection());
+ QLocalSocket* serverSocket = server.nextPendingConnection();
+ QVERIFY(serverSocket);
+ delete serverSocket;
+ QTRY_VERIFY(!disconnectedSpy.isEmpty());
+}
+
#ifdef Q_OS_SYMBIAN
void tst_QLocalSocket::unlink(QString name)
{
diff --git a/tests/auto/qmetatype/tst_qmetatype.cpp b/tests/auto/qmetatype/tst_qmetatype.cpp
index f4e122f..8558e06 100644
--- a/tests/auto/qmetatype/tst_qmetatype.cpp
+++ b/tests/auto/qmetatype/tst_qmetatype.cpp
@@ -77,6 +77,7 @@ private slots:
void isRegistered_data();
void isRegistered();
void unregisterType();
+ void QTBUG11316_registerStreamBuiltin();
};
@@ -318,5 +319,12 @@ void tst_QMetaType::unregisterType()
QCOMPARE(QMetaType::isRegistered(typeId), false);
}
+void tst_QMetaType::QTBUG11316_registerStreamBuiltin()
+{
+ //should not crash;
+ qRegisterMetaTypeStreamOperators<QString>("QString");
+ qRegisterMetaTypeStreamOperators<QVariant>("QVariant");
+}
+
QTEST_MAIN(tst_QMetaType)
#include "tst_qmetatype.moc"
diff --git a/tests/auto/qpixmap/loadFromData/designer_argb32.png b/tests/auto/qpixmap/loadFromData/designer_argb32.png
new file mode 100644
index 0000000..55d8247
--- /dev/null
+++ b/tests/auto/qpixmap/loadFromData/designer_argb32.png
Binary files differ
diff --git a/tests/auto/qpixmap/loadFromData/designer_indexed8_no_alpha.gif b/tests/auto/qpixmap/loadFromData/designer_indexed8_no_alpha.gif
new file mode 100644
index 0000000..26a6da3
--- /dev/null
+++ b/tests/auto/qpixmap/loadFromData/designer_indexed8_no_alpha.gif
Binary files differ
diff --git a/tests/auto/qpixmap/loadFromData/designer_indexed8_no_alpha.png b/tests/auto/qpixmap/loadFromData/designer_indexed8_no_alpha.png
new file mode 100644
index 0000000..28cd2f0
--- /dev/null
+++ b/tests/auto/qpixmap/loadFromData/designer_indexed8_no_alpha.png
Binary files differ
diff --git a/tests/auto/qpixmap/loadFromData/designer_indexed8_with_alpha.gif b/tests/auto/qpixmap/loadFromData/designer_indexed8_with_alpha.gif
new file mode 100644
index 0000000..49ec77b
--- /dev/null
+++ b/tests/auto/qpixmap/loadFromData/designer_indexed8_with_alpha.gif
Binary files differ
diff --git a/tests/auto/qpixmap/loadFromData/designer_indexed8_with_alpha.png b/tests/auto/qpixmap/loadFromData/designer_indexed8_with_alpha.png
new file mode 100644
index 0000000..09735a9
--- /dev/null
+++ b/tests/auto/qpixmap/loadFromData/designer_indexed8_with_alpha.png
Binary files differ
diff --git a/tests/auto/qpixmap/loadFromData/designer_rgb32.jpg b/tests/auto/qpixmap/loadFromData/designer_rgb32.jpg
new file mode 100644
index 0000000..70f39c2
--- /dev/null
+++ b/tests/auto/qpixmap/loadFromData/designer_rgb32.jpg
Binary files differ
diff --git a/tests/auto/qpixmap/loadFromData/designer_rgb32.png b/tests/auto/qpixmap/loadFromData/designer_rgb32.png
new file mode 100644
index 0000000..bca471d
--- /dev/null
+++ b/tests/auto/qpixmap/loadFromData/designer_rgb32.png
Binary files differ
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index 49b1e52..179f068 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -172,6 +172,9 @@ private slots:
void fromData();
void loadFromDataNullValues();
+ void loadFromDataImage_data();
+ void loadFromDataImage();
+
void preserveDepth();
void splash_crash();
@@ -1540,6 +1543,40 @@ void tst_QPixmap::loadFromDataNullValues()
}
}
+void tst_QPixmap::loadFromDataImage_data()
+{
+ QTest::addColumn<QString>("imagePath");
+#ifdef Q_OS_SYMBIAN
+ const QString prefix = QLatin1String(SRCDIR) + "loadFromData";
+#else
+ const QString prefix = QLatin1String(SRCDIR) + "/loadFromData";
+#endif
+ QTest::newRow("designer_argb32.png") << prefix + "/designer_argb32.png";
+ QTest::newRow("designer_indexed8_no_alpha.png") << prefix + "/designer_indexed8_no_alpha.png";
+ QTest::newRow("designer_indexed8_with_alpha.png") << prefix + "/designer_indexed8_with_alpha.png";
+ QTest::newRow("designer_rgb32.png") << prefix + "/designer_rgb32.png";
+ QTest::newRow("designer_indexed8_no_alpha.gif") << prefix + "/designer_indexed8_no_alpha.gif";
+ QTest::newRow("designer_indexed8_with_alpha.gif") << prefix + "/designer_indexed8_with_alpha.gif";
+ QTest::newRow("designer_rgb32.jpg") << prefix + "/designer_rgb32.jpg";
+}
+
+void tst_QPixmap::loadFromDataImage()
+{
+ QFETCH(QString, imagePath);
+
+ QImage imageRef(imagePath);
+ QPixmap pixmapWithCopy = QPixmap::fromImage(imageRef);
+
+ QFile file(imagePath);
+ file.open(QIODevice::ReadOnly);
+ QByteArray rawData = file.readAll();
+
+ QPixmap directLoadingPixmap;
+ directLoadingPixmap.loadFromData(rawData);
+
+ QVERIFY(pixmapsAreEqual(&pixmapWithCopy, &directLoadingPixmap));
+}
+
void tst_QPixmap::task_246446()
{
// This crashed without the bugfix in 246446
diff --git a/tests/auto/qprocess/testProcessEOF/testProcessEOF.pro b/tests/auto/qprocess/testProcessEOF/testProcessEOF.pro
index f406759..756bd23 100644
--- a/tests/auto/qprocess/testProcessEOF/testProcessEOF.pro
+++ b/tests/auto/qprocess/testProcessEOF/testProcessEOF.pro
@@ -2,7 +2,7 @@ SOURCES = main.cpp
CONFIG -= qt app_bundle
CONFIG += console
-!win32-g++:win32:!equals(TEMPLATE_PREFIX, "vc"):QMAKE_CXXFLAGS += /GS-
+win32:!win32-g++*:!equals(TEMPLATE_PREFIX, "vc"):QMAKE_CXXFLAGS += /GS-
DESTDIR = ./
diff --git a/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp b/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp
index 09070e6..11813d8 100644
--- a/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp
+++ b/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp
@@ -287,6 +287,8 @@ public:
{ m_qtFunctionInvoked = 15; m_actuals << v; return v; }
Q_INVOKABLE QVariantMap myInvokableWithVariantMapArg(const QVariantMap &vm)
{ m_qtFunctionInvoked = 16; m_actuals << vm; return vm; }
+ Q_INVOKABLE QVariantList myInvokableWithVariantListArg(const QVariantList &lst)
+ { m_qtFunctionInvoked = 62; m_actuals.append(QVariant(lst)); return lst; }
Q_INVOKABLE QList<int> myInvokableWithListOfIntArg(const QList<int> &lst)
{ m_qtFunctionInvoked = 17; m_actuals << qVariantFromValue(lst); return lst; }
Q_INVOKABLE QObject* myInvokableWithQObjectStarArg(QObject *obj)
@@ -535,6 +537,10 @@ private slots:
void emitAfterReceiverDeleted();
void inheritedSlots();
void enumerateMetaObject();
+ void nestedArrayAsSlotArgument_data();
+ void nestedArrayAsSlotArgument();
+ void nestedObjectAsSlotArgument_data();
+ void nestedObjectAsSlotArgument();
private:
QScriptEngine *m_engine;
@@ -3164,5 +3170,139 @@ void tst_QScriptExtQObject::enumerateMetaObject()
}
}
+void tst_QScriptExtQObject::nestedArrayAsSlotArgument_data()
+{
+ QTest::addColumn<QString>("program");
+ QTest::addColumn<QVariantList>("expected");
+
+ QTest::newRow("[[]]")
+ << QString::fromLatin1("[[]]")
+ << (QVariantList() << (QVariant(QVariantList())));
+ QTest::newRow("[[123]]")
+ << QString::fromLatin1("[[123]]")
+ << (QVariantList() << (QVariant(QVariantList() << 123)));
+ QTest::newRow("[[], 123]")
+ << QString::fromLatin1("[[], 123]")
+ << (QVariantList() << QVariant(QVariantList()) << 123);
+
+ // Cyclic
+ QTest::newRow("var a=[]; a.push(a)")
+ << QString::fromLatin1("var a=[]; a.push(a); a")
+ << (QVariantList() << QVariant(QVariantList()));
+ QTest::newRow("var a=[]; a.push(123, a)")
+ << QString::fromLatin1("var a=[]; a.push(123, a); a")
+ << (QVariantList() << 123 << QVariant(QVariantList()));
+ QTest::newRow("var a=[]; var b=[]; a.push(b); b.push(a)")
+ << QString::fromLatin1("var a=[]; var b=[]; a.push(b); b.push(a); a")
+ << (QVariantList() << QVariant(QVariantList() << QVariant(QVariantList())));
+ QTest::newRow("var a=[]; var b=[]; a.push(123, b); b.push(456, a)")
+ << QString::fromLatin1("var a=[]; var b=[]; a.push(123, b); b.push(456, a); a")
+ << (QVariantList() << 123 << QVariant(QVariantList() << 456 << QVariant(QVariantList())));
+}
+
+void tst_QScriptExtQObject::nestedArrayAsSlotArgument()
+{
+ QFETCH(QString, program);
+ QFETCH(QVariantList, expected);
+ QScriptValue a = m_engine->evaluate(program);
+ QVERIFY(!a.isError());
+ QVERIFY(a.isArray());
+ // Slot that takes QVariantList
+ {
+ QVERIFY(!m_engine->evaluate("myObject.myInvokableWithVariantListArg")
+ .call(QScriptValue(), QScriptValueList() << a).isError());
+ QCOMPARE(m_myObject->qtFunctionInvoked(), 62);
+ QCOMPARE(m_myObject->qtFunctionActuals().size(), 1);
+ QCOMPARE(m_myObject->qtFunctionActuals().at(0).type(), QVariant::List);
+ QCOMPARE(m_myObject->qtFunctionActuals().at(0).toList(), expected);
+ }
+ // Slot that takes QVariant
+ {
+ m_myObject->resetQtFunctionInvoked();
+ QVERIFY(!m_engine->evaluate("myObject.myInvokableWithVariantArg")
+ .call(QScriptValue(), QScriptValueList() << a).isError());
+ QCOMPARE(m_myObject->qtFunctionInvoked(), 15);
+ QCOMPARE(m_myObject->qtFunctionActuals().size(), 1);
+ QCOMPARE(m_myObject->qtFunctionActuals().at(0).type(), QVariant::List);
+ QCOMPARE(m_myObject->qtFunctionActuals().at(0).toList(), expected);
+ }
+}
+
+void tst_QScriptExtQObject::nestedObjectAsSlotArgument_data()
+{
+ QTest::addColumn<QString>("program");
+ QTest::addColumn<QVariantMap>("expected");
+
+ {
+ QVariantMap m;
+ m["a"] = QVariantMap();
+ QTest::newRow("{ a:{} }")
+ << QString::fromLatin1("({ a:{} })")
+ << m;
+ }
+ {
+ QVariantMap m, m2;
+ m2["b"] = 10;
+ m2["c"] = 20;
+ m["a"] = m2;
+ QTest::newRow("{ a:{b:10, c:20} }")
+ << QString::fromLatin1("({ a:{b:10, c:20} })")
+ << m;
+ }
+ {
+ QVariantMap m;
+ m["a"] = 10;
+ m["b"] = QVariantList() << 20 << 30;
+ QTest::newRow("{ a:10, b:[20, 30]}")
+ << QString::fromLatin1("({ a:10, b:[20,30]})")
+ << m;
+ }
+
+ // Cyclic
+ {
+ QVariantMap m;
+ m["p"] = QVariantMap();
+ QTest::newRow("var o={}; o.p=o")
+ << QString::fromLatin1("var o={}; o.p=o; o")
+ << m;
+ }
+ {
+ QVariantMap m;
+ m["p"] = 123;
+ m["q"] = QVariantMap();
+ QTest::newRow("var o={}; o.p=123; o.q=o")
+ << QString::fromLatin1("var o={}; o.p=123; o.q=o; o")
+ << m;
+ }
+}
+
+void tst_QScriptExtQObject::nestedObjectAsSlotArgument()
+{
+ QFETCH(QString, program);
+ QFETCH(QVariantMap, expected);
+ QScriptValue o = m_engine->evaluate(program);
+ QVERIFY(!o.isError());
+ QVERIFY(o.isObject());
+ // Slot that takes QVariantMap
+ {
+ QVERIFY(!m_engine->evaluate("myObject.myInvokableWithVariantMapArg")
+ .call(QScriptValue(), QScriptValueList() << o).isError());
+ QCOMPARE(m_myObject->qtFunctionInvoked(), 16);
+ QCOMPARE(m_myObject->qtFunctionActuals().size(), 1);
+ QCOMPARE(m_myObject->qtFunctionActuals().at(0).type(), QVariant::Map);
+ QCOMPARE(m_myObject->qtFunctionActuals().at(0).toMap(), expected);
+ }
+ // Slot that takes QVariant
+ {
+ m_myObject->resetQtFunctionInvoked();
+ QVERIFY(!m_engine->evaluate("myObject.myInvokableWithVariantArg")
+ .call(QScriptValue(), QScriptValueList() << o).isError());
+ QCOMPARE(m_myObject->qtFunctionInvoked(), 15);
+ QCOMPARE(m_myObject->qtFunctionActuals().size(), 1);
+ QCOMPARE(m_myObject->qtFunctionActuals().at(0).type(), QVariant::Map);
+ QCOMPARE(m_myObject->qtFunctionActuals().at(0).toMap(), expected);
+ }
+}
+
QTEST_MAIN(tst_QScriptExtQObject)
#include "tst_qscriptextqobject.moc"
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
index aa9fa15..8aa4e711 100644
--- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
@@ -1270,7 +1270,7 @@ void tst_QScriptValue::toVariant_old()
QCOMPARE(opaque.toVariant(), var);
QScriptValue object = eng.newObject();
- QCOMPARE(object.toVariant(), QVariant(QString("[object Object]")));
+ QCOMPARE(object.toVariant(), QVariant(QVariantMap()));
QScriptValue qobject = eng.newQObject(this);
{
@@ -2296,7 +2296,7 @@ void tst_QScriptValue::getSetScriptClass()
QCOMPARE(obj.scriptClass(), (QScriptClass*)&testClass);
QVERIFY(obj.isObject());
QVERIFY(!obj.isVariant());
- QVERIFY(!obj.toVariant().isValid());
+ QCOMPARE(obj.toVariant(), QVariant(QVariantMap()));
}
{
QScriptValue obj = eng.newQObject(this);
@@ -3472,4 +3472,89 @@ void tst_QScriptValue::objectId()
QVERIFY(obj.strictlyEquals(eng.globalObject()));
}
+void tst_QScriptValue::nestedObjectToVariant_data()
+{
+ QTest::addColumn<QString>("program");
+ QTest::addColumn<QVariant>("expected");
+
+ // Array literals
+ QTest::newRow("[[]]")
+ << QString::fromLatin1("[[]]")
+ << QVariant(QVariantList() << (QVariant(QVariantList())));
+ QTest::newRow("[[123]]")
+ << QString::fromLatin1("[[123]]")
+ << QVariant(QVariantList() << (QVariant(QVariantList() << 123)));
+ QTest::newRow("[[], 123]")
+ << QString::fromLatin1("[[], 123]")
+ << QVariant(QVariantList() << QVariant(QVariantList()) << 123);
+
+ // Cyclic arrays
+ QTest::newRow("var a=[]; a.push(a)")
+ << QString::fromLatin1("var a=[]; a.push(a); a")
+ << QVariant(QVariantList() << QVariant(QVariantList()));
+ QTest::newRow("var a=[]; a.push(123, a)")
+ << QString::fromLatin1("var a=[]; a.push(123, a); a")
+ << QVariant(QVariantList() << 123 << QVariant(QVariantList()));
+ QTest::newRow("var a=[]; var b=[]; a.push(b); b.push(a)")
+ << QString::fromLatin1("var a=[]; var b=[]; a.push(b); b.push(a); a")
+ << QVariant(QVariantList() << QVariant(QVariantList() << QVariant(QVariantList())));
+ QTest::newRow("var a=[]; var b=[]; a.push(123, b); b.push(456, a)")
+ << QString::fromLatin1("var a=[]; var b=[]; a.push(123, b); b.push(456, a); a")
+ << QVariant(QVariantList() << 123 << QVariant(QVariantList() << 456 << QVariant(QVariantList())));
+
+ // Object literals
+ {
+ QVariantMap m;
+ m["a"] = QVariantMap();
+ QTest::newRow("{ a:{} }")
+ << QString::fromLatin1("({ a:{} })")
+ << QVariant(m);
+ }
+ {
+ QVariantMap m, m2;
+ m2["b"] = 10;
+ m2["c"] = 20;
+ m["a"] = m2;
+ QTest::newRow("{ a:{b:10, c:20} }")
+ << QString::fromLatin1("({ a:{b:10, c:20} })")
+ << QVariant(m);
+ }
+ {
+ QVariantMap m;
+ m["a"] = 10;
+ m["b"] = QVariantList() << 20 << 30;
+ QTest::newRow("{ a:10, b:[20, 30]}")
+ << QString::fromLatin1("({ a:10, b:[20,30]})")
+ << QVariant(m);
+ }
+
+ // Cyclic objects
+ {
+ QVariantMap m;
+ m["p"] = QVariantMap();
+ QTest::newRow("var o={}; o.p=o")
+ << QString::fromLatin1("var o={}; o.p=o; o")
+ << QVariant(m);
+ }
+ {
+ QVariantMap m;
+ m["p"] = 123;
+ m["q"] = QVariantMap();
+ QTest::newRow("var o={}; o.p=123; o.q=o")
+ << QString::fromLatin1("var o={}; o.p=123; o.q=o; o")
+ << QVariant(m);
+ }
+}
+
+void tst_QScriptValue::nestedObjectToVariant()
+{
+ QScriptEngine eng;
+ QFETCH(QString, program);
+ QFETCH(QVariant, expected);
+ QScriptValue o = eng.evaluate(program);
+ QVERIFY(!o.isError());
+ QVERIFY(o.isObject());
+ QCOMPARE(o.toVariant(), expected);
+}
+
QTEST_MAIN(tst_QScriptValue)
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.h b/tests/auto/qscriptvalue/tst_qscriptvalue.h
index aae35b2..8bfaa6a 100644
--- a/tests/auto/qscriptvalue/tst_qscriptvalue.h
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue.h
@@ -225,6 +225,8 @@ private slots:
void engineDeleted();
void valueOfWithClosure();
void objectId();
+ void nestedObjectToVariant_data();
+ void nestedObjectToVariant();
private:
typedef void (tst_QScriptValue::*InitDataFunction)();
diff --git a/tests/auto/qsqldriver/qsqldriver.pro b/tests/auto/qsqldriver/qsqldriver.pro
index d04ca83..2e9ed67 100644
--- a/tests/auto/qsqldriver/qsqldriver.pro
+++ b/tests/auto/qsqldriver/qsqldriver.pro
@@ -9,7 +9,7 @@ wince*: {
DEPLOYMENT += plugFiles
LIBS += -lws2
} else {
- win32-g++ {
+ win32-g++* {
LIBS += -lws2_32
} else:win32 {
LIBS += ws2_32.lib
diff --git a/tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro b/tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
index ee4f2f0..c6681d5 100644
--- a/tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
+++ b/tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
@@ -17,7 +17,7 @@ wince*: {
}
}
} else {
- win32-g++ {
+ win32-g++* {
LIBS += -lws2_32
} else:win32 {
LIBS += ws2_32.lib
diff --git a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
index 505b867..d0509bb 100644
--- a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
+++ b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
@@ -542,6 +542,9 @@ void tst_QSslCertificate::fromPath_data()
QTest::newRow("\"d.*/c.*.pem\" regexp der") << QString("d.*/c.*.pem") << int(QRegExp::RegExp) << false << 0;
QTest::newRow("\"d.*/c.*.pem\" wildcard pem") << QString("d.*/c.*.pem") << int(QRegExp::Wildcard) << true << 0;
QTest::newRow("\"d.*/c.*.pem\" wildcard der") << QString("d.*/c.*.pem") << int(QRegExp::Wildcard) << false << 0;
+#ifdef Q_OS_LINUX
+ QTest::newRow("absolute path wildcard pem") << QString(QDir::currentPath() + "/certificates/*.pem") << int(QRegExp::Wildcard) << true << 4;
+#endif
QTest::newRow("trailing-whitespace") << QString("more-certificates/trailing-whitespace.pem") << int(QRegExp::FixedString) << true << 1;
QTest::newRow("no-ending-newline") << QString("more-certificates/no-ending-newline.pem") << int(QRegExp::FixedString) << true << 1;
diff --git a/tests/auto/qtcpserver/crashingServer/crashingServer.pro b/tests/auto/qtcpserver/crashingServer/crashingServer.pro
index 70e42b4..0bea655 100644
--- a/tests/auto/qtcpserver/crashingServer/crashingServer.pro
+++ b/tests/auto/qtcpserver/crashingServer/crashingServer.pro
@@ -5,4 +5,4 @@ DESTDIR = ./
# This means the auto test works on some machines for MinGW. No dialog stalls
# the application.
-win32-g++:CONFIG += console
+win32-g++*:CONFIG += console
diff --git a/tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp b/tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
index c60af5e..a562fbe 100644
--- a/tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
+++ b/tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
@@ -71,6 +71,10 @@ private slots:
void isAtWordStart();
void fastConstructor();
void isAtBoundaryLine();
+ void toNextBoundary_data();
+ void toNextBoundary();
+ void toPreviousBoundary_data();
+ void toPreviousBoundary();
};
tst_QTextBoundaryFinder::tst_QTextBoundaryFinder()
@@ -292,25 +296,120 @@ void tst_QTextBoundaryFinder::fastConstructor()
void tst_QTextBoundaryFinder::isAtBoundaryLine()
{
- // idx 0 1 2 3 4 5
- // break? - - - + - +
+ // idx 0 1 2 3 4 5 6
+ // break? - - - - + - +
QChar s[] = { 0x0061, 0x00AD, 0x0062, 0x0009, 0x0063, 0x0064 };
QString text(s, sizeof(s)/sizeof(s[0]));
- qDebug() << "text = " << text << ", length = " << text.length();
+// qDebug() << "text = " << text << ", length = " << text.length();
QTextBoundaryFinder finder(QTextBoundaryFinder::Line, text.constData(), text.length(), /*buffer*/0, /*buffer size*/0);
finder.setPosition(0);
- QVERIFY(!finder.isAtBoundary());
+ QVERIFY(finder.isAtBoundary());
finder.setPosition(1);
QVERIFY(!finder.isAtBoundary());
finder.setPosition(2);
QVERIFY(!finder.isAtBoundary());
finder.setPosition(3);
- QVERIFY(finder.isAtBoundary());
- finder.setPosition(4);
QVERIFY(!finder.isAtBoundary());
+ finder.setPosition(4);
+ QVERIFY(finder.isAtBoundary());
finder.setPosition(5);
+ QVERIFY(!finder.isAtBoundary());
+ finder.setPosition(6);
QVERIFY(finder.isAtBoundary());
}
+Q_DECLARE_METATYPE(QList<int>)
+
+void tst_QTextBoundaryFinder::toNextBoundary_data()
+{
+ QTest::addColumn<QString>("text");
+ QTest::addColumn<int>("type");
+ QTest::addColumn< QList<int> >("boundaries");
+
+ QList<int> boundaries;
+ boundaries << 0 << 3 << 4 << 7 << 8 << 11 << 12 << 13 << 16 << 17 << 20 << 21 << 24 << 25;
+ QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Word) \
+ << boundaries;
+
+ boundaries.clear();
+ boundaries << 0 << 13 << 25;
+ QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Sentence) \
+ << boundaries;
+
+ boundaries.clear();
+ boundaries << 0 << 4 << 8 << 13 << 17 << 21 << 25;
+ QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Line) \
+ << boundaries;
+
+ boundaries.clear();
+ boundaries << 0 << 5 << 9 << 15 << 17 << 21 << 28;
+ QTest::newRow("Line") << QString::fromUtf8("Diga-nos qualé a sua opinião") << int(QTextBoundaryFinder::Line)
+ << boundaries;
+
+}
+
+void tst_QTextBoundaryFinder::toNextBoundary()
+{
+ QFETCH(QString, text);
+ QFETCH(int, type);
+ QFETCH(QList<int>, boundaries);
+
+ QList<int> foundBoundaries;
+ QTextBoundaryFinder boundaryFinder(QTextBoundaryFinder::BoundaryType(type), text);
+ boundaryFinder.toStart();
+ for(int next = 0; next != -1; next = boundaryFinder.toNextBoundary())
+ foundBoundaries << next;
+ QCOMPARE(boundaries, foundBoundaries);
+}
+
+void tst_QTextBoundaryFinder::toPreviousBoundary_data()
+{
+ QTest::addColumn<QString>("text");
+ QTest::addColumn<int>("type");
+ QTest::addColumn< QList<int> >("boundaries");
+
+ QList<int> boundaries;
+ boundaries << 25 << 24 << 21 << 20 << 17 << 16 << 13 << 12 << 11 << 8 << 7 << 4 << 3 << 0;
+ QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Word)
+ << boundaries;
+
+ boundaries.clear();
+ boundaries << 25 << 13 << 0;
+ QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Sentence)
+ << boundaries;
+
+ boundaries.clear();
+ boundaries << 25 << 21 << 17 << 13 << 8 << 4 << 0;
+ QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Line)
+ << boundaries;
+
+ boundaries.clear();
+ boundaries << 28 << 21 << 17 << 15 << 9 << 5 << 0;
+ QTest::newRow("Line") << QString::fromUtf8("Diga-nos qualé a sua opinião") << int(QTextBoundaryFinder::Line)
+ << boundaries;
+
+}
+
+void tst_QTextBoundaryFinder::toPreviousBoundary()
+{
+ QFETCH(QString, text);
+ QFETCH(int, type);
+ QFETCH(QList<int>, boundaries);
+
+ QList<int> foundBoundaries;
+ QTextBoundaryFinder boundaryFinder(QTextBoundaryFinder::BoundaryType(type), text);
+ boundaryFinder.toEnd();
+ for (int previous = boundaryFinder.position();
+ previous != -1;
+ previous = boundaryFinder.toPreviousBoundary())
+ {
+ foundBoundaries << previous;
+ }
+ QCOMPARE(boundaries, foundBoundaries);
+}
+
+
+
+
QTEST_MAIN(tst_QTextBoundaryFinder)
#include "tst_qtextboundaryfinder.moc"
diff --git a/tests/auto/qtextcursor/tst_qtextcursor.cpp b/tests/auto/qtextcursor/tst_qtextcursor.cpp
index 99babac..41835bb 100644
--- a/tests/auto/qtextcursor/tst_qtextcursor.cpp
+++ b/tests/auto/qtextcursor/tst_qtextcursor.cpp
@@ -151,6 +151,7 @@ private slots:
void cursorPositionWithBlockUndoAndRedo();
void cursorPositionWithBlockUndoAndRedo2();
+ void cursorPositionWithBlockUndoAndRedo3();
private:
int blockCount();
@@ -1756,9 +1757,9 @@ void tst_QTextCursor::adjustCursorsOnInsert()
void tst_QTextCursor::cursorPositionWithBlockUndoAndRedo()
{
cursor.insertText("AAAABBBBCCCCDDDD");
- cursor.beginEditBlock();
cursor.setPosition(12);
int cursorPositionBefore = cursor.position();
+ cursor.beginEditBlock();
cursor.insertText("*");
cursor.setPosition(8);
cursor.insertText("*");
@@ -1814,5 +1815,20 @@ void tst_QTextCursor::cursorPositionWithBlockUndoAndRedo2()
QCOMPARE(cursor.position(), cursorPositionBefore);
}
+void tst_QTextCursor::cursorPositionWithBlockUndoAndRedo3()
+{
+ // verify that it's the position of the beginEditBlock that counts, and not the last edit position
+ cursor.insertText("AAAABBBB");
+ int cursorPositionBefore = cursor.position();
+ cursor.beginEditBlock();
+ cursor.setPosition(4);
+ QVERIFY(cursor.position() != cursorPositionBefore);
+ cursor.insertText("*");
+ cursor.endEditBlock();
+ QCOMPARE(cursor.position(), 5);
+ doc->undo(&cursor);
+ QCOMPARE(cursor.position(), cursorPositionBefore);
+}
+
QTEST_MAIN(tst_QTextCursor)
#include "tst_qtextcursor.moc"
diff --git a/tests/auto/qtextformat/tst_qtextformat.cpp b/tests/auto/qtextformat/tst_qtextformat.cpp
index ee1f4b5..9b71481 100644
--- a/tests/auto/qtextformat/tst_qtextformat.cpp
+++ b/tests/auto/qtextformat/tst_qtextformat.cpp
@@ -308,10 +308,7 @@ void tst_QTextFormat::getSetTabs()
format.setTabPositions(tabs);
Comparator c2(tabs, format.tabPositions());
- QTextOption::Tab tab2;
- tab2.position = 3456;
- tab2.type = QTextOption::RightTab;
- tab2.delimiter = QChar('x');
+ QTextOption::Tab tab2(3456, QTextOption::RightTab, QChar('x'));
tabs.append(tab2);
format.setTabPositions(tabs);
Comparator c3(tabs, format.tabPositions());
diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp
index 1a5f493..a631f3d 100644
--- a/tests/auto/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp
@@ -980,9 +980,7 @@ void tst_QTextLayout::testCenteredTab()
// test if centering the tab works. We expect the center of 'Bar.' to be at the tab point.
QTextOption option = layout.textOption();
QList<QTextOption::Tab> tabs;
- QTextOption::Tab tab;
- tab.type = QTextOption::CenterTab;
- tab.position = 150;
+ QTextOption::Tab tab(150, QTextOption::CenterTab);
tabs.append(tab);
option.setTabs(tabs);
layout.setTextOption(option);
@@ -1002,10 +1000,7 @@ void tst_QTextLayout::testDelimiterTab()
// try the different delimiter characters to see if the alignment works there.
QTextOption option = layout.textOption();
QList<QTextOption::Tab> tabs;
- QTextOption::Tab tab;
- tab.type = QTextOption::DelimiterTab;
- tab.delimiter = QChar('.');
- tab.position = 100;
+ QTextOption::Tab tab(100, QTextOption::DelimiterTab, QChar('.'));
tabs.append(tab);
option.setTabs(tabs);
layout.setTextOption(option);
diff --git a/tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp b/tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp
index 64c42bb..a463d86 100644
--- a/tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp
+++ b/tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp
@@ -198,14 +198,9 @@ void tst_QTextOdfWriter::testWriteStyle2()
{
QTextBlockFormat bf; // = cursor.blockFormat();
QList<QTextOption::Tab> tabs;
- QTextOption::Tab tab1;
- tab1.position = 40;
- tab1.type = QTextOption::RightTab;
+ QTextOption::Tab tab1(40, QTextOption::RightTab);
tabs << tab1;
- QTextOption::Tab tab2;
- tab2.position = 80;
- tab2.type = QTextOption::DelimiterTab;
- tab2.delimiter = 'o';
+ QTextOption::Tab tab2(80, QTextOption::DelimiterTab, 'o');
tabs << tab2;
bf.setTabPositions(tabs);
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index d76bbfa..045216a 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -610,10 +610,14 @@ void tst_QWidget::getSetCheck()
obj1.setAttribute(Qt::WA_InputMethodEnabled);
obj1.setInputContext(var13);
QCOMPARE(static_cast<QInputContext *>(var13), obj1.inputContext());
+ // QWidget takes ownership, so check parent
+ QCOMPARE(var13->parent(), static_cast<QObject *>(&obj1));
+ // Check self assignment
+ obj1.setInputContext(obj1.inputContext());
+ QCOMPARE(static_cast<QInputContext *>(var13), obj1.inputContext());
obj1.setInputContext((QInputContext *)0);
QCOMPARE(qApp->inputContext(), obj1.inputContext());
QVERIFY(qApp->inputContext() != var13);
- //delete var13; // No delete, since QWidget takes ownership
// bool QWidget::autoFillBackground()
// void QWidget::setAutoFillBackground(bool)
diff --git a/tests/auto/selftests/expected_badxml.txt b/tests/auto/selftests/expected_badxml.txt
index 046f1b2..bc9d203 100644
--- a/tests/auto/selftests/expected_badxml.txt
+++ b/tests/auto/selftests/expected_badxml.txt
@@ -1,5 +1,5 @@
********* Start testing of tst_BadXml *********
-Config: Using QTest library 4.6.3, Qt 4.6.3
+Config: Using QTest library 4.6.4, Qt 4.6.4
PASS : tst_BadXml::initTestCase()
QDEBUG : tst_BadXml::badDataTag(end cdata ]]> text ]]> more text) a message
FAIL! : tst_BadXml::badDataTag(end cdata ]]> text ]]> more text) a failure
diff --git a/tests/auto/selftests/expected_xunit.txt b/tests/auto/selftests/expected_xunit.txt
index 02cfa6f..ac8c0db 100644
--- a/tests/auto/selftests/expected_xunit.txt
+++ b/tests/auto/selftests/expected_xunit.txt
@@ -1,5 +1,5 @@
********* Start testing of tst_Xunit *********
-Config: Using QTest library 4.6.3, Qt 4.6.3
+Config: Using QTest library 4.6.4, Qt 4.6.4
PASS : tst_Xunit::initTestCase()
WARNING: tst_Xunit::testFunc1() just a QWARN() !
PASS : tst_Xunit::testFunc1()
diff --git a/tests/auto/uic/baseline/config_fromuic3.ui.h b/tests/auto/uic/baseline/config_fromuic3.ui.h
index 7e0189e..a97e8bc 100644
--- a/tests/auto/uic/baseline/config_fromuic3.ui.h
+++ b/tests/auto/uic/baseline/config_fromuic3.ui.h
@@ -45,7 +45,7 @@
** Form generated from reading UI file 'config_fromuic3.ui'
**
** Created: Thu Dec 17 12:48:42 2009
-** by: Qt User Interface Compiler version 4.6.3
+** by: Qt User Interface Compiler version 4.6.4
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/xmlpatternsxqts/tst_suitetest.cpp b/tests/auto/xmlpatternsxqts/tst_suitetest.cpp
index ec63858..6e10e3f 100644
--- a/tests/auto/xmlpatternsxqts/tst_suitetest.cpp
+++ b/tests/auto/xmlpatternsxqts/tst_suitetest.cpp
@@ -141,8 +141,6 @@ void tst_SuiteTest::checkTestSuiteResult() const
/* Passed to ResultThreader so it knows what kind of file it is handling. */
ResultThreader::Type type = ResultThreader::Baseline;
- QProcess::execute(QLatin1String("p4 edit ") + m_existingBaseline);
-
for(QFileInfoList::const_iterator it(list.constBegin()); it != end; ++it)
{
QFileInfo i(*it);
@@ -167,8 +165,6 @@ void tst_SuiteTest::checkTestSuiteResult() const
const int exitCode = eventLoop.exec();
- QProcess::execute(QLatin1String("p4 revert -a ") + m_existingBaseline);
-
QCOMPARE(exitCode, 0);
}
diff --git a/tools/activeqt/testcon/testcon.pro b/tools/activeqt/testcon/testcon.pro
index dc98218..89f8067 100644
--- a/tools/activeqt/testcon/testcon.pro
+++ b/tools/activeqt/testcon/testcon.pro
@@ -16,6 +16,6 @@ RC_FILE = testcon.rc
win32-borland {
QMAKE_POST_LINK = -midl $$QT_SOURCE_TREE/tools/activeqt/testcon/testcon.idl
} else {
- !win32-g++:QMAKE_POST_LINK = midl $$QT_SOURCE_TREE/tools/activeqt/testcon/testcon.idl && move testcon.tlb $(TARGETDIR)
+ !win32-g++*:QMAKE_POST_LINK = midl $$QT_SOURCE_TREE/tools/activeqt/testcon/testcon.idl && move testcon.tlb $(TARGETDIR)
}
diff --git a/tools/assistant/lib/fulltextsearch/fulltextsearch.pro b/tools/assistant/lib/fulltextsearch/fulltextsearch.pro
index fb1a0dd..4d2fddb 100644
--- a/tools/assistant/lib/fulltextsearch/fulltextsearch.pro
+++ b/tools/assistant/lib/fulltextsearch/fulltextsearch.pro
@@ -29,7 +29,7 @@ unix:QMAKE_PKGCONFIG_REQUIRES = QtCore
CONFIG(exceptions_off) {
CONFIG -= exceptions_off
CONFIG += exceptions
- !win32|win32-g++ {
+ !win32|win32-g++* {
QMAKE_CFLAGS -= -fno-exceptions
QMAKE_CXXFLAGS -= -fno-exceptions
QMAKE_LFLAGS -= -fno-exceptions
diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.cpp b/tools/assistant/tools/assistant/helpviewer_qwv.cpp
index 244d091..dcbbf2c 100644
--- a/tools/assistant/tools/assistant/helpviewer_qwv.cpp
+++ b/tools/assistant/tools/assistant/helpviewer_qwv.cpp
@@ -172,6 +172,7 @@ private:
bool closeNewTabIfNeeded;
friend class HelpViewer;
+ QUrl m_loadingUrl;
Qt::MouseButtons m_pressedButtons;
Qt::KeyboardModifiers m_keyboardModifiers;
};
@@ -232,6 +233,11 @@ bool HelpPage::acceptNavigationRequest(QWebFrame *,
return false;
}
+ m_loadingUrl = url; // because of async page loading, we will hit some kind
+ // of race condition while using a remote command, like a combination of
+ // SetSource; SyncContent. SetSource would be called and SyncContents shortly
+ // afterwards, but the page might not have finished loading and the old url
+ // would be returned.
return true;
}
@@ -268,6 +274,7 @@ HelpViewer::HelpViewer(CentralWidget *parent, qreal zoom)
connect(page(), SIGNAL(linkHovered(QString,QString,QString)), this,
SIGNAL(highlighted(QString)));
connect(this, SIGNAL(urlChanged(QUrl)), this, SIGNAL(sourceChanged(QUrl)));
+ connect(this, SIGNAL(loadStarted()), this, SLOT(setLoadStarted()));
connect(this, SIGNAL(loadFinished(bool)), this, SLOT(setLoadFinished(bool)));
connect(page(), SIGNAL(printRequested(QWebFrame*)), this, SIGNAL(printRequested()));
@@ -333,10 +340,19 @@ bool HelpViewer::handleForwardBackwardMouseButtons(QMouseEvent *e)
return false;
}
+QUrl HelpViewer::source() const
+{
+ HelpPage *currentPage = static_cast<HelpPage*> (page());
+ if (currentPage && !hasLoadFinished()) {
+ // see HelpPage::acceptNavigationRequest(...)
+ return currentPage->m_loadingUrl;
+ }
+ return url();
+}
+
void HelpViewer::setSource(const QUrl &url)
{
TRACE_OBJ
- loadFinished = false;
load(url.toString() == QLatin1String("help") ? LocalHelpFile : url);
}
@@ -396,6 +412,11 @@ void HelpViewer::mousePressEvent(QMouseEvent *event)
QWebView::mousePressEvent(event);
}
+void HelpViewer::setLoadStarted()
+{
+ loadFinished = false;
+}
+
void HelpViewer::setLoadFinished(bool ok)
{
TRACE_OBJ
diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.h b/tools/assistant/tools/assistant/helpviewer_qwv.h
index 2577828..1897e3e 100644
--- a/tools/assistant/tools/assistant/helpviewer_qwv.h
+++ b/tools/assistant/tools/assistant/helpviewer_qwv.h
@@ -71,8 +71,8 @@ public:
bool handleForwardBackwardMouseButtons(QMouseEvent *e);
+ QUrl source() const;
void setSource(const QUrl &url);
- inline QUrl source() const { return url(); }
inline QString documentTitle() const
{ return title(); }
@@ -109,6 +109,7 @@ protected:
private Q_SLOTS:
void actionChanged();
+ void setLoadStarted();
void setLoadFinished(bool ok);
private:
diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro
index d926a76..64a6d9a 100644
--- a/tools/configure/configure.pro
+++ b/tools/configure/configure.pro
@@ -8,7 +8,7 @@ DEFINES += QT_BOOTSTRAPPED
win32 : LIBS += -lole32 -ladvapi32
win32-msvc.net | win32-msvc2* : QMAKE_CXXFLAGS += /EHsc
-win32-g++ : LIBS += -luuid
+win32-g++* : LIBS += -luuid
win32-msvc* {
QMAKE_CFLAGS_RELEASE -= -MD
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index a5f9f2c..2e2d8ba 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -1035,6 +1035,8 @@ void Configure::parseCmdLine()
qmakeLibs += QString("-l" + configCmdLine.at(i));
} else if (configCmdLine.at(i).startsWith("OPENSSL_LIBS=")) {
opensslLibs = configCmdLine.at(i);
+ } else if (configCmdLine.at(i).startsWith("PSQL_LIBS=")) {
+ psqlLibs = configCmdLine.at(i);
}
else if( ( configCmdLine.at(i) == "-override-version" ) || ( configCmdLine.at(i) == "-version-override" ) ){
@@ -2747,6 +2749,8 @@ void Configure::generateOutputVars()
else
qmakeVars += QString("OPENSSL_LIBS = -lssleay32 -llibeay32");
}
+ if (!psqlLibs.isEmpty())
+ qmakeVars += QString("QT_LFLAGS_PSQL=") + psqlLibs.section("=", 1);
if (!qmakeSql.isEmpty())
qmakeVars += QString("sql-drivers += ") + qmakeSql.join( " " );
if (!qmakeSqlPlugins.isEmpty())
diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h
index 6c10dd8..ff2ee8b 100644
--- a/tools/configure/configureapp.h
+++ b/tools/configure/configureapp.h
@@ -133,6 +133,7 @@ private:
QStringList qmakeIncludes;
QStringList qmakeLibs;
QString opensslLibs;
+ QString psqlLibs;
QMap<QString,QString> licenseInfo;
QString outputLine;
diff --git a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
index a25bd5d..5547761 100644
--- a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
+++ b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
@@ -63,6 +63,7 @@
#include <QtGui/QAction>
#include <QtGui/QButtonGroup>
#include <QtGui/QMenu>
+#include <QtGui/QSortFilterProxyModel>
#include <QtGui/QStandardItemModel>
#include <QtGui/QComboBox>
#include <QtGui/QApplication>
@@ -712,9 +713,12 @@ SignalSlotEditorWindow::SignalSlotEditorWindow(QDesignerFormEditorInterface *cor
m_remove_button(new QToolButton),
m_core(core),
m_model(new ConnectionModel(this)),
+ m_proxy_model(new QSortFilterProxyModel(this)),
m_handling_selection_change(false)
{
- m_view->setModel(m_model);
+ m_proxy_model->setSourceModel(m_model);
+ m_view->setModel(m_proxy_model);
+ m_view->setSortingEnabled(true);
m_view->setItemDelegate(new ConnectionDelegate(this));
m_view->setEditTriggers(QAbstractItemView::DoubleClicked
| QAbstractItemView::EditKeyPressed);
@@ -790,7 +794,7 @@ void SignalSlotEditorWindow::updateDialogSelection(Connection *con)
if (m_handling_selection_change || m_editor == 0)
return;
- QModelIndex index = m_model->connectionToIndex(con);
+ QModelIndex index = m_proxy_model->mapFromSource(m_model->connectionToIndex(con));
if (index == m_view->currentIndex())
return;
m_handling_selection_change = true;
@@ -808,7 +812,7 @@ void SignalSlotEditorWindow::updateEditorSelection(const QModelIndex &index)
if (m_editor == 0)
return;
- Connection *con = m_model->indexToConnection(index);
+ Connection *con = m_model->indexToConnection(m_proxy_model->mapToSource(index));
if (m_editor->selected(con))
return;
m_handling_selection_change = true;
diff --git a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.h b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.h
index 9315955..665f0b7 100644
--- a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.h
+++ b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.h
@@ -50,6 +50,7 @@ QT_BEGIN_NAMESPACE
class QDesignerFormWindowInterface;
class QDesignerFormEditorInterface;
class QModelIndex;
+class QSortFilterProxyModel;
class QTreeView;
class QToolButton;
@@ -84,6 +85,7 @@ private:
QToolButton *m_add_button, *m_remove_button;
QDesignerFormEditorInterface *m_core;
ConnectionModel *m_model;
+ QSortFilterProxyModel *m_proxy_model;
bool m_handling_selection_change;
};
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp
index a64e8e7..5f10885 100644
--- a/tools/qdoc3/ditaxmlgenerator.cpp
+++ b/tools/qdoc3/ditaxmlgenerator.cpp
@@ -45,23 +45,295 @@
#include "codemarker.h"
#include "codeparser.h"
-#include "helpprojectwriter.h"
#include "ditaxmlgenerator.h"
#include "node.h"
#include "separator.h"
#include "tree.h"
#include <ctype.h>
-
#include <qdebug.h>
#include <qlist.h>
#include <qiterator.h>
#include <qtextcodec.h>
+#include <QUuid>
QT_BEGIN_NAMESPACE
-#define COMMAND_VERSION Doc::alias("version")
+#define COMMAND_VERSION Doc::alias("version")
int DitaXmlGenerator::id = 0;
+#define cxxapi_d_xref Doc::alias("cxxapi-d-xref")
+#define cxxclass Doc::alias("cxxclass")
+#define cxxdefine Doc::alias("cxxdefine")
+#define cxxenumeration Doc::alias("cxxenumeration")
+#define cxxfile Doc::alias("cxxfile")
+#define cxxfunction Doc::alias("cxxfunction")
+#define cxxstruct Doc::alias("cxxstruct")
+#define cxxtypedef Doc::alias("cxxtypedef")
+#define cxxunion Doc::alias("cxxunion")
+#define cxxvariable Doc::alias("cxxvariable")
+
+#define CXXAPIMAP Doc::alias("cxxAPIMap")
+#define CXXCLASSREF Doc::alias("cxxClassRef")
+#define CXXDEFINEREF Doc::alias("cxxDefineRef")
+#define CXXENUMERATIONREF Doc::alias("cxxEnumerationRef")
+#define CXXFILEREF Doc::alias("cxxFileRef")
+#define CXXFUNCTIONREF Doc::alias("cxxFunctionRef")
+#define CXXSTRUCTREF Doc::alias("cxxStructRef")
+#define CXXTYPDEFREF Doc::alias("cxxTypedefRef")
+#define CXXUNIONREF Doc::alias("cxxUnionRef")
+#define CXXVARIABLEREF Doc::alias("cxxVariableRef")
+
+#define CXXCLASS Doc::alias("cxxClass")
+#define CXXCLASSABSTRACT Doc::alias("cxxClassAbstract")
+#define CXXCLASSACCESSSPECIFIER Doc::alias("cxxClassAccessSpecifier")
+#define CXXCLASSAPIITEMLOCATION Doc::alias("cxxClassAPIItemLocation")
+#define CXXCLASSBASECLASS Doc::alias("cxxClassBaseClass")
+#define CXXCLASSBASECLASSSTRUCT Doc::alias("cxxClassBaseStruct")
+#define CXXCLASSBASEUNION Doc::alias("cxxClassBaseUnion")
+#define CXXCLASSDECLARATIONFILE Doc::alias("cxxClassDeclarationFile")
+#define CXXCLASSDECLARATIONFILELINE Doc::alias("cxxClassDeclarationFileLine")
+#define CXXCLASSDEFINITION Doc::alias("cxxClassDefinition")
+#define CXXCLASSDEFINITIONFILE Doc::alias("cxxClassDefinitionFile")
+#define CXXCLASSDEFINITIONFILEEND Doc::alias("cxxClassDefinitionFileLineEnd")
+#define CXXCLASSDEFINITIONFILESTART Doc::alias("cxxClassDefinitionFileLineStart")
+#define CXXCLASSDERIVATION Doc::alias("cxxClassDerivation")
+#define CXXCLASSDERIVATIONACCESSSPECIFIER Doc::alias("cxxClassDerivationAccessSpecifier")
+#define CXXCLASSDERIVATIONS Doc::alias("cxxClassDerivations")
+#define CXXCLASSDERIVATIONVIRTUAL Doc::alias("cxxClassDerivationVirtual")
+#define CXXCLASSDETAIL Doc::alias("cxxClassDetail")
+#define CXXCLASSENUMERATIONINHERITED Doc::alias("cxxClassEnumerationInherited")
+#define CXXCLASSENUMERATORINHERITED Doc::alias("cxxClassEnumeratorInherited")
+#define CXXCLASSFUNCTIONINHERITED Doc::alias("cxxClassFunctionInherited")
+#define CXXCLASSINHERITS Doc::alias("cxxClassInherits")
+#define CXXCLASSINHERITSDETAIL Doc::alias("cxxClassInheritsDetail")
+#define CXXCLASSNESTED Doc::alias("cxxClassNested")
+#define CXXCLASSNESTEDCLASS Doc::alias("cxxClassNestedClass")
+#define CXXCLASSNESTEDDETAIL Doc::alias("cxxClassNestedDetail")
+#define CXXCLASSNESTEDSTRUCT Doc::alias("cxxClassNestedStruct")
+#define CXXCLASSNESTEDUNION Doc::alias("cxxClassNestedUnion")
+#define CXXCLASSTEMPLATEPARAMETER Doc::alias("cxxClassTemplateParameter")
+#define CXXCLASSTEMPLATEPARAMETERS Doc::alias("cxxClassTemplateParameters")
+#define CXXCLASSTEMPLATEPARAMETERTYPE Doc::alias("cxxClassTemplateParameterType")
+#define CXXCLASSVARIABLEINHERITED Doc::alias("cxxClassVariableInherited")
+
+#define CXXDEFINE Doc::alias("cxxDefine")
+#define CXXDEFINEACCESSSPECIFIER Doc::alias("cxxDefineAccessSpecifier")
+#define CXXDEFINEAPIITEMLOCATION Doc::alias("cxxDefineAPIItemLocation")
+#define CXXDEFINEDECLARATIONFILE Doc::alias("cxxDefineDeclarationFile")
+#define CXXDEFINEDECLARATIONFILELINE Doc::alias("cxxDefineDeclarationFileLine")
+#define CXXDEFINEDEFINITION Doc::alias("cxxDefineDefinition")
+#define CXXDEFINEDETAIL Doc::alias("cxxDefineDetail")
+#define CXXDEFINENAMELOOKUP Doc::alias("cxxDefineNameLookup")
+#define CXXDEFINEPARAMETER Doc::alias("cxxDefineParameter")
+#define CXXDEFINEPARAMETERDECLARATIONNAME Doc::alias("cxxDefineParameterDeclarationName")
+#define CXXDEFINEPARAMETERS Doc::alias("cxxDefineParameters")
+#define CXXDEFINEPROTOTYPE Doc::alias("cxxDefinePrototype")
+#define CXXDEFINEREIMPLEMENTED Doc::alias("cxxDefineReimplemented")
+
+#define CXXENUMERATION Doc::alias("cxxEnumeration")
+#define CXXENUMERATIONACCESSSPECIFIER Doc::alias("cxxEnumerationAccessSpecifier")
+#define CXXENUMERATIONAPIITEMLOCATION Doc::alias("cxxEnumerationAPIItemLocation")
+#define CXXENUMERATIONDECLARATIONFILE Doc::alias("cxxEnumerationDeclarationFile")
+#define CXXENUMERATIONDECLARATIONFILELINE Doc::alias("cxxEnumerationDeclarationFileLine")
+#define CXXENUMERATIONDEFINITION Doc::alias("cxxEnumerationDefinition")
+#define CXXENUMERATIONDEFINITIONFILE Doc::alias("cxxEnumerationDefinitionFile")
+#define CXXENUMERATIONDEFINITIONFILELINEEND Doc::alias("cxxEnumerationDefinitionFileLineEnd")
+#define CXXENUMERATIONDEFINITIONFILELINESTART Doc::alias("cxxEnumerationDefinitionFileLineStart")
+#define CXXENUMERATIONDETAIL Doc::alias("cxxEnumerationDetail")
+#define CXXENUMERATIONNAMELOOKUP Doc::alias("cxxEnumerationNameLookup")
+#define CXXENUMERATIONPROTOTYPE Doc::alias("cxxEnumerationPrototype")
+#define CXXENUMERATIONREIMPLEMENTED Doc::alias("cxxEnumerationReimplemented")
+#define CXXENUMERATIONSCOPEDNAME Doc::alias("cxxEnumerationScopedName")
+#define CXXENUMERATOR Doc::alias("cxxEnumerator")
+#define CXXENUMERATORAPIITEMLOCATION Doc::alias("cxxEnumeratorAPIItemLocation")
+#define CXXENUMERATORDECLARATIONFILE Doc::alias("cxxEnumeratorDeclarationFile")
+#define CXXENUMERATORDECLARATIONFILELINE Doc::alias("cxxEnumeratorDeclarationFileLine")
+#define CXXENUMERATORINITIALISER Doc::alias("cxxEnumeratorInitialiser")
+#define CXXENUMERATORNAMELOOKUP Doc::alias("cxxEnumeratorNameLookup")
+#define CXXENUMERATORPROTOTYPE Doc::alias("cxxEnumeratorPrototype")
+#define CXXENUMERATORS Doc::alias("cxxEnumerators")
+#define CXXENUMERATORSCOPEDNAME Doc::alias("cxxEnumeratorScopedName")
+
+#define CXXFILE_INFO_TYPES Doc::alias("cxxFile-info-types")
+#define CXXFILE_TYPES_DEFAULT Doc::alias("cxxFile-types-default")
+#define CXXFILE Doc::alias("cxxFile")
+#define CXXFILEAPIITMELOCATION Doc::alias("cxxFileAPIItemLocation")
+#define CXXFILEDECLARATIONFILE Doc::alias("cxxFileDeclarationFile")
+
+#define CXXFUNCTION Doc::alias("cxxFunction")
+#define CXXFUNCTIONACCESSSPECIFIER Doc::alias("cxxFunctionAccessSpecifier")
+#define CXXFUNCTIONAPIITEMLOCATION Doc::alias("cxxFunctionAPIItemLocation")
+#define CXXFUNCTIONCONST Doc::alias("cxxFunctionConst")
+#define CXXFUNCTIONCONSTRUCTOR Doc::alias("cxxFunctionConstructor")
+#define CXXFUNCTIONDECLARATIONFILE Doc::alias("cxxFunctionDeclarationFile")
+#define CXXFUNCTIONDECLARATIONFILELINE Doc::alias("cxxFunctionDeclarationFileLine")
+#define CXXFUNCTIONDECLAREDTYPE Doc::alias("cxxFunctionDeclaredType")
+#define CXXFUNCTIONDEFINITION Doc::alias("cxxFunctionDefinition")
+#define CXXFUNCTIONDEFINITIONFILE Doc::alias("cxxFunctionDefinitionFile")
+#define CXXFUNCTIONDEFINITIONFILELINEEND Doc::alias("cxxFunctionDefinitionFileLineEnd")
+#define CXXFUNCTIONDEFINITIONFILELINESTART Doc::alias("cxxFunctionDefinitionFileLineStart")
+#define CXXFUNCTIONDESTRUCTOR Doc::alias("cxxFunctionDestructor")
+#define CXXFUNCTIONDETAIL Doc::alias("cxxFunctionDetail")
+#define CXXFUNCTIONEXPLICIT Doc::alias("cxxFunctionExplicit")
+#define CXXFUNCTIONINLINE Doc::alias("cxxFunctionInline")
+#define CXXFUNCTIONNAMELOOKUP Doc::alias("cxxFunctionNameLookup")
+#define CXXFUNCTIONPARAMETER Doc::alias("cxxFunctionParameter")
+#define CXXFUNCTIONPARAMETERDECLARATIONNAME Doc::alias("cxxFunctionParameterDeclarationName")
+#define CXXFUNCTIONPARAMETERDECLAREDTYPE Doc::alias("cxxFunctionParameterDeclaredType")
+#define CXXFUNCTIONPARAMETERDEFAULTVALUE Doc::alias("cxxFunctionParameterDefaultValue")
+#define CXXFUNCTIONPARAMETERDEFINITIONNAME Doc::alias("cxxFunctionParameterDefinitionName")
+#define CXXFUNCTIONPARAMETERS Doc::alias("cxxFunctionParameters")
+#define CXXFUNCTIONPROTOTYPE Doc::alias("cxxFunctionPrototype")
+#define CXXFUNCTIONPUREVIRTUAL Doc::alias("cxxFunctionPureVirtual")
+#define CXXFUNCTIONREIMPLEMENTED Doc::alias("cxxFunctionReimplemented")
+#define CXXFUNCTIONRETURNTYPE Doc::alias("cxxFunctionReturnType")
+#define CXXFUNCTIONSCOPEDNAME Doc::alias("cxxFunctionScopedName")
+#define CXXFUNCTIONSTORAGECLASSSPECIFIEREXTERN Doc::alias("cxxFunctionStorageClassSpecifierExtern")
+#define CXXFUNCTIONSTORAGECLASSSPECIFIERMUTABLE Doc::alias("cxxFunctionStorageClassSpecifierMutable")
+#define CXXFUNCTIONSTORAGECLASSSPECIFIERSTATIC Doc::alias("cxxFunctionStorageClassSpecifierStatic")
+#define CXXFUNCTIONTEMPLATEPARAMETER Doc::alias("cxxFunctionTemplateParameter")
+#define CXXFUNCTIONTEMPLATEPARAMETERS Doc::alias("cxxFunctionTemplateParameters")
+#define CXXFUNCTIONTEMPLATEPARAMETERTYPE Doc::alias("cxxFunctionTemplateParameterType")
+#define CXXFUNCTIONVIRTUAL Doc::alias("cxxFunctionVirtual")
+#define CXXFUNCTIONVOLATILE Doc::alias("cxxFunctionVolatile")
+
+#define CXXSTRUCT Doc::alias("cxxStruct")
+#define CXXSTRUCTABSTRACT Doc::alias("cxxStructAbstract")
+#define CXXSTRUCTACCESSSPECIFIER Doc::alias("cxxStructAccessSpecifier")
+#define CXXSTRUCTAPIITEMLOCATION Doc::alias("cxxStructAPIItemLocation")
+#define CXXSTRUCTBASECLASS Doc::alias("cxxStructBaseClass")
+#define CXXSTRUCTBASESTRUCT Doc::alias("cxxStructBaseStruct")
+#define CXXSTRUCTBASEUNION Doc::alias("cxxStructBaseUnion")
+#define CXXSTRUCTDECLARATIONFILE Doc::alias("cxxStructDeclarationFile")
+#define CXXSTRUCTDECLARATIONFILELINE Doc::alias("cxxStructDeclarationFileLine")
+#define CXXSTRUCTDEFINITION Doc::alias("cxxStructDefinition")
+#define CXXSTRUCTDEFINITIONFILE Doc::alias("cxxStructDefinitionFile")
+#define CXXSTRUCTDEFINITIONFILELINEEND Doc::alias("cxxStructDefinitionFileLineEnd")
+#define CXXSTRUCTDEFINITIONFILELINESTART Doc::alias("cxxStructDefinitionFileLineStart")
+#define CXXSTRUCTDERIVATION Doc::alias("cxxStructDerivation")
+#define CXXSTRUCTDERIVATIONACCESSSPECIFIER Doc::alias("cxxStructDerivationAccessSpecifier")
+#define CXXSTRUCTDERIVATIONS Doc::alias("cxxStructDerivations")
+#define CXXSTRUCTDERIVATIONVIRTUAL Doc::alias("cxxStructDerivationVirtual")
+#define CXXSTRUCTDETAIL Doc::alias("cxxStructDetail")
+#define CXXSTRUCTENUMERATIONINHERITED Doc::alias("cxxStructEnumerationInherited")
+#define CXXSTRUCTENUMERATORINHERITED Doc::alias("cxxStructEnumeratorInherited")
+#define CXXSTRUCTFUNCTIONINHERITED Doc::alias("cxxStructFunctionInherited")
+#define CXXSTRUCTINHERITS Doc::alias("cxxStructInherits")
+#define CXXSTRUCTINHERITSDETAIL Doc::alias("cxxStructInheritsDetail")
+#define CXXSTRUCTNESTED Doc::alias("cxxStructNested")
+#define CXXSTRUCTNESTEDCLASS Doc::alias("cxxStructNestedClass")
+#define CXXSTRUCTNESTEDDETAIL Doc::alias("cxxStructNestedDetail")
+#define CXXSTRUCTNESTEDSTRUCT Doc::alias("cxxStructNestedStruct")
+#define CXXSTRUCTNESTEDUNION Doc::alias("cxxStructNestedUnion")
+#define CXXSTRUCTTEMPLATEPARAMETER Doc::alias("cxxStructTemplateParameter")
+#define CXXSTRUCTTEMPLATEPARAMETERS Doc::alias("cxxStructTemplateParameters")
+#define CXXSTRUCTTEMPLATEPARAMETERTYPE Doc::alias("cxxStructTemplateParameterType")
+#define CXXSTRUCTVARIABLEINHERITED Doc::alias("cxxStructVariableInherited")
+
+#define CXXTYPEDEF Doc::alias("cxxTypedef")
+#define CXXTYPEDEFACCESSSPECIFIER Doc::alias("cxxTypedefAccessSpecifier")
+#define CXXTYPEDEFAPIITEMLOCATION Doc::alias("cxxTypedefAPIItemLocation")
+#define CXXTYPEDEFDECLARATIONFILE Doc::alias("cxxTypedefDeclarationFile")
+#define CXXTYPEDEFDECLARATIONFILELINE Doc::alias("cxxTypedefDeclarationFileLine")
+#define CXXTYPEDEFDECLAREDTYPE Doc::alias("cxxTypedefDeclaredType")
+#define CXXTYPEDEFDEFINITION Doc::alias("cxxTypedefDefinition")
+#define CXXTYPEDEFDETAIL Doc::alias("cxxTypedefDetail")
+#define CXXTYPEDEFNAMELOOKUP Doc::alias("cxxTypedefNameLookup")
+#define CXXTYPEDEFPROTOTYPE Doc::alias("cxxTypedefPrototype")
+#define CXXTYPEDEFREIMPLEMENTED Doc::alias("cxxTypedefReimplemented")
+#define CXXTYPEDEFSCOPEDNAME Doc::alias("cxxTypedefScopedName")
+
+#define CXXUNION Doc::alias("cxxUnion")
+#define CXXUNIONABSTRACT Doc::alias("cxxUnionAbstract")
+#define CXXUNIONACCESSSPECIFIER Doc::alias("cxxUnionAccessSpecifier")
+#define CXXUNIONAPIITEMLOCATION Doc::alias("cxxUnionAPIItemLocation")
+#define CXXUNIONDECLARATIONFILE Doc::alias("cxxUnionDeclarationFile")
+#define CXXUNIONDECLARATIONFILELINE Doc::alias("cxxUnionDeclarationFileLine")
+#define CXXUNIONDEFINITION Doc::alias("cxxUnionDefinition")
+#define CXXUNIONDEFINITIONFILE Doc::alias("cxxUnionDefinitionFile")
+#define CXXUNIONDEFINITIONFILELINEEND Doc::alias("cxxUnionDefinitionFileLineEnd")
+#define CXXUNIONDEFINITIONFILELINESTART Doc::alias("cxxUnionDefinitionFileLineStart")
+#define CXXUNIONDETAIL Doc::alias("cxxUnionDetail")
+#define CXXUNIONNESTED Doc::alias("cxxUnionNested")
+#define CXXUNIONNESTEDCLASS Doc::alias("cxxUnionNestedClass")
+#define CXXUNIONNESTEDDETAIL Doc::alias("cxxUnionNestedDetail")
+#define CXXUNIONNESTEDSTRUCT Doc::alias("cxxUnionNestedStruct")
+#define CXXUNIONNESTEDUNION Doc::alias("cxxUnionNestedUnion")
+#define CXXUNIONTEMPLATEPARAMETER Doc::alias("cxxUnionTemplateParameter")
+#define CXXUNIONTEMPLATEPARAMETERS Doc::alias("cxxUnionTemplateParameters")
+#define CXXUNIONTEMPLATEPARAMETERTYPE Doc::alias("cxxUnionTemplateParameterType")
+
+#define CXXVARIABLE Doc::alias("cxxVariable")
+#define CXXVARIABLEACCESSSPECIFIER Doc::alias("cxxVariableAccessSpecifier")
+#define CXXVARIABLEAPIITEMLOCATION Doc::alias("cxxVariableAPIItemLocation")
+#define CXXVARIABLECONST Doc::alias("cxxVariableConst")
+#define CXXVARIABLEDECLARATIONFILE Doc::alias("cxxVariableDeclarationFile")
+#define CXXVARIABLEDECLARATIONFILELINE Doc::alias("cxxVariableDeclarationFileLine")
+#define CXXVARIABLEDECLAREDTYPE Doc::alias("cxxVariableDeclaredType")
+#define CXXVARIABLEDEFINITION Doc::alias("cxxVariableDefinition")
+#define CXXVARIABLEDETAIL Doc::alias("cxxVariableDetail")
+#define CXXVARIABLENAMELOOKUP Doc::alias("cxxVariableNameLookup")
+#define CXXVARIABLEPROTOTYPE Doc::alias("cxxVariablePrototype")
+#define CXXVARIABLEREIMPLEMENTED Doc::alias("cxxVariableReimplemented")
+#define CXXVARIABLESCOPEDNAME Doc::alias("cxxVariableScopedName")
+#define CXXVARIABLESTORAGECLASSSPECIFIEREXTERN Doc::alias("cxxVariableStorageClassSpecifierExtern")
+#define CXXVARIABLESTORAGECLASSSPECIFIERMUTABLE Doc::alias("cxxVariableStorageClassSpecifierMutable")
+#define CXXVARIABLESTORAGECLASSSPECIFIERSTATIC Doc::alias("cxxVariableStorageClassSpecifierStatic")
+#define CXXVARIABLEVOLATILE Doc::alias("cxxVariableVolatile")
+
+#define APIREF Doc::alias("apiRef")
+#define APINAME Doc::alias("apiName")
+#define APIDETAIL Doc::alias("apiDetail")
+#define APISYNTAX Doc::alias("apiSyntax")
+#define APISYNTAXTEXT Doc::alias("apiSyntaxText")
+#define APISYNTAXITEM Doc::alias("apiSyntaxItem")
+#define APIDEF Doc::alias("apiDef")
+#define APIQUALIFIER Doc::alias("apiQualifier")
+#define APIRELATION Doc::alias("apiRelation")
+#define APITYPE Doc::alias("apiType")
+#define APIARRAY Doc::alias("apiArray")
+#define APIDATA Doc::alias("apiData")
+#define APIDEFNOTE Doc::alias("apiDefNote")
+#define APIDEFITEM Doc::alias("apiDefItem")
+#define APIITEMNAME Doc::alias("apiItemName")
+#define APIDESC Doc::alias("apiDesc")
+#define APIIMPL Doc::alias("apiImpl")
+
+#define APIPACKAGE Doc::alias("apiPackage")
+
+#define APICLASSIFIER Doc::alias("apiClassifier")
+#define APICLASSIFIERDETAIL Doc::alias("apiClassifierDetail")
+#define APICLASSIFIERDEF Doc::alias("apiClassifierDef")
+#define APICLASSIFIERMEMBER Doc::alias("apiClassifierMember")
+#define APIOTHERCLASSIFIER Doc::alias("apiOtherClassifier")
+#define APIBASECLASSIFIER Doc::alias("apiBaseClassifier")
+
+#define APIOPERATION Doc::alias("apiOperation")
+#define APIOPERATIONDETAIL Doc::alias("apiOperationDetail")
+#define APIOPERATIONDEF Doc::alias("apiOperationDef")
+#define APIRETURN Doc::alias("apiReturn")
+#define APIPARAM Doc::alias("apiParam")
+#define APIEVENT Doc::alias("apiEvent")
+#define APIOPERATIONDEFITEM Doc::alias("apiOperationDefItem")
+#define APIOPERATIONCLASSIFIER Doc::alias("apiOperationClassifier")
+#define APICONSTRUCTORDEF Doc::alias("apiConstructorDef")
+
+#define APIVALUE Doc::alias("apiValue")
+#define APIVALUEDETAIL Doc::alias("apiValueDetail")
+#define APIVALUEDEF Doc::alias("apiValueDef")
+#define APIVALUEMEMBER Doc::alias("apiValueMember")
+#define APIVALUECLASSIFIER Doc::alias("apiValueClassifier")
+
+#define APIclassifier Doc::alias("apiclassifier")
+#define APIoperation Doc::alias("apioperation")
+#define APIpackage Doc::alias("apipackage")
+#define APIvalue Doc::alias("apivalue")
+
+#define APIMAP Doc::alias("apiMap")
+#define APIITEMREF Doc::alias("apiItemRef")
+
+#define SHORTDESC Doc::alias("shortdesc")
+
QString DitaXmlGenerator::sinceTitles[] =
{
" New Namespaces",
@@ -88,11 +360,11 @@ static void addLink(const QString &linkTarget,
QString *res)
{
if (!linkTarget.isEmpty()) {
- *res += "<a href=\"";
+ *res += "<xref href=\"";
*res += linkTarget;
*res += "\">";
*res += nestedStuff;
- *res += "</a>";
+ *res += "</xref>";
}
else {
*res += nestedStuff;
@@ -101,8 +373,7 @@ static void addLink(const QString &linkTarget,
DitaXmlGenerator::DitaXmlGenerator()
- : helpProjectWriter(0),
- inLink(false),
+ : inLink(false),
inContents(false),
inSectionHeading(false),
inTableHeader(false),
@@ -112,32 +383,31 @@ DitaXmlGenerator::DitaXmlGenerator()
funcLeftParen("\\S(\\()"),
myTree(0),
slow(false),
- obsoleteLinks(false)
+ obsoleteLinks(false),
+ noLinks(0)
{
}
DitaXmlGenerator::~DitaXmlGenerator()
{
- if (helpProjectWriter)
- delete helpProjectWriter;
+ // nothing yet.
}
void DitaXmlGenerator::initializeGenerator(const Config &config)
{
static const struct {
const char *key;
- const char *left;
- const char *right;
+ const char *tag;
} defaults[] = {
- { ATOM_FORMATTING_BOLD, "<b>", "</b>" },
- { ATOM_FORMATTING_INDEX, "<!--", "-->" },
- { ATOM_FORMATTING_ITALIC, "<i>", "</i>" },
- { ATOM_FORMATTING_PARAMETER, "<i>", "</i>" },
- { ATOM_FORMATTING_SUBSCRIPT, "<sub>", "</sub>" },
- { ATOM_FORMATTING_SUPERSCRIPT, "<sup>", "</sup>" },
- { ATOM_FORMATTING_TELETYPE, "<tt>", "</tt>" },
- { ATOM_FORMATTING_UNDERLINE, "<u>", "</u>" },
- { 0, 0, 0 }
+ { ATOM_FORMATTING_BOLD, "b" },
+ { ATOM_FORMATTING_INDEX, "<!--" },
+ { ATOM_FORMATTING_ITALIC, "i" },
+ { ATOM_FORMATTING_PARAMETER, "i" },
+ { ATOM_FORMATTING_SUBSCRIPT, "sub" },
+ { ATOM_FORMATTING_SUPERSCRIPT, "sup" },
+ { ATOM_FORMATTING_TELETYPE, "tt", },
+ { ATOM_FORMATTING_UNDERLINE, "u", },
+ { 0, 0 }
};
Generator::initializeGenerator(config);
@@ -145,8 +415,7 @@ void DitaXmlGenerator::initializeGenerator(const Config &config)
setImageFileExtensions(QStringList() << "png" << "jpg" << "jpeg" << "gif");
int i = 0;
while (defaults[i].key) {
- formattingLeftMap().insert(defaults[i].key, defaults[i].left);
- formattingRightMap().insert(defaults[i].key, defaults[i].right);
+ formattingLeftMap().insert(defaults[i].key, defaults[i].tag);
i++;
}
@@ -219,9 +488,6 @@ void DitaXmlGenerator::initializeGenerator(const Config &config)
DITAXMLGENERATOR_CUSTOMHEADELEMENTS);
codeIndent = config.getInt(CONFIG_CODEINDENT);
- helpProjectWriter = new HelpProjectWriter(config,
- project.toLower() +
- ".qhp");
}
void DitaXmlGenerator::terminateGenerator()
@@ -235,23 +501,39 @@ QString DitaXmlGenerator::format()
}
/*!
- This is where the html files and dcf files are written.
- \note The html file generation is done in the base class,
+ Calls lookupGuid() to get a GUID for \a text, then writes
+ it to the XML stream as an "id" attribute, and returns it.
+ */
+QString DitaXmlGenerator::writeGuidAttribute(QString text)
+{
+ QString guid = lookupGuid(text);
+ writer.writeAttribute("id",guid);
+ return guid;
+}
+
+/*!
+ Looks up \a text in the GUID map. If it finds \a text,
+ it returns the associated GUID. Otherwise it inserts
+ \a text into the map with a new GUID, and it returns
+ the new GUID.
+ */
+QString DitaXmlGenerator::lookupGuid(QString text)
+{
+ QMap<QString, QString>::const_iterator i = name2guidMap.find(text);
+ if (i != name2guidMap.end())
+ return i.value();
+ QString guid = QUuid::createUuid().toString();
+ name2guidMap.insert(text,guid);
+ return guid;
+}
+
+/*!
+ This is where the DITA XML files are written.
+ \note The file generation is done in the base class,
PageGenerator::generateTree().
*/
void DitaXmlGenerator::generateTree(const Tree *tree, CodeMarker *marker)
{
-#if 0
- // Copy the stylesheets from the directory containing the qdocconf file.
- // ### This should be changed to use a special directory in doc/src.
- QStringList::ConstIterator styleIter = stylesheets.begin();
- QDir configPath = QDir::current();
- while (styleIter != stylesheets.end()) {
- QString filePath = configPath.absoluteFilePath(*styleIter);
- Config::copyFile(Location(), filePath, filePath, outputDir());
- ++styleIter;
- }
-#endif
myTree = tree;
nonCompatClasses.clear();
mainClasses.clear();
@@ -266,59 +548,13 @@ void DitaXmlGenerator::generateTree(const Tree *tree, CodeMarker *marker)
findAllFunctions(tree->root());
findAllLegaleseTexts(tree->root());
findAllNamespaces(tree->root());
-#ifdef ZZZ_QDOC_QML
- findAllQmlClasses(tree->root());
-#endif
findAllSince(tree->root());
PageGenerator::generateTree(tree, marker);
-
- dcfClassesRoot.ref = "classes.html";
- dcfClassesRoot.title = "Classes";
- qSort(dcfClassesRoot.subsections);
-
- dcfOverviewsRoot.ref = "overviews.html";
- dcfOverviewsRoot.title = "Overviews";
- qSort(dcfOverviewsRoot.subsections);
-
- dcfExamplesRoot.ref = "examples.html";
- dcfExamplesRoot.title = "Tutorial & Examples";
- qSort(dcfExamplesRoot.subsections);
-
- DcfSection qtRoot;
- appendDcfSubSection(&qtRoot, dcfClassesRoot);
- appendDcfSubSection(&qtRoot, dcfOverviewsRoot);
- appendDcfSubSection(&qtRoot, dcfExamplesRoot);
-
- generateDcf(project.toLower().simplified().replace(" ", "-"),
- "index.html",
- projectDescription, qtRoot);
- generateDcf("designer",
- "designer-manual.html",
- "Qt Designer Manual",
- dcfDesignerRoot);
- generateDcf("linguist",
- "linguist-manual.html",
- "Qt Linguist Manual",
- dcfLinguistRoot);
- generateDcf("assistant",
- "assistant-manual.html",
- "Qt Assistant Manual",
- dcfAssistantRoot);
- generateDcf("qmake",
- "qmake-manual.html",
- "qmake Manual",
- dcfQmakeRoot);
-
- QString fileBase = project.toLower().simplified().replace(" ", "-");
- generateIndex(fileBase, projectUrl, projectDescription);
- generatePageIndex(outputDir() + "/" + fileBase + ".pageindex", marker);
-
- helpProjectWriter->generate(myTree);
}
-void DitaXmlGenerator::startText(const Node * /* relative */,
- CodeMarker * /* marker */)
+void DitaXmlGenerator::startText(const Node* /* relative */,
+ CodeMarker* /* marker */)
{
inLink = false;
inContents = false;
@@ -334,19 +570,21 @@ void DitaXmlGenerator::startText(const Node * /* relative */,
Generate html from an instance of Atom.
*/
int DitaXmlGenerator::generateAtom(const Atom *atom,
- const Node *relative,
- CodeMarker *marker)
+ const Node *relative,
+ CodeMarker *marker)
{
int skipAhead = 0;
+ QString hx;
static bool in_para = false;
-
+ QString guid;
+
switch (atom->type()) {
case Atom::AbstractLeft:
break;
case Atom::AbstractRight:
break;
case Atom::AutoLink:
- if (!inLink && !inContents && !inSectionHeading) {
+ if ((noLinks > 0) && !inLink && !inContents && !inSectionHeading) {
const Node *node = 0;
QString link = getLink(atom, relative, marker, &node);
if (!link.isEmpty()) {
@@ -355,11 +593,11 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
endLink();
}
else {
- out() << protectEnc(atom->string());
+ writer.writeCharacters(protectEnc(atom->string()));
}
}
else {
- out() << protectEnc(atom->string());
+ writer.writeCharacters(protectEnc(atom->string()));
}
break;
case Atom::BaseName:
@@ -369,8 +607,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
skipAhead = skipAtoms(atom, Atom::BriefRight);
break;
}
-
- out() << "<p>";
+ writer.writeStartElement(SHORTDESC);
if (relative->type() == Node::Property ||
relative->type() == Node::Variable) {
QString str;
@@ -385,88 +622,102 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
str[0] = str[0].toLower();
if (str.right(1) == ".")
str.truncate(str.length() - 1);
- out() << "This ";
+ writer.writeCharacters("This ");
if (relative->type() == Node::Property)
- out() << "property";
+ writer.writeCharacters("property");
else
- out() << "variable";
+ writer.writeCharacters("variable");
QStringList words = str.split(" ");
if (!(words.first() == "contains" || words.first() == "specifies"
|| words.first() == "describes" || words.first() == "defines"
|| words.first() == "holds" || words.first() == "determines"))
- out() << " holds ";
+ writer.writeCharacters(" holds ");
else
- out() << " ";
- out() << str << ".";
+ writer.writeCharacters(" ");
+ writer.writeCharacters(str + ".");
}
break;
case Atom::BriefRight:
- if (relative->type() != Node::Fake)
- out() << "</p>\n";
+ if (relative->type() != Node::Fake) {
+ writer.writeEndElement(); // </shortdesc>
+ }
break;
case Atom::C:
- out() << formattingLeftMap()[ATOM_FORMATTING_TELETYPE];
+ writer.writeStartElement(formattingLeftMap()[ATOM_FORMATTING_TELETYPE]);
if (inLink) {
- out() << protectEnc(plainCode(atom->string()));
+ writer.writeCharacters(protectEnc(plainCode(atom->string())));
}
else {
- out() << highlightedCode(atom->string(), marker, relative);
+ writer.writeCharacters(highlightedCode(atom->string(), marker, relative));
}
- out() << formattingRightMap()[ATOM_FORMATTING_TELETYPE];
+ writer.writeEndElement(); // sse writeStartElement() above
break;
case Atom::Code:
- out() << "<pre class=\"highlightedCode\">"
- << trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
- marker,relative))
- << "</pre>\n";
+ writer.writeStartElement("pre");
+ writer.writeAttribute("outputclass","highlightedCode");
+ writer.writeCharacters(trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
+ marker,
+ relative)));
+ writer.writeEndElement(); // </pre>
break;
#ifdef QDOC_QML
case Atom::Qml:
- out() << "<pre class=\"highlightedCode\">"
- << trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
- marker,relative))
- << "</pre>\n";
+ writer.writeStartElement("pre");
+ writer.writeAttribute("outputclass","highlightedCode");
+ writer.writeCharacters(trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
+ marker,
+ relative)));
+ writer.writeEndElement(); // pre
break;
#endif
case Atom::CodeNew:
- out() << "<p>you can rewrite it as</p>\n"
- << "<pre class=\"highlightedCode\">"
- << trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
- marker,relative))
- << "</pre>\n";
+ writer.writeStartElement("p");
+ writer.writeCharacters("you can rewrite it as");
+ writer.writeEndElement(); // </p>
+ writer.writeStartElement("pre");
+ writer.writeAttribute("outputclass","highlightedCode");
+ writer.writeCharacters(trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
+ marker,
+ relative)));
+ writer.writeEndElement(); // </pre>
break;
case Atom::CodeOld:
- out() << "<p>For example, if you have code like</p>\n";
+ writer.writeStartElement("p");
+ writer.writeCharacters("For example, if you have code like");
+ writer.writeEndElement(); // </p>
// fallthrough
case Atom::CodeBad:
- out() << "<pre class=\"highlightedCode\">"
- << trimmedTrailing(protectEnc(plainCode(indent(codeIndent,atom->string()))))
- << "</pre>\n";
+ writer.writeStartElement("pre");
+ writer.writeAttribute("outputclass","highlightedCode");
+ writer.writeCharacters(trimmedTrailing(protectEnc(plainCode(indent(codeIndent,atom->string())))));
+ writer.writeEndElement(); // </pre>
break;
case Atom::FootnoteLeft:
// ### For now
if (in_para) {
- out() << "</p>\n";
+ writer.writeEndElement(); // </p>
in_para = false;
}
- out() << "<!-- ";
+ writer.writeCharacters("<!-- ");
break;
case Atom::FootnoteRight:
// ### For now
- out() << "-->";
+ writer.writeCharacters("-->");
break;
case Atom::FormatElse:
case Atom::FormatEndif:
case Atom::FormatIf:
break;
case Atom::FormattingLeft:
- out() << formattingLeftMap()[atom->string()];
+ writer.writeStartElement(formattingLeftMap()[atom->string()]);
if (atom->string() == ATOM_FORMATTING_PARAMETER) {
if (atom->next() != 0 && atom->next()->type() == Atom::String) {
QRegExp subscriptRegExp("([a-z]+)_([0-9n])");
if (subscriptRegExp.exactMatch(atom->next()->string())) {
- out() << subscriptRegExp.cap(1) << "<sub>"
- << subscriptRegExp.cap(2) << "</sub>";
+ writer.writeCharacters(subscriptRegExp.cap(1));
+ writer.writeStartElement("sub");
+ writer.writeCharacters(subscriptRegExp.cap(2));
+ writer.writeEndElement(); // </sub>
skipAhead = 1;
}
}
@@ -477,7 +728,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
endLink();
}
else {
- out() << formattingRightMap()[atom->string()];
+ writer.writeEndElement(); // ?
}
break;
case Atom::AnnotatedList:
@@ -676,30 +927,31 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
/*
First generate the table of contents.
*/
- out() << "<ul>\n";
+ writer.writeStartElement("ul");
s = sections.constBegin();
while (s != sections.constEnd()) {
if (!(*s).members.isEmpty()) {
- out() << "<li>"
- << "<a href=\"#"
- << Doc::canonicalTitle((*s).name)
- << "\">"
- << (*s).name
- << "</a></li>\n";
+ writer.writeStartElement("li");
+ writer.writeStartElement("xref");
+ writer.writeAttribute("href",QString("#" + Doc::canonicalTitle((*s).name)));
+ writer.writeCharacters((*s).name);
+ writer.writeEndElement(); // </xref>
+ writer.writeEndElement(); // </li>
}
++s;
}
- out() << "</ul>\n";
+ writer.writeEndElement(); // </ul>
int idx = 0;
s = sections.constBegin();
while (s != sections.constEnd()) {
if (!(*s).members.isEmpty()) {
- out() << "<a name=\""
- << Doc::canonicalTitle((*s).name)
- << "\"></a>\n";
- out() << "<h3>" << protectEnc((*s).name) << "</h3>\n";
+ writer.writeStartElement("p");
+ writeGuidAttribute(Doc::canonicalTitle((*s).name));
+ writer.writeAttribute("outputclass","h3");
+ writer.writeCharacters(protectEnc((*s).name));
+ writer.writeEndElement(); // </p>
if (idx == Class)
generateCompactList(0, marker, ncmap.value(), false, QString("Q"));
else if (idx == QmlClass)
@@ -719,17 +971,18 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
pmap = parentmaps.begin();
while (pmap != parentmaps.end()) {
NodeList nlist = pmap->values();
- out() << "<p>Class ";
-
- out() << "<a href=\""
- << linkForNode(pmap.key(), 0)
- << "\">";
+ writer.writeStartElement("p");
+ writer.writeCharacters("Class ");
+ writer.writeStartElement("xref");
+ writer.writeAttribute("href",linkForNode(pmap.key(), 0));
QStringList pieces = fullName(pmap.key(), 0, marker).split("::");
- out() << protectEnc(pieces.last());
- out() << "</a>" << ":</p>\n";
+ writer.writeCharacters(protectEnc(pieces.last()));
+ writer.writeEndElement(); // </xref>
+ writer.writeCharacters(":");
+ writer.writeEndElement(); // </p>
generateSection(nlist, 0, marker, CodeMarker::Summary);
- out() << "<br/>";
+ writer.writeEmptyElement("br");
++pmap;
}
}
@@ -749,33 +1002,40 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
QString text;
if (atom->next() != 0)
text = atom->next()->string();
- if (atom->type() == Atom::Image)
- out() << "<p class=\"centerAlign\">";
+ if (atom->type() == Atom::Image) {
+ writer.writeStartElement("p");
+ writer.writeAttribute("outputclass","centerAlign");
+ }
if (fileName.isEmpty()) {
- out() << "<font color=\"red\">[Missing image "
- << protectEnc(atom->string()) << "]</font>";
+ writer.writeStartElement("font");
+ writer.writeAttribute("color","red");
+ writer.writeCharacters("[Missing image: ");
+ writer.writeCharacters(protectEnc(atom->string()));
+ writer.writeEndElement(); // </font>
}
else {
- out() << "<img src=\"" << protectEnc(fileName) << "\"";
+ writer.writeStartElement("img");
+ writer.writeAttribute("src",protectEnc(fileName));
if (!text.isEmpty())
- out() << " alt=\"" << protectEnc(text) << "\"";
- out() << " />";
- helpProjectWriter->addExtraFile(fileName);
+ writer.writeAttribute("alt",protectEnc(text));
+ writer.writeEndElement(); // </img>
}
if (atom->type() == Atom::Image)
- out() << "</p>";
+ writer.writeEndElement(); // </p>
}
break;
case Atom::ImageText:
+ // nothing
break;
case Atom::LegaleseLeft:
- out() << "<div class=\"LegaleseLeft\">";
+ writer.writeStartElement("p");
+ writer.writeAttribute("outputclass","legalese");
break;
case Atom::LegaleseRight:
- out() << "</div>";
+ writer.writeEndElement(); // </p>
break;
case Atom::LineBreak:
- out() << "<br/>";
+ writer.writeEmptyElement("br");
break;
case Atom::Link:
{
@@ -799,69 +1059,83 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
break;
case Atom::ListLeft:
if (in_para) {
- out() << "</p>\n";
+ writer.writeEndElement(); // </p>
in_para = false;
}
if (atom->string() == ATOM_LIST_BULLET) {
- out() << "<ul>\n";
+ writer.writeStartElement("ul");
}
else if (atom->string() == ATOM_LIST_TAG) {
- out() << "<dl>\n";
+ writer.writeStartElement("dl");
}
else if (atom->string() == ATOM_LIST_VALUE) {
threeColumnEnumValueTable = isThreeColumnEnumValueTable(atom);
if (threeColumnEnumValueTable) {
- out() << "<table class=\"valuelist\">";
- // << "<tr>"
- if (++numTableRows % 2 == 1)
- out() << "<tr class=\"odd\">";
- else
- out() << "<tr class=\"even\">";
-
- out() << "<tr><th>Constant</th>"
- << "<th>Value</th>"
- << "<th>Description</th></tr>\n";
+ writer.writeStartElement("table");
+ writer.writeAttribute("outputclass","valuelist");
+ writer.writeStartElement("tr");
+ if (++numTableRows % 2 == 1)
+ writer.writeAttribute("outputclass","odd");
+ else
+ writer.writeAttribute("outputclass","even");
+ writer.writeStartElement("th");
+ writer.writeCharacters("Constant");
+ writer.writeEndElement(); // </th>
+ writer.writeStartElement("th");
+ writer.writeCharacters("Value");
+ writer.writeEndElement(); // </th>
+ writer.writeStartElement("th");
+ writer.writeCharacters("Description");
+ writer.writeEndElement(); // </th>
+ writer.writeEndElement(); // </tr>
}
else {
- out() << "<table class=\"valuelist\">"
- << "<tr><th>Constant</th><th>Value</th></tr>\n";
+ writer.writeStartElement("table");
+ writer.writeAttribute("outputclass","valuelist");
+ writer.writeStartElement("tr");
+ writer.writeStartElement("th");
+ writer.writeCharacters("Constant");
+ writer.writeEndElement(); // </th>
+ writer.writeStartElement("th");
+ writer.writeCharacters("Value");
+ writer.writeEndElement(); // </th>
+ writer.writeEndElement(); // </tr>
}
}
else {
- out() << "<ol type=";
- if (atom->string() == ATOM_LIST_UPPERALPHA) {
- out() << "\"A\"";
- } /* why type? */
- else if (atom->string() == ATOM_LIST_LOWERALPHA) {
- out() << "\"a\"";
- }
- else if (atom->string() == ATOM_LIST_UPPERROMAN) {
- out() << "\"I\"";
- }
- else if (atom->string() == ATOM_LIST_LOWERROMAN) {
- out() << "\"i\"";
- }
- else { // (atom->string() == ATOM_LIST_NUMERIC)
- out() << "\"1\"";
- }
+ writer.writeStartElement("ol");
+ if (atom->string() == ATOM_LIST_UPPERALPHA)
+ writer.writeAttribute("type","A");
+ else if (atom->string() == ATOM_LIST_LOWERALPHA)
+ writer.writeAttribute("type","a");
+ else if (atom->string() == ATOM_LIST_UPPERROMAN)
+ writer.writeAttribute("type","I");
+ else if (atom->string() == ATOM_LIST_LOWERROMAN)
+ writer.writeAttribute("type","i");
+ else // (atom->string() == ATOM_LIST_NUMERIC)
+ writer.writeAttribute("type","1");
if (atom->next() != 0 && atom->next()->string().toInt() != 1)
- out() << " start=\"" << atom->next()->string() << "\"";
- out() << ">\n";
+ writer.writeAttribute("start",atom->next()->string());
}
break;
case Atom::ListItemNumber:
+ // nothing
break;
case Atom::ListTagLeft:
if (atom->string() == ATOM_LIST_TAG) {
- out() << "<dt>";
+ writer.writeStartElement("dt");
}
else { // (atom->string() == ATOM_LIST_VALUE)
- // ### Trenton
-
- out() << "<tr><td class=\"topAlign\"><tt>"
- << protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(),
- relative)))
- << "</tt></td><td class=\" topAlign\">";
+ writer.writeStartElement("tr");
+ writer.writeStartElement("td");
+ writer.writeAttribute("outputclass","topAlign");
+ writer.writeStartElement("tt");
+ writer.writeCharacters(protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(),
+ relative))));
+ writer.writeEndElement(); // </tt>
+ writer.writeEndElement(); // </td>
+ writer.writeStartElement("td");
+ writer.writeAttribute("outputclass","topAlign");
QString itemValue;
if (relative->type() == Node::Enum) {
@@ -870,188 +1144,179 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
}
if (itemValue.isEmpty())
- out() << "?";
- else
- out() << "<tt>" << protectEnc(itemValue) << "</tt>";
-
+ writer.writeCharacters("?");
+ else {
+ writer.writeStartElement("tt");
+ writer.writeCharacters(protectEnc(itemValue));
+ writer.writeEndElement(); // </tt>
+ }
skipAhead = 1;
}
break;
case Atom::ListTagRight:
if (atom->string() == ATOM_LIST_TAG)
- out() << "</dt>\n";
+ writer.writeEndElement(); // </dt>
break;
case Atom::ListItemLeft:
if (atom->string() == ATOM_LIST_TAG) {
- out() << "<dd>";
+ writer.writeStartElement("dd");
}
else if (atom->string() == ATOM_LIST_VALUE) {
if (threeColumnEnumValueTable) {
- out() << "</td><td class=\"topAlign\">";
+ writer.writeEndElement(); // </td>
+ writer.writeStartElement("td");
+ writer.writeAttribute("outputclass","topAlign");
if (matchAhead(atom, Atom::ListItemRight))
- out() << "&nbsp;";
+ writer.writeCharacters("&nbsp;");
}
}
else {
- out() << "<li>";
+ writer.writeStartElement("li");
}
if (matchAhead(atom, Atom::ParaLeft))
skipAhead = 1;
break;
case Atom::ListItemRight:
if (atom->string() == ATOM_LIST_TAG) {
- out() << "</dd>\n";
+ writer.writeEndElement(); // </dd>
}
else if (atom->string() == ATOM_LIST_VALUE) {
- out() << "</td></tr>\n";
+ writer.writeEndElement(); // </td>
+ writer.writeEndElement(); // </tr>
}
else {
- out() << "</li>\n";
+ writer.writeEndElement(); // </li>
}
break;
case Atom::ListRight:
if (atom->string() == ATOM_LIST_BULLET) {
- out() << "</ul>\n";
+ writer.writeEndElement(); // </ul>
}
else if (atom->string() == ATOM_LIST_TAG) {
- out() << "</dl>\n";
+ writer.writeEndElement(); // </dl>
}
else if (atom->string() == ATOM_LIST_VALUE) {
- out() << "</table>\n";
+ writer.writeEndElement(); // </table>
}
else {
- out() << "</ol>\n";
+ writer.writeEndElement(); // </ol>
}
break;
case Atom::Nop:
+ // nothing
break;
case Atom::ParaLeft:
- out() << "<p>";
+ writer.writeStartElement("p");
in_para = true;
break;
case Atom::ParaRight:
endLink();
if (in_para) {
- out() << "</p>\n";
+ writer.writeEndElement(); // </p?
in_para = false;
}
- //if (!matchAhead(atom, Atom::ListItemRight) && !matchAhead(atom, Atom::TableItemRight))
- // out() << "</p>\n";
break;
case Atom::QuotationLeft:
- out() << "<blockquote>";
+ writer.writeStartElement("blockquote");
break;
case Atom::QuotationRight:
- out() << "</blockquote>\n";
+ writer.writeEndElement(); // </blockquote>
break;
case Atom::RawString:
- out() << atom->string();
+ writer.writeCharacters(atom->string());
break;
case Atom::SectionLeft:
-#if 0
- {
- int nextLevel = atom->string().toInt();
- if (sectionNumber.size() < nextLevel) {
- do {
- sectionNumber.append("1");
- } while (sectionNumber.size() < nextLevel);
- }
- else {
- while (sectionNumber.size() > nextLevel) {
- sectionNumber.removeLast();
- }
- sectionNumber.last() = QString::number(sectionNumber.last().toInt() + 1);
- }
- out() << "<a name=\"sec-" << sectionNumber.join("-") << "\"></a>\n";
- }
-#else
- out() << "<a name=\"" << Doc::canonicalTitle(Text::sectionHeading(atom).toString())
- << "\"></a>\n";
-#endif
+ writer.writeStartElement("p");
+ writeGuidAttribute(Doc::canonicalTitle(Text::sectionHeading(atom).toString()));
+ writer.writeAttribute("outputclass","target");
+ writer.writeCharacters(protectEnc(Text::sectionHeading(atom).toString()));
+ writer.writeEndElement(); // </p>
break;
case Atom::SectionRight:
+ // nothing
break;
case Atom::SectionHeadingLeft:
- out() << "<h" + QString::number(atom->string().toInt() + hOffset(relative)) + ">";
+ writer.writeStartElement("p");
+ hx = "h" + QString::number(atom->string().toInt() + hOffset(relative));
+ writer.writeAttribute("outputclass",hx);
inSectionHeading = true;
break;
case Atom::SectionHeadingRight:
- out() << "</h" + QString::number(atom->string().toInt() + hOffset(relative)) + ">\n";
+ writer.writeEndElement(); // </p> (see case Atom::SectionHeadingLeft)
inSectionHeading = false;
break;
case Atom::SidebarLeft:
+ // nothing
break;
case Atom::SidebarRight:
+ // nothing
break;
case Atom::String:
if (inLink && !inContents && !inSectionHeading) {
generateLink(atom, relative, marker);
}
else {
- out() << protectEnc(atom->string());
+ writer.writeCharacters(protectEnc(atom->string()));
}
break;
case Atom::TableLeft:
if (in_para) {
- out() << "</p>\n";
+ writer.writeEndElement(); // </p>
in_para = false;
}
- if (!atom->string().isEmpty()) {
- if (atom->string().contains("%"))
- out() << "<table class=\"generic\">\n "; // width=\"" << atom->string() << "\">\n ";
- else {
- out() << "<table class=\"generic\">\n";
- }
- }
- else {
- out() << "<table class=\"generic\">\n";
- }
+ writer.writeStartElement("table");
+ writer.writeAttribute("outputclass","generic");
numTableRows = 0;
break;
case Atom::TableRight:
- out() << "</table>\n";
+ writer.writeEndElement(); // </table>
break;
case Atom::TableHeaderLeft:
- out() << "<thead><tr class=\"qt-style topAlign\">";
+ writer.writeStartElement("thead");
+ writer.writeStartElement("tr");
+ writer.writeAttribute("outputclass","qt-style topAlign");
inTableHeader = true;
break;
case Atom::TableHeaderRight:
- out() << "</tr>";
+ writer.writeEndElement(); // </tr>
if (matchAhead(atom, Atom::TableHeaderLeft)) {
skipAhead = 1;
- out() << "\n<tr class=\"qt-style topAlign\">";
+ writer.writeStartElement("tr");
+ writer.writeAttribute("outputclass","qt-style topAlign");
}
- else {
- out() << "</thead>\n";
+ else {
+ writer.writeEndElement(); // </thead>
inTableHeader = false;
}
break;
case Atom::TableRowLeft:
+ writer.writeStartElement("tr");
if (++numTableRows % 2 == 1)
- out() << "<tr class=\"odd topAlign\">";
+ writer.writeAttribute("outputclass","odd topAlign");
else
- out() << "<tr class=\"even topAlign\">";
+ writer.writeAttribute("outputclass","even topAlign");
break;
case Atom::TableRowRight:
- out() << "</tr>\n";
+ writer.writeEndElement(); // </tr>\n";
break;
case Atom::TableItemLeft:
{
if (inTableHeader)
- out() << "<th";
+ writer.writeStartElement("th");
else
- out() << "<td";
+ writer.writeStartElement("td");
QStringList spans = atom->string().split(",");
if (spans.size() == 2) {
+#if zzz
+
if (spans.at(0) != "1")
out() << " colspan=\"" << spans.at(0) << "\"";
if (spans.at(1) != "1")
out() << " rowspan=\"" << spans.at(1) << "\"";
- if (inTableHeader)
- out() << ">";
- else
- out() << "><p>";
+#endif
+ if (!inTableHeader)
+ writer.writeStartElement("p");
}
if (matchAhead(atom, Atom::ParaLeft))
skipAhead = 1;
@@ -1059,9 +1324,11 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
break;
case Atom::TableItemRight:
if (inTableHeader)
- out() << "</th>";
- else
- out() << "</p></td>";
+ writer.writeEndElement(); // </th>
+ else {
+ writer.writeEndElement(); // </p>
+ writer.writeEndElement(); // </td>
+ }
if (matchAhead(atom, Atom::ParaLeft))
skipAhead = 1;
break;
@@ -1095,14 +1362,23 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
}
break;
case Atom::Target:
- out() << "<a name=\"" << Doc::canonicalTitle(atom->string()) << "\"></a>";
+ writer.writeStartElement("p");
+ writeGuidAttribute(Doc::canonicalTitle(atom->string()));
+ writer.writeAttribute("outputclass","target");
+ writer.writeCharacters(protectEnc(atom->string()));
+ writer.writeEndElement(); // </p>
break;
case Atom::UnhandledFormat:
- out() << "<b class=\"redFont\">&lt;Missing DITAXML&gt;</b>";
+ writer.writeStartElement("b");
+ writer.writeAttribute("outputclass","redFont");
+ writer.writeCharacters("&lt;Missing DITAXML&gt");
+ writer.writeEndElement(); // </b>
break;
case Atom::UnknownCommand:
- out() << "<b class=\"redFont\"><code>\\" << protectEnc(atom->string())
- << "</code></b>";
+ writer.writeStartElement("b");
+ writer.writeAttribute("outputclass","redFont code");
+ writer.writeCharacters(protectEnc(atom->string()));
+ writer.writeEndElement(); // </b>
break;
#ifdef QDOC_QML
case Atom::QmlText:
@@ -1111,7 +1387,8 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
break;
#endif
default:
- unknownAtom(atom);
+ // unknownAtom(atom);
+ break;
}
return skipAhead;
}
@@ -1119,13 +1396,13 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
/*!
Generate a reference page for a C++ class.
*/
-void DitaXmlGenerator::generateClassLikeNode(const InnerNode *inner,
- CodeMarker *marker)
+void
+DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* marker)
{
QList<Section> sections;
QList<Section>::ConstIterator s;
- const ClassNode *classe = 0;
+ const ClassNode* cn = 0;
const NamespaceNode *namespasse = 0;
QString title;
@@ -1138,63 +1415,113 @@ void DitaXmlGenerator::generateClassLikeNode(const InnerNode *inner,
title = rawTitle + " Namespace";
}
else if (inner->type() == Node::Class) {
- classe = static_cast<const ClassNode *>(inner);
+ cn = static_cast<const ClassNode *>(inner);
rawTitle = marker->plainName(inner);
fullTitle = marker->plainFullName(inner);
title = rawTitle + " Class Reference";
- }
- DcfSection classSection;
- classSection.title = title;
- classSection.ref = linkForNode(inner, 0);
- classSection.keywords += qMakePair(inner->name(), classSection.ref);
+ generateHeader(inner);
+
+ writer.writeStartElement(CXXCLASS);
+ writeGuidAttribute(fullTitle);
+ writer.writeStartElement(APINAME);
+ writer.writeCharacters(fullTitle);
+ writer.writeEndElement(); // </apiName>
+
+ generateBrief(inner, marker);
+
+ writer.writeStartElement(CXXCLASSDETAIL);
+ writer.writeStartElement(CXXCLASSDEFINITION);
+ writer.writeStartElement(CXXCLASSACCESSSPECIFIER);
+ writer.writeAttribute("value",inner->accessString());
+ writer.writeEndElement(); // <cxxClassAccessSpecifier>
+ if (cn->isAbstract()) {
+ writer.writeStartElement(CXXCLASSABSTRACT);
+ writer.writeAttribute("name","abstract");
+ writer.writeAttribute("value","abstract");
+ writer.writeEndElement(); // </cxxClassAbstract>
+ }
+ writeDerivations(cn, marker);
+ writeLocation(cn, marker);
+ writer.writeEndElement(); // <cxxClassDefinition>
+ writer.writeStartElement(APIDESC);
+
+ if (!inner->doc().isEmpty()) {
+ writer.writeStartElement("p");
+ writer.writeAttribute("outputclass","h2");
+ writer.writeCharacters("Detailed Description");
+ writer.writeEndElement(); // </p>
+ generateBody(inner, marker);
+ // generateAlsoList(inner, marker);
+ }
+
+ writer.writeEndElement(); // </apiDesc>
+ writer.writeEndElement(); // </cxxClassDetail>
+ sections = marker->sections(inner, CodeMarker::Detailed, CodeMarker::Okay);
+ s = sections.begin();
+ while (s != sections.end()) {
+ if ((*s).name == "Member Function Documentation") {
+ writeFunctions((*s),cn,marker);
+ }
+ else if ((*s).name == "Member Type Documentation") {
+ writeNestedClasses((*s),cn,marker);
+ writeEnumerations((*s),cn,marker);
+ writeTypedefs((*s),cn,marker);
+ }
+ else if ((*s).name == "Member Variable Documentation") {
+ writeDataMembers((*s),cn,marker);
+ }
+ else if ((*s).name == "Property Documentation") {
+ writeProperties((*s),cn,marker);
+ }
+ ++s;
+ }
+ writer.writeEndElement(); // </cxxClass>
+ }
+
+#ifdef WRITE_HTML
Text subtitleText;
if (rawTitle != fullTitle)
subtitleText << "(" << Atom(Atom::AutoLink, fullTitle) << ")"
<< Atom(Atom::LineBreak);
-#if 0
- // No longer used because the modeule name is a breadcrumb.
- QString fixedModule = inner->moduleName();
- if (fixedModule == "Qt3SupportLight")
- fixedModule = "Qt3Support";
- if (!fixedModule.isEmpty())
- subtitleText << "[" << Atom(Atom::AutoLink, fixedModule) << " module]";
-
- if (fixedModule.isEmpty()) {
- QMultiMap<QString, QString> publicGroups = myTree->publicGroups();
- QList<QString> groupNames = publicGroups.values(inner->name());
- if (!groupNames.isEmpty()) {
- qSort(groupNames.begin(), groupNames.end());
- subtitleText << "[";
- for (int j=0; j<groupNames.count(); j++) {
- subtitleText << Atom(Atom::AutoLink, groupNames[j]);
- if (j<groupNames.count()-1)
- subtitleText <<", ";
- }
- subtitleText << "]";
- }
+ QString shortVersion;
+ shortVersion = project + " " + shortVersion + ": ";
+ shortVersion = myTree->version();
+ if (shortVersion.count(QChar('.')) == 2)
+ shortVersion.truncate(shortVersion.lastIndexOf(QChar('.')));
+ if (!shortVersion.isEmpty()) {
+ if (project == "QSA")
+ shortVersion = "QSA " + shortVersion + ": ";
+ else
+ shortVersion = "Qt " + shortVersion + ": ";
}
-#endif
- generateHeader(title, inner, marker);
+ out() << " <title>" << shortVersion << protectEnc(title) << "</title>\n";
+
+#if 0
+ out() << QString(postHeader).replace("\\" + COMMAND_VERSION, myTree->version());
+ generateBreadCrumbs(title,node,marker);
+ out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
+#endif
+
sections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay);
generateTableOfContents(inner,marker,&sections);
generateTitle(title, subtitleText, SmallSubTitle, inner, marker);
#ifdef QDOC_QML
- if (classe && !classe->qmlElement().isEmpty()) {
- generateInstantiatedBy(classe,marker);
+ if (cn && !cn->qmlElement().isEmpty()) {
+ generateInstantiatedBy(cn,marker);
}
#endif
generateBrief(inner, marker);
generateIncludes(inner, marker);
generateStatus(inner, marker);
- if (classe) {
- generateInherits(classe, marker);
- generateInheritedBy(classe, marker);
+ if (cn) {
+ generateInherits(cn, marker);
+ generateInheritedBy(cn, marker);
}
generateThreadSafeness(inner, marker);
generateSince(inner, marker);
@@ -1203,22 +1530,22 @@ void DitaXmlGenerator::generateClassLikeNode(const InnerNode *inner,
QString membersLink = generateListOfAllMemberFile(inner, marker);
if (!membersLink.isEmpty())
- out() << "<li><a href=\"" << membersLink << "\">"
- << "List of all members, including inherited members</a></li>\n";
+ out() << "<li><xref href=\"" << membersLink << "\">"
+ << "List of all members, including inherited members</xref></li>\n";
QString obsoleteLink = generateLowStatusMemberFile(inner,
marker,
CodeMarker::Obsolete);
if (!obsoleteLink.isEmpty())
- out() << "<li><a href=\"" << obsoleteLink << "\">"
- << "Obsolete members</a></li>\n";
+ out() << "<li><xref href=\"" << obsoleteLink << "\">"
+ << "Obsolete members</xref></li>\n";
QString compatLink = generateLowStatusMemberFile(inner,
marker,
CodeMarker::Compat);
if (!compatLink.isEmpty())
- out() << "<li><a href=\"" << compatLink << "\">"
- << "Qt 3 support members</a></li>\n";
+ out() << "<li><xref href=\"" << compatLink << "\">"
+ << "Qt 3 support members</xref></li>\n";
out() << "</ul>\n";
@@ -1335,8 +1662,6 @@ void DitaXmlGenerator::generateClassLikeNode(const InnerNode *inner,
names << plainCode(marker->markedUpEnumValue(enumName,
enume));
}
- foreach (const QString &name, names)
- classSection.keywords += qMakePair(name,linkForNode(*m,0));
}
++m;
}
@@ -1344,28 +1669,7 @@ void DitaXmlGenerator::generateClassLikeNode(const InnerNode *inner,
out() << "</div>\n"; // QTBUG-9504
++s;
}
- generateFooter(inner);
-
- if (!membersLink.isEmpty()) {
- DcfSection membersSection;
- membersSection.title = "List of all members";
- membersSection.ref = membersLink;
- appendDcfSubSection(&classSection, membersSection);
- }
- if (!obsoleteLink.isEmpty()) {
- DcfSection obsoleteSection;
- obsoleteSection.title = "Obsolete members";
- obsoleteSection.ref = obsoleteLink;
- appendDcfSubSection(&classSection, obsoleteSection);
- }
- if (!compatLink.isEmpty()) {
- DcfSection compatSection;
- compatSection.title = "Qt 3 support members";
- compatSection.ref = compatLink;
- appendDcfSubSection(&classSection, compatSection);
- }
-
- appendDcfSubSection(&dcfClassesRoot, classSection);
+#endif
}
/*!
@@ -1374,16 +1678,14 @@ void DitaXmlGenerator::generateClassLikeNode(const InnerNode *inner,
*/
void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
{
+ return; // zzz
+
SubTitleSize subTitleSize = LargeSubTitle;
- DcfSection fakeSection;
- fakeSection.title = fake->fullTitle();
- fakeSection.ref = linkForNode(fake, 0);
-
QList<Section> sections;
QList<Section>::const_iterator s;
-
QString fullTitle = fake->fullTitle();
QString htmlTitle = fullTitle;
+
if (fake->subType() == Node::File && !fake->subTitle().isEmpty()) {
subTitleSize = SmallSubTitle;
htmlTitle += " (" + fake->subTitle() + ")";
@@ -1393,7 +1695,7 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker
htmlTitle = fullTitle;
}
- generateHeader(htmlTitle, fake, marker);
+ generateHeader(fake);
/*
Generate the TOC for the new doc format.
@@ -1433,43 +1735,24 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker
QString membersLink = generateListOfAllMemberFile(fake, marker);
if (!membersLink.isEmpty())
- out() << "<li><a href=\"" << membersLink << "\">"
- << "List of all members, including inherited members</a></li>\n";
+ out() << "<li><xref href=\"" << membersLink << "\">"
+ << "List of all members, including inherited members</xref></li>\n";
QString obsoleteLink = generateLowStatusMemberFile(fake,
marker,
CodeMarker::Obsolete);
if (!obsoleteLink.isEmpty())
- out() << "<li><a href=\"" << obsoleteLink << "\">"
- << "Obsolete members</a></li>\n";
+ out() << "<li><xref href=\"" << obsoleteLink << "\">"
+ << "Obsolete members</xref></li>\n";
QString compatLink = generateLowStatusMemberFile(fake,
marker,
CodeMarker::Compat);
if (!compatLink.isEmpty())
- out() << "<li><a href=\"" << compatLink << "\">"
- << "Qt 3 support members</a></li>\n";
+ out() << "<li><xref href=\"" << compatLink << "\">"
+ << "Qt 3 support members</xref></li>\n";
out() << "</ul>\n";
-
- if (!membersLink.isEmpty()) {
- DcfSection membersSection;
- membersSection.title = "List of all members";
- membersSection.ref = membersLink;
- appendDcfSubSection(&fakeSection, membersSection);
- }
- if (!obsoleteLink.isEmpty()) {
- DcfSection obsoleteSection;
- obsoleteSection.title = "Obsolete members";
- obsoleteSection.ref = obsoleteLink;
- appendDcfSubSection(&fakeSection, obsoleteSection);
- }
- if (!compatLink.isEmpty()) {
- DcfSection compatSection;
- compatSection.title = "Qt 3 support members";
- compatSection.ref = compatLink;
- appendDcfSubSection(&fakeSection, compatSection);
- }
}
#ifdef QDOC_QML
else if (fake->subType() == Node::QmlClass) {
@@ -1504,13 +1787,10 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker
while (m != (*s).members.end()) {
generateDetailedQmlMember(*m, fake, marker);
out() << "<br/>\n";
- fakeSection.keywords += qMakePair((*m)->name(),
- linkForNode(*m,0));
++m;
}
++s;
}
- generateFooter(fake);
return;
}
#endif
@@ -1546,8 +1826,6 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker
generateAnnotatedList(fake, marker, groupMembersMap);
}
- fakeSection.keywords += qMakePair(fakeSection.title, fakeSection.ref);
-
sections = marker->sections(fake, CodeMarker::Detailed, CodeMarker::Okay);
s = sections.begin();
while (s != sections.end()) {
@@ -1557,57 +1835,32 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker
NodeList::ConstIterator m = (*s).members.begin();
while (m != (*s).members.end()) {
generateDetailedMember(*m, fake, marker);
- fakeSection.keywords += qMakePair((*m)->name(), linkForNode(*m, 0));
++m;
}
++s;
}
- generateFooter(fake);
-
- if (fake->subType() == Node::Example) {
- appendDcfSubSection(&dcfExamplesRoot, fakeSection);
- }
- else if (fake->subType() != Node::File) {
- QString contentsPage = fake->links().value(Node::ContentsLink).first;
-
- if (contentsPage == "Qt Designer Manual") {
- appendDcfSubSection(&dcfDesignerRoot, fakeSection);
- }
- else if (contentsPage == "Qt Linguist Manual") {
- appendDcfSubSection(&dcfLinguistRoot, fakeSection);
- }
- else if (contentsPage == "Qt Assistant Manual") {
- appendDcfSubSection(&dcfAssistantRoot, fakeSection);
- }
- else if (contentsPage == "qmake Manual") {
- appendDcfSubSection(&dcfQmakeRoot, fakeSection);
- }
- else {
- appendDcfSubSection(&dcfOverviewsRoot, fakeSection);
- }
- }
}
/*!
- Returns "html" for this subclass of Generator.
+ Returns "xml" for this subclass of Generator.
*/
QString DitaXmlGenerator::fileExtension(const Node * /* node */) const
{
- return "html";
+ return "xml";
}
/*!
Output breadcrumb list in the html file.
*/
void DitaXmlGenerator::generateBreadCrumbs(const QString& title,
- const Node *node,
- CodeMarker *marker)
+ const Node *node,
+ CodeMarker *marker)
{
Text breadcrumb;
if (node->type() == Node::Class) {
const ClassNode* cn = static_cast<const ClassNode*>(node);
QString name = node->moduleName();
- out() << " <li><a href=\"modules.html\">All Modules</a></li>";
+ out() << " <li><xref href=\"modules.html\">All Modules</xref></li>";
if (!name.isEmpty()) {
out() << " <li>";
breadcrumb << Atom(Atom::AutoLink,name);
@@ -1625,7 +1878,7 @@ void DitaXmlGenerator::generateBreadCrumbs(const QString& title,
else if (node->type() == Node::Fake) {
const FakeNode* fn = static_cast<const FakeNode*>(node);
if (node->subType() == Node::Module) {
- out() << " <li><a href=\"modules.html\">All Modules</a></li>";
+ out() << " <li><xref href=\"modules.html\">All Modules</xref></li>";
QString name = node->name();
if (!name.isEmpty()) {
out() << " <li>";
@@ -1636,125 +1889,85 @@ void DitaXmlGenerator::generateBreadCrumbs(const QString& title,
}
else if (node->subType() == Node::Group) {
if (fn->name() == QString("modules"))
- out() << " <li><a href=\"modules.html\">All Modules</a></li>";
+ out() << " <li><xref href=\"modules.html\">All Modules</xref></li>";
else {
- out() << " <li><a href=\"" << fn->name() << "\">" << title
- << "</a></li>";
+ out() << " <li><xref href=\"" << fn->name() << "\">" << title
+ << "</xref></li>";
}
}
else if (node->subType() == Node::Page) {
if (fn->name() == QString("examples.html")) {
- out() << " <li><a href=\"all-examples.html\">Examples</a></li>";
+ out() << " <li><xref href=\"all-examples.html\">Examples</xref></li>";
}
else if (fn->name().startsWith("examples-")) {
- out() << " <li><a href=\"all-examples.html\">Examples</a></li>";
- out() << " <li><a href=\"" << fn->name() << "\">" << title
- << "</a></li>";
+ out() << " <li><xref href=\"all-examples.html\">Examples</xref></li>";
+ out() << " <li><xref href=\"" << fn->name() << "\">" << title
+ << "</xref></li>";
}
else if (fn->name() == QString("namespaces.html")) {
- out() << " <li><a href=\"namespaces.html\">All Namespaces</a></li>";
+ out() << " <li><xref href=\"namespaces.html\">All Namespaces</xref></li>";
}
else {
- out() << " <li><a href=\"" << fn->name() << "\">" << title
- << "</a></li>";
+ out() << " <li><xref href=\"" << fn->name() << "\">" << title
+ << "</xref></li>";
}
}
else if (node->subType() == Node::QmlClass) {
- out() << " <li><a href=\"qdeclarativeelements.html\">QML Elements</a></li>";
- out() << " <li><a href=\"" << fn->name() << "\">" << title
- << "</a></li>";
+ out() << " <li><xref href=\"qdeclarativeelements.html\">QML Elements</xref></li>";
+ out() << " <li><xref href=\"" << fn->name() << "\">" << title
+ << "</xref></li>";
}
else if (node->subType() == Node::Example) {
- out() << " <li><a href=\"all-examples.html\">Examples</a></li>";
+ out() << " <li><xref href=\"all-examples.html\">Examples</xref></li>";
QStringList sl = fn->name().split('/');
QString name = "examples-" + sl.at(0) + ".html";
QString t = CodeParser::titleFromName(name);
- out() << " <li><a href=\"" << name << "\">"
- << t << "</a></li>";
- out() << " <li><a href=\"" << sl.at(0)
+ out() << " <li><xref href=\"" << name << "\">"
+ << t << "</xref></li>";
+ out() << " <li><xref href=\"" << sl.at(0)
<< "-" << sl.at(sl.size()-1) << ".html\">"
- << title << "</a></li>";
+ << title << "</xref></li>";
}
}
else if (node->type() == Node::Namespace) {
const NamespaceNode* nsn = static_cast<const NamespaceNode*>(node);
- out() << " <li><a href=\"namespaces.html\">All Namespaces</a></li>";
- out() << " <li><a href=\"" << fileName(nsn) << "\">" << title
- << "</a></li>";
+ out() << " <li><xref href=\"namespaces.html\">All Namespaces</xref></li>";
+ out() << " <li><xref href=\"" << fileName(nsn) << "\">" << title
+ << "</xref></li>";
}
}
-void DitaXmlGenerator::generateHeader(const QString& title,
- const Node *node,
- CodeMarker *marker)
+void DitaXmlGenerator::generateHeader(const Node* node)
{
- out() << QString("<?xml version=\"1.0\" encoding=\"%1\"?>\n").arg(outputEncoding);
- out() << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
- out() << QString("<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"%1\" lang=\"%1\">\n").arg(naturalLanguage);
- out() << "<head>\n";
- out() << " <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n";
- QString shortVersion;
- shortVersion = project + " " + shortVersion + ": ";
- if (node && !node->doc().location().isEmpty())
- out() << "<!-- " << node->doc().location().fileName() << " -->\n";
+ writer.setDevice(out().device());
+ writer.setAutoFormatting(true);
+ writer.setAutoFormattingIndent(4);
+ writer.writeStartDocument();
+
+ if (!node)
+ return;
- shortVersion = myTree->version();
- if (shortVersion.count(QChar('.')) == 2)
- shortVersion.truncate(shortVersion.lastIndexOf(QChar('.')));
- if (!shortVersion.isEmpty()) {
- if (project == "QSA")
- shortVersion = "QSA " + shortVersion + ": ";
- else
- shortVersion = "Qt " + shortVersion + ": ";
+ QString docType;
+ QString dtd;
+ QString version;
+ if (node->type() == Node::Class) {
+ docType = "cxxClass";
+ dtd = "dtd/cxxClass.dtd";
+ version = "0.6.0";
}
- out() << " <title>" << shortVersion << protectEnc(title) << "</title>\n";
-
- out() << " <!--[if IE]>";
- out() << "<meta name=\"MSSmartTagsPreventParsing\" content=\"true\">";
- out() << "<meta http-equiv=\"imagetoolbar\" content=\"no\">";
- out() << "<![endif]-->";
- out() << "<!--[if lt IE 7]>";
- out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie6.css\">";
- out() << "<![endif]-->";
- out() << "<!--[if IE 7]>";
- out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie7.css\">";
- out() << "<![endif]-->";
- out() << "<!--[if IE 8]>";
- out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie8.css\">";
- out() << "<![endif]-->";
-
-
- //out() << " <title>Qt Reference Documentation</title>";
- out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />\n";
- out() << " <script src=\"scripts/jquery.js\" type=\"text/javascript\"></script>\n";
- out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n";
- out() << "</head>\n";
-
- if (offlineDocs)
- out() << "<body class=\"offline\" onload=\"CheckEmptyAndLoadList();\">\n";
- else
- out() << "<body class=\"\" onload=\"CheckEmptyAndLoadList();\">\n";
-
-#ifdef GENERATE_MAC_REFS
- if (mainPage)
- generateMacRef(node, marker);
-#endif
- out() << QString(postHeader).replace("\\" + COMMAND_VERSION, myTree->version());
- generateBreadCrumbs(title,node,marker);
- out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
-
-#if 0 // Removed for new docf format. MWS
- if (node && !node->links().empty())
- out() << "<p>\n" << navigationLinks << "</p>\n";
-#endif
+ QString doctype = "<!DOCTYPE " + docType +
+ " PUBLIC \"-//NOKIA//DTD DITA C++ API Class Reference Type v" +
+ version + "//EN\" \"" + dtd + "\">";
+ writer.writeDTD(doctype);
+ writer.writeComment(node->doc().location().fileName());
}
void DitaXmlGenerator::generateTitle(const QString& title,
- const Text &subTitle,
- SubTitleSize subTitleSize,
- const Node *relative,
- CodeMarker *marker)
+ const Text &subTitle,
+ SubTitleSize subTitleSize,
+ const Node *relative,
+ CodeMarker *marker)
{
if (!title.isEmpty())
out() << "<h1 class=\"title\">" << protectEnc(title) << "</h1>\n";
@@ -1769,30 +1982,18 @@ void DitaXmlGenerator::generateTitle(const QString& title,
}
}
-void DitaXmlGenerator::generateFooter(const Node *node)
-{
- if (node && !node->links().empty())
- out() << "<p>\n" << navigationLinks << "</p>\n";
-
- out() << QString(footer).replace("\\" + COMMAND_VERSION, myTree->version())
- << QString(address).replace("\\" + COMMAND_VERSION, myTree->version());
- out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n";
- out() << "</body>\n";
- out() << "</html>\n";
-}
-
-void DitaXmlGenerator::generateBrief(const Node *node, CodeMarker *marker,
- const Node *relative)
+/*!
+ Outputs the brief command as a <shortdesc" element.
+ */
+void DitaXmlGenerator::generateBrief(const Node* node, CodeMarker* marker)
{
Text brief = node->doc().briefText();
if (!brief.isEmpty()) {
- out() << "<p>";
+ ++noLinks;
+ writer.writeStartElement(SHORTDESC);
generateText(brief, node, marker);
- if (!relative || node == relative)
- out() << " <a href=\"#";
- else
- out() << " <a href=\"" << linkForNode(node, relative) << "#";
- out() << registerRef("details") << "\">More...</a></p>\n";
+ writer.writeEndElement(); // shortdesc
+ --noLinks;
}
}
@@ -1870,13 +2071,13 @@ void DitaXmlGenerator::generateTableOfContents(const Node *node,
columnSize = 0;
}
out() << "<li>";
- out() << "<a href=\""
+ out() << "<xref href=\""
<< nodeName
<< "#"
<< Doc::canonicalTitle(headingText.toString())
<< "\">";
generateAtomList(headingText.firstAtom(), node, marker, true, numAtoms);
- out() << "</a></li>\n";
+ out() << "</xref></li>\n";
++columnSize;
}
@@ -1922,22 +2123,22 @@ void DitaXmlGenerator::generateTableOfContents(const Node *node,
if (moduleNamespaceMap.contains(node->name())) {
out() << "<li class=\"level"
<< sectionNumber.size()
- << "\"><a href=\"#"
+ << "\"><xref href=\"#"
<< registerRef("namespaces")
- << "\">Namespaces</a></li>\n";
+ << "\">Namespaces</xref></li>\n";
}
if (moduleClassMap.contains(node->name())) {
out() << "<li class=\"level"
<< sectionNumber.size()
- << "\"><a href=\"#"
+ << "\"><xref href=\"#"
<< registerRef("classes")
- << "\">Classes</a></li>\n";
+ << "\">Classes</xref></li>\n";
}
out() << "<li class=\"level"
<< sectionNumber.size()
- << "\"><a href=\"#"
+ << "\"><xref href=\"#"
<< registerRef("details")
- << "\">Detailed Description</a></li>\n";
+ << "\">Detailed Description</xref></li>\n";
for (int i = 0; i < toc.size(); ++i) {
if (toc.at(i)->string().toInt() == 1) {
detailsBase = 1;
@@ -1951,18 +2152,18 @@ void DitaXmlGenerator::generateTableOfContents(const Node *node,
if (!s->members.isEmpty() || !s->reimpMembers.isEmpty()) {
out() << "<li class=\"level"
<< sectionNumber.size()
- << "\"><a href=\"#"
+ << "\"><xref href=\"#"
<< registerRef((*s).pluralMember)
<< "\">" << (*s).name
- << "</a></li>\n";
+ << "</xref></li>\n";
}
++s;
}
out() << "<li class=\"level"
<< sectionNumber.size()
- << "\"><a href=\"#"
+ << "\"><xref href=\"#"
<< registerRef("details")
- << "\">Detailed Description</a></li>\n";
+ << "\">Detailed Description</xref></li>\n";
for (int i = 0; i < toc.size(); ++i) {
if (toc.at(i)->string().toInt() == 1) {
detailsBase = 1;
@@ -1991,12 +2192,12 @@ void DitaXmlGenerator::generateTableOfContents(const Node *node,
out() << "<li class=\"level"
<< sectionNumber.size()
<< "\">";
- out() << "<a href=\""
+ out() << "<xref href=\""
<< "#"
<< Doc::canonicalTitle(s)
<< "\">";
generateAtomList(headingText.firstAtom(), node, marker, true, numAtoms);
- out() << "</a></li>\n";
+ out() << "</xref></li>\n";
}
while (!sectionNumber.isEmpty()) {
sectionNumber.removeLast();
@@ -2007,37 +2208,6 @@ void DitaXmlGenerator::generateTableOfContents(const Node *node,
inLink = false;
}
-#if 0
-void DitaXmlGenerator::generateNavigationBar(const NavigationBar& bar,
- const Node *node,
- CodeMarker *marker)
-{
- if (bar.prev.begin() != 0 || bar.current.begin() != 0 ||
- bar.next.begin() != 0) {
- out() << "<p class=\"rightAlign\">";
- if (bar.prev.begin() != 0) {
-#if 0
- out() << "[<a href=\"" << section.previousBaseName()
- << ".html\">Prev: ";
- generateText(section.previousHeading(), node, marker);
- out() << "</a>]\n";
-#endif
- }
- if (bar.current.begin() != 0) {
- out() << "[<a href=\"" << "home"
- << ".html\">Home</a>]\n";
- }
- if (bar.next.begin() != 0) {
- out() << "[<a href=\"" << fileBase(node, bar.next)
- << ".html\">Next: ";
- generateText(Text::sectionHeading(bar.next.begin()), node, marker);
- out() << "</a>]\n";
- }
- out() << "</p>\n";
- }
-}
-#endif
-
QString DitaXmlGenerator::generateListOfAllMemberFile(const InnerNode *inner,
CodeMarker *marker)
{
@@ -2053,7 +2223,7 @@ QString DitaXmlGenerator::generateListOfAllMemberFile(const InnerNode *inner,
QString fileName = fileBase(inner) + "-members." + fileExtension(inner);
beginSubPage(inner->location(), fileName);
QString title = "List of All Members for " + inner->name();
- generateHeader(title, inner, marker);
+ generateHeader(inner);
generateTitle(title, Text(), SmallSubTitle, inner, marker);
out() << "<p>This is the complete list of members for ";
generateFullName(inner, 0, marker);
@@ -2062,7 +2232,6 @@ QString DitaXmlGenerator::generateListOfAllMemberFile(const InnerNode *inner,
Section section = sections.first();
generateSectionList(section, 0, marker, CodeMarker::SeparateList);
- generateFooter();
endSubPage();
return fileName;
}
@@ -2097,12 +2266,12 @@ QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode *inner,
}
beginSubPage(inner->location(), fileName);
- generateHeader(title, inner, marker);
+ generateHeader(inner);
generateTitle(title, Text(), SmallSubTitle, inner, marker);
if (status == CodeMarker::Compat) {
out() << "<p><b>The following class members are part of the "
- "<a href=\"qt3support.html\">Qt 3 support layer</a>.</b> "
+ "<xref href=\"qt3support.html\">Qt 3 support layer</xref>.</b> "
"They are provided to help you port old code to Qt 4. We advise against "
"using them in new code.</p>\n";
}
@@ -2112,10 +2281,10 @@ QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode *inner,
<< "We strongly advise against using them in new code.</p>\n";
}
- out() << "<p><ul><li><a href=\""
+ out() << "<p><ul><li><xref href=\""
<< linkForNode(inner, 0) << "\">"
<< protectEnc(inner->name())
- << " class reference</a></li></ul></p>\n";
+ << " class reference</xref></li></ul></p>\n";
for (i = 0; i < sections.size(); ++i) {
out() << "<h2>" << protectEnc(sections.at(i).name) << "</h2>\n";
@@ -2135,7 +2304,6 @@ QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode *inner,
}
}
- generateFooter();
endSubPage();
return fileName;
}
@@ -2362,7 +2530,7 @@ void DitaXmlGenerator::generateCompactList(const Node *relative,
for (int i = 0; i < 26; i++) {
QChar ch('a' + i);
if (usedParagraphNames.contains(char('a' + i)))
- out() << QString("<a href=\"#%1\">%2</a>&nbsp;").arg(ch).arg(ch.toUpper());
+ out() << QString("<xref href=\"#%1\">%2</xref>&nbsp;").arg(ch).arg(ch.toUpper());
}
out() << "</b></p>\n";
}
@@ -2415,7 +2583,7 @@ void DitaXmlGenerator::generateCompactList(const Node *relative,
Previously, we used generateFullName() for this, but we
require some special formatting.
*/
- out() << "<a href=\"" << linkForNode(it.value(), relative) << "\">";
+ out() << "<xref href=\"" << linkForNode(it.value(), relative) << "\">";
QStringList pieces;
if (it.value()->subType() == Node::QmlClass)
@@ -2423,7 +2591,7 @@ void DitaXmlGenerator::generateCompactList(const Node *relative,
else
pieces = fullName(it.value(), relative, marker).split("::");
out() << protectEnc(pieces.last());
- out() << "</a>";
+ out() << "</xref>";
if (pieces.size() > 1) {
out() << " (";
generateFullName(it.value()->parent(), relative, marker);
@@ -2443,7 +2611,7 @@ void DitaXmlGenerator::generateFunctionIndex(const Node *relative,
out() << "<p class=\"centerAlign functionIndex\"><b>";
for (int i = 0; i < 26; i++) {
QChar ch('a' + i);
- out() << QString("<a href=\"#%1\">%2</a>&nbsp;").arg(ch).arg(ch.toUpper());
+ out() << QString("<xref href=\"#%1\">%2</xref>&nbsp;").arg(ch).arg(ch.toUpper());
}
out() << "</b></p>\n";
@@ -2657,7 +2825,7 @@ void DitaXmlGenerator::generateOverviewList(const Node *relative, CodeMarker * /
if (!fakeNodeMap.isEmpty()) {
foreach (const QString &groupTitle, groupTitlesMap.keys()) {
const FakeNode *groupNode = groupTitlesMap[groupTitle];
- out() << QString("<h3><a href=\"%1\">%2</a></h3>\n").arg(
+ out() << QString("<h3><xref href=\"%1\">%2</xref></h3>\n").arg(
linkForNode(groupNode, relative)).arg(
protectEnc(groupNode->fullTitle()));
@@ -2670,8 +2838,8 @@ void DitaXmlGenerator::generateOverviewList(const Node *relative, CodeMarker * /
QString title = fakeNode->fullTitle();
if (title.startsWith("The "))
title.remove(0, 4);
- out() << "<li><a href=\"" << linkForNode(fakeNode, relative) << "\">"
- << protectEnc(title) << "</a></li>\n";
+ out() << "<li><xref href=\"" << linkForNode(fakeNode, relative) << "\">"
+ << protectEnc(title) << "</xref></li>\n";
}
out() << "</ul>\n";
}
@@ -2684,14 +2852,13 @@ void DitaXmlGenerator::generateOverviewList(const Node *relative, CodeMarker * /
QString title = fakeNode->fullTitle();
if (title.startsWith("The "))
title.remove(0, 4);
- out() << "<li><a href=\"" << linkForNode(fakeNode, relative) << "\">"
- << protectEnc(title) << "</a></li>\n";
+ out() << "<li><xref href=\"" << linkForNode(fakeNode, relative) << "\">"
+ << protectEnc(title) << "</xref></li>\n";
}
out() << "</ul>\n";
}
}
-#ifdef QDOC_NAME_ALIGNMENT
void DitaXmlGenerator::generateSection(const NodeList& nl,
const Node *relative,
CodeMarker *marker,
@@ -2838,10 +3005,10 @@ void DitaXmlGenerator::generateSectionInheritedList(const Section& section,
else {
out() << section.pluralMember;
}
- out() << " inherited from <a href=\"" << fileName((*p).first)
+ out() << " inherited from <xref href=\"" << fileName((*p).first)
<< "#" << DitaXmlGenerator::cleanRef(section.name.toLower()) << "\">"
<< protectEnc(marker->plainFullName((*p).first, relative))
- << "</a></li>\n";
+ << "</xref></li>\n";
++p;
}
}
@@ -3056,281 +3223,6 @@ QString DitaXmlGenerator::highlightedCode(const QString& markedCode,
return html;
}
-#else
-void DitaXmlGenerator::generateSectionList(const Section& section,
- const Node *relative,
- CodeMarker *marker,
- CodeMarker::SynopsisStyle style)
-{
- if (!section.members.isEmpty()) {
- bool twoColumn = false;
- if (style == CodeMarker::SeparateList) {
- twoColumn = (section.members.count() >= 16);
- }
- else if (section.members.first()->type() == Node::Property) {
- twoColumn = (section.members.count() >= 5);
- }
- if (twoColumn)
- out() << "<table class=\"generic\">\n";
- if (++numTableRows % 2 == 1)
- out() << "<tr class=\"odd topAlign\">";
- else
- out() << "<tr class=\"even topAlign\">";
-
-// << "<tr><td class=\"topAlign\">";
- out() << "<ul>\n";
-
- int i = 0;
- NodeList::ConstIterator m = section.members.begin();
- while (m != section.members.end()) {
- if ((*m)->access() == Node::Private) {
- ++m;
- continue;
- }
-
- if (twoColumn && i == (int) (section.members.count() + 1) / 2)
- out() << "</ul></td><td class=\"topAlign\"><ul>\n";
-
- out() << "<li class=\"fn\">";
- if (style == CodeMarker::Accessors)
- out() << "<b>";
- generateSynopsis(*m, relative, marker, style);
- if (style == CodeMarker::Accessors)
- out() << "</b>";
- out() << "</li>\n";
- i++;
- ++m;
- }
- out() << "</ul>\n";
- if (twoColumn)
- out() << "</td></tr>\n</table>\n";
- }
-
- if (style == CodeMarker::Summary && !section.inherited.isEmpty()) {
- out() << "<ul>\n";
- generateSectionInheritedList(section, relative, marker);
- out() << "</ul>\n";
- }
-}
-
-void DitaXmlGenerator::generateSectionInheritedList(const Section& section,
- const Node *relative,
- CodeMarker *marker)
-{
- QList<QPair<ClassNode *, int> >::ConstIterator p = section.inherited.begin();
- while (p != section.inherited.end()) {
- out() << "<li class=\"fn\">";
- out() << (*p).second << " ";
- if ((*p).second == 1) {
- out() << section.singularMember;
- } else {
- out() << section.pluralMember;
- }
- out() << " inherited from <a href=\"" << fileName((*p).first)
- << "#" << DitaXmlGenerator::cleanRef(section.name.toLower()) << "\">"
- << protectEnc(marker->plainFullName((*p).first, relative))
- << "</a></li>\n";
- ++p;
- }
-}
-
-void DitaXmlGenerator::generateSynopsis(const Node *node,
- const Node *relative,
- CodeMarker *marker,
- CodeMarker::SynopsisStyle style)
-{
- QString marked = marker->markedUpSynopsis(node, relative, style);
- QRegExp templateTag("(<[^@>]*>)");
- if (marked.indexOf(templateTag) != -1) {
- QString contents = protectEnc(marked.mid(templateTag.pos(1),
- templateTag.cap(1).length()));
- marked.replace(templateTag.pos(1), templateTag.cap(1).length(),
- contents);
- }
- marked.replace(QRegExp("<@param>([a-z]+)_([1-9n])</@param>"), "<i>\\1<sub>\\2</sub></i>");
- marked.replace("<@param>", "<i>");
- marked.replace("</@param>", "</i>");
-
- if (style == CodeMarker::Summary)
- marked.replace("@name>", "b>");
-
- if (style == CodeMarker::SeparateList) {
- QRegExp extraRegExp("<@extra>.*</@extra>");
- extraRegExp.setMinimal(true);
- marked.replace(extraRegExp, "");
- } else {
- marked.replace("<@extra>", "<tt>");
- marked.replace("</@extra>", "</tt>");
- }
-
- if (style != CodeMarker::Detailed) {
- marked.replace("<@type>", "");
- marked.replace("</@type>", "");
- }
- out() << highlightedCode(marked, marker, relative);
-}
-
-QString DitaXmlGenerator::highlightedCode(const QString& markedCode,
- CodeMarker *marker,
- const Node *relative)
-{
- QString src = markedCode;
- QString html;
- QStringRef arg;
- QStringRef par1;
-
- const QChar charLangle = '<';
- const QChar charAt = '@';
-
- // replace all <@link> tags: "(<@link node=\"([^\"]+)\">).*(</@link>)"
- static const QString linkTag("link");
- for (int i = 0, n = src.size(); i < n;) {
- if (src.at(i) == charLangle && src.at(i + 1) == charAt) {
- i += 2;
- if (parseArg(src, linkTag, &i, n, &arg, &par1)) {
- const Node* node = CodeMarker::nodeForString(par1.toString());
- QString link = linkForNode(node, relative);
- addLink(link, arg, &html);
- }
- else {
- html += charLangle;
- html += charAt;
- }
- }
- else {
- html += src.at(i++);
- }
- }
-
- if (slow) {
- // is this block ever used at all?
- // replace all <@func> tags: "(<@func target=\"([^\"]*)\">)(.*)(</@func>)"
- src = html;
- html = QString();
- static const QString funcTag("func");
- for (int i = 0, n = src.size(); i < n;) {
- if (src.at(i) == charLangle && src.at(i + 1) == charAt) {
- i += 2;
- if (parseArg(src, funcTag, &i, n, &arg, &par1)) {
- QString link = linkForNode(
- marker->resolveTarget(par1.toString(),
- myTree,
- relative),
- relative);
- addLink(link, arg, &html);
- par1 = QStringRef();
- }
- else {
- html += charLangle;
- html += charAt;
- }
- }
- else {
- html += src.at(i++);
- }
- }
- }
-
- // replace all "(<@(type|headerfile|func)(?: +[^>]*)?>)(.*)(</@\\2>)" tags
- src = html;
- html = QString();
- static const QString typeTags[] = { "type", "headerfile", "func" };
- for (int i = 0, n = src.size(); i < n;) {
- if (src.at(i) == charLangle && src.at(i + 1) == charAt) {
- i += 2;
- bool handled = false;
- for (int k = 0; k != 3; ++k) {
- if (parseArg(src, typeTags[k], &i, n, &arg, &par1)) {
- par1 = QStringRef();
- QString link = linkForNode(
- marker->resolveTarget(arg.toString(), myTree, relative),
- relative);
- addLink(link, arg, &html);
- handled = true;
- break;
- }
- }
- if (!handled) {
- html += charLangle;
- html += charAt;
- }
- }
- else {
- html += src.at(i++);
- }
- }
-
- // replace all
- // "<@comment>" -> "<span class=\"comment\">";
- // "<@preprocessor>" -> "<span class=\"preprocessor\">";
- // "<@string>" -> "<span class=\"string\">";
- // "<@char>" -> "<span class=\"char\">";
- // "</@(?:comment|preprocessor|string|char)>" -> "</span>"
- src = html;
- html = QString();
- static const QString spanTags[] = {
- "<@comment>", "<span class=\"comment\">",
- "<@preprocessor>", "<span class=\"preprocessor\">",
- "<@string>", "<span class=\"string\">",
- "<@char>", "<span class=\"char\">",
- "</@comment>", "</span>",
- "</@preprocessor>","</span>",
- "</@string>", "</span>",
- "</@char>", "</span>"
- // "<@char>", "<font color=blue>",
- // "</@char>", "</font>",
- // "<@func>", "<font color=green>",
- // "</@func>", "</font>",
- // "<@id>", "<i>",
- // "</@id>", "</i>",
- // "<@keyword>", "<b>",
- // "</@keyword>", "</b>",
- // "<@number>", "<font color=yellow>",
- // "</@number>", "</font>",
- // "<@op>", "<b>",
- // "</@op>", "</b>",
- // "<@param>", "<i>",
- // "</@param>", "</i>",
- // "<@string>", "<font color=green>",
- // "</@string>", "</font>",
- };
- for (int i = 0, n = src.size(); i < n;) {
- if (src.at(i) == charLangle) {
- bool handled = false;
- for (int k = 0; k != 8; ++k) {
- const QString & tag = spanTags[2 * k];
- if (tag == QStringRef(&src, i, tag.length())) {
- html += spanTags[2 * k + 1];
- i += tag.length();
- handled = true;
- break;
- }
- }
- if (!handled) {
- ++i;
- if (src.at(i) == charAt ||
- (src.at(i) == QLatin1Char('/') && src.at(i + 1) == charAt)) {
- // drop 'our' unknown tags (the ones still containing '@')
- while (i < n && src.at(i) != QLatin1Char('>'))
- ++i;
- ++i;
- }
- else {
- // retain all others
- html += charLangle;
- }
- }
- }
- else {
- html += src.at(i);
- ++i;
- }
- }
-
- return html;
-}
-#endif
-
void DitaXmlGenerator::generateLink(const Atom* atom,
const Node* /* relative */,
CodeMarker* marker)
@@ -3340,29 +3232,32 @@ void DitaXmlGenerator::generateLink(const Atom* atom,
if (funcLeftParen.indexIn(atom->string()) != -1 && marker->recognizeLanguage("Cpp")) {
// hack for C++: move () outside of link
int k = funcLeftParen.pos(1);
- out() << protectEnc(atom->string().left(k));
+ writer.writeCharacters(protectEnc(atom->string().left(k)));
if (link.isEmpty()) {
if (showBrokenLinks)
- out() << "</i>";
- } else {
- out() << "</a>";
+ writer.writeEndElement(); // </i>
+ }
+ else {
+ writer.writeEndElement(); // </xref>
}
inLink = false;
- out() << protectEnc(atom->string().mid(k));
+ writer.writeCharacters(protectEnc(atom->string().mid(k)));
} else if (marker->recognizeLanguage("Java")) {
// hack for Java: remove () and use <tt> when appropriate
bool func = atom->string().endsWith("()");
bool tt = (func || atom->string().contains(camelCase));
if (tt)
- out() << "<tt>";
+ writer.writeStartElement("tt");
if (func) {
- out() << protectEnc(atom->string().left(atom->string().length() - 2));
- } else {
- out() << protectEnc(atom->string());
+ writer.writeCharacters(protectEnc(atom->string().left(atom->string().length() - 2)));
}
- out() << "</tt>";
- } else {
- out() << protectEnc(atom->string());
+ else {
+ writer.writeCharacters(protectEnc(atom->string()));
+ }
+ writer.writeEndElement(); // </tt>
+ }
+ else {
+ writer.writeCharacters(protectEnc(atom->string()));
}
}
@@ -3444,13 +3339,13 @@ QString DitaXmlGenerator::protectEnc(const QString &string)
QString DitaXmlGenerator::protect(const QString &string, const QString &outputEncoding)
{
#define APPEND(x) \
- if (html.isEmpty()) { \
- html = string; \
- html.truncate(i); \
+ if (xml.isEmpty()) { \
+ xml = string; \
+ xml.truncate(i); \
} \
- html += (x);
+ xml += (x);
- QString html;
+ QString xml;
int n = string.length();
for (int i = 0; i < n; ++i) {
@@ -3469,16 +3364,16 @@ QString DitaXmlGenerator::protect(const QString &string, const QString &outputEn
|| (ch == QLatin1Char('.') && i > 2 && string.at(i - 2) == QLatin1Char('.'))) {
// we escape '*/' and the last dot in 'e.g.' and 'i.e.' for the Javadoc generator
APPEND("&#x");
- html += QString::number(ch.unicode(), 16);
- html += QLatin1Char(';');
+ xml += QString::number(ch.unicode(), 16);
+ xml += QLatin1Char(';');
} else {
- if (!html.isEmpty())
- html += ch;
+ if (!xml.isEmpty())
+ xml += ch;
}
}
- if (!html.isEmpty())
- return html;
+ if (!xml.isEmpty())
+ return xml;
return string;
#undef APPEND
@@ -3615,12 +3510,6 @@ QString DitaXmlGenerator::linkForNode(const Node *node, const Node *relative)
return QString();
fn = fileName(node);
-/* if (!node->url().isEmpty())
- return fn;*/
-#if 0
- // ### reintroduce this test, without breaking .dcf files
- if (fn != outFileName())
-#endif
link += fn;
if (!node->isInnerNode() || node->subType() == Node::QmlPropertyGroup) {
@@ -3654,7 +3543,7 @@ void DitaXmlGenerator::generateFullName(const Node *apparentNode,
{
if (actualNode == 0)
actualNode = apparentNode;
- out() << "<a href=\"" << linkForNode(actualNode, relative);
+ out() << "<xref href=\"" << linkForNode(actualNode, relative);
if (true || relative == 0 || relative->status() != actualNode->status()) {
switch (actualNode->status()) {
case Node::Obsolete:
@@ -3669,7 +3558,7 @@ void DitaXmlGenerator::generateFullName(const Node *apparentNode,
}
out() << "\">";
out() << protectEnc(fullName(apparentNode, relative, marker));
- out() << "</a>";
+ out() << "</xref>";
}
void DitaXmlGenerator::generateDetailedMember(const Node *node,
@@ -3735,7 +3624,7 @@ void DitaXmlGenerator::generateDetailedMember(const Node *node,
if (enume->flagsType()) {
out() << "<p>The " << protectEnc(enume->flagsType()->name())
<< " type is a typedef for "
- << "<a href=\"qflags.html\">QFlags</a>&lt;"
+ << "<xref href=\"qflags.html\">QFlags</xref>&lt;"
<< protectEnc(enume->name())
<< "&gt;. It stores an OR combination of "
<< protectEnc(enume->name())
@@ -3926,29 +3815,6 @@ void DitaXmlGenerator::findAllNamespaces(const InnerNode *node)
}
}
-#ifdef ZZZ_QDOC_QML
-/*!
- This function finds all the qml element nodes and
- stores them in a map for later use.
- */
-void DitaXmlGenerator::findAllQmlClasses(const InnerNode *node)
-{
- NodeList::const_iterator c = node->childNodes().constBegin();
- while (c != node->childNodes().constEnd()) {
- if ((*c)->type() == Node::Fake) {
- const FakeNode* fakeNode = static_cast<const FakeNode *>(*c);
- if (fakeNode->subType() == Node::QmlClass) {
- const QmlClassNode* qmlNode =
- static_cast<const QmlClassNode*>(fakeNode);
- const Node* n = qmlNode->classNode();
- }
- qmlClasses.insert(fakeNode->name(),*c);
- }
- ++c;
- }
-}
-#endif
-
int DitaXmlGenerator::hOffset(const Node *node)
{
switch (node->type()) {
@@ -4136,16 +4002,6 @@ QString DitaXmlGenerator::getLink(const Atom *atom,
return link;
}
-void DitaXmlGenerator::generateDcf(const QString &fileBase,
- const QString &startPage,
- const QString &title,
- DcfSection &dcfRoot)
-{
- dcfRoot.ref = startPage;
- dcfRoot.title = title;
- generateDcfSections(dcfRoot, outputDir() + "/" + fileBase + ".dcf", fileBase + "/reference");
-}
-
void DitaXmlGenerator::generateIndex(const QString &fileBase,
const QString &url,
const QString &title)
@@ -4228,22 +4084,28 @@ void DitaXmlGenerator::beginLink(const QString &link,
this->link = link;
if (link.isEmpty()) {
if (showBrokenLinks)
- out() << "<i>";
+ writer.writeStartElement("i");
}
else if (node == 0 || (relative != 0 &&
node->status() == relative->status())) {
- out() << "<a href=\"" << link << "\">";
+ writer.writeStartElement("xref");
+ writer.writeAttribute("href",link);
}
else {
switch (node->status()) {
case Node::Obsolete:
- out() << "<a href=\"" << link << "\" class=\"obsolete\">";
+ writer.writeStartElement("xref");
+ writer.writeAttribute("href",link);
+ writer.writeAttribute("outputclass","obsolete");
break;
case Node::Compat:
- out() << "<a href=\"" << link << "\" class=\"compat\">";
+ writer.writeStartElement("xref");
+ writer.writeAttribute("href",link);
+ writer.writeAttribute("outputclass","compat");
break;
default:
- out() << "<a href=\"" << link << "\">";
+ writer.writeStartElement("xref");
+ writer.writeAttribute("href",link);
}
}
inLink = true;
@@ -4254,13 +4116,15 @@ void DitaXmlGenerator::endLink()
if (inLink) {
if (link.isEmpty()) {
if (showBrokenLinks)
- out() << "</i>";
+ writer.writeEndElement(); // i
}
else {
if (inObsoleteLink) {
- out() << "<sup>(obsolete)</sup>";
+ writer.writeStartElement("sup");
+ writer.writeCharacters("(obsolete)");
+ writer.writeEndElement(); // sup
}
- out() << "</a>";
+ writer.writeEndElement(); // xref
}
}
inLink = false;
@@ -4636,138 +4500,220 @@ void DitaXmlGenerator::generatePageIndex(const QString& fileName, CodeMarker* ma
#endif
-#if 0 // fossil removed for new doc format MWS 19/04/2010
- out() << "<!DOCTYPE html\n"
- " PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"DTD/xhtml1-strict.dtd\">\n";
- out() << QString("<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"%1\" lang=\"%1\">\n").arg(naturalLanguage);
-
- QString shortVersion;
- if ((project != "Qtopia") && (project != "Qt Extended")) {
- shortVersion = project + " " + shortVersion + ": ";
- if (node && !node->doc().location().isEmpty())
- out() << "<!-- " << node->doc().location().fileName() << " -->\n";
-
- shortVersion = myTree->version();
- if (shortVersion.count(QChar('.')) == 2)
- shortVersion.truncate(shortVersion.lastIndexOf(QChar('.')));
- if (!shortVersion.isEmpty()) {
- if (project == "QSA")
- shortVersion = "QSA " + shortVersion + ": ";
+/*!
+ Return the full qualification of the node \a n, but without
+ the name of \a n itself. e.g. A::B::C
+ */
+QString DitaXmlGenerator::fullQualification(const Node* n)
+{
+ QString fq;
+ InnerNode* in = n->parent();
+ while (in) {
+ if ((in->type() == Node::Class) ||
+ (in->type() == Node::Namespace)) {
+ if (in->name().isEmpty())
+ break;
+ if (fq.isEmpty())
+ fq = in->name();
else
- shortVersion = "Qt " + shortVersion + ": ";
- }
- }
-
- out() << "<head>\n"
- " <title>" << shortVersion << protectEnc(title) << "</title>\n";
- out() << QString("<meta http-equiv=\"Content-type\" content=\"text/html; charset=%1\" />").arg(outputEncoding);
-
- if (!style.isEmpty())
- out() << " <style type=\"text/css\">" << style << "</style>\n";
-
- const QMap<QString, QString> &metaMap = node->doc().metaTagMap();
- if (!metaMap.isEmpty()) {
- QMapIterator<QString, QString> i(metaMap);
- while (i.hasNext()) {
- i.next();
- out() << " <meta name=\"" << protectEnc(i.key()) << "\" contents=\""
- << protectEnc(i.value()) << "\" />\n";
+ fq = in->name() + "::" + fq;
}
+ else
+ break;
+ in = in->parent();
}
+ return fq;
+}
- navigationLinks.clear();
-
- if (node && !node->links().empty()) {
- QPair<QString,QString> linkPair;
- QPair<QString,QString> anchorPair;
- const Node *linkNode;
+void DitaXmlGenerator::writeDerivations(const ClassNode* cn, CodeMarker* marker)
+{
+ QList<RelatedClass>::ConstIterator r;
+ int index;
+
+ if (!cn->baseClasses().isEmpty()) {
+ writer.writeStartElement(CXXCLASSDERIVATIONS);
+ r = cn->baseClasses().begin();
+ index = 0;
+ while (r != cn->baseClasses().end()) {
+ writer.writeStartElement(CXXCLASSDERIVATION);
+ writer.writeStartElement(CXXCLASSDERIVATIONACCESSSPECIFIER);
+ writer.writeAttribute("value",(*r).accessString());
+ writer.writeEndElement(); // </cxxClassDerivationAccessSpecifier>
+ writer.writeStartElement(CXXCLASSBASECLASS);
+ QString fullTitle = marker->plainFullName((*r).node);
+ QString guid = lookupGuid(fullTitle);
+ writer.writeAttribute("href",guid);
+ writer.writeCharacters(fullTitle);
+ writer.writeEndElement(); // </cxxClassBaseClass>
+ writer.writeEndElement(); // </cxxClassDerivation>
+ ++r;
+ }
+ writer.writeEndElement(); // </cxxClassDerivations>
+ }
+}
- if (node->links().contains(Node::PreviousLink)) {
- linkPair = node->links()[Node::PreviousLink];
- linkNode = findNodeForTarget(linkPair.first, node, marker);
- if (!linkNode || linkNode == node)
- anchorPair = linkPair;
- else
- anchorPair = anchorForNode(linkNode);
+void DitaXmlGenerator::writeLocation(const Node* n, CodeMarker* marker)
+{
+ QString s1, s2, s3;
+ if (n->type() == Node::Class) {
+ s1 = CXXCLASSAPIITEMLOCATION;
+ s2 = CXXCLASSDECLARATIONFILE;
+ s3 = CXXCLASSDECLARATIONFILELINE;
+ }
+ else if (n->type() == Node::Function) {
+ s1 = CXXFUNCTIONAPIITEMLOCATION;
+ s2 = CXXFUNCTIONDECLARATIONFILE;
+ s3 = CXXFUNCTIONDECLARATIONFILELINE;
+ }
+ writer.writeStartElement(s1);
+ writer.writeStartElement(s2);
+ writer.writeAttribute("name","filePath");
+ writer.writeAttribute("value",n->location().filePath());
+ writer.writeEndElement(); // </cxx<s2>DeclarationFile>
+ writer.writeStartElement(s3);
+ writer.writeAttribute("name","lineNumber");
+ QString lineNr;
+ writer.writeAttribute("value",lineNr.setNum(n->location().lineNo()));
+ writer.writeEndElement(); // </cxx<s3>DeclarationFileLine>
+ writer.writeEndElement(); // </cxx<s1>ApiItemLocation>
+}
- out() << " <link rel=\"prev\" href=\""
- << anchorPair.first << "\" />\n";
+void DitaXmlGenerator::writeFunctions(const Section& s,
+ const ClassNode* cn,
+ CodeMarker* marker)
+{
+ NodeList::ConstIterator m = s.members.begin();
+ while (m != s.members.end()) {
+ if ((*m)->type() == Node::Function) {
+ const FunctionNode* fn = reinterpret_cast<const FunctionNode*>(*m);
+ QString name = fn->name();
+ writer.writeStartElement(CXXFUNCTION);
+ writeGuidAttribute(name);
+ writer.writeStartElement(APINAME);
+ writer.writeCharacters(name);
+ writer.writeEndElement(); // </apiName>
+ generateBrief(fn,marker);
+ writer.writeStartElement(CXXFUNCTIONDETAIL);
+ writer.writeStartElement(CXXFUNCTIONDEFINITION);
+ writer.writeStartElement(CXXFUNCTIONACCESSSPECIFIER);
+ writer.writeAttribute("value",fn->accessString());
+ writer.writeEndElement(); // <cxxFunctionAccessSpecifier>
+
+ if (fn->isStatic()) {
+ writer.writeStartElement(CXXFUNCTIONSTORAGECLASSSPECIFIERSTATIC);
+ writer.writeAttribute("name","static");
+ writer.writeAttribute("value","static");
+ writer.writeEndElement(); // <cxxFunctionStorageClassSpecifierStatic>
+ }
+
+ if (fn->isConst()) {
+ writer.writeStartElement(CXXFUNCTIONCONST);
+ writer.writeAttribute("name","const");
+ writer.writeAttribute("value","const");
+ writer.writeEndElement(); // <cxxFunctionConst>
+ }
- navigationLinks += "[Previous: <a href=\"" + anchorPair.first + "\">";
- if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty())
- navigationLinks += protectEnc(anchorPair.second);
- else
- navigationLinks += protectEnc(linkPair.second);
- navigationLinks += "</a>]\n";
- }
- if (node->links().contains(Node::ContentsLink)) {
- linkPair = node->links()[Node::ContentsLink];
- linkNode = findNodeForTarget(linkPair.first, node, marker);
- if (!linkNode || linkNode == node)
- anchorPair = linkPair;
+ if (fn->virtualness() != FunctionNode::NonVirtual) {
+ writer.writeStartElement(CXXFUNCTIONVIRTUAL);
+ writer.writeAttribute("name","virtual");
+ writer.writeAttribute("value","virtual");
+ writer.writeEndElement(); // <cxxFunctionVirtual>
+ if (fn->virtualness() == FunctionNode::PureVirtual) {
+ writer.writeStartElement(CXXFUNCTIONPUREVIRTUAL);
+ writer.writeAttribute("name","pure virtual");
+ writer.writeAttribute("value","pure virtual");
+ writer.writeEndElement(); // <cxxFunctionPureVirtual>
+ }
+ }
+
+ if (fn->name() == cn->name()) {
+ writer.writeStartElement(CXXFUNCTIONCONSTRUCTOR);
+ writer.writeAttribute("name","constructor");
+ writer.writeAttribute("value","constructor");
+ writer.writeEndElement(); // <cxxFunctionConstructor>
+ }
+ else if (fn->name()[0] == QChar('~')) {
+ writer.writeStartElement(CXXFUNCTIONDESTRUCTOR);
+ writer.writeAttribute("name","destructor");
+ writer.writeAttribute("value","destructor");
+ writer.writeEndElement(); // <cxxFunctionDestructor>
+ }
+ else {
+ writer.writeStartElement(CXXFUNCTIONDECLAREDTYPE);
+ writer.writeCharacters(fn->returnType());
+ writer.writeEndElement(); // <cxxFunctionDeclaredType>
+ }
+ QString fq = fullQualification(fn);
+ if (!fq.isEmpty()) {
+ writer.writeStartElement(CXXFUNCTIONSCOPEDNAME);
+ writer.writeCharacters(fq);
+ writer.writeEndElement(); // <cxxFunctionScopedName>
+ }
+ writer.writeStartElement(CXXFUNCTIONPROTOTYPE);
+ writer.writeCharacters(fn->signature(true));
+ writer.writeEndElement(); // <cxxFunctionPrototype>
+
+ QString fnl = fn->signature(false);
+ int idx = fnl.indexOf(' ');
+ if (idx < 0)
+ idx = 0;
else
- anchorPair = anchorForNode(linkNode);
-
- out() << " <link rel=\"contents\" href=\""
- << anchorPair.first << "\" />\n";
+ ++idx;
+ fnl = fn->parent()->name() + "::" + fnl.mid(idx);
+ writer.writeStartElement(CXXFUNCTIONNAMELOOKUP);
+ writer.writeCharacters(fnl);
+ writer.writeEndElement(); // <cxxFunctionNameLookup>
+
+ writeLocation(fn, marker);
+ writer.writeEndElement(); // <cxxFunctionDefinition>
+ writer.writeStartElement(APIDESC);
- navigationLinks += "[<a href=\"" + anchorPair.first + "\">";
- if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty())
- navigationLinks += protectEnc(anchorPair.second);
- else
- navigationLinks += protectEnc(linkPair.second);
- navigationLinks += "</a>]\n";
- }
- if (node->links().contains(Node::NextLink)) {
- linkPair = node->links()[Node::NextLink];
- linkNode = findNodeForTarget(linkPair.first, node, marker);
- if (!linkNode || linkNode == node)
- anchorPair = linkPair;
- else
- anchorPair = anchorForNode(linkNode);
+ if (!fn->doc().isEmpty()) {
+ generateBody(fn, marker);
+ // generateAlsoList(inner, marker);
+ }
- out() << " <link rel=\"next\" href=\""
- << anchorPair.first << "\" />\n";
+ writer.writeEndElement(); // </apiDesc>
+ writer.writeEndElement(); // </cxxFunctionDetail>
+ writer.writeEndElement(); // </cxxFunction>
- navigationLinks += "[Next: <a href=\"" + anchorPair.first + "\">";
- if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty())
- navigationLinks += protectEnc(anchorPair.second);
- else
- navigationLinks += protectEnc(linkPair.second);
- navigationLinks += "</a>]\n";
- }
- if (node->links().contains(Node::IndexLink)) {
- linkPair = node->links()[Node::IndexLink];
- linkNode = findNodeForTarget(linkPair.first, node, marker);
- if (!linkNode || linkNode == node)
- anchorPair = linkPair;
- else
- anchorPair = anchorForNode(linkNode);
- out() << " <link rel=\"index\" href=\""
- << anchorPair.first << "\" />\n";
- }
- if (node->links().contains(Node::StartLink)) {
- linkPair = node->links()[Node::StartLink];
- linkNode = findNodeForTarget(linkPair.first, node, marker);
- if (!linkNode || linkNode == node)
- anchorPair = linkPair;
- else
- anchorPair = anchorForNode(linkNode);
- out() << " <link rel=\"start\" href=\""
- << anchorPair.first << "\" />\n";
+ if (fn->metaness() == FunctionNode::Ctor ||
+ fn->metaness() == FunctionNode::Dtor ||
+ fn->overloadNumber() != 1) {
+ }
}
+ ++m;
}
+}
- foreach (const QString &stylesheet, stylesheets) {
- out() << " <link href=\"" << stylesheet << "\" rel=\"stylesheet\" "
- << "type=\"text/css\" />\n";
- }
+void DitaXmlGenerator::writeNestedClasses(const Section& s,
+ const ClassNode* cn,
+ CodeMarker* marker)
+{
+}
- foreach (const QString &customHeadElement, customHeadElements) {
- out() << " " << customHeadElement << "\n";
- }
+void DitaXmlGenerator::writeEnumerations(const Section& s,
+ const ClassNode* cn,
+ CodeMarker* marker)
+{
+}
+
+void DitaXmlGenerator::writeTypedefs(const Section& s,
+ const ClassNode* cn,
+ CodeMarker* marker)
+{
+}
+
+void DitaXmlGenerator::writeDataMembers(const Section& s,
+ const ClassNode* cn,
+ CodeMarker* marker)
+{
+}
- out() << "</head>\n"
- #endif
+void DitaXmlGenerator::writeProperties(const Section& s,
+ const ClassNode* cn,
+ CodeMarker* marker)
+{
+}
- QT_END_NAMESPACE
+QT_END_NAMESPACE
diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h
index 4de578d..71304b3 100644
--- a/tools/qdoc3/ditaxmlgenerator.h
+++ b/tools/qdoc3/ditaxmlgenerator.h
@@ -46,28 +46,15 @@
#ifndef DITAXMLGENERATOR_H
#define DITAXMLGENERATOR_H
-#define QDOC_NAME_ALIGNMENT
-
#include <qmap.h>
#include <qregexp.h>
#include <QXmlStreamWriter>
-
#include "codemarker.h"
#include "config.h"
-#include "dcfsection.h"
#include "pagegenerator.h"
QT_BEGIN_NAMESPACE
-#if 0
-struct NavigationBar
-{
- SectionIterator prev;
- SectionIterator current;
- SectionIterator next;
-};
-#endif
-
typedef QMultiMap<QString, Node*> NodeMultiMap;
typedef QMap<QString, NodeMultiMap> NewSinceMaps;
typedef QMap<Node*, NodeMultiMap> ParentMaps;
@@ -122,6 +109,29 @@ class DitaXmlGenerator : public PageGenerator
virtual QString refForNode(const Node *node);
virtual QString linkForNode(const Node *node, const Node *relative);
virtual QString refForAtom(Atom *atom, const Node *node);
+
+ QString fullQualification(const Node* n);
+
+ void writeDerivations(const ClassNode* cn, CodeMarker* marker);
+ void writeLocation(const Node* n, CodeMarker* marker);
+ void writeFunctions(const Section& s,
+ const ClassNode* cn,
+ CodeMarker* marker);
+ void writeNestedClasses(const Section& s,
+ const ClassNode* cn,
+ CodeMarker* marker);
+ void writeEnumerations(const Section& s,
+ const ClassNode* cn,
+ CodeMarker* marker);
+ void writeTypedefs(const Section& s,
+ const ClassNode* cn,
+ CodeMarker* marker);
+ void writeDataMembers(const Section& s,
+ const ClassNode* cn,
+ CodeMarker* marker);
+ void writeProperties(const Section& s,
+ const ClassNode* cn,
+ CodeMarker* marker);
private:
enum SubTitleSize { SmallSubTitle, LargeSubTitle };
@@ -134,24 +144,14 @@ class DitaXmlGenerator : public PageGenerator
void generateBreadCrumbs(const QString& title,
const Node *node,
CodeMarker *marker);
- void generateHeader(const QString& title,
- const Node *node = 0,
- CodeMarker *marker = 0);
+ void generateHeader(const Node* node);
void generateTitle(const QString& title,
const Text &subTitle,
SubTitleSize subTitleSize,
const Node *relative,
CodeMarker *marker);
- void generateFooter(const Node *node = 0);
- void generateBrief(const Node *node,
- CodeMarker *marker,
- const Node *relative = 0);
+ void generateBrief(const Node* node, CodeMarker* marker);
void generateIncludes(const InnerNode *inner, CodeMarker *marker);
-#if 0
- void generateNavigationBar(const NavigationBar& bar,
- const Node *node,
- CodeMarker *marker);
-#endif
void generateTableOfContents(const Node *node,
CodeMarker *marker,
Doc::SectioningUnit sectioningUnit,
@@ -198,7 +198,7 @@ class DitaXmlGenerator : public PageGenerator
void generateQmlInstantiates(const QmlClassNode* qcn, CodeMarker* marker);
void generateInstantiatedBy(const ClassNode* cn, CodeMarker* marker);
#endif
-#ifdef QDOC_NAME_ALIGNMENT
+
void generateSection(const NodeList& nl,
const Node *relative,
CodeMarker *marker,
@@ -217,18 +217,7 @@ class DitaXmlGenerator : public PageGenerator
const Node *relative,
CodeMarker::SynopsisStyle style = CodeMarker::Accessors,
bool nameAlignment = false);
-#else
- void generateSynopsis(const Node *node,
- const Node *relative,
- CodeMarker *marker,
- CodeMarker::SynopsisStyle style);
- void generateSectionInheritedList(const Section& section,
- const Node *relative,
- CodeMarker *marker);
- QString highlightedCode(const QString& markedCode,
- CodeMarker *marker,
- const Node *relative);
-#endif
+
void generateFullName(const Node *apparentNode,
const Node *relative,
CodeMarker *marker,
@@ -251,9 +240,6 @@ class DitaXmlGenerator : public PageGenerator
void findAllFunctions(const InnerNode *node);
void findAllLegaleseTexts(const InnerNode *node);
void findAllNamespaces(const InnerNode *node);
-#ifdef ZZZ_QDOC_QML
- void findAllQmlClasses(const InnerNode *node);
-#endif
void findAllSince(const InnerNode *node);
static int hOffset(const Node *node);
static bool isThreeColumnEnumValueTable(const Atom *atom);
@@ -261,9 +247,6 @@ class DitaXmlGenerator : public PageGenerator
const Node *relative,
CodeMarker *marker,
const Node** node);
- virtual void generateDcf(const QString &fileBase,
- const QString &startPage,
- const QString &title, DcfSection &dcfRoot);
virtual void generateIndex(const QString &fileBase,
const QString &url,
const QString &title);
@@ -283,20 +266,13 @@ class DitaXmlGenerator : public PageGenerator
CodeMarker* marker) const;
void generatePageIndex(const QString& fileName,
CodeMarker* marker) const;
+ QString writeGuidAttribute(QString text);
+ QString lookupGuid(QString text);
-#if 0
- NavigationBar currentNavigationBar;
-#endif
+ private:
QMap<QString, QString> refMap;
+ QMap<QString, QString> name2guidMap;
int codeIndent;
- DcfSection dcfClassesRoot;
- DcfSection dcfOverviewsRoot;
- DcfSection dcfExamplesRoot;
- DcfSection dcfDesignerRoot;
- DcfSection dcfLinguistRoot;
- DcfSection dcfAssistantRoot;
- DcfSection dcfQmakeRoot;
- HelpProjectWriter *helpProjectWriter;
bool inLink;
bool inObsoleteLink;
bool inContents;
@@ -323,6 +299,7 @@ class DitaXmlGenerator : public PageGenerator
const Tree *myTree;
bool slow;
bool obsoleteLinks;
+ int noLinks;
QMap<QString, NodeMap > moduleClassMap;
QMap<QString, NodeMap > moduleNamespaceMap;
NodeMap nonCompatClasses;
@@ -341,6 +318,7 @@ class DitaXmlGenerator : public PageGenerator
NewClassMaps newClassMaps;
NewClassMaps newQmlClassMaps;
static int id;
+ QXmlStreamWriter writer;
};
#define DITAXMLGENERATOR_ADDRESS "address"
diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp
index fe4ad86..616ae2f 100644
--- a/tools/qdoc3/main.cpp
+++ b/tools/qdoc3/main.cpp
@@ -68,6 +68,7 @@
#include "qscodeparser.h"
#include "sgmlgenerator.h"
#include "webxmlgenerator.h"
+#include "ditaxmlgenerator.h"
#include "tokenizer.h"
#include "tree.h"
#include <qdebug.h>
@@ -427,6 +428,7 @@ int main(int argc, char **argv)
ManGenerator manGenerator;
SgmlGenerator smglGenerator;
WebXMLGenerator webxmlGenerator;
+ DitaXmlGenerator ditaxmlGenerator;
QStringList qdocFiles;
QString opt;
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index 3c7e9dc..b71a43e 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -154,6 +154,41 @@ void Node::setLink(LinkType linkType, const QString &link, const QString &desc)
}
/*!
+ Returns a string representing the access specifier.
+ */
+QString Node::accessString() const
+{
+ switch (acc) {
+ case Protected:
+ return "protected";
+ case Private:
+ return "private";
+ case Public:
+ default:
+ break;
+ }
+ return "public";
+}
+
+
+/*!
+ Returns a string representing the access specifier.
+ */
+QString RelatedClass::accessString() const
+{
+ switch (access) {
+ case Node::Protected:
+ return "protected";
+ case Node::Private:
+ return "private";
+ case Node::Public:
+ default:
+ break;
+ }
+ return "public";
+}
+
+/*!
*/
Node::Status Node::inheritedStatus() const
{
@@ -754,6 +789,7 @@ ClassNode::ClassNode(InnerNode *parent, const QString& name)
: InnerNode(Class, parent, name)
{
hidden = false;
+ abstract = false;
setPageType(ApiPage);
}
@@ -1043,6 +1079,19 @@ FunctionNode::FunctionNode(Type type, InnerNode *parent, const QString& name, bo
}
/*!
+ Sets the \a virtualness of this function. If the \a virtualness
+ is PureVirtual, and if the parent() is a ClassNode, set the parent's
+ \e abstract flag to true.
+ */
+void FunctionNode::setVirtualness(Virtualness virtualness)
+{
+ vir = virtualness;
+ if ((virtualness == PureVirtual) && parent() &&
+ (parent()->type() == Node::Class))
+ parent()->setAbstract(true);
+}
+
+/*!
*/
void FunctionNode::setOverload(bool overlode)
{
diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h
index 215a7ae..ccfd9b6 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -175,6 +175,7 @@ class Node
virtual QString nameForLists() const { return nam; }
Access access() const { return acc; }
+ QString accessString() const;
const Location& location() const { return loc; }
const Doc& doc() const { return d; }
Status status() const { return sta; }
@@ -260,6 +261,8 @@ class InnerNode : public Node
QStringList secondaryKeys();
const QStringList& pageKeywords() const { return pageKeywds; }
virtual void addPageKeywords(const QString& t) { pageKeywds << t; }
+ virtual bool isAbstract() const { return false; }
+ virtual void setAbstract(bool ) { }
protected:
InnerNode(Type type, InnerNode *parent, const QString& name);
@@ -312,6 +315,7 @@ struct RelatedClass
: access(access0),
node(node0),
dataTypeWithTemplateArgs(dataTypeWithTemplateArgs0) { }
+ QString accessString() const;
Node::Access access;
ClassNode* node;
@@ -339,11 +343,14 @@ class ClassNode : public InnerNode
void setServiceName(const QString& value) { sname = value; }
QString qmlElement() const { return qmlelement; }
void setQmlElement(const QString& value) { qmlelement = value; }
+ virtual bool isAbstract() const { return abstract; }
+ virtual void setAbstract(bool b) { abstract = b; }
private:
QList<RelatedClass> bas;
QList<RelatedClass> der;
bool hidden;
+ bool abstract;
QString sname;
QString qmlelement;
};
@@ -580,7 +587,7 @@ class FunctionNode : public LeafNode
void setReturnType(const QString& returnType) { rt = returnType; }
void setParentPath(const QStringList& parentPath) { pp = parentPath; }
void setMetaness(Metaness metaness) { met = metaness; }
- void setVirtualness(Virtualness virtualness) { vir = virtualness; }
+ void setVirtualness(Virtualness virtualness);
void setConst(bool conste) { con = conste; }
void setStatic(bool statique) { sta = statique; }
void setOverload(bool overlode);
diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp
index 13c83a8..cd364ef 100644
--- a/tools/qdoc3/pagegenerator.cpp
+++ b/tools/qdoc3/pagegenerator.cpp
@@ -299,8 +299,8 @@ QTextStream &PageGenerator::out()
/*!
Recursive writing of html files from the root \a node.
*/
-void PageGenerator::generateInnerNode(const InnerNode *node,
- CodeMarker *marker)
+void
+PageGenerator::generateInnerNode(const InnerNode* node, CodeMarker* marker)
{
if (!node->url().isNull())
return;
diff --git a/tools/qdoc3/test/qt-api-only_ja_JP.qdocconf b/tools/qdoc3/test/qt-api-only_ja_JP.qdocconf
new file mode 100644
index 0000000..aa3ab01
--- /dev/null
+++ b/tools/qdoc3/test/qt-api-only_ja_JP.qdocconf
@@ -0,0 +1,30 @@
+include(qt-build-docs_ja_JP.qdocconf)
+
+# Ensures that the generated index contains a URL that can be used by the
+# tools documentation (assistant.qdocconf, designer.qdocconf, linguist.qdocconf,
+# qmake.qdocconf).
+
+url = ./
+
+# Ensures that the documentation for the tools is not included in the generated
+# .qhp file.
+
+qhp.Qt.excluded += $QT_SOURCE_TREE/doc/src/development/assistant-manual.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/simpletextviewer.qdoc \
+ $QT_SOURCE_TREE/doc/src/development/designer-manual.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/calculatorbuilder.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/calculatorform.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/customwidgetplugin.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/taskmenuextension.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/containerextension.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/worldtimeclockbuilder.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/worldtimeclockplugin.qdoc \
+ $QT_SOURCE_TREE/doc/src/internationalization/linguist-manual.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/hellotr.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/arrowpad.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/trollprint.qdoc \
+ $QT_SOURCE_TREE/doc/src/development/qmake-manual.qdoc
+
+outputdir = $QT_BUILD_TREE/doc-build/html-qt_ja_JP
+tagfile = $QT_BUILD_TREE/doc-build/html-qt_ja_JP/qt.tags
+base = file:$QT_BUILD_TREE/doc-build/html-qt_ja_JP
diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf
index 00704ea..216ac6a 100644
--- a/tools/qdoc3/test/qt-build-docs.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs.qdocconf
@@ -115,6 +115,7 @@ excludedirs = $QT_SOURCE_TREE/src/3rdparty/clucene \
$QT_SOURCE_TREE/src/3rdparty/phonon/mmf \
$QT_SOURCE_TREE/src/3rdparty/phonon/waveout \
$QT_SOURCE_TREE/doc/src/snippets \
+ $QT_SOURCE_TREE/doc/src/ja_JP \
$QT_SOURCE_TREE/doc/src/zh_CN
sources.fileextensions = "*.cpp *.qdoc *.mm"
diff --git a/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf b/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf
new file mode 100644
index 0000000..e517b33
--- /dev/null
+++ b/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf
@@ -0,0 +1,110 @@
+include(compat.qdocconf)
+include(macros.qdocconf)
+include(qt-cpp-ignore.qdocconf)
+include(qt-html-templates_ja_JP.qdocconf)
+include(qt-defines.qdocconf)
+
+project = Qt
+description = Qt リファレンスドキュメント
+url = http://qt.nokia.com/doc/ja_JP/4.7
+
+sourceencoding = UTF-8
+outputencoding = UTF-8
+naturallanguage = ja
+
+indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
+
+qhp.projects = Qt
+
+qhp.Qt.file = qt.qhp
+qhp.Qt.namespace = com.trolltech.qt.470
+qhp.Qt.virtualFolder = qdoc
+qhp.Qt.title = Qt
+qhp.Qt.indexTitle = Qt
+qhp.Qt.selectors = fake:example
+
+qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc ja_JP
+qhp.Qt.customFilters.Qt.name = Qt 4.7.0
+qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0
+
+# Files not referenced in any qdoc file (last four are needed by qtdemo)
+# See also extraimages.HTML
+qhp.Qt.extraFiles = index.html \
+ images/bg_l.png \
+ images/bg_l_blank.png \
+ images/bg_r.png \
+ images/box_bg.png \
+ images/breadcrumb.png \
+ images/bullet_gt.png \
+ images/bullet_dn.png \
+ images/bullet_sq.png \
+ images/bullet_up.png \
+ images/feedbackground.png \
+ images/horBar.png \
+ images/page.png \
+ images/page_bg.png \
+ images/sprites-combined.png \
+ images/arrow-down.png \
+ images/spinner.gif \
+ images/stylesheet-coffee-plastique.png \
+ images/taskmenuextension-example.png \
+ images/coloreditorfactoryimage.png \
+ images/dynamiclayouts-example.png \
+ scripts/functions.js \
+ scripts/jquery.js \
+ style/OfflineStyle.css \
+ style/style_ie6.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/style.css
+
+language = Cpp
+
+sourcedirs = $QT_SOURCE_TREE/doc/src/ja_JP
+
+excludedirs = $QT_SOURCE_TREE/src/3rdparty/clucene \
+ $QT_SOURCE_TREE/src/3rdparty/des \
+ $QT_SOURCE_TREE/src/3rdparty/freetype \
+ $QT_SOURCE_TREE/src/3rdparty/harfbuzz \
+ $QT_SOURCE_TREE/src/3rdparty/kdebase \
+ $QT_SOURCE_TREE/src/3rdparty/libjpeg \
+ $QT_SOURCE_TREE/src/3rdparty/libmng \
+ $QT_SOURCE_TREE/src/3rdparty/libpng \
+ $QT_SOURCE_TREE/src/3rdparty/libtiff \
+ $QT_SOURCE_TREE/src/3rdparty/md4 \
+ $QT_SOURCE_TREE/src/3rdparty/md5 \
+ $QT_SOURCE_TREE/src/3rdparty/patches \
+ $QT_SOURCE_TREE/src/3rdparty/sha1 \
+ $QT_SOURCE_TREE/src/3rdparty/sqlite \
+ $QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore \
+ $QT_SOURCE_TREE/src/3rdparty/webkit/WebCore \
+ $QT_SOURCE_TREE/src/3rdparty/wintab \
+ $QT_SOURCE_TREE/src/3rdparty/zlib \
+ $QT_SOURCE_TREE/doc/src/snippets \
+ $QT_SOURCE_TREE/doc/src/zh_CN \
+ $QT_SOURCE_TREE/src/3rdparty/phonon/gstreamer \
+ $QT_SOURCE_TREE/src/3rdparty/phonon/ds9 \
+ $QT_SOURCE_TREE/src/3rdparty/phonon/qt7 \
+ $QT_SOURCE_TREE/src/3rdparty/phonon/mmf \
+ $QT_SOURCE_TREE/src/3rdparty/phonon/waveout
+
+sources.fileextensions = "*.cpp *.qdoc *.mm"
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp"
+examples.imageextensions = "*.png"
+
+exampledirs = $QT_SOURCE_TREE/doc/src \
+ $QT_SOURCE_TREE/examples/ja_JP \
+ $QT_SOURCE_TREE/examples \
+ $QT_SOURCE_TREE/examples/tutorials \
+ $QT_SOURCE_TREE \
+ $QT_SOURCE_TREE/qmake/examples \
+ $QT_SOURCE_TREE/src/3rdparty/webkit/WebKit/qt/docs
+imagedirs = $QT_SOURCE_TREE/doc/src/ja_JP/images \
+ $QT_SOURCE_TREE/doc/src/images \
+ $QT_SOURCE_TREE/examples \
+ $QT_SOURCE_TREE/doc/src/template/images
+outputdir = $QT_BUILD_TREE/doc/html_ja_JP
+tagfile = $QT_BUILD_TREE/doc/html_ja_JP/qt.tags
+base = file:$QT_BUILD_TREE/doc/html_ja_JP
+
+HTML.generatemacrefs = "true"
diff --git a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
index 712e23f..909a2d4 100644
--- a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
@@ -30,32 +30,32 @@ qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0
# Files not referenced in any qdoc file (last four are needed by qtdemo)
# See also extraimages.HTML
qhp.Qt.extraFiles = index.html \
- images/bg_l.png \
- images/bg_l_blank.png \
- images/bg_r.png \
- images/box_bg.png \
- images/breadcrumb.png \
- images/bullet_gt.png \
- images/bullet_dn.png \
- images/bullet_sq.png \
- images/bullet_up.png \
- images/feedbackground.png \
- images/horBar.png \
- images/page.png \
- images/page_bg.png \
- images/sprites-combined.png \
- images/arrow-down.png \
- images/spinner.gif \
- images/stylesheet-coffee-plastique.png \
- images/taskmenuextension-example.png \
- images/coloreditorfactoryimage.png \
- images/dynamiclayouts-example.png \
- scripts/functions.js \
- scripts/jquery.js \
- style/style_ie6.css \
- style/style_ie7.css \
- style/style_ie8.css \
- style/style.css
+ images/bg_l.png \
+ images/bg_l_blank.png \
+ images/bg_r.png \
+ images/box_bg.png \
+ images/breadcrumb.png \
+ images/bullet_gt.png \
+ images/bullet_dn.png \
+ images/bullet_sq.png \
+ images/bullet_up.png \
+ images/feedbackground.png \
+ images/horBar.png \
+ images/page.png \
+ images/page_bg.png \
+ images/sprites-combined.png \
+ images/arrow-down.png \
+ images/spinner.gif \
+ images/stylesheet-coffee-plastique.png \
+ images/taskmenuextension-example.png \
+ images/coloreditorfactoryimage.png \
+ images/dynamiclayouts-example.png \
+ scripts/functions.js \
+ scripts/jquery.js \
+ style/style_ie6.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/style.css
language = Cpp
@@ -80,6 +80,7 @@ excludedirs = $QT_SOURCE_TREE/src/3rdparty/clucene \
$QT_SOURCE_TREE/src/3rdparty/wintab \
$QT_SOURCE_TREE/src/3rdparty/zlib \
$QT_SOURCE_TREE/doc/src/snippets \
+ $QT_SOURCE_TREE/doc/src/ja_JP \
$QT_SOURCE_TREE/src/3rdparty/phonon/gstreamer \
$QT_SOURCE_TREE/src/3rdparty/phonon/ds9 \
$QT_SOURCE_TREE/src/3rdparty/phonon/qt7 \
diff --git a/tools/qdoc3/test/qt-ditaxml.qdocconf b/tools/qdoc3/test/qt-ditaxml.qdocconf
new file mode 100644
index 0000000..66f30e3
--- /dev/null
+++ b/tools/qdoc3/test/qt-ditaxml.qdocconf
@@ -0,0 +1,11 @@
+include(qt.qdocconf)
+
+imagedirs = $QTDIR/doc/src/images \
+ $QTDIR/examples \
+ $QTDIR/doc/src/template/images
+
+outputdir = $QTDIR/doc/ditaxml
+outputformats = DITAXML
+
+generateindex = true
+url = .
diff --git a/tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf b/tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf
new file mode 100644
index 0000000..027548e
--- /dev/null
+++ b/tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf
@@ -0,0 +1,178 @@
+HTML.stylesheets = style/style.css \
+ style/OfflineStyle.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/style_ie6.css
+
+HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
+ " <div class=\"content\"> \n" \
+ " <div id=\"nav-logo\">\n" \
+ " <a href=\"index.html\">Home</a></div>\n" \
+ " <a href=\"index.html\" class=\"qtref\"><span>Qt Reference Documentation</span></a>\n" \
+ " <div id=\"narrowsearch\"><form onsubmit=\"return false;\" action=\"\" id=\"qtdocsearch\">\n" \
+ " <fieldset>\n" \
+ " <input type=\"text\" value=\"\" id=\"pageType\" name=\"searchstring\">\n" \
+ " </fieldset>\n" \
+ " </form></div>\n" \
+ " <div id=\"nav-topright\">\n" \
+ " <ul>\n" \
+ " <li class=\"nav-topright-home\"><a href=\"http://qt.nokia.com/\">Qt HOME</a></li>\n" \
+ " <li class=\"nav-topright-dev\"><a href=\"http://qt.nokia.com/developer\">DEV</a></li>\n" \
+ " <li class=\"nav-topright-labs\"><a href=\"http://labs.qt.nokia.com/blogs/\">LABS</a></li>\n" \
+ " <li class=\"nav-topright-doc nav-topright-doc-active\"><a href=\"http://doc.qt.nokia.com/\">\n" \
+ " DOC</a></li>\n" \
+ " <li class=\"nav-topright-blog\"><a href=\"http://blog.qt.nokia.com/\">BLOG</a></li>\n" \
+ " <li class=\"nav-topright-shop\"><a title=\"SHOP\" href=\"http://shop.qt.nokia.com\">SHOP</a></li>\n" \
+ " </ul>\n" \
+ " </div>\n" \
+ " <div id=\"shortCut\">\n" \
+ " <ul>\n" \
+ " <li class=\"shortCut-topleft-inactive\"><span><a href=\"index.html\">Qt 4.7</a></span></li>\n" \
+ " <li class=\"shortCut-topleft-active\"><a href=\"http://qt.nokia.com/doc/\">ALL VERSIONS" \
+ " </a></li>\n" \
+ " </ul>\n" \
+ " </div>\n" \
+ " <ul class=\"sf-menu sf-js-enabled sf-shadow\" id=\"narrowmenu\"> \n" \
+ " <li><a href=\"#\">API Lookup</a> \n" \
+ " <ul id=\"topmenuLook\"> \n" \
+ " <li><a href=\"classes.html\">Class index</a></li> \n" \
+ " <li><a href=\"functions.html\">Function index</a></li> \n" \
+ " <li><a href=\"modules.html\">Modules</a></li> \n" \
+ " <li><a href=\"namespaces.html\">Namespaces</a></li> \n" \
+ " <li><a href=\"qtglobal.html\">Global stuff</a></li> \n" \
+ " <li><a href=\"qdeclarativeelements.html\">QML elements</a></li> \n" \
+ " </ul> \n" \
+ " </li> \n" \
+ " <li><a href=\"#\">Qt Topics</a> \n" \
+ " <ul id=\"topmenuTopic\"> \n" \
+ " <li><a href=\"qt-basic-concepts.html\">Basic Qt architecture</a></li> \n" \
+ " <li><a href=\"declarativeui.html\">Device UI's &amp; Qt Quick</a></li> \n" \
+ " <li><a href=\"qt-gui-concepts.html\">Desktop UI components</a></li> \n" \
+ " <li><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
+ " </ul> \n" \
+ " </li> \n" \
+ " <li><a href=\"#\">Examples</a> \n" \
+ " <ul id=\"topmenuexample\"> \n" \
+ " <li><a href=\"all-examples.html\">Examples</a></li> \n" \
+ " <li><a href=\"tutorials.html\">チュートリアル</a></li> \n" \
+ " <li><a href=\"demos.html\">Demos</a></li> \n" \
+ " <li><a href=\"qdeclarativeexamples.html\">QML Examples</a></li> \n" \
+ " <li><a href=\"qdeclarativeexamples.html#Demos\">QML Demos</a></li> \n" \
+ " </ul> \n" \
+ " </li> \n" \
+ " </ul> \n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"wrapper\">\n" \
+ " <div class=\"hd\">\n" \
+ " <span></span>\n" \
+ " </div>\n" \
+ " <div class=\"bd group\">\n" \
+ " <div class=\"sidebar\">\n" \
+ " <div class=\"searchlabel\">\n" \
+ " Search index:</div>\n" \
+ " <div class=\"search\">\n" \
+ " <form id=\"qtdocsearch\" action=\"\" onsubmit=\"return false;\">\n" \
+ " <fieldset>\n" \
+ " <input type=\"text\" name=\"searchstring\" id=\"pageType\" value=\"\" />\n" \
+ " </fieldset>\n" \
+ " </form>\n" \
+ " </div>\n" \
+ " <div class=\"box first bottombar\" id=\"lookup\">\n" \
+ " <h2 title=\"API Lookup\"><span></span>\n" \
+ " API Lookup</h2>\n" \
+ " <div id=\"list001\" class=\"list\">\n" \
+ " <ul id=\"ul001\" >\n" \
+ " <li class=\"defaultLink\"><a href=\"classes.html\">Class index</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"functions.html\">Function index</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"modules.html\">Modules</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"namespaces.html\">Namespaces</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qtglobal.html\">Global stuff</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qdeclarativeelements.html\">QML elements</a></li>\n" \
+ " </ul> \n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"box bottombar\" id=\"topics\">\n" \
+ " <h2 title=\"Qt Topics\"><span></span>\n" \
+ " Qt Topics</h2>\n" \
+ " <div id=\"list002\" class=\"list\">\n" \
+ " <ul id=\"ul002\" >\n" \
+ " <li class=\"defaultLink\"><a href=\"qt-basic-concepts.html\">Basic Qt architecture</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"declarativeui.html\">Device UI's &amp; Qt Quick</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qt-gui-concepts.html\">Desktop UI components</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"platform-specific.html\">Platform-specific info</a></li>\n" \
+ " </ul> \n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"box\" id=\"examples\">\n" \
+ " <h2 title=\"Examples\"><span></span>\n" \
+ " Examples</h2>\n" \
+ " <div id=\"list003\" class=\"list\">\n" \
+ " <ul id=\"ul003\">\n" \
+ " <li class=\"defaultLink\"><a href=\"all-examples.html\">Examples</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"tutorials.html\">チュートリアル</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"demos.html\">Demos</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html\">QML Examples</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html#Demos\">QML Demos</a></li>\n" \
+ " </ul> \n" \
+ " </div>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"wrap\">\n" \
+ " <div class=\"toolbar\">\n" \
+ " <div class=\"breadcrumb toolblock\">\n" \
+ " <ul>\n" \
+ " <li class=\"first\"><a href=\"index.html\">Home</a></li>\n" \
+ " <!-- Bread crumbs goes here -->\n"
+
+HTML.postpostheader = " </ul>\n" \
+ " </div>\n" \
+ " <div class=\"toolbuttons toolblock\">\n" \
+ " <ul>\n" \
+ " <li id=\"smallA\" class=\"t_button\">A</li>\n" \
+ " <li id=\"medA\" class=\"t_button active\">A</li>\n" \
+ " <li id=\"bigA\" class=\"t_button\">A</li>\n" \
+ " <li id=\"print\" class=\"t_button\"><a href=\"javascript:this.print();\">\n" \
+ " <span>Print</span></a></li>\n" \
+ " </ul>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"content\">\n"
+
+HTML.footer = " <!-- /div -->\n" \
+ " <div class=\"feedback t_button\">\n" \
+ " [+] Documentation Feedback</div>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"ft\">\n" \
+ " <span></span>\n" \
+ " </div>\n" \
+ " </div> \n" \
+ " <div class=\"footer\">\n" \
+ " <p>\n" \
+ " <acronym title=\"Copyright\">&copy;</acronym> 2008-2010 Nokia Corporation and/or its\n" \
+ " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \
+ " in Finland and/or other countries worldwide.</p>\n" \
+ " <p>\n" \
+ " All other trademarks are property of their respective owners. <a title=\"Privacy Policy\"\n" \
+ " href=\"http://qt.nokia.com/about/privacy-policy\">Privacy Policy</a></p>\n" \
+ " </div>\n" \
+ " <div id=\"feedbackBox\">\n" \
+ " <div id=\"feedcloseX\" class=\"feedclose t_button\">X</div>\n" \
+ " <form id=\"feedform\" action=\"http://doc.qt.nokia.com/docFeedbck/feedback.php\" method=\"get\">\n" \
+ " <p><textarea id=\"feedbox\" name=\"feedText\" rows=\"5\" cols=\"40\">Please submit you feedback...</textarea></p>\n" \
+ " <p><input id=\"feedsubmit\" class=\"feedclose\" type=\"submit\" name=\"feedback\" /></p>\n" \
+ " </form>\n" \
+ " </div>\n" \
+ " <div id=\"blurpage\">\n" \
+ " </div>\n" \
+ "<script type=\"text/javascript\">\n" \
+ " var _gaq = _gaq || [];\n" \
+ " _gaq.push([\'_setAccount\', \'UA-4457116-5\']);\n" \
+ " _gaq.push([\'_trackPageview\']);\n" \
+ " (function() {\n" \
+ " var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;\n" \
+ " ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';\n" \
+ " var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);\n" \
+ " })();\n" \
+ "</script>\n"
diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf
index edf6d92..d132771 100644
--- a/tools/qdoc3/test/qt.qdocconf
+++ b/tools/qdoc3/test/qt.qdocconf
@@ -130,6 +130,7 @@ excludedirs = $QTDIR/src/3rdparty/clucene \
$QTDIR/src/3rdparty/phonon/mmf \
$QTDIR/src/3rdparty/phonon/waveout \
$QTDIR/doc/src/snippets \
+ $QTDIR/doc/src/ja_JP \
$QTDIR/doc/src/zh_CN
sources.fileextensions = "*.cpp *.qdoc *.mm"
diff --git a/tools/qdoc3/test/qt_ja_JP.qdocconf b/tools/qdoc3/test/qt_ja_JP.qdocconf
new file mode 100644
index 0000000..d4141c7
--- /dev/null
+++ b/tools/qdoc3/test/qt_ja_JP.qdocconf
@@ -0,0 +1,125 @@
+include(compat.qdocconf)
+include(macros.qdocconf)
+include(qt-cpp-ignore.qdocconf)
+include(qt-html-templates_ja_JP.qdocconf)
+include(qt-defines.qdocconf)
+
+project = Qt
+versionsym =
+version = %VERSION%
+description = Qt リファレンスドキュメント
+url = http://qt.nokia.com/doc/ja_JP/4.7
+
+sourceencoding = UTF-8
+outputencoding = UTF-8
+naturallanguage = ja
+
+indexes = $QTDIR/doc/html/qt.index
+
+qhp.projects = Qt
+
+qhp.Qt.file = qt.qhp
+qhp.Qt.namespace = com.trolltech.qt.470
+qhp.Qt.virtualFolder = qdoc
+qhp.Qt.title = Qt
+qhp.Qt.indexTitle = Qt
+qhp.Qt.selectors = fake:example
+
+qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc ja_JP
+qhp.Qt.customFilters.Qt.name = Qt 4.7.0
+qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0
+
+# Files not referenced in any qdoc file (last four are needed by qtdemo)
+# See also extraimages.HTML
+qhp.Qt.extraFiles = index.html \
+ images/bg_l.png \
+ images/bg_l_blank.png \
+ images/bg_ll_blank.png \
+ images/bg_ul_blank.png \
+ images/header_bg.png \
+ images/bg_r.png \
+ images/box_bg.png \
+ images/breadcrumb.png \
+ images/bullet_gt.png \
+ images/bullet_dn.png \
+ images/bullet_sq.png \
+ images/bullet_up.png \
+ images/arrow_down.png \
+ images/feedbackground.png \
+ images/horBar.png \
+ images/page.png \
+ images/page_bg.png \
+ images/sprites-combined.png \
+ images/spinner.gif \
+ images/stylesheet-coffee-plastique.png \
+ images/taskmenuextension-example.png \
+ images/coloreditorfactoryimage.png \
+ images/dynamiclayouts-example.png \
+ scripts/functions.js \
+ scripts/jquery.js \
+ scripts/shBrushCpp.js \
+ scripts/shCore.js \
+ scripts/shLegacy.js \
+ scripts/narrow.js \
+ scripts/superfish.js \
+ style/shCore.css \
+ style/shThemeDefault.css \
+ style/narrow.css \
+ style/superfish.css \
+ style/superfish_skin.css \
+ style/OfflineStyle.css \
+ style/style_ie6.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/style.css
+
+language = Cpp
+
+sourcedirs = $QTDIR/doc/src/ja_JP
+
+excludedirs = $QTDIR/src/3rdparty/clucene \
+ $QTDIR/src/3rdparty/des \
+ $QTDIR/src/3rdparty/freetype \
+ $QTDIR/src/3rdparty/harfbuzz \
+ $QTDIR/src/3rdparty/kdebase \
+ $QTDIR/src/3rdparty/libjpeg \
+ $QTDIR/src/3rdparty/libmng \
+ $QTDIR/src/3rdparty/libpng \
+ $QTDIR/src/3rdparty/libtiff \
+ $QTDIR/src/3rdparty/md4 \
+ $QTDIR/src/3rdparty/md5 \
+ $QTDIR/src/3rdparty/patches \
+ $QTDIR/src/3rdparty/sha1 \
+ $QTDIR/src/3rdparty/sqlite \
+ $QTDIR/src/3rdparty/webkit/JavaScriptCore \
+ $QTDIR/src/3rdparty/webkit/WebCore \
+ $QTDIR/src/3rdparty/wintab \
+ $QTDIR/src/3rdparty/zlib \
+ $QTDIR/doc/src/snippets \
+ $QTDIR/doc/src/zh_CN \
+ $QTDIR/src/3rdparty/phonon/gstreamer \
+ $QTDIR/src/3rdparty/phonon/ds9 \
+ $QTDIR/src/3rdparty/phonon/qt7 \
+ $QTDIR/src/3rdparty/phonon/mmf \
+ $QTDIR/src/3rdparty/phonon/waveout
+
+sources.fileextensions = "*.cpp *.qdoc *.mm"
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp"
+examples.imageextensions = "*.png"
+
+exampledirs = $QTDIR/doc/src \
+ $QTDIR/examples/ja_JP \
+ $QTDIR/examples \
+ $QTDIR/examples/tutorials \
+ $QTDIR \
+ $QTDIR/qmake/examples \
+ $QTDIR/src/3rdparty/webkit/WebKit/qt/docs
+imagedirs = $QTDIR/doc/src/ja_JP/images \
+ $QTDIR/doc/src/images \
+ $QTDIR/examples \
+ $QTDIR/doc/src/template/images
+outputdir = $QTDIR/doc/html_ja_JP
+tagfile = $QTDIR/doc/html_ja_JP/qt.tags
+base = file:$QTDIR/doc/html_ja_JP
+
+HTML.generatemacrefs = "true"
diff --git a/tools/qdoc3/test/qt_zh_CN.qdocconf b/tools/qdoc3/test/qt_zh_CN.qdocconf
index db02478..4983f9e 100644
--- a/tools/qdoc3/test/qt_zh_CN.qdocconf
+++ b/tools/qdoc3/test/qt_zh_CN.qdocconf
@@ -32,28 +32,28 @@ qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0
# Files not referenced in any qdoc file (last four are needed by qtdemo)
# See also extraimages.HTML
qhp.Qt.extraFiles = index.html \
- images/bg_l.png \
- images/bg_l_blank.png \
- images/bg_r.png \
- images/box_bg.png \
- images/breadcrumb.png \
- images/bullet_gt.png \
- images/bullet_dn.png \
- images/bullet_sq.png \
- images/bullet_up.png \
- images/feedbackground.png \
- images/horBar.png \
- images/page.png \
- images/page_bg.png \
- images/sprites-combined.png \
- images/spinner.gif \
- images/stylesheet-coffee-plastique.png \
- images/taskmenuextension-example.png \
- images/coloreditorfactoryimage.png \
- images/dynamiclayouts-example.png \
- scripts/functions.js \
- scripts/jquery.js \
- style/style.css
+ images/bg_l.png \
+ images/bg_l_blank.png \
+ images/bg_r.png \
+ images/box_bg.png \
+ images/breadcrumb.png \
+ images/bullet_gt.png \
+ images/bullet_dn.png \
+ images/bullet_sq.png \
+ images/bullet_up.png \
+ images/feedbackground.png \
+ images/horBar.png \
+ images/page.png \
+ images/page_bg.png \
+ images/sprites-combined.png \
+ images/spinner.gif \
+ images/stylesheet-coffee-plastique.png \
+ images/taskmenuextension-example.png \
+ images/coloreditorfactoryimage.png \
+ images/dynamiclayouts-example.png \
+ scripts/functions.js \
+ scripts/jquery.js \
+ style/style.css
language = Cpp
@@ -78,6 +78,7 @@ excludedirs = $QTDIR/src/3rdparty/clucene \
$QTDIR/src/3rdparty/wintab \
$QTDIR/src/3rdparty/zlib \
$QTDIR/doc/src/snippets \
+ $QTDIR/doc/src/ja_JP \
$QTDIR/src/3rdparty/phonon/gstreamer \
$QTDIR/src/3rdparty/phonon/ds9 \
$QTDIR/src/3rdparty/phonon/qt7 \
diff --git a/tools/qml/content/Browser.qml b/tools/qml/content/Browser.qml
index 838a848..ff2bb47 100644
--- a/tools/qml/content/Browser.qml
+++ b/tools/qml/content/Browser.qml
@@ -134,7 +134,7 @@ Rectangle {
MouseArea {
id: mouseRegion
anchors.fill: parent
- onClicked: { launch() }
+ onClicked: { if (folders == wrapper.ListView.view.model) launch() }
}
states: [
State {
diff --git a/tools/qml/deviceorientation.cpp b/tools/qml/deviceorientation.cpp
index a13b912..e7c70d5 100644
--- a/tools/qml/deviceorientation.cpp
+++ b/tools/qml/deviceorientation.cpp
@@ -47,7 +47,7 @@ class DefaultDeviceOrientation : public DeviceOrientation
{
Q_OBJECT
public:
- DefaultDeviceOrientation() : DeviceOrientation(), m_orientation(DeviceOrientation::TopUp) {}
+ DefaultDeviceOrientation() : DeviceOrientation(), m_orientation(DeviceOrientation::Portrait) {}
Orientation orientation() const {
return m_orientation;
diff --git a/tools/qml/deviceorientation.h b/tools/qml/deviceorientation.h
index fe73868..817bfc8 100644
--- a/tools/qml/deviceorientation.h
+++ b/tools/qml/deviceorientation.h
@@ -54,10 +54,10 @@ class DeviceOrientation : public QObject
public:
enum Orientation {
UnknownOrientation,
- TopUp,
- TopDown,
- LeftUp,
- RightUp
+ Portrait,
+ Landscape,
+ PortraitInverted,
+ LandscapeInverted
};
virtual Orientation orientation() const = 0;
diff --git a/tools/qml/deviceorientation_maemo.cpp b/tools/qml/deviceorientation_maemo.cpp
index 501ff79..443edc8 100644
--- a/tools/qml/deviceorientation_maemo.cpp
+++ b/tools/qml/deviceorientation_maemo.cpp
@@ -40,100 +40,87 @@
****************************************************************************/
#include "deviceorientation.h"
-#include <stdio.h>
-#include <stdlib.h>
+#include <QtDBus>
+
+#include <mce/mode-names.h>
+#include <mce/dbus-names.h>
class MaemoOrientation : public DeviceOrientation
{
Q_OBJECT
public:
MaemoOrientation()
- : DeviceOrientation(),m_current(TopUp), m_lastSeen(TopUp), m_lastSeenCount(0)
+ : o(UnknownOrientation)
{
- m_current = get();
- if (m_current == UnknownOrientation)
- m_current = TopUp;
+ // enable the orientation sensor
+ QDBusConnection::systemBus().call(
+ QDBusMessage::createMethodCall(MCE_SERVICE, MCE_REQUEST_PATH,
+ MCE_REQUEST_IF, MCE_ACCELEROMETER_ENABLE_REQ));
+
+ // query the initial orientation
+ QDBusMessage reply = QDBusConnection::systemBus().call(
+ QDBusMessage::createMethodCall(MCE_SERVICE, MCE_REQUEST_PATH,
+ MCE_REQUEST_IF, MCE_DEVICE_ORIENTATION_GET));
+ if (reply.type() == QDBusMessage::ErrorMessage) {
+ qWarning("Unable to retrieve device orientation: %s", qPrintable(reply.errorMessage()));
+ } else {
+ o = toOrientation(reply.arguments().value(0).toString());
+ }
- startTimer(100);
+ // connect to the orientation change signal
+ QDBusConnection::systemBus().connect(QString(), MCE_SIGNAL_PATH, MCE_SIGNAL_IF,
+ MCE_DEVICE_ORIENTATION_SIG,
+ this,
+ SLOT(deviceOrientationChanged(QString)));
}
- Orientation orientation() const {
- return m_current;
+ ~MaemoOrientation()
+ {
+ // disable the orientation sensor
+ QDBusConnection::systemBus().call(
+ QDBusMessage::createMethodCall(MCE_SERVICE, MCE_REQUEST_PATH,
+ MCE_REQUEST_IF, MCE_ACCELEROMETER_DISABLE_REQ));
}
- void setOrientation(Orientation) { }
-
-protected:
- virtual void timerEvent(QTimerEvent *)
+ inline Orientation orientation() const
{
- Orientation c = get();
-
- if (c == m_lastSeen) {
- m_lastSeenCount++;
- } else {
- m_lastSeenCount = 0;
- m_lastSeen = c;
- }
-
- if (m_lastSeen != UnknownOrientation && m_lastSeen != m_current && m_lastSeenCount > 4) {
- m_current = m_lastSeen;
- emit orientationChanged();
- printf("%d\n", m_current);
- }
+ return o;
}
-signals:
- void changed();
-
-private:
- Orientation m_current;
- Orientation m_lastSeen;
- int m_lastSeenCount;
-
- Orientation get()
+ void setOrientation(Orientation o)
{
- Orientation o = UnknownOrientation;
-
- int ax, ay, az;
-
- read(&ax, &ay, &az);
+ }
- if (abs(az) > 850) {
- o = UnknownOrientation;
- } else if (ax < -750) {
- o = LeftUp;
- } else if (ax > 750) {
- o = RightUp;
- } else if (ay < -750) {
- o = TopUp;
- } else if (ay > 750) {
- o = TopDown;
- }
+private Q_SLOTS:
+ void deviceOrientationChanged(const QString &newOrientation)
+ {
+ o = toOrientation(newOrientation);
- return o;
+ emit orientationChanged();
+// printf("%d\n", o);
}
- int read(int *ax,int *ay,int *az)
+private:
+ static Orientation toOrientation(const QString &nativeOrientation)
{
- static const char *accel_filename = "/sys/class/i2c-adapter/i2c-3/3-001d/coord";
-
- FILE *fd;
- int rs;
- fd = fopen(accel_filename, "r");
- if(fd==NULL){ printf("liqaccel, cannot open for reading\n"); return -1;}
- rs=fscanf((FILE*) fd,"%i %i %i",ax,ay,az);
- fclose(fd);
- if(rs != 3){ printf("liqaccel, cannot read information\n"); return -2;}
- return 0;
+ if (nativeOrientation == MCE_ORIENTATION_LANDSCAPE)
+ return Landscape;
+ else if (nativeOrientation == MCE_ORIENTATION_LANDSCAPE_INVERTED)
+ return LandscapeInverted;
+ else if (nativeOrientation == MCE_ORIENTATION_PORTRAIT)
+ return Portrait;
+ else if (nativeOrientation == MCE_ORIENTATION_PORTRAIT_INVERTED)
+ return PortraitInverted;
+ return UnknownOrientation;
}
-};
+private:
+ Orientation o;
+};
DeviceOrientation* DeviceOrientation::instance()
{
- static MaemoOrientation *o = 0;
- if (!o)
- o = new MaemoOrientation;
+ static MaemoOrientation *o = new MaemoOrientation;
return o;
}
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 0cce1cc..a75023b 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -347,8 +347,9 @@ int main(int argc, char ** argv)
wflags |= Qt::WindowStaysOnTopHint;
QDeclarativeViewer *viewer = new QDeclarativeViewer(0, wflags);
+ viewer->setAttribute(Qt::WA_DeleteOnClose, true);
if (!scriptopts.isEmpty()) {
- QStringList options =
+ QStringList options =
scriptopts.split(QLatin1Char(','), QString::SkipEmptyParts);
QDeclarativeViewer::ScriptOptions scriptOptions = 0;
@@ -451,7 +452,5 @@ int main(int argc, char ** argv)
viewer->setUseGL(useGL);
viewer->raise();
- int rv = app.exec();
- delete viewer;
- exit(rv);
+ return app.exec();
}
diff --git a/tools/qml/qml.pri b/tools/qml/qml.pri
index cff65be..58d8cc1 100644
--- a/tools/qml/qml.pri
+++ b/tools/qml/qml.pri
@@ -18,6 +18,7 @@ SOURCES += $$PWD/qmlruntime.cpp \
RESOURCES = $$PWD/qmlruntime.qrc
maemo5 {
+ QT += dbus
SOURCES += $$PWD/deviceorientation_maemo.cpp
} else {
SOURCES += $$PWD/deviceorientation.cpp
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index f681303..676881d 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -281,7 +281,12 @@ public:
ret << httpProxy;
return ret;
}
+#ifdef Q_OS_WIN
+ // systemProxyForQuery can take insanely long on Windows (QTBUG-10106)
+ return QNetworkProxyFactory::proxyForQuery(query);
+#else
return QNetworkProxyFactory::systemProxyForQuery(query);
+#endif
}
void setHttpProxy (QNetworkProxy proxy)
{
@@ -581,10 +586,10 @@ void QDeclarativeViewer::createMenu(QMenuBar *menu, QMenu *flatmenu)
orientation->setExclusive(true);
connect(orientation, SIGNAL(triggered(QAction*)), this, SLOT(changeOrientation(QAction*)));
- orientation->addAction(tr("orientation: TopUp"));
- orientation->addAction(tr("orientation: LeftUp"));
- orientation->addAction(tr("orientation: TopDown"));
- orientation->addAction(tr("orientation: RightUp"));
+ orientation->addAction(tr("orientation: Portrait"));
+ orientation->addAction(tr("orientation: Landscape"));
+ orientation->addAction(tr("orientation: Portrait (Inverted)"));
+ orientation->addAction(tr("orientation: Landscape (Inverted)"));
QList<QAction *> actions = orientation->actions();
for (int i=0; i<actions.count(); i++) {
propertiesMenu->addAction(actions[i]);
@@ -799,11 +804,11 @@ void QDeclarativeViewer::statusChanged()
tester->executefailure();
if (canvas->status() == QDeclarativeView::Ready) {
- initialSize = canvas->sizeHint();
+ initialSize = canvas->initialSize();
if (canvas->resizeMode() == QDeclarativeView::SizeRootObjectToView) {
- updateSizeHints();
if (!isFullScreen() && !isMaximized()) {
resize(QSize(initialSize.width(), initialSize.height()+menuBarHeight()));
+ updateSizeHints();
}
}
}
@@ -936,7 +941,7 @@ void QDeclarativeViewer::sceneResized(QSize size)
if (canvas->resizeMode() == QDeclarativeView::SizeViewToRootObject) {
updateSizeHints();
}
- }
+ }
}
void QDeclarativeViewer::keyPressEvent(QKeyEvent *event)
@@ -1177,14 +1182,14 @@ void QDeclarativeViewer::changeOrientation(QAction *action)
action->setChecked(true);
QString o = action->text().split(QLatin1Char(':')).value(1).trimmed();
- if (o == QLatin1String("TopUp"))
- DeviceOrientation::instance()->setOrientation(DeviceOrientation::TopUp);
- else if (o == QLatin1String("TopDown"))
- DeviceOrientation::instance()->setOrientation(DeviceOrientation::TopDown);
- else if (o == QLatin1String("LeftUp"))
- DeviceOrientation::instance()->setOrientation(DeviceOrientation::LeftUp);
- else if (o == QLatin1String("RightUp"))
- DeviceOrientation::instance()->setOrientation(DeviceOrientation::RightUp);
+ if (o == QLatin1String("Portrait"))
+ DeviceOrientation::instance()->setOrientation(DeviceOrientation::Portrait);
+ else if (o == QLatin1String("Landscape"))
+ DeviceOrientation::instance()->setOrientation(DeviceOrientation::Landscape);
+ else if (o == QLatin1String("Portrait (Inverted)"))
+ DeviceOrientation::instance()->setOrientation(DeviceOrientation::PortraitInverted);
+ else if (o == QLatin1String("Landscape (Inverted)"))
+ DeviceOrientation::instance()->setOrientation(DeviceOrientation::LandscapeInverted);
}
void QDeclarativeViewer::orientationChanged()
@@ -1259,7 +1264,6 @@ void QDeclarativeViewer::updateSizeHints()
setMinimumSize(QSize(0,0));
setMaximumSize(QSize(16777215,16777215));
}
- updateGeometry();
}
void QDeclarativeViewer::registerTypes()
diff --git a/tools/shared/symbian/epocroot.cpp b/tools/shared/symbian/epocroot.cpp
index 064e056..ae1dcb1 100644
--- a/tools/shared/symbian/epocroot.cpp
+++ b/tools/shared/symbian/epocroot.cpp
@@ -105,10 +105,6 @@ static void fixEpocRoot(QString &path)
{
path.replace("\\", "/");
- if (path.size() > 1 && path[1] == QChar(':')) {
- path = path.mid(2);
- }
-
if (!path.size() || path[path.size()-1] != QChar('/')) {
path += QChar('/');
}
diff --git a/translations/check-ts.pl b/translations/check-ts.pl
new file mode 100755
index 0000000..7b46bf5
--- /dev/null
+++ b/translations/check-ts.pl
@@ -0,0 +1,85 @@
+#! /usr/bin/perl -w
+
+use strict;
+
+# "qt" must come last to avoid prefix matching.
+my @groups = ("assistant", "designer", "linguist", "qt_help", "qtconfig", "qvfb", "qt");
+
+my %scores = ();
+my %langs = ();
+
+my $files = join("\n", <*.ts>);
+my $res = `xmlpatterns -param files=\"$files\" check-ts.xq`;
+for my $i (split(/ /, $res)) {
+ $i =~ /^([^.]+).ts:(.*)$/;
+ my ($fn, $pc) = ($1, $2);
+ for my $g (@groups) {
+ if ($fn =~ /^${g}_(.*)$/) {
+ my $lang = $1;
+ $scores{$g}{$lang} = $pc;
+ $langs{$lang} = 1;
+ last;
+ }
+ }
+}
+
+# now we move "qt" to the front, as it should be the first column.
+pop @groups;
+unshift @groups, "qt";
+
+my $code = "";
+
+print "L10n ";
+for my $g (@groups) {
+ print " ".$g." ";
+}
+print "\n";
+for my $lang (sort(keys(%langs))) {
+ printf "%-5s ", $lang;
+ my $qt = 1;
+ my $rest = 1;
+ my $line = "";
+ for my $g (@groups) {
+ my $pc = $scores{$g}{$lang};
+ $pc = "0" if !defined($pc);
+ if (int($pc) < 98 or !$qt) {
+ if ($g eq "qt") {
+ $qt = 0;
+ } else {
+ $rest = 0;
+ }
+ } else {
+ $line .= " ".$g."_".$lang.".ts";
+ }
+ printf " %-".(length($g)+1)."s", $pc;
+ }
+ if ($qt) {
+ $code .= " \\\n ".$line;
+ if (!$rest) {
+ print " (partial)";
+ }
+ } else {
+ print " (excluded)";
+ }
+ print "\n";
+}
+
+my $fn = "translations.pro";
+my $nfn = $fn."new";
+open IN, $fn or die;
+open OUT, ">".$nfn or die;
+while (1) {
+ $_ = <IN>;
+ last if (/^TRANSLATIONS /);
+ print OUT $_;
+}
+while ($_ =~ /\\\n$/) {
+ $_ = <IN>;
+}
+print OUT "TRANSLATIONS =".$code."\n";
+while (<IN>) {
+ print OUT $_;
+}
+close OUT;
+close IN;
+rename $nfn, $fn;
diff --git a/translations/check-ts.xq b/translations/check-ts.xq
new file mode 100644
index 0000000..2d6404c
--- /dev/null
+++ b/translations/check-ts.xq
@@ -0,0 +1,3 @@
+for $file in tokenize($files, codepoints-to-string(10))
+ let $fresh := doc($file)/TS/context/message[not (translation/@type = 'obsolete')]
+ return concat($file, ":", count($fresh/translation[not (@type = 'unfinished')]) * 100 idiv count($fresh))
diff --git a/translations/qt_de.ts b/translations/qt_de.ts
index 226b7da..7d32ead 100644
--- a/translations/qt_de.ts
+++ b/translations/qt_de.ts
@@ -4,7 +4,7 @@
<context>
<name>CloseButton</name>
<message>
- <location filename="../src/gui/widgets/qtabbar.cpp" line="+2266"/>
+ <location filename="../src/gui/widgets/qtabbar.cpp" line="+2313"/>
<source>Close Tab</source>
<translation>Schließen</translation>
</message>
@@ -12,7 +12,7 @@
<context>
<name>FakeReply</name>
<message>
- <location filename="../src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp" line="+2217"/>
+ <location filename="../src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp" line="+2278"/>
<source>Fake error !</source>
<translation>Fake error !</translation>
</message>
@@ -25,7 +25,7 @@
<context>
<name>MAC_APPLICATION_MENU</name>
<message>
- <location filename="../src/gui/kernel/qapplication.cpp" line="+2316"/>
+ <location filename="../src/gui/kernel/qapplication.cpp" line="+2348"/>
<source>Services</source>
<translation>Dienste</translation>
</message>
@@ -1275,7 +1275,7 @@ nach
<translation>Diese Socket-Operation wird nicht unterstützt</translation>
</message>
<message>
- <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+614"/>
+ <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+625"/>
<location filename="../src/network/socket/qabstractsocket.cpp" line="+203"/>
<source>Socket operation timed out</source>
<translation>Das Zeitlimit für die Operation wurde überschritten</translation>
@@ -1597,7 +1597,7 @@ nach
<context>
<name>QDeclarativeAbstractAnimation</name>
<message>
- <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="+165"/>
+ <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="+166"/>
<source>Cannot animate non-existent property &quot;%1&quot;</source>
<translation>Die Eigenschaft &apos;%1&quot; existiert nicht und kann daher nicht animiert werden</translation>
</message>
@@ -1606,11 +1606,24 @@ nach
<source>Cannot animate read-only property &quot;%1&quot;</source>
<translation>Die Eigenschaft &apos;%1&quot; ist schreibgeschützt und kann daher nicht animiert werden</translation>
</message>
+ <message>
+ <location filename="../src/declarative/util/qdeclarativeutilmodule.cpp" line="+122"/>
+ <source>Animation is an abstract class</source>
+ <translation>Die Klasse Animation ist abstrakt</translation>
+ </message>
+</context>
+<context>
+ <name>QDeclarativeAnchorAnimation</name>
+ <message>
+ <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="+2568"/>
+ <source>Cannot set a duration of &lt; 0</source>
+ <translation>Es kann keine Zeitdauer &lt;0 gesetzt werden</translation>
+ </message>
</context>
<context>
<name>QDeclarativeAnchors</name>
<message>
- <location filename="../src/declarative/graphicsitems/qdeclarativeanchors.cpp" line="+181"/>
+ <location filename="../src/declarative/graphicsitems/qdeclarativeanchors.cpp" line="+180"/>
<source>Possible anchor loop detected on fill.</source>
<translation>Bei der Fülloperation wurde eine potentielle Endlosschleife der Anker festgestellt.</translation>
</message>
@@ -1676,9 +1689,17 @@ nach
</message>
</context>
<context>
+ <name>QDeclarativeAnimatedImage</name>
+ <message>
+ <location filename="../src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp" line="+86"/>
+ <source>Qt was built without support for QMovie</source>
+ <translation>Diese Version der Qt-Bibliothek wurde ohne Unterstützung für die Klasse QMovie erstellt</translation>
+ </message>
+</context>
+<context>
<name>QDeclarativeBehavior</name>
<message>
- <location filename="../src/declarative/util/qdeclarativebehavior.cpp" line="+122"/>
+ <location filename="../src/declarative/util/qdeclarativebehavior.cpp" line="+127"/>
<source>Cannot change the animation assigned to a Behavior.</source>
<translation>Die zu einem Behavior-Element gehörende Animation kann nicht geändert werden.</translation>
</message>
@@ -1686,7 +1707,7 @@ nach
<context>
<name>QDeclarativeBinding</name>
<message>
- <location filename="../src/declarative/qml/qdeclarativebinding.cpp" line="+222"/>
+ <location filename="../src/declarative/qml/qdeclarativebinding.cpp" line="+238"/>
<source>Binding loop detected for property &quot;%1&quot;</source>
<translation>Bei der für die Eigenschaft &quot;%1&quot; angegebenen Bindung wurde eine Endlosschleife festgestellt</translation>
</message>
@@ -1694,7 +1715,7 @@ nach
<context>
<name>QDeclarativeCompiledBindings</name>
<message>
- <location filename="../src/declarative/qml/qdeclarativecompiledbindings.cpp" line="+305"/>
+ <location filename="../src/declarative/qml/qdeclarativecompiledbindings.cpp" line="+372"/>
<source>Binding loop detected for property &quot;%1&quot;</source>
<translation>Bei der für die Eigenschaft &quot;%1&quot; angegebenen Bindung wurde eine Endlosschleife festgestellt</translation>
</message>
@@ -1703,16 +1724,16 @@ nach
<name>QDeclarativeCompiler</name>
<message>
<location filename="../src/declarative/qml/qdeclarativecompiler.cpp" line="+186"/>
- <location line="+1654"/>
- <location line="+187"/>
- <location line="+82"/>
+ <location line="+1596"/>
+ <location line="+186"/>
+ <location line="+81"/>
<location line="+75"/>
- <location line="+488"/>
+ <location line="+487"/>
<source>Invalid property assignment: &quot;%1&quot; is a read-only property</source>
<translation>Ungültige Zuweisung bei Eigenschaft: &quot;%1&quot; ist schreibgeschützt</translation>
</message>
<message>
- <location line="-2477"/>
+ <location line="-2416"/>
<source>Invalid property assignment: unknown enumeration</source>
<translation>Ungültige Zuweisung bei Eigenschaft: Ungültiger Aufzählungswert</translation>
</message>
@@ -1727,32 +1748,32 @@ nach
<translation>Ungültige Zuweisung bei Eigenschaft: Es wird eine URL erwartet</translation>
</message>
<message>
- <location line="+6"/>
+ <location line="+10"/>
<source>Invalid property assignment: unsigned int expected</source>
<translation>Ungültige Zuweisung bei Eigenschaft: Es wird eine vorzeichenloser Ganzzahlwert erwartet</translation>
</message>
<message>
- <location line="+7"/>
+ <location line="+11"/>
<source>Invalid property assignment: int expected</source>
<translation>Ungültige Zuweisung bei Eigenschaft: Es wird ein Ganzzahlwert erwartet</translation>
</message>
<message>
- <location line="+7"/>
+ <location line="+4"/>
<source>Invalid property assignment: float expected</source>
<translation>Ungültige Zuweisung bei Eigenschaft: Es wird eine Gleitkommazahl erwartet</translation>
</message>
<message>
- <location line="+7"/>
+ <location line="+3"/>
<source>Invalid property assignment: double expected</source>
<translation>Ungültige Zuweisung bei Eigenschaft: Es wird eine Gleitkommazahl (double) erwartet</translation>
</message>
<message>
- <location line="+7"/>
+ <location line="+6"/>
<source>Invalid property assignment: color expected</source>
<translation>Ungültige Zuweisung bei Eigenschaft: Es wird eine Farbspezifikation erwartet</translation>
</message>
<message>
- <location line="+7"/>
+ <location line="+8"/>
<source>Invalid property assignment: date expected</source>
<translation>Ungültige Zuweisung bei Eigenschaft: Es wird eine Datumsangabe erwartet</translation>
</message>
@@ -1767,7 +1788,7 @@ nach
<translation>Ungültige Zuweisung bei Eigenschaft: Es wird eine Datumsangabe erwartet</translation>
</message>
<message>
- <location line="+8"/>
+ <location line="+9"/>
<source>Invalid property assignment: point expected</source>
<translation>Ungültige Zuweisung bei Eigenschaft: Es wird eine Koordinatenangabe für einen Punkt erwartet</translation>
</message>
@@ -1797,63 +1818,38 @@ nach
<translation>Ungültige Zuweisung bei Eigenschaft: Der Typ &quot;%1&quot; ist nicht unterstützt</translation>
</message>
<message>
- <location line="+269"/>
+ <location line="+277"/>
<source>Element is not creatable.</source>
<translation>Das Element kann nicht erzeugt werden.</translation>
</message>
<message>
- <location line="+603"/>
+ <location line="+618"/>
<source>Component elements may not contain properties other than id</source>
<translation>Komponenten dürfen außer id keine weiteren Eigenschaften enthalten.</translation>
</message>
<message>
- <location line="+3"/>
- <source>Component elements may not contain script blocks</source>
- <translation>Komponenten dürfen keine Skripte enthalten</translation>
- </message>
- <message>
<location line="+7"/>
<source>Invalid component id specification</source>
<translation>Ungültige Komponentenspezifikation</translation>
</message>
<message>
<location line="+6"/>
- <location line="+558"/>
+ <location line="+478"/>
<source>id is not unique</source>
<translation>ID-Wert nicht eindeutig</translation>
</message>
<message>
- <location line="-548"/>
+ <location line="-468"/>
<source>Invalid component body specification</source>
<translation>Inhalt der Komponente ungültig</translation>
</message>
<message>
- <location line="+7"/>
+ <location line="+14"/>
<source>Cannot create empty component specification</source>
<translation>Es kann keine leere Komponentenangabe erzeugt werden</translation>
</message>
<message>
- <location line="+19"/>
- <source>Invalid Script block. Specify either the source property or inline script</source>
- <translation>Ungültiges Skript. Es muss die Eigenschaft oder ein eingebettetes Skript angegeben werden</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Invalid Script source value</source>
- <translation>Ungültige Angabe für Skript</translation>
- </message>
- <message>
- <location line="+25"/>
- <source>Properties cannot be set on Script block</source>
- <translation>Für ein Skript können keine Eigenschaften angegeben werden</translation>
- </message>
- <message>
- <location line="+14"/>
- <source>Invalid Script block</source>
- <translation>Ungültiges Skript</translation>
- </message>
- <message>
- <location line="+128"/>
+ <location line="+105"/>
<source>Empty signal assignment</source>
<translation>Leere Signalzuweisung</translation>
</message>
@@ -1869,29 +1865,29 @@ nach
</message>
<message>
<location line="+15"/>
- <location line="+104"/>
+ <location line="+102"/>
<source>Non-existent attached object</source>
<translation>Es existiert kein Bezugselement für die Eigenschaft</translation>
</message>
<message>
- <location line="-100"/>
- <location line="+103"/>
+ <location line="-98"/>
+ <location line="+101"/>
<source>Invalid attached object assignment</source>
<translation>Ungültige Zuweisung des Bezugselements</translation>
</message>
<message>
- <location line="-50"/>
+ <location line="-48"/>
<source>Cannot assign to non-existent default property</source>
<translation>Es kann keine Zuweisung erfolgen, da keine Vorgabe-Eigenschaft existiert</translation>
</message>
<message>
<location line="+2"/>
- <location line="+355"/>
+ <location line="+352"/>
<source>Cannot assign to non-existent property &quot;%1&quot;</source>
<translation>Es kann keine Zuweisung erfolgen, da keine Eigenschaft des Namens &apos;%1&quot; existiert</translation>
</message>
<message>
- <location line="-324"/>
+ <location line="-322"/>
<source>Invalid use of namespace</source>
<translation>Ungültige Verwendung eines Namensraums</translation>
</message>
@@ -1901,24 +1897,44 @@ nach
<translation>Kein gültiger Name einer Eigenschaft des Typs &apos;attached&apos;</translation>
</message>
<message>
- <location line="+183"/>
+ <location line="+182"/>
<source>Invalid use of id property</source>
<translation>Ungültige Verwendung einer Eigenschaft des Typs &apos;Id&apos;</translation>
</message>
<message>
- <location line="-356"/>
+ <location line="-357"/>
<source>Incorrectly specified signal assignment</source>
<translation></translation>
</message>
<message>
- <location line="+445"/>
+ <location line="-100"/>
+ <source>Component objects cannot declare new properties.</source>
+ <translation>Komponentenobjekte können keine neuen Eigenschaften deklarieren.</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Component objects cannot declare new signals.</source>
+ <translation>Komponentenobjekte können keine neuen Signale deklarieren.</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Component objects cannot declare new functions.</source>
+ <translation>Komponentenobjekte können keine neuen Funktionen deklarieren.</translation>
+ </message>
+ <message>
+ <location line="+108"/>
+ <source>Cannot assign a value to a signal (expecting a script to be run)</source>
+ <translation>Einem Signal können keine Werte zugewiesen werden (es wird ein Skript erwartet)</translation>
+ </message>
+ <message>
+ <location line="+434"/>
<location line="+2"/>
<source>Property has already been assigned a value</source>
<translation>Der Eigenschaft wurde bereits ein Wert zugewiesen</translation>
</message>
<message>
<location line="+12"/>
- <location line="+8"/>
+ <location line="+7"/>
<source>Invalid grouped property access</source>
<translation>Falsche Gruppierung bei Zugriff auf Eigenschaft</translation>
</message>
@@ -1973,7 +1989,7 @@ nach
<translation>Ungültige Zuweisung bei Eigenschaft: Es wird ein Skript erwartet</translation>
</message>
<message>
- <location line="+106"/>
+ <location line="+105"/>
<source>Cannot assign object to property</source>
<translation>Zuweisung eines Objekts an eine Eigenschaft nicht zulässig</translation>
</message>
@@ -2033,7 +2049,7 @@ nach
<translation>Eine als &apos;FINAL&apos; ausgewiesene Eigenschaft kann nicht überschrieben werden</translation>
</message>
<message>
- <location line="+25"/>
+ <location line="+24"/>
<source>Invalid property type</source>
<translation>Ungültiger Typ der Eigenschaft</translation>
</message>
@@ -2088,7 +2104,7 @@ nach
<context>
<name>QDeclarativeComponent</name>
<message>
- <location filename="../src/declarative/qml/qdeclarativecomponent.cpp" line="+452"/>
+ <location filename="../src/declarative/qml/qdeclarativecomponent.cpp" line="+459"/>
<source>Invalid empty URL</source>
<translation>Ungültige (leere) URL</translation>
</message>
@@ -2096,23 +2112,23 @@ nach
<context>
<name>QDeclarativeCompositeTypeManager</name>
<message>
- <location filename="../src/declarative/qml/qdeclarativecompositetypemanager.cpp" line="+483"/>
- <location line="+268"/>
+ <location filename="../src/declarative/qml/qdeclarativecompositetypemanager.cpp" line="+475"/>
+ <location line="+266"/>
<source>Resource %1 unavailable</source>
<translation>Auf die Ressource %1 konnte nicht zugegriffen werden</translation>
</message>
<message>
- <location line="-119"/>
+ <location line="-122"/>
<source>Namespace %1 cannot be used as a type</source>
<translation>Der Namensraum %1 kann nicht als Typangabe verwendet werden</translation>
</message>
<message>
<location line="+2"/>
- <source>%1 is not a type</source>
- <translation>%1 ist keine Typangabe</translation>
+ <source>%1 %2</source>
+ <translation>%1 %2</translation>
</message>
<message>
- <location line="+46"/>
+ <location line="+47"/>
<source>Type %1 unavailable</source>
<translation>Der Typ %1 ist nicht verfügbar</translation>
</message>
@@ -2120,14 +2136,13 @@ nach
<context>
<name>QDeclarativeConnections</name>
<message>
- <location filename="../src/declarative/util/qdeclarativeconnections.cpp" line="+172"/>
- <location line="+54"/>
- <location line="+7"/>
+ <location filename="../src/declarative/util/qdeclarativeconnections.cpp" line="+209"/>
+ <location line="+60"/>
<source>Cannot assign to non-existent property &quot;%1&quot;</source>
<translation>Es kann keine Zuweisung erfolgen, da keine Eigenschaft des Namens &apos;%1&quot; existiert</translation>
</message>
<message>
- <location line="-51"/>
+ <location line="-50"/>
<source>Connections: nested objects not allowed</source>
<translation>Verbindungen: Verschachtelte Objekte sind nicht zulässig</translation>
</message>
@@ -2175,13 +2190,29 @@ nach
<source>SQL: database version mismatch</source>
<translation>SQL: Die Version der Datenbank entspricht nicht der erwarteten Version</translation>
</message>
+</context>
+<context>
+ <name>QDeclarativeFlipable</name>
+ <message>
+ <location filename="../src/declarative/graphicsitems/qdeclarativeflipable.cpp" line="+129"/>
+ <source>front is a write-once property</source>
+ <translation>&apos;front&apos; kann nur einmal zugewiesen werden</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>back is a write-once property</source>
+ <translation>&apos;back&apos; kann nur einmal zugewiesen werden</translation>
+ </message>
+</context>
+<context>
+ <name>QDeclarativeImportDatabase</name>
<message>
- <location filename="../src/declarative/qml/qdeclarativeengine.cpp" line="+1515"/>
+ <location filename="../src/declarative/qml/qdeclarativeimport.cpp" line="+294"/>
<source>module &quot;%1&quot; definition &quot;%2&quot; not readable</source>
<translation>Modul &quot;%1&quot; Definition &quot;%2&quot; kann nicht gelesen werden</translation>
</message>
<message>
- <location line="+23"/>
+ <location line="+20"/>
<source>plugin cannot be loaded for module &quot;%1&quot;: %2</source>
<translation>Das Plugin des Moduls &quot;%1&quot; konnte nicht geladen werden: %2</translation>
</message>
@@ -2191,7 +2222,7 @@ nach
<translation>Modul &quot;%1&quot; Plugin &quot;%2&quot; konnte nicht gefunden werden</translation>
</message>
<message>
- <location line="+82"/>
+ <location line="+79"/>
<location line="+55"/>
<source>module &quot;%1&quot; version %2.%3 is not installed</source>
<translation>Modul &quot;%1&quot; Version %2.%3 ist nicht installiert</translation>
@@ -2210,29 +2241,59 @@ nach
<message>
<location line="-2"/>
<source>import &quot;%1&quot; has no qmldir and no namespace</source>
- <translation>&quot;qmldir&quot; und Namensraum fehlt bei Import &quot;%1&quot;</translation>
+ <translation>&quot;qmldir&quot; und Namensraum fehlen bei dem Import &quot;%1&quot;</translation>
</message>
-</context>
-<context>
- <name>QDeclarativeFlipable</name>
<message>
- <location filename="../src/declarative/graphicsitems/qdeclarativeflipable.cpp" line="+125"/>
- <source>front is a write-once property</source>
- <translation>&apos;front&apos; kann nur einmal zugewiesen werden</translation>
+ <location line="+46"/>
+ <source>- %1 is not a namespace</source>
+ <translation>- %1 ist kein gültiger Namensraum</translation>
</message>
<message>
- <location line="+19"/>
- <source>back is a write-once property</source>
- <translation>&apos;back&apos; kann nur einmal zugewiesen werden</translation>
+ <location line="+6"/>
+ <source>- nested namespaces not allowed</source>
+ <translation>- geschachtelte Namensräume sind nicht zulässig</translation>
+ </message>
+ <message>
+ <location line="+47"/>
+ <location line="+4"/>
+ <source>local directory</source>
+ <translation>Lokales Verzeichnis&apos;</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>is ambiguous. Found in %1 and in %2</source>
+ <translation>ist mehrdeutig. Es kommt in %1 und in %2 vor</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>is ambiguous. Found in %1 in version %2.%3 and %4.%5</source>
+ <translation>ist mehrdeutig. Es kommt in %1 in den Version %2.%3 und %4.%5 vor</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>is instantiated recursively</source>
+ <translation>wird rekursiv instanziiert</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>is not a type</source>
+ <translation>ist kein Typ</translation>
</message>
</context>
<context>
- <name>QDeclarativeInfo</name>
+ <name>QDeclarativeKeyNavigationAttached</name>
<message>
- <location filename="../src/declarative/qml/qdeclarativeinfo.cpp" line="+113"/>
- <location line="+3"/>
- <source>unknown location</source>
- <translation>Unbekannter Ort</translation>
+ <location filename="../src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp" line="+70"/>
+ <source>KeyNavigation is only available via attached properties</source>
+ <translation>Tastennavigation ist nur über Eigenschaften des Typs &apos;attached&apos; verfügbar</translation>
+ </message>
+</context>
+<context>
+ <name>QDeclarativeKeysAttached</name>
+ <message>
+ <location line="+1"/>
+ <source>Keys is only available via attached properties</source>
+ <translation>Die Unterstützung für Tasten ist nur über Eigenschaften des Typs &apos;attached&apos; verfügbar</translation>
</message>
</context>
<context>
@@ -2263,12 +2324,7 @@ nach
<translation>append: Der Wert ist kein Objekt</translation>
</message>
<message>
- <location line="+34"/>
- <source>get: index %1 out of range</source>
- <translation>get: Der Index %1 ist außerhalb des gültigen Bereichs</translation>
- </message>
- <message>
- <location line="+25"/>
+ <location line="+55"/>
<source>set: value is not an object</source>
<translation>set: Der Wert ist kein Objekt</translation>
</message>
@@ -2303,7 +2359,7 @@ nach
<context>
<name>QDeclarativeLoader</name>
<message>
- <location filename="../src/declarative/graphicsitems/qdeclarativeloader.cpp" line="+309"/>
+ <location filename="../src/declarative/graphicsitems/qdeclarativeloader.cpp" line="+323"/>
<source>Loader does not support loading non-visual elements.</source>
<translation>Das Laden nicht-visueller Elemente ist nicht unterstützt.</translation>
</message>
@@ -2311,7 +2367,7 @@ nach
<context>
<name>QDeclarativeParentAnimation</name>
<message>
- <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="+2370"/>
+ <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="-169"/>
<source>Unable to preserve appearance under complex transform</source>
<translation>Das Erscheinungsbild kann bei einer komplexen Transformation nicht beibehalten werden</translation>
</message>
@@ -2330,7 +2386,7 @@ nach
<context>
<name>QDeclarativeParentChange</name>
<message>
- <location filename="../src/declarative/util/qdeclarativestateoperations.cpp" line="+94"/>
+ <location filename="../src/declarative/util/qdeclarativestateoperations.cpp" line="+95"/>
<source>Unable to preserve appearance under complex transform</source>
<translation>Das Erscheinungsbild kann bei einer komplexen Transformation nicht beibehalten werden</translation>
</message>
@@ -2349,7 +2405,7 @@ nach
<context>
<name>QDeclarativeParser</name>
<message>
- <location filename="../src/declarative/qml/parser/qdeclarativejslexer.cpp" line="+558"/>
+ <location filename="../src/declarative/qml/parser/qdeclarativejslexer.cpp" line="+579"/>
<source>Illegal character</source>
<translation>Ungültiges Zeichen</translation>
</message>
@@ -2364,17 +2420,19 @@ nach
<translation>Ungültiges Escape-Sequenz</translation>
</message>
<message>
- <location line="+46"/>
+ <location line="-77"/>
+ <location line="+123"/>
+ <location line="+54"/>
<source>Illegal unicode escape sequence</source>
<translation>Ungültige Unicode-Escape-Sequenz</translation>
</message>
<message>
- <location line="+26"/>
+ <location line="-28"/>
<source>Unclosed comment at end of file</source>
<translation>Kommentar am Dateiende nicht abgeschlossen</translation>
</message>
<message>
- <location line="+87"/>
+ <location line="+102"/>
<source>Illegal syntax for exponential number</source>
<translation>Ungültige Syntax des Exponenten</translation>
</message>
@@ -2384,16 +2442,27 @@ nach
<translation>Ein Bezeichner darf nicht mit einem numerischen Literal beginnen</translation>
</message>
<message>
- <location line="+331"/>
+ <location line="+338"/>
<source>Unterminated regular expression literal</source>
<translation>Regulärer Ausdruck nicht abgeschlossen</translation>
</message>
<message>
- <location line="+24"/>
+ <location line="+15"/>
<source>Invalid regular expression flag &apos;%0&apos;</source>
<translation>Ungültiger Modifikator &apos;%0&apos; bei regulärem Ausdruck</translation>
</message>
<message>
+ <location line="+16"/>
+ <location line="+22"/>
+ <source>Unterminated regular expression backslash sequence</source>
+ <translation>Regulärer Ausdruck nicht abgeschlossen</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Unterminated regular expression class</source>
+ <translation>Klasse im regulären Ausdruck nicht abgeschlossen</translation>
+ </message>
+ <message>
<location filename="../src/declarative/qml/parser/qdeclarativejsparser.cpp" line="+1828"/>
<location line="+67"/>
<source>Syntax error</source>
@@ -2411,28 +2480,28 @@ nach
<translation>Es wird das Element &apos;%1&apos; erwartet</translation>
</message>
<message>
- <location filename="../src/declarative/qml/qdeclarativescriptparser.cpp" line="+264"/>
- <location line="+481"/>
+ <location filename="../src/declarative/qml/qdeclarativescriptparser.cpp" line="+260"/>
+ <location line="+431"/>
<location line="+59"/>
<source>Property value set multiple times</source>
<translation>Mehrfache Zuweisung eines Wertes an eine Eigenschaft</translation>
</message>
<message>
- <location line="-529"/>
+ <location line="-479"/>
<source>Expected type name</source>
<translation>Es wird ein Typname erwartet</translation>
</message>
<message>
- <location line="+29"/>
- <source>Invalid use of Script block</source>
- <translation>Ungültige Verwendung von Skript-Blöcken</translation>
- </message>
- <message>
- <location line="+161"/>
+ <location line="+136"/>
<source>Invalid import qualifier ID</source>
<translation>Ungültige Id-Angabe bei Import</translation>
</message>
<message>
+ <location line="+8"/>
+ <source>Reserved name &quot;Qt&quot; cannot be used as an qualifier</source>
+ <translation>Der reservierte Name &quot;Qt&quot; kann nicht als Bezeichner verwendet werden</translation>
+ </message>
+ <message>
<location line="+15"/>
<source>Script import qualifiers must be unique.</source>
<translation>Der für den Skript-Import angegebene Qualifizierer muss eindeutig sein.</translation>
@@ -2448,7 +2517,7 @@ nach
<translation>Der Import einer Bibliothek erfordert eine Versionsangabe</translation>
</message>
<message>
- <location line="+60"/>
+ <location line="+59"/>
<source>Expected parameter type</source>
<translation>Es wird eine Typangabe für den Parameter erwartet</translation>
</message>
@@ -2473,20 +2542,15 @@ nach
<translation>&apos;read-only&apos; wird an dieser Stelle noch nicht unterstützt</translation>
</message>
<message>
- <location line="+222"/>
+ <location line="+215"/>
<source>JavaScript declaration outside Script element</source>
<translation>Eine JavaScript-Deklaration ist außerhalb eines Skriptelementes nicht zulässig</translation>
</message>
- <message>
- <location line="+19"/>
- <source>Variable declarations not allow in inline Script blocks</source>
- <translation>Variablendeklarationen sind in eingebetteten Script-Blöcken nicht zulässig</translation>
- </message>
</context>
<context>
<name>QDeclarativePauseAnimation</name>
<message>
- <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="-1972"/>
+ <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="-1990"/>
<source>Cannot set a duration of &lt; 0</source>
<translation>Es kann keine Zeitdauer &lt;0 gesetzt werden</translation>
</message>
@@ -2494,7 +2558,7 @@ nach
<context>
<name>QDeclarativePixmapCache</name>
<message>
- <location filename="../src/declarative/util/qdeclarativepixmapcache.cpp" line="+197"/>
+ <location filename="../src/declarative/util/qdeclarativepixmapcache.cpp" line="+190"/>
<source>Error decoding: %1: %2</source>
<translation>Fehler beim Decodieren: %1: %2</translation>
</message>
@@ -2505,7 +2569,7 @@ nach
</message>
<message>
<location line="+19"/>
- <location line="+342"/>
+ <location line="+345"/>
<source>Cannot open: %1</source>
<translation>Fehlschlag beim Öffnen: %1</translation>
</message>
@@ -2518,7 +2582,7 @@ nach
<context>
<name>QDeclarativePropertyAnimation</name>
<message>
- <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="+1100"/>
+ <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="+1113"/>
<source>Cannot set a duration of &lt; 0</source>
<translation>Es kann keine Zeitdauer &lt;0 gesetzt werden</translation>
</message>
@@ -2526,12 +2590,12 @@ nach
<context>
<name>QDeclarativePropertyChanges</name>
<message>
- <location filename="../src/declarative/util/qdeclarativepropertychanges.cpp" line="+231"/>
+ <location filename="../src/declarative/util/qdeclarativepropertychanges.cpp" line="+267"/>
<source>PropertyChanges does not support creating state-specific objects.</source>
<translation>Die Erzeugung von Objekten, die einem Zustand zugeordnet sind, wird von PropertyChanges nicht unterstützt.</translation>
</message>
<message>
- <location line="+151"/>
+ <location line="+157"/>
<source>Cannot assign to non-existent property &quot;%1&quot;</source>
<translation>Es kann keine Zuweisung erfolgen, da keine Eigenschaft des Namens &apos;%1&quot; existiert</translation>
</message>
@@ -2544,13 +2608,13 @@ nach
<context>
<name>QDeclarativeTextInput</name>
<message>
- <location filename="../src/declarative/graphicsitems/qdeclarativetextinput.cpp" line="+783"/>
- <location line="+9"/>
+ <location filename="../src/declarative/graphicsitems/qdeclarativetextinput.cpp" line="+793"/>
+ <location line="+8"/>
<source>Could not load cursor delegate</source>
<translation>Cursor-Delegate konnte nicht geladen werden</translation>
</message>
<message>
- <location line="+12"/>
+ <location line="+11"/>
<source>Could not instantiate cursor delegate</source>
<translation>Cursor-Delegate konnte angelegt werden</translation>
</message>
@@ -2563,7 +2627,7 @@ nach
<translation>Es konnte kein Objekt des Typs %1 erzeugt werden</translation>
</message>
<message>
- <location line="+380"/>
+ <location line="+390"/>
<source>Cannot assign value %1 to property %2</source>
<translation>Der Wert &apos;%1&apos; kann nicht der Eigenschaft %2 zugewiesen werden</translation>
</message>
@@ -2583,7 +2647,7 @@ nach
<translation>Der Signal-Eigenschaft %1 kann kein Objekt zugewiesen werden</translation>
</message>
<message>
- <location line="+153"/>
+ <location line="+146"/>
<source>Cannot assign object to list</source>
<translation>Zuweisung eines Objekts an eine Liste nicht zulässig</translation>
</message>
@@ -2606,15 +2670,24 @@ nach
<context>
<name>QDeclarativeVisualDataModel</name>
<message>
- <location filename="../src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp" line="+1032"/>
+ <location filename="../src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp" line="+1090"/>
<source>Delegate component must be Item type.</source>
<translation>Delegate-Komponente muss vom Typ &apos;Item&apos; sein</translation>
</message>
</context>
<context>
+ <name>QDeclarativeXmlListModel</name>
+ <message>
+ <location filename="../src/declarative/util/qdeclarativeutilmodule.cpp" line="-12"/>
+ <location line="+2"/>
+ <source>Qt was built without support for xmlpatterns</source>
+ <translation>Diese Version der Qt-Bibliothek wurde ohne Unterstützung für xmlpatterns erstellt</translation>
+ </message>
+</context>
+<context>
<name>QDeclarativeXmlListModelRole</name>
<message>
- <location filename="../src/declarative/util/qdeclarativexmllistmodel_p.h" line="+168"/>
+ <location filename="../src/declarative/util/qdeclarativexmllistmodel_p.h" line="+174"/>
<source>An XmlRole query must not start with &apos;/&apos;</source>
<translation>Eine XmlRole-Abfrage darf nicht mit &apos;/&apos; beginnen</translation>
</message>
@@ -2622,7 +2695,7 @@ nach
<context>
<name>QDeclarativeXmlRoleList</name>
<message>
- <location filename="../src/declarative/util/qdeclarativexmllistmodel.cpp" line="+638"/>
+ <location filename="../src/declarative/util/qdeclarativexmllistmodel.cpp" line="+712"/>
<source>An XmlListModel query must start with &apos;/&apos; or &quot;//&quot;</source>
<translation>Eine XmlListModel-Abfrage muss mit &apos;/&apos; oder &quot;//&quot; beginnen</translation>
</message>
@@ -3690,7 +3763,7 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<translation>Unbekannter Fehler</translation>
</message>
<message>
- <location filename="../src/network/kernel/qhostinfo.cpp" line="+175"/>
+ <location filename="../src/network/kernel/qhostinfo.cpp" line="+171"/>
<source>No host name given</source>
<translation>Es wurde kein Hostname angegeben</translation>
</message>
@@ -3698,9 +3771,9 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<context>
<name>QHostInfoAgent</name>
<message>
- <location filename="../src/network/kernel/qhostinfo_unix.cpp" line="+259"/>
+ <location filename="../src/network/kernel/qhostinfo_unix.cpp" line="+260"/>
<location line="+32"/>
- <location filename="../src/network/kernel/qhostinfo_win.cpp" line="+216"/>
+ <location filename="../src/network/kernel/qhostinfo_win.cpp" line="+215"/>
<location line="+27"/>
<source>Host not found</source>
<translation>Rechner konnte nicht gefunden werden</translation>
@@ -4051,7 +4124,7 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<context>
<name>QIODevice</name>
<message>
- <location filename="../src/corelib/global/qglobal.cpp" line="+2099"/>
+ <location filename="../src/corelib/global/qglobal.cpp" line="+2120"/>
<source>Permission denied</source>
<translation>Zugriff verweigert</translation>
</message>
@@ -4071,7 +4144,7 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<translation>Kein freier Speicherplatz auf dem Gerät vorhanden</translation>
</message>
<message>
- <location filename="../src/corelib/io/qiodevice.cpp" line="+1596"/>
+ <location filename="../src/corelib/io/qiodevice.cpp" line="+1598"/>
<source>Unknown error</source>
<translation>Unbekannter Fehler</translation>
</message>
@@ -4188,7 +4261,7 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<context>
<name>QLineEdit</name>
<message>
- <location filename="../src/gui/widgets/qlineedit.cpp" line="+2110"/>
+ <location filename="../src/gui/widgets/qlineedit.cpp" line="+2116"/>
<source>Select All</source>
<translation>Alles auswählen</translation>
</message>
@@ -4509,39 +4582,6 @@ Möchten Sie die Datei trotzdem löschen?</translation>
</message>
</context>
<context>
- <name>QMediaPlayer</name>
- <message>
- <location filename="../src/multimedia/playback/qmediaplayer.cpp" line="+496"/>
- <source>The QMediaPlayer object does not have a valid service</source>
- <translation>Das QMediaPlayer-Objekt verfügt über keinen gültigen Dienst</translation>
- </message>
-</context>
-<context>
- <name>QMediaPlaylist</name>
- <message>
- <location filename="../src/multimedia/base/qmediaplaylist.cpp" line="+455"/>
- <location line="+46"/>
- <source>Could not add items to read only playlist.</source>
- <translation>Es konnten keine Einträge zur Wiedergabeliste hinzugefügt werden, da sie schreibgeschützt ist.</translation>
- </message>
- <message>
- <location line="-27"/>
- <location line="+46"/>
- <source>Playlist format is not supported</source>
- <translation>Das Format der Wiedergabeliste ist nicht unterstützt</translation>
- </message>
- <message>
- <location line="+26"/>
- <source>The file could not be accessed.</source>
- <translation>Auf die Datei konnte nicht zugegriffen werden.</translation>
- </message>
- <message>
- <location line="+35"/>
- <source>Playlist format is not supported.</source>
- <translation>Das Format der Wiedergabeliste ist nicht unterstützt.</translation>
- </message>
-</context>
-<context>
<name>QMenu</name>
<message>
<location filename="../src/plugins/accessible/widgets/qaccessiblemenu.cpp" line="+157"/>
@@ -4566,7 +4606,7 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<context>
<name>QMenuBar</name>
<message>
- <location filename="../src/gui/widgets/qmenu_symbian.cpp" line="+452"/>
+ <location filename="../src/gui/widgets/qmenu_symbian.cpp" line="+456"/>
<source>Actions</source>
<translation>Optionen</translation>
</message>
@@ -4867,7 +4907,7 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<context>
<name>QNetworkAccessHttpBackend</name>
<message>
- <location filename="../src/network/access/qnetworkaccesshttpbackend.cpp" line="+645"/>
+ <location filename="../src/network/access/qnetworkaccesshttpbackend.cpp" line="+652"/>
<source>No suitable proxy found</source>
<translation>Es konnte kein geeigneter Proxy-Server gefunden werden</translation>
</message>
@@ -4875,7 +4915,7 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<context>
<name>QNetworkAccessManager</name>
<message>
- <location filename="../src/network/access/qnetworkreplyimpl.cpp" line="+910"/>
+ <location filename="../src/network/access/qnetworkreplyimpl.cpp" line="+942"/>
<source>Network access is disabled.</source>
<translation>Der Zugriff auf das Netzwerk ist nicht gestattet.</translation>
</message>
@@ -4883,12 +4923,12 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<context>
<name>QNetworkReply</name>
<message>
- <location filename="../src/network/access/qnetworkaccesshttpbackend.cpp" line="+101"/>
+ <location filename="../src/network/access/qnetworkaccesshttpbackend.cpp" line="+100"/>
<source>Error downloading %1 - server replied: %2</source>
<translation>Beim Herunterladen von %1 trat ein Fehler auf - Die Antwort des Servers ist: %2</translation>
</message>
<message>
- <location filename="../src/network/access/qnetworkreplyimpl.cpp" line="-828"/>
+ <location filename="../src/network/access/qnetworkreplyimpl.cpp" line="-860"/>
<source>Protocol &quot;%1&quot; is unknown</source>
<translation>Das Protokoll &quot;%1&quot; ist unbekannt</translation>
</message>
@@ -4898,7 +4938,7 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<translation>Fehler bei Netzwerkverbindung.</translation>
</message>
<message>
- <location line="+329"/>
+ <location line="+352"/>
<source>Temporary network failure.</source>
<translation>Das Netzwerk ist zur Zeit ausgefallen.</translation>
</message>
@@ -4906,7 +4946,7 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<context>
<name>QNetworkReplyImpl</name>
<message>
- <location line="+111"/>
+ <location line="+120"/>
<location line="+28"/>
<source>Operation canceled</source>
<translation>Operation abgebrochen</translation>
@@ -4924,7 +4964,7 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<name>QNetworkSessionPrivateImpl</name>
<message>
<location filename="../src/plugins/bearer/qnetworksession_impl.cpp" line="+272"/>
- <location filename="../src/plugins/bearer/symbian/qnetworksession_impl.cpp" line="+227"/>
+ <location filename="../src/plugins/bearer/symbian/qnetworksession_impl.cpp" line="+271"/>
<source>Unknown session error.</source>
<translation>Unbekannter Fehler bei Netzwerkverbindung.</translation>
</message>
@@ -5130,11 +5170,17 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<context>
<name>QObject</name>
<message>
- <location filename="../src/declarative/util/qdeclarativexmllistmodel.cpp" line="-194"/>
+ <location filename="../src/declarative/util/qdeclarativexmllistmodel.cpp" line="-241"/>
<source>&quot;%1&quot; duplicates a previous role name and will be disabled.</source>
<translation>&quot;%1&quot; ist bereits als Name einer Rolle vergeben und wird daher deaktiviert.</translation>
</message>
<message>
+ <location line="+515"/>
+ <location line="+4"/>
+ <source>invalid query: &quot;%1&quot;</source>
+ <translation>Ungültige Abfrage: &quot;%1&quot;</translation>
+ </message>
+ <message>
<location filename="../src/3rdparty/phonon/phonon/pulsesupport.cpp" line="+162"/>
<location line="+11"/>
<source>PulseAudio Sound Server</source>
@@ -6212,7 +6258,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<context>
<name>QSQLiteDriver</name>
<message>
- <location filename="../src/sql/drivers/sqlite/qsql_sqlite.cpp" line="+538"/>
+ <location filename="../src/sql/drivers/sqlite/qsql_sqlite.cpp" line="+539"/>
<source>Error opening database</source>
<translation>Die Datenbankverbindung konnte nicht geöffnet werden</translation>
</message>
@@ -6240,8 +6286,8 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<context>
<name>QSQLiteResult</name>
<message>
- <location line="-395"/>
- <location line="+62"/>
+ <location line="-396"/>
+ <location line="+63"/>
<location line="+8"/>
<source>Unable to fetch row</source>
<translation>Der Datensatz konnte nicht abgeholt werden</translation>
@@ -6267,7 +6313,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<translation>Die Anzahl der Parameter ist falsch</translation>
</message>
<message>
- <location line="-200"/>
+ <location line="-201"/>
<source>No query</source>
<translation>Kein Abfrage</translation>
</message>
@@ -6810,8 +6856,9 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<context>
<name>QShortcut</name>
<message>
- <location filename="../src/gui/kernel/qkeysequence.cpp" line="+393"/>
+ <location filename="../src/gui/kernel/qkeysequence.cpp" line="+396"/>
<source>Space</source>
+ <extracomment>This and all following &quot;incomprehensible&quot; strings in QShortcut context are key names. Please use the localized names appearing on actual keyboards or whatever is commonly used.</extracomment>
<translation>Leertaste</translation>
</message>
<message>
@@ -7999,7 +8046,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<translation>Abbrechen</translation>
</message>
<message>
- <location filename="../src/gui/kernel/qsoftkeymanager_s60.cpp" line="+319"/>
+ <location filename="../src/gui/kernel/qsoftkeymanager_s60.cpp" line="+321"/>
<source>Exit</source>
<translation>Beenden</translation>
</message>
@@ -8343,7 +8390,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<context>
<name>QTextControl</name>
<message>
- <location filename="../src/gui/text/qtextcontrol.cpp" line="+2036"/>
+ <location filename="../src/gui/text/qtextcontrol.cpp" line="+2046"/>
<source>&amp;Undo</source>
<translation>&amp;Rückgängig</translation>
</message>
@@ -9056,7 +9103,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<translation>Unbekannt</translation>
</message>
<message>
- <location filename="../src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp" line="+236"/>
+ <location filename="../src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp" line="+253"/>
<source>Web Inspector - %2</source>
<translation>Web Inspector - %2</translation>
</message>
@@ -9067,7 +9114,12 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<translation>%1 (%2x%3 Pixel)</translation>
</message>
<message>
- <location filename="../src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp" line="+456"/>
+ <location filename="../src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp" line="+347"/>
+ <source>Redirection limit reached</source>
+ <translation>Maximal Anzahl von Weiterleitungen wurde erreicht</translation>
+ </message>
+ <message>
+ <location line="+121"/>
<source>Bad HTTP request</source>
<translation>Ungültige HTTP-Anforderung</translation>
</message>
@@ -9152,7 +9204,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
</translation>
</message>
<message>
- <location filename="../src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp" line="+1959"/>
+ <location filename="../src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp" line="+2033"/>
<source>JavaScript Alert - %1</source>
<translation>JavaScript-Hinweis - %1</translation>
</message>
@@ -9177,7 +9229,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<translation>Das Skript dieser Webseite ist fehlerhaft. Möchten Sie es anhalten?</translation>
</message>
<message>
- <location line="+374"/>
+ <location line="+395"/>
<source>Move the cursor to the next character</source>
<translation>Positionsmarke auf folgendes Zeichen setzen</translation>
</message>
@@ -9398,7 +9450,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<context>
<name>QWidget</name>
<message>
- <location filename="../src/gui/kernel/qwidget.cpp" line="+5809"/>
+ <location filename="../src/gui/kernel/qwidget.cpp" line="+5806"/>
<source>*</source>
<translation>*</translation>
</message>
@@ -11303,13 +11355,13 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
</message>
<message>
<location line="+28"/>
- <location line="+408"/>
+ <location line="+415"/>
<location line="+30"/>
<source>Type %1 of %2 element cannot be resolved.</source>
<translation>Der Typ %1 des Elements %2 kann nicht aufgelöst werden.</translation>
</message>
<message>
- <location line="-416"/>
+ <location line="-423"/>
<source>Base type %1 of complex type cannot be resolved.</source>
<translation>Der Basistyp %1 des komplexen Typs kann nicht aufgelöst werden.</translation>
</message>
@@ -11319,7 +11371,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<translation>%1 kann keinen komplexen Basistyp haben, der &apos;%2&apos; spezifiziert.</translation>
</message>
<message>
- <location line="+279"/>
+ <location line="+286"/>
<source>Content model of complex type %1 contains %2 element so it cannot be derived by extension from a non-empty type.</source>
<translation>Das Inhaltsmodell des komplexen Typs %1enthält ein Element &apos;%2&apos;; es kann daher nicht durch Erweiterung von einem Typ abgeleitet werden, der nicht leer ist.</translation>
</message>
@@ -12229,27 +12281,4 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<translation>Das Attribut &apos;%1&apos; enthält einen ungültigen qualifizierten Namen: %2.</translation>
</message>
</context>
-<context>
- <name>Widget</name>
- <message>
- <location filename="../src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.ui"/>
- <source>Widget</source>
- <translation>Widget</translation>
- </message>
- <message>
- <location/>
- <source>about:blank</source>
- <translation>about:blank</translation>
- </message>
- <message>
- <location/>
- <source>Image from Qt to HTML</source>
- <translation>Bild von Qt zu HTML</translation>
- </message>
- <message>
- <location/>
- <source>Pixmap from Qt to HTML</source>
- <translation>Pixmap von Qt zu HTML</translation>
- </message>
-</context>
</TS>
diff --git a/translations/qt_ja_JP.ts b/translations/qt_ja.ts
index e6f92b7..e6f92b7 100644
--- a/translations/qt_ja_JP.ts
+++ b/translations/qt_ja.ts
diff --git a/translations/translations.pri b/translations/translations.pri
index 2edc89a..9ab72fc 100644
--- a/translations/translations.pri
+++ b/translations/translations.pri
@@ -13,7 +13,7 @@ LUPDATE += -locations relative -no-ui-lines
###### Qt Libraries
-QT_TS = ar cs da de es fr he hu ja_JP pl pt ru sk sl sv uk zh_CN zh_TW
+QT_TS = ar cs da de es fr he hu ja pl pt ru sk sl sv uk zh_CN zh_TW
ts-qt.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
-I../include -I../include/Qt \
@@ -73,5 +73,8 @@ ts-qvfb.depends = sub-tools
ts.depends = ts-qt ts-designer ts-linguist ts-assistant ts-qtconfig ts-qvfb
+check-ts.commands = (cd $$PWD && perl check-ts.pl)
+check-ts.depends = ts
+
QMAKE_EXTRA_TARGETS += ts-qt ts-designer ts-linguist ts-assistant ts-qtconfig ts-qvfb \
- ts
+ ts check-ts