summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2010-08-03 12:53:57 +0200
committerJørgen Lind <jorgen.lind@nokia.com>2010-08-03 12:53:57 +0200
commitd5491ecdde14659a913c9f476f18c45f1d9489bb (patch)
tree06cc52249feda9bd9e50ca47abb8ebd676c8a309
parent42cdfaf86d34afeb6448723839fef70fe477deed (diff)
parenta41128af5373a0225c3548abd3eb82cd7e8f7a0e (diff)
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into lighthouse
Conflicts: configure
-rw-r--r--.gitignore1
-rwxr-xr-xbin/createpackage.pl3
-rwxr-xr-xbin/syncqt16
-rw-r--r--config.tests/unix/avx/avx.cpp51
-rw-r--r--config.tests/unix/avx/avx.pro3
-rw-r--r--config.tests/unix/icd/icd.cpp4
-rw-r--r--config.tests/unix/sse3/sse3.cpp51
-rw-r--r--config.tests/unix/sse3/sse3.pro3
-rw-r--r--config.tests/unix/sse4_1/sse4_1.cpp51
-rw-r--r--config.tests/unix/sse4_1/sse4_1.pro3
-rw-r--r--config.tests/unix/sse4_2/sse4_2.cpp51
-rw-r--r--config.tests/unix/sse4_2/sse4_2.pro3
-rw-r--r--config.tests/unix/ssse3/ssse3.cpp51
-rw-r--r--config.tests/unix/ssse3/ssse3.pro3
-rwxr-xr-xconfigure492
-rwxr-xr-xconfigure.exebin1318912 -> 1317888 bytes
-rw-r--r--demos/declarative/calculator/Core/calculator.js4
-rw-r--r--demos/declarative/calculator/calculator.qml14
-rw-r--r--demos/declarative/flickr/flickr.qml22
-rw-r--r--demos/declarative/flickr/mobile/GridDelegate.qml130
-rw-r--r--demos/declarative/flickr/mobile/ImageDetails.qml22
-rw-r--r--demos/declarative/photoviewer/PhotoViewerCore/Button.qml2
-rw-r--r--demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml2
-rwxr-xr-xdemos/declarative/samegame/SamegameCore/samegame.js4
-rw-r--r--demos/declarative/snake/content/Link.qml2
-rw-r--r--demos/declarative/twitter/TwitterCore/Button.qml2
-rw-r--r--demos/declarative/webbrowser/content/UrlInput.qml2
-rw-r--r--demos/embedded/anomaly/anomaly.pro2
-rw-r--r--demos/embedded/anomaly/src/BrowserView.cpp33
-rw-r--r--demos/embedded/anomaly/src/BrowserView.h3
-rw-r--r--demos/embedded/desktopservices/contenttab.cpp2
-rw-r--r--demos/embedded/desktopservices/desktopwidget.cpp2
-rw-r--r--demos/embedded/fluidlauncher/fluidlauncher.cpp2
-rw-r--r--demos/embedded/fluidlauncher/pictureflow.cpp2
-rw-r--r--demos/embedded/lightmaps/lightmaps.cpp49
-rw-r--r--demos/embedded/lightmaps/lightmaps.pro2
-rw-r--r--demos/embedded/qmlcalculator/deployment.pri1
-rw-r--r--demos/embedded/qmlclocks/deployment.pri1
-rw-r--r--demos/embedded/qmldialcontrol/deployment.pri1
-rw-r--r--demos/embedded/qmleasing/deployment.pri1
-rw-r--r--demos/embedded/qmlflickr/deployment.pri1
-rw-r--r--demos/embedded/qmlflickr/qmlflickr.cpp63
-rw-r--r--demos/embedded/qmlflickr/qmlflickr.pro2
-rw-r--r--demos/embedded/qmlphotoviewer/deployment.pri1
-rw-r--r--demos/embedded/qmlphotoviewer/qmlphotoviewer.cpp63
-rw-r--r--demos/embedded/qmlphotoviewer/qmlphotoviewer.pro2
-rw-r--r--demos/embedded/qmltwitter/deployment.pri1
-rw-r--r--demos/embedded/qmltwitter/qmltwitter.cpp63
-rw-r--r--demos/embedded/qmltwitter/qmltwitter.pro2
-rw-r--r--demos/embedded/raycasting/raycasting.cpp2
-rw-r--r--demos/qtdemo/colors.cpp6
-rw-r--r--demos/qtdemo/colors.h1
-rw-r--r--demos/qtdemo/mainwindow.cpp8
-rw-r--r--demos/qtdemo/menumanager.cpp20
-rw-r--r--demos/qtdemo/qmlShell.qml56
-rw-r--r--dist/changes-4.7.0119
-rw-r--r--doc/src/classes/phonon-api.qdoc12
-rw-r--r--doc/src/declarative/advtutorial.qdoc24
-rw-r--r--doc/src/declarative/animation.qdoc4
-rw-r--r--doc/src/declarative/dynamicobjects.qdoc119
-rw-r--r--doc/src/declarative/elements.qdoc2
-rw-r--r--doc/src/declarative/examples.qdoc6
-rw-r--r--doc/src/declarative/extending-tutorial.qdoc348
-rw-r--r--doc/src/declarative/focus.qdoc10
-rw-r--r--doc/src/declarative/javascriptblocks.qdoc25
-rw-r--r--doc/src/declarative/modules.qdoc293
-rw-r--r--doc/src/declarative/pics/anatomy-component.pngbin16117 -> 4902 bytes
-rw-r--r--doc/src/declarative/pics/extending-tutorial-chapter1.pngbin0 -> 6687 bytes
-rw-r--r--doc/src/declarative/pics/extending-tutorial-chapter2.pngbin0 -> 7318 bytes
-rw-r--r--doc/src/declarative/pics/extending-tutorial-chapter3.pngbin0 -> 8145 bytes
-rw-r--r--doc/src/declarative/pics/extending-tutorial-chapter5.pngbin0 -> 5557 bytes
-rw-r--r--doc/src/declarative/qdeclarativedocument.qdoc62
-rw-r--r--doc/src/declarative/qdeclarativei18n.qdoc2
-rw-r--r--doc/src/declarative/qdeclarativeintro.qdoc11
-rw-r--r--doc/src/declarative/qdeclarativemodels.qdoc89
-rw-r--r--doc/src/declarative/qdeclarativestates.qdoc183
-rw-r--r--doc/src/declarative/qmlviewer.qdoc8
-rw-r--r--doc/src/declarative/qtdeclarative.qdoc16
-rw-r--r--doc/src/declarative/tutorial.qdoc2
-rw-r--r--doc/src/examples/fingerpaint.qdoc6
-rw-r--r--doc/src/examples/movie.qdoc4
-rw-r--r--doc/src/examples/pinchzoom.qdoc6
-rw-r--r--doc/src/examples/qml-examples.qdoc111
-rw-r--r--doc/src/examples/touch-dials.qdoc (renamed from doc/src/examples/multitouch-dials.qdoc)8
-rw-r--r--doc/src/examples/touch-knobs.qdoc (renamed from doc/src/examples/multitouch-knobs.qdoc)10
-rw-r--r--doc/src/examples/trafficinfo.qdoc2
-rw-r--r--doc/src/frameworks-technologies/dnd.qdoc2
-rw-r--r--doc/src/frameworks-technologies/model-view-programming.qdoc20
-rw-r--r--doc/src/frameworks-technologies/phonon.qdoc1
-rw-r--r--doc/src/getting-started/examples.qdoc20
-rw-r--r--doc/src/getting-started/gettingstarted.qdoc516
-rw-r--r--doc/src/getting-started/tutorials.qdoc24
-rw-r--r--doc/src/images/addressbook-tutorial-part1-labeled-layout.pngbin20739 -> 19114 bytes
-rw-r--r--doc/src/images/addressbook-tutorial-part1-labeled-screenshot.pngbin26594 -> 23223 bytes
-rw-r--r--doc/src/images/addressbook-tutorial-part1-screenshot.pngbin7180 -> 9872 bytes
-rw-r--r--doc/src/images/addressbook-tutorial-part2-add-contact.pngbin10255 -> 12936 bytes
-rw-r--r--doc/src/images/addressbook-tutorial-part2-add-successful.pngbin8089 -> 10825 bytes
-rw-r--r--doc/src/images/addressbook-tutorial-part2-labeled-layout.pngbin31947 -> 27103 bytes
-rw-r--r--doc/src/images/addressbook-tutorial-part3-labeled-layout.pngbin39500 -> 27467 bytes
-rw-r--r--doc/src/images/addressbook-tutorial-part3-screenshot.pngbin10460 -> 14041 bytes
-rw-r--r--doc/src/images/addressbook-tutorial-part4-remove.pngbin13860 -> 22248 bytes
-rw-r--r--doc/src/images/addressbook-tutorial-part5-finddialog.pngbin6982 -> 10046 bytes
-rw-r--r--doc/src/images/addressbook-tutorial-part5-notfound.pngbin8177 -> 10789 bytes
-rw-r--r--doc/src/images/addressbook-tutorial-part5-screenshot.pngbin12557 -> 15849 bytes
-rw-r--r--doc/src/images/addressbook-tutorial-part6-load.pngbin40623 -> 24797 bytes
-rw-r--r--doc/src/images/addressbook-tutorial-part6-save.pngbin40406 -> 24747 bytes
-rw-r--r--doc/src/images/addressbook-tutorial-part6-screenshot.pngbin13598 -> 16819 bytes
-rw-r--r--doc/src/images/addressbook-tutorial-part7-screenshot.pngbin14822 -> 18369 bytes
-rw-r--r--doc/src/images/addressbook-tutorial-screenshot.pngbin11916 -> 15275 bytes
-rw-r--r--doc/src/images/addressbook-tutorial.pngbin11481 -> 6200 bytes
-rwxr-xr-xdoc/src/images/clock.pngbin0 -> 16514 bytes
-rw-r--r--doc/src/images/columnview.pngbin0 -> 3480 bytes
-rwxr-xr-xdoc/src/images/combobox.pngbin0 -> 5022 bytes
-rwxr-xr-xdoc/src/images/dummy_tree.pngbin0 -> 20189 bytes
-rwxr-xr-xdoc/src/images/edit.pngbin0 -> 19636 bytes
-rwxr-xr-xdoc/src/images/example_model.pngbin0 -> 16577 bytes
-rw-r--r--doc/src/images/gs1.pngbin0 -> 7860 bytes
-rw-r--r--doc/src/images/gs2.pngbin0 -> 8630 bytes
-rw-r--r--doc/src/images/gs3.pngbin0 -> 9781 bytes
-rw-r--r--doc/src/images/gs4.pngbin0 -> 7494 bytes
-rw-r--r--doc/src/images/gs5.pngbin0 -> 23537 bytes
-rwxr-xr-xdoc/src/images/header.pngbin0 -> 30302 bytes
-rwxr-xr-xdoc/src/images/lineedit.pngbin0 -> 2613 bytes
-rwxr-xr-xdoc/src/images/list_table_tree.pngbin0 -> 85530 bytes
-rwxr-xr-xdoc/src/images/listview.pngbin0 -> 9695 bytes
-rwxr-xr-xdoc/src/images/lotto.pngbin0 -> 17015 bytes
-rwxr-xr-xdoc/src/images/modelview.pngbin0 -> 2887 bytes
-rwxr-xr-xdoc/src/images/path.pngbin0 -> 31015 bytes
-rwxr-xr-xdoc/src/images/qcompleter.pngbin0 -> 17017 bytes
-rw-r--r--doc/src/images/qml-pathview-example.pngbin0 -> 22077 bytes
-rwxr-xr-xdoc/src/images/readonlytable.pngbin0 -> 28971 bytes
-rwxr-xr-xdoc/src/images/readonlytable_role.pngbin0 -> 27467 bytes
-rwxr-xr-xdoc/src/images/selection2.pngbin0 -> 23784 bytes
-rwxr-xr-xdoc/src/images/standardwidget.pngbin0 -> 1466 bytes
-rwxr-xr-xdoc/src/images/tableview.pngbin0 -> 10102 bytes
-rw-r--r--doc/src/images/touch-dials-example.png (renamed from doc/src/images/multitouch-dials-example.png)bin17676 -> 17676 bytes
-rw-r--r--doc/src/images/touch-examples.png (renamed from doc/src/images/multitouch-examples.png)bin6691 -> 6691 bytes
-rw-r--r--doc/src/images/touch-fingerpaint-example.png (renamed from doc/src/images/multitouch-fingerpaint-example.png)bin17026 -> 17026 bytes
-rw-r--r--doc/src/images/touch-knobs-example.png (renamed from doc/src/images/multitouch-knobs-example.png)bin1290 -> 1290 bytes
-rw-r--r--doc/src/images/touch-pinchzoom-example.png (renamed from doc/src/images/multitouch-pinchzoom-example.png)bin48154 -> 48154 bytes
-rwxr-xr-xdoc/src/images/tree.pngbin0 -> 27074 bytes
-rwxr-xr-xdoc/src/images/tree_2.pngbin0 -> 14084 bytes
-rwxr-xr-xdoc/src/images/tree_2_with_algorithm.pngbin0 -> 16921 bytes
-rwxr-xr-xdoc/src/images/tree_city.pngbin0 -> 30398 bytes
-rwxr-xr-xdoc/src/images/treeview.pngbin0 -> 17173 bytes
-rwxr-xr-xdoc/src/images/treeview_sml.pngbin0 -> 17419 bytes
-rwxr-xr-xdoc/src/images/widgetmapper.pngbin0 -> 20145 bytes
-rw-r--r--doc/src/index.qdoc44
-rw-r--r--doc/src/legal/3rdparty.qdoc234
-rw-r--r--doc/src/legal/licenses.qdoc49
-rw-r--r--doc/src/network-programming/bearermanagement.qdoc2
-rw-r--r--doc/src/platforms/mac-differences.qdoc3
-rw-r--r--doc/src/platforms/symbian-introduction.qdoc17
-rw-r--r--doc/src/qt4-intro.qdoc8
-rw-r--r--doc/src/snippets/code/doc_src_containers.qdoc8
-rw-r--r--doc/src/snippets/code/doc_src_installation.qdoc4
-rw-r--r--doc/src/snippets/code/doc_src_qalgorithms.qdoc2
-rw-r--r--doc/src/snippets/code/doc_src_qset.qdoc2
-rw-r--r--doc/src/snippets/code/doc_src_qt4-tulip.qdoc2
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qapplication.cpp4
-rw-r--r--doc/src/snippets/code/src_network_kernel_qhostinfo.cpp2
-rw-r--r--doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp2
-rw-r--r--doc/src/snippets/declarative/anchoranimation.qml65
-rw-r--r--doc/src/snippets/declarative/behavior.qml59
-rw-r--r--doc/src/snippets/declarative/coloranimation.qml52
-rw-r--r--doc/src/snippets/declarative/comments.qml3
-rw-r--r--doc/src/snippets/declarative/component.qml60
-rw-r--r--doc/src/snippets/declarative/componentCreation.js63
-rw-r--r--doc/src/snippets/declarative/createComponent-simple.qml (renamed from examples/declarative/tutorials/extending/chapter5-plugins/musicplugin.cpp)27
-rw-r--r--doc/src/snippets/declarative/createComponent.qml4
-rw-r--r--doc/src/snippets/declarative/createQmlObject.qml7
-rw-r--r--doc/src/snippets/declarative/dynamicObjects-destroy.qml (renamed from examples/declarative/tutorials/extending/chapter5-plugins/app.qml)18
-rw-r--r--doc/src/snippets/declarative/mouseareadragfilter.qml72
-rw-r--r--doc/src/snippets/declarative/numberanimation.qml52
-rw-r--r--doc/src/snippets/declarative/parallelanimation.qml57
-rw-r--r--doc/src/snippets/declarative/parentanimation.qml74
-rw-r--r--doc/src/snippets/declarative/parentchange.qml5
-rw-r--r--doc/src/snippets/declarative/pathview/pathattributes.qml12
-rw-r--r--doc/src/snippets/declarative/propertyanimation.qml101
-rw-r--r--doc/src/snippets/declarative/qmldocuments.qml66
-rw-r--r--doc/src/snippets/declarative/qtobject.qml55
-rw-r--r--doc/src/snippets/declarative/rotationanimation.qml (renamed from tools/qtestlib/chart/reportgenerator.h)42
-rw-r--r--doc/src/snippets/declarative/sequentialanimation.qml57
-rw-r--r--doc/src/snippets/declarative/smoothedanimation.qml69
-rw-r--r--doc/src/snippets/declarative/springanimation.qml (renamed from doc/src/snippets/declarative/dynamicObjects.qml)36
-rw-r--r--doc/src/snippets/declarative/state-when.qml55
-rw-r--r--doc/src/snippets/declarative/state.qml21
-rw-r--r--doc/src/snippets/declarative/states.qml38
-rw-r--r--doc/src/snippets/declarative/transition-from-to.qml62
-rw-r--r--doc/src/snippets/declarative/transition-reversible.qml65
-rw-r--r--doc/src/snippets/declarative/transition.qml59
-rw-r--r--doc/src/snippets/droparea.cpp2
-rw-r--r--doc/src/snippets/picture/picture.cpp4
-rw-r--r--doc/src/snippets/qfontdatabase/main.cpp4
-rw-r--r--doc/src/snippets/qlistview-dnd/model.cpp4
-rw-r--r--doc/src/snippets/qstringlist/main.cpp2
-rw-r--r--doc/src/snippets/qtreeview-dnd/dragdropmodel.cpp2
-rw-r--r--doc/src/snippets/widgets-tutorial/nestedlayouts/main.cpp4
-rw-r--r--doc/src/template/style/OfflineStyle.css595
-rwxr-xr-xdoc/src/template/style/style.css1193
-rwxr-xr-xdoc/src/tutorials/modelview.qdoc938
-rw-r--r--examples/animation/stickman/lifecycle.cpp2
-rw-r--r--examples/declarative/cppextensions/plugins/plugin.cpp6
-rw-r--r--examples/declarative/cppextensions/plugins/plugins.qml3
-rw-r--r--examples/declarative/cppextensions/referenceexamples/adding/main.cpp2
-rw-r--r--examples/declarative/cppextensions/referenceexamples/attached/main.cpp2
-rw-r--r--examples/declarative/cppextensions/referenceexamples/binding/main.cpp2
-rw-r--r--examples/declarative/cppextensions/referenceexamples/coercion/main.cpp2
-rw-r--r--examples/declarative/cppextensions/referenceexamples/default/main.cpp2
-rw-r--r--examples/declarative/cppextensions/referenceexamples/extended/main.cpp2
-rw-r--r--examples/declarative/cppextensions/referenceexamples/grouped/main.cpp2
-rw-r--r--examples/declarative/cppextensions/referenceexamples/properties/main.cpp2
-rw-r--r--examples/declarative/cppextensions/referenceexamples/signal/main.cpp2
-rw-r--r--examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp2
-rw-r--r--examples/declarative/keyinteraction/focus/Core/GridMenu.qml6
-rw-r--r--examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml4
-rw-r--r--examples/declarative/keyinteraction/focus/Core/ListViews.qml8
-rw-r--r--examples/declarative/keyinteraction/focus/focus.qml4
-rw-r--r--examples/declarative/modelviews/abstractitemmodel/model.cpp2
-rw-r--r--examples/declarative/modelviews/pathview/pathview-example.qml107
-rw-r--r--examples/declarative/modelviews/pathview/pathview.qmlproject16
-rw-r--r--examples/declarative/modelviews/pathview/pics/AddressBook_48.pngbin0 -> 3350 bytes
-rw-r--r--examples/declarative/modelviews/pathview/pics/AudioPlayer_48.pngbin0 -> 3806 bytes
-rw-r--r--examples/declarative/modelviews/pathview/pics/Camera_48.pngbin0 -> 3540 bytes
-rw-r--r--examples/declarative/modelviews/pathview/pics/DateBook_48.pngbin0 -> 2610 bytes
-rw-r--r--examples/declarative/modelviews/pathview/pics/EMail_48.pngbin0 -> 3655 bytes
-rw-r--r--examples/declarative/modelviews/pathview/pics/TodoList_48.pngbin0 -> 3429 bytes
-rw-r--r--examples/declarative/modelviews/pathview/pics/VideoPlayer_48.pngbin0 -> 4151 bytes
-rw-r--r--examples/declarative/screenorientation/Core/Bubble.qml91
-rw-r--r--examples/declarative/screenorientation/Core/Button.qml72
-rw-r--r--examples/declarative/screenorientation/Core/screenorientation.js95
-rw-r--r--examples/declarative/screenorientation/screenorientation.qml202
-rw-r--r--examples/declarative/screenorientation/screenorientation.qmlproject16
-rw-r--r--examples/declarative/toys/clocks/content/Clock.qml6
-rw-r--r--examples/declarative/toys/dynamicscene/dynamicscene.qml4
-rw-r--r--examples/declarative/tutorials/extending/chapter1-basics/app.qml18
-rw-r--r--examples/declarative/tutorials/extending/chapter1-basics/chapter1-basics.pro4
-rw-r--r--examples/declarative/tutorials/extending/chapter1-basics/main.cpp4
-rw-r--r--examples/declarative/tutorials/extending/chapter1-basics/piechart.cpp81
-rw-r--r--examples/declarative/tutorials/extending/chapter1-basics/piechart.h (renamed from examples/declarative/tutorials/extending/chapter1-basics/musician.h)21
-rw-r--r--examples/declarative/tutorials/extending/chapter2-methods/app.qml24
-rw-r--r--examples/declarative/tutorials/extending/chapter2-methods/chapter2-methods.pro4
-rw-r--r--examples/declarative/tutorials/extending/chapter2-methods/main.cpp4
-rw-r--r--examples/declarative/tutorials/extending/chapter2-methods/piechart.cpp87
-rw-r--r--examples/declarative/tutorials/extending/chapter2-methods/piechart.h (renamed from examples/declarative/tutorials/extending/chapter3-bindings/musician.h)26
-rw-r--r--examples/declarative/tutorials/extending/chapter3-bindings/app.qml42
-rw-r--r--examples/declarative/tutorials/extending/chapter3-bindings/chapter3-bindings.pro4
-rw-r--r--examples/declarative/tutorials/extending/chapter3-bindings/main.cpp4
-rw-r--r--examples/declarative/tutorials/extending/chapter3-bindings/piechart.cpp89
-rw-r--r--examples/declarative/tutorials/extending/chapter3-bindings/piechart.h84
-rw-r--r--examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml18
-rw-r--r--examples/declarative/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro8
-rw-r--r--examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp8
-rw-r--r--examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp (renamed from examples/declarative/tutorials/extending/chapter2-methods/musician.cpp)30
-rw-r--r--examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.h (renamed from examples/declarative/tutorials/extending/chapter4-customPropertyTypes/musician.h)20
-rw-r--r--examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp (renamed from examples/declarative/tutorials/extending/chapter4-customPropertyTypes/musician.cpp)29
-rw-r--r--examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.h66
-rw-r--r--examples/declarative/tutorials/extending/chapter5-listproperties/app.qml70
-rw-r--r--examples/declarative/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro7
-rw-r--r--examples/declarative/tutorials/extending/chapter5-listproperties/main.cpp (renamed from examples/declarative/tutorials/extending/chapter5-plugins/instrument.cpp)26
-rw-r--r--examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp (renamed from examples/declarative/tutorials/extending/chapter3-bindings/musician.cpp)32
-rw-r--r--examples/declarative/tutorials/extending/chapter5-listproperties/piechart.h (renamed from examples/declarative/tutorials/extending/chapter2-methods/musician.h)34
-rw-r--r--examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.cpp88
-rw-r--r--examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.h76
-rw-r--r--examples/declarative/tutorials/extending/chapter5-plugins/musician.cpp67
-rw-r--r--examples/declarative/tutorials/extending/chapter5-plugins/qmldir1
-rw-r--r--examples/declarative/tutorials/extending/chapter6-plugins/app.qml68
-rw-r--r--examples/declarative/tutorials/extending/chapter6-plugins/chapter6-plugins.pro (renamed from examples/declarative/tutorials/extending/chapter5-plugins/chapter5-plugins.pro)12
-rw-r--r--examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.cpp (renamed from examples/declarative/tutorials/extending/chapter4-customPropertyTypes/instrument.h)29
-rw-r--r--examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.h (renamed from examples/declarative/tutorials/extending/chapter5-plugins/musicplugin.h)8
-rw-r--r--examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp (renamed from examples/declarative/tutorials/extending/chapter1-basics/musician.cpp)23
-rw-r--r--examples/declarative/tutorials/extending/chapter6-plugins/piechart.h (renamed from examples/declarative/tutorials/extending/chapter5-plugins/musician.h)21
-rw-r--r--examples/declarative/tutorials/extending/chapter6-plugins/pieslice.cpp88
-rw-r--r--examples/declarative/tutorials/extending/chapter6-plugins/pieslice.h74
-rw-r--r--examples/declarative/tutorials/extending/chapter6-plugins/qmldir1
-rw-r--r--examples/declarative/tutorials/extending/extending.pro3
-rw-r--r--examples/examples.pro2
-rw-r--r--examples/itemviews/addressbook/addresswidget.cpp2
-rw-r--r--examples/itemviews/addressbook/tablemodel.cpp48
-rw-r--r--examples/multitouch/dials/dials.pro2
-rw-r--r--examples/multitouch/knobs/knobs.pro2
-rw-r--r--examples/network/bearercloud/cloud.cpp5
-rw-r--r--examples/network/bearermonitor/bearermonitor.cpp14
-rw-r--r--examples/network/bearermonitor/sessionwidget.h2
-rw-r--r--examples/network/bearermonitor/sessionwidget_maemo.ui48
-rw-r--r--examples/network/download/main.cpp2
-rw-r--r--examples/network/fortuneclient/client.cpp65
-rw-r--r--examples/network/fortuneclient/client.h7
-rw-r--r--examples/network/fortuneclient/fortuneclient.pro2
-rw-r--r--examples/network/fortuneserver/fortuneserver.pro2
-rw-r--r--examples/network/fortuneserver/main.cpp7
-rw-r--r--examples/network/fortuneserver/server.cpp98
-rw-r--r--examples/network/fortuneserver/server.h3
-rw-r--r--examples/network/http/httpwindow.cpp2
-rw-r--r--examples/network/network-chat/chatdialog.cpp3
-rw-r--r--examples/network/network-chat/main.cpp48
-rw-r--r--examples/network/network-chat/network-chat.pro2
-rw-r--r--examples/network/qftp/ftpwindow.cpp56
-rw-r--r--examples/network/qftp/ftpwindow.h6
-rw-r--r--examples/network/qftp/qftp.pro2
-rw-r--r--examples/network/qftp/sym_iap_util.h519
-rw-r--r--examples/network/torrent/torrent.pro2
-rw-r--r--examples/network/torrent/torrentclient.cpp22
-rw-r--r--examples/opengl/shared/qtlogo.cpp2
-rw-r--r--examples/qtconcurrent/progressdialog/main.cpp2
-rw-r--r--examples/tools/customcompleter/textedit.cpp2
-rw-r--r--examples/touch/dials/dials.pro8
-rw-r--r--examples/touch/dials/dials.ui (renamed from examples/multitouch/dials/dials.ui)0
-rw-r--r--examples/touch/dials/main.cpp (renamed from examples/multitouch/dials/main.cpp)0
-rw-r--r--examples/touch/fingerpaint/fingerpaint.pro (renamed from examples/multitouch/fingerpaint/fingerpaint.pro)4
-rw-r--r--examples/touch/fingerpaint/main.cpp (renamed from examples/multitouch/fingerpaint/main.cpp)0
-rw-r--r--examples/touch/fingerpaint/mainwindow.cpp (renamed from examples/multitouch/fingerpaint/mainwindow.cpp)0
-rw-r--r--examples/touch/fingerpaint/mainwindow.h (renamed from examples/multitouch/fingerpaint/mainwindow.h)0
-rw-r--r--examples/touch/fingerpaint/scribblearea.cpp (renamed from examples/multitouch/fingerpaint/scribblearea.cpp)0
-rw-r--r--examples/touch/fingerpaint/scribblearea.h (renamed from examples/multitouch/fingerpaint/scribblearea.h)0
-rw-r--r--examples/touch/knobs/knob.cpp (renamed from examples/multitouch/knobs/knob.cpp)0
-rw-r--r--examples/touch/knobs/knob.h (renamed from examples/multitouch/knobs/knob.h)0
-rw-r--r--examples/touch/knobs/knobs.pro8
-rw-r--r--examples/touch/knobs/main.cpp (renamed from examples/multitouch/knobs/main.cpp)0
-rw-r--r--examples/touch/pinchzoom/graphicsview.cpp (renamed from examples/multitouch/pinchzoom/graphicsview.cpp)0
-rw-r--r--examples/touch/pinchzoom/graphicsview.h (renamed from examples/multitouch/pinchzoom/graphicsview.h)0
-rw-r--r--examples/touch/pinchzoom/images/cheese.jpg (renamed from examples/multitouch/pinchzoom/images/cheese.jpg)bin3029 -> 3029 bytes
-rw-r--r--examples/touch/pinchzoom/main.cpp (renamed from examples/multitouch/pinchzoom/main.cpp)0
-rw-r--r--examples/touch/pinchzoom/mice.qrc (renamed from examples/multitouch/pinchzoom/mice.qrc)0
-rw-r--r--examples/touch/pinchzoom/mouse.cpp (renamed from examples/multitouch/pinchzoom/mouse.cpp)0
-rw-r--r--examples/touch/pinchzoom/mouse.h (renamed from examples/multitouch/pinchzoom/mouse.h)0
-rw-r--r--examples/touch/pinchzoom/pinchzoom.pro (renamed from examples/multitouch/pinchzoom/pinchzoom.pro)4
-rw-r--r--examples/touch/touch.pro (renamed from examples/multitouch/multitouch.pro)0
-rw-r--r--examples/tutorials/modelview/1_readonly/1_readonly.pro10
-rw-r--r--examples/tutorials/modelview/1_readonly/main.cpp53
-rw-r--r--examples/tutorials/modelview/1_readonly/modelview.cpp54
-rw-r--r--examples/tutorials/modelview/1_readonly/modelview.h61
-rw-r--r--examples/tutorials/modelview/1_readonly/mymodel.cpp70
-rw-r--r--examples/tutorials/modelview/1_readonly/mymodel.h59
-rw-r--r--examples/tutorials/modelview/2_formatting/2_formatting.pro10
-rw-r--r--examples/tutorials/modelview/2_formatting/main.cpp (renamed from examples/declarative/tutorials/extending/chapter4-customPropertyTypes/instrument.cpp)22
-rw-r--r--examples/tutorials/modelview/2_formatting/modelview.cpp52
-rw-r--r--examples/tutorials/modelview/2_formatting/modelview.h57
-rw-r--r--examples/tutorials/modelview/2_formatting/mymodel.cpp112
-rw-r--r--examples/tutorials/modelview/2_formatting/mymodel.h56
-rw-r--r--examples/tutorials/modelview/3_changingmodel/3_changingmodel.pro10
-rw-r--r--examples/tutorials/modelview/3_changingmodel/main.cpp50
-rw-r--r--examples/tutorials/modelview/3_changingmodel/modelview.cpp52
-rw-r--r--examples/tutorials/modelview/3_changingmodel/modelview.h57
-rw-r--r--examples/tutorials/modelview/3_changingmodel/mymodel.cpp95
-rw-r--r--examples/tutorials/modelview/3_changingmodel/mymodel.h63
-rw-r--r--examples/tutorials/modelview/4_headers/4_headers.pro10
-rw-r--r--examples/tutorials/modelview/4_headers/main.cpp50
-rw-r--r--examples/tutorials/modelview/4_headers/modelview.cpp54
-rw-r--r--examples/tutorials/modelview/4_headers/modelview.h58
-rw-r--r--examples/tutorials/modelview/4_headers/mymodel.cpp91
-rw-r--r--examples/tutorials/modelview/4_headers/mymodel.h57
-rw-r--r--examples/tutorials/modelview/5_edit/5_edit.pro10
-rw-r--r--examples/tutorials/modelview/5_edit/main.cpp50
-rw-r--r--examples/tutorials/modelview/5_edit/modelview.cpp60
-rw-r--r--examples/tutorials/modelview/5_edit/modelview.h (renamed from examples/declarative/tutorials/extending/chapter5-plugins/instrument.h)30
-rw-r--r--examples/tutorials/modelview/5_edit/mymodel.cpp99
-rw-r--r--examples/tutorials/modelview/5_edit/mymodel.h67
-rw-r--r--examples/tutorials/modelview/6_treeview/6_treeview.pro5
-rw-r--r--examples/tutorials/modelview/6_treeview/main.cpp50
-rw-r--r--examples/tutorials/modelview/6_treeview/modelview.cpp82
-rw-r--r--examples/tutorials/modelview/6_treeview/modelview.h65
-rw-r--r--examples/tutorials/modelview/7_selections/7_selections.pro5
-rw-r--r--examples/tutorials/modelview/7_selections/main.cpp50
-rw-r--r--examples/tutorials/modelview/7_selections/modelview.cpp107
-rw-r--r--examples/tutorials/modelview/7_selections/modelview.h64
-rw-r--r--examples/tutorials/modelview/modelview.pro10
-rw-r--r--examples/tutorials/tutorials.pro4
-rw-r--r--examples/xml/htmlinfo/main.cpp2
-rw-r--r--mkspecs/common/symbian/symbian.conf1
-rw-r--r--mkspecs/features/sis_targets.prf8
-rw-r--r--mkspecs/features/symbian/armcc_warnings.prf11
-rw-r--r--mkspecs/features/symbian/symbian_building.prf55
-rw-r--r--mkspecs/features/uic.prf12
-rw-r--r--mkspecs/linux-g++-maemo/qmake.conf3
-rw-r--r--mkspecs/symbian/linux-armcc/qmake.conf4
-rw-r--r--qmake/generators/makefile.cpp8
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-thai.c2
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h10
-rw-r--r--src/3rdparty/libconninet.pri18
-rw-r--r--src/3rdparty/libconninet/AUTHORS0
-rw-r--r--src/3rdparty/libconninet/COPYING510
-rw-r--r--src/3rdparty/libconninet/ChangeLog0
-rw-r--r--src/3rdparty/libconninet/INSTALL229
-rw-r--r--src/3rdparty/libconninet/Makefile.am49
-rw-r--r--src/3rdparty/libconninet/NEWS0
-rw-r--r--src/3rdparty/libconninet/README0
-rwxr-xr-xsrc/3rdparty/libconninet/autogen.sh3
-rwxr-xr-xsrc/3rdparty/libconninet/config.guess1533
-rwxr-xr-xsrc/3rdparty/libconninet/config.sub1693
-rw-r--r--src/3rdparty/libconninet/configure.ac90
-rw-r--r--src/3rdparty/libconninet/conninet.pc.in11
-rw-r--r--src/3rdparty/libconninet/debian/changelog285
-rw-r--r--src/3rdparty/libconninet/debian/compat1
-rw-r--r--src/3rdparty/libconninet/debian/control39
-rw-r--r--src/3rdparty/libconninet/debian/copyright19
-rw-r--r--src/3rdparty/libconninet/debian/libconninet0-dev.dirs2
-rw-r--r--src/3rdparty/libconninet/debian/libconninet0-dev.files4
-rw-r--r--src/3rdparty/libconninet/debian/libconninet0.dirs1
-rw-r--r--src/3rdparty/libconninet/debian/libconninet0.files1
-rwxr-xr-xsrc/3rdparty/libconninet/debian/rules123
-rw-r--r--src/3rdparty/libconninet/doxygen.cfg.in1147
-rw-r--r--src/3rdparty/libconninet/src/Makefile.am36
-rw-r--r--src/3rdparty/libconninet/src/dbusdispatcher.cpp611
-rw-r--r--src/3rdparty/libconninet/src/dbusdispatcher.h91
-rw-r--r--src/3rdparty/libconninet/src/iapconf.cpp299
-rw-r--r--src/3rdparty/libconninet/src/iapconf.h84
-rw-r--r--src/3rdparty/libconninet/src/iapmonitor.cpp110
-rw-r--r--src/3rdparty/libconninet/src/iapmonitor.h48
-rw-r--r--src/3rdparty/libconninet/src/maemo_icd.cpp1277
-rw-r--r--src/3rdparty/libconninet/src/maemo_icd.h182
-rw-r--r--src/3rdparty/libconninet/src/proxyconf.cpp315
-rw-r--r--src/3rdparty/libconninet/src/proxyconf.h53
-rw-r--r--src/3rdparty/libconninet/tests/Makefile.am39
-rw-r--r--src/3rdparty/libconninet/tests/ut_dbusdispatcher.cpp191
-rw-r--r--src/3rdparty/libconninet/tests/ut_iapconf.cpp186
-rw-r--r--src/3rdparty/libconninet/tests/ut_iapmonitor.cpp118
-rw-r--r--src/3rdparty/libconninet/tests/ut_maemo_icd.cpp274
-rw-r--r--src/3rdparty/libconninet/tests/ut_proxyconf.cpp400
-rw-r--r--src/3rdparty/libgq.pri9
-rw-r--r--src/3rdparty/libgq/.gitignore37
-rw-r--r--src/3rdparty/libgq/Makefile.am4
-rw-r--r--src/3rdparty/libgq/README6
-rwxr-xr-xsrc/3rdparty/libgq/autogen.sh2
-rw-r--r--src/3rdparty/libgq/configure.ac23
-rw-r--r--src/3rdparty/libgq/debian/README.scratchbox28
-rw-r--r--src/3rdparty/libgq/debian/changelog31
-rw-r--r--src/3rdparty/libgq/debian/compat1
-rw-r--r--src/3rdparty/libgq/debian/control43
-rw-r--r--src/3rdparty/libgq/debian/copyright8
-rwxr-xr-xsrc/3rdparty/libgq/debian/fixup-scratchbox79
-rw-r--r--src/3rdparty/libgq/debian/libgq-gconf-dev.install5
-rw-r--r--src/3rdparty/libgq/debian/libgq-gconf-doc.install1
-rw-r--r--src/3rdparty/libgq/debian/libgq-gconf0.install1
-rw-r--r--src/3rdparty/libgq/debian/maemo-sanitize0
-rwxr-xr-xsrc/3rdparty/libgq/debian/rules32
-rw-r--r--src/3rdparty/libgq/gconf/Doxyfile1514
-rw-r--r--src/3rdparty/libgq/gconf/GConfItem1
-rw-r--r--src/3rdparty/libgq/gconf/Makefile.am37
-rw-r--r--src/3rdparty/libgq/gconf/gconfitem.cpp376
-rw-r--r--src/3rdparty/libgq/gconf/gconfitem.h147
-rw-r--r--src/3rdparty/libgq/gconf/gq-gconf.pc.in11
-rwxr-xr-xsrc/3rdparty/libgq/gconf/run-test-gconf49
-rw-r--r--src/3rdparty/libgq/gconf/test-gconf.cpp299
-rw-r--r--src/3rdparty/libgq/gconf/test-gconf.h86
-rw-r--r--src/3rdparty/libjpeg/ansi2knr.136
-rw-r--r--src/3rdparty/libjpeg/ansi2knr.c739
-rw-r--r--src/3rdparty/phonon/mmf/abstractmediaplayer.cpp28
-rw-r--r--src/3rdparty/phonon/mmf/abstractmediaplayer.h6
-rw-r--r--src/3rdparty/phonon/mmf/abstractplayer.h4
-rw-r--r--src/3rdparty/phonon/mmf/abstractvideoplayer.cpp6
-rw-r--r--src/3rdparty/phonon/mmf/abstractvideoplayer.h1
-rw-r--r--src/3rdparty/phonon/mmf/audioplayer.cpp6
-rw-r--r--src/3rdparty/phonon/mmf/audioplayer.h1
-rw-r--r--src/3rdparty/phonon/mmf/dummyplayer.cpp2
-rw-r--r--src/3rdparty/phonon/mmf/dummyplayer.h2
-rw-r--r--src/3rdparty/phonon/mmf/mediaobject.cpp75
-rw-r--r--src/3rdparty/phonon/mmf/mediaobject.h11
-rw-r--r--src/3rdparty/phonon/phonon/mediasource.cpp3
-rw-r--r--src/3rdparty/sqlite.pri4
-rw-r--r--src/3rdparty/webkit/.tag2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog87
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp16
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp43
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h4
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.cpp6
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.h1
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/yarr/RegexInterpreter.cpp2
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog246
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro12
-rw-r--r--src/3rdparty/webkit/WebCore/dom/CharacterData.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Element.cpp17
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Element.h4
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Text.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/loader/MainResourceLoader.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp11
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/GradientQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/BidiResolver.h67
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGText.cpp13
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGText.h3
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGElement.cpp9
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontFaceElement.cpp1
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGForeignObjectElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGSVGElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog80
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp12
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri1
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp28
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp3
-rw-r--r--src/corelib/concurrent/qtconcurrentexception.cpp2
-rw-r--r--src/corelib/concurrent/qtconcurrentmap.cpp2
-rw-r--r--src/corelib/corelib.pro15
-rw-r--r--src/corelib/global/qglobal.cpp55
-rw-r--r--src/corelib/global/qglobal.h8
-rw-r--r--src/corelib/global/qnamespace.h3
-rw-r--r--src/corelib/global/qnamespace.qdoc5
-rw-r--r--src/corelib/io/qabstractfileengine.cpp6
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp4
-rw-r--r--src/corelib/io/qiodevice_p.h2
-rw-r--r--src/corelib/io/qprocess.cpp4
-rw-r--r--src/corelib/io/qtextstream.cpp2
-rw-r--r--src/corelib/kernel/qabstractitemmodel.cpp16
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib.cpp6
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian.cpp2
-rw-r--r--src/corelib/kernel/qmetatype.cpp2
-rw-r--r--src/corelib/plugin/quuid.cpp31
-rw-r--r--src/corelib/tools/qbytearray.cpp8
-rw-r--r--src/corelib/tools/qbytearraymatcher.cpp2
-rw-r--r--src/corelib/tools/qlocale.cpp1
-rw-r--r--src/corelib/tools/qsharedpointer.cpp2
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h31
-rw-r--r--src/corelib/tools/qsimd.cpp66
-rw-r--r--src/corelib/tools/qsimd_p.h28
-rw-r--r--src/corelib/tools/qstring.cpp12
-rw-r--r--src/corelib/tools/qstringmatcher.cpp2
-rw-r--r--src/corelib/tools/qtextboundaryfinder.cpp2
-rw-r--r--src/dbus/dbus.pro2
-rw-r--r--src/dbus/qdbusabstractadaptor.h2
-rw-r--r--src/dbus/qdbusabstractinterface.h4
-rw-r--r--src/dbus/qdbusargument.h48
-rw-r--r--src/dbus/qdbusconnection.cpp4
-rw-r--r--src/dbus/qdbusconnection.h5
-rw-r--r--src/dbus/qdbusconnectioninterface.h2
-rw-r--r--src/dbus/qdbuscontext.h2
-rw-r--r--src/dbus/qdbuserror.h4
-rw-r--r--src/dbus/qdbusextratypes.h4
-rw-r--r--src/dbus/qdbusintegrator.cpp22
-rw-r--r--src/dbus/qdbusinterface.cpp2
-rw-r--r--src/dbus/qdbusinterface.h2
-rw-r--r--src/dbus/qdbusintrospection_p.h2
-rw-r--r--src/dbus/qdbusmacros.h8
-rw-r--r--src/dbus/qdbusmessage.h4
-rw-r--r--src/dbus/qdbusmetaobject_p.h2
-rw-r--r--src/dbus/qdbusmetatype.h2
-rw-r--r--src/dbus/qdbuspendingcall.h4
-rw-r--r--src/dbus/qdbuspendingreply.h2
-rw-r--r--src/dbus/qdbusreply.h2
-rw-r--r--src/dbus/qdbusserver.cpp2
-rw-r--r--src/dbus/qdbusserver.h2
-rw-r--r--src/dbus/qdbusservicewatcher.h2
-rw-r--r--src/dbus/qdbusthreaddebug_p.h4
-rw-r--r--src/dbus/qdbusutil_p.h20
-rw-r--r--src/dbus/qdbusxmlgenerator.cpp10
-rw-r--r--src/declarative/QmlChanges.txt12
-rw-r--r--src/declarative/debugger/qdeclarativedebugtrace.cpp12
-rw-r--r--src/declarative/debugger/qpacketprotocol.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanchors_p.h6
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp60
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp29
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimage.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimagebase.cpp7
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp220
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.h10
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem_p.h28
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp38
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview_p.h7
-rw-r--r--src/declarative/graphicsitems/qdeclarativeloader.cpp10
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp101
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea_p.h10
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea_p_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativepainteditem.cpp16
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath.cpp16
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath_p.h41
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp119
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview_p.h13
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview_p_p.h13
-rw-r--r--src/declarative/graphicsitems/qdeclarativerepeater.cpp1
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext.cpp117
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp55
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp51
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput_p.h8
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput_p_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativetranslate.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativetranslate_p.h7
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp70
-rw-r--r--src/declarative/qml/parser/qdeclarativejslexer.cpp10
-rw-r--r--src/declarative/qml/qdeclarative.h14
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp10
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp31
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp89
-rw-r--r--src/declarative/qml/qdeclarativeengine.h2
-rw-r--r--src/declarative/qml/qdeclarativeengine_p.h2
-rw-r--r--src/declarative/qml/qdeclarativeenginedebug.cpp30
-rw-r--r--src/declarative/qml/qdeclarativeerror.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeexpression.cpp1
-rw-r--r--src/declarative/qml/qdeclarativeexpression_p.h1
-rw-r--r--src/declarative/qml/qdeclarativeextensionplugin.cpp77
-rw-r--r--src/declarative/qml/qdeclarativeimageprovider.cpp3
-rw-r--r--src/declarative/qml/qdeclarativeinstruction_p.h3
-rw-r--r--src/declarative/qml/qdeclarativelist.cpp2
-rw-r--r--src/declarative/qml/qdeclarativemetatype.cpp25
-rw-r--r--src/declarative/qml/qdeclarativemetatype_p.h8
-rw-r--r--src/declarative/qml/qdeclarativeprivate.h30
-rw-r--r--src/declarative/qml/qdeclarativerewrite.cpp2
-rw-r--r--src/declarative/qml/qdeclarativerewrite_p.h4
-rw-r--r--src/declarative/qml/qdeclarativescriptparser.cpp99
-rw-r--r--src/declarative/qml/qdeclarativestringconverters.cpp8
-rw-r--r--src/declarative/qml/qdeclarativestringconverters_p.h2
-rw-r--r--src/declarative/qml/qdeclarativevaluetype.cpp4
-rw-r--r--src/declarative/qml/qdeclarativevme.cpp5
-rw-r--r--src/declarative/qml/qdeclarativexmlhttprequest.cpp7
-rw-r--r--src/declarative/qml/qdeclarativexmlhttprequest_p.h4
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp440
-rw-r--r--src/declarative/util/qdeclarativeanimation_p.h10
-rw-r--r--src/declarative/util/qdeclarativeanimation_p_p.h2
-rw-r--r--src/declarative/util/qdeclarativebehavior.cpp41
-rw-r--r--src/declarative/util/qdeclarativeopenmetaobject.cpp12
-rw-r--r--src/declarative/util/qdeclarativeopenmetaobject_p.h1
-rw-r--r--src/declarative/util/qdeclarativepixmapcache.cpp90
-rw-r--r--src/declarative/util/qdeclarativesmoothedanimation.cpp73
-rw-r--r--src/declarative/util/qdeclarativespringanimation.cpp57
-rw-r--r--src/declarative/util/qdeclarativestate.cpp15
-rw-r--r--src/declarative/util/qdeclarativestateoperations.cpp8
-rw-r--r--src/declarative/util/qdeclarativetimeline.cpp4
-rw-r--r--src/declarative/util/qdeclarativetimer.cpp11
-rw-r--r--src/declarative/util/qdeclarativetransition.cpp94
-rw-r--r--src/declarative/util/qdeclarativeview.cpp23
-rw-r--r--src/declarative/util/qdeclarativeview.h4
-rw-r--r--src/declarative/util/qdeclarativexmllistmodel.cpp4
-rw-r--r--src/declarative/util/qlistmodelinterface.cpp2
-rw-r--r--src/gui/dialogs/qfiledialog_mac.mm8
-rw-r--r--src/gui/dialogs/qwizard_win.cpp42
-rw-r--r--src/gui/dialogs/qwizard_win_p.h21
-rw-r--r--src/gui/graphicsview/qgraphicsgridlayout.cpp7
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp56
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h15
-rw-r--r--src/gui/graphicsview/qgraphicslinearlayout.cpp7
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp7
-rw-r--r--src/gui/graphicsview/qgraphicstransform.cpp3
-rw-r--r--src/gui/graphicsview/qgraphicstransform.h9
-rw-r--r--src/gui/gui.pro25
-rw-r--r--src/gui/image/image.pri1
-rw-r--r--src/gui/image/qimage.cpp54
-rw-r--r--src/gui/image/qimage_ssse3.cpp150
-rw-r--r--src/gui/image/qpixmap_s60.cpp20
-rw-r--r--src/gui/image/qpnghandler.cpp2
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp4
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp2
-rw-r--r--src/gui/itemviews/qfileiconprovider.cpp71
-rw-r--r--src/gui/itemviews/qheaderview.cpp2
-rw-r--r--src/gui/itemviews/qlistview.cpp7
-rw-r--r--src/gui/kernel/qapplication.cpp12
-rw-r--r--src/gui/kernel/qapplication.h3
-rw-r--r--src/gui/kernel/qapplication_p.h2
-rw-r--r--src/gui/kernel/qapplication_s60.cpp564
-rw-r--r--src/gui/kernel/qapplication_win.cpp2
-rw-r--r--src/gui/kernel/qcocoaapplicationdelegate_mac.mm1
-rw-r--r--src/gui/kernel/qcocoasharedwindowmethods_mac_p.h4
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm43
-rw-r--r--src/gui/kernel/qcocoaview_mac_p.h1
-rw-r--r--src/gui/kernel/qcocoawindowdelegate_mac.mm20
-rw-r--r--src/gui/kernel/qcocoawindowdelegate_mac_p.h1
-rw-r--r--src/gui/kernel/qdesktopwidget_s60.cpp22
-rw-r--r--src/gui/kernel/qevent.cpp8
-rw-r--r--src/gui/kernel/qgesture.cpp35
-rw-r--r--src/gui/kernel/qgesture.h6
-rw-r--r--src/gui/kernel/qgesture_p.h1
-rw-r--r--src/gui/kernel/qgesturemanager.cpp4
-rw-r--r--src/gui/kernel/qguifunctions_wince.cpp28
-rw-r--r--src/gui/kernel/qpalette.cpp10
-rw-r--r--src/gui/kernel/qstandardgestures.cpp15
-rw-r--r--src/gui/kernel/qt_s60_p.h13
-rw-r--r--src/gui/kernel/qwidget.cpp8
-rw-r--r--src/gui/kernel/qwidget_mac.mm11
-rw-r--r--src/gui/kernel/qwidget_s60.cpp17
-rw-r--r--src/gui/kernel/qwidget_win.cpp1
-rw-r--r--src/gui/kernel/qwidget_wince.cpp1
-rw-r--r--src/gui/painting/qdrawhelper.cpp135
-rw-r--r--src/gui/painting/qdrawhelper_iwmmxt.cpp25
-rw-r--r--src/gui/painting/qdrawhelper_mmx.cpp23
-rw-r--r--src/gui/painting/qdrawhelper_mmx3dnow.cpp25
-rw-r--r--src/gui/painting/qdrawhelper_p.h40
-rw-r--r--src/gui/painting/qdrawhelper_sse.cpp25
-rw-r--r--src/gui/painting/qdrawhelper_sse2.cpp81
-rw-r--r--src/gui/painting/qdrawhelper_sse3dnow.cpp25
-rw-r--r--src/gui/painting/qdrawingprimitive_sse2_p.h33
-rw-r--r--src/gui/painting/qpaintengine_x11.cpp22
-rw-r--r--src/gui/painting/qrgb.h2
-rw-r--r--src/gui/styles/qstyle.cpp4
-rw-r--r--src/gui/styles/qstyle.h2
-rw-r--r--src/gui/styles/qstyleoption.cpp6
-rw-r--r--src/gui/styles/qstyleoption.h2
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp7
-rw-r--r--src/gui/text/qfontengine_s60.cpp9
-rw-r--r--src/gui/text/qstatictext.cpp23
-rw-r--r--src/gui/text/qtextcursor.cpp6
-rw-r--r--src/gui/text/qtextdocument_p.cpp2
-rw-r--r--src/gui/text/qtextlayout.cpp2
-rw-r--r--src/gui/text/qtextobject.cpp2
-rw-r--r--src/gui/text/qtextoption.cpp7
-rw-r--r--src/gui/text/qtexttable.cpp35
-rw-r--r--src/gui/text/text.pri2
-rw-r--r--src/gui/util/qcompleter.cpp4
-rw-r--r--src/gui/util/qdesktopservices_x11.cpp12
-rw-r--r--src/gui/widgets/qlineedit.cpp8
-rw-r--r--src/gui/widgets/qmainwindowlayout_mac.mm20
-rw-r--r--src/gui/widgets/qtabbar.cpp6
-rw-r--r--src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp2
-rw-r--r--src/imports/gestures/plugin.cpp7
-rw-r--r--src/imports/gestures/qdeclarativegesturearea.cpp7
-rw-r--r--src/imports/particles/qdeclarativeparticles.cpp8
-rw-r--r--src/multimedia/audio/qaudiodevicefactory.cpp22
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp46
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_alsa_p.h5
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp5
-rw-r--r--src/multimedia/audio/qaudioinput_alsa_p.cpp54
-rw-r--r--src/multimedia/audio/qaudioinput_alsa_p.h1
-rw-r--r--src/multimedia/audio/qaudioinput_win32_p.cpp2
-rw-r--r--src/multimedia/audio/qaudiooutput_win32_p.cpp101
-rw-r--r--src/multimedia/video/qabstractvideobuffer.cpp1
-rw-r--r--src/multimedia/video/qabstractvideobuffer.h1
-rw-r--r--src/multimedia/video/qvideosurfaceformat.cpp2
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp9
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp8
-rw-r--r--src/network/access/qnetworkrequest.cpp8
-rw-r--r--src/network/access/qnetworkrequest.h2
-rw-r--r--src/network/bearer/qnetworkconfiguration.cpp19
-rw-r--r--src/network/bearer/qnetworkconfiguration_p.h3
-rw-r--r--src/network/bearer/qnetworksession.cpp12
-rw-r--r--src/network/kernel/qauthenticator.cpp408
-rw-r--r--src/network/kernel/qauthenticator.h5
-rw-r--r--src/network/kernel/qauthenticator_p.h6
-rw-r--r--src/network/kernel/qnetworkproxy_mac.cpp5
-rw-r--r--src/network/socket/qtcpserver.cpp2
-rw-r--r--src/network/ssl/qsslsocket.cpp4
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp93
-rw-r--r--src/network/ssl/qsslsocket_openssl_p.h1
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp2
-rw-r--r--src/opengl/qgl.cpp16
-rw-r--r--src/opengl/qglbuffer.cpp4
-rw-r--r--src/opengl/qglbuffer.h4
-rw-r--r--src/opengl/qwindowsurface_gl.cpp7
-rw-r--r--src/openvg/qpaintengine_vg.cpp14
-rw-r--r--src/plugins/accessible/widgets/complexwidgets.cpp8
-rw-r--r--src/plugins/accessible/widgets/qaccessiblewidgets.cpp4
-rw-r--r--src/plugins/bearer/bearer.pro3
-rw-r--r--src/plugins/bearer/connman/connman.pro19
-rw-r--r--src/plugins/bearer/connman/main.cpp (renamed from tools/qtestlib/chart/database.h)86
-rw-r--r--src/plugins/bearer/connman/qconnmanengine.cpp787
-rw-r--r--src/plugins/bearer/connman/qconnmanengine.h179
-rw-r--r--src/plugins/bearer/connman/qconnmanservice_linux.cpp1072
-rw-r--r--src/plugins/bearer/connman/qconnmanservice_linux_p.h381
-rw-r--r--src/plugins/bearer/icd/icd.pro7
-rw-r--r--src/plugins/bearer/icd/qnetworksession_impl.cpp62
-rw-r--r--src/plugins/bearer/icd/qnetworksession_impl.h8
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp127
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.h5
-rw-r--r--src/plugins/bearer/symbian/symbian_3/symbian_3.pro2
-rw-r--r--src/plugins/bearer/symbian/symbianengine.cpp218
-rw-r--r--src/plugins/bearer/symbian/symbianengine.h1
-rw-r--r--src/plugins/sqldrivers/db2/db2.pro10
-rw-r--r--src/plugins/sqldrivers/ibase/ibase.pro14
-rw-r--r--src/plugins/sqldrivers/mysql/mysql.pro23
-rw-r--r--src/plugins/sqldrivers/oci/oci.pro13
-rw-r--r--src/plugins/sqldrivers/odbc/odbc.pro19
-rw-r--r--src/plugins/sqldrivers/psql/psql.pro18
-rw-r--r--src/plugins/sqldrivers/sqlite/sqlite.pro17
-rw-r--r--src/plugins/sqldrivers/sqlite2/sqlite2.pro9
-rw-r--r--src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri40
-rw-r--r--src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro2
-rw-r--r--src/plugins/sqldrivers/tds/tds.pro15
-rw-r--r--src/qbase.pri14
-rw-r--r--src/s60installs/bwins/QtCoreu.def132
-rw-r--r--src/s60installs/bwins/QtDeclarativeu.def28
-rw-r--r--src/s60installs/bwins/QtGuiu.def11
-rw-r--r--src/s60installs/bwins/QtNetworku.def361
-rw-r--r--src/s60installs/bwins/QtOpenVGu.def15
-rw-r--r--src/s60installs/eabi/QtDeclarativeu.def27
-rw-r--r--src/s60installs/eabi/QtGuiu.def11
-rw-r--r--src/s60installs/eabi/QtNetworku.def3
-rw-r--r--src/s60installs/s60installs.pro4
-rw-r--r--src/s60main/s60main.pro1
-rw-r--r--src/script/api/qscriptcontext.cpp10
-rw-r--r--src/script/api/qscriptcontextinfo.cpp11
-rw-r--r--src/script/api/qscriptcontextinfo.h4
-rw-r--r--src/script/api/qscriptengine.cpp16
-rw-r--r--src/script/api/qscriptengineagent.cpp12
-rw-r--r--src/script/api/qscriptvalue.cpp6
-rw-r--r--src/script/api/qscriptvalue_p.h2
-rw-r--r--src/script/bridge/qscriptdeclarativeobject.cpp4
-rw-r--r--src/sql/drivers/db2/qsql_db2.pri8
-rw-r--r--src/sql/drivers/drivers.pri130
-rw-r--r--src/sql/drivers/ibase/qsql_ibase.pri11
-rw-r--r--src/sql/drivers/mysql/qsql_mysql.pri16
-rw-r--r--src/sql/drivers/oci/qsql_oci.cpp36
-rw-r--r--src/sql/drivers/oci/qsql_oci.pri9
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.pri13
-rw-r--r--src/sql/drivers/psql/qsql_psql.pri13
-rw-r--r--src/sql/drivers/sqlite/qsql_sqlite.pri11
-rw-r--r--src/sql/drivers/sqlite2/qsql_sqlite2.pri4
-rw-r--r--src/sql/drivers/tds/qsql_tds.h3
-rw-r--r--src/sql/drivers/tds/qsql_tds.pri10
-rw-r--r--src/sql/kernel/qsqldatabase.cpp3
-rw-r--r--src/svg/qsvgstyle.cpp2
-rw-r--r--src/svg/qsvgstyle_p.h2
-rw-r--r--src/testlib/qtestcase.cpp30
-rw-r--r--src/tools/moc/moc.cpp22
-rw-r--r--tests/auto/compiler/tst_compiler.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/qtbug12295.qml17
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp28
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/data/chain.qml10
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/data/forcefocus.qml22
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/data/test.qml14
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/data/test2.qml10
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/data/test3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/data/test4.qml14
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/data/test5.qml10
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp131
-rw-r--r--tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp33
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp11
-rw-r--r--tests/auto/declarative/qdeclarativepathview/data/pathview0.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp8
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/data/massive.pngbin0 -> 31834 bytes
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp40
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/data/itemlist.qml29
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp9
-rw-r--r--tests/auto/declarative/qdeclarativescriptdebugging/data/backtrace1.js11
-rw-r--r--tests/auto/declarative/qdeclarativescriptdebugging/data/backtrace1.qml27
-rw-r--r--tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro20
-rw-r--r--tests/auto/declarative/qdeclarativescriptdebugging/tst_qdeclarativescriptdebugging.cpp154
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/anchorRewindBug.qml37
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/extendsBug.qml26
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp53
-rw-r--r--tests/auto/declarative/qdeclarativetext/data/rotated.qml18
-rw-r--r--tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp28
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp62
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp44
-rw-r--r--tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp60
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/data/objectlist.qml3
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp3
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/test.qml8
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/test2.qml10
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.0.pngbin2321 -> 2412 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.1.pngbin2380 -> 2443 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.2.pngbin2315 -> 2398 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.3.pngbin2372 -> 2390 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.4.pngbin2327 -> 2416 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.5.pngbin0 -> 2395 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.qml1280
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml5
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml4
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml4
-rw-r--r--tests/auto/gui.pro1
-rw-r--r--tests/auto/guiapplauncher/tst_guiapplauncher.cpp8
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp27
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result13
-rw-r--r--tests/auto/mediaobject/tst_mediaobject.cpp7
-rw-r--r--tests/auto/moc/tst_moc.cpp22
-rw-r--r--tests/auto/network.pro4
-rw-r--r--tests/auto/qauthenticator/qauthenticator.pro5
-rw-r--r--tests/auto/qauthenticator/tst_qauthenticator.cpp155
-rw-r--r--tests/auto/qdatetime/tst_qdatetime.cpp68
-rw-r--r--tests/auto/qdbusinterface/tst_qdbusinterface.cpp138
-rw-r--r--tests/auto/qfiledialog2/tst_qfiledialog2.cpp22
-rw-r--r--tests/auto/qfileinfo/tst_qfileinfo.cpp2
-rw-r--r--tests/auto/qgl/tst_qgl.cpp27
-rw-r--r--tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp15
-rw-r--r--tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp7
-rw-r--r--tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp7
-rw-r--r--tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp13
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp73
-rw-r--r--tests/auto/qheaderview/tst_qheaderview.cpp21
-rw-r--r--tests/auto/qimage/tst_qimage.cpp22
-rw-r--r--tests/auto/qimagereader/images/pngwithcompressedtext.pngbin757 -> 0 bytes
-rw-r--r--tests/auto/qimagereader/images/pngwithtext.pngbin796 -> 0 bytes
-rw-r--r--tests/auto/qimagereader/qimagereader.qrc2
-rw-r--r--tests/auto/qimagereader/tst_qimagereader.cpp75
-rw-r--r--tests/auto/qimagewriter/tst_qimagewriter.cpp38
-rw-r--r--tests/auto/qiodevice/tst_qiodevice.cpp26
-rw-r--r--tests/auto/qlineedit/tst_qlineedit.cpp29
-rw-r--r--tests/auto/qlistview/tst_qlistview.cpp53
-rw-r--r--tests/auto/qmake/testdata/simple_app/build/README1
-rw-r--r--tests/auto/qmake/testdata/simple_app/simple_app.pro1
-rw-r--r--tests/auto/qmake/testdata/simple_app/test.qrc5
-rw-r--r--tests/auto/qmake/tst_qmake.cpp16
-rw-r--r--tests/auto/qmimedata/qmimedata.pro4
-rw-r--r--tests/auto/qmimedata/tst_qmimedata.cpp343
-rw-r--r--tests/auto/qnetworkreply/test/test.pro2
-rw-r--r--tests/auto/qnetworksession/test/tst_qnetworksession.cpp11
-rw-r--r--tests/auto/qpainter/tst_qpainter.cpp89
-rw-r--r--tests/auto/qpixmap/qpixmap.pro8
-rw-r--r--tests/auto/qscriptengine/tst_qscriptengine.cpp29
-rw-r--r--tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp134
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.cpp4
-rw-r--r--tests/auto/qscrollbar/tst_qscrollbar.cpp2
-rw-r--r--tests/auto/qsharedpointer/tst_qsharedpointer.cpp56
-rw-r--r--tests/auto/qsocks5socketengine/qsocks5socketengine.pro2
-rw-r--r--tests/auto/qsslsocket/tst_qsslsocket.cpp24
-rw-r--r--tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp24
-rw-r--r--tests/auto/qtcpsocket/tst_qtcpsocket.cpp4
-rw-r--r--tests/auto/qtexttable/tst_qtexttable.cpp69
-rw-r--r--tests/auto/quuid/quuid.pro9
-rw-r--r--tests/auto/quuid/test/test.pro29
-rw-r--r--tests/auto/quuid/testProcessUniqueness/main.cpp (renamed from tools/qtestlib/chart/main.cpp)58
-rw-r--r--tests/auto/quuid/testProcessUniqueness/testProcessUniqueness.pro8
-rw-r--r--tests/auto/quuid/tst_quuid.cpp29
-rw-r--r--tests/auto/qvideosurfaceformat/tst_qvideosurfaceformat.cpp27
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp27
-rw-r--r--tests/auto/qxmlquery/qxmlquery.pro7
-rw-r--r--tests/auto/qxmlquery/tst_qxmlquery.cpp25
-rw-r--r--tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp45
-rw-r--r--tests/benchmarks/gui/image/image.pro1
-rw-r--r--tests/benchmarks/gui/image/qimageconversion/qimageconversion.pro10
-rw-r--r--tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp108
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/pngwithcompressedtext.pngbin757 -> 0 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/pngwithtext.pngbin796 -> 0 bytes
-rw-r--r--tests/benchmarks/network/network.pro2
-rw-r--r--tests/manual/bearerex/bearerex.cpp3
-rw-r--r--tests/manual/bearerex/bearerex.pro2
-rw-r--r--tools/assistant/lib/qhelpprojectdata.cpp6
-rw-r--r--tools/assistant/lib/qhelpsearchengine.cpp10
-rw-r--r--tools/assistant/tools/assistant/assistant.pro2
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qwv.cpp2
-rw-r--r--tools/assistant/translations/qt_help.pro53
-rw-r--r--tools/assistant/translations/translations.pro54
-rw-r--r--tools/configure/configureapp.cpp22
-rw-r--r--tools/designer/src/components/lib/lib.pro10
-rw-r--r--tools/designer/src/components/objectinspector/objectinspector.pri2
-rw-r--r--tools/designer/src/components/propertyeditor/propertyeditor.pri4
-rw-r--r--tools/designer/src/designer/designer.pro5
-rw-r--r--tools/designer/src/lib/shared/shared.pri10
-rw-r--r--tools/designer/translations/translations.pro141
-rw-r--r--tools/linguist/linguist/linguist.pro12
-rw-r--r--tools/linguist/lupdate/cpp.cpp7
-rw-r--r--tools/makeqpf/qpf2.cpp2
-rw-r--r--tools/porting/src/semantic.cpp6
-rw-r--r--tools/qdbus/qdbuscpp2xml/qdbuscpp2xml.cpp2
-rw-r--r--tools/qdoc3/codemarker.cpp8
-rw-r--r--tools/qdoc3/codemarker.h9
-rw-r--r--tools/qdoc3/config.h2
-rw-r--r--tools/qdoc3/cppcodemarker.cpp15
-rw-r--r--tools/qdoc3/cppcodemarker.h7
-rw-r--r--tools/qdoc3/cppcodeparser.cpp47
-rw-r--r--tools/qdoc3/cppcodeparser.h1
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp2
-rw-r--r--tools/qdoc3/htmlgenerator.cpp630
-rw-r--r--tools/qdoc3/htmlgenerator.h27
-rw-r--r--tools/qdoc3/javacodemarker.cpp6
-rw-r--r--tools/qdoc3/javacodemarker.h5
-rw-r--r--tools/qdoc3/node.cpp238
-rw-r--r--tools/qdoc3/node.h19
-rw-r--r--tools/qdoc3/plaincodemarker.cpp7
-rw-r--r--tools/qdoc3/plaincodemarker.h1
-rw-r--r--tools/qdoc3/qscodemarker.cpp7
-rw-r--r--tools/qdoc3/qscodemarker.h1
-rw-r--r--tools/qdoc3/test/assistant.qdocconf27
-rw-r--r--tools/qdoc3/test/designer.qdocconf3
-rw-r--r--tools/qdoc3/test/linguist.qdocconf3
-rw-r--r--tools/qdoc3/test/qdeclarative.qdocconf3
-rw-r--r--tools/qdoc3/test/qmake.qdocconf3
-rw-r--r--tools/qdoc3/test/qt-api-only.qdocconf10
-rw-r--r--tools/qdoc3/test/qt-api-only_ja_JP.qdocconf7
-rw-r--r--tools/qdoc3/test/qt-api-only_zh_CN.qdocconf7
-rw-r--r--tools/qdoc3/test/qt-build-docs.qdocconf15
-rw-r--r--tools/qdoc3/test/qt-cpp-ignore.qdocconf5
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf11
-rw-r--r--tools/qdoc3/test/qt.qdocconf84
-rw-r--r--tools/qdoc3/tokenizer.cpp6
-rw-r--r--tools/qdoc3/tokenizer.h2
-rw-r--r--tools/qdoc3/tree.cpp23
-rw-r--r--tools/qdoc3/tree.h20
-rw-r--r--tools/qml/Info_mac.plist31
-rw-r--r--tools/qml/browser/Browser.qml (renamed from tools/qml/content/Browser.qml)0
-rw-r--r--tools/qml/browser/browser.qrc9
-rw-r--r--tools/qml/browser/images/folder.png (renamed from tools/qml/content/images/folder.png)bin1841 -> 1841 bytes
-rw-r--r--tools/qml/browser/images/titlebar.png (renamed from tools/qml/content/images/titlebar.png)bin1436 -> 1436 bytes
-rw-r--r--tools/qml/browser/images/titlebar.sci (renamed from tools/qml/content/images/titlebar.sci)0
-rw-r--r--tools/qml/browser/images/up.png (renamed from tools/qml/content/images/up.png)bin662 -> 662 bytes
-rw-r--r--tools/qml/deviceorientation_symbian.cpp15
-rw-r--r--tools/qml/main.cpp476
-rw-r--r--tools/qml/qml.pri14
-rw-r--r--tools/qml/qml.pro3
-rw-r--r--tools/qml/qmlruntime.cpp136
-rw-r--r--tools/qml/qmlruntime.h4
-rw-r--r--tools/qml/qmlruntime.qrc9
-rw-r--r--tools/qml/startup/Logo.qml179
-rw-r--r--tools/qml/startup/qt-back.pngbin0 -> 3549 bytes
-rw-r--r--tools/qml/startup/qt-blue.jpgbin0 -> 20900 bytes
-rw-r--r--tools/qml/startup/qt-front.pngbin0 -> 3318 bytes
-rw-r--r--tools/qml/startup/qt-sketch.jpgbin0 -> 17048 bytes
-rw-r--r--tools/qml/startup/qt-text.pngbin0 -> 14565 bytes
-rw-r--r--tools/qml/startup/quick-blur.pngbin0 -> 2826 bytes
-rw-r--r--tools/qml/startup/quick-regular.pngbin0 -> 1399 bytes
-rw-r--r--tools/qml/startup/shadow.pngbin0 -> 1592 bytes
-rw-r--r--tools/qml/startup/startup.qml167
-rw-r--r--tools/qml/startup/startup.qrc16
-rw-r--r--tools/qml/startup/white-star.pngbin0 -> 2651 bytes
-rw-r--r--tools/qtconfig/translations/translations.pro16
-rw-r--r--tools/qtestlib/chart/3rdparty/excanvas.js14
-rw-r--r--tools/qtestlib/chart/3rdparty/flotr.js2
-rw-r--r--tools/qtestlib/chart/3rdparty/prototype.js8
-rw-r--r--tools/qtestlib/chart/benchmark_template.html202
-rw-r--r--tools/qtestlib/chart/chart.pro16
-rw-r--r--tools/qtestlib/chart/chart.qrc9
-rw-r--r--tools/qtestlib/chart/chart_template.html110
-rw-r--r--tools/qtestlib/chart/database.cpp324
-rw-r--r--tools/qtestlib/chart/reportgenerator.cpp563
-rw-r--r--tools/qtestlib/qtestlib.pro2
-rw-r--r--tools/qvfb/qvfb.pro2
-rw-r--r--tools/qvfb/translations/translations.pro35
-rw-r--r--translations/assistant_pl.ts187
-rwxr-xr-xtranslations/check-ts.pl13
-rw-r--r--translations/designer_pl.ts86
-rw-r--r--translations/linguist_pl.ts24
-rw-r--r--translations/qt_de.ts46
-rw-r--r--translations/qt_help_pl.ts10
-rw-r--r--translations/qt_hu.ts24
-rw-r--r--translations/qt_pl.ts406
-rw-r--r--translations/translations.pri144
1022 files changed, 36758 insertions, 10132 deletions
diff --git a/.gitignore b/.gitignore
index fdb68435f3..4d5aa9b2ff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -114,6 +114,7 @@ tools/qtestlib/chart/chart*
tools/qtestlib/updater/updater*
tools/activeqt/testcon/testcon.tlb
translations/*.qm
+translations/*_untranslated.ts
qrc_*.cpp
# xemacs temporary files
diff --git a/bin/createpackage.pl b/bin/createpackage.pl
index 8b787cb2ee..984c1fdaae 100755
--- a/bin/createpackage.pl
+++ b/bin/createpackage.pl
@@ -300,7 +300,8 @@ if($stub) {
&& $templatepkg !~ m/_installer\.pkg$/i
&& !$onlyUnsigned) {
print("Auto-patching capabilities for self signed package.\n");
- system ("patch_capabilities $pkgoutput");
+ my $patch_capabilities = File::Spec->catfile(dirname($0), "patch_capabilities");
+ system ("$patch_capabilities $pkgoutput");
}
# Create SIS.
diff --git a/bin/syncqt b/bin/syncqt
index 11b1d7210a..1e553dc47a 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -42,7 +42,7 @@ my %modules = ( # path to module name map
"QtScript" => "$basedir/src/script",
"QtScriptTools" => "$basedir/src/scripttools",
"Qt3Support" => "$basedir/src/qt3support",
- "ActiveQt" => "$basedir/src/activeqt/container;$basedir/src/activeqt/control;$basedir/src/activeqt/shared",
+ "ActiveQt" => "$basedir/src/activeqt",
"QtTest" => "$basedir/src/testlib",
"QtHelp" => "$basedir/tools/assistant/lib",
"QtDesigner" => "$basedir/tools/designer/src/lib",
@@ -691,6 +691,7 @@ my @ignore_for_qt_begin_header_check = ( "qiconset.h", "qconfig.h", "qconfig-dis
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 = ();
+my %inject_headers = ( "$basedir/src/corelib/global" => ( "*qconfig.h" ) );
foreach (@modules_to_sync) {
#iteration info
@@ -800,8 +801,10 @@ foreach (@modules_to_sync) {
foreach (@subdirs) {
my $subdir = "$_";
my @headers = findFiles("$subdir", "^[-a-z0-9_]*\\.h\$" , 0);
+ push @headers, $inject_headers{$subdir} if (defined $inject_headers{$subdir});
foreach (@headers) {
my $header = "$_";
+ my $shadow = ($header =~ s/^\*//);
$header = 0 if("$header" =~ /^ui_.*.h/);
foreach (@ignore_headers) {
$header = 0 if("$header" eq "$_");
@@ -819,6 +822,7 @@ foreach (@modules_to_sync) {
}
my $iheader = $subdir . "/" . $header;
+ $iheader =~ s/^\Q$basedir\E/$out_basedir/ if ($shadow);
my @classes = $public_header ? classNames($iheader) : ();
if($showonly) {
print "$header [$lib]\n";
@@ -843,7 +847,7 @@ foreach (@modules_to_sync) {
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" .
+ " #warning \"$warning_msg\"\n" .
" #elif defined(_MSC_VER)\n" .
" #pragma message \"WARNING: $warning_msg\"\n" .
" #endif\n".
@@ -990,14 +994,12 @@ 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);
+ my @subdirs = ($modules{$lib});
foreach (@subdirs) {
my $subdir = "$_";
- opendir DIR, "$subdir";
+ opendir DIR, "$subdir" or die "Huh, directory ".$subdir." cannot be opened.";
while(my $t = readdir(DIR)) {
push @subdirs, "$subdir/$t" if(-d "$subdir/$t" && !($t eq ".") &&
!($t eq "..") && !($t eq ".obj") &&
diff --git a/config.tests/unix/avx/avx.cpp b/config.tests/unix/avx/avx.cpp
new file mode 100644
index 0000000000..65a0eb8fad
--- /dev/null
+++ b/config.tests/unix/avx/avx.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** 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 config.tests 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 <immintrin.h>
+
+int main(int, char**)
+{
+ volatile __m256d a = _mm256_setzero_pd();
+ volatile __m256d b = _mm256_set1_pd(42.42);
+ volatile __m256d result = _mm256_add_pd(a, b);
+ (void)result;
+ return 0;
+}
diff --git a/config.tests/unix/avx/avx.pro b/config.tests/unix/avx/avx.pro
new file mode 100644
index 0000000000..00a05500eb
--- /dev/null
+++ b/config.tests/unix/avx/avx.pro
@@ -0,0 +1,3 @@
+SOURCES = avx.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/icd/icd.cpp b/config.tests/unix/icd/icd.cpp
index 8b74fd6f83..19c171bba0 100644
--- a/config.tests/unix/icd/icd.cpp
+++ b/config.tests/unix/icd/icd.cpp
@@ -40,11 +40,7 @@
****************************************************************************/
#include <libicd-network-wlan-dev.h>
-#include <maemo_icd.h>
-#include <iapconf.h>
-#include <proxyconf.h>
#include <wlancond.h>
-#include <iapmonitor.h>
#include <icd/dbus_api.h>
int main(int, char **)
diff --git a/config.tests/unix/sse3/sse3.cpp b/config.tests/unix/sse3/sse3.cpp
new file mode 100644
index 0000000000..b159acf18c
--- /dev/null
+++ b/config.tests/unix/sse3/sse3.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** 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 config.tests 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 <pmmintrin.h>
+
+int main(int, char**)
+{
+ volatile __m128d a = _mm_set1_pd(6.28);
+ volatile __m128d b = _mm_set1_pd(3.14);
+ volatile __m128d result = _mm_addsub_pd(a, b);
+ result = _mm_movedup_pd(result);
+ return 0;
+}
diff --git a/config.tests/unix/sse3/sse3.pro b/config.tests/unix/sse3/sse3.pro
new file mode 100644
index 0000000000..009fea230a
--- /dev/null
+++ b/config.tests/unix/sse3/sse3.pro
@@ -0,0 +1,3 @@
+SOURCES = sse3.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/sse4_1/sse4_1.cpp b/config.tests/unix/sse4_1/sse4_1.cpp
new file mode 100644
index 0000000000..e9bec9e747
--- /dev/null
+++ b/config.tests/unix/sse4_1/sse4_1.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** 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 config.tests 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 <smmintrin.h>
+
+int main(int, char**)
+{
+ volatile __m128 a = _mm_setzero_ps();
+ _mm_ceil_ps(a);
+ volatile __m128i result = _mm_mullo_epi32(_mm_set1_epi32(42), _mm_set1_epi32(64));
+ (void)result;
+ return 0;
+}
diff --git a/config.tests/unix/sse4_1/sse4_1.pro b/config.tests/unix/sse4_1/sse4_1.pro
new file mode 100644
index 0000000000..c6c4746026
--- /dev/null
+++ b/config.tests/unix/sse4_1/sse4_1.pro
@@ -0,0 +1,3 @@
+SOURCES = sse4_1.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/sse4_2/sse4_2.cpp b/config.tests/unix/sse4_2/sse4_2.cpp
new file mode 100644
index 0000000000..005b2c5e07
--- /dev/null
+++ b/config.tests/unix/sse4_2/sse4_2.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** 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 config.tests 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 <smmintrin.h>
+
+int main(int, char**)
+{
+ volatile __m128i a = _mm_setzero_si128();
+ volatile __m128i b = _mm_set1_epi32(42);
+ volatile __m128i result = _mm_cmpestrm(a, 16, b, 16, 0);
+ (void)result;
+ return 0;
+}
diff --git a/config.tests/unix/sse4_2/sse4_2.pro b/config.tests/unix/sse4_2/sse4_2.pro
new file mode 100644
index 0000000000..cab171114d
--- /dev/null
+++ b/config.tests/unix/sse4_2/sse4_2.pro
@@ -0,0 +1,3 @@
+SOURCES = sse4_2.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/ssse3/ssse3.cpp b/config.tests/unix/ssse3/ssse3.cpp
new file mode 100644
index 0000000000..37fd479ca5
--- /dev/null
+++ b/config.tests/unix/ssse3/ssse3.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** 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 config.tests 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 <tmmintrin.h>
+
+int main(int, char**)
+{
+ volatile __m128i a = _mm_set1_epi32(42);
+ _mm_abs_epi8(a);
+ volatile __m128i result = _mm_sign_epi16(a, _mm_set1_epi32(64));
+ (void)result;
+ return 0;
+}
diff --git a/config.tests/unix/ssse3/ssse3.pro b/config.tests/unix/ssse3/ssse3.pro
new file mode 100644
index 0000000000..4864267c8f
--- /dev/null
+++ b/config.tests/unix/ssse3/ssse3.pro
@@ -0,0 +1,3 @@
+SOURCES = ssse3.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
diff --git a/configure b/configure
index 97f7fb28d7..52a36eb9f3 100755
--- a/configure
+++ b/configure
@@ -773,18 +773,23 @@ CFG_GLIB=auto
CFG_GSTREAMER=auto
CFG_QGTKSTYLE=auto
CFG_QS60STYLE=auto
-CFG_LARGEFILE=yes
+CFG_LARGEFILE=auto
CFG_OPENSSL=auto
CFG_PTMALLOC=no
CFG_STL=auto
CFG_PRECOMPILE=auto
-CFG_SEPARATE_DEBUG_INFO=auto
+CFG_SEPARATE_DEBUG_INFO=no
CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
CFG_REDUCE_EXPORTS=auto
CFG_MMX=auto
CFG_3DNOW=auto
CFG_SSE=auto
CFG_SSE2=auto
+CFG_SSE3=auto
+CFG_SSSE3=auto
+CFG_SSE4_1=auto
+CFG_SSE4_2=auto
+CFG_AVX=auto
CFG_REDUCE_RELOCATIONS=no
CFG_IPV6=auto
CFG_NAS=no
@@ -876,9 +881,9 @@ QT_LIBS_GLIB=
QT_CFLAGS_GSTREAMER=
QT_LIBS_GSTREAMER=
-# flags for icd (Maemo Internet Connection Daemon)
-QT_CFLAGS_ICD=
-QT_LIBS_ICD=
+# flags for libconnsettings0 (used for Maemo ICD bearer management plugin)
+QT_CFLAGS_CONNSETTINGS=
+QT_LIBS_CONNSETTINGS=
#-------------------------------------------------------------------------------
# check SQL drivers, mouse drivers and decorations available in this package
@@ -1758,6 +1763,41 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
+ sse3)
+ if [ "$VAL" = "no" ]; then
+ CFG_SSE3="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ ssse3)
+ if [ "$VAL" = "no" ]; then
+ CFG_SSSE3="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ sse4.1)
+ if [ "$VAL" = "no" ]; then
+ CFG_SSE4_1="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ sse4.2)
+ if [ "$VAL" = "no" ]; then
+ CFG_SSE4_2="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ avx)
+ if [ "$VAL" = "no" ]; then
+ CFG_AVX="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
iwmmxt)
CFG_IWMMXT="yes"
;;
@@ -2388,7 +2428,7 @@ fi
if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
echo
echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
- echo "By default, Qt is built in release mode with separate debug information, so"
+ echo "Qt can be built in release mode with separate debug information, so"
echo "-debug-and-release is not necessary anymore"
echo
fi
@@ -3058,6 +3098,8 @@ if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
esac
elif [ "$XPLATFORM_MINGW" = "yes" ]; then
[ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
+elif echo "$XPLATFORM" | grep symbian > /dev/null; then
+ CFG_ARCH=symbian
elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
CFG_ARCH=$CFG_HOST_ARCH
fi
@@ -3182,10 +3224,14 @@ fi
QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
TEST_COMPILER="$CXX"
+
[ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
-if [ -z "$TEST_COMPILER" ]; then
- echo "ERROR: Cannot set the compiler for the configuration tests"
- exit 1
+if [ "$XPLATFORM" != "symbian-sbsv2" ]; then
+ #for Symbian we don't need this checking
+ if [ -z "$TEST_COMPILER" ]; then
+ echo "ERROR: Cannot set the compiler for the configuration tests"
+ exit 1
+ fi
fi
if [ "$CFG_EMBEDDED" = "nacl" ]; then
@@ -3343,149 +3389,156 @@ fi
#prefix
if [ -z "$QT_INSTALL_PREFIX" ]; then
- if [ -d "$EPOCROOT" ]; then
+ if [ "$CFG_DEV" = "yes" ]; then
+ QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
+ elif [ "$PLATFORM_QWS" = "yes" ]; then
+ QT_INSTALL_PREFIX="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}"
+ if [ "$PLATFORM" != "$XPLATFORM" ]; then
+ QT_INSTALL_PREFIX="${QT_INSTALL_PREFIX}-${CFG_ARCH}"
+ fi
+ elif [ -d "$EPOCROOT" ]; then
case "$XPLATFORM" in *symbian*)
QT_INSTALL_PREFIX="$EPOCROOT/epoc32/"
QT_INSTALL_LIBS="$EPOCROOT/epoc32/release/armv5/lib/"
;;
esac
- fi
-
- if [ -z "$QT_INSTALL_PREFIX" ]; then # still empty
- if [ "$CFG_DEV" = "yes" ]; then
- QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
- elif [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
- if [ "$PLATFORM_QPA" = "yes" ]; then
- QT_INSTALL_PREFIX="/usr/local/Trolltech/QtLighthouse-${QT_VERSION}"
- else
- QT_INSTALL_PREFIX="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}"
- fi
- if [ "$PLATFORM" != "$XPLATFORM" ]; then
- QT_INSTALL_PREFIX="${QT_INSTALL_PREFIX}-${CFG_ARCH}"
- fi
- else
- QT_INSTALL_PREFIX="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION
- fi
+ else
+ QT_INSTALL_PREFIX="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION
fi
fi
QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
-#docs
-if [ -z "$QT_INSTALL_DOCS" ]; then #default
- if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
- if [ "$PLATFORM_MAC" = "yes" ]; then
- QT_INSTALL_DOCS="/Developer/Documentation/Qt"
+if echo $XPLATFORM | grep symbian > /dev/null; then
+ [ -z "$QT_HOST_PREFIX" ] && QT_HOST_PREFIX="$QT_INSTALL_PREFIX"
+ [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS=
+ [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS=
+ [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS=
+ [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS=
+ [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="\\\\resource\\\\qt$QT_LIBINFIX\\\\plugins"
+ [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="\\\\resource\\\\qt$QT_LIBINFIX\\\\imports"
+ [ -z "$QT_INSTALL_DATA" ] && QT_INSTALL_DATA=
+ [ -z "$QT_INSTALL_TRANSLATIONS" ] && QT_INSTALL_TRANSLATIONS="\\\\resource\\\\qt$QT_LIBINFIX\\\\translations"
+ [ -z "$QT_INSTALL_SETTINGS" ] && QT_INSTALL_SETTINGS=
+ [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES=
+ [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS=
+else
+ #docs
+ if [ -z "$QT_INSTALL_DOCS" ]; then #default
+ if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ QT_INSTALL_DOCS="/Developer/Documentation/Qt"
+ fi
fi
- fi
- [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
+ [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
-fi
-QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
+ fi
+ QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
-#headers
-if [ -z "$QT_INSTALL_HEADERS" ]; then #default
- if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
- if [ "$PLATFORM_MAC" = "yes" ]; then
- if [ "$CFG_FRAMEWORK" = "yes" ]; then
- QT_INSTALL_HEADERS=
+ #headers
+ if [ -z "$QT_INSTALL_HEADERS" ]; then #default
+ if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ if [ "$CFG_FRAMEWORK" = "yes" ]; then
+ QT_INSTALL_HEADERS=
+ fi
fi
fi
- fi
- [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
+ [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
-fi
-QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
+ fi
+ QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
-#libs
-if [ -z "$QT_INSTALL_LIBS" ]; then #default
- if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
- if [ "$PLATFORM_MAC" = "yes" ]; then
- if [ "$CFG_FRAMEWORK" = "yes" ]; then
- QT_INSTALL_LIBS="/Libraries/Frameworks"
+ #libs
+ if [ -z "$QT_INSTALL_LIBS" ]; then #default
+ if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ if [ "$CFG_FRAMEWORK" = "yes" ]; then
+ QT_INSTALL_LIBS="/Libraries/Frameworks"
+ fi
fi
fi
+ [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
fi
- [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
-fi
-QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
+ QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
-#bins
-if [ -z "$QT_INSTALL_BINS" ]; then #default
- if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
- if [ "$PLATFORM_MAC" = "yes" ]; then
- QT_INSTALL_BINS="/Developer/Applications/Qt"
+ #bins
+ if [ -z "$QT_INSTALL_BINS" ]; then #default
+ if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ QT_INSTALL_BINS="/Developer/Applications/Qt"
+ fi
fi
- fi
- [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
+ [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
-fi
-QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
+ fi
+ QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
-#plugins
-if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
- if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
- if [ "$PLATFORM_MAC" = "yes" ]; then
- QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
+ #plugins
+ if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
+ if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
+ fi
fi
+ [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
fi
- [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
-fi
-QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
+ QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
-#imports
-if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
- if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
- if [ "$PLATFORM_MAC" = "yes" ]; then
- QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
+ #imports
+ if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
+ if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
+ fi
fi
+ [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
fi
- [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
-fi
-QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
+ QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
-#data
-if [ -z "$QT_INSTALL_DATA" ]; then #default
- QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
-fi
-QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
+ #data
+ if [ -z "$QT_INSTALL_DATA" ]; then #default
+ QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
+ fi
+ QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
-#translations
-if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
- QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
-fi
-QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
+ #translations
+ if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
+ QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
+ fi
+ QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
-#settings
-if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
- if [ "$PLATFORM_MAC" = "yes" ]; then
- QT_INSTALL_SETTINGS=/Library/Preferences/Qt
- else
- QT_INSTALL_SETTINGS=/etc/xdg
+ #settings
+ if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ QT_INSTALL_SETTINGS=/Library/Preferences/Qt
+ else
+ QT_INSTALL_SETTINGS=/etc/xdg
+ fi
fi
-fi
-QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
+ QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
-#examples
-if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
- if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
- if [ "$PLATFORM_MAC" = "yes" ]; then
- QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
+ #examples
+ if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
+ if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
+ fi
fi
+ [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
fi
- [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
-fi
-QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
+ QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
-#demos
-if [ -z "$QT_INSTALL_DEMOS" ]; then #default
- if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
- if [ "$PLATFORM_MAC" = "yes" ]; then
- QT_INSTALL_DEMOS="/Developer/Examples/Qt/Demos"
+ #demos
+ if [ -z "$QT_INSTALL_DEMOS" ]; then #default
+ if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ QT_INSTALL_DEMOS="/Developer/Examples/Qt/Demos"
+ fi
fi
+ [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS="$QT_INSTALL_PREFIX/demos"
fi
- [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS="$QT_INSTALL_PREFIX/demos"
+ QT_INSTALL_DEMOS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DEMOS"`
fi
-QT_INSTALL_DEMOS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DEMOS"`
#-------------------------------------------------------------------------------
# help - interactive parts of the script _after_ this section please
@@ -3558,6 +3611,7 @@ Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir
[-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
[-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
[-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
+ [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx]
[-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
[-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
[-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
@@ -3749,6 +3803,11 @@ cat << EOF
-no-3dnow .......... Do not compile with use of 3DNOW instructions.
-no-sse ............ Do not compile with use of SSE instructions.
-no-sse2 ........... Do not compile with use of SSE2 instructions.
+ -no-sse3 ........... Do not compile with use of SSE3 instructions.
+ -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
+ -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
+ -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
+ -no-avx ............ Do not compile with use of AVX instructions.
-qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
-qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
@@ -3767,7 +3826,7 @@ Third Party Libraries:
-no-gif ............ Do not compile GIF reading support.
* -qt-gif ............ Compile GIF reading support.
- See also src/gui/image/qgifhandler.h
+ See also src/gui/image/qgifhandler_p.h
-no-libtiff ........ Do not compile TIFF support.
-qt-libtiff ........ Use the libtiff bundled with Qt.
@@ -4616,15 +4675,15 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
fi
mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
- for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
- if [ '!' -f "$conf" ]; then
- ln -s "$QCONFIG_H" "$conf"
- fi
- done
#mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
- rm -f mkspecs/default
- ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
+ rm -rf mkspecs/default
+ if echo "$XPLATFORM" | grep "symbian-sbsv2" > /dev/null ; then
+#Link is not supported for Symbian build system
+ cp -a mkspecs/`echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
+ else
+ ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
+ fi
# fix makefiles
for mkfile in GNUmakefile Makefile; do
EXTRA_LFLAGS=
@@ -4807,6 +4866,51 @@ if [ "${CFG_SSE2}" = "auto" ]; then
fi
fi
+# detect sse3 support
+if [ "${CFG_SSE3}" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
+ CFG_SSE3=yes
+ else
+ CFG_SSE3=no
+ fi
+fi
+
+# detect ssse3 support
+if [ "${CFG_SSSE3}" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
+ CFG_SSSE3=yes
+ else
+ CFG_SSSE3=no
+ fi
+fi
+
+# detect sse4.1 support
+if [ "${CFG_SSE4_1}" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse4_1 "sse4_1" $L_FLAGS $I_FLAGS $l_FLAGS "-msse4.1"; then
+ CFG_SSE4_1=yes
+ else
+ CFG_SSE4_1=no
+ fi
+fi
+
+# detect sse4.2 support
+if [ "${CFG_SSE4_2}" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse4_2 "sse4_2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse4.2"; then
+ CFG_SSE4_2=yes
+ else
+ CFG_SSE4_2=no
+ fi
+fi
+
+# detect avx support
+if [ "${CFG_AVX}" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
+ CFG_AVX=yes
+ else
+ CFG_AVX=no
+ fi
+fi
+
# check iWMMXt support
if [ "$CFG_IWMMXT" = "yes" ]; then
"$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
@@ -4854,6 +4958,10 @@ case "$XPLATFORM" in *symbian*)
QMakeVar set styles "windows s60" #overwrite previous default
CFG_LIBFREETYPE=no
+ if [ "$CFG_LARGEFILE" = auto ]; then
+ CFG_LARGEFILE=no
+ fi
+
if test -z "$EPOCROOT"; then
echo "Please export EPOCROOT. It should point to the sdk install dir"
exit 1
@@ -4878,15 +4986,24 @@ case "$XPLATFORM" in *symbian*)
)
# compile a simple main that uses printf
- if ! "$symbiantests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/symbian/simple "simple" $L_FLAGS $I_FLAGS $l_FLAGS
- then
- echo "Testing your compiler failed. Could not compile a simple application."
- echo "Fatal error; Rerun configure with -verbose to get more details."
- exit 1;
+ if ! echo $XPLATFORM | grep symbian-sbsv2 > /dev/null; then
+ # Raptor does not support configure tests.
+ if ! "$symbiantests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/symbian/simple "simple" $L_FLAGS $I_FLAGS $l_FLAGS
+ then
+ echo "Testing your compiler failed. Could not compile a simple application."
+ echo "Fatal error; Rerun configure with -verbose to get more details."
+ exit 1;
+ fi
fi
;;
esac
+if [ "$CFG_LARGEFILE" = "auto" ]; then
+ #Large files should be enabled for all Linux systems
+ CFG_LARGEFILE=yes
+fi
+
+
if [ "$CFG_S60" = "auto" ]; then
if echo "$XPLATFORM" | grep symbian > /dev/null; then
CFG_S60=yes
@@ -5202,8 +5319,11 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do
if [ "$CFG_SQL_sqlite" = "auto" ]; then # the default
case "$XPLATFORM" in
symbian*)
- # sqlite on symbian is typically not build in Qt but deployed as a pre-existing sis file.
- CFG_SQL_sqlite=no
+ # sqlite on symbian is typically not build in Qt but deployed as a pre-existing sis file and should be marked as driver.
+ # Configuration parameters should be set
+ CFG_SQL_sqlite=qt
+ QT_LFLAGS_SQLITE=-lsqlite3
+ QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
;;
esac
fi
@@ -5435,49 +5555,21 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "ye
# auto-detect icd support
if [ "$CFG_GLIB" = "yes" -a "$CFG_ICD" != "no" ]; then
- # ICD support has a cyclic dependency on Qt.
if [ -n "$PKG_CONFIG" ]; then
- QT_CFLAGS_ICD=`$PKG_CONFIG --cflags osso-ic conninet 2>/dev/null`
- QT_LIBS_ICD=`$PKG_CONFIG --libs osso-ic conninet 2>/dev/null`
- QT_CFLAGS_QTNETWORK=`$PKG_CONFIG --cflags QtNetwork 2>/dev/null`
- QT_LIBS_QTNETWORK=`$PKG_CONFIG --libs QtNetwork 2>/dev/null`
- else
- QT_CFLAGS_QTNETWORK=
- QT_LIBS_QTNETWORK=
+ QT_CFLAGS_CONNSETTINGS=`$PKG_CONFIG --cflags connsettings 2>/dev/null`
+ QT_LIBS_CONNSETTINGS=`$PKG_CONFIG --libs connsettings 2>/dev/null`
fi
- if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icd "ICD" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_ICD $QT_LIBS_ICD $QT_CFLAGS_QTNETWORK $QT_LIBS_QTNETWORK; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icd "ICD" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_CONNSETTINGS $QT_LIBS_CONNSETTINGS; then
[ "$CFG_ICD" = "auto" ] && CFG_ICD=yes
- # remove system Qt includes and libraries
- QT_CFLAGS_ICD_TRIMMED=
- for i in $QT_CFLAGS_ICD; do
- case $i in
- *qt*)
- ;;
- *)
- QT_CFLAGS_ICD_TRIMMED="$QT_CFLAGS_ICD_TRIMMED $i"
- ;;
- esac
- done
- QT_LIBS_ICD_TRIMMED=
- for i in $QT_LIBS_ICD; do
- case $i in
- *qt*|-lQt*)
- ;;
- *)
- QT_LIBS_ICD_TRIMMED="$QT_LIBS_ICD_TRIMMED $i"
- ;;
- esac
- done
-
- QMakeVar set QT_CFLAGS_ICD "$QT_CFLAGS_ICD_TRIMMED"
- QMakeVar set QT_LIBS_ICD "$QT_LIBS_ICD_TRIMMED"
+ QMakeVar set QT_CFLAGS_CONNSETTINGS "$QT_CFLAGS_CONNSETTINGS"
+ QMakeVar set QT_LIBS_CONNSETTINGS "$QT_LIBS_CONNSETTINGS"
else
if [ "$CFG_ICD" = "auto" ]; then
CFG_ICD=no
elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
# CFG_ICD is "yes"
- echo "The ICD Bearer Management plugin cannot be enabled because osso-ic or conninet was not found."
+ echo "The ICD Bearer Management plugin cannot be enabled because connsettings was not found."
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
@@ -6266,7 +6358,10 @@ fi
# find if the platform supports IPv6
if [ "$CFG_IPV6" != "no" ]; then
- if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipv6 "IPv6" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
+ if [ "$XPLATFORM" = "symbian-sbsv2" ]; then
+ #IPV6 should always be enabled for Symbian release
+ CFG_IPV6=yes
+ elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipv6 "IPv6" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
CFG_IPV6=yes
else
if [ "$CFG_IPV6" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
@@ -6379,7 +6474,7 @@ if [ "$CFG_GETIFADDRS" != "no" ]; then
fi
# detect OpenSSL
-if [ "$CFG_OPENSSL" != "no" ]; then
+if [ "$CFG_OPENSSL" != "no" ] && [ "$XPLATFORM" != "symbian-sbsv2" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/openssl "OpenSSL" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
if [ "$CFG_OPENSSL" = "auto" ]; then
CFG_OPENSSL=yes
@@ -6395,6 +6490,11 @@ if [ "$CFG_OPENSSL" != "no" ]; then
CFG_OPENSSL=no
fi
fi
+else
+ if [ "$CFG_OPENSSL" = "auto" ] && [ "$XPLATFORM" = "symbian-sbsv2" ]; then
+ #OpenSSl should be enabled for Symbian release
+ CFG_OPENSSL=yes
+ fi
fi
# detect OpenVG support
@@ -6450,12 +6550,15 @@ if [ "$CFG_PTMALLOC" != "no" ]; then
QMakeVar add QMAKE_LFLAGS "$outpath/lib/libptmalloc3.a"
fi
-if [ "$CFG_ALSA" = "auto" ]; then
+if [ "$CFG_ALSA" = "auto" ] && [ "$XPLATFORM" != "symbian-sbsv2" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
CFG_ALSA=yes
else
CFG_ALSA=no
fi
+elif [ "$XPLATFORM" = "symbian-sbsv2" ]; then
+ # Disabled for Symbian release
+ CFG_ALSA=no
fi
if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
@@ -6475,7 +6578,9 @@ fi
if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
if echo "$XPLATFORM" | grep symbian > /dev/null 2>&1; then
- "$symbiantests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/symbian/audio "audio" $L_FLAGS $I_FLAGS $l_FLAGS
+ if "$symbiantests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/symbian/audio "audio" $L_FLAGS $I_FLAGS $l_FLAGS ; then
+ CFG_AUDIO_BACKEND=yes
+ fi
else
CFG_AUDIO_BACKEND=yes
fi
@@ -6484,6 +6589,9 @@ fi
if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
echo "Warning: largefile support cannot be disabled for win32."
CFG_LARGEFILE="yes"
+elif [ "$CFG_LARGEFILE" != "no" ] && echo "$XPLATFORM" | grep "symbian" > /dev/null; then
+ echo "Warning: largefile support cannot be enabled for symbian."
+ CFG_LARGEFILE="no"
fi
#-------------------------------------------------------------------------------
@@ -6782,6 +6890,11 @@ fi
[ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
[ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
[ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
+[ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
+[ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
+[ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
+[ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
+[ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
[ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
[ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
[ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
@@ -6857,6 +6970,7 @@ elif [ "$CFG_TIFF" = "yes" ]; then
fi
if [ "$CFG_LIBFREETYPE" = "no" ]; then
QT_CONFIG="$QT_CONFIG no-freetype"
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
elif [ "$CFG_LIBFREETYPE" = "system" ]; then
QT_CONFIG="$QT_CONFIG system-freetype"
else
@@ -6888,9 +7002,9 @@ if [ "$CFG_S60" = "yes" ]; then
fi
if [ "$CFG_SYMBIAN_DEFFILES" = "yes" ]; then
- QMAKE_CONFIG="$QMAKE_CONFIG def_files"
+ QTCONFIG_CONFIG="$QTCONFIG_CONFIG def_files"
else
- QMAKE_CONFIG="$QMAKE_CONFIG def_files_disabled"
+ QTCONFIG_CONFIG="$QTCONFIG_CONFIG def_files_disabled"
fi
[ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
@@ -7001,6 +7115,8 @@ fi
# turn off exceptions for the compilers that support it
if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
+elif [ "$XPLATFORM" != "$PLATFORM" ]; then
+ COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
else
COMPILER=`echo $PLATFORM | cut -f 2- -d-`
fi
@@ -7155,6 +7271,13 @@ EOF
canBuildWebKit="no"
canBuildQtConcurrent="no"
;;
+ symbian/*-gcce)
+ canBuildWebKit="no"
+ canBuildQtConcurrent="no"
+ ;;
+ symbian/*-armcc)
+ canBuildQtConcurrent="no"
+ ;;
esac
if [ "$CFG_GUI" = "no" ]; then
@@ -7475,9 +7598,17 @@ rm -f .options
BUILD_OPTIONS="$BUILD_CONFIG $BUILD_OPTIONS"
# extract the operating system from the XPLATFORM
TARGET_OPERATING_SYSTEM=`echo $XPLATFORM | cut -f 2- -d/ | cut -f -1 -d-`
+case "$XPLATFORM" in
+symbian*)
+ QT_BUILD_KEY_SYSTEM_PART="Symbian"
+ ;;
+*)
+ QT_BUILD_KEY_SYSTEM_PART="$CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER"
+ ;;
+esac
# when cross-compiling, don't include build-host information (build key is target specific)
-QT_BUILD_KEY="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
+QT_BUILD_KEY="$CFG_USER_BUILD_KEY $QT_BUILD_KEY_SYSTEM_PART $BUILD_OPTIONS"
if [ -n "$QT_NAMESPACE" ]; then
QT_BUILD_KEY="$QT_BUILD_KEY $QT_NAMESPACE"
fi
@@ -7869,12 +8000,14 @@ else
mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
chmod -w "$outpath/src/corelib/global/qconfig.h"
for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
- if [ '!' -f "$conf" ]; then
+ if echo "$XPLATFORM" | grep "symbian-sbsv2" > /dev/null 2>&1 ; then
+ [ -e "$conf" ] && rm -rf "$conf"
+ cp -a "$outpath/src/corelib/global/qconfig.h" "$conf"
+ elif [ '!' -f "$conf" ]; then
ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
fi
done
fi
-
#-------------------------------------------------------------------------------
# save configuration into qconfig.pri
#-------------------------------------------------------------------------------
@@ -7935,6 +8068,9 @@ QT_LIBINFIX = $QT_LIBINFIX
QT_NAMESPACE = $QT_NAMESPACE
QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
+#modules
+for(mod,\$\$list(\$\$files(\$\$[QMAKE_MKSPECS]/modules/qt_*.pri))):include(\$\$mod)
+
EOF
if [ "$CFG_RPATH" = "yes" ]; then
echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
@@ -7944,6 +8080,10 @@ if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
fi
+if echo "$XPLATFORM" | grep "symbian-sbsv2" > /dev/null 2>&1; then
+ echo "#Qt for symbian FPU settings" >> "$QTCONFIG.tmp"
+ echo "MMP_RULES += \"ARMFPU softvfp\"" >> "$QTCONFIG.tmp"
+fi
# replace qconfig.pri if it differs from the newly created temp file
if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
rm -f "$QTCONFIG.tmp"
@@ -7978,7 +8118,7 @@ EOF
# Ensure we can link to uninistalled libraries
if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
- echo "QMAKE_LFLAGS += -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib" >> "$CACHEFILE.tmp"
+ echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$CACHEFILE.tmp"
fi
if [ -n "$QT_CFLAGS_PSQL" ]; then
echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$CACHEFILE.tmp"
@@ -8190,7 +8330,9 @@ echo "Support for S60 ........ $CFG_S60"
echo "Symbian DEF files ...... $CFG_SYMBIAN_DEFFILES"
echo "STL support ............ $CFG_STL"
echo "PCH support ............ $CFG_PRECOMPILE"
-echo "MMX/3DNOW/SSE/SSE2...... ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}"
+echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
+echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
+echo "AVX..................... ${CFG_AVX}"
if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
echo "iWMMXt support ......... ${CFG_IWMMXT}"
echo "NEON support ........... ${CFG_NEON}"
@@ -8517,7 +8659,9 @@ for file in .projects .projects.3; do
*winmain/winmain.pro)
[ "$XPLATFORM_MINGW" = "yes" ] || continue
SPEC=$XQMAKESPEC ;;
- *s60main/s60main.pro) continue ;;
+ *s60main/s60main.pro) if [ -z "`echo "$XPLATFORM" | grep "symbian" >/dev/null`" ]; then
+ continue
+ fi;;
*examples/activeqt/*) continue ;;
*/qmake/qmake.pro) continue ;;
*tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
diff --git a/configure.exe b/configure.exe
index 6817331c56..6dfd14e48e 100755
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/demos/declarative/calculator/Core/calculator.js b/demos/declarative/calculator/Core/calculator.js
index c80c42f83d..16cc309c13 100644
--- a/demos/declarative/calculator/Core/calculator.js
+++ b/demos/declarative/calculator/Core/calculator.js
@@ -83,9 +83,9 @@ function doOperation(op) {
display.text ="0"
}
- if (op == rotateLeft)
- main.state = "orientation " + Orientation.Landscape
if (op == rotateRight)
+ main.state = "orientation " + Orientation.Landscape
+ if (op == rotateLeft)
main.state = ''
}
diff --git a/demos/declarative/calculator/calculator.qml b/demos/declarative/calculator/calculator.qml
index 63b6c55447..288455b418 100644
--- a/demos/declarative/calculator/calculator.qml
+++ b/demos/declarative/calculator/calculator.qml
@@ -85,7 +85,7 @@ Rectangle {
Button {
id: rotateButton
- width: column.w; height: column.h; color: 'purple'; operation: rotateLeft
+ width: column.w; height: column.h; color: 'purple'; operation: rotateRight
}
Button { width: column.w; height: column.h; color: 'purple'; operation: leftArrow }
Button { width: column.w; height: column.h; color: 'purple'; operation: "C" }
@@ -134,18 +134,18 @@ Rectangle {
states: [
State {
name: "orientation " + Orientation.Landscape
- PropertyChanges { target: main; rotation: -90; width: window.height; height: window.width }
- PropertyChanges { target: rotateButton; operation: rotateRight }
+ PropertyChanges { target: main; rotation: 90; width: window.height; height: window.width }
+ PropertyChanges { target: rotateButton; operation: rotateLeft }
},
State {
name: "orientation " + Orientation.PortraitInverted
- PropertyChanges { target: main; rotation: -180; }
- PropertyChanges { target: rotateButton; operation: rotateLeft }
+ PropertyChanges { target: main; rotation: 180; }
+ PropertyChanges { target: rotateButton; operation: rotateRight }
},
State {
name: "orientation " + Orientation.LandscapeInverted
- PropertyChanges { target: main; rotation: -270; width: window.height; height: window.width }
- PropertyChanges { target: rotateButton; operation: rotateRight }
+ PropertyChanges { target: main; rotation: 270; width: window.height; height: window.width }
+ PropertyChanges { target: rotateButton; operation: rotateLeft }
}
]
diff --git a/demos/declarative/flickr/flickr.qml b/demos/declarative/flickr/flickr.qml
index 48db4765cb..152f9f9df4 100644
--- a/demos/declarative/flickr/flickr.qml
+++ b/demos/declarative/flickr/flickr.qml
@@ -57,21 +57,20 @@ Item {
Item {
id: views
- x: 2; width: parent.width - 4
+ width: parent.width
anchors.top: titleBar.bottom; anchors.bottom: toolBar.top
- Mobile.GridDelegate { id: gridDelegate }
GridView {
- x: (width/4-79)/2; y: x
- id: photoGridView; model: rssModel; delegate: gridDelegate; cacheBuffer: 100
- cellWidth: (parent.width-2)/4; cellHeight: cellWidth; width: parent.width; height: parent.height - 1; z: 6
+ id: photoGridView; model: rssModel; delegate: Mobile.GridDelegate {}
+ cacheBuffer: 100
+ cellWidth: (parent.width-2)/4; cellHeight: cellWidth; width: parent.width; height: parent.height
}
- Mobile.ListDelegate { id: listDelegate }
ListView {
- id: photoListView; model: rssModel; delegate: listDelegate; z: 6
+ id: photoListView; model: rssModel; delegate: Mobile.ListDelegate { }
width: parent.width; height: parent.height; x: -(parent.width * 1.5); cacheBuffer: 100;
}
+
states: State {
name: "ListView"; when: screen.inListView == true
PropertyChanges { target: photoListView; x: 0 }
@@ -81,13 +80,16 @@ Item {
transitions: Transition {
NumberAnimation { properties: "x"; duration: 500; easing.type: Easing.InOutQuad }
}
+
+ Mobile.ImageDetails { id: imageDetails; width: parent.width; anchors.left: views.right; height: parent.height }
+
+ Item { id: foreground; anchors.fill: parent }
}
- Mobile.ImageDetails { id: imageDetails; width: parent.width; anchors.left: views.right; height: parent.height; z:1 }
- Mobile.TitleBar { id: titleBar; z: 5; width: parent.width; height: 40; opacity: 0.9 }
+ Mobile.TitleBar { id: titleBar; width: parent.width; height: 40; opacity: 0.9 }
Mobile.ToolBar {
- id: toolBar; z: 5
+ id: toolBar
height: 40; anchors.bottom: parent.bottom; width: parent.width; opacity: 0.9
button1Label: "Update"; button2Label: "View mode"
onButton1Clicked: rssModel.reload()
diff --git a/demos/declarative/flickr/mobile/GridDelegate.qml b/demos/declarative/flickr/mobile/GridDelegate.qml
index cbb00a281b..c368e958c5 100644
--- a/demos/declarative/flickr/mobile/GridDelegate.qml
+++ b/demos/declarative/flickr/mobile/GridDelegate.qml
@@ -39,75 +39,73 @@
**
****************************************************************************/
- import Qt 4.7
+import Qt 4.7
- Component {
- id: photoDelegate
- Item {
- id: wrapper; width: 79; height: 79
+Item {
+ id: wrapper; width: GridView.view.cellWidth; height: GridView.view.cellHeight
- function photoClicked() {
- imageDetails.photoTitle = title;
- imageDetails.photoTags = tags;
- imageDetails.photoWidth = photoWidth;
- imageDetails.photoHeight = photoHeight;
- imageDetails.photoType = photoType;
- imageDetails.photoAuthor = photoAuthor;
- imageDetails.photoDate = photoDate;
- imageDetails.photoUrl = url;
- imageDetails.rating = 0;
- scaleMe.state = "Details";
- }
+ function photoClicked() {
+ imageDetails.photoTitle = title;
+ imageDetails.photoTags = tags;
+ imageDetails.photoWidth = photoWidth;
+ imageDetails.photoHeight = photoHeight;
+ imageDetails.photoType = photoType;
+ imageDetails.photoAuthor = photoAuthor;
+ imageDetails.photoDate = photoDate;
+ imageDetails.photoUrl = url;
+ imageDetails.rating = 0;
+ scaleMe.state = "Details";
+ }
- Item {
- anchors.centerIn: parent
- scale: 0.0
- Behavior on scale { NumberAnimation { easing.type: Easing.InOutQuad} }
- id: scaleMe
+ Item {
+ anchors.centerIn: parent
+ scale: 0.0
+ Behavior on scale { NumberAnimation { easing.type: Easing.InOutQuad} }
+ id: scaleMe
- Rectangle { height: 79; width: 79; id: blackRect; anchors.centerIn: parent; color: "black"; smooth: true }
- Rectangle {
- id: whiteRect; width: 77; height: 77; anchors.centerIn: parent; color: "#dddddd"; smooth: true
- Image { id: thumb; source: imagePath; x: 1; y: 1; smooth: true}
- Image { source: "images/gloss.png" }
- }
+ Item {
+ width: 77; height: 77; anchors.centerIn: parent
+ Rectangle {
+ id: whiteRect; width: 77; height: 77; color: "#dddddd"; smooth: true
+ Image { id: thumb; source: imagePath; x: 1; y: 1; smooth: true }
+ Image { source: "images/gloss.png" }
+ }
+ }
- Connections {
- target: toolBar
- onButton2Clicked: if (scaleMe.state == 'Details' ) scaleMe.state = 'Show'
- }
+ Connections {
+ target: toolBar
+ onButton2Clicked: if (scaleMe.state == 'Details' ) scaleMe.state = 'Show'
+ }
+
+ states: [
+ State {
+ name: "Show"; when: thumb.status == Image.Ready
+ PropertyChanges { target: scaleMe; scale: 1 }
+ },
+ State {
+ name: "Details"
+ PropertyChanges { target: scaleMe; scale: 1 }
+ ParentChange { target: whiteRect; x: 10; y: 20; parent: imageDetails.frontContainer }
+ PropertyChanges { target: background; state: "DetailedView" }
+ }
+ ]
+ transitions: [
+ Transition {
+ from: "Show"; to: "Details"
+ ParentAnimation {
+ via: foreground
+ NumberAnimation { properties: "x,y"; duration: 500; easing.type: Easing.InOutQuad }
+ }
+ },
+ Transition {
+ from: "Details"; to: "Show"
+ ParentAnimation {
+ via: foreground
+ NumberAnimation { properties: "x,y"; duration: 500; easing.type: Easing.InOutQuad }
+ }
+ }
+ ]
+ }
+ MouseArea { anchors.fill: wrapper; onClicked: photoClicked() }
+}
- states: [
- State {
- name: "Show"; when: thumb.status == Image.Ready
- PropertyChanges { target: scaleMe; scale: 1 }
- },
- State {
- name: "Details"
- PropertyChanges { target: scaleMe; scale: 1 }
- ParentChange { target: wrapper; parent: imageDetails.frontContainer }
- PropertyChanges { target: wrapper; x: 20; y: 60; z: 1000 }
- PropertyChanges { target: background; state: "DetailedView" }
- }
- ]
- transitions: [
- Transition {
- from: "Show"; to: "Details"
- ParentAnimation {
- NumberAnimation { properties: "x,y"; duration: 500; easing.type: Easing.InOutQuad }
- }
- },
- Transition {
- from: "Details"; to: "Show"
- SequentialAnimation {
- ParentAnimation {
- NumberAnimation { properties: "x,y"; duration: 500; easing.type: Easing.InOutQuad }
- }
- PropertyAction { targets: wrapper; properties: "z" }
- }
- }
- ]
- }
- MouseArea { anchors.fill: wrapper; onClicked: { photoClicked() } }
- }
- }
diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml
index b1a73596a9..ff902ce903 100644
--- a/demos/declarative/flickr/mobile/ImageDetails.qml
+++ b/demos/declarative/flickr/mobile/ImageDetails.qml
@@ -45,7 +45,7 @@ import "../common" as Common
Flipable {
id: container
- property variant frontContainer: containerFront
+ property alias frontContainer: containerFront
property string photoTitle: ""
property string photoTags: ""
property int photoWidth
@@ -76,17 +76,17 @@ Flipable {
Column {
spacing: 10
anchors {
- left: parent.left; leftMargin: 20
- right: parent.right; rightMargin: 20
- top: parent.top; topMargin: 180
+ left: parent.left; leftMargin: 10
+ right: parent.right; rightMargin: 10
+ top: parent.top; topMargin: 120
}
- Text { font.bold: true; color: "white"; elide: Text.ElideRight; text: container.photoTitle }
- Text { color: "white"; elide: Text.ElideRight; text: "<b>Size:</b> " + container.photoWidth + 'x' + container.photoHeight }
- Text { color: "white"; elide: Text.ElideRight; text: "<b>Type:</b> " + container.photoType }
- Text { color: "white"; elide: Text.ElideRight; text: "<b>Author:</b> " + container.photoAuthor }
- Text { color: "white"; elide: Text.ElideRight; text: "<b>Published:</b> " + container.photoDate }
- Text { color: "white"; elide: Text.ElideRight; text: container.photoTags == "" ? "" : "<b>Tags:</b> " }
- Text { color: "white"; elide: Text.ElideRight; text: container.photoTags }
+ Text { font.bold: true; color: "white"; elide: Text.ElideRight; text: container.photoTitle; width: parent.width }
+ Text { color: "white"; elide: Text.ElideRight; text: "Size: " + container.photoWidth + 'x' + container.photoHeight; width: parent.width }
+ Text { color: "white"; elide: Text.ElideRight; text: "Type: " + container.photoType; width: parent.width }
+ Text { color: "white"; elide: Text.ElideRight; text: "Author: " + container.photoAuthor; width: parent.width }
+ Text { color: "white"; elide: Text.ElideRight; text: "Published: " + container.photoDate; width: parent.width }
+ Text { color: "white"; elide: Text.ElideRight; text: container.photoTags == "" ? "" : "Tags: "; width: parent.width }
+ Text { color: "white"; elide: Text.ElideRight; text: container.photoTags; width: parent.width }
}
}
diff --git a/demos/declarative/photoviewer/PhotoViewerCore/Button.qml b/demos/declarative/photoviewer/PhotoViewerCore/Button.qml
index a60d5ca9dc..47b90c86ff 100644
--- a/demos/declarative/photoviewer/PhotoViewerCore/Button.qml
+++ b/demos/declarative/photoviewer/PhotoViewerCore/Button.qml
@@ -45,7 +45,7 @@ Item {
id: container
property alias label: labelText.text
- property string tint: ""
+ property color tint: "transparent"
signal clicked
width: labelText.width + 70 ; height: labelText.height + 18
diff --git a/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml b/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml
index be7dfa430e..decc0fe3a3 100644
--- a/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml
+++ b/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml
@@ -81,6 +81,6 @@ Item {
MouseArea {
anchors { fill: parent; leftMargin: -20; topMargin: -20; rightMargin: -20; bottomMargin: -20 }
- onClicked: { textInput.forceFocus(); textInput.openSoftwareInputPanel(); }
+ onClicked: { textInput.forceActiveFocus(); textInput.openSoftwareInputPanel(); }
}
}
diff --git a/demos/declarative/samegame/SamegameCore/samegame.js b/demos/declarative/samegame/SamegameCore/samegame.js
index 6e1b24dd80..aa1b359815 100755
--- a/demos/declarative/samegame/SamegameCore/samegame.js
+++ b/demos/declarative/samegame/SamegameCore/samegame.js
@@ -110,7 +110,7 @@ function shuffleDown()
}else{
if(fallDist > 0){
var obj = board[index(column,row)];
- obj.y += fallDist * gameCanvas.blockSize;
+ obj.y = (row+fallDist) * gameCanvas.blockSize;
board[index(column,row+fallDist)] = obj;
board[index(column,row)] = null;
}
@@ -128,7 +128,7 @@ function shuffleDown()
obj = board[index(column,row)];
if(obj == null)
continue;
- obj.x -= fallDist * gameCanvas.blockSize;
+ obj.x = (column-fallDist) * gameCanvas.blockSize;
board[index(column-fallDist,row)] = obj;
board[index(column,row)] = null;
}
diff --git a/demos/declarative/snake/content/Link.qml b/demos/declarative/snake/content/Link.qml
index f4d7165b43..9aa6006d89 100644
--- a/demos/declarative/snake/content/Link.qml
+++ b/demos/declarative/snake/content/Link.qml
@@ -73,14 +73,12 @@ 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/twitter/TwitterCore/Button.qml b/demos/declarative/twitter/TwitterCore/Button.qml
index 9c90c2c52f..d326c643a2 100644
--- a/demos/declarative/twitter/TwitterCore/Button.qml
+++ b/demos/declarative/twitter/TwitterCore/Button.qml
@@ -80,7 +80,7 @@ Item {
},
State {
name: "Focused"
- when: container.focus == true
+ when: container.activeFocus == true
PropertyChanges { target: btnText; color: "#FFFFFF" }
}
]
diff --git a/demos/declarative/webbrowser/content/UrlInput.qml b/demos/declarative/webbrowser/content/UrlInput.qml
index 9992456be4..4f49821b1b 100644
--- a/demos/declarative/webbrowser/content/UrlInput.qml
+++ b/demos/declarative/webbrowser/content/UrlInput.qml
@@ -69,7 +69,7 @@ Item {
TextInput {
id: urlText
horizontalAlignment: TextEdit.AlignLeft
- font.pixelSize: 14; focusOnPress: true
+ font.pixelSize: 14;
onTextChanged: container.urlChanged()
diff --git a/demos/embedded/anomaly/anomaly.pro b/demos/embedded/anomaly/anomaly.pro
index 584e5cd0a3..a786b46017 100644
--- a/demos/embedded/anomaly/anomaly.pro
+++ b/demos/embedded/anomaly/anomaly.pro
@@ -26,8 +26,6 @@ RESOURCES += src/anomaly.qrc
symbian {
TARGET.UID3 = 0xA000CF71
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
- LIBS += -lesock -lcommdb -linsock # For IAP selection
TARGET.CAPABILITY = NetworkServices
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
}
diff --git a/demos/embedded/anomaly/src/BrowserView.cpp b/demos/embedded/anomaly/src/BrowserView.cpp
index a6e6f7a659..73d0b70ce7 100644
--- a/demos/embedded/anomaly/src/BrowserView.cpp
+++ b/demos/embedded/anomaly/src/BrowserView.cpp
@@ -51,10 +51,6 @@
#include "webview.h"
#include "ZoomStrip.h"
-#if defined (Q_OS_SYMBIAN)
-#include "sym_iap_util.h"
-#endif
-
BrowserView::BrowserView(QWidget *parent)
: QWidget(parent)
, m_titleBar(0)
@@ -71,6 +67,26 @@ BrowserView::BrowserView(QWidget *parent)
m_zoomLevels << 100;
m_zoomLevels << 110 << 120 << 133 << 150 << 170 << 200 << 240 << 300;
+ QNetworkConfigurationManager manager;
+ if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) {
+ // Get saved network configuration
+ QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ settings.beginGroup(QLatin1String("QtNetwork"));
+ const QString id =
+ settings.value(QLatin1String("DefaultNetworkConfiguration")).toString();
+ settings.endGroup();
+
+ // If the saved network configuration is not currently discovered use the system
+ // default
+ QNetworkConfiguration config = manager.configurationFromIdentifier(id);
+ if ((config.state() & QNetworkConfiguration::Discovered) !=
+ QNetworkConfiguration::Discovered) {
+ config = manager.defaultConfiguration();
+ }
+
+ m_webView->page()->networkAccessManager()->setConfiguration(config);
+ }
+
QTimer::singleShot(0, this, SLOT(initialize()));
}
@@ -100,9 +116,6 @@ void BrowserView::initialize()
m_webView->setHtml("about:blank");
m_webView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
m_webView->setFocus();
-#ifdef Q_OS_SYMBIAN
- QTimer::singleShot(0, this, SLOT(setDefaultIap()));
-#endif
}
void BrowserView::start()
@@ -173,12 +186,6 @@ void BrowserView::resizeEvent(QResizeEvent *event)
int zh = m_zoomStrip->sizeHint().height();
m_zoomStrip->move(width() - zw, (height() - zh) / 2);
}
-#ifdef Q_OS_SYMBIAN
-void BrowserView::setDefaultIap()
-{
- qt_SetDefaultIap();
-}
-#endif
void BrowserView::navigate(const QUrl &url)
{
diff --git a/demos/embedded/anomaly/src/BrowserView.h b/demos/embedded/anomaly/src/BrowserView.h
index 5ab1dd71e2..8981582910 100644
--- a/demos/embedded/anomaly/src/BrowserView.h
+++ b/demos/embedded/anomaly/src/BrowserView.h
@@ -63,9 +63,6 @@ public slots:
void navigate(const QUrl &url);
void zoomIn();
void zoomOut();
-#ifdef Q_OS_SYMBIAN
- void setDefaultIap();
-#endif
private slots:
void initialize();
diff --git a/demos/embedded/desktopservices/contenttab.cpp b/demos/embedded/desktopservices/contenttab.cpp
index fa9c586ac1..8b344ceb9b 100644
--- a/demos/embedded/desktopservices/contenttab.cpp
+++ b/demos/embedded/desktopservices/contenttab.cpp
@@ -125,7 +125,7 @@ void ContentTab::keyPressEvent(QKeyEvent *event)
void ContentTab::handleErrorInOpen(QListWidgetItem *item)
{
Q_UNUSED(item);
- QMessageBox::warning(this, tr("Operation Failed"), tr("Unkown error!"), QMessageBox::Close);
+ QMessageBox::warning(this, tr("Operation Failed"), tr("Unknown error!"), QMessageBox::Close);
}
// NEW SLOTS
diff --git a/demos/embedded/desktopservices/desktopwidget.cpp b/demos/embedded/desktopservices/desktopwidget.cpp
index 39a56a4577..ff3cb0927b 100644
--- a/demos/embedded/desktopservices/desktopwidget.cpp
+++ b/demos/embedded/desktopservices/desktopwidget.cpp
@@ -73,7 +73,7 @@ DesktopWidget::DesktopWidget(QWidget *parent) : QWidget(parent)
// Links
LinkTab* othersTab = new LinkTab(tabWidget);;
- // Given icon file will be overriden by LinkTab
+ // Given icon file will be overridden by LinkTab
othersTab->init(QDesktopServices::PicturesLocation, "", "");
tabWidget->addTab(othersTab, tr("Links"));
diff --git a/demos/embedded/fluidlauncher/fluidlauncher.cpp b/demos/embedded/fluidlauncher/fluidlauncher.cpp
index 1fb2376389..19eb8d2d37 100644
--- a/demos/embedded/fluidlauncher/fluidlauncher.cpp
+++ b/demos/embedded/fluidlauncher/fluidlauncher.cpp
@@ -154,7 +154,7 @@ void FluidLauncher::parseDemos(QXmlStreamReader& reader)
DemoApplication* newDemo = new DemoApplication(
filename.toString(),
- name.isEmpty() ? "Unamed Demo" : name.toString(),
+ name.isEmpty() ? "Unnamed Demo" : name.toString(),
image.toString(),
args.toString().split(" "));
demoList.append(newDemo);
diff --git a/demos/embedded/fluidlauncher/pictureflow.cpp b/demos/embedded/fluidlauncher/pictureflow.cpp
index 8435c8f635..d6062693e1 100644
--- a/demos/embedded/fluidlauncher/pictureflow.cpp
+++ b/demos/embedded/fluidlauncher/pictureflow.cpp
@@ -603,7 +603,7 @@ static QImage prepareSurface(QImage img, int w, int h)
Qt::TransformationMode mode = Qt::SmoothTransformation;
img = img.scaled(w, h, Qt::IgnoreAspectRatio, mode);
- // slightly larger, to accomodate for the reflection
+ // slightly larger, to accommodate for the reflection
int hs = h * 2;
int hofs = h / 3;
diff --git a/demos/embedded/lightmaps/lightmaps.cpp b/demos/embedded/lightmaps/lightmaps.cpp
index c76aed0fb3..2eb17336ac 100644
--- a/demos/embedded/lightmaps/lightmaps.cpp
+++ b/demos/embedded/lightmaps/lightmaps.cpp
@@ -43,10 +43,6 @@
#include <QtGui>
#include <QtNetwork>
-#if defined (Q_OS_SYMBIAN)
-#include "sym_iap_util.h"
-#endif
-
#include <math.h>
#ifndef M_PI
@@ -490,6 +486,7 @@ class MapZoom : public QMainWindow
private:
LightMaps *map;
+ QNetworkSession *networkSession;
public:
MapZoom(): QMainWindow(0) {
@@ -526,15 +523,49 @@ public:
menu->addAction(osmAction);
#endif
- QTimer::singleShot(0, this, SLOT(delayedInit()));
+ QNetworkConfigurationManager manager;
+ if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) {
+ // Get saved network configuration
+ QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ settings.beginGroup(QLatin1String("QtNetwork"));
+ const QString id =
+ settings.value(QLatin1String("DefaultNetworkConfiguration")).toString();
+ settings.endGroup();
+
+ // If the saved network configuration is not currently discovered use the system
+ // default
+ QNetworkConfiguration config = manager.configurationFromIdentifier(id);
+ if ((config.state() & QNetworkConfiguration::Discovered) !=
+ QNetworkConfiguration::Discovered) {
+ config = manager.defaultConfiguration();
+ }
+
+ networkSession = new QNetworkSession(config, this);
+ connect(networkSession, SIGNAL(opened()), this, SLOT(sessionOpened()));
+
+ networkSession->open();
+ } else {
+ networkSession = 0;
+ }
}
private slots:
- void delayedInit() {
-#if defined(Q_OS_SYMBIAN)
- qt_SetDefaultIap();
-#endif
+ void sessionOpened() {
+ // Save the used configuration
+ QNetworkConfiguration config = networkSession->configuration();
+ QString id;
+ if (config.type() == QNetworkConfiguration::UserChoice) {
+ id = networkSession->sessionProperty(
+ QLatin1String("UserChoiceConfiguration")).toString();
+ } else {
+ id = config.identifier();
+ }
+
+ QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ settings.beginGroup(QLatin1String("QtNetwork"));
+ settings.setValue(QLatin1String("DefaultNetworkConfiguration"), id);
+ settings.endGroup();
}
void chooseOslo() {
diff --git a/demos/embedded/lightmaps/lightmaps.pro b/demos/embedded/lightmaps/lightmaps.pro
index ee4cc5adbf..9d837218c1 100644
--- a/demos/embedded/lightmaps/lightmaps.pro
+++ b/demos/embedded/lightmaps/lightmaps.pro
@@ -5,8 +5,6 @@ QT += network
symbian {
TARGET.UID3 = 0xA000CF75
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
- LIBS += -lesock -lcommdb -linsock # For IAP selection
TARGET.CAPABILITY = NetworkServices
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
}
diff --git a/demos/embedded/qmlcalculator/deployment.pri b/demos/embedded/qmlcalculator/deployment.pri
index 53c6dbf11d..a31303d7b0 100644
--- a/demos/embedded/qmlcalculator/deployment.pri
+++ b/demos/embedded/qmlcalculator/deployment.pri
@@ -1,5 +1,6 @@
qmlcalculator_src = $$PWD/../../declarative/calculator
symbian {
+ load(data_caging_paths)
qmlcalculator_uid3 = A000E3FB
qmlcalculator_files.path = $$APP_PRIVATE_DIR_BASE/$$qmlcalculator_uid3
}
diff --git a/demos/embedded/qmlclocks/deployment.pri b/demos/embedded/qmlclocks/deployment.pri
index 03ba1299c6..09467330fb 100644
--- a/demos/embedded/qmlclocks/deployment.pri
+++ b/demos/embedded/qmlclocks/deployment.pri
@@ -1,5 +1,6 @@
qmlclocks_src = $$PWD/../../../examples/declarative/toys/clocks
symbian {
+ load(data_caging_paths)
qmlclocks_uid3 = A000E3FC
qmlclocks_files.path = $$APP_PRIVATE_DIR_BASE/$$qmlclocks_uid3
}
diff --git a/demos/embedded/qmldialcontrol/deployment.pri b/demos/embedded/qmldialcontrol/deployment.pri
index 097c74c7cd..e0e72e6789 100644
--- a/demos/embedded/qmldialcontrol/deployment.pri
+++ b/demos/embedded/qmldialcontrol/deployment.pri
@@ -1,5 +1,6 @@
qmldialcontrol_src = $$PWD/../../../examples/declarative/ui-components/dialcontrol
symbian {
+ load(data_caging_paths)
qmldialcontrol_uid3 = A000E3FD
qmldialcontrol_files.path = $$APP_PRIVATE_DIR_BASE/$$qmldialcontrol_uid3
}
diff --git a/demos/embedded/qmleasing/deployment.pri b/demos/embedded/qmleasing/deployment.pri
index 47192e68bd..984f5c803e 100644
--- a/demos/embedded/qmleasing/deployment.pri
+++ b/demos/embedded/qmleasing/deployment.pri
@@ -1,5 +1,6 @@
qmleasing_src = $$PWD/../../../examples/declarative/animation/easing
symbian {
+ load(data_caging_paths)
qmleasing_uid3 = A000E3FE
qmleasing_files.path = $$APP_PRIVATE_DIR_BASE/$$qmleasing_uid3
}
diff --git a/demos/embedded/qmlflickr/deployment.pri b/demos/embedded/qmlflickr/deployment.pri
index c8fef1aee6..b5082921d7 100644
--- a/demos/embedded/qmlflickr/deployment.pri
+++ b/demos/embedded/qmlflickr/deployment.pri
@@ -1,5 +1,6 @@
qmlflickr_src = $$PWD/../../declarative/flickr
symbian {
+ load(data_caging_paths)
qmlflickr_uid3 = A000E3FF
qmlflickr_files.path = $$APP_PRIVATE_DIR_BASE/$$qmlflickr_uid3
}
diff --git a/demos/embedded/qmlflickr/qmlflickr.cpp b/demos/embedded/qmlflickr/qmlflickr.cpp
index 6f0c528ee3..7068f88e5b 100644
--- a/demos/embedded/qmlflickr/qmlflickr.cpp
+++ b/demos/embedded/qmlflickr/qmlflickr.cpp
@@ -40,41 +40,59 @@
****************************************************************************/
#include <QtCore/QFileInfo>
+#include <QtCore/QSettings>
#include <QtGui/QApplication>
#include <QtDeclarative/QDeclarativeView>
#include <QtDeclarative/QDeclarativeEngine>
+#include <QtDeclarative/QDeclarativeNetworkAccessManagerFactory>
+#include <QtNetwork/QNetworkConfiguration>
+#include <QtNetwork/QNetworkConfigurationManager>
+#include <QtNetwork/QNetworkAccessManager>
-#if defined(Q_OS_SYMBIAN)
-#include <QtCore/QTextCodec>
-#include <QtCore/QTimer>
-#include "sym_iap_util.h"
-
-class QmlAppView : public QDeclarativeView
+// Factory to create QNetworkAccessManagers that use the saved network configuration; otherwise
+// the system default.
+class NetworkAccessManagerFactory : public QDeclarativeNetworkAccessManagerFactory
{
-Q_OBJECT
public:
- QmlAppView(QWidget *parent = 0)
- : QDeclarativeView(parent)
- {
- QTimer::singleShot(0, this, SLOT(setDefaultIap()));
- }
+ ~NetworkAccessManagerFactory() { }
-private slots:
- void setDefaultIap()
- {
- qt_SetDefaultIap();
- }
+ QNetworkAccessManager *create(QObject *parent);
};
-#else // Q_OS_SYMBIAN
-typedef QDeclarativeView QmlAppView;
-#endif // Q_OS_SYMBIAN
+
+QNetworkAccessManager *NetworkAccessManagerFactory::create(QObject *parent)
+{
+ QNetworkAccessManager *accessManager = new QNetworkAccessManager(parent);
+
+ QNetworkConfigurationManager manager;
+ if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) {
+ // Get saved network configuration
+ QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ settings.beginGroup(QLatin1String("QtNetwork"));
+ const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString();
+ settings.endGroup();
+
+ // If the saved network configuration is not currently discovered use the system default
+ QNetworkConfiguration config = manager.configurationFromIdentifier(id);
+ if ((config.state() & QNetworkConfiguration::Discovered) !=
+ QNetworkConfiguration::Discovered) {
+ config = manager.defaultConfiguration();
+ }
+
+ accessManager->setConfiguration(config);
+ }
+
+ return accessManager;
+}
int main(int argc, char *argv[])
{
QApplication application(argc, argv);
+ NetworkAccessManagerFactory networkAccessManagerFactory;
+
const QString mainQmlApp = QLatin1String("flickr.qml");
- QmlAppView view;
+ QDeclarativeView view;
+ view.engine()->setNetworkAccessManagerFactory(&networkAccessManagerFactory);
view.setSource(QUrl(mainQmlApp));
view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
@@ -87,6 +105,3 @@ int main(int argc, char *argv[])
return application.exec();
}
-#if defined(Q_OS_SYMBIAN)
-#include "qmlflickr.moc"
-#endif // Q_OS_SYMBIAN
diff --git a/demos/embedded/qmlflickr/qmlflickr.pro b/demos/embedded/qmlflickr/qmlflickr.pro
index e7061349a3..39b316a5b9 100644
--- a/demos/embedded/qmlflickr/qmlflickr.pro
+++ b/demos/embedded/qmlflickr/qmlflickr.pro
@@ -7,8 +7,6 @@ include($$PWD/deployment.pri)
symbian {
TARGET.UID3 = 0x$$qmlflickr_uid3 # defined in deployment.pri
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
- LIBS += -lesock -lcommdb -linsock # For IAP selection
TARGET.CAPABILITY = NetworkServices
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
}
diff --git a/demos/embedded/qmlphotoviewer/deployment.pri b/demos/embedded/qmlphotoviewer/deployment.pri
index 128a1f77cf..35937a8cbe 100644
--- a/demos/embedded/qmlphotoviewer/deployment.pri
+++ b/demos/embedded/qmlphotoviewer/deployment.pri
@@ -1,5 +1,6 @@
qmlphotoviewer_src = $$PWD/../../declarative/photoviewer
symbian {
+ load(data_caging_paths)
qmlphotoviewer_uid3 = A000E400
qmlphotoviewer_files.path = $$APP_PRIVATE_DIR_BASE/$$qmlphotoviewer_uid3
}
diff --git a/demos/embedded/qmlphotoviewer/qmlphotoviewer.cpp b/demos/embedded/qmlphotoviewer/qmlphotoviewer.cpp
index 7889842f35..2b9db5e205 100644
--- a/demos/embedded/qmlphotoviewer/qmlphotoviewer.cpp
+++ b/demos/embedded/qmlphotoviewer/qmlphotoviewer.cpp
@@ -40,41 +40,59 @@
****************************************************************************/
#include <QtCore/QFileInfo>
+#include <QtCore/QSettings>
#include <QtGui/QApplication>
#include <QtDeclarative/QDeclarativeView>
#include <QtDeclarative/QDeclarativeEngine>
+#include <QtDeclarative/QDeclarativeNetworkAccessManagerFactory>
+#include <QtNetwork/QNetworkConfiguration>
+#include <QtNetwork/QNetworkConfigurationManager>
+#include <QtNetwork/QNetworkAccessManager>
-#if defined(Q_OS_SYMBIAN)
-#include <QtCore/QTextCodec>
-#include <QtCore/QTimer>
-#include "sym_iap_util.h"
-
-class QmlAppView : public QDeclarativeView
+// Factory to create QNetworkAccessManagers that use the saved network configuration; otherwise
+// the system default.
+class NetworkAccessManagerFactory : public QDeclarativeNetworkAccessManagerFactory
{
-Q_OBJECT
public:
- QmlAppView(QWidget *parent = 0)
- : QDeclarativeView(parent)
- {
- QTimer::singleShot(0, this, SLOT(setDefaultIap()));
- }
+ ~NetworkAccessManagerFactory() { }
-private slots:
- void setDefaultIap()
- {
- qt_SetDefaultIap();
- }
+ QNetworkAccessManager *create(QObject *parent);
};
-#else // Q_OS_SYMBIAN
-typedef QDeclarativeView QmlAppView;
-#endif // Q_OS_SYMBIAN
+
+QNetworkAccessManager *NetworkAccessManagerFactory::create(QObject *parent)
+{
+ QNetworkAccessManager *accessManager = new QNetworkAccessManager(parent);
+
+ QNetworkConfigurationManager manager;
+ if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) {
+ // Get saved network configuration
+ QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ settings.beginGroup(QLatin1String("QtNetwork"));
+ const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString();
+ settings.endGroup();
+
+ // If the saved network configuration is not currently discovered use the system default
+ QNetworkConfiguration config = manager.configurationFromIdentifier(id);
+ if ((config.state() & QNetworkConfiguration::Discovered) !=
+ QNetworkConfiguration::Discovered) {
+ config = manager.defaultConfiguration();
+ }
+
+ accessManager->setConfiguration(config);
+ }
+
+ return accessManager;
+}
int main(int argc, char *argv[])
{
QApplication application(argc, argv);
+ NetworkAccessManagerFactory networkAccessManagerFactory;
+
const QString mainQmlApp = QLatin1String("photoviewer.qml");
- QmlAppView view;
+ QDeclarativeView view;
+ view.engine()->setNetworkAccessManagerFactory(&networkAccessManagerFactory);
view.setSource(QUrl(mainQmlApp));
view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
@@ -87,6 +105,3 @@ int main(int argc, char *argv[])
return application.exec();
}
-#if defined(Q_OS_SYMBIAN)
-#include "qmlphotoviewer.moc"
-#endif // Q_OS_SYMBIAN
diff --git a/demos/embedded/qmlphotoviewer/qmlphotoviewer.pro b/demos/embedded/qmlphotoviewer/qmlphotoviewer.pro
index ead5e6700d..a4234cf0e8 100644
--- a/demos/embedded/qmlphotoviewer/qmlphotoviewer.pro
+++ b/demos/embedded/qmlphotoviewer/qmlphotoviewer.pro
@@ -7,8 +7,6 @@ include($$PWD/deployment.pri)
symbian {
TARGET.UID3 = 0x$$qmlphotoviewer_uid3 # defined in deployment.pri
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
- LIBS += -lesock -lcommdb -linsock # For IAP selection
TARGET.CAPABILITY = NetworkServices
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
}
diff --git a/demos/embedded/qmltwitter/deployment.pri b/demos/embedded/qmltwitter/deployment.pri
index 40c53ad7e9..4404e33531 100644
--- a/demos/embedded/qmltwitter/deployment.pri
+++ b/demos/embedded/qmltwitter/deployment.pri
@@ -1,5 +1,6 @@
qmltwitter_src = $$PWD/../../declarative/twitter
symbian {
+ load(data_caging_paths)
qmltwitter_uid3 = A000E401
qmltwitter_files.path = $$APP_PRIVATE_DIR_BASE/$$qmltwitter_uid3
}
diff --git a/demos/embedded/qmltwitter/qmltwitter.cpp b/demos/embedded/qmltwitter/qmltwitter.cpp
index e30ab24546..c53098a45a 100644
--- a/demos/embedded/qmltwitter/qmltwitter.cpp
+++ b/demos/embedded/qmltwitter/qmltwitter.cpp
@@ -40,41 +40,59 @@
****************************************************************************/
#include <QtCore/QFileInfo>
+#include <QtCore/QSettings>
#include <QtGui/QApplication>
#include <QtDeclarative/QDeclarativeView>
#include <QtDeclarative/QDeclarativeEngine>
+#include <QtDeclarative/QDeclarativeNetworkAccessManagerFactory>
+#include <QtNetwork/QNetworkConfiguration>
+#include <QtNetwork/QNetworkConfigurationManager>
+#include <QtNetwork/QNetworkAccessManager>
-#if defined(Q_OS_SYMBIAN)
-#include <QtCore/QTextCodec>
-#include <QtCore/QTimer>
-#include "sym_iap_util.h"
-
-class QmlAppView : public QDeclarativeView
+// Factory to create QNetworkAccessManagers that use the saved network configuration; otherwise
+// the system default.
+class NetworkAccessManagerFactory : public QDeclarativeNetworkAccessManagerFactory
{
-Q_OBJECT
public:
- QmlAppView(QWidget *parent = 0)
- : QDeclarativeView(parent)
- {
- QTimer::singleShot(0, this, SLOT(setDefaultIap()));
- }
+ ~NetworkAccessManagerFactory() { }
-private slots:
- void setDefaultIap()
- {
- qt_SetDefaultIap();
- }
+ QNetworkAccessManager *create(QObject *parent);
};
-#else // Q_OS_SYMBIAN
-typedef QDeclarativeView QmlAppView;
-#endif // Q_OS_SYMBIAN
+
+QNetworkAccessManager *NetworkAccessManagerFactory::create(QObject *parent)
+{
+ QNetworkAccessManager *accessManager = new QNetworkAccessManager(parent);
+
+ QNetworkConfigurationManager manager;
+ if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) {
+ // Get saved network configuration
+ QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ settings.beginGroup(QLatin1String("QtNetwork"));
+ const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString();
+ settings.endGroup();
+
+ // If the saved network configuration is not currently discovered use the system default
+ QNetworkConfiguration config = manager.configurationFromIdentifier(id);
+ if ((config.state() & QNetworkConfiguration::Discovered) !=
+ QNetworkConfiguration::Discovered) {
+ config = manager.defaultConfiguration();
+ }
+
+ accessManager->setConfiguration(config);
+ }
+
+ return accessManager;
+}
int main(int argc, char *argv[])
{
QApplication application(argc, argv);
+ NetworkAccessManagerFactory networkAccessManagerFactory;
+
const QString mainQmlApp = QLatin1String("twitter.qml");
- QmlAppView view;
+ QDeclarativeView view;
+ view.engine()->setNetworkAccessManagerFactory(&networkAccessManagerFactory);
view.setSource(QUrl(mainQmlApp));
view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
@@ -87,6 +105,3 @@ int main(int argc, char *argv[])
return application.exec();
}
-#if defined(Q_OS_SYMBIAN)
-#include "qmltwitter.moc"
-#endif // Q_OS_SYMBIAN
diff --git a/demos/embedded/qmltwitter/qmltwitter.pro b/demos/embedded/qmltwitter/qmltwitter.pro
index 7f9be57317..7bd4617b6b 100644
--- a/demos/embedded/qmltwitter/qmltwitter.pro
+++ b/demos/embedded/qmltwitter/qmltwitter.pro
@@ -7,8 +7,6 @@ include($$PWD/deployment.pri)
symbian {
TARGET.UID3 = 0x$$qmltwitter_uid3 # defined in deployment.pri
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
- LIBS += -lesock -lcommdb -linsock # For IAP selection
TARGET.CAPABILITY = NetworkServices
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
}
diff --git a/demos/embedded/raycasting/raycasting.cpp b/demos/embedded/raycasting/raycasting.cpp
index 75ba147c40..21aa2c3fca 100644
--- a/demos/embedded/raycasting/raycasting.cpp
+++ b/demos/embedded/raycasting/raycasting.cpp
@@ -142,7 +142,7 @@ public:
qreal dv = -2 * cosa / bufw;
for (int ray = 0; ray < bufw; ++ray, u += du, v += dv) {
- // everytime this ray advances 'u' units in x direction,
+ // every time this ray advances 'u' units in x direction,
// it also advanced 'v' units in y direction
qreal uu = (u < 0) ? -u : u;
qreal vv = (v < 0) ? -v : v;
diff --git a/demos/qtdemo/colors.cpp b/demos/qtdemo/colors.cpp
index b352e3d099..802d77d232 100644
--- a/demos/qtdemo/colors.cpp
+++ b/demos/qtdemo/colors.cpp
@@ -81,7 +81,6 @@ bool Colors::noRescale = false;
bool Colors::noAnimations = false;
bool Colors::noBlending = false;
bool Colors::noScreenSync = false;
-bool Colors::noBlur = true;
bool Colors::fullscreen = false;
bool Colors::usePixmaps = false;
bool Colors::useLoop = false;
@@ -233,8 +232,6 @@ void Colors::parseArgs(int argc, char *argv[])
Colors::showFps = true;
else if (s == "-no-blending")
Colors::noBlending = true;
- else if (s == "-use-blur")
- Colors::noBlur = false;
else if (s == "-no-sync")
Colors::noScreenSync = true;
else if (s.startsWith("-menu"))
@@ -270,7 +267,7 @@ void Colors::parseArgs(int argc, char *argv[])
else if (s.startsWith("-h") || s.startsWith("-help")){
QMessageBox::warning(0, "Arguments",
QString("Usage: qtdemo [-verbose] [-no-adapt] [-opengl] [-software] [-fullscreen] [-ticker[0|1]] ")
- + "[-animations[0|1]] [-no-blending] [-use-blur] [-no-sync] [-use-timer-update[0|1]] [-pause[0|1]] "
+ + "[-animations[0|1]] [-no-blending] [-no-sync] [-use-timer-update[0|1]] [-pause[0|1]] "
+ "[-use-window-mask] [-no-rescale] "
+ "[-use-pixmaps] [-show-fps] [-show-br] [-8bit[0|1]] [-menu<int>] [-use-loop] [-use-balls] "
+ "[-animation-speed<float>] [-fps<int>] "
@@ -298,7 +295,6 @@ void Colors::setLowSettings()
Colors::usePixmaps = true;
Colors::noAnimations = true;
Colors::noBlending = true;
- Colors::noBlur = true;
}
void Colors::detectSystemResources()
diff --git a/demos/qtdemo/colors.h b/demos/qtdemo/colors.h
index 2d58058e7a..1e0b795970 100644
--- a/demos/qtdemo/colors.h
+++ b/demos/qtdemo/colors.h
@@ -91,7 +91,6 @@ public:
static bool noAnimations;
static bool noBlending;
static bool noScreenSync;
- static bool noBlur;
static bool useLoop;
static bool noWindowMask;
static bool usePixmaps;
diff --git a/demos/qtdemo/mainwindow.cpp b/demos/qtdemo/mainwindow.cpp
index 753014a0aa..16c5bf3f25 100644
--- a/demos/qtdemo/mainwindow.cpp
+++ b/demos/qtdemo/mainwindow.cpp
@@ -310,14 +310,6 @@ void MainWindow::checkAdapt()
qDebug() << "- benchmark adaption: removed ticker (fps < 30)";
}
- //Note: Because we don't adapt later in the program, if blur makes FPS plummet then we won't catch it
- if (!Colors::noBlur && MenuManager::instance()->declarativeEngine && this->mainSceneRoot){
- Colors::noBlur = true;
- MenuManager::instance()->declarativeEngine->rootContext()->setContextProperty("useBlur", false);
- if (Colors::verbose)
- qDebug() << "- benchmark adaption: removed blur (fps < 30)";
- }
-
if (this->fpsMedian < 20){
Colors::noAnimations = true;
if (Colors::verbose)
diff --git a/demos/qtdemo/menumanager.cpp b/demos/qtdemo/menumanager.cpp
index 15561abd12..7168b57f82 100644
--- a/demos/qtdemo/menumanager.cpp
+++ b/demos/qtdemo/menumanager.cpp
@@ -378,17 +378,6 @@ void MenuManager::launchQmlExample(const QString &name)
return;
}
}
- if(!Colors::noBlur){
- QImage qmlBgImage(this->window->rect().size(), QImage::Format_ARGB32_Premultiplied);
- QPainter painter(&qmlBgImage);
- if(Colors::showFps)
- this->window->fpsLabel->setOpacity(0);
- this->window->render(&painter);
- if(Colors::showFps)
- this->window->fpsLabel->setOpacity(1.0);
- Qt::ImageConversionFlags convFlags = Qt::AvoidDither | Qt::NoOpaqueDetection;
- this->declarativeEngine->rootContext()->setContextProperty("bgAppPixmap", QVariant(QPixmap::fromImage(qmlBgImage, convFlags)));
- }
qmlRoot->setProperty("qmlFile", QVariant(""));//unload component
qmlRoot->setProperty("show", QVariant(true));
@@ -439,17 +428,8 @@ void MenuManager::init(MainWindow *window)
}
// Create QML Loader
- qmlRegisterType<QGraphicsBlurEffect>("Effects", 1, 0, "Blur");
- qmlRegisterType<QGraphicsDropShadowEffect>("Effects", 1, 0, "DropShadow");
declarativeEngine = new QDeclarativeEngine(this);
- // Note that we paint the background into a static image for a theorized performance improvement when blurring
- // It has not yet been determined what, if any, speed up this gives (but is left in 'cause the QML expects it now)
- declarativeEngine->rootContext()->setContextProperty("useBlur", !Colors::noBlur);
- QImage qmlBgImage(this->window->rect().size(), QImage::Format_ARGB32_Premultiplied);
- qmlBgImage.fill(0);
- this->declarativeEngine->rootContext()->setContextProperty("bgAppPixmap", QVariant(QPixmap::fromImage(qmlBgImage)));
-
QDeclarativeComponent component(declarativeEngine, QUrl("qrc:qml/qmlShell.qml"), this);
qmlRoot = 0;
if(component.isReady())
diff --git a/demos/qtdemo/qmlShell.qml b/demos/qtdemo/qmlShell.qml
index e15d33c4ab..b5fdf39f2b 100644
--- a/demos/qtdemo/qmlShell.qml
+++ b/demos/qtdemo/qmlShell.qml
@@ -40,26 +40,13 @@
****************************************************************************/
import Qt 4.7
-import Effects 1.0
-/* Vars exposed from C++
- pixmap bgAppPixmap
- bool useBlur (to turn on, pass -use-blur on the cmd line. Off by default 'cause it's too slow)
-*/
Item {
id: main
//height and width set by program to fill window
//below properties are sometimes set from C++
property url qmlFile: ''
property bool show: false
- Image{
- id: bg
- opacity: 0
- anchors.fill: parent
- z: -1
- pixmap: bgAppPixmap
- effect: Blur { id: blurEffect; enabled: useBlur; blurRadius: 8;}
- }
Item{ id:embeddedViewer
width: parent.width
@@ -112,13 +99,6 @@ Item {
anchors.fill:parent
}
- effect: DropShadow {
- enabled: useBlur;
- blurRadius: 9;
- color: "#88000000";
- xOffset:0
- yOffset:0
- }
}
Text{
@@ -136,6 +116,32 @@ Item {
onLinkActivated: Qt.openUrlExternally(link);
}
}
+ Rectangle{
+ id: helpLabel
+ property bool timedOut: false
+ z: 9
+ //Positioned in the top left corner
+ x: 8
+ y: 8
+ color: "white"
+ border.color: "black"
+ border.width: 1
+ width: helpText.width + 16
+ height: helpText.height + 8
+ Text{
+ id: helpText
+ color: "black"
+ anchors.centerIn: parent
+ text: "Click outside the example to exit it."
+ }
+ opacity: 0
+ Behavior on opacity{ NumberAnimation{duration:500} }
+ Timer{
+ id: helpTimer
+ interval: 5000
+ onTriggered: {helpLabel.timedOut=true}
+ }
+ }
Rectangle{ id: blackout //Maybe use a colorize effect instead?
z: 8
anchors.fill: parent
@@ -160,8 +166,8 @@ Item {
opacity: 1
}
PropertyChanges {
- target: bg
- opacity: 1
+ target: helpLabel
+ opacity: helpLabel.timedOut?0:1
}
PropertyChanges {
target: blackout
@@ -171,9 +177,9 @@ Item {
]
transitions: [//Should not be too long, because the component has already started running
Transition { from: ''; to: "show"; reversible: true
- SequentialAnimation{
- PropertyAction { target: bg; property: useBlur?"y":"opacity";}//fade in blurred background only if blurred
- NumberAnimation{ properties: "opacity"; easing.type: Easing.InQuad; duration: 500}
+ ParallelAnimation{
+ ScriptAction{ script: {helpLabel.timedOut = false; helpTimer.restart();} }
+ NumberAnimation{ exclude: helpLabel; properties: "opacity"; easing.type: Easing.InQuad; duration: 500}
PropertyAction { target: loader; property: "focus"; value: true}//Might be needed to ensure the focus stays with us
}
}
diff --git a/dist/changes-4.7.0 b/dist/changes-4.7.0
index c19bf15a5d..518d36286e 100644
--- a/dist/changes-4.7.0
+++ b/dist/changes-4.7.0
@@ -32,7 +32,10 @@ New features
- QNetworkSession, QNetworkConfiguration, QNetworkConfigurationManager
* New bearer management classes added.
-
+
+ - QStaticText class was added to support high-performance output of
+ seldomly altered text.
+
Third party components
----------------------
@@ -62,6 +65,8 @@ QtCore
- QMetaType
* Significantly improved performance of the type() function
* [QTBUG-8235] Support QEasingCurve as a built in metatype.
+ * Added possibility to register several name for the same type with
+ qRegisterMetaType<>() (ie. for typedef)
- QState
* [QTBUG-7741] Added a function to get the out-going transitions
- QXmlStreamReader
@@ -71,17 +76,19 @@ QtCore
- QAbstractAnimation
* [QTBUG-10654] Avoids animation with loopCount == 0 to change state
to running and stopped.
+ - QVarLenghtArray
+ * Added some API to be more consistant with other containers
QtGui
-----
-
+
- QAbstractItemView
* Fixed a bug that would cause keyboard searches not to behave
properly when used within 400 milliseconds of midnight.
- QComboBox
* [QTBUG-8796] Made ForegroundRole work for all styles.
-
+
- QPrinter
* Obsoleted the slightly confusing setNumCopies() and numCopies()
functions, and replaced them with setCopyCount(), copyCount() and
@@ -104,6 +111,7 @@ QtGui
* [QTBUG-9024] Improved performance when calling update() on items that
are clipped by an ancestor (QGraphicsItem::ItemClipsChildrenToShape).
* [QTBUG-7703], [QTBUG-8378] Fixed scrolling issues
+ * [QTBUG-12112] Fixed focusItem() returning incorrect value.
- QGraphicsTextItem
* [QTBUG-7333] Fixed keyboard shortcuts not being triggered when the
@@ -116,9 +124,14 @@ QtGui
the mouse.
* [QTBUG-10338] Fixed drawing artifacts due to rounding errors.
+ - QGraphicsWidget
+ * [QTBUG-12056] Fixed a crash occuring when adding a QGraphicsWidget
+ to a scene after removing and deleting another QGraphicsWidget.
+
- QImage
* [QTBUG-9640] Prevented unneccessary copy in QImage::setAlphaChannel().
* [QTBUG-7982] Added QImage::bitPlaneCount().
+ * [QTBUG-9072] Fixed alpha check for 1-bit-per-pixel images.
- QPicture
* [QTBUG-4974] Printing QPictures containing text to a high resolution
@@ -134,6 +147,11 @@ QtGui
processors with a NEON vector unit.
* Fixed some performance issues when drawing sub-pixmaps of large
pixmaps and falling back to raster in the X11 paint engine.
+ * [QTBUG-7596] Safeguard ourselves against corrupt registry values for
+ ClearType gamma on Windows.
+ * [QTBUG-9218] Fixed flattening of largely scaled, thin, dashed beziers.
+ * [QTBUG-9437] Fixed crash in the raster paint engine when drawing largely
+ scaled images.
- QPainterPath
* [QTBUG-3778] Fixed bug in painter path polygon intersection code.
@@ -142,6 +160,8 @@ QtGui
* [QTBUG-8035] Got rid of bezier intersection code in the boolean
operators (intersect, subtract, unite) to prevent numerical
stability issues.
+ * [QTBUG-11291] Fixed infinite recursion when drawing very large painter
+ paths.
- QPixmap
* [QTBUG-4149] Fixed QPixmap::grabWidget() on widgets that have not yet
@@ -156,10 +176,31 @@ QtGui
- QSplitter
* [QTBUG-9335] Improve support for 1-pixel splitters by using a
larger drag area.
-
+
+ - QTextDocumentWriter
+ * Fixed tab-stops and table padding in ODF export.
+
+ - QTextLayout
+ * [QTBUG-11427] Fix possible crash in QTextLayout for glyphless
+ items.
+ * [QTBUG-8864] Fix regression in right alignment of text with
+ negative right bearing.
+
- QTransform
* [QTBUG-8557] Fixed bug in QTransform::type() potentially occuring
after using operator/ or operator* or their overloads.
+
+QtOpenGL
+--------
+ - Improve performance of text by adding special cased fragment shader.
+
+ - Made width and height of glyph cache power-of-two for performance
+ improvements on some hardware.
+
+ - [QTBUG-9706] Improved appearance of text antialiasing.
+
+ - QTreeView
+ * Optimized
QtNetwork
---------
@@ -175,6 +216,7 @@ QtNetwork
* [QTBUG-9618] [MR 2372] send secure cookies only over secure connections
* [QTBUG-7713] Fix bug related to re-sending request
* [QTBUG-7673] Fix issue with some webservers
+ * [QTBUG-11029] do not accept cookies with non-alpha-numerical domain
- Sockets
* Better support for derived QTcpServer
* [QTBUG-7054] Fix error handling with waitFor*() for socket engine
@@ -182,6 +224,10 @@ QtNetwork
- SSL
* [QTBUG-2515] Do not make OpenSSL prompt for a password
* [QTBUG-6504, QTBUG-8924, QTBUG-5645] Fix memleak
+ * [QTBUG-9973] QSslCertificate: support large serial numbers
+ * [QTBUG-8833] make QSslSocket::systemCaCertificates() use system certs
+ * [QT-3567] QSslSocket: improve error handling (fixes Secunia Advisory SA40389)
+ * [QBTUG-4455, MR 731] Fix handling of SSL certificates with wildcard domain names
QtScript
--------
@@ -204,6 +250,7 @@ QtXmlPatterns
- [QTBUG-8920] fixed crash with anonymous types in XsdSchemaChecker
- [QTBUG-8394] include/import/redefine schemas only once
- QXmlSchema: fix crash with referencing elements
+ - [QBTUG-6485] QXmlSchema: allow usage of xsd:all
Qt Plugins
----------
@@ -223,7 +270,13 @@ Qt Plugins
****************************************************************************
* Database Drivers *
****************************************************************************
-
+ - Sqlite
+ * [QTBUG-11904] Pointer aliasing problem in sqlite
+ - OCI
+ * [QTBUG-10919] Unable to insert unicode chars with codepoint > 255
+ in nvarchar2 column on oracle
+ * [QTBUG-8210] Oracle - DATE in db with a year greater or equal to 2800
+ returns an invalid date
****************************************************************************
* Platform Specific Changes *
@@ -234,7 +287,19 @@ Qt for Linux/X11
- QGtkStyle
* Fixed rtl issues with sliders (QTBUG-8986)
* Fixed missing pressed appearance on scroll bar handles. (QTBUG-10396)
-
+
+ - QFontDatabase
+ * [QTBUG-4428] Fixed regression when using bitmap fonts on some
+ Linux systems.
+
+ - QFontEngine
+ * [QTBUG-9442] Avoid possible square root of negative number in
+ FreeType font engine.
+
+ - QFontMetrics
+ * [QTBUG-10448] Fix crash when using fonts in non-gui QApplication.
+
+
Qt for Windows
--------------
- Popup windows now implicitly activate when shown. (QTBUG-7386)
@@ -252,6 +317,20 @@ Qt for Mac OS X
* Removed frame around statusbar items. (QTBUG-3574)
* More native appearance of item view headers and frames. (QTBUG-10047)
+ - QFontEngine
+ * Enable fractional metrics for the font engine on Mac in all
+ stages of text layout.
+ * [QTBUG-5529] Enable design metrics for correct character spacing
+ in ATSUI font engine. (Mac/Carbon)
+
+- QTextDocument
+ * [QTBUG-8791] Fix misalignment of fixed width fonts between
+ format changes on Cocoa.
+
+ - QTextLayout
+ * [QTBUG-9879] Fix off-by-one in vertical position for elided and
+ non-elided text.
+
Qt for Embedded Linux
---------------------
@@ -272,6 +351,12 @@ Qt for Windows CE
* QTabBar scroll button size has been fixed. (QTBUG-8757)
* Detection of Windows mobile 6.5 fixed. (QTBUG-8418)
+Qt for Symbian
+--------------
+
+ - QSplashScreen
+ * [QTBUG-11129] Fixed a hanging bug in QSplashScreen on 3.1 devices.
+
****************************************************************************
@@ -285,8 +370,20 @@ Qt for Windows CE
- Build System
- - "configure -fast" on Windows now also works for other make tools than
- nmake. (QTBUG-8562)
+ - [QT-3540] Fixed Symbian resources not honoring TARGET with a path.
+ - "configure -fast" on Windows now also works for other make tools than
+ nmake. (QTBUG-8562)
+ - [QTBUG-11351] Fixed memory restrictions not being passed on to elf2e32.
+ - [QTBUG-11385] Removed the need to specify -arch symbian when compiling
+ for Symbian on Linux.
+ - [QTBUG-11396] "configure -qtlibinfix" now works when compiling for
+ Symbian on Linux.
+ - [QTBUG-11670] Fixed a bug which caused "make runonphone" to look for
+ package in the wrong place.
+ - [QTBUG-11727] Fixed a bug which made builds outside of the Qt tree fail
+ to compile.
+ - [QTBUG-11927] "configure -silent" now works with the
+ symbian/linux-armcc and symbian/linux-gcce mkspecs.
- Assistant
@@ -310,7 +407,7 @@ Qt for Windows CE
- moc
-
+ * Fixed several parsing bugs. Including changes in the normalized signature.
- uic
@@ -380,6 +477,4 @@ QtCore:
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.
+ retrieving the default system certificates.
diff --git a/doc/src/classes/phonon-api.qdoc b/doc/src/classes/phonon-api.qdoc
index 641b9362ae..6fe022359b 100644
--- a/doc/src/classes/phonon-api.qdoc
+++ b/doc/src/classes/phonon-api.qdoc
@@ -1577,7 +1577,6 @@
\since 4.4
\brief The MediaObject class provides an interface for media playback.
-
The media object manages a \l{Phonon::}{MediaSource}, which
supplies the media object with multimedia content, e.g., from a
file. A playback in Phonon is always started by calling the
@@ -1651,17 +1650,8 @@
playback of the current source, but it is possible to try with a
different one. A user readable error message is given by
errorString().
- \section1 Symbian Platform Security Requirements
-
- On Symbian, processes which access media via the network must
- have the \c NetworkServices platform security capability. If the client
- process lacks this capability, operations will result in errors.
- This failure is indicated by a state() of Phonon::ErrorState.
-
- Platform security capabilities are added via the
- \l{qmake-variable-reference.html#target-capability}{TARGET.CAPABILITY}
- qmake variable.
+ \sa {Symbian Platform Security Requirements}
\sa Phonon::MediaSource, Phonon::AudioOutput, VideoWidget,
{Music Player Example}, {Phonon Overview}, Phonon::VideoPlayer,
Phonon::createPlayer(), {Phonon Module}
diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc
index afedb44d83..1341bbb942 100644
--- a/doc/src/declarative/advtutorial.qdoc
+++ b/doc/src/declarative/advtutorial.qdoc
@@ -164,14 +164,22 @@ The \c createBlock() function creates a block from the \c Block.qml file
and moves the new block to its position on the game canvas. This involves several steps:
\list
-\o \l {QML:Qt::createComponent()}{Qt.createComponent()} is called to generate an element from \c Block.qml.
- If the component is ready, we can call \c createObject() to create an instance of the \c Block item.
-\o If \c createObject() returned null (i.e. if there was an error while
- loading the object), print the error information.
-\o Place the block in its position on the board and set its width and height.
- Also, store it in the blocks array for future reference.
-\o Finally, print error information to the console if the component could not be
- loaded for some reason (for example, if the file is missing).
+
+\o \l {QML:Qt::createComponent()}{Qt.createComponent()} is called to
+ generate an element from \c Block.qml. If the component is ready,
+ we can call \c createObject() to create an instance of the \c Block
+ item.
+
+\o If \c createObject() returned null (i.e. if there was an error
+ while loading the object), print the error information.
+
+\o Place the block in its position on the board and set its width and
+ height. Also, store it in the blocks array for future reference.
+
+\o Finally, print error information to the console if the component
+ could not be loaded for some reason (for example, if the file is
+ missing).
+
\endlist
diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc
index c5333dff61..401cf16032 100644
--- a/doc/src/declarative/animation.qdoc
+++ b/doc/src/declarative/animation.qdoc
@@ -67,7 +67,9 @@ A property animation can also be specified as a resource that is manipulated fro
\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.
+to explicitly set the \c target and \c property to animate. This also the only case where
+an animation needs to be started explictly by either setting the \c running property to
+true or calling the \c start() method.
Animations can be joined into a group using SequentialAnimation and ParallelAnimation.
diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc
index a5e53a9d4f..997f601d71 100644
--- a/doc/src/declarative/dynamicobjects.qdoc
+++ b/doc/src/declarative/dynamicobjects.qdoc
@@ -39,31 +39,35 @@ QML also supports the dynamic creation of objects from within JavaScript
code. This is useful if the existing QML elements do not fit the needs of your
application, and there are no C++ components involved.
-See the {declarative/toys/dynamicscene}{Dynamic Scene example} for a demonstration
+See the \l {declarative/toys/dynamicscene}{Dynamic Scene example} for a demonstration
of the concepts discussed on this page.
\section1 Creating Objects Dynamically
There are two ways to create objects dynamically from JavaScript. You can either call
-\l {QML:Qt::createComponent()}{Qt.createComponent()} to create
-a component which instantiates items, or use \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()}
+\l {QML:Qt::createComponent()}{Qt.createComponent()} to dynamically create
+a \l Component object, or use \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()}
to create an item from a string of QML.
-Creating a component is better if you have a predefined
-item, and you want to create dynamic instances of that item; creating an item from
-a string of QML is useful when the item QML itself is generated at runtime.
+Creating a component is better if you have an existing component defined in a \c .qml
+file, and you want to dynamically create instances of that component. Otherwise,
+creating an item from a string of QML is useful when the item QML itself is generated
+at runtime.
-If you have a component specified in a QML file, you can dynamically load it with
-the \l {QML:Qt::createComponent()}{Qt.createComponent()} function on the \l{QML Global Object}.
-This function takes the URL of the QML file as its only argument and returns
-a component object which can be used to create and load that QML file.
-Once you have a component you can use its \l {Component::createObject()}{createObject()} method to create an instance of
+\section2 Creating a Component dynamically
+
+To dynamically load a component defined in a QML file, call the
+\l {QML:Qt::createComponent()}{Qt.createComponent()} function on the \l{QML Global Object}.
+This function takes the URL of the QML file as its only argument and creates
+a \l Component object from this URL.
+
+Once you have a \l Component, you can call its \l {Component::createObject()}{createObject()} method to create an instance of
the component. This function takes exactly one argument, which is the parent for the new item. Since graphical items will
not appear on the scene without a parent, it is recommended that you set the parent this way. However, if you wish to set
-the parent later you can safely pass null to this function.
+the parent later you can safely pass \c null to this function.
-Here is an example. Here is a \c Sprite.qml, which defines a simple QML component:
+Here is an example. First there is \c Sprite.qml, which defines a simple QML component:
\snippet doc/src/snippets/declarative/Sprite.qml 0
@@ -72,35 +76,48 @@ that will create \c Sprite objects:
\snippet doc/src/snippets/declarative/createComponent.qml 0
-Here is \c componentCreation.js. Remember that QML files that might be loaded
-over the network cannot be expected to be ready immediately:
+Here is \c componentCreation.js. 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
+\snippet doc/src/snippets/declarative/componentCreation.js vars
+\codeline
+\snippet doc/src/snippets/declarative/componentCreation.js func
+\snippet doc/src/snippets/declarative/componentCreation.js remote
+\snippet doc/src/snippets/declarative/componentCreation.js func-end
\codeline
-\snippet doc/src/snippets/declarative/componentCreation.js 1
+\snippet doc/src/snippets/declarative/componentCreation.js finishCreation
-If you are certain the files will be local, you could simplify to:
+If you are certain the QML file to be loaded is a local file, you could omit the \c finishCreation()
+function and call \l {Component::createObject()}{createObject()} immediately:
-\snippet doc/src/snippets/declarative/componentCreation.js 2
+\snippet doc/src/snippets/declarative/componentCreation.js func
+\snippet doc/src/snippets/declarative/componentCreation.js local
+\snippet doc/src/snippets/declarative/componentCreation.js func-end
-Notice that once a \c Sprite object is created, its parent is set to \c appWindow (defined
-in \c main.qml). After creating an item, you must set its parent to an item within the scene.
-Otherwise your dynamically created item will not appear in the scene.
+Notice in both instances, \l {Component::createObject()}{createObject()} is called with
+\c appWindow passed as an argument so that the created object will become a child of the
+\c appWindow item in \c main.qml. Otherwise, the new item will not appear in the scene.
When using files with relative paths, the path should
be relative to the file where \l {QML:Qt::createComponent()}{Qt.createComponent()} is executed.
-If the QML component does not exist until runtime, you can create a QML item from
+
+\section2 Creating an object from a string of QML
+
+If the QML is not defined until runtime, you can create a QML item from
a string of QML using the \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()} function, as in the following example:
\snippet doc/src/snippets/declarative/createQmlObject.qml 0
The first argument is the string of QML to create. Just like in a new file, you will need to
-import any types you wish to use. For importing files with relative paths, the path should
-be relative to the file where the item in the second argument is defined. Remember to set the parent after
-creating the item. The second argument is another item in the scene, and the new item is created
-in the same QML Context as this item. The third argument is the file path associated with this
-item, which is used for error reporting.
+import any types you wish to use. The second argument is the parent item for the new item;
+this should be an existing item in the scene. The third argument is the file path to associate
+with the new item; this is used for error reporting.
+
+If the string of QML imports files using relative paths, the path should be relative
+to the file in which the parent item (the second argument to the method) is defined.
+
\section1 Maintaining Dynamically Created Objects
@@ -114,9 +131,9 @@ The actual creation context depends on how an item is created:
\o If \l {QML:Qt::createComponent()}{Qt.createComponent()} is used, the creation context
is the QDeclarativeContext in which this method is called
\o If \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()}
- if called, it is the context of the item used as the second argument to this method
+ if called, the creation context is the context of the parent item passed to this method
\o If a \c {Component{}} item is defined and \l {Component::createObject()}{createObject()}
- is called on that item, it is the context in which the \c Component is defined
+ is called on that item, the creation context is the context in which the \c Component is defined
\endlist
Also, note that while dynamically created objects may be used the same as other objects, they
@@ -131,17 +148,47 @@ lots of dynamically created items, however, you may receive a worthwhile
performance benefit if unused items are deleted.
Note that you should never manually delete items that were dynamically created
-by QML elements (such as \l Loader). Also, you should generally avoid deleting
+by QML elements (such as \l Loader and \l Repeater). Also, you should avoid deleting
items that you did not dynamically create yourself.
Items can be deleted using the \c destroy() method. This method has an optional
argument (which defaults to 0) that specifies the approximate delay in milliseconds
-before the object is to be destroyed. This allows you to wait until the completion of
-an animation or transition. An example:
+before the object is to be destroyed.
+
+Here is an example. The \c application.qml creates five instances of the \c SelfDestroyingRect.qml
+component. Each instance runs a NumberAnimation, and when the animation has finished, calls
+\c destroy() on its root item to destroy itself:
+
+\table
+\row
+\o \c application.qml
+\o \c SelfDestroyingRect.qml
-\snippet doc/src/snippets/declarative/dynamicObjects.qml 0
+\row
+\o \snippet doc/src/snippets/declarative/dynamicObjects-destroy.qml 0
+\o \snippet doc/src/snippets/declarative/SelfDestroyingRect.qml 0
+
+\endtable
+
+Alternatively, the \c application.qml could have destroyed the created object
+by calling \c object.destroy().
+
+Notice that if a \c SelfDestroyingRect instance was created statically like this:
+
+\qml
+Item {
+ SelfDestroyingRect { ... }
+}
+\endqml
+
+This would result in an error, since items can only be dynamically
+destroyed if they were dynamically created.
+
+Objects created with \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()}
+can similarly be destroyed using \c destroy():
+
+\snippet doc/src/snippets/declarative/createQmlObject.qml 0
+\snippet doc/src/snippets/declarative/createQmlObject.qml destroy
-Here, \c Rectangle objects are destroyed one second after they are created, which is long
-enough for the \c NumberAnimation to be played before the object is destroyed.
*/
diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc
index 0edd242ae8..c2930b365c 100644
--- a/doc/src/declarative/elements.qdoc
+++ b/doc/src/declarative/elements.qdoc
@@ -113,7 +113,7 @@ The following table lists the QML elements provided by the \l {QtDeclarative}{Qt
\row \o \l {Connections} \o Explicitly connects signals and signal handlers
\row \o \l {Component} \o Encapsulate QML items as a component
\row \o \l {Timer} \o Provides timed triggers
-\row \o \l {QtObject} \o Basic element containing only the objectName property
+\row \o \l {QML:QtObject} {QtObject} \o Basic element containing only the objectName property
\row \o \l {WorkerScript} \o Enables the use of threads in QML
\row \o \l {Loader} \o Controls the loading of items or components
\row \o \l {Repeater} \o Uses a model to create multiples of components
diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc
index 8a24228466..9929cfec10 100644
--- a/doc/src/declarative/examples.qdoc
+++ b/doc/src/declarative/examples.qdoc
@@ -175,6 +175,7 @@ The examples can be found in Qt's \c examples/declarative directory.
\list
\o \l{declarative/modelviews/gridview}{GridView}
\o \l{declarative/modelviews/listview}{ListView}
+\o \l{declarative/modelviews/pathview}{PathView}
\o \l{declarative/modelviews/package}{Package}
\o \l{declarative/modelviews/parallax}{Parallax}
\o \l{declarative/modelviews/visualitemmodel}{VisualItemModel}
@@ -202,6 +203,11 @@ The examples can be found in Qt's \c examples/declarative directory.
\o \l{declarative/threading/workerscript}{WorkerScript}
\endlist
+\section2 Screen orientation
+\list
+\o \l{declarative/screenorientation}{Example}
+\endlist
+
\section2 SQL Local Storage
\list
\o \l{declarative/sqllocalstorage}{Example}
diff --git a/doc/src/declarative/extending-tutorial.qdoc b/doc/src/declarative/extending-tutorial.qdoc
index 2cf00b9425..d128d0f77f 100644
--- a/doc/src/declarative/extending-tutorial.qdoc
+++ b/doc/src/declarative/extending-tutorial.qdoc
@@ -48,8 +48,9 @@ Tutorial chapters:
\o \l{declarative/tutorials/extending/chapter2-methods}{Connecting to C++ Methods and Signals}
\o \l{declarative/tutorials/extending/chapter3-bindings}{Adding Property Bindings}
\o \l{declarative/tutorials/extending/chapter4-customPropertyTypes}{Using Custom Property Types}
-\o \l{declarative/tutorials/extending/chapter5-plugins}{Writing an Extension Plugin}
-\o \l{qml-extending-tutorial6.html}{In Summary}
+\o \l{declarative/tutorials/extending/chapter5-listproperties}{Using List Property Types}
+\o \l{declarative/tutorials/extending/chapter6-plugins}{Writing an Extension Plugin}
+\o \l{qml-extending-tutorial7.html}{In Summary}
\endlist
*/
@@ -59,61 +60,94 @@ Tutorial chapters:
\example declarative/tutorials/extending/chapter1-basics
-Let's create a new QML type called "Musician" that has two properties: a name
-and an instrument. We will make it available in a \l {Modules}{module} called "Music", with
+A common task when extending QML is to provide a new QML type that supports some
+ custom functionality beyond what is provided by the built-in \l {QML Elements}.
+For example, this could be done to implement particular data models, or provide
+elements with custom painting and drawing capabilities, or access system features
+like network programming that are not accessible through built-in QML features.
+
+In this tutorial, we will show how to use the C++ classes in the QtDeclarative
+module to extend QML. The end result will be a simple Pie Chart display implemented by
+several custom QML types connected together through QML features like bindings and
+signals, and made available to the QML runtime through a plugin.
+
+To begin with, let's create a new QML type called "PieChart" that has two properties: a name
+and a color. We will make it available in a \l {Modules}{module} called "Charts", with
a module version of 1.0.
-We want this \c Musician type to be usable from QML like this:
+
+We want this \c PieChart type to be usable from QML like this:
\code
- import Music 1.0
+ import Charts 1.0
- Musician {
- name: "Reddy the Rocker"
- instrument: "Guitar"
+ PieChart {
+ width: 100; height: 100
+ name: "A simple pie chart"
+ color: "red"
}
\endcode
-To do this, we need a C++ class that encapsulates this \c Musician type and its two
-properties. Since QML relies heavily on Qt's \l{Meta-Object System}{meta object system},
+To do this, we need a C++ class that encapsulates this \c PieChart type and its two
+properties. Since QML makes extensive use of Qt's \l{Meta-Object System}{meta object system},
this new class must:
\list
-\o inherit from QObject
-\o declare its properties using the Q_PROPERTY() macro
+\o Inherit from QObject
+\o Declare its properties using the Q_PROPERTY macro
\endlist
-Here is our \c Musician class, defined in \c musician.h:
+Here is our \c PieChart class, defined in \c piechart.h:
-\snippet declarative/tutorials/extending/chapter1-basics/musician.h 0
+\snippet declarative/tutorials/extending/chapter1-basics/piechart.h 0
-It defines the two properties, \c name and \c instrument, with the Q_PROPERTY() macro.
-The class implementation in \c musician.cpp simply sets and returns the \c m_name and
-\c m_instrument values as appropriate.
+The class inherits from QDeclarativeItem because we want to override
+QDeclarativeItem::paint() in order to draw. If the class just represented some
+data type and was not an item that actually needed to be displayed, it could simply inherit
+from QObject. Or, if we want to extend the functionality of an existing QObject-based
+class, it could inherit from that class instead.
-Our QML file, \c app.qml, creates a \c Musician item and display the musician's details
+The \c PieChart class defines the two properties, \c name and \c color, with the Q_PROPERTY macro,
+and overrides QDeclarativeItem::paint(). The class implementation in \c piechart.cpp
+simply sets and returns the \c m_name and \c m_color values as appropriate, and
+implements \c paint() to draw a simple pie chart. It also turns off the
+QGraphicsItem::ItemHasNoContents flag to enable painting:
+
+\snippet declarative/tutorials/extending/chapter1-basics/piechart.cpp 0
+\dots 0
+\snippet declarative/tutorials/extending/chapter1-basics/piechart.cpp 1
+
+Now that we have defined the \c PieChart type, we will use it from QML. The \c app.qml
+file creates a \c PieChart item and display the pie chart's details
using a standard QML \l Text item:
\snippet declarative/tutorials/extending/chapter1-basics/app.qml 0
+Notice that although the color is specified as a string in QML, it is automatically
+converted to a QColor object for the PieChart \c color property. Automatic conversions are
+provided for various other \l {QML Basic Types}{basic types}; for example, a string
+like "640x480" can be automatically converted to a QSize value.
+
We'll also create a C++ application that uses a QDeclarativeView to run and
-display \c app.qml. The application must register the \c Musician type
+display \c app.qml. The application must register the \c PieChart type
using the qmlRegisterType() function, to allow it to be used from QML. If
-you don't register the type, \c app.qml won't be able to create a \c Musician.
+you don't register the type, \c app.qml won't be able to create a \c PieChart.
Here is the application \c main.cpp:
\snippet declarative/tutorials/extending/chapter1-basics/main.cpp 0
-This call to qmlRegisterType() registers the \c Musician type as a type called "Musician", in a module named "Music",
+This call to qmlRegisterType() registers the \c PieChart type as a type called "PieChart", in a module named "Charts",
with a module version of 1.0.
Lastly, we write a \c .pro project file that includes the files and the \c declarative library:
\quotefile declarative/tutorials/extending/chapter1-basics/chapter1-basics.pro
-Now we can build and run the application. Try it yourself with the code in Qt's \c examples/tutorials/extending/chapter1-basics directory.
+Now we can build and run the application:
-\example declarative/tutorials/extending/chapter1-basics
+\image extending-tutorial-chapter1.png
+
+Try it yourself with the code in Qt's \c examples/tutorials/extending/chapter1-basics directory.
At the moment, the \c app.qml is run from within a C++ application.
This may seem odd if you're used to running QML files with the \l {QML Viewer}.
@@ -128,39 +162,40 @@ Later on, we'll show how to create a plugin so that you can run \c app.qml using
\example declarative/tutorials/extending/chapter2-methods
-Suppose we want \c Musician to have a "perform" method that prints a message
-to the console and then emits a "performanceEnded" signal.
-Other elements would be able to call \c perform() and receive
-\c performanceEnded() signals like this:
+Suppose we want \c PieChart to have a "clearChart()" method that erases the
+chart and then emits a "chartCleared" signal. Our \c app.qml would be able
+to call \c clearChart() and receive \c chartCleared() signals like this:
\snippet declarative/tutorials/extending/chapter2-methods/app.qml 0
-To do this, we add a \c perform() method and a \c performanceEnded() signal
+\image extending-tutorial-chapter2.png
+
+To do this, we add a \c clearChart() method and a \c chartCleared() signal
to our C++ class:
-\snippet declarative/tutorials/extending/chapter2-methods/musician.h 0
+\snippet declarative/tutorials/extending/chapter2-methods/piechart.h 0
\dots
-\snippet declarative/tutorials/extending/chapter2-methods/musician.h 1
+\snippet declarative/tutorials/extending/chapter2-methods/piechart.h 1
\dots
-\snippet declarative/tutorials/extending/chapter2-methods/musician.h 2
+\snippet declarative/tutorials/extending/chapter2-methods/piechart.h 2
\dots
-\snippet declarative/tutorials/extending/chapter2-methods/musician.h 3
+\snippet declarative/tutorials/extending/chapter2-methods/piechart.h 3
-The use of Q_INVOKABLE makes the \c perform() method available to the
+The use of Q_INVOKABLE makes the \c clearChart() method available to the
Qt Meta-Object system, and in turn, to QML. Note that it could have
been declared as as a Qt slot instead of using Q_INVOKABLE, as
slots are also callable from QML. Both of these approaches are valid.
-The \c perform() method simply prints a message to the console and
-then emits \c performanceEnded():
+The \c clearChart() method simply changes the color to Qt::transparent,
+repaints the chart, then emits the \c chartCleared() signal:
-\snippet declarative/tutorials/extending/chapter2-methods/musician.cpp 0
+\snippet declarative/tutorials/extending/chapter2-methods/piechart.cpp 0
-Now when we run the application and click the window, the application outputs:
+Now when we run the application and click the window, the pie chart
+disappears, and the application outputs:
\code
- "Reddy the Rocker" is playing the "Guitar"
- The performance has now ended
+ The chart has been cleared
\endcode
Try out the example yourself with the updated code in Qt's \c examples/tutorials/extending/chapter2-methods directory.
@@ -174,45 +209,49 @@ Try out the example yourself with the updated code in Qt's \c examples/tutorials
Property bindings is a powerful feature of QML that allows values of different
elements to be synchronized automatically. It uses signals to notify and update
-other elements' values when property values change.
+other elements' values when property values are changed.
-Let's enable property bindings for the \c instrument property. That means
+Let's enable property bindings for the \c color property. That means
if we have code like this:
\snippet declarative/tutorials/extending/chapter3-bindings/app.qml 0
-The "instrument: reddy.instrument" statement binds the \c instrument value of
-\c craig to the \c instrument of \c reddy.
-Whenever \c reddy's \c instrument value changes, \c craig's \c instrument value
-updates to the same value. When the window is clicked, the application outputs:
+\image extending-tutorial-chapter3.png
-\code
- "Reddy the Rocker" is playing the "Guitar"
- "Craig the Copycat" is playing the "Guitar"
- "Reddy the Rocker" is playing the "Drums"
- "Craig the Copycat" is playing the "Drums"
-\endcode
+The "color: chartA.color" statement binds the \c color value of
+\c chartB to the \c color of \c chartA.
+Whenever \c chartA's \c color value changes, \c chartB's \c color value
+updates to the same value. When the window is clicked, the \c onClicked
+handler in the MouseArea changes the color of \c chartA, thereby changing
+both charts to the color blue.
-It's easy to enable property binding for the \c instrument property.
-We add a \l{Qt's Property System}{NOTIFY} feature to its Q_PROPERTY() declaration to indicate that a "instrumentChanged" signal
+It's easy to enable property binding for the \c color property.
+We add a \l{Qt's Property System}{NOTIFY} feature to its Q_PROPERTY() declaration to indicate that a "colorChanged" signal
is emitted whenever the value changes.
-\snippet declarative/tutorials/extending/chapter3-bindings/musician.h 0
+\snippet declarative/tutorials/extending/chapter3-bindings/piechart.h 0
\dots
-\snippet declarative/tutorials/extending/chapter3-bindings/musician.h 1
+\snippet declarative/tutorials/extending/chapter3-bindings/piechart.h 1
\dots
-\snippet declarative/tutorials/extending/chapter3-bindings/musician.h 2
+\snippet declarative/tutorials/extending/chapter3-bindings/piechart.h 2
\dots
-\snippet declarative/tutorials/extending/chapter3-bindings/musician.h 3
+\snippet declarative/tutorials/extending/chapter3-bindings/piechart.h 3
-Then, we emit this signal in \c setInstrument():
+Then, we emit this signal in \c setPieSlice():
-\snippet declarative/tutorials/extending/chapter3-bindings/musician.cpp 0
+\snippet declarative/tutorials/extending/chapter3-bindings/piechart.cpp 0
-It's important for \c setInstrument() to check that the instrument value has actually changed
-before emitting \c instrumentChanged(). This ensures the signal is not emitted unnecessarily and
+It's important for \c setColor() to check that the color value has actually changed
+before emitting \c colorChanged(). This ensures the signal is not emitted unnecessarily and
also prevents loops when other elements respond to the value change.
+The use of bindings is essential to QML. You should always add NOTIFY
+signals for properties if they are able to be implemented, so that your
+properties can be used in bindings. Properties that cannot be bound cannot be
+automatically updated and cannot be used as flexibly in QML. Also, since
+bindings are invoked so often and relied upon in QML usage, users of your
+custom QML types may see unexpected behavior if bindings are not implemented.
+
*/
/*!
@@ -220,21 +259,35 @@ also prevents loops when other elements respond to the value change.
\example declarative/tutorials/extending/chapter4-customPropertyTypes
-The \c Musician type currently has two properties that are both strings.
-It could have all sorts of other properties. For example, we could add an
-integer-type property to store the age of each musician:
+The \c PieChart type currently has a string-type property and a color-type property.
+It could have many other types of properties. For example, it could have an
+enum-type property to store a display mode for each chart:
\code
- class Musician : public QObject
+ // C++
+ class PieChart : public QDeclarativeItem
{
+ Q_ENUMS(DisplayMode)
+ Q_PROPERTY(DisplayMode displayMode READ displayMode WRITE setDisplayMode)
...
- Q_PROPERTY(int age READ age WRITE setAge)
+
public:
- ...
- int age() const;
- void setAge(int age);
+ enum DisplayMode {
+ MultiLevel,
+ Exploded,
+ ThreeDimensional
+ };
+
+ void setDisplayMode(DisplayMode mode);
+ DisplayMode displayMode() const;
...
};
+
+ // QML
+ PieChart {
+ ...
+ displayMode: PieChart.Exploded
+ }
\endcode
We can also use various other property types. QML has built-in support for the following
@@ -257,31 +310,39 @@ types:
If we want to create a property whose type is not supported by QML by default,
we need to register the type with QML.
-For example, let's change the type of the \c instrument property from a string to a
-new type called "Instrument". Instead of assigning a string value to \c instrument,
-we assign an \c Instrument value:
+For example, let's replace the use of the \c property with a type called
+"PieSlice" that has a \c color property. Instead of assigning a color,
+we assign an \c PieSlice value which itself contains a \c color:
\snippet declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml 0
-Like \c Musician, this new \c Instrument type has to inherit from QObject and declare
+Like \c PieChart, this new \c PieSlice type inherits from QDeclarativeItem and declares
its properties with Q_PROPERTY():
-\snippet declarative/tutorials/extending/chapter4-customPropertyTypes/instrument.h 0
+\snippet declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.h 0
-To use it from \c Musician, we modify the \c instrument property declaration
+To use it in \c PieChart, we modify the \c color property declaration
and associated method signatures:
-\snippet declarative/tutorials/extending/chapter4-customPropertyTypes/musician.h 0
+\snippet declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.h 0
\dots
-\snippet declarative/tutorials/extending/chapter4-customPropertyTypes/musician.h 1
+\snippet declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.h 1
\dots
-\snippet declarative/tutorials/extending/chapter4-customPropertyTypes/musician.h 2
+\snippet declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.h 2
\dots
-\snippet declarative/tutorials/extending/chapter4-customPropertyTypes/musician.h 3
+\snippet declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.h 3
+
+There is one thing to be aware of when implementing \c setPieSlice(). The \c PieSlice
+is a visual item, so it must be set as a child of the \c PieChart using
+QDeclarativeItem::setParentItem() so that the \c PieChart knows to paint this child
+item when its contents are drawn:
-Like the \c Musician type, the \c Instrument type has to be registered
-using qmlRegisterType() to be used from QML. As with \c Musician, we'll add the
-type to the "Music" module, version 1.0:
+\snippet declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp 0
+
+
+Like the \c PieChart type, the \c PieSlice type has to be registered
+using qmlRegisterType() to be used from QML. As with \c PieChart, we'll add the
+type to the "Charts" module, version 1.0:
\snippet declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp 0
\dots
@@ -293,15 +354,65 @@ Try it out with the code in Qt's \c examples/tutorials/extending/chapter4-custom
*/
+
+/*!
+\title Chapter 5: Using List Property Types
+
+\example declarative/tutorials/extending/chapter5-listproperties
+
+Right now, a \c PieChart can only have one \c PieSlice. Ideally a chart would
+have multiple slices, with different colors and sizes. To do this, we could
+have a \c slices property that accepts a list of \c PieSlice items:
+
+\snippet declarative/tutorials/extending/chapter5-listproperties/app.qml 0
+
+\image extending-tutorial-chapter5.png
+
+To do this, we replace the \c pieSlice property in \c PieChart with a \c slices property,
+declared as a QDeclarativeListProperty type. The QDeclarativeListProperty class enables the
+creation of list properties in QML extensions. We replace the \c pieSlice()
+function with a \c slices() function that returns a list of slices, and add
+an internal \c append_slice() function (discussed below). We also use a QList to
+store the internal list of slices as \c m_slices:
+
+\snippet declarative/tutorials/extending/chapter5-listproperties/piechart.h 0
+\dots
+\snippet declarative/tutorials/extending/chapter5-listproperties/piechart.h 1
+\dots
+\snippet declarative/tutorials/extending/chapter5-listproperties/piechart.h 2
+
+Although the \c slices property does not have an associated \c WRITE function,
+it is still modifiable because of the way QDeclarativeListProperty works.
+In the \c PieChart implementation, we implement \c PieChart::slices() to
+return a QDeclarativeListProperty value and indicate that the internal
+\c PieChart::append_slice() function is to be called whenever a request is made from QML
+to add items to the list:
+
+\snippet declarative/tutorials/extending/chapter5-listproperties/piechart.cpp 0
+
+The \c append_slice() function simply sets the parent item as before,
+and adds the new item to the \c m_slices list. As you can see, the append function for a
+QDeclarativeListProperty is called with two arguments: the list property, and
+the item that is to be appended.
+
+The \c PieSlice class has also been modified to include \c fromAngle and \c angleSpan
+properties and to draw the slice according to these values. This is a straightforward
+modification if you have read the previous pages in this tutorial, so the code is not shown here.
+
+The complete code can be seen in the updated \c examples/tutorials/extending/chapter5-listproperties directory.
+
+*/
+
+
/*!
-\title Chapter 5: Writing an Extension Plugin
+\title Chapter 6: Writing an Extension Plugin
-\example declarative/tutorials/extending/chapter5-plugins
+\example declarative/tutorials/extending/chapter6-plugins
-Currently the \c Musician and \c Instrument types are used by \c app.qml,
+Currently the \c PieChart and \c PieSlice types are used by \c app.qml,
which is displayed using a QDeclarativeView in a C++ application. An alternative
way to use our QML extension is to create a plugin library to make it available
-to the QML engine. This means we could load \c app.qml using the \l {QML Viewer}
+to the QML engine. This allows \c app.qml to be loaded with the \l {QML Viewer}
(or some other QML \l{Qt Declarative UI Runtime}{runtime} application) instead of writing a \c main.cpp file and
loading our own C++ application.
@@ -310,31 +421,31 @@ To create a plugin library, we need:
\list
\o A plugin class that registers our QML types
\o A project file that describes the plugin
-\o A "qmldir" file that tells the QML engine to load the plugin
+\o A \l{Writing a qmldir file}{qmldir} file that tells the QML engine to load the plugin
\endlist
-First, we create a plugin class named \c MusicPlugin. It subclasses QDeclarativeExtensionPlugin
+First, we create a plugin class named \c ChartsPlugin. It subclasses QDeclarativeExtensionPlugin
and registers our QML types in the inherited \l{QDeclarativeExtensionPlugin::}{registerTypes()} method. It also calls
Q_EXPORT_PLUGIN2 for Qt's \l{How to Create Qt Plugins}{plugin system}.
-Here is the \c MusicPlugin definition in \c musicplugin.h:
+Here is the \c ChartsPlugin definition in \c chartsplugin.h:
-\snippet declarative/tutorials/extending/chapter5-plugins/musicplugin.h 0
+\snippet declarative/tutorials/extending/chapter6-plugins/chartsplugin.h 0
-And its implementation in \c musicplugin.cpp:
+And its implementation in \c chartsplugin.cpp:
-\snippet declarative/tutorials/extending/chapter5-plugins/musicplugin.cpp 0
+\snippet declarative/tutorials/extending/chapter6-plugins/chartsplugin.cpp 0
Then, we write a \c .pro project file that defines the project as a plugin library
and specifies with DESTDIR that library files should be built into a "lib" subdirectory:
-\quotefile declarative/tutorials/extending/chapter5-plugins/chapter5-plugins.pro
+\quotefile declarative/tutorials/extending/chapter6-plugins/chapter6-plugins.pro
-Finally, we add a \c qmldir file that is automatically parsed by the QML engine.
-Here, we specify that a plugin named "chapter5-plugin" (the name
+Finally, we add a \l{Writing a qmldir file}{qmldir} file that is automatically parsed by the QML engine.
+In this file, we specify that a plugin named "chapter6-plugin" (the name
of the example project) can be found in the "lib" subdirectory:
-\quotefile declarative/tutorials/extending/chapter5-plugins/qmldir
+\quotefile declarative/tutorials/extending/chapter6-plugins/qmldir
Now we have a plugin, and instead of having a main.cpp and an executable, we can build
the project and then load the QML file in the \l {QML Viewer}:
@@ -345,15 +456,16 @@ the project and then load the QML file in the \l {QML Viewer}:
(On Mac OS X, you can launch the "QMLViewer" application instead.)
-Notice the "import Music 1.0" statement has disappeared from \c app.qml. This is
+Notice the "import Charts 1.0" statement has disappeared from \c app.qml. This is
because the \c qmldir file is in the same directory as \c app.qml: this is equivalent to
-having Musician.qml and Instrument.qml files inside the project directory, which could both
+having PieChart.qml and PieSlice.qml files inside the project directory, which could both
be used by \c app.qml without import statements.
*/
+
/*!
-\page qml-extending-tutorial6.html
-\title Chapter 6: In Summary
+\page qml-extending-tutorial7.html
+\title Chapter 7: In Summary
In this tutorial, we've shown the basic steps for creating a QML extension:
@@ -362,47 +474,33 @@ In this tutorial, we've shown the basic steps for creating a QML extension:
\o Add callable methods using Q_INVOKABLE or Qt slots, and connect to Qt signals with an \c onSignal syntax
\o Add property bindings by defining \l{Qt's Property System}{NOTIFY} signals
\o Define custom property types if the built-in types are not sufficient
+\o Define list property types using QDeclarativeListProperty
\o Create a plugin library by defining a Qt plugin and writing a \c qmldir file
\endlist
The \l {Extending QML in C++} reference documentation shows other useful features that can be added to
-QML extensions. For example, we could use \l{Object and List Property Types}{list properties} to allow multiple instruments for a \c Musician:
+QML extensions. For example, we could use \l{Default Property}{default properties} to allow
+slices to be added without using the \c slices property:
\code
- Musician {
- instruments: [
- Instrument { type: "Guitar" }
- Instrument { type: "Drums" }
- Instrument { type: "Keyboard" }
- ]
+ PieChart {
+ PieSlice { ... }
+ PieSlice { ... }
+ PieSlice { ... }
}
\endcode
-Or use \l{Default Property}{default properties} and avoid an
-\c instruments property altogether:
+Or randomly add and remove slices from time to time using \l{Property Value Sources}{property value sources}:
\code
- Musician {
- Instrument { type: "Guitar" }
- Instrument { type: "Drums" }
- Instrument { type: "Keyboard" }
- }
-\endcode
-
-Or even change the \c instrument of a \c Musician from time to time using \l{Property Value Sources}{property value sources}:
-
-\code
- Musician {
- InstrumentRandomizer on instrument {}
+ PieChart {
+ PieSliceRandomizer on slices {}
}
\endcode
See the \l{Extending QML in C++}{reference documentation} for more information.
-Additionally, \l {Integrating QML with existing Qt UI code} shows how to create
-and integrate with QML extensions that have drawing and graphical capabilities (through QGraphicsWidget).
-
*/
diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc
index 0dd5eb3d77..56ea165b42 100644
--- a/doc/src/declarative/focus.qdoc
+++ b/doc/src/declarative/focus.qdoc
@@ -73,12 +73,12 @@ See also the \l {Keys}{Keys attached property} and \l {KeyNavigation}{KeyNavigat
\section1 Querying the Active Focus Item
Whether or not an \l Item has \e {active focus} can be queried through the
-property \c {Item::focus}. For example, here we have a \l Text
+property \c {Item::activeFocus}. For example, here we have a \l Text
element whose text is determined by whether or not it has \e {active focus}.
\code
Text {
- text: focus ? "I have active focus!" : "I do not have active focus"
+ text: activeFocus ? "I have active focus!" : "I do not have active focus"
}
\endcode
@@ -174,7 +174,7 @@ Rectangle {
The right hand side of the example shows the expanded code - the equivalent QML
without the use of the component \c {MyWidget}. From this, the problem is
evident - there are no less than three elements that have the \c {Item::focus}
-property set to true. Ultimately only one element can have focus, and the
+property set to true. Ultimately only one element can have keyboard focus, and the
system has to decide which on. In this case the first appearance of the
\c {Item::focus} property being set to true on line 4 is selected, and the value
of \c {Item::focus} in the other two instances is reverted back to false. This
@@ -233,7 +233,7 @@ and the others are unset, just like when there are no \e {focus scopes}.
\o When a \e {focus scope} receives \e {active focus}, the contained element with
\c {Item::focus} set (if any) also gets \e {active focus}. If this element is
also a \l FocusScope, the proxying behaviour continues. Both the
-\e {focus scope} and the sub-focused item will have \c {Item::focus} set.
+\e {focus scope} and the sub-focused item will have \c {Item::activeFocus} set.
\endlist
So far the example has the second component statically selected. It is trivial
@@ -266,7 +266,7 @@ When a QML item explicitly relinquishes focus (by setting its
does not automatically select another element to receive focus. That is, it
is possible for there to be no currently \e {active focus}.
-See the {declarative/keyinteraction/focus}{Keyboard Focus example} for a
+See the \l{declarative/keyinteraction/focus}{Keyboard Focus example} for a
demonstration of moving keyboard focus between multiple areas using FocusScope
elements.
diff --git a/doc/src/declarative/javascriptblocks.qdoc b/doc/src/declarative/javascriptblocks.qdoc
index c41e38e910..18da3d212d 100644
--- a/doc/src/declarative/javascriptblocks.qdoc
+++ b/doc/src/declarative/javascriptblocks.qdoc
@@ -236,6 +236,31 @@ This restriction exists as the QML environment is not yet fully established.
To run code after the environment setup has completed, refer to
\l {Running JavaScript at Startup}.
+\o The value of \c this is currently undefined in QML
+
+The value of \c this is undefined in QML. To refer to any element, provide
+an \c id. For example:
+
+\qml
+Item {
+ width: 200; height: 100
+ function mouseAreaClicked(area) {
+ console.log("Clicked in area at: " + area.x + ", " + area.y);
+ }
+ // This will not work because this is undefined
+ MouseArea {
+ height: 50; width: 200
+ onClicked: mouseAreaClicked(this)
+ }
+ // This will pass area2 to the function
+ MouseArea {
+ id: area2
+ y: 50; height: 50; width: 200
+ onClicked: mouseAreaClicked(area2)
+ }
+}
+\endqml
+
\endlist
*/
diff --git a/doc/src/declarative/modules.qdoc b/doc/src/declarative/modules.qdoc
index 938222ac5d..9e51a40878 100644
--- a/doc/src/declarative/modules.qdoc
+++ b/doc/src/declarative/modules.qdoc
@@ -30,152 +30,277 @@
\title Modules
\section1 QML Modules
-A \bold {QML module} is a collection of QML types. They allow you to organize your QML content
-into independent units. Modules have an optional versioning mechanism that allows for independent
+
+A module is a set of QML content files that can be imported as a unit into a QML
+application. Modules can be used to organize QML content into independent units,
+and they can use a versioning mechanism that allows for independent
upgradability of the modules.
-There are two types of modules:
-location modules (defined by a URL),
-and
-installed modules (defined by a URI).
+While QML component files within the same directory are automatically accessible
+within the global namespace, components defined elsewhere must be imported
+explicitly using the \c import statement to import them as modules. For
+example, an \c import statement is required to use:
+
+\list
+\o A component defined in another QML file that is not in the same directory
+\o A component defined in a QML file located on a remote server
+\o A \l{QDeclarativeExtensionPlugin}{QML C++ plugin} library (unless the plugin is installed in the same directory)
+\o A JavaScript file (note this must be imported using \l {#namespaces}{named imports})
+\endlist
+
+An \c import statement includes the module name, and possibly a version number.
+This can be seen in the snippet commonly found at the top of QML files:
+
+\qml
+ import Qt 4.7
+\endqml
+
+This imports version 4.7 of the "Qt" module into the global namespace. (The QML
+library itself must be imported to use any of the \l {QML Elements}, as they
+are not included in the global namespace by default.)
+
+The \c Qt module is an \e installed module; it is found in the
+\l{The QML import path}{import path}. There are two types of QML modules:
+location modules (defined by a URL) and installed modules (defined by a URI).
+
+
+\section1 Location Modules
+
+Location modules can reside on the local filesystem or a network resource,
+and are referred to by a quoted location URL that specifies the filesystem
+or network URL. They allow any directory with QML content to be imported
+as a module, whether the directory is on the local filesystem or a remote
+server.
+
+For example, a QML project may have a separate directory for a set of
+custom UI components. These components can be accessed by importing the
+directory using a relative or absolute path, like this:
+
+\table
+\row
+\o Directory structure
+\o Contents of application.qml
+
+\row
+\o
+\code
+MyQMLProject
+ |- MyComponents
+ |- Slider.qml
+ |- CheckBox.qml
+ |- Main
+ |- application.qml
+\endcode
+
+\o
+\code
+import "../MyComponents"
+
+Slider { ... }
+CheckBox { ... }
+\endcode
+
+\endtable
-Location modules types are defined in QML files and \l{QDeclarativeExtensionPlugin}{QML C++ plugins}
-in a directory refered to directly by
-the location URL, either on the local filesystem, or as a network resource. The URL that locates them
-can be relative, in which case they actual URL is resolved by the QML file containing the import.
-When importing a location module, a quoted URL is used:
+Similarly, if the directory resided on a network source, it could
+be imported like this:
\code
-import "https://qml.nokia.com/qml/example" 1.0
-import "https://qml.nokia.com/qml/example" as NokiaExample
-import "mymodule" 1.0
-import "mymodule"
+ import "https://qml.nokia.com/qml/qmlcomponents"
+ import "https://qml.nokia.com/qml/qmlcomponents" 1.0
\endcode
-Installed modules can \e only be on the local file system or in application C++ code. Again they
-are defined in QML files and \l{QDeclarativeExtensionPlugin}{QML C++ plugins} in a directory,
-but the directory is indirectly referred to by the URI. The mapping to actual content is either
-by application C++ code registering a C++ type to a module URI (see \l{Extending QML in C++}),
-or in the referenced subdirectory of a path on the import path (see below).
-When importing a location module, an un-quoted URI is used:
+Remote location modules must have a \l{Writing a qmldir file}{qmldir file} in the
+same directory to specify which QML files should be made available. See the
+\l {#qmldirexample}{example} below. The qmldir file is optional for modules on
+the local filesystem.
+
+
+
+\section1 Installed modules
+
+
+Installed modules are modules that are installed on the
+local filesystem within the QML import path, or modules defined in C++
+application code. When importing an installed module, an un-quoted URI is
+used, with a mandatory version number:
\code
-import com.nokia.qml.mymodule 1.0
-import com.nokia.qml.mymodule as MyModule
+ import Qt 4.7
+ import com.nokia.qml.mymodule 1.0
\endcode
+Installed modules that are installed into the import path or created
+as a \l{QDeclarativeExtensionPlugin}{QML C++ plugin} must define a
+\l{Writing a qmldir file}{qmldir file}.
+
+
+\section2 The QML import path
-For either type of module, a \c qmldir file in the module directory defines the content of the module. This file is
-optional for location modules, but only for local filesystem content or a single remote content with a namespace.
-The second exception is explained in more detail in the section below on Namespaces.
+The QML engine will search the import path for a requested installed module.
+The default import path includes:
-\section2 The Import Path
+\list
+\o The directory of the current file
+\o The location specified by QLibraryInfo::ImportsPath
+\o Paths specified by the \c QML_IMPORT_PATH environment variable
+\endlist
-Installed modules are searched for on the import path.
-The \c -I option to the \l {QML Viewer} adds paths to the import path.
+The import path can be queried using QDeclarativeEngine::importPathList() and modified using QDeclarativeEngine::addImportPath().
-From C++, the path is available via \l QDeclarativeEngine::importPathList() and can be prepended to
-using \l QDeclarativeEngine::addImportPath().
+When running the \l {QML Viewer}, use the \c -I option to add paths to the import path.
-\section2 The \c qmldir File
-Installed QML modules and remote content without a namespace require a file \c qmldir which
-specifies the mapping from all type names to versioned QML files. It is a list of lines of the form:
+\section2 Creating installed modules in C++
+
+C++ applications can dynamically define installed modules using
+qmlRegisterType().
+
+For \l{QDeclarativeExtensionPlugin}{QML C++ plugins}, the
+module URI is automatically passed to QDeclarativeExtensionPlugin::registerTypes().
+The QDeclarativeExtensionPlugin documentation shows how to use this URI
+to call qmlRegisterType() to enable the plugin library to be built as
+an installed module. Once the plugin is built and installed, the module is importable
+in QML, like this:
+
+\code
+import com.nokia.TimeExample 1.0
+\endcode
+
+A \l{QDeclarativeExtensionPlugin}{QML C++ plugin} also requires a
+\l{Writing a qmldir file}{qmldir file} to make it available to the
+QML engine.
+
+
+
+\target namespaces
+\section1 Namespaces: Using Named Imports
+
+By default, when a module is imported, its contents are imported into the global namespace. You may choose to import the module into another namespace, either to allow identically-named types to be referenced, or purely for readability.
+
+To import a module into a specific namespace, use the \e as keyword:
+
+\qml
+ import Qt 4.7 as QtLibrary
+ import "../MyComponents" as MyComponents
+ import com.nokia.qml.mymodule 1.0 as MyModule
+\endqml
+
+Types from these modules can then only be used when qualified by the namespace:
+
+\qml
+ QtLibrary.Rectangle { ... }
+
+ MyComponents.Slider { ... }
+
+ MyModule.SomeComponent { ... }
+\endqml
+
+Multiple modules can be imported into the same namespace in the same way that multiple modules can be imported into the global namespace:
+
+\qml
+ import Qt 4.7 as Nokia
+ import Ovi 1.0 as Nokia
+\endqml
+
+\section2 JavaScript files
+
+JavaScript files must always be imported with a named import:
+
+\qml
+ import "somescript.js" as MyScript
+
+ Item {
+ //...
+ Component.onCompleted: MyScript.doSomething()
+ }
+\endqml
+
+
+
+\section1 Writing a qmldir file
+
+A \c qmldir file is a metadata file for a module that maps all type names in
+the module to versioned QML files. It is required for installed modules, and
+location modules that are loaded from a network source.
+
+It is defined by a plain text file named "qmldir" that contains one or more lines of the form:
\code
# <Comment>
<TypeName> [<InitialVersion>] <File>
-internal <Name> <File>
+internal <TypeName> <File>
plugin <Name> [<Path>]
\endcode
-# <Comment> lines are ignored, and can be used for comments.
+\bold {# <Commment>} lines are used for comments. They are ignored by the QML engine.
-<TypeName> <InitialVersion> <File> lines are used to add QML files as types.
-<TypeName> is the type being made available; the optional <InitialVersion> is a version
-number like \c 4.0; <File> is the (relative)
-file name of the QML file defining the type.
+\bold {<TypeName> [<InitialVersion>] <File>} lines are used to add QML files as types.
+<TypeName> is the type being made available, the optional <InitialVersion> is a version
+number, and <File> is the (relative) file name of the QML file defining the type.
Installed files do not need to import the module of which they are a part, as they can refer
to the other QML files in the module as relative (local) files, but
if the module is imported from a remote location, those files must nevertheless be listed in
the \c qmldir file. Types which you do not wish to export to users of your module
-may be marked with the \c internal keyword: \c internal <TypeName> <File>.
+may be marked with the \c internal keyword: \bold {internal <TypeName> <File>}.
The same type can be provided by different files in different versions, in which
case later versions (eg. 1.2) must precede earlier versions (eg. 1.0),
since the \e first name-version match is used and a request for a version of a type
can be fulfilled by one defined in an earlier version of the module. If a user attempts
to import a version earlier than the earliest provided or later than the latest provided,
-an error results, but if the user imports a version within the range of versions provided,
-even if no type is specific to that version, no error results.
+the import produces a runtime error, but if the user imports a version within the range of versions provided,
+even if no type is specific to that version, no error will occur.
A single module, in all versions, may only be provided in a single directory (and a single \c qmldir file).
If multiple are provided, only the first in the search path will be used (regardless of whether other versions
are provided by directories later in the search path).
-Installed and remote files without a namespace \e must be referred to by version information described above,
-local files \e may have it.
-
The versioning system ensures that a given QML file will work regardless of the version
of installed software, since a versioned import \e only imports types for that version,
leaving other identifiers available, even if the actual installed version might otherwise
provide those identifiers.
-\c plugin <Name> [<Path>] lines are used to add \l{QDeclarativeExtensionPlugin}{QML C++ plugins}
-to the module.
-
-<Name> is the name of the library. It is usually not the same as the file name
-of the plugin binary, which is platform dependent; e.g. the library MyAppTypes would produce
-a libMyAppTypes.so on Linux and MyAppTypes.dll on Windows.
-By default the engine searches for the plugin library in the directory containing the \c qmldir
-file. The \c -P option to the \l {QML Viewer} adds paths to the
-plugin search path.
-From C++, the path is available via \l QDeclarativeEngine::pluginPathList() and can be prepended to
-using \l QDeclarativeEngine::addPluginPath().
+\bold {plugin <Name> [<Path>]} lines are used to add \l{QDeclarativeExtensionPlugin}{QML C++ plugins} to the module. <Name> is the name of the library. It is usually not the same as the file name
+of the plugin binary, which is platform dependent; e.g. the library \c MyAppTypes would produce
+\c libMyAppTypes.so on Linux and \c MyAppTypes.dll on Windows.
<Path> is an optional argument specifying either an absolute path to the directory containing the
plugin file, or a relative path from the directory containing the \c qmldir file to the directory
-containing the plugin file.
-
+containing the plugin file. By default the engine searches for the plugin library in the directory that contains the \c qmldir
+file. The plugin search path can be queried with QDeclarativeEngine::pluginPathList() and modified using QDeclarativeEngine::addPluginPath(). When running the \l {QML Viewer}, use the \c -P option to add paths to the plugin search path.
-\section2 Namespaces - Named Imports
-When importing content it by default imports types into the global namespace.
-You may choose to import the module into another namespace, either to allow identically-named
-types to be referenced, or purely for readability.
+\target qmldirexample
+\section2 Example
-To import a module into a namespace:
+If the components in the \c MyComponents directory from the
+\l{Location Modules}{earlier example} were to be made available as a network resource,
+the directory would need to contain a \c qmldir file similar to this:
\code
-import Qt 4.7 as TheQtLibrary
+ComponentA 1.0 ComponentA.qml
+ComponentB 1.0 ComponentB.qml
\endcode
-Types from the Qt 4.7 module may then be used, but only by qualifying them with the namespace:
+The \c MyComponents directory could then be imported as a module using:
\code
-TheQtLibrary.Rectangle { ... }
-\endcode
-
-Multiple modules can be imported into the same namespace in the same way that multiple
-modules can be imported into the global namespace:
+import "http://the-server-name.com/MyComponents"
-\code
-import Qt 4.7 as Nokia
-import Ovi 1.0 as Nokia
+Slider { ... }
+CheckBox { ... }
\endcode
-While import statements are needed to make any types available in QML, the directory of the
-current file is implicitly loaded. This is the exact same as if you had added 'import "."' to
-the start of every QML file. The effect of this is that you can automatically use types defined in C++ plugins
-or QML files if they reside in the same directory. This is the last location searched for types - so if you
-happen to have a "Text.qml" file, or "text.qml" on case-insensitive file systems, it will not override
-the one from Qt if you import Qt.
-
-*/
+with an optional "1.0" version specification. Notice the import fails if
+a later version is used, as the \c qmldir file specifies that these elements
+are only available in the 1.0 version.
-/*
-Original requirement is QT-558.
+For examples of \c qmldir files for plugins, see the
+\l {declarative/cppextensions/plugins}{Plugins} example and
+\l {Tutorial: Writing QML extensions with C++}.
*/
+/
diff --git a/doc/src/declarative/pics/anatomy-component.png b/doc/src/declarative/pics/anatomy-component.png
index 70ed983d9a..6125b0091c 100644
--- a/doc/src/declarative/pics/anatomy-component.png
+++ b/doc/src/declarative/pics/anatomy-component.png
Binary files differ
diff --git a/doc/src/declarative/pics/extending-tutorial-chapter1.png b/doc/src/declarative/pics/extending-tutorial-chapter1.png
new file mode 100644
index 0000000000..9f5836b09c
--- /dev/null
+++ b/doc/src/declarative/pics/extending-tutorial-chapter1.png
Binary files differ
diff --git a/doc/src/declarative/pics/extending-tutorial-chapter2.png b/doc/src/declarative/pics/extending-tutorial-chapter2.png
new file mode 100644
index 0000000000..5c8f222aad
--- /dev/null
+++ b/doc/src/declarative/pics/extending-tutorial-chapter2.png
Binary files differ
diff --git a/doc/src/declarative/pics/extending-tutorial-chapter3.png b/doc/src/declarative/pics/extending-tutorial-chapter3.png
new file mode 100644
index 0000000000..825553fc5f
--- /dev/null
+++ b/doc/src/declarative/pics/extending-tutorial-chapter3.png
Binary files differ
diff --git a/doc/src/declarative/pics/extending-tutorial-chapter5.png b/doc/src/declarative/pics/extending-tutorial-chapter5.png
new file mode 100644
index 0000000000..0c2e69e1b4
--- /dev/null
+++ b/doc/src/declarative/pics/extending-tutorial-chapter5.png
Binary files differ
diff --git a/doc/src/declarative/qdeclarativedocument.qdoc b/doc/src/declarative/qdeclarativedocument.qdoc
index a2ed205d45..068297a3d7 100644
--- a/doc/src/declarative/qdeclarativedocument.qdoc
+++ b/doc/src/declarative/qdeclarativedocument.qdoc
@@ -73,51 +73,61 @@ document - such as \c Rectangle and \c ListView - including those made within an
import statements. QML does not import any modules by default, so at least one \c import
statement must be present or no elements will be available!
+Each \c id value in a QML document must be unique within that document. They
+do not need to be unique across different documents as id values are
+resolved according to the document scope.
+
+
+\section1 Documents as Component Definitions
+
A QML document defines a single, top-level \l {QDeclarativeComponent}{QML component}. A QML component
is a template that is interpreted by the QML runtime to create an object with some predefined
behaviour. As it is a template, a single QML component can be "run" multiple times to
produce several objects, each of which are said to be \e instances of the component.
Once created, instances are not dependent on the component that created them, so they can
-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.
+operate on independent data. Here is an example of a simple "Button" component (defined
+in a \c Button.qml file) that is instantiated four times by \c application.qml.
+Each instance is created with a different value for its \c text property:
-\raw HTML
-<table><tr><td>
-\endraw
-\code
+\table
+\row
+\o Button.qml
+\o application.qml
+
+\row
+\o \snippet doc/src/snippets/declarative/qmldocuments.qml 0
+\o
+\qml
import Qt 4.7
-BorderImage {
- property alias text: textElement.text
- width: 100; height: 30; source: "images/toolbutton.sci"
-
- Text {
- id: textElement
- anchors.centerIn: parent
- font.pointSize: 20
- style: Text.Raised
- color: "white"
- }
+Column {
+ spacing: 10
+
+ Button { text: "Apple" }
+ Button { text: "Orange" }
+ Button { text: "Pear" }
+ Button { text: "Grape" }
}
-\endcode
-\raw HTML
-</td> <td>
-\endraw
+\endqml
+
\image anatomy-component.png
-\raw HTML
-</td> </tr> </table>
-\endraw
+
+\endtable
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
+where <Name> is the new element name, and begins with an \bold 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
+These QML component files automatically become available as new QML element types
to other QML components and applications in the same directory.
+
+
+\section1 Inline Components
+
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
diff --git a/doc/src/declarative/qdeclarativei18n.qdoc b/doc/src/declarative/qdeclarativei18n.qdoc
index b6e6c6e72d..70a3587cf5 100644
--- a/doc/src/declarative/qdeclarativei18n.qdoc
+++ b/doc/src/declarative/qdeclarativei18n.qdoc
@@ -80,5 +80,5 @@ qmlviewer -translation hello.qm hello.qml
\endcode
-You can see a complete example and source code in the {declarative/i18n}{QML Internationalization example}.
+You can see a complete example and source code in the \l{declarative/i18n}{QML Internationalization example}.
*/
diff --git a/doc/src/declarative/qdeclarativeintro.qdoc b/doc/src/declarative/qdeclarativeintro.qdoc
index 9126a79af6..fa42f5944a 100644
--- a/doc/src/declarative/qdeclarativeintro.qdoc
+++ b/doc/src/declarative/qdeclarativeintro.qdoc
@@ -87,6 +87,10 @@ Rectangle { width: 100; height: 100 }
When multiple property/value pairs are specified on a single line, they
must be separated by a semicolon.
+The \c import statement imports the \c Qt \l{QML Modules}{module}, which contains all of the
+standard \l {QML Elements}. Without this import statement, the \l Rectangle
+and \l Image elements would not be available.
+
\section1 Expressions
In addition to assigning values to properties, you can also assign
@@ -129,7 +133,7 @@ Commenting in QML is similar to JavaScript.
\o Multiline comments start with /* and finish with *\/
\endlist
-\quotefile doc/src/snippets/declarative/comments.qml
+\snippet doc/src/snippets/declarative/comments.qml 0
Comments are ignored by the engine. They are useful for explaining what you
are doing; for referring back to at a later date, or for others reading
@@ -181,7 +185,8 @@ Item {
\section3 The \c id property
-Each object can be given a special unique property called an \e id. Assigning an id enables the object
+Each object can be given a special unique property called an \e id. No other object within the
+same \l{QML Documents}{QML document} can have the same \c id value. Assigning an id enables the object
to be referred to by other objects and scripts.
The first Rectangle element below has an \e id, "myRect". The second Rectange element defines its
@@ -314,7 +319,7 @@ Item {
\section2 Signal Handlers
-Signal handlers allow actions to be taken in reponse to an event. For instance,
+Signal handlers allow actions to be taken in response to an event. For instance,
the \l MouseArea element has signal handlers to handle mouse press, release
and click:
diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc
index b44e6f233f..173002a7d2 100644
--- a/doc/src/declarative/qdeclarativemodels.qdoc
+++ b/doc/src/declarative/qdeclarativemodels.qdoc
@@ -208,7 +208,10 @@ Models can be defined in C++ and then made available to QML. This is useful
for exposing existing C++ data models or otherwise complex datasets to QML.
A C++ model class can be defined as a QStringList, a QList<QObject*> or a
-QAbstractItemModel.
+QAbstractItemModel. The first two are useful for exposing simpler datasets,
+while QAbstractItemModel provides a more flexible solution for more complex
+models.
+
\section2 QStringList
@@ -268,7 +271,10 @@ the model by calling QDeclarativeContext::setContextProperty() again.
\section2 QAbstractItemModel
-A model can be defined by subclassing QAbstractItemModel.
+A model can be defined by subclassing QAbstractItemModel. This is the
+best approach if you have a more complex model that cannot be supported
+by the other approaches. A QAbstractItemModel can also automatically
+notify a QML view when the model data has changed.
The roles of a QAbstractItemModel subclass can be exposed to QML by calling
QAbstractItemModel::setRoleNames(). The default role names set by Qt are:
@@ -305,6 +311,12 @@ roles:
\snippet examples/declarative/modelviews/abstractitemmodel/view.qml 0
+QML views are automatically updated when the model changes. Remember the model
+must follow the standard rules for model changes and notify the view when
+the model has changed by using QAbstractItemModel::dataChanged(),
+QAbstractItemModel::beginInsertRows(), etc. See the \l {Model subclassing reference} for
+more information.
+
The complete example is available in Qt's \l {declarative/modelviews/abstractitemmodel}{examples/declarative/modelviews/abstractitemmodel} directory.
QAbstractItemModel presents a hierarchy of tables, but the views currently provided by QML
@@ -429,4 +441,77 @@ Rectangle {
}
\endcode
+\section1 Accessing Views and Models from Delegates
+
+You can access the view for which a delegate is used, and its
+properties, by using ListView.view in a delegate on a ListView, or
+GridView.view in a delegate on a GridView, etc. In particular, you can
+access the model and its properties by using ListView.view.model.
+
+This is useful when you want to use the same delegate for a number of
+views, for example, but you want decorations or other features to be
+different for each view, and you would like these different settings to
+be properties of each of the views. Similarly, it might be of interest
+to access or show some properties of the model.
+
+In the following example, the delegate shows the property \e{language}
+of the model, and the color of one of the fields depends on the
+property \e{fruit_color} of the view.
+
+\code
+Rectangle {
+ width: 200; height: 200
+
+ ListModel {
+ id: fruitModel
+ property string language: "en"
+ ListElement {
+ name: "Apple"
+ cost: 2.45
+ }
+ ListElement {
+ name: "Orange"
+ cost: 3.25
+ }
+ ListElement {
+ name: "Banana"
+ cost: 1.95
+ }
+ }
+
+ Component {
+ id: fruitDelegate
+ Row {
+ Text { text: " Fruit: " + name; color: ListView.view.fruit_color }
+ Text { text: " Cost: $" + cost }
+ Text { text: " Language: " + ListView.view.model.language }
+ }
+ }
+
+ ListView {
+ property color fruit_color: "green"
+ model: fruitModel
+ delegate: fruitDelegate
+ anchors.fill: parent
+ }
+}
+\endcode
+
+Another important case is when some action (e.g. mouse click) in the
+delegate should update data in the model. In this case you can define
+a function in the model, e.g.:
+
+\code
+ setData(int row, const QString & field_name, QVariant new_value),
+\endcode
+
+...and call it from the delegate using:
+
+\code
+ ListView.view.model.setData(index, field, value)
+\endcode
+
+...assuming that \e{field} holds the name of the field which should be
+updated, and that \e{value} holds the new value.
+
*/
diff --git a/doc/src/declarative/qdeclarativestates.qdoc b/doc/src/declarative/qdeclarativestates.qdoc
index 6461925548..0b917561a6 100644
--- a/doc/src/declarative/qdeclarativestates.qdoc
+++ b/doc/src/declarative/qdeclarativestates.qdoc
@@ -32,57 +32,174 @@
\section1 Overview
-QML states typically describe user interface configurations, including:
+User interfaces are designed to present different interface configurations in
+different scenarios, or to modify their appearances in response to user
+interaction. Often, there are a set of changes that are made concurrently, such
+that the interface could be seen to be internally changing from one \e state to
+another.
+
+This applies generally to interface elements regardless of their complexity.
+A photo viewer may initially present images in a grid, and when an image is
+clicked, change to a "detailed" state where the individual image is expanded
+and the interface is changed to present new options for image editing. On the
+other end of the scale, when a simple button is pressed, it may change to a
+"pressed" state in which its color and position is modified to give a pressed
+appearance.
+
+In QML, any object can change between different \e states to apply sets of
+changes that modify the properties of relevant items. Each \e state could
+present a different configuration that could, for example:
+
\list
-\o What UI elements are present
-\o The properties of those elements (including how they behave)
-\o What actions are available
+\o Show some UI elements and hide others
+\o Present different available actions to the user
+\o Start, stop or pause animations
+\o Execute some script required in the new state
+\o Change a property value for a particular item
+\o Show a different view or "screen"
\endlist
-A state can also be thought of as a set of batched changes from a default configuration.
+Changes between states can be animated using \l {Transitions}{transitions}, as
+discussed further below.
-Examples of states in modern UI:
-\list
-\o An Address Book application with a 'View Contact' state and an 'Edit Contact' State. In the first state the contact information presented is read-only (using labels), and in the second it is editable (using editors).
-\o A button with a pressed and unpressed state. When pressed the text moves slightly down and to the right, and the button has a slightly darker appearance.
-\endlist
+All \l {Item}-based objects have a \e {default state}, and can specify additional
+states by adding new \l State objects to the item's \l {Item::}{states}
+property. Each state has a \e name that is unique for all states within that
+item; the default state's name is an empty string. To change the current state
+of an item, set the \l {Item::}{state} property to the name of the state.
+
+Non-Item objects can use states through the StateGroup element.
-\section1 States in QML
-In QML:
+\section1 Creating states
+
+To create a state, add a \l State object to the item's \l {Item::}{states} property,
+which holds a list of states for that item.
+
+Following is an example. Here, the \l Rectangle is initially placed in the
+default (0, 0) position. It has defined an additional state named "moved", in
+which a PropertyChanges object repositions the rectangle to (50, 50). Clicking
+within the MouseArea changes the state to the "moved" state, thus moving the \l
+Rectangle.
+
+\snippet doc/src/snippets/declarative/states.qml 0
+
+A \l State item defines all the changes to be made in the new state. You
+could specify additional properties to be changed, or create additional
+PropertyChanges for other objects. (Note that a \l State can modify the
+properties of other objects, not just the object that owns the state.)
+
+For example:
+
+\qml
+State {
+ name: "moved"
+ PropertyChanges { target: myRect; x: 50; y: 50; color: "blue" }
+ PropertyChanges { target: someOtherItem; width: 1000 }
+}
+\endqml
+
+A \l State is not limited to performing modifications on property values. It
+can also:
+
\list
-\o Any object can use states.
-\o There is a default state. The default state can be explicitly set.
-\o A state can affect the properties of other objects, not just the object owning the state (and not just that object's children).
+\o Run some script using StateChangeScript
+\o Override an existing signal handler for an object using PropertyChanges
+\o Re-parent an \l Item using ParentChanges
+\o Modify anchor values using AnchorChanges
\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.
+The \l {declarative/animation/states}{States and Transitions example}
+demonstrates how to declare a basic set of states and apply animated
+transitions between them.
-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.
-\snippet doc/src/snippets/declarative/states.qml 0
-\snippet doc/src/snippets/declarative/states.qml 1
+\section1 The default state
-State changes can be animated using \l{state-transitions}{Transitions}.
+Of course, the \l Rectangle in the example above could have simply been moved
+by setting its position to (50, 50) in the mouse area's \c onClicked handler.
+However, aside from enabling batched property changes, the use of states allows
+an item to revert to its \e {default state}, which contains all of the items'
+initial property values before they were modified in a state change.
-For example, adding this code to the above \c Item element animates the transition to the "moved" state:
+The default state is specified by an empty string. If the MouseArea in the
+above example was changed to this:
-\snippet doc/src/snippets/declarative/states.qml transitions
+\qml
+MouseArea {
+ anchors.fill: parent
+ onClicked: myRect.state == 'moved' ? myRect.state = "" : myRect.state = 'moved';
+}
+\endqml
-See \l{state-transitions}{Transitions} for more information.
+This would toggle the \l Rectangle's state between the \e moved and \e default
+states when clicked. The properties can be reverted to their initial
+values without requiring the definition of another \l State that defines these
+value changes.
-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
-\endlist
+\section1 The "when" property
+
+The \l {State::}{when} property is useful for specifying when a state should be
+applied. This can be set to an expression that evaluates to \c true when an
+item should change to a particular state.
+
+If the above example was changed to this:
+
+\qml
+Rectangle {
+ ...
+
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ }
+
+ states: State {
+ name: "moved"; when: mouseArea.pressed
+ ...
+ }
+\endqml
+
+The \l Rectangle would automatically change to the \e moved state when the
+mouse is pressed, and revert to the default state when it is released. This is
+simpler (and a better, more declarative method) than creating \c onPressed
+and \c onReleased handlers in the MouseArea to set the current state.
+
+
+\section1 Animating state changes
+
+
+State changes can be easily animated through \l {Transitions}{transitions}. A
+\l Transition defines the animations that should be applied when an item
+changes from one state to another.
+
+If the above example was modified to include the following \l Transition, the
+movement of the \l Rectangle would be animated:
+
+\qml
+Rectangle {
+ ...
+
+ MouseArea { ... }
+
+ states: [
+ ...
+ ]
+
+ transitions: [
+ Transition {
+ NumberAnimation { properties: "x,y"; duration: 500 }
+ }
+ ]
+ }
+\endqml
+
+This \l Transition defines that if any \c x or \c y properties have changed
+during a state change within this item, their values should be animated over 500
+millliseconds.
-The {declarative/animation/states}{States and Transitions example} demonstrates how to declare a basic set of states and then apply animated transitions between them.
+See the \l Transitions documentation for more information.
*/
diff --git a/doc/src/declarative/qmlviewer.qdoc b/doc/src/declarative/qmlviewer.qdoc
index 5efc0ceb1b..41c4c80a2e 100644
--- a/doc/src/declarative/qmlviewer.qdoc
+++ b/doc/src/declarative/qmlviewer.qdoc
@@ -197,10 +197,10 @@ Rectangle {
\o \c runtime.orientation
\o This property indicates the current orientation of the QML Viewer. On the
-N900 platform, this property automatically updates to reflect the device's
-actual orientation; on other platforms, this indicates the orientation currently
-selected in the QML Viewer's \e {Settings -> Properties} menu. The
-\c orientation value can be one of the following:
+N900 platform and most S60 5.0-based or newer Symbian devices, this property
+automatically updates to reflect the device's actual orientation; on other platforms,
+this indicates the orientation currently selected in the QML Viewer's
+\e {Settings -> Properties} menu. The \c orientation value can be one of the following:
\list
\o \c Orientation.Portrait
diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc
index fb50286864..413eb59118 100644
--- a/doc/src/declarative/qtdeclarative.qdoc
+++ b/doc/src/declarative/qtdeclarative.qdoc
@@ -70,13 +70,23 @@
Returns the QML type id.
- Example: Register the C++ class \c MinehuntGame as the QML type
- named \c Game for version 0.1 in the import library \c MinehuntCore:
+ For example, this registers a C++ class \c MySliderItem as a QML type
+ named \c Slider for version 1.0 of a \l{QML Modules}{module} called
+ "com.mycompany.qmlcomponents":
\code
- qmlRegisterType<MinehuntGame>("MinehuntCore", 0, 1, "Game");
+ qmlRegisterType<MySliderItem>("com.mycompany.qmlcomponents", 1, 0, "Slider");
\endcode
+ Once this is registered, the type can be used in QML by importing the
+ specified module name and version number:
+
+ \qml
+ imoprt com.mycompany.qmlcomponents 1.0
+
+ Slider { ... }
+ \endqml
+
Note that it's perfectly reasonable for a library to register types to older versions
than the actual version of the library. Indeed, it is normal for the new library to allow
QML written to previous versions to continue to work, even if more advanced versions of
diff --git a/doc/src/declarative/tutorial.qdoc b/doc/src/declarative/tutorial.qdoc
index 7a97eb19a0..f913d44e5a 100644
--- a/doc/src/declarative/tutorial.qdoc
+++ b/doc/src/declarative/tutorial.qdoc
@@ -222,5 +222,5 @@ This is equivalent to writing the two transitions separately.
The \l ParallelAnimation element makes sure that the two types of animations (number and color) start at the same time.
We could also run them one after the other by using \l SequentialAnimation instead.
-For more details on states and transitions, see \l {QML States} and the {declarative/animation/states}{states and transitions example}.
+For more details on states and transitions, see \l {QML States} and the \l{declarative/animation/states}{states and transitions example}.
*/
diff --git a/doc/src/examples/fingerpaint.qdoc b/doc/src/examples/fingerpaint.qdoc
index f438082e9f..4b6257063f 100644
--- a/doc/src/examples/fingerpaint.qdoc
+++ b/doc/src/examples/fingerpaint.qdoc
@@ -26,11 +26,11 @@
****************************************************************************/
/*!
- \example multitouch/fingerpaint
+ \example touch/fingerpaint
\title Finger Paint Example
- The Finger Paint example shows the use of multi-touch with a custom widget
+ The Finger Paint example shows the use of touch with a custom widget
to create a simple painting application.
- \image multitouch-fingerpaint-example.png
+ \image touch-fingerpaint-example.png
*/
diff --git a/doc/src/examples/movie.qdoc b/doc/src/examples/movie.qdoc
index 733f52dcc0..4d7b3e0cbc 100644
--- a/doc/src/examples/movie.qdoc
+++ b/doc/src/examples/movie.qdoc
@@ -30,8 +30,8 @@
\title Movie Example
The Movie example demonstrates how to use QMovie and QLabel to
- display animations. Now that Qt comes with \l{Phonon
- Overview}{Phonon} (the multimedia framework), QMovie is mostly
+ display animations. Now that Qt comes with the \l{Phonon multimedia
+ framework} {Phonon multimedia framework}, QMovie is mostly
useful if one wants to play a simple animation without the added
complexity of a multimedia framework to install and deploy.
diff --git a/doc/src/examples/pinchzoom.qdoc b/doc/src/examples/pinchzoom.qdoc
index e09123017e..198cbb38d9 100644
--- a/doc/src/examples/pinchzoom.qdoc
+++ b/doc/src/examples/pinchzoom.qdoc
@@ -26,11 +26,11 @@
****************************************************************************/
/*!
- \example multitouch/pinchzoom
+ \example touch/pinchzoom
\title Pinch Zoom Example
- The Pinch Zoom example shows how to use low-level multi-touch information
+ The Pinch Zoom example shows how to use low-level touch information
to recognize a gesture.
- \image multitouch-pinchzoom-example.png
+ \image touch-pinchzoom-example.png
*/
diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc
index ce5367705d..8d3aa258cc 100644
--- a/doc/src/examples/qml-examples.qdoc
+++ b/doc/src/examples/qml-examples.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \title Animation: Basics
+ \title Animation: Basics Example
\example declarative/animation/basics
This example shows how to create and combine \l{QML Animation}{animations} in QML.
@@ -47,7 +47,7 @@
*/
/*!
- \title Animation: Behaviors
+ \title Animation: Behavior Examples
\example declarative/animation/behaviors
This example shows how to use QML behaviors.
@@ -56,7 +56,7 @@
*/
/*!
- \title Animation: Easing
+ \title Animation: Easing Example
\example declarative/animation/easing
This example shows the different easing modes available for \l{QML Animation}{animations}.
@@ -65,7 +65,7 @@
*/
/*!
- \title Animation: States
+ \title Animation: States Example
\example declarative/animation/states
These examples show how to use \l{States}{states} and \l{Transitions}{transitions}.
@@ -89,7 +89,7 @@
*/
/*!
- \title Image Elements: Border Image
+ \title Image Elements: Border Image Example
\example declarative/imageelements/borderimage
These examples show how to use the BorderImage element.
@@ -110,7 +110,7 @@
*/
/*!
- \title Image Elements: Image
+ \title Image Elements: Image Example
\example declarative/imageelements/image
This example shows how to use the \l Image element and its \l{Image::fillMode}{fillModes}.
@@ -147,7 +147,7 @@
*/
/*!
- \title C++ Extensions: Plugins
+ \title C++ Extensions: Plugins Example
\example declarative/cppextensions/plugins
This example shows how to create a C++ plugin extension by subclassing QDeclarativeExtensionPlugin.
@@ -156,7 +156,7 @@
*/
/*!
- \title LayoutItem
+ \title LayoutItem Example
\example declarative/cppextensions/qgraphicslayouts/layoutitem
This example show how to use the LayoutItem element to integrate QML items into an existing
@@ -165,7 +165,7 @@
\image qml-layoutitem-example.png
*/
/*!
- \title QGraphicsGridLayout
+ \title QGraphicsGridLayout Example
\example declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout
This example shows how to use QGraphicsGridLayout to lay out QML items. This is
@@ -175,7 +175,7 @@
\image qml-qgraphicsgridlayout-example.png
*/
/*!
- \title QGraphicsLinearLayout
+ \title QGraphicsLinearLayout Example
\example declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout
This example shows how to use QGraphicsLinearLayout to lay out QML items. This is
@@ -185,8 +185,8 @@
\image qml-qgraphicslinearlayout-example.png
*/
/*!
+ \title C++ Extensions: QGraphicsLayouts examples
\page declarative-cppextensions-qgraphicslayouts.html
- \title C++ Extensions: QGraphicsLayouts
These examples show how to integrate \l{Graphics View Framework}{Graphics View}
layout components with QML:
@@ -202,7 +202,7 @@
*/
/*!
- \title C++ Extensions: QWidgets
+ \title C++ Extensions: QWidgets Example
\example declarative/cppextensions/qwidgets
This example shows how to embed QWidget-based objects into QML using QGraphicsProxyWidget.
@@ -211,7 +211,7 @@
*/
/*!
- \title C++ Extensions: Image Provider
+ \title C++ Extensions: Image Provider Example
\example declarative/cppextensions/imageprovider
This examples shows how to use QDeclarativeImageProvider to serve images
@@ -221,7 +221,7 @@
*/
/*!
- \title C++ Extensions: Network access manager factory
+ \title C++ Extensions: Network Access Manager Factory Example
\example declarative/cppextensions/networkaccessmanagerfactory
This example shows how to use QDeclarativeNetworkAccessManagerFactory to create a QNetworkAccessManager
@@ -229,7 +229,7 @@
*/
/*!
- \title Internationlization
+ \title Internationlization Example
\example declarative/i18n
This example shows how to enable text translation in QML.
@@ -238,7 +238,7 @@
*/
/*!
- \title Positioners
+ \title Positioners Example
\example declarative/positioners
This example shows how to use positioner elements such as \l Row, \l Column,
@@ -248,7 +248,7 @@
*/
/*!
- \title Key Interaction: Focus
+ \title Key Interaction: Focus Example
\example declarative/keyinteraction/focus
This example shows how to handle keyboard input and focus in QML.
@@ -257,7 +257,7 @@
*/
/*!
- \title Models and Views: AbstractItemModel
+ \title Models and Views: AbstractItemModel Example
\example declarative/modelviews/abstractitemmodel
This example shows how to use a QAbstractItemModel subclass as a model in QML.
@@ -266,7 +266,7 @@
*/
/*!
- \title Models and Views: GridView
+ \title Models and Views: GridView Example
\example declarative/modelviews/gridview
This example shows how to use the GridView element.
@@ -275,7 +275,7 @@
*/
/*!
- \title Models and Views: ListView
+ \title Models and Views: ListView Example
\example declarative/modelviews/listview
These examples show how to use the ListView element.
@@ -317,7 +317,16 @@
*/
/*!
- \title Models and Views: Object ListModel
+ \title Models and Views: PathView Example
+ \example declarative/modelviews/pathview
+
+ This example shows how to use the PathView element.
+
+ \image qml-pathview-example.png
+*/
+
+/*!
+ \title Models and Views: Object ListModel Example
\example declarative/modelviews/objectlistmodel
This example shows how to use a QList<QObject*> as a model in QML.
@@ -326,7 +335,7 @@
*/
/*!
- \title Models and Views: Package
+ \title Models and Views: Package Example
\example declarative/modelviews/package
This example shows how to use the \l Package element.
@@ -335,7 +344,7 @@
*/
/*!
- \title Models and Views: Parallax
+ \title Models and Views: Parallax Example
\example declarative/modelviews/parallax
This example shows how to combine and switch between views.
@@ -344,7 +353,7 @@
*/
/*!
- \title Models and Views: String ListModel
+ \title Models and Views: String ListModel Example
\example declarative/modelviews/stringlistmodel
This example shows how to use a QStringList as a model in QML.
@@ -353,7 +362,7 @@
*/
/*!
- \title Models and Views: VisualItemModel
+ \title Models and Views: VisualItemModel Example
\example declarative/modelviews/visualitemmodel
This example shows how to use the VisualItemModel element.
@@ -362,7 +371,7 @@
*/
/*!
- \title Models and Views: WebView
+ \title Models and Views: WebView Example
\example declarative/modelviews/webview
These examples shows how to use the WebView element.
@@ -403,15 +412,23 @@
\endtable
*/
+
+/*!
+ \title Screen orientation
+ \example declarative/screenorientation
+
+ This example shows how to implement screen orientation support for your application.
+*/
+
/*!
- \title SQL Local Storage
+ \title SQL Local Storage Example
\example declarative/sqllocalstorage
This example shows how to use the SQL Local Storage API in QML.
*/
/*!
- \title Text: Fonts
+ \title Text: Fonts Example
\example declarative/text/fonts
These examples show how to discover available fonts from QML and manipulate
@@ -447,7 +464,7 @@
*/
/*!
- \title Text: Text Selection
+ \title Text: Text Selection Example
\example declarative/text/textselection
This example shows how text selection, copy and paste operations
@@ -457,7 +474,7 @@
*/
/*!
- \title Threading: Threaded ListModel
+ \title Threading: Threaded ListModel Example
\example declarative/threading/threadedlistmodel
This example shows how to use a ListModel from multiple threads using
@@ -465,14 +482,14 @@
*/
/*!
- \title Threading: WorkerScript
+ \title Threading: WorkerScript Example
\example declarative/threading/workerscript
This example shows how to use the WorkerScript element for threading in QML.
*/
/*!
- \title Toys: Clocks
+ \title Toys: Clocks Example
\example declarative/toys/clocks
This example displays a set of clocks with different times for different cities.
@@ -483,7 +500,7 @@
*/
/*!
- \title Toys: Corkboards
+ \title Toys: Corkboards Example
\example declarative/toys/corkboards
This example presents a flickable set of interactive corkboards. It is created
@@ -494,7 +511,7 @@
*/
/*!
- \title Toys: Dynamic Scene
+ \title Toys: Dynamic Scene Example
\example declarative/toys/dynamicscene
This example presents an interactive drag-and-drop scene. It demonstrates
@@ -505,7 +522,7 @@
*/
/*!
- \title Toys: Tic-Tac-Toe
+ \title Toys: Tic-Tac-Toe Example
\example declarative/toys/tic-tac-toe
This example presents a simple implementation of Tic Tac Toe.
@@ -514,7 +531,7 @@
*/
/*!
- \title Toys: TV Tennis
+ \title Toys: TV Tennis Example
\example declarative/toys/tvtennis
This example shows how to use animation components such as \l SpringAnimation,
@@ -524,14 +541,14 @@
*/
/*!
- \title Touch Interaction: Gestures
+ \title Touch Interaction: Gestures Example
\example declarative/touchinteraction/gestures
This example shows how to use the GestureArea element.
*/
/*!
- \title Touch Interaction: MouseArea
+ \title Touch Interaction: MouseArea Example
\example declarative/touchinteraction/mousearea
This example shows how to use the MouseArea element to access information
@@ -541,7 +558,7 @@
*/
/*!
- \title UI Components: Dial
+ \title UI Components: Dial Control Example
\example declarative/ui-components/dialcontrol
This example shows how to create a dial-type control. It combines
@@ -553,7 +570,7 @@
/*!
- \title UI Components: Flipable
+ \title UI Components: Flipable Example
\example declarative/ui-components/flipable
This example shows how to use the \l Flipable element.
@@ -562,7 +579,7 @@
*/
/*!
- \title UI Components: Progress Bars
+ \title UI Components: Progress Bars Example
\example declarative/ui-components/progressbar
This example shows how to create a progress bar.
@@ -571,7 +588,7 @@
*/
/*!
- \title UI Components: Scroll Bar
+ \title UI Components: Scroll Bar Example
\example declarative/ui-components/scrollbar
This example shows how to create scroll bars for a \l Flickable element
@@ -582,7 +599,7 @@
*/
/*!
- \title UI Components: Search Box
+ \title UI Components: Search Box Example
\example declarative/ui-components/searchbox
This example shows how to combine TextInput, FocusScope and BorderImage
@@ -592,7 +609,7 @@
*/
/*!
- \title UI Components: Slide Switch
+ \title UI Components: Slide Switch Example
\example declarative/ui-components/slideswitch
This example shows how to create a slide switch control.
@@ -601,7 +618,7 @@
*/
/*!
- \title UI Components: Spinner
+ \title UI Components: Spinner Example
\example declarative/ui-components/spinner
This example shows how to create a spinner-type component using the PathView element.
@@ -610,7 +627,7 @@
*/
/*!
- \title UI Components: Tab Widget
+ \title UI Components: Tab Widget Example
\example declarative/ui-components/tabwidget
This example shows how to create a tab widget. It also demonstrates how
@@ -621,7 +638,7 @@
*/
/*!
- \title XML: XMLHttpRequest
+ \title XML: XMLHttpRequest Example
\example declarative/xml/xmlhttprequest
This example shows how to use the \l XmlHttpRequest API in QML.
diff --git a/doc/src/examples/multitouch-dials.qdoc b/doc/src/examples/touch-dials.qdoc
index 632c4f6a9f..552d752623 100644
--- a/doc/src/examples/multitouch-dials.qdoc
+++ b/doc/src/examples/touch-dials.qdoc
@@ -26,11 +26,11 @@
****************************************************************************/
/*!
- \example multitouch/dials
- \title Multi-Touch Dials Example
+ \example touch/dials
+ \title Touch Dials Example
- The Multi-Touch Dials example shows how to apply multi-touch to a set of
+ The Touch Dials example shows how to apply touch to a set of
standard Qt widgets.
- \image multitouch-dials-example.png
+ \image touch-dials-example.png
*/
diff --git a/doc/src/examples/multitouch-knobs.qdoc b/doc/src/examples/touch-knobs.qdoc
index 14ee5973ab..deb4c288a2 100644
--- a/doc/src/examples/multitouch-knobs.qdoc
+++ b/doc/src/examples/touch-knobs.qdoc
@@ -26,11 +26,11 @@
****************************************************************************/
/*!
- \example multitouch/knobs
- \title Multi-Touch Knobs Example
+ \example touch/knobs
+ \title Touch Knobs Example
- The Multi-Touch Knobs example shows how to create custom controls that
- accept multi-touch input.
+ The Touch Knobs example shows how to create custom controls that
+ accept touch input.
- \image multitouch-knobs-example.png
+ \image touch-knobs-example.png
*/
diff --git a/doc/src/examples/trafficinfo.qdoc b/doc/src/examples/trafficinfo.qdoc
index fe69d52e50..bc061782b2 100644
--- a/doc/src/examples/trafficinfo.qdoc
+++ b/doc/src/examples/trafficinfo.qdoc
@@ -145,5 +145,5 @@
The rest of the code in this example is just for representing the time and
station information to the user, and uses techniques described in the
- \l{Widgets Examples}.
+ \l{Widget Examples}.
*/
diff --git a/doc/src/frameworks-technologies/dnd.qdoc b/doc/src/frameworks-technologies/dnd.qdoc
index 4a1b631e12..c5dd27c572 100644
--- a/doc/src/frameworks-technologies/dnd.qdoc
+++ b/doc/src/frameworks-technologies/dnd.qdoc
@@ -45,7 +45,7 @@
outlines the approach used to enable it in custom widgets. Drag
and drop operations are also supported by Qt's item views and by
the graphics view framework. More information is available in
- \l{Using Drag and Drop with Item Views} and \l{Graphics View
+ \l{Using drag & drop with item views} and \l{Graphics View
Framework}.
\section1 Drag and Drop Classes
diff --git a/doc/src/frameworks-technologies/model-view-programming.qdoc b/doc/src/frameworks-technologies/model-view-programming.qdoc
index 94b9f0dd8b..131f06351c 100644
--- a/doc/src/frameworks-technologies/model-view-programming.qdoc
+++ b/doc/src/frameworks-technologies/model-view-programming.qdoc
@@ -900,7 +900,7 @@
after its application through the use of certain types of selection
commands. These are discussed later in this section.
- \section3 Current item &amp selected items
+ \section3 Current item and selected items
In a view, there is always a current item and a selected item - two
independent states. An item can be the current item and selected at the
@@ -1257,7 +1257,7 @@
reimplement the \l{QAbstractItemModel::columnCount()}{columnCount()}
function.
- \section3 Model headers &amp data
+ \section3 Model headers and data
For items in the view, we want to return the strings in the string list.
The \l{QAbstractItemModel::data()}{data()} function is responsible for
@@ -1350,7 +1350,7 @@
\snippet doc/src/snippets/stringlistmodel/model.cpp 1
- \section3 Inserting &amp removing rows
+ \section3 Inserting and removing rows
It is possible to change the number of rows and columns in a model. In the
string list model it only makes sense to change the number of rows, so we
@@ -1634,7 +1634,7 @@
contain the text given in the search string. This pattern can also be
used in the list and table widgets.
- \section1 Using drag &amp drop with item views
+ \section1 Using drag & drop with item views
Qt's drag and drop infrastructure is fully supported by the model/view framework.
Items in lists, tables, and trees can be dragged within the views, and data can be
@@ -1714,7 +1714,7 @@
of QAbstractItemModel::removeRows(), either directly or by inheriting the
implementation from its base class.
- \section3 Enabling drag &amp drop for items
+ \section3 Enabling drag & drop for items
Models indicate to views which items can be dragged, and which will accept drops,
by reimplementing the QAbstractItemModel::flags() function to provide suitable
@@ -2124,12 +2124,12 @@
children may be displayed incorrectly in some views until the user
attempts to view the non-existent child items.
- \section2 Navigation &amp model index creation
+ \section2 Navigation and model index creation
Hierarchical models need to provide functions that views can call to navigate the
tree-like structures they expose, and obtain model indexes for items.
- \section3 Parents &amp children
+ \section3 Parents and children
Since the structure exposed to views is determined by the underlying data
structure, it is up to each model subclass to create its own model indexes
@@ -2153,7 +2153,7 @@
models to supply some unique identifier to this function to ensure that
the model index can be re-associated with its corresponding item later on.
- \section2 Drag &amp drop support and MIME type handling
+ \section2 Drag & drop support and MIME type handling
The model/view classes support drag and drop operations, providing default behavior
that is sufficient for many applications. However, it is also possible to customize
@@ -2282,7 +2282,7 @@
\endlist
For more information about drag and drop with item views, refer to
- \l{Using Drag and Drop with Item Views}.
+ \l{Using drag & drop with item views}.
\section3 Convenience views
@@ -2293,7 +2293,7 @@
the existing contents with the data being transferred, the underlying model
will set the data of the target items rather than insert new rows and columns
into the model. For more information on drag and drop in convenience views,
- you can see \l{Using Drag and Drop with Item Views}.
+ you can see \l{Using drag & drop with item views}.
\section2 Performance optimization for large amounts of data
diff --git a/doc/src/frameworks-technologies/phonon.qdoc b/doc/src/frameworks-technologies/phonon.qdoc
index 023b4ce2ab..5119638141 100644
--- a/doc/src/frameworks-technologies/phonon.qdoc
+++ b/doc/src/frameworks-technologies/phonon.qdoc
@@ -34,6 +34,7 @@
\tableofcontents
+ \target Phonon Overview
\section1 Introduction
Qt uses the Phonon multimedia framework to provide functionality
diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc
index b6766d5f41..b2895ba2b4 100644
--- a/doc/src/getting-started/examples.qdoc
+++ b/doc/src/getting-started/examples.qdoc
@@ -343,8 +343,8 @@
/*!
\page examples-draganddrop.html
\ingroup all-examples
- \title Drag &amp Drop Examples
- \brief How to access your platform's native darg &amp drop functionality
+ \title Drag &amp; Drop Examples
+ \brief How to access your platform's native darg &amp; drop functionality
\image draganddrop-examples.png
@@ -837,19 +837,19 @@
*/
/*!
- \page examples-multitouch.html
+ \page examples-touch.html
\ingroup all-examples
- \title Multi-Touch Examples
- \brief Using Qt's multi-touch input capability
+ \title Touch Input Examples
+ \brief Using Qt's touch input capability
- Support for multi-touch input makes it possible for developers to create
+ Support for touch input makes it possible for developers to create
extensible and intuitive user interfaces.
\list
- \o \l{multitouch/dials}{Multi-Touch Dials}
- \o \l{multitouch/fingerpaint}{Finger Paint}
- \o \l{multitouch/knobs}{Multi-Touch Knobs}
- \o \l{multitouch/pinchzoom}{Pinch Zoom}
+ \o \l{touch/dials}{Touch Dials}
+ \o \l{touch/fingerpaint}{Finger Paint}
+ \o \l{touch/knobs}{Touch Knobs}
+ \o \l{touch/pinchzoom}{Pinch Zoom}
\endlist
*/
diff --git a/doc/src/getting-started/gettingstarted.qdoc b/doc/src/getting-started/gettingstarted.qdoc
new file mode 100644
index 0000000000..391aec36d5
--- /dev/null
+++ b/doc/src/getting-started/gettingstarted.qdoc
@@ -0,0 +1,516 @@
+/****************************************************************************
+**
+** 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:FDL$
+** Commercial Usage
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in a
+** written agreement between you and Nokia.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page gettingstarted.html
+
+ \title Getting Started
+
+ Welcome to the world of Qt--the cross-platform GUI toolkit. In
+ this getting started guide, we teach basic Qt knowledge by
+ implementing a simple Notepad application. After reading this
+ guide, you should be ready to delve into our overviews and API
+ documentation, and find the information you need for the
+ application you are developing.
+
+ \section1 Hello Notepad
+
+ In this first example, we simply create and show a text edit in a
+ window frame on the desktop. This represents the simplest possible
+ Qt program that has a GUI.
+
+ \image gs1.png
+
+ Here is the code:
+
+ \code
+ 1 #include <QApplication>
+ 2 #include <QTextEdit>
+ 3
+ 4 int main(int argv, char **args)
+ 5 {
+ 6 QApplication app(argv, args);
+ 7
+ 8 QTextEdit textEdit;
+ 9 textEdit.show();
+10
+11 return app.exec();
+12 }
+ \endcode
+
+ Let's go through the code line by line. In the first two lines, we
+ include the header files for QApplication and QTextEdit, which are
+ the two classes that we need for this example. All Qt classes have
+ a header file named after them.
+
+ Line 6 creates a QApplication object. This object manages
+ application-wide resources and is necessary to run any Qt program
+ that has a GUI. It needs \c argv and \c args because Qt accepts a
+ few command line arguments.
+
+ Line 8 creates a QTextEdit object. A text edit is a visual element
+ in the GUI. In Qt, we call such elements widgets. Examples of
+ other widgets are scroll bars, labels, and radio buttons. A widget
+ can also be a container for other widgets; a dialog or a main
+ application window, for example.
+
+ Line 9 shows the text edit on the screen in its own window frame.
+ Since widgets also function as containers (for instance a
+ QMainWindow, which has toolbars, menus, a status bar, and a few
+ other widgets), it is possible to show a single widget in its own
+ window. Widgets are not visible by default; the function
+ \l{QWidget::}{show()} makes the widget visible.
+
+ Line 11 makes the QApplication enter its event loop. When a Qt
+ application is running, events are generated and sent to the
+ widgets of the application. Examples of events are mouse presses
+ and key strokes. When you type text in the text edit widget, it
+ receives key pressed events and responds by drawing the text
+ typed.
+
+ To run the application, open a command prompt, and enter the
+ directory in which you have the \c .cpp file of the program. The
+ following shell commands build the program.
+
+ \code
+ vattekar@positive:~/testing/gssnippets/part1$ qmake -project
+ vattekar@positive:~/testing/gssnippets/part1$ qmake
+ vattekar@positive:~/testing/gssnippets/part1$ make
+ \endcode
+
+ This will leave an executable in the \c part1 directory (note that
+ on Windows, you may have to use \c nmake instead of \c make. Also,
+ the executable will be placed in part1/debug or part1/release). \c
+ qmake is Qt's build tool, which takes a configuration file. \c
+ qmake generates this for us when given the \c{-project} argument.
+ Given the configuration file (suffixed .pro), \c qmake produces a
+ \c make file that will build the program for you. We will look
+ into writing our own \c .pro files later.
+
+ \section2 Learn More
+
+ \table
+ \header
+ \o About
+ \o Here
+ \row
+ \o Widgets and Window Geometry
+ \o \l{Window and Dialog Widgets}
+ \row
+ \o Events and event handling
+ \o \l{The Event System}
+ \endtable
+
+ \section1 Adding a Quit Button
+
+ In a real application, you will normally need more than one
+ widget. We will now introduce a QPushButton beneath the text edit.
+ The button will exit the Notepad application when pushed (i.e.,
+ clicked on with the mouse).
+
+ \image gs2.png
+
+ Let's take a look at the code.
+
+ \code
+ 1 #include <QtGui>
+ 2
+ 3 int main(int argv, char **args)
+ 4 {
+ 5 QApplication app(argv, args);
+ 6
+ 7 QTextEdit textEdit;
+ 8 QPushButton quitButton("Quit");
+ 9
+10 QObject::connect(&quitButton, SIGNAL(clicked()), qApp, SLOT(quit()));
+11
+12 QVBoxLayout layout;
+13 layout.addWidget(&textEdit);
+14 layout.addWidget(&quitButton);
+15
+16 QWidget window;
+17 window.setLayout(&layout);
+18
+19 window.show();
+20
+21 return app.exec();
+22 }
+ \endcode
+
+ Line 1 includes QtGui, which contains all of Qt's GUI classes.
+
+ Line 10 uses Qt's Signals and Slots mechanism to make the
+ application exit when the \gui {Quit button} is pushed. A slot is
+ a function that can be invoked at runtime using its name (as a
+ literal string). A signal is a function that when called will
+ invoke slots registered with it; we call that to connect the slot
+ to the signal and to emit the signal.
+
+ \l{QApplication::}{quit()} is a slot of QApplication that exits
+ the application. \l{QPushButton::}{clicked()} is a signal that
+ QPushButton emits when it is pushed. The static
+ QObject::connect() function takes care of connecting the slot to
+ the signal. SIGNAL() and SLOT() are two macros that take the
+ function signatures of the signal and slot to connect. We also
+ need to give pointers to the objects that should send and receive
+ the signal.
+
+ Line 12 creates a QVBoxLayout. As mentioned, widgets can contain
+ other widgets. It is possible to set the bounds (the location and
+ size) of child widgets directly, but it is usually easier to use a
+ layout. A layout manages the bounds of a widget's children.
+ QVBoxLayout, for instance, places the children in a vertical row.
+
+ Line 13 and 14 adds the text edit and button to the layout. In
+ line 17, we set the layout on a widget.
+
+ \section2 Learn More
+
+ \table
+ \header
+ \o About
+ \o Here
+ \row
+ \o Signals and slots
+ \o \l{Signals & Slots}
+ \row
+ \o Layouts
+ \o \l{Layout Management},
+ \l{Widgets and Layouts},
+ \l{Layout Examples}
+ \row
+ \o The widgets that come with Qt
+ \o \l{Qt Widget Gallery},
+ \l{Widget Examples}
+ \endtable
+
+ \section1 Subclassing QWidget
+
+ When the user wants to quit an application, you might want to
+ pop-up a dialog that asks whether he/she really wants to quit. In
+ this example, we subclass QWidget, and add a slot that we connect
+ to the \gui {Quit button}.
+
+ \image gs3.png
+
+ Let's look at the code:
+
+ \code
+ 5 class Notepad : public QWidget
+ 6 {
+ 7 Q_OBJECT
+ 8
+ 9 public:
+10 Notepad();
+11
+12 private slots:
+13 void quit();
+14
+15 private:
+16 QTextEdit *textEdit;
+17 QPushButton *quitButton;
+18 };
+ \endcode
+
+ The \c Q_OBJECT macro must be first in the class definition, and
+ declares our class as a \c QObject (Naturally, it must also
+ inherit from QObject). A \l{QObject} adds several abilities to a
+ normal C++ class. Notably, the class name and slot names can be
+ queried at run-time. It is also possible to query a slot's
+ parameter types and invoke it.
+
+ Line 13 declares the slot \c quit(). This is easy using the \c
+ slots macro. The \c quit() slot can now be connected to signals
+ with a matching signature (any signal that takes no parameters).
+
+ Instead of setting up the GUI and connecting the slot in the \c
+ main() function, we now use \c{Notepad}'s constructor.
+
+ \code
+ Notepad::Notepad()
+ {
+ textEdit = new QTextEdit;
+ quitButton = new QPushButton(tr("Quit"));
+
+ connect(quitButton, SIGNAL(clicked()), this, SLOT(quit()));
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(textEdit);
+ layout->addWidget(quitButton);
+
+ setLayout(layout);
+
+ setWindowTitle(tr("Notepad"));
+ }
+ \endcode
+
+ As you saw in the class definition, we use pointers to our \l
+ {QObject}s (\c textEdit and \c quitButton). As a rule, you should
+ always allocate \l{QObject}s on the heap and never copy them.
+
+ We now use the function \l{QObject::}{tr()} around our user
+ visible strings. This function is necessary when you want to
+ provide your application in more than one language (e.g. English
+ and Chinese). We won't go into details here, but you can follow
+ the \c {Qt Linguist} link from the learn more table.
+
+ \section2 Learn More
+
+ \table
+ \header
+ \o About
+ \o Here
+ \row
+ \o tr() and internationalization
+ \o \l{Qt Linguist Manual},
+ \l{Writing Source Code for Translation},
+ \l{Hello tr() Example},
+ \l{Internationalization with Qt}
+ \row
+ \o QObjects and the Qt Object model (This is essential to understand Qt)
+ \o \l{Object Model}
+ \row
+ \o qmake and the Qt build system
+ \o \l{qmake Manual}
+ \endtable
+
+ \section2 Creating a .pro file
+
+ For this example, we write our own \c .pro file instead of
+ using \c qmake's \c -project option.
+
+ \code
+ HEADERS = notepad.h
+ SOURCES = notepad.cpp \
+ main.cpp
+ \endcode
+
+ The following shell commands build the example.
+
+ \code
+ vattekar@positive:~/testing/gssnippets/part3$ qmake
+ vattekar@positive:~/testing/gssnippets/part3$ make
+ \endcode
+
+ \section1 Using a QMainWindow
+
+ Many applications will benefit from using a QMainWindow, which has
+ its own layout to which you can add a menu bar, dock widgets, tool
+ bars, and a status bar. QMainWindow has a center area that can be
+ occupied by any kind of widget. In our case, we will place our
+ text edit there.
+
+ \image gs4.png
+
+ Let's look at the new \c Notepad class definition.
+
+ \code
+ #include <QtGui>
+
+ class Notepad : public QMainWindow
+ {
+ Q_OBJECT
+
+ public:
+ Notepad();
+
+ private slots:
+ void open();
+ void save();
+ void quit();
+
+ private:
+ QTextEdit *textEdit;
+
+ QAction *openAction;
+ QAction *saveAction;
+ QAction *exitAction;
+
+ QMenu *fileMenu;
+ };
+ \endcode
+
+ We include two more slots that can save and open a document. We
+ will implement these in the next section.
+
+ Often, in a main window, the same slot should be invoked by
+ several widgets. Examples are menu items and buttons on a tool
+ bar. To make this easier, Qt provides QAction, which can be given
+ to several widgets, and be connected to a slot. For instance, both
+ QMenu and QToolBar can create menu items and tool buttons from the
+ same \l{QAction}s. We will see how this works shortly.
+
+ As before, we use the \c {Notepad}s constructor to set up the
+ GUI.
+
+ \code
+ Notepad::Notepad()
+ {
+ saveAction = new QAction(tr("&Open"), this);
+ saveAction = new QAction(tr("&Save"), this);
+ exitAction = new QAction(tr("E&xit"), this);
+
+ connect(openAction, SIGNAL(triggered()), this, SLOT(open()));
+ connect(saveAction, SIGNAL(triggered()), this, SLOT(save()));
+ connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(openAction);
+ fileMenu->addAction(saveAction);
+ fileMenu->addSeparator();
+ fileMenu->addAction(exitAction);
+
+ textEdit = new QTextEdit;
+ setCentralWidget(textEdit);
+
+ setWindowTitle(tr("Notepad"));
+ }
+ \endcode
+
+ \l{QAction}s are created with the text that should appear on the
+ widgets that we add them to (in our case, menu items). If we also
+ wanted to add them to a tool bar, we could have given
+ \l{QIcon}{icons} to the actions.
+
+ When a menu item is clicked now, the item will trigger the action,
+ and the respective slot will be invoked.
+
+ \section2 Learn More
+
+ \table
+ \header
+ \o About
+ \o Here
+ \row
+ \o Main windows and main window classes
+ \o \l{Application Main Window},
+ \l{Main Window Examples}
+ \row
+ \o MDI applications
+ \o QMdiArea,
+ \l{MDI Example}
+ \endtable
+
+ \section1 Saving and Loading
+
+ In this example, we will implement the functionality of the \c
+ open() and \c save() slots that we added in the previous example.
+
+ \image gs5.png
+
+ Let's start with the \c open() slot:
+
+ \code
+ QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"), "",
+ tr("Text Files (*.txt);;C++ Files (*.cpp *.h)"));
+
+ if (fileName != "") {
+ QFile file(fileName);
+ if (!file.open(QIODevice::ReadOnly)) {
+ QMessageBox::critical(this, tr("Error"),
+ tr("Could not open file"));
+ return;
+ }
+ QString contents = file.readAll().constData();
+ textEdit->setPlainText(contents);
+ file.close();
+ }
+ \endcode
+
+ The first step is asking the user for the name of the file to
+ open. Qt comes with QFileDialog, which is a dialog from which the
+ user can select a file. The image above shows the dialog on
+ Kubuntu. The static \l{QFileDialog::}{getOpenFileName()} function
+ displays a modal file dialog, and does not return until the user
+ has selected a file. It returns the file path of the file
+ selected, or an empty string if the user canceled the dialog.
+
+ If we have a file name, we try to open the file with
+ \l{QIODevice::}{open()}, which returns true if the file could be
+ opened. We won't go into error handling here, but you can follow
+ the links from the learn more section. If the file could not be
+ opened, we use QMessageBox to display a dialog with an error
+ message (see the QMessageBox class description for further
+ details).
+
+ Actually reading in the data is trivial using the
+ \l{QIODevice::}{readAll()} function, which returns all data in the
+ file in a QByteArray. The \l{QByteArray::}{constData()} returns all
+ data in the array as a const char*, which QString has a
+ constructor for. The contents can then be displayed in the text
+ edit. We then \l{QIODevice::}{close()} the file to return the file
+ descriptor back to the operating system.
+
+ Now, let's move on to the the \c save() slot.
+
+ \code
+ QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"), "",
+ tr("Text Files (*.txt);;C++ Files (*.cpp *.h)"));
+
+ if (fileName != "") {
+ QFile file(fileName);
+ if (!file.open(QIODevice::WriteOnly)) {
+ // error message
+ } else {
+ QTextStream stream(&file);
+ stream << textEdit->toPlainText();
+ stream.flush();
+ file.close();
+ }
+ }
+ \endcode
+
+ When we write the contents of the text edit to the file, we use
+ the QTextStream class, which wraps the QFile object. The text
+ stream can write QStrings directly to the file; QFile only accepts
+ raw data (char*) with the \l{QIODevice::}{write()} functions of
+ QIODevice.
+
+ \section2 Learn More
+
+ \table
+ \header
+ \o About
+ \o Here
+ \row
+ \o Files and I/O devices
+ \o QFile, QIODevice
+ \endtable
+
+ \omit
+ \section1 Moving On
+
+ This may not be true for the first release.
+ The Qt documentation comes with three getting started guides. You
+ have come to the end of the first, which concerns itself with
+ basic Qt concepts. We also have guides covering intermediate and
+ advanced topics. They are found here: You may also have noticed that the learn more sections in
+ this guide frequently linked to them.
+ Basic Qt Architecture
+ \endomit
+*/
+
diff --git a/doc/src/getting-started/tutorials.qdoc b/doc/src/getting-started/tutorials.qdoc
index 6e1cee8ac2..46a58084f4 100644
--- a/doc/src/getting-started/tutorials.qdoc
+++ b/doc/src/getting-started/tutorials.qdoc
@@ -71,6 +71,30 @@
A guided tour through the translations process, explaining the
tools provided for developers, translators and release managers.
+
+ \row
+ \o{2,1} \l{modelview.html}{\bold{ModelView}}
+ \o{2,1}
+
+ \row
+ \o \image treeview_sml.png ModelView
+ \o This tutorial gives an introduction to ModelView programming using the Qt cross-platform framework
+
+ \o
+ \o
+
+ \row
+ \o{2,1} \l{QML Tutorial}{\bold QML Tutorial}
+ \o{2,1} \l{QML Advanced Tutorial}{\bold SameGame}
+ \row
+ \o{2,1}
+ This tutorial provides a very basic introduction to QML.
+ \o \image qml-samegame-demo-small.png Samegame
+ \o
+ This tutorial walks through creating a complete application with QML,
+ in this case a simple game. It is recommended that you complete the basic QML
+ tutorial first.
+
\row
\o{2,1} \l{QTestLib Tutorial}{\bold QTestLib}
\o{2,1} \l{qmake Tutorial}{\bold qmake}
diff --git a/doc/src/images/addressbook-tutorial-part1-labeled-layout.png b/doc/src/images/addressbook-tutorial-part1-labeled-layout.png
index ef514c8d0c..b19cb360a1 100644
--- a/doc/src/images/addressbook-tutorial-part1-labeled-layout.png
+++ b/doc/src/images/addressbook-tutorial-part1-labeled-layout.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part1-labeled-screenshot.png b/doc/src/images/addressbook-tutorial-part1-labeled-screenshot.png
index 43810794ec..f9b91eebe6 100644
--- a/doc/src/images/addressbook-tutorial-part1-labeled-screenshot.png
+++ b/doc/src/images/addressbook-tutorial-part1-labeled-screenshot.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part1-screenshot.png b/doc/src/images/addressbook-tutorial-part1-screenshot.png
index cf15627974..454b0959e6 100644
--- a/doc/src/images/addressbook-tutorial-part1-screenshot.png
+++ b/doc/src/images/addressbook-tutorial-part1-screenshot.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part2-add-contact.png b/doc/src/images/addressbook-tutorial-part2-add-contact.png
index 330858ddf1..6f2b947b21 100644
--- a/doc/src/images/addressbook-tutorial-part2-add-contact.png
+++ b/doc/src/images/addressbook-tutorial-part2-add-contact.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part2-add-successful.png b/doc/src/images/addressbook-tutorial-part2-add-successful.png
index 3b108fbbd1..99a2154007 100644
--- a/doc/src/images/addressbook-tutorial-part2-add-successful.png
+++ b/doc/src/images/addressbook-tutorial-part2-add-successful.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part2-labeled-layout.png b/doc/src/images/addressbook-tutorial-part2-labeled-layout.png
index 73f6dfb1dc..1e000c8f31 100644
--- a/doc/src/images/addressbook-tutorial-part2-labeled-layout.png
+++ b/doc/src/images/addressbook-tutorial-part2-labeled-layout.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part3-labeled-layout.png b/doc/src/images/addressbook-tutorial-part3-labeled-layout.png
index 662fa7f0e6..1981ba8cb6 100644
--- a/doc/src/images/addressbook-tutorial-part3-labeled-layout.png
+++ b/doc/src/images/addressbook-tutorial-part3-labeled-layout.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part3-screenshot.png b/doc/src/images/addressbook-tutorial-part3-screenshot.png
index 97d1357311..75159b4045 100644
--- a/doc/src/images/addressbook-tutorial-part3-screenshot.png
+++ b/doc/src/images/addressbook-tutorial-part3-screenshot.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part4-remove.png b/doc/src/images/addressbook-tutorial-part4-remove.png
index 42b0f92b40..8eb259ef02 100644
--- a/doc/src/images/addressbook-tutorial-part4-remove.png
+++ b/doc/src/images/addressbook-tutorial-part4-remove.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part5-finddialog.png b/doc/src/images/addressbook-tutorial-part5-finddialog.png
index 18e545113a..743d92ef6f 100644
--- a/doc/src/images/addressbook-tutorial-part5-finddialog.png
+++ b/doc/src/images/addressbook-tutorial-part5-finddialog.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part5-notfound.png b/doc/src/images/addressbook-tutorial-part5-notfound.png
index be7172e6f1..2d35766ab5 100644
--- a/doc/src/images/addressbook-tutorial-part5-notfound.png
+++ b/doc/src/images/addressbook-tutorial-part5-notfound.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part5-screenshot.png b/doc/src/images/addressbook-tutorial-part5-screenshot.png
index ea4a66c7d0..3abe2775c2 100644
--- a/doc/src/images/addressbook-tutorial-part5-screenshot.png
+++ b/doc/src/images/addressbook-tutorial-part5-screenshot.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part6-load.png b/doc/src/images/addressbook-tutorial-part6-load.png
index 95fdcaffca..a027a1decb 100644
--- a/doc/src/images/addressbook-tutorial-part6-load.png
+++ b/doc/src/images/addressbook-tutorial-part6-load.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part6-save.png b/doc/src/images/addressbook-tutorial-part6-save.png
index c0deb70b58..757feeb9ac 100644
--- a/doc/src/images/addressbook-tutorial-part6-save.png
+++ b/doc/src/images/addressbook-tutorial-part6-save.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part6-screenshot.png b/doc/src/images/addressbook-tutorial-part6-screenshot.png
index f77bf0357d..7bb2f749bf 100644
--- a/doc/src/images/addressbook-tutorial-part6-screenshot.png
+++ b/doc/src/images/addressbook-tutorial-part6-screenshot.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part7-screenshot.png b/doc/src/images/addressbook-tutorial-part7-screenshot.png
index d6b0a50c8b..3e7b3ca522 100644
--- a/doc/src/images/addressbook-tutorial-part7-screenshot.png
+++ b/doc/src/images/addressbook-tutorial-part7-screenshot.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-screenshot.png b/doc/src/images/addressbook-tutorial-screenshot.png
index d6727dcf4f..3fba6e849e 100644
--- a/doc/src/images/addressbook-tutorial-screenshot.png
+++ b/doc/src/images/addressbook-tutorial-screenshot.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial.png b/doc/src/images/addressbook-tutorial.png
index 495edda411..f80b42d244 100644
--- a/doc/src/images/addressbook-tutorial.png
+++ b/doc/src/images/addressbook-tutorial.png
Binary files differ
diff --git a/doc/src/images/clock.png b/doc/src/images/clock.png
new file mode 100755
index 0000000000..c7f6a1b296
--- /dev/null
+++ b/doc/src/images/clock.png
Binary files differ
diff --git a/doc/src/images/columnview.png b/doc/src/images/columnview.png
new file mode 100644
index 0000000000..127b79531f
--- /dev/null
+++ b/doc/src/images/columnview.png
Binary files differ
diff --git a/doc/src/images/combobox.png b/doc/src/images/combobox.png
new file mode 100755
index 0000000000..d172b413eb
--- /dev/null
+++ b/doc/src/images/combobox.png
Binary files differ
diff --git a/doc/src/images/dummy_tree.png b/doc/src/images/dummy_tree.png
new file mode 100755
index 0000000000..7373ea60f6
--- /dev/null
+++ b/doc/src/images/dummy_tree.png
Binary files differ
diff --git a/doc/src/images/edit.png b/doc/src/images/edit.png
new file mode 100755
index 0000000000..161b06f1bf
--- /dev/null
+++ b/doc/src/images/edit.png
Binary files differ
diff --git a/doc/src/images/example_model.png b/doc/src/images/example_model.png
new file mode 100755
index 0000000000..4261261c7e
--- /dev/null
+++ b/doc/src/images/example_model.png
Binary files differ
diff --git a/doc/src/images/gs1.png b/doc/src/images/gs1.png
new file mode 100644
index 0000000000..875dd39d09
--- /dev/null
+++ b/doc/src/images/gs1.png
Binary files differ
diff --git a/doc/src/images/gs2.png b/doc/src/images/gs2.png
new file mode 100644
index 0000000000..aaba3b27d2
--- /dev/null
+++ b/doc/src/images/gs2.png
Binary files differ
diff --git a/doc/src/images/gs3.png b/doc/src/images/gs3.png
new file mode 100644
index 0000000000..5e474e32db
--- /dev/null
+++ b/doc/src/images/gs3.png
Binary files differ
diff --git a/doc/src/images/gs4.png b/doc/src/images/gs4.png
new file mode 100644
index 0000000000..7a8237ea0e
--- /dev/null
+++ b/doc/src/images/gs4.png
Binary files differ
diff --git a/doc/src/images/gs5.png b/doc/src/images/gs5.png
new file mode 100644
index 0000000000..b3cab60386
--- /dev/null
+++ b/doc/src/images/gs5.png
Binary files differ
diff --git a/doc/src/images/header.png b/doc/src/images/header.png
new file mode 100755
index 0000000000..2597635b9f
--- /dev/null
+++ b/doc/src/images/header.png
Binary files differ
diff --git a/doc/src/images/lineedit.png b/doc/src/images/lineedit.png
new file mode 100755
index 0000000000..83d1c479f7
--- /dev/null
+++ b/doc/src/images/lineedit.png
Binary files differ
diff --git a/doc/src/images/list_table_tree.png b/doc/src/images/list_table_tree.png
new file mode 100755
index 0000000000..b2daf1f3a5
--- /dev/null
+++ b/doc/src/images/list_table_tree.png
Binary files differ
diff --git a/doc/src/images/listview.png b/doc/src/images/listview.png
new file mode 100755
index 0000000000..fa49c52c62
--- /dev/null
+++ b/doc/src/images/listview.png
Binary files differ
diff --git a/doc/src/images/lotto.png b/doc/src/images/lotto.png
new file mode 100755
index 0000000000..dd751cffd9
--- /dev/null
+++ b/doc/src/images/lotto.png
Binary files differ
diff --git a/doc/src/images/modelview.png b/doc/src/images/modelview.png
new file mode 100755
index 0000000000..7b042af8a4
--- /dev/null
+++ b/doc/src/images/modelview.png
Binary files differ
diff --git a/doc/src/images/path.png b/doc/src/images/path.png
new file mode 100755
index 0000000000..73107ff5bb
--- /dev/null
+++ b/doc/src/images/path.png
Binary files differ
diff --git a/doc/src/images/qcompleter.png b/doc/src/images/qcompleter.png
new file mode 100755
index 0000000000..d25caacc72
--- /dev/null
+++ b/doc/src/images/qcompleter.png
Binary files differ
diff --git a/doc/src/images/qml-pathview-example.png b/doc/src/images/qml-pathview-example.png
new file mode 100644
index 0000000000..c874c5c1a4
--- /dev/null
+++ b/doc/src/images/qml-pathview-example.png
Binary files differ
diff --git a/doc/src/images/readonlytable.png b/doc/src/images/readonlytable.png
new file mode 100755
index 0000000000..90bcba4a9b
--- /dev/null
+++ b/doc/src/images/readonlytable.png
Binary files differ
diff --git a/doc/src/images/readonlytable_role.png b/doc/src/images/readonlytable_role.png
new file mode 100755
index 0000000000..7d2d416a53
--- /dev/null
+++ b/doc/src/images/readonlytable_role.png
Binary files differ
diff --git a/doc/src/images/selection2.png b/doc/src/images/selection2.png
new file mode 100755
index 0000000000..66c757f88e
--- /dev/null
+++ b/doc/src/images/selection2.png
Binary files differ
diff --git a/doc/src/images/standardwidget.png b/doc/src/images/standardwidget.png
new file mode 100755
index 0000000000..3ccccf14a3
--- /dev/null
+++ b/doc/src/images/standardwidget.png
Binary files differ
diff --git a/doc/src/images/tableview.png b/doc/src/images/tableview.png
new file mode 100755
index 0000000000..8be1b6ce62
--- /dev/null
+++ b/doc/src/images/tableview.png
Binary files differ
diff --git a/doc/src/images/multitouch-dials-example.png b/doc/src/images/touch-dials-example.png
index 60e1776fc3..60e1776fc3 100644
--- a/doc/src/images/multitouch-dials-example.png
+++ b/doc/src/images/touch-dials-example.png
Binary files differ
diff --git a/doc/src/images/multitouch-examples.png b/doc/src/images/touch-examples.png
index b053cf371c..b053cf371c 100644
--- a/doc/src/images/multitouch-examples.png
+++ b/doc/src/images/touch-examples.png
Binary files differ
diff --git a/doc/src/images/multitouch-fingerpaint-example.png b/doc/src/images/touch-fingerpaint-example.png
index c741b65526..c741b65526 100644
--- a/doc/src/images/multitouch-fingerpaint-example.png
+++ b/doc/src/images/touch-fingerpaint-example.png
Binary files differ
diff --git a/doc/src/images/multitouch-knobs-example.png b/doc/src/images/touch-knobs-example.png
index 1cbd90d101..1cbd90d101 100644
--- a/doc/src/images/multitouch-knobs-example.png
+++ b/doc/src/images/touch-knobs-example.png
Binary files differ
diff --git a/doc/src/images/multitouch-pinchzoom-example.png b/doc/src/images/touch-pinchzoom-example.png
index 1079fb252b..1079fb252b 100644
--- a/doc/src/images/multitouch-pinchzoom-example.png
+++ b/doc/src/images/touch-pinchzoom-example.png
Binary files differ
diff --git a/doc/src/images/tree.png b/doc/src/images/tree.png
new file mode 100755
index 0000000000..3f046c9b24
--- /dev/null
+++ b/doc/src/images/tree.png
Binary files differ
diff --git a/doc/src/images/tree_2.png b/doc/src/images/tree_2.png
new file mode 100755
index 0000000000..6ee1f4aa48
--- /dev/null
+++ b/doc/src/images/tree_2.png
Binary files differ
diff --git a/doc/src/images/tree_2_with_algorithm.png b/doc/src/images/tree_2_with_algorithm.png
new file mode 100755
index 0000000000..ecf91012bf
--- /dev/null
+++ b/doc/src/images/tree_2_with_algorithm.png
Binary files differ
diff --git a/doc/src/images/tree_city.png b/doc/src/images/tree_city.png
new file mode 100755
index 0000000000..57f03d9d6d
--- /dev/null
+++ b/doc/src/images/tree_city.png
Binary files differ
diff --git a/doc/src/images/treeview.png b/doc/src/images/treeview.png
new file mode 100755
index 0000000000..af31fe9bf1
--- /dev/null
+++ b/doc/src/images/treeview.png
Binary files differ
diff --git a/doc/src/images/treeview_sml.png b/doc/src/images/treeview_sml.png
new file mode 100755
index 0000000000..fb6de1d863
--- /dev/null
+++ b/doc/src/images/treeview_sml.png
Binary files differ
diff --git a/doc/src/images/widgetmapper.png b/doc/src/images/widgetmapper.png
new file mode 100755
index 0000000000..9627088077
--- /dev/null
+++ b/doc/src/images/widgetmapper.png
Binary files differ
diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc
index 18a174683a..4acf212ce3 100644
--- a/doc/src/index.qdoc
+++ b/doc/src/index.qdoc
@@ -40,11 +40,11 @@
</div>
<div class="section sectionlist">
<ul>
- <li><a href="">Getting started</a></li>
- <li><a href="installation.html">Installation &amp; first steps</a></li>
+ <li><a href="gettingstarted.html">Getting started</a></li>
+ <li><a href="installation.html">Installation</a></li>
<li><a href="how-to-learn-qt.html">How to learn Qt</a></li>
<li><a href="tutorials.html">Tutorials</a></li>
- <li><a href="examples.html">Examples</a></li>
+ <li><a href="all-examples.html">Examples</a></li>
<li><a href="qt4-7-intro.html">Whats new in Qt 4.7</a></li>
</ul>
</div>
@@ -56,30 +56,29 @@
<div class="indexboxcont indexboxbar ">
<div class="sectionlist tricol">
<ul>
- <li><a href="classes.html">Class index</a></li>
- <li><a href="functions.html">Function index</a></li>
- <li><a href="modules.html">Modules</a></li>
- <li><a href="namespaces.html">Namespaces</a></li>
- <li><a href="qtglobal.html">Global stuff</a></li>
- <li><a href="qdeclarativeelements.html">QML elements</a></li>
+ <li><a href="classes.html">Class index</a></li>
+ <li><a href="functions.html">Function index</a></li>
+ <li><a href="modules.html">Modules</a></li>
+ <li><a href="namespaces.html">Namespaces</a></li>
+ <li><a href="qtglobal.html">Global Declarations</a></li>
</ul>
</div>
<div class="sectionlist tricol">
<ul>
- <li><a href="qt-basic-concepts.html">Basic Qt Architecture</a></li>
- <li><a href="declarativeui.html">Device UI's &amp; Qt Quick</a></li>
- <li><a href="qt-gui-concepts.html">Desktop UI components</a></li>
- <li><a href="platform-specific.html">Platform-specific info</a></li>
- <li><a href="qt-graphics.html">Graphics, Painting &amp; Printing</a></li>
- <li><a href="qt-network.html">Input/Output &amp; networking</a></li>
+ <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>
+ <li><a href="qt-basic-concepts.html">Qt Architecture</a></li>
+ <li><a href="developing-with-qt.html">Cross-platform &amp; Platform-specific Development</a></li>
+ <li><a href="technology-apis.html">Qt &amp; standard technologies </a></li>
+ <li><a href="best-practices.html">Qt How-to's &amp; best practices</a></li>
</ul>
</div>
<div class="sectionlist">
<ul>
- <li><a href="model-view-programming.html">Model/View programming</a></li>
- <li><a href="technology-apis.html">Qt API's for other technologies</a></li>
- <li><a href="best-practices.html">Qt How-to's &amp; best practices</a></li>
- <li><a href="developing-with-qt.html">Cross-platform development</a></li>
+ <li><a href="declarativeui.html">Qt Quick</a></li>
+ <li><a href="qdeclarativeintroduction.html">Introduction to QML</a></li>
+ <li><a href="qdeclarativeelements.html">QML Elements</a></li>
+ <li><a href="qt-gui-concepts.html">UI components</a></li>
+ <li><a href="declarativeui.html">Qt & GUI design</a></li>
</ul>
</div>
</div>
@@ -95,16 +94,17 @@
</div>
<div class="section sectionlist">
<ul>
- <li><a href="http://doc.qt.nokia.com/qtcreator-1.3/index.html">Qt Creator</a></li>
+ <li><a href="http://doc.qt.nokia.com/qtcreator-2.0/index.html">Qt Creator</a></li>
<li><a href="designer-manual.html">Qt Designer</a></li>
<li><a href="linguist-manual.html">Qt Linguist</a></li>
<li><a href="assistant-manual.html">Qt Assistant</a></li>
- <li><a href="http://doc.qt.nokia.com/">Integration and add-ins</a></li>
+ <li><a href="http://doc.qt.nokia.com/qtsimulator-1.0/simulator-description.html">Qt Simulator</a></li>
+ <li><a href="http://qt.nokia.com/developer/eclipse-integration">Integration</a> and <a href="http://qt.nokia.com/products/appdev">add-ins</a></li>
<li><a href="qvfb.html">Virtual Framebuffer</a></li>
</ul>
</div>
</div>
- </div>
+ </div>
\endraw
*/
diff --git a/doc/src/legal/3rdparty.qdoc b/doc/src/legal/3rdparty.qdoc
index 110dac76d1..e7133e383b 100644
--- a/doc/src/legal/3rdparty.qdoc
+++ b/doc/src/legal/3rdparty.qdoc
@@ -194,16 +194,16 @@
\hr
copyright (C) 1999 by Willem van Schaik <willem@schaik.com>
-
+
version 1.0 - 1999.10.15 - First version.
-
+
Permission to use, copy, modify, and distribute this software and
its documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear in
supporting documentation. This software is provided "as is" without
express or implied warranty.
-
+
\hr
Copyright (c) 1998-2001 Greg Roelofs. All rights reserved.
@@ -293,7 +293,7 @@
Copyright (c) 1987, 1993, 1994\br
The Regents of the University of California. All rights reserved.
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:\br
@@ -305,7 +305,7 @@
3. Neither the name of the University 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 REGENTS 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
@@ -336,7 +336,7 @@
Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\br
Copyright (c( 1996 USAF Phillips Laboratory\br
Additions (c) Richard Nolde 2006-2009
-
+
Permission to use, copy, modify, distribute, and sell this software and
its documentation for any purpose is hereby granted without fee, provided
that (i) the above copyright notices and this permission notice appear in
@@ -344,11 +344,11 @@
Sam Leffler and Silicon Graphics may not be used in any advertising or
publicity relating to the software without the specific, prior written
permission of Sam Leffler and Silicon Graphics.
-
+
THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-
+
IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
@@ -360,11 +360,11 @@
Copyright (c) 1985, 1986 The Regents of the University of California.\br
All rights reserved.
-
+
This code is derived from software contributed to Berkeley by
James A. Woods, derived from original work by Spencer Thomas
and Joseph Orost.
-
+
Redistribution and use in source and binary forms are permitted
provided that the above copyright notice and this paragraph are
duplicated in all such forms and that any documentation,
@@ -381,7 +381,7 @@
Copyright (c) 1996-1997 Sam Leffler\br
Copyright (c) 1996 Pixar
-
+
Permission to use, copy, modify, distribute, and sell this software and
its documentation for any purpose is hereby granted without fee, provided
that (i) the above copyright notices and this permission notice appear in
@@ -389,11 +389,11 @@
Pixar, Sam Leffler and Silicon Graphics may not be used in any advertising or
publicity relating to the software without the specific, prior written
permission of Pixar, Sam Leffler and Silicon Graphics.
-
+
THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-
+
IN NO EVENT SHALL PIXAR, SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
@@ -423,8 +423,6 @@
\section1 JavaScriptCore
- \hr
-
Copyright (c) 1991, 2000, 2001 by Lucent Technologies.\br
Copyright (C) 2002, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
@@ -441,6 +439,60 @@
See \c src/3rdparty/webkit/JavaScriptCore/wtf/dtoa.cpp for license details.
+ \hr
+
+ Copyright (C) 2009 Company 100, Inc. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:\br
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.\br
+ 2. 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.
+
+ THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``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 APPLE COMPUTER, INC. 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.
+
+ \hr
+
+ Copyright (C) 2009 Apple Inc. All rights reserved.\br
+ Copyright (C) 2009 University of Szeged\br
+ All rights reserved.\br
+ Copyright (C) 2010 MIPS Technologies, Inc. All rights reserved.\br
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:\br
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.\br
+ 2. 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.
+
+ THIS SOFTWARE IS PROVIDED BY MIPS TECHNOLOGIES, INC. ``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 MIPS TECHNOLOGIES, INC. 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.
+
+
\section1 Pixman (\c pixman) version 0.17.11
\e{pixman is a library that provides low-level pixel manipulation
@@ -479,4 +531,156 @@
See \c src/3rdparty/pixman/pixman-arm-neon-asm.h and
\c src/3rdparty/pixman/pixman-arm-neon-asm.S
+
+ \section1 WebCore (WebKit)
+
+ Copyright (C) 2009 Ericsson AB\br
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.\br
+ 2. 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.\br
+ 3. Neither the name of Ericsson 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.
+
+ \hr
+
+ Copyright (C) 2004, Apple Computer, Inc. and The Mozilla Foundation.\br
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.\br
+ 2. 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.\br
+ 3. Neither the names of Apple Computer, Inc. ("Apple") or The Mozilla
+ Foundation ("Mozilla") nor the names of their contributors may be used
+ to endorse or promote products derived from this software without
+ specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR 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 APPLE, MOZILLA OR
+ THEIR 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.
+
+ \hr
+
+ Copyright (C) 2009 Igalia S.L.\br
+ Copyright (C) 2009 Antonio Gomes <tonikitoo@webkit.org>\br
+ Copyright (C) 2008 Christian Dywan <christian@imendio.com>\br
+ Copyright (C) 2007 Nicholas Shanks <contact@nickshanks.com>\br
+ Copyright (C) 2006 Charles Samuels <charles@kde.org>\br
+ Copyright (C) 2009 Dominik Röttsches <dominik.roettsches@access-company.com>\br
+ Copyright (C) 2009 Brent Fulgham\br
+ Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>\br
+ Copyright (C) 2006 Alexander Kellett <lypanov@kde.org>\br
+ Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>\br
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:\br
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.\br
+ 2. 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.
+
+ THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``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 APPLE COMPUTER, INC. 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.
+
+ \hr
+
+ Copyright (C) 2007, 2008 Apple Inc. All rights reserved.\br
+ Copyright (C) IBM Corp. 2009 All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.\br
+ 2. 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.\br
+ 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ its contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.\br
+
+ THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
+
+ \hr
+
+ Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved.\br
+ Copyright (C) 2010 François Sausset (sausset@gmail.com). All rights reserved\br
+ Copyright (C) 2007 Marius Renn <damarvy@gmail.com> All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:\br
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.\br
+ 2. 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.
+
+ 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.
*/
diff --git a/doc/src/legal/licenses.qdoc b/doc/src/legal/licenses.qdoc
index 96d5d2911c..a04a2563ba 100644
--- a/doc/src/legal/licenses.qdoc
+++ b/doc/src/legal/licenses.qdoc
@@ -328,7 +328,7 @@
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.
-
+
\list
\o Parts of WebKit used by the QtWebKit module
\endlist
@@ -716,6 +716,53 @@
\list
\o Parts of WebKit used by the QtWebKit module
\endlist
+
+ \hr
+
+ Copyright (c) 1991-2009 Unicode, Inc. All rights reserved.
+ Distributed under the Terms of Use in
+ http://www.unicode.org/copyright.html.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of the Unicode data files and any associated
+ documentation (the "Data Files") or Unicode software and any
+ associated documentation (the "Software") to deal in the Data
+ Files or Software without restriction, including without
+ limitation the rights to use, copy, modify, merge, publish,
+ distribute, and/or sell copies of the Data Files or Software,
+ and to permit persons to whom the Data Files or Software are
+ furnished to do so, provided that (a) the above copyright
+ notice(s) and this permission notice appear with all copies
+ of the Data Files or Software, (b) both the above copyright
+ notice(s) and this permission notice appear in associated
+ documentation, and (c) there is clear notice in each modified
+ Data File or in the Software as well as in the documentation
+ associated with the Data File(s) or Software that the data or
+ software has been modified.
+
+ THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT
+ WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED
+ IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
+ OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+ FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+ CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES
+ OR SOFTWARE.
+
+ Except as contained in this notice, the name of a copyright
+ holder shall not be used in advertising or otherwise to promote
+ the sale, use or other dealings in these Data Files or Software
+ without prior written authorization of the copyright holder.
+
+ \list
+ \o Included in \c{util/unicode/data},
+ \c{tests/auto/qtextboundaryfinder/data} and
+ \c{tests/auto/qchar}
+ \o Parts of the \l makeqpf tool
+ \endlist
*/
/*!
diff --git a/doc/src/network-programming/bearermanagement.qdoc b/doc/src/network-programming/bearermanagement.qdoc
index 67c13f2853..bc016dff94 100644
--- a/doc/src/network-programming/bearermanagement.qdoc
+++ b/doc/src/network-programming/bearermanagement.qdoc
@@ -191,7 +191,7 @@ closed via \l{QNetworkSession::close()}, respectively. If the session
is \l{QNetworkSession::Disconnected}{disconnected} at the time of the
\l{QNetworkSession::open()}{open()} call the underlying interface is started;
otherwise only the reference counter against the global session is
-incremeted. The opposite behavior can be observed when using
+incremented. The opposite behavior can be observed when using
\l{QNetworkSession::close()}{close()}.
In some use cases it may be necessary to turn the interface off despite of
diff --git a/doc/src/platforms/mac-differences.qdoc b/doc/src/platforms/mac-differences.qdoc
index 766c61971b..25016568aa 100644
--- a/doc/src/platforms/mac-differences.qdoc
+++ b/doc/src/platforms/mac-differences.qdoc
@@ -175,6 +175,9 @@
\l{http://developer.apple.com/documentation/CoreFoundation/Reference/CFBundleRef/index.html}
{Apple's Developer Website}.
+ Note: QCoreApplication::applicationDirPath() can be used to determine
+ the path of the binary within the bundle.
+
\section2 Translating the Application Menu and Native Dialogs
The items in the Application Menu will be merged correctly for
diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc
index 22d858fb95..afb17c416b 100644
--- a/doc/src/platforms/symbian-introduction.qdoc
+++ b/doc/src/platforms/symbian-introduction.qdoc
@@ -51,6 +51,7 @@
\o \l {Exception Safety with Symbian}
\o \l {Platform Notes - Symbian} {Qt for the Symbian platform - state of support}
\o \l {qmake Platform Notes#Symbian platform} {Qt for Symbian extensions for qmake}
+ \o \l {Symbian Platform Security Requirements} {Symbian Platform Security Requirements}
\endlist
\o
\list
@@ -60,6 +61,22 @@
*/
/*!
+ \page symbian-platform-security-requirements.html
+
+ \title Symbian Platform Security Requirements
+ \ingroup qtsymbian
+
+ On Symbian, processes that access media via the network must
+ have the \c NetworkServices platform security capability. If the client
+ process lacks this capability, operations will result in errors.
+ This failure is indicated by a state() of Phonon::ErrorState.
+
+ Platform security capabilities are added via the
+ \l{qmake-variable-reference.html#target-capability}{TARGET.CAPABILITY}
+ qmake variable.
+*/
+
+/*!
\page symbian-with-qt-introduction.html
\title The Symbian platform - Introduction to Qt
diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc
index 052e1c9bf0..8867fd91e8 100644
--- a/doc/src/qt4-intro.qdoc
+++ b/doc/src/qt4-intro.qdoc
@@ -597,9 +597,9 @@
See \l{The State Machine Framework} documentation for more information.
- \section1 Multi-Touch and Gestures
+ \section1 Touch and Gestures
- Support for multi-touch input enables users to interact with many
+ Support for touch input enables users to interact with many
parts of a user interface at the same time, and provides the basis
for gestures. Additional infrastructure for gesture recognition
allows a sequence of touch inputs to be combined to create gestures
@@ -613,12 +613,12 @@
\list
\o Allows users to interact with applications in more natural ways.
\o Simplifies finger-based interaction with UI components.
- \o Combines support for common basic gestures and multi-touch gestures
+ \o Combines support for common basic gestures and touch gestures
in a single general framework.
\o Enables extensibility by design.
\endlist
- See the QTouchEvent class documentation for more information on multi-touch
+ See the QTouchEvent class documentation for more information on touch
input and QGestureEvent for gestures.
\section1 DOM access API
diff --git a/doc/src/snippets/code/doc_src_containers.qdoc b/doc/src/snippets/code/doc_src_containers.qdoc
index 5cf2aab2c1..1f86f60d09 100644
--- a/doc/src/snippets/code/doc_src_containers.qdoc
+++ b/doc/src/snippets/code/doc_src_containers.qdoc
@@ -216,7 +216,7 @@ while (i.hasNext())
//! [17]
QLinkedList<QString> list;
...
-foreach (QString str, list)
+foreach (const QString &str, list)
qDebug() << str;
//! [17]
@@ -224,7 +224,7 @@ foreach (QString str, list)
//! [18]
QLinkedList<QString> list;
...
-foreach (QString str, list) {
+foreach (const QString &str, list) {
if (str.isEmpty())
break;
qDebug() << str;
@@ -235,7 +235,7 @@ foreach (QString str, list) {
//! [19]
QMap<QString, int> map;
...
-foreach (QString str, map.keys())
+foreach (const QString &str, map.keys())
qDebug() << str << ":" << map.value(str);
//! [19]
@@ -243,7 +243,7 @@ foreach (QString str, map.keys())
//! [20]
QMultiMap<QString, int> map;
...
-foreach (QString str, map.uniqueKeys()) {
+foreach (const QString &str, map.uniqueKeys()) {
foreach (int i, map.values(str))
qDebug() << str << ":" << i;
}
diff --git a/doc/src/snippets/code/doc_src_installation.qdoc b/doc/src/snippets/code/doc_src_installation.qdoc
index c46159ce19..05935670f5 100644
--- a/doc/src/snippets/code/doc_src_installation.qdoc
+++ b/doc/src/snippets/code/doc_src_installation.qdoc
@@ -250,12 +250,12 @@ export PATH
//! [38]
cd /home/user/qt/%VERSION%
-./configure -platform linux-g++ -xplatform symbian/linux-armcc -arch symbian
+./configure -platform linux-g++ -xplatform symbian/linux-armcc
//! [38]
//! [39]
cd /home/user/qt/%VERSION%
-./configure -platform linux-g++ -xplatform symbian/linux-gcce -arch symbian -no-webkit
+./configure -platform linux-g++ -xplatform symbian/linux-gcce -no-webkit
//! [39]
//! [40]
diff --git a/doc/src/snippets/code/doc_src_qalgorithms.qdoc b/doc/src/snippets/code/doc_src_qalgorithms.qdoc
index 78634a2453..f5a73c6248 100644
--- a/doc/src/snippets/code/doc_src_qalgorithms.qdoc
+++ b/doc/src/snippets/code/doc_src_qalgorithms.qdoc
@@ -217,7 +217,7 @@ QStringList list;
list << "AlPha" << "beTA" << "gamma" << "DELTA";
QMap<QString, QString> map;
-foreach (QString str, list)
+foreach (const QString &str, list)
map.insert(str.toLower(), str);
list = map.values();
diff --git a/doc/src/snippets/code/doc_src_qset.qdoc b/doc/src/snippets/code/doc_src_qset.qdoc
index ac48edb11b..c6e1933155 100644
--- a/doc/src/snippets/code/doc_src_qset.qdoc
+++ b/doc/src/snippets/code/doc_src_qset.qdoc
@@ -80,7 +80,7 @@ while (i != set.constEnd()) {
//! [6]
QSet<QString> set;
...
-foreach (QString value, set)
+foreach (const QString &value, set)
qDebug() << value;
//! [6]
diff --git a/doc/src/snippets/code/doc_src_qt4-tulip.qdoc b/doc/src/snippets/code/doc_src_qt4-tulip.qdoc
index 3d88a0d65e..f29d3bae21 100644
--- a/doc/src/snippets/code/doc_src_qt4-tulip.qdoc
+++ b/doc/src/snippets/code/doc_src_qt4-tulip.qdoc
@@ -47,7 +47,7 @@ foreach (variable, container)
//! [1]
QList<QString> list;
...
-foreach (QString str, list)
+foreach (const QString &str, list)
cout << str.ascii() << endl;
//! [1]
diff --git a/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp b/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp
index 2e64505f6d..fb623475c5 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp
@@ -51,7 +51,7 @@ connect(quitButton, SIGNAL(clicked()), &app, SLOT(quit()));
//! [2]
-foreach (QString path, app.libraryPaths())
+foreach (const QString &path, app.libraryPaths())
do_something(path);
//! [2]
diff --git a/doc/src/snippets/code/src_gui_kernel_qapplication.cpp b/doc/src/snippets/code/src_gui_kernel_qapplication.cpp
index c93a25cf28..766b2491d9 100644
--- a/doc/src/snippets/code/src_gui_kernel_qapplication.cpp
+++ b/doc/src/snippets/code/src_gui_kernel_qapplication.cpp
@@ -158,13 +158,13 @@ appname -session id
//! [10]
-foreach (QString command, mySession.restartCommand())
+foreach (const QString &command, mySession.restartCommand())
do_something(command);
//! [10]
//! [11]
-foreach (QString command, mySession.discardCommand())
+foreach (const QString &command, mySession.discardCommand())
do_something(command);
//! [11]
diff --git a/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp b/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp
index 38712894be..99deb206a1 100644
--- a/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp
+++ b/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp
@@ -68,7 +68,7 @@ void MyWidget::lookedUp(const QHostInfo &host)
return;
}
- foreach (QHostAddress address, host.addresses())
+ foreach (const QHostAddress &address, host.addresses())
qDebug() << "Found address:" << address.toString();
}
//! [3]
diff --git a/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp b/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp
index 5c9421f625..937dbb9d3b 100644
--- a/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp
+++ b/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp
@@ -39,7 +39,7 @@
****************************************************************************/
//! [0]
-foreach (QSslCertificate cert, QSslCertificate::fromPath("C:/ssl/certificate.*.pem", QSsl::Pem,
+foreach (const QSslCertificate &cert, QSslCertificate::fromPath("C:/ssl/certificate.*.pem", QSsl::Pem,
QRegExp::Wildcard)) {
qDebug() << cert.issuerInfo(QSslCertificate::Organization);
}
diff --git a/doc/src/snippets/declarative/anchoranimation.qml b/doc/src/snippets/declarative/anchoranimation.qml
new file mode 100644
index 0000000000..6c7aaf67c5
--- /dev/null
+++ b/doc/src/snippets/declarative/anchoranimation.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: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$
+**
+****************************************************************************/
+//![0]
+import Qt 4.7
+
+Item {
+ id: container
+ width: 200; height: 200
+
+ Rectangle {
+ id: myRect
+ width: 100; height: 100
+ color: "red"
+ }
+
+ states: State {
+ name: "reanchored"
+ AnchorChanges { target: myRect; anchors.right: container.right }
+ }
+
+ transitions: Transition {
+ // smoothly reanchor myRect and move into new position
+ AnchorAnimation { duration: 1000 }
+ }
+
+ Component.onCompleted: container.state = "reanchored"
+}
+//![0]
diff --git a/doc/src/snippets/declarative/behavior.qml b/doc/src/snippets/declarative/behavior.qml
new file mode 100644
index 0000000000..420dfc44ea
--- /dev/null
+++ b/doc/src/snippets/declarative/behavior.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** 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: rect
+ width: 100; height: 100
+ color: "red"
+
+ Behavior on width {
+ NumberAnimation { duration: 1000 }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: rect.width = 50
+ }
+}
+//![0]
diff --git a/doc/src/snippets/declarative/coloranimation.qml b/doc/src/snippets/declarative/coloranimation.qml
new file mode 100644
index 0000000000..4e35f229a9
--- /dev/null
+++ b/doc/src/snippets/declarative/coloranimation.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** 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: 100; height: 100
+ color: "red"
+
+ ColorAnimation on color { to: "yellow"; duration: 1000 }
+}
+//![0]
+
diff --git a/doc/src/snippets/declarative/comments.qml b/doc/src/snippets/declarative/comments.qml
index f4bedb811e..9be0ce549d 100644
--- a/doc/src/snippets/declarative/comments.qml
+++ b/doc/src/snippets/declarative/comments.qml
@@ -38,8 +38,10 @@
**
****************************************************************************/
+//![0]
import Qt 4.7
+//![0]
Text {
text: "Hello world!" //a basic greeting
/*
@@ -49,3 +51,4 @@ Text {
font.family: "Helvetica"
font.pointSize: 24
}
+//![0]
diff --git a/doc/src/snippets/declarative/component.qml b/doc/src/snippets/declarative/component.qml
new file mode 100644
index 0000000000..09c4aa2324
--- /dev/null
+++ b/doc/src/snippets/declarative/component.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: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 {
+ width: 100; height: 100
+
+ Component {
+ id: redSquare
+
+ Rectangle {
+ color: "red"
+ width: 10
+ height: 10
+ }
+ }
+
+ Loader { sourceComponent: redSquare }
+ Loader { sourceComponent: redSquare; x: 20 }
+}
+//![0]
diff --git a/doc/src/snippets/declarative/componentCreation.js b/doc/src/snippets/declarative/componentCreation.js
index 25bc10cc89..c29a1f9e64 100644
--- a/doc/src/snippets/declarative/componentCreation.js
+++ b/doc/src/snippets/declarative/componentCreation.js
@@ -1,7 +1,39 @@
-//![0]
+//![vars]
var component;
var sprite;
+//![vars]
+//![func]
+function createSpriteObjects() {
+//![func]
+
+//![remote]
+ component = Qt.createComponent("Sprite.qml");
+ if (component.status == Component.Ready)
+ finishCreation();
+ else
+ component.statusChanged.connect(finishCreation);
+//![remote]
+
+//![local]
+ component = Qt.createComponent("Sprite.qml");
+ sprite = component.createObject(appWindow);
+
+ if (sprite == null) {
+ // Error Handling
+ console.log("Error creating object");
+ } else {
+ sprite.x = 100;
+ sprite.y = 100;
+ // ...
+ }
+//![local]
+
+//![func-end]
+}
+//![func-end]
+
+//![finishCreation]
function finishCreation() {
if (component.status == Component.Ready) {
sprite = component.createObject(appWindow);
@@ -17,31 +49,4 @@ function finishCreation() {
console.log("Error loading component:", component.errorString());
}
}
-//![0]
-
-function createSpriteObjects() {
-
-//![1]
-component = Qt.createComponent("Sprite.qml");
-if (component.status == Component.Ready)
- finishCreation();
-else
- component.statusChanged.connect(finishCreation);
-//![1]
-
-//![2]
-component = Qt.createComponent("Sprite.qml");
-sprite = component.createObject(appWindow);
-
-if (sprite == null) {
- // Error Handling
- console.log("Error loading component:", component.errorString());
-} else {
- sprite.x = 100;
- sprite.y = 100;
- // ...
-}
-//![2]
-
-}
-
+//![finishCreation]
diff --git a/examples/declarative/tutorials/extending/chapter5-plugins/musicplugin.cpp b/doc/src/snippets/declarative/createComponent-simple.qml
index 76acf0144d..9669580353 100644
--- a/examples/declarative/tutorials/extending/chapter5-plugins/musicplugin.cpp
+++ b/doc/src/snippets/declarative/createComponent-simple.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the documentation of the Qt Toolkit.
+** 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:
@@ -37,18 +37,21 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "musicplugin.h"
//![0]
-#include "musician.h"
-#include "instrument.h"
-#include <QtDeclarative/qdeclarative.h>
+import Qt 4.7
-void MusicPlugin::registerTypes(const char *uri)
-{
- qmlRegisterType<Musician>(uri, 1, 0, "Musician");
- qmlRegisterType<Instrument>(uri, 1, 0, "Instrument");
-}
+Item {
+ id: container
+ width: 300; height: 300
-Q_EXPORT_PLUGIN2(musicplugin, MusicPlugin);
-//![0]
+ function loadButton() {
+ var component = Qt.createComponent("Button.qml");
+ if (component.status == Component.Ready) {
+ var button = component.createObject(container);
+ button.color = "red";
+ }
+ }
+ Component.onCompleted: loadButton()
+}
+//![0]
diff --git a/doc/src/snippets/declarative/createComponent.qml b/doc/src/snippets/declarative/createComponent.qml
index 8bfed076cf..0f9fad5a3c 100644
--- a/doc/src/snippets/declarative/createComponent.qml
+++ b/doc/src/snippets/declarative/createComponent.qml
@@ -40,12 +40,12 @@
//![0]
import Qt 4.7
-import "componentCreation.js" as MyModule
+import "componentCreation.js" as MyScript
Rectangle {
id: appWindow
width: 300; height: 300
- Component.onCompleted: MyModule.createSpriteObjects();
+ Component.onCompleted: MyScript.createSpriteObjects();
}
//![0]
diff --git a/doc/src/snippets/declarative/createQmlObject.qml b/doc/src/snippets/declarative/createQmlObject.qml
index 380f6f18c6..a5f15f4a1e 100644
--- a/doc/src/snippets/declarative/createQmlObject.qml
+++ b/doc/src/snippets/declarative/createQmlObject.qml
@@ -42,16 +42,19 @@ import Qt 4.7
Rectangle {
id: parentItem
- property QtObject newObject
width: 100
height: 100
function createIt() {
//![0]
-newObject = Qt.createQmlObject('import Qt 4.7; Rectangle {color: "red"; width: 20; height: 20}',
+var newObject = Qt.createQmlObject('import Qt 4.7; Rectangle {color: "red"; width: 20; height: 20}',
parentItem, "dynamicSnippet1");
//![0]
+
+//![destroy]
+newObject.destroy(1000);
+//![destroy]
}
Component.onCompleted: createIt()
diff --git a/examples/declarative/tutorials/extending/chapter5-plugins/app.qml b/doc/src/snippets/declarative/dynamicObjects-destroy.qml
index 9c050b873c..2c0c2fb9a6 100644
--- a/examples/declarative/tutorials/extending/chapter5-plugins/app.qml
+++ b/doc/src/snippets/declarative/dynamicObjects-destroy.qml
@@ -37,17 +37,19 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
+//![0]
import Qt 4.7
Item {
+ id: container
+ width: 500; height: 100
- Musician {
- id: reddy
- name: "Reddy the Rocker"
- instrument: Instrument { type: "Guitar" }
+ Component.onCompleted: {
+ var component = Qt.createComponent("SelfDestroyingRect.qml");
+ for (var i=0; i<5; i++) {
+ var object = component.createObject(container);
+ object.x = (object.width + 10) * i;
+ }
}
-
- Component.onCompleted: console.log("Reddy plays the " + reddy.instrument.type)
}
-
+//![0]
diff --git a/doc/src/snippets/declarative/mouseareadragfilter.qml b/doc/src/snippets/declarative/mouseareadragfilter.qml
new file mode 100644
index 0000000000..52ed10cedd
--- /dev/null
+++ b/doc/src/snippets/declarative/mouseareadragfilter.qml
@@ -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 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$
+**
+****************************************************************************/
+
+//! [dragfilter]
+import Qt 4.7
+
+Rectangle {
+ width: 480
+ height: 320
+ Rectangle {
+ x: 30; y: 30
+ width: 300; height: 240
+ color: "lightsteelblue"
+
+ MouseArea {
+ anchors.fill: parent
+ drag.target: parent;
+ drag.axis: "XAxis"
+ drag.minimumX: 30
+ drag.maximumX: 150
+ drag.filterChildren: true
+
+ Rectangle {
+ color: "yellow"
+ x: 50; y : 50
+ width: 100; height: 100
+ MouseArea {
+ anchors.fill: parent
+ onClicked: console.log("Clicked")
+ }
+ }
+ }
+ }
+}
+//! [dragfilter]
diff --git a/doc/src/snippets/declarative/numberanimation.qml b/doc/src/snippets/declarative/numberanimation.qml
new file mode 100644
index 0000000000..57d23b17f0
--- /dev/null
+++ b/doc/src/snippets/declarative/numberanimation.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** 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: 100; height: 100
+ color: "red"
+
+ NumberAnimation on x { to: 50; duration: 1000 }
+}
+//![0]
+
diff --git a/doc/src/snippets/declarative/parallelanimation.qml b/doc/src/snippets/declarative/parallelanimation.qml
new file mode 100644
index 0000000000..d823b4f46c
--- /dev/null
+++ b/doc/src/snippets/declarative/parallelanimation.qml
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** 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: rect
+ width: 100; height: 100
+ color: "red"
+
+ ParallelAnimation {
+ running: true
+ NumberAnimation { target: rect; property: "x"; to: 50; duration: 1000 }
+ NumberAnimation { target: rect; property: "y"; to: 50; duration: 1000 }
+ }
+}
+//![0]
+
diff --git a/doc/src/snippets/declarative/parentanimation.qml b/doc/src/snippets/declarative/parentanimation.qml
new file mode 100644
index 0000000000..7f11a438a2
--- /dev/null
+++ b/doc/src/snippets/declarative/parentanimation.qml
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** 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 {
+ 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 }
+ }
+
+ transitions: Transition {
+ ParentAnimation {
+ NumberAnimation { properties: "x,y"; duration: 1000 }
+ }
+ }
+
+ MouseArea { anchors.fill: parent; onClicked: blueRect.state = "reparented" }
+ }
+}
+//![0]
+
diff --git a/doc/src/snippets/declarative/parentchange.qml b/doc/src/snippets/declarative/parentchange.qml
index 7f5718a43f..ea508322c8 100644
--- a/doc/src/snippets/declarative/parentchange.qml
+++ b/doc/src/snippets/declarative/parentchange.qml
@@ -41,9 +41,8 @@
//![0]
import Qt 4.7
-Rectangle {
- width: 200
- height: 100
+Item {
+ width: 200; height: 100
Rectangle {
id: redRect
diff --git a/doc/src/snippets/declarative/pathview/pathattributes.qml b/doc/src/snippets/declarative/pathview/pathattributes.qml
index 8d424a8635..4daee638ed 100644
--- a/doc/src/snippets/declarative/pathview/pathattributes.qml
+++ b/doc/src/snippets/declarative/pathview/pathattributes.qml
@@ -49,8 +49,8 @@ Rectangle {
id: delegate
Item {
width: 80; height: 80
- scale: PathView.scale
- opacity: PathView.opacity
+ scale: PathView.iconScale
+ opacity: PathView.iconOpacity
Column {
Image { anchors.horizontalCenter: name.horizontalCenter; width: 64; height: 64; source: icon }
Text { text: name; font.pointSize: 16}
@@ -66,11 +66,11 @@ Rectangle {
delegate: delegate
path: Path {
startX: 120; startY: 100
- PathAttribute { name: "scale"; value: 1.0 }
- PathAttribute { name: "opacity"; value: 1.0 }
+ PathAttribute { name: "iconScale"; value: 1.0 }
+ PathAttribute { name: "iconOpacity"; value: 1.0 }
PathQuad { x: 120; y: 25; controlX: 260; controlY: 75 }
- PathAttribute { name: "scale"; value: 0.3 }
- PathAttribute { name: "opacity"; value: 0.5 }
+ PathAttribute { name: "iconScale"; value: 0.3 }
+ PathAttribute { name: "iconOpacity"; value: 0.5 }
PathQuad { x: 120; y: 100; controlX: -20; controlY: 75 }
}
}
diff --git a/doc/src/snippets/declarative/propertyanimation.qml b/doc/src/snippets/declarative/propertyanimation.qml
new file mode 100644
index 0000000000..059cde5372
--- /dev/null
+++ b/doc/src/snippets/declarative/propertyanimation.qml
@@ -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 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 {
+
+//![transition]
+Rectangle {
+ id: rect
+ width: 100; height: 100
+ color: "red"
+
+ states: State {
+ name: "moved"
+ PropertyChanges { target: rect; x: 50 }
+ }
+
+ transitions: Transition {
+ PropertyAnimation { properties: "x,y"; easing.type: Easing.InOutQuad }
+ }
+}
+//![transition]
+
+//![behavior]
+Rectangle {
+ width: 100; height: 100
+ color: "red"
+
+ Behavior on x { PropertyAnimation {} }
+
+ MouseArea { anchors.fill: parent; onClicked: parent.x = 50 }
+}
+//![behavior]
+
+//![propertyvaluesource]
+Rectangle {
+ width: 100; height: 100
+ color: "red"
+
+ SequentialAnimation on x {
+ loops: Animation.Infinite
+ PropertyAnimation { to: 50 }
+ PropertyAnimation { to: 0 }
+ }
+}
+//![propertyvaluesource]
+
+//![standalone]
+Rectangle {
+ id: theRect
+ width: 100; height: 100
+ color: "red"
+
+ // this is a standalone animation, it's not running by default
+ PropertyAnimation { id: animation; target: theRect; property: "width"; to: 30; duration: 500 }
+
+ MouseArea { anchors.fill: parent; onClicked: animation.running = true }
+}
+//![standalone]
+
+
+}
diff --git a/doc/src/snippets/declarative/qmldocuments.qml b/doc/src/snippets/declarative/qmldocuments.qml
new file mode 100644
index 0000000000..c19a65874a
--- /dev/null
+++ b/doc/src/snippets/declarative/qmldocuments.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
+
+Rectangle {
+ property alias text: textItem.text
+
+ width: 100; height: 30
+ border.width: 1
+ radius: 5
+ smooth: true
+
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "darkGray" }
+ GradientStop { position: 0.5; color: "black" }
+ GradientStop { position: 1.0; color: "darkGray" }
+ }
+
+ Text {
+ id: textItem
+ anchors.centerIn: parent
+ font.pointSize: 20
+ color: "white"
+ }
+
+}
+//![0]
diff --git a/doc/src/snippets/declarative/qtobject.qml b/doc/src/snippets/declarative/qtobject.qml
new file mode 100644
index 0000000000..970fa16645
--- /dev/null
+++ b/doc/src/snippets/declarative/qtobject.qml
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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 {
+ QtObject {
+ id: attributes
+ property string name
+ property int size
+ property variant attributes
+ }
+
+ Text { text: attributes.name }
+}
+//![0]
+
diff --git a/tools/qtestlib/chart/reportgenerator.h b/doc/src/snippets/declarative/rotationanimation.qml
index 1f075bdf15..c81395a459 100644
--- a/tools/qtestlib/chart/reportgenerator.h
+++ b/doc/src/snippets/declarative/rotationanimation.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the tools applications of the Qt Toolkit.
+** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -38,31 +38,29 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef REPORTGENERATOR_H
-#define REPORTGENERATOR_H
-#include "database.h"
-#include <QtCore/qglobal.h>
+//![0]
+import Qt 4.7
-QT_BEGIN_NAMESPACE
+Item {
+ width: 300; height: 300
-class ReportGenerator
-{
-public:
- ReportGenerator();
- QByteArray printColors(const QString &tableName, const QString &seriesName);
- QList<QByteArray> writeChart(const QString &tableName, bool combineVersions);
- void writeReport(const QString &tableName, const QString &filename, bool combineVersions = false);
- void writeReports();
- QString fileName();
-private:
- QList<QByteArray> m_colorScheme;
- QString m_fileName;
-};
+ Rectangle {
+ id: rect
+ width: 150; height: 100; anchors.centerIn: parent
+ color: "red"
+ smooth: true
-void printTestCaseResults(const QString &testCaseName);
+ states: State {
+ name: "rotated"; PropertyChanges { target: rect; rotation: 180 }
+ }
-QT_END_NAMESPACE
+ transitions: Transition {
+ RotationAnimation { duration: 1000; direction: RotationAnimation.Counterclockwise }
+ }
+ }
-#endif
+ MouseArea { anchors.fill: parent; onClicked: rect.state = "rotated" }
+}
+//![0]
diff --git a/doc/src/snippets/declarative/sequentialanimation.qml b/doc/src/snippets/declarative/sequentialanimation.qml
new file mode 100644
index 0000000000..a15f7f3076
--- /dev/null
+++ b/doc/src/snippets/declarative/sequentialanimation.qml
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** 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: rect
+ width: 100; height: 100
+ color: "red"
+
+ SequentialAnimation {
+ running: true
+ NumberAnimation { target: rect; property: "x"; to: 50; duration: 1000 }
+ NumberAnimation { target: rect; property: "y"; to: 50; duration: 1000 }
+ }
+}
+//![0]
+
diff --git a/doc/src/snippets/declarative/smoothedanimation.qml b/doc/src/snippets/declarative/smoothedanimation.qml
new file mode 100644
index 0000000000..20c90b564b
--- /dev/null
+++ b/doc/src/snippets/declarative/smoothedanimation.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: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$
+**
+****************************************************************************/
+
+//![0]
+import Qt 4.7
+
+Rectangle {
+ width: 800; height: 600
+ color: "blue"
+
+ Rectangle {
+ width: 60; height: 60
+ x: rect1.x - 5; y: rect1.y - 5
+ color: "green"
+
+ Behavior on x { SmoothedAnimation { velocity: 200 } }
+ Behavior on y { SmoothedAnimation { velocity: 200 } }
+ }
+
+ Rectangle {
+ id: rect1
+ width: 50; height: 50
+ color: "red"
+ }
+
+ focus: true
+ Keys.onRightPressed: rect1.x = rect1.x + 100
+ Keys.onLeftPressed: rect1.x = rect1.x - 100
+ Keys.onUpPressed: rect1.y = rect1.y - 100
+ Keys.onDownPressed: rect1.y = rect1.y + 100
+}
+//![0]
diff --git a/doc/src/snippets/declarative/dynamicObjects.qml b/doc/src/snippets/declarative/springanimation.qml
index 3698499048..8e810e1c93 100644
--- a/doc/src/snippets/declarative/dynamicObjects.qml
+++ b/doc/src/snippets/declarative/springanimation.qml
@@ -38,32 +38,28 @@
**
****************************************************************************/
-import Qt 4.7
-
//![0]
-Rectangle {
- id: rootItem
- width: 300
- height: 300
+import Qt 4.7
- Component {
- id: rectComponent
+Item {
+ width: 300; height: 300
- Rectangle {
- id: rect
- width: 40; height: 40;
- color: "red"
+ Rectangle {
+ id: rect
+ width: 50; height: 50
+ color: "red"
- NumberAnimation on opacity { from: 1; to: 0; duration: 1000 }
+ Behavior on x { SpringAnimation { spring: 2; damping: 0.2 } }
+ Behavior on y { SpringAnimation { spring: 2; damping: 0.2 } }
+ }
- Component.onCompleted: rect.destroy(1000);
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ rect.x = mouse.x - rect.width/2
+ rect.y = mouse.y - rect.height/2
}
}
-
- function createRectangle() {
- var object = rectComponent.createObject(rootItem);
- }
-
- Component.onCompleted: createRectangle()
}
//![0]
+
diff --git a/doc/src/snippets/declarative/state-when.qml b/doc/src/snippets/declarative/state-when.qml
new file mode 100644
index 0000000000..6d3bb75245
--- /dev/null
+++ b/doc/src/snippets/declarative/state-when.qml
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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
+//![0]
+Rectangle {
+ id: myRect
+ width: 100; height: 100
+ color: "red"
+
+ MouseArea { id: mouseArea; anchors.fill: parent }
+
+ states: State {
+ name: "hidden"; when: mouseArea.pressed
+ PropertyChanges { target: myRect; opacity: 0 }
+ }
+}
+//![0]
diff --git a/doc/src/snippets/declarative/state.qml b/doc/src/snippets/declarative/state.qml
index a99c2e27d7..ce2653b616 100644
--- a/doc/src/snippets/declarative/state.qml
+++ b/doc/src/snippets/declarative/state.qml
@@ -46,24 +46,17 @@ Rectangle {
width: 100; height: 100
color: "black"
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ onClicked: myRect.state == 'clicked' ? myRect.state = "" : myRect.state = 'clicked';
+ }
+
states: [
State {
name: "clicked"
- PropertyChanges {
- target: myRect
- color: "red"
- }
+ 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
index c3b1796e2c..127e3a7f76 100644
--- a/doc/src/snippets/declarative/states.qml
+++ b/doc/src/snippets/declarative/states.qml
@@ -40,42 +40,22 @@
****************************************************************************/
//![0]
import Qt 4.7
-
-Item {
- id: myItem
+
+Rectangle {
+ id: myRect
width: 200; height: 200
+ color: "red"
- Rectangle {
- id: myRect
- width: 100; height: 100
- color: "red"
+ MouseArea {
+ anchors.fill: parent
+ onClicked: myRect.state = 'moved'
}
states: [
State {
name: "moved"
- PropertyChanges {
- target: myRect
- x: 50
- y: 50
- }
+ 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]
+//![0]
diff --git a/doc/src/snippets/declarative/transition-from-to.qml b/doc/src/snippets/declarative/transition-from-to.qml
new file mode 100644
index 0000000000..615de17712
--- /dev/null
+++ b/doc/src/snippets/declarative/transition-from-to.qml
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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
+
+//![0]
+Rectangle {
+ id: rect
+ width: 100; height: 100
+ color: "red"
+
+ MouseArea { id: mouseArea; anchors.fill: parent }
+
+ states: State {
+ name: "brighter"; when: mouseArea.pressed
+ PropertyChanges { target: rect; color: "yellow" }
+ }
+
+ transitions: Transition {
+ ColorAnimation { duration: 1000 }
+ }
+}
+//![0]
+
+
diff --git a/doc/src/snippets/declarative/transition-reversible.qml b/doc/src/snippets/declarative/transition-reversible.qml
new file mode 100644
index 0000000000..8a7b69abcb
--- /dev/null
+++ b/doc/src/snippets/declarative/transition-reversible.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$
+**
+****************************************************************************/
+import Qt 4.7
+
+//![0]
+Rectangle {
+ id: rect
+ width: 100; height: 100
+ color: "red"
+
+ MouseArea { id: mouseArea; anchors.fill: parent }
+
+ states: State {
+ name: "brighter"
+ when: mouseArea.pressed
+ PropertyChanges { target: rect; color: "yellow"; x: 50 }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 1000 }
+ ColorAnimation { duration: 1000 }
+ }
+ }
+}
+//![0]
+
diff --git a/doc/src/snippets/declarative/transition.qml b/doc/src/snippets/declarative/transition.qml
new file mode 100644
index 0000000000..b8847503c5
--- /dev/null
+++ b/doc/src/snippets/declarative/transition.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** 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: rect
+ width: 100; height: 100
+ color: "red"
+
+ states: State {
+ name: "moved"
+ PropertyChanges { target: rect; x: 50; y: 50 }
+ }
+
+ transitions: Transition {
+ PropertyAnimation { properties: "x,y"; easing.type: Easing.InOutQuad }
+ }
+}
+//![0]
+
diff --git a/doc/src/snippets/droparea.cpp b/doc/src/snippets/droparea.cpp
index bbcf82da02..bb49dd7e63 100644
--- a/doc/src/snippets/droparea.cpp
+++ b/doc/src/snippets/droparea.cpp
@@ -130,7 +130,7 @@ QPixmap DropArea::extractPixmap(const QByteArray &data, const QString &format)
QList<QByteArray> imageFormats = QImageReader::supportedImageFormats();
QPixmap pixmap;
- foreach (QByteArray imageFormat, imageFormats) {
+ foreach (const QByteArray &imageFormat, imageFormats) {
if (format.mid(6) == QString(imageFormat)) {
pixmap.loadFromData(data, imageFormat);
break;
diff --git a/doc/src/snippets/picture/picture.cpp b/doc/src/snippets/picture/picture.cpp
index 0c5712aa57..52839785d8 100644
--- a/doc/src/snippets/picture/picture.cpp
+++ b/doc/src/snippets/picture/picture.cpp
@@ -76,7 +76,7 @@ int main()
// FORMATS
//! [2]
QStringList list = QPicture::inputFormatList();
- foreach (QString string, list)
+ foreach (const QString &string, list)
myProcessing(string);
//! [2]
}
@@ -85,7 +85,7 @@ int main()
// OUTPUT
//! [3]
QStringList list = QPicture::outputFormatList();
- foreach (QString string, list)
+ foreach (const QString &string, list)
myProcessing(string);
//! [3]
}
diff --git a/doc/src/snippets/qfontdatabase/main.cpp b/doc/src/snippets/qfontdatabase/main.cpp
index 7f939de125..1b8ff42100 100644
--- a/doc/src/snippets/qfontdatabase/main.cpp
+++ b/doc/src/snippets/qfontdatabase/main.cpp
@@ -50,11 +50,11 @@ int main(int argc, char **argv)
fontTree.setColumnCount(2);
fontTree.setHeaderLabels(QStringList() << "Font" << "Smooth Sizes");
- foreach (QString family, database.families()) {
+ foreach (const QString &family, database.families()) {
QTreeWidgetItem *familyItem = new QTreeWidgetItem(&fontTree);
familyItem->setText(0, family);
- foreach (QString style, database.styles(family)) {
+ foreach (const QString &style, database.styles(family)) {
QTreeWidgetItem *styleItem = new QTreeWidgetItem(familyItem);
styleItem->setText(0, style);
diff --git a/doc/src/snippets/qlistview-dnd/model.cpp b/doc/src/snippets/qlistview-dnd/model.cpp
index d310c03f25..bca71ee243 100644
--- a/doc/src/snippets/qlistview-dnd/model.cpp
+++ b/doc/src/snippets/qlistview-dnd/model.cpp
@@ -109,7 +109,7 @@ bool DragDropListModel::dropMimeData(const QMimeData *data,
//! [6]
insertRows(beginRow, rows, QModelIndex());
- foreach (QString text, newItems) {
+ foreach (const QString &text, newItems) {
QModelIndex idx = index(beginRow, 0, QModelIndex());
setData(idx, text);
beginRow++;
@@ -139,7 +139,7 @@ QMimeData *DragDropListModel::mimeData(const QModelIndexList &indexes) const
QDataStream stream(&encodedData, QIODevice::WriteOnly);
- foreach (QModelIndex index, indexes) {
+ foreach (const QModelIndex &index, indexes) {
if (index.isValid()) {
QString text = data(index, Qt::DisplayRole).toString();
stream << text;
diff --git a/doc/src/snippets/qstringlist/main.cpp b/doc/src/snippets/qstringlist/main.cpp
index 76785f1c33..9ada319c32 100644
--- a/doc/src/snippets/qstringlist/main.cpp
+++ b/doc/src/snippets/qstringlist/main.cpp
@@ -118,7 +118,7 @@ Widget::Widget(QWidget *parent)
result.clear();
//! [12]
- foreach (QString str, list) {
+ foreach (const QString &str, list) {
if (str.contains("Bill"))
result += str;
}
diff --git a/doc/src/snippets/qtreeview-dnd/dragdropmodel.cpp b/doc/src/snippets/qtreeview-dnd/dragdropmodel.cpp
index 2d01240a1e..620a7165f3 100644
--- a/doc/src/snippets/qtreeview-dnd/dragdropmodel.cpp
+++ b/doc/src/snippets/qtreeview-dnd/dragdropmodel.cpp
@@ -123,7 +123,7 @@ QMimeData *DragDropModel::mimeData(const QModelIndexList &indexes) const
QDataStream stream(&encodedData, QIODevice::WriteOnly);
- foreach (QModelIndex index, indexes) {
+ foreach (const QModelIndex &index, indexes) {
if (index.isValid()) {
QString text = data(index, Qt::DisplayRole).toString();
stream << index.internalId() << index.row() << index.column() << text;
diff --git a/doc/src/snippets/widgets-tutorial/nestedlayouts/main.cpp b/doc/src/snippets/widgets-tutorial/nestedlayouts/main.cpp
index 6a49be8be2..35d2fa7c5d 100644
--- a/doc/src/snippets/widgets-tutorial/nestedlayouts/main.cpp
+++ b/doc/src/snippets/widgets-tutorial/nestedlayouts/main.cpp
@@ -72,9 +72,9 @@ int main(int argc, char *argv[])
<< (QStringList() << "David Bradley" << "42")
<< (QStringList() << "Knut Walters" << "25")
<< (QStringList() << "Andrea Jones" << "34");
- foreach (QStringList row, rows) {
+ foreach (const QStringList &row, rows) {
QList<QStandardItem *> items;
- foreach (QString text, row)
+ foreach (const QString &text, row)
items.append(new QStandardItem(text));
model.appendRow(items);
}
diff --git a/doc/src/template/style/OfflineStyle.css b/doc/src/template/style/OfflineStyle.css
index afa7de03a8..9f5d28b1b4 100644
--- a/doc/src/template/style/OfflineStyle.css
+++ b/doc/src/template/style/OfflineStyle.css
@@ -1,588 +1,26 @@
@media screen
{
- html
- {
- color: #000000;
- background: #FFFFFF;
- }
- body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, blockquote, th, td
- {
- margin: 0;
- padding: 0;
- }
- table
- {
- border-collapse: collapse;
- border-spacing: 0;
- }
- fieldset, img
- {
- border: 0;
- }
- address, caption, cite, code, dfn, em, strong, th, var, optgroup
- {
- font-style: inherit;
- font-weight: inherit;
- }
- del, ins
- {
- text-decoration: none;
- }
- li
- {
- list-style: none;
- }
- caption, th
- {
- text-align: left;
- }
- h1, h2, h3, h4, h5, h6
- {
- font-size: 100%;
- }
- q:before, q:after
- {
- content: '';
- }
- abbr, acronym
- {
- border: 0;
- font-variant: normal;
- }
- sup
- {
- vertical-align: baseline;
- }
- sub
- {
- vertical-align: baseline;
- }
- tt, .qmlreadonly span, .qmldefault span
- {
- word-spacing:5px;
- }
- .heading
- {
- font: normal 600 16px/1.0 Arial;
- }
- .subtitle
- {
- font-size: 13px;
- }
- .small-subtitle
- {
- font-size: 13px;
- }
- legend
- {
- color: #000000;
- }
- input, button, textarea, select, optgroup, option
- {
- font-family: inherit;
- font-size: inherit;
- font-style: inherit;
- font-weight: inherit;
- }
- input, button, textarea, select
- {
- font-size: 100%;
- }
- body
- {
- font: normal 13px/1.2 Verdana;
- color: #363534;
- }
- strong
- {
- font-weight: bold;
- }
- em
- {
- font-style: italic;
- }
- a
- {
- color: #00732f;
- text-decoration: none;
- }
- .header, .footer, .wrapper
- {
- /*min-width: 600px;*/
- max-width: 1500px;
- margin: 0 5px;
- }
+
.wrapper
{
- position:relative;
top:50px;
+ background: none;
+
}
.wrapper .bd
{
+ background: none;
position: relative;
}
- .header, .footer
- {
- display: block;
- clear: both;
- overflow: hidden;
- }
- .header
- {
- height: 115px;
- position: relative;
- }
-
-
- .header .qtref
- {
- position: absolute;
- top: 28px;
- left: 88px;
- width: 302px;
- height: 22px;
- }
- .header .qtref span
- {
- display: block;
- height: 22px;
- }
- .wrap .content h1
- {
- font: 600 18px/1.2 Arial;
- }
- .wrap .content h2
- {
- font: 600 16px/1.2 Arial;
- }
- .wrap .content h3
- {
- font: 600 14px/1.2 Arial;
- }
- .wrap .content h4
- {
- font: 600 12px/1.2 Arial;
- }
-
- .wrap .content p
- {
- line-height: 20px;
- padding: 5px;
- }
- .wrap .content table p
- {
- line-height: 20px;
- padding: 0px;
- }
- .wrap .content ul
- {
- padding-left: 25px;
- padding-top: 10px;
- }
- a:hover
- {
- color: #4c0033;
- text-decoration: underline;
- }
- .content a:visited
- {
- color: #4c0033;
- text-decoration: none;
- }
- .content a:visited:hover
- {
- color: #4c0033;
- text-decoration: underline;
- }
-
- pre
- {
- border: 1px solid #DDDDDD;
- margin: 0 20px 10px 10px;
- padding: 20px 15px 20px 20px;
- overflow-x: auto;
- }
- table, pre
- {
- -moz-border-radius: 7px 7px 7px 7px;
- background-color: #F6F6F6;
- border: 1px solid #E6E6E6;
- border-collapse: separate;
- font-size: 11px;
- /*min-width: 395px;*/
- margin-bottom: 25px;
- display: inline-block;
- }
- thead
- {
- margin-top: 5px;
- font:600 12px/1.2 Arial;
- }
- th
- {
- padding: 5px 15px 5px 15px;
- background-color: #E1E1E1;
- /* border-bottom: 1px solid #E6E6E6;*/
- border-left: 1px solid #E6E6E6;
- /* border-right: 1px solid #E6E6E6;*/
- }
- td
- {
- padding: 3px 15px 3px 20px;
- /* border-left: 1px solid #E6E6E6;
- border-right: 1px solid #E6E6E6;*/
- }
- tr.odd td:hover, tr.even td:hover
- {
- /* border-right: 1px solid #C3C3C3;
- border-left: 1px solid #C3C3C3;*/
- }
-
- td.rightAlign
- {
- padding: 3px 15px 3px 10px;
- }
- table tr.odd
- {
- border-left: 1px solid #E6E6E6;
- background-color: #F6F6F6;
- color: #66666E;
- }
- table tr.even
- {
- border-left: 1px solid #E6E6E6;
- background-color: #ffffff;
- color: #66666E;
- }
- table tr.odd td:hover, table tr.even td:hover
- {
- background-color: #E6E6E6;
- }
-
- span.comment
- {
- color: #8B0000;
- font-style: italic;
- }
- span.string, span.char
- {
- color: #254117;
- }
-
- .qmltype
- {
- text-align: center;
- font-size: 160%;
- }
- .qmlreadonly
- {
- float: right;
- color: #254117;
- }
-
- .qmldefault
- {
- float: right;
- color: red;
- }
-
- .footer
- {
- border-top:1px solid #E5E5E5;
- min-height: 100px;
- color: #797775;
- font: normal 9px/1 Verdana;
- text-align: center;
- padding-top: 40px;
- margin: 0;
- }
- .wrap
- {
- margin: 0 5px 0 5px;
- }
- .wrap .toolbar
- {
- display:block;
- }
-
- .wrap .breadcrumb ul li
- {
- float: left;
- background: url(../images/breadcrumb.png) no-repeat 0 5px;
- padding-left: 15px;
- margin-left: 15px;
- font-weight: bold;
- }
- .wrap .breadcrumb ul li.last
- {
- font-weight: normal;
- }
- .wrap .breadcrumb ul li a
- {
- /* color: #363534;*/
- color: #00732F;
- }
- .wrap .breadcrumb ul li.first
- {
- background-image: none;
- padding-left: 0;
- margin-left: 0;
- }
- .wrap .content
- {
- word-wrap:break-word;
- }
- .wrap .content li
- {
- /*padding-left: 12px;*/
- background: url(../images/bullet_sq.png) no-repeat 0 5px;
- font: normal 400 10pt/1 Verdana;
- /* color: #44a51c;*/
- margin-bottom: 10px;
- }
-
- .offline .wrap .content
- {
- padding-top: 15px;
- }
-
- .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after
- {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
- }
-
- hr
- {
- background-color: #E6E6E6;
- border: 1px solid #E6E6E6;
- height: 1px;
- width: 100%;
- text-align: left;
- margin: 5px 0px 5px 0px;
- }
-
- .content .alignedsummary
- {
- margin: 5px;
- width:100%;
- }
-
-
- .toc
- {
- float: right;
- -moz-border-radius: 7px 7px 7px 7px;
- background-color: #F6F6F6;
- border: 1px solid #DDDDDD;
- margin: 0 20px 10px 10px;
- padding: 20px 15px 20px 20px;
- height: auto;
- width: 200px;
- }
-
- .toc h3, .generic a
- {
- font: 600 12px/1.2 Arial;
- }
-
- .wrap .content .toc ul
- {
- padding-left: 0px;
- }
-
-
- .wrap .content .toc .level2
- {
- margin-left: 15px;
- }
-
- .wrap .content .toc .level3
- {
- margin-left: 30px;
- }
-
- .content .toc li
- {
- font: normal 10px/1.2 Verdana;
- background: url(../images/bullet_dn.png) no-repeat 0 5px;
- }
-
-
- .generic{
- max-width:75%;
- }
- .generic td{
- padding:0;
- }
-
- .generic .odd .alphaChar{
- background-color: #F6F6F6;
- }
-
- .generic .even .alphaChar{
- background-color: #FFFFFF;
- }
-
- .highlightedCode
- {
- margin:10px;
- }
-
- .flowList{
- vertical-align:top;
- }
- .alphaChar{
- width:100%;
- background-color:#F6F6F6;
- border:1px solid #E6E6E6;
- font-size:12pt;
- padding-left:10px;
- margin-top:10px;
- margin-bottom:10px;
- }
-
- .flowList dl{
- }
- .flowList dd{
- display:inline-block;
- margin-left:10px;
- width:250px;
- }
- .wrap .content .flowList p{
- padding:0px;
- }
-
- .relpage
- {
- -moz-border-radius: 7px 7px 7px 7px;
- border: 1px solid #DDDDDD;
- padding: 25px 25px;
- clear: both;
- }
- .relpage ul
- {
- float: none;
- padding: 15px;
- }
- .content .relpage li
- {
- font: normal 11px/1.2 Verdana;
- }
- h3.fn, span.fn
- {
- background-color: #F6F6F6;
- border-width: 1px;
- border-style: solid;
- border-color: #E6E6E6;
- font-weight: bold;
- word-spacing:3px;
- }
-
- .functionIndex {
- font-size:12pt;
- word-spacing:10px;
- margin-bottom:10px;
- background-color: #F6F6F6;
- border-width: 1px;
- border-style: solid;
- border-color: #E6E6E6;
- width:100%;
- }
-
- .centerAlign { text-align:center;}
- .rightAlign {text-align:right;}
- .leftAlign {text-align:left;}
- .topAlign{vertical-align:top }
- .functionIndex a{display:inline-block;}
-
- /* start index box */
- .indexbox
- {
- width: 100%;
- display:inline-block;
- }
-
- .indexboxcont { display: block; }
-
- .indexboxbar
- {
- border-bottom:1px solid #E5E5E5;
- margin-bottom: 25px;
- }
-
- .indexboxcont .section
- {
- display: inline-block;
- padding:0 2% 0 1%;
- vertical-align:top;
- }
-
- .indexboxcont .section {
- float: left;
- }
-
- .indexboxcont .section p
- {
- padding-top: 20px;
- padding-bottom: 20px;
- }
- .indexboxcont .sectionlist
- {
- display: inline-block;
- vertical-align:top;
- padding: 0;
- }
- .indexboxcont .sectionlist ul
- {
- margin-bottom: 20px;
- }
-
- .indexboxcont .sectionlist ul li
- {
- line-height: 12px;
- }
-
- .content .indexboxcont li
- {
- font: normal 600 13px/1 Verdana;
- }
-
- .indexbox a:hover, .indexbox a:visited:hover
- {
- color: #4c0033;
- text-decoration: underline;
- }
-
- .indexbox a:visited
- {
- color: #00732f;
- text-decoration: none;
- }
-
- .indexbox .indexIcon {
- width: 11%;
- }
-
-
- .indexboxcont:after
- {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
- }
-
+
body.offline
{
background-image: none;
+ background-color: #FFFFFF;
+
}
.offline .footer {
@@ -811,22 +249,3 @@ ul.sf-menu li li li.sfHover ul {
}
/* end of screen media */
-/* start of print media */
-
-@media print
-{
- input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft
- {
- display: none;
- background: none;
- }
- .content
- {
- position: absolute;
- top: 0px;
- left: 0px;
- background: none;
- display: block;
- }
-}
-/* end of print media */
diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css
index 184a83234b..9f809212c8 100755
--- a/doc/src/template/style/style.css
+++ b/doc/src/template/style/style.css
@@ -1,6 +1,8 @@
@media screen
{
- html
+
+/* basic elements */
+ html
{
color: #000000;
background: #FFFFFF;
@@ -18,8 +20,7 @@
fieldset, img
{
border: 0;
- height:100%;
- width:100%
+ max-width:100%;
}
address, caption, cite, code, dfn, em, strong, th, var, optgroup
{
@@ -41,7 +42,6 @@
h1, h2, h3, h4, h5, h6
{
font-size: 100%;
-/* font-weight: normal; */
}
q:before, q:after
{
@@ -52,11 +52,7 @@
border: 0;
font-variant: normal;
}
- sup
- {
- vertical-align: baseline;
- }
- sub
+ sup, sub
{
vertical-align: baseline;
}
@@ -64,19 +60,6 @@
{
word-spacing:5px;
}
- .heading
- {
- font: normal 600 16px/1.0 Arial;
- padding-bottom: 15px;
- }
- .subtitle
- {
- font-size: 13px;
- }
- .small-subtitle
- {
- font-size: 13px;
- }
legend
{
color: #000000;
@@ -92,9 +75,19 @@
{
font-size: 100%;
}
+ strong
+ {
+ font-weight: bold;
+ }
+ em
+ {
+ font-style: italic;
+ }
+
+ /* adding Qt theme */
html
{
- background-color: #e5e5e5;
+ /* background-color: #e5e5e5;*/
}
body
{
@@ -102,73 +95,115 @@
font: normal 13px/1.2 Verdana;
color: #363534;
}
- strong
+ a
{
- font-weight: bold;
+ color: #00732f;
+ text-decoration: none;
}
- em
+ hr
{
- font-style: italic;
+ background-color: #E6E6E6;
+ border: 1px solid #E6E6E6;
+ height: 1px;
+ width: 100%;
+ text-align: left;
+ margin: 15px 0px 15px 0px;
}
- a
+
+ pre
{
- color: #00732f;
- text-decoration: none;
+ border: 1px solid #DDDDDD;
+ -moz-border-radius: 7px 7px 7px 7px;
+ margin: 0 20px 10px 10px;
+ padding: 20px 15px 20px 20px;
+ overflow-x: auto;
}
- .header, .footer, .wrapper
+ table, pre
{
- min-width: 600px;
- max-width: 1500px;
- margin: 0 30px;
+ -moz-border-radius: 7px 7px 7px 7px;
+ background-color: #F6F6F6;
+ border: 1px solid #E6E6E6;
+ border-collapse: separate;
+ font-size: 11px;
+ margin-bottom: 25px;
}
- .wrapper
+ pre.highlightedCode {
+ display: block;
+ overflow:hidden;
+ }
+ thead
{
- background: url(../images/bg_r.png) repeat-y 100% 0;
+ margin-top: 5px;
+ font:600 12px/1.2 Arial;
}
- .wrapper .hd
+ th
{
- padding-left: 216px;
- height: 15px;
- background: url(../images/page.png) no-repeat 0 0;
- overflow: hidden;
+ padding: 5px 15px 5px 15px;
+ background-color: #E1E1E1;
+ border-left: 1px solid #E6E6E6;
}
- .offline .wrapper .hd
+ td
{
- background: url(../images/page.png) no-repeat 0 -15px;
+ padding: 3px 15px 3px 20px;
}
- .wrapper .hd span
+ tr.odd td:hover, tr.even td:hover {}
+
+ td.rightAlign
+ {
+ padding: 3px 5px 3px 10px;
+ }
+ table tr.odd
{
- height: 15px;
- display: block;
- overflow: hidden;
- background: url(../images/page.png) no-repeat 100% -30px;
+ border-left: 1px solid #E6E6E6;
+ background-color: #F6F6F6;
+ color: #66666E;
}
- .wrapper .bd
+ table tr.even
{
- background: url(../images/bg_l.png) repeat-y 0 0;
- position: relative;
+ border-left: 1px solid #E6E6E6;
+ background-color: #ffffff;
+ color: #66666E;
}
- .offline .wrapper .bd
+ table tr.odd td:hover, table tr.even td:hover
{
- background: url(../images/bg_l_blank.png) repeat-y 0 0;
+ /* background-color: #E6E6E6;*/ /* disabled until further notice */
}
- .wrapper .ft
+
+ span.comment
{
- padding-left: 216px;
- height: 15px;
- background: url(../images/page.png) no-repeat 0 -75px;
- overflow: hidden;
+ color: #8B0000;
+ font-style: italic;
}
- .offline .wrapper .ft
+ span.string, span.char
{
- background: url(../images/page.png) no-repeat 0 -90px;
+ color: #254117;
}
- .wrapper .ft span
+
+
+/* end basic elements */
+
+/* font style elements */
+ .heading
{
- height: 15px;
- display: block;
- background: url(../images/page.png) no-repeat 100% -60px;
- overflow: hidden;
+ font: normal bold 16px/1.0 Arial;
+ padding-bottom: 15px;
+ }
+ .subtitle
+ {
+ font-size: 13px;
+ }
+ .small-subtitle
+ {
+ font-size: 13px;
+ }
+/* end font style elements */
+
+/* global settings*/
+ .header, .footer, .wrapper
+ {
+ min-width: 600px;
+ max-width: 1500px;
+ margin: 0 30px;
}
.header, .footer
{
@@ -176,6 +211,17 @@
clear: both;
overflow: hidden;
}
+ .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after
+ {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+ }
+
+/* end global settings*/
+/* header elements */
.header
{
height: 115px;
@@ -203,7 +249,247 @@
text-indent: -999em;
background: url(../images/sprites-combined.png) no-repeat -78px -235px;
}
+ .content a:visited
+ {
+ color: #4c0033;
+ text-decoration: none;
+ }
+ .content a:visited:hover
+ {
+ color: #4c0033;
+ text-decoration: underline;
+ }
+
+ #nav-topright
+ {
+ height: 70px;
+ }
+
+ #nav-topright ul
+ {
+ list-style-type: none;
+ float: right;
+ width: 370px;
+ margin-top: 11px;
+ }
+
+ #nav-topright li
+ {
+ display: inline-block;
+ margin-right: 20px;
+ float: left;
+ }
+
+ #nav-topright li.nav-topright-last
+ {
+ margin-right: 0;
+ }
+
+ #nav-topright li a
+ {
+ background: transparent url(../images/sprites-combined.png) no-repeat;
+ height: 18px;
+ display: block;
+ overflow: hidden;
+ text-indent: -9999px;
+ }
+
+ #nav-topright li.nav-topright-home a
+ {
+ width: 65px;
+ background-position: -2px -91px;
+ }
+
+ #nav-topright li.nav-topright-home a:hover
+ {
+ background-position: -2px -117px;
+ }
+
+
+ #nav-topright li.nav-topright-dev a
+ {
+ width: 30px;
+ background-position: -76px -91px;
+ }
+
+ #nav-topright li.nav-topright-dev a:hover
+ {
+ background-position: -76px -117px;
+ }
+
+
+ #nav-topright li.nav-topright-labs a
+ {
+ width: 40px;
+ background-position: -114px -91px;
+ }
+
+ #nav-topright li.nav-topright-labs a:hover
+ {
+ background-position: -114px -117px;
+ }
+
+ #nav-topright li.nav-topright-doc a
+ {
+ width: 32px;
+ background-position: -162px -91px;
+ }
+
+ #nav-topright li.nav-topright-doc a:hover, #nav-topright li.nav-topright-doc-active a
+ {
+ background-position: -162px -117px;
+ }
+
+ #nav-topright li.nav-topright-blog a
+ {
+ width: 40px;
+ background-position: -203px -91px;
+ }
+
+ #nav-topright li.nav-topright-blog a:hover, #nav-topright li.nav-topright-blog-active a
+ {
+ background-position: -203px -117px;
+ }
+
+ #nav-topright li.nav-topright-shop a
+ {
+ width: 40px;
+ background-position: -252px -91px;
+ }
+
+ #nav-topright li.nav-topright-shop a:hover, #nav-topright li.nav-topright-shop-active a
+ {
+ background-position: -252px -117px;
+ }
+
+ #nav-logo
+ {
+ background: transparent url(../images/sprites-combined.png ) no-repeat 0 -225px;
+ left: -3px;
+ position: absolute;
+ width: 75px;
+ height: 75px;
+ top: 13px;
+ }
+ #nav-logo a
+ {
+ width: 75px;
+ height: 75px;
+ display: block;
+ text-indent: -9999px;
+ overflow: hidden;
+ }
+
+
+ .shortCut-topleft-inactive
+ {
+ padding-left: 3px;
+ background: transparent url( ../images/sprites-combined.png) no-repeat 0px -58px;
+ height: 20px;
+ width: 47px;
+ }
+ .shortCut-topleft-inactive span
+ {
+ font-variant: normal;
+ }
+ .shortCut-topleft-inactive span a:hover, .shortCut-topleft-active a:hover
+ {
+ text-decoration:none;
+ }
+ #shortCut
+ {
+ padding-top: 10px;
+ font-weight: bolder;
+ color: #b0adab;
+ }
+ #shortCut ul
+ {
+ list-style-type: none;
+ float: left;
+ width: 347px;
+ margin-left: 100px;
+ }
+ #shortCut li
+ {
+ display: inline-block;
+ margin-right: 25px;
+ float: left;
+ white-space: nowrap;
+ }
+ #shortCut li a
+ {
+ color: #b0adab;
+ }
+ #shortCut li a:hover
+ {
+ color: #44a51c;
+ }
+
+
+
+/* end header elements */
+/* content and sidebar elements */
+ .wrapper
+ {
+ background: url(../images/bg_r.png) repeat-y 100% 0;
+ }
+ .wrapper .hd
+ {
+ padding-left: 216px;
+ height: 15px;
+ background: url(../images/page.png) no-repeat 0 0;
+ overflow: hidden;
+ }
+
+
+
+
+ .wrapper .hd span
+ {
+ height: 15px;
+ display: block;
+ overflow: hidden;
+ background: url(../images/page.png) no-repeat 100% -30px;
+ }
+ .wrapper .bd
+ {
+ background: url(../images/bg_l.png) repeat-y 0 0;
+ position: relative;
+ }
+
+
+
+
+ .wrapper .ft
+ {
+ padding-left: 216px;
+ height: 15px;
+ background: url(../images/page.png) no-repeat 0 -75px;
+ overflow: hidden;
+ }
+
+
+
+
+ .wrapper .ft span
+ {
+ height: 15px;
+ display: block;
+ background: url(../images/page.png) no-repeat 100% -60px;
+ overflow: hidden;
+ }
+ .navTop{
+ float:right;
+ display:block;
+ padding-right:15px;
+
+ }
+
+
+
+/* end content and sidebar elements */
+/* sidebar elements */
.sidebar
{
float: left;
@@ -212,10 +498,10 @@
font-size: 11px;
}
- .offline .sidebar, .offline .feedback, .offline .t_button
- {
- display: none;
- }
+
+
+
+
.sidebar .searchlabel
{
@@ -258,9 +544,8 @@
.sidebar .box h2
{
- font: 600 16px/1.2 Arial;
+ font: bold 16px/1.2 Arial;
padding: 0;
-/* min-height: 32px;*/
}
.sidebar .box h2 span
{
@@ -273,10 +558,6 @@
}
.sidebar #lookup.box h2 span
{
-/* background: url(../images/sprites-combined.png) no-repeat -6px -311px;
- width: 27px;
- height: 35px;
- margin-right: 13px;*/
}
.sidebar .box#topics h2
{
@@ -284,10 +565,6 @@
}
.sidebar #topics.box h2 span
{
- /* background: url(../images/sprites-combined.png) no-repeat -94px -311px;
- width: 27px;
- height: 32px;
- margin-right: 13px;*/
}
.sidebar .box#examples h2
{
@@ -295,10 +572,6 @@
}
.sidebar #examples.box h2 span
{
- /* background: url(../images/sprites-combined.png) no-repeat -48px -311px;
- width: 30px;
- height: 31px;
- margin-right: 9px;*/
}
.sidebar .box .list
@@ -315,7 +588,6 @@
}
.sidebar .box ul
{
- /*padding:10px;*/
padding-bottom:5px;
padding-left:10px;
padding-top:5px;
@@ -342,16 +614,40 @@
color:#AAD2F0;
font-style:italic;
}
+ .sidebar .search form input.loading
+ {
+ background:url("../images/spinner.gif") no-repeat scroll right center transparent;
+ }
+.floatingResult{
+ z-index:1;
+ position:relative;
+ padding-top:0px;
+ background-color:white;
+ border:solid 1px black;
+ height:250px;
+ width:600px;
+ overflow-x:hidden;
+ overflow-y:auto;
+}
+
+ .floatingResult:hover{
+ display:block;
+ }
+ .floatingResult:hover{
+ }
+
+/* end sidebar elements */
+/* content elements */
.wrap
{
margin: 0 5px 0 208px;
overflow: visible;
}
- .offline .wrap
- {
- margin: 0 5px 0 5px;
- }
+
+
+
+
.wrap .toolbar
{
background-color: #fafafa;
@@ -437,8 +733,11 @@
color: #00732F;
}
- .offline .wrap .breadcrumb
+
+ .wrap .content
{
+ padding: 30px;
+ word-wrap:break-word;
}
.wrap .breadcrumb ul
@@ -466,48 +765,51 @@
padding-left: 0;
margin-left: 0;
}
- .wrap .content
- {
- padding: 30px;
- word-wrap:break-word;
- }
+
+
+
+ .wrap .content ol li {
+ background:none;
+ font:normal 10pt/1 Verdana;
+
+ margin-bottom:10px;
+ margin-left:12px;
+ /*list-style-type:disc;*/
+ }
+
.wrap .content li
{
- /*padding-left: 12px;*/
background: url(../images/bullet_sq.png) no-repeat 0 5px;
font: normal 400 10pt/1 Verdana;
- /* color: #44a51c;*/
margin-bottom: 10px;
padding-left:12px;
}
- .content li:hover
- {
- /* text-decoration: underline;*/
- }
- .offline .wrap .content
- {
- padding-top: 15px;
- }
+
+
+
+
+
+
+
+
+ .content li:hover {}
.wrap .content h1
{
- font: 600 18px/1.2 Arial;
+ font: bold 18px/1.2 Arial;
}
.wrap .content h2
{
-
border-bottom:1px solid #DDDDDD;
font:600 16px/1.2 Arial;
margin-top:15px;
- width:100%;
-
+ width:100%;
}
.wrap .content h3
{
- font: 600 14px/1.2 Arial;
- /*border-bottom:1px solid #DDDDDD;*/
+ font: bold 14px/1.2 Arial;
font:600 16px/1.2 Arial;
margin-top:15px;
width:100%;
@@ -516,7 +818,6 @@
{
line-height: 20px;
padding: 5px;
- /* text-align:justify;*/
}
.wrap .content table p
{
@@ -533,25 +834,6 @@
color: #4c0033;
text-decoration: underline;
}
- .content a:visited
- {
- color: #4c0033;
- text-decoration: none;
- }
- .content a:visited:hover
- {
- color: #4c0033;
- text-decoration: underline;
- } .footer
- {
- min-height: 100px;
- color: #797775;
- font: normal 9px/1 Verdana;
- text-align: center;
- padding-top: 40px;
- background-color: #E6E7E8;
- margin: 0;
- }
.feedback
{
float: none;
@@ -568,267 +850,36 @@
color: #00732F;
text-decoration: underline;
}
- .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after
- {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
- }
- #nav-topright
- {
- height: 70px;
- }
-
- #nav-topright ul
- {
- list-style-type: none;
- float: right;
- width: 370px;
- margin-top: 11px;
- }
-
- #nav-topright li
- {
- display: inline-block;
- margin-right: 20px;
- float: left;
- }
-
- #nav-topright li.nav-topright-last
- {
- margin-right: 0;
- }
-
- #nav-topright li a
- {
- background: transparent url(../images/sprites-combined.png) no-repeat;
- height: 18px;
- display: block;
- overflow: hidden;
- text-indent: -9999px;
- }
-
- #nav-topright li.nav-topright-home a
- {
- width: 65px;
- background-position: -2px -91px;
- }
-
- #nav-topright li.nav-topright-home a:hover
- {
- background-position: -2px -117px;
- }
-
-
- #nav-topright li.nav-topright-dev a
- {
- width: 30px;
- background-position: -76px -91px;
- }
-
- #nav-topright li.nav-topright-dev a:hover
- {
- background-position: -76px -117px;
- }
-
-
- #nav-topright li.nav-topright-labs a
- {
- width: 40px;
- background-position: -114px -91px;
- }
-
- #nav-topright li.nav-topright-labs a:hover
- {
- background-position: -114px -117px;
- }
-
- #nav-topright li.nav-topright-doc a
- {
- width: 32px;
- background-position: -162px -91px;
- }
-
- #nav-topright li.nav-topright-doc a:hover, #nav-topright li.nav-topright-doc-active a
- {
- background-position: -162px -117px;
- }
-
- #nav-topright li.nav-topright-blog a
- {
- width: 40px;
- background-position: -203px -91px;
- }
-
- #nav-topright li.nav-topright-blog a:hover, #nav-topright li.nav-topright-blog-active a
- {
- background-position: -203px -117px;
- }
-
- #nav-topright li.nav-topright-shop a
- {
- width: 40px;
- background-position: -252px -91px;
- }
-
- #nav-topright li.nav-topright-shop a:hover, #nav-topright li.nav-topright-shop-active a
- {
- background-position: -252px -117px;
- }
-
- #nav-logo
- {
- background: transparent url(../images/sprites-combined.png ) no-repeat 0 -225px;
- left: -3px;
- position: absolute;
- width: 75px;
- height: 75px;
- top: 13px;
- }
- #nav-logo a
- {
- width: 75px;
- height: 75px;
- display: block;
- text-indent: -9999px;
- overflow: hidden;
- }
-
-
- .shortCut-topleft-inactive
- {
- padding-left: 3px;
- background: transparent url( ../images/sprites-combined.png) no-repeat 0px -58px;
- height: 20px;
- width: 47px;
- }
- .shortCut-topleft-inactive span
- {
- font-variant: normal;
- }
- .shortCut-topleft-inactive span a:hover, .shortCut-topleft-active a:hover
- {
- text-decoration:none;
+ .alphaChar{
+ width:100%;
+ background-color:#F6F6F6;
+ border:1px solid #E6E6E6;
+ -moz-border-radius: 7px 7px 7px 7px;
+ font-size:12pt;
+ padding-left:10px;
+ margin-top:10px;
+ margin-bottom:10px;
}
- #shortCut
- {
- padding-top: 10px;
- font-weight: bolder;
- color: #b0adab;
- }
- #shortCut ul
- {
- list-style-type: none;
- float: left;
- width: 347px;
- margin-left: 100px;
- }
- #shortCut li
- {
- display: inline-block;
- margin-right: 25px;
- float: left;
- white-space: nowrap;
- }
- #shortCut li a
- {
- color: #b0adab;
- }
- #shortCut li a:hover
- {
- color: #44a51c;
- }
+ .flowList{
+ vertical-align:top;
+ }
- hr
- {
- background-color: #E6E6E6;
- border: 1px solid #E6E6E6;
- height: 1px;
- width: 100%;
- text-align: left;
- margin: 15px 0px 15px 0px;
- }
+ .flowList dl{
+ }
+ .flowList dd{
+ display:inline-block;
+ margin-left:10px;
+ width:250px;
+ }
+ .wrap .content .flowList p{
+ padding:0px;
+ }
.content .alignedsummary
{
margin: 15px;
}
- pre
- {
- border: 1px solid #DDDDDD;
- -moz-border-radius: 7px 7px 7px 7px;
- margin: 0 20px 10px 10px;
- padding: 20px 15px 20px 20px;
- overflow-x: auto;
- }
- table, pre
- {
- -moz-border-radius: 7px 7px 7px 7px;
- background-color: #F6F6F6;
- border: 1px solid #E6E6E6;
- border-collapse: separate;
- font-size: 11px;
- /*min-width: 395px;*/
- margin-bottom: 25px;
- /* display: inline-block;*/
- }
- thead
- {
- margin-top: 5px;
- font:600 12px/1.2 Arial;
- }
- th
- {
- padding: 5px 15px 5px 15px;
- background-color: #E1E1E1;
- /* border-bottom: 1px solid #E6E6E6;*/
- border-left: 1px solid #E6E6E6;
- /* border-right: 1px solid #E6E6E6;*/
- }
- td
- {
- padding: 3px 15px 3px 20px;
- /* border-left: 1px solid #E6E6E6;
- border-right: 1px solid #E6E6E6;*/
- }
- tr.odd td:hover, tr.even td:hover
- {
- /* border-right: 1px solid #C3C3C3;
- border-left: 1px solid #C3C3C3;*/
- }
-
- td.rightAlign
- {
- padding: 3px 5px 3px 10px;
- }
- table tr.odd
- {
- border-left: 1px solid #E6E6E6;
- background-color: #F6F6F6;
- color: #66666E;
- }
- table tr.even
- {
- border-left: 1px solid #E6E6E6;
- background-color: #ffffff;
- color: #66666E;
- }
- table tr.odd td:hover, table tr.even td:hover
- {
- background-color: #E6E6E6;
- }
-
- span.comment
- {
- color: #8B0000;
- font-style: italic;
- }
- span.string, span.char
- {
- color: #254117;
- }
+
.qmltype
{
@@ -856,7 +907,6 @@
*.qmlitem p
{
}
-
#feedbackBox
{
display: none;
@@ -934,16 +984,14 @@
.toc h3, .generic a
{
- font: 600 12px/1.2 Arial;
+ font: bold 12px/1.2 Arial;
}
.generic{
- /*max-width:75%;*/
}
.generic td{
padding:5px;
}
-
.generic .alphaChar{
margin-top:5px;
}
@@ -991,6 +1039,16 @@
padding-left: 0px;
}
+ .wrap .content .toc h3{
+ border-bottom:0px;
+ margin-top:0px;
+ }
+
+ .wrap .content .toc h3 a:hover{
+ color:#00732F;
+ text-decoration:none;
+ }
+
.wrap .content .toc .level2
{
@@ -1007,7 +1065,6 @@
font: normal 10px/1.2 Verdana;
background: url(../images/bullet_dn.png) no-repeat 0 5px;
}
-
.relpage
{
-moz-border-radius: 7px 7px 7px 7px;
@@ -1071,6 +1128,24 @@
.functionIndex a{
display:inline-block;
}
+
+/* end content elements */
+/* footer elements */
+
+ .footer
+ {
+ min-height: 100px;
+ color: #797775;
+ font: normal 9px/1 Verdana;
+ text-align: center;
+ padding-top: 40px;
+ background-color: #E6E7E8;
+ margin: 0;
+ }
+/* end footer elements */
+
+
+
/* start index box */
.indexbox
@@ -1082,15 +1157,15 @@
.indexboxcont
{
display: block;
- /* overflow: hidden;*/
+
}
.indexboxbar
{
background: transparent url(../images/horBar.png ) repeat-x left bottom;
margin-bottom: 25px;
- /* background-image: none;
- border-bottom: 1px solid #e2e2e2;*/
+
+
}
.indexboxcont .section
@@ -1141,7 +1216,7 @@
.content .indexboxcont li
{
- font: normal 600 13px/1 Verdana;
+ font: normal bold 13px/1 Verdana;
}
.indexbox a:hover, .indexbox a:visited:hover
@@ -1190,87 +1265,285 @@
visibility: hidden;
}
-.sidebar .search form input.loading
-{
- background:url("../images/spinner.gif") no-repeat scroll right center transparent;
-}
- /* end of screen media */
-
-.flowList{
-vertical-align:top;
-}
-.alphaChar{
-width:100%;
-background-color:#F6F6F6;
-border:1px solid #E6E6E6;
--moz-border-radius: 7px 7px 7px 7px;
-font-size:12pt;
-padding-left:10px;
-margin-top:10px;
-margin-bottom:10px;
-}
-.flowList dl{
-}
-.flowList dd{
-display:inline-block;
-margin-left:10px;
-width:250px;
-}
-.wrap .content .flowList p{
-padding:0px;
-}
-pre.highlightedCode {
- display: block;
- overflow:hidden;
-}
-.floatingResult{
- z-index:1;
- position:relative;
- padding-top:0px;
- background-color:white;
- border:solid 1px black;
- height:250px;
- width:600px;
- overflow-x:hidden;
- overflow-y:auto;
-}
+/* start of offline spec*/
+ .offline .wrapper .hd
+ {
+ background: url(../images/page.png) no-repeat 0 -15px;
+ }
+ .offline .wrapper .bd
+ {
+ background: url(../images/bg_l_blank.png) repeat-y 0 0;
+ }
+ .offline .wrapper .ft
+ {
+ background: url(../images/page.png) no-repeat 0 -90px;
+ }
+ .offline .sidebar,
+ .offline .feedback,
+ .offline .t_button,
+ .offline #narrowsearch,
+ .offline #narrowmenu
+ {
+ display: none;
+ }
+ .offline .wrap
+ {
+ margin: 0 5px 0 5px;
+ }
+ .offline .wrap .breadcrumb
+ {
+ }
- .floatingResult:hover{
- display:block;
- }
- .floatingResult:hover{
- /*display:none;*/
- }
+ .offline .wrap .content
+ {
+ padding-top: 15px;
+ }
- .wrap .content ol li {
- background:none;
- font:400 10pt/1 Verdana;
- margin-bottom:10px;
- margin-left:12px;
+
+/* end of offline spec*/
+
+/* start of creator spec*/
+ .creator
+ {
+ margin-left:0px;
+ margin-right:0px;
+ padding-left:0px;
+ padding-right:0px;
}
- .wrap .content ol li {
+ .creator .wrap .content ol li {
list-style-type:decimal;
}
- .navTop{
- float:right;
- display:block;
- padding-right:15px;
- /*margin-top:10px;*/
+ .creator .header .icon,
+ .creator .feedback,
+ .creator .t_button,
+ .creator .feedback,
+ .creator #feedbackBox,
+ .creator #feedback,
+ .creator #blurpage,
+ .creator .indexbox .indexIcon span,
+ .creator .wrapper .hd,
+ .creator .indexbox .indexIcon,
+ .creator .header #nav-logo,
+ .creator #offlinemenu,
+ .creator #offlinesearch,
+ .creator .header #nav-topright,
+ .creator .header #shortCut ,
+ .creator .wrapper .hd,
+ .creator .wrapper .ft,
+ .creator .sidebar,
+ .creator .wrap .feedback
+ {
+ display:none;
+ }
+
+ body.creator
+ {
+ background: none;
+
+ font: normal 13px/1.2 Verdana;
+ color: #363534;
+ background-color: #FFFFFF;
+ }
+
+
+
+ .creator .header, .footer, .wrapper
+ {
+ max-width: 1500px;
+ margin: 0px;
+ }
+
+ .creator .wrapper
+ {
+ position:relative;
+ top:50px;
+ }
+ .creator .wrapper .bd
+ {
+
+ background:#FFFFFF;
}
+
+
+ .creator .header, .footer
+ {
+ display: block;
+ clear: both;
+ overflow: hidden;
+ }
+ .creator .wrap .content p
+
+ {
+ line-height: 20px;
+ padding: 5px;
+ }
+
+ .creator .header .qtref span
+ {
+ background:none;
+ }
+
+
- .wrap .content .toc h3{
- border-bottom:0px;
- margin-top:0px;
+ .creator .footer
+ {
+ border-top:1px solid #E5E5E5;
+ min-height: 100px;
+ margin:0px;
+ }
+
+ .creator .wrap
+ {
+
+ padding:0 5px 0 5px;
+ margin: 0px;
+ }
+ .creator .wrap .toolbar
+ {
+
+
+ border-bottom:1px solid #E5E5E5;
+ width:100%,
+ }
+ .creator .wrap .breadcrumb ul li a
+ {
+ /* color: #363534;*/
+ color: #00732F;
+ }
+
+ .creator .wrap .content
+ {
+ padding: 0px;
+ word-wrap:break-word;
+ }
+
+ .creator .wrap .content ol li {
+ background:none;
+ font: inherit;
+ padding-left: 0px;
+ }
+
+ .creator .wrap .content .descr ol li {
+ margin-left: 45px;
+
+ }
+ .creator .content .alignedsummary
+ {
+ margin: 5px;
+ width:100%;
+ }
+ .creator .generic{
+ max-width:75%;
+ }
+ .creator .generic td{
+ padding:0;
}
+ .creator .indexboxbar
+ {
+ border-bottom:1px solid #E5E5E5;
+ margin-bottom: 25px;
+ background: none;
+ }
- .wrap .content .toc h3 a:hover{
- color:#00732F;
- text-decoration:none;
+
+
+ .creator .header
+ {
+ width: 100%;
+ margin: 0;
+ height: auto;
+ background-color: #ffffff;
+ padding: 10px 0 5px 0;
+ overflow: visible;
+ border-bottom: solid #E5E5E5 1px;
+ z-index:1;
+
+
+
+
+
+
+
+
+ position:fixed;
+ }
+
+
+ .creator .header .content
+ {
+ }
+ .creator .header .qtref
+ {
+ color: #00732F;
+ position: static;
+ float: left;
+ margin-left: 5px;
+ font: bold 18px/1 Arial;
+ }
+
+ .creator .header .qtref:visited
+ {
+ color: #00732F;
+ }
+ .creator .header .qtref:hover
+ {
+ color: #00732F;
+ text-decoration:none;
+ }
+ .creator .header .qtref span
+ {
+ background-image: none;
+ text-indent: 0;
+ text-decoration:none;
+ }
+
+
+
+
+
+
+ .creator .wrap .toolbar
+ {
+ display:block;
+ padding-top:0px;
+ }
+
+
+
+ .creator .wrap .breadcrumb ul li {
+ font-weight: normal;
+ }
+
+ .creator .wrap .breadcrumb ul li a {
+ /*color: #44a51c;*/
+ }
+
+ .creator .wrap .breadcrumb ul li.last a {
+ /*color: #363534;*/
+ }
+
+ .creator #narrowmenu ul
+ {
+ border-bottom:solid 1px #E5E5E5;
+ border-left:solid 1px #E5E5E5;
+ border-right:solid 1px #E5E5E5;
}
+
+ .creator #narrowmenu li ul {
+ margin-top:-15px;
+ }
+
+
+ .creator .toc {
+ margin:10px 20px 10px 10px;
+ }
+/* end of creator spec*/
+}
+
/* end of screen media */
/* start of print media */
diff --git a/doc/src/tutorials/modelview.qdoc b/doc/src/tutorials/modelview.qdoc
new file mode 100755
index 0000000000..98096a06b0
--- /dev/null
+++ b/doc/src/tutorials/modelview.qdoc
@@ -0,0 +1,938 @@
+/****************************************************************************
+**
+** 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:FDL$
+** Commercial Usage
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in a
+** written agreement between you and Nokia.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page modelview.html
+
+ \startpage {index.html}{Qt Reference Documentation}
+ \nextpage {modelview-part1.html}{Introduction}
+
+ \title Model/View Contents
+ \brief An introduction to ModelView programming
+
+ This tutorial gives an introduction to ModelView programming using the Qt
+ cross-platform framework.
+
+ \image treeview.png
+
+ \omit
+ It doesn't cover everything; the emphasis is on teaching the programming
+ philosophy of Model/View programming, and Qt's features are introduced as
+ needed. Some commonly used features are never used in this tutorial.
+ \endomit
+
+ In the process, we will learn about some basic technologies provided by Qt,
+ such as:
+
+ \list
+ \o The difference between standard and model/view widgets
+ \o Adapters betweeen forms and models
+ \o Developing a simple model/view application
+ \o Intermediate topics such as:
+ \list
+ \o Tree views
+ \o Selection
+ \o Predefined models
+ \o Delegates
+ \o Debugging with model test
+ \endlist
+ \endlist
+
+ If you are completely new to Qt, please read \l{How to Learn Qt} if you
+ have not already done so.
+
+ The tutorial's source code is located in Qt's \c examples/tutorials/modelview
+ directory.
+
+ \list 1
+ \o \l{modelview-part1.html}{Introduction}
+ \o \l{modelview-part2.html}{Developing a Simple Model/View Application}
+ \o \l{modelview-part3.html}{Intermediate Topics}
+ \o \l{modelview-part4.html}{Good Sources of Additional Information}
+ \endlist
+
+
+*/
+
+/*!
+ \page modelview-part1.html
+ \contentspage {modelview-index.html}{Model/View Contents}
+ \previouspage {modelview-index.html}{Model/View Contents}
+ \nextpage {modelview-part2.html}{Developing a Simple Model/View Application}
+ \title An Introduction to Model/View Programming
+
+ \section1 1. Introduction
+
+ Model/View is a technology used to separate data from views in widgets that
+ handle data sets. Standard widgets are not designed for separating data
+ from views and this is why Qt 4 has two different types of widgets. Both
+ types of widgets look the same, but they interact with data differently.
+
+ \table
+ \row
+ \o Standard widgets use data that is part of the widget.
+ \o \image standardwidget.png
+ \row
+ \o View classes operate on external data (the model)
+ \o \image modelview.png
+ \endtable
+
+ \section2 1.1 Standard Widgets
+
+ Let's have a closer look at a standard table widget. A table widget is a 2D
+ array of the data elements that the user can change. The table widget can
+ be integrated into a program flow by reading and writing the data elements
+ that the table widget provides. This method is very intuitive and useful in
+ many applications.
+
+ Displaying and editing a database table with a standard table widget can be
+ problematic. Two copies of the data have to be coordinated: one outside the
+ widget; one inside the widget. The developer needs to know where up-to-date
+ data is so the both copies contain the most recent data. The tight coupling
+ of presentation and data makes it harder to write unit tests.
+
+ \section2 1.2 Model/View to the Rescue
+
+ Model/view stepped up to provide a solution that uses a more versatile
+ architecture. Model/view eliminates the data consistency problems that may
+ occur with standard widgets. Model/view also makes it easier to use more
+ than one view of the same data because one model can be passed on to many
+ views. The most important difference is that model/view widgets do not
+ store data behind the table cells. In fact, they operate directly from your
+ data. Since view classes do not know your data's structure, you need to
+ provide a wrapper to make your data conform to the QAbstractItemModel
+ interface. A view uses this interface to read from and write to your data
+ and any class that implements QAbstractItemModel is a model. Once the view
+ receives a pointer to a model, it will read and display its content and be
+ its editor.
+
+ \section2 1.3 Overview of the Model/View Widgets
+
+ Here is an overview of the model/view widgets and their corresponding
+ standard widgets.
+
+ \table
+ \header
+ \o Widget
+ \o Standard Widget (a convenience class with data in
+ the widget)
+ \o Model/View View Class (for use with external data)
+ \row
+ \o \inlineimage listview.png
+ \o \l QListWidget
+ \o \l QListView
+ \row
+ \o \inlineimage tableview.png
+ \o \l QTableWidget
+ \o \l QTableView
+ \row
+ \o \inlineimage treeview.png
+ \o \l QTreeWidget
+ \o \l QTreeView
+ \row
+ \o \inlineimage columnview.png
+ \o
+ \o \l QColumnView shows a tree as a hierarchy of lists
+ \row
+ \o \inlineimage combobox.png
+ \o {2, 1} \l QComboBox can work as both a view class and also
+ as a traditional widget
+ \endtable
+
+ \section2 1.4 Using Adapters between Forms and Models
+
+ Having adapters between forms and models can come in handy.
+
+ We often prefer editing data stored in tables (e.g. in database tables) in
+ forms rather than in tables. There is no direct model/view counterpart for
+ separating data and views for widgets that operate on one value instead of
+ a dataset, so we need an adapter in order to connect the form to the source
+ of data.
+
+ \l QDataWidgetMapper is a great solution because it maps form widgets to a
+ table row and it makes it very easy to build forms for database tables.
+
+ \image widgetmapper.png
+
+ Another example of an adapter is QCompleter. Qt has QCompleter for
+ providing auto-completions in Qt widgets such as QComboBox and, as shown
+ below, QLineEdit. QCompleter uses a model as its data source, so QCompleter,
+ in itself, is a very handy adapter.
+
+ \image qcompleter.png
+*/
+
+/*!
+ \page modelview-part2-main-cpp.html
+ \title main.cpp
+ \quotefile tutorials/modelview/1_readonly/main.cpp
+*/
+
+/*!
+ \page modelview-part2.html
+ \contentspage {modelview-index.html}{Model/View Contents}
+ \previouspage {modelview-part1.html}{Introduction}
+ \nextpage {modelview-part3.html}{Intermediate Topics}
+ \title Model/View Chapter 2 - A Simple Model/View Application
+
+ \section1 2. A Simple Model/View Application
+
+ If you want to develop a model/view application, where should you start? We
+ recommend starting with a simple example and extending it step-by-step.
+ This makes understanding the architecture a lot easier. Trying to
+ understand the model/view architecture in detail before invoking the IDE
+ has proven to be less convenient for many developers. It is substantially
+ easier to start with a simple model/view application that has demo data.
+ Give it a try! Simply replace the data in the examples below with your own.
+
+ Below are 7 very simple and independent applications that show different
+ sides of model/view programming. The source code can be found inside the
+ \c{examples/tutorials/modelview} directory.
+
+ \section2 2.1 A Read Only Table
+
+ We start with an application that uses a QTableView to show data. We will
+ add editing capabilities later.
+
+ \snippet examples/tutorials/modelview/1_readonly/main.cpp Quoting ModelView Tutorial
+
+ We have the usual \l {modelview-part2-main-cpp.html}{main()} function:
+
+ \snippet examples/tutorials/modelview/1_readonly/modelview.h Quoting ModelView Tutorial
+
+ The application is a \l QMainWindow that holds a \l QTableView.
+
+ \snippet examples/tutorials/modelview/1_readonly/modelview.cpp Quoting ModelView Tutorial
+
+ Here is the interesting part: We use
+ \l{QTableView::setModel()}{tableView->setModel(new MyModel(this));} to
+ instantiate the Model and pass its pointer to \l {QTableView}{tableView()}.
+ \l{QTableView}{tableView} will invoke the methods of the pointer it has
+ received to find out two things:
+
+ \list
+ \o How many rows and columns should be displayed
+ \o What content should be printed into each cell.
+ \endlist
+
+ The model needs some code to respond to this.
+
+ We have a table data set, so let's start with QAbstractTableModel since it
+ is easier to use.
+
+ \snippet examples/tutorials/modelview/1_readonly/mymodel.h Quoting ModelView Tutorial
+
+ QAbstractTableModel requires the implementation of three abstract methods.
+
+ \snippet examples/tutorials/modelview/1_readonly/mymodel.cpp Quoting ModelView Tutorial
+
+ The number of rows and columns is set by
+ \l{QAbstractItemModel::rowCount()}{MyModel::rowCount()} and
+ \l{QAbstractItemModel::columnCount()}{MyModel::columnCount()}.
+ When the view has to know what the cell's text is, it calls the method.
+ Row and column information is specified with parameter \c index and the
+ role is set to \l{Qt::ItemDataRole}{Qt::DisplayRole}. Other roles are
+ covered in the next section. In our example, the data that should be
+ displayed is generated. In a real application, \c MyModel would have a
+ member called \c MyData, which serves as the target for all reading and
+ writing operations.
+
+ This small example demonstrates the passive nature of a model. The model
+ does not know when it will be used or which data is needed. It simply
+ provides data each time the view requests it.
+
+ What happens when the model 's data needs to be changed? How does the view
+ know when data changes and needs to be read again? The model has to emit a
+ signal that indicates what range of cells has changed. This will be
+ demonstrated in section 2.3.
+
+ \section2 2.2 Extending the Read Only Example with Roles
+
+ In addition to controlling what text the view displays, the model also
+ controls the text's appearance. When we slightly change the model, we get
+ the following result: \image readonlytable_role.png
+
+ In fact, nothing except for the \l{QAbstractItemModel::}{data()}
+ method needs to be changed to set fonts, background colour, alignment and a
+ checkbox.
+ Here is the \l{QAbstractItemModel::data()}{data()} method that produces the
+ result shown above:
+
+ \snippet examples/tutorials/modelview/2_formatting/mymodel.cpp Quoting ModelView Tutorial
+
+ Each formatting property will be requested from the model with a separate
+ call to the \l{QAbstractItemModel::data()}{data()} method. The \c role
+ parameter is used to let the model know which property is being requested:
+
+ \table
+ \header
+ \o Role (enum Qt::ItemDataRole )
+ \o Meaning
+ \o Type
+ \row
+ \o \l{Qt::ItemDataRole}{Qt::DisplayRole}
+ \o text
+ \o QString
+ \row
+ \o Qt::FontRole
+ \o font
+ \o QFont
+ \row
+ \o Qt::BackgroundRole
+ \o brush for the background of the cell
+ \o QBrush
+ \row
+ \o Qt::TextAlignmentRole
+ \o text alignment
+ \o enum Qt::AlignmentFlag
+ \row
+ \o {1, 3} Qt::CheckStateRole
+ \o {1, 3} suppresses checkboxes with \l{QVariant}{QVariant()},
+ sets checkboxes with Qt::Checked or Qt::Unchecked
+ \o {1, 3} \l{Qt::ItemDataRole}{enum Qt::ItemDataRole}
+ \endtable
+
+ Refer to the Qt namespace documentation to learn more about the
+ Qt::ItemDataRole enum's capabilities.
+
+ Now we need to determine how using a seperated model impacts the
+ application's performance, so let's trace how often the view calls the
+ \l{QAbstractItemModel::}{data()} method. In order to track how often
+ the view calls the model, we have put a debug statement in the
+ \l{QAbstractItemModel::}{data()} method, which logs onto stdio. In
+ our small example, \l{QAbstractItemModel::}{data()} will be called 42
+ times.
+ Each time you hover the cursor over the field,
+ \l{QAbstractItemModel::}{data()} will be called again \mdash 7 times for
+ each cell. That's why it is important to make sure that your data is
+ available when \l{QAbstractItemModel::}{data()} is invoked and expensive
+ lookup operations are cached.
+
+ \section2 2.3 A Clock inside a Table Cell
+
+ \image clock.png
+
+ We still have a read only table, but this time the content changes every
+ second because we are showing the current time.
+
+ \snippet examples/tutorials/modelview/3_changingmodel/mymodel.cpp quoting mymodel_QVariant
+
+ Something is missing to make the clock tick. We need to tell the view every
+ second that the time has changed and that it needs to be read again. We do
+ this with a timer. In the constructor, we set its interval to 1 second and
+ connect its timeout signal.
+
+ \snippet examples/tutorials/modelview/3_changingmodel/mymodel.cpp quoting mymodel_a
+
+ Here is the corresponding slot:
+
+ \snippet examples/tutorials/modelview/3_changingmodel/mymodel.cpp quoting mymodel_b
+
+ We ask the view to read the data in the top left cell again by emitting the
+ \l{QAbstractItemModel::}{dataChanged()} signal. Note that we did not
+ explicitly connect the \l{QAbstractItemModel::}{dataChanged()} signal to
+ the view. This happened automatically when we called
+ \l{QTableView::}{setModel()}.
+
+ \section2 2.4 Setting up Headers for Columns and Rows
+
+ Headers can be hidden via a view method: \c{tableView->verticalHeader()->hide();}
+ \image header.png
+
+ The header content, however, is set via the model, so we reimplement the
+ \l{QAbstractItemModel::headerData()}{headerData()} method:
+
+ \snippet examples/tutorials/modelview/4_headers/mymodel.cpp quoting mymodel_c
+
+
+ \section2 2.5 The Minimal Editing Example
+
+ In this example, we are going to build an application that automatically
+ populates a window title with content by repeating values entered into
+ table cells.
+
+ The model decides whether editing capabilities are available . We only have
+ to modify the model in order for the available editing capabilities to be
+ enabled. This is done by reimplementing the following virtual methods:
+ \l{QAbstractItemModel::}{setData()} and \l{QAbstractItemModel::}{flags()}.
+
+ \snippet examples/tutorials/modelview/5_edit/mymodel.h Quoting ModelView Tutorial
+
+ We use \c QStringList m_gridData to store our data. This makes
+ \c m_gridData the core of MyModel. The rest of \c MyModel acts like a
+ wrapper and adapts \c m_gridData to the QAbstractItemModel interface. We
+ have also introduced the \c editCompleted() signal,
+ which makes it possible to transfer the modified text to the window title.
+
+ \snippet examples/tutorials/modelview/5_edit/mymodel.cpp quoting mymodel_d
+
+ In the constructor, we fill \c QStringList gridData with 6 items (one item
+ for every field in the table):
+
+ \snippet examples/tutorials/modelview/5_edit/mymodel.cpp quoting mymodel_e
+
+ \l{QAbstractItemModel::setData()}{setData()} will be called each time the
+ user edits a cell. The \c index parameter tells us which field has been
+ edited and \c value provides the result of the editing process. The role
+ will always be set to \c Qt::EditRole because our cells only contain text.
+ If a checkbox were present and user permissions are set to allow the
+ checkbox to be selected, calls would also be made with the role set to
+ \c Qt::CheckStateRole.
+
+ \snippet examples/tutorials/modelview/5_edit/mymodel.cpp quoting mymodel_f
+
+ Various properties of a cell can be adjusted with
+ \l{QAbstractItemModel::flags()}{flags()}. Returning
+ \c Qt::ItemIsEditable | \c Qt::ItemIsEnabled is enough to show an editor
+ that a cell has been selected. If editing one cell modifies more data than
+ the data in that particular cell, the model must emit a
+ \l{QAbstractItemModel::}{dataChanged()} signal in order for the data that
+ has been changed to be read.
+*/
+
+/*!
+ \page modelview-part3.html
+ \contentspage {modelview-index.html}{Model/View Contents}
+ \previouspage {modelview-part2.html}{Developing a Simple Model/View Application}
+ \nextpage {modelview-part4.html}{Good Sources of Additional Information}
+ \title Model/View Chapter 3 - Intermediate Topics
+
+ \section1 3. Intermediate Topics
+
+ \section2 3.1 TreeView
+
+ You can convert the example above into an application with a tree view.
+ Simply replace QTableView with QTreeView, which results in a read/write
+ tree. No changes have to be made to the model. The tree won't have any
+ hierarchies because there aren't any hierarchies in the model itself.
+ \image dummy_tree.png
+
+
+ QListView, QTableView and QTreeView all use a model abstraction, which is a
+ merged list, table and tree. This makes it possible to use several different
+ types of view classes from the same model.
+ \image list_table_tree.png
+
+
+ This is how our example model looks so far:
+ \image example_model.png
+
+
+ We want to present a real tree. We have wrapped our data in the examples
+ above in order to make a model. This time we use QStandardItemModel, which
+ is a container for hierarchical data that also implements
+ QAbstractItemModel. To show a tree, QStandardItemModel must be populated
+ with \l{QStandardItem}{QStandardItems}, which are able to hold all the
+ standard properties of items like text, fonts, checkboxes or brushes.
+ \image tree_2_with_algorithm.png
+
+ \snippet examples/tutorials/modelview/6_treeview/modelview.cpp Quoting ModelView Tutorial
+
+ We simply instantiate a QStandardItemModel and add a couple of
+ \l{QStandardItem}{QStandardItems} to the constructor. We can then make a
+ hierarchical data structure because a QStandardItem can hold other
+ \l{QStandardItem}{QStandardItems}. Nodes are collapsed and expanded within
+ the view.
+
+ \section2 3.2 Working with Selections
+
+ We want to access a selected item's content in order to output it into the
+ window title together with the hierarchy level.
+ \image selection2.png
+
+ So let's create a couple of items:
+
+ \snippet examples/tutorials/modelview/7_selections/modelview.cpp quoting modelview_a
+
+ Views manage selections within a separate selection model, which can be
+ retrieved with the \l{QAbstractItemView::}{selectionModel()}
+ method. We retrieve the selection Model in order to connect a slot to its
+ \l{QAbstractItemView::}{selectionChanged()} signal.
+
+ \snippet examples/tutorials/modelview/7_selections/modelview.cpp quoting modelview_b
+
+ We get the model index that corresponds to the selection by calling
+ \l{QItemSelectionModel::currentIndex()}{treeView->selectionModel()->currentIndex()}
+ and we get the the field's string by using the model index. Then we just
+ calculate the item's \c hierarchyLevel. Top level items do not have
+ parents and the \l{QAbstractItemModel::}{parent()} method will return a
+ default constructed \l{QModelIndex}{QModelIndex()}. This is why we use the
+ \l{QAbstractItemModel::}{parent()} method to iterate to the top level while
+ counting the steps performed during iteration.
+
+ The selection model (as shown above) can be retrieved, but it can also be
+ set with \l{QAbstractItemView}{QAbstractItemView::setSelectionModel}. This
+ is how it's possible to have 3 view classes with synchronised selections
+ because only one instance of a selection model is used. The instance of a
+ selection model is retrieved from the first view class with
+ \l{QAbstractItemView::}{selectionModel()} and the result is assigned to the
+ second and third view class with \l{QAbstractItemView::}{setSelectionModel()}.
+
+ \section2 3.3 Predefined Models
+
+ The typical way to use model/view is to wrap specific data to make it
+ usable with view classes. Qt, however, also provides predefined models for
+ common underlying data structures. If one of the available data structures
+ is suitable for your application, a predefined model can be a good choice.
+
+ \table
+ \row
+ \o QStringListModel
+ \o Stores a list of strings
+ \row
+ \o QStandardItemModel
+ \o Stores arbitrary hierarchical items
+ \row
+ \o QFileSystemModel\br
+ QDirModel
+ \o Encapsulate the local file system
+ \row
+ \o QSqlQueryModel
+ \o Encapsulate an SQL result set
+ \row
+ \o QSqlTableModel
+ \o Encapsulates an SQL table
+ \row
+ \o QSqlRelationalTableModel
+ \o Encapsulates an SQL table with foreign keys
+ \row
+ \o QSortFilterProxyModel
+ \o Sorts and/or filters another model
+
+ \endtable
+
+ \section2 3.4 Delegates
+
+ In all examples so far, data is presented as text or a checkbox in a cell
+ and is edited as text or a checkbox. The component that provides these
+ presentation and editing services is called a \e delegate. We are only just
+ beginning to work with the delegate because the view uses a default
+ delegate. But imagine that we want to have a different editor.(e.g. a
+ slider or a drop down list) Or imagine that we want to present data as
+ graphics. Let's take a look at an example called
+ \l{Star Delegate Example}{Star Delegate}, in which stars are used to show
+ a rating:
+ \image stardelegate.png
+
+ The view has a method that replaces the default delegate and installs a
+ custom delegate. This method is called
+ \l{QAbstractItemView::}{setItemDelegate()}. A new delegate can be written
+ by creating a class that inherits from QStyledItemDelegate. In order to
+ write a delegate that displays stars and has no input capabilities, we only
+ need to overwrite 2 methods.
+
+ \code
+ class StarDelegate : public QStyledItemDelegate
+ {
+ Q_OBJECT
+ public:
+ StarDelegate(QWidget *parent = 0);
+ void paint(QPainter *painter, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const;
+ QSize sizeHint(const QStyleOptionViewItem &option,
+ const QModelIndex &index) const;
+ };
+ \endcode
+
+ \l{QStyledItemDelegate::}{paint()} draws stars depending on the content
+ of the underlying data. The data can be looked up with parameter
+ \l{QModelIndex::data()}{index.data()}.
+ \l{QAbstractItemDelegate::}{sizeHint()} specifies each star's dimensions
+ so the the cell will provide enough height and width to accommodate the
+ stars.
+
+ Writing custom delegates is the right choice if you want to show your data
+ with a custom graphical representation inside the grid of the view class.
+ If you want to leave the grid, you can write a custom view class.
+
+ \section2 3.5 Debugging with ModelTest
+
+ The passive nature of models provides new challenges for programmers.
+ Inconsistencies in the model can cause the application to crash. Since the
+ model is hit by numerous calls from the view, it is hard to find out which
+ call has crashed the application and which operation has introduced the
+ problem.
+
+ Qt provides software called
+ \l{http://labs.qt.nokia.com/page/Projects/Itemview/Modeltest}{ModelTest},
+ which checks models while your programming is running. Every time the model
+ is changed, ModelTest scans the model and reports errors with an assert.
+ This is especially important for tree models, since their hierarchical
+ nature leaves many possibilities for subtle inconsistencies.
+
+ Unlike view classes, ModelTest uses out of range indexes to test the model.
+ This means your application may crash with ModelTest even if it runs
+ perfectly without it. So you also need to handle all of the indexes that
+ are out of range when using ModelTest.
+
+
+ \section2 3.6 Model/View NG
+
+ \raw HTML
+ <table style="background-color:white;border:none;font: normal 13px/1.2 Verdana;">
+ <tr><td align="left" valign="top" style="background-color:white;border:none;padding:5px;">
+ \endraw
+
+ \raw HTML
+ <!-- wrap content table p has 0 padding and the padding for p outside of the table is 5px-->
+ \endraw
+
+ Model/View was introduced in Qt 4.0 and is a frequently used technology.
+ Feedback from developers and new development trends have shown that there
+ is a need to further develop the model/view technology. Therefore a
+ research project originated at Nokia is looking into ways to go beyond the
+ current implementation.
+
+ One limitation of model/view is that view classes are basically all fixed
+ grids. It is possible, but really hard to make a list view with icons
+ placed on a curve; or cells expanding on mouse over events to show
+ additional information.
+ In order to achieve graphically rich view experiences, Model/View NG will
+ use QGraphicsView to render elements. Nodel/View NG also aims to make
+ model/view programming more intuitive. One way to achieve this is to have
+ separate models for lists, tables and trees. The current model abstraction
+ is complex because it is capable of representing a list, a table or a tree.
+
+ Model/View NG is a research project. You are welcome to checkout the source
+ code, monitor progress and take part in discussions at the following
+ address: \l{http://labs.qt.nokia.com/page/Projects/Itemview/ItemviewsNG}
+
+ \raw HTML
+ </td><td align="right" valign="top">
+ \endraw
+
+ \inlineimage path.png
+
+ \raw HTML
+ </td></tr></table>
+ \endraw
+*/
+
+/*!
+ \page modelview-part4.html
+ \contentspage {modelview-index.html}{Model/View Contents}
+ \previouspage {modelview-part3.html}{Intermediate Topics}
+ \title Model/View Chapter 4 - Good Sources of Additional Information
+
+ \section1 4. Good Sources of Additional Information
+
+ \section2 4.1 Books
+
+ Model/View programming is covered quite extensively in the documentation of
+ Qt but also in several good books.
+
+ \list 1
+ \o \bold{C++ GUI Programming with Qt 4} / Jasmin Blanchette, Mark Summerfield,
+ \e{Prentice Hall, 2nd edition}, ISBN 0-13-235416-0. Also available in
+ German: C++ GUI Programmierung mit Qt 4: Die offizielle Einführung,
+ \e{Addison-Wesley}, ISBN 3-827327-29-6
+ \o \bold{The Book of Qt4, The Art of Building Qt Applications} / Daniel Molkentin,
+ \e{Open Source Press}, ISBN 1-59327-147-6.
+ Translated from \bold{Qt 4, Einführung in die Applikationsentwicklung},
+ \e{Open Source Press}, ISBN 3-937514-12-0.
+ \o \bold{Foundations of Qt Development} / Johan Thelin, \e{Apress}, ISBN 1-59059-831-8.
+ \endlist
+
+ More information about these books is available on the
+ \l{Books about Qt Programming}{Qt Web site}.
+
+ The following list provides an overview of example programs contained in the
+ books above. Some of them make very good templates for developing similar
+ applications.
+
+ \table
+ \header
+ \o example name
+ \o view class used
+ \o model used
+ \o aspects touched
+ \o
+ \row
+ \o Team Leaders
+ \o QListview
+ \o QStringListModel
+ \o
+ \o Book 1, Chapter 10, Figure 10.6
+ \row
+ \o Directory Viewer
+ \o QTreeView
+ \o QDirModel
+ \o
+ \o Book 1, Chapter 10, Figure 10.7
+ \row
+ \o Color Names
+ \o QListView
+ \o QSortFilterProxyModel
+ applied to QStringListModel
+ \o
+ \o Book 1, Chapter 10, Figure 10.8
+ \row
+ \o Currencies
+ \o QTableView
+ \o custom model based on
+ QAbstractTableModel
+ \o read only
+ \o Book 1, Chapter 10, Figure 10.10
+ \row
+ \o Cities
+ \o QTableView
+ \o custom model based on
+ QAbstractTableModel
+ \o read / write
+ \o Book 1, Chapter 10, Figure 10.12
+ \row
+ \o Boolean Parser
+ \o QTreeView
+ \o custom model based on
+ QAbstractItemModel
+ \o read only
+ \o Book 1, Chapter 10, Figure 10.14
+ \row
+ \o Track Editor
+ \o {2, 1} QTableWidget
+ \o custom delegate providing a custom editor
+ \o Book 1, Chapter 10, Figure 10.15
+
+ \row
+ \o Four directory views
+ \o QListView
+ QTableView
+ QTreeView
+ \o QDirModel
+ \o demonstrates the use of multiple views
+ \o Book2, Chapter 8.2
+ \row
+ \o Address Book
+ \o QListView
+ QTableView
+ QTreeView
+ \o custom model based on
+ QAbstractTableModel
+ \o read / write
+ \o Book2, Chapter 8.4
+ \row
+ \o Address Book with sorting
+ \o
+ \o QProxyModel
+ \o introducing sort and filter capabilities
+ \o Book2, Chapter 8.5
+ \row
+ \o Address Book
+ with checkboxes
+ \o
+ \o
+ \o introducing checkboxes in model/view
+ \o Book2, Chapter 8.6
+ \row
+ \o Address Book with transposed grid
+ \o
+ \o custom proxy Model based on QAbstractProxyModel
+ \o introducing a custom model
+ \o Book2, Chapter 8.7
+ \row
+ \o Address Book with drag and drop
+ \o
+ \o
+ \o introducing drag and drop support
+ \o Book2, Chapter 8.8
+ \row
+ \o Address Book with custom editor
+ \o
+ \o
+ \o introducing custom delegates
+ \o Book2, Chapter 8.9
+ \row
+ \o Views
+ \o QListView
+ QTableView
+ QTreeView
+ \o QStandardItemModel
+ \o read only
+ \o Book 3, Chapter 5, figure 5-3
+ \row
+ \o Bardelegate
+ \o QTableView
+ \o
+ \o custom delegate for presentation based on QAbstractItemDelegate
+ \o Book 3, Chapter 5, figure 5-5
+ \row
+ \o Editdelegate
+ \o QTableView
+ \o
+ \o custom delegate for editing based on QAbstractItemDelegate
+ \o Book 3, Chapter 5, figure 5-6
+ \row
+ \o Singleitemview
+ \o custom view based on QAbstractItemView
+ \o
+ \o custom view
+ \o Book 3,
+ Chapter 5,
+ figure 5-7
+ \row
+ \o listmodel
+ \o QTableView
+ \o custom Model based on QAbstractTableModel
+ \o read only
+ \o Book 3, Chapter 5, Figure 5-8
+ \row
+ \o treemodel
+ \o QTreeView
+ \o custom Model based on QAbstractItemModel
+ \o read only
+ \o Book 3, Chapter 5, Figure 5-10
+ \row
+ \o edit integers
+ \o QListView
+ \o custom Model based on QAbstractListModel
+ \o read / write
+ \o Book 3, Chapter 5, Listing 5-37, Figure 5-11
+ \row
+ \o sorting
+ \o QTableView
+ \o QSortFilterProxyModel applied to QStringListModel
+ \o demonstrates sorting
+ \o Book 3, Chapter 5, Figure 5-12
+ \endtable
+
+
+ \section2 4.2 Qt Documentation
+
+ Qt 4.7 comes with 17 examples and 2 Demonstrations for model/view.
+ The examples can be found here: \l{Item Views Examples}
+ \table
+ \header
+ \o Example name
+ \o View class used
+ \o Model used
+ \o Aspects touched
+ \row
+ \o Address Book
+ \o QTableView
+ \o QAbstractTableModel
+ QSortFilterProxyModel
+ \o usage of QSortFilterProxyModel to generate different
+ subsets from one data pool
+ \row
+ \o Basic Sort/Filter Model
+ \o QTreeView
+ \o QStandardItemModel
+ QSortFilterProxyModel
+ \o
+ \row
+ \o Chart
+ \o custom view
+ \o QStandardItemModel
+ \o designing custom views that cooperate with selection models
+ \row
+ \o Color Editor Factory
+ \o {2, 1} QTableWidget
+ \o enhancing the standard delegate with a new custom editor to choose colours
+ \row
+ \o Combo Widget Mapper
+ \o QDataWidgetMapper to map QLineEdit, QTextEdit and QComboBox
+ \o QStandardItemModel
+ \o shows how a QComboBox can serve as a view class
+ \row
+ \o Custom Sort/Filter Model
+ \o QTreeView
+ \o QStandardItemModel
+ QSortFilterProxyModel
+ \o subclass QSortFilterProxyModel for advanced sorting and filtering
+ \row
+ \o Dir View
+ \o QTreeView
+ \o QDirModel
+ \o very small example to demonstrate how to assign a model to a view
+ \row
+ \o Editable Tree Model
+ \o QTreeView
+ \o custom tree model
+ \o comprehensive example for working with trees, demonstrates
+ editing cells and tree structure with an underlying custom
+ model
+ \row
+ \o Fetch More
+ \o QListView
+ \o custom list model
+ \o dynamically changing model
+ \row
+ \o Frozen Column
+ \o QTableView
+ \o QStandardItemModel
+ \o
+ \row
+ \o Pixelator
+ \o QTableView
+ \o custom table model
+ \o implementation of a custom delegate
+ \row
+ \o Puzzle
+ \o QListView
+ \o custom list model
+ \o model/view with drag and drop
+ \row
+ \o Simple DOM Model
+ \o QTreeView
+ \o custom tree model
+ \o read only example for a custom tree model
+ \row
+ \o Simple Tree Model
+ \o QTreeView
+ \o custom tree model
+ \o read only example for a custom tree model
+ \row
+ \o Simple Widget Mapper
+ \o QDataWidgetMapper to map QLineEdit, QTextEdit and QSpinBox
+ \o QStandardItemModel
+ \o basic QDataWidgetMapper usage
+ \row
+ \o Spin Box Delegate
+ \o QTableView
+ \o QStandardItemModel
+ \o custom delegate that uses a spin box as a cell editor
+ \row
+ \o Star Delegate
+ \o {2, 1} QTableWidget
+ \o comprehensive custom delegate example.
+ \endtable
+
+ \l{Qt Demonstrations}{Demonstrations} are similar to examples except
+ that no walkthrough is provided for the code. Demonstrations are also
+ sometimes more feature rich.
+
+ \list
+ \o The \bold Interview demonstration shows the same model and
+ selection being shared between three different views.
+ \o Demonstration \bold Spreadsheet demonstrates the use of a
+ table view as a spreadsheet, using custom delegates to render
+ each item according to the type of data it contains.
+ \endlist
+
+ A \l{Model/View Programming}{reference document} for model/view technology
+ is also available.
+*/
diff --git a/examples/animation/stickman/lifecycle.cpp b/examples/animation/stickman/lifecycle.cpp
index 8778046302..02cdb71c77 100644
--- a/examples/animation/stickman/lifecycle.cpp
+++ b/examples/animation/stickman/lifecycle.cpp
@@ -103,7 +103,7 @@ LifeCycle::LifeCycle(StickMan *stickMan, GraphicsView *keyReceiver)
m_animationGroup->addAnimation(pa);
}
- // Set up intial state graph
+ // Set up initial state graph
//! [3]
m_machine = new QStateMachine();
m_machine->addDefaultAnimation(m_animationGroup);
diff --git a/examples/declarative/cppextensions/plugins/plugin.cpp b/examples/declarative/cppextensions/plugins/plugin.cpp
index 355ca3fb7e..01d53612fe 100644
--- a/examples/declarative/cppextensions/plugins/plugin.cpp
+++ b/examples/declarative/cppextensions/plugins/plugin.cpp
@@ -96,11 +96,13 @@ private:
QBasicTimer timer;
};
+//![0]
class TimeModel : public QObject
{
Q_OBJECT
Q_PROPERTY(int hour READ hour NOTIFY timeChanged)
Q_PROPERTY(int minute READ minute NOTIFY timeChanged)
+//![0]
public:
TimeModel(QObject *parent=0) : QObject(parent)
@@ -135,6 +137,7 @@ private:
int TimeModel::instances=0;
MinuteTimer *TimeModel::timer=0;
+//![plugin]
class QExampleQmlPlugin : public QDeclarativeExtensionPlugin
{
Q_OBJECT
@@ -145,7 +148,10 @@ public:
qmlRegisterType<TimeModel>(uri, 1, 0, "Time");
}
};
+//![plugin]
#include "plugin.moc"
+//![export]
Q_EXPORT_PLUGIN2(qmlqtimeexampleplugin, QExampleQmlPlugin);
+//![export]
diff --git a/examples/declarative/cppextensions/plugins/plugins.qml b/examples/declarative/cppextensions/plugins/plugins.qml
index 183201797f..8d1085c96d 100644
--- a/examples/declarative/cppextensions/plugins/plugins.qml
+++ b/examples/declarative/cppextensions/plugins/plugins.qml
@@ -37,7 +37,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
+//![0]
import com.nokia.TimeExample 1.0 // import types from the plugin
Clock { // this class is defined in QML (com/nokia/TimeExample/Clock.qml)
@@ -49,3 +49,4 @@ Clock { // this class is defined in QML (com/nokia/TimeExample/Clock.qml)
hours: time.hour
minutes: time.minute
}
+//![0]
diff --git a/examples/declarative/cppextensions/referenceexamples/adding/main.cpp b/examples/declarative/cppextensions/referenceexamples/adding/main.cpp
index f429b6e70c..391113c7dd 100644
--- a/examples/declarative/cppextensions/referenceexamples/adding/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/adding/main.cpp
@@ -57,7 +57,7 @@ int main(int argc, char ** argv)
qWarning() << "The person's name is" << person->name();
qWarning() << "They wear a" << person->shoeSize() << "sized shoe";
} else {
- qWarning() << "An error occured";
+ qWarning() << "An error occurred";
}
return 0;
diff --git a/examples/declarative/cppextensions/referenceexamples/attached/main.cpp b/examples/declarative/cppextensions/referenceexamples/attached/main.cpp
index 22e844fd63..5a39a9892c 100644
--- a/examples/declarative/cppextensions/referenceexamples/attached/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/attached/main.cpp
@@ -83,7 +83,7 @@ int main(int argc, char ** argv)
}
} else {
- qWarning() << "An error occured";
+ qWarning() << "An error occurred";
}
return 0;
diff --git a/examples/declarative/cppextensions/referenceexamples/binding/main.cpp b/examples/declarative/cppextensions/referenceexamples/binding/main.cpp
index 29da9946e2..fe1bbc8223 100644
--- a/examples/declarative/cppextensions/referenceexamples/binding/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/binding/main.cpp
@@ -85,7 +85,7 @@ int main(int argc, char ** argv)
party->startParty();
} else {
- qWarning() << "An error occured";
+ qWarning() << "An error occurred";
}
return app.exec();
diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/main.cpp b/examples/declarative/cppextensions/referenceexamples/coercion/main.cpp
index 9b32c8ba59..5c53368de6 100644
--- a/examples/declarative/cppextensions/referenceexamples/coercion/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/coercion/main.cpp
@@ -70,7 +70,7 @@ int main(int argc, char ** argv)
for (int ii = 0; ii < party->guestCount(); ++ii)
qWarning() << " " << party->guest(ii)->name();
} else {
- qWarning() << "An error occured";
+ qWarning() << "An error occurred";
}
return 0;
diff --git a/examples/declarative/cppextensions/referenceexamples/default/main.cpp b/examples/declarative/cppextensions/referenceexamples/default/main.cpp
index f3a706810c..f611bc4cbe 100644
--- a/examples/declarative/cppextensions/referenceexamples/default/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/default/main.cpp
@@ -68,7 +68,7 @@ int main(int argc, char ** argv)
for (int ii = 0; ii < party->guestCount(); ++ii)
qWarning() << " " << party->guest(ii)->name();
} else {
- qWarning() << "An error occured";
+ qWarning() << "An error occurred";
}
return 0;
diff --git a/examples/declarative/cppextensions/referenceexamples/extended/main.cpp b/examples/declarative/cppextensions/referenceexamples/extended/main.cpp
index fb7ce1a2a4..65527c3c63 100644
--- a/examples/declarative/cppextensions/referenceexamples/extended/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/extended/main.cpp
@@ -58,7 +58,7 @@ int main(int argc, char ** argv)
edit->show();
return app.exec();
} else {
- qWarning() << "An error occured";
+ qWarning() << "An error occurred";
return 0;
}
}
diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/main.cpp b/examples/declarative/cppextensions/referenceexamples/grouped/main.cpp
index f2e0f556f0..e56a14de50 100644
--- a/examples/declarative/cppextensions/referenceexamples/grouped/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/grouped/main.cpp
@@ -78,7 +78,7 @@ int main(int argc, char ** argv)
qWarning() << bestShoe->name() << "is wearing the best shoes!";
} else {
- qWarning() << "An error occured";
+ qWarning() << "An error occurred";
}
return 0;
diff --git a/examples/declarative/cppextensions/referenceexamples/properties/main.cpp b/examples/declarative/cppextensions/referenceexamples/properties/main.cpp
index b5dafe211b..80237ef5db 100644
--- a/examples/declarative/cppextensions/referenceexamples/properties/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/properties/main.cpp
@@ -61,7 +61,7 @@ int main(int argc, char ** argv)
for (int ii = 0; ii < party->guestCount(); ++ii)
qWarning() << " " << party->guest(ii)->name();
} else {
- qWarning() << "An error occured";
+ qWarning() << "An error occurred";
}
return 0;
diff --git a/examples/declarative/cppextensions/referenceexamples/signal/main.cpp b/examples/declarative/cppextensions/referenceexamples/signal/main.cpp
index 6add975518..56c08090ad 100644
--- a/examples/declarative/cppextensions/referenceexamples/signal/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/signal/main.cpp
@@ -84,7 +84,7 @@ int main(int argc, char ** argv)
party->startParty();
} else {
- qWarning() << "An error occured";
+ qWarning() << "An error occurred";
}
return 0;
diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp b/examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp
index 5752af7431..40dc3cbcf0 100644
--- a/examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp
@@ -86,7 +86,7 @@ int main(int argc, char ** argv)
party->startParty();
} else {
- qWarning() << "An error occured";
+ qWarning() << "An error occurred";
}
return app.exec();
diff --git a/examples/declarative/keyinteraction/focus/Core/GridMenu.qml b/examples/declarative/keyinteraction/focus/Core/GridMenu.qml
index 9a8d3f3726..19f723582f 100644
--- a/examples/declarative/keyinteraction/focus/Core/GridMenu.qml
+++ b/examples/declarative/keyinteraction/focus/Core/GridMenu.qml
@@ -43,7 +43,7 @@ import Qt 4.7
FocusScope {
property alias interactive: gridView.interactive
- onWantsFocusChanged: if (wantsFocus) mainView.state = ""
+ onActiveFocusChanged: if (activeFocus) mainView.state = ""
Rectangle {
anchors.fill: parent
@@ -84,12 +84,12 @@ FocusScope {
onClicked: {
GridView.view.currentIndex = index
- container.forceFocus()
+ container.forceActiveFocus()
}
}
states: State {
- name: "active"; when: container.focus == true
+ name: "active"; when: container.activeFocus
PropertyChanges { target: content; color: "#FCFFF5"; scale: 1.1 }
}
diff --git a/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml b/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml
index cc13637d83..602b52b970 100644
--- a/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml
+++ b/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml
@@ -69,12 +69,12 @@ Item {
onClicked: {
ListView.view.currentIndex = index
- container.forceFocus()
+ container.forceActiveFocus()
}
}
states: State {
- name: "active"; when: container.focus == true
+ name: "active"; when: container.activeFocus
PropertyChanges { target: content; color: "#FCFFF5"; scale: 1.1 }
PropertyChanges { target: label; font.pixelSize: 16 }
}
diff --git a/examples/declarative/keyinteraction/focus/Core/ListViews.qml b/examples/declarative/keyinteraction/focus/Core/ListViews.qml
index 6f9ceb49d4..3d6ceabd9f 100644
--- a/examples/declarative/keyinteraction/focus/Core/ListViews.qml
+++ b/examples/declarative/keyinteraction/focus/Core/ListViews.qml
@@ -43,11 +43,11 @@ import Qt 4.7
FocusScope {
clip: true
- onWantsFocusChanged: if (wantsFocus) mainView.state = "showListViews"
+ onActiveFocusChanged: if (activeFocus) mainView.state = "showListViews"
ListView {
id: list1
- y: wantsFocus ? 10 : 40; width: parent.width / 3; height: parent.height - 20
+ y: activeFocus ? 10 : 40; width: parent.width / 3; height: parent.height - 20
focus: true
KeyNavigation.up: gridMenu; KeyNavigation.left: contextMenu; KeyNavigation.right: list2
model: 10; cacheBuffer: 200
@@ -60,7 +60,7 @@ FocusScope {
ListView {
id: list2
- y: wantsFocus ? 10 : 40; x: parseInt(parent.width / 3); width: parent.width / 3; height: parent.height - 20
+ y: activeFocus ? 10 : 40; x: parseInt(parent.width / 3); width: parent.width / 3; height: parent.height - 20
KeyNavigation.up: gridMenu; KeyNavigation.left: list1; KeyNavigation.right: list3
model: 10; cacheBuffer: 200
delegate: ListViewDelegate {}
@@ -72,7 +72,7 @@ FocusScope {
ListView {
id: list3
- y: wantsFocus ? 10 : 40; x: parseInt(2 * parent.width / 3); width: parent.width / 3; height: parent.height - 20
+ y: activeFocus ? 10 : 40; x: parseInt(2 * parent.width / 3); width: parent.width / 3; height: parent.height - 20
KeyNavigation.up: gridMenu; KeyNavigation.left: list2
model: 10; cacheBuffer: 200
delegate: ListViewDelegate {}
diff --git a/examples/declarative/keyinteraction/focus/focus.qml b/examples/declarative/keyinteraction/focus/focus.qml
index 8b2af7068b..56fdffc6d9 100644
--- a/examples/declarative/keyinteraction/focus/focus.qml
+++ b/examples/declarative/keyinteraction/focus/focus.qml
@@ -58,7 +58,7 @@ Rectangle {
width: parent.width; height: 320
focus: true
- interactive: parent.wantsFocus
+ interactive: parent.activeFocus
}
ListViews {
@@ -98,7 +98,7 @@ Rectangle {
states: State {
name: "contextMenuOpen"
- when: !mainView.wantsFocus
+ when: !mainView.activeFocus
PropertyChanges { target: contextMenu; x: 0; open: true }
PropertyChanges { target: mainView; x: 130 }
PropertyChanges { target: shade; opacity: 0.25 }
diff --git a/examples/declarative/modelviews/abstractitemmodel/model.cpp b/examples/declarative/modelviews/abstractitemmodel/model.cpp
index d0e09710da..940a44d441 100644
--- a/examples/declarative/modelviews/abstractitemmodel/model.cpp
+++ b/examples/declarative/modelviews/abstractitemmodel/model.cpp
@@ -67,7 +67,9 @@ AnimalModel::AnimalModel(QObject *parent)
void AnimalModel::addAnimal(const Animal &animal)
{
+ beginInsertRows(QModelIndex(), rowCount(), rowCount());
m_animals << animal;
+ endInsertRows();
}
int AnimalModel::rowCount(const QModelIndex & parent) const {
diff --git a/examples/declarative/modelviews/pathview/pathview-example.qml b/examples/declarative/modelviews/pathview/pathview-example.qml
new file mode 100644
index 0000000000..0a3b34cf67
--- /dev/null
+++ b/examples/declarative/modelviews/pathview/pathview-example.qml
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** 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: 400; height: 240
+ color: "white"
+
+ ListModel {
+ id: appModel
+ ListElement { name: "Music"; icon: "pics/AudioPlayer_48.png" }
+ ListElement { name: "Movies"; icon: "pics/VideoPlayer_48.png" }
+ ListElement { name: "Camera"; icon: "pics/Camera_48.png" }
+ ListElement { name: "Calendar"; icon: "pics/DateBook_48.png" }
+ ListElement { name: "Messaging"; icon: "pics/EMail_48.png" }
+ ListElement { name: "Todo List"; icon: "pics/TodoList_48.png" }
+ ListElement { name: "Contacts"; icon: "pics/AddressBook_48.png" }
+ }
+
+ Component {
+ id: appDelegate
+ Item {
+ width: 100; height: 100
+ scale: PathView.iconScale
+
+ Image {
+ id: myIcon
+ y: 20; anchors.horizontalCenter: parent.horizontalCenter
+ source: icon
+ smooth: true
+ }
+ Text {
+ anchors { top: myIcon.bottom; horizontalCenter: parent.horizontalCenter }
+ text: name
+ smooth: true
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: view.currentIndex = index
+ }
+ }
+ }
+
+ Component {
+ id: appHighlight
+ Rectangle { width: 80; height: 80; color: "lightsteelblue" }
+ }
+
+ PathView {
+ id: view
+ anchors.fill: parent
+ highlight: appHighlight
+ preferredHighlightBegin: 0.5
+ preferredHighlightEnd: 0.5
+ focus: true
+ model: appModel
+ delegate: appDelegate
+ path: Path {
+ startX: 10
+ startY: 50
+ PathAttribute { name: "iconScale"; value: 0.5 }
+ PathQuad { x: 200; y: 150; controlX: 50; controlY: 200 }
+ PathAttribute { name: "iconScale"; value: 1.0 }
+ PathQuad { x: 390; y: 50; controlX: 350; controlY: 200 }
+ PathAttribute { name: "iconScale"; value: 0.5 }
+ }
+ }
+}
diff --git a/examples/declarative/modelviews/pathview/pathview.qmlproject b/examples/declarative/modelviews/pathview/pathview.qmlproject
new file mode 100644
index 0000000000..d4909f8685
--- /dev/null
+++ b/examples/declarative/modelviews/pathview/pathview.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/pathview/pics/AddressBook_48.png b/examples/declarative/modelviews/pathview/pics/AddressBook_48.png
new file mode 100644
index 0000000000..1ab7c8eec1
--- /dev/null
+++ b/examples/declarative/modelviews/pathview/pics/AddressBook_48.png
Binary files differ
diff --git a/examples/declarative/modelviews/pathview/pics/AudioPlayer_48.png b/examples/declarative/modelviews/pathview/pics/AudioPlayer_48.png
new file mode 100644
index 0000000000..f4b8689f87
--- /dev/null
+++ b/examples/declarative/modelviews/pathview/pics/AudioPlayer_48.png
Binary files differ
diff --git a/examples/declarative/modelviews/pathview/pics/Camera_48.png b/examples/declarative/modelviews/pathview/pics/Camera_48.png
new file mode 100644
index 0000000000..c76b524945
--- /dev/null
+++ b/examples/declarative/modelviews/pathview/pics/Camera_48.png
Binary files differ
diff --git a/examples/declarative/modelviews/pathview/pics/DateBook_48.png b/examples/declarative/modelviews/pathview/pics/DateBook_48.png
new file mode 100644
index 0000000000..58f5787fb8
--- /dev/null
+++ b/examples/declarative/modelviews/pathview/pics/DateBook_48.png
Binary files differ
diff --git a/examples/declarative/modelviews/pathview/pics/EMail_48.png b/examples/declarative/modelviews/pathview/pics/EMail_48.png
new file mode 100644
index 0000000000..d6d84a61be
--- /dev/null
+++ b/examples/declarative/modelviews/pathview/pics/EMail_48.png
Binary files differ
diff --git a/examples/declarative/modelviews/pathview/pics/TodoList_48.png b/examples/declarative/modelviews/pathview/pics/TodoList_48.png
new file mode 100644
index 0000000000..0988448d9b
--- /dev/null
+++ b/examples/declarative/modelviews/pathview/pics/TodoList_48.png
Binary files differ
diff --git a/examples/declarative/modelviews/pathview/pics/VideoPlayer_48.png b/examples/declarative/modelviews/pathview/pics/VideoPlayer_48.png
new file mode 100644
index 0000000000..52638c50a7
--- /dev/null
+++ b/examples/declarative/modelviews/pathview/pics/VideoPlayer_48.png
Binary files differ
diff --git a/examples/declarative/screenorientation/Core/Bubble.qml b/examples/declarative/screenorientation/Core/Bubble.qml
new file mode 100644
index 0000000000..2474f300be
--- /dev/null
+++ b/examples/declarative/screenorientation/Core/Bubble.qml
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** 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 {
+ property bool rising: false
+ property bool verticalRise: true
+ property real xAttractor: 0
+ property real yAttractor: 0
+
+ width: 5 + 10*Math.random()
+ height: width
+ radius: Math.floor(width/2)-1
+ property real amountOfGray: Math.random()
+ color: Qt.rgba(amountOfGray,amountOfGray,amountOfGray,1)
+
+ y: (rising && verticalRise) ? yAttractor : Math.random()*(main.inPortrait ? main.baseHeight : main.baseWidth)
+ x: (rising && !verticalRise) ? xAttractor : Math.random()*(main.inPortrait ? main.baseWidth : main.baseHeight)
+ Behavior on x {
+ id: xBehavior
+ SmoothedAnimation {
+ velocity: 100+Math.random()*100
+ }
+ }
+ Behavior on y {
+ id: yBehavior
+ SmoothedAnimation {
+ velocity: 100+Math.random()*100
+ }
+ }
+ Timer {
+ interval: 80+Math.random()*40
+ repeat: true
+ running: true
+ onTriggered: {
+ if (rising) {
+ if (x > main.width || x < 0) {
+ xBehavior.enabled = false;
+ rising = false;
+ xBehavior.enabled = true;
+ rising = true;
+ }
+ if (y > main.height || y < 0) {
+ yBehavior.enabled = false;
+ rising = false;
+ yBehavior.enabled = true;
+ rising = true;
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/examples/declarative/screenorientation/Core/Button.qml b/examples/declarative/screenorientation/Core/Button.qml
new file mode 100644
index 0000000000..60083d8d07
--- /dev/null
+++ b/examples/declarative/screenorientation/Core/Button.qml
@@ -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 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
+Item {
+ id: button
+ signal clicked
+ property string text
+ property bool toggled: false
+ width: 100
+ height: 60
+ Rectangle {
+ anchors.fill: button
+ anchors.margins: mouseArea.pressed ? 3 : 2
+ color: toggled ? (mouseArea.pressed ? "#442222" : "darkred") : (mouseArea.pressed ? "#333333": "black")
+ radius: mouseArea.pressed ? 8 : 6
+ Text {
+ id: text
+ anchors.centerIn: parent
+ text: button.text
+ font.pixelSize: mouseArea.pressed ? 12 : 14
+ color: "white"
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ }
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ onClicked: {
+ button.clicked()
+ }
+ }
+ }
+}
diff --git a/examples/declarative/screenorientation/Core/screenorientation.js b/examples/declarative/screenorientation/Core/screenorientation.js
new file mode 100644
index 0000000000..f0a5574d73
--- /dev/null
+++ b/examples/declarative/screenorientation/Core/screenorientation.js
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+function printOrientation(orientation) {
+ var orientationString;
+ if (orientation == Orientation.Portrait) {
+ orientationString = "Portrait";
+ } else if (orientation == Orientation.Landscape) {
+ orientationString = "Landscape";
+ } else if (orientation == Orientation.PortraitInverted) {
+ orientationString = "Portrait inverted";
+ } else if (orientation == Orientation.LandscapeInverted) {
+ orientationString = "Landscape inverted";
+ } else {
+ orientationString = "UnknownOrientation";
+ }
+ return orientationString;
+}
+
+function getAngle(orientation) {
+ var angle;
+ if (orientation == Orientation.Portrait) {
+ angle = 0;
+ } else if (orientation == Orientation.Landscape) {
+ angle = 90;
+ } else if (orientation == Orientation.PortraitInverted) {
+ angle = 180;
+ } else if (orientation == Orientation.LandscapeInverted) {
+ angle = 270;
+ } else {
+ angle = 0;
+ }
+ return angle;
+}
+
+function parallel(firstOrientation, secondOrientation) {
+ var difference = getAngle(firstOrientation) - getAngle(secondOrientation)
+ return difference % 180 == 0;
+}
+
+function calculateGravityPoint(firstOrientation, secondOrientation) {
+ var position = Qt.point(0, 0);
+ var difference = getAngle(firstOrientation) - getAngle(secondOrientation)
+ if (difference < 0) {
+ difference = 360 + difference;
+ }
+ if (difference == 0) {
+ position = Qt.point(0, -10);
+ } else if (difference == 90) {
+ position = Qt.point(-10, 0);
+ } else if (difference == 180) {
+ position = Qt.point(0, 1000);
+ } else if (difference == 270) {
+ position = Qt.point(1000, 0);
+ }
+ return position;
+}
diff --git a/examples/declarative/screenorientation/screenorientation.qml b/examples/declarative/screenorientation/screenorientation.qml
new file mode 100644
index 0000000000..6af38bb110
--- /dev/null
+++ b/examples/declarative/screenorientation/screenorientation.qml
@@ -0,0 +1,202 @@
+/****************************************************************************
+**
+** 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
+import "Core"
+import "Core/screenorientation.js" as ScreenOrientation
+
+Rectangle {
+ id: window
+ width: 360
+ height: 640
+ color: "white"
+
+ Rectangle {
+ id: main
+ clip: true
+ property variant selectedOrientation: Orientation.UnknownOrientation
+ property variant activeOrientation: selectedOrientation == Orientation.UnknownOrientation ? runtime.orientation : selectedOrientation
+ state: "orientation " + activeOrientation
+ property bool inPortrait: (activeOrientation == Orientation.Portrait || activeOrientation == Orientation.PortraitInverted);
+
+ // rotation correction for landscape devices like N900
+ property bool landscapeWindow: window.width > window.height
+ property variant rotationDelta: landscapeWindow ? -90 : 0
+ rotation: rotationDelta
+
+ // initial state is portrait
+ property real baseWidth: landscapeWindow ? window.height-10 : window.width-10
+ property real baseHeight: landscapeWindow ? window.width-10 : window.height-10
+
+ width: baseWidth
+ height: baseHeight
+ anchors.centerIn: parent
+
+ color: "black"
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: Qt.rgba(0.5,0.5,0.5,0.5) }
+ GradientStop { position: 0.8; color: "black" }
+ GradientStop { position: 1.0; color: "black" }
+ }
+ Item {
+ id: bubbles
+ property bool rising: false
+ anchors.fill: parent
+ property variant gravityPoint: ScreenOrientation.calculateGravityPoint(main.activeOrientation, runtime.orientation)
+ Repeater {
+ model: 24
+ Bubble {
+ rising: bubbles.rising
+ verticalRise: ScreenOrientation.parallel(main.activeOrientation, runtime.orientation)
+ xAttractor: parent.gravityPoint.x
+ yAttractor: parent.gravityPoint.y
+ }
+ }
+ Component.onCompleted: bubbles.rising = true;
+ }
+
+ Column {
+ width: centeredText.width
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenterOffset: 30
+ Text {
+ text: "Orientation"
+ color: "white"
+ font.pixelSize: 22
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+ Text {
+ id: centeredText
+ text: ScreenOrientation.printOrientation(main.activeOrientation)
+ color: "white"
+ font.pixelSize: 40
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+ Text {
+ text: "sensor: " + ScreenOrientation.printOrientation(runtime.orientation)
+ color: "white"
+ font.pixelSize: 14
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+ }
+ Flow {
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.margins: 10
+ spacing: 4
+ Button {
+ width: main.inPortrait ? (parent.width-4)/2 : (parent.width-8)/3
+ text: "Portrait"
+ onClicked: main.selectedOrientation = Orientation.Portrait
+ toggled: main.selectedOrientation == Orientation.Portrait
+ }
+ Button {
+ width: main.inPortrait ? (parent.width-4)/2 : (parent.width-8)/3
+ text: "Portrait inverted"
+ onClicked: main.selectedOrientation = Orientation.PortraitInverted
+ toggled: main.selectedOrientation == Orientation.PortraitInverted
+ }
+ Button {
+ width: main.inPortrait ? (parent.width-4)/2 : (parent.width-8)/3
+ text: "Landscape"
+ onClicked: main.selectedOrientation = Orientation.Landscape
+ toggled: main.selectedOrientation == Orientation.Landscape
+ }
+ Button {
+ width: main.inPortrait ? (parent.width-4)/2 : (parent.width-8)/3
+ text: "Landscape inverted"
+ onClicked: main.selectedOrientation = Orientation.LandscapeInverted
+ toggled: main.selectedOrientation == Orientation.LandscapeInverted
+ }
+ Button {
+ width: main.inPortrait ? parent.width : 2*(parent.width-2)/3
+ text: "From runtime.orientation"
+ onClicked: main.selectedOrientation = Orientation.UnknownOrientation
+ toggled: main.selectedOrientation == Orientation.UnknownOrientation
+ }
+ }
+ states: [
+ State {
+ name: "orientation " + Orientation.Landscape
+ PropertyChanges {
+ target: main
+ rotation: ScreenOrientation.getAngle(Orientation.Landscape)+rotationDelta
+ width: baseHeight
+ height: baseWidth
+ }
+ },
+ State {
+ name: "orientation " + Orientation.PortraitInverted
+ PropertyChanges {
+ target: main
+ rotation: ScreenOrientation.getAngle(Orientation.PortraitInverted)+rotationDelta
+ width: baseWidth
+ height: baseHeight
+ }
+ },
+ State {
+ name: "orientation " + Orientation.LandscapeInverted
+ PropertyChanges {
+ target: main
+ rotation: ScreenOrientation.getAngle(Orientation.LandscapeInverted)+rotationDelta
+ width: baseHeight
+ height: baseWidth
+ }
+ }
+ ]
+ transitions: Transition {
+ ParallelAnimation {
+ RotationAnimation {
+ direction: RotationAnimation.Shortest
+ duration: 300
+ easing.type: Easing.InOutQuint
+ }
+ NumberAnimation {
+ properties: "x,y,width,height"
+ duration: 300
+ easing.type: Easing.InOutQuint
+ }
+ }
+ }
+ }
+}
diff --git a/examples/declarative/screenorientation/screenorientation.qmlproject b/examples/declarative/screenorientation/screenorientation.qmlproject
new file mode 100644
index 0000000000..d4909f8685
--- /dev/null
+++ b/examples/declarative/screenorientation/screenorientation.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/toys/clocks/content/Clock.qml b/examples/declarative/toys/clocks/content/Clock.qml
index 24a07ecef6..eaa14c672f 100644
--- a/examples/declarative/toys/clocks/content/Clock.qml
+++ b/examples/declarative/toys/clocks/content/Clock.qml
@@ -77,7 +77,7 @@ Item {
origin.x: 7.5; origin.y: 73;
angle: (clock.hours * 30) + (clock.minutes * 0.5)
Behavior on angle {
- NumberAnimation{}
+ RotationAnimation{ direction: RotationAnimation.Clockwise }
}
}
}
@@ -91,7 +91,7 @@ Item {
origin.x: 6.5; origin.y: 83;
angle: clock.minutes * 6
Behavior on angle {
- NumberAnimation{}
+ RotationAnimation{ direction: RotationAnimation.Clockwise }
}
}
}
@@ -105,7 +105,7 @@ Item {
origin.x: 2.5; origin.y: 80;
angle: clock.seconds * 6
Behavior on angle {
- NumberAnimation{}
+ RotationAnimation{ direction: RotationAnimation.Clockwise }
}
}
}
diff --git a/examples/declarative/toys/dynamicscene/dynamicscene.qml b/examples/declarative/toys/dynamicscene/dynamicscene.qml
index 1edb841da6..d1055cd910 100644
--- a/examples/declarative/toys/dynamicscene/dynamicscene.qml
+++ b/examples/declarative/toys/dynamicscene/dynamicscene.qml
@@ -136,10 +136,11 @@ Item {
Text { text: "Drag an item into the scene." }
Rectangle {
- width: childrenRect.width + 10; height: childrenRect.height + 10
+ width: palette.width + 10; height: palette.height + 10
border.color: "black"
Row {
+ id: palette
anchors.centerIn: parent
spacing: 8
@@ -184,7 +185,6 @@ Item {
id: qmlText
anchors.fill: parent; anchors.margins: 5
readOnly: false
- focusOnPress: true
font.pixelSize: 14
wrapMode: TextEdit.WordWrap
diff --git a/examples/declarative/tutorials/extending/chapter1-basics/app.qml b/examples/declarative/tutorials/extending/chapter1-basics/app.qml
index 9af155cdc1..ada088d6d9 100644
--- a/examples/declarative/tutorials/extending/chapter1-basics/app.qml
+++ b/examples/declarative/tutorials/extending/chapter1-basics/app.qml
@@ -38,21 +38,23 @@
**
****************************************************************************/
//![0]
-import Music 1.0
+import Charts 1.0
import Qt 4.7
-Rectangle {
+Item {
width: 300; height: 200
- Musician {
- id: aMusician
- name: "Reddy the Rocker"
- instrument: "Guitar"
+ PieChart {
+ id: aPieChart
+ anchors.centerIn: parent
+ width: 100; height: 100
+ name: "A simple pie chart"
+ color: "red"
}
Text {
- anchors.fill: parent
- text: aMusician.name + " plays the " + aMusician.instrument
+ anchors { bottom: parent.bottom; horizontalCenter: parent.horizontalCenter; bottomMargin: 20 }
+ text: aPieChart.name
}
}
//![0]
diff --git a/examples/declarative/tutorials/extending/chapter1-basics/chapter1-basics.pro b/examples/declarative/tutorials/extending/chapter1-basics/chapter1-basics.pro
index bd05ebe2cc..0f0416718c 100644
--- a/examples/declarative/tutorials/extending/chapter1-basics/chapter1-basics.pro
+++ b/examples/declarative/tutorials/extending/chapter1-basics/chapter1-basics.pro
@@ -1,5 +1,5 @@
QT += declarative
-HEADERS += musician.h
-SOURCES += musician.cpp \
+HEADERS += piechart.h
+SOURCES += piechart.cpp \
main.cpp
diff --git a/examples/declarative/tutorials/extending/chapter1-basics/main.cpp b/examples/declarative/tutorials/extending/chapter1-basics/main.cpp
index 8ef6965ea8..a5dbab32d2 100644
--- a/examples/declarative/tutorials/extending/chapter1-basics/main.cpp
+++ b/examples/declarative/tutorials/extending/chapter1-basics/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
//![0]
-#include "musician.h"
+#include "piechart.h"
#include <qdeclarative.h>
#include <QDeclarativeView>
#include <QApplication>
@@ -47,7 +47,7 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- qmlRegisterType<Musician>("Music", 1, 0, "Musician");
+ qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart");
QDeclarativeView view;
view.setSource(QUrl::fromLocalFile("app.qml"));
diff --git a/examples/declarative/tutorials/extending/chapter1-basics/piechart.cpp b/examples/declarative/tutorials/extending/chapter1-basics/piechart.cpp
new file mode 100644
index 0000000000..3b9ef7160a
--- /dev/null
+++ b/examples/declarative/tutorials/extending/chapter1-basics/piechart.cpp
@@ -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 documentation 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$
+**
+****************************************************************************/
+#include "piechart.h"
+#include <QPainter>
+
+//![0]
+PieChart::PieChart(QDeclarativeItem *parent)
+ : QDeclarativeItem(parent)
+{
+ // need to disable this flag to draw inside a QDeclarativeItem
+ setFlag(QGraphicsItem::ItemHasNoContents, false);
+}
+//![0]
+
+QString PieChart::name() const
+{
+ return m_name;
+}
+
+void PieChart::setName(const QString &name)
+{
+ m_name = name;
+}
+
+QColor PieChart::color() const
+{
+ return m_color;
+}
+
+void PieChart::setColor(const QColor &color)
+{
+ m_color = color;
+}
+
+//![1]
+void PieChart::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+{
+ QPen pen(m_color, 2);
+ painter->setPen(pen);
+ painter->setRenderHints(QPainter::Antialiasing, true);
+ painter->drawPie(boundingRect(), 90 * 16, 290 * 16);
+}
+//![1]
+
diff --git a/examples/declarative/tutorials/extending/chapter1-basics/musician.h b/examples/declarative/tutorials/extending/chapter1-basics/piechart.h
index f9a0537502..aae7b26dd3 100644
--- a/examples/declarative/tutorials/extending/chapter1-basics/musician.h
+++ b/examples/declarative/tutorials/extending/chapter1-basics/piechart.h
@@ -37,30 +37,33 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef MUSICIAN_H
-#define MUSICIAN_H
+#ifndef PIECHART_H
+#define PIECHART_H
//![0]
-#include <QObject>
+#include <QDeclarativeItem>
+#include <QColor>
-class Musician : public QObject
+class PieChart : public QDeclarativeItem
{
Q_OBJECT
Q_PROPERTY(QString name READ name WRITE setName)
- Q_PROPERTY(QString instrument READ instrument WRITE setInstrument)
+ Q_PROPERTY(QColor color READ color WRITE setColor)
public:
- Musician(QObject *parent = 0);
+ PieChart(QDeclarativeItem *parent = 0);
QString name() const;
void setName(const QString &name);
- QString instrument() const;
- void setInstrument(const QString &instrument);
+ QColor color() const;
+ void setColor(const QColor &color);
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
private:
QString m_name;
- QString m_instrument;
+ QColor m_color;
};
//![0]
diff --git a/examples/declarative/tutorials/extending/chapter2-methods/app.qml b/examples/declarative/tutorials/extending/chapter2-methods/app.qml
index 02d33c2f1b..0b55f7c02a 100644
--- a/examples/declarative/tutorials/extending/chapter2-methods/app.qml
+++ b/examples/declarative/tutorials/extending/chapter2-methods/app.qml
@@ -38,23 +38,29 @@
**
****************************************************************************/
//![0]
-import Music 1.0
+import Charts 1.0
import Qt 4.7
-Rectangle {
- width: 200; height: 200
+Item {
+ width: 300; height: 200
- Musician {
- id: aMusician
- name: "Reddy the Rocker"
- instrument: "Guitar"
+ PieChart {
+ id: aPieChart
+ anchors.centerIn: parent
+ width: 100; height: 100
+ color: "red"
- onPerformanceEnded: console.log("The performance has now ended")
+ onChartCleared: console.log("The chart has been cleared")
}
MouseArea {
anchors.fill: parent
- onClicked: aMusician.perform()
+ onClicked: aPieChart.clearChart()
+ }
+
+ Text {
+ anchors { bottom: parent.bottom; horizontalCenter: parent.horizontalCenter; bottomMargin: 20 }
+ text: "Click anywhere to clear the chart"
}
}
//![0]
diff --git a/examples/declarative/tutorials/extending/chapter2-methods/chapter2-methods.pro b/examples/declarative/tutorials/extending/chapter2-methods/chapter2-methods.pro
index bd05ebe2cc..0f0416718c 100644
--- a/examples/declarative/tutorials/extending/chapter2-methods/chapter2-methods.pro
+++ b/examples/declarative/tutorials/extending/chapter2-methods/chapter2-methods.pro
@@ -1,5 +1,5 @@
QT += declarative
-HEADERS += musician.h
-SOURCES += musician.cpp \
+HEADERS += piechart.h
+SOURCES += piechart.cpp \
main.cpp
diff --git a/examples/declarative/tutorials/extending/chapter2-methods/main.cpp b/examples/declarative/tutorials/extending/chapter2-methods/main.cpp
index 8ef6965ea8..a5dbab32d2 100644
--- a/examples/declarative/tutorials/extending/chapter2-methods/main.cpp
+++ b/examples/declarative/tutorials/extending/chapter2-methods/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
//![0]
-#include "musician.h"
+#include "piechart.h"
#include <qdeclarative.h>
#include <QDeclarativeView>
#include <QApplication>
@@ -47,7 +47,7 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- qmlRegisterType<Musician>("Music", 1, 0, "Musician");
+ qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart");
QDeclarativeView view;
view.setSource(QUrl::fromLocalFile("app.qml"));
diff --git a/examples/declarative/tutorials/extending/chapter2-methods/piechart.cpp b/examples/declarative/tutorials/extending/chapter2-methods/piechart.cpp
new file mode 100644
index 0000000000..11ff7c8bff
--- /dev/null
+++ b/examples/declarative/tutorials/extending/chapter2-methods/piechart.cpp
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+#include "piechart.h"
+#include <QPainter>
+#include <QDebug>
+
+PieChart::PieChart(QDeclarativeItem *parent)
+ : QDeclarativeItem(parent)
+{
+ // need to disable this flag to draw inside a QDeclarativeItem
+ setFlag(QGraphicsItem::ItemHasNoContents, false);
+}
+
+QString PieChart::name() const
+{
+ return m_name;
+}
+
+void PieChart::setName(const QString &name)
+{
+ m_name = name;
+}
+
+QColor PieChart::color() const
+{
+ return m_color;
+}
+
+void PieChart::setColor(const QColor &color)
+{
+ m_color = color;
+}
+
+void PieChart::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+{
+ QPen pen(m_color, 2);
+ painter->setPen(pen);
+ painter->setRenderHints(QPainter::Antialiasing, true);
+ painter->drawPie(boundingRect(), 90 * 16, 290 * 16);
+}
+
+//![0]
+void PieChart::clearChart()
+{
+ setColor(QColor(Qt::transparent));
+ update();
+
+ emit chartCleared();
+}
+//![0]
diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/musician.h b/examples/declarative/tutorials/extending/chapter2-methods/piechart.h
index 0b0addb997..246fd9f929 100644
--- a/examples/declarative/tutorials/extending/chapter3-bindings/musician.h
+++ b/examples/declarative/tutorials/extending/chapter2-methods/piechart.h
@@ -37,42 +37,44 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef MUSICIAN_H
-#define MUSICIAN_H
+#ifndef PIECHART_H
+#define PIECHART_H
-#include <QObject>
+#include <QDeclarativeItem>
+#include <QColor>
//![0]
-class Musician : public QObject
+class PieChart : public QDeclarativeItem
{
//![0]
Q_OBJECT
Q_PROPERTY(QString name READ name WRITE setName)
- Q_PROPERTY(QString instrument READ instrument WRITE setInstrument)
+ Q_PROPERTY(QColor color READ color WRITE setColor)
//![1]
- Q_PROPERTY(QString instrument READ instrument WRITE setInstrument NOTIFY instrumentChanged)
public:
//![1]
- Musician(QObject *parent = 0);
+ PieChart(QDeclarativeItem *parent = 0);
QString name() const;
void setName(const QString &name);
- QString instrument() const;
- void setInstrument(const QString &instrument);
+ QColor color() const;
+ void setColor(const QColor &color);
- Q_INVOKABLE void perform();
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
//![2]
+ Q_INVOKABLE void clearChart();
+
signals:
- void instrumentChanged();
+ void chartCleared();
//![2]
private:
QString m_name;
- QString m_instrument;
+ QColor m_color;
//![3]
};
diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/app.qml b/examples/declarative/tutorials/extending/chapter3-bindings/app.qml
index 8bf6ecfaf6..2ff6ae1965 100644
--- a/examples/declarative/tutorials/extending/chapter3-bindings/app.qml
+++ b/examples/declarative/tutorials/extending/chapter3-bindings/app.qml
@@ -38,35 +38,37 @@
**
****************************************************************************/
//![0]
-import Music 1.0
+import Charts 1.0
import Qt 4.7
-Rectangle {
- width: 200; height: 200
+Item {
+ width: 300; height: 200
- Musician {
- id: reddy
- name: "Reddy the Rocker"
- instrument: "Guitar"
- }
+ Row {
+ anchors.centerIn: parent
+ spacing: 20
+
+ PieChart {
+ id: chartA
+ width: 100; height: 100
+ color: "red"
+ }
- Musician {
- id: craig
- name: "Craig the Copycat"
- instrument: reddy.instrument
+ PieChart {
+ id: chartB
+ width: 100; height: 100
+ color: chartA.color
+ }
}
MouseArea {
anchors.fill: parent
- onClicked: {
- reddy.perform()
- craig.perform()
-
- reddy.instrument = "Drums"
+ onClicked: { chartA.color = "blue" }
+ }
- reddy.perform()
- craig.perform()
- }
+ Text {
+ anchors { bottom: parent.bottom; horizontalCenter: parent.horizontalCenter; bottomMargin: 20 }
+ text: "Click anywhere to change the chart color"
}
}
//![0]
diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/chapter3-bindings.pro b/examples/declarative/tutorials/extending/chapter3-bindings/chapter3-bindings.pro
index bd05ebe2cc..0f0416718c 100644
--- a/examples/declarative/tutorials/extending/chapter3-bindings/chapter3-bindings.pro
+++ b/examples/declarative/tutorials/extending/chapter3-bindings/chapter3-bindings.pro
@@ -1,5 +1,5 @@
QT += declarative
-HEADERS += musician.h
-SOURCES += musician.cpp \
+HEADERS += piechart.h
+SOURCES += piechart.cpp \
main.cpp
diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/main.cpp b/examples/declarative/tutorials/extending/chapter3-bindings/main.cpp
index 8ef6965ea8..a5dbab32d2 100644
--- a/examples/declarative/tutorials/extending/chapter3-bindings/main.cpp
+++ b/examples/declarative/tutorials/extending/chapter3-bindings/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
//![0]
-#include "musician.h"
+#include "piechart.h"
#include <qdeclarative.h>
#include <QDeclarativeView>
#include <QApplication>
@@ -47,7 +47,7 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- qmlRegisterType<Musician>("Music", 1, 0, "Musician");
+ qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart");
QDeclarativeView view;
view.setSource(QUrl::fromLocalFile("app.qml"));
diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/piechart.cpp b/examples/declarative/tutorials/extending/chapter3-bindings/piechart.cpp
new file mode 100644
index 0000000000..85a9762994
--- /dev/null
+++ b/examples/declarative/tutorials/extending/chapter3-bindings/piechart.cpp
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+#include "piechart.h"
+#include <QPainter>
+#include <QDebug>
+
+PieChart::PieChart(QDeclarativeItem *parent)
+ : QDeclarativeItem(parent)
+{
+ // need to disable this flag to draw inside a QDeclarativeItem
+ setFlag(QGraphicsItem::ItemHasNoContents, false);
+}
+
+QString PieChart::name() const
+{
+ return m_name;
+}
+
+void PieChart::setName(const QString &name)
+{
+ m_name = name;
+}
+
+QColor PieChart::color() const
+{
+ return m_color;
+}
+
+//![0]
+void PieChart::setColor(const QColor &color)
+{
+ if (color != m_color) {
+ m_color = color;
+ update(); // repaint with the new color
+ emit colorChanged();
+ }
+}
+//![0]
+
+void PieChart::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+{
+ QPen pen(m_color, 2);
+ painter->setPen(pen);
+ painter->setRenderHints(QPainter::Antialiasing, true);
+ painter->drawPie(boundingRect(), 90 * 16, 290 * 16);
+}
+
+void PieChart::clearChart()
+{
+ setColor(QColor(Qt::transparent));
+ update();
+}
diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/piechart.h b/examples/declarative/tutorials/extending/chapter3-bindings/piechart.h
new file mode 100644
index 0000000000..164cebb65e
--- /dev/null
+++ b/examples/declarative/tutorials/extending/chapter3-bindings/piechart.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+#ifndef PIECHART_H
+#define PIECHART_H
+
+#include <QDeclarativeItem>
+#include <QColor>
+
+//![0]
+class PieChart : public QDeclarativeItem
+{
+//![0]
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName)
+
+//![1]
+ Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
+public:
+//![1]
+
+ PieChart(QDeclarativeItem *parent = 0);
+
+ QString name() const;
+ void setName(const QString &name);
+
+ QColor color() const;
+ void setColor(const QColor &color);
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+
+ Q_INVOKABLE void clearChart();
+
+//![2]
+signals:
+ void colorChanged();
+//![2]
+
+private:
+ QString m_name;
+ QColor m_color;
+
+//![3]
+};
+//![3]
+
+#endif
+
diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml
index d76f80120f..fcd38068c5 100644
--- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml
+++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml
@@ -38,17 +38,23 @@
**
****************************************************************************/
//![0]
-import Music 1.0
+import Charts 1.0
import Qt 4.7
Item {
+ width: 300; height: 200
- Musician {
- id: reddy
- name: "Reddy the Rocker"
- instrument: Instrument { type: "Guitar" }
+ PieChart {
+ id: chart
+ anchors.centerIn: parent
+ width: 100; height: 100
+
+ pieSlice: PieSlice {
+ anchors.fill: parent
+ color: "red"
+ }
}
- Component.onCompleted: console.log("Reddy plays the " + reddy.instrument.type)
+ Component.onCompleted: console.log("The pie is colored " + chart.pieSlice.color)
}
//![0]
diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro
index aea07a0ef5..c3f5402aea 100644
--- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro
+++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro
@@ -1,7 +1,7 @@
QT += declarative
-HEADERS += musician.h \
- instrument.h
-SOURCES += musician.cpp \
- instrument.cpp \
+HEADERS += piechart.h \
+ pieslice.h
+SOURCES += piechart.cpp \
+ pieslice.cpp \
main.cpp
diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp
index d94cb036cb..fd518a255a 100644
--- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp
+++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp
@@ -37,8 +37,8 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "musician.h"
-#include "instrument.h"
+#include "piechart.h"
+#include "pieslice.h"
#include <qdeclarative.h>
#include <QDeclarativeView>
@@ -50,10 +50,10 @@ int main(int argc, char *argv[])
//![0]
QApplication app(argc, argv);
- qmlRegisterType<Musician>("Music", 1, 0, "Musician");
+ qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart");
//![1]
- qmlRegisterType<Instrument>("Music", 1, 0, "Instrument");
+ qmlRegisterType<PieSlice>("Charts", 1, 0, "PieSlice");
//![1]
QDeclarativeView view;
diff --git a/examples/declarative/tutorials/extending/chapter2-methods/musician.cpp b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp
index 0ce0022251..70988542d3 100644
--- a/examples/declarative/tutorials/extending/chapter2-methods/musician.cpp
+++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp
@@ -37,38 +37,36 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "musician.h"
-#include <QDebug>
+#include "piechart.h"
+#include "pieslice.h"
-Musician::Musician(QObject *parent)
- : QObject(parent)
+PieChart::PieChart(QDeclarativeItem *parent)
+ : QDeclarativeItem(parent)
{
+ // this doesn't need to disable QGraphicsItem::ItemHasNoContents
+ // anymore since the drawing is now done in PieSlice
}
-QString Musician::name() const
+QString PieChart::name() const
{
return m_name;
}
-void Musician::setName(const QString &name)
+void PieChart::setName(const QString &name)
{
m_name = name;
}
-QString Musician::instrument() const
+PieSlice *PieChart::pieSlice() const
{
- return m_instrument;
-}
-
-void Musician::setInstrument(const QString &instrument)
-{
- m_instrument = instrument;
+ return m_pieSlice;
}
//![0]
-void Musician::perform()
+void PieChart::setPieSlice(PieSlice *pieSlice)
{
- qWarning() << m_name << "is playing the" << m_instrument;
- emit performanceEnded();
+ m_pieSlice = pieSlice;
+ pieSlice->setParentItem(this);
}
//![0]
+
diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/musician.h b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.h
index 8f67f61cc0..448ca7b67b 100644
--- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/musician.h
+++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.h
@@ -37,18 +37,18 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef MUSICIAN_H
-#define MUSICIAN_H
+#ifndef PIECHART_H
+#define PIECHART_H
-#include <QObject>
+#include <QDeclarativeItem>
-class Instrument;
+class PieSlice;
//![0]
-class Musician : public QObject
+class PieChart : public QDeclarativeItem
{
Q_OBJECT
- Q_PROPERTY(Instrument* instrument READ instrument WRITE setInstrument)
+ Q_PROPERTY(PieSlice* pieSlice READ pieSlice WRITE setPieSlice)
//![0]
Q_PROPERTY(QString name READ name WRITE setName)
@@ -56,19 +56,19 @@ class Musician : public QObject
public:
//![1]
- Musician(QObject *parent = 0);
+ PieChart(QDeclarativeItem *parent = 0);
QString name() const;
void setName(const QString &name);
//![2]
- Instrument *instrument() const;
- void setInstrument(Instrument *instrument);
+ PieSlice *pieSlice() const;
+ void setPieSlice(PieSlice *pieSlice);
//![2]
private:
QString m_name;
- Instrument *m_instrument;
+ PieSlice *m_pieSlice;
//![3]
};
diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/musician.cpp b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp
index e62efb197d..7a420fd285 100644
--- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/musician.cpp
+++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp
@@ -37,31 +37,32 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "musician.h"
-#include "instrument.h"
+#include "pieslice.h"
-Musician::Musician(QObject *parent)
- : QObject(parent)
-{
-}
+#include <QPainter>
-QString Musician::name() const
+PieSlice::PieSlice(QDeclarativeItem *parent)
+ : QDeclarativeItem(parent)
{
- return m_name;
+ // need to disable this flag to draw inside a QDeclarativeItem
+ setFlag(QGraphicsItem::ItemHasNoContents, false);
}
-void Musician::setName(const QString &name)
+QColor PieSlice::color() const
{
- m_name = name;
+ return m_color;
}
-Instrument *Musician::instrument() const
+void PieSlice::setColor(const QColor &color)
{
- return m_instrument;
+ m_color = color;
}
-void Musician::setInstrument(Instrument *instrument)
+void PieSlice::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
{
- m_instrument = instrument;
+ QPen pen(m_color, 2);
+ painter->setPen(pen);
+ painter->setRenderHints(QPainter::Antialiasing, true);
+ painter->drawPie(boundingRect(), 90 * 16, 290 * 16);
}
diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.h b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.h
new file mode 100644
index 0000000000..085a9b8fe6
--- /dev/null
+++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.h
@@ -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 documentation 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$
+**
+****************************************************************************/
+#ifndef PIESLICE_H
+#define PIESLICE_H
+
+#include <QDeclarativeItem>
+#include <QColor>
+
+//![0]
+class PieSlice : public QDeclarativeItem
+{
+ Q_OBJECT
+ Q_PROPERTY(QColor color READ color WRITE setColor)
+
+public:
+ PieSlice(QDeclarativeItem *parent = 0);
+
+ QColor color() const;
+ void setColor(const QColor &color);
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+
+private:
+ QColor m_color;
+};
+//![0]
+
+#endif
+
diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/app.qml b/examples/declarative/tutorials/extending/chapter5-listproperties/app.qml
new file mode 100644
index 0000000000..f759bc90e5
--- /dev/null
+++ b/examples/declarative/tutorials/extending/chapter5-listproperties/app.qml
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+//![0]
+import Charts 1.0
+import Qt 4.7
+
+Item {
+ width: 300; height: 200
+
+ PieChart {
+ anchors.centerIn: parent
+ width: 100; height: 100
+
+ slices: [
+ PieSlice {
+ anchors.fill: parent
+ color: "red"
+ fromAngle: 0; angleSpan: 110
+ },
+ PieSlice {
+ anchors.fill: parent
+ color: "black"
+ fromAngle: 110; angleSpan: 50
+ },
+ PieSlice {
+ anchors.fill: parent
+ color: "blue"
+ fromAngle: 160; angleSpan: 100
+ }
+ ]
+ }
+}
+//![0]
diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro b/examples/declarative/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro
new file mode 100644
index 0000000000..c3f5402aea
--- /dev/null
+++ b/examples/declarative/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro
@@ -0,0 +1,7 @@
+QT += declarative
+
+HEADERS += piechart.h \
+ pieslice.h
+SOURCES += piechart.cpp \
+ pieslice.cpp \
+ main.cpp
diff --git a/examples/declarative/tutorials/extending/chapter5-plugins/instrument.cpp b/examples/declarative/tutorials/extending/chapter5-listproperties/main.cpp
index 9ca96f6386..f73c49fd24 100644
--- a/examples/declarative/tutorials/extending/chapter5-plugins/instrument.cpp
+++ b/examples/declarative/tutorials/extending/chapter5-listproperties/main.cpp
@@ -37,20 +37,22 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "instrument.h"
+#include "piechart.h"
+#include "pieslice.h"
-Instrument::Instrument(QObject *parent)
- : QObject(parent)
-{
-}
+#include <qdeclarative.h>
+#include <QDeclarativeView>
+#include <QApplication>
-QString Instrument::type() const
+int main(int argc, char *argv[])
{
- return m_type;
-}
+ QApplication app(argc, argv);
-void Instrument::setType(const QString &type)
-{
- m_type = type;
-}
+ qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart");
+ qmlRegisterType<PieSlice>("Charts", 1, 0, "PieSlice");
+ QDeclarativeView view;
+ view.setSource(QUrl::fromLocalFile("app.qml"));
+ view.show();
+ return app.exec();
+}
diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/musician.cpp b/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp
index 5f9ead4bfe..2515b64280 100644
--- a/examples/declarative/tutorials/extending/chapter3-bindings/musician.cpp
+++ b/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp
@@ -37,40 +37,36 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "musician.h"
-#include <QDebug>
+#include "piechart.h"
+#include "pieslice.h"
-Musician::Musician(QObject *parent)
- : QObject(parent)
+PieChart::PieChart(QDeclarativeItem *parent)
+ : QDeclarativeItem(parent)
{
}
-QString Musician::name() const
+QString PieChart::name() const
{
return m_name;
}
-void Musician::setName(const QString &name)
+void PieChart::setName(const QString &name)
{
m_name = name;
}
-QString Musician::instrument() const
+//![0]
+QDeclarativeListProperty<PieSlice> PieChart::slices()
{
- return m_instrument;
+ return QDeclarativeListProperty<PieSlice>(this, 0, &PieChart::append_slice);
}
-//![0]
-void Musician::setInstrument(const QString &instrument)
+void PieChart::append_slice(QDeclarativeListProperty<PieSlice> *list, PieSlice *slice)
{
- if (instrument != m_instrument) {
- m_instrument = instrument;
- emit instrumentChanged();
+ PieChart *chart = qobject_cast<PieChart *>(list->object);
+ if (chart) {
+ slice->setParentItem(chart);
+ chart->m_slices.append(slice);
}
}
//![0]
-
-void Musician::perform()
-{
- qWarning() << m_name << "is playing the" << m_instrument;
-}
diff --git a/examples/declarative/tutorials/extending/chapter2-methods/musician.h b/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.h
index 86849ba237..44242513c0 100644
--- a/examples/declarative/tutorials/extending/chapter2-methods/musician.h
+++ b/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.h
@@ -37,45 +37,39 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef MUSICIAN_H
-#define MUSICIAN_H
+#ifndef PIECHART_H
+#define PIECHART_H
-#include <QObject>
+#include <QDeclarativeItem>
+
+class PieSlice;
//![0]
-class Musician : public QObject
+class PieChart : public QDeclarativeItem
{
-//![0]
Q_OBJECT
+ Q_PROPERTY(QDeclarativeListProperty<PieSlice> slices READ slices)
+//![0]
Q_PROPERTY(QString name READ name WRITE setName)
- Q_PROPERTY(QString instrument READ instrument WRITE setInstrument)
//![1]
public:
//![1]
-
- Musician(QObject *parent = 0);
+ PieChart(QDeclarativeItem *parent = 0);
QString name() const;
void setName(const QString &name);
- QString instrument() const;
- void setInstrument(const QString &instrument);
-
-//![2]
- Q_INVOKABLE void perform();
-
-signals:
- void performanceEnded();
//![2]
+ QDeclarativeListProperty<PieSlice> slices();
private:
- QString m_name;
- QString m_instrument;
+ static void append_slice(QDeclarativeListProperty<PieSlice> *list, PieSlice *slice);
-//![3]
+ QString m_name;
+ QList<PieSlice *> m_slices;
};
-//![3]
+//![2]
#endif
diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.cpp b/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.cpp
new file mode 100644
index 0000000000..65120f53e3
--- /dev/null
+++ b/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+#include "pieslice.h"
+
+#include <QPainter>
+
+PieSlice::PieSlice(QDeclarativeItem *parent)
+ : QDeclarativeItem(parent)
+{
+ // need to disable this flag to draw inside a QDeclarativeItem
+ setFlag(QGraphicsItem::ItemHasNoContents, false);
+}
+
+QColor PieSlice::color() const
+{
+ return m_color;
+}
+
+void PieSlice::setColor(const QColor &color)
+{
+ m_color = color;
+}
+
+int PieSlice::fromAngle() const
+{
+ return m_fromAngle;
+}
+
+void PieSlice::setFromAngle(int angle)
+{
+ m_fromAngle = angle;
+}
+
+int PieSlice::angleSpan() const
+{
+ return m_angleSpan;
+}
+
+void PieSlice::setAngleSpan(int angle)
+{
+ m_angleSpan = angle;
+}
+
+void PieSlice::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+{
+ QPen pen(m_color, 2);
+ painter->setPen(pen);
+ painter->setRenderHints(QPainter::Antialiasing, true);
+ painter->drawPie(boundingRect(), m_fromAngle * 16, m_angleSpan * 16);
+}
+
diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.h b/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.h
new file mode 100644
index 0000000000..7cd0c7474d
--- /dev/null
+++ b/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+#ifndef PIESLICE_H
+#define PIESLICE_H
+
+#include <QDeclarativeItem>
+#include <QColor>
+
+//![0]
+class PieSlice : public QDeclarativeItem
+{
+ Q_OBJECT
+ Q_PROPERTY(QColor color READ color WRITE setColor)
+ Q_PROPERTY(int fromAngle READ fromAngle WRITE setFromAngle)
+ Q_PROPERTY(int angleSpan READ angleSpan WRITE setAngleSpan)
+//![0]
+
+public:
+ PieSlice(QDeclarativeItem *parent = 0);
+
+ QColor color() const;
+ void setColor(const QColor &color);
+
+ int fromAngle() const;
+ void setFromAngle(int angle);
+
+ int angleSpan() const;
+ void setAngleSpan(int span);
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+
+private:
+ QColor m_color;
+ int m_fromAngle;
+ int m_angleSpan;
+};
+
+#endif
+
diff --git a/examples/declarative/tutorials/extending/chapter5-plugins/musician.cpp b/examples/declarative/tutorials/extending/chapter5-plugins/musician.cpp
deleted file mode 100644
index e62efb197d..0000000000
--- a/examples/declarative/tutorials/extending/chapter5-plugins/musician.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation 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$
-**
-****************************************************************************/
-#include "musician.h"
-#include "instrument.h"
-
-Musician::Musician(QObject *parent)
- : QObject(parent)
-{
-}
-
-QString Musician::name() const
-{
- return m_name;
-}
-
-void Musician::setName(const QString &name)
-{
- m_name = name;
-}
-
-Instrument *Musician::instrument() const
-{
- return m_instrument;
-}
-
-void Musician::setInstrument(Instrument *instrument)
-{
- m_instrument = instrument;
-}
-
diff --git a/examples/declarative/tutorials/extending/chapter5-plugins/qmldir b/examples/declarative/tutorials/extending/chapter5-plugins/qmldir
deleted file mode 100644
index c3afd6b054..0000000000
--- a/examples/declarative/tutorials/extending/chapter5-plugins/qmldir
+++ /dev/null
@@ -1 +0,0 @@
-plugin chapter5-plugins lib
diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/app.qml b/examples/declarative/tutorials/extending/chapter6-plugins/app.qml
new file mode 100644
index 0000000000..38ceefa356
--- /dev/null
+++ b/examples/declarative/tutorials/extending/chapter6-plugins/app.qml
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** 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 {
+ width: 300; height: 200
+
+ PieChart {
+ anchors.centerIn: parent
+ width: 100; height: 100
+
+ slices: [
+ PieSlice {
+ anchors.fill: parent
+ color: "red"
+ fromAngle: 0; angleSpan: 110
+ },
+ PieSlice {
+ anchors.fill: parent
+ color: "black"
+ fromAngle: 110; angleSpan: 50
+ },
+ PieSlice {
+ anchors.fill: parent
+ color: "blue"
+ fromAngle: 160; angleSpan: 100
+ }
+ ]
+ }
+}
+
diff --git a/examples/declarative/tutorials/extending/chapter5-plugins/chapter5-plugins.pro b/examples/declarative/tutorials/extending/chapter6-plugins/chapter6-plugins.pro
index 483da8fc9a..1ffbf29925 100644
--- a/examples/declarative/tutorials/extending/chapter5-plugins/chapter5-plugins.pro
+++ b/examples/declarative/tutorials/extending/chapter6-plugins/chapter6-plugins.pro
@@ -6,13 +6,13 @@ DESTDIR = lib
OBJECTS_DIR = tmp
MOC_DIR = tmp
-HEADERS += musician.h \
- instrument.h \
- musicplugin.h
+HEADERS += piechart.h \
+ pieslice.h \
+ chartsplugin.h
-SOURCES += musician.cpp \
- instrument.cpp \
- musicplugin.cpp
+SOURCES += piechart.cpp \
+ pieslice.cpp \
+ chartsplugin.cpp
symbian {
include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/instrument.h b/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.cpp
index 9971207f0f..c4d8b61b40 100644
--- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/instrument.h
+++ b/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.cpp
@@ -37,27 +37,18 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef INSTRUMENT_H
-#define INSTRUMENT_H
-
-#include <QObject>
-
+#include "chartsplugin.h"
//![0]
-class Instrument : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString type READ type WRITE setType)
+#include "piechart.h"
+#include "pieslice.h"
+#include <qdeclarative.h>
-public:
- Instrument(QObject *parent = 0);
-
- QString type() const;
- void setType(const QString &type);
+void ChartsPlugin::registerTypes(const char *uri)
+{
+ qmlRegisterType<PieChart>(uri, 1, 0, "PieChart");
+ qmlRegisterType<PieSlice>(uri, 1, 0, "PieSlice");
+}
-private:
- QString m_type;
-};
+Q_EXPORT_PLUGIN2(chartsplugin, ChartsPlugin);
//![0]
-#endif
-
diff --git a/examples/declarative/tutorials/extending/chapter5-plugins/musicplugin.h b/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.h
index d6a5392431..c055e8b795 100644
--- a/examples/declarative/tutorials/extending/chapter5-plugins/musicplugin.h
+++ b/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.h
@@ -37,13 +37,13 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef MUSICPLUGIN_H
-#define MUSICPLUGIN_H
+#ifndef CHARTSPLUGIN_H
+#define CHARTSPLUGIN_H
//![0]
-#include <QtDeclarative/QDeclarativeExtensionPlugin>
+#include <QDeclarativeExtensionPlugin>
-class MusicPlugin : public QDeclarativeExtensionPlugin
+class ChartsPlugin : public QDeclarativeExtensionPlugin
{
Q_OBJECT
public:
diff --git a/examples/declarative/tutorials/extending/chapter1-basics/musician.cpp b/examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp
index 6c42f310b9..4e6ee5c698 100644
--- a/examples/declarative/tutorials/extending/chapter1-basics/musician.cpp
+++ b/examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp
@@ -37,30 +37,35 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "musician.h"
+#include "piechart.h"
+#include "pieslice.h"
-Musician::Musician(QObject *parent)
- : QObject(parent)
+PieChart::PieChart(QDeclarativeItem *parent)
+ : QDeclarativeItem(parent)
{
}
-QString Musician::name() const
+QString PieChart::name() const
{
return m_name;
}
-void Musician::setName(const QString &name)
+void PieChart::setName(const QString &name)
{
m_name = name;
}
-QString Musician::instrument() const
+QDeclarativeListProperty<PieSlice> PieChart::slices()
{
- return m_instrument;
+ return QDeclarativeListProperty<PieSlice>(this, 0, &PieChart::append_slice);
}
-void Musician::setInstrument(const QString &instrument)
+void PieChart::append_slice(QDeclarativeListProperty<PieSlice> *list, PieSlice *slice)
{
- m_instrument = instrument;
+ PieChart *chart = qobject_cast<PieChart *>(list->object);
+ if (chart) {
+ slice->setParentItem(chart);
+ chart->m_slices.append(slice);
+ }
}
diff --git a/examples/declarative/tutorials/extending/chapter5-plugins/musician.h b/examples/declarative/tutorials/extending/chapter6-plugins/piechart.h
index b92063131c..d6e443993a 100644
--- a/examples/declarative/tutorials/extending/chapter5-plugins/musician.h
+++ b/examples/declarative/tutorials/extending/chapter6-plugins/piechart.h
@@ -37,31 +37,32 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef MUSICIAN_H
-#define MUSICIAN_H
+#ifndef PIECHART_H
+#define PIECHART_H
-#include <QObject>
+#include <QDeclarativeItem>
-class Instrument;
+class PieSlice;
-class Musician : public QObject
+class PieChart : public QDeclarativeItem
{
Q_OBJECT
+ Q_PROPERTY(QDeclarativeListProperty<PieSlice> slices READ slices)
Q_PROPERTY(QString name READ name WRITE setName)
- Q_PROPERTY(Instrument* instrument READ instrument WRITE setInstrument)
public:
- Musician(QObject *parent = 0);
+ PieChart(QDeclarativeItem *parent = 0);
QString name() const;
void setName(const QString &name);
- Instrument *instrument() const;
- void setInstrument(Instrument *instrument);
+ QDeclarativeListProperty<PieSlice> slices();
private:
+ static void append_slice(QDeclarativeListProperty<PieSlice> *list, PieSlice *slice);
+
QString m_name;
- Instrument *m_instrument;
+ QList<PieSlice *> m_slices;
};
#endif
diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.cpp b/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.cpp
new file mode 100644
index 0000000000..65120f53e3
--- /dev/null
+++ b/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+#include "pieslice.h"
+
+#include <QPainter>
+
+PieSlice::PieSlice(QDeclarativeItem *parent)
+ : QDeclarativeItem(parent)
+{
+ // need to disable this flag to draw inside a QDeclarativeItem
+ setFlag(QGraphicsItem::ItemHasNoContents, false);
+}
+
+QColor PieSlice::color() const
+{
+ return m_color;
+}
+
+void PieSlice::setColor(const QColor &color)
+{
+ m_color = color;
+}
+
+int PieSlice::fromAngle() const
+{
+ return m_fromAngle;
+}
+
+void PieSlice::setFromAngle(int angle)
+{
+ m_fromAngle = angle;
+}
+
+int PieSlice::angleSpan() const
+{
+ return m_angleSpan;
+}
+
+void PieSlice::setAngleSpan(int angle)
+{
+ m_angleSpan = angle;
+}
+
+void PieSlice::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+{
+ QPen pen(m_color, 2);
+ painter->setPen(pen);
+ painter->setRenderHints(QPainter::Antialiasing, true);
+ painter->drawPie(boundingRect(), m_fromAngle * 16, m_angleSpan * 16);
+}
+
diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.h b/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.h
new file mode 100644
index 0000000000..a3afd25d60
--- /dev/null
+++ b/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+#ifndef PIESLICE_H
+#define PIESLICE_H
+
+#include <QDeclarativeItem>
+#include <QColor>
+
+class PieSlice : public QDeclarativeItem
+{
+ Q_OBJECT
+ Q_PROPERTY(QColor color READ color WRITE setColor)
+ Q_PROPERTY(int fromAngle READ fromAngle WRITE setFromAngle)
+ Q_PROPERTY(int angleSpan READ angleSpan WRITE setAngleSpan)
+
+public:
+ PieSlice(QDeclarativeItem *parent = 0);
+
+ QColor color() const;
+ void setColor(const QColor &color);
+
+ int fromAngle() const;
+ void setFromAngle(int angle);
+
+ int angleSpan() const;
+ void setAngleSpan(int span);
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+
+private:
+ QColor m_color;
+ int m_fromAngle;
+ int m_angleSpan;
+};
+
+#endif
+
diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/qmldir b/examples/declarative/tutorials/extending/chapter6-plugins/qmldir
new file mode 100644
index 0000000000..a83bf85ddb
--- /dev/null
+++ b/examples/declarative/tutorials/extending/chapter6-plugins/qmldir
@@ -0,0 +1 @@
+plugin chapter6-plugins lib
diff --git a/examples/declarative/tutorials/extending/extending.pro b/examples/declarative/tutorials/extending/extending.pro
index 0c86fed2d1..967473fda0 100644
--- a/examples/declarative/tutorials/extending/extending.pro
+++ b/examples/declarative/tutorials/extending/extending.pro
@@ -5,5 +5,6 @@ SUBDIRS += \
chapter2-methods \
chapter3-bindings \
chapter4-customPropertyTypes \
- chapter5-plugins
+ chapter5-listproperties \
+ chapter6-plugins
diff --git a/examples/examples.pro b/examples/examples.pro
index 9a83216c04..1fdd774e71 100644
--- a/examples/examples.pro
+++ b/examples/examples.pro
@@ -26,7 +26,7 @@ SUBDIRS = \
tutorials \
widgets \
uitools \
- multitouch \
+ touch \
gestures
}
diff --git a/examples/itemviews/addressbook/addresswidget.cpp b/examples/itemviews/addressbook/addresswidget.cpp
index e226643452..22dfae338a 100644
--- a/examples/itemviews/addressbook/addresswidget.cpp
+++ b/examples/itemviews/addressbook/addresswidget.cpp
@@ -230,7 +230,7 @@ void AddressWidget::writeToFile(QString fileName)
return;
}
- QList< QPair<QString, QString> > pairs = table->getList();
+ QList< QPair<QString, QString> > pairs = table->getList();
QDataStream out(&file);
out << pairs;
}
diff --git a/examples/itemviews/addressbook/tablemodel.cpp b/examples/itemviews/addressbook/tablemodel.cpp
index 603c926bb9..e9a08f04a0 100644
--- a/examples/itemviews/addressbook/tablemodel.cpp
+++ b/examples/itemviews/addressbook/tablemodel.cpp
@@ -72,13 +72,13 @@ QVariant TableModel::data(const QModelIndex &index, int role) const
{
if (!index.isValid())
return QVariant();
-
+
if (index.row() >= listOfPairs.size() || index.row() < 0)
return QVariant();
-
+
if (role == Qt::DisplayRole) {
QPair<QString, QString> pair = listOfPairs.at(index.row());
-
+
if (index.column() == 0)
return pair.first;
else if (index.column() == 1)
@@ -93,15 +93,15 @@ QVariant TableModel::headerData(int section, Qt::Orientation orientation, int ro
{
if (role != Qt::DisplayRole)
return QVariant();
-
+
if (orientation == Qt::Horizontal) {
switch (section) {
case 0:
return tr("Name");
-
+
case 1:
return tr("Address");
-
+
default:
return QVariant();
}
@@ -115,7 +115,7 @@ bool TableModel::insertRows(int position, int rows, const QModelIndex &index)
{
Q_UNUSED(index);
beginInsertRows(QModelIndex(), position, position+rows-1);
-
+
for (int row=0; row < rows; row++) {
QPair<QString, QString> pair(" ", " ");
listOfPairs.insert(position, pair);
@@ -129,9 +129,9 @@ bool TableModel::insertRows(int position, int rows, const QModelIndex &index)
//! [5]
bool TableModel::removeRows(int position, int rows, const QModelIndex &index)
{
- Q_UNUSED(index);
+ Q_UNUSED(index);
beginRemoveRows(QModelIndex(), position, position+rows-1);
-
+
for (int row=0; row < rows; ++row) {
listOfPairs.removeAt(position);
}
@@ -144,25 +144,25 @@ bool TableModel::removeRows(int position, int rows, const QModelIndex &index)
//! [6]
bool TableModel::setData(const QModelIndex &index, const QVariant &value, int role)
{
- if (index.isValid() && role == Qt::EditRole) {
- int row = index.row();
-
- QPair<QString, QString> p = listOfPairs.value(row);
-
- if (index.column() == 0)
- p.first = value.toString();
- else if (index.column() == 1)
- p.second = value.toString();
+ if (index.isValid() && role == Qt::EditRole) {
+ int row = index.row();
+
+ QPair<QString, QString> p = listOfPairs.value(row);
+
+ if (index.column() == 0)
+ p.first = value.toString();
+ else if (index.column() == 1)
+ p.second = value.toString();
else
return false;
-
+
listOfPairs.replace(row, p);
- emit(dataChanged(index, index));
-
+ emit(dataChanged(index, index));
+
return true;
- }
+ }
- return false;
+ return false;
}
//! [6]
@@ -171,7 +171,7 @@ Qt::ItemFlags TableModel::flags(const QModelIndex &index) const
{
if (!index.isValid())
return Qt::ItemIsEnabled;
-
+
return QAbstractTableModel::flags(index) | Qt::ItemIsEditable;
}
//! [7]
diff --git a/examples/multitouch/dials/dials.pro b/examples/multitouch/dials/dials.pro
deleted file mode 100644
index e592232787..0000000000
--- a/examples/multitouch/dials/dials.pro
+++ /dev/null
@@ -1,2 +0,0 @@
-SOURCES += main.cpp
-FORMS += dials.ui
diff --git a/examples/multitouch/knobs/knobs.pro b/examples/multitouch/knobs/knobs.pro
deleted file mode 100644
index 90f0ba593e..0000000000
--- a/examples/multitouch/knobs/knobs.pro
+++ /dev/null
@@ -1,2 +0,0 @@
-HEADERS = knob.h
-SOURCES = main.cpp knob.cpp
diff --git a/examples/network/bearercloud/cloud.cpp b/examples/network/bearercloud/cloud.cpp
index 2856c71dd5..980efbf527 100644
--- a/examples/network/bearercloud/cloud.cpp
+++ b/examples/network/bearercloud/cloud.cpp
@@ -245,6 +245,8 @@ void Cloud::stateChanged(QNetworkSession::State state)
else
finalOpacity = 1.0;
+#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6) && \
+ !defined(Q_OS_SYMBIAN) && !defined(Q_OS_WINCE)
QString tooltip;
if (configuration.name().isEmpty())
@@ -302,6 +304,9 @@ void Cloud::stateChanged(QNetworkSession::State state)
tooltip += tr("<br>Sent data: %1 bytes").arg(session->bytesWritten());
setToolTip(tooltip);
+#else
+ Q_UNUSED(state);
+#endif
}
//! [2]
diff --git a/examples/network/bearermonitor/bearermonitor.cpp b/examples/network/bearermonitor/bearermonitor.cpp
index 98869ea0f8..1959919a98 100644
--- a/examples/network/bearermonitor/bearermonitor.cpp
+++ b/examples/network/bearermonitor/bearermonitor.cpp
@@ -180,10 +180,8 @@ void BearerMonitor::configurationChanged(const QNetworkConfiguration &config)
void BearerMonitor::updateSnapConfiguration(QTreeWidgetItem *parent, const QNetworkConfiguration &snap)
{
QMap<QString, QTreeWidgetItem *> itemMap;
- for (int i = 0; i < parent->childCount(); ++i) {
- QTreeWidgetItem *item = parent->child(i);
+ foreach (QTreeWidgetItem *item, parent->takeChildren())
itemMap.insert(item->data(0, Qt::UserRole).toString(), item);
- }
QList<QNetworkConfiguration> allConfigurations = snap.children();
@@ -194,6 +192,8 @@ void BearerMonitor::updateSnapConfiguration(QTreeWidgetItem *parent, const QNetw
if (item) {
updateItem(item, config);
+ parent->addChild(item);
+
if (config.type() == QNetworkConfiguration::ServiceNetwork)
updateSnapConfiguration(item, config);
} else {
@@ -201,10 +201,7 @@ void BearerMonitor::updateSnapConfiguration(QTreeWidgetItem *parent, const QNetw
}
}
- foreach (const QString &id, itemMap.keys())
- delete itemMap.value(id);
-
- itemMap.clear();
+ qDeleteAll(itemMap);
}
void BearerMonitor::updateConfigurations()
@@ -239,8 +236,7 @@ void BearerMonitor::updateConfigurations()
}
}
- foreach (const QString &id, itemMap.keys())
- delete itemMap.value(id);
+ qDeleteAll(itemMap);
}
void BearerMonitor::onlineStateChanged(bool isOnline)
diff --git a/examples/network/bearermonitor/sessionwidget.h b/examples/network/bearermonitor/sessionwidget.h
index 5b5827bc7c..c92db4417c 100644
--- a/examples/network/bearermonitor/sessionwidget.h
+++ b/examples/network/bearermonitor/sessionwidget.h
@@ -41,12 +41,12 @@
#ifndef SESSIONWIDGET_H
#define SESSIONWIDGET_H
+#include <qnetworksession.h>
#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
#include "ui_sessionwidget_maemo.h"
#else
#include "ui_sessionwidget.h"
#endif
-#include <qnetworksession.h>
QT_USE_NAMESPACE
diff --git a/examples/network/bearermonitor/sessionwidget_maemo.ui b/examples/network/bearermonitor/sessionwidget_maemo.ui
index ca682463e7..8867509d01 100644
--- a/examples/network/bearermonitor/sessionwidget_maemo.ui
+++ b/examples/network/bearermonitor/sessionwidget_maemo.ui
@@ -214,6 +214,54 @@
</item>
</layout>
</item>
+ <item>
+ <layout class="QHBoxLayout" name="errorStringLayout_2">
+ <item>
+ <widget class="QLabel" name="rxData">
+ <property name="text">
+ <string>0</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="txData">
+ <property name="text">
+ <string>0</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="errorStringLayout_3">
+ <item>
+ <widget class="QLabel" name="errorStringLabel_2">
+ <property name="text">
+ <string>Active Time:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="activeTime">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>0 seconds</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
</layout>
</item>
<item>
diff --git a/examples/network/download/main.cpp b/examples/network/download/main.cpp
index c322a448b9..0fb913746e 100644
--- a/examples/network/download/main.cpp
+++ b/examples/network/download/main.cpp
@@ -150,7 +150,7 @@ void DownloadManager::downloadFinished(QNetworkReply *reply)
} else {
QString filename = saveFileName(url);
if (saveToDisk(filename, reply))
- printf("Download of %s succeded (saved to %s)\n",
+ printf("Download of %s succeeded (saved to %s)\n",
url.toEncoded().constData(), qPrintable(filename));
}
diff --git a/examples/network/fortuneclient/client.cpp b/examples/network/fortuneclient/client.cpp
index b9a85c4f7e..fe35906b64 100644
--- a/examples/network/fortuneclient/client.cpp
+++ b/examples/network/fortuneclient/client.cpp
@@ -43,13 +43,9 @@
#include "client.h"
-#ifdef Q_OS_SYMBIAN
-#include "sym_iap_util.h"
-#endif
-
//! [0]
Client::Client(QWidget *parent)
- : QDialog(parent)
+: QDialog(parent), networkSession(0)
{
//! [0]
hostLabel = new QLabel(tr("&Server name:"));
@@ -121,9 +117,28 @@ Client::Client(QWidget *parent)
setWindowTitle(tr("Fortune Client"));
portLineEdit->setFocus();
-#ifdef Q_OS_SYMBIAN
- isDefaultIapSet = false;
-#endif
+ QNetworkConfigurationManager manager;
+ if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) {
+ // Get saved network configuration
+ QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ settings.beginGroup(QLatin1String("QtNetwork"));
+ const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString();
+ settings.endGroup();
+
+ // If the saved network configuration is not currently discovered use the system default
+ QNetworkConfiguration config = manager.configurationFromIdentifier(id);
+ if ((config.state() & QNetworkConfiguration::Discovered) !=
+ QNetworkConfiguration::Discovered) {
+ config = manager.defaultConfiguration();
+ }
+
+ networkSession = new QNetworkSession(config, this);
+ connect(networkSession, SIGNAL(opened()), this, SLOT(sessionOpened()));
+
+ getFortuneButton->setEnabled(false);
+ statusLabel->setText(tr("Opening network session."));
+ networkSession->open();
+ }
//! [5]
}
//! [5]
@@ -132,12 +147,6 @@ Client::Client(QWidget *parent)
void Client::requestNewFortune()
{
getFortuneButton->setEnabled(false);
-#ifdef Q_OS_SYMBIAN
- if(!isDefaultIapSet) {
- qt_SetDefaultIap();
- isDefaultIapSet = true;
- }
-#endif
blockSize = 0;
tcpSocket->abort();
//! [7]
@@ -214,6 +223,30 @@ void Client::displayError(QAbstractSocket::SocketError socketError)
void Client::enableGetFortuneButton()
{
- getFortuneButton->setEnabled(!hostLineEdit->text().isEmpty()
- && !portLineEdit->text().isEmpty());
+ getFortuneButton->setEnabled((!networkSession || networkSession->isOpen()) &&
+ !hostLineEdit->text().isEmpty() &&
+ !portLineEdit->text().isEmpty());
+
}
+
+void Client::sessionOpened()
+{
+ // Save the used configuration
+ QNetworkConfiguration config = networkSession->configuration();
+ QString id;
+ if (config.type() == QNetworkConfiguration::UserChoice)
+ id = networkSession->sessionProperty(QLatin1String("UserChoiceConfiguration")).toString();
+ else
+ id = config.identifier();
+
+ QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ settings.beginGroup(QLatin1String("QtNetwork"));
+ settings.setValue(QLatin1String("DefaultNetworkConfiguration"), id);
+ settings.endGroup();
+
+ statusLabel->setText(tr("This examples requires that you run the "
+ "Fortune Server example as well."));
+
+ enableGetFortuneButton();
+}
+
diff --git a/examples/network/fortuneclient/client.h b/examples/network/fortuneclient/client.h
index 50a9037577..d0c0718b20 100644
--- a/examples/network/fortuneclient/client.h
+++ b/examples/network/fortuneclient/client.h
@@ -50,6 +50,7 @@ class QLabel;
class QLineEdit;
class QPushButton;
class QTcpSocket;
+class QNetworkSession;
QT_END_NAMESPACE
//! [0]
@@ -65,6 +66,7 @@ private slots:
void readFortune();
void displayError(QAbstractSocket::SocketError socketError);
void enableGetFortuneButton();
+ void sessionOpened();
private:
QLabel *hostLabel;
@@ -79,9 +81,8 @@ private:
QTcpSocket *tcpSocket;
QString currentFortune;
quint16 blockSize;
-#ifdef Q_OS_SYMBIAN
- bool isDefaultIapSet;
-#endif
+
+ QNetworkSession *networkSession;
};
//! [0]
diff --git a/examples/network/fortuneclient/fortuneclient.pro b/examples/network/fortuneclient/fortuneclient.pro
index edbf14d0c6..f79679d6ac 100644
--- a/examples/network/fortuneclient/fortuneclient.pro
+++ b/examples/network/fortuneclient/fortuneclient.pro
@@ -11,8 +11,6 @@ INSTALLS += target sources
symbian {
include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
- INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
- LIBS += -lesock -lcommdb -linsock # For IAP selection
TARGET.CAPABILITY = "NetworkServices ReadUserData WriteUserData"
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
}
diff --git a/examples/network/fortuneserver/fortuneserver.pro b/examples/network/fortuneserver/fortuneserver.pro
index 474ec114aa..e13f309730 100644
--- a/examples/network/fortuneserver/fortuneserver.pro
+++ b/examples/network/fortuneserver/fortuneserver.pro
@@ -12,8 +12,6 @@ INSTALLS += target sources
symbian {
TARGET.UID3 = 0xA000CF71
include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
- INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
- LIBS += -lesock -lcommdb -linsock # For IAP selection
TARGET.CAPABILITY = "NetworkServices ReadUserData"
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
}
diff --git a/examples/network/fortuneserver/main.cpp b/examples/network/fortuneserver/main.cpp
index 29fe777f44..53149c0aea 100644
--- a/examples/network/fortuneserver/main.cpp
+++ b/examples/network/fortuneserver/main.cpp
@@ -45,15 +45,8 @@
#include "server.h"
-#ifdef Q_OS_SYMBIAN
-#include "sym_iap_util.h"
-#endif
-
int main(int argc, char *argv[])
{
-#ifdef Q_OS_SYMBIAN
- qt_SetDefaultIap();
-#endif
QApplication app(argc, argv);
Server server;
#ifdef Q_OS_SYMBIAN
diff --git a/examples/network/fortuneserver/server.cpp b/examples/network/fortuneserver/server.cpp
index 98234e0506..4dca38cbf5 100644
--- a/examples/network/fortuneserver/server.cpp
+++ b/examples/network/fortuneserver/server.cpp
@@ -46,12 +46,81 @@
#include "server.h"
Server::Server(QWidget *parent)
- : QDialog(parent)
+: QDialog(parent), tcpServer(0), networkSession(0)
{
statusLabel = new QLabel;
quitButton = new QPushButton(tr("Quit"));
quitButton->setAutoDefault(false);
+ QNetworkConfigurationManager manager;
+ if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) {
+ // Get saved network configuration
+ QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ settings.beginGroup(QLatin1String("QtNetwork"));
+ const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString();
+ settings.endGroup();
+
+ // If the saved network configuration is not currently discovered use the system default
+ QNetworkConfiguration config = manager.configurationFromIdentifier(id);
+ if ((config.state() & QNetworkConfiguration::Discovered) !=
+ QNetworkConfiguration::Discovered) {
+ config = manager.defaultConfiguration();
+ }
+
+ networkSession = new QNetworkSession(config, this);
+ connect(networkSession, SIGNAL(opened()), this, SLOT(sessionOpened()));
+
+ statusLabel->setText(tr("Opening network session."));
+ networkSession->open();
+ } else {
+ sessionOpened();
+ }
+
+ //! [2]
+ fortunes << tr("You've been leading a dog's life. Stay off the furniture.")
+ << tr("You've got to think about tomorrow.")
+ << tr("You will be surprised by a loud noise.")
+ << tr("You will feel hungry again in another hour.")
+ << tr("You might have mail.")
+ << tr("You cannot kill time without injuring eternity.")
+ << tr("Computers are not intelligent. They only think they are.");
+ //! [2]
+
+ connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
+ //! [3]
+ connect(tcpServer, SIGNAL(newConnection()), this, SLOT(sendFortune()));
+ //! [3]
+
+ QHBoxLayout *buttonLayout = new QHBoxLayout;
+ buttonLayout->addStretch(1);
+ buttonLayout->addWidget(quitButton);
+ buttonLayout->addStretch(1);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(statusLabel);
+ mainLayout->addLayout(buttonLayout);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Fortune Server"));
+}
+
+void Server::sessionOpened()
+{
+ // Save the used configuration
+ if (networkSession) {
+ QNetworkConfiguration config = networkSession->configuration();
+ QString id;
+ if (config.type() == QNetworkConfiguration::UserChoice)
+ id = networkSession->sessionProperty(QLatin1String("UserChoiceConfiguration")).toString();
+ else
+ id = config.identifier();
+
+ QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ settings.beginGroup(QLatin1String("QtNetwork"));
+ settings.setValue(QLatin1String("DefaultNetworkConfiguration"), id);
+ settings.endGroup();
+ }
+
//! [0] //! [1]
tcpServer = new QTcpServer(this);
if (!tcpServer->listen()) {
@@ -79,33 +148,6 @@ Server::Server(QWidget *parent)
"Run the Fortune Client example now.")
.arg(ipAddress).arg(tcpServer->serverPort()));
//! [1]
-
-//! [2]
- fortunes << tr("You've been leading a dog's life. Stay off the furniture.")
- << tr("You've got to think about tomorrow.")
- << tr("You will be surprised by a loud noise.")
- << tr("You will feel hungry again in another hour.")
- << tr("You might have mail.")
- << tr("You cannot kill time without injuring eternity.")
- << tr("Computers are not intelligent. They only think they are.");
-//! [2]
-
- connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
-//! [3]
- connect(tcpServer, SIGNAL(newConnection()), this, SLOT(sendFortune()));
-//! [3]
-
- QHBoxLayout *buttonLayout = new QHBoxLayout;
- buttonLayout->addStretch(1);
- buttonLayout->addWidget(quitButton);
- buttonLayout->addStretch(1);
-
- QVBoxLayout *mainLayout = new QVBoxLayout;
- mainLayout->addWidget(statusLabel);
- mainLayout->addLayout(buttonLayout);
- setLayout(mainLayout);
-
- setWindowTitle(tr("Fortune Server"));
}
//! [4]
diff --git a/examples/network/fortuneserver/server.h b/examples/network/fortuneserver/server.h
index 2d8d116062..9d9ef62c90 100644
--- a/examples/network/fortuneserver/server.h
+++ b/examples/network/fortuneserver/server.h
@@ -47,6 +47,7 @@ QT_BEGIN_NAMESPACE
class QLabel;
class QPushButton;
class QTcpServer;
+class QNetworkSession;
QT_END_NAMESPACE
//! [0]
@@ -58,6 +59,7 @@ public:
Server(QWidget *parent = 0);
private slots:
+ void sessionOpened();
void sendFortune();
private:
@@ -65,6 +67,7 @@ private:
QPushButton *quitButton;
QTcpServer *tcpServer;
QStringList fortunes;
+ QNetworkSession *networkSession;
};
//! [0]
diff --git a/examples/network/http/httpwindow.cpp b/examples/network/http/httpwindow.cpp
index b1ea98ca7d..ea485463a3 100644
--- a/examples/network/http/httpwindow.cpp
+++ b/examples/network/http/httpwindow.cpp
@@ -206,7 +206,7 @@ void HttpWindow::httpFinished()
void HttpWindow::httpReadyRead()
{
- // this slot gets called everytime the QNetworkReply has new data.
+ // this slot gets called every time the QNetworkReply has new data.
// We read all of its new data and write it into the file.
// That way we use less RAM than when reading it at the finished()
// signal of the QNetworkReply
diff --git a/examples/network/network-chat/chatdialog.cpp b/examples/network/network-chat/chatdialog.cpp
index 14fabaa181..2bab535ccf 100644
--- a/examples/network/network-chat/chatdialog.cpp
+++ b/examples/network/network-chat/chatdialog.cpp
@@ -53,9 +53,6 @@ ChatDialog::ChatDialog(QWidget *parent)
listWidget->setFocusPolicy(Qt::NoFocus);
connect(lineEdit, SIGNAL(returnPressed()), this, SLOT(returnPressed()));
-#ifdef Q_OS_SYMBIAN
- connect(sendButton, SIGNAL(clicked()), this, SLOT(returnPressed()));
-#endif
connect(lineEdit, SIGNAL(returnPressed()), this, SLOT(returnPressed()));
connect(&client, SIGNAL(newMessage(QString,QString)),
this, SLOT(appendMessage(QString,QString)));
diff --git a/examples/network/network-chat/main.cpp b/examples/network/network-chat/main.cpp
index 7226217db2..e3db74bfb2 100644
--- a/examples/network/network-chat/main.cpp
+++ b/examples/network/network-chat/main.cpp
@@ -41,16 +41,52 @@
#include <QApplication>
#include "chatdialog.h"
-#ifdef Q_OS_SYMBIAN
-#include "sym_iap_util.h"
-#endif
+
+#include <QtCore/QSettings>
+#include <QtNetwork/QNetworkConfigurationManager>
+#include <QtNetwork/QNetworkSession>
int main(int argc, char *argv[])
{
-#ifdef Q_OS_SYMBIAN
- qt_SetDefaultIap();
-#endif
QApplication app(argc, argv);
+
+ QNetworkConfigurationManager manager;
+ if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) {
+ // Get saved network configuration
+ QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ settings.beginGroup(QLatin1String("QtNetwork"));
+ const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString();
+ settings.endGroup();
+
+ // If the saved network configuration is not currently discovered use the system default
+ QNetworkConfiguration config = manager.configurationFromIdentifier(id);
+ if ((config.state() & QNetworkConfiguration::Discovered) !=
+ QNetworkConfiguration::Discovered) {
+ config = manager.defaultConfiguration();
+ }
+
+ QNetworkSession *networkSession = new QNetworkSession(config, &app);
+ networkSession->open();
+ networkSession->waitForOpened();
+
+ if (networkSession->isOpen()) {
+ // Save the used configuration
+ QNetworkConfiguration config = networkSession->configuration();
+ QString id;
+ if (config.type() == QNetworkConfiguration::UserChoice) {
+ id = networkSession->sessionProperty(
+ QLatin1String("UserChoiceConfiguration")).toString();
+ } else {
+ id = config.identifier();
+ }
+
+ QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ settings.beginGroup(QLatin1String("QtNetwork"));
+ settings.setValue(QLatin1String("DefaultNetworkConfiguration"), id);
+ settings.endGroup();
+ }
+ }
+
ChatDialog dialog;
#ifdef Q_OS_SYMBIAN
// Make application better looking and more usable on small screen
diff --git a/examples/network/network-chat/network-chat.pro b/examples/network/network-chat/network-chat.pro
index 1215aea942..b3d429ef5b 100644
--- a/examples/network/network-chat/network-chat.pro
+++ b/examples/network/network-chat/network-chat.pro
@@ -20,8 +20,6 @@ INSTALLS += target sources
symbian {
include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
- INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
- LIBS += -lesock -lcommdb -linsock # For IAP selection
LIBS += -lcharconv
TARGET.CAPABILITY = "NetworkServices ReadUserData WriteUserData"
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
diff --git a/examples/network/qftp/ftpwindow.cpp b/examples/network/qftp/ftpwindow.cpp
index 635b679cfe..f39f9a05fd 100644
--- a/examples/network/qftp/ftpwindow.cpp
+++ b/examples/network/qftp/ftpwindow.cpp
@@ -43,12 +43,8 @@
#include "ftpwindow.h"
-#ifdef Q_OS_SYMBIAN
-#include "sym_iap_util.h"
-#endif
-
FtpWindow::FtpWindow(QWidget *parent)
- : QDialog(parent), ftp(0)
+ : QDialog(parent), ftp(0), networkSession(0)
{
ftpServerLabel = new QLabel(tr("Ftp &server:"));
ftpServerLineEdit = new QLineEdit("ftp.qt.nokia.com");
@@ -118,9 +114,28 @@ FtpWindow::FtpWindow(QWidget *parent)
mainLayout->addWidget(buttonBox);
setLayout(mainLayout);
-#ifdef Q_OS_SYMBIAN
- bDefaultIapSet = false;
-#endif
+ QNetworkConfigurationManager manager;
+ if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) {
+ // Get saved network configuration
+ QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ settings.beginGroup(QLatin1String("QtNetwork"));
+ const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString();
+ settings.endGroup();
+
+ // If the saved network configuration is not currently discovered use the system default
+ QNetworkConfiguration config = manager.configurationFromIdentifier(id);
+ if ((config.state() & QNetworkConfiguration::Discovered) !=
+ QNetworkConfiguration::Discovered) {
+ config = manager.defaultConfiguration();
+ }
+
+ networkSession = new QNetworkSession(config, this);
+ connect(networkSession, SIGNAL(opened()), this, SLOT(enableConnectButton()));
+
+ connectButton->setEnabled(false);
+ statusLabel->setText(tr("Opening network session."));
+ networkSession->open();
+ }
setWindowTitle(tr("FTP"));
}
@@ -133,12 +148,6 @@ QSize FtpWindow::sizeHint() const
//![0]
void FtpWindow::connectOrDisconnect()
{
-#ifdef Q_OS_SYMBIAN
- if(!bDefaultIapSet) {
- qt_SetDefaultIap();
- bDefaultIapSet = true;
- }
-#endif
if (ftp) {
ftp->abort();
ftp->deleteLater();
@@ -377,3 +386,22 @@ void FtpWindow::enableDownloadButton()
}
//![14]
+void FtpWindow::enableConnectButton()
+{
+ // Save the used configuration
+ QNetworkConfiguration config = networkSession->configuration();
+ QString id;
+ if (config.type() == QNetworkConfiguration::UserChoice)
+ id = networkSession->sessionProperty(QLatin1String("UserChoiceConfiguration")).toString();
+ else
+ id = config.identifier();
+
+ QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ settings.beginGroup(QLatin1String("QtNetwork"));
+ settings.setValue(QLatin1String("DefaultNetworkConfiguration"), id);
+ settings.endGroup();
+
+ connectButton->setEnabled(networkSession->isOpen());
+ statusLabel->setText(tr("Please enter the name of an FTP server."));
+}
+
diff --git a/examples/network/qftp/ftpwindow.h b/examples/network/qftp/ftpwindow.h
index 25a7a56e01..9f39ccd84a 100644
--- a/examples/network/qftp/ftpwindow.h
+++ b/examples/network/qftp/ftpwindow.h
@@ -55,6 +55,7 @@ class QTreeWidgetItem;
class QProgressDialog;
class QPushButton;
class QUrlInfo;
+class QNetworkSession;
QT_END_NAMESPACE
class FtpWindow : public QDialog
@@ -78,6 +79,7 @@ private slots:
void updateDataTransferProgress(qint64 readBytes,
qint64 totalBytes);
void enableDownloadButton();
+ void enableConnectButton();
//![0]
private:
@@ -98,9 +100,7 @@ private:
QFtp *ftp;
QFile *file;
-#ifdef Q_OS_SYMBIAN
- bool bDefaultIapSet;
-#endif
+ QNetworkSession *networkSession;
//![1]
};
diff --git a/examples/network/qftp/qftp.pro b/examples/network/qftp/qftp.pro
index b3106c3a94..232e8ebd78 100644
--- a/examples/network/qftp/qftp.pro
+++ b/examples/network/qftp/qftp.pro
@@ -13,8 +13,6 @@ INSTALLS += target sources
symbian {
TARGET.UID3 = 0xA000A648
include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
- HEADERS += sym_iap_util.h
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
TARGET.CAPABILITY="NetworkServices ReadUserData WriteUserData"
- LIBS+=-lesock -lcommdb -linsock # For IAP selection
}
diff --git a/examples/network/qftp/sym_iap_util.h b/examples/network/qftp/sym_iap_util.h
deleted file mode 100644
index bea447c574..0000000000
--- a/examples/network/qftp/sym_iap_util.h
+++ /dev/null
@@ -1,519 +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 examples 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$
-**
-****************************************************************************/
-#ifndef QSYM_IAP_UTIL_H
-#define QSYM_IAP_UTIL_H
-
-// Symbian
-#include <utf.h>
-#include <es_sock.h>
-#include <in_sock.h>
-#include <es_enum.h>
-#include <in_iface.h>
-#include <commdbconnpref.h>
-#include <e32cmn.h>
-
-// OpenC
-#include <sys/socket.h>
-#include <net/if.h>
-
-//Qt
-#include <QSettings>
-#include <QStringList>
-//#include <QTextCodec>
-
-_LIT(KIapNameSetting, "IAP\\Name"); // text - mandatory
-_LIT(KIapTableIdField, "IAP\\Id");
-_LIT(KIapDialogPref, "IAP\\DialogPref"); // TUnit32 - optional
-_LIT(KIapService, "IAP\\IAPService"); // TUnit32 - mandatory
-_LIT(KIapServiceType, "IAP\\IAPServiceType"); // text - mandatory
-_LIT(KIapBearer, "IAP\\IAPBearer"); // TUint32 - optional
-_LIT(KIapBearerType, "IAP\\IAPBearerType"); // text - optional
-_LIT(KIapNetwork, "IAP\\IAPNetwork"); // TUint32 - optional
-
-const QLatin1String qtOrganizationTag("Trolltech");
-const QLatin1String qtNetworkModuleTag("QtNetwork");
-const QLatin1String iapGroupTag("IAP");
-const QLatin1String iapNamesArrayTag("Names");
-const QLatin1String iapNameItemTag("Name");
-
-static QTextCodec *utf16LETextCodec = 0;
-
-void clearIapNamesSettings(QSettings &settings) {
- settings.beginGroup(qtNetworkModuleTag);
- settings.beginGroup(iapGroupTag);
- settings.remove(iapNamesArrayTag);
- settings.endGroup();
- settings.endGroup();
-}
-
-void writeIapNamesSettings(QSettings &settings, const QStringList& iapNames) {
- clearIapNamesSettings(settings);
- settings.beginGroup(qtNetworkModuleTag);
- settings.beginGroup(iapGroupTag);
- settings.beginWriteArray(iapNamesArrayTag);
- for (int index = 0; index < iapNames.size(); ++index) {
- settings.setArrayIndex(index);
- settings.setValue(iapNameItemTag, iapNames.at(index));
- }
- settings.endArray();
- settings.endGroup();
- settings.endGroup();
-}
-
-void readIapNamesSettings(QSettings &settings, QStringList& iapNames) {
- settings.beginGroup(qtNetworkModuleTag);
- settings.beginGroup(iapGroupTag);
- int last = settings.beginReadArray(iapNamesArrayTag);
- for (int index = 0; index < last; ++index) {
- settings.setArrayIndex(index);
- iapNames.append(settings.value(iapNameItemTag).toString());
- }
- settings.endArray();
- settings.endGroup();
- settings.endGroup();
-}
-
-static QString qt_TNameToQString(TName data) {
- if(utf16LETextCodec == 0)
- utf16LETextCodec = QTextCodec::codecForName("UTF-16LE");
-
- QByteArray tmpByteArray = QByteArray::fromRawData((char*)(data.PtrZ()), data.Length() * 2);
- return utf16LETextCodec->toUnicode(tmpByteArray);
-}
-
-static QString qt_InterfaceInfoL()
-{
- QString output;
-
- TBuf8<512> buffer;
- TBuf<128> t;
- TAutoClose<RSocketServ> ss;
- User::LeaveIfError(ss.iObj.Connect());
- ss.PushL();
-
- TAutoClose<RSocket> sock;
- User::LeaveIfError(sock.iObj.Open(ss.iObj, _L("udp")));
- sock.PushL();
-
- User::LeaveIfError(sock.iObj.SetOpt(KSoInetEnumInterfaces, KSolInetIfCtrl));
-
- TProtocolDesc in;
- User::LeaveIfError(sock.iObj.Info(in));
- printf("EPOC32 IP Configuration TCPIP Version %d.%d.%d\n", in.iVersion.iMajor, in.iVersion.iMinor, in.iVersion.iBuild);
-
- TPckgBuf<TSoInetInterfaceInfo> info, next;
-
- TInt res=sock.iObj.GetOpt(KSoInetNextInterface, KSolInetIfCtrl, info);
- if(res!=KErrNone)
- User::Leave(res);
- TInt count = 0;
- while(res==KErrNone) {
- res=sock.iObj.GetOpt(KSoInetNextInterface, KSolInetIfCtrl, next);
-
- if(info().iName != _L("") && info().iName != _L("loop6") && info().iName != _L("loop4")) {
- printf("Interface %d\n", count++);
-
- printf("Name \"%s\"\n", qt_TNameToQString(info().iName).toLatin1().data());
- printf("NIF tag \"%s\"\n", qt_TNameToQString(info().iTag).toLatin1().data());
-
- printf("State ");
- switch (info().iState)
- {
- case EIfPending:
- printf("pending\n");
- break;
- case EIfUp:
- printf("up\n");
- break;
- case EIfBusy:
- printf("busy\n");
- break;
- default:
- printf("down\n");
- break;
- }
-
- printf("Mtu %d\n", info().iMtu);
- printf("Speed Metric %d\n", info().iSpeedMetric);
-
- printf("Features:");
- info().iFeatures & KIfIsLoopback ? printf(" loopback") : printf("");
- info().iFeatures & KIfIsDialup ? printf(" dialup") : printf("");
- info().iFeatures & KIfIsPointToPoint ? printf(" pointtopoint") : printf("");
- info().iFeatures & KIfCanBroadcast ? printf(" canbroadcast") : printf("");
- info().iFeatures & KIfCanMulticast ? printf(" canmulticast") : printf("");
- info().iFeatures & KIfCanSetMTU ? printf(" cansetmtu") : printf("");
- info().iFeatures & KIfHasHardwareAddr ? printf(" hardwareaddr") : printf("");
- info().iFeatures & KIfCanSetHardwareAddr ? printf(" cansethardwareaddr") : printf("");
- printf("\n");
-
- TName address;
- info().iAddress.Output(address);
- printf("Addr: %s\n", qt_TNameToQString(address).toLatin1().data());
-
- if(info().iAddress.IsLinkLocal()) {
- printf(" -link local\n");
- } else if(info().iAddress.IsSiteLocal()) {
- printf(" -site local\n");
- } else {
- printf(" -global\n");
- }
-
- info().iNetMask.Output(address);
- printf("Netmask %s\n", qt_TNameToQString(address).toLatin1().data());
-
- info().iBrdAddr.Output(address);
- printf("Broadcast address %s\n", qt_TNameToQString(address).toLatin1().data());
-
- info().iDefGate.Output(address);
- printf("Gatew: %s\n", qt_TNameToQString(address).toLatin1().data());
-
- info().iNameSer1.Output(address);
- printf("DNS 1: %s\n", qt_TNameToQString(address).toLatin1().data());
-
- info().iNameSer2.Output(address);
- printf("DNS 2: %s\n", qt_TNameToQString(address).toLatin1().data());
-
- if (info().iHwAddr.Family() != KAFUnspec) {
- printf("Hardware address ");
- TUint j;
- for(j = sizeof(SSockAddr) ; j < sizeof(SSockAddr) + 6 ; ++j) {
- if(j < (TUint)info().iHwAddr.Length()) {
- printf("%02X", info().iHwAddr[j]);
- } else {
- printf("??");
- }
- if(j < sizeof(SSockAddr) + 5)
- printf("-");
- else
- printf("\n");
- }
- }
- }
- if(res == KErrNone) {
- info = next;
- printf("\n");
- } else {
- printf("\n");
- }
- }
-
- sock.Pop();
- ss.Pop();
-
- return output;
-}
-
-static QString qt_RouteInfoL() {
- QString output;
- TAutoClose<RSocketServ> ss;
- User::LeaveIfError(ss.iObj.Connect());
- ss.PushL();
-
- TAutoClose<RSocket> sock;
- User::LeaveIfError(sock.iObj.Open(ss.iObj, _L("udp")));
- sock.PushL();
-
- TSoInetRouteInfo routeInfo;
- TPckg<TSoInetRouteInfo> routeInfoPkg(routeInfo);
-
- TName destAddr;
- TName netMask;
- TName gateway;
- TName ifAddr;
-
- // Begins enumeration of routes by setting this option
- User::LeaveIfError(sock.iObj.SetOpt(KSoInetEnumRoutes, KSolInetRtCtrl));
-
- // The TSoInetRouteInfo contains information for a new route each time GetOpt returns KErrNone
- for(TInt i = 0; sock.iObj.GetOpt(KSoInetNextRoute, KSolInetRtCtrl, routeInfoPkg) == KErrNone ; i++)
- {
- // Extract the destination and netmask
- routeInfo.iDstAddr.Output(destAddr);
- routeInfo.iNetMask.Output(netMask);
- routeInfo.iGateway.Output(gateway);
- routeInfo.iIfAddr.Output(ifAddr);
-/*
- if(destAddr.Length() <= 2)
- continue;
-
- if(netMask.Find(_L("255.255.255.255")) != KErrNotFound
- || netMask.Find(_L("0.0.0.0")) != KErrNotFound
- || netMask.Find(_L("ffff:ffff:ffff:ffff")) != KErrNotFound)
- continue;
-*/
- printf("Route Info #[%i]\n", i);
- printf("DstAddr %s\n", qt_TNameToQString(destAddr).toLatin1().data());
- printf("NetMask %s\n", qt_TNameToQString(netMask).toLatin1().data());
- printf("Gateway %s\n", qt_TNameToQString(gateway).toLatin1().data());
- printf("IfAddr %s\n", qt_TNameToQString(ifAddr).toLatin1().data());
- printf("\n");
- }
-
- sock.Pop();
- ss.Pop();
-
- return output;
-}
-
-QString qt_TDesC2QStringL(const TDesC& aDescriptor)
-{
-#ifdef QT_NO_UNICODE
- return QString::fromLocal8Bit(aDescriptor.Ptr(), aDescriptor.Length());
-#else
- return QString((const QChar *)aDescriptor.Ptr(), aDescriptor.Length());
-#endif
-}
-
-static bool qt_SetDefaultIapName(const QString &iapName, int &error) {
- struct ifreq ifReq;
- // clear structure
- memset(&ifReq, 0, sizeof(struct ifreq));
- // set IAP name value
- // make sure it is in UTF8
- strcpy(ifReq.ifr_name, iapName.toUtf8().data());
-
- if(setdefaultif(&ifReq) == 0) {
- // OK
- error = 0;
- return true;
- } else {
- error = errno;
- return false;
- }
-
-}
-static bool qt_SetDefaultSnapId(const int snapId, int &error) {
- struct ifreq ifReq;
- // clear structure
- memset(&ifReq, 0, sizeof(struct ifreq));
- // set SNAP ID value
- ifReq.ifr_ifru.snap_id = snapId;
-
- if(setdefaultif(&ifReq) == 0) {
- // OK
- error = 0;
- return true;
- } else {
- error = errno;
- return false;
- }
-
-}
-
-static void qt_SaveIapName(QSettings& settings, QStringList& iapNames, QString& iapNameValue) {
- if(iapNames.contains(iapNameValue) && iapNames.first() == iapNameValue) {
- // no need to update
- } else {
- if(iapNameValue != QString("Easy WLAN")) {
- // new selection alway on top
- iapNames.removeAll(iapNameValue);
- iapNames.prepend(iapNameValue);
- writeIapNamesSettings(settings, iapNames);
- } else {
- // Unbeliveable ... if IAP dodn't exist before
- // no matter what you choose from IAP selection list
- // you will get "Easy WLAN" as IAP name value
-
- // somehow commsdb is not in sync
- }
- }
-}
-
-static QString qt_OfferIapDialog() {
- TBuf8<256> iapName;
-
- RSocketServ socketServ;
- CleanupClosePushL(socketServ);
-
- RConnection connection;
- CleanupClosePushL(connection);
-
- socketServ.Connect();
-
- TCommDbConnPref prefs;
- prefs.SetDialogPreference(ECommDbDialogPrefPrompt);
-
- connection.Open(socketServ);
- connection.Start(prefs);
-
- connection.GetDesSetting(TPtrC(KIapNameSetting), iapName);
- //connection.Stop();
-
- iapName.ZeroTerminate();
- QString strIapName((char*)iapName.Ptr());
-
- int error = 0;
- if(!strIapName.isEmpty()) {
- if(!qt_SetDefaultIapName(strIapName, error)) {
- //printf("failed setdefaultif @ %i with %s and errno = %d \n", __LINE__, strIapName.toUtf8().data(), error);
- strIapName = QString("");
- }
- }
-
- CleanupStack::PopAndDestroy(&connection);
- CleanupStack::PopAndDestroy(&socketServ);
-
- return strIapName;
-}
-
-static QString qt_CheckForActiveConnection() {
- TUint count;
-
- RSocketServ serv;
- CleanupClosePushL(serv);
-
- RConnection conn;
- CleanupClosePushL(conn);
-
- serv.Connect();
- conn.Open(serv);
-
- TConnectionInfoBuf connInfo;
-
- TBuf8<256> iapName;
- TBuf8<256> iapServiceType;
-
- QString strIapName;
-
- if (conn.EnumerateConnections(count) == KErrNone) {
- if(count > 0) {
- for (TUint i = 1; i <= count; i++) {
- if (conn.GetConnectionInfo(i, connInfo) == KErrNone) {
- RConnection tempConn;
- CleanupClosePushL(tempConn);
- tempConn.Open(serv);
- if (tempConn.Attach(connInfo, RConnection::EAttachTypeNormal) == KErrNone) {
- tempConn.GetDesSetting(TPtrC(KIapNameSetting), iapName);
- tempConn.GetDesSetting(TPtrC(KIapServiceType), iapServiceType);
- //tempConn.Stop();
- iapName.ZeroTerminate();
- iapServiceType.ZeroTerminate();
-
-// if(iapServiceType.Find(_L8("LANService")) != KErrNotFound) {
-// activeLanConnectionFound = ETrue;
-// break;
-// }
- strIapName = QString((char*)iapName.Ptr());
- int error = 0;
- if(!qt_SetDefaultIapName(strIapName, error)) {
- //printf("failed setdefaultif @ %i with %s and errno = %d \n", __LINE__, strIapName.toUtf8().data(), error);
- strIapName = QString("");
- }
-
- CleanupStack::PopAndDestroy(&tempConn);
- break;
- }
- }
- }
- }
- }
-
- //conn.Stop();
-
- CleanupStack::PopAndDestroy(&conn);
- CleanupStack::PopAndDestroy(&serv);
-
- return strIapName;
-}
-
-static QString qt_CheckSettingsForConnection(QStringList& iapNames) {
- QString strIapName;
- for(int index = 0; index < iapNames.size(); ++index) {
- strIapName = iapNames.at(index);
- int error = 0;
- if(!qt_SetDefaultIapName(strIapName, error)) {
- //printf("failed setdefaultif @ %i with %s and errno = %d \n", __LINE__, strIapName.toUtf8().data(), error);
- strIapName = QString("");
- } else {
- return strIapName;
- }
- }
- return strIapName;
-}
-
-static void qt_SetDefaultIapL()
-{
- // settings @ /c/data/.config/Trolltech.com
- QSettings settings(QSettings::UserScope, qtOrganizationTag);
- // populate iap name list
- QStringList iapNames;
- readIapNamesSettings(settings, iapNames);
-
- QString iapNameValue;
-
- iapNameValue = qt_CheckForActiveConnection();
-
- if(!iapNameValue.isEmpty()) {
- qt_SaveIapName(settings, iapNames, iapNameValue);
- return;
- }
-
- iapNameValue = qt_CheckSettingsForConnection(iapNames);
-
- if(!iapNameValue.isEmpty()) {
- qt_SaveIapName(settings, iapNames, iapNameValue);
- return;
- }
-
- /*
- * no active LAN connections yet
- * no IAP in settings
- * offer IAP dialog to user
- */
- iapNameValue = qt_OfferIapDialog();
- qt_SaveIapName(settings, iapNames, iapNameValue);
- return;
-
-}
-
-static int qt_SetDefaultIap()
-{
-#ifndef __WINS__
- TRAPD(err1, qt_SetDefaultIapL());
-// TRAPD(err2, qt_InterfaceInfoL());
-// TRAPD(err3, qt_RouteInfoL());
- return err1;
-#else
- return 0; // IAP dialog not required for emulator
-#endif
-}
-
-#endif // QSYM_IAP_UTIL_H
diff --git a/examples/network/torrent/torrent.pro b/examples/network/torrent/torrent.pro
index 7665455e81..44716fdefb 100644
--- a/examples/network/torrent/torrent.pro
+++ b/examples/network/torrent/torrent.pro
@@ -5,7 +5,7 @@ HEADERS += addtorrentdialog.h \
metainfo.h \
peerwireclient.h \
ratecontroller.h \
- filemanager.h \
+ filemanager.h \
torrentclient.h \
torrentserver.h \
trackerclient.h
diff --git a/examples/network/torrent/torrentclient.cpp b/examples/network/torrent/torrentclient.cpp
index 5e25b9a3f9..b7607a6ffa 100644
--- a/examples/network/torrent/torrentclient.cpp
+++ b/examples/network/torrent/torrentclient.cpp
@@ -1243,8 +1243,8 @@ void TorrentClient::schedulePieceForClient(PeerWireClient *client)
// depending on the state we're in.
int pieceIndex = 0;
if (d->state == WarmingUp || (qrand() & 4) == 0) {
- int *occurrances = new int[d->pieceCount];
- memset(occurrances, 0, d->pieceCount * sizeof(int));
+ int *occurrences = new int[d->pieceCount];
+ memset(occurrences, 0, d->pieceCount * sizeof(int));
// Count how many of each piece are available.
foreach (PeerWireClient *peer, d->connections) {
@@ -1252,38 +1252,38 @@ void TorrentClient::schedulePieceForClient(PeerWireClient *client)
int peerPiecesSize = peerPieces.size();
for (int i = 0; i < peerPiecesSize; ++i) {
if (peerPieces.testBit(i))
- ++occurrances[i];
+ ++occurrences[i];
}
}
// Find the rarest or most common pieces.
- int numOccurrances = d->state == WarmingUp ? 0 : 99999;
+ int numOccurrences = d->state == WarmingUp ? 0 : 99999;
QList<int> piecesReadyForDownload;
for (int i = 0; i < d->pieceCount; ++i) {
if (d->state == WarmingUp) {
// Add common pieces
- if (occurrances[i] >= numOccurrances
+ if (occurrences[i] >= numOccurrences
&& incompletePiecesAvailableToClient.testBit(i)) {
- if (occurrances[i] > numOccurrances)
+ if (occurrences[i] > numOccurrences)
piecesReadyForDownload.clear();
piecesReadyForDownload.append(i);
- numOccurrances = occurrances[i];
+ numOccurrences = occurrences[i];
}
} else {
// Add rare pieces
- if (occurrances[i] <= numOccurrances
+ if (occurrences[i] <= numOccurrences
&& incompletePiecesAvailableToClient.testBit(i)) {
- if (occurrances[i] < numOccurrances)
+ if (occurrences[i] < numOccurrences)
piecesReadyForDownload.clear();
piecesReadyForDownload.append(i);
- numOccurrances = occurrances[i];
+ numOccurrences = occurrences[i];
}
}
}
// Select one piece randomly
pieceIndex = piecesReadyForDownload.at(qrand() % piecesReadyForDownload.size());
- delete [] occurrances;
+ delete [] occurrences;
} else {
// Make up a list of available piece indices, and pick
// a random one.
diff --git a/examples/opengl/shared/qtlogo.cpp b/examples/opengl/shared/qtlogo.cpp
index 0352d29a40..0165032032 100644
--- a/examples/opengl/shared/qtlogo.cpp
+++ b/examples/opengl/shared/qtlogo.cpp
@@ -327,7 +327,7 @@ RectTorus::RectTorus(Geometry *g, qreal iRad, qreal oRad, qreal depth, int k)
QVector<QVector3D> in_back = extrude(inside, depth);
QVector<QVector3D> out_back = extrude(outside, depth);
- // Create front, back and sides as seperate patches so that smooth normals
+ // Create front, back and sides as separate patches so that smooth normals
// are generated for the curving sides, but a faceted edge is created between
// sides and front/back
Patch *front = new Patch(g);
diff --git a/examples/qtconcurrent/progressdialog/main.cpp b/examples/qtconcurrent/progressdialog/main.cpp
index a54f4d3a3c..7e3834b070 100644
--- a/examples/qtconcurrent/progressdialog/main.cpp
+++ b/examples/qtconcurrent/progressdialog/main.cpp
@@ -69,7 +69,7 @@ int main(int argc, char **argv)
QProgressDialog dialog;
dialog.setLabelText(QString("Progressing using %1 thread(s)...").arg(QThread::idealThreadCount()));
- // Create a QFutureWatcher and conncect signals and slots.
+ // Create a QFutureWatcher and connect signals and slots.
QFutureWatcher<void> futureWatcher;
QObject::connect(&futureWatcher, SIGNAL(finished()), &dialog, SLOT(reset()));
QObject::connect(&dialog, SIGNAL(canceled()), &futureWatcher, SLOT(cancel()));
diff --git a/examples/tools/customcompleter/textedit.cpp b/examples/tools/customcompleter/textedit.cpp
index 5467e53f27..77699e0c90 100644
--- a/examples/tools/customcompleter/textedit.cpp
+++ b/examples/tools/customcompleter/textedit.cpp
@@ -141,7 +141,7 @@ void TextEdit::keyPressEvent(QKeyEvent *e)
}
bool isShortcut = ((e->modifiers() & Qt::ControlModifier) && e->key() == Qt::Key_E); // CTRL+E
- if (!c || !isShortcut) // dont process the shortcut when we have a completer
+ if (!c || !isShortcut) // do not process the shortcut when we have a completer
QTextEdit::keyPressEvent(e);
//! [7]
diff --git a/examples/touch/dials/dials.pro b/examples/touch/dials/dials.pro
new file mode 100644
index 0000000000..896315380c
--- /dev/null
+++ b/examples/touch/dials/dials.pro
@@ -0,0 +1,8 @@
+SOURCES += main.cpp
+FORMS += dials.ui
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/touch/dials
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS dials.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/touch/dials
+INSTALLS += target sources
diff --git a/examples/multitouch/dials/dials.ui b/examples/touch/dials/dials.ui
index 8ca7ae9475..8ca7ae9475 100644
--- a/examples/multitouch/dials/dials.ui
+++ b/examples/touch/dials/dials.ui
diff --git a/examples/multitouch/dials/main.cpp b/examples/touch/dials/main.cpp
index 4c7cc1e99b..4c7cc1e99b 100644
--- a/examples/multitouch/dials/main.cpp
+++ b/examples/touch/dials/main.cpp
diff --git a/examples/multitouch/fingerpaint/fingerpaint.pro b/examples/touch/fingerpaint/fingerpaint.pro
index 1d45635504..f1c9d4c2df 100644
--- a/examples/multitouch/fingerpaint/fingerpaint.pro
+++ b/examples/touch/fingerpaint/fingerpaint.pro
@@ -5,7 +5,7 @@ SOURCES = main.cpp \
scribblearea.cpp
# install
-target.path = $$[QT_INSTALL_EXAMPLES]/multitouch/fingerpaint
+target.path = $$[QT_INSTALL_EXAMPLES]/touch/fingerpaint
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS fingerpaint.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/multitouch/fingerpaint
+sources.path = $$[QT_INSTALL_EXAMPLES]/touch/fingerpaint
INSTALLS += target sources
diff --git a/examples/multitouch/fingerpaint/main.cpp b/examples/touch/fingerpaint/main.cpp
index 1d9b61d68e..1d9b61d68e 100644
--- a/examples/multitouch/fingerpaint/main.cpp
+++ b/examples/touch/fingerpaint/main.cpp
diff --git a/examples/multitouch/fingerpaint/mainwindow.cpp b/examples/touch/fingerpaint/mainwindow.cpp
index ec42da3cee..ec42da3cee 100644
--- a/examples/multitouch/fingerpaint/mainwindow.cpp
+++ b/examples/touch/fingerpaint/mainwindow.cpp
diff --git a/examples/multitouch/fingerpaint/mainwindow.h b/examples/touch/fingerpaint/mainwindow.h
index 714748ec7a..714748ec7a 100644
--- a/examples/multitouch/fingerpaint/mainwindow.h
+++ b/examples/touch/fingerpaint/mainwindow.h
diff --git a/examples/multitouch/fingerpaint/scribblearea.cpp b/examples/touch/fingerpaint/scribblearea.cpp
index f16c33486a..f16c33486a 100644
--- a/examples/multitouch/fingerpaint/scribblearea.cpp
+++ b/examples/touch/fingerpaint/scribblearea.cpp
diff --git a/examples/multitouch/fingerpaint/scribblearea.h b/examples/touch/fingerpaint/scribblearea.h
index 2e4fbda8ab..2e4fbda8ab 100644
--- a/examples/multitouch/fingerpaint/scribblearea.h
+++ b/examples/touch/fingerpaint/scribblearea.h
diff --git a/examples/multitouch/knobs/knob.cpp b/examples/touch/knobs/knob.cpp
index 6ddd9b3bf8..6ddd9b3bf8 100644
--- a/examples/multitouch/knobs/knob.cpp
+++ b/examples/touch/knobs/knob.cpp
diff --git a/examples/multitouch/knobs/knob.h b/examples/touch/knobs/knob.h
index d4e8730399..d4e8730399 100644
--- a/examples/multitouch/knobs/knob.h
+++ b/examples/touch/knobs/knob.h
diff --git a/examples/touch/knobs/knobs.pro b/examples/touch/knobs/knobs.pro
new file mode 100644
index 0000000000..ef01c9a8bf
--- /dev/null
+++ b/examples/touch/knobs/knobs.pro
@@ -0,0 +1,8 @@
+HEADERS = knob.h
+SOURCES = main.cpp knob.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/touch/knobs
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS knobs.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/touch/knobs
+INSTALLS += target sources
diff --git a/examples/multitouch/knobs/main.cpp b/examples/touch/knobs/main.cpp
index 0866f789f3..0866f789f3 100644
--- a/examples/multitouch/knobs/main.cpp
+++ b/examples/touch/knobs/main.cpp
diff --git a/examples/multitouch/pinchzoom/graphicsview.cpp b/examples/touch/pinchzoom/graphicsview.cpp
index 041e49427e..041e49427e 100644
--- a/examples/multitouch/pinchzoom/graphicsview.cpp
+++ b/examples/touch/pinchzoom/graphicsview.cpp
diff --git a/examples/multitouch/pinchzoom/graphicsview.h b/examples/touch/pinchzoom/graphicsview.h
index c762786f16..c762786f16 100644
--- a/examples/multitouch/pinchzoom/graphicsview.h
+++ b/examples/touch/pinchzoom/graphicsview.h
diff --git a/examples/multitouch/pinchzoom/images/cheese.jpg b/examples/touch/pinchzoom/images/cheese.jpg
index dea5795fd0..dea5795fd0 100644
--- a/examples/multitouch/pinchzoom/images/cheese.jpg
+++ b/examples/touch/pinchzoom/images/cheese.jpg
Binary files differ
diff --git a/examples/multitouch/pinchzoom/main.cpp b/examples/touch/pinchzoom/main.cpp
index 8abc993e89..8abc993e89 100644
--- a/examples/multitouch/pinchzoom/main.cpp
+++ b/examples/touch/pinchzoom/main.cpp
diff --git a/examples/multitouch/pinchzoom/mice.qrc b/examples/touch/pinchzoom/mice.qrc
index accdb4d0a6..accdb4d0a6 100644
--- a/examples/multitouch/pinchzoom/mice.qrc
+++ b/examples/touch/pinchzoom/mice.qrc
diff --git a/examples/multitouch/pinchzoom/mouse.cpp b/examples/touch/pinchzoom/mouse.cpp
index 82617fedff..82617fedff 100644
--- a/examples/multitouch/pinchzoom/mouse.cpp
+++ b/examples/touch/pinchzoom/mouse.cpp
diff --git a/examples/multitouch/pinchzoom/mouse.h b/examples/touch/pinchzoom/mouse.h
index 241f8abbb3..241f8abbb3 100644
--- a/examples/multitouch/pinchzoom/mouse.h
+++ b/examples/touch/pinchzoom/mouse.h
diff --git a/examples/multitouch/pinchzoom/pinchzoom.pro b/examples/touch/pinchzoom/pinchzoom.pro
index bd87cf709b..804536baa3 100644
--- a/examples/multitouch/pinchzoom/pinchzoom.pro
+++ b/examples/touch/pinchzoom/pinchzoom.pro
@@ -10,7 +10,7 @@ RESOURCES += \
mice.qrc
# install
-target.path = $$[QT_INSTALL_EXAMPLES]/multitouch/pinchzoom
+target.path = $$[QT_INSTALL_EXAMPLES]/touch/pinchzoom
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS pinchzoom.pro images
-sources.path = $$[QT_INSTALL_EXAMPLES]/multitouch/pinchzoom
+sources.path = $$[QT_INSTALL_EXAMPLES]/touch/pinchzoom
INSTALLS += target sources
diff --git a/examples/multitouch/multitouch.pro b/examples/touch/touch.pro
index d5983eb581..d5983eb581 100644
--- a/examples/multitouch/multitouch.pro
+++ b/examples/touch/touch.pro
diff --git a/examples/tutorials/modelview/1_readonly/1_readonly.pro b/examples/tutorials/modelview/1_readonly/1_readonly.pro
new file mode 100644
index 0000000000..1162d5adfa
--- /dev/null
+++ b/examples/tutorials/modelview/1_readonly/1_readonly.pro
@@ -0,0 +1,10 @@
+TARGET = mv_readonly
+
+TEMPLATE = app
+
+SOURCES += main.cpp \
+ modelview.cpp \
+ mymodel.cpp
+
+HEADERS += modelview.h \
+ mymodel.h
diff --git a/examples/tutorials/modelview/1_readonly/main.cpp b/examples/tutorials/modelview/1_readonly/main.cpp
new file mode 100644
index 0000000000..fb4726aa69
--- /dev/null
+++ b/examples/tutorials/modelview/1_readonly/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+//! [Quoting ModelView Tutorial]
+// main.cpp
+#include <QtGui/QApplication>
+#include "modelview.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ ModelView w;
+ w.show();
+ return a.exec();
+}
+//! [Quoting ModelView Tutorial]
diff --git a/examples/tutorials/modelview/1_readonly/modelview.cpp b/examples/tutorials/modelview/1_readonly/modelview.cpp
new file mode 100644
index 0000000000..91a97bf205
--- /dev/null
+++ b/examples/tutorials/modelview/1_readonly/modelview.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+//! [Quoting ModelView Tutorial]
+// modelview.cpp
+#include <QTableView>
+#include "modelview.h"
+#include "mymodel.h"
+
+ModelView::ModelView(QWidget *parent)
+ : QMainWindow(parent)
+{
+ tableView = new QTableView(this);
+ setCentralWidget(tableView);
+ tableView->setModel(new MyModel(this));
+}
+//! [Quoting ModelView Tutorial]
diff --git a/examples/tutorials/modelview/1_readonly/modelview.h b/examples/tutorials/modelview/1_readonly/modelview.h
new file mode 100644
index 0000000000..cc14d9056b
--- /dev/null
+++ b/examples/tutorials/modelview/1_readonly/modelview.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+#ifndef MODELVIEW_H
+#define MODELVIEW_H
+
+//! [Quoting ModelView Tutorial]
+// modelview.h
+#include <QtGui/QMainWindow>
+
+QT_FORWARD_DECLARE_CLASS(QTableView)
+
+class ModelView : public QMainWindow
+{
+ Q_OBJECT
+private:
+ QTableView *tableView;
+public:
+ ModelView(QWidget *parent = 0);
+
+};
+//! [Quoting ModelView Tutorial]
+
+#endif // MODELVIEW_H
diff --git a/examples/tutorials/modelview/1_readonly/mymodel.cpp b/examples/tutorials/modelview/1_readonly/mymodel.cpp
new file mode 100644
index 0000000000..394605abc9
--- /dev/null
+++ b/examples/tutorials/modelview/1_readonly/mymodel.cpp
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+//! [Quoting ModelView Tutorial]
+// mymodel.cpp
+#include "mymodel.h"
+
+MyModel::MyModel(QObject *parent)
+ :QAbstractTableModel(parent)
+{
+}
+
+int MyModel::rowCount(const QModelIndex & /*parent*/) const
+{
+ return 2;
+}
+
+int MyModel::columnCount(const QModelIndex & /*parent*/) const
+{
+ return 3;
+}
+
+QVariant MyModel::data(const QModelIndex &index, int role) const
+{
+ if (role == Qt::DisplayRole)
+ {
+ return QString("Row%1, Column%2")
+ .arg(index.row() + 1)
+ .arg(index.column() +1);
+ }
+ return QVariant();
+}
+//! [Quoting ModelView Tutorial]
diff --git a/examples/tutorials/modelview/1_readonly/mymodel.h b/examples/tutorials/modelview/1_readonly/mymodel.h
new file mode 100644
index 0000000000..6065f6e7c0
--- /dev/null
+++ b/examples/tutorials/modelview/1_readonly/mymodel.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+#ifndef MYMODEL_H
+#define MYMODEL_H
+
+//! [Quoting ModelView Tutorial]
+// mymodel.h
+#include <QAbstractTableModel>
+
+class MyModel : public QAbstractTableModel
+{
+ Q_OBJECT
+public:
+ MyModel(QObject *parent);
+ int rowCount(const QModelIndex &parent = QModelIndex()) const ;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+};
+//! [Quoting ModelView Tutorial]
+
+#endif // MYMODEL_H
diff --git a/examples/tutorials/modelview/2_formatting/2_formatting.pro b/examples/tutorials/modelview/2_formatting/2_formatting.pro
new file mode 100644
index 0000000000..7e70d81113
--- /dev/null
+++ b/examples/tutorials/modelview/2_formatting/2_formatting.pro
@@ -0,0 +1,10 @@
+TARGET = mv_formatting
+
+TEMPLATE = app
+
+SOURCES += main.cpp \
+ modelview.cpp \
+ mymodel.cpp
+
+HEADERS += modelview.h \
+ mymodel.h
diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/instrument.cpp b/examples/tutorials/modelview/2_formatting/main.cpp
index 9ca96f6386..7be212e398 100644
--- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/instrument.cpp
+++ b/examples/tutorials/modelview/2_formatting/main.cpp
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the documentation of the Qt Toolkit.
+** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -37,20 +37,14 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "instrument.h"
-Instrument::Instrument(QObject *parent)
- : QObject(parent)
-{
-}
-
-QString Instrument::type() const
-{
- return m_type;
-}
+#include <QtGui/QApplication>
+#include "modelview.h"
-void Instrument::setType(const QString &type)
+int main(int argc, char *argv[])
{
- m_type = type;
+ QApplication a(argc, argv);
+ ModelView w;
+ w.show();
+ return a.exec();
}
-
diff --git a/examples/tutorials/modelview/2_formatting/modelview.cpp b/examples/tutorials/modelview/2_formatting/modelview.cpp
new file mode 100644
index 0000000000..9a5ce64c96
--- /dev/null
+++ b/examples/tutorials/modelview/2_formatting/modelview.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+#include <QTableView>
+#include "modelview.h"
+#include "mymodel.h"
+
+ModelView::ModelView(QWidget *parent)
+ : QMainWindow(parent)
+{
+ tableView = new QTableView(this);
+ setCentralWidget(tableView);
+ tableView->setModel(new MyModel(this));
+}
+
diff --git a/examples/tutorials/modelview/2_formatting/modelview.h b/examples/tutorials/modelview/2_formatting/modelview.h
new file mode 100644
index 0000000000..b2943ac621
--- /dev/null
+++ b/examples/tutorials/modelview/2_formatting/modelview.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+#ifndef MODELVIEW_H
+#define MODELVIEW_H
+
+#include <QtGui/QMainWindow>
+
+QT_FORWARD_DECLARE_CLASS(QTableView)
+
+class ModelView : public QMainWindow
+{
+ Q_OBJECT
+private:
+ QTableView *tableView;
+public:
+ ModelView(QWidget *parent = 0);
+};
+
+#endif // MODELVIEW_H
diff --git a/examples/tutorials/modelview/2_formatting/mymodel.cpp b/examples/tutorials/modelview/2_formatting/mymodel.cpp
new file mode 100644
index 0000000000..f7ff504ef2
--- /dev/null
+++ b/examples/tutorials/modelview/2_formatting/mymodel.cpp
@@ -0,0 +1,112 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+#include <QFont>
+#include <QBrush>
+#include "mymodel.h"
+#include <QDebug>
+
+//! [Quoting ModelView Tutorial]
+// mymodel.cpp
+MyModel::MyModel(QObject *parent)
+ :QAbstractTableModel(parent)
+{
+}
+
+int MyModel::rowCount(const QModelIndex & /*parent */) const
+{
+ return 2;
+}
+
+int MyModel::columnCount(const QModelIndex & /*parent */) const
+{
+ return 3;
+}
+
+QVariant MyModel::data(const QModelIndex &index, int role) const
+{
+ int row = index.row();
+ int col = index.column();
+ // generate a log message when this method gets called
+ qDebug() << QString("row %1, col%2, role %3")
+ .arg(row).arg(col).arg(role);
+
+ switch(role){
+ case Qt::DisplayRole:
+ if (row == 0 && col == 1) return QString("<--left");
+ if (row == 1 && col == 1) return QString("right-->");
+
+ return QString("Row%1, Column%2")
+ .arg(row + 1)
+ .arg(col +1);
+ break;
+ case Qt::FontRole:
+ if (row == 0 && col == 0) //change font only for cell(0,0)
+ {
+ QFont boldFont;
+ boldFont.setBold(true);
+ return boldFont;
+ }
+ break;
+ case Qt::BackgroundRole:
+
+ if (row == 1 && col == 2) //change background only for cell(1,2)
+ {
+ QBrush redBackground = QBrush(Qt::red);
+ return redBackground;
+ }
+ break;
+ case Qt::TextAlignmentRole:
+
+ if (row == 1 && col == 1) //change text alignment only for cell(1,1)
+ {
+ return Qt::AlignRight + Qt::AlignVCenter;
+ }
+ break;
+ case Qt::CheckStateRole:
+
+ if (row == 1 && col == 0) //add a checkbox to cell(1,0)
+ {
+ return Qt::Checked;
+ }
+ }
+ return QVariant();
+}
+//! [Quoting ModelView Tutorial]
diff --git a/examples/tutorials/modelview/2_formatting/mymodel.h b/examples/tutorials/modelview/2_formatting/mymodel.h
new file mode 100644
index 0000000000..4dc405a805
--- /dev/null
+++ b/examples/tutorials/modelview/2_formatting/mymodel.h
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+#ifndef MYMODEL_H
+#define MYMODEL_H
+
+#include <QAbstractTableModel>
+
+class MyModel : public QAbstractTableModel
+{
+ Q_OBJECT
+public:
+ MyModel(QObject *parent);
+ int rowCount(const QModelIndex &parent = QModelIndex()) const ;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+};
+
+#endif // MYMODEL_H
diff --git a/examples/tutorials/modelview/3_changingmodel/3_changingmodel.pro b/examples/tutorials/modelview/3_changingmodel/3_changingmodel.pro
new file mode 100644
index 0000000000..d61ee4c953
--- /dev/null
+++ b/examples/tutorials/modelview/3_changingmodel/3_changingmodel.pro
@@ -0,0 +1,10 @@
+TARGET = mv_changingmodel
+
+TEMPLATE = app
+
+SOURCES += main.cpp \
+ modelview.cpp \
+ mymodel.cpp
+
+HEADERS += modelview.h \
+ mymodel.h
diff --git a/examples/tutorials/modelview/3_changingmodel/main.cpp b/examples/tutorials/modelview/3_changingmodel/main.cpp
new file mode 100644
index 0000000000..7be212e398
--- /dev/null
+++ b/examples/tutorials/modelview/3_changingmodel/main.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+#include <QtGui/QApplication>
+#include "modelview.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ ModelView w;
+ w.show();
+ return a.exec();
+}
diff --git a/examples/tutorials/modelview/3_changingmodel/modelview.cpp b/examples/tutorials/modelview/3_changingmodel/modelview.cpp
new file mode 100644
index 0000000000..9a5ce64c96
--- /dev/null
+++ b/examples/tutorials/modelview/3_changingmodel/modelview.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+#include <QTableView>
+#include "modelview.h"
+#include "mymodel.h"
+
+ModelView::ModelView(QWidget *parent)
+ : QMainWindow(parent)
+{
+ tableView = new QTableView(this);
+ setCentralWidget(tableView);
+ tableView->setModel(new MyModel(this));
+}
+
diff --git a/examples/tutorials/modelview/3_changingmodel/modelview.h b/examples/tutorials/modelview/3_changingmodel/modelview.h
new file mode 100644
index 0000000000..b2943ac621
--- /dev/null
+++ b/examples/tutorials/modelview/3_changingmodel/modelview.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+#ifndef MODELVIEW_H
+#define MODELVIEW_H
+
+#include <QtGui/QMainWindow>
+
+QT_FORWARD_DECLARE_CLASS(QTableView)
+
+class ModelView : public QMainWindow
+{
+ Q_OBJECT
+private:
+ QTableView *tableView;
+public:
+ ModelView(QWidget *parent = 0);
+};
+
+#endif // MODELVIEW_H
diff --git a/examples/tutorials/modelview/3_changingmodel/mymodel.cpp b/examples/tutorials/modelview/3_changingmodel/mymodel.cpp
new file mode 100644
index 0000000000..42915b09f1
--- /dev/null
+++ b/examples/tutorials/modelview/3_changingmodel/mymodel.cpp
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+#include <QTimer>
+#include <QTime>
+#include <QBrush>
+#include "mymodel.h"
+
+//! [quoting mymodel_a]
+MyModel::MyModel(QObject *parent)
+ :QAbstractTableModel(parent)
+{
+// selectedCell = 0;
+ timer = new QTimer(this);
+ timer->setInterval(1000);
+ connect(timer, SIGNAL(timeout()) , this, SLOT(timerHit()));
+ timer->start();
+}
+//! [quoting mymodel_a]
+//-------------------------------------------------------
+int MyModel::rowCount(const QModelIndex & /*parent */) const
+{
+ return 2;
+}
+
+//-------------------------------------------------------
+int MyModel::columnCount(const QModelIndex & /*parent */) const
+{
+ return 3;
+}
+
+//-------------------------------------------------------
+//! [quoting mymodel_QVariant ]
+QVariant MyModel::data(const QModelIndex &index, int role) const
+{
+ int row = index.row();
+ int col = index.column();
+
+ if (role == Qt::DisplayRole)
+ {
+ if (row == 0 && col == 0)
+ {
+ return QTime::currentTime().toString();
+ }
+ }
+ return QVariant();
+}
+//! [quoting mymodel_QVariant ]
+//-------------------------------------------------------
+//! [quoting mymodel_b ]
+void MyModel::timerHit()
+{
+ //we identify the top left cell
+ QModelIndex topLeft = createIndex(0,0);
+ //emit a signal to make the view reread identified data
+ emit dataChanged(topLeft, topLeft);
+}
+//! [quoting mymodel_b ]
diff --git a/examples/tutorials/modelview/3_changingmodel/mymodel.h b/examples/tutorials/modelview/3_changingmodel/mymodel.h
new file mode 100644
index 0000000000..01ad88d068
--- /dev/null
+++ b/examples/tutorials/modelview/3_changingmodel/mymodel.h
@@ -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 examples 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$
+**
+****************************************************************************/
+
+#ifndef MYMODEL_H
+#define MYMODEL_H
+
+#include <QAbstractTableModel>
+
+QT_FORWARD_DECLARE_CLASS(QTimer)
+
+class MyModel : public QAbstractTableModel
+{
+ Q_OBJECT
+public:
+ MyModel(QObject *parent);
+ int rowCount(const QModelIndex &parent = QModelIndex()) const ;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+ QTimer *timer;
+private:
+ int selectedCell;
+private slots:
+ void timerHit();
+};
+
+#endif // MYMODEL_H
diff --git a/examples/tutorials/modelview/4_headers/4_headers.pro b/examples/tutorials/modelview/4_headers/4_headers.pro
new file mode 100644
index 0000000000..d6f8d23a6d
--- /dev/null
+++ b/examples/tutorials/modelview/4_headers/4_headers.pro
@@ -0,0 +1,10 @@
+TARGET = mv_headers
+
+TEMPLATE = app
+
+SOURCES += main.cpp \
+ modelview.cpp \
+ mymodel.cpp
+
+HEADERS += modelview.h \
+ mymodel.h
diff --git a/examples/tutorials/modelview/4_headers/main.cpp b/examples/tutorials/modelview/4_headers/main.cpp
new file mode 100644
index 0000000000..7be212e398
--- /dev/null
+++ b/examples/tutorials/modelview/4_headers/main.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+#include <QtGui/QApplication>
+#include "modelview.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ ModelView w;
+ w.show();
+ return a.exec();
+}
diff --git a/examples/tutorials/modelview/4_headers/modelview.cpp b/examples/tutorials/modelview/4_headers/modelview.cpp
new file mode 100644
index 0000000000..449dbbcc41
--- /dev/null
+++ b/examples/tutorials/modelview/4_headers/modelview.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+#include <QTableView>
+#include <QHeaderView>
+#include "modelview.h"
+#include "mymodel.h"
+
+ModelView::ModelView(QWidget *parent)
+ : QMainWindow(parent)
+{
+ tableView = new QTableView(this);
+ setCentralWidget(tableView);
+ tableView->setModel(new MyModel(this));
+ tableView->verticalHeader()->hide();
+}
+
diff --git a/examples/tutorials/modelview/4_headers/modelview.h b/examples/tutorials/modelview/4_headers/modelview.h
new file mode 100644
index 0000000000..03f99c0fad
--- /dev/null
+++ b/examples/tutorials/modelview/4_headers/modelview.h
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+#ifndef MODELVIEW_H
+#define MODELVIEW_H
+
+#include <QtGui/QMainWindow>
+
+QT_FORWARD_DECLARE_CLASS(QTableView)
+
+class ModelView : public QMainWindow
+{
+ Q_OBJECT
+private:
+ QTableView *tableView;
+public:
+ ModelView(QWidget *parent = 0);
+
+};
+
+#endif // MODELVIEW_H
diff --git a/examples/tutorials/modelview/4_headers/mymodel.cpp b/examples/tutorials/modelview/4_headers/mymodel.cpp
new file mode 100644
index 0000000000..e6f977d012
--- /dev/null
+++ b/examples/tutorials/modelview/4_headers/mymodel.cpp
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+#include "mymodel.h"
+
+MyModel::MyModel(QObject *parent)
+ :QAbstractTableModel(parent)
+{
+}
+
+//-------------------------------------------------------
+int MyModel::rowCount(const QModelIndex & /*parent*/) const
+{
+ return 2;
+}
+
+//-------------------------------------------------------
+int MyModel::columnCount(const QModelIndex & /*parent*/) const
+{
+ return 3;
+}
+
+//-------------------------------------------------------
+QVariant MyModel::data(const QModelIndex &index, int role) const
+{
+ if (role == Qt::DisplayRole)
+ {
+ return QString("Row%1, Column%2")
+ .arg(index.row() + 1)
+ .arg(index.column() +1);
+ }
+ return QVariant();
+}
+
+//! [quoting mymodel_c]
+QVariant MyModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+ if (role == Qt::DisplayRole)
+ {
+ if (orientation == Qt::Horizontal) {
+ switch (section)
+ {
+ case 0:
+ return QString("first");
+ case 1:
+ return QString("second");
+ case 2:
+ return QString("third");
+ }
+ }
+ }
+ return QVariant();
+}
+//! [quoting mymodel_c]
diff --git a/examples/tutorials/modelview/4_headers/mymodel.h b/examples/tutorials/modelview/4_headers/mymodel.h
new file mode 100644
index 0000000000..ada3169039
--- /dev/null
+++ b/examples/tutorials/modelview/4_headers/mymodel.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+#ifndef MYMODEL_H
+#define MYMODEL_H
+
+#include <QAbstractTableModel>
+
+class MyModel : public QAbstractTableModel
+{
+ Q_OBJECT
+public:
+ MyModel(QObject *parent);
+ int rowCount(const QModelIndex &parent = QModelIndex()) const ;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+ QVariant headerData(int section, Qt::Orientation orientation, int role) const;
+};
+
+#endif // MYMODEL_H
diff --git a/examples/tutorials/modelview/5_edit/5_edit.pro b/examples/tutorials/modelview/5_edit/5_edit.pro
new file mode 100644
index 0000000000..e18c59610e
--- /dev/null
+++ b/examples/tutorials/modelview/5_edit/5_edit.pro
@@ -0,0 +1,10 @@
+TARGET = mv_edit
+
+TEMPLATE = app
+
+SOURCES += main.cpp \
+ modelview.cpp \
+ mymodel.cpp
+
+HEADERS += modelview.h \
+ mymodel.h
diff --git a/examples/tutorials/modelview/5_edit/main.cpp b/examples/tutorials/modelview/5_edit/main.cpp
new file mode 100644
index 0000000000..7be212e398
--- /dev/null
+++ b/examples/tutorials/modelview/5_edit/main.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+#include <QtGui/QApplication>
+#include "modelview.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ ModelView w;
+ w.show();
+ return a.exec();
+}
diff --git a/examples/tutorials/modelview/5_edit/modelview.cpp b/examples/tutorials/modelview/5_edit/modelview.cpp
new file mode 100644
index 0000000000..a6c6ef533f
--- /dev/null
+++ b/examples/tutorials/modelview/5_edit/modelview.cpp
@@ -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 examples 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$
+**
+****************************************************************************/
+
+#include <QTableView>
+#include "modelview.h"
+#include "mymodel.h"
+
+ModelView::ModelView(QWidget *parent)
+ : QMainWindow(parent)
+{
+ tableView = new QTableView(this);
+ setCentralWidget(tableView);
+ QAbstractTableModel *myModel = new MyModel(this);
+ tableView->setModel(myModel);
+
+ //transfer changes to the model to the window title
+ connect(myModel, SIGNAL(editCompleted(const QString &)), this, SLOT(setWindowTitle(const QString &)));
+}
+
+void ModelView::showWindowTitle(const QString & title)
+{
+setWindowTitle(title);
+}
diff --git a/examples/declarative/tutorials/extending/chapter5-plugins/instrument.h b/examples/tutorials/modelview/5_edit/modelview.h
index ce1e7ce808..069107b8ce 100644
--- a/examples/declarative/tutorials/extending/chapter5-plugins/instrument.h
+++ b/examples/tutorials/modelview/5_edit/modelview.h
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the documentation of the Qt Toolkit.
+** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -37,25 +37,23 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef INSTRUMENT_H
-#define INSTRUMENT_H
-#include <QObject>
+#ifndef MODELVIEW_H
+#define MODELVIEW_H
-class Instrument : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString type READ type WRITE setType)
-
-public:
- Instrument(QObject *parent = 0);
+#include <QtGui/QMainWindow>
- QString type() const;
- void setType(const QString &type);
+QT_FORWARD_DECLARE_CLASS(QTableView)
+class ModelView : public QMainWindow
+{
+ Q_OBJECT
private:
- QString m_type;
+ QTableView *tableView;
+public:
+ ModelView(QWidget *parent = 0);
+public slots:
+ void showWindowTitle(const QString & title);
};
-#endif
-
+#endif // MODELVIEW_H
diff --git a/examples/tutorials/modelview/5_edit/mymodel.cpp b/examples/tutorials/modelview/5_edit/mymodel.cpp
new file mode 100644
index 0000000000..67181ca94d
--- /dev/null
+++ b/examples/tutorials/modelview/5_edit/mymodel.cpp
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+//! [quoting mymodel_d]
+#include "mymodel.h"
+
+const int COLS= 3;
+const int ROWS= 2;
+
+MyModel::MyModel(QObject *parent)
+ :QAbstractTableModel(parent)
+{
+ //gridData needs to have 6 element, one for each table cell
+ m_gridData << "1/1" << "1/2" << "1/3" << "2/1" << "2/2" << "2/3" ;
+}
+//! [quoting mymodel_d]
+
+//! [quoting mymodel_e]
+int MyModel::rowCount(const QModelIndex & /*parent*/) const
+{
+ return ROWS;
+}
+
+int MyModel::columnCount(const QModelIndex & /*parent*/) const
+{
+ return COLS;
+}
+
+QVariant MyModel::data(const QModelIndex &index, int role) const
+{
+ if (role == Qt::DisplayRole)
+ {
+ return m_gridData[modelIndexToOffset(index)];
+ }
+ return QVariant();
+}
+//! [quoting mymodel_e]
+
+//-----------------------------------------------------------------
+
+//! [quoting mymodel_f]
+bool MyModel::setData(const QModelIndex & index, const QVariant & value, int role)
+{
+ if (role == Qt::EditRole)
+ {
+ m_gridData[modelIndexToOffset(index)] = value.toString();
+ emit editCompleted(m_gridData.join(" | "));
+ }
+ return true;
+}
+
+Qt::ItemFlags MyModel::flags(const QModelIndex & /*index*/) const
+{
+ return Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled ;
+}
+
+//convert row and column information to array offset
+int MyModel::modelIndexToOffset(const QModelIndex & index) const
+{
+ return index.row()*COLS + index.column();
+}
+//! [quoting mymodel_f]
diff --git a/examples/tutorials/modelview/5_edit/mymodel.h b/examples/tutorials/modelview/5_edit/mymodel.h
new file mode 100644
index 0000000000..0d2a1b881f
--- /dev/null
+++ b/examples/tutorials/modelview/5_edit/mymodel.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+#ifndef MYMODEL_H
+#define MYMODEL_H
+
+//! [Quoting ModelView Tutorial]
+// mymodel.h
+#include <QAbstractTableModel>
+#include <QStringList>
+
+class MyModel : public QAbstractTableModel
+{
+ Q_OBJECT
+public:
+ MyModel(QObject *parent);
+ int rowCount(const QModelIndex &parent = QModelIndex()) const ;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+ bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
+ Qt::ItemFlags flags(const QModelIndex & index) const ;
+private:
+ QStringList m_gridData; //holds text entered into QTableView
+ int modelIndexToOffset(const QModelIndex & index) const;
+signals:
+ void editCompleted(const QString &);
+};
+//! [Quoting ModelView Tutorial]
+
+#endif // MYMODEL_H
diff --git a/examples/tutorials/modelview/6_treeview/6_treeview.pro b/examples/tutorials/modelview/6_treeview/6_treeview.pro
new file mode 100644
index 0000000000..6d078be2d5
--- /dev/null
+++ b/examples/tutorials/modelview/6_treeview/6_treeview.pro
@@ -0,0 +1,5 @@
+TARGET = mv_tree
+TEMPLATE = app
+SOURCES += main.cpp \
+ modelview.cpp
+HEADERS += modelview.h
diff --git a/examples/tutorials/modelview/6_treeview/main.cpp b/examples/tutorials/modelview/6_treeview/main.cpp
new file mode 100644
index 0000000000..7be212e398
--- /dev/null
+++ b/examples/tutorials/modelview/6_treeview/main.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+#include <QtGui/QApplication>
+#include "modelview.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ ModelView w;
+ w.show();
+ return a.exec();
+}
diff --git a/examples/tutorials/modelview/6_treeview/modelview.cpp b/examples/tutorials/modelview/6_treeview/modelview.cpp
new file mode 100644
index 0000000000..772dbdd1d3
--- /dev/null
+++ b/examples/tutorials/modelview/6_treeview/modelview.cpp
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+//! [Quoting ModelView Tutorial]
+// modelview.cpp
+#include <QTreeView>
+#include <QStandardItemModel>
+#include <QStandardItem>
+#include "modelview.h"
+
+
+const int ROWS = 2;
+const int COLUMNS = 3;
+
+ModelView::ModelView(QWidget *parent)
+ : QMainWindow(parent)
+{
+ treeView = new QTreeView(this);
+ setCentralWidget(treeView);
+ standardModel = new QStandardItemModel ;
+
+ QList<QStandardItem *> preparedColumn =prepareColumn("first", "second", "third");
+ QStandardItem *item = standardModel->invisibleRootItem();
+ // adding a row to the invisible root item produces a root element
+ item->appendRow(preparedColumn);
+
+ QList<QStandardItem *> secondRow =prepareColumn("111", "222", "333");
+ // adding a row to an item starts a subtree
+ preparedColumn.first()->appendRow(secondRow);
+
+ treeView->setModel(standardModel);
+ treeView->expandAll();
+}
+
+QList<QStandardItem *> ModelView::prepareColumn(const QString &first,
+ const QString &second,
+ const QString &third)
+{
+ QList<QStandardItem *> colItems;
+ colItems << new QStandardItem(first);
+ colItems << new QStandardItem(second);
+ colItems << new QStandardItem(third);
+ return colItems;
+}
+//! [Quoting ModelView Tutorial]
diff --git a/examples/tutorials/modelview/6_treeview/modelview.h b/examples/tutorials/modelview/6_treeview/modelview.h
new file mode 100644
index 0000000000..55f3470115
--- /dev/null
+++ b/examples/tutorials/modelview/6_treeview/modelview.h
@@ -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 examples 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$
+**
+****************************************************************************/
+
+#ifndef MODELVIEW_H
+#define MODELVIEW_H
+
+#include <QtGui/QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QTreeView; //forward declaration
+class QStandardItemModel;
+class QStandardItem;
+QT_END_NAMESPACE
+
+class ModelView : public QMainWindow
+{
+ Q_OBJECT
+private:
+ QTreeView *treeView;
+ QStandardItemModel *standardModel;
+ QList<QStandardItem *> prepareColumn(const QString &first,
+ const QString &second,
+ const QString &third);
+public:
+ ModelView(QWidget *parent = 0);
+};
+
+#endif // MODELVIEW_H
diff --git a/examples/tutorials/modelview/7_selections/7_selections.pro b/examples/tutorials/modelview/7_selections/7_selections.pro
new file mode 100644
index 0000000000..952641c6d2
--- /dev/null
+++ b/examples/tutorials/modelview/7_selections/7_selections.pro
@@ -0,0 +1,5 @@
+TARGET = mv_selections
+TEMPLATE = app
+SOURCES += main.cpp \
+ modelview.cpp
+HEADERS += modelview.h
diff --git a/examples/tutorials/modelview/7_selections/main.cpp b/examples/tutorials/modelview/7_selections/main.cpp
new file mode 100644
index 0000000000..7be212e398
--- /dev/null
+++ b/examples/tutorials/modelview/7_selections/main.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+#include <QtGui/QApplication>
+#include "modelview.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ ModelView w;
+ w.show();
+ return a.exec();
+}
diff --git a/examples/tutorials/modelview/7_selections/modelview.cpp b/examples/tutorials/modelview/7_selections/modelview.cpp
new file mode 100644
index 0000000000..3b373c6bd6
--- /dev/null
+++ b/examples/tutorials/modelview/7_selections/modelview.cpp
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+//! [quoting modelview_a]
+#include <QTreeView>
+#include <QStandardItemModel>
+#include <QItemSelectionModel>
+#include "modelview.h"
+
+ModelView::ModelView(QWidget *parent)
+ : QMainWindow(parent)
+{
+ treeView = new QTreeView(this);
+ setCentralWidget(treeView);
+ standardModel = new QStandardItemModel ;
+ QStandardItem *rootNode = standardModel->invisibleRootItem();
+
+
+ //defining a couple of items
+ QStandardItem *americaItem = new QStandardItem("America");
+ QStandardItem *mexicoItem = new QStandardItem("Canada");
+ QStandardItem *usaItem = new QStandardItem("USA");
+ QStandardItem *bostonItem = new QStandardItem("Boston");
+ QStandardItem *europeItem = new QStandardItem("Europe");
+ QStandardItem *italyItem = new QStandardItem("Italy");
+ QStandardItem *romeItem = new QStandardItem("Rome");
+ QStandardItem *veronaItem = new QStandardItem("Verona");
+
+ //building up the hierarchy
+ rootNode-> appendRow(americaItem);
+ rootNode-> appendRow(europeItem);
+ americaItem-> appendRow(mexicoItem);
+ americaItem-> appendRow(usaItem);
+ usaItem-> appendRow(bostonItem);
+ europeItem-> appendRow(italyItem);
+ italyItem-> appendRow(romeItem);
+ italyItem-> appendRow(veronaItem);
+
+ //register the model
+ treeView->setModel(standardModel);
+ treeView->expandAll();
+
+ //selection changes shall trigger a slot
+ QItemSelectionModel *selectionModel= treeView->selectionModel();
+ connect(selectionModel, SIGNAL(selectionChanged (const QItemSelection &, const QItemSelection &)),
+ this, SLOT(selectionChangedSlot(const QItemSelection &, const QItemSelection &)));
+}
+//! [quoting modelview_a]
+
+//------------------------------------------------------------------------------------
+
+//! [quoting modelview_b]
+void ModelView::selectionChangedSlot(const QItemSelection & /*newSelection*/, const QItemSelection & /*oldSelection*/)
+{
+ const QModelIndex index = treeView->selectionModel()->currentIndex();
+ QString selectedText = index.data(Qt::DisplayRole).toString();
+ int hierarchyLevel=1;
+ QModelIndex seekRoot = index;
+ while(seekRoot.parent() != QModelIndex())
+ {
+ seekRoot = seekRoot.parent();
+ hierarchyLevel++;
+ }
+ QString showString = QString("%1, Level %2").arg(selectedText)
+ .arg(hierarchyLevel);
+ setWindowTitle(showString);
+}
+//! [quoting modelview_b]
+
+
diff --git a/examples/tutorials/modelview/7_selections/modelview.h b/examples/tutorials/modelview/7_selections/modelview.h
new file mode 100644
index 0000000000..d20797e6b1
--- /dev/null
+++ b/examples/tutorials/modelview/7_selections/modelview.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+#ifndef MODELVIEW_H
+#define MODELVIEW_H
+
+#include <QtGui/QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QTreeView; //forward declaration
+class QStandardItemModel;
+class QItemSelection;
+QT_END_NAMESPACE
+
+class ModelView : public QMainWindow
+{
+ Q_OBJECT
+private:
+ QTreeView *treeView;
+ QStandardItemModel *standardModel;
+private slots:
+ void selectionChangedSlot(const QItemSelection & newSelection, const QItemSelection & oldSelection);
+public:
+ ModelView(QWidget *parent = 0);
+};
+
+#endif // MODELVIEW_H
diff --git a/examples/tutorials/modelview/modelview.pro b/examples/tutorials/modelview/modelview.pro
new file mode 100644
index 0000000000..7f684bac18
--- /dev/null
+++ b/examples/tutorials/modelview/modelview.pro
@@ -0,0 +1,10 @@
+TEMPLATE = subdirs
+
+SUBDIRS = 1_readonly \
+ 2_formatting \
+ 3_changingmodel \
+ 4_headers \
+ 5_edit \
+ 6_treeview \
+ 7_selections
+
diff --git a/examples/tutorials/tutorials.pro b/examples/tutorials/tutorials.pro
index 949fdf6dcf..34723c222f 100644
--- a/examples/tutorials/tutorials.pro
+++ b/examples/tutorials/tutorials.pro
@@ -1,6 +1,8 @@
TEMPLATE = subdirs
SUBDIRS = \
- addressbook
+ addressbook \
+ modelview
+
# install
sources.files = README *.pro
diff --git a/examples/xml/htmlinfo/main.cpp b/examples/xml/htmlinfo/main.cpp
index 066edb6973..06fc33dd3c 100644
--- a/examples/xml/htmlinfo/main.cpp
+++ b/examples/xml/htmlinfo/main.cpp
@@ -94,7 +94,7 @@ void parseHtmlFile(QTextStream &out, const QString &fileName) {
int main(int argc, char **argv)
{
- // intialize QtCore application
+ // initialize QtCore application
QCoreApplication app(argc, argv);
// get a list of all html files in the current directory
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index c1b31e543c..7ec5c6c0ae 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -105,6 +105,7 @@ QMAKE_IDL = midl
QMAKE_LIB = ar -ru
QMAKE_RC = windres
QMAKE_ZIP = zip -r -9
+QMAKE_UNZIP = unzip -o
QMAKE_TAR = tar -cf
QMAKE_GZIP = gzip -9f
diff --git a/mkspecs/features/sis_targets.prf b/mkspecs/features/sis_targets.prf
index 19972d767d..99f59107d7 100644
--- a/mkspecs/features/sis_targets.prf
+++ b/mkspecs/features/sis_targets.prf
@@ -125,25 +125,27 @@ equals(GENERATE_SIS_TARGETS, true) {
QMAKE_EXTRA_TARGETS += store_build_target
}
} else {
+ qtPrepareTool(QMAKE_CREATEPACKAGE, createpackage)
+
sis_destdir = $$DESTDIR
isEmpty(sis_destdir):sis_destdir = .
baseTarget = $$basename(TARGET)
!equals(TARGET, "$$baseTarget"):sis_destdir = $$sis_destdir/$$dirname(TARGET)
sis_target.target = sis
- sis_target.commands = createpackage $(QT_SIS_OPTIONS) $${baseTarget}_template.pkg \
+ sis_target.commands = $$QMAKE_CREATEPACKAGE $(QT_SIS_OPTIONS) $${baseTarget}_template.pkg \
- $(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 $${baseTarget}_template.pkg
+ unsigned_sis_target.commands = $$QMAKE_CREATEPACKAGE $(QT_SIS_OPTIONS) -o $${baseTarget}_template.pkg
unsigned_sis_target.depends = first
target_sis_target.target = $${sis_destdir}/$${baseTarget}.sis
target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis
installer_sis_target.target = installer_sis
- installer_sis_target.commands = createpackage $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \
+ installer_sis_target.commands = $$QMAKE_CREATEPACKAGE $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \
$(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
installer_sis_target.depends = $${sis_destdir}/$${baseTarget}.sis
diff --git a/mkspecs/features/symbian/armcc_warnings.prf b/mkspecs/features/symbian/armcc_warnings.prf
index 72bc996202..3331bffeef 100644
--- a/mkspecs/features/symbian/armcc_warnings.prf
+++ b/mkspecs/features/symbian/armcc_warnings.prf
@@ -1,13 +1,22 @@
+# 68: integer conversion resulted in a change of sign (sounds useful, but it's
+# buggy and is reported even in places where it makes no sense)
# 111: Statement is unreachable
# 185: Dynamic initialization in unreachable code
+# 187: use of "=" where "==" may have been intended
# 191: Type qualifier is meaningless on cast type
# 368: class "<class>" defines no constructor to initialize the following: <member>
# (Disabled because there are other ways of assigning besides constructors)
+# 830: function "xxx" has no corresponding operator delete (to be called if an
+# exception is thrown during initialization of an allocated object) (used a
+# lot in 3rd party code)
+# 997: function "xxx" is hidden by "yyy" -- virtual function override intended?
+# (used all over the place in the Symbian SDK)
# 1293: Assignment in condition
# 1294: pre-ANSI C style functions declarations (used a lot in 3rd party code)
# 2874: <variable> may be used before being set (this one sounds useful, but
# it's output also for class instances, making it useless in practice)
-QMAKE_CFLAGS.ARMCC += --diag_suppress 111,185,191,368,1293,1294,2874
+QMAKE_CFLAGS.ARMCC += --diag_suppress 68,111,185,187,191,368,830,997,1293,1294,2874
+QMAKE_CXXFLAGS.ARMCC += --diag_suppress 68,111,185,187,191,368,830,997,1293,1294,2874
# 6780: <origvis> visibility removed from symbol '<symname>' through <impexp>
QMAKE_LFLAGS.ARMCC += --diag_suppress 6780
diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf
index ce124ec568..c119c90f2a 100644
--- a/mkspecs/features/symbian/symbian_building.prf
+++ b/mkspecs/features/symbian/symbian_building.prf
@@ -1,3 +1,11 @@
+linux-armcc {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS.ARMCC
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.ARMCC
+} else:linux-gcce {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS.GCCE
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.GCCE
+}
+
# We need a target name without the INFIX'ed part, since flags are not infixed.
equals(QMAKE_TARGET_PRODUCT, Qt4):clean_TARGET = $$replace(TARGET, "$${QT_LIBINFIX}$", "")
else:clean_TARGET = $$TARGET
@@ -34,29 +42,31 @@ contains(QMAKE_CFLAGS, "--thumb")|contains(QMAKE_CXXFLAGS, "--thumb")|contains(Q
DEFINES += __MARM_THUMB__
}
-defineReplace(processSymbianLibraries) {
- library = $$replace(1, "\\.dll$", ".dso")
- library = $$replace(library, "^-l", "")
- isFullName = $$find(library, \\.)
- isEmpty(isFullName):library="$${library}.dso"
- linux-gcce {
- newLIB = "-l:$${library}"
- } else {
- newLIB = "$${library}"
- }
- contains(library, "\\.dso$")|contains(library, "\\.lib$"):PRE_TARGETDEPS += $$library
- return($$newLIB)
+defineReplace(processSymbianLibrary) {
+ qt_library = $$replace(1, "\\.dll$", ".dso")
+ qt_library = $$replace(qt_library, "^-l", "")
+ isFullName = $$find(qt_library, \\.)
+ isEmpty(isFullName):qt_library="$${qt_library}.dso"
+ return($$qt_library)
}
-for(libraries, LIBS) {
- newLIBS += $$processSymbianLibraries($$libraries)
+qt_libraries = $$split(LIBS, " ")
+LIBS =
+for(qt_library, qt_libraries) {
+ qt_newLib = $$processSymbianLibrary($$qt_library)
+ contains(qt_newLib, ".*\\.dso$")|contains(qt_newLib, ".*\\.lib$"):PRE_TARGETDEPS += $$qt_newLib
+ linux-gcce:qt_newLib = "-l:$$qt_newLib"
+ LIBS += $$qt_newLib
}
-LIBS = $$newLIBS
-newLIBS =
-for(libraries, QMAKE_LIBS) {
- newLIBS += $$processSymbianLibraries($$libraries)
+
+qt_libraries = $$split(QMAKE_LIBS, " ")
+QMAKE_LIBS =
+for(qt_library, qt_libraries) {
+ qt_newLib = $$processSymbianLibrary($$qt_library)
+ contains(qt_newLib, ".*\\.dso$")|contains(qt_newLib, ".*\\.lib$"):PRE_TARGETDEPS += $$qt_newLib
+ linux-gcce:qt_newLib = "-l:$$qt_newLib"
+ QMAKE_LIBS += $$qt_newLib
}
-QMAKE_LIBS = $$newLIBS
elf2e32_LIBPATH =
for(libPath, QMAKE_LIBDIR) {
@@ -131,6 +141,7 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
$$capability \
$$QMAKE_ELF2E32_FLAGS \
$$QMAKE_POST_LINK
+ silent:QMAKE_POST_LINK = @echo postlinking $@ && $$QMAKE_POST_LINK
QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.sym
QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.dso
QMAKE_CLEAN += $${symbianObjdir}/$${baseTarget}.dso
@@ -154,7 +165,7 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
DEFINES += __DLL__
}
-contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") {
+contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") {
!isEmpty(QMAKE_POST_LINK) {
# No way to honor the '@' :-(
QMAKE_POST_LINK = $$replace(QMAKE_POST_LINK, "^@", "")
@@ -177,6 +188,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") {
$$QMAKE_ELF2E32_FLAGS \
&& ln "$${symbianDestdir}/$${baseTarget}.exe" "$${symbianDestdir}/$${baseTarget}" \
$$QMAKE_POST_LINK
+ silent:QMAKE_POST_LINK = @echo postlinking $@ && $$QMAKE_POST_LINK
QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.sym
QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.exe
QMAKE_CLEAN += $${symbianDestdir}/$${baseTarget}
@@ -243,6 +255,7 @@ symbianresources.commands = cpp -nostdinc -undef \
-o$${symbianDestdir}/${QMAKE_FILE_BASE}$${QT_LIBINFIX}.rsc \
-h$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}$${QT_LIBINFIX}.rsg \
-i${QMAKE_FILE_NAME}
+silent:symbianresources.commands = @echo rcomp $< && $$symbianresources.commands
symbianresources.dependency_type = TYPE_C
symbianresources.CONFIG = no_link target_predeps
@@ -266,6 +279,7 @@ contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") {
-o$${symbianDestdir}/$${baseResourceTarget}.rsc \
-h$${symbian_resources_RCC_DIR}/$${baseResourceTarget}.rsg \
-i$${baseResourceTarget}.rss
+ silent:symbianGenResource.commands = @echo rcomp $${baseResourceTarget}.rss && $$symbianGenResource.commands
symbianGenResource.depends = $${baseResourceTarget}.rss
PRE_TARGETDEPS += $${symbian_resources_RCC_DIR}/$${baseResourceTarget}.rsg
QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseResourceTarget}.rsg
@@ -284,6 +298,7 @@ contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") {
-o$${symbianDestdir}/$${baseResourceTarget}_reg.rsc \
-h$${symbian_resources_RCC_DIR}/$${baseResourceTarget}_reg.rsg \
-i$${baseResourceTarget}_reg.rss
+ silent:symbianGenRegResource.commands = @echo rcomp $${baseResourceTarget}_reg.rss && $$symbianGenRegResource.commands
symbianGenRegResource.depends = $${baseResourceTarget}_reg.rss $${symbian_resources_RCC_DIR}/$${baseResourceTarget}.rsg
PRE_TARGETDEPS += $${symbian_resources_RCC_DIR}/$${baseResourceTarget}_reg.rsg
QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseResourceTarget}_reg.rsg
diff --git a/mkspecs/features/uic.prf b/mkspecs/features/uic.prf
index 5324e65997..0a18b478ce 100644
--- a/mkspecs/features/uic.prf
+++ b/mkspecs/features/uic.prf
@@ -86,20 +86,20 @@ defineReplace(imageCollectionCmd) {
for(image, $$list($$split(1))) {
EMBEDDED_IMAGES += $$image
count(EMBEDDED_IMAGES, 5) {
- isEmpty(RET): RET += echo $$EMBEDDED_IMAGES > images.tmp $$escape_expand(\\n\\t)
- else: RET += echo $$EMBEDDED_IMAGES >> images.tmp $$escape_expand(\\n\\t)
+ isEmpty(RET): RET += echo $$EMBEDDED_IMAGES > $${UI_DIR}/images.tmp $$escape_expand(\\n\\t)
+ else: RET += echo $$EMBEDDED_IMAGES >> $${UI_DIR}/images.tmp $$escape_expand(\\n\\t)
unset(EMBEDDED_IMAGES)
}
}
- !isEmpty(EMBEDDED_IMAGES):RET += echo $$EMBEDDED_IMAGES >> images.tmp $$escape_expand(\\n\\t)
+ !isEmpty(EMBEDDED_IMAGES):RET += echo $$EMBEDDED_IMAGES >> $${UI_DIR}/images.tmp $$escape_expand(\\n\\t)
!isEmpty(RET) {
- RET += $$QMAKE_UIC3 -embed $$TARGET -f images.tmp -o $$2 $$escape_expand(\\n\\t)
+ RET += $$QMAKE_UIC3 -embed $$TARGET -f $${UI_DIR}/images.tmp -o $$2 $$escape_expand(\\n\\t)
return($$RET)
}
return($$QMAKE_UIC3 -embed $$TARGET $$1 -o $$2)
}
-image_collection.output = qmake_image_collection$${first(QMAKE_EXT_CPP)}
+image_collection.output = $${UI_DIR}/qmake_image_collection$${first(QMAKE_EXT_CPP)}
image_collection.variable_out = SOURCES
image_collection.input = IMAGES
image_collection.CONFIG += combine
@@ -109,7 +109,7 @@ image_collection.name = UIC3 Image collection in ${QMAKE_FILE_OUT}
silent:image_collection.commands = @echo uic3 -embed ${QMAKE_FILE_IN} && $$image_collection.commands
} else {
image_collection.commands = ${QMAKE_FUNC_imageCollectionCmd}
- silent:image_collection.commands = @echo uic3 -embed $$TARGET -f images.tmp && $image_collection.commands
+ silent:image_collection.commands = @echo uic3 -embed $$TARGET -f $${UI_DIR}/images.tmp && $image_collection.commands
}
QMAKE_EXTRA_COMPILERS += image_collection
diff --git a/mkspecs/linux-g++-maemo/qmake.conf b/mkspecs/linux-g++-maemo/qmake.conf
index cced09029e..a977e7ac42 100644
--- a/mkspecs/linux-g++-maemo/qmake.conf
+++ b/mkspecs/linux-g++-maemo/qmake.conf
@@ -27,7 +27,4 @@ QMAKE_CXXFLAGS_RELEASE += -g -fno-omit-frame-pointer -fno-optimize-sibling-call
# Work round PowerVR SGX 1.3 driver bug with glScissor & FBOs:
DEFINES += QT_GL_NO_SCISSOR_TEST
-# Work round SGX 1.4 driver bug (text corrupted), modify glyph cache width:
-DEFINES += QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024
-
load(qt_config)
diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf
index 77fb1eadc9..f8072e35bb 100644
--- a/mkspecs/symbian/linux-armcc/qmake.conf
+++ b/mkspecs/symbian/linux-armcc/qmake.conf
@@ -31,8 +31,8 @@ QMAKE_QtWebKit_CXXFLAGS = --arm
# Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000.
QMAKE_QtWebKit_LFLAGS = --rw-base 0xE00000
-QMAKE_CFLAGS += --dllimport_runtime --preinclude rvct2_2.h --diag_suppress 186,654,1300 --thumb --fpu softvfp --cpu 5T --enum_is_int -Ono_known_library --fpmode ieee_no_fenv --no_vfe --apcs /inter $$QMAKE_CFLAGS.ARMCC
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS $$QMAKE_CXXFLAGS.ARMCC
+QMAKE_CFLAGS += --dllimport_runtime --preinclude rvct2_2.h --diag_suppress 186,611,654,1300 --thumb --fpu softvfp --cpu 5T --enum_is_int -Ono_known_library --fpmode ieee_no_fenv --no_vfe --apcs /inter
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
QMAKE_LFLAGS += --symver_soname --diag_suppress 6331,6780 --bpabi --reloc --datacompressor=off --split --dll --no_scanlib
QMAKE_LFLAGS_APP += --entry _E32Startup
QMAKE_LFLAGS_SHLIB += --entry _E32Dll
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index d6b3e09d5b..45a96f51f8 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1756,6 +1756,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
}
QStringList tmp_dep = project->values((*it) + ".depends");
QString tmp_dep_cmd;
+ QString dep_cd_cmd;
if(!project->isEmpty((*it) + ".depend_command")) {
int argv0 = -1;
QStringList cmdline = project->values((*it) + ".depend_command");
@@ -1774,6 +1775,9 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
cmdline[argv0] = escapeFilePath(cmdline.at(argv0));
}
}
+ dep_cd_cmd = QLatin1String("cd ")
+ + escapeFilePath(Option::fixPathToLocalOS(Option::output_dir, false))
+ + QLatin1String(" && ");
}
QStringList &vars = project->values((*it) + ".variables");
if(tmp_out.isEmpty() || tmp_cmd.isEmpty())
@@ -1875,7 +1879,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
char buff[256];
QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, (*input),
tmp_out);
- dep_cmd = fixEnvVariables(dep_cmd);
+ dep_cmd = dep_cd_cmd + fixEnvVariables(dep_cmd);
if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) {
QString indeps;
while(!feof(proc)) {
@@ -1973,7 +1977,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
if(!tmp_dep_cmd.isEmpty() && doDepends()) {
char buff[256];
QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, (*input), out);
- dep_cmd = fixEnvVariables(dep_cmd);
+ dep_cmd = dep_cd_cmd + fixEnvVariables(dep_cmd);
if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) {
QString indeps;
while(!feof(proc)) {
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
index e153ba940c..e80e2c5880 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
@@ -91,7 +91,7 @@ static void thaiWordBreaks(const HB_UChar16 *string, hb_uint32 len, HB_CharAttri
for (i = 0; i < numbreaks; ++i) {
if (break_positions[i] > 0) {
attributes[break_positions[i]-1].lineBreakType = HB_Break;
- attributes[i].wordBoundary = TRUE;
+ attributes[break_positions[i]-1].wordBoundary = TRUE;
}
}
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h
index e4f2f91acd..4a38df90ab 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h
@@ -97,14 +97,12 @@ namespace JSC {
inline LiveObjectIterator& LiveObjectIterator::operator++()
{
- if (m_block < m_heap.nextBlock || m_cell < m_heap.nextCell) {
- advance(HeapConstants::cellsPerBlock);
+ advance(HeapConstants::cellsPerBlock - 1);
+ if (m_block < m_heap.nextBlock || (m_block == m_heap.nextBlock && m_cell < m_heap.nextCell))
return *this;
- }
- do {
- advance(HeapConstants::cellsPerBlock);
- } while (m_block < m_heap.usedBlocks && !m_heap.blocks[m_block]->marked.get(m_cell));
+ while (m_block < m_heap.usedBlocks && !m_heap.blocks[m_block]->marked.get(m_cell))
+ advance(HeapConstants::cellsPerBlock - 1);
return *this;
}
diff --git a/src/3rdparty/libconninet.pri b/src/3rdparty/libconninet.pri
new file mode 100644
index 0000000000..e041e2b913
--- /dev/null
+++ b/src/3rdparty/libconninet.pri
@@ -0,0 +1,18 @@
+INCLUDEPATH += $$PWD/libconninet/src
+
+QMAKE_CXXFLAGS += $$QT_CFLAGS_GLIB
+
+HEADERS += \
+ $$PWD/libconninet/src/dbusdispatcher.h \
+ $$PWD/libconninet/src/iapconf.h \
+ $$PWD/libconninet/src/iapmonitor.h \
+ $$PWD/libconninet/src/maemo_icd.h \
+ $$PWD/libconninet/src/proxyconf.h
+
+SOURCES += \
+ $$PWD/libconninet/src/dbusdispatcher.cpp \
+ $$PWD/libconninet/src/iapconf.cpp \
+ $$PWD/libconninet/src/iapmonitor.cpp \
+ $$PWD/libconninet/src/maemo_icd.cpp \
+ $$PWD/libconninet/src/proxyconf.cpp
+
diff --git a/src/3rdparty/libconninet/AUTHORS b/src/3rdparty/libconninet/AUTHORS
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/src/3rdparty/libconninet/AUTHORS
diff --git a/src/3rdparty/libconninet/COPYING b/src/3rdparty/libconninet/COPYING
new file mode 100644
index 0000000000..b124cf5812
--- /dev/null
+++ b/src/3rdparty/libconninet/COPYING
@@ -0,0 +1,510 @@
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes a de-facto standard. To achieve this, non-free programs must
+be allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control
+compilation and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at least
+ three years, to give the same user the materials specified in
+ Subsection 6a, above, for a charge no more than the cost of
+ performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply, and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License
+may add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms
+of the ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library.
+It is safest to attach them to the start of each source file to most
+effectively convey the exclusion of warranty; and each file should
+have at least the "copyright" line and a pointer to where the full
+notice is found.
+
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or
+your school, if any, to sign a "copyright disclaimer" for the library,
+if necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James
+ Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/src/3rdparty/libconninet/ChangeLog b/src/3rdparty/libconninet/ChangeLog
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/src/3rdparty/libconninet/ChangeLog
diff --git a/src/3rdparty/libconninet/INSTALL b/src/3rdparty/libconninet/INSTALL
new file mode 100644
index 0000000000..54caf7c190
--- /dev/null
+++ b/src/3rdparty/libconninet/INSTALL
@@ -0,0 +1,229 @@
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
+Foundation, Inc.
+
+ This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+ These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes awhile. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory. After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+ By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the `--target=TYPE' option to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+will cause the specified gcc to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+`configure' Invocation
+======================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+ Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
diff --git a/src/3rdparty/libconninet/Makefile.am b/src/3rdparty/libconninet/Makefile.am
new file mode 100644
index 0000000000..250637ae87
--- /dev/null
+++ b/src/3rdparty/libconninet/Makefile.am
@@ -0,0 +1,49 @@
+SUBDIRS = src tests
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = conninet.pc
+
+MAINTAINERCLEANFILES = \
+ Makefile.in config.h.in configure \
+ install-sh ltmain.sh missing mkinstalldirs \
+ config.log config.status config.guess config.sub \
+ build-stamp compile depcomp acinclude.m4 aclocal.m4 \
+ debian/files \
+ debian/libconninet0.postinst.debhelper \
+ debian/libconninet0.postrm.debhelper \
+ debian/libconninet0.substvars
+
+EXTRA_DIST = \
+ debian/changelog \
+ debian/compat \
+ debian/control \
+ debian/copyright \
+ debian/libconninet0-dev.dirs \
+ debian/libconninet0-dev.files \
+ debian/libconninet0.dirs \
+ debian/libconninet0.files \
+ debian/rules
+
+# get rid of debian build dirs
+maintainer-clean-local:
+ -rm -rf debian/build debian/tmp \
+ debian/libconninet0 \
+ debian/libconninet0-dev \
+ debian/libconninet0-dbg
+
+if DOXYGEN_DOCS_ENABLED
+ DOXYGEN_LINE = $(DOXYGEN) doxygen.cfg
+else
+ DOXYGEN_LINE =
+endif
+
+.PHONY : doc
+
+doc:
+ $(DOXYGEN_LINE)
+
+deb: dist
+ -mkdir $(top_builddir)/debian-build
+ cd $(top_builddir)/debian-build && tar zxf ../$(top_builddir)/$(PACKAGE)-$(VERSION).tar.gz
+ cd $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION) && dpkg-buildpackage -rfakeroot -sa -D
+ -rm -rf $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION)
diff --git a/src/3rdparty/libconninet/NEWS b/src/3rdparty/libconninet/NEWS
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/src/3rdparty/libconninet/NEWS
diff --git a/src/3rdparty/libconninet/README b/src/3rdparty/libconninet/README
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/src/3rdparty/libconninet/README
diff --git a/src/3rdparty/libconninet/autogen.sh b/src/3rdparty/libconninet/autogen.sh
new file mode 100755
index 0000000000..a8fd885ec5
--- /dev/null
+++ b/src/3rdparty/libconninet/autogen.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+autoreconf --verbose --install --force
diff --git a/src/3rdparty/libconninet/config.guess b/src/3rdparty/libconninet/config.guess
new file mode 100755
index 0000000000..e3a2116a7d
--- /dev/null
+++ b/src/3rdparty/libconninet/config.guess
@@ -0,0 +1,1533 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# Free Software Foundation, Inc.
+
+timestamp='2009-06-10'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[456])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:[3456]*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T | authenticamd | genuineintel)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
+ test x"${LIBC}" != x && {
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit
+ }
+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/src/3rdparty/libconninet/config.sub b/src/3rdparty/libconninet/config.sub
new file mode 100755
index 0000000000..eb0389a693
--- /dev/null
+++ b/src/3rdparty/libconninet/config.sub
@@ -0,0 +1,1693 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# Free Software Foundation, Inc.
+
+timestamp='2009-06-11'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
+ tile*)
+ basic_machine=tile-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -kopensolaris* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/src/3rdparty/libconninet/configure.ac b/src/3rdparty/libconninet/configure.ac
new file mode 100644
index 0000000000..2a383ee130
--- /dev/null
+++ b/src/3rdparty/libconninet/configure.ac
@@ -0,0 +1,90 @@
+AC_INIT([libconninet], patsubst(esyscmd([dpkg-parsechangelog | sed -n '/^Version: \(.*\)$/ {s//\1/;p}']), [
+]), [jukka.rissanen@nokia.com])
+AM_INIT_AUTOMAKE([foreign])
+
+AC_PROG_CXX
+AC_PROG_LIBTOOL
+
+AC_ARG_ENABLE(docs, [ --enable-docs Build DOXYGEN documentation (requires Doxygen)],enable_docs=$enableval,enable_docs=auto)
+
+AC_PATH_PROG(DOXYGEN, doxygen, no)
+AC_MSG_CHECKING([whether to build Doxygen documentation])
+
+if test x$DOXYGEN = xno ; then
+ have_doxygen=no
+else
+ have_doxygen=yes
+fi
+if test x$enable_docs = xauto ; then
+ if test x$have_doxygen = xno ; then
+ enable_docs=no
+ else
+ enable_docs=yes
+ fi
+fi
+if test x$enable_docs = xyes; then
+ if test x$have_doxygen = xno; then
+ AC_MSG_ERROR([Building Doxygen docs explicitly required, but Doxygen not found])
+ else
+ AC_MSG_RESULT(yes)
+ fi
+else
+ AC_MSG_RESULT(no)
+fi
+
+AM_CONDITIONAL(DOXYGEN_DOCS_ENABLED, test x$enable_docs = xyes)
+AC_SUBST(DOXYGEN)
+
+PKG_CHECK_MODULES(GLIB, glib-2.0)
+AC_SUBST(GLIB_CFLAGS)
+AC_SUBST(GLIB_LIBS)
+
+PKG_CHECK_MODULES(QTCORE, QtCore)
+AC_SUBST(QTCORE_CFLAGS)
+AC_SUBST(QTCORE_LIBS)
+
+PKG_CHECK_MODULES(QTNETWORK, QtNetwork)
+AC_SUBST(QTNETWORK_CFLAGS)
+AC_SUBST(QTNETWORK_LIBS)
+
+PKG_CHECK_MODULES(QTDBUS, QtDBus)
+AC_SUBST(QTDBUS_CFLAGS)
+AC_SUBST(QTDBUS_LIBS)
+
+PKG_CHECK_MODULES(QTTEST, QtTest)
+AC_SUBST(QTTEST_CFLAGS)
+AC_SUBST(QTTEST_LIBS)
+
+PKG_CHECK_MODULES(DBUS, dbus-glib-1)
+AC_SUBST(DBUS_CFLAGS)
+AC_SUBST(DBUS_LIBS)
+
+PKG_CHECK_MODULES(CONNSETTINGS, connsettings)
+AC_SUBST(CONNSETTINGS_CFLAGS)
+AC_SUBST(CONNSETTINGS_LIBS)
+
+PKG_CHECK_MODULES(OSSO_IC, osso-ic)
+AC_SUBST(OSSO_IC_CFLAGS)
+AC_SUBST(OSSO_IC_LIBS)
+
+PKG_CHECK_MODULES(ICD_DEV, icd2)
+AC_SUBST(ICD_DEV_CFLAGS)
+AC_SUBST(ICD_DEV_LIBS)
+
+PKG_CHECK_MODULES(GCONF, gconf-2.0)
+AC_SUBST(GCONF_CFLAGS)
+AC_SUBST(GCONF_LIBS)
+
+PKG_CHECK_MODULES(QGCONF, gq-gconf)
+AC_SUBST(QGCONF_CFLAGS)
+AC_SUBST(QGCONF_LIBS)
+
+CONCFLAGS="-Wall -Werror -Wmissing-prototypes"
+AC_SUBST(CONCFLAGS)
+
+AC_CONFIG_FILES([Makefile \
+ src/Makefile \
+ tests/Makefile \
+ conninet.pc \
+ doxygen.cfg])
+AC_OUTPUT
diff --git a/src/3rdparty/libconninet/conninet.pc.in b/src/3rdparty/libconninet/conninet.pc.in
new file mode 100644
index 0000000000..68cdee02fb
--- /dev/null
+++ b/src/3rdparty/libconninet/conninet.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libconninet
+Description: Internet Connectivity support library
+Version: @VERSION@
+Requires: dbus-1 >= 0.60 glib-2.0 QtCore QtDBus QtGui
+Libs: -lconninet
+Cflags: -I${includedir}/conninet
diff --git a/src/3rdparty/libconninet/debian/changelog b/src/3rdparty/libconninet/debian/changelog
new file mode 100644
index 0000000000..436d318d7e
--- /dev/null
+++ b/src/3rdparty/libconninet/debian/changelog
@@ -0,0 +1,285 @@
+libconninet (0.41+0m6) unstable; urgency=low
+
+ * This entry has been added by BIFH queue processor
+ version has been changed to 0.41+0m6
+
+ -- Qing Jin <ext-qing.1.jin@nokia.com> Thu, 15 Jul 2010 15:56:38 +0300
+
+libconninet (0.41) unstable; urgency=low
+
+ * Fixes: NB#175098 - Qt4.7 Webkit crashes when bearer API QNetworkSession
+ constructor calls QNetworkSession::syncStateWithInterface() which in turn
+ calls Maemo::state() and Maemo::addrinfo() and webkit expects that event
+ loop is not run but those function process main loop events.
+ Now Maemo::state() and Maemo::addrinfo() are changed to be synchronous
+ and fully blocking functions. The old non-blocking versions are called
+ Maemo::state_non_blocking() and Maemo::addrinfo_non_blocking().
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Wed, 14 Jul 2010 10:12:47 +0300
+
+libconninet (0.40) unstable; urgency=low
+
+ * Fixes: NB#167465 - Unable to open network connection using libbearer
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Tue, 11 May 2010 10:47:10 +0300
+
+libconninet (0.39) unstable; urgency=low
+
+ * Fixes: NB#167982 - initialize DBus vtable in DBusDispatcher.
+
+ -- Aapo Makela <aapo.makela@nokia.com> Mon, 10 May 2010 14:42:39 +0300
+
+libconninet (0.38) unstable; urgency=low
+
+ * Changing icd2 connect_req to be synchronous as the check for
+ returned connect signal did not work correctly, this caused a
+ long timeout when connect() was called.
+ * Scan sometimes missed results and did not return them to caller.
+ * HTTP proxy settings were not set correctly.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Thu, 15 Apr 2010 11:25:06 +0300
+
+libconninet (0.37) unstable; urgency=low
+
+ * Make proxy config reference counting atomic.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Wed, 3 Mar 2010 13:23:08 +0200
+
+libconninet (0.36) unstable; urgency=low
+
+ * Fixes: NB#157586 - Cleanup dbus listener when WLAN scanning object is
+ deleted.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Fri, 26 Feb 2010 13:30:41 +0200
+
+libconninet (0.35) unstable; urgency=low
+
+ * Fixes: NB#156883 - libconninet fails to build under the Platform SDK (SB2)
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Thu, 18 Feb 2010 12:14:40 +0200
+
+libconninet (0.34) unstable; urgency=low
+
+ * Coverity fix
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Tue, 16 Feb 2010 16:38:00 +0200
+
+libconninet (0.33) unstable; urgency=low
+
+ * Added API to update Qt proxy config.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Tue, 26 Jan 2010 15:48:36 +0200
+
+libconninet (0.32) unstable; urgency=low
+
+ * Fixed IAPConf to unset value when set value is invalid.
+ * Updated IAPMonitor to use libconnsettings.
+
+ -- Aapo Makela <aapo.makela@nokia.com> Wed, 03 Feb 2010 07:32:45 +0200
+
+libconninet (0.31) unstable; urgency=low
+
+ * Fixes: NB#154892 - Check nulls in IAPConf.
+
+ -- Aapo Makela <aapo.makela@nokia.com> Mon, 01 Feb 2010 09:32:06 +0200
+
+libconninet (0.30) unstable; urgency=low
+
+ * Updated IAPConf to use libconnsettings.
+
+ -- Aapo Makela <aapo.makela@nokia.com> Fri, 29 Jan 2010 12:58:03 +0200
+
+libconninet (0.29) unstable; urgency=low
+
+ * Fixed dependencies
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Fri, 15 Jan 2010 10:16:07 +0200
+
+libconninet (0.28) unstable; urgency=low
+
+ * Get rid of libdui dependency
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Wed, 13 Jan 2010 09:56:26 +0200
+
+libconninet (0.27) unstable; urgency=low
+
+ * Insert new pending calls to the list in DBusDispatcher.
+
+ -- Aapo Makela <aapo.makela@nokia.com> Tue, 22 Dec 2009 14:27:32 +0200
+
+libconninet (0.26) unstable; urgency=low
+
+ * Added possibility to specify different signal path for DBusDispatcher.
+
+ -- Aapo Makela <aapo.makela@nokia.com> Wed, 25 Nov 2009 14:27:34 +0200
+
+libconninet (0.25) unstable; urgency=low
+
+ * Fixes: NB#146450 - All scan results were not returned to the caller.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Mon, 16 Nov 2009 17:23:15 +0200
+
+libconninet (0.24) unstable; urgency=low
+
+ * Wait all scan results for all network types in Maemo::Icd::scan()
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Fri, 6 Nov 2009 14:45:23 +0200
+
+libconninet (0.23) unstable; urgency=low
+
+ * Fixes: NB#143361 - Assert failure in session class for GPRS IAP.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Mon, 19 Oct 2009 16:00:14 +0300
+
+libconninet (0.22) unstable; urgency=low
+
+ * Fixed the error checking if scan returns 0 results.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Wed, 7 Oct 2009 13:50:27 +0300
+
+libconninet (0.21) unstable; urgency=low
+
+ * Support multiple DBusDispatcher classes at the same time. This is
+ required by Maemo::Icd class so that multiple instances of it can
+ be used the same time.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Mon, 5 Oct 2009 16:33:43 +0300
+
+libconninet (0.20) unstable; urgency=low
+
+ * Fixed memory leak in IAPConf::setValue()
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Fri, 2 Oct 2009 13:02:21 +0300
+
+libconninet (0.19) unstable; urgency=low
+
+ * Fixed connect_req to one specific IAP in Icd class.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Tue, 29 Sep 2009 17:02:46 +0300
+
+libconninet (0.18) unstable; urgency=low
+
+ * Make sure the library will not abort in Icd class if scan does
+ not return any results.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Tue, 22 Sep 2009 17:00:12 +0300
+
+libconninet (0.17) unstable; urgency=low
+
+ * Added IAP monitoring support.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Mon, 21 Sep 2009 16:29:31 +0300
+
+libconninet (0.16) unstable; urgency=low
+
+ * Disabled the old osso-ic dbus interface as it is currently not used.
+ * Fixed the addrinfo request, now addresses are returned correctly to
+ the caller.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Thu, 17 Sep 2009 15:56:13 +0300
+
+libconninet (0.15) unstable; urgency=low
+
+ * Enabling state_req, statistics_req and addrinfo_req support
+ functions in Maemo::Icd as the corresponding DBUS API functions are
+ fixed in icd2 v0.89
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Fri, 24 Jul 2009 15:23:02 +0300
+
+libconninet (0.14) unstable; urgency=low
+
+ * Icd statistics support added.
+ * Icd address information support added.
+ * Icd scan method does not return the final (and empty) result any more.
+ * Added initial unit test implementation for Icd class.
+ * Some of the status functions in Icd class disabled because of issues
+ in icd2 and the dbus api.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Thu, 23 Jul 2009 11:03:05 +0300
+
+libconninet (0.13) unstable; urgency=low
+
+ * Added API to get all the configured IAPs.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Tue, 21 Jul 2009 09:47:18 +0300
+
+libconninet (0.12) unstable; urgency=low
+
+ * Replaced duivaluespace by Dui in pkg-config file because the
+ duivaluespace is deprecated.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Mon, 20 Jul 2009 16:00:10 +0300
+
+libconninet (0.11) unstable; urgency=low
+
+ * Using libdui instead of libduivaluespace because it is deprecated.
+ * The IAPConf::clear() uses native gconf API instead of launching gconftool
+ * Check that state_req call returned list and the list contains entries
+ before trying to access it.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Mon, 20 Jul 2009 14:55:15 +0300
+
+libconninet (0.10) unstable; urgency=low
+
+ * connect() did not return ok when connection succeeded.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Thu, 25 Jun 2009 09:31:21 +0300
+
+libconninet (0.9) unstable; urgency=low
+
+ * Connection timeout set to 2.5min, same as in fremantle.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Wed, 17 Jun 2009 13:36:40 +0300
+
+libconninet (0.8) unstable; urgency=low
+
+ * Fix state_req signal received from Icd
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Thu, 11 Jun 2009 17:19:33 +0300
+
+libconninet (0.7) unstable; urgency=low
+
+ * Icd disconnect and select reqs are made synchronous as we do not
+ wait the return status. The previous async version was causing core
+ dumps if Icd class was destroyed too early.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Thu, 11 Jun 2009 11:52:36 +0300
+
+libconninet (0.6) unstable; urgency=low
+
+ * Fixed the libconninet0-dev dependencies.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Mon, 8 Jun 2009 10:47:56 +0300
+
+libconninet (0.5) unstable; urgency=low
+
+ * Fixed missing QObject connect functions.
+ * Fixed IAPConf to return invalid QVariant if the value does not exist.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Mon, 01 Jun 2009 13:58:53 +0300
+
+libconninet (0.4) unstable; urgency=low
+
+ * Fixed QObject signal setting for Maemo::Icd
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Wed, 20 May 2009 13:51:11 +0300
+
+libconninet (0.3) unstable; urgency=low
+
+ * Refactoring classes
+ * Added IAPConf class.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Thu, 14 May 2009 13:24:11 +0300
+
+libconninet (0.2) unstable; urgency=low
+
+ * Fixed pkgconfig file which had wrong dependency
+ * Added DBus array and struct support to DBusDispatcher.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Wed, 13 May 2009 12:11:00 +0300
+
+libconninet (0.1) unstable; urgency=low
+
+ * Initial Release.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Tue, 12 May 2009 16:10:27 +0200
diff --git a/src/3rdparty/libconninet/debian/compat b/src/3rdparty/libconninet/debian/compat
new file mode 100644
index 0000000000..b8626c4cff
--- /dev/null
+++ b/src/3rdparty/libconninet/debian/compat
@@ -0,0 +1 @@
+4
diff --git a/src/3rdparty/libconninet/debian/control b/src/3rdparty/libconninet/debian/control
new file mode 100644
index 0000000000..2db660f4d5
--- /dev/null
+++ b/src/3rdparty/libconninet/debian/control
@@ -0,0 +1,39 @@
+Source: libconninet
+Priority: optional
+Maintainer: Jukka Rissanen <jukka.rissanen@nokia.com>
+Build-Depends: debhelper (>= 4.0.0), autotools-dev, libglib2.0-dev (>= 2.8),
+ libdbus-1-dev (>= 0.60), libconnsettings0-dev (>= 0.4), icd2-osso-ic-dev,
+ icd2-dev, libqt4-dev, libgconf2-dev (>> 2.6.4), libgq-gconf-dev
+Standards-Version: 3.6.2
+Section: libs
+
+Package: libconninet0-dev
+Section: libdevel
+Architecture: any
+Depends: libconninet0 (= ${Source-Version}), libdbus-1-dev (>= 0.60),
+ libglib2.0-dev (>= 2.8), libconnsettings0-dev (>= 0.4), libqt4-dev,
+ icd2-osso-ic-dev, icd2-dev, libgconf2-dev (>> 2.6.4), libgq-gconf-dev
+Description: Internet Connectivity support library development files
+ Internet Connectivity support library (libconninet) provides common
+ support functions for connecting to icd2 and accessing configuration
+ data.
+ .
+ This package contains the header files.
+
+Package: libconninet0
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Internet Connectivity support library
+ Internet Connectivity support library (libconninet) provides common
+ support functions for connecting to icd2 and accessing configuration
+ data.
+ .
+ This package contains the shared libraries.
+
+Package: libconninet0-dbg
+Section: libs
+Architecture: any
+Depends: libconninet0 (= ${Source-Version}), ${shlibs:Depends}, ${misc:Depends}
+Description: Debug symbols for the Internet Connectivity support library
+ Internet Connectivity support library (libconninet) debug symbols.
diff --git a/src/3rdparty/libconninet/debian/copyright b/src/3rdparty/libconninet/debian/copyright
new file mode 100644
index 0000000000..97e8e68905
--- /dev/null
+++ b/src/3rdparty/libconninet/debian/copyright
@@ -0,0 +1,19 @@
+libconninet - Internet Connectivity support library
+
+Copyright (C) 2009 Nokia Corporation. All rights reserved.
+
+Contact: Jukka Rissanen <jukka.rissanen@nokia.com>
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License version 2.1
+as published by the Free Software Foundation.
+
+This library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA
diff --git a/src/3rdparty/libconninet/debian/libconninet0-dev.dirs b/src/3rdparty/libconninet/debian/libconninet0-dev.dirs
new file mode 100644
index 0000000000..44188162ec
--- /dev/null
+++ b/src/3rdparty/libconninet/debian/libconninet0-dev.dirs
@@ -0,0 +1,2 @@
+usr/lib
+usr/include
diff --git a/src/3rdparty/libconninet/debian/libconninet0-dev.files b/src/3rdparty/libconninet/debian/libconninet0-dev.files
new file mode 100644
index 0000000000..78bbac8f47
--- /dev/null
+++ b/src/3rdparty/libconninet/debian/libconninet0-dev.files
@@ -0,0 +1,4 @@
+usr/include/*
+usr/lib/lib*.so
+usr/lib/pkgconfig/*
+usr/share/pkgconfig/*
diff --git a/src/3rdparty/libconninet/debian/libconninet0.dirs b/src/3rdparty/libconninet/debian/libconninet0.dirs
new file mode 100644
index 0000000000..68457717bd
--- /dev/null
+++ b/src/3rdparty/libconninet/debian/libconninet0.dirs
@@ -0,0 +1 @@
+usr/lib
diff --git a/src/3rdparty/libconninet/debian/libconninet0.files b/src/3rdparty/libconninet/debian/libconninet0.files
new file mode 100644
index 0000000000..d0dbfd18ac
--- /dev/null
+++ b/src/3rdparty/libconninet/debian/libconninet0.files
@@ -0,0 +1 @@
+usr/lib/lib*.so.*
diff --git a/src/3rdparty/libconninet/debian/rules b/src/3rdparty/libconninet/debian/rules
new file mode 100755
index 0000000000..2a3d395be6
--- /dev/null
+++ b/src/3rdparty/libconninet/debian/rules
@@ -0,0 +1,123 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+# shared library versions, option 1
+#version=2.0.5
+#major=2
+# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
+version=`ls src/.libs/lib*.so.* | \
+ awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
+major=`ls src/.libs/lib*.so.* | \
+ awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
+
+configure: configure.ac debian/changelog
+ -./autogen.sh
+
+config.status: configure
+ dh_testdir
+ # Add here commands to configure the package.
+ CFLAGS="$(CFLAGS)" ./configure \
+ --host=$(DEB_HOST_GNU_TYPE) \
+ --build=$(DEB_BUILD_GNU_TYPE) \
+ --prefix=/usr \
+ --mandir=\$${prefix}/share/man \
+ --infodir=\$${prefix}/share/info
+
+
+build: build-stamp
+build-stamp: config.status
+ dh_testdir
+
+ # Add here commands to compile the package.
+ $(MAKE)
+
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+
+ # Add here commands to clean up after the build process.
+ -$(MAKE) distclean
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+ cp -f /usr/share/misc/config.sub config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+ cp -f /usr/share/misc/config.guess config.guess
+endif
+
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/tmp
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_movefiles
+ dh_installchangelogs ChangeLog
+ dh_installdocs
+ dh_installexamples
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman
+ dh_link
+ dh_strip --dbg-package=libconninet0
+ dh_compress
+ dh_fixperms
+# dh_perl
+# dh_python
+ dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
diff --git a/src/3rdparty/libconninet/doxygen.cfg.in b/src/3rdparty/libconninet/doxygen.cfg.in
new file mode 100644
index 0000000000..80a4c8dcea
--- /dev/null
+++ b/src/3rdparty/libconninet/doxygen.cfg.in
@@ -0,0 +1,1147 @@
+# Doxyfile 1.3.7
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = "Internet Connectivity Support Library"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER = @VERSION@
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = doc
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 2 levels of 10 sub-directories under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of source
+# files, where putting all generated files in the same directory would otherwise
+# cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch,
+# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en
+# (Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese,
+# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE = English
+
+# This tag can be used to specify the encoding used in the generated output.
+# The encoding is not always determined by the language that is chosen,
+# but also whether or not the output is meant for Windows or non-Windows users.
+# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
+# forces the Windows encoding (this is the default for the Windows binary),
+# whereas setting the tag to NO uses a Unix-style encoding (the default for
+# all platforms other than Windows).
+
+USE_WINDOWS_ENCODING = NO
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is used
+# as the annotated text. Otherwise, the brief description is used as-is. If left
+# blank, the following values are used ("$name" is automatically replaced with the
+# name of the entity): "The $name class" "The $name widget" "The $name file"
+# "is" "provides" "specifies" "contains" "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
+# members of a class in the documentation of that class as if those members were
+# ordinary class members. Constructors, destructors and assignment operators of
+# the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like the Qt-style comments (thus requiring an
+# explicit @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF = YES
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member
+# documentation.
+
+DETAILS_AT_TOP = YES
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
+# only. Doxygen will then generate output that is more tailored for Java.
+# For instance, namespaces will be presented as packages, qualified scopes
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = YES
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text.
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = conic/conic.h \
+ conic/conicconnection.h \
+ conic/conicconnectionevent.h \
+ conic/conicevent.h \
+ conic/coniciap.h \
+ conic/conicstatisticsevent.h
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
+# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
+
+FILE_PATTERNS =
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
+# that are symbolic links (a Unix filesystem feature) are excluded from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+
+EXCLUDE_PATTERNS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.
+
+INPUT_FILTER =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default)
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default)
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = YES
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET =
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader. This is useful
+# if you want to understand what is going on. On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse the
+# parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or
+# super classes. Setting the tag to NO turns the diagrams off. Note that this
+# option is superseded by the HAVE_DOT option below. This is only a fallback. It is
+# recommended to install and use dot, since it yields more powerful graphs.
+
+CLASS_DIAGRAMS = YES
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
+# generate a call dependency graph for every global function or class method.
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+
+CALL_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found on the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_WIDTH = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT = 1024
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes that
+# lay further from the root node will be omitted. Note that setting this option to
+# 1 or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that a graph may be further truncated if the graph's image dimensions are
+# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT).
+# If 0 is used for the depth value (the default), the graph is not depth-constrained.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE = NO
diff --git a/src/3rdparty/libconninet/src/Makefile.am b/src/3rdparty/libconninet/src/Makefile.am
new file mode 100644
index 0000000000..be7a1e52d8
--- /dev/null
+++ b/src/3rdparty/libconninet/src/Makefile.am
@@ -0,0 +1,36 @@
+DEFS = -DDBUS_API_SUBJECT_TO_CHANGE -DGCONF_DISABLE_DEPRECATED
+INCLUDES = @GLIB_CFLAGS@ @DBUS_CFLAGS@ @GCONF_CFLAGS@ @OSSO_IC_CFLAGS@ @ICD_DEV_CFLAGS@ @QTCORE_CFLAGS@ @QTNETWORK_CFLAGS@ @QTDBUS_CFLAGS@ @QGCONF_CFLAGS@ @CONNSETTINGS_CFLAGS@
+LIBS = @GLIB_LIBS@ @DBUS_LIBS@ @GCONF_LIBS@ @OSSO_IC_LIBS@ @ICD_DEV_LIBS@ @QTCORE_LIBS@ @QTDBUS_LIBS@ @QTNETWORK_CFLAGS@ @QGCONF_LIBS@ @CONNSETTINGS_LIBS@
+
+AM_CFLAGS = $(CONCFLAGS)
+
+lib_LTLIBRARIES = libconninet.la
+libconninet_la_SOURCES = \
+ maemo_icd.cpp \
+ dbusdispatcher.cpp \
+ iapconf.cpp \
+ iapmonitor.cpp \
+ proxyconf.cpp
+
+#libconninet_la_LDFLAGS = -version-info 0:0:0
+
+conninetincludedir = $(includedir)/conninet
+conninetinclude_HEADERS = \
+ maemo_icd.h \
+ dbusdispatcher.h \
+ iapconf.h \
+ iapmonitor.h \
+ proxyconf.h
+
+nodist_libconninet_la_SOURCES = \
+ moc_maemo_icd.cpp \
+ moc_dbusdispatcher.cpp
+
+MAINTAINERCLEANFILES = Makefile.in
+
+# This rule lets GNU make create any moc_*.cpp from the equivalent *.h
+moc_%.cpp: %.h
+ moc $< -o $@
+
+# This line ensures that generated moc files are deleted when we make clean.
+CLEANFILES = *_moc.cpp *.loT
diff --git a/src/3rdparty/libconninet/src/dbusdispatcher.cpp b/src/3rdparty/libconninet/src/dbusdispatcher.cpp
new file mode 100644
index 0000000000..758198255a
--- /dev/null
+++ b/src/3rdparty/libconninet/src/dbusdispatcher.cpp
@@ -0,0 +1,611 @@
+/* * This file is part of conninet *
+ *
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * Contact: Aapo Makela <aapo.makela@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+#include <QDebug>
+#include <QtCore>
+#include <poll.h>
+#include <dbus/dbus.h>
+#include <dbus/dbus-glib-lowlevel.h>
+#include <glib.h>
+#include "dbusdispatcher.h"
+
+namespace Maemo {
+
+/*!
+ \class DBusDispatcher
+
+ \brief DBusDispatcher is a class, which is able to send DBUS method call
+ messages and receive unicast signals from DBUS object.
+*/
+
+class DBusDispatcherPrivate
+{
+public:
+ DBusDispatcherPrivate(const QString& service,
+ const QString& path,
+ const QString& interface,
+ const QString& signalPath)
+ : service(service), path(path), interface(interface),
+ signalPath(signalPath), connection(0)
+ {
+ memset(&signal_vtable, 0, sizeof(signal_vtable));
+ }
+
+ ~DBusDispatcherPrivate()
+ {
+ foreach(DBusPendingCall *call, pending_calls) {
+ dbus_pending_call_cancel(call);
+ dbus_pending_call_unref(call);
+ }
+ }
+
+ QString service;
+ QString path;
+ QString interface;
+ QString signalPath;
+ struct DBusConnection *connection;
+ QList<DBusPendingCall *> pending_calls;
+ struct DBusObjectPathVTable signal_vtable;
+};
+
+static bool constantVariantList(const QVariantList& variantList) {
+ // Special case, empty list == empty struct
+ if (variantList.isEmpty()) {
+ return false;
+ } else {
+ QVariant::Type type = variantList[0].type();
+ // Iterate items in the list and check if they are same type
+ foreach(QVariant variant, variantList) {
+ if (variant.type() != type) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+static QString variantToSignature(const QVariant& argument,
+ bool constantList = true) {
+ switch (argument.type()) {
+ case QVariant::Bool:
+ return "b";
+ case QVariant::ByteArray:
+ return "ay";
+ case QVariant::Char:
+ return "y";
+ case QVariant::Int:
+ return "i";
+ case QVariant::UInt:
+ return "u";
+ case QVariant::StringList:
+ return "as";
+ case QVariant::String:
+ return "s";
+ case QVariant::LongLong:
+ return "x";
+ case QVariant::ULongLong:
+ return "t";
+ case QVariant::List:
+ {
+ QString signature;
+ QVariantList variantList = argument.toList();
+ if (!constantList) {
+ signature += DBUS_STRUCT_BEGIN_CHAR_AS_STRING;
+ foreach(QVariant listItem, variantList) {
+ signature += variantToSignature(listItem);
+ }
+ signature += DBUS_STRUCT_END_CHAR_AS_STRING;
+ } else {
+ if (variantList.isEmpty())
+ return "";
+ signature = "a" + variantToSignature(variantList[0]);
+ }
+
+ return signature;
+ }
+ default:
+ qDebug() << "Unsupported variant type: " << argument.type();
+ break;
+ }
+
+ return "";
+}
+
+static bool appendVariantToDBusMessage(const QVariant& argument,
+ DBusMessageIter *dbus_iter) {
+ int idx = 0;
+ DBusMessageIter array_iter;
+ QStringList str_list;
+ dbus_bool_t bool_data;
+ dbus_int32_t int32_data;
+ dbus_uint32_t uint32_data;
+ dbus_int64_t int64_data;
+ dbus_uint64_t uint64_data;
+ char *str_data;
+ char char_data;
+
+ switch (argument.type()) {
+
+ case QVariant::Bool:
+ bool_data = argument.toBool();
+ dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_BOOLEAN,
+ &bool_data);
+ break;
+
+ case QVariant::ByteArray:
+ str_data = argument.toByteArray().data();
+ dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY,
+ DBUS_TYPE_BYTE_AS_STRING, &array_iter);
+ dbus_message_iter_append_fixed_array(&array_iter,
+ DBUS_TYPE_BYTE,
+ &str_data,
+ argument.toByteArray().size());
+ dbus_message_iter_close_container(dbus_iter, &array_iter);
+ break;
+
+ case QVariant::Char:
+ char_data = argument.toChar().toAscii();
+ dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_BYTE,
+ &char_data);
+ break;
+
+ case QVariant::Int:
+ int32_data = argument.toInt();
+ dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_INT32,
+ &int32_data);
+ break;
+
+ case QVariant::String:
+ str_data = argument.toString().toLatin1().data();
+ dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_STRING,
+ &str_data);
+ break;
+
+ case QVariant::StringList:
+ str_list = argument.toStringList();
+ dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY,
+ "s", &array_iter);
+ for (idx = 0; idx < str_list.size(); idx++) {
+ str_data = str_list.at(idx).toLatin1().data();
+ dbus_message_iter_append_basic(&array_iter,
+ DBUS_TYPE_STRING,
+ &str_data);
+ }
+ dbus_message_iter_close_container(dbus_iter, &array_iter);
+ break;
+
+ case QVariant::UInt:
+ uint32_data = argument.toUInt();
+ dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_UINT32,
+ &uint32_data);
+ break;
+
+ case QVariant::ULongLong:
+ uint64_data = argument.toULongLong();
+ dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_UINT64,
+ &uint64_data);
+ break;
+
+ case QVariant::LongLong:
+ int64_data = argument.toLongLong();
+ dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_INT64,
+ &int64_data);
+ break;
+
+ case QVariant::List:
+ {
+ QVariantList variantList = argument.toList();
+ bool constantList = constantVariantList(variantList);
+ DBusMessageIter array_iter;
+
+ // List is mapped either as an DBUS array (all items same type)
+ // DBUS struct (variable types) depending on constantList
+ if (constantList) {
+ // Resolve the signature for the first item
+ QString signature = "";
+ if (!variantList.isEmpty()) {
+ signature = variantToSignature(
+ variantList[0],
+ constantVariantList(variantList[0].toList()));
+ }
+
+ // Mapped as DBUS array
+ dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY,
+ signature.toAscii(),
+ &array_iter);
+
+ foreach(QVariant listItem, variantList) {
+ appendVariantToDBusMessage(listItem, &array_iter);
+ }
+
+ dbus_message_iter_close_container(dbus_iter, &array_iter);
+ } else {
+ // Mapped as DBUS struct
+ dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_STRUCT,
+ NULL,
+ &array_iter);
+
+ foreach(QVariant listItem, variantList) {
+ appendVariantToDBusMessage(listItem, &array_iter);
+ }
+
+ dbus_message_iter_close_container(dbus_iter, &array_iter);
+ }
+
+ break;
+ }
+ default:
+ qDebug() << "Unsupported variant type: " << argument.type();
+ break;
+ }
+
+ return true;
+}
+
+static QVariant getVariantFromDBusMessage(DBusMessageIter *iter) {
+ dbus_bool_t bool_data;
+ dbus_int32_t int32_data;
+ dbus_uint32_t uint32_data;
+ dbus_int64_t int64_data;
+ dbus_uint64_t uint64_data;
+ char *str_data;
+ char char_data;
+ int argtype = dbus_message_iter_get_arg_type(iter);
+
+ switch (argtype) {
+
+ case DBUS_TYPE_BOOLEAN:
+ {
+ dbus_message_iter_get_basic(iter, &bool_data);
+ QVariant variant((bool)bool_data);
+ return variant;
+ }
+
+ case DBUS_TYPE_ARRAY:
+ {
+ // Handle all arrays here
+ int elem_type = dbus_message_iter_get_element_type(iter);
+ DBusMessageIter array_iter;
+
+ dbus_message_iter_recurse(iter, &array_iter);
+
+ if (elem_type == DBUS_TYPE_BYTE) {
+ QByteArray byte_array;
+ do {
+ dbus_message_iter_get_basic(&array_iter, &char_data);
+ byte_array.append(char_data);
+ } while (dbus_message_iter_next(&array_iter));
+ QVariant variant(byte_array);
+ return variant;
+ } else if (elem_type == DBUS_TYPE_STRING) {
+ QStringList str_list;
+ do {
+ dbus_message_iter_get_basic(&array_iter, &str_data);
+ str_list.append(str_data);
+ } while (dbus_message_iter_next(&array_iter));
+ QVariant variant(str_list);
+ return variant;
+ } else {
+ QVariantList variantList;
+ do {
+ variantList << getVariantFromDBusMessage(&array_iter);
+ } while (dbus_message_iter_next(&array_iter));
+ QVariant variant(variantList);
+ return variant;
+ }
+ break;
+ }
+
+ case DBUS_TYPE_BYTE:
+ {
+ dbus_message_iter_get_basic(iter, &char_data);
+ QChar ch(char_data);
+ QVariant variant(ch);
+ return variant;
+ }
+
+ case DBUS_TYPE_INT32:
+ {
+ dbus_message_iter_get_basic(iter, &int32_data);
+ QVariant variant((int)int32_data);
+ return variant;
+ }
+
+ case DBUS_TYPE_UINT32:
+ {
+ dbus_message_iter_get_basic(iter, &uint32_data);
+ QVariant variant((uint)uint32_data);
+ return variant;
+ }
+
+ case DBUS_TYPE_STRING:
+ {
+ dbus_message_iter_get_basic(iter, &str_data);
+ QString str(str_data);
+ QVariant variant(str);
+ return variant;
+ }
+
+ case DBUS_TYPE_INT64:
+ {
+ dbus_message_iter_get_basic(iter, &int64_data);
+ QVariant variant((qlonglong)int64_data);
+ return variant;
+ }
+
+ case DBUS_TYPE_UINT64:
+ {
+ dbus_message_iter_get_basic(iter, &uint64_data);
+ QVariant variant((qulonglong)uint64_data);
+ return variant;
+ }
+
+ case DBUS_TYPE_STRUCT:
+ {
+ // Handle all structs here
+ DBusMessageIter struct_iter;
+ dbus_message_iter_recurse(iter, &struct_iter);
+
+ QVariantList variantList;
+ do {
+ variantList << getVariantFromDBusMessage(&struct_iter);
+ } while (dbus_message_iter_next(&struct_iter));
+ QVariant variant(variantList);
+ return variant;
+ }
+
+ default:
+ qDebug() << "Unsupported DBUS type: " << argtype;
+ }
+
+ return QVariant();
+}
+
+static DBusHandlerResult signalHandler (DBusConnection *connection,
+ DBusMessage *message,
+ void *object_ref) {
+ (void)connection;
+ QString interface;
+ QString signal;
+ DBusDispatcher *dispatcher = (DBusDispatcher *)object_ref;
+
+ if (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_SIGNAL) {
+ interface = dbus_message_get_interface(message);
+ signal = dbus_message_get_member(message);
+
+ QList<QVariant> arglist;
+ DBusMessageIter dbus_iter;
+
+ if (dbus_message_iter_init(message, &dbus_iter)) {
+ // Read return arguments
+ while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) {
+ arglist << getVariantFromDBusMessage(&dbus_iter);
+ dbus_message_iter_next(&dbus_iter);
+ }
+ }
+
+ dispatcher->emitSignalReceived(interface, signal, arglist);
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+ (void)message;
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+DBusDispatcher::DBusDispatcher(const QString& service,
+ const QString& path,
+ const QString& interface,
+ QObject *parent)
+ : QObject(parent),
+ d_ptr(new DBusDispatcherPrivate(service, path, interface, path)) {
+ setupDBus();
+}
+
+DBusDispatcher::DBusDispatcher(const QString& service,
+ const QString& path,
+ const QString& interface,
+ const QString& signalPath,
+ QObject *parent)
+ : QObject(parent),
+ d_ptr(new DBusDispatcherPrivate(service, path, interface, signalPath)) {
+ setupDBus();
+}
+
+DBusDispatcher::~DBusDispatcher()
+{
+ if (d_ptr->connection) {
+ dbus_connection_close(d_ptr->connection);
+ dbus_connection_unref(d_ptr->connection);
+ }
+ delete d_ptr;
+}
+
+void DBusDispatcher::setupDBus()
+{
+ d_ptr->connection = dbus_bus_get_private(DBUS_BUS_SYSTEM, NULL);
+
+ if (d_ptr->connection == NULL)
+ qDebug() << "Unable to get DBUS connection!";
+ else {
+ d_ptr->signal_vtable.message_function = signalHandler;
+
+ dbus_connection_set_exit_on_disconnect(d_ptr->connection, FALSE);
+ dbus_connection_setup_with_g_main(d_ptr->connection, NULL);
+ dbus_connection_register_object_path(d_ptr->connection,
+ d_ptr->signalPath.toLatin1(),
+ &d_ptr->signal_vtable,
+ this);
+ }
+}
+
+static DBusMessage *prepareDBusCall(const QString& service,
+ const QString& path,
+ const QString& interface,
+ const QString& method,
+ const QVariant& arg1 = QVariant(),
+ const QVariant& arg2 = QVariant(),
+ const QVariant& arg3 = QVariant(),
+ const QVariant& arg4 = QVariant(),
+ const QVariant& arg5 = QVariant(),
+ const QVariant& arg6 = QVariant(),
+ const QVariant& arg7 = QVariant(),
+ const QVariant& arg8 = QVariant())
+{
+ DBusMessage *message = dbus_message_new_method_call(service.toLatin1(),
+ path.toLatin1(),
+ interface.toLatin1(),
+ method.toLatin1());
+ DBusMessageIter dbus_iter;
+
+ // Append variants to DBUS message
+ QList<QVariant> arglist;
+ if (arg1.isValid()) arglist << arg1;
+ if (arg2.isValid()) arglist << arg2;
+ if (arg3.isValid()) arglist << arg3;
+ if (arg4.isValid()) arglist << arg4;
+ if (arg5.isValid()) arglist << arg5;
+ if (arg6.isValid()) arglist << arg6;
+ if (arg7.isValid()) arglist << arg7;
+ if (arg8.isValid()) arglist << arg8;
+
+ dbus_message_iter_init_append (message, &dbus_iter);
+
+ while (!arglist.isEmpty()) {
+ QVariant argument = arglist.takeFirst();
+ appendVariantToDBusMessage(argument, &dbus_iter);
+ }
+
+ return message;
+}
+
+QList<QVariant> DBusDispatcher::call(const QString& method,
+ const QVariant& arg1,
+ const QVariant& arg2,
+ const QVariant& arg3,
+ const QVariant& arg4,
+ const QVariant& arg5,
+ const QVariant& arg6,
+ const QVariant& arg7,
+ const QVariant& arg8) {
+ DBusMessageIter dbus_iter;
+ DBusMessage *message = prepareDBusCall(d_ptr->service, d_ptr->path,
+ d_ptr->interface, method,
+ arg1, arg2, arg3, arg4, arg5,
+ arg6, arg7, arg8);
+ DBusMessage *reply = dbus_connection_send_with_reply_and_block(
+ d_ptr->connection,
+ message, -1, NULL);
+ dbus_message_unref(message);
+
+ QList<QVariant> replylist;
+ if (reply != NULL && dbus_message_iter_init(reply, &dbus_iter)) {
+ // Read return arguments
+ while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) {
+ replylist << getVariantFromDBusMessage(&dbus_iter);
+ dbus_message_iter_next(&dbus_iter);
+ }
+ }
+ if (reply != NULL) dbus_message_unref(reply);
+ return replylist;
+}
+
+class PendingCallInfo {
+public:
+ QString method;
+ DBusDispatcher *dispatcher;
+ DBusDispatcherPrivate *priv;
+};
+
+static void freePendingCallInfo(void *memory) {
+ PendingCallInfo *info = (PendingCallInfo *)memory;
+ delete info;
+}
+
+static void pendingCallFunction (DBusPendingCall *pending,
+ void *memory) {
+ PendingCallInfo *info = (PendingCallInfo *)memory;
+ QString errorStr;
+ QList<QVariant> replyList;
+ DBusMessage *reply = dbus_pending_call_steal_reply (pending);
+
+ Q_ASSERT(reply != NULL);
+
+ if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR) {
+ errorStr = dbus_message_get_error_name (reply);
+ } else {
+ DBusMessageIter dbus_iter;
+ dbus_message_iter_init(reply, &dbus_iter);
+ // Read return arguments
+ while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) {
+ replyList << getVariantFromDBusMessage(&dbus_iter);
+ dbus_message_iter_next(&dbus_iter);
+ }
+ }
+
+ info->priv->pending_calls.removeOne(pending);
+ info->dispatcher->emitCallReply(info->method, replyList, errorStr);
+ dbus_message_unref(reply);
+ dbus_pending_call_unref(pending);
+}
+
+bool DBusDispatcher::callAsynchronous(const QString& method,
+ const QVariant& arg1,
+ const QVariant& arg2,
+ const QVariant& arg3,
+ const QVariant& arg4,
+ const QVariant& arg5,
+ const QVariant& arg6,
+ const QVariant& arg7,
+ const QVariant& arg8) {
+ DBusMessage *message = prepareDBusCall(d_ptr->service, d_ptr->path,
+ d_ptr->interface, method,
+ arg1, arg2, arg3, arg4, arg5,
+ arg6, arg7, arg8);
+ DBusPendingCall *call = NULL;
+ dbus_bool_t ret = dbus_connection_send_with_reply(d_ptr->connection,
+ message, &call, -1);
+ PendingCallInfo *info = new PendingCallInfo;
+ info->method = method;
+ info->dispatcher = this;
+ info->priv = d_ptr;
+
+ dbus_pending_call_set_notify(call, pendingCallFunction, info, freePendingCallInfo);
+ d_ptr->pending_calls.append(call);
+ return (bool)ret;
+}
+
+void DBusDispatcher::emitSignalReceived(const QString& interface,
+ const QString& signal,
+ const QList<QVariant>& args) {
+ emit signalReceived(interface, signal, args); }
+
+void DBusDispatcher::emitCallReply(const QString& method,
+ const QList<QVariant>& args,
+ const QString& error) {
+ emit callReply(method, args, error); }
+
+void DBusDispatcher::synchronousDispatch(int timeout_ms)
+{
+ dbus_connection_read_write_dispatch(d_ptr->connection, timeout_ms);
+}
+
+} // Maemo namespace
+
diff --git a/src/3rdparty/libconninet/src/dbusdispatcher.h b/src/3rdparty/libconninet/src/dbusdispatcher.h
new file mode 100644
index 0000000000..2f71b6f0dd
--- /dev/null
+++ b/src/3rdparty/libconninet/src/dbusdispatcher.h
@@ -0,0 +1,91 @@
+/* * This file is part of conn-dui-settings-inet *
+ *
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * Contact: Aapo Makela <aapo.makela@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+#ifndef DBUSDISPATCHER_H
+#define DBUSDISPATCHER_H
+
+#include <QObject>
+#include <QVariant>
+
+namespace Maemo {
+
+class DBusDispatcherPrivate;
+class DBusDispatcher : public QObject
+{
+ Q_OBJECT
+
+public:
+ DBusDispatcher(const QString& service,
+ const QString& path,
+ const QString& interface,
+ QObject *parent = 0);
+ DBusDispatcher(const QString& service,
+ const QString& path,
+ const QString& interface,
+ const QString& signalPath,
+ QObject *parent = 0);
+ ~DBusDispatcher();
+
+ QList<QVariant> call(const QString& method,
+ const QVariant& arg1 = QVariant(),
+ const QVariant& arg2 = QVariant(),
+ const QVariant& arg3 = QVariant(),
+ const QVariant& arg4 = QVariant(),
+ const QVariant& arg5 = QVariant(),
+ const QVariant& arg6 = QVariant(),
+ const QVariant& arg7 = QVariant(),
+ const QVariant& arg8 = QVariant());
+ bool callAsynchronous(const QString& method,
+ const QVariant& arg1 = QVariant(),
+ const QVariant& arg2 = QVariant(),
+ const QVariant& arg3 = QVariant(),
+ const QVariant& arg4 = QVariant(),
+ const QVariant& arg5 = QVariant(),
+ const QVariant& arg6 = QVariant(),
+ const QVariant& arg7 = QVariant(),
+ const QVariant& arg8 = QVariant());
+ void emitSignalReceived(const QString& interface,
+ const QString& signal,
+ const QList<QVariant>& args);
+ void emitCallReply(const QString& method,
+ const QList<QVariant>& args,
+ const QString& error = "");
+ void synchronousDispatch(int timeout_ms);
+
+Q_SIGNALS:
+ void signalReceived(const QString& interface,
+ const QString& signal,
+ const QList<QVariant>& args);
+ void callReply(const QString& method,
+ const QList<QVariant>& args,
+ const QString& error);
+
+protected:
+ void setupDBus();
+
+private:
+ DBusDispatcherPrivate *d_ptr;
+};
+
+} // Maemo namespace
+
+#endif
diff --git a/src/3rdparty/libconninet/src/iapconf.cpp b/src/3rdparty/libconninet/src/iapconf.cpp
new file mode 100644
index 0000000000..2e77fa568f
--- /dev/null
+++ b/src/3rdparty/libconninet/src/iapconf.cpp
@@ -0,0 +1,299 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2009-2010 Nokia Corporation. All rights reserved.
+
+ Contact: Aapo Makela <aapo.makela@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include <conn_settings.h>
+
+#include "iapconf.h"
+
+#define QSTRING_TO_CONST_CSTR(str) \
+ str.toUtf8().constData()
+
+namespace Maemo {
+
+class IAPConfPrivate {
+public:
+ ConnSettings *settings;
+
+ ConnSettingsValue *variantToValue(const QVariant &variant);
+ QVariant valueToVariant(ConnSettingsValue *value);
+};
+
+ConnSettingsValue *IAPConfPrivate::variantToValue(const QVariant &variant)
+{
+ // Convert variant to ConnSettingsValue
+ ConnSettingsValue *value = conn_settings_value_new();
+ if (value == 0) {
+ qWarning("IAPConf: Unable to create new ConnSettingsValue");
+ return 0;
+ }
+
+ switch(variant.type()) {
+
+ case QVariant::Invalid:
+ value->type = CONN_SETTINGS_VALUE_INVALID;
+ break;
+
+ case QVariant::String: {
+ char *valueStr = strdup(QSTRING_TO_CONST_CSTR(variant.toString()));
+ value->type = CONN_SETTINGS_VALUE_STRING;
+ value->value.string_val = valueStr;
+ break;
+ }
+
+ case QVariant::Int:
+ value->type = CONN_SETTINGS_VALUE_INT;
+ value->value.int_val = variant.toInt();
+ break;
+
+ case QMetaType::Float:
+ case QVariant::Double:
+ value->type = CONN_SETTINGS_VALUE_DOUBLE;
+ value->value.double_val = variant.toDouble();
+ break;
+
+ case QVariant::Bool:
+ value->type = CONN_SETTINGS_VALUE_BOOL;
+ value->value.bool_val = variant.toBool() ? 1 : 0;
+ break;
+
+ case QVariant::ByteArray: {
+ QByteArray array = variant.toByteArray();
+ value->type = CONN_SETTINGS_VALUE_BYTE_ARRAY;
+ value->value.byte_array.len = array.size();
+ value->value.byte_array.val = (unsigned char *)malloc(array.size());
+ memcpy(value->value.byte_array.val, array.constData(), array.size());
+ break;
+ }
+
+ case QVariant::List: {
+ QVariantList list = variant.toList();
+ ConnSettingsValue **list_val = (ConnSettingsValue **)malloc(
+ (list.size() + 1) * sizeof(ConnSettingsValue *));
+
+ for (int idx = 0; idx < list.size(); idx++) {
+ list_val[idx] = variantToValue(list.at(idx));
+ }
+ list_val[list.size()] = 0;
+
+ value->type = CONN_SETTINGS_VALUE_LIST;
+ value->value.list_val = list_val;
+ break;
+ }
+
+ default:
+ qWarning("IAPConf: Can not handle QVariant of type %d",
+ variant.type());
+ conn_settings_value_destroy(value);
+ return 0;
+ }
+
+ return value;
+}
+
+QVariant IAPConfPrivate::valueToVariant(ConnSettingsValue *value)
+{
+ if (value == 0 || value->type == CONN_SETTINGS_VALUE_INVALID) {
+ return QVariant();
+ }
+
+ switch(value->type) {
+
+ case CONN_SETTINGS_VALUE_BOOL:
+ return QVariant(value->value.bool_val ? true : false);
+
+ case CONN_SETTINGS_VALUE_STRING:
+ return QVariant(QString(value->value.string_val));
+
+ case CONN_SETTINGS_VALUE_DOUBLE:
+ return QVariant(value->value.double_val);
+
+ case CONN_SETTINGS_VALUE_INT:
+ return QVariant(value->value.int_val);
+
+ case CONN_SETTINGS_VALUE_LIST: {
+ // At least with GConf backend connsettings returns byte array as list
+ // of ints, first check for that case
+ if (value->value.list_val && value->value.list_val[0]) {
+ bool canBeConvertedToByteArray = true;
+ for (int idx = 0; value->value.list_val[idx]; idx++) {
+ ConnSettingsValue *val = value->value.list_val[idx];
+ if (val->type != CONN_SETTINGS_VALUE_INT
+ || val->value.int_val > 255
+ || val->value.int_val < 0) {
+ canBeConvertedToByteArray = false;
+ break;
+ }
+ }
+
+ if (canBeConvertedToByteArray) {
+ QByteArray array;
+ for (int idx = 0; value->value.list_val[idx]; idx++) {
+ array.append(value->value.list_val[idx]->value.int_val);
+ }
+ return array;
+ }
+
+ // Create normal list
+ QVariantList list;
+ for (int idx = 0; value->value.list_val[idx]; idx++) {
+ list.append(valueToVariant(value->value.list_val[idx]));
+ }
+ return list;
+ }
+ }
+
+ case CONN_SETTINGS_VALUE_BYTE_ARRAY:
+ return QByteArray::fromRawData((char *)value->value.byte_array.val,
+ value->value.byte_array.len);
+
+ default:
+ return QVariant();
+ }
+}
+
+// Public class implementation
+
+IAPConf::IAPConf(const QString &iap_id)
+ : d_ptr(new IAPConfPrivate)
+{
+ d_ptr->settings = conn_settings_open(CONN_SETTINGS_CONNECTION,
+ QSTRING_TO_CONST_CSTR(iap_id));
+ if (d_ptr->settings == 0) {
+ qWarning("IAPConf: Unable to open ConnSettings for %s",
+ QSTRING_TO_CONST_CSTR(iap_id));
+ }
+}
+
+IAPConf::~IAPConf()
+{
+ conn_settings_close(d_ptr->settings);
+ delete d_ptr;
+}
+
+void IAPConf::setValue(const QString& key, const QVariant& value)
+{
+ // Invalid value means unsetting the given key
+ if (!value.isValid()) {
+ int err = conn_settings_unset(d_ptr->settings,
+ QSTRING_TO_CONST_CSTR(key));
+ if (err != CONN_SETTINGS_E_NO_ERROR) {
+ qWarning("IAPConf: unable to unset key %s: %s",
+ QSTRING_TO_CONST_CSTR(key),
+ conn_settings_error_text((ConnSettingsError)err));
+ }
+ return;
+ }
+
+ // Convert value to ConnSettingsValue
+ ConnSettingsValue *val = d_ptr->variantToValue(value);
+ if (val == 0) return;
+
+ // Set value and handle errors
+ int error = conn_settings_set(d_ptr->settings,
+ QSTRING_TO_CONST_CSTR(key),
+ val);
+ if (error != CONN_SETTINGS_E_NO_ERROR) {
+ qWarning("IAPConf: error in setting key %s: %s",
+ QSTRING_TO_CONST_CSTR(key),
+ conn_settings_error_text((ConnSettingsError)error));
+ }
+
+ // Destroy value
+ conn_settings_value_destroy(val);
+ return;
+}
+
+void IAPConf::set(const QString& key1, const QVariant& value1,
+ const QString& key2, const QVariant& value2,
+ const QString& key3, const QVariant& value3,
+ const QString& key4, const QVariant& value4,
+ const QString& key5, const QVariant& value5,
+ const QString& key6, const QVariant& value6,
+ const QString& key7, const QVariant& value7,
+ const QString& key8, const QVariant& value8,
+ const QString& key9, const QVariant& value9,
+ const QString& key10, const QVariant& value10)
+{
+ if (!key1.isEmpty()) setValue(key1, value1);
+ if (!key2.isEmpty()) setValue(key2, value2);
+ if (!key3.isEmpty()) setValue(key3, value3);
+ if (!key4.isEmpty()) setValue(key4, value4);
+ if (!key5.isEmpty()) setValue(key5, value5);
+ if (!key6.isEmpty()) setValue(key6, value6);
+ if (!key7.isEmpty()) setValue(key7, value7);
+ if (!key8.isEmpty()) setValue(key8, value8);
+ if (!key9.isEmpty()) setValue(key9, value9);
+ if (!key10.isEmpty()) setValue(key10, value10);
+}
+
+QVariant IAPConf::value(const QString& key) const
+{
+ ConnSettingsValue *val = conn_settings_get(d_ptr->settings,
+ QSTRING_TO_CONST_CSTR(key));
+
+ QVariant variant = d_ptr->valueToVariant(val);
+ conn_settings_value_destroy(val);
+ return variant;
+}
+
+void IAPConf::clear(const char *default_path)
+{
+ Q_UNUSED(default_path); // default path is unused
+
+ int error = conn_settings_remove(d_ptr->settings);
+ if (error != CONN_SETTINGS_E_NO_ERROR) {
+ qWarning("IAPConf: Error when removing IAP: %s",
+ conn_settings_error_text((ConnSettingsError)error));
+ }
+}
+
+void IAPConf::clearAll()
+{
+ ConnSettings *settings = conn_settings_open(CONN_SETTINGS_CONNECTION,
+ NULL);
+ conn_settings_remove(settings);
+ conn_settings_close(settings);
+}
+
+
+void IAPConf::getAll(QList<QString> &all_iaps, bool return_path)
+{
+ Q_UNUSED(return_path); // We don't use return path currently
+
+ // Go through all available connections and add them to the list
+ char **ids = conn_settings_list_ids(CONN_SETTINGS_CONNECTION);
+ if (ids == 0) {
+ // No ids found - nothing to do
+ return;
+ }
+
+ for (int idx = 0; ids[idx]; idx++) {
+ all_iaps.append(QString(ids[idx]));
+ free(ids[idx]);
+ }
+ free(ids);
+}
+
+
+} // namespace Maemo
diff --git a/src/3rdparty/libconninet/src/iapconf.h b/src/3rdparty/libconninet/src/iapconf.h
new file mode 100644
index 0000000000..57c08566c9
--- /dev/null
+++ b/src/3rdparty/libconninet/src/iapconf.h
@@ -0,0 +1,84 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2009 Nokia Corporation. All rights reserved.
+
+ Contact: Aapo Makela <aapo.makela@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+#ifndef IAPCONF_H
+#define IAPCONF_H
+
+#include <QString>
+#include <QVariant>
+
+namespace Maemo {
+
+class IAPConfPrivate;
+class IAPConf {
+public:
+ IAPConf(const QString &iap_id);
+ virtual ~IAPConf();
+
+ /**
+ Convenience method for setting multiple IAP values with one call.
+ */
+ void set(const QString& key1, const QVariant& value1,
+ const QString& key2 = "", const QVariant& value2 = QVariant(),
+ const QString& key3 = "", const QVariant& value3 = QVariant(),
+ const QString& key4 = "", const QVariant& value4 = QVariant(),
+ const QString& key5 = "", const QVariant& value5 = QVariant(),
+ const QString& key6 = "", const QVariant& value6 = QVariant(),
+ const QString& key7 = "", const QVariant& value7 = QVariant(),
+ const QString& key8 = "", const QVariant& value8 = QVariant(),
+ const QString& key9 = "", const QVariant& value9 = QVariant(),
+ const QString& key10 = "", const QVariant& value10 = QVariant());
+
+ /**
+ Set one IAP value.
+ */
+ void setValue(const QString& key, const QVariant& value);
+
+ /**
+ Get one IAP value.
+ */
+ QVariant value(const QString& key) const;
+
+ /**
+ Clear this IAP from GConf
+ */
+ void clear(const char *default_path=0);
+
+ /**
+ Clear all IAP specific information from GConf (including all IAPs).
+ DO NOT USE THIS FUNCTION IN ANYWHERE ELSE EXCEPT IN TEST CODE!
+ */
+ void clearAll();
+
+ /**
+ Return all the IAPs found in the system. If return_path is true,
+ then do not strip the IAP path away.
+ */
+ static void getAll(QList<QString> &all_iaps, bool return_path=false);
+
+private:
+ IAPConfPrivate *d_ptr;
+};
+
+} // namespace Maemo
+
+#endif
diff --git a/src/3rdparty/libconninet/src/iapmonitor.cpp b/src/3rdparty/libconninet/src/iapmonitor.cpp
new file mode 100644
index 0000000000..c44cbc8392
--- /dev/null
+++ b/src/3rdparty/libconninet/src/iapmonitor.cpp
@@ -0,0 +1,110 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2009-2010 Nokia Corporation. All rights reserved.
+
+ Contact: Jukka Rissanen <jukka.rissanen@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+#include <QStringList>
+
+#include <conn_settings.h>
+#include "iapmonitor.h"
+
+namespace Maemo {
+
+
+void conn_settings_notify_func (ConnSettingsType type,
+ const char *id,
+ const char *key,
+ ConnSettingsValue *value,
+ void *user_data);
+
+class IAPMonitorPrivate {
+private:
+ IAPMonitor *monitor;
+ ConnSettings *settings;
+
+public:
+
+ IAPMonitorPrivate(IAPMonitor *monitor)
+ : monitor(monitor)
+ {
+ settings = conn_settings_open(CONN_SETTINGS_CONNECTION, NULL);
+ conn_settings_add_notify(
+ settings,
+ (ConnSettingsNotifyFunc *)conn_settings_notify_func,
+ this);
+ }
+
+ ~IAPMonitorPrivate()
+ {
+ conn_settings_del_notify(settings);
+ conn_settings_close(settings);
+ }
+
+ void iapAdded(const QString &iap)
+ {
+ monitor->iapAdded(iap);
+ }
+
+ void iapRemoved(const QString &iap)
+ {
+ monitor->iapRemoved(iap);
+ }
+};
+
+void conn_settings_notify_func (ConnSettingsType type,
+ const char *id,
+ const char *key,
+ ConnSettingsValue *value,
+ void *user_data)
+{
+ if (type != CONN_SETTINGS_CONNECTION) return;
+ IAPMonitorPrivate *priv = (IAPMonitorPrivate *)user_data;
+
+ QString iapId(key);
+ iapId = iapId.split("/")[0];
+ if (value != 0) {
+ priv->iapAdded(iapId);
+ } else if (iapId == QString(key)) {
+ // IAP is removed only when the directory gets removed
+ priv->iapRemoved(iapId);
+ }
+}
+
+IAPMonitor::IAPMonitor()
+ : d_ptr(new IAPMonitorPrivate(this))
+{
+}
+
+IAPMonitor::~IAPMonitor()
+{
+ delete d_ptr;
+}
+
+void IAPMonitor::iapAdded(const QString &id)
+{
+ // By default do nothing
+}
+
+void IAPMonitor::iapRemoved(const QString &id)
+{
+ // By default do nothing
+}
+
+} // namespace Maemo
diff --git a/src/3rdparty/libconninet/src/iapmonitor.h b/src/3rdparty/libconninet/src/iapmonitor.h
new file mode 100644
index 0000000000..558f23e5c2
--- /dev/null
+++ b/src/3rdparty/libconninet/src/iapmonitor.h
@@ -0,0 +1,48 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2009-2010 Nokia Corporation. All rights reserved.
+
+ Contact: Jukka Rissanen <jukka.rissanen@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+#ifndef IAPMONITOR_H
+#define IAPMONITOR_H
+
+#include <QString>
+
+namespace Maemo {
+
+class IAPMonitorPrivate;
+class IAPMonitor {
+public:
+ IAPMonitor();
+ ~IAPMonitor();
+
+protected:
+ virtual void iapAdded(const QString &id);
+ virtual void iapRemoved(const QString &id);
+
+private:
+ IAPMonitorPrivate *d_ptr;
+ Q_DECLARE_PRIVATE(IAPMonitor);
+};
+
+} // namespace Maemo
+
+#endif // IAPMONITOR_H
+
diff --git a/src/3rdparty/libconninet/src/maemo_icd.cpp b/src/3rdparty/libconninet/src/maemo_icd.cpp
new file mode 100644
index 0000000000..bc84fbcd0d
--- /dev/null
+++ b/src/3rdparty/libconninet/src/maemo_icd.cpp
@@ -0,0 +1,1277 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2009 Nokia Corporation. All rights reserved.
+
+ Contact: Jukka Rissanen <jukka.rissanen@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+#include <stdio.h>
+#include "maemo_icd.h"
+#include <QObject>
+#include <QTimer>
+#include <QCoreApplication>
+#include <QEventLoop>
+#include <QDebug>
+#include <dbus/dbus.h>
+#include <dbus/dbus-glib-lowlevel.h>
+
+
+namespace Maemo {
+
+/* Reference counting singleton class that creates a single connection
+ * to icd so that icd reference counting works as expected. This is
+ * needed because DBusDispatcher uses private dbus connections
+ * which come and go and icd cannot use that information to
+ * determine whether application quit or not. So we create one
+ * persistent connection that is only teared down when application
+ * quits or calls disconnect()
+ */
+class IcdRefCounting
+{
+public:
+ IcdRefCounting() : first_call(true) { }
+ void setup(enum icd_connection_flags flag);
+ void cleanup();
+
+private:
+ bool first_call;
+ struct DBusConnection *connection;
+};
+
+Q_GLOBAL_STATIC(IcdRefCounting, icdRefCounting);
+
+
+void IcdRefCounting::setup(enum icd_connection_flags flag)
+{
+ if (first_call) {
+ DBusMessage *msg = NULL;
+
+ connection = dbus_bus_get_private(DBUS_BUS_SYSTEM, NULL);
+ dbus_connection_set_exit_on_disconnect(connection, FALSE);
+ dbus_connection_setup_with_g_main(connection, NULL);
+
+ msg = dbus_message_new_method_call(ICD_DBUS_API_INTERFACE,
+ ICD_DBUS_API_PATH,
+ ICD_DBUS_API_INTERFACE,
+ ICD_DBUS_API_CONNECT_REQ);
+ if (msg == NULL)
+ goto out;
+
+ if (!dbus_message_append_args(msg,
+ DBUS_TYPE_UINT32, &flag,
+ DBUS_TYPE_INVALID))
+ goto out;
+
+ if (!dbus_connection_send_with_reply(connection, msg,
+ NULL, 60*1000))
+ goto out;
+
+ first_call = false;
+ return;
+
+ out:
+ dbus_connection_close(connection);
+ dbus_connection_unref(connection);
+ }
+}
+
+void IcdRefCounting::cleanup()
+{
+ if (!first_call) {
+ dbus_connection_close(connection);
+ dbus_connection_unref(connection);
+ first_call = true;
+ }
+}
+
+
+class IcdPrivate
+{
+public:
+ IcdPrivate(Icd *myfriend)
+ {
+ init(10000, IcdNewDbusInterface, myfriend);
+ }
+
+ IcdPrivate(unsigned int timeout, Icd *myfriend)
+ {
+ init(timeout, IcdNewDbusInterface, myfriend);
+ }
+
+ IcdPrivate(unsigned int timeout, IcdDbusInterfaceVer ver, Icd *myfriend)
+ {
+ /* Note that the old Icd interface is currently disabled and
+ * the new one is always used.
+ */
+ init(timeout, IcdNewDbusInterface, myfriend);
+ }
+
+ ~IcdPrivate()
+ {
+ QObject::disconnect(mDBus,
+ SIGNAL(signalReceived(const QString&,
+ const QString&,
+ const QList<QVariant>&)),
+ icd,
+ SLOT(icdSignalReceived(const QString&,
+ const QString&,
+ const QList<QVariant>&)));
+
+ QObject::disconnect(mDBus,
+ SIGNAL(callReply(const QString&,
+ const QList<QVariant>&,
+ const QString&)),
+ icd,
+ SLOT(icdCallReply(const QString&,
+ const QList<QVariant>&,
+ const QString&)));
+
+ delete mDBus;
+ mDBus = 0;
+ }
+
+ /* Icd2 dbus API functions */
+ QStringList scan(icd_scan_request_flags flags,
+ QStringList &network_types,
+ QList<IcdScanResult>& scan_results,
+ QString& error);
+ void scanCancel();
+ bool connect(icd_connection_flags flags, IcdConnectResult& result);
+ bool connect(icd_connection_flags flags, QList<ConnectParams>& params,
+ IcdConnectResult& result);
+ bool connect(icd_connection_flags flags, QString& iap, QString& result);
+ void select(uint flags);
+ void disconnect(uint connect_flags, QString& service_type,
+ uint service_attrs, QString& service_id,
+ QString& network_type, uint network_attrs,
+ QByteArray& network_id);
+ void disconnect(uint connect_flags);
+
+ uint state(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdStateResult &state_result);
+ uint statistics(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdStatisticsResult& stats_result);
+ uint addrinfo(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdAddressInfoResult& addr_result);
+
+ uint state(QList<IcdStateResult>& state_results);
+ uint state_non_blocking(QList<IcdStateResult>& state_results);
+ uint statistics(QList<IcdStatisticsResult>& stats_results);
+ uint addrinfo(QList<IcdAddressInfoResult>& addr_results);
+ uint addrinfo_non_blocking(QList<IcdAddressInfoResult>& addr_results);
+
+ void signalReceived(const QString& interface,
+ const QString& signal,
+ const QList<QVariant>& args);
+ void callReply(const QString& method,
+ const QList<QVariant>& args,
+ const QString& error);
+
+ QString error() { return mError; }
+
+public:
+ DBusDispatcher *mDBus;
+ QString mMethod;
+ QString mInterface;
+ QString mSignal;
+ QString mError;
+ QList<QVariant> mArgs;
+ QList<QVariant> receivedSignals;
+ unsigned int timeout;
+ IcdDbusInterfaceVer icd_dbus_version;
+ Icd *icd;
+
+ void init(unsigned int dbus_timeout, IcdDbusInterfaceVer ver,
+ Icd *myfriend)
+ {
+ if (ver == IcdNewDbusInterface) {
+ mDBus = new DBusDispatcher(ICD_DBUS_API_INTERFACE,
+ ICD_DBUS_API_PATH,
+ ICD_DBUS_API_INTERFACE);
+ } else {
+ mDBus = new DBusDispatcher(ICD_DBUS_SERVICE,
+ ICD_DBUS_PATH,
+ ICD_DBUS_INTERFACE);
+ }
+ icd_dbus_version = ver;
+
+ /* This connect has a side effect as it means that only one
+ * Icd object can exists in one time. This should be fixed!
+ */
+ QObject::connect(mDBus,
+ SIGNAL(signalReceived(const QString&,
+ const QString&,
+ const QList<QVariant>&)),
+ myfriend,
+ SLOT(icdSignalReceived(const QString&,
+ const QString&,
+ const QList<QVariant>&)));
+
+ QObject::connect(mDBus,
+ SIGNAL(callReply(const QString&,
+ const QList<QVariant>&,
+ const QString&)),
+ myfriend,
+ SLOT(icdCallReply(const QString&,
+ const QList<QVariant>&,
+ const QString&)));
+
+ icd = myfriend;
+ timeout = dbus_timeout;
+ }
+
+ void clearState()
+ {
+ mMethod.clear();
+ mInterface.clear();
+ mSignal.clear();
+ mError.clear();
+ mArgs.clear();
+ receivedSignals.clear();
+ }
+
+ bool doConnect(IcdConnectResult& result);
+ bool doConnect(QString& result);
+ bool doState();
+};
+
+
+void IcdPrivate::signalReceived(const QString& interface,
+ const QString& signal,
+ const QList<QVariant>& args)
+{
+ // Signal handler, which simply records what has been signalled
+ mInterface = interface;
+ mSignal = signal;
+ mArgs = args;
+
+ //qDebug() << "signal" << signal << "received:" << args;
+ receivedSignals << QVariant(interface) << QVariant(signal) << QVariant(args);
+}
+
+
+void IcdPrivate::callReply(const QString& method,
+ const QList<QVariant>& /*args*/,
+ const QString& error)
+{
+ mMethod = method;
+ mError = error;
+}
+
+
+static void get_scan_result(QList<QVariant>& args,
+ IcdScanResult& ret)
+{
+ int i=0;
+
+ if (args.isEmpty())
+ return;
+
+ ret.status = args[i++].toUInt();
+ ret.timestamp = args[i++].toUInt();
+ ret.scan.service_type = args[i++].toString();
+ ret.service_name = args[i++].toString();
+ ret.scan.service_attrs = args[i++].toUInt();
+ ret.scan.service_id = args[i++].toString();
+ ret.service_priority = args[i++].toInt();
+ ret.scan.network_type = args[i++].toString();
+ ret.network_name = args[i++].toString();
+ ret.scan.network_attrs = args[i++].toUInt();
+ ret.scan.network_id = args[i++].toByteArray();
+ ret.network_priority = args[i++].toInt();
+ ret.signal_strength = args[i++].toInt();
+ ret.station_id = args[i++].toString();
+ ret.signal_dB = args[i++].toInt();
+}
+
+
+static void get_connect_result(QList<QVariant>& args,
+ IcdConnectResult& ret)
+{
+ int i=0;
+
+ if (args.isEmpty())
+ return;
+
+ ret.connect.service_type = args[i++].toString();
+ ret.connect.service_attrs = args[i++].toInt();
+ ret.connect.service_id = args[i++].toString();
+ ret.connect.network_type = args[i++].toString();
+ ret.connect.network_attrs = args[i++].toInt();
+ ret.connect.network_id = args[i++].toByteArray();
+ ret.status = args[i++].toInt();
+}
+
+
+QStringList IcdPrivate::scan(icd_scan_request_flags flags,
+ QStringList &network_types,
+ QList<IcdScanResult>& scan_results,
+ QString& error)
+{
+ QStringList scanned_types;
+ QTimer timer;
+ QVariant reply;
+ QVariantList vl;
+ bool last_result = false;
+ IcdScanResult result;
+ int all_waited;
+
+ clearState();
+ reply = mDBus->call(ICD_DBUS_API_SCAN_REQ, (uint)flags);
+ if (reply.type() != QVariant::List)
+ return scanned_types;
+ vl = reply.toList();
+ if (vl.isEmpty()) {
+ error = "Scan did not return anything.";
+ return scanned_types;
+ }
+ reply = vl.first();
+ scanned_types = reply.toStringList();
+ //qDebug() << "Scanning:" << scanned_types;
+ all_waited = scanned_types.size();
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+
+ scan_results.clear();
+ while (!last_result) {
+ while (timer.isActive() && mInterface.isEmpty() && mError.isEmpty()) {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+ }
+
+ if (!timer.isActive()) {
+ //qDebug() << "Timeout happened";
+ break;
+ }
+
+ if (mSignal != ICD_DBUS_API_SCAN_SIG) {
+ //qDebug() << "Received" << mSignal << "while waiting" << ICD_DBUS_API_SCAN_SIG << ", ignoring";
+ mInterface.clear();
+ continue;
+ }
+
+ if (mError.isEmpty()) {
+ QString msgInterface = receivedSignals.takeFirst().toString();
+ QString msgSignal = receivedSignals.takeFirst().toString();
+ QList<QVariant> msgArgs = receivedSignals.takeFirst().toList();
+ //qDebug() << "Signal" << msgSignal << "received.";
+ //qDebug() << "Params:" << msgArgs;
+
+ while (!msgSignal.isEmpty()) {
+ get_scan_result(msgArgs, result);
+
+#if 0
+ qDebug() << "Received: " <<
+ "status =" << result.status <<
+ ", timestamp =" << result.timestamp <<
+ ", service_type =" << result.scan.service_type <<
+ ", service_name =" << result.service_name <<
+ ", service_attrs =" << result.scan.service_attrs <<
+ ", service_id =" << result.scan.service_id <<
+ ", service_priority =" << result.service_priority <<
+ ", network_type =" << result.scan.network_type <<
+ ", network_name =" << result.network_name <<
+ ", network_attrs =" << result.scan.network_attrs <<
+ ", network_id =" << "-" <<
+ ", network_priority =" << result.network_priority <<
+ ", signal_strength =" << result.signal_strength <<
+ ", station_id =" << result.station_id <<
+ ", signal_dB =" << result.signal_dB;
+#endif
+
+ if (result.status == ICD_SCAN_COMPLETE) {
+ //qDebug() << "waited =" << all_waited;
+ if (--all_waited == 0) {
+ last_result = true;
+ break;
+ }
+ } else
+ scan_results << result;
+
+ if (receivedSignals.isEmpty())
+ break;
+
+ msgInterface = receivedSignals.takeFirst().toString();
+ msgSignal = receivedSignals.takeFirst().toString();
+ msgArgs = receivedSignals.takeFirst().toList();
+ }
+ mInterface.clear();
+
+ } else {
+ qWarning() << "Error while scanning:" << mError;
+ break;
+ }
+ }
+ timer.stop();
+
+ error = mError;
+ return scanned_types;
+}
+
+
+void IcdPrivate::scanCancel()
+{
+ mDBus->call(ICD_DBUS_API_SCAN_CANCEL);
+}
+
+
+bool IcdPrivate::doConnect(IcdConnectResult& result)
+{
+ QTimer timer;
+ bool status = false;
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+
+ //qDebug() << "Waiting" << ICD_DBUS_API_CONNECT_SIG << "signal";
+
+ while (timer.isActive() && mInterface.isEmpty() &&
+ mSignal != ICD_DBUS_API_CONNECT_SIG &&
+ mError.isEmpty()) {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+ }
+
+ timer.stop();
+
+ if (mError.isEmpty()) {
+ if (!mArgs.isEmpty()) {
+ get_connect_result(mArgs, result);
+ status = true;
+ } else
+ status = false;
+ } else
+ status = false;
+
+ return status;
+}
+
+
+bool IcdPrivate::connect(icd_connection_flags flags, IcdConnectResult& result)
+{
+ clearState();
+ //mDBus->callAsynchronous(ICD_DBUS_API_CONNECT_REQ, (uint)flags);
+ mDBus->call(ICD_DBUS_API_CONNECT_REQ, (uint)flags);
+ icdRefCounting()->setup(flags);
+ return doConnect(result);
+}
+
+
+bool IcdPrivate::connect(icd_connection_flags flags, QList<ConnectParams>& params,
+ IcdConnectResult& result)
+{
+ QVariantList varlist;
+ QVariantList varlist2;
+
+ foreach (ConnectParams param, params) {
+ QVariantList items;
+
+ items.append(QVariant(param.connect.service_type));
+ items.append(QVariant(param.connect.service_attrs));
+ items.append(QVariant(param.connect.service_id));
+ items.append(QVariant(param.connect.network_type));
+ items.append(QVariant(param.connect.network_attrs));
+ items.append(QVariant(param.connect.network_id));
+
+ varlist.append(items);
+ }
+
+ varlist2.append(QVariant(varlist));
+
+ clearState();
+ //mDBus->callAsynchronous(ICD_DBUS_API_CONNECT_REQ, (uint)flags, varlist2);
+ mDBus->call(ICD_DBUS_API_CONNECT_REQ, (uint)flags, varlist2);
+ icdRefCounting()->setup(flags);
+ return doConnect(result);
+}
+
+
+bool IcdPrivate::doConnect(QString& ret)
+{
+ QTimer timer;
+ bool status = false;
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+
+ while (timer.isActive() && mInterface.isEmpty() &&
+ mError.isEmpty()) {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+ }
+
+ timer.stop();
+
+ if (mError.isEmpty()) {
+ if (!mArgs.isEmpty()) {
+ status = true;
+ //ret = mArgs[0]; // TODO correctly
+ } else
+ status = false;
+ } else
+ status = false;
+
+ return status;
+}
+
+
+bool IcdPrivate::connect(icd_connection_flags flags, QString& iap, QString& result)
+{
+ clearState();
+ //mDBus->callAsynchronous(ICD_CONNECT_REQ, iap, (uint)flags);
+ mDBus->call(ICD_CONNECT_REQ, iap, (uint)flags);
+ icdRefCounting()->setup(flags);
+ return doConnect(result);
+}
+
+
+void IcdPrivate::select(uint flags)
+{
+ mDBus->call(ICD_DBUS_API_SELECT_REQ, flags);
+}
+
+
+void IcdPrivate::disconnect(uint flags, QString& service_type,
+ uint service_attrs, QString& service_id,
+ QString& network_type, uint network_attrs,
+ QByteArray& network_id)
+{
+ clearState();
+ mDBus->call(ICD_DBUS_API_DISCONNECT_REQ, flags,
+ service_type, service_attrs, service_id,
+ network_type, network_attrs, network_id);
+ icdRefCounting()->cleanup();
+}
+
+
+void IcdPrivate::disconnect(uint flags)
+{
+ clearState();
+ mDBus->call(ICD_DBUS_API_DISCONNECT_REQ, flags);
+ icdRefCounting()->cleanup();
+}
+
+
+static void get_state_all_result(QList<QVariant>& args,
+ IcdStateResult& ret)
+{
+ int i=0;
+
+ ret.params.service_type = args[i++].toString();
+ ret.params.service_attrs = args[i++].toUInt();
+ ret.params.service_id = args[i++].toString();
+ ret.params.network_type = args[i++].toString();
+ ret.params.network_attrs = args[i++].toUInt();
+ ret.params.network_id = args[i++].toByteArray();
+ ret.error = args[i++].toString();
+ ret.state = args[i++].toInt();
+}
+
+
+static void get_state_all_result2(QList<QVariant>& args,
+ IcdStateResult& ret)
+{
+ int i=0;
+
+ ret.params.network_type = args[i++].toString();
+ ret.state = args[i++].toInt();
+
+ // Initialize the other values so that the caller can
+ // notice we only returned partial status
+ ret.params.service_type = QString();
+ ret.params.service_attrs = 0;
+ ret.params.service_id = QString();
+ ret.params.network_attrs = 0;
+ ret.params.network_id = QByteArray();
+ ret.error = QString();
+}
+
+
+uint IcdPrivate::state(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdStateResult& state_result)
+{
+ QTimer timer;
+ QVariant reply;
+ uint total_signals;
+ QVariantList vl;
+
+ clearState();
+
+ reply = mDBus->call(ICD_DBUS_API_STATE_REQ,
+ service_type, service_attrs, service_id,
+ network_type, network_attrs, network_id);
+ if (reply.type() != QVariant::List)
+ return 0;
+ vl = reply.toList();
+ if (vl.isEmpty())
+ return 0;
+ reply = vl.first();
+ total_signals = reply.toUInt();
+ if (!total_signals)
+ return 0;
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+
+ mInterface.clear();
+ while (timer.isActive() && mInterface.isEmpty()) {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+
+ if (mSignal != ICD_DBUS_API_STATE_SIG) {
+ mInterface.clear();
+ continue;
+ }
+ }
+
+ timer.stop();
+
+ if (mError.isEmpty()) {
+ if (!mArgs.isEmpty()) {
+ if (mArgs.size()>2)
+ get_state_all_result(mArgs, state_result);
+ else {
+ // We are not connected as we did not get the status we asked
+ return 0;
+ }
+ }
+ } else {
+ qWarning() << "Error:" << mError;
+ }
+
+ // The returned value should be one because we asked for one state
+ return total_signals;
+}
+
+
+uint IcdPrivate::state_non_blocking(QList<IcdStateResult>& state_results)
+{
+ QTimer timer;
+ QVariant reply;
+ QVariantList vl;
+ uint signals_left, total_signals;
+ IcdStateResult result;
+
+ clearState();
+ reply = mDBus->call(ICD_DBUS_API_STATE_REQ);
+ if (reply.type() != QVariant::List)
+ return 0;
+ vl = reply.toList();
+ if (vl.isEmpty())
+ return 0;
+ reply = vl.first();
+ signals_left = total_signals = reply.toUInt();
+ if (!signals_left)
+ return 0;
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+ state_results.clear();
+ mError.clear();
+ while (signals_left) {
+ mInterface.clear();
+ while (timer.isActive() && mInterface.isEmpty()) {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+ }
+
+ if (!timer.isActive()) {
+ total_signals = 0;
+ break;
+ }
+
+ if (mSignal != ICD_DBUS_API_STATE_SIG) {
+ continue;
+ }
+
+ if (mError.isEmpty()) {
+ if (!mArgs.isEmpty()) {
+ if (mArgs.size()==2)
+ get_state_all_result2(mArgs, result);
+ else
+ get_state_all_result(mArgs, result);
+ state_results << result;
+ }
+ signals_left--;
+ } else {
+ qWarning() << "Error:" << mError;
+ break;
+ }
+ }
+ timer.stop();
+
+ return total_signals;
+}
+
+
+/* Special version of the state() call which does not call event loop.
+ * Needed in order to fix NB#175098 where Qt4.7 webkit crashes because event
+ * loop is run when webkit does not expect it. This function is called from
+ * bearer management API syncStateWithInterface() in QNetworkSession
+ * constructor.
+ */
+uint IcdPrivate::state(QList<IcdStateResult>& state_results)
+{
+ QTimer timer;
+ QVariant reply;
+ QVariantList vl;
+ uint signals_left, total_signals;
+ IcdStateResult result;
+
+ clearState();
+ reply = mDBus->call(ICD_DBUS_API_STATE_REQ);
+ if (reply.type() != QVariant::List)
+ return 0;
+ vl = reply.toList();
+ if (vl.isEmpty())
+ return 0;
+ reply = vl.first();
+ signals_left = total_signals = reply.toUInt();
+ if (!signals_left)
+ return 0;
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+ state_results.clear();
+ mError.clear();
+ while (signals_left) {
+ mInterface.clear();
+ while (timer.isActive() && mInterface.isEmpty()) {
+ mDBus->synchronousDispatch(1000);
+ }
+
+ if (!timer.isActive()) {
+ total_signals = 0;
+ break;
+ }
+
+ if (mSignal != ICD_DBUS_API_STATE_SIG) {
+ continue;
+ }
+
+ if (mError.isEmpty()) {
+ if (!mArgs.isEmpty()) {
+ if (mArgs.size()==2)
+ get_state_all_result2(mArgs, result);
+ else
+ get_state_all_result(mArgs, result);
+ state_results << result;
+ }
+ signals_left--;
+ } else {
+ qWarning() << "Error:" << mError;
+ break;
+ }
+ }
+ timer.stop();
+
+ return total_signals;
+}
+
+
+static void get_statistics_all_result(QList<QVariant>& args,
+ IcdStatisticsResult& ret)
+{
+ int i=0;
+
+ if (args.isEmpty())
+ return;
+
+ ret.params.service_type = args[i++].toString();
+ ret.params.service_attrs = args[i++].toUInt();
+ ret.params.service_id = args[i++].toString();
+ ret.params.network_type = args[i++].toString();
+ ret.params.network_attrs = args[i++].toUInt();
+ ret.params.network_id = args[i++].toByteArray();
+ ret.time_active = args[i++].toUInt();
+ ret.signal_strength = (enum icd_nw_levels)args[i++].toUInt();
+ ret.bytes_sent = args[i++].toUInt();
+ ret.bytes_received = args[i++].toUInt();
+}
+
+
+uint IcdPrivate::statistics(QList<IcdStatisticsResult>& stats_results)
+{
+ QTimer timer;
+ QVariant reply;
+ QVariantList vl;
+ uint signals_left, total_signals;
+ IcdStatisticsResult result;
+
+ clearState();
+ reply = mDBus->call(ICD_DBUS_API_STATISTICS_REQ);
+ if (reply.type() != QVariant::List)
+ return 0;
+ vl = reply.toList();
+ if (vl.isEmpty())
+ return 0;
+ reply = vl.first();
+ if (reply.type() != QVariant::UInt)
+ return 0;
+ signals_left = total_signals = reply.toUInt();
+
+ if (!signals_left)
+ return 0;
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+ stats_results.clear();
+ while (signals_left) {
+ mInterface.clear();
+ while (timer.isActive() && mInterface.isEmpty()) {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+ }
+
+ if (!timer.isActive()) {
+ total_signals = 0;
+ break;
+ }
+
+ if (mSignal != ICD_DBUS_API_STATISTICS_SIG) {
+ continue;
+ }
+
+ if (mError.isEmpty()) {
+ get_statistics_all_result(mArgs, result);
+ stats_results << result;
+ signals_left--;
+ } else {
+ qWarning() << "Error:" << mError;
+ break;
+ }
+ }
+ timer.stop();
+
+ return total_signals;
+}
+
+
+uint IcdPrivate::statistics(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdStatisticsResult& stats_result)
+{
+ QTimer timer;
+ QVariant reply;
+ uint total_signals;
+ QVariantList vl;
+
+ clearState();
+
+ reply = mDBus->call(ICD_DBUS_API_STATISTICS_REQ,
+ service_type, service_attrs, service_id,
+ network_type, network_attrs, network_id);
+ if (reply.type() != QVariant::List)
+ return 0;
+ vl = reply.toList();
+ if (vl.isEmpty())
+ return 0;
+ reply = vl.first();
+ total_signals = reply.toUInt();
+ if (!total_signals)
+ return 0;
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+
+ mInterface.clear();
+ while (timer.isActive() && mInterface.isEmpty()) {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+
+ if (mSignal != ICD_DBUS_API_STATISTICS_SIG) {
+ mInterface.clear();
+ continue;
+ }
+ }
+
+ timer.stop();
+
+ if (mError.isEmpty()) {
+ get_statistics_all_result(mArgs, stats_result);
+ } else {
+ qWarning() << "Error:" << mError;
+ }
+
+ // The returned value should be one because we asked for one statistics
+ return total_signals;
+}
+
+
+static void get_addrinfo_all_result(QList<QVariant>& args,
+ IcdAddressInfoResult& ret)
+{
+ int i=0;
+
+ if (args.isEmpty())
+ return;
+
+ ret.params.service_type = args[i++].toString();
+ ret.params.service_attrs = args[i++].toUInt();
+ ret.params.service_id = args[i++].toString();
+ ret.params.network_type = args[i++].toString();
+ ret.params.network_attrs = args[i++].toUInt();
+ ret.params.network_id = args[i++].toByteArray();
+
+ QVariantList vl = args[i].toList();
+ QVariant reply = vl.first();
+ QList<QVariant> lst = reply.toList();
+ for (int k=0; k<lst.size()/6; k=k+6) {
+ IcdIPInformation ip_info;
+ ip_info.address = lst[k].toString();
+ ip_info.netmask = lst[k++].toString();
+ ip_info.default_gateway = lst[k++].toString();
+ ip_info.dns1 = lst[k++].toString();
+ ip_info.dns2 = lst[k++].toString();
+ ip_info.dns3 = lst[k++].toString();
+
+ ret.ip_info << ip_info;
+ }
+}
+
+
+/* Special version of the addrinfo() call which does not call event loop.
+ * Needed in order to fix NB#175098 where Qt4.7 webkit crashes because event
+ * loop is run when webkit does not expect it. This function is called from
+ * bearer management API syncStateWithInterface() in QNetworkSession
+ * constructor.
+ */
+uint IcdPrivate::addrinfo(QList<IcdAddressInfoResult>& addr_results)
+{
+ QTimer timer;
+ QVariant reply;
+ QVariantList vl;
+ uint signals_left, total_signals;
+ IcdAddressInfoResult result;
+
+ clearState();
+ reply = mDBus->call(ICD_DBUS_API_ADDRINFO_REQ);
+ if (reply.type() != QVariant::List)
+ return 0;
+ vl = reply.toList();
+ if (vl.isEmpty())
+ return 0;
+ reply = vl.first();
+ if (reply.type() != QVariant::UInt)
+ return 0;
+ signals_left = total_signals = reply.toUInt();
+ if (!signals_left)
+ return 0;
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+ addr_results.clear();
+ while (signals_left) {
+ mInterface.clear();
+ while (timer.isActive() && mInterface.isEmpty()) {
+ mDBus->synchronousDispatch(1000);
+ }
+
+ if (!timer.isActive()) {
+ total_signals = 0;
+ break;
+ }
+
+ if (mSignal != ICD_DBUS_API_ADDRINFO_SIG) {
+ continue;
+ }
+
+ if (mError.isEmpty()) {
+ get_addrinfo_all_result(mArgs, result);
+ addr_results << result;
+ signals_left--;
+ } else {
+ qWarning() << "Error:" << mError;
+ break;
+ }
+ }
+ timer.stop();
+ return total_signals;
+}
+
+uint IcdPrivate::addrinfo_non_blocking(QList<IcdAddressInfoResult>& addr_results)
+{
+ QTimer timer;
+ QVariant reply;
+ QVariantList vl;
+ uint signals_left, total_signals;
+ IcdAddressInfoResult result;
+
+ clearState();
+ reply = mDBus->call(ICD_DBUS_API_ADDRINFO_REQ);
+ if (reply.type() != QVariant::List)
+ return 0;
+ vl = reply.toList();
+ if (vl.isEmpty())
+ return 0;
+ reply = vl.first();
+ if (reply.type() != QVariant::UInt)
+ return 0;
+ signals_left = total_signals = reply.toUInt();
+ if (!signals_left)
+ return 0;
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+ addr_results.clear();
+ while (signals_left) {
+ mInterface.clear();
+ while (timer.isActive() && mInterface.isEmpty()) {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+ }
+
+ if (!timer.isActive()) {
+ total_signals = 0;
+ break;
+ }
+
+ if (mSignal != ICD_DBUS_API_ADDRINFO_SIG) {
+ continue;
+ }
+
+ if (mError.isEmpty()) {
+ get_addrinfo_all_result(mArgs, result);
+ addr_results << result;
+ signals_left--;
+ } else {
+ qWarning() << "Error:" << mError;
+ break;
+ }
+ }
+ timer.stop();
+ return total_signals;
+}
+
+
+uint IcdPrivate::addrinfo(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdAddressInfoResult& addr_result)
+{
+ QTimer timer;
+ QVariant reply;
+ uint total_signals;
+ QVariantList vl;
+
+ clearState();
+
+ reply = mDBus->call(ICD_DBUS_API_ADDRINFO_REQ,
+ service_type, service_attrs, service_id,
+ network_type, network_attrs, network_id);
+ if (reply.type() != QVariant::List)
+ return 0;
+ vl = reply.toList();
+ if (vl.isEmpty())
+ return 0;
+ reply = vl.first();
+ total_signals = reply.toUInt();
+
+ if (!total_signals)
+ return 0;
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+
+ mInterface.clear();
+ while (timer.isActive() && mInterface.isEmpty()) {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+
+ if (mSignal != ICD_DBUS_API_ADDRINFO_SIG) {
+ mInterface.clear();
+ continue;
+ }
+ }
+
+ timer.stop();
+
+ if (mError.isEmpty()) {
+ get_addrinfo_all_result(mArgs, addr_result);
+ } else {
+ qWarning() << "Error:" << mError;
+ }
+
+ // The returned value should be one because we asked for one addrinfo
+ return total_signals;
+}
+
+
+Icd::Icd(QObject *parent)
+ : QObject(parent), d(new IcdPrivate(this))
+{
+}
+
+Icd::Icd(unsigned int timeout, QObject *parent)
+ : QObject(parent), d(new IcdPrivate(timeout, this))
+{
+}
+
+Icd::Icd(unsigned int timeout, IcdDbusInterfaceVer ver, QObject *parent)
+ : QObject(parent), d(new IcdPrivate(timeout, ver, this))
+{
+}
+
+Icd::~Icd()
+{
+ delete d;
+}
+
+
+QStringList Icd::scan(icd_scan_request_flags flags,
+ QStringList &network_types,
+ QList<IcdScanResult>& scan_results,
+ QString& error)
+{
+ return d->scan(flags, network_types, scan_results, error);
+}
+
+
+void Icd::scanCancel()
+{
+ d->scanCancel();
+}
+
+
+bool Icd::connect(icd_connection_flags flags, IcdConnectResult& result)
+{
+ return d->connect(flags, result);
+}
+
+
+bool Icd::connect(icd_connection_flags flags, QList<ConnectParams>& params,
+ IcdConnectResult& result)
+{
+ return d->connect(flags, params, result);
+}
+
+
+bool Icd::connect(icd_connection_flags flags, QString& iap, QString& result)
+{
+ return d->connect(flags, iap, result);
+}
+
+
+void Icd::select(uint flags)
+{
+ d->select(flags);
+}
+
+
+void Icd::disconnect(uint connect_flags, QString& service_type,
+ uint service_attrs, QString& service_id,
+ QString& network_type, uint network_attrs,
+ QByteArray& network_id)
+{
+ d->disconnect(connect_flags, service_type,
+ service_attrs, service_id,
+ network_type, network_attrs,
+ network_id);
+}
+
+
+void Icd::disconnect(uint connect_flags)
+{
+ d->disconnect(connect_flags);
+}
+
+
+uint Icd::state(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdStateResult &state_result)
+{
+ return d->state(service_type, service_attrs, service_id,
+ network_type, network_attrs, network_id,
+ state_result);
+}
+
+
+uint Icd::statistics(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdStatisticsResult& stats_result)
+{
+ return d->statistics(service_type, service_attrs, service_id,
+ network_type, network_attrs, network_id,
+ stats_result);
+}
+
+
+uint Icd::addrinfo(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdAddressInfoResult& addr_result)
+{
+ return d->addrinfo(service_type, service_attrs, service_id,
+ network_type, network_attrs, network_id,
+ addr_result);
+}
+
+
+uint Icd::state(QList<IcdStateResult>& state_results)
+{
+ return d->state(state_results);
+}
+
+uint Icd::state_non_blocking(QList<IcdStateResult>& state_results)
+{
+ return d->state_non_blocking(state_results);
+}
+
+uint Icd::statistics(QList<IcdStatisticsResult>& stats_results)
+{
+ return d->statistics(stats_results);
+}
+
+
+uint Icd::addrinfo(QList<IcdAddressInfoResult>& addr_results)
+{
+ return d->addrinfo(addr_results);
+}
+
+uint Icd::addrinfo_non_blocking(QList<IcdAddressInfoResult>& addr_results)
+{
+ return d->addrinfo_non_blocking(addr_results);
+}
+
+void Icd::icdSignalReceived(const QString& interface,
+ const QString& signal,
+ const QList<QVariant>& args)
+{
+ d->signalReceived(interface, signal, args);
+}
+
+
+void Icd::icdCallReply(const QString& method,
+ const QList<QVariant>& args,
+ const QString& error)
+{
+ d->callReply(method, args, error);
+}
+
+
+QString Icd::error()
+{
+ return d->error();
+}
+
+} // Maemo namespace
+
+
diff --git a/src/3rdparty/libconninet/src/maemo_icd.h b/src/3rdparty/libconninet/src/maemo_icd.h
new file mode 100644
index 0000000000..d7a8d5bdb7
--- /dev/null
+++ b/src/3rdparty/libconninet/src/maemo_icd.h
@@ -0,0 +1,182 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2009 Nokia Corporation. All rights reserved.
+
+ Contact: Jukka Rissanen <jukka.rissanen@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+#ifndef MAEMO_ICD_H
+#define MAEMO_ICD_H
+
+#include <QObject>
+#include <QStringList>
+#include <QByteArray>
+#include <QMetaType>
+#include <QtDBus>
+#include <QDBusArgument>
+
+#include <glib.h>
+#include <icd/dbus_api.h>
+#include <icd/osso-ic.h>
+#include <icd/osso-ic-dbus.h>
+
+#include "dbusdispatcher.h"
+#include <icd/network_api_defines.h>
+
+#define ICD_LONG_SCAN_TIMEOUT (30*1000) /* 30sec */
+#define ICD_SHORT_SCAN_TIMEOUT (10*1000) /* 10sec */
+#define ICD_SHORT_CONNECT_TIMEOUT (10*1000) /* 10sec */
+#define ICD_LONG_CONNECT_TIMEOUT (150*1000) /* 2.5min */
+
+namespace Maemo {
+
+struct CommonParams {
+ QString service_type;
+ uint service_attrs;
+ QString service_id;
+ QString network_type;
+ uint network_attrs;
+ QByteArray network_id;
+};
+
+struct ConnectParams {
+ struct CommonParams connect;
+};
+
+struct IcdScanResult {
+ uint status; // see #icd_scan_status
+ uint timestamp; // when last seen
+ QString service_name;
+ uint service_priority; // within a service type
+ QString network_name;
+ uint network_priority;
+ struct CommonParams scan;
+ uint signal_strength; // quality, 0 (none) - 10 (good)
+ QString station_id; // e.g. MAC address or similar id
+ uint signal_dB; // use signal strength above unless you know what you are doing
+
+ IcdScanResult() {
+ status = timestamp = scan.service_attrs = service_priority =
+ scan.network_attrs = network_priority = signal_strength =
+ signal_dB = 0;
+ }
+};
+
+struct IcdConnectResult {
+ struct CommonParams connect;
+ uint status;
+};
+
+struct IcdStateResult {
+ struct CommonParams params;
+ QString error;
+ uint state;
+};
+
+struct IcdStatisticsResult {
+ struct CommonParams params;
+ uint time_active; // in seconds
+ enum icd_nw_levels signal_strength; // see network_api_defines.h in icd2-dev package
+ uint bytes_sent;
+ uint bytes_received;
+};
+
+struct IcdIPInformation {
+ QString address;
+ QString netmask;
+ QString default_gateway;
+ QString dns1;
+ QString dns2;
+ QString dns3;
+};
+
+struct IcdAddressInfoResult {
+ struct CommonParams params;
+ QList<IcdIPInformation> ip_info;
+};
+
+enum IcdDbusInterfaceVer {
+ IcdOldDbusInterface = 0, // use the old OSSO-IC interface
+ IcdNewDbusInterface // use the new Icd2 interface (default)
+};
+
+
+class IcdPrivate;
+class Icd : public QObject
+{
+ Q_OBJECT
+
+public:
+ Icd(QObject *parent = 0);
+ Icd(unsigned int timeout, QObject *parent = 0);
+ Icd(unsigned int timeout, IcdDbusInterfaceVer ver, QObject *parent = 0);
+ ~Icd();
+ QString error(); // returns last error string
+
+ /* Icd2 dbus API functions */
+ QStringList scan(icd_scan_request_flags flags,
+ QStringList &network_types,
+ QList<IcdScanResult>& scan_results,
+ QString& error);
+ void scanCancel();
+ bool connect(icd_connection_flags flags, IcdConnectResult& result);
+ bool connect(icd_connection_flags flags, QList<ConnectParams>& params,
+ IcdConnectResult& result);
+ bool connect(icd_connection_flags flags, QString& iap, QString& result);
+ void select(uint flags);
+ void disconnect(uint connect_flags, QString& service_type,
+ uint service_attrs, QString& service_id,
+ QString& network_type, uint network_attrs,
+ QByteArray& network_id);
+ void disconnect(uint connect_flags);
+
+ uint state(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdStateResult &state_result);
+ uint statistics(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdStatisticsResult& stats_result);
+ uint addrinfo(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdAddressInfoResult& addr_result);
+
+ uint state(QList<IcdStateResult>& state_results);
+ uint state_non_blocking(QList<IcdStateResult>& state_results);
+ uint statistics(QList<IcdStatisticsResult>& stats_results);
+ uint addrinfo(QList<IcdAddressInfoResult>& addr_results);
+ uint addrinfo_non_blocking(QList<IcdAddressInfoResult>& addr_results);
+
+private Q_SLOTS:
+ void icdSignalReceived(const QString& interface,
+ const QString& signal,
+ const QList<QVariant>& args);
+ void icdCallReply(const QString& method,
+ const QList<QVariant>& args,
+ const QString& error);
+
+private:
+ IcdPrivate *d;
+ friend class IcdPrivate;
+};
+
+} // Maemo namespace
+
+#endif
diff --git a/src/3rdparty/libconninet/src/proxyconf.cpp b/src/3rdparty/libconninet/src/proxyconf.cpp
new file mode 100644
index 0000000000..5b2756563b
--- /dev/null
+++ b/src/3rdparty/libconninet/src/proxyconf.cpp
@@ -0,0 +1,315 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2010 Nokia Corporation. All rights reserved.
+
+ Contact: Jukka Rissanen <jukka.rissanen@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+#include <QDebug>
+#include <QWriteLocker>
+#include <QNetworkProxyFactory>
+#include <QNetworkProxy>
+#include <GConfItem>
+#include <gconf/gconf-client.h>
+#include "proxyconf.h"
+
+#define CONF_PROXY "/system/proxy"
+#define HTTP_PROXY "/system/http_proxy"
+
+
+namespace Maemo {
+
+class NetworkProxyFactory : QNetworkProxyFactory {
+public:
+ NetworkProxyFactory() { }
+ QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query = QNetworkProxyQuery());
+};
+
+
+QList<QNetworkProxy> NetworkProxyFactory::queryProxy(const QNetworkProxyQuery &query)
+{
+ ProxyConf proxy_conf;
+
+ QList<QNetworkProxy> result = proxy_conf.flush(query);
+ if (result.isEmpty())
+ result << QNetworkProxy::NoProxy;
+
+ return result;
+}
+
+
+class ProxyConfPrivate {
+private:
+ // proxy values from gconf
+ QString mode;
+ bool use_http_host;
+ QString autoconfig_url;
+ QString http_proxy;
+ quint16 http_port;
+ QList<QVariant> ignore_hosts;
+ QString secure_host;
+ quint16 secure_port;
+ QString ftp_host;
+ quint16 ftp_port;
+ QString socks_host;
+ quint16 socks_port;
+ QString rtsp_host;
+ quint16 rtsp_port;
+
+ QVariant getValue(QString& name);
+ QVariant getHttpValue(QString& name);
+ QVariant getValue(const char *name);
+ QVariant getHttpValue(const char *name);
+ bool isHostExcluded(const QString &host);
+
+public:
+ QString prefix;
+ QString http_prefix;
+
+ void readProxyData();
+ QList<QNetworkProxy> flush(const QNetworkProxyQuery &query);
+};
+
+
+QVariant ProxyConfPrivate::getValue(QString& name)
+{
+ GConfItem item(prefix + name);
+ return item.value();
+}
+
+QVariant ProxyConfPrivate::getHttpValue(QString& name)
+{
+ GConfItem item(http_prefix + name);
+ return item.value();
+}
+
+
+QVariant ProxyConfPrivate::getValue(const char *name)
+{
+ QString n = QString(name);
+ return getValue(n);
+}
+
+QVariant ProxyConfPrivate::getHttpValue(const char *name)
+{
+ QString n = QString(name);
+ return getHttpValue(n);
+}
+
+
+#define GET(var, type) \
+ do { \
+ var = getValue(#var).to##type (); \
+ /*qDebug()<<"var="<<var;*/ \
+ } while(0)
+
+#define GET2(var, name, type) \
+ do { \
+ var = getHttpValue(#name).to##type (); \
+ /*qDebug()<<"var="<<var;*/ \
+ } while(0)
+
+
+void ProxyConfPrivate::readProxyData()
+{
+ /* Read the proxy settings from /system/proxy* */
+ GET2(http_proxy, host, String);
+ GET2(http_port, port, Int);
+ GET2(ignore_hosts, ignore_hosts, List);
+
+ GET(mode, String);
+ GET(autoconfig_url, String);
+ GET(secure_host, String);
+ GET(secure_port, Int);
+ GET(ftp_host, String);
+ GET(ftp_port, Int);
+ GET(socks_host, String);
+ GET(socks_port, Int);
+ GET(rtsp_host, String);
+ GET(rtsp_port, Int);
+
+ if (http_proxy.isEmpty())
+ use_http_host = false;
+ else
+ use_http_host = true;
+}
+
+
+bool ProxyConfPrivate::isHostExcluded(const QString &host)
+{
+ if (host.isEmpty())
+ return true;
+
+ if (ignore_hosts.isEmpty())
+ return false;
+
+ QHostAddress ipAddress;
+ bool isIpAddress = ipAddress.setAddress(host);
+
+ foreach (QVariant h, ignore_hosts) {
+ QString entry = h.toString();
+ if (isIpAddress && ipAddress.isInSubnet(QHostAddress::parseSubnet(entry))) {
+ return true; // excluded
+ } else {
+ // do wildcard matching
+ QRegExp rx(entry, Qt::CaseInsensitive, QRegExp::Wildcard);
+ if (rx.exactMatch(host))
+ return true;
+ }
+ }
+
+ // host was not excluded
+ return false;
+}
+
+
+QList<QNetworkProxy> ProxyConfPrivate::flush(const QNetworkProxyQuery &query)
+{
+ QList<QNetworkProxy> result;
+
+#if 0
+ qDebug()<<"http_proxy" << http_proxy;
+ qDebug()<<"http_port" << http_port;
+ qDebug()<<"ignore_hosts" << ignore_hosts;
+ qDebug()<<"use_http_host" << use_http_host;
+ qDebug()<<"mode" << mode;
+ qDebug()<<"autoconfig_url" << autoconfig_url;
+ qDebug()<<"secure_host" << secure_host;
+ qDebug()<<"secure_port" << secure_port;
+ qDebug()<<"ftp_host" << ftp_host;
+ qDebug()<<"ftp_port" << ftp_port;
+ qDebug()<<"socks_host" << socks_host;
+ qDebug()<<"socks_port" << socks_port;
+ qDebug()<<"rtsp_host" << rtsp_host;
+ qDebug()<<"rtsp_port" << rtsp_port;
+#endif
+
+ if (isHostExcluded(query.peerHostName()))
+ return result; // no proxy for this host
+
+ if (mode == "auto") {
+ // TODO: pac currently not supported, fix me
+ return result;
+ }
+
+ if (mode == "manual") {
+ bool isHttps = false;
+ QString protocol = query.protocolTag().toLower();
+
+ // try the protocol-specific proxy
+ QNetworkProxy protocolSpecificProxy;
+
+ if (protocol == QLatin1String("ftp")) {
+ if (!ftp_host.isEmpty()) {
+ protocolSpecificProxy.setType(QNetworkProxy::FtpCachingProxy);
+ protocolSpecificProxy.setHostName(ftp_host);
+ protocolSpecificProxy.setPort(ftp_port);
+ }
+ } else if (protocol == QLatin1String("http")) {
+ if (!http_proxy.isEmpty()) {
+ protocolSpecificProxy.setType(QNetworkProxy::HttpProxy);
+ protocolSpecificProxy.setHostName(http_proxy);
+ protocolSpecificProxy.setPort(http_port);
+ }
+ } else if (protocol == QLatin1String("https")) {
+ isHttps = true;
+ if (!secure_host.isEmpty()) {
+ protocolSpecificProxy.setType(QNetworkProxy::HttpProxy);
+ protocolSpecificProxy.setHostName(secure_host);
+ protocolSpecificProxy.setPort(secure_port);
+ }
+ }
+
+ if (protocolSpecificProxy.type() != QNetworkProxy::DefaultProxy)
+ result << protocolSpecificProxy;
+
+
+ if (!socks_host.isEmpty()) {
+ QNetworkProxy proxy;
+ proxy.setType(QNetworkProxy::Socks5Proxy);
+ proxy.setHostName(socks_host);
+ proxy.setPort(socks_port);
+ result << proxy;
+ }
+
+
+ // Add the HTTPS proxy if present (and if we haven't added yet)
+ if (!isHttps) {
+ QNetworkProxy https;
+ if (!secure_host.isEmpty()) {
+ https.setType(QNetworkProxy::HttpProxy);
+ https.setHostName(secure_host);
+ https.setPort(secure_port);
+ }
+
+ if (https.type() != QNetworkProxy::DefaultProxy &&
+ https != protocolSpecificProxy)
+ result << https;
+ }
+ }
+
+ return result;
+}
+
+
+ProxyConf::ProxyConf()
+ : d_ptr(new ProxyConfPrivate)
+{
+ g_type_init();
+ d_ptr->prefix = CONF_PROXY "/";
+ d_ptr->http_prefix = HTTP_PROXY "/";
+}
+
+ProxyConf::~ProxyConf()
+{
+ delete d_ptr;
+}
+
+
+QList<QNetworkProxy> ProxyConf::flush(const QNetworkProxyQuery &query)
+{
+ d_ptr->readProxyData();
+ return d_ptr->flush(query);
+}
+
+
+static int refcount = 0;
+static QReadWriteLock lock;
+
+void ProxyConf::update()
+{
+ QWriteLocker locker(&lock);
+ NetworkProxyFactory *factory = new NetworkProxyFactory();
+ QNetworkProxyFactory::setApplicationProxyFactory((QNetworkProxyFactory*)factory);
+ refcount++;
+}
+
+
+void ProxyConf::clear(void)
+{
+ QWriteLocker locker(&lock);
+ refcount--;
+ if (refcount == 0)
+ QNetworkProxyFactory::setApplicationProxyFactory(NULL);
+
+ if (refcount<0)
+ refcount = 0;
+}
+
+
+} // namespace Maemo
diff --git a/src/3rdparty/libconninet/src/proxyconf.h b/src/3rdparty/libconninet/src/proxyconf.h
new file mode 100644
index 0000000000..7711c49e11
--- /dev/null
+++ b/src/3rdparty/libconninet/src/proxyconf.h
@@ -0,0 +1,53 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2010 Nokia Corporation. All rights reserved.
+
+ Contact: Jukka Rissanen <jukka.rissanen@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+#ifndef PROXYCONF_H
+#define PROXYCONF_H
+
+#include <QString>
+#include <QNetworkProxy>
+
+namespace Maemo {
+
+class ProxyConfPrivate;
+class ProxyConf {
+private:
+ ProxyConfPrivate *d_ptr;
+
+public:
+ ProxyConf();
+ virtual ~ProxyConf();
+
+ QList<QNetworkProxy> flush(const QNetworkProxyQuery &query = QNetworkProxyQuery()); // read the proxies from db
+
+ /* Note that for each update() call there should be corresponding
+ * clear() call because the ProxyConf class implements a reference
+ * counting mechanism. The factory is removed only when there is
+ * no one using the factory any more.
+ */
+ static void update(void); // this builds QNetworkProxy factory
+ static void clear(void); // this removes QNetworkProxy factory
+};
+
+} // namespace Maemo
+
+#endif
diff --git a/src/3rdparty/libconninet/tests/Makefile.am b/src/3rdparty/libconninet/tests/Makefile.am
new file mode 100644
index 0000000000..f6f41ea5d5
--- /dev/null
+++ b/src/3rdparty/libconninet/tests/Makefile.am
@@ -0,0 +1,39 @@
+DEFS = -DDBUS_API_SUBJECT_TO_CHANGE
+INCLUDES = @GLIB_CFLAGS@ @DBUS_CFLAGS@ @CONNSETTINGS_CFLAGS@ @OSSO_IC_CFLAGS@ @ICD_DEV_CFLAGS@ \
+ @QTCORE_CFLAGS@ @QTDBUS_CFLAGS@ @QTCORE_CFLAGS@ @QTNETWORK_CFLAGS@ @QTTEST_CFLAGS@ \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src
+
+LIBS = @GLIB_LIBS@ @DBUS_LIBS@ @CONNSETTINGS_LIBS@ @OSSO_IC_LIBS@ @ICD_DEV_LIBS@ \
+ @QTCORE_LIBS@ @QTDBUS_LIBS@ @QTCORE_LIBS@ @QTNETWORK_LIBS@ @QTTEST_LIBS@ \
+ $(top_builddir)/src/libconninet.la
+
+AM_CFLAGS = $(CONCFLAGS)
+AM_LDFLAGS = -static
+
+bin_PROGRAMS = test_dbusdispatcher test_iapconf test_maemo_icd test_iapmonitor test_proxyconf
+
+test_dbusdispatcher_SOURCES = ut_dbusdispatcher.cpp
+ut_dbusdispatcher.o: ut_dbusdispatcher.moc
+
+test_iapconf_SOURCES = ut_iapconf.cpp
+ut_iapconf.o: ut_iapconf.moc
+
+test_maemo_icd_SOURCES = ut_maemo_icd.cpp
+ut_maemo_icd.o: ut_maemo_icd.moc
+
+test_iapmonitor_SOURCES = ut_iapmonitor.cpp
+ut_iapmonitor.o: ut_iapmonitor.moc
+
+test_proxyconf_SOURCES = ut_proxyconf.cpp
+ut_proxyconf.o: ut_proxyconf.moc
+
+
+MAINTAINERCLEANFILES = Makefile.in
+
+# This rule lets GNU make create any *.moc from the equivalent *.cpp
+%.moc: %.cpp
+ moc $< -o $@
+
+# This line ensures that generated moc files are deleted when we make clean.
+CLEANFILES = *.moc
diff --git a/src/3rdparty/libconninet/tests/ut_dbusdispatcher.cpp b/src/3rdparty/libconninet/tests/ut_dbusdispatcher.cpp
new file mode 100644
index 0000000000..70deb3f90f
--- /dev/null
+++ b/src/3rdparty/libconninet/tests/ut_dbusdispatcher.cpp
@@ -0,0 +1,191 @@
+/* * This file is part of conn-dui-settings-inet *
+ *
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * Contact: Aapo Makela <aapo.makela@nokia.com>
+ *
+ * This software, including documentation, is protected by copyright
+ * controlled by Nokia Corporation. All rights are reserved. Copying,
+ * including reproducing, storing, adapting or translating, any or all of
+ * this material requires the prior written consent of Nokia Corporation.
+ * This material also contains confidential information which may not be
+ * disclosed to others without the prior written consent of Nokia.
+ */
+
+#include <QtTest/QtTest>
+#include <QCoreApplication>
+#include <QEventLoop>
+#include <QDebug>
+#include <icd/dbus_api.h>
+
+#include <dbusdispatcher.h>
+
+class Ut_DBusDispatcher : public QObject
+{
+ Q_OBJECT
+
+private Q_SLOTS:
+ void init();
+ void cleanup();
+ void initTestCase();
+ void cleanupTestCase();
+
+ void simpleSignalReceived(const QString& interface,
+ const QString& signal,
+ const QList<QVariant>& args);
+ void simpleCallReply(const QString& method,
+ const QList<QVariant>& args,
+ const QString& error);
+ void simpleCall();
+
+ void complexCallReply(const QString& method,
+ const QList<QVariant>& args,
+ const QString& error);
+ void complexCall();
+
+private:
+ Maemo::DBusDispatcher *mSubject;
+ QProcess *icd_stub;
+
+ QString mMethod;
+ QString mInterface;
+ QString mSignal;
+ QList<QVariant> mArgs;
+};
+
+void Ut_DBusDispatcher::init()
+{
+ mSubject = new Maemo::DBusDispatcher("com.nokia.icd2", "/com/nokia/icd2",
+ "com.nokia.icd2");
+
+ // Start icd2 stub
+ icd_stub = new QProcess(this);
+ icd_stub->start("/usr/bin/icd2_stub.py");
+ QTest::qWait(1000);
+}
+
+void Ut_DBusDispatcher::cleanup()
+{
+ // Terminate icd2 stub
+ icd_stub->terminate();
+ icd_stub->waitForFinished();
+
+ delete mSubject;
+ mSubject = 0;
+}
+
+void Ut_DBusDispatcher::initTestCase()
+{
+}
+
+void Ut_DBusDispatcher::cleanupTestCase()
+{
+}
+
+void Ut_DBusDispatcher::simpleSignalReceived(const QString& interface,
+ const QString& signal,
+ const QList<QVariant>& args)
+{
+ // Signal handler, which simply records what has been signalled
+ mInterface = interface;
+ mSignal = signal;
+ mArgs = args;
+}
+
+void Ut_DBusDispatcher::simpleCallReply(const QString& method,
+ const QList<QVariant>& args,
+ const QString& error)
+{
+ mMethod = method;
+
+ // Check that method matches and at least WLAN_INFRA is returned
+ QVERIFY(error.isEmpty());
+ QVERIFY(args[0].toStringList().contains("WLAN_INFRA"));
+}
+
+void Ut_DBusDispatcher::simpleCall()
+{
+ uint flags = 0;
+ QList<QVariant> reply;
+ int idx = 0;
+ QTimer timer;
+
+ // Connect signals
+ connect(mSubject, SIGNAL(signalReceived(const QString&,
+ const QString&,
+ const QList<QVariant>&)),
+ this, SLOT(simpleSignalReceived(const QString&,
+ const QString&,
+ const QList<QVariant>&)));
+ connect(mSubject, SIGNAL(callReply(const QString&,
+ const QList<QVariant>&,
+ const QString&)),
+ this, SLOT(simpleCallReply(const QString&,
+ const QList<QVariant>&,
+ const QString&)));
+
+ // Request scan and verify the call starts succesfully
+ QVERIFY(mSubject->callAsynchronous("scan_req", flags));
+
+ // Wait 1st scan signal for 10 secs
+ timer.setSingleShot(true);
+ timer.start(10000);
+ while (timer.isActive() && mInterface.isEmpty()) {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+ idx++;
+ }
+ timer.stop();
+
+ // Sanity checks for the scan result
+ QVERIFY(mInterface == "com.nokia.icd2"); // interface is icd2
+ QVERIFY(mMethod == "scan_req"); // method is scan_req
+ QVERIFY(mSignal == "scan_result_sig"); // signal is scan result
+ QVERIFY(mArgs[0] == QVariant(0) ||
+ mArgs[0] == QVariant(4)); // First argument is status
+ // (0 == NEW, 4 == COMPLETED)
+ //QVERIFY(mArgs.contains(QVariant("WLAN_INFRA"))); // WLAN scan result
+}
+
+void Ut_DBusDispatcher::complexCallReply(const QString& method,
+ const QList<QVariant>& args,
+ const QString& error)
+{
+ mMethod = method;
+
+ // Check that method has not return arguments and error is not set
+ QVERIFY(error.isEmpty());
+ QVERIFY(args.isEmpty());
+}
+
+void Ut_DBusDispatcher::complexCall()
+{
+ uint flags = ICD_CONNECTION_FLAG_UI_EVENT;
+ QList<QVariant> reply;
+ QVariantList networks;
+ QVariantList network1;
+
+ network1 << "" << (uint)0 << "" << "WLAN_INFRA" << (uint)0x05000011 << QByteArray("osso@46@net");
+ networks << QVariant(network1);
+
+ // Connect signal
+ connect(mSubject, SIGNAL(callReply(const QString&,
+ const QList<QVariant>&,
+ const QString&)),
+ this, SLOT(complexCallReply(const QString&,
+ const QList<QVariant>&,
+ const QString&)));
+
+ // Request connect and verify the call starts succesfully
+ QVERIFY(mSubject->callAsynchronous("connect_req", flags, networks));
+
+ QTest::qWait(1000);
+
+ // Sanity checks for the scan result
+ QVERIFY(mInterface == "com.nokia.icd2"); // interface is icd2
+ QVERIFY(mMethod == "connect_req"); // method connect_req
+}
+
+QTEST_MAIN(Ut_DBusDispatcher)
+
+#include "ut_dbusdispatcher.moc"
diff --git a/src/3rdparty/libconninet/tests/ut_iapconf.cpp b/src/3rdparty/libconninet/tests/ut_iapconf.cpp
new file mode 100644
index 0000000000..6a91d61a0d
--- /dev/null
+++ b/src/3rdparty/libconninet/tests/ut_iapconf.cpp
@@ -0,0 +1,186 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2009 Nokia Corporation. All rights reserved.
+
+ Contact: Aapo Makela <aapo.makela@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+
+#include <QtTest/QtTest>
+#include <QDebug>
+
+#include <iapconf.h>
+
+class Ut_IAPConf : public QObject
+{
+ Q_OBJECT
+
+private Q_SLOTS:
+ void init();
+ void cleanup();
+ void initTestCase();
+ void cleanupTestCase();
+
+ void setupIAP();
+ void setupIAPContainingDot();
+ void unsetIAPValueIsNotValid();
+ void verifyAllIAPs();
+ void allForEmptyConfReturnsEmptyList();
+ void settingInvalidValueUnsetsKey();
+
+private:
+ Maemo::IAPConf *mSubject;
+};
+
+void Ut_IAPConf::init()
+{
+ mSubject = new Maemo::IAPConf("test_iap");
+}
+
+void Ut_IAPConf::cleanup()
+{
+ // Clear made settings
+ mSubject->clear();
+
+ delete mSubject;
+ mSubject = 0;
+}
+
+void Ut_IAPConf::initTestCase()
+{
+}
+
+void Ut_IAPConf::cleanupTestCase()
+{
+}
+
+void Ut_IAPConf::setupIAP()
+{
+ // Set bunch of values
+ mSubject->set("ipv4_type", "AUTO",
+ "wlan_wepkey1", "connt",
+ "wlan_wepdefkey", 1,
+ "wlan_ssid", QByteArray("CONNTEST-1"));
+
+ // Set one value
+ mSubject->setValue("type", "WLAN_INFRA");
+
+ // Check all values that they were set correctly
+ QVERIFY(mSubject->value("ipv4_type").toString() == "AUTO");
+ QVERIFY(mSubject->value("wlan_wepkey1").toString() == "connt");
+ QVERIFY(mSubject->value("wlan_wepdefkey").toInt() == 1);
+ QVERIFY(mSubject->value("wlan_ssid").toByteArray() == QByteArray("CONNTEST-1"));
+ QVERIFY(mSubject->value("type").toString() == "WLAN_INFRA");
+}
+
+void Ut_IAPConf::setupIAPContainingDot()
+{
+ delete mSubject;
+ mSubject = new Maemo::IAPConf("test.iap");
+
+ // Set and check one value
+ mSubject->setValue("type", "DUMMY");
+ QVERIFY(mSubject->value("type").toString() == "DUMMY");
+}
+
+void Ut_IAPConf::unsetIAPValueIsNotValid()
+{
+ QVariant invalidValue = mSubject->value("this_value_does_not_exist");
+ QVERIFY(invalidValue.isValid() == false);
+}
+
+void Ut_IAPConf::verifyAllIAPs()
+{
+ int count = 0, extras = 0;
+ QRegExp regexp("iap[1-3]");
+ Maemo::IAPConf iap1("iap1");
+ Maemo::IAPConf iap2("iap2");
+ Maemo::IAPConf iap3("iap3");
+
+ iap1.clear();
+ iap2.clear();
+ iap3.clear();
+
+ iap1.setValue("name", "iap1");
+ iap2.setValue("name", "iap2");
+ iap3.setValue("name", "iap3");
+
+ count = extras = 0;
+ QList<QString> iaps;
+ Maemo::IAPConf::getAll(iaps, true);
+ foreach (QString iap_path, iaps) {
+ QString iap_id = iap_path.section('/', 5); /* This is the IAP id */
+ if (!iap_id.contains(regexp)) {
+ extras++;
+ continue;
+ }
+ Maemo::IAPConf iap(iap_id);
+ QString name = iap.value("name").toString();
+ QVERIFY(name == iap_id);
+ count++;
+ }
+ QCOMPARE(count, iaps.size()-extras);
+
+ iap1.clear();
+ iap2.clear();
+ iap3.clear();
+
+ iap1.setValue("name", "iap1");
+ iap2.setValue("name", "iap2");
+ iap3.setValue("name", "iap3");
+
+ count = extras = 0;
+ Maemo::IAPConf::getAll(iaps);
+ foreach (QString iap_id, iaps) {
+ if (!iap_id.contains(regexp)) {
+ extras++;
+ continue;
+ }
+ Maemo::IAPConf iap(iap_id);
+ QString name = iap.value("name").toString();
+ QVERIFY(name == iap_id);
+ count++;
+ }
+ QCOMPARE(count, iaps.size()-extras);
+}
+
+void Ut_IAPConf::allForEmptyConfReturnsEmptyList()
+{
+ // Clear everything in configuration
+ mSubject->clearAll();
+
+ // Get all for a list and check that it is empty
+ QStringList iaps;
+ mSubject->getAll(iaps);
+ QVERIFY(iaps.isEmpty());
+}
+
+void Ut_IAPConf::settingInvalidValueUnsetsKey()
+{
+ // Setup some IAP
+ setupIAP();
+
+ // Set invalid value to unset "wlan_wepdefkey" key and verify that the
+ // value is unset
+ mSubject->setValue("wlan_wepdefkey", QVariant());
+ QVERIFY(!mSubject->value("wlan_wepdefkey").isValid());
+}
+
+QTEST_MAIN(Ut_IAPConf)
+
+#include "ut_iapconf.moc"
diff --git a/src/3rdparty/libconninet/tests/ut_iapmonitor.cpp b/src/3rdparty/libconninet/tests/ut_iapmonitor.cpp
new file mode 100644
index 0000000000..f14f623c4b
--- /dev/null
+++ b/src/3rdparty/libconninet/tests/ut_iapmonitor.cpp
@@ -0,0 +1,118 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2009-2010 Nokia Corporation. All rights reserved.
+
+ Contact: Jukka Rissanen <jukka.rissanen@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+
+#include <QtTest/QtTest>
+#include <QDebug>
+
+#include <iapmonitor.h>
+#include <iapconf.h>
+
+static const char *iap_id = "test_monitor_1";
+
+class TestIAPMonitor : public Maemo::IAPMonitor
+{
+public:
+ QString addedIap;
+ QString removedIap;
+
+protected:
+ virtual void iapAdded(const QString &id)
+ {
+ addedIap = id;
+ }
+
+ virtual void iapRemoved(const QString &id)
+ {
+ removedIap = id;
+ }
+};
+
+class Ut_IAPMonitor : public QObject
+{
+ Q_OBJECT
+
+private Q_SLOTS:
+ void init();
+ void cleanup();
+ void initTestCase();
+ void cleanupTestCase();
+
+ void check();
+
+private:
+ TestIAPMonitor *mon;
+ Maemo::IAPConf *iap;
+};
+
+void Ut_IAPMonitor::init()
+{
+ mon = new TestIAPMonitor;
+}
+
+void Ut_IAPMonitor::cleanup()
+{
+ delete mon;
+ mon = 0;
+}
+
+void Ut_IAPMonitor::initTestCase()
+{
+}
+
+void Ut_IAPMonitor::cleanupTestCase()
+{
+}
+
+void Ut_IAPMonitor::check()
+{
+ QVERIFY(mon->addedIap.isEmpty());
+
+ iap = new Maemo::IAPConf(iap_id);
+ iap->set("ipv4_type", "AUTO",
+ "wlan_wepkey1", "connt",
+ "wlan_wepdefkey", 1,
+ "wlan_ssid", QByteArray(iap_id));
+
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+ QVERIFY(mon->addedIap == iap_id);
+ mon->addedIap.clear();
+
+ QVERIFY(mon->removedIap.isEmpty());
+
+ // Unset only one value and verify that IAP is not removed
+ iap->set("ipv4_type", QVariant());
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+ QVERIFY(mon->removedIap.isEmpty());
+
+ // Clear the whole IAP and check that it is removed
+ iap->clear();
+ delete iap;
+
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+
+ QVERIFY(mon->removedIap == iap_id);
+}
+
+QTEST_MAIN(Ut_IAPMonitor)
+
+#include "ut_iapmonitor.moc"
diff --git a/src/3rdparty/libconninet/tests/ut_maemo_icd.cpp b/src/3rdparty/libconninet/tests/ut_maemo_icd.cpp
new file mode 100644
index 0000000000..494829d327
--- /dev/null
+++ b/src/3rdparty/libconninet/tests/ut_maemo_icd.cpp
@@ -0,0 +1,274 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * Contact: Jukka Rissanen <jukka.rissanen@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+
+// !!!!
+// !!!! NOTE: THESE TEST DO NOT REALLY WORK YET BECAUSE OF MISSING
+// !!!! FUNCTIONALITY IN ICD2 STUB. YOU HAVE BEEN WARNED.
+// !!!!
+
+
+#include <QtTest/QtTest>
+#include <QCoreApplication>
+#include <QEventLoop>
+#include <QDebug>
+#include <icd/dbus_api.h>
+
+#include "maemo_icd.h"
+
+class Ut_MaemoIcd : public QObject
+{
+ Q_OBJECT
+
+private Q_SLOTS:
+ void init();
+ void cleanup();
+ void initTestCase();
+ void cleanupTestCase();
+
+ void scan_req();
+ void scan_cancel_req();
+ void connect_req_default();
+ void state_req_all();
+ void state_req();
+ void statistics_req_all();
+ void statistics_req();
+ void addrinfo_req_all();
+ void addrinfo_req();
+
+private:
+ void disconnect_req_default(); // this is currently not run
+ void connect_req_specific(); // this is currently not run
+ QProcess *icd_stub;
+ bool connect_iap(Maemo::IcdConnectResult &connect_result,
+ QString &result,
+ QString &error,
+ QString iap=QString());
+};
+
+
+QString create_error_str(Maemo::Icd &icd)
+{
+ return icd.error();
+}
+
+
+void Ut_MaemoIcd::init()
+{
+ icd_stub = new QProcess(this);
+ icd_stub->setStandardOutputFile("/tmp/ut_maemo_icd.log");
+ icd_stub->start("/usr/bin/icd2_stub.py");
+ QTest::qWait(1000);
+
+ // Set the statistics
+ QProcess dbus_send;
+ dbus_send.start("dbus-send --type=method_call --system "
+ "--dest=com.nokia.icd2 /com/nokia/icd2 "
+ "com.nokia.icd2.testing.set_statistics "
+ "uint32:1024 uint32:256");
+ dbus_send.waitForFinished();
+
+}
+
+void Ut_MaemoIcd::cleanup()
+{
+ icd_stub->terminate();
+ icd_stub->waitForFinished();
+}
+
+void Ut_MaemoIcd::initTestCase()
+{
+}
+
+void Ut_MaemoIcd::cleanupTestCase()
+{
+}
+
+void Ut_MaemoIcd::scan_req()
+{
+ QList<Maemo::IcdScanResult> scanned;
+ QStringList scannedNetworkTypes;
+ QStringList networkTypesToScan;
+ QString error;
+ Maemo::Icd icd(ICD_SHORT_SCAN_TIMEOUT);
+
+ scannedNetworkTypes = icd.scan(ICD_SCAN_REQUEST_ACTIVE,
+ networkTypesToScan,
+ scanned,
+ error);
+ QVERIFY(error.isEmpty());
+ QCOMPARE(scanned.size(), 3);
+ QVERIFY(scannedNetworkTypes[0] == "WLAN_INFRA");
+ QVERIFY(scannedNetworkTypes[1] == "DUN_GSM_PS");
+}
+
+void Ut_MaemoIcd::scan_cancel_req()
+{
+ Maemo::Icd icd;
+ icd.scanCancel();
+ // Not much to verify here
+}
+
+bool Ut_MaemoIcd::connect_iap(Maemo::IcdConnectResult &connect_result,
+ QString &result,
+ QString &error,
+ QString iap)
+{
+ icd_connection_flags flags = ICD_CONNECTION_FLAG_USER_EVENT;
+ bool st;
+ Maemo::Icd icd(ICD_SHORT_CONNECT_TIMEOUT);
+
+ if (iap.isEmpty()) {
+ qDebug() << "connecting to default IAP";
+ st = icd.connect(flags, connect_result);
+ } else {
+ qDebug() << "connecting to" << iap;
+ st = icd.connect(flags, iap, result);
+ }
+
+ error = create_error_str(icd);
+ return st;
+}
+
+void Ut_MaemoIcd::connect_req_default()
+{
+ Maemo::IcdConnectResult connect_result;
+ QString result, error;
+ bool st;
+ st = connect_iap(connect_result, result, error);
+ QVERIFY2(st, error.toAscii().data());
+ result = connect_result.connect.network_id.data();
+ qDebug() << result;
+}
+
+
+void Ut_MaemoIcd::disconnect_req_default()
+{
+ icd_connection_flags flags = ICD_CONNECTION_FLAG_USER_EVENT;
+ bool st;
+ Maemo::Icd icd(ICD_SHORT_CONNECT_TIMEOUT);
+ icd.disconnect(flags);
+}
+
+
+void Ut_MaemoIcd::connect_req_specific()
+{
+ Maemo::IcdConnectResult connect_result;
+ QString result;
+ QString error;
+ bool st;
+ st = connect_iap(connect_result, result, error, "wpa2gx2.osso.net");
+ QVERIFY2(st, error.toAscii().data());
+ qDebug() << result;
+}
+
+
+void Ut_MaemoIcd::state_req_all()
+{
+ QList<Maemo::IcdStateResult> state_results;
+ Maemo::Icd icd;
+ int sig;
+ sig = icd.state(state_results);
+ QVERIFY2(sig==1, create_error_str(icd).toAscii().data());
+}
+
+
+void Ut_MaemoIcd::state_req()
+{
+ Maemo::IcdStateResult state_result;
+ Maemo::Icd icd;
+ int sig;
+ QString service_type, service_id;
+ QString network_type("WLAN_INFRA");
+ QByteArray network_id("wpa2gx2.osso.net");
+ sig = icd.state(service_type, 0, service_id,
+ network_type, (uint)0x17a1, network_id,
+ state_result);
+ QVERIFY2(sig==1, create_error_str(icd).toAscii().data());
+}
+
+
+void Ut_MaemoIcd::statistics_req_all()
+{
+ QList<Maemo::IcdStatisticsResult> stats_results;
+ Maemo::Icd icd;
+ int sig;
+ QString err;
+ sig = icd.statistics(stats_results);
+ err = create_error_str(icd);
+ if (!err.isEmpty())
+ QVERIFY2(sig==1, err.toAscii().data());
+ else
+ QCOMPARE(sig, 1);
+
+ for(int i=0; i<sig; i++) {
+ QVERIFY(stats_results[i].bytes_received == 1024);
+ QVERIFY(stats_results[i].bytes_sent == 256);
+ }
+}
+
+
+// Can be uncommented when needed function is enabled in Icd class
+void Ut_MaemoIcd::statistics_req()
+{
+ Maemo::IcdStatisticsResult stats_result;
+ Maemo::Icd icd;
+ int sig;
+ QString service_type, service_id;
+ QString network_type("WLAN_INFRA");
+ QByteArray network_id("wpa2gx2.osso.net");
+ sig = icd.statistics(service_type, 0, service_id,
+ network_type, (uint)0x17a1, network_id,
+ stats_result);
+ QVERIFY2(sig==1, create_error_str(icd).toAscii().data());
+ QVERIFY(stats_result.bytes_received == 1024);
+ QVERIFY(stats_result.bytes_sent == 256);
+}
+
+
+void Ut_MaemoIcd::addrinfo_req_all()
+{
+ QList<Maemo::IcdAddressInfoResult> addr_results;
+ Maemo::Icd icd;
+ int sig;
+ sig = icd.addrinfo(addr_results);
+ QVERIFY2(sig==1, create_error_str(icd).toAscii().data());
+}
+
+
+void Ut_MaemoIcd::addrinfo_req()
+{
+ Maemo::IcdAddressInfoResult addr_result;
+ Maemo::Icd icd;
+ int sig;
+ QString service_type, service_id;
+ QString network_type("WLAN_INFRA");
+ QByteArray network_id("wpa2gx2.osso.net");
+ sig = icd.addrinfo(service_type, 0, service_id,
+ network_type, (uint)0x17a1, network_id,
+ addr_result);
+ QVERIFY2(sig==1, create_error_str(icd).toAscii().data());
+}
+
+
+QTEST_MAIN(Ut_MaemoIcd)
+
+#include "ut_maemo_icd.moc"
diff --git a/src/3rdparty/libconninet/tests/ut_proxyconf.cpp b/src/3rdparty/libconninet/tests/ut_proxyconf.cpp
new file mode 100644
index 0000000000..1f407f0ee2
--- /dev/null
+++ b/src/3rdparty/libconninet/tests/ut_proxyconf.cpp
@@ -0,0 +1,400 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2010 Nokia Corporation. All rights reserved.
+
+ Contact: Jukka Rissanen <jukka.rissanen@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+
+#include <QtTest/QtTest>
+#include <QDebug>
+#include <QNetworkProxy>
+#include <conn_settings.h>
+
+#include "../src/proxyconf.h"
+
+class Ut_ProxyConf : public QObject
+{
+ Q_OBJECT
+
+private Q_SLOTS:
+ void init();
+ void cleanup();
+ void initTestCase();
+ void cleanupTestCase();
+
+ // tests without the factory
+ void proxy_ftp_no_factory_ok_auto();
+ void proxy_ftp_no_factory_ok_manual();
+ void proxy_http_no_factory_ok_manual();
+ void proxy_https_no_factory_ok_manual();
+ void proxy_socks_no_factory_ok_manual();
+ void proxy_default_no_factory_ok_manual();
+
+ // tests using the factory
+ void proxy_ftp_factory_ok_auto();
+ void proxy_ftp_factory_ok_manual();
+ void proxy_http_factory_ok_manual();
+ void proxy_https_factory_ok_manual();
+ void proxy_socks_factory_ok_manual();
+ void proxy_http_factory_ok_manual_clear();
+ void proxy_default_factory_ok_manual();
+ void proxy_http_factory_ok_manual_ignore_list();
+ void proxy_default_factory_ok_manual_system();
+
+private:
+ Maemo::ProxyConf *pc;
+};
+
+
+void put(QString var, QString type, QString value)
+{
+ QProcess gconf;
+ if (value.isEmpty())
+ gconf.start(QString("gconftool-2 -u /system/proxy/"+var));
+ else
+ gconf.start(QString("gconftool-2 -s /system/proxy/"+var+" -t "+type+" "+value));
+ gconf.waitForFinished();
+}
+
+void put_http(QString var, QString type, QString value)
+{
+ QProcess gconf;
+ if (value.isEmpty())
+ gconf.start(QString("gconftool-2 -u /system/http_proxy/"+var));
+ else
+ gconf.start(QString("gconftool-2 -s /system/http_proxy/"+var+" -t "+type+" "+value));
+ gconf.waitForFinished();
+}
+
+void put_list(QString var, QString type, QList<QString> value)
+{
+ QProcess gconf;
+ QString values = "[";
+ foreach (QString str, value)
+ values = values + str + ",";
+ values.chop(1);
+ values = values + "]";
+
+ gconf.start(QString("gconftool-2 -s /system/http_proxy/"+var+" -t list --list-type="+type+" "+values));
+ gconf.waitForFinished();
+}
+
+
+void Ut_ProxyConf::init()
+{
+ put_http("host", "string", "my.proxy.com");
+ put_http("port", "int", "8080");
+
+ QList<QString> list;
+ list.append("foo.bar.com");
+ list.append("192.168.19.69");
+ list.append("192.168.20.0/24");
+ list.append("bar.foo.com");
+ put_list("ignore_hosts", "string", list);
+ put_http("use_http_host", "boolean", "true");
+
+ put("mode", "string", "auto");
+ put("autoconfig_url", "string", "http://foo.bar.com/autoconf");
+ put("secure_host", "string", "secure_host.com");
+ put("secure_port", "int", "112");
+
+ put("ftp_host", "string", "ftp.nuukia.com");
+ put("ftp_port", "int", "2000");
+ put("socks_host", "string", "socks.host.com");
+ put("socks_port", "int", "10080");
+ put("rtsp_host", "string", "rtsp.voice.com");
+ put("rtsp_port", "int", "1554");
+
+ pc = new Maemo::ProxyConf();
+}
+
+void Ut_ProxyConf::cleanup()
+{
+ delete pc;
+ pc = 0;
+}
+
+void Ut_ProxyConf::initTestCase()
+{
+}
+
+void Ut_ProxyConf::cleanupTestCase()
+{
+}
+
+
+void Ut_ProxyConf::proxy_ftp_no_factory_ok_auto()
+{
+ QList<QNetworkProxy> nplist;
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("ftp://maps.google.com/"));
+
+ nplist = pc->flush(query);
+ QVERIFY(nplist.length()==0);
+}
+
+
+void Ut_ProxyConf::proxy_ftp_no_factory_ok_manual()
+{
+ QList<QNetworkProxy> nplist;
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("ftp://maps.google.com/"));
+
+ put("mode", "string", "manual");
+
+ nplist = pc->flush(query);
+ foreach (QNetworkProxy proxy, nplist) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(nplist.length()==3);
+ QVERIFY(nplist.first().type() == QNetworkProxy::FtpCachingProxy);
+}
+
+
+void Ut_ProxyConf::proxy_http_no_factory_ok_manual()
+{
+ QList<QNetworkProxy> nplist;
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/"));
+
+ put("mode", "string", "manual");
+
+ nplist = pc->flush(query);
+ foreach (QNetworkProxy proxy, nplist) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(nplist.length()==3);
+ QVERIFY(nplist.first().type() == QNetworkProxy::HttpProxy);
+}
+
+
+void Ut_ProxyConf::proxy_https_no_factory_ok_manual()
+{
+ QList<QNetworkProxy> nplist;
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("https://maps.google.com/"));
+
+ put("mode", "string", "manual");
+
+ nplist = pc->flush(query);
+ foreach (QNetworkProxy proxy, nplist) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(nplist.length()==2);
+ QVERIFY(nplist.first().type() == QNetworkProxy::HttpProxy);
+}
+
+
+void Ut_ProxyConf::proxy_socks_no_factory_ok_manual()
+{
+ QList<QNetworkProxy> nplist;
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/"));
+
+ put("mode", "string", "manual");
+ put_http("host", "string", "");
+
+ nplist = pc->flush(query);
+ foreach (QNetworkProxy proxy, nplist) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(nplist.length()==2);
+ QVERIFY(nplist.first().type() == QNetworkProxy::Socks5Proxy);
+}
+
+
+void Ut_ProxyConf::proxy_default_no_factory_ok_manual()
+{
+ QList<QNetworkProxy> nplist;
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("foobar://maps.google.com/"));
+
+ put("mode", "string", "manual");
+ put("socks_host", "string", "");
+ put("secure_host", "string", "");
+
+ nplist = pc->flush(query);
+ foreach (QNetworkProxy proxy, nplist) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(nplist.length()==0);
+}
+
+
+void Ut_ProxyConf::proxy_ftp_factory_ok_auto()
+{
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("ftp://maps.google.com/"));
+ Maemo::ProxyConf::update();
+ QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::proxyForQuery(query);
+ QVERIFY(listOfProxies.length()==1);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy);
+ Maemo::ProxyConf::clear();
+}
+
+
+void Ut_ProxyConf::proxy_ftp_factory_ok_manual()
+{
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("ftp://maps.google.com/"));
+ Maemo::ProxyConf::update();
+
+ put("mode", "string", "manual");
+
+ QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::proxyForQuery(query);
+
+ foreach (QNetworkProxy proxy, listOfProxies) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(listOfProxies.length()==3);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::FtpCachingProxy);
+ Maemo::ProxyConf::clear();
+}
+
+
+void Ut_ProxyConf::proxy_http_factory_ok_manual()
+{
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/"));
+ Maemo::ProxyConf::update();
+
+ put("mode", "string", "manual");
+
+ QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::proxyForQuery(query);
+
+ foreach (QNetworkProxy proxy, listOfProxies) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(listOfProxies.length()==3);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::HttpProxy);
+ Maemo::ProxyConf::clear();
+}
+
+
+void Ut_ProxyConf::proxy_https_factory_ok_manual()
+{
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("https://maps.google.com/"));
+ Maemo::ProxyConf::update();
+
+ put("mode", "string", "manual");
+
+ QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::proxyForQuery(query);
+
+ foreach (QNetworkProxy proxy, listOfProxies) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(listOfProxies.length()==2);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::HttpProxy);
+ Maemo::ProxyConf::clear();
+}
+
+
+void Ut_ProxyConf::proxy_socks_factory_ok_manual()
+{
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/"));
+ Maemo::ProxyConf::update();
+
+ put("mode", "string", "manual");
+ put_http("host", "string", "");
+
+ QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::proxyForQuery(query);
+
+ foreach (QNetworkProxy proxy, listOfProxies) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(listOfProxies.length()==2);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::Socks5Proxy);
+ Maemo::ProxyConf::clear();
+}
+
+
+void Ut_ProxyConf::proxy_http_factory_ok_manual_clear()
+{
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/"));
+ Maemo::ProxyConf::update();
+
+ put("mode", "string", "manual");
+ put_http("host", "string", "192.168.1.1");
+
+ QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::proxyForQuery(query);
+
+ foreach (QNetworkProxy proxy, listOfProxies) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(listOfProxies.length()==3);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::HttpProxy);
+
+ Maemo::ProxyConf::clear();
+ listOfProxies = QNetworkProxyFactory::proxyForQuery(query);
+ QVERIFY(listOfProxies.length()==1);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy);
+}
+
+
+void Ut_ProxyConf::proxy_default_factory_ok_manual()
+{
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("foobar://maps.google.com/"));
+ Maemo::ProxyConf::update();
+
+ put("mode", "string", "manual");
+ put("socks_host", "string", "");
+ put("secure_host", "string", "");
+
+ QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::proxyForQuery(query);
+
+ QVERIFY(listOfProxies.length()==1);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy);
+ Maemo::ProxyConf::clear();
+}
+
+
+void Ut_ProxyConf::proxy_http_factory_ok_manual_ignore_list()
+{
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://192.168.19.70/"));
+ Maemo::ProxyConf::update();
+
+ put("mode", "string", "manual");
+
+ QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::proxyForQuery(query);
+
+ foreach (QNetworkProxy proxy, listOfProxies) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(listOfProxies.length()==3);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::HttpProxy);
+
+ query = QNetworkProxyQuery(QUrl("http://192.168.20.10/"));
+ listOfProxies = QNetworkProxyFactory::proxyForQuery(query);
+ QVERIFY(listOfProxies.length()==1);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy);
+ Maemo::ProxyConf::clear();
+}
+
+
+void Ut_ProxyConf::proxy_default_factory_ok_manual_system()
+{
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/"));
+ Maemo::ProxyConf::update();
+
+ put("mode", "string", "manual");
+
+ QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::systemProxyForQuery(query);
+
+ QVERIFY(listOfProxies.length()==1);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy);
+ Maemo::ProxyConf::clear();
+}
+
+
+
+
+QTEST_MAIN(Ut_ProxyConf)
+
+#include "ut_proxyconf.moc"
diff --git a/src/3rdparty/libgq.pri b/src/3rdparty/libgq.pri
new file mode 100644
index 0000000000..a89706a1e7
--- /dev/null
+++ b/src/3rdparty/libgq.pri
@@ -0,0 +1,9 @@
+INCLUDEPATH += $$PWD/libgq/gconf
+
+HEADERS += \
+ $$PWD/libgq/gconf/gconfitem.h \
+ $$PWD/libgq/gconf/GConfItem
+
+SOURCES += \
+ $$PWD/libgq/gconf/gconfitem.cpp
+
diff --git a/src/3rdparty/libgq/.gitignore b/src/3rdparty/libgq/.gitignore
new file mode 100644
index 0000000000..70a4735f37
--- /dev/null
+++ b/src/3rdparty/libgq/.gitignore
@@ -0,0 +1,37 @@
+/Makefile.in
+/aclocal.m4
+/autom4te.cache/
+/config.guess
+/config.sub
+/configure
+/depcomp
+/gconf/Makefile.in
+/install-sh
+/ltmain.sh
+/missing
+/Makefile
+/config.log
+/config.status
+/gconf/.deps/
+/gconf/Makefile
+/libtool
+/confdefs.h
+/gconf/.libs/
+/gconf/libgq-gconf.la
+/gconf/gq-gconf.pc
+/gconf/moc_gconfitem_h.cpp
+/gconf/mocs.cpp
+/gconf/test-gconf
+/gconf/gconfitem_moc.cpp
+/gconf/test-gconf_moc.cpp
+/libgq-*.tar.gz
+/debian/libgq-gconf-dev/
+/debian/libgq-gconf0/
+/debian/tmp/
+/debian/libgq-gconf0-dbg/
+/debian/libgq-gconf-doc/
+/debian/*.debhelper.log
+/debian/*.substvars
+/debian/files
+/debian/*.debhelper
+/gconf/html/
diff --git a/src/3rdparty/libgq/Makefile.am b/src/3rdparty/libgq/Makefile.am
new file mode 100644
index 0000000000..42b3ece04b
--- /dev/null
+++ b/src/3rdparty/libgq/Makefile.am
@@ -0,0 +1,4 @@
+SUBDIRS = gconf
+
+dist-hook:
+ rm -rf `find $(distdir) -name '*_moc.cpp'`
diff --git a/src/3rdparty/libgq/README b/src/3rdparty/libgq/README
new file mode 100644
index 0000000000..c37abba8ae
--- /dev/null
+++ b/src/3rdparty/libgq/README
@@ -0,0 +1,6 @@
+This is libgq, a set of small libraries with Q wrappers for G things.
+
+* GConf
+
+The libgq-gconf library contains the GConfItem class for accessing
+GConf.
diff --git a/src/3rdparty/libgq/autogen.sh b/src/3rdparty/libgq/autogen.sh
new file mode 100755
index 0000000000..0a4a0343ab
--- /dev/null
+++ b/src/3rdparty/libgq/autogen.sh
@@ -0,0 +1,2 @@
+#! /bin/sh
+autoreconf --install --force -v
diff --git a/src/3rdparty/libgq/configure.ac b/src/3rdparty/libgq/configure.ac
new file mode 100644
index 0000000000..f4fc2be604
--- /dev/null
+++ b/src/3rdparty/libgq/configure.ac
@@ -0,0 +1,23 @@
+AC_INIT([libgq],[0.2],[marius.vollmer@nokia.com],[libgq])
+AC_CONFIG_SRCDIR([Makefile.am])
+AM_INIT_AUTOMAKE([-Wall -Werror tar-ustar foreign])
+
+AC_PROG_CXX
+AC_PROG_LIBTOOL
+
+PKG_CHECK_MODULES([QT], [QtCore])
+PKG_CHECK_MODULES([QTEST], [QtTest])
+PKG_CHECK_MODULES([GLIB], [glib-2.0])
+PKG_CHECK_MODULES([GCONF], [gconf-2.0])
+
+MOC=`pkg-config QtCore --variable=moc_location`
+RCC=`pkg-config QtCore --variable=exec_prefix`/bin/rcc
+
+AC_SUBST([MOC])
+AC_SUBST([RCC])
+
+AC_CONFIG_FILES([Makefile
+ gconf/Makefile
+ gconf/gq-gconf.pc])
+
+AC_OUTPUT
diff --git a/src/3rdparty/libgq/debian/README.scratchbox b/src/3rdparty/libgq/debian/README.scratchbox
new file mode 100644
index 0000000000..23ba7935ce
--- /dev/null
+++ b/src/3rdparty/libgq/debian/README.scratchbox
@@ -0,0 +1,28 @@
+This packages behaves a bit wierdly inside Scratchbox 1, by design.
+
+When building it with dpkg-buildpackage or equivalent, it will disable
+all devkits and adjust PATH. This means that almost all build
+dependencies will come from your installed packages, and not from
+Scratchbox or the configured devkits.
+
+Since some of our packages do not work with Scratchboxes fakeroot
+(because the latter is too old), you should use the targets fakeroot
+instead.
+
+You can disable this behavior by setting SBOX_DONT_SANITIZE in the
+environment.
+
+When this package is build in a certain buildbot, it will go further
+and permantly change the Scratchbox target. This should not happen to
+anyone but the buildbot, but there is a chance it will happen to you
+by accident.
+
+The buildbot is recognized via the $USER environment variable. If it
+matches "bifh[0-9]", the permanent changes will be done.
+
+The permanent changes mostly consist of running apt-get dist-upgrade
+and making sure that the targets fakeroot is used.
+
+This weirdness is brought to you by:
+
+ http://maemo.gitorious.org/maemo-af/maemoify-tools
diff --git a/src/3rdparty/libgq/debian/changelog b/src/3rdparty/libgq/debian/changelog
new file mode 100644
index 0000000000..f6242540bf
--- /dev/null
+++ b/src/3rdparty/libgq/debian/changelog
@@ -0,0 +1,31 @@
+libgq (0.4+0m6) unstable; urgency=low
+
+ * This entry has been added by BIFH queue processor
+ version has been changed to 0.4+0m6
+
+ -- Marius Vollmer <marius.vollmer@nokia.com> Fri, 04 Jun 2010 18:28:43 +0300
+
+libgq (0.4) unstable; urgency=low
+
+ * Never release the GConf client, to avoid having to recreate it
+ immediately. Might fix NB#164690.
+
+ -- Marius Vollmer <marius.vollmer@nokia.com> Fri, 04 Jun 2010 18:10:50 +0300
+
+libgq (0.3) unstable; urgency=low
+
+ * Added autotools to Build-Depends.
+
+ -- Marius Vollmer <marius.vollmer@nokia.com> Tue, 23 Feb 2010 12:04:45 +0200
+
+libgq (0.2) unstable; urgency=low
+
+ * Build fixes.
+
+ -- Marius Vollmer <marius.vollmer@nokia.com> Wed, 16 Dec 2009 15:56:05 +0200
+
+libgq (0.1) unstable; urgency=low
+
+ * Initial release.
+
+ -- Marius Vollmer <marius.vollmer@nokia.com> Wed, 16 Dec 2009 15:54:46 +0200
diff --git a/src/3rdparty/libgq/debian/compat b/src/3rdparty/libgq/debian/compat
new file mode 100644
index 0000000000..7f8f011eb7
--- /dev/null
+++ b/src/3rdparty/libgq/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/src/3rdparty/libgq/debian/control b/src/3rdparty/libgq/debian/control
new file mode 100644
index 0000000000..3feaa466ea
--- /dev/null
+++ b/src/3rdparty/libgq/debian/control
@@ -0,0 +1,43 @@
+Source: libgq
+Section: libs
+Priority: extra
+Maintainer: Marius Vollmer <marius.vollmer@nokia.com>
+Origin: maemo
+Build-Depends: debhelper (>= 7), libqt4-dev, doxygen, libgconf2-dev, libglib2.0-dev, autoconf, automake, libtool
+Vcs-Browser: http://gitorious.org/maemo-af/libgq
+Vcs-Git: git@gitorious.org:maemo-af/libgq.git
+
+Package: libgq-gconf0
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: a Qt wrapper for GConf
+ This library contains the GConfItem class, for easy
+ access to GConf from Qt programs.
+ .
+ This package contains the shared run-time library.
+
+Package: libgq-gconf0-dbg
+Architecture: any
+Depends: libgq-gconf0 (= ${source:Version})
+Description: a Qt wrapper for GConf
+ This library contains the GConfItem class, for easy
+ access to GConf from Qt programs.
+ .
+ This package contains the debugging symbols.
+
+Package: libgq-gconf-dev
+Architecture: any
+Depends: libgq-gconf0 (= ${source:Version}), libqt4-dev, libgconf2-dev
+Description: a Qt wrapper for GConf
+ This library contains the GConfItem class, for easy
+ access to GConf from Qt programs.
+ .
+ This package contains the development files.
+
+Package: libgq-gconf-doc
+Architecture: all
+Description: a Qt wrapper for GConf
+ This library contains the GConfItem class, for easy
+ access to GConf from Qt programs.
+ .
+ This package contains the documentation.
diff --git a/src/3rdparty/libgq/debian/copyright b/src/3rdparty/libgq/debian/copyright
new file mode 100644
index 0000000000..45b04e6929
--- /dev/null
+++ b/src/3rdparty/libgq/debian/copyright
@@ -0,0 +1,8 @@
+Copyright (c) 2009 Nokia Corporation.
+
+This program, is free software; you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License version
+2.1 as published by the Free Software Foundation.
+
+The full text of the LGPL 2.1 can be found in
+/usr/share/common-licenses.
diff --git a/src/3rdparty/libgq/debian/fixup-scratchbox b/src/3rdparty/libgq/debian/fixup-scratchbox
new file mode 100755
index 0000000000..b39ad5fc28
--- /dev/null
+++ b/src/3rdparty/libgq/debian/fixup-scratchbox
@@ -0,0 +1,79 @@
+#! /bin/sh
+
+# XXX - this needs to run under fakeroot...
+
+exec 3>&1 1>&2
+
+real_dpkg_checkbuilddeps () {
+ SBOX_REDIRECT_IGNORE=/usr/bin/perl /usr/bin/perl /usr/bin/dpkg-checkbuilddeps "$@"
+}
+
+finish () {
+ if ! real_dpkg_checkbuilddeps; then
+ echo "This package does not use any devkits."
+ echo "Please install all build dependencies as real packages."
+ echo >&3 FAIL
+ fi
+ exit 0
+}
+
+# The stamp file can not be in the source tree because then it would
+# end up in the source package, which is not what we want. We put it
+# into /var/tmp so that it gets deleted when a new rootstrap is
+# extracted.
+
+STAMP=/var/tmp/SANITIZED.$(head debian/changelog | md5sum | cut -d' ' -f1)
+
+if [ -e $STAMP ]; then
+ exit 0;
+fi
+
+# Only do permanent changes if this is BIFH
+
+echo "$USER" | grep -q 'bifh[0-9]' || finish
+
+# prevent bash from killing the system
+rm -f /var/lib/bash/provide-sh
+
+# clean ~/.texmf-var to avoid trouble with stale things hiding there.
+rm -rf ~/.texmf-var/
+
+pfx="dpkg-checkbuilddeps: Unmet build dependencies:"
+deps=`real_dpkg_checkbuilddeps 2>&1 | grep "^$pfx" | \
+ sed -e "s/$pfx//" -e s'/([^)]*)//g' -e 's/|//'`
+deps="$deps build-essential automake autoconf libtool ed gawk diff dpkg-dev"
+for d in $deps; do
+ echo apt-get "$@" install $d
+ apt-get -o DPkg::Options::=--force-confold -q --force-yes --yes install $d
+done
+apt-get -o DPkg::Options::=--force-confold -q --force-yes --yes dist-upgrade
+
+# Make sure we get a fresh fakeroot installation
+
+# We can't seem to control the value of LD_PRELOAD well enough, so we
+# just copy the good version of libfakeroot over the bad one that
+# Scratchbox uses. This will result in a good version of libfakeroot
+# talking to a bad version of faked, but that seems to work well
+# enough. The protocol between the two is really simple and unlikely
+# to change even when new syscalls are wrapped. And this is a
+# desperate hack anyway, so it's OK if there is blood all over the
+# floor from time to time.
+#
+# After we have overwritten libfakeroot, it no longer works with any
+# host binaries, such as the ones in /scratchbox/compilers/bin or
+# /scratchbox/tools/bin. Thus, we must avoid running those when
+# fakerooted.
+#
+# We use "cp -l" here to avoid overwriting a library that is in use.
+#
+if [ "$(fakeroot -v)" = "fakeroot version 1.4.2" ]; then
+ apt-get -q --force-yes --yes --reinstall install fakeroot
+ cp -fl /usr/lib/libfakeroot/libfakeroot-sysv.so /usr/lib/libfakeroot-sysv/libfakeroot.so.0
+ cp -fl /usr/lib/libfakeroot/libfakeroot-tcp.so /usr/lib/libfakeroot-tcp/libfakeroot.so.0
+else
+ echo "We have $(fakeroot -v), hurray!"
+fi
+
+touch $STAMP
+
+finish
diff --git a/src/3rdparty/libgq/debian/libgq-gconf-dev.install b/src/3rdparty/libgq/debian/libgq-gconf-dev.install
new file mode 100644
index 0000000000..b3d949f416
--- /dev/null
+++ b/src/3rdparty/libgq/debian/libgq-gconf-dev.install
@@ -0,0 +1,5 @@
+usr/include/gq/GConfItem
+usr/include/gq/gconfitem.h
+usr/lib/libgq-gconf.so
+usr/lib/libgq-gconf.a
+usr/lib/pkgconfig/gq-gconf.pc
diff --git a/src/3rdparty/libgq/debian/libgq-gconf-doc.install b/src/3rdparty/libgq/debian/libgq-gconf-doc.install
new file mode 100644
index 0000000000..9007055b25
--- /dev/null
+++ b/src/3rdparty/libgq/debian/libgq-gconf-doc.install
@@ -0,0 +1 @@
+gconf/html usr/share/doc/libgq-gconf-doc/
diff --git a/src/3rdparty/libgq/debian/libgq-gconf0.install b/src/3rdparty/libgq/debian/libgq-gconf0.install
new file mode 100644
index 0000000000..4ca628315b
--- /dev/null
+++ b/src/3rdparty/libgq/debian/libgq-gconf0.install
@@ -0,0 +1 @@
+usr/lib/libgq-gconf.so.*
diff --git a/src/3rdparty/libgq/debian/maemo-sanitize b/src/3rdparty/libgq/debian/maemo-sanitize
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/src/3rdparty/libgq/debian/maemo-sanitize
diff --git a/src/3rdparty/libgq/debian/rules b/src/3rdparty/libgq/debian/rules
new file mode 100755
index 0000000000..1f293b3348
--- /dev/null
+++ b/src/3rdparty/libgq/debian/rules
@@ -0,0 +1,32 @@
+#! /usr/bin/make -f
+
+# Sanitize build environment when running inside Scratchbox 1
+ifneq (,$(wildcard /targets))
+ ifeq (,$(SBOX_DONT_SANITIZE))
+ export PATH:=/bin:/usr/bin
+ export MAKE:=make
+ ifeq (,$(FAKEROOTKEY))
+ export SBOX_REDIRECT_TO_DIRS:=/scratchbox/compilers/bin
+ else
+ export SBOX_REDIRECT_TO_DIRS:=
+ endif
+ ifneq (,$(shell debian/fixup-scratchbox))
+ $(error Error)
+ endif
+ endif
+endif
+
+override_dh_auto_configure:
+ ./autogen.sh
+ dh_auto_configure
+
+override_dh_auto_build:
+ dh_auto_build
+ cd gconf && doxygen
+
+override_dh_strip:
+ dh_strip -plibgq-gconf0 --dbg-package=libgq-gconf0-dbg
+ dh_strip
+
+%:
+ dh $@
diff --git a/src/3rdparty/libgq/gconf/Doxyfile b/src/3rdparty/libgq/gconf/Doxyfile
new file mode 100644
index 0000000000..7f5c11a3d5
--- /dev/null
+++ b/src/3rdparty/libgq/gconf/Doxyfile
@@ -0,0 +1,1514 @@
+# Doxyfile 1.6.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = gq-gconf
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY =
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it parses.
+# With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this tag.
+# The format is ext=language, where ext is a file extension, and language is one of
+# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP,
+# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat
+# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran),
+# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING =
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen to replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penality.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will rougly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page.
+# This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by
+# doxygen. The layout file controls the global structure of the generated output files
+# in an output format independent way. The create the layout file that represents
+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a
+# file name after the option, if omitted DoxygenLayout.xml will be used as the name
+# of the layout file.
+
+LAYOUT_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = gconfitem.h gconfitem.cpp
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS =
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.
+# If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis.
+# Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match.
+# The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.
+# Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET =
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
+
+GENERATE_DOCSET = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER
+# are set, an additional index file will be generated that can be used as input for
+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated
+# HTML documentation.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE =
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add.
+# For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION =
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = NO
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE = 10
+
+# When the SEARCHENGINE tag is enable doxygen will generate a search box for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP)
+# there is already a search function so this one should typically
+# be disabled.
+
+SEARCHENGINE = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader.
+# This is useful
+# if you want to understand what is going on.
+# On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+#
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+#
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
+# powerful graphs.
+
+CLASS_DIAGRAMS = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = NO
+
+# By default doxygen will write a font called FreeSans.ttf to the output
+# directory and reference it in all dot files that doxygen generates. This
+# font does not include all possible unicode characters however, so when you need
+# these (or just want a differently looking font) you can specify the font name
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
+# containing the font.
+
+DOT_FONTNAME = FreeSans
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE = 10
+
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
+# can find it using this tag.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS = YES
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
diff --git a/src/3rdparty/libgq/gconf/GConfItem b/src/3rdparty/libgq/gconf/GConfItem
new file mode 100644
index 0000000000..0a5867141d
--- /dev/null
+++ b/src/3rdparty/libgq/gconf/GConfItem
@@ -0,0 +1 @@
+#include "gconfitem.h"
diff --git a/src/3rdparty/libgq/gconf/Makefile.am b/src/3rdparty/libgq/gconf/Makefile.am
new file mode 100644
index 0000000000..353970d452
--- /dev/null
+++ b/src/3rdparty/libgq/gconf/Makefile.am
@@ -0,0 +1,37 @@
+AM_CXXFLAGS = $(QT_CFLAGS) $(GLIB_CFLAGS) $(GCONF_CFLAGS)
+LIBS += $(QT_LIBS) $(GLIB_LIBS) $(GCONF_LIBS)
+
+lib_LTLIBRARIES = libgq-gconf.la
+
+libgq_gconf_la_SOURCES = GConfItem \
+ gconfitem.h \
+ gconfitem.cpp \
+ gconfitem_moc.cpp
+
+gqincludedir=$(includedir)/gq
+gqinclude_HEADERS = gconfitem.h GConfItem
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = gq-gconf.pc
+
+# Tests
+
+check_PROGRAMS = test-gconf
+
+test_gconf_SOURCES = test-gconf.h test-gconf.cpp test-gconf_moc.cpp
+test_gconf_CFLAGS = $(QTEST_CFLAGS)
+test_gconf_LDADD = libgq-gconf.la $(QTEST_LIBS)
+
+TESTS = run-test-gconf
+
+EXTRA_DIST = run-test-gconf
+
+# Moccing
+
+%_moc.cpp: %.h
+ $(MOC) -o "$@" "$<"
+
+clean-moc:
+ rm -f *_moc.cpp *_moc.lo
+
+clean-local: clean-moc
diff --git a/src/3rdparty/libgq/gconf/gconfitem.cpp b/src/3rdparty/libgq/gconf/gconfitem.cpp
new file mode 100644
index 0000000000..d8c565a7c9
--- /dev/null
+++ b/src/3rdparty/libgq/gconf/gconfitem.cpp
@@ -0,0 +1,376 @@
+/* * This file is part of libgq *
+ *
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * Contact: Marius Vollmer <marius.vollmer@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <QString>
+#include <QStringList>
+#include <QByteArray>
+#include <QVariant>
+#include <QtDebug>
+
+#include "gconfitem.h"
+
+#include <glib.h>
+#include <gconf/gconf-value.h>
+#include <gconf/gconf-client.h>
+
+struct GConfItemPrivate {
+ QString key;
+ QVariant value;
+ guint notify_id;
+
+ static void notify_trampoline(GConfClient*, guint, GConfEntry *, gpointer);
+};
+
+/* We get the default client and never release it, on purpose, to
+ avoid disconnecting from the GConf daemon when a program happens to
+ not have any GConfItems for short periods of time.
+ */
+static GConfClient *
+get_gconf_client ()
+{
+ static bool initialized = false;
+ static GConfClient *client;
+
+ if (initialized)
+ return client;
+
+ g_type_init ();
+ client = gconf_client_get_default();
+ initialized = true;
+
+ return client;
+}
+
+/* Sometimes I like being too clever...
+ */
+#define withClient(c) for (GConfClient *c = get_gconf_client (); c; c = NULL)
+
+static QByteArray convertKey (QString key)
+{
+ if (key.startsWith('/'))
+ return key.toUtf8();
+ else
+ {
+ qWarning() << "Using dot-separated key names with GConfItem is deprecated.";
+ qWarning() << "Please use" << '/' + key.replace('.', '/') << "instead of" << key;
+ return '/' + key.replace('.', '/').toUtf8();
+ }
+}
+
+static QString convertKey(const char *key)
+{
+ return QString::fromUtf8(key);
+}
+
+static QVariant convertValue(GConfValue *src)
+{
+ if (!src) {
+ return QVariant();
+ } else {
+ switch (src->type) {
+ case GCONF_VALUE_INVALID:
+ return QVariant(QVariant::Invalid);
+ case GCONF_VALUE_BOOL:
+ return QVariant((bool)gconf_value_get_bool(src));
+ case GCONF_VALUE_INT:
+ return QVariant(gconf_value_get_int(src));
+ case GCONF_VALUE_FLOAT:
+ return QVariant(gconf_value_get_float(src));
+ case GCONF_VALUE_STRING:
+ return QVariant(QString::fromUtf8(gconf_value_get_string(src)));
+ case GCONF_VALUE_LIST:
+ switch (gconf_value_get_list_type(src)) {
+ case GCONF_VALUE_STRING:
+ {
+ QStringList result;
+ for (GSList *elts = gconf_value_get_list(src); elts; elts = elts->next)
+ result.append(QString::fromUtf8(gconf_value_get_string((GConfValue *)elts->data)));
+ return QVariant(result);
+ }
+ default:
+ {
+ QList<QVariant> result;
+ for (GSList *elts = gconf_value_get_list(src); elts; elts = elts->next)
+ result.append(convertValue((GConfValue *)elts->data));
+ return QVariant(result);
+ }
+ }
+ case GCONF_VALUE_SCHEMA:
+ default:
+ return QVariant();
+ }
+ }
+}
+
+static GConfValue *convertString(const QString &str)
+{
+ GConfValue *v = gconf_value_new (GCONF_VALUE_STRING);
+ gconf_value_set_string (v, str.toUtf8().data());
+ return v;
+}
+
+static GConfValueType primitiveType (const QVariant &elt)
+{
+ switch(elt.type()) {
+ case QVariant::String:
+ return GCONF_VALUE_STRING;
+ case QVariant::Int:
+ return GCONF_VALUE_INT;
+ case QVariant::Double:
+ return GCONF_VALUE_FLOAT;
+ case QVariant::Bool:
+ return GCONF_VALUE_BOOL;
+ default:
+ return GCONF_VALUE_INVALID;
+ }
+}
+
+static GConfValueType uniformType(const QList<QVariant> &list)
+{
+ GConfValueType result = GCONF_VALUE_INVALID;
+
+ foreach (const QVariant &elt, list) {
+ GConfValueType elt_type = primitiveType (elt);
+
+ if (elt_type == GCONF_VALUE_INVALID)
+ return GCONF_VALUE_INVALID;
+
+ if (result == GCONF_VALUE_INVALID)
+ result = elt_type;
+ else if (result != elt_type)
+ return GCONF_VALUE_INVALID;
+ }
+
+ if (result == GCONF_VALUE_INVALID)
+ return GCONF_VALUE_STRING; // empty list.
+ else
+ return result;
+}
+
+static int convertValue(const QVariant &src, GConfValue **valp)
+{
+ GConfValue *v;
+
+ switch(src.type()) {
+ case QVariant::Invalid:
+ v = NULL;
+ break;
+ case QVariant::Bool:
+ v = gconf_value_new (GCONF_VALUE_BOOL);
+ gconf_value_set_bool (v, src.toBool());
+ break;
+ case QVariant::Int:
+ v = gconf_value_new (GCONF_VALUE_INT);
+ gconf_value_set_int (v, src.toInt());
+ break;
+ case QVariant::Double:
+ v = gconf_value_new (GCONF_VALUE_FLOAT);
+ gconf_value_set_float (v, src.toDouble());
+ break;
+ case QVariant::String:
+ v = convertString(src.toString());
+ break;
+ case QVariant::StringList:
+ {
+ GSList *elts = NULL;
+ v = gconf_value_new(GCONF_VALUE_LIST);
+ gconf_value_set_list_type(v, GCONF_VALUE_STRING);
+ foreach (const QString &str, src.toStringList())
+ elts = g_slist_prepend(elts, convertString(str));
+ gconf_value_set_list_nocopy(v, g_slist_reverse(elts));
+ break;
+ }
+ case QVariant::List:
+ {
+ GConfValueType elt_type = uniformType(src.toList());
+ if (elt_type == GCONF_VALUE_INVALID)
+ v = NULL;
+ else
+ {
+ GSList *elts = NULL;
+ v = gconf_value_new(GCONF_VALUE_LIST);
+ gconf_value_set_list_type(v, elt_type);
+ foreach (const QVariant &elt, src.toList())
+ {
+ GConfValue *val = NULL;
+ convertValue(elt, &val); // guaranteed to succeed.
+ elts = g_slist_prepend(elts, val);
+ }
+ gconf_value_set_list_nocopy(v, g_slist_reverse(elts));
+ }
+ break;
+ }
+ default:
+ return 0;
+ }
+
+ *valp = v;
+ return 1;
+}
+
+void GConfItemPrivate::notify_trampoline (GConfClient*,
+ guint,
+ GConfEntry *,
+ gpointer data)
+{
+ GConfItem *item = (GConfItem *)data;
+ item->update_value (true);
+}
+
+void GConfItem::update_value (bool emit_signal)
+{
+ QVariant new_value;
+
+ withClient(client) {
+ GError *error = NULL;
+ QByteArray k = convertKey(priv->key);
+ GConfValue *v = gconf_client_get(client, k.data(), &error);
+
+ if (error) {
+ qWarning() << error->message;
+ g_error_free (error);
+ new_value = priv->value;
+ } else {
+ new_value = convertValue(v);
+ if (v)
+ gconf_value_free(v);
+ }
+ }
+
+ if (new_value != priv->value) {
+ priv->value = new_value;
+ if (emit_signal)
+ emit valueChanged();
+ }
+}
+
+QString GConfItem::key() const
+{
+ return priv->key;
+}
+
+QVariant GConfItem::value() const
+{
+ return priv->value;
+}
+
+QVariant GConfItem::value(const QVariant &def) const
+{
+ if (priv->value.isNull())
+ return def;
+ else
+ return priv->value;
+}
+
+void GConfItem::set(const QVariant &val)
+{
+ withClient(client) {
+ QByteArray k = convertKey(priv->key);
+ GConfValue *v;
+ if (convertValue(val, &v)) {
+ GError *error = NULL;
+
+ if (v) {
+ gconf_client_set(client, k.data(), v, &error);
+ gconf_value_free(v);
+ } else {
+ gconf_client_unset(client, k.data(), &error);
+ }
+
+ if (error) {
+ qWarning() << error->message;
+ g_error_free(error);
+ } else if (priv->value != val) {
+ priv->value = val;
+ emit valueChanged();
+ }
+
+ } else
+ qWarning() << "Can't store a" << val.typeName();
+ }
+}
+
+void GConfItem::unset() {
+ set(QVariant());
+}
+
+QList<QString> GConfItem::listDirs() const
+{
+ QList<QString> children;
+
+ withClient(client) {
+ QByteArray k = convertKey(priv->key);
+ GSList *dirs = gconf_client_all_dirs(client, k.data(), NULL);
+ for (GSList *d = dirs; d; d = d->next) {
+ children.append(convertKey((char *)d->data));
+ g_free (d->data);
+ }
+ g_slist_free (dirs);
+ }
+
+ return children;
+}
+
+QList<QString> GConfItem::listEntries() const
+{
+ QList<QString> children;
+
+ withClient(client) {
+ QByteArray k = convertKey(priv->key);
+ GSList *entries = gconf_client_all_entries(client, k.data(), NULL);
+ for (GSList *e = entries; e; e = e->next) {
+ children.append(convertKey(((GConfEntry *)e->data)->key));
+ gconf_entry_free ((GConfEntry *)e->data);
+ }
+ g_slist_free (entries);
+ }
+
+ return children;
+}
+
+GConfItem::GConfItem(const QString &key, QObject *parent)
+ : QObject (parent)
+{
+ priv = new GConfItemPrivate;
+ priv->key = key;
+ priv->notify_id = 0;
+ withClient(client) {
+ update_value (false);
+ QByteArray k = convertKey(priv->key);
+ gconf_client_add_dir (client, k.data(), GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
+ priv->notify_id = gconf_client_notify_add (client, k.data(),
+ GConfItemPrivate::notify_trampoline, this,
+ NULL, NULL);
+ }
+}
+
+GConfItem::~GConfItem()
+{
+ withClient(client) {
+ QByteArray k = convertKey(priv->key);
+ if (priv->notify_id)
+ gconf_client_notify_remove (client, priv->notify_id);
+ gconf_client_remove_dir (client, k.data(), NULL);
+ }
+ delete priv;
+}
diff --git a/src/3rdparty/libgq/gconf/gconfitem.h b/src/3rdparty/libgq/gconf/gconfitem.h
new file mode 100644
index 0000000000..17ca04e74a
--- /dev/null
+++ b/src/3rdparty/libgq/gconf/gconfitem.h
@@ -0,0 +1,147 @@
+/* * This file is part of libgq *
+ *
+ * Copyright (C) 2009 Nokia Corporation.
+ *
+ * Contact: Marius Vollmer <marius.vollmer@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef GCONFITEM_H
+#define GCONFITEM_H
+
+#include <QVariant>
+#include <QStringList>
+#include <QObject>
+
+/*!
+
+ \brief GConfItem is a simple C++ wrapper for GConf.
+
+ Creating a GConfItem instance gives you access to a single GConf
+ key. You can get and set its value, and connect to its
+ valueChanged() signal to be notified about changes.
+
+ The value of a GConf key is returned to you as a QVariant, and you
+ pass in a QVariant when setting the value. GConfItem converts
+ between a QVariant and GConf values as needed, and according to the
+ following rules:
+
+ - A QVariant of type QVariant::Invalid denotes an unset GConf key.
+
+ - QVariant::Int, QVariant::Double, QVariant::Bool are converted to
+ and from the obvious equivalents.
+
+ - QVariant::String is converted to/from a GConf string and always
+ uses the UTF-8 encoding. No other encoding is supported.
+
+ - QVariant::StringList is converted to a list of UTF-8 strings.
+
+ - QVariant::List (which denotes a QList<QVariant>) is converted
+ to/from a GConf list. All elements of such a list must have the
+ same type, and that type must be one of QVariant::Int,
+ QVariant::Double, QVariant::Bool, or QVariant::String. (A list of
+ strings is returned as a QVariant::StringList, however, when you
+ get it back.)
+
+ - Any other QVariant or GConf value is essentially ignored.
+
+ \warning GConfItem is as thread-safe as GConf.
+
+*/
+
+class GConfItem : public QObject
+{
+ Q_OBJECT
+
+ public:
+ /*! Initializes a GConfItem to access the GConf key denoted by
+ \a key. Key names should follow the normal GConf conventions
+ like "/myapp/settings/first".
+
+ \param key The name of the key.
+ \param parent Parent object
+ */
+ explicit GConfItem(const QString &key, QObject *parent = 0);
+
+ /*! Finalizes a GConfItem.
+ */
+ virtual ~GConfItem();
+
+ /*! Returns the key of this item, as given to the constructor.
+ */
+ QString key() const;
+
+ /*! Returns the current value of this item, as a QVariant.
+ */
+ QVariant value() const;
+
+ /*! Returns the current value of this item, as a QVariant. If
+ * there is no value for this item, return \a def instead.
+ */
+ QVariant value(const QVariant &def) const;
+
+ /*! Set the value of this item to \a val. If \a val can not be
+ represented in GConf or GConf refuses to accept it for other
+ reasons, the current value is not changed and nothing happens.
+
+ When the new value is different from the old value, the
+ changedValue() signal is emitted on this GConfItem as part
+ of calling set(), but other GConfItem:s for the same key do
+ only receive a notification once the main loop runs.
+
+ \param val The new value.
+ */
+ void set(const QVariant &val);
+
+ /*! Unset this item. This is equivalent to
+
+ \code
+ item.set(QVariant(QVariant::Invalid));
+ \endcode
+ */
+ void unset();
+
+ /*! Return a list of the directories below this item. The
+ returned strings are absolute key names like
+ "/myapp/settings".
+
+ A directory is a key that has children. The same key might
+ also have a value, but that is confusing and best avoided.
+ */
+ QList<QString> listDirs() const;
+
+ /*! Return a list of entries below this item. The returned
+ strings are absolute key names like "/myapp/settings/first".
+
+ A entry is a key that has a value. The same key might also
+ have children, but that is confusing and is best avoided.
+ */
+ QList<QString> listEntries() const;
+
+ signals:
+ /*! Emitted when the value of this item has changed.
+ */
+ void valueChanged();
+
+ private:
+ friend struct GConfItemPrivate;
+ struct GConfItemPrivate *priv;
+
+ void update_value(bool emit_signal);
+};
+
+#endif // GCONFITEM_H
diff --git a/src/3rdparty/libgq/gconf/gq-gconf.pc.in b/src/3rdparty/libgq/gconf/gq-gconf.pc.in
new file mode 100644
index 0000000000..bd76d65423
--- /dev/null
+++ b/src/3rdparty/libgq/gconf/gq-gconf.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: gq-gconf
+Description: Qt/GConf wrapper
+Version: @VERSION@
+Requires: QtCore
+Libs: -L${libdir} -lgq-gconf
+Cflags: -I${includedir}/gq
diff --git a/src/3rdparty/libgq/gconf/run-test-gconf b/src/3rdparty/libgq/gconf/run-test-gconf
new file mode 100755
index 0000000000..67f90907c0
--- /dev/null
+++ b/src/3rdparty/libgq/gconf/run-test-gconf
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+# please make sure that the en_US.UTF-8 locale is available!
+# - apt-get install locales
+# - make sure /etc/locale.gen contains the line "en_US.UTF-8 UTF-8"
+# - run /usr/sbin/locale-gen
+LC_ALL=en_US.UTF-8
+export LC_ALL
+
+gconftool-2 -s -t bool /Test/Bool true
+VALUE=$(gconftool-2 -g /Test/Bool)
+if [ "$VALUE" != "true" ]; then
+ echo "GConf is not running, skipping all tests"
+ exit 77
+fi
+
+# Setup values expected by the external_values() test.
+
+gconftool-2 -s -t int /Test/Int 123
+gconftool-2 -s -t string /Test/String "Hello GConf"
+gconftool-2 -s -t float /Test/Double 3.5
+gconftool-2 -s -t list --list-type string /Test/StringList "[Hello,GConf,ÄÖÜ]"
+gconftool-2 -s -t list --list-type int /Test/IntList "[1,2,3,4]"
+gconftool-2 -s -t list --list-type float /Test/DoubleList "[3.5,3.5,3.5]"
+gconftool-2 -s -t list --list-type bool /Test/BoolList "[false,true,true,false]"
+gconftool-2 -u /Test/UnsetBefore
+gconftool-2 -s -t int /Test/UnsetAfter 100
+gconftool-2 -s -t int /Test/Dir/Entry 200
+
+./test-gconf $* || exit 1
+
+# Check what set_external() has left behind.
+
+compare() {
+ if [ "$1" != "$2" ]; then
+ echo "FAIL: '$1' != '$2'"
+ exit 1
+ fi
+}
+
+compare "`gconftool-2 -g /Test/Bool`" false
+compare "`gconftool-2 -g /Test/Int`" 54321
+compare "`gconftool-2 -g /Test/String`" "Good bye GConf"
+compare "`gconftool-2 -g /Test/Double`" -2.5
+compare "`gconftool-2 -g /Test/StringList`" "[Good,bye,GConf,äöü]"
+compare "`gconftool-2 -g /Test/IntList`" "[5,4,3,2,1]"
+compare "`gconftool-2 -g /Test/DoubleList`" "[-2.5,-2.5]"
+compare "`gconftool-2 -g /Test/BoolList`" "[false,false,true,true]"
+compare "`gconftool-2 -g /Test/UnsetAfter 2>&1`" 'No value set for `/Test/UnsetAfter'"'"
diff --git a/src/3rdparty/libgq/gconf/test-gconf.cpp b/src/3rdparty/libgq/gconf/test-gconf.cpp
new file mode 100644
index 0000000000..52eb28171a
--- /dev/null
+++ b/src/3rdparty/libgq/gconf/test-gconf.cpp
@@ -0,0 +1,299 @@
+#include "test-gconf.h"
+
+#define MYLOGLEVEL 2
+void myMessageOutput(QtMsgType type, const char *msg)
+{
+ switch (type) {
+ case QtDebugMsg:
+ if (MYLOGLEVEL <= 0)
+ fprintf(stderr, "Debug: %s\n", msg);
+ break;
+ case QtWarningMsg:
+ if (MYLOGLEVEL <= 1)
+ fprintf(stderr, "Warning: %s\n", msg);
+ break;
+ case QtCriticalMsg:
+ if (MYLOGLEVEL <= 2)
+ fprintf(stderr, "Critical: %s\n", msg);
+ break;
+ case QtFatalMsg:
+ if (MYLOGLEVEL <= 3)
+ fprintf(stderr, "Fatal: %s\n", msg);
+ abort();
+ }
+}
+
+//
+// Definition of testcases: Normal tests
+//
+
+void GConfItemTests::timeout()
+{
+ timed_out = true;
+ timer.stop();
+}
+
+// Before all tests
+void GConfItemTests::initTestCase()
+{
+ connect(&timer, SIGNAL(timeout()),
+ this, SLOT(timeout()));
+}
+
+// After all tests
+void GConfItemTests::cleanupTestCase()
+{
+}
+
+// Before each test
+void GConfItemTests::init()
+{
+ boolItem = new GConfItem("/Test/Bool");
+ intItem = new GConfItem("/Test/Int");
+ stringItem = new GConfItem("/Test/String");
+ doubleItem = new GConfItem("/Test/Double");
+ stringListItem = new GConfItem("/Test/StringList");
+ intListItem = new GConfItem("/Test/IntList");
+ doubleListItem = new GConfItem("/Test/DoubleList");
+ boolListItem = new GConfItem("/Test/BoolList");
+ unsetBeforeItem = new GConfItem("/Test/UnsetBefore");
+ unsetAfterItem = new GConfItem("/Test/UnsetAfter");
+ signalSpy = new SignalListener();
+ QObject::connect(boolItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::connect(intItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::connect(stringItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::connect(doubleItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::connect(stringListItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::connect(intListItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::connect(doubleListItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::connect(boolListItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+}
+
+// After each test
+void GConfItemTests::cleanup()
+{
+ QObject::disconnect(boolItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::disconnect(intItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::disconnect(stringItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::disconnect(doubleItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::disconnect(stringListItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::disconnect(intListItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::disconnect(doubleListItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::disconnect(boolListItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ delete signalSpy;
+ delete boolItem;
+ delete intItem;
+ delete stringItem;
+ delete doubleItem;
+ delete stringListItem;
+ delete intListItem;
+ delete doubleListItem;
+ delete boolListItem;
+ delete unsetBeforeItem;
+ delete unsetAfterItem;
+
+ timer.stop();
+}
+
+void GConfItemTests::path()
+{
+ QCOMPARE(boolItem->key(), QString("/Test/Bool"));
+ QCOMPARE(intItem->key(), QString("/Test/Int"));
+ QCOMPARE(stringItem->key(), QString("/Test/String"));
+ QCOMPARE(doubleItem->key(), QString("/Test/Double"));
+ QCOMPARE(stringListItem->key(), QString("/Test/StringList"));
+ QCOMPARE(intListItem->key(), QString("/Test/IntList"));
+ QCOMPARE(doubleListItem->key(), QString("/Test/DoubleList"));
+ QCOMPARE(boolListItem->key(), QString("/Test/BoolList"));
+ QCOMPARE(unsetBeforeItem->key(), QString("/Test/UnsetBefore"));
+ QCOMPARE(unsetAfterItem->key(), QString("/Test/UnsetAfter"));
+}
+
+void GConfItemTests::external_values()
+{
+ // These values are set before this program starts.
+ QCOMPARE(boolItem->value().toBool(), true);
+ QCOMPARE(intItem->value().toInt(), 123);
+ QCOMPARE(stringItem->value().toString(), QString("Hello GConf"));
+ QCOMPARE(doubleItem->value().toDouble(), 3.5);
+ QCOMPARE(stringListItem->value().toStringList(), QStringList() << "Hello" << "GConf" << QString::fromUtf8("ÄÖÜ"));
+ QCOMPARE(intListItem->value().toList(), QList<QVariant>() << 1 << 2 << 3 << 4);
+ QCOMPARE(doubleListItem->value().toList(), QList<QVariant>() << 3.5 << 3.5 << 3.5);
+ QCOMPARE(boolListItem->value().toList(), QList<QVariant>() << false << true << true << false);
+ QCOMPARE(unsetBeforeItem->value().isValid(), false);
+ QCOMPARE(unsetAfterItem->value().isValid(), true);
+}
+
+void GConfItemTests::set_bool()
+{
+ signalSpy->numberOfCalls = 0;
+
+ boolItem->set(false);
+ QCOMPARE(boolItem->value().toBool(), false);
+ boolItem->set(true);
+ QCOMPARE(boolItem->value().toBool(), true);
+
+ QCOMPARE(signalSpy->numberOfCalls, 2);
+}
+
+void GConfItemTests::set_int()
+{
+ signalSpy->numberOfCalls = 0;
+
+ intItem->set(12);
+ QCOMPARE(intItem->value().toInt(), 12);
+ intItem->set(-5);
+ QCOMPARE(intItem->value().toInt(), -5);
+
+ QCOMPARE(signalSpy->numberOfCalls, 2);
+}
+
+void GConfItemTests::set_string()
+{
+ signalSpy->numberOfCalls = 0;
+
+ stringItem->set("Hi");
+ QCOMPARE(stringItem->value().toString(), QString("Hi"));
+
+ QCOMPARE(signalSpy->numberOfCalls, 1);
+}
+
+void GConfItemTests::set_unicode_string()
+{
+ signalSpy->numberOfCalls = 0;
+
+ stringItem->set(QString::fromUtf8("Höäü"));
+ QCOMPARE(stringItem->value().toString(), QString::fromUtf8("Höäü"));
+
+ QCOMPARE(signalSpy->numberOfCalls, 1);
+}
+
+void GConfItemTests::set_double()
+{
+ signalSpy->numberOfCalls = 0;
+
+ doubleItem->set(1.2345);
+ QCOMPARE(doubleItem->value().toDouble(), 1.2345);
+
+ QCOMPARE(signalSpy->numberOfCalls, 1);
+}
+
+void GConfItemTests::set_string_list()
+{
+ signalSpy->numberOfCalls = 0;
+
+ stringListItem->set(QStringList() << "one" << "two" << "three");
+ QCOMPARE(stringListItem->value().toStringList(), QStringList() << "one" << "two" << "three");
+
+ QCOMPARE(signalSpy->numberOfCalls, 1);
+}
+
+void GConfItemTests::set_int_list()
+{
+ signalSpy->numberOfCalls = 0;
+
+ intListItem->set(QList<QVariant>() << 10 << 11 << 12);
+ QCOMPARE(intListItem->value().toList(), QList<QVariant>() << 10 << 11 << 12);
+
+ QCOMPARE(signalSpy->numberOfCalls, 1);
+}
+
+void GConfItemTests::set_double_list()
+{
+ signalSpy->numberOfCalls = 0;
+
+ doubleListItem->set(QList<QVariant>() << 1.1 << 2.2 << 3.3);
+ QCOMPARE(doubleListItem->value().toList(), QList<QVariant>() << 1.1 << 2.2 << 3.3);
+
+ QCOMPARE(signalSpy->numberOfCalls, 1);
+}
+
+void GConfItemTests::set_bool_list()
+{
+ signalSpy->numberOfCalls = 0;
+
+ boolListItem->set(QList<QVariant>() << true << true << false);
+ QCOMPARE(boolListItem->value().toList(), QList<QVariant>() << true << true << false);
+
+ QCOMPARE(signalSpy->numberOfCalls, 1);
+}
+
+void GConfItemTests::unset ()
+{
+ signalSpy->numberOfCalls = 0;
+
+ boolItem->unset();
+ QCOMPARE(boolItem->value().isValid(), false);
+
+ QCOMPARE(signalSpy->numberOfCalls, 1);
+}
+
+void GConfItemTests::list_dirs ()
+{
+ GConfItem test("/Test");
+ QStringList dirs = test.listDirs();
+
+ QVERIFY (!dirs.contains("/Test/Bool"));
+ QVERIFY (!dirs.contains("/Test/Int"));
+ QVERIFY (!dirs.contains("/Test/String"));
+ QVERIFY (!dirs.contains("/Test/Double"));
+ QVERIFY (!dirs.contains("/Test/StringList"));
+ QVERIFY (!dirs.contains("/Test/IntList"));
+ QVERIFY (!dirs.contains("/Test/DoubleList"));
+ QVERIFY (!dirs.contains("/Test/BoolList"));
+ QVERIFY (!dirs.contains("/Test/UnsetBefore"));
+ QVERIFY (!dirs.contains("/Test/UnsetAfter"));
+ QVERIFY (dirs.contains("/Test/Dir"));
+}
+
+void GConfItemTests::list_entries ()
+{
+ GConfItem test("/Test");
+ QStringList entries = test.listEntries();
+
+ QVERIFY (!entries.contains("/Test/Bool")); // has been unset above
+ QVERIFY (entries.contains("/Test/Int"));
+ QVERIFY (entries.contains("/Test/String"));
+ QVERIFY (entries.contains("/Test/Double"));
+ QVERIFY (entries.contains("/Test/StringList"));
+ QVERIFY (entries.contains("/Test/IntList"));
+ QVERIFY (entries.contains("/Test/DoubleList"));
+ QVERIFY (entries.contains("/Test/BoolList"));
+ QVERIFY (!entries.contains("/Test/UnsetBefore"));
+ QVERIFY (entries.contains("/Test/UnsetAfter"));
+ QVERIFY (!entries.contains("/Test/Dir"));
+}
+
+void GConfItemTests::get_default ()
+{
+ intItem->unset();
+ QCOMPARE(intItem->value(123).toInt(), 123);
+ intItem->set(234);
+ QCOMPARE(intItem->value(123).toInt(), 234);
+}
+
+void GConfItemTests::propagate ()
+{
+ GConfItem secondIntItem("/Test/Int");
+ secondIntItem.set(3000);
+ QVERIFY_TIMEOUT(2000, intItem->value() == secondIntItem.value());
+ QCOMPARE(signalSpy->numberOfCalls, 2);
+}
+
+void GConfItemTests::set_external()
+{
+ // This must be the last test case. The values that are set here
+ // are checked after this program exits.
+
+ boolItem->set(false);
+ intItem->set(54321);
+ stringItem->set("Good bye GConf");
+ doubleItem->set(-2.5);
+ stringListItem->set(QStringList() << "Good" << "bye" << "GConf" << QString::fromUtf8("äöü"));
+ intListItem->set(QList<QVariant>() << 5 << 4 << 3 << 2 << 1);
+ doubleListItem->set(QList<QVariant>() << -2.5 << -2.5);
+ boolListItem->set(QList<QVariant>() << false << false << true << true);
+ unsetAfterItem->set(QVariant());
+}
+
+QTEST_MAIN(GConfItemTests);
diff --git a/src/3rdparty/libgq/gconf/test-gconf.h b/src/3rdparty/libgq/gconf/test-gconf.h
new file mode 100644
index 0000000000..36eaeccca4
--- /dev/null
+++ b/src/3rdparty/libgq/gconf/test-gconf.h
@@ -0,0 +1,86 @@
+#include <QObject>
+#include <QtTest/QtTest>
+#include <QDebug>
+
+#include "GConfItem"
+
+// Helper class for listening to signals
+class SignalListener : public QObject
+{
+ Q_OBJECT
+public:
+ int numberOfCalls;
+ SignalListener() : numberOfCalls(0) {
+ }
+
+public slots:
+ void valueChanged()
+ {
+ numberOfCalls++;
+ }
+};
+
+// Tests for the public API
+class GConfItemTests : public QObject
+{
+ Q_OBJECT
+
+ // Stored pointers etc.
+private:
+ GConfItem *boolItem;
+ GConfItem *intItem;
+ GConfItem *stringItem;
+ GConfItem *doubleItem;
+ GConfItem *stringListItem;
+ GConfItem *intListItem;
+ GConfItem *doubleListItem;
+ GConfItem *boolListItem;
+ GConfItem *unsetBeforeItem;
+ GConfItem *unsetAfterItem;
+
+ SignalListener *signalSpy;
+
+ QTimer timer;
+ bool timed_out;
+
+ // Tests
+private slots:
+ // Init and cleanup helper functions
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+ void timeout ();
+
+ // Public API
+ void path();
+ void external_values();
+ void set_bool();
+ void set_int();
+ void set_string();
+ void set_unicode_string();
+ void set_double();
+ void set_string_list();
+ void set_int_list();
+ void set_double_list();
+ void set_bool_list();
+ void unset();
+ void get_default();
+ void list_dirs();
+ void list_entries();
+ void propagate();
+ void set_external();
+};
+
+// Useful if you need to process some events until a condition becomes
+// true.
+
+#define QVERIFY_TIMEOUT(msecs, expr) \
+ do { \
+ timed_out = false; \
+ timer.start(msecs); \
+ while (!timed_out && !(expr)) { \
+ QCoreApplication::processEvents(QEventLoop::WaitForMoreEvents); \
+ } \
+ QVERIFY((expr)); \
+ } while(0)
diff --git a/src/3rdparty/libjpeg/ansi2knr.1 b/src/3rdparty/libjpeg/ansi2knr.1
deleted file mode 100644
index f9ee5a631c..0000000000
--- a/src/3rdparty/libjpeg/ansi2knr.1
+++ /dev/null
@@ -1,36 +0,0 @@
-.TH ANSI2KNR 1 "19 Jan 1996"
-.SH NAME
-ansi2knr \- convert ANSI C to Kernighan & Ritchie C
-.SH SYNOPSIS
-.I ansi2knr
-[--varargs] input_file [output_file]
-.SH DESCRIPTION
-If no output_file is supplied, output goes to stdout.
-.br
-There are no error messages.
-.sp
-.I ansi2knr
-recognizes function definitions by seeing a non-keyword identifier at the left
-margin, followed by a left parenthesis, with a right parenthesis as the last
-character on the line, and with a left brace as the first token on the
-following line (ignoring possible intervening comments). It will recognize a
-multi-line header provided that no intervening line ends with a left or right
-brace or a semicolon. These algorithms ignore whitespace and comments, except
-that the function name must be the first thing on the line.
-.sp
-The following constructs will confuse it:
-.br
- - Any other construct that starts at the left margin and follows the
-above syntax (such as a macro or function call).
-.br
- - Some macros that tinker with the syntax of the function header.
-.sp
-The --varargs switch is obsolete, and is recognized only for
-backwards compatibility. The present version of
-.I ansi2knr
-will always attempt to convert a ... argument to va_alist and va_dcl.
-.SH AUTHOR
-L. Peter Deutsch <ghost@aladdin.com> wrote the original ansi2knr and
-continues to maintain the current version; most of the code in the current
-version is his work. ansi2knr also includes contributions by Francois
-Pinard <pinard@iro.umontreal.ca> and Jim Avera <jima@netcom.com>.
diff --git a/src/3rdparty/libjpeg/ansi2knr.c b/src/3rdparty/libjpeg/ansi2knr.c
deleted file mode 100644
index e84c210b66..0000000000
--- a/src/3rdparty/libjpeg/ansi2knr.c
+++ /dev/null
@@ -1,739 +0,0 @@
-/* Copyright (C) 1989, 2000 Aladdin Enterprises. All rights reserved. */
-
-/*$Id: ansi2knr.c,v 1.14 2003/09/06 05:36:56 eggert Exp $*/
-/* Convert ANSI C function definitions to K&R ("traditional C") syntax */
-
-/*
-ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY. No author or distributor accepts responsibility to anyone for the
-consequences of using it or for whether it serves any particular purpose or
-works at all, unless he says so in writing. Refer to the GNU General Public
-License (the "GPL") for full details.
-
-Everyone is granted permission to copy, modify and redistribute ansi2knr,
-but only under the conditions described in the GPL. A copy of this license
-is supposed to have been given to you along with ansi2knr so you can know
-your rights and responsibilities. It should be in a file named COPYLEFT,
-or, if there is no file named COPYLEFT, a file named COPYING. Among other
-things, the copyright notice and this notice must be preserved on all
-copies.
-
-We explicitly state here what we believe is already implied by the GPL: if
-the ansi2knr program is distributed as a separate set of sources and a
-separate executable file which are aggregated on a storage medium together
-with another program, this in itself does not bring the other program under
-the GPL, nor does the mere fact that such a program or the procedures for
-constructing it invoke the ansi2knr executable bring any other part of the
-program under the GPL.
-*/
-
-/*
- * Usage:
- ansi2knr [--filename FILENAME] [INPUT_FILE [OUTPUT_FILE]]
- * --filename provides the file name for the #line directive in the output,
- * overriding input_file (if present).
- * If no input_file is supplied, input is read from stdin.
- * If no output_file is supplied, output goes to stdout.
- * There are no error messages.
- *
- * ansi2knr recognizes function definitions by seeing a non-keyword
- * identifier at the left margin, followed by a left parenthesis, with a
- * right parenthesis as the last character on the line, and with a left
- * brace as the first token on the following line (ignoring possible
- * intervening comments and/or preprocessor directives), except that a line
- * consisting of only
- * identifier1(identifier2)
- * will not be considered a function definition unless identifier2 is
- * the word "void", and a line consisting of
- * identifier1(identifier2, <<arbitrary>>)
- * will not be considered a function definition.
- * ansi2knr will recognize a multi-line header provided that no intervening
- * line ends with a left or right brace or a semicolon. These algorithms
- * ignore whitespace, comments, and preprocessor directives, except that
- * the function name must be the first thing on the line. The following
- * constructs will confuse it:
- * - Any other construct that starts at the left margin and
- * follows the above syntax (such as a macro or function call).
- * - Some macros that tinker with the syntax of function headers.
- */
-
-/*
- * The original and principal author of ansi2knr is L. Peter Deutsch
- * <ghost@aladdin.com>. Other authors are noted in the change history
- * that follows (in reverse chronological order):
-
- lpd 2000-04-12 backs out Eggert's changes because of bugs:
- - concatlits didn't declare the type of its bufend argument;
- - concatlits didn't recognize when it was inside a comment;
- - scanstring could scan backward past the beginning of the string; when
- - the check for \ + newline in scanstring was unnecessary.
-
- 2000-03-05 Paul Eggert <eggert@twinsun.com>
-
- Add support for concatenated string literals.
- * ansi2knr.c (concatlits): New decl.
- (main): Invoke concatlits to concatenate string literals.
- (scanstring): Handle backslash-newline correctly. Work with
- character constants. Fix bug when scanning backwards through
- backslash-quote. Check for unterminated strings.
- (convert1): Parse character constants, too.
- (appendline, concatlits): New functions.
- * ansi2knr.1: Document this.
-
- lpd 1999-08-17 added code to allow preprocessor directives
- wherever comments are allowed
- lpd 1999-04-12 added minor fixes from Pavel Roskin
- <pavel_roskin@geocities.com> for clean compilation with
- gcc -W -Wall
- lpd 1999-03-22 added hack to recognize lines consisting of
- identifier1(identifier2, xxx) as *not* being procedures
- lpd 1999-02-03 made indentation of preprocessor commands consistent
- lpd 1999-01-28 fixed two bugs: a '/' in an argument list caused an
- endless loop; quoted strings within an argument list
- confused the parser
- lpd 1999-01-24 added a check for write errors on the output,
- suggested by Jim Meyering <meyering@ascend.com>
- lpd 1998-11-09 added further hack to recognize identifier(void)
- as being a procedure
- lpd 1998-10-23 added hack to recognize lines consisting of
- identifier1(identifier2) as *not* being procedures
- lpd 1997-12-08 made input_file optional; only closes input and/or
- output file if not stdin or stdout respectively; prints
- usage message on stderr rather than stdout; adds
- --filename switch (changes suggested by
- <ceder@lysator.liu.se>)
- lpd 1996-01-21 added code to cope with not HAVE_CONFIG_H and with
- compilers that don't understand void, as suggested by
- Tom Lane
- lpd 1996-01-15 changed to require that the first non-comment token
- on the line following a function header be a left brace,
- to reduce sensitivity to macros, as suggested by Tom Lane
- <tgl@sss.pgh.pa.us>
- lpd 1995-06-22 removed #ifndefs whose sole purpose was to define
- undefined preprocessor symbols as 0; changed all #ifdefs
- for configuration symbols to #ifs
- lpd 1995-04-05 changed copyright notice to make it clear that
- including ansi2knr in a program does not bring the entire
- program under the GPL
- lpd 1994-12-18 added conditionals for systems where ctype macros
- don't handle 8-bit characters properly, suggested by
- Francois Pinard <pinard@iro.umontreal.ca>;
- removed --varargs switch (this is now the default)
- lpd 1994-10-10 removed CONFIG_BROKETS conditional
- lpd 1994-07-16 added some conditionals to help GNU `configure',
- suggested by Francois Pinard <pinard@iro.umontreal.ca>;
- properly erase prototype args in function parameters,
- contributed by Jim Avera <jima@netcom.com>;
- correct error in writeblanks (it shouldn't erase EOLs)
- lpd 1989-xx-xx original version
- */
-
-/* Most of the conditionals here are to make ansi2knr work with */
-/* or without the GNU configure machinery. */
-
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-
-#if HAVE_CONFIG_H
-
-/*
- For properly autoconfiguring ansi2knr, use AC_CONFIG_HEADER(config.h).
- This will define HAVE_CONFIG_H and so, activate the following lines.
- */
-
-# if STDC_HEADERS || HAVE_STRING_H
-# include <string.h>
-# else
-# include <strings.h>
-# endif
-
-#else /* not HAVE_CONFIG_H */
-
-/* Otherwise do it the hard way */
-
-# ifdef BSD
-# include <strings.h>
-# else
-# ifdef VMS
- extern int strlen(), strncmp();
-# else
-# include <string.h>
-# endif
-# endif
-
-#endif /* not HAVE_CONFIG_H */
-
-#if STDC_HEADERS
-# include <stdlib.h>
-#else
-/*
- malloc and free should be declared in stdlib.h,
- but if you've got a K&R compiler, they probably aren't.
- */
-# ifdef MSDOS
-# include <malloc.h>
-# else
-# ifdef VMS
- extern char *malloc();
- extern void free();
-# else
- extern char *malloc();
- extern int free();
-# endif
-# endif
-
-#endif
-
-/* Define NULL (for *very* old compilers). */
-#ifndef NULL
-# define NULL (0)
-#endif
-
-/*
- * The ctype macros don't always handle 8-bit characters correctly.
- * Compensate for this here.
- */
-#ifdef isascii
-# undef HAVE_ISASCII /* just in case */
-# define HAVE_ISASCII 1
-#else
-#endif
-#if STDC_HEADERS || !HAVE_ISASCII
-# define is_ascii(c) 1
-#else
-# define is_ascii(c) isascii(c)
-#endif
-
-#define is_space(c) (is_ascii(c) && isspace(c))
-#define is_alpha(c) (is_ascii(c) && isalpha(c))
-#define is_alnum(c) (is_ascii(c) && isalnum(c))
-
-/* Scanning macros */
-#define isidchar(ch) (is_alnum(ch) || (ch) == '_')
-#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_')
-
-/* Forward references */
-char *ppdirforward();
-char *ppdirbackward();
-char *skipspace();
-char *scanstring();
-int writeblanks();
-int test1();
-int convert1();
-
-/* The main program */
-int
-main(argc, argv)
- int argc;
- char *argv[];
-{ FILE *in = stdin;
- FILE *out = stdout;
- char *filename = 0;
- char *program_name = argv[0];
- char *output_name = 0;
-#define bufsize 5000 /* arbitrary size */
- char *buf;
- char *line;
- char *more;
- char *usage =
- "Usage: ansi2knr [--filename FILENAME] [INPUT_FILE [OUTPUT_FILE]]\n";
- /*
- * In previous versions, ansi2knr recognized a --varargs switch.
- * If this switch was supplied, ansi2knr would attempt to convert
- * a ... argument to va_alist and va_dcl; if this switch was not
- * supplied, ansi2knr would simply drop any such arguments.
- * Now, ansi2knr always does this conversion, and we only
- * check for this switch for backward compatibility.
- */
- int convert_varargs = 1;
- int output_error;
-
- while ( argc > 1 && argv[1][0] == '-' ) {
- if ( !strcmp(argv[1], "--varargs") ) {
- convert_varargs = 1;
- argc--;
- argv++;
- continue;
- }
- if ( !strcmp(argv[1], "--filename") && argc > 2 ) {
- filename = argv[2];
- argc -= 2;
- argv += 2;
- continue;
- }
- fprintf(stderr, "%s: Unrecognized switch: %s\n", program_name,
- argv[1]);
- fprintf(stderr, usage);
- exit(1);
- }
- switch ( argc )
- {
- default:
- fprintf(stderr, usage);
- exit(0);
- case 3:
- output_name = argv[2];
- out = fopen(output_name, "w");
- if ( out == NULL ) {
- fprintf(stderr, "%s: Cannot open output file %s\n",
- program_name, output_name);
- exit(1);
- }
- /* falls through */
- case 2:
- in = fopen(argv[1], "r");
- if ( in == NULL ) {
- fprintf(stderr, "%s: Cannot open input file %s\n",
- program_name, argv[1]);
- exit(1);
- }
- if ( filename == 0 )
- filename = argv[1];
- /* falls through */
- case 1:
- break;
- }
- if ( filename )
- fprintf(out, "#line 1 \"%s\"\n", filename);
- buf = malloc(bufsize);
- if ( buf == NULL )
- {
- fprintf(stderr, "Unable to allocate read buffer!\n");
- exit(1);
- }
- line = buf;
- while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL )
- {
-test: line += strlen(line);
- switch ( test1(buf) )
- {
- case 2: /* a function header */
- convert1(buf, out, 1, convert_varargs);
- break;
- case 1: /* a function */
- /* Check for a { at the start of the next line. */
- more = ++line;
-f: if ( line >= buf + (bufsize - 1) ) /* overflow check */
- goto wl;
- if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL )
- goto wl;
- switch ( *skipspace(ppdirforward(more), 1) )
- {
- case '{':
- /* Definitely a function header. */
- convert1(buf, out, 0, convert_varargs);
- fputs(more, out);
- break;
- case 0:
- /* The next line was blank or a comment: */
- /* keep scanning for a non-comment. */
- line += strlen(line);
- goto f;
- default:
- /* buf isn't a function header, but */
- /* more might be. */
- fputs(buf, out);
- strcpy(buf, more);
- line = buf;
- goto test;
- }
- break;
- case -1: /* maybe the start of a function */
- if ( line != buf + (bufsize - 1) ) /* overflow check */
- continue;
- /* falls through */
- default: /* not a function */
-wl: fputs(buf, out);
- break;
- }
- line = buf;
- }
- if ( line != buf )
- fputs(buf, out);
- free(buf);
- if ( output_name ) {
- output_error = ferror(out);
- output_error |= fclose(out);
- } else { /* out == stdout */
- fflush(out);
- output_error = ferror(out);
- }
- if ( output_error ) {
- fprintf(stderr, "%s: error writing to %s\n", program_name,
- (output_name ? output_name : "stdout"));
- exit(1);
- }
- if ( in != stdin )
- fclose(in);
- return 0;
-}
-
-/*
- * Skip forward or backward over one or more preprocessor directives.
- */
-char *
-ppdirforward(p)
- char *p;
-{
- for (; *p == '#'; ++p) {
- for (; *p != '\r' && *p != '\n'; ++p)
- if (*p == 0)
- return p;
- if (*p == '\r' && p[1] == '\n')
- ++p;
- }
- return p;
-}
-char *
-ppdirbackward(p, limit)
- char *p;
- char *limit;
-{
- char *np = p;
-
- for (;; p = --np) {
- if (*np == '\n' && np[-1] == '\r')
- --np;
- for (; np > limit && np[-1] != '\r' && np[-1] != '\n'; --np)
- if (np[-1] == 0)
- return np;
- if (*np != '#')
- return p;
- }
-}
-
-/*
- * Skip over whitespace, comments, and preprocessor directives,
- * in either direction.
- */
-char *
-skipspace(p, dir)
- char *p;
- int dir; /* 1 for forward, -1 for backward */
-{
- for ( ; ; ) {
- while ( is_space(*p) )
- p += dir;
- if ( !(*p == '/' && p[dir] == '*') )
- break;
- p += dir; p += dir;
- while ( !(*p == '*' && p[dir] == '/') ) {
- if ( *p == 0 )
- return p; /* multi-line comment?? */
- p += dir;
- }
- p += dir; p += dir;
- }
- return p;
-}
-
-/* Scan over a quoted string, in either direction. */
-char *
-scanstring(p, dir)
- char *p;
- int dir;
-{
- for (p += dir; ; p += dir)
- if (*p == '"' && p[-dir] != '\\')
- return p + dir;
-}
-
-/*
- * Write blanks over part of a string.
- * Don't overwrite end-of-line characters.
- */
-int
-writeblanks(start, end)
- char *start;
- char *end;
-{ char *p;
- for ( p = start; p < end; p++ )
- if ( *p != '\r' && *p != '\n' )
- *p = ' ';
- return 0;
-}
-
-/*
- * Test whether the string in buf is a function definition.
- * The string may contain and/or end with a newline.
- * Return as follows:
- * 0 - definitely not a function definition;
- * 1 - definitely a function definition;
- * 2 - definitely a function prototype (NOT USED);
- * -1 - may be the beginning of a function definition,
- * append another line and look again.
- * The reason we don't attempt to convert function prototypes is that
- * Ghostscript's declaration-generating macros look too much like
- * prototypes, and confuse the algorithms.
- */
-int
-test1(buf)
- char *buf;
-{ char *p = buf;
- char *bend;
- char *endfn;
- int contin;
-
- if ( !isidfirstchar(*p) )
- return 0; /* no name at left margin */
- bend = skipspace(ppdirbackward(buf + strlen(buf) - 1, buf), -1);
- switch ( *bend )
- {
- case ';': contin = 0 /*2*/; break;
- case ')': contin = 1; break;
- case '{': return 0; /* not a function */
- case '}': return 0; /* not a function */
- default: contin = -1;
- }
- while ( isidchar(*p) )
- p++;
- endfn = p;
- p = skipspace(p, 1);
- if ( *p++ != '(' )
- return 0; /* not a function */
- p = skipspace(p, 1);
- if ( *p == ')' )
- return 0; /* no parameters */
- /* Check that the apparent function name isn't a keyword. */
- /* We only need to check for keywords that could be followed */
- /* by a left parenthesis (which, unfortunately, is most of them). */
- { static char *words[] =
- { "asm", "auto", "case", "char", "const", "double",
- "extern", "float", "for", "if", "int", "long",
- "register", "return", "short", "signed", "sizeof",
- "static", "switch", "typedef", "unsigned",
- "void", "volatile", "while", 0
- };
- char **key = words;
- char *kp;
- unsigned len = endfn - buf;
-
- while ( (kp = *key) != 0 )
- { if ( strlen(kp) == len && !strncmp(kp, buf, len) )
- return 0; /* name is a keyword */
- key++;
- }
- }
- {
- char *id = p;
- int len;
- /*
- * Check for identifier1(identifier2) and not
- * identifier1(void), or identifier1(identifier2, xxxx).
- */
-
- while ( isidchar(*p) )
- p++;
- len = p - id;
- p = skipspace(p, 1);
- if (*p == ',' ||
- (*p == ')' && (len != 4 || strncmp(id, "void", 4)))
- )
- return 0; /* not a function */
- }
- /*
- * If the last significant character was a ), we need to count
- * parentheses, because it might be part of a formal parameter
- * that is a procedure.
- */
- if (contin > 0) {
- int level = 0;
-
- for (p = skipspace(buf, 1); *p; p = skipspace(p + 1, 1))
- level += (*p == '(' ? 1 : *p == ')' ? -1 : 0);
- if (level > 0)
- contin = -1;
- }
- return contin;
-}
-
-/* Convert a recognized function definition or header to K&R syntax. */
-int
-convert1(buf, out, header, convert_varargs)
- char *buf;
- FILE *out;
- int header; /* Boolean */
- int convert_varargs; /* Boolean */
-{ char *endfn;
- char *p;
- /*
- * The breaks table contains pointers to the beginning and end
- * of each argument.
- */
- char **breaks;
- unsigned num_breaks = 2; /* for testing */
- char **btop;
- char **bp;
- char **ap;
- char *vararg = 0;
-
- /* Pre-ANSI implementations don't agree on whether strchr */
- /* is called strchr or index, so we open-code it here. */
- for ( endfn = buf; *(endfn++) != '('; )
- ;
-top: p = endfn;
- breaks = (char **)malloc(sizeof(char *) * num_breaks * 2);
- if ( breaks == NULL )
- { /* Couldn't allocate break table, give up */
- fprintf(stderr, "Unable to allocate break table!\n");
- fputs(buf, out);
- return -1;
- }
- btop = breaks + num_breaks * 2 - 2;
- bp = breaks;
- /* Parse the argument list */
- do
- { int level = 0;
- char *lp = NULL;
- char *rp = NULL;
- char *end = NULL;
-
- if ( bp >= btop )
- { /* Filled up break table. */
- /* Allocate a bigger one and start over. */
- free((char *)breaks);
- num_breaks <<= 1;
- goto top;
- }
- *bp++ = p;
- /* Find the end of the argument */
- for ( ; end == NULL; p++ )
- { switch(*p)
- {
- case ',':
- if ( !level ) end = p;
- break;
- case '(':
- if ( !level ) lp = p;
- level++;
- break;
- case ')':
- if ( --level < 0 ) end = p;
- else rp = p;
- break;
- case '/':
- if (p[1] == '*')
- p = skipspace(p, 1) - 1;
- break;
- case '"':
- p = scanstring(p, 1) - 1;
- break;
- default:
- ;
- }
- }
- /* Erase any embedded prototype parameters. */
- if ( lp && rp )
- writeblanks(lp + 1, rp);
- p--; /* back up over terminator */
- /* Find the name being declared. */
- /* This is complicated because of procedure and */
- /* array modifiers. */
- for ( ; ; )
- { p = skipspace(p - 1, -1);
- switch ( *p )
- {
- case ']': /* skip array dimension(s) */
- case ')': /* skip procedure args OR name */
- { int level = 1;
- while ( level )
- switch ( *--p )
- {
- case ']': case ')':
- level++;
- break;
- case '[': case '(':
- level--;
- break;
- case '/':
- if (p > buf && p[-1] == '*')
- p = skipspace(p, -1) + 1;
- break;
- case '"':
- p = scanstring(p, -1) + 1;
- break;
- default: ;
- }
- }
- if ( *p == '(' && *skipspace(p + 1, 1) == '*' )
- { /* We found the name being declared */
- while ( !isidfirstchar(*p) )
- p = skipspace(p, 1) + 1;
- goto found;
- }
- break;
- default:
- goto found;
- }
- }
-found: if ( *p == '.' && p[-1] == '.' && p[-2] == '.' )
- { if ( convert_varargs )
- { *bp++ = "va_alist";
- vararg = p-2;
- }
- else
- { p++;
- if ( bp == breaks + 1 ) /* sole argument */
- writeblanks(breaks[0], p);
- else
- writeblanks(bp[-1] - 1, p);
- bp--;
- }
- }
- else
- { while ( isidchar(*p) ) p--;
- *bp++ = p+1;
- }
- p = end;
- }
- while ( *p++ == ',' );
- *bp = p;
- /* Make a special check for 'void' arglist */
- if ( bp == breaks+2 )
- { p = skipspace(breaks[0], 1);
- if ( !strncmp(p, "void", 4) )
- { p = skipspace(p+4, 1);
- if ( p == breaks[2] - 1 )
- { bp = breaks; /* yup, pretend arglist is empty */
- writeblanks(breaks[0], p + 1);
- }
- }
- }
- /* Put out the function name and left parenthesis. */
- p = buf;
- while ( p != endfn ) putc(*p, out), p++;
- /* Put out the declaration. */
- if ( header )
- { fputs(");", out);
- for ( p = breaks[0]; *p; p++ )
- if ( *p == '\r' || *p == '\n' )
- putc(*p, out);
- }
- else
- { for ( ap = breaks+1; ap < bp; ap += 2 )
- { p = *ap;
- while ( isidchar(*p) )
- putc(*p, out), p++;
- if ( ap < bp - 1 )
- fputs(", ", out);
- }
- fputs(") ", out);
- /* Put out the argument declarations */
- for ( ap = breaks+2; ap <= bp; ap += 2 )
- (*ap)[-1] = ';';
- if ( vararg != 0 )
- { *vararg = 0;
- fputs(breaks[0], out); /* any prior args */
- fputs("va_dcl", out); /* the final arg */
- fputs(bp[0], out);
- }
- else
- fputs(breaks[0], out);
- }
- free((char *)breaks);
- return 0;
-}
diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp
index be2a5683e4..3702560c5f 100644
--- a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp
+++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp
@@ -16,6 +16,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <QResource>
#include <QUrl>
#include "abstractmediaplayer.h"
@@ -216,9 +217,10 @@ void MMF::AbstractMediaPlayer::doSetTickInterval(qint32 interval)
TRACE_EXIT_0();
}
-void MMF::AbstractMediaPlayer::open(const MediaSource &source, RFile& file)
+void MMF::AbstractMediaPlayer::open()
{
- TRACE_CONTEXT(AbstractMediaPlayer::setFileSource, EAudioApi);
+ TRACE_CONTEXT(AbstractMediaPlayer::open, EAudioApi);
+ const MediaSource source = m_parent->source();
TRACE_ENTRY("state %d source.type %d", privateState(), source.type());
close();
@@ -229,7 +231,9 @@ void MMF::AbstractMediaPlayer::open(const MediaSource &source, RFile& file)
switch (source.type()) {
case MediaSource::LocalFile: {
- symbianErr = openFile(file);
+ RFile *const file = m_parent->file();
+ Q_ASSERT(file);
+ symbianErr = openFile(*file);
if (KErrNone != symbianErr)
errorMessage = tr("Error opening file");
break;
@@ -237,9 +241,10 @@ void MMF::AbstractMediaPlayer::open(const MediaSource &source, RFile& file)
case MediaSource::Url: {
const QUrl url(source.url());
-
if (url.scheme() == QLatin1String("file")) {
- symbianErr = openFile(file);
+ RFile *const file = m_parent->file();
+ Q_ASSERT(file);
+ symbianErr = openFile(*file);
if (KErrNone != symbianErr)
errorMessage = tr("Error opening file");
} else {
@@ -251,6 +256,19 @@ void MMF::AbstractMediaPlayer::open(const MediaSource &source, RFile& file)
break;
}
+ case MediaSource::Stream: {
+ QResource *const resource = m_parent->resource();
+ if (resource) {
+ m_buffer.Set(resource->data(), resource->size());
+ symbianErr = openDescriptor(m_buffer);
+ if (KErrNone != symbianErr)
+ errorMessage = tr("Error opening resource");
+ } else {
+ errorMessage = tr("Error opening source: resource not opened");
+ }
+ break;
+ }
+
// Other source types are handled in MediaObject::createPlayer
// Protection against adding new media types and forgetting to update this switch
diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.h b/src/3rdparty/phonon/mmf/abstractmediaplayer.h
index 7d28cafee0..e795ecbf91 100644
--- a/src/3rdparty/phonon/mmf/abstractmediaplayer.h
+++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.h
@@ -47,7 +47,7 @@ protected:
AbstractMediaPlayer(MediaObject *parent, const AbstractPlayer *player);
public:
- virtual void open(const Phonon::MediaSource&, RFile&);
+ virtual void open();
// MediaObjectInterface
virtual void play();
@@ -70,6 +70,7 @@ protected:
virtual int setDeviceVolume(int mmfVolume) = 0;
virtual int openFile(RFile& file) = 0;
virtual int openUrl(const QString& url) = 0;
+ virtual int openDescriptor(const TDesC8 &des) = 0;
virtual int bufferStatus() const = 0;
void updateMetaData();
@@ -123,6 +124,9 @@ private:
bool m_prefinishMarkSent;
bool m_aboutToFinishSent;
+ // Used for playback of resource files
+ TPtrC8 m_buffer;
+
QMultiMap<QString, QString> m_metaData;
};
diff --git a/src/3rdparty/phonon/mmf/abstractplayer.h b/src/3rdparty/phonon/mmf/abstractplayer.h
index 30d524377d..dd98c7c53b 100644
--- a/src/3rdparty/phonon/mmf/abstractplayer.h
+++ b/src/3rdparty/phonon/mmf/abstractplayer.h
@@ -26,8 +26,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include "abstractvideooutput.h"
-class RFile;
-
QT_BEGIN_NAMESPACE
namespace Phonon
@@ -54,7 +52,7 @@ class AbstractPlayer : public QObject
public:
AbstractPlayer(const AbstractPlayer *player);
- virtual void open(const Phonon::MediaSource&, RFile&) = 0;
+ virtual void open() = 0;
virtual void close() = 0;
// MediaObjectInterface (implemented)
diff --git a/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp b/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp
index 9ea4d18c44..fb20bea018 100644
--- a/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp
+++ b/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp
@@ -144,6 +144,12 @@ int MMF::AbstractVideoPlayer::openUrl(const QString &url)
return err;
}
+int MMF::AbstractVideoPlayer::openDescriptor(const TDesC8 &des)
+{
+ TRAPD(err, m_player->OpenDesL(des));
+ return err;
+}
+
int MMF::AbstractVideoPlayer::bufferStatus() const
{
int result = 0;
diff --git a/src/3rdparty/phonon/mmf/abstractvideoplayer.h b/src/3rdparty/phonon/mmf/abstractvideoplayer.h
index d854793902..3ff3c75d7d 100644
--- a/src/3rdparty/phonon/mmf/abstractvideoplayer.h
+++ b/src/3rdparty/phonon/mmf/abstractvideoplayer.h
@@ -66,6 +66,7 @@ public:
virtual int setDeviceVolume(int mmfVolume);
virtual int openFile(RFile &file);
virtual int openUrl(const QString &url);
+ virtual int openDescriptor(const TDesC8 &des);
virtual int bufferStatus() const;
virtual void close();
diff --git a/src/3rdparty/phonon/mmf/audioplayer.cpp b/src/3rdparty/phonon/mmf/audioplayer.cpp
index f49e898923..7c8b9bd04f 100644
--- a/src/3rdparty/phonon/mmf/audioplayer.cpp
+++ b/src/3rdparty/phonon/mmf/audioplayer.cpp
@@ -137,6 +137,12 @@ int MMF::AudioPlayer::openUrl(const QString& /*url*/)
return 0;
}
+int MMF::AudioPlayer::openDescriptor(const TDesC8 &des)
+{
+ TRAPD(err, m_player->OpenDesL(des));
+ return err;
+}
+
int MMF::AudioPlayer::bufferStatus() const
{
int result = 0;
diff --git a/src/3rdparty/phonon/mmf/audioplayer.h b/src/3rdparty/phonon/mmf/audioplayer.h
index 0eb8bb7f70..e43caddbf2 100644
--- a/src/3rdparty/phonon/mmf/audioplayer.h
+++ b/src/3rdparty/phonon/mmf/audioplayer.h
@@ -67,6 +67,7 @@ typedef CMdaAudioPlayerUtility NativePlayer;
virtual int setDeviceVolume(int mmfVolume);
virtual int openFile(RFile& file);
virtual int openUrl(const QString& url);
+ virtual int openDescriptor(const TDesC8 &des);
virtual int bufferStatus() const;
virtual void close();
diff --git a/src/3rdparty/phonon/mmf/dummyplayer.cpp b/src/3rdparty/phonon/mmf/dummyplayer.cpp
index d39ef76c75..ba75b02113 100644
--- a/src/3rdparty/phonon/mmf/dummyplayer.cpp
+++ b/src/3rdparty/phonon/mmf/dummyplayer.cpp
@@ -92,7 +92,7 @@ qint64 MMF::DummyPlayer::totalTime() const
return 0;
}
-void MMF::DummyPlayer::open(const Phonon::MediaSource &, RFile &)
+void MMF::DummyPlayer::open()
{
}
diff --git a/src/3rdparty/phonon/mmf/dummyplayer.h b/src/3rdparty/phonon/mmf/dummyplayer.h
index 9d45696910..5b004113ef 100644
--- a/src/3rdparty/phonon/mmf/dummyplayer.h
+++ b/src/3rdparty/phonon/mmf/dummyplayer.h
@@ -57,7 +57,7 @@ public:
virtual qint64 totalTime() const;
// AbstractPlayer
- virtual void open(const Phonon::MediaSource&, RFile&);
+ virtual void open();
virtual void close();
virtual void doSetTickInterval(qint32 interval);
};
diff --git a/src/3rdparty/phonon/mmf/mediaobject.cpp b/src/3rdparty/phonon/mmf/mediaobject.cpp
index d264377ded..98326b8d40 100644
--- a/src/3rdparty/phonon/mmf/mediaobject.cpp
+++ b/src/3rdparty/phonon/mmf/mediaobject.cpp
@@ -34,6 +34,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include "mediaobject.h"
#include <QDir>
+#include <QResource>
#include <QUrl>
QT_BEGIN_NAMESPACE
@@ -52,6 +53,8 @@ using namespace Phonon::MMF;
MMF::MediaObject::MediaObject(QObject *parent) : MMF::MediaNode::MediaNode(parent)
, m_recognizerOpened(false)
, m_nextSourceSet(false)
+ , m_file(0)
+ , m_resource(0)
{
m_player.reset(new DummyPlayer());
@@ -68,7 +71,12 @@ MMF::MediaObject::~MediaObject()
TRACE_CONTEXT(MediaObject::~MediaObject, EAudioApi);
TRACE_ENTRY_0();
- m_file.Close();
+ delete m_resource;
+
+ if (m_file)
+ m_file->Close();
+ delete m_file;
+
m_fileServer.Close();
m_recognizer.Close();
@@ -122,12 +130,13 @@ MMF::MediaType MMF::MediaObject::fileMediaType
const QHBufC fileNameSymbian(QDir::toNativeSeparators(fileName));
- m_file.Close();
- TInt err = m_file.Open(m_fileServer, *fileNameSymbian, EFileRead | EFileShareReadersOnly);
+ Q_ASSERT(!m_file);
+ m_file = new RFile;
+ TInt err = m_file->Open(m_fileServer, *fileNameSymbian, EFileRead | EFileShareReadersOnly);
if (KErrNone == err) {
TDataRecognitionResult recognizerResult;
- err = m_recognizer.RecognizeData(m_file, recognizerResult);
+ err = m_recognizer.RecognizeData(*m_file, recognizerResult);
if (KErrNone == err) {
const TPtrC mimeType = recognizerResult.iDataType.Des();
result = Utils::mimeTypeToMediaType(mimeType);
@@ -142,6 +151,23 @@ MMF::MediaType MMF::MediaObject::fileMediaType
return result;
}
+MMF::MediaType MMF::MediaObject::bufferMediaType(const uchar *data, qint64 size)
+{
+ TRACE_CONTEXT(MediaObject::bufferMediaType, EAudioInternal);
+ MediaType result = MediaTypeUnknown;
+ if (openRecognizer()) {
+ TDataRecognitionResult recognizerResult;
+ const TPtrC8 des(data, size);
+ const TInt err = m_recognizer.RecognizeData(KNullDesC, des, recognizerResult);
+ if (KErrNone == err) {
+ const TPtrC mimeType = recognizerResult.iDataType.Des();
+ result = Utils::mimeTypeToMediaType(mimeType);
+ } else {
+ TRACE("RApaLsSession::RecognizeData error %d", err);
+ }
+ }
+ return result;
+}
//-----------------------------------------------------------------------------
// MediaObjectInterface
@@ -228,9 +254,17 @@ void MMF::MediaObject::setSource(const MediaSource &source)
void MMF::MediaObject::switchToSource(const MediaSource &source)
{
+ if (m_file)
+ m_file->Close();
+ delete m_file;
+ m_file = 0;
+
+ delete m_resource;
+ m_resource = 0;
+
createPlayer(source);
m_source = source;
- m_player->open(m_source, m_file);
+ m_player->open();
emit currentSourceChanged(m_source);
}
@@ -272,10 +306,29 @@ void MMF::MediaObject::createPlayer(const MediaSource &source)
case MediaSource::Invalid:
case MediaSource::Disc:
- case MediaSource::Stream:
errorMessage = tr("Error opening source: type not supported");
break;
+ case MediaSource::Stream:
+ {
+ const QString fileName = source.url().toLocalFile();
+ if (fileName.startsWith(QLatin1String(":/")) || fileName.startsWith(QLatin1String("qrc://"))) {
+ Q_ASSERT(!m_resource);
+ m_resource = new QResource(fileName);
+ if (m_resource->isValid()) {
+ if (m_resource->isCompressed())
+ errorMessage = tr("Error opening source: resource is compressed");
+ else
+ mediaType = bufferMediaType(m_resource->data(), m_resource->size());
+ } else {
+ errorMessage = tr("Error opening source: resource not valid");
+ }
+ } else {
+ errorMessage = tr("Error opening source: type not supported");
+ }
+ }
+ break;
+
case MediaSource::Empty:
TRACE_0("Empty media source");
break;
@@ -374,6 +427,16 @@ void MMF::MediaObject::volumeChanged(qreal volume)
m_player->volumeChanged(volume);
}
+RFile* MMF::MediaObject::file() const
+{
+ return m_file;
+}
+
+QResource* MMF::MediaObject::resource() const
+{
+ return m_resource;
+}
+
//-----------------------------------------------------------------------------
// MediaNode
//-----------------------------------------------------------------------------
diff --git a/src/3rdparty/phonon/mmf/mediaobject.h b/src/3rdparty/phonon/mmf/mediaobject.h
index f15eb21131..5399e27216 100644
--- a/src/3rdparty/phonon/mmf/mediaobject.h
+++ b/src/3rdparty/phonon/mmf/mediaobject.h
@@ -33,6 +33,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
QT_BEGIN_NAMESPACE
+class QResource;
+
namespace Phonon
{
namespace MMF
@@ -87,6 +89,9 @@ public:
void setVideoOutput(AbstractVideoOutput* videoOutput);
+ RFile* file() const;
+ QResource* resource() const;
+
public Q_SLOTS:
void volumeChanged(qreal volume);
void switchToNextSource();
@@ -117,6 +122,7 @@ private:
// Audio / video media type recognition
MediaType fileMediaType(const QString& fileName);
+ MediaType bufferMediaType(const uchar *data, qint64 size);
// TODO: urlMediaType function
static qint64 toMilliSeconds(const TTimeIntervalMicroSeconds &);
@@ -132,9 +138,8 @@ private:
MediaSource m_nextSource;
bool m_nextSourceSet;
- // Storing the file handle here to work around KErrInUse error
- // from MMF player utility OpenFileL functions
- RFile m_file;
+ RFile* m_file;
+ QResource* m_resource;
QScopedPointer<AbstractPlayer> m_player;
diff --git a/src/3rdparty/phonon/phonon/mediasource.cpp b/src/3rdparty/phonon/phonon/mediasource.cpp
index be22dc3150..d70b38bdc8 100644
--- a/src/3rdparty/phonon/phonon/mediasource.cpp
+++ b/src/3rdparty/phonon/phonon/mediasource.cpp
@@ -50,7 +50,7 @@ MediaSource::MediaSource(const QString &filename)
const QFileInfo fileInfo(filename);
if (fileInfo.exists()) {
bool localFs = QAbstractFileEngine::LocalDiskFlag & QFSFileEngine(filename).fileFlags(QAbstractFileEngine::LocalDiskFlag);
- if (localFs) {
+ if (localFs && !filename.startsWith(QLatin1String(":/")) && !filename.startsWith(QLatin1String("qrc://"))) {
d->url = QUrl::fromLocalFile(fileInfo.absoluteFilePath());
} else {
#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
@@ -58,6 +58,7 @@ MediaSource::MediaSource(const QString &filename)
d->type = Stream;
d->ioDevice = new QFile(filename);
d->setStream(new IODeviceStream(d->ioDevice, d->ioDevice));
+ d->url = QUrl::fromLocalFile(fileInfo.absoluteFilePath());
#else
d->type = Invalid;
#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
diff --git a/src/3rdparty/sqlite.pri b/src/3rdparty/sqlite.pri
new file mode 100644
index 0000000000..575412da09
--- /dev/null
+++ b/src/3rdparty/sqlite.pri
@@ -0,0 +1,4 @@
+CONFIG(release, debug|release):DEFINES *= NDEBUG
+DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE
+INCLUDEPATH += $$PWD/sqlite
+SOURCES += $$PWD/sqlite/sqlite3.c
diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag
index 1d1c8ed15d..0b414abe29 100644
--- a/src/3rdparty/webkit/.tag
+++ b/src/3rdparty/webkit/.tag
@@ -1 +1 @@
-ad96ca2f9b57271da4ea7432022ac686ee0981c2
+e6e692bb056670e2781dd0bc473a60757ae53992
diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
index 8fa3a72b94..c09ad79117 100644
--- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
@@ -1,3 +1,90 @@
+2010-07-02 Peter Varga <pvarga@inf.u-szeged.hu>
+
+ Reviewed by Oliver Hunt.
+
+ The alternativeFrameLocation value is wrong in the emitDisjunction function in
+ case of PatternTerm::TypeParentheticalAssertion. This value needs to be
+ computed from term.frameLocation instead of term.inputPosition. This mistake caused glibc
+ memory corruption in some cases.
+ Layout test added for checking of TypeParentheticalAssertion case.
+ https://bugs.webkit.org/show_bug.cgi?id=41458
+
+ * yarr/RegexInterpreter.cpp:
+ (JSC::Yarr::ByteCompiler::emitDisjunction):
+
+2010-07-03 Yong Li <yoli@rim.com>
+
+ Reviewed by Darin Adler.
+
+ Make Arguments::MaxArguments clamping work for numbers >= 0x80000000 in
+ the interpreter as well as the JIT.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41351
+ rdar://problem/8142141
+
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::privateExecute): Fix signed integer overflow problem
+ in op_load_varargs handling. 0xFFFFFFFF was read as -1.
+
+2010-07-04 Mark Rowe <mrowe@apple.com>
+
+ Build fix after r62456.
+
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::privateExecute): Be slightly more consistent in using uint32_t to prevent
+ warnings about comparisons between signed and unsigned types, and attempts to call an overload
+ of std::min that doesn't exist.
+
+2010-07-02 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ Clamp the number of arguments supported by function.apply
+ https://bugs.webkit.org/show_bug.cgi?id=41351
+ <rdar://problem/8142141>
+
+ Add clamping logic to function.apply similar to that
+ enforced by firefox. We have a smaller clamp than
+ firefox as our calling convention means that stack
+ usage is proportional to argument count -- the firefox
+ limit is larger than you could actually call.
+
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::privateExecute):
+ * jit/JITStubs.cpp:
+ (JSC::DEFINE_STUB_FUNCTION):
+ * runtime/Arguments.h:
+ (JSC::Arguments::):
+
+2010-07-01 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Improve reentrancy logic in polymorphic cache stubs
+ <https://bugs.webkit.org/show_bug.cgi?id=41482>
+ <rdar://problem/8094380>
+
+ Make the polymorphic cache stubs handle reentrancy
+ better.
+
+ * jit/JITStubs.cpp:
+ (JSC::DEFINE_STUB_FUNCTION):
+ (JSC::getPolymorphicAccessStructureListSlot):
+
+2009-10-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml()
+
+ This ensures that long-running JavaScript (for example due to a modal alert() dialog),
+ will not trigger a deferred load after only 500ms (the default tokenizer delay) while
+ still giving a reasonable timeout (10 seconds) to prevent deadlock.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29381
+
+ * runtime/TimeoutChecker.h: Add getter for the timeout interval
+
2010-05-18 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp
index 2713fd4371..73efc0d8d8 100644
--- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved.
* Copyright (C) 2008 Cameron Zwarich <cwzwarich@uwaterloo.ca>
*
* Redistribution and use in source and binary forms, with or without
@@ -3454,9 +3454,10 @@ skip_id_custom_self:
int argsOffset = vPC[2].u.operand;
JSValue arguments = callFrame->r(argsOffset).jsValue();
- int32_t argCount = 0;
+ uint32_t argCount = 0;
if (!arguments) {
argCount = (uint32_t)(callFrame->argumentCount()) - 1;
+ argCount = min<uint32_t>(argCount, Arguments::MaxArguments);
int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize;
Register* newEnd = callFrame->registers() + sizeDelta;
if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
@@ -3464,9 +3465,9 @@ skip_id_custom_self:
goto vm_throw;
}
ASSERT(!callFrame->callee()->isHostFunction());
- int32_t expectedParams = callFrame->callee()->jsExecutable()->parameterCount();
- int32_t inplaceArgs = min(argCount, expectedParams);
- int32_t i = 0;
+ uint32_t expectedParams = callFrame->callee()->jsExecutable()->parameterCount();
+ uint32_t inplaceArgs = min(argCount, expectedParams);
+ uint32_t i = 0;
Register* argStore = callFrame->registers() + argsOffset;
// First step is to copy the "expected" parameters from their normal location relative to the callframe
@@ -3483,6 +3484,7 @@ skip_id_custom_self:
if (asObject(arguments)->classInfo() == &Arguments::info) {
Arguments* args = asArguments(arguments);
argCount = args->numProvidedArguments(callFrame);
+ argCount = min<uint32_t>(argCount, Arguments::MaxArguments);
int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize;
Register* newEnd = callFrame->registers() + sizeDelta;
if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
@@ -3493,6 +3495,7 @@ skip_id_custom_self:
} else if (isJSArray(&callFrame->globalData(), arguments)) {
JSArray* array = asArray(arguments);
argCount = array->length();
+ argCount = min<uint32_t>(argCount, Arguments::MaxArguments);
int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize;
Register* newEnd = callFrame->registers() + sizeDelta;
if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
@@ -3503,6 +3506,7 @@ skip_id_custom_self:
} else if (asObject(arguments)->inherits(&JSArray::info)) {
JSObject* argObject = asObject(arguments);
argCount = argObject->get(callFrame, callFrame->propertyNames().length).toUInt32(callFrame);
+ argCount = min<uint32_t>(argCount, Arguments::MaxArguments);
int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize;
Register* newEnd = callFrame->registers() + sizeDelta;
if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
@@ -3510,7 +3514,7 @@ skip_id_custom_self:
goto vm_throw;
}
Register* argsBuffer = callFrame->registers() + argsOffset;
- for (int32_t i = 0; i < argCount; ++i) {
+ for (uint32_t i = 0; i < argCount; ++i) {
argsBuffer[i] = asObject(arguments)->get(callFrame, i);
CHECK_FOR_EXCEPTION();
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp
index daa945cada..e5fcdc4e0f 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp
@@ -1330,17 +1330,18 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_self_fail)
if (stubInfo->accessType == access_get_by_id_self) {
ASSERT(!stubInfo->stubRoutine);
polymorphicStructureList = new PolymorphicAccessStructureList(CodeLocationLabel(), stubInfo->u.getByIdSelf.baseObjectStructure);
- stubInfo->initGetByIdSelfList(polymorphicStructureList, 2);
+ stubInfo->initGetByIdSelfList(polymorphicStructureList, 1);
} else {
polymorphicStructureList = stubInfo->u.getByIdSelfList.structureList;
listIndex = stubInfo->u.getByIdSelfList.listSize;
- stubInfo->u.getByIdSelfList.listSize++;
}
+ if (listIndex < POLYMORPHIC_LIST_CACHE_SIZE) {
+ stubInfo->u.getByIdSelfList.listSize++;
+ JIT::compileGetByIdSelfList(callFrame->scopeChain()->globalData, codeBlock, stubInfo, polymorphicStructureList, listIndex, asCell(baseValue)->structure(), ident, slot, slot.cachedOffset());
- JIT::compileGetByIdSelfList(callFrame->scopeChain()->globalData, codeBlock, stubInfo, polymorphicStructureList, listIndex, asCell(baseValue)->structure(), ident, slot, slot.cachedOffset());
-
- if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
- ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_generic));
+ if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
+ ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_generic));
+ }
} else
ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_generic));
return JSValue::encode(result);
@@ -1365,13 +1366,14 @@ static PolymorphicAccessStructureList* getPolymorphicAccessStructureListSlot(Str
case access_get_by_id_proto_list:
prototypeStructureList = stubInfo->u.getByIdProtoList.structureList;
listIndex = stubInfo->u.getByIdProtoList.listSize;
- stubInfo->u.getByIdProtoList.listSize++;
+ if (listIndex < POLYMORPHIC_LIST_CACHE_SIZE)
+ stubInfo->u.getByIdProtoList.listSize++;
break;
default:
ASSERT_NOT_REACHED();
}
- ASSERT(listIndex < POLYMORPHIC_LIST_CACHE_SIZE);
+ ASSERT(listIndex <= POLYMORPHIC_LIST_CACHE_SIZE);
return prototypeStructureList;
}
@@ -1446,21 +1448,24 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list)
int listIndex;
PolymorphicAccessStructureList* prototypeStructureList = getPolymorphicAccessStructureListSlot(stubInfo, listIndex);
+ if (listIndex < POLYMORPHIC_LIST_CACHE_SIZE) {
+ JIT::compileGetByIdProtoList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, slotBaseObject->structure(), propertyName, slot, offset);
- JIT::compileGetByIdProtoList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, slotBaseObject->structure(), propertyName, slot, offset);
-
- if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
- ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full));
+ if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
+ ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full));
+ }
} else if (size_t count = normalizePrototypeChain(callFrame, baseValue, slot.slotBase(), propertyName, offset)) {
ASSERT(!asCell(baseValue)->structure()->isDictionary());
int listIndex;
PolymorphicAccessStructureList* prototypeStructureList = getPolymorphicAccessStructureListSlot(stubInfo, listIndex);
+
+ if (listIndex < POLYMORPHIC_LIST_CACHE_SIZE) {
+ StructureChain* protoChain = structure->prototypeChain(callFrame);
+ JIT::compileGetByIdChainList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, protoChain, count, propertyName, slot, offset);
- StructureChain* protoChain = structure->prototypeChain(callFrame);
- JIT::compileGetByIdChainList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, protoChain, count, propertyName, slot, offset);
-
- if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
- ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full));
+ if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
+ ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full));
+ }
} else
ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail));
@@ -2129,6 +2134,7 @@ DEFINE_STUB_FUNCTION(int, op_load_varargs)
if (!arguments) {
int providedParams = callFrame->registers()[RegisterFile::ArgumentCount].i() - 1;
argCount = providedParams;
+ argCount = min(argCount, static_cast<uint32_t>(Arguments::MaxArguments));
int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize;
Register* newEnd = callFrame->registers() + sizeDelta;
if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
@@ -2164,6 +2170,7 @@ DEFINE_STUB_FUNCTION(int, op_load_varargs)
if (asObject(arguments)->classInfo() == &Arguments::info) {
Arguments* argsObject = asArguments(arguments);
argCount = argsObject->numProvidedArguments(callFrame);
+ argCount = min(argCount, static_cast<uint32_t>(Arguments::MaxArguments));
int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize;
Register* newEnd = callFrame->registers() + sizeDelta;
if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
@@ -2174,6 +2181,7 @@ DEFINE_STUB_FUNCTION(int, op_load_varargs)
} else if (isJSArray(&callFrame->globalData(), arguments)) {
JSArray* array = asArray(arguments);
argCount = array->length();
+ argCount = min(argCount, static_cast<uint32_t>(Arguments::MaxArguments));
int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize;
Register* newEnd = callFrame->registers() + sizeDelta;
if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
@@ -2184,6 +2192,7 @@ DEFINE_STUB_FUNCTION(int, op_load_varargs)
} else if (asObject(arguments)->inherits(&JSArray::info)) {
JSObject* argObject = asObject(arguments);
argCount = argObject->get(callFrame, callFrame->propertyNames().length).toUInt32(callFrame);
+ argCount = min(argCount, static_cast<uint32_t>(Arguments::MaxArguments));
int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize;
Register* newEnd = callFrame->registers() + sizeDelta;
if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h
index 9797e086d8..cca3cf21d0 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h
@@ -55,6 +55,10 @@ namespace JSC {
class Arguments : public JSObject {
public:
+ // Use an enum because otherwise gcc insists on doing a memory
+ // read.
+ enum { MaxArguments = 0x10000 };
+
enum NoParametersType { NoParameters };
Arguments(CallFrame*);
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.cpp
index d3ef44cb9e..ae9e038f74 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.cpp
@@ -948,10 +948,10 @@ void JSArray::fillArgList(ExecState* exec, MarkedArgumentBuffer& args)
void JSArray::copyToRegisters(ExecState* exec, Register* buffer, uint32_t maxSize)
{
- ASSERT(m_storage->m_length == maxSize);
+ ASSERT(m_storage->m_length >= maxSize);
UNUSED_PARAM(maxSize);
JSValue* vector = m_storage->m_vector;
- unsigned vectorEnd = min(m_storage->m_length, m_vectorLength);
+ unsigned vectorEnd = min(maxSize, m_vectorLength);
unsigned i = 0;
for (; i < vectorEnd; ++i) {
JSValue& v = vector[i];
@@ -960,7 +960,7 @@ void JSArray::copyToRegisters(ExecState* exec, Register* buffer, uint32_t maxSiz
buffer[i] = v;
}
- for (; i < m_storage->m_length; ++i)
+ for (; i < maxSize; ++i)
buffer[i] = get(exec, i);
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.h b/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.h
index 7bfa6d0830..5925641f80 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.h
@@ -40,6 +40,7 @@ namespace JSC {
TimeoutChecker();
void setTimeoutInterval(unsigned timeoutInterval) { m_timeoutInterval = timeoutInterval; }
+ unsigned timeoutInterval() const { return m_timeoutInterval; }
unsigned ticksUntilNextCheck() { return m_ticksUntilNextCheck; }
diff --git a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexInterpreter.cpp b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexInterpreter.cpp
index c2cb1c28ab..647b20a865 100644
--- a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexInterpreter.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexInterpreter.cpp
@@ -1554,7 +1554,7 @@ public:
}
case PatternTerm::TypeParentheticalAssertion: {
- unsigned alternativeFrameLocation = term.inputPosition + RegexStackSpaceForBackTrackInfoParentheticalAssertion;
+ unsigned alternativeFrameLocation = term.frameLocation + RegexStackSpaceForBackTrackInfoParentheticalAssertion;
atomParentheticalAssertionBegin(term.parentheses.subpatternId, term.invertOrCapture, term.frameLocation, alternativeFrameLocation);
emitDisjunction(term.parentheses.disjunction, currentCountAlreadyChecked, 0);
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 2e5ebd0e4e..f8403fb86e 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
- ad96ca2f9b57271da4ea7432022ac686ee0981c2
+ e6e692bb056670e2781dd0bc473a60757ae53992
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index a993a97635..5189eb53a9 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,249 @@
+2010-07-06 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ <use> on <font-face> causes crashes, if SVGUseElement gets detached
+ https://bugs.webkit.org/show_bug.cgi?id=41621
+
+ Do not call removeFromMappedElementSheet() from the SVGFontFaceElement destructor,
+ as that can potentially cause the element to be reattached while destructing.
+
+ In order to fix the crash in the testcase, the order of calling the base-class detach
+ method in SVGUseElement and the instance/shadow tree destruction has to be reversed,
+ matching the order in removedFromDocument().
+
+ Test: svg/custom/use-font-face-crash.svg
+
+ * svg/SVGFontFaceElement.cpp:
+ (WebCore::SVGFontFaceElement::~SVGFontFaceElement): Remove removeFromMappedElementSheet() call.
+ * svg/SVGUseElement.cpp:
+ (WebCore::SVGUseElement::detach): Reverse order of calling base-class detach method and instance/shadow tree destruction.
+
+2010-07-06 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Darin Adler.
+
+ <use> on <font-face> causes crashes, if SVGUseElement gets detached
+ https://bugs.webkit.org/show_bug.cgi?id=41621
+
+ Do not call removeFromMappedElementSheet() from the destructor, as the call to document()->updateStyleSelector() that can potentially
+ cause the element to be reattached while destructing. It's not needed at all, because removedFromDocument() is called before destruction,
+ which already calls removeFromMappedElementSheet() - at this point it's still safe to update the style selector.
+
+ The crash is reproducable when using <use> on <font-face>.
+
+ Test: svg/custom/use-font-face-crash.svg
+
+ * svg/SVGFontFaceElement.cpp:
+ (WebCore::SVGFontFaceElement::~SVGFontFaceElement):
+
+2010-07-05 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Darin Adler.
+
+ Memory corruption with SVG <use> element
+ https://bugs.webkit.org/show_bug.cgi?id=40994
+
+ Fix race condition in svgAttributeChanged. Never call svgAttributeChanged() from attributeChanged()
+ when we're synchronizing SVG attributes. It leads to either unnecessary extra work being done or
+ crashes. Especially together with <polyline>/<polygon> which always synchronize the SVGAnimatedPoints
+ datastructure with the points attribute, no matter if there are changes are not. This should be
+ furhter optimized, but this fix is sane and fixes the root of the evil races.
+
+ Test: svg/custom/use-property-synchronization-crash.svg
+
+ * svg/SVGElement.cpp:
+ (WebCore::SVGElement::attributeChanged):
+
+2010-06-11 Abhishek Arya <inferno@chromium.org>
+
+ Reviewed by David Hyatt.
+
+ Don't process floats if parent node is not a RenderBlock.
+ https://bugs.webkit.org/show_bug.cgi?id=40033
+
+ Test: svg/text/clear-floats-crash.svg
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::clearFloats):
+
+2010-06-23 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ Reproducible crash in com.apple.WebCore 0x01ed3784 WebCore::RenderLineBoxList::appendLineBox(WebCore::InlineFlowBox*) + 36
+ https://bugs.webkit.org/show_bug.cgi?id=40953
+
+ REGRESSION (r58209-58231): Memory corruption with invalid SVG
+ https://bugs.webkit.org/show_bug.cgi?id=40173
+
+ Fix several crashes, all related to <foreignObject> and/or invalid SVG documents.
+ - Only allow <svg> nodes, as direct children of a <foreignObject>, not any other "partial" SVG content.
+ - Assure to create RenderSVGRoot objects for <svg> nodes in <foreignObject>, treat them as "outermost SVG elements".
+ - Never allow any partial SVG content to appear in any document. Only <svg> elements are allowed.
+
+ Tests: svg/custom/bug45331.svg
+ svg/foreignObject/disallowed-svg-nodes-as-direct-children.svg
+ svg/foreignObject/no-crash-with-svg-content-in-html-document.svg
+ svg/foreignObject/svg-document-as-direct-child.svg
+ svg/foreignObject/svg-document-in-html-document.svg
+ svg/foreignObject/text-tref-02-b.svg
+
+ * dom/Element.cpp: Added childShouldCreateRenderer, with ENABLE(SVG) guards.
+ (WebCore::Element::childShouldCreateRenderer): Only create a renderer for a SVG child, if we're a SVG element, or if the child is a <svg> element.
+ * dom/Element.h: Added childShouldCreateRenderer, with ENABLE(SVG) guards.
+ * svg/SVGForeignObjectElement.cpp:
+ (WebCore::SVGForeignObjectElement::childShouldCreateRenderer): Disallow arbitary SVG content, only <svg> elements are allowed as direct children of a <foreignObject>
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::isOutermostSVG): Be sure to create RenderSVGRoot objects for <svg> elements inside <foreignObject>
+
+2010-06-10 Abhishek Arya <inferno@chromium.org>
+
+ Reviewed by Dave Hyatt.
+
+ Do not render CSS Styles :first-letter and :first-line in a SVG text element context.
+ https://bugs.webkit.org/show_bug.cgi?id=40031
+
+ Test: svg/text/text-style-invalid.svg
+
+ * rendering/RenderSVGText.cpp:
+ (WebCore::RenderSVGText::firstLineBlock):
+ (WebCore::RenderSVGText::updateFirstLetter):
+ * rendering/RenderSVGText.h:
+
+2010-07-01 Justin Schuh <jschuh@chromium.org>
+
+ Reviewed by Dan Bernstein.
+
+ Prevent crash on counter destruction
+ https://bugs.webkit.org/show_bug.cgi?id=40032
+
+ Added counter destruction to RenderWidget::destroy()
+
+ Test: fast/css/counters/destroy-counter-crash.html
+
+ * rendering/RenderWidget.cpp:
+ (WebCore::RenderWidget::destroy):
+
+2010-06-29 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7975842> Certain text is repeated after using splitText()
+
+ Tests: fast/text/setData-dirty-lines.html
+ fast/text/splitText-dirty-lines.html
+
+ * dom/CharacterData.cpp:
+ (WebCore::CharacterData::setData): Call RenderText::setTextWithOffset() rather than
+ setText(), because only the former correctly dirties line boxes.
+ * dom/Text.cpp:
+ (WebCore::Text::splitText): Ditto.
+
+2010-06-25 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/8000667> Certain text is repeated before and after a line break
+
+ Test: fast/text/bidi-explicit-embedding-past-end.html
+
+ * platform/text/BidiResolver.h:
+ (WebCore::::createBidiRunsForLine): Committing explicit embedding past the end of the range
+ creates BidiRuns up to the end of the range, so at that point, we can stop iterating.
+
+2010-06-10 Tony Chang <tony@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ crash when focus is changed while trying to focus next element
+ https://bugs.webkit.org/show_bug.cgi?id=40407
+
+ Test: fast/events/focus-change-crash.html
+
+ * dom/Element.cpp:
+ (WebCore::Element::focus):
+
+2010-07-01 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Clamp color stops passed to QGradient to 1.0
+ [https://bugs.webkit.org/show_bug.cgi?id=41484
+
+ Fixes an issue where color stops would be silently dropped from radial gradients.
+
+ * platform/graphics/qt/GradientQt.cpp:
+ (WebCore::Gradient::platformGradient):
+
+2010-07-07 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Prevent assertion/duplicate loads for non-deferred subtitute-data loads
+
+ https://bugs.webkit.org/show_bug.cgi?id=30879
+
+ MainResourceLoader uses the member m_initialRequest to store requests for future
+ deferred loads. When doing the actual load in handleDataLoadNow(), we therefore
+ have to clear this request so that subsequent entries into the loader will not
+ start yet another load.
+
+ This can happen as a result of a PageGroupLoadDeferrer going out of scope when
+ returning from Chrome::runJavaScriptAlert(), which calls setDeferredLoading(false),
+ but only in the case of using both substitute-data and non-deferred main resource
+ load together. That's why two new DRT functions were added:
+
+ * queueLoadHTMLString()
+ * setDeferMainResourceLoad()
+
+ The change adds DRT hooks for Mac, Win and Qt for these two functions. For Mac
+ and Win the hook uses new SPI in WebDataSource. For Qt a new static member was
+ added to the FrameLoaderClientQt and accessed though DumpRenderTreeSupportQt.
+
+ Test: fast/loader/non-deferred-substitute-load.html
+
+ * loader/MainResourceLoader.cpp:
+ (WebCore::MainResourceLoader::handleDataLoadNow):
+
+2010-07-16 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Simon Fraser.
+
+ Spatial navigation: do not consider outline for focusable element boundaries
+ https://bugs.webkit.org/show_bug.cgi?id=42474
+
+ Test: fast/events/spatial-navigation/snav-zero-margin-content.html
+
+ Currently in WebCore::renderRectRelativeToRootDocument function, we are calling
+ RenderObject::absoluteClippedOverflowRect to obtain the rect boundary of a given
+ renderer/element. This method deals with outline, which is out of elements boundary.
+ It makes spatial navigation to fail on common sites like google.gom: "Web, Images, Map, etc"
+ are inaccessible.
+
+ Patch replaces RenderObject::absoluteClippedOverflowRect by Node::getRect,
+ which returns only the absolute bounding box rect of the Element.
+
+ * page/SpatialNavigation.cpp:
+ (WebCore::renderRectRelativeToRootDocument):
+ (WebCore::checkNegativeCoordsForNode):
+
+2010-07-21 Kristian Amlie <kristian.amlie@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added automatic sqlite extraction for Symbian to QtWebKit.
+
+ Also added sqlite detection in case sqlite is not present in the SDK.
+ This is possible if WebKit is compiled standalone.
+
+ The inclusion part is a consequence of commit c578c6c1d6d in the Qt
+ repository. It will not work on Qt versions < 4.7.1, but that is ok,
+ since the only build system it will affect is marked as experimental
+ in the whole 4.7 series.
+
+ * WebCore.pro:
+
2010-05-14 Abhishek Arya <inferno@chromium.org>
Reviewed by David Hyatt.
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index aaa462336f..f892f9ec9c 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -118,8 +118,16 @@ win32-g++* {
QMAKE_LIBDIR_POST += $$split(TMPPATH,";")
}
-# Assume that symbian OS always comes with sqlite
-symbian:!CONFIG(QTDIR_build): CONFIG += system-sqlite
+symbian {
+ !CONFIG(QTDIR_build) {
+ # Test if symbian OS comes with sqlite
+ exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso):CONFIG *= system-sqlite
+ } else:!symbian-abld:!symbian-sbsv2 {
+ # When bundled with Qt, all Symbian build systems extract their own sqlite files if
+ # necessary, but on non-mmp based ones we need to specify this ourselves.
+ include($$QT_SOURCE_TREE/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri)
+ }
+}
diff --git a/src/3rdparty/webkit/WebCore/dom/CharacterData.cpp b/src/3rdparty/webkit/WebCore/dom/CharacterData.cpp
index 3c3dc375b4..cb12184181 100644
--- a/src/3rdparty/webkit/WebCore/dom/CharacterData.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/CharacterData.cpp
@@ -46,15 +46,15 @@ void CharacterData::setData(const String& data, ExceptionCode&)
int oldLength = length();
RefPtr<StringImpl> oldStr = m_data;
m_data = dataImpl;
-
+
if ((!renderer() || !rendererIsNeeded(renderer()->style())) && attached()) {
detach();
attach();
} else if (renderer())
- toRenderText(renderer())->setText(m_data);
-
+ toRenderText(renderer())->setTextWithOffset(m_data, 0, oldLength);
+
dispatchModifiedEvent(oldStr.get());
-
+
document()->textRemoved(this, 0, oldLength);
}
diff --git a/src/3rdparty/webkit/WebCore/dom/Element.cpp b/src/3rdparty/webkit/WebCore/dom/Element.cpp
index a02bb4cb36..4c93020ab6 100644
--- a/src/3rdparty/webkit/WebCore/dom/Element.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/Element.cpp
@@ -1311,8 +1311,12 @@ void Element::focus(bool restorePreviousSelection)
return;
}
- if (Page* page = doc->page())
+ RefPtr<Node> protect;
+ if (Page* page = doc->page()) {
+ // Focus and change event handlers can cause us to lose our last ref.
+ protect = this;
page->focusController()->setFocusedNode(this, doc->frame());
+ }
// Setting the focused node above might have invalidated the layout due to scripts.
doc->updateLayoutIgnorePendingStylesheets();
@@ -1535,4 +1539,15 @@ const QualifiedName& Element::rareIDAttributeName() const
return rareData()->m_idAttributeName;
}
+#if ENABLE(SVG)
+bool Element::childShouldCreateRenderer(Node* child) const
+{
+ // Only create renderers for SVG elements whose parents are SVG elements, or for proper <svg xmlns="svgNS"> subdocuments.
+ if (child->isSVGElement())
+ return child->hasTagName(SVGNames::svgTag) || isSVGElement();
+
+ return Node::childShouldCreateRenderer(child);
+}
+#endif
+
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/dom/Element.h b/src/3rdparty/webkit/WebCore/dom/Element.h
index 348ed1c30b..36c4f1bd44 100644
--- a/src/3rdparty/webkit/WebCore/dom/Element.h
+++ b/src/3rdparty/webkit/WebCore/dom/Element.h
@@ -270,6 +270,10 @@ public:
virtual void dispatchFormControlChangeEvent() { }
+#if ENABLE(SVG)
+ virtual bool childShouldCreateRenderer(Node*) const;
+#endif
+
protected:
Element(const QualifiedName&, Document*, ConstructionType);
diff --git a/src/3rdparty/webkit/WebCore/dom/Text.cpp b/src/3rdparty/webkit/WebCore/dom/Text.cpp
index 1ce074a553..229fa882ca 100644
--- a/src/3rdparty/webkit/WebCore/dom/Text.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/Text.cpp
@@ -77,7 +77,7 @@ PassRefPtr<Text> Text::splitText(unsigned offset, ExceptionCode& ec)
document()->textNodeSplit(this);
if (renderer())
- toRenderText(renderer())->setText(dataImpl());
+ toRenderText(renderer())->setTextWithOffset(dataImpl(), 0, oldStr->length());
return newText.release();
}
diff --git a/src/3rdparty/webkit/WebCore/loader/MainResourceLoader.cpp b/src/3rdparty/webkit/WebCore/loader/MainResourceLoader.cpp
index 28587e29bb..54c5c34a6a 100644
--- a/src/3rdparty/webkit/WebCore/loader/MainResourceLoader.cpp
+++ b/src/3rdparty/webkit/WebCore/loader/MainResourceLoader.cpp
@@ -464,6 +464,10 @@ void MainResourceLoader::handleDataLoadNow(MainResourceLoaderTimer*)
KURL url = m_substituteData.responseURL();
if (url.isEmpty())
url = m_initialRequest.url();
+
+ // Clear the initial request here so that subsequent entries into the
+ // loader will not think there's still a deferred load left to do.
+ m_initialRequest = ResourceRequest();
ResourceResponse response(url, m_substituteData.mimeType(), m_substituteData.content()->size(), m_substituteData.textEncoding(), "");
didReceiveResponse(response);
diff --git a/src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp b/src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp
index a80626f6b4..fdacebb424 100644
--- a/src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp
+++ b/src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp
@@ -102,14 +102,9 @@ void distanceDataForNode(FocusDirection direction, Node* start, FocusCandidate&
// FIXME: This function does not behave correctly with transformed frames.
static IntRect renderRectRelativeToRootDocument(RenderObject* render)
{
- ASSERT(render);
+ ASSERT(render && render->node());
- IntRect rect(render->absoluteClippedOverflowRect());
-
- if (rect.isEmpty()) {
- Element* e = static_cast<Element*>(render->node());
- rect = e->getRect();
- }
+ IntRect rect = render->node()->getRect();
// In cases when the |render|'s associated node is in a scrollable inner
// document, we only consider its scrollOffset if it is not offscreen.
@@ -516,7 +511,7 @@ static bool checkNegativeCoordsForNode(Node* node, const IntRect& curRect)
{
ASSERT(node || node->renderer());
- if (curRect.x() > 0 && curRect.y() > 0)
+ if (curRect.x() >= 0 && curRect.y() >= 0)
return true;
bool canBeScrolled = false;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GradientQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GradientQt.cpp
index 8b9e2d7f85..1ec320345b 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GradientQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GradientQt.cpp
@@ -65,7 +65,7 @@ QGradient* Gradient::platformGradient()
lastStop = stopIterator->stop;
if (m_radial && m_r0)
lastStop = m_r0 / m_r1 + lastStop * (1.0f - m_r0 / m_r1);
- m_gradient->setColorAt(lastStop, stopColor);
+ m_gradient->setColorAt(qMin(lastStop, qreal(1.0f)), stopColor);
// Keep the lastStop as orginal value, since the following stopColor depend it
lastStop = stopIterator->stop;
++stopIterator;
diff --git a/src/3rdparty/webkit/WebCore/platform/text/BidiResolver.h b/src/3rdparty/webkit/WebCore/platform/text/BidiResolver.h
index 286cdcd1a9..a99fd01056 100644
--- a/src/3rdparty/webkit/WebCore/platform/text/BidiResolver.h
+++ b/src/3rdparty/webkit/WebCore/platform/text/BidiResolver.h
@@ -806,35 +806,33 @@ void BidiResolver<Iterator, Run>::createBidiRunsForLine(const Iterator& end, boo
break;
}
- if (pastEnd) {
- if (eor == current) {
- if (!reachedEndOfLine) {
- eor = endOfLine;
- switch (m_status.eor) {
- case LeftToRight:
- case RightToLeft:
- case ArabicNumber:
- m_direction = m_status.eor;
- break;
- case EuropeanNumber:
- m_direction = m_status.lastStrong == LeftToRight ? LeftToRight : EuropeanNumber;
- break;
- default:
- ASSERT(false);
- }
- appendRun();
+ if (pastEnd && eor == current) {
+ if (!reachedEndOfLine) {
+ eor = endOfLine;
+ switch (m_status.eor) {
+ case LeftToRight:
+ case RightToLeft:
+ case ArabicNumber:
+ m_direction = m_status.eor;
+ break;
+ case EuropeanNumber:
+ m_direction = m_status.lastStrong == LeftToRight ? LeftToRight : EuropeanNumber;
+ break;
+ default:
+ ASSERT(false);
}
- current = end;
- m_status = stateAtEnd.m_status;
- sor = stateAtEnd.sor;
- eor = stateAtEnd.eor;
- last = stateAtEnd.last;
- reachedEndOfLine = stateAtEnd.reachedEndOfLine;
- lastBeforeET = stateAtEnd.lastBeforeET;
- emptyRun = stateAtEnd.emptyRun;
- m_direction = OtherNeutral;
- break;
+ appendRun();
}
+ current = end;
+ m_status = stateAtEnd.m_status;
+ sor = stateAtEnd.sor;
+ eor = stateAtEnd.eor;
+ last = stateAtEnd.last;
+ reachedEndOfLine = stateAtEnd.reachedEndOfLine;
+ lastBeforeET = stateAtEnd.lastBeforeET;
+ emptyRun = stateAtEnd.emptyRun;
+ m_direction = OtherNeutral;
+ break;
}
// set m_status.last as needed.
@@ -887,8 +885,21 @@ void BidiResolver<Iterator, Run>::createBidiRunsForLine(const Iterator& end, boo
}
increment();
- if (!m_currentExplicitEmbeddingSequence.isEmpty())
+ if (!m_currentExplicitEmbeddingSequence.isEmpty()) {
commitExplicitEmbedding();
+ if (pastEnd) {
+ current = end;
+ m_status = stateAtEnd.m_status;
+ sor = stateAtEnd.sor;
+ eor = stateAtEnd.eor;
+ last = stateAtEnd.last;
+ reachedEndOfLine = stateAtEnd.reachedEndOfLine;
+ lastBeforeET = stateAtEnd.lastBeforeET;
+ emptyRun = stateAtEnd.emptyRun;
+ m_direction = OtherNeutral;
+ break;
+ }
+ }
if (emptyRun && (dirCurrent == RightToLeftEmbedding
|| dirCurrent == LeftToRightEmbedding
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp
index 798663e0a5..e7fa753787 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp
@@ -2981,6 +2981,12 @@ void RenderBlock::clearFloats()
m_floatingObjects->clear();
}
+ // We should not process floats if the parent node is not a RenderBlock. Otherwise, we will add
+ // floats in an invalid context. This will cause a crash arising from a bad cast on the parent.
+ // See <rdar://problem/8049753>, where float property is applied on a text node in a SVG.
+ if (!parent() || !parent()->isRenderBlock())
+ return;
+
// Attempt to locate a previous sibling with overhanging floats. We skip any elements that are
// out of flow (like floating/positioned elements), and we also skip over any objects that may have shifted
// to avoid floats.
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.cpp
index 76b8b86a56..de902e08af 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.cpp
@@ -225,6 +225,19 @@ FloatRect RenderSVGText::repaintRectInLocalCoordinates() const
return repaintRect;
}
+// Fix for <rdar://problem/8048875>. We should not render :first-line CSS Style
+// in a SVG text element context.
+RenderBlock* RenderSVGText::firstLineBlock() const
+{
+ return 0;
+}
+
+// Fix for <rdar://problem/8048875>. We should not render :first-letter CSS Style
+// in a SVG text element context.
+void RenderSVGText::updateFirstLetter()
+{
+}
+
}
#endif // ENABLE(SVG)
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.h b/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.h
index ab4b09b5c8..f09e3964a7 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.h
@@ -72,6 +72,9 @@ private:
virtual RootInlineBox* createRootInlineBox();
+ virtual RenderBlock* firstLineBlock() const;
+ virtual void updateFirstLetter();
+
AffineTransform m_localTransform;
};
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp
index 561bead868..251a65ddb2 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp
@@ -27,6 +27,7 @@
#include "AnimationController.h"
#include "GraphicsContext.h"
#include "HitTestResult.h"
+#include "RenderCounter.h"
#include "RenderView.h"
#include "RenderWidgetProtector.h"
@@ -114,6 +115,9 @@ void RenderWidget::destroy()
if (RenderView* v = view())
v->removeWidget(this);
+ if (m_hasCounterNodeMap)
+ RenderCounter::destroyCounterNodes(this);
+
if (AXObjectCache::accessibilityEnabled()) {
document()->axObjectCache()->childrenChanged(this->parent());
document()->axObjectCache()->remove(this);
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGElement.cpp
index 41bbba4e48..974bf2a70b 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGElement.cpp
@@ -304,6 +304,15 @@ void SVGElement::attributeChanged(Attribute* attr, bool preserveDecls)
return;
StyledElement::attributeChanged(attr, preserveDecls);
+
+ // When an animated SVG property changes through SVG DOM, svgAttributeChanged() is called, not attributeChanged().
+ // Next time someone tries to access the XML attributes, the synchronization code starts. During that synchronization
+ // SVGAnimatedPropertySynchronizer may call NamedNodeMap::removeAttribute(), which in turn calls attributeChanged().
+ // At this point we're not allowed to call svgAttributeChanged() again - it may lead to extra work being done, or crashes
+ // see bug https://bugs.webkit.org/show_bug.cgi?id=40994.
+ if (m_synchronizingSVGAttributes)
+ return;
+
svgAttributeChanged(attr->name());
}
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFontFaceElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGFontFaceElement.cpp
index 25b3aea61d..de646c6987 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFontFaceElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFontFaceElement.cpp
@@ -59,7 +59,6 @@ SVGFontFaceElement::SVGFontFaceElement(const QualifiedName& tagName, Document* d
SVGFontFaceElement::~SVGFontFaceElement()
{
- removeFromMappedElementSheet();
}
static int cssPropertyIdForSVGAttributeName(const QualifiedName& attrName)
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGForeignObjectElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGForeignObjectElement.cpp
index d28e2a4363..e7b538923b 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGForeignObjectElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGForeignObjectElement.cpp
@@ -125,6 +125,10 @@ RenderObject* SVGForeignObjectElement::createRenderer(RenderArena* arena, Render
bool SVGForeignObjectElement::childShouldCreateRenderer(Node* child) const
{
+ // Disallow arbitary SVG content. Only allow proper <svg xmlns="svgNS"> subdocuments.
+ if (child->isSVGElement())
+ return child->hasTagName(SVGNames::svgTag);
+
// Skip over SVG rules which disallow non-SVG kids
return StyledElement::childShouldCreateRenderer(child);
}
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGSVGElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGSVGElement.cpp
index 4c060084f5..523771580c 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGSVGElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGSVGElement.cpp
@@ -538,6 +538,10 @@ bool SVGSVGElement::isOutermostSVG() const
if (!parentNode())
return true;
+ // We act like an outermost SVG element, if we're a direct child of a <foreignObject> element.
+ if (parentNode()->hasTagName(SVGNames::foreignObjectTag))
+ return true;
+
// This is true whenever this is the outermost SVG, even if there are HTML elements outside it
return !parentNode()->isSVGElement();
}
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp
index 45bab6a75f..57d56e184a 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp
@@ -572,8 +572,8 @@ void SVGUseElement::attach()
void SVGUseElement::detach()
{
- SVGStyledTransformableElement::detach();
m_targetElementInstance = 0;
+ SVGStyledTransformableElement::detach();
}
static bool isDirectReference(Node* n)
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
index cc7b11cf9f..4fe784f69e 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
@@ -959,6 +959,10 @@ void QWebFrame::load(const QNetworkRequest &req,
The \a html is loaded immediately; external objects are loaded asynchronously.
+ If a script in the \a html runs longer than the default script timeout (currently 10 seconds),
+ for example due to being blocked by a modal JavaScript alert dialog, this method will return
+ as soon as possible after the timeout and any subsequent \a html will be loaded asynchronously.
+
When using this method WebKit assumes that external resources such as JavaScript programs or style
sheets are encoded in UTF-8 unless otherwise specified. For example, the encoding of an external
script can be specified through the charset attribute of the HTML script tag. It is also possible
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 63d5568907..b2bff0cc80 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,83 @@
+2009-10-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml()
+
+ This ensures that long-running JavaScript (for example due to a modal alert() dialog),
+ will not trigger a deferred load after only 500ms (the default tokenizer delay) while
+ still giving a reasonable timeout (10 seconds) to prevent deadlock.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29381
+
+ * Api/qwebframe.cpp: Document the behaviour
+ * WebCoreSupport/FrameLoaderClientQt.cpp: set the custom tokenizer delay for substitute loads
+ * tests/qwebframe/tst_qwebframe.cpp: Add test
+
+2010-07-07 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Prevent assertion/duplicate loads for non-deferred subtitute-data loads
+
+ https://bugs.webkit.org/show_bug.cgi?id=30879
+
+ MainResourceLoader uses the member m_initialRequest to store requests for future
+ deferred loads. When doing the actual load in handleDataLoadNow(), we therefore
+ have to clear this request so that subsequent entries into the loader will not
+ start yet another load.
+
+ This can happen as a result of a PageGroupLoadDeferrer going out of scope when
+ returning from Chrome::runJavaScriptAlert(), which calls setDeferredLoading(false),
+ but only in the case of using both substitute-data and non-deferred main resource
+ load together. That's why two new DRT functions were added:
+
+ * queueLoadHTMLString()
+ * setDeferMainResourceLoad()
+
+ The change adds DRT hooks for Mac, Win and Qt for these two functions. For Mac
+ and Win the hook uses new SPI in WebDataSource. For Qt a new static member was
+ added to the FrameLoaderClientQt and accessed though DumpRenderTreeSupportQt.
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::setDeferMainResourceDataLoad):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::createDocumentLoader):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+
+2010-07-23 David Boddie <dboddie@trolltech.com>
+
+ Reviewed by Simon Hausmann.
+
+ Doc: Fixed incorrect QML property type.
+
+ * declarative/qdeclarativewebview.cpp:
+
+2010-07-23 Simon Hausmann <simon.hausmann@nokia.com>
+
+ [Qt] Build fix for Qt apps
+
+ Add webkit to QT_CONFIG. qconfig.pri will read qt_webkit_version.pri and
+ that's how it will pick up webkit in QT_CONFIG.
+
+ * qt_webkit_version.pri:
+
+2010-07-09 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Skip test that never terminates on maemo5
+
+ Due to https://bugs.webkit.org/show_bug.cgi?id=38538
+ the tst_QWebPage::infiniteLoopJS() autotest never terminates.
+ Skip the test so that the test case may run to completion.
+
+ Patch by Dominik Holland <dominik.holland@nokia.com>
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::infiniteLoopJS):
+
2010-07-09 Simon Hausmann <simon.hausmann@nokia.com>
Unreviewed trivial Symbian build fix.
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 686bfccb60..713fa3972d 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -38,6 +38,7 @@
#include "FrameTree.h"
#include "FrameView.h"
#include "DocumentLoader.h"
+#include "JSDOMWindowBase.h"
#include "MIMETypeRegistry.h"
#include "ResourceResponse.h"
#include "Page.h"
@@ -141,6 +142,8 @@ static QString drtDescriptionSuitableForTestResult(const WebCore::ResourceRespon
namespace WebCore
{
+bool FrameLoaderClientQt::deferMainResourceDataLoad = true;
+
FrameLoaderClientQt::FrameLoaderClientQt()
: m_frame(0)
, m_webFrame(0)
@@ -812,8 +815,15 @@ bool FrameLoaderClientQt::shouldFallBack(const WebCore::ResourceError&)
WTF::PassRefPtr<WebCore::DocumentLoader> FrameLoaderClientQt::createDocumentLoader(const WebCore::ResourceRequest& request, const SubstituteData& substituteData)
{
RefPtr<DocumentLoader> loader = DocumentLoader::create(request, substituteData);
- if (substituteData.isValid())
+ if (!deferMainResourceDataLoad || substituteData.isValid()) {
loader->setDeferMainResourceDataLoad(false);
+ // Use the default timeout interval for JS as the HTML tokenizer delay. This ensures
+ // that long-running JavaScript will still allow setHtml() to be synchronous, while
+ // still giving a reasonable timeout to prevent deadlock.
+ double delay = JSDOMWindowBase::commonJSGlobalData()->timeoutChecker.timeoutInterval() / 1000.0f;
+ m_frame->page()->setCustomHTMLTokenizerTimeDelay(delay);
+ } else
+ m_frame->page()->setCustomHTMLTokenizerTimeDelay(-1);
return loader.release();
}
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
index adeb31c8ba..515cf9a00c 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
@@ -211,6 +211,8 @@ namespace WebCore {
QString chooseFile(const QString& oldFile);
+ static bool deferMainResourceDataLoad;
+
private:
Frame *m_frame;
QWebFrame *m_webFrame;
diff --git a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp
index 0342c9f1ab..9dcba6091c 100644
--- a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp
@@ -612,7 +612,7 @@ QAction* QDeclarativeWebView::stopAction() const
#endif // QT_NO_ACTION
/*!
- \qmlproperty real WebView::title
+ \qmlproperty string WebView::title
This property holds the title of the web page currently viewed
By default, this property contains an empty string.
diff --git a/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
index ffd192c315..d8cf06c121 100644
--- a/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
+++ b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
@@ -2,3 +2,4 @@ QT_WEBKIT_VERSION = 4.7.0
QT_WEBKIT_MAJOR_VERSION = 4
QT_WEBKIT_MINOR_VERSION = 7
QT_WEBKIT_PATCH_VERSION = 0
+QT_CONFIG *= webkit
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
index 76fdba336c..e584f97f6f 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -598,6 +598,7 @@ private slots:
void setHtml();
void setHtmlWithResource();
void setHtmlWithBaseURL();
+ void setHtmlWithJSAlert();
void ipv6HostEncoding();
void metaData();
#if !defined(Q_WS_MAEMO_5)
@@ -2485,6 +2486,33 @@ void tst_QWebFrame::setHtmlWithBaseURL()
QCOMPARE(m_view->page()->history()->count(), 0);
}
+class MyPage : public QWebPage
+{
+public:
+ MyPage() : QWebPage(), alerts(0) {}
+ int alerts;
+
+protected:
+ virtual void javaScriptAlert(QWebFrame*, const QString& msg)
+ {
+ alerts++;
+ QCOMPARE(msg, QString("foo"));
+ // Should not be enough to trigger deferred loading, since we've upped the HTML
+ // tokenizer delay in the Qt frameloader. See HTMLTokenizer::continueProcessing()
+ QTest::qWait(1000);
+ }
+};
+
+void tst_QWebFrame::setHtmlWithJSAlert()
+{
+ QString html("<html><head></head><body><script>alert('foo');</script><p>hello world</p></body></html>");
+ MyPage page;
+ m_view->setPage(&page);
+ page.mainFrame()->setHtml(html);
+ QCOMPARE(page.alerts, 1);
+ QCOMPARE(m_view->page()->mainFrame()->toHtml(), html);
+}
+
class TestNetworkManager : public QNetworkAccessManager
{
public:
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 0f2ca22aae..b7ffb8a60c 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -219,6 +219,9 @@ public slots:
void tst_QWebPage::infiniteLoopJS()
{
+#ifdef Q_WS_MAEMO_5
+ QSKIP("Test never terminates on Maemo 5 : https://bugs.webkit.org/show_bug.cgi?id=38538", SkipAll);
+#endif
JSTestPage* newPage = new JSTestPage(m_view);
m_view->setPage(newPage);
m_view->setHtml(QString("<html><bodytest</body></html>"), QUrl());
diff --git a/src/corelib/concurrent/qtconcurrentexception.cpp b/src/corelib/concurrent/qtconcurrentexception.cpp
index e7f4674ce6..fad04a692a 100644
--- a/src/corelib/concurrent/qtconcurrentexception.cpp
+++ b/src/corelib/concurrent/qtconcurrentexception.cpp
@@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE
the Qt Concurrent functions will throw a QtConcurrent::UnhandledException
in the receiver thread.
- When using QFuture, transferred exceptions willl be thrown when calling the following functions:
+ When using QFuture, transferred exceptions will be thrown when calling the following functions:
\list
\o QFuture::waitForFinished()
\o QFuture::result()
diff --git a/src/corelib/concurrent/qtconcurrentmap.cpp b/src/corelib/concurrent/qtconcurrentmap.cpp
index 39a13fb663..e74d69c5e4 100644
--- a/src/corelib/concurrent/qtconcurrentmap.cpp
+++ b/src/corelib/concurrent/qtconcurrentmap.cpp
@@ -70,7 +70,7 @@
\value UnorderedReduce Reduction is done in an arbitrary order.
\value OrderedReduce Reduction is done in the order of the
original sequence.
- \value SequentialReduce Reduction is done sequentally: only one
+ \value SequentialReduce Reduction is done sequentially: only one
thread will enter the reduce function at a time. (Parallel reduction
might be supported in a future version of Qt Concurrent.)
*/
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index 00cb83686e..10666b48ae 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -66,6 +66,21 @@ sse {
sse2 {
DEFINES += QT_HAVE_SSE2
}
+sse3 {
+ DEFINES += QT_HAVE_SSE3
+}
+ssse3 {
+ DEFINES += QT_HAVE_SSSE3
+}
+sse4_1 {
+ DEFINES += QT_HAVE_SSE4_1
+}
+sse4_2 {
+ DEFINES += QT_HAVE_SSE4_2
+}
+avx {
+ DEFINES += QT_HAVE_AVX
+}
iwmmxt {
DEFINES += QT_HAVE_IWMMXT
}
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 7aee29b515..d07ae4a733 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -2383,7 +2383,7 @@ void qDebug(const char *msg, ...)
This syntax inserts a space between each item, and
appends a newline at the end.
- To supress the output at runtime, install your own message handler
+ To suppress the output at runtime, install your own message handler
with qInstallMsgHandler().
\sa qDebug(), qCritical(), qFatal(), qInstallMsgHandler(),
@@ -2419,7 +2419,7 @@ void qWarning(const char *msg, ...)
A space is inserted between the items, and a newline is
appended at the end.
- To supress the output at runtime, install your own message handler
+ To suppress the output at runtime, install your own message handler
with qInstallMsgHandler().
\sa qDebug(), qWarning(), qFatal(), qInstallMsgHandler(),
@@ -2484,7 +2484,7 @@ void qErrnoWarning(int code, const char *msg, ...)
Example:
\snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 30
- To supress the output at runtime, install your own message handler
+ To suppress the output at runtime, install your own message handler
with qInstallMsgHandler().
\sa qDebug(), qCritical(), qWarning(), qInstallMsgHandler(),
@@ -2615,55 +2615,6 @@ void qsrand(uint seed)
#endif
}
-/*! \internal
- \relates <QtGlobal>
- \since 4.6
-
- Seed the PRNG, but only if it has not already been seeded.
-
- The default seed is a combination of current time, a stack address and a
- serial counter (since thread stack addresses are re-used).
-*/
-void qsrand()
-{
-#if (defined(Q_OS_UNIX) || defined(Q_OS_WIN)) && !defined(QT_NO_THREAD)
- SeedStorage *seedStorage = randTLS();
- if (seedStorage) {
- SeedStorageType *pseed = seedStorage->localData();
- if (pseed) {
- // already seeded
- return;
- }
- seedStorage->setLocalData(pseed = new SeedStorageType);
- // start beyond 1 to avoid the sequence reset
- static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(2);
- *pseed = QDateTime::currentDateTime().toTime_t()
- + quintptr(&pseed)
- + serial.fetchAndAddRelaxed(1);
-#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
- // for Windows and Symbian the srand function must still be called.
- srand(*pseed);
-#endif
- }
-
-//QT_NO_THREAD implementations
-#else
- static unsigned int seed = 0;
-
- if (seed)
- return;
-
-#if defined(Q_OS_SYMBIAN)
- seed = Math::Random();
-#elif defined(Q_OS_WIN)
- seed = GetTickCount();
-#else
- seed = quintptr(&seed) + QDateTime::currentDateTime().toTime_t();
-#endif
- srand(seed);
-#endif // defined(Q_OS_UNIX) || defined(Q_OS_WIN)) && !defined(QT_NO_THREAD)
-}
-
/*!
\relates <QtGlobal>
\since 4.2
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 59b2a349ef..f4ecc7372b 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -1279,6 +1279,11 @@ class QDataStream;
# else
# define Q_COMPAT_EXPORT Q_DECL_IMPORT
# endif
+# if defined(QT_BUILD_DBUS_LIB)
+# define Q_DBUS_EXPORT Q_DECL_EXPORT
+# else
+# define Q_DBUS_EXPORT Q_DECL_IMPORT
+# endif
# define Q_TEMPLATEDLL
# elif defined(QT_DLL) /* use a Qt DLL library */
# define Q_CORE_EXPORT Q_DECL_IMPORT
@@ -1296,6 +1301,7 @@ class QDataStream;
# define Q_SCRIPT_EXPORT Q_DECL_IMPORT
# define Q_SCRIPTTOOLS_EXPORT Q_DECL_IMPORT
# define Q_COMPAT_EXPORT Q_DECL_IMPORT
+# define Q_DBUS_EXPORT Q_DECL_IMPORT
# define Q_TEMPLATEDLL
# endif
# define Q_NO_DECLARED_NOT_DEFINED
@@ -1324,6 +1330,7 @@ class QDataStream;
# define Q_SCRIPT_EXPORT Q_DECL_EXPORT
# define Q_SCRIPTTOOLS_EXPORT Q_DECL_EXPORT
# define Q_COMPAT_EXPORT Q_DECL_EXPORT
+# define Q_DBUS_EXPORT Q_DECL_EXPORT
# else
# define Q_CORE_EXPORT
# define Q_GUI_EXPORT
@@ -1338,6 +1345,7 @@ class QDataStream;
# define Q_SCRIPT_EXPORT
# define Q_SCRIPTTOOLS_EXPORT
# define Q_COMPAT_EXPORT
+# define Q_DBUS_EXPORT
# endif
#endif
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 6edadc5b3c..aba3c32742 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -90,6 +90,9 @@ Qt {
Q_ENUMS(InputMethodHint)
Q_FLAGS(WindowFlags WindowStates InputMethodHints)
Q_ENUMS(ConnectionType)
+#ifndef QT_NO_GESTURES
+ Q_ENUMS(GestureState)
+#endif
#endif // (defined(Q_MOC_RUN) || defined(QT_JAMBI_RUN))
#if defined(Q_MOC_RUN)
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index ed2ae6ef13..5cd7f0e35d 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -470,6 +470,7 @@
\value TextIncludeTrailingSpaces Same as IncludeTrailingSpaces
\value TextJustificationForced Ensures that text lines are justified.
+ \omitvalue TextBypassShaping
\omitvalue BreakAnywhere
\omitvalue DontClip
\omitvalue DontPrint
@@ -1730,7 +1731,7 @@
\value Key_MediaLast
\value Key_unknown
- \value Key_Call A key to answer or initiate a call (see \l Key_ToggleCallHangup for a key to toggle current call state)
+ \value Key_Call A key to answer or initiate a call (see Qt::Key_ToggleCallHangup for a key to toggle current call state)
\value Key_Camera A key to activate the camera shutter
\value Key_CameraFocus A key to focus the camera
\value Key_Context1
@@ -1738,7 +1739,7 @@
\value Key_Context3
\value Key_Context4
\value Key_Flip
- \value Key_Hangup A key to end an ongoing call (see \l Key_ToggleCallHangup for a key to toggle current call state)
+ \value Key_Hangup A key to end an ongoing call (see Qt::Key_ToggleCallHangup for a key to toggle current call state)
\value Key_No
\value Key_Select
\value Key_Yes
diff --git a/src/corelib/io/qabstractfileengine.cpp b/src/corelib/io/qabstractfileengine.cpp
index e239ee99f3..d6b6f1136b 100644
--- a/src/corelib/io/qabstractfileengine.cpp
+++ b/src/corelib/io/qabstractfileengine.cpp
@@ -818,7 +818,7 @@ bool QAbstractFileEngine::unmap(uchar *address)
You can call dirName() to get the directory name, nameFilters() to get a
stringlist of name filters, and filters() to get the entry filters.
- The pure virual function hasNext() returns true if the current directory
+ The pure virtual function hasNext() returns true if the current directory
has at least one more entry (i.e., the directory name is valid and
accessible, and we have not reached the end of the entry list), and false
otherwise. Reimplement next() to seek to the next entry.
@@ -828,7 +828,7 @@ bool QAbstractFileEngine::unmap(uchar *address)
function is provided for convenience; it returns the full path of the
current entry.
- Here is an example of how to implement an interator that returns each of
+ Here is an example of how to implement an iterator that returns each of
three fixed entries in sequence.
\snippet doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp 3
@@ -959,7 +959,7 @@ QString QAbstractFileEngineIterator::currentFilePath() const
/*!
The virtual function returns a QFileInfo for the current directory
entry. This function is provided for convenience. It can also be slightly
- faster that creating a QFileInfo object yourself, as the object returned
+ faster than creating a QFileInfo object yourself, as the object returned
by this function might contain cached information that QFileInfo otherwise
would have to access through the file engine.
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index 9464a9765c..d83f7eec45 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -1023,7 +1023,7 @@ QString QFSFileEngine::fileName(FileName file) const
#if !defined(QWS) && defined(Q_OS_MAC)
QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, QCFString(d->filePath),
kCFURLPOSIXPathStyle, true);
- if (CFDictionaryRef dict = CFBundleCopyInfoDictionaryForURL(url)) {
+ if (QCFType<CFDictionaryRef> dict = CFBundleCopyInfoDictionaryForURL(url)) {
if (CFTypeRef name = (CFTypeRef)CFDictionaryGetValue(dict, kCFBundleNameKey)) {
if (CFGetTypeID(name) == CFStringGetTypeID())
return QCFString::toQString((CFStringRef)name);
@@ -1141,7 +1141,7 @@ QString QFSFileEngine::fileName(FileName file) const
if (FSResolveAliasFile(&fref, true, &isFolder, &isAlias) == noErr && isAlias) {
AliasHandle alias;
if (FSNewAlias(0, &fref, &alias) == noErr && alias) {
- CFStringRef cfstr;
+ QCFString cfstr;
if (FSCopyAliasInfo(alias, 0, 0, &cfstr, 0, 0) == noErr)
return QCFString::toQString(cfstr);
}
diff --git a/src/corelib/io/qiodevice_p.h b/src/corelib/io/qiodevice_p.h
index 4a25562605..1dd51ea8b2 100644
--- a/src/corelib/io/qiodevice_p.h
+++ b/src/corelib/io/qiodevice_p.h
@@ -155,10 +155,10 @@ public:
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;
+ memcpy(first, block, size);
}
private:
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index 9bc406362f..739ac4dbd4 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -1399,10 +1399,10 @@ QString QProcess::nativeArguments() const
\since 4.7
\overload
- Sets additional native command line arguments for the program.
+ Sets additional native command line \a arguments for the program.
On operating systems where the system API for passing command line
- arguments to a subprocess natively uses a single string, one can
+ \a arguments to a subprocess natively uses a single string, one can
conceive command lines which cannot be passed via QProcess's portable
list-based API. In such cases this function must be used to set a
string which is \e appended to the string composed from the usual
diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp
index b1c403fb5c..eab06622f6 100644
--- a/src/corelib/io/qtextstream.cpp
+++ b/src/corelib/io/qtextstream.cpp
@@ -1991,7 +1991,7 @@ bool QTextStreamPrivate::getReal(double *f)
return true;
buf[i] = '\0';
- // backward-compatibility. Old implmentation supported +nan/-nan
+ // backward-compatibility. Old implementation supported +nan/-nan
// for some reason. QLocale only checks for lower-case
// nan/+inf/-inf, so here we also check for uppercase and mixed
// case versions.
diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp
index 84152591da..e3fce1809e 100644
--- a/src/corelib/kernel/qabstractitemmodel.cpp
+++ b/src/corelib/kernel/qabstractitemmodel.cpp
@@ -1197,7 +1197,7 @@ void QAbstractItemModelPrivate::columnsRemoved(const QModelIndex &parent,
\l{QAbstractItemModel::}{endInsertRows()} must be called.
\sa {Model Classes}, {Model Subclassing Reference}, QModelIndex,
- QAbstractItemView, {Using Drag and Drop with Item Views},
+ QAbstractItemView, {Using drag & drop with item views},
{Simple DOM Model Example}, {Simple Tree Model Example},
{Editable Tree Model Example}, {Fetch More Example}
*/
@@ -1761,7 +1761,7 @@ QMimeData *QAbstractItemModel::mimeData(const QModelIndexList &indexes) const
where to place the data. This can occur in a tree when data is dropped on
a parent. Models will usually append the data to the parent in this case.
- \sa supportedDropActions(), {Using Drag and Drop with Item Views}
+ \sa supportedDropActions(), {Using drag & drop with item views}
*/
bool QAbstractItemModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
int row, int column, const QModelIndex &parent)
@@ -1798,8 +1798,8 @@ bool QAbstractItemModel::dropMimeData(const QMimeData *data, Qt::DropAction acti
reimplement the dropMimeData() function to handle the additional
operations.
- \sa dropMimeData(), Qt::DropActions, {Using Drag and Drop with Item
- Views}
+ \sa dropMimeData(), Qt::DropActions, {Using drag & drop with item
+ views}
*/
Qt::DropActions QAbstractItemModel::supportedDropActions() const
{
@@ -1815,7 +1815,7 @@ Qt::DropActions QAbstractItemModel::supportedDropActions() const
supportedDragActions() is used by QAbstractItemView::startDrag() as the
default values when a drag occurs.
- \sa Qt::DropActions, {Using Drag and Drop with Item Views}
+ \sa Qt::DropActions, {Using drag & drop with item views}
*/
Qt::DropActions QAbstractItemModel::supportedDragActions() const
{
@@ -1831,7 +1831,7 @@ Qt::DropActions QAbstractItemModel::supportedDragActions() const
Sets the supported drag \a actions for the items in the model.
- \sa supportedDragActions(), {Using Drag and Drop with Item Views}
+ \sa supportedDragActions(), {Using drag & drop with item views}
*/
void QAbstractItemModel::setSupportedDragActions(Qt::DropActions actions)
{
@@ -2547,7 +2547,7 @@ bool QAbstractItemModelPrivate::allowMove(const QModelIndex &srcParent, int star
For example, as shown in the diagram, we move three rows from
row 2 to 4 in the source, so \a sourceFirst is 2 and \a sourceLast is 4.
- We move those items to above row 2 in the destination, so \a destinationRow is 2.
+ We move those items to above row 2 in the destination, so \a destinationChild is 2.
\snippet doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp 6
@@ -2558,7 +2558,7 @@ bool QAbstractItemModelPrivate::allowMove(const QModelIndex &srcParent, int star
\o To append rows to another parent, move them to after the last row.
For example, as shown in the diagram, we move three rows to a
- collection of 6 existing rows (ending in row 5), so \a destinationStart is 6:
+ collection of 6 existing rows (ending in row 5), so \a destinationChild is 6:
\snippet doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp 7
diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp
index 9c1c827c43..8390275bb7 100644
--- a/src/corelib/kernel/qeventdispatcher_glib.cpp
+++ b/src/corelib/kernel/qeventdispatcher_glib.cpp
@@ -504,7 +504,7 @@ void QEventDispatcherGlib::registerTimer(int timerId, int interval, QObject *obj
{
#ifndef QT_NO_DEBUG
if (timerId < 1 || interval < 0 || !object) {
- qWarning("QEventDispatcherUNIX::registerTimer: invalid arguments");
+ qWarning("QEventDispatcherGlib::registerTimer: invalid arguments");
return;
} else if (object->thread() != thread() || thread() != QThread::currentThread()) {
qWarning("QObject::startTimer: timers cannot be started from another thread");
@@ -520,7 +520,7 @@ bool QEventDispatcherGlib::unregisterTimer(int timerId)
{
#ifndef QT_NO_DEBUG
if (timerId < 1) {
- qWarning("QEventDispatcherUNIX::unregisterTimer: invalid argument");
+ qWarning("QEventDispatcherGlib::unregisterTimer: invalid argument");
return false;
} else if (thread() != QThread::currentThread()) {
qWarning("QObject::killTimer: timers cannot be stopped from another thread");
@@ -536,7 +536,7 @@ bool QEventDispatcherGlib::unregisterTimers(QObject *object)
{
#ifndef QT_NO_DEBUG
if (!object) {
- qWarning("QEventDispatcherUNIX::unregisterTimers: invalid argument");
+ qWarning("QEventDispatcherGlib::unregisterTimers: invalid argument");
return false;
} else if (object->thread() != thread() || thread() != QThread::currentThread()) {
qWarning("QObject::killTimers: timers cannot be stopped from another thread");
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
index 2a52044d8e..1bad8ed961 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
+++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp
@@ -423,7 +423,7 @@ void QSelectThread::run()
// ones that return -1 in select
// after loop update notifiers for all of them
- // as we dont have "exception" notifier type
+ // as we don't have "exception" notifier type
// we should force monitoring fd_set of this
// type as well
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index 6ebaaa36dc..fef02cfe41 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -1415,7 +1415,7 @@ void QMetaType::destroy(int type, void *data)
\snippet doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp 4
- This function is usefull to register typedefs so they can be used
+ This function is useful to register typedefs so they can be used
by QMetaProperty, or in QueuedConnections
\snippet doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp 9
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp
index 9332bbcf7c..6c1b6e71bc 100644
--- a/src/corelib/plugin/quuid.cpp
+++ b/src/corelib/plugin/quuid.cpp
@@ -578,11 +578,10 @@ QUuid QUuid::createUuid()
QT_BEGIN_INCLUDE_NAMESPACE
#include "qdatetime.h"
#include "qfile.h"
-#include "stdlib.h" // For srand/rand
+#include "qthreadstorage.h"
+#include <stdlib.h> // for RAND_MAX
QT_END_INCLUDE_NAMESPACE
-extern void qsrand(); // in qglobal.cpp
-
QUuid QUuid::createUuid()
{
QUuid result;
@@ -600,12 +599,32 @@ QUuid QUuid::createUuid()
static const int intbits = sizeof(int)*8;
static int randbits = 0;
if (!randbits) {
+ int r = 0;
int max = RAND_MAX;
- do { ++randbits; } while ((max=max>>1));
+ do { ++r; } while ((max=max>>1));
+ randbits = r;
}
- // reseed, but only if not already seeded
- qsrand();
+ // Seed the PRNG once per thread with a combination of current time, a
+ // stack address and a serial counter (since thread stack addresses are
+ // re-used).
+#ifndef QT_BOOTSTRAPPED
+ static QThreadStorage<int *> uuidseed;
+ if (!uuidseed.hasLocalData())
+ {
+ int *pseed = new int;
+ static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(2);
+ qsrand(*pseed = QDateTime::currentDateTime().toTime_t()
+ + quintptr(&pseed)
+ + serial.fetchAndAddRelaxed(1));
+ uuidseed.setLocalData(pseed);
+ }
+#else
+ static bool seeded = false;
+ if (!seeded)
+ qsrand(QDateTime::currentDateTime().toTime_t()
+ + quintptr(&seeded));
+#endif
int chunks = 16 / sizeof(uint);
while (chunks--) {
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index b46af1f483..8d38e4c855 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -1809,7 +1809,7 @@ QByteArray &QByteArray::replace(int pos, int len, const QByteArray &after)
Replaces \a len bytes from index position \a pos with the zero terminated
string \a after.
- Notice: this can change the lenght of the byte array.
+ Notice: this can change the length of the byte array.
*/
QByteArray &QByteArray::replace(int pos, int len, const char *after)
{
@@ -2152,18 +2152,18 @@ QByteArray QByteArray::repeated(int times) const
if (result.d->alloc != resultSize)
return QByteArray(); // not enough memory
- qMemCopy(result.d->data, d->data, d->size);
+ memcpy(result.d->data, d->data, d->size);
int sizeSoFar = d->size;
char *end = result.d->data + sizeSoFar;
const int halfResultSize = resultSize >> 1;
while (sizeSoFar <= halfResultSize) {
- qMemCopy(end, result.d->data, sizeSoFar);
+ memcpy(end, result.d->data, sizeSoFar);
end += sizeSoFar;
sizeSoFar <<= 1;
}
- qMemCopy(end, result.d->data, resultSize - sizeSoFar);
+ memcpy(end, result.d->data, resultSize - sizeSoFar);
result.d->data[resultSize] = '\0';
result.d->size = resultSize;
return result;
diff --git a/src/corelib/tools/qbytearraymatcher.cpp b/src/corelib/tools/qbytearraymatcher.cpp
index d5a59c94a8..f8504f0cbf 100644
--- a/src/corelib/tools/qbytearraymatcher.cpp
+++ b/src/corelib/tools/qbytearraymatcher.cpp
@@ -171,7 +171,7 @@ QByteArrayMatcher::~QByteArrayMatcher()
QByteArrayMatcher &QByteArrayMatcher::operator=(const QByteArrayMatcher &other)
{
q_pattern = other.q_pattern;
- qMemCopy(&p, &other.p, sizeof(p));
+ memcpy(&p, &other.p, sizeof(p));
return *this;
}
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index a51ee81023..6b1de5ef0e 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -2096,6 +2096,7 @@ QDataStream &operator>>(QDataStream &ds, QLocale &l)
\value Serbia
\value SaintBarthelemy
\value SaintMartin
+ \value LatinAmericaAndTheCaribbean
\omitvalue LastCountry
\sa country()
diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp
index 1b4b356a8a..f1025987d8 100644
--- a/src/corelib/tools/qsharedpointer.cpp
+++ b/src/corelib/tools/qsharedpointer.cpp
@@ -482,7 +482,7 @@
becomes managed by this QSharedPointer and must not be passed to
another QSharedPointer object or deleted outside this object.
- The \a deleter paramter specifies the custom deleter for this
+ The \a deleter parameter specifies the custom deleter for this
object. The custom deleter is called when the strong reference
count drops to 0 instead of the operator delete(). This is useful,
for instance, for calling deleteLater() in a QObject instead:
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index 550ff58008..4cce33941b 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -324,12 +324,17 @@ namespace QtSharedPointer {
typedef ExternalRefCountData Data;
inline void ref() const { d->weakref.ref(); d->strongref.ref(); }
- inline bool deref()
+ inline void deref()
+ { deref(d, this->value); }
+ static inline void deref(Data *d, T *value)
{
+ if (!d) return;
if (!d->strongref.deref()) {
- internalDestroy();
+ if (!d->destroy())
+ delete value;
}
- return d->weakref.deref();
+ if (!d->weakref.deref())
+ delete d;
}
inline void internalConstruct(T *ptr)
@@ -378,7 +383,7 @@ namespace QtSharedPointer {
template <class X>
inline ExternalRefCount(const ExternalRefCount<X> &other) : Basic<T>(other.value), d(other.d)
{ if (d) ref(); }
- inline ~ExternalRefCount() { if (d && !deref()) delete d; }
+ inline ~ExternalRefCount() { deref(); }
template <class X>
inline void internalCopy(const ExternalRefCount<X> &other)
@@ -386,12 +391,6 @@ namespace QtSharedPointer {
internalSet(other.d, other.data());
}
- inline void internalDestroy()
- {
- if (!d->destroy())
- delete this->value;
- }
-
inline void internalSwap(ExternalRefCount &other)
{
qSwap(d, other.d);
@@ -424,10 +423,14 @@ namespace QtSharedPointer {
else
o = 0;
}
- if (d && !deref())
- delete d;
- d = o;
- this->value = d && d->strongref ? actual : 0;
+
+ qSwap(d, o);
+ qSwap(this->value, actual);
+ if (!d || d->strongref == 0)
+ this->value = 0;
+
+ // dereference saved data
+ deref(o, actual);
}
Data *d;
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp
index 11357b3b71..fcc8dd7f67 100644
--- a/src/corelib/tools/qsimd.cpp
+++ b/src/corelib/tools/qsimd.cpp
@@ -46,6 +46,10 @@
#include <windows.h>
#endif
+#if defined(Q_OS_WIN64) && !defined(Q_CC_GNU)
+#include <intrin.h>
+#endif
+
QT_BEGIN_NAMESPACE
uint qDetectCPUFeatures()
@@ -96,6 +100,7 @@ uint qDetectCPUFeatures()
features = MMX|SSE|SSE2;
#elif defined(__i386__) || defined(_M_IX86)
unsigned int extended_result = 0;
+ unsigned int feature_result = 0;
uint result = 0;
/* see p. 118 of amd64 instruction set manual Vol3 */
#if defined(Q_CC_GNU)
@@ -117,7 +122,8 @@ uint qDetectCPUFeatures()
"1:\n"
"pop %%ebx\n"
"mov %%edx, %0\n"
- : "=r" (result)
+ "mov %%ecx, %1\n"
+ : "=r" (result), "=r" (feature_result)
:
: "%eax", "%ecx", "%edx"
);
@@ -169,6 +175,7 @@ uint qDetectCPUFeatures()
mov eax, 1
cpuid
mov result, edx
+ mov feature_result, ecx
skip:
pop edx
pop ecx
@@ -223,8 +230,65 @@ uint qDetectCPUFeatures()
features |= SSE;
if (result & (1u << 26))
features |= SSE2;
+ if (feature_result & (1u))
+ features |= SSE3;
+ if (feature_result & (1u << 9))
+ features |= SSSE3;
+ if (feature_result & (1u << 19))
+ features |= SSE4_1;
+ if (feature_result & (1u << 20))
+ features |= SSE4_2;
+ if (feature_result & (1u << 28))
+ features |= AVX;
+
#endif // i386
+#if defined(__x86_64__) || defined(Q_OS_WIN64)
+ uint feature_result = 0;
+
+#if defined(Q_CC_GNU)
+ asm ("push %%rbx\n"
+ "pushf\n"
+ "pop %%rax\n"
+ "mov %%eax, %%ebx\n"
+ "xor $0x00200000, %%eax\n"
+ "push %%rax\n"
+ "popf\n"
+ "pushf\n"
+ "pop %%rax\n"
+ "xor %%edx, %%edx\n"
+ "xor %%ebx, %%eax\n"
+ "jz 1f\n"
+
+ "mov $0x00000001, %%eax\n"
+ "cpuid\n"
+ "1:\n"
+ "pop %%rbx\n"
+ "mov %%ecx, %0\n"
+ : "=r" (feature_result)
+ :
+ : "%eax", "%ecx", "%edx"
+ );
+#elif defined (Q_OS_WIN64)
+ {
+ int info[4];
+ __cpuid(info, 1);
+ feature_result = info[2];
+ }
+#endif
+
+ if (feature_result & (1u))
+ features |= SSE3;
+ if (feature_result & (1u << 9))
+ features |= SSSE3;
+ if (feature_result & (1u << 19))
+ features |= SSE4_1;
+ if (feature_result & (1u << 20))
+ features |= SSE4_2;
+ if (feature_result & (1u << 28))
+ features |= AVX;
+#endif // x86_64
+
#if defined(QT_HAVE_MMX)
if (qgetenv("QT_NO_MMX").toInt())
features ^= MMX;
diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h
index 0ed9d5df14..5ff0f9778a 100644
--- a/src/corelib/tools/qsimd_p.h
+++ b/src/corelib/tools/qsimd_p.h
@@ -72,6 +72,27 @@ QT_BEGIN_HEADER
# include <emmintrin.h>
#endif
+// SSE3 intrinsics
+#if defined(QT_HAVE_SSE3) && (defined(__SSE3__) || defined(Q_CC_MSVC))
+#include <pmmintrin.h>
+#endif
+
+// SSSE3 intrinsics
+#if defined(QT_HAVE_SSSE3) && (defined(__SSSE3__) || defined(Q_CC_MSVC))
+#include <tmmintrin.h>
+#endif
+
+// SSE4.1 and SSE4.2 intrinsics
+#if (defined(QT_HAVE_SSE4_1) || defined(QT_HAVE_SSE4_2)) && (defined(__SSE4_1__) || defined(Q_CC_MSVC))
+#include <smmintrin.h>
+#endif
+
+// AVX intrinsics
+#if defined(QT_HAVE_AVX) && (defined(__AVX__) || defined(Q_CC_MSVC))
+#include <immintrin.h>
+#endif
+
+
#if !defined(QT_BOOTSTRAPPED) && (!defined(Q_CC_MSVC) || (defined(_M_X64) || _M_IX86_FP == 2))
#define QT_ALWAYS_HAVE_SSE2
#endif
@@ -119,7 +140,12 @@ enum CPUFeatures {
SSE2 = 0x20,
CMOV = 0x40,
IWMMXT = 0x80,
- NEON = 0x100
+ NEON = 0x100,
+ SSE3 = 0x200,
+ SSSE3 = 0x400,
+ SSE4_1 = 0x800,
+ SSE4_2 = 0x1000,
+ AVX = 0x2000
};
Q_CORE_EXPORT uint qDetectCPUFeatures();
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 57f79a0f2f..d6ab5da023 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -69,6 +69,10 @@
#include <winnls.h>
#endif
+#ifdef Q_OS_SYMBIAN
+#include <e32cmn.h>
+#endif
+
#include <limits.h>
#include <string.h>
#include <stdlib.h>
@@ -6156,18 +6160,18 @@ QString QString::repeated(int times) const
if (result.d->alloc != resultSize)
return QString(); // not enough memory
- qMemCopy(result.d->data, d->data, d->size * sizeof(ushort));
+ memcpy(result.d->data, d->data, d->size * sizeof(ushort));
int sizeSoFar = d->size;
ushort *end = result.d->data + sizeSoFar;
const int halfResultSize = resultSize >> 1;
while (sizeSoFar <= halfResultSize) {
- qMemCopy(end, result.d->data, sizeSoFar * sizeof(ushort));
+ memcpy(end, result.d->data, sizeSoFar * sizeof(ushort));
end += sizeSoFar;
sizeSoFar <<= 1;
}
- qMemCopy(end, result.d->data, (resultSize - sizeSoFar) * sizeof(ushort));
+ memcpy(end, result.d->data, (resultSize - sizeSoFar) * sizeof(ushort));
result.d->data[resultSize] = '\0';
result.d->size = resultSize;
return result;
@@ -6954,7 +6958,7 @@ bool QString::isRightToLeft() const
/*! \fn bool QString::isRightToLeft() const
- \internal
+ Returns true if the string is read right to left.
*/
diff --git a/src/corelib/tools/qstringmatcher.cpp b/src/corelib/tools/qstringmatcher.cpp
index ff136247ee..80a8457b70 100644
--- a/src/corelib/tools/qstringmatcher.cpp
+++ b/src/corelib/tools/qstringmatcher.cpp
@@ -208,7 +208,7 @@ QStringMatcher &QStringMatcher::operator=(const QStringMatcher &other)
if (this != &other) {
q_pattern = other.q_pattern;
q_cs = other.q_cs;
- qMemCopy(q_data, other.q_data, sizeof(q_data));
+ memcpy(q_data, other.q_data, sizeof(q_data));
}
return *this;
}
diff --git a/src/corelib/tools/qtextboundaryfinder.cpp b/src/corelib/tools/qtextboundaryfinder.cpp
index bcddcb2010..0428782ec7 100644
--- a/src/corelib/tools/qtextboundaryfinder.cpp
+++ b/src/corelib/tools/qtextboundaryfinder.cpp
@@ -244,7 +244,7 @@ QTextBoundaryFinder::QTextBoundaryFinder(BoundaryType type, const QString &strin
data required, it will use this instead of allocating its own buffer.
\warning QTextBoundaryFinder does not create a copy of \a chars. It is the
- application programmer's responsability to ensure the array is allocated for
+ application programmer's responsibility to ensure the array is allocated for
as long as the QTextBoundaryFinder object stays alive. The same applies to
\a buffer.
*/
diff --git a/src/dbus/dbus.pro b/src/dbus/dbus.pro
index 7c59808880..46a723a56c 100644
--- a/src/dbus/dbus.pro
+++ b/src/dbus/dbus.pro
@@ -3,7 +3,7 @@ QPRO_PWD = $$PWD
QT = core \
xml
CONFIG += link_pkgconfig
-DEFINES += QDBUS_MAKEDLL \
+DEFINES += QT_BUILD_DBUS_LIB \
DBUS_API_SUBJECT_TO_CHANGE
QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS
contains(QT_CONFIG, dbus-linked) {
diff --git a/src/dbus/qdbusabstractadaptor.h b/src/dbus/qdbusabstractadaptor.h
index fa64aef966..af5a3cec61 100644
--- a/src/dbus/qdbusabstractadaptor.h
+++ b/src/dbus/qdbusabstractadaptor.h
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(DBus)
class QDBusAbstractAdaptorPrivate;
-class QDBUS_EXPORT QDBusAbstractAdaptor: public QObject
+class Q_DBUS_EXPORT QDBusAbstractAdaptor: public QObject
{
Q_OBJECT
protected:
diff --git a/src/dbus/qdbusabstractinterface.h b/src/dbus/qdbusabstractinterface.h
index 44f79a1ed9..177af6751c 100644
--- a/src/dbus/qdbusabstractinterface.h
+++ b/src/dbus/qdbusabstractinterface.h
@@ -64,7 +64,7 @@ class QDBusPendingCall;
class QDBusAbstractInterfacePrivate;
-class QDBUS_EXPORT QDBusAbstractInterfaceBase: public QObject
+class Q_DBUS_EXPORT QDBusAbstractInterfaceBase: public QObject
{
public:
int qt_metacall(QMetaObject::Call, int, void**);
@@ -74,7 +74,7 @@ private:
Q_DECLARE_PRIVATE(QDBusAbstractInterface)
};
-class QDBUS_EXPORT QDBusAbstractInterface:
+class Q_DBUS_EXPORT QDBusAbstractInterface:
#ifdef Q_QDOC
public QObject
#else
diff --git a/src/dbus/qdbusargument.h b/src/dbus/qdbusargument.h
index 73558b6beb..30f2cdabb8 100644
--- a/src/dbus/qdbusargument.h
+++ b/src/dbus/qdbusargument.h
@@ -64,7 +64,7 @@ QT_MODULE(DBus)
class QDBusArgumentPrivate;
class QDBusDemarshaller;
class QDBusMarshaller;
-class QDBUS_EXPORT QDBusArgument
+class Q_DBUS_EXPORT QDBusArgument
{
public:
enum ElementType {
@@ -184,43 +184,43 @@ template<> inline QVariant qdbus_cast<QVariant>(const QVariant &v, QVariant *)
return qdbus_cast<QDBusVariant>(v).variant();
}
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QVariant &v);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QVariant &v);
// QVariant types
#ifndef QDBUS_NO_SPECIALTYPES
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QDate &date);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QDate &date);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QDate &date);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QDate &date);
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QTime &time);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QTime &time);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QTime &time);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QTime &time);
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QDateTime &dt);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QDateTime &dt);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QDateTime &dt);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QDateTime &dt);
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QRect &rect);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QRect &rect);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QRect &rect);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QRect &rect);
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QRectF &rect);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QRectF &rect);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QRectF &rect);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QRectF &rect);
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QSize &size);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QSize &size);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QSize &size);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QSize &size);
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QSizeF &size);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QSizeF &size);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QSizeF &size);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QSizeF &size);
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QPoint &pt);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QPoint &pt);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QPoint &pt);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QPoint &pt);
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QPointF &pt);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QPointF &pt);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QPointF &pt);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QPointF &pt);
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QLine &line);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QLine &line);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QLine &line);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QLine &line);
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QLineF &line);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QLineF &line);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QLineF &line);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QLineF &line);
#endif
template<template <typename> class Container, typename T>
diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp
index 4382032c82..5cbb8ca822 100644
--- a/src/dbus/qdbusconnection.cpp
+++ b/src/dbus/qdbusconnection.cpp
@@ -125,7 +125,7 @@ QDBusConnectionManager::~QDBusConnectionManager()
connectionHash.clear();
}
-QDBUS_EXPORT void qDBusBindToApplication();
+Q_DBUS_EXPORT void qDBusBindToApplication();
void qDBusBindToApplication()
{
}
@@ -916,7 +916,7 @@ QString QDBusConnection::name() const
/*!
Attempts to register the \a serviceName on the D-Bus server and
- returns true if the registration succeded. The registration will
+ returns true if the registration succeeded. The registration will
fail if the name is already registered by another application.
\sa unregisterService(), QDBusConnectionInterface::registerService()
diff --git a/src/dbus/qdbusconnection.h b/src/dbus/qdbusconnection.h
index a8ca551689..eedda16958 100644
--- a/src/dbus/qdbusconnection.h
+++ b/src/dbus/qdbusconnection.h
@@ -72,7 +72,7 @@ class QDBusConnectionInterface;
class QObject;
class QDBusConnectionPrivate;
-class QDBUS_EXPORT QDBusConnection
+class Q_DBUS_EXPORT QDBusConnection
{
Q_GADGET
Q_ENUMS(BusType UnregisterMode)
@@ -85,16 +85,19 @@ public:
ExportScriptableSlots = 0x10,
ExportScriptableSignals = 0x20,
ExportScriptableProperties = 0x40,
+ ExportScriptableInvokables = 0x80,
ExportScriptableContents = 0xf0,
ExportNonScriptableSlots = 0x100,
ExportNonScriptableSignals = 0x200,
ExportNonScriptableProperties = 0x400,
+ ExportNonScriptableInvokables = 0x800,
ExportNonScriptableContents = 0xf00,
ExportAllSlots = ExportScriptableSlots|ExportNonScriptableSlots,
ExportAllSignals = ExportScriptableSignals|ExportNonScriptableSignals,
ExportAllProperties = ExportScriptableProperties|ExportNonScriptableProperties,
+ ExportAllInvokables = ExportScriptableInvokables|ExportNonScriptableInvokables,
ExportAllContents = ExportScriptableContents|ExportNonScriptableContents,
#ifndef Q_QDOC
diff --git a/src/dbus/qdbusconnectioninterface.h b/src/dbus/qdbusconnectioninterface.h
index 1a020b7abf..4650e127d3 100644
--- a/src/dbus/qdbusconnectioninterface.h
+++ b/src/dbus/qdbusconnectioninterface.h
@@ -62,7 +62,7 @@ class QByteArray;
/*
* Proxy class for interface org.freedesktop.DBus
*/
-class QDBUS_EXPORT QDBusConnectionInterface: public QDBusAbstractInterface
+class Q_DBUS_EXPORT QDBusConnectionInterface: public QDBusAbstractInterface
{
Q_OBJECT
Q_ENUMS(ServiceQueueOptions ServiceReplacementOptions RegisterServiceReply)
diff --git a/src/dbus/qdbuscontext.h b/src/dbus/qdbuscontext.h
index 13fbe4beb3..cb9310c954 100644
--- a/src/dbus/qdbuscontext.h
+++ b/src/dbus/qdbuscontext.h
@@ -57,7 +57,7 @@ class QDBusConnection;
class QDBusMessage;
class QDBusContextPrivate;
-class QDBUS_EXPORT QDBusContext
+class Q_DBUS_EXPORT QDBusContext
{
public:
QDBusContext();
diff --git a/src/dbus/qdbuserror.h b/src/dbus/qdbuserror.h
index ff9d1dfe7d..72736d0975 100644
--- a/src/dbus/qdbuserror.h
+++ b/src/dbus/qdbuserror.h
@@ -57,7 +57,7 @@ QT_MODULE(DBus)
class QDBusMessage;
-class QDBUS_EXPORT QDBusError
+class Q_DBUS_EXPORT QDBusError
{
public:
enum ErrorType {
@@ -115,7 +115,7 @@ private:
};
#ifndef QT_NO_DEBUG_STREAM
-QDBUS_EXPORT QDebug operator<<(QDebug, const QDBusError &);
+Q_DBUS_EXPORT QDebug operator<<(QDebug, const QDBusError &);
#endif
QT_END_NAMESPACE
diff --git a/src/dbus/qdbusextratypes.h b/src/dbus/qdbusextratypes.h
index 205baff9ed..544e63fa97 100644
--- a/src/dbus/qdbusextratypes.h
+++ b/src/dbus/qdbusextratypes.h
@@ -59,7 +59,7 @@ QT_MODULE(DBus)
// defined in qhash.cpp
Q_CORE_EXPORT uint qHash(const QString &key);
-class QDBUS_EXPORT QDBusObjectPath : private QString
+class Q_DBUS_EXPORT QDBusObjectPath : private QString
{
public:
inline QDBusObjectPath() { }
@@ -109,7 +109,7 @@ inline uint qHash(const QDBusObjectPath &objectPath)
{ return qHash(objectPath.path()); }
-class QDBUS_EXPORT QDBusSignature : private QString
+class Q_DBUS_EXPORT QDBusSignature : private QString
{
public:
inline QDBusSignature() { }
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index efa6744584..7951177fab 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -508,7 +508,7 @@ static bool shouldWatchService(const QString &service)
return !service.isEmpty() && !service.startsWith(QLatin1Char(':'));
}
-extern QDBUS_EXPORT void qDBusAddSpyHook(QDBusSpyHook);
+extern Q_DBUS_EXPORT void qDBusAddSpyHook(QDBusSpyHook);
void qDBusAddSpyHook(QDBusSpyHook hook)
{
qDBusSpyHookList()->append(hook);
@@ -618,7 +618,7 @@ static int findSlot(const QMetaObject *mo, const QByteArray &name, int flags,
continue;
// check type:
- if (mm.methodType() != QMetaMethod::Slot)
+ if (mm.methodType() != QMetaMethod::Slot && mm.methodType() != QMetaMethod::Method)
continue;
// check name:
@@ -682,10 +682,17 @@ static int findSlot(const QMetaObject *mo, const QByteArray &name, int flags,
if (isAsync && metaTypes.count() > i + 1)
continue;
- if (isScriptable && (flags & QDBusConnection::ExportScriptableSlots) == 0)
- continue; // not exported
- if (!isScriptable && (flags & QDBusConnection::ExportNonScriptableSlots) == 0)
- continue; // not exported
+ if (mm.methodType() == QMetaMethod::Slot) {
+ if (isScriptable && (flags & QDBusConnection::ExportScriptableSlots) == 0)
+ continue; // scriptable slots not exported
+ if (!isScriptable && (flags & QDBusConnection::ExportNonScriptableSlots) == 0)
+ continue; // non-scriptable slots not exported
+ } else {
+ if (isScriptable && (flags & QDBusConnection::ExportScriptableInvokables) == 0)
+ continue; // scriptable invokables not exported
+ if (!isScriptable && (flags & QDBusConnection::ExportNonScriptableInvokables) == 0)
+ continue; // non-scriptable invokables not exported
+ }
// if we got here, this slot matched
return idx;
@@ -1379,7 +1386,8 @@ void QDBusConnectionPrivate::activateObject(ObjectTreeNode &node, const QDBusMes
return; // internal filters have already run or an error has been sent
// try the object itself:
- if (node.flags & (QDBusConnection::ExportScriptableSlots|QDBusConnection::ExportNonScriptableSlots)) {
+ if (node.flags & (QDBusConnection::ExportScriptableSlots|QDBusConnection::ExportNonScriptableSlots) ||
+ node.flags & (QDBusConnection::ExportScriptableInvokables|QDBusConnection::ExportNonScriptableInvokables)) {
bool interfaceFound = true;
if (!msg.interface().isEmpty())
interfaceFound = qDBusInterfaceInObject(node.obj, msg.interface());
diff --git a/src/dbus/qdbusinterface.cpp b/src/dbus/qdbusinterface.cpp
index b989cab413..248bf65bba 100644
--- a/src/dbus/qdbusinterface.cpp
+++ b/src/dbus/qdbusinterface.cpp
@@ -277,7 +277,7 @@ int QDBusInterfacePrivate::metacall(QMetaObject::Call c, int id, void **argv)
// signal relay from D-Bus world to Qt world
QMetaObject::activate(q, metaObject, id, argv);
- } else if (mm.methodType() == QMetaMethod::Slot) {
+ } else if (mm.methodType() == QMetaMethod::Slot || mm.methodType() == QMetaMethod::Method) {
// method call relay from Qt world to D-Bus world
// get D-Bus equivalent signature
QString methodName = QLatin1String(metaObject->dbusNameForMethod(id));
diff --git a/src/dbus/qdbusinterface.h b/src/dbus/qdbusinterface.h
index 02a9059826..141fbe502c 100644
--- a/src/dbus/qdbusinterface.h
+++ b/src/dbus/qdbusinterface.h
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(DBus)
class QDBusInterfacePrivate;
-class QDBUS_EXPORT QDBusInterface: public QDBusAbstractInterface
+class Q_DBUS_EXPORT QDBusInterface: public QDBusAbstractInterface
{
friend class QDBusConnection;
private:
diff --git a/src/dbus/qdbusintrospection_p.h b/src/dbus/qdbusintrospection_p.h
index aa1ae57c9e..3a69321f47 100644
--- a/src/dbus/qdbusintrospection_p.h
+++ b/src/dbus/qdbusintrospection_p.h
@@ -63,7 +63,7 @@
QT_BEGIN_NAMESPACE
-class QDBUS_EXPORT QDBusIntrospection
+class Q_DBUS_EXPORT QDBusIntrospection
{
public:
// forward declarations
diff --git a/src/dbus/qdbusmacros.h b/src/dbus/qdbusmacros.h
index 693a350c01..d8bfda58e1 100644
--- a/src/dbus/qdbusmacros.h
+++ b/src/dbus/qdbusmacros.h
@@ -46,14 +46,6 @@
#include <QtCore/qmetatype.h>
#include <QtCore/qvariant.h>
-#if defined(QDBUS_MAKEDLL)
-# define QDBUS_EXPORT Q_DECL_EXPORT
-#elif defined(QT_SHARED)
-# define QDBUS_EXPORT Q_DECL_IMPORT
-#else
-# define QDBUS_EXPORT
-#endif
-
#ifndef Q_MOC_RUN
# define Q_NOREPLY
#endif
diff --git a/src/dbus/qdbusmessage.h b/src/dbus/qdbusmessage.h
index f2e64b9b37..fa1f2c9b71 100644
--- a/src/dbus/qdbusmessage.h
+++ b/src/dbus/qdbusmessage.h
@@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(DBus)
class QDBusMessagePrivate;
-class QDBUS_EXPORT QDBusMessage
+class Q_DBUS_EXPORT QDBusMessage
{
public:
enum MessageType {
@@ -120,7 +120,7 @@ private:
};
#ifndef QT_NO_DEBUG_STREAM
-QDBUS_EXPORT QDebug operator<<(QDebug, const QDBusMessage &);
+Q_DBUS_EXPORT QDebug operator<<(QDebug, const QDBusMessage &);
#endif
QT_END_NAMESPACE
diff --git a/src/dbus/qdbusmetaobject_p.h b/src/dbus/qdbusmetaobject_p.h
index 777ef549b5..07f1cc00db 100644
--- a/src/dbus/qdbusmetaobject_p.h
+++ b/src/dbus/qdbusmetaobject_p.h
@@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE
class QDBusError;
struct QDBusMetaObjectPrivate;
-struct QDBUS_EXPORT QDBusMetaObject: public QMetaObject
+struct Q_DBUS_EXPORT QDBusMetaObject: public QMetaObject
{
bool cached;
diff --git a/src/dbus/qdbusmetatype.h b/src/dbus/qdbusmetatype.h
index b487e2380e..9ae194459b 100644
--- a/src/dbus/qdbusmetatype.h
+++ b/src/dbus/qdbusmetatype.h
@@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(DBus)
-class QDBUS_EXPORT QDBusMetaType
+class Q_DBUS_EXPORT QDBusMetaType
{
public:
typedef void (*MarshallFunction)(QDBusArgument &, const void *);
diff --git a/src/dbus/qdbuspendingcall.h b/src/dbus/qdbuspendingcall.h
index ca0eaaaae8..492eb3cba8 100644
--- a/src/dbus/qdbuspendingcall.h
+++ b/src/dbus/qdbuspendingcall.h
@@ -62,7 +62,7 @@ class QDBusError;
class QDBusPendingCallWatcher;
class QDBusPendingCallPrivate;
-class QDBUS_EXPORT QDBusPendingCall
+class Q_DBUS_EXPORT QDBusPendingCall
{
public:
QDBusPendingCall(const QDBusPendingCall &other);
@@ -96,7 +96,7 @@ private:
};
class QDBusPendingCallWatcherPrivate;
-class QDBUS_EXPORT QDBusPendingCallWatcher: public QObject, public QDBusPendingCall
+class Q_DBUS_EXPORT QDBusPendingCallWatcher: public QObject, public QDBusPendingCall
{
Q_OBJECT
public:
diff --git a/src/dbus/qdbuspendingreply.h b/src/dbus/qdbuspendingreply.h
index 4757115c6e..61e561e800 100644
--- a/src/dbus/qdbuspendingreply.h
+++ b/src/dbus/qdbuspendingreply.h
@@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(DBus)
-class QDBUS_EXPORT QDBusPendingReplyData: public QDBusPendingCall
+class Q_DBUS_EXPORT QDBusPendingReplyData: public QDBusPendingCall
{
protected:
QDBusPendingReplyData();
diff --git a/src/dbus/qdbusreply.h b/src/dbus/qdbusreply.h
index fbe7459762..ba25308c2e 100644
--- a/src/dbus/qdbusreply.h
+++ b/src/dbus/qdbusreply.h
@@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(DBus)
-QDBUS_EXPORT void qDBusReplyFill(const QDBusMessage &reply, QDBusError &error, QVariant &data);
+Q_DBUS_EXPORT void qDBusReplyFill(const QDBusMessage &reply, QDBusError &error, QVariant &data);
template<typename T>
class QDBusReply
diff --git a/src/dbus/qdbusserver.cpp b/src/dbus/qdbusserver.cpp
index 2377795fda..6a4553cb6c 100644
--- a/src/dbus/qdbusserver.cpp
+++ b/src/dbus/qdbusserver.cpp
@@ -100,7 +100,7 @@ QDBusError QDBusServer::lastError() const
}
/*!
- Returns the address this server is assosiated with.
+ Returns the address this server is associated with.
*/
QString QDBusServer::address() const
{
diff --git a/src/dbus/qdbusserver.h b/src/dbus/qdbusserver.h
index 90d40f5619..8e824a80c0 100644
--- a/src/dbus/qdbusserver.h
+++ b/src/dbus/qdbusserver.h
@@ -57,7 +57,7 @@ class QDBusConnectionPrivate;
class QDBusError;
class QDBusConnection;
-class QDBUS_EXPORT QDBusServer: public QObject
+class Q_DBUS_EXPORT QDBusServer: public QObject
{
Q_OBJECT
public:
diff --git a/src/dbus/qdbusservicewatcher.h b/src/dbus/qdbusservicewatcher.h
index c7609a804d..d9a0d928a3 100644
--- a/src/dbus/qdbusservicewatcher.h
+++ b/src/dbus/qdbusservicewatcher.h
@@ -56,7 +56,7 @@ QT_MODULE(DBus)
class QDBusConnection;
class QDBusServiceWatcherPrivate;
-class QDBUS_EXPORT QDBusServiceWatcher: public QObject
+class Q_DBUS_EXPORT QDBusServiceWatcher: public QObject
{
Q_OBJECT
Q_PROPERTY(QStringList watchedServices READ watchedServices WRITE setWatchedServices)
diff --git a/src/dbus/qdbusthreaddebug_p.h b/src/dbus/qdbusthreaddebug_p.h
index e8d90c5a94..87cb4d6977 100644
--- a/src/dbus/qdbusthreaddebug_p.h
+++ b/src/dbus/qdbusthreaddebug_p.h
@@ -63,8 +63,8 @@
#if QDBUS_THREAD_DEBUG
QT_BEGIN_NAMESPACE
typedef void (*qdbusThreadDebugFunc)(int, int, QDBusConnectionPrivate *);
-QDBUS_EXPORT void qdbusDefaultThreadDebug(int, int, QDBusConnectionPrivate *);
-extern QDBUS_EXPORT qdbusThreadDebugFunc qdbusThreadDebug;
+Q_DBUS_EXPORT void qdbusDefaultThreadDebug(int, int, QDBusConnectionPrivate *);
+extern Q_DBUS_EXPORT qdbusThreadDebugFunc qdbusThreadDebug;
QT_END_NAMESPACE
#endif
diff --git a/src/dbus/qdbusutil_p.h b/src/dbus/qdbusutil_p.h
index 8a1846ab4d..2b53c6b021 100644
--- a/src/dbus/qdbusutil_p.h
+++ b/src/dbus/qdbusutil_p.h
@@ -67,25 +67,25 @@ QT_BEGIN_NAMESPACE
namespace QDBusUtil
{
- QDBUS_EXPORT bool isValidInterfaceName(const QString &ifaceName);
+ Q_DBUS_EXPORT bool isValidInterfaceName(const QString &ifaceName);
- QDBUS_EXPORT bool isValidUniqueConnectionName(const QString &busName);
+ Q_DBUS_EXPORT bool isValidUniqueConnectionName(const QString &busName);
- QDBUS_EXPORT bool isValidBusName(const QString &busName);
+ Q_DBUS_EXPORT bool isValidBusName(const QString &busName);
- QDBUS_EXPORT bool isValidMemberName(const QString &memberName);
+ Q_DBUS_EXPORT bool isValidMemberName(const QString &memberName);
- QDBUS_EXPORT bool isValidErrorName(const QString &errorName);
+ Q_DBUS_EXPORT bool isValidErrorName(const QString &errorName);
- QDBUS_EXPORT bool isValidPartOfObjectPath(const QString &path);
+ Q_DBUS_EXPORT bool isValidPartOfObjectPath(const QString &path);
- QDBUS_EXPORT bool isValidObjectPath(const QString &path);
+ Q_DBUS_EXPORT bool isValidObjectPath(const QString &path);
- QDBUS_EXPORT bool isValidSignature(const QString &signature);
+ Q_DBUS_EXPORT bool isValidSignature(const QString &signature);
- QDBUS_EXPORT bool isValidSingleSignature(const QString &signature);
+ Q_DBUS_EXPORT bool isValidSingleSignature(const QString &signature);
- QDBUS_EXPORT QString argumentToString(const QVariant &variant);
+ Q_DBUS_EXPORT QString argumentToString(const QVariant &variant);
enum AllowEmptyFlag {
EmptyAllowed,
diff --git a/src/dbus/qdbusxmlgenerator.cpp b/src/dbus/qdbusxmlgenerator.cpp
index 463ac73a82..1222ac7f95 100644
--- a/src/dbus/qdbusxmlgenerator.cpp
+++ b/src/dbus/qdbusxmlgenerator.cpp
@@ -53,7 +53,7 @@
QT_BEGIN_NAMESPACE
-extern QDBUS_EXPORT QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo,
+extern Q_DBUS_EXPORT QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo,
const QMetaObject *base, int flags);
static inline QString typeNameToXml(const char *typeName)
@@ -133,7 +133,7 @@ static QString generateInterfaceXml(const QMetaObject *mo, int flags, int method
if (mm.methodType() == QMetaMethod::Signal)
// adding a signal
isSignal = true;
- else if (mm.methodType() == QMetaMethod::Slot && mm.access() == QMetaMethod::Public)
+ else if (mm.access() == QMetaMethod::Public && (mm.methodType() == QMetaMethod::Slot || mm.methodType() == QMetaMethod::Method))
isSignal = false;
else
continue; // neither signal nor public slot
@@ -141,9 +141,9 @@ static QString generateInterfaceXml(const QMetaObject *mo, int flags, int method
if (isSignal && !(flags & (QDBusConnection::ExportScriptableSignals |
QDBusConnection::ExportNonScriptableSignals)))
continue; // we're not exporting any signals
- if (!isSignal && !(flags & (QDBusConnection::ExportScriptableSlots |
- QDBusConnection::ExportNonScriptableSlots)))
- continue; // we're not exporting any slots
+ if (!isSignal && (!(flags & (QDBusConnection::ExportScriptableSlots | QDBusConnection::ExportNonScriptableSlots)) &&
+ !(flags & (QDBusConnection::ExportScriptableInvokables | QDBusConnection::ExportNonScriptableInvokables))))
+ continue; // we're not exporting any slots or invokables
QString xml = QString::fromLatin1(" <%1 name=\"%2\">\n")
.arg(isSignal ? QLatin1String("signal") : QLatin1String("method"))
diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt
index 872f6cb855..6e073305b5 100644
--- a/src/declarative/QmlChanges.txt
+++ b/src/declarative/QmlChanges.txt
@@ -1,9 +1,19 @@
=============================================================================
-The changes below are pre Qt 4.7.0 tech preview
+The changes below are pre Qt 4.7.0 RC1
TextInput
- copy(), cut() and paste() functions added
+Font.letterSpacing
+ - was percentage based. Now specified in pixels.
+Item
+ - wantsFocus renamed to activeFocus
+ - forceFocus() renamed to forceActiveFocus()
+ - focus now returns the scoped focus (i.e. focus read/write now manipulate
+ the same value)
+TextInput and TextEdit:
+ - focusOnPress renamed to activeFocusOnPress
+=============================================================================
The changes below are pre Qt 4.7.0 beta 2
QDeclarativeView
diff --git a/src/declarative/debugger/qdeclarativedebugtrace.cpp b/src/declarative/debugger/qdeclarativedebugtrace.cpp
index 5e6d5e7d53..b2b0c8a8e0 100644
--- a/src/declarative/debugger/qdeclarativedebugtrace.cpp
+++ b/src/declarative/debugger/qdeclarativedebugtrace.cpp
@@ -78,6 +78,9 @@ void QDeclarativeDebugTrace::endRange(RangeType t)
void QDeclarativeDebugTrace::addEventImpl(EventType event)
{
+ if (!isEnabled())
+ return;
+
QByteArray data;
QDataStream ds(&data, QIODevice::WriteOnly);
ds << m_timer.elapsed() << (int)Event << (int)event;
@@ -86,6 +89,9 @@ void QDeclarativeDebugTrace::addEventImpl(EventType event)
void QDeclarativeDebugTrace::startRangeImpl(RangeType range)
{
+ if (!isEnabled())
+ return;
+
QByteArray data;
QDataStream ds(&data, QIODevice::WriteOnly);
ds << m_timer.elapsed() << (int)RangeStart << (int)range;
@@ -94,6 +100,9 @@ void QDeclarativeDebugTrace::startRangeImpl(RangeType range)
void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QUrl &u)
{
+ if (!isEnabled())
+ return;
+
QByteArray data;
QDataStream ds(&data, QIODevice::WriteOnly);
ds << m_timer.elapsed() << (int)RangeData << (int)range << (QString)u.toString();
@@ -102,6 +111,9 @@ void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QUrl &u)
void QDeclarativeDebugTrace::endRangeImpl(RangeType range)
{
+ if (!isEnabled())
+ return;
+
QByteArray data;
QDataStream ds(&data, QIODevice::WriteOnly);
ds << m_timer.elapsed() << (int)RangeEnd << (int)range;
diff --git a/src/declarative/debugger/qpacketprotocol.cpp b/src/declarative/debugger/qpacketprotocol.cpp
index 6241922aaf..878f42f3c0 100644
--- a/src/declarative/debugger/qpacketprotocol.cpp
+++ b/src/declarative/debugger/qpacketprotocol.cpp
@@ -422,7 +422,7 @@ QPacket::~QPacket()
/*!
Creates a copy of \a other. The initial stream positions are shared, but the
- two packets are otherwise independant.
+ two packets are otherwise independent.
*/
QPacket::QPacket(const QPacket & other)
: QDataStream(), b(other.b), buf(0)
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors_p.h b/src/declarative/graphicsitems/qdeclarativeanchors_p.h
index 1bd7608935..c9297977fb 100644
--- a/src/declarative/graphicsitems/qdeclarativeanchors_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeanchors_p.h
@@ -70,11 +70,11 @@ class Q_DECLARATIVE_EXPORT QDeclarativeAnchors : public QObject
Q_PROPERTY(qreal margins READ margins WRITE setMargins NOTIFY marginsChanged)
Q_PROPERTY(qreal leftMargin READ leftMargin WRITE setLeftMargin NOTIFY leftMarginChanged)
Q_PROPERTY(qreal rightMargin READ rightMargin WRITE setRightMargin NOTIFY rightMarginChanged)
- Q_PROPERTY(qreal horizontalCenterOffset READ horizontalCenterOffset WRITE setHorizontalCenterOffset NOTIFY horizontalCenterOffsetChanged())
+ Q_PROPERTY(qreal horizontalCenterOffset READ horizontalCenterOffset WRITE setHorizontalCenterOffset NOTIFY horizontalCenterOffsetChanged)
Q_PROPERTY(qreal topMargin READ topMargin WRITE setTopMargin NOTIFY topMarginChanged)
Q_PROPERTY(qreal bottomMargin READ bottomMargin WRITE setBottomMargin NOTIFY bottomMarginChanged)
- Q_PROPERTY(qreal verticalCenterOffset READ verticalCenterOffset WRITE setVerticalCenterOffset NOTIFY verticalCenterOffsetChanged())
- Q_PROPERTY(qreal baselineOffset READ baselineOffset WRITE setBaselineOffset NOTIFY baselineOffsetChanged())
+ Q_PROPERTY(qreal verticalCenterOffset READ verticalCenterOffset WRITE setVerticalCenterOffset NOTIFY verticalCenterOffsetChanged)
+ Q_PROPERTY(qreal baselineOffset READ baselineOffset WRITE setBaselineOffset NOTIFY baselineOffsetChanged)
Q_PROPERTY(QGraphicsObject *fill READ fill WRITE setFill RESET resetFill NOTIFY fillChanged)
Q_PROPERTY(QGraphicsObject *centerIn READ centerIn WRITE setCenterIn RESET resetCenterIn NOTIFY centerInChanged)
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
index 44c206b8b1..48812484b8 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
@@ -149,6 +149,8 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage()
\endqml
The URL may be absolute, or relative to the URL of the component.
+
+ \sa QDeclarativeImageProvider
*/
void QDeclarativeBorderImage::setSource(const QUrl &url)
{
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index 9af5f560dc..19cabdd62d 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -681,12 +681,15 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
if (newY < maxY && maxY - minY <= 0)
newY = maxY + (newY - maxY) / 2;
if (boundsBehavior == QDeclarativeFlickable::StopAtBounds && (newY > minY || newY < maxY)) {
- if (newY > minY)
- newY = minY;
- else if (newY < maxY)
+ rejectY = true;
+ if (newY < maxY) {
newY = maxY;
- else
- rejectY = true;
+ rejectY = false;
+ }
+ if (newY > minY) {
+ newY = minY;
+ rejectY = false;
+ }
}
if (!rejectY && stealMouse) {
vData.move.setValue(qRound(newY));
@@ -708,12 +711,15 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
if (newX < maxX && maxX - minX <= 0)
newX = maxX + (newX - maxX) / 2;
if (boundsBehavior == QDeclarativeFlickable::StopAtBounds && (newX > minX || newX < maxX)) {
- if (newX > minX)
- newX = minX;
- else if (newX < maxX)
+ rejectX = true;
+ if (newX < maxX) {
newX = maxX;
- else
- rejectX = true;
+ rejectX = false;
+ }
+ if (newX > minX) {
+ newX = minX;
+ rejectX = false;
+ }
}
if (!rejectX && stealMouse) {
hData.move.setValue(qRound(newX));
@@ -1214,6 +1220,7 @@ bool QDeclarativeFlickable::sendMouseEvent(QGraphicsSceneMouseEvent *event)
d->handleMousePressEvent(&mouseEvent);
d->captureDelayedPress(event);
+ stealThisEvent = d->stealMouse; // Update stealThisEvent in case changed by function call above
break;
case QEvent::GraphicsSceneMouseRelease:
if (d->delayedPressEvent) {
@@ -1234,7 +1241,6 @@ 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();
@@ -1426,21 +1432,23 @@ void QDeclarativeFlickable::movementEnding()
if (!d->flickingHorizontally)
emit flickEnded();
}
- if (d->movingHorizontally) {
- d->movingHorizontally = false;
- d->hMoved = false;
- emit movingChanged();
- emit movingHorizontallyChanged();
- if (!d->movingVertically)
- emit movementEnded();
- }
- if (d->movingVertically) {
- d->movingVertically = false;
- d->vMoved = false;
- emit movingChanged();
- emit movingVerticallyChanged();
- if (!d->movingHorizontally)
- emit movementEnded();
+ if (!d->pressed && !d->stealMouse) {
+ if (d->movingHorizontally) {
+ d->movingHorizontally = false;
+ d->hMoved = false;
+ emit movingChanged();
+ emit movingHorizontallyChanged();
+ if (!d->movingVertically)
+ emit movementEnded();
+ }
+ if (d->movingVertically) {
+ d->movingVertically = false;
+ d->vMoved = false;
+ emit movingChanged();
+ emit movingVerticallyChanged();
+ if (!d->movingHorizontally)
+ emit movementEnded();
+ }
}
d->hData.smoothVelocity.setValue(0);
d->vData.smoothVelocity.setValue(0);
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 14a4f08d6f..68a4c64958 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -1085,13 +1085,15 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
\c portrait data directly.
An improved grid view is shown below. The delegate is visually improved and is moved
- into a separate \c contactDelegate component. Also, the currently selected item is highlighted
- with a blue \l Rectangle using the \l highlight property, and \c focus is set to \c true
- to enable keyboard navigation for the grid view.
+ into a separate \c contactDelegate component.
\snippet doc/src/snippets/declarative/gridview/gridview.qml classdocs advanced
\image gridview-highlight.png
+ The currently selected item is highlighted with a blue \l Rectangle using the \l highlight property,
+ and \c focus is set to \c true to enable keyboard navigation for the grid view.
+ The grid view itself is a focus scope (see \l{qmlfocus#Acquiring Focus and Focus Scopes}{the focus documentation page} for more details).
+
Delegates are instantiated as needed and may be destroyed at any time.
State should \e never be stored in a delegate.
@@ -1276,6 +1278,11 @@ void QDeclarativeGridView::setDelegate(QDeclarativeComponent *delegate)
if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model)) {
dataModel->setDelegate(delegate);
if (isComponentComplete()) {
+ for (int i = 0; i < d->visibleItems.count(); ++i)
+ d->releaseItem(d->visibleItems.at(i));
+ d->visibleItems.clear();
+ d->releaseItem(d->currentItem);
+ d->currentItem = 0;
refill();
d->moveReason = QDeclarativeGridViewPrivate::SetIndex;
d->updateCurrent(d->currentIndex);
@@ -1293,9 +1300,15 @@ void QDeclarativeGridView::setDelegate(QDeclarativeComponent *delegate)
\qmlproperty int GridView::currentIndex
\qmlproperty Item GridView::currentItem
- \c currentIndex holds the index of the current item.
- \c currentItem is the current item. Note that the position of the current item
- may only be approximate until it becomes visible in the view.
+ The \c currentIndex property holds the index of the current item, and
+ \c currentItem holds the current item.
+
+ If highlightFollowsCurrentItem is \c true, setting either of these
+ properties will smoothly scroll the GridView so that the current
+ item becomes visible.
+
+ Note that the position of the current item
+ may only be approximate until it becomes visible in the view.
*/
int QDeclarativeGridView::currentIndex() const
{
@@ -1385,7 +1398,7 @@ void QDeclarativeGridView::setHighlight(QDeclarativeComponent *highlight)
\qmlproperty bool GridView::highlightFollowsCurrentItem
This property sets whether the highlight is managed by the view.
- If this property is true, the highlight is moved smoothly
+ If this property is true (the default value), the highlight is moved smoothly
to follow the current item. Otherwise, the
highlight is not moved by the view, and any movement must be implemented
by the highlight.
@@ -1568,6 +1581,8 @@ void QDeclarativeGridView::setFlow(Flow flow)
If this is true, key navigation that would move the current item selection
past one end of the view instead wraps around and moves the selection to
the other end of the view.
+
+ By default, key navigation is not wrapped.
*/
bool QDeclarativeGridView::isWrapEnabled() const
{
diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp
index 90738c8e2d..37736ccac7 100644
--- a/src/declarative/graphicsitems/qdeclarativeimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp
@@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE
\endqml
\endtable
- If the \l {Image::width}{width} and \l{Image::height}{height} properties are not specified,
+ If the \l {Item::width}{width} and \l{Item::height}{height} properties are not specified,
the Image element is automatically sized to the loaded image. Image elements can be
stretched and tiled using the \l fillMode property.
diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
index 67f2327023..ba40443933 100644
--- a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
@@ -50,6 +50,13 @@
QT_BEGIN_NAMESPACE
+
+/*!
+ \class QDeclarativeImageBase
+ \internal
+ \brief The base class for declarative images.
+ */
+
QDeclarativeImageBase::QDeclarativeImageBase(QDeclarativeImageBasePrivate &dd, QDeclarativeItem *parent)
: QDeclarativeItem(dd, parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 190b22cbec..2c295cd1fb 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -63,11 +63,9 @@
#include <QtGui/qgraphicstransform.h>
#include <qlistmodelinterface_p.h>
-QT_BEGIN_NAMESPACE
+#include <float.h>
-#ifndef FLT_MAX
-#define FLT_MAX 1E+37
-#endif
+QT_BEGIN_NAMESPACE
/*!
\qmlclass Transform QGraphicsTransform
@@ -91,7 +89,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \qmlclass Translate QGraphicsTranslate
+ \qmlclass Translate QDeclarativeTranslate
\since 4.7
\brief The Translate object provides a way to move an Item without changing its x or y properties.
@@ -420,12 +418,12 @@ void QDeclarativeItemKeyFilter::componentComplete()
/*!
- \qmlclass KeyNavigation
+ \qmlclass KeyNavigation QDeclarativeKeyNavigationAttached
\since 4.7
\brief The KeyNavigation attached property supports key navigation by arrow keys.
It is common in key-based UIs to use arrow keys to navigate
- between focussed items. The KeyNavigation property provides a
+ between focused items. The KeyNavigation property provides a
convenient way of specifying which item will gain focus
when an arrow key is pressed. The following example provides
key navigation for a 2x2 grid of items.
@@ -513,8 +511,10 @@ QDeclarativeItem *QDeclarativeKeyNavigationAttached::left() const
void QDeclarativeKeyNavigationAttached::setLeft(QDeclarativeItem *i)
{
Q_D(QDeclarativeKeyNavigationAttached);
+ if (d->left == i)
+ return;
d->left = i;
- emit changed();
+ emit leftChanged();
}
QDeclarativeItem *QDeclarativeKeyNavigationAttached::right() const
@@ -526,8 +526,10 @@ QDeclarativeItem *QDeclarativeKeyNavigationAttached::right() const
void QDeclarativeKeyNavigationAttached::setRight(QDeclarativeItem *i)
{
Q_D(QDeclarativeKeyNavigationAttached);
+ if (d->right == i)
+ return;
d->right = i;
- emit changed();
+ emit rightChanged();
}
QDeclarativeItem *QDeclarativeKeyNavigationAttached::up() const
@@ -539,8 +541,10 @@ QDeclarativeItem *QDeclarativeKeyNavigationAttached::up() const
void QDeclarativeKeyNavigationAttached::setUp(QDeclarativeItem *i)
{
Q_D(QDeclarativeKeyNavigationAttached);
+ if (d->up == i)
+ return;
d->up = i;
- emit changed();
+ emit upChanged();
}
QDeclarativeItem *QDeclarativeKeyNavigationAttached::down() const
@@ -552,8 +556,10 @@ QDeclarativeItem *QDeclarativeKeyNavigationAttached::down() const
void QDeclarativeKeyNavigationAttached::setDown(QDeclarativeItem *i)
{
Q_D(QDeclarativeKeyNavigationAttached);
+ if (d->down == i)
+ return;
d->down = i;
- emit changed();
+ emit downChanged();
}
QDeclarativeItem *QDeclarativeKeyNavigationAttached::tab() const
@@ -565,8 +571,10 @@ QDeclarativeItem *QDeclarativeKeyNavigationAttached::tab() const
void QDeclarativeKeyNavigationAttached::setTab(QDeclarativeItem *i)
{
Q_D(QDeclarativeKeyNavigationAttached);
+ if (d->tab == i)
+ return;
d->tab = i;
- emit changed();
+ emit tabChanged();
}
QDeclarativeItem *QDeclarativeKeyNavigationAttached::backtab() const
@@ -578,8 +586,10 @@ QDeclarativeItem *QDeclarativeKeyNavigationAttached::backtab() const
void QDeclarativeKeyNavigationAttached::setBacktab(QDeclarativeItem *i)
{
Q_D(QDeclarativeKeyNavigationAttached);
+ if (d->backtab == i)
+ return;
d->backtab = i;
- emit changed();
+ emit backtabChanged();
}
/*!
@@ -714,7 +724,7 @@ void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event, bool post)
}
/*!
- \qmlclass Keys
+ \qmlclass Keys QDeclarativeKeysAttached
\since 4.7
\brief The Keys attached property provides key handling to Items.
@@ -1388,26 +1398,6 @@ QDeclarativeKeysAttached *QDeclarativeKeysAttached::qmlAttachedProperties(QObjec
*/
/*!
- \property QDeclarativeItem::baseline
- \internal
-*/
-
-/*!
- \property QDeclarativeItem::focus
- \internal
-*/
-
-/*!
- \property QDeclarativeItem::wantsFocus
- \internal
-*/
-
-/*!
- \property QDeclarativeItem::transformOrigin
- \internal
-*/
-
-/*!
\fn void QDeclarativeItem::childrenRectChanged(const QRectF &)
\internal
*/
@@ -1452,7 +1442,7 @@ QDeclarativeKeysAttached *QDeclarativeKeysAttached::qmlAttachedProperties(QObjec
*/
/*!
- \fn void QDeclarativeItem::wantsFocusChanged(bool)
+ \fn void QDeclarativeItem::activeFocusChanged(bool)
\internal
*/
@@ -1534,6 +1524,9 @@ QDeclarativeItem::~QDeclarativeItem()
\endqml
The default transform origin is \c Item.Center.
+
+ To set an arbitrary transform origin point use the \l Scale or \l Rotation
+ transform elements.
*/
/*!
@@ -1970,6 +1963,9 @@ QVariant QDeclarativeItem::inputMethodQuery(Qt::InputMethodQuery query) const
return v;
}
+/*!
+ \internal
+ */
void QDeclarativeItem::keyPressPreHandler(QKeyEvent *event)
{
Q_D(QDeclarativeItem);
@@ -1980,6 +1976,9 @@ void QDeclarativeItem::keyPressPreHandler(QKeyEvent *event)
d->doneEventPreHandler = true;
}
+/*!
+ \internal
+ */
void QDeclarativeItem::keyReleasePreHandler(QKeyEvent *event)
{
Q_D(QDeclarativeItem);
@@ -1990,6 +1989,9 @@ void QDeclarativeItem::keyReleasePreHandler(QKeyEvent *event)
d->doneEventPreHandler = true;
}
+/*!
+ \internal
+ */
void QDeclarativeItem::inputMethodPreHandler(QInputMethodEvent *event)
{
Q_D(QDeclarativeItem);
@@ -2000,7 +2002,6 @@ void QDeclarativeItem::inputMethodPreHandler(QInputMethodEvent *event)
d->doneEventPreHandler = true;
}
-
/*!
\internal
*/
@@ -2059,20 +2060,6 @@ QDeclarativeAnchorLine QDeclarativeItemPrivate::baseline() const
}
/*!
- \qmlproperty AnchorLine Item::top
- \qmlproperty AnchorLine Item::bottom
- \qmlproperty AnchorLine Item::left
- \qmlproperty AnchorLine Item::right
- \qmlproperty AnchorLine Item::horizontalCenter
- \qmlproperty AnchorLine Item::verticalCenter
- \qmlproperty AnchorLine Item::baseline
-
- The anchor lines of the item.
-
- For more information see \l {anchor-layout}{Anchor Layouts}.
-*/
-
-/*!
\qmlproperty AnchorLine Item::anchors.top
\qmlproperty AnchorLine Item::anchors.bottom
\qmlproperty AnchorLine Item::anchors.left
@@ -2204,6 +2191,8 @@ void QDeclarativeItem::setBaselineOffset(qreal offset)
}
\endqml
\endtable
+
+ \sa transform, Rotation
*/
/*!
@@ -2240,6 +2229,8 @@ void QDeclarativeItem::setBaselineOffset(qreal offset)
}
\endqml
\endtable
+
+ \sa transform, Scale
*/
/*!
@@ -2377,12 +2368,12 @@ QScriptValue QDeclarativeItem::mapToItem(const QScriptValue &item, qreal x, qrea
}
/*!
- \qmlmethod Item::forceFocus()
+ \qmlmethod Item::forceActiveFocus()
- Force the focus on the item.
- This method sets the focus on the item and makes sure that all the focus scopes higher in the object hierarchy are given focus.
+ Force active focus on the item.
+ This method sets focus on the item and makes sure that all the focus scopes higher in the object hierarchy are also given focus.
*/
-void QDeclarativeItem::forceFocus()
+void QDeclarativeItem::forceActiveFocus()
{
setFocus(true);
QGraphicsItem *parent = parentItem();
@@ -2419,8 +2410,19 @@ void QDeclarativeItemPrivate::focusChanged(bool flag)
{
Q_Q(QDeclarativeItem);
if (!(flags & QGraphicsItem::ItemIsFocusScope) && parent)
- emit q->wantsFocusChanged(flag); //see also QDeclarativeItemPrivate::subFocusItemChange()
- emit q->focusChanged(flag);
+ emit q->activeFocusChanged(flag); //see also QDeclarativeItemPrivate::subFocusItemChange()
+
+ bool inScope = false;
+ QGraphicsItem *p = parent;
+ while (p) {
+ if (p->flags() & QGraphicsItem::ItemIsFocusScope) {
+ inScope = true;
+ break;
+ }
+ p = p->parentItem();
+ }
+ if (!inScope)
+ emit q->focusChanged(flag);
}
/*! \internal */
@@ -2492,7 +2494,7 @@ QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeItemPrivate::transi
Item {
filter: [
Blur { ... },
- Relection { ... }
+ Reflection { ... }
...
]
}
@@ -2503,7 +2505,7 @@ QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeItemPrivate::transi
\qmlproperty bool Item::clip
This property holds whether clipping is enabled.
- if clipping is enabled, an item will clip its own painting, as well
+ If clipping is enabled, an item will clip its own painting, as well
as the painting of its children, to its bounding rectangle.
Non-rectangular clipping regions are not supported for performance reasons.
@@ -2543,11 +2545,6 @@ QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeItemPrivate::transi
\sa {qmlstates}{States}
*/
-/*!
- \property QDeclarativeItem::state
- \internal
-*/
-
/*! \internal */
QString QDeclarativeItemPrivate::state() const
{
@@ -2570,11 +2567,6 @@ void QDeclarativeItemPrivate::setState(const QString &state)
For more information see \l Transform.
*/
-/*!
- \property QDeclarativeItem::transform
- \internal
-*/
-
/*! \internal */
QDeclarativeListProperty<QGraphicsTransform> QDeclarativeItem::transform()
{
@@ -2707,14 +2699,14 @@ bool QDeclarativeItem::sceneEvent(QEvent *event)
if (event->type() == QEvent::FocusIn ||
event->type() == QEvent::FocusOut) {
- d->focusChanged(hasFocus());
+ d->focusChanged(hasActiveFocus());
}
return rv;
}
}
/*!
- \reimp
+ \internal
Note that unlike QGraphicsItems, QDeclarativeItem::itemChange() is \e not called
during initial widget polishing. Items wishing to optimize start-up construction
@@ -2863,6 +2855,26 @@ void QDeclarativeItem::setSmooth(bool smooth)
}
/*!
+ \property QDeclarativeItem::focus
+ \internal
+*/
+
+/*!
+ \property QDeclarativeItem::transform
+ \internal
+*/
+
+/*!
+ \property QDeclarativeItem::transformOrigin
+ \internal
+*/
+
+/*!
+ \property QDeclarativeItem::activeFocus
+ \internal
+*/
+
+/*!
\internal
Return the width of the item
*/
@@ -3101,15 +3113,32 @@ void QDeclarativeItem::setSize(const QSizeF &size)
}
/*!
- \qmlproperty bool Item::wantsFocus
+ \qmlproperty bool Item::activeFocus
+
+ This property indicates whether the item has active focus.
- This property indicates whether the item has has an active focus request.
+ An item with active focus will receive keyboard input,
+ or is a FocusScope ancestor of the item that will receive keyboard input.
- \sa {qmlfocus}{Keyboard Focus}
+ Usually, activeFocus is gained by setting focus on an item and its enclosing
+ FocusScopes. In the following example \c input will have activeFocus.
+ \qml
+ Rectangle {
+ FocusScope {
+ focus: true
+ TextInput {
+ id: input
+ focus: true
+ }
+ }
+ }
+ \endqml
+
+ \sa focus, {qmlfocus}{Keyboard Focus}
*/
/*! \internal */
-bool QDeclarativeItem::wantsFocus() const
+bool QDeclarativeItem::hasActiveFocus() const
{
Q_D(const QDeclarativeItem);
return focusItem() == this ||
@@ -3119,16 +3148,51 @@ bool QDeclarativeItem::wantsFocus() const
/*!
\qmlproperty bool Item::focus
- This property indicates whether the item has keyboard input focus. Set this
- property to true to request focus.
+ This property indicates whether the item has focus within the enclosing focus scope. If true, this item
+ will gain active focus when the enclosing focus scope gains active focus.
+ In the following example, \c input will be given active focus when \c scope gains active focus.
+ \qml
+ Rectangle {
+ FocusScope {
+ id: scope
+ TextInput {
+ id: input
+ focus: true
+ }
+ }
+ }
+ \endqml
+
+ For the purposes of this property, the top level item in the scene
+ is assumed to act like a focus scope, and to always have active focus
+ when the scene has focus. On a practical level, that means the following
+ QML will give active focus to \c input on startup.
+
+ \qml
+ Rectangle {
+ TextInput {
+ id: input
+ focus: true
+ }
+ }
+ \endqml
- \sa {qmlfocus}{Keyboard Focus}
+ \sa activeFocus, {qmlfocus}{Keyboard Focus}
*/
/*! \internal */
bool QDeclarativeItem::hasFocus() const
{
- return QGraphicsItem::hasFocus();
+ Q_D(const QDeclarativeItem);
+ QGraphicsItem *p = d->parent;
+ while (p) {
+ if (p->flags() & QGraphicsItem::ItemIsFocusScope) {
+ return p->focusScopeItem() == this;
+ }
+ p = p->parentItem();
+ }
+
+ return hasActiveFocus() ? true : (!QGraphicsItem::parentItem() ? true : false);
}
/*! \internal */
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.h b/src/declarative/graphicsitems/qdeclarativeitem.h
index 4f420f8952..afb1f2e70e 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.h
+++ b/src/declarative/graphicsitems/qdeclarativeitem.h
@@ -87,9 +87,10 @@ class Q_DECLARATIVE_EXPORT QDeclarativeItem : public QGraphicsObject, public QDe
Q_PROPERTY(qreal baselineOffset READ baselineOffset WRITE setBaselineOffset NOTIFY baselineOffsetChanged)
Q_PROPERTY(bool clip READ clip WRITE setClip NOTIFY clipChanged) // ### move to QGI/QGO, NOTIFY
Q_PROPERTY(bool focus READ hasFocus WRITE setFocus NOTIFY focusChanged FINAL)
- Q_PROPERTY(bool wantsFocus READ wantsFocus NOTIFY wantsFocusChanged)
+ Q_PROPERTY(bool activeFocus READ hasActiveFocus NOTIFY activeFocusChanged)
Q_PROPERTY(QDeclarativeListProperty<QGraphicsTransform> transform READ transform DESIGNABLE false FINAL)
Q_PROPERTY(TransformOrigin transformOrigin READ transformOrigin WRITE setTransformOrigin NOTIFY transformOriginChanged)
+ Q_PROPERTY(QPointF transformOriginPoint READ transformOriginPoint) // transformOriginPoint is read-only for Item
Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged)
Q_ENUMS(TransformOrigin)
Q_CLASSINFO("DefaultProperty", "data")
@@ -138,7 +139,7 @@ public:
QRectF boundingRect() const;
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
- bool wantsFocus() const;
+ bool hasActiveFocus() const;
bool hasFocus() const;
void setFocus(bool);
@@ -147,16 +148,15 @@ 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 void forceActiveFocus();
Q_INVOKABLE QDeclarativeItem *childAt(qreal x, qreal y) const;
Q_SIGNALS:
- void childrenChanged();
void childrenRectChanged(const QRectF &);
void baselineOffsetChanged(qreal);
void stateChanged(const QString &);
void focusChanged(bool);
- void wantsFocusChanged(bool);
+ void activeFocusChanged(bool);
void parentChanged(QDeclarativeItem *);
void transformOriginChanged(TransformOrigin);
void smoothChanged(bool);
diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h
index bc5d80910d..fffb4f7dce 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h
@@ -285,11 +285,18 @@ public:
virtual void subFocusItemChange()
{
if (flags & QGraphicsItem::ItemIsFocusScope || !parent)
- emit q_func()->wantsFocusChanged(subFocusItem != 0);
+ emit q_func()->activeFocusChanged(subFocusItem != 0);
//see also QDeclarativeItemPrivate::focusChanged
}
// Reimplemented from QGraphicsItemPrivate
+ virtual void focusScopeItemChange(bool isSubFocusItem)
+ {
+ emit q_func()->focusChanged(isSubFocusItem);
+ }
+
+
+ // Reimplemented from QGraphicsItemPrivate
virtual void siblingOrderChange()
{
Q_Q(QDeclarativeItem);
@@ -356,12 +363,12 @@ class QDeclarativeKeyNavigationAttached : public QObject, public QDeclarativeIte
Q_OBJECT
Q_DECLARE_PRIVATE(QDeclarativeKeyNavigationAttached)
- Q_PROPERTY(QDeclarativeItem *left READ left WRITE setLeft NOTIFY changed)
- Q_PROPERTY(QDeclarativeItem *right READ right WRITE setRight NOTIFY changed)
- Q_PROPERTY(QDeclarativeItem *up READ up WRITE setUp NOTIFY changed)
- Q_PROPERTY(QDeclarativeItem *down READ down WRITE setDown NOTIFY changed)
- Q_PROPERTY(QDeclarativeItem *tab READ tab WRITE setTab NOTIFY changed)
- Q_PROPERTY(QDeclarativeItem *backtab READ backtab WRITE setBacktab NOTIFY changed)
+ Q_PROPERTY(QDeclarativeItem *left READ left WRITE setLeft NOTIFY leftChanged)
+ Q_PROPERTY(QDeclarativeItem *right READ right WRITE setRight NOTIFY rightChanged)
+ Q_PROPERTY(QDeclarativeItem *up READ up WRITE setUp NOTIFY upChanged)
+ Q_PROPERTY(QDeclarativeItem *down READ down WRITE setDown NOTIFY downChanged)
+ Q_PROPERTY(QDeclarativeItem *tab READ tab WRITE setTab NOTIFY tabChanged)
+ Q_PROPERTY(QDeclarativeItem *backtab READ backtab WRITE setBacktab NOTIFY backtabChanged)
Q_PROPERTY(Priority priority READ priority WRITE setPriority NOTIFY priorityChanged)
Q_ENUMS(Priority)
@@ -389,7 +396,12 @@ public:
static QDeclarativeKeyNavigationAttached *qmlAttachedProperties(QObject *);
Q_SIGNALS:
- void changed();
+ void leftChanged();
+ void rightChanged();
+ void upChanged();
+ void downChanged();
+ void tabChanged();
+ void backtabChanged();
void priorityChanged();
private:
diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
index b198077f7f..783eff1e64 100644
--- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
@@ -95,7 +95,8 @@ static QDeclarativePrivate::AutoParentResult qgraphicsobject_autoParent(QObject
void QDeclarativeItemModule::defineModule()
{
- QDeclarativePrivate::registerAutoParentFunction(qgraphicsobject_autoParent);
+ QDeclarativePrivate::RegisterAutoParent autoparent = { 0, &qgraphicsobject_autoParent };
+ QDeclarativePrivate::qmlregister(QDeclarativePrivate::AutoParentRegistration, &autoparent);
#ifdef QT_NO_MOVIE
qmlRegisterTypeNotAvailable("Qt",4,7,"AnimatedImage",
@@ -141,7 +142,9 @@ void QDeclarativeItemModule::defineModule()
qmlRegisterType<QGraphicsScale>("Qt",4,7,"Scale");
qmlRegisterType<QDeclarativeText>("Qt",4,7,"Text");
qmlRegisterType<QDeclarativeTextEdit>("Qt",4,7,"TextEdit");
+#ifndef QT_NO_LINEEDIT
qmlRegisterType<QDeclarativeTextInput>("Qt",4,7,"TextInput");
+#endif
qmlRegisterType<QDeclarativeViewSection>("Qt",4,7,"ViewSection");
qmlRegisterType<QDeclarativeVisualDataModel>("Qt",4,7,"VisualDataModel");
qmlRegisterType<QDeclarativeVisualItemModel>("Qt",4,7,"VisualItemModel");
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 110c970ff4..82b3e1c083 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -60,7 +60,7 @@ void QDeclarativeViewSection::setProperty(const QString &property)
{
if (property != m_property) {
m_property = property;
- emit changed();
+ emit propertyChanged();
}
}
@@ -68,7 +68,7 @@ void QDeclarativeViewSection::setCriteria(QDeclarativeViewSection::SectionCriter
{
if (criteria != m_criteria) {
m_criteria = criteria;
- emit changed();
+ emit criteriaChanged();
}
}
@@ -575,6 +575,8 @@ FxListItem *QDeclarativeListViewPrivate::createItem(int modelIndex)
listItem->attached->m_prevSection = item->attached->section();
else
listItem->attached->m_prevSection = sectionAt(modelIndex-1);
+ }
+ if (modelIndex < model->count()-1) {
if (FxListItem *item = visibleItem(modelIndex+1))
listItem->attached->m_nextSection = item->attached->section();
else
@@ -1385,14 +1387,16 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
the delegate is able to access the model's \c name and \c number data directly.
An improved list view is shown below. The delegate is visually improved and is moved
- into a separate \c contactDelegate component. Also, the currently selected item is highlighted
- with a blue \l Rectangle using the \l highlight property, and \c focus is set to \c true
- to enable keyboard navigation for the list view.
+ into a separate \c contactDelegate component.
\snippet doc/src/snippets/declarative/listview/listview.qml classdocs advanced
\image listview-highlight.png
- In a GridView, delegates are instantiated as needed and may be destroyed at any time.
+ The currently selected item is highlighted with a blue \l Rectangle using the \l highlight property,
+ and \c focus is set to \c true to enable keyboard navigation for the list view.
+ The list view itself is a focus scope (see \l{qmlfocus#Acquiring Focus and Focus Scopes}{the focus documentation page} for more details).
+
+ Delegates are instantiated as needed and may be destroyed at any time.
State should \e never be stored in a delegate.
\note Views do not enable \e clip automatically. If the view
@@ -1616,6 +1620,8 @@ void QDeclarativeListView::setDelegate(QDeclarativeComponent *delegate)
for (int i = 0; i < d->visibleItems.count(); ++i)
d->releaseItem(d->visibleItems.at(i));
d->visibleItems.clear();
+ d->releaseItem(d->currentItem);
+ d->currentItem = 0;
refill();
d->moveReason = QDeclarativeListViewPrivate::SetIndex;
d->updateCurrent(d->currentIndex);
@@ -1632,8 +1638,14 @@ void QDeclarativeListView::setDelegate(QDeclarativeComponent *delegate)
\qmlproperty int ListView::currentIndex
\qmlproperty Item ListView::currentItem
- \c currentIndex holds the index of the current item.
- \c currentItem is the current item. Note that the position of the current item
+ The \c currentIndex property holds the index of the current item, and
+ \c currentItem holds the current item.
+
+ If highlightFollowsCurrentItem is \c true, setting either of these
+ properties will smoothly scroll the ListView so that the current
+ item becomes visible.
+
+ Note that the position of the current item
may only be approximate until it becomes visible in the view.
*/
int QDeclarativeListView::currentIndex() const
@@ -1727,12 +1739,12 @@ void QDeclarativeListView::setHighlight(QDeclarativeComponent *highlight)
\qmlproperty bool ListView::highlightFollowsCurrentItem
This property holds whether the highlight is managed by the view.
- If this property is true, the highlight is moved smoothly
+ If this property is true (the default value), the highlight is moved smoothly
to follow the current item. Otherwise, the
highlight is not moved by the view, and any movement must be implemented
by the highlight.
- Here is a highlight with its motion defined by a \l {SpringAniamtion} item:
+ Here is a highlight with its motion defined by a \l {SpringAnimation} item:
\snippet doc/src/snippets/declarative/listview/listview.qml highlightFollowsCurrentItem
@@ -1848,6 +1860,8 @@ void QDeclarativeListView::setHighlightRangeMode(HighlightRangeMode mode)
\qmlproperty real ListView::spacing
This property holds the spacing between items.
+
+ The default value is 0.
*/
qreal QDeclarativeListView::spacing() const
{
@@ -1914,11 +1928,13 @@ void QDeclarativeListView::setOrientation(QDeclarativeListView::Orientation orie
/*!
\qmlproperty bool ListView::keyNavigationWraps
- This property holds whether the list wraps key navigation.
+ This property holds whether the list wraps key navigation.
If this is true, key navigation that would move the current item selection
past the end of the list instead wraps around and moves the selection to
the start of the list, and vice-versa.
+
+ By default, key navigation is not wrapped.
*/
bool QDeclarativeListView::isWrapEnabled() const
{
diff --git a/src/declarative/graphicsitems/qdeclarativelistview_p.h b/src/declarative/graphicsitems/qdeclarativelistview_p.h
index 9941040065..b26486181d 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview_p.h
+++ b/src/declarative/graphicsitems/qdeclarativelistview_p.h
@@ -53,8 +53,8 @@ QT_MODULE(Declarative)
class Q_AUTOTEST_EXPORT QDeclarativeViewSection : public QObject
{
Q_OBJECT
- Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY changed)
- Q_PROPERTY(SectionCriteria criteria READ criteria WRITE setCriteria NOTIFY changed)
+ Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY propertyChanged)
+ Q_PROPERTY(SectionCriteria criteria READ criteria WRITE setCriteria NOTIFY criteriaChanged)
Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
Q_ENUMS(SectionCriteria)
public:
@@ -73,7 +73,8 @@ public:
QString sectionString(const QString &value);
Q_SIGNALS:
- void changed();
+ void propertyChanged();
+ void criteriaChanged();
void delegateChanged();
private:
diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp
index e745ca66b0..d28181e520 100644
--- a/src/declarative/graphicsitems/qdeclarativeloader.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp
@@ -118,9 +118,9 @@ void QDeclarativeLoaderPrivate::initResize()
be instantiated may be specified directly by the \l sourceComponent
property, or loaded from a URL via the \l source property.
- 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 Loader element
- when the \l MouseArea is clicked:
+ 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 Loader element, when the \l MouseArea is clicked:
\code
import Qt 4.7
@@ -159,13 +159,15 @@ void QDeclarativeLoaderPrivate::initResize()
unloads "Page1.qml" and frees resources consumed by it.
+ Note that Loader is a focus scope. Its \c focus property must be set to \c true for any of its children
+ to get the \e {active focus} (see \l{qmlfocus#Acquiring Focus and Focus Scopes}{the focus documentation page} for more details).
+
\sa {dynamic-object-creation}{Dynamic Object Creation}
*/
/*!
\internal
\class QDeclarativeLoader
- \qmlclass Loader
*/
/*!
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index b7b0c9e186..dcdb9f6215 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -46,12 +46,14 @@
#include <QGraphicsSceneMouseEvent>
+#include <float.h>
+
QT_BEGIN_NAMESPACE
static const int PressAndHoldDelay = 800;
QDeclarativeDrag::QDeclarativeDrag(QObject *parent)
-: QObject(parent), _target(0), _axis(XandYAxis), _xmin(0), _xmax(0), _ymin(0), _ymax(0),
-_active(false)
+: QObject(parent), _target(0), _axis(XandYAxis), _xmin(-FLT_MAX), _xmax(FLT_MAX), _ymin(-FLT_MAX), _ymax(FLT_MAX),
+_active(false), _filterChildren(false)
{
}
@@ -158,12 +160,24 @@ void QDeclarativeDrag::setActive(bool drag)
emit activeChanged();
}
+bool QDeclarativeDrag::filterChildren() const
+{
+ return _filterChildren;
+}
+
+void QDeclarativeDrag::setFilterChildren(bool filter)
+{
+ if (_filterChildren == filter)
+ return;
+ _filterChildren = filter;
+ emit filterChildrenChanged();
+}
+
QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate()
{
delete drag;
}
-
/*!
\qmlclass MouseArea QDeclarativeMouseArea
\since 4.7
@@ -396,6 +410,7 @@ void QDeclarativeMouseArea::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(QDeclarativeMouseArea);
d->moved = false;
+ d->stealMouse = false;
if (!d->absorb)
QDeclarativeItem::mousePressEvent(event);
else {
@@ -454,8 +469,10 @@ void QDeclarativeMouseArea::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
const int dragThreshold = QApplication::startDragDistance();
qreal dx = qAbs(curLocalPos.x() - startLocalPos.x());
qreal dy = qAbs(curLocalPos.y() - startLocalPos.y());
- if ((d->dragX && !(dx < dragThreshold)) || (d->dragY && !(dy < dragThreshold)))
+ if ((d->dragX && !(dx < dragThreshold)) || (d->dragY && !(dy < dragThreshold))) {
d->drag->setActive(true);
+ d->stealMouse = true;
+ }
if (!keepMouseGrab()) {
if ((!d->dragY && dy < dragThreshold && d->dragX && dx > dragThreshold)
|| (!d->dragX && dx < dragThreshold && d->dragY && dy > dragThreshold)
@@ -493,6 +510,7 @@ void QDeclarativeMouseArea::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
void QDeclarativeMouseArea::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(QDeclarativeMouseArea);
+ d->stealMouse = false;
if (!d->absorb) {
QDeclarativeItem::mouseReleaseEvent(event);
} else {
@@ -503,6 +521,9 @@ void QDeclarativeMouseArea::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
// If we don't accept hover, we need to reset containsMouse.
if (!acceptHoverEvents())
setHovered(false);
+ QGraphicsScene *s = scene();
+ if (s && s->mouseGrabberItem() == this)
+ ungrabMouse();
setKeepMouseGrab(false);
}
}
@@ -577,6 +598,71 @@ bool QDeclarativeMouseArea::sceneEvent(QEvent *event)
return rv;
}
+bool QDeclarativeMouseArea::sendMouseEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeMouseArea);
+ QGraphicsSceneMouseEvent mouseEvent(event->type());
+ QRectF myRect = mapToScene(QRectF(0, 0, width(), height())).boundingRect();
+
+ QGraphicsScene *s = scene();
+ QDeclarativeItem *grabber = s ? qobject_cast<QDeclarativeItem*>(s->mouseGrabberItem()) : 0;
+ bool stealThisEvent = d->stealMouse;
+ if ((stealThisEvent || myRect.contains(event->scenePos().toPoint())) && (!grabber || !grabber->keepMouseGrab())) {
+ mouseEvent.setAccepted(false);
+ for (int i = 0x1; i <= 0x10; i <<= 1) {
+ if (event->buttons() & i) {
+ Qt::MouseButton button = Qt::MouseButton(i);
+ mouseEvent.setButtonDownPos(button, mapFromScene(event->buttonDownPos(button)));
+ }
+ }
+ mouseEvent.setScenePos(event->scenePos());
+ mouseEvent.setLastScenePos(event->lastScenePos());
+ mouseEvent.setPos(mapFromScene(event->scenePos()));
+ mouseEvent.setLastPos(mapFromScene(event->lastScenePos()));
+
+ switch(mouseEvent.type()) {
+ case QEvent::GraphicsSceneMouseMove:
+ mouseMoveEvent(&mouseEvent);
+ break;
+ case QEvent::GraphicsSceneMousePress:
+ mousePressEvent(&mouseEvent);
+ break;
+ case QEvent::GraphicsSceneMouseRelease:
+ mouseReleaseEvent(&mouseEvent);
+ break;
+ default:
+ break;
+ }
+ grabber = qobject_cast<QDeclarativeItem*>(s->mouseGrabberItem());
+ if (grabber && stealThisEvent && !grabber->keepMouseGrab() && grabber != this)
+ grabMouse();
+
+ return stealThisEvent;
+ }
+ if (mouseEvent.type() == QEvent::GraphicsSceneMouseRelease) {
+ d->stealMouse = false;
+ ungrabMouse();
+ }
+ return false;
+}
+
+bool QDeclarativeMouseArea::sceneEventFilter(QGraphicsItem *i, QEvent *e)
+{
+ Q_D(QDeclarativeMouseArea);
+ if (!d->absorb || !isVisible() || !d->drag || !d->drag->filterChildren())
+ return QDeclarativeItem::sceneEventFilter(i, e);
+ switch (e->type()) {
+ case QEvent::GraphicsSceneMousePress:
+ case QEvent::GraphicsSceneMouseMove:
+ case QEvent::GraphicsSceneMouseRelease:
+ return sendMouseEvent(static_cast<QGraphicsSceneMouseEvent *>(e));
+ default:
+ break;
+ }
+
+ return QDeclarativeItem::sceneEventFilter(i, e);
+}
+
void QDeclarativeMouseArea::timerEvent(QTimerEvent *event)
{
Q_D(QDeclarativeMouseArea);
@@ -757,6 +843,7 @@ QDeclarativeDrag *QDeclarativeMouseArea::drag()
\qmlproperty real MouseArea::drag.maximumX
\qmlproperty real MouseArea::drag.minimumY
\qmlproperty real MouseArea::drag.maximumY
+ \qmlproperty bool MouseArea::drag.filterChildren
\c drag provides a convenient way to make an item draggable.
@@ -777,6 +864,12 @@ QDeclarativeDrag *QDeclarativeMouseArea::drag()
for \c rect in the above example, it cannot be dragged along the X-axis.
This can be avoided by settng the anchor value to \c undefined in
an \l onPressed handler.
+
+ If \c drag.filterChildren is set to true, a drag can override descendant MouseAreas. This
+ enables a parent MouseArea to handle drags, for example, while descendants handle clicks:
+
+ \snippet doc/src/snippets/declarative/mouseareadragfilter.qml dragfilter
+
*/
QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea_p.h b/src/declarative/graphicsitems/qdeclarativemousearea_p.h
index 4fe3fcb5aa..0da7515b00 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea_p.h
+++ b/src/declarative/graphicsitems/qdeclarativemousearea_p.h
@@ -62,6 +62,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeDrag : public QObject
Q_PROPERTY(qreal minimumY READ ymin WRITE setYmin NOTIFY minimumYChanged)
Q_PROPERTY(qreal maximumY READ ymax WRITE setYmax NOTIFY maximumYChanged)
Q_PROPERTY(bool active READ active NOTIFY activeChanged)
+ Q_PROPERTY(bool filterChildren READ filterChildren WRITE setFilterChildren NOTIFY filterChildrenChanged)
//### consider drag and drop
public:
@@ -88,6 +89,9 @@ public:
bool active() const;
void setActive(bool);
+ bool filterChildren() const;
+ void setFilterChildren(bool);
+
Q_SIGNALS:
void targetChanged();
void axisChanged();
@@ -96,6 +100,7 @@ Q_SIGNALS:
void minimumYChanged();
void maximumYChanged();
void activeChanged();
+ void filterChildrenChanged();
private:
QGraphicsObject *_target;
@@ -104,7 +109,8 @@ private:
qreal _xmax;
qreal _ymin;
qreal _ymax;
- bool _active;
+ bool _active : 1;
+ bool _filterChildren: 1;
Q_DISABLE_COPY(QDeclarativeDrag)
};
@@ -177,6 +183,8 @@ protected:
void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
bool sceneEvent(QEvent *);
+ bool sendMouseEvent(QGraphicsSceneMouseEvent *event);
+ bool sceneEventFilter(QGraphicsItem *i, QEvent *e);
void timerEvent(QTimerEvent *event);
virtual void geometryChanged(const QRectF &newGeometry,
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h b/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h
index 3d7bd1e8f1..cf9dc183fa 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h
@@ -68,7 +68,7 @@ class QDeclarativeMouseAreaPrivate : public QDeclarativeItemPrivate
public:
QDeclarativeMouseAreaPrivate()
: absorb(true), hovered(false), pressed(false), longPress(false),
- moved(false), drag(0)
+ moved(false), stealMouse(false), drag(0)
{
}
@@ -78,6 +78,7 @@ public:
{
Q_Q(QDeclarativeMouseArea);
q->setAcceptedMouseButtons(Qt::LeftButton);
+ q->setFiltersChildEvents(true);
}
void saveEvent(QGraphicsSceneMouseEvent *event) {
@@ -101,6 +102,7 @@ public:
bool moved : 1;
bool dragX : 1;
bool dragY : 1;
+ bool stealMouse : 1;
QDeclarativeDrag *drag;
QPointF startScene;
qreal startX;
diff --git a/src/declarative/graphicsitems/qdeclarativepainteditem.cpp b/src/declarative/graphicsitems/qdeclarativepainteditem.cpp
index 3b9b8df687..a6db1fa7fe 100644
--- a/src/declarative/graphicsitems/qdeclarativepainteditem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepainteditem.cpp
@@ -90,6 +90,8 @@ QT_BEGIN_NAMESPACE
static int inpaint=0;
static int inpaint_clearcache=0;
+extern Q_GUI_EXPORT bool qt_applefontsmoothing_enabled;
+
/*!
Marks areas of the cache that intersect with the given \a rect as dirty and
in need of being refreshed.
@@ -287,7 +289,14 @@ void QDeclarativePaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem
QRectF target(area.x(), area.y(), area.width(), area.height());
if (!d->cachefrozen) {
if (!d->imagecache[i]->dirty.isNull() && topaint.contains(d->imagecache[i]->dirty)) {
+#ifdef Q_WS_MAC
+ bool oldSmooth = qt_applefontsmoothing_enabled;
+ qt_applefontsmoothing_enabled = false;
+#endif
QPainter qp(&d->imagecache[i]->image);
+#ifdef Q_WS_MAC
+ qt_applefontsmoothing_enabled = oldSmooth;
+#endif
qp.setRenderHints(QPainter::HighQualityAntialiasing | QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform, d->smoothCache);
qp.translate(-area.x(), -area.y());
qp.scale(d->contentsScale,d->contentsScale);
@@ -349,7 +358,14 @@ void QDeclarativePaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem
if (d->fillColor.isValid())
img.fill(d->fillColor);
{
+#ifdef Q_WS_MAC
+ bool oldSmooth = qt_applefontsmoothing_enabled;
+ qt_applefontsmoothing_enabled = false;
+#endif
QPainter qp(&img);
+#ifdef Q_WS_MAC
+ qt_applefontsmoothing_enabled = oldSmooth;
+#endif
qp.setRenderHints(QPainter::HighQualityAntialiasing | QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform, d->smoothCache);
qp.translate(-r.x(),-r.y());
diff --git a/src/declarative/graphicsitems/qdeclarativepath.cpp b/src/declarative/graphicsitems/qdeclarativepath.cpp
index a904869532..c48011d3f6 100644
--- a/src/declarative/graphicsitems/qdeclarativepath.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepath.cpp
@@ -474,6 +474,7 @@ void QDeclarativeCurve::setX(qreal x)
{
if (_x != x) {
_x = x;
+ emit xChanged();
emit changed();
}
}
@@ -487,6 +488,7 @@ void QDeclarativeCurve::setY(qreal y)
{
if (_y != y) {
_y = y;
+ emit yChanged();
emit changed();
}
}
@@ -533,6 +535,13 @@ void QDeclarativeCurve::setY(qreal y)
/*!
\qmlproperty string PathAttribute::name
the name of the attribute to change.
+
+ This attribute will be available to the delegate as PathView.<name>
+
+ Note that using an existing Item property name such as "opacity" as an
+ attribute is allowed. This is because path attributes add a new
+ \l{qdeclarativeintroduction.html#attached-properties} {Attached Property}
+ which in no way clashes with existing properties.
*/
/*!
@@ -569,6 +578,7 @@ void QDeclarativePathAttribute::setValue(qreal value)
{
if (_value != value) {
_value = value;
+ emit valueChanged();
emit changed();
}
}
@@ -671,6 +681,7 @@ void QDeclarativePathQuad::setControlX(qreal x)
{
if (_controlX != x) {
_controlX = x;
+ emit controlXChanged();
emit changed();
}
}
@@ -688,6 +699,7 @@ void QDeclarativePathQuad::setControlY(qreal y)
{
if (_controlY != y) {
_controlY = y;
+ emit controlYChanged();
emit changed();
}
}
@@ -754,6 +766,7 @@ void QDeclarativePathCubic::setControl1X(qreal x)
{
if (_control1X != x) {
_control1X = x;
+ emit control1XChanged();
emit changed();
}
}
@@ -767,6 +780,7 @@ void QDeclarativePathCubic::setControl1Y(qreal y)
{
if (_control1Y != y) {
_control1Y = y;
+ emit control1YChanged();
emit changed();
}
}
@@ -786,6 +800,7 @@ void QDeclarativePathCubic::setControl2X(qreal x)
{
if (_control2X != x) {
_control2X = x;
+ emit control2XChanged();
emit changed();
}
}
@@ -799,6 +814,7 @@ void QDeclarativePathCubic::setControl2Y(qreal y)
{
if (_control2Y != y) {
_control2Y = y;
+ emit control2YChanged();
emit changed();
}
}
diff --git a/src/declarative/graphicsitems/qdeclarativepath_p.h b/src/declarative/graphicsitems/qdeclarativepath_p.h
index 001bcdfbd0..5ab5cfd635 100644
--- a/src/declarative/graphicsitems/qdeclarativepath_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepath_p.h
@@ -68,7 +68,7 @@ class Q_AUTOTEST_EXPORT QDeclarativePathAttribute : public QDeclarativePathEleme
Q_OBJECT
Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
- Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY changed)
+ Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged)
public:
QDeclarativePathAttribute(QObject *parent=0) : QDeclarativePathElement(parent), _value(0) {}
@@ -81,6 +81,7 @@ public:
Q_SIGNALS:
void nameChanged();
+ void valueChanged();
private:
QString _name;
@@ -91,8 +92,8 @@ class Q_AUTOTEST_EXPORT QDeclarativeCurve : public QDeclarativePathElement
{
Q_OBJECT
- Q_PROPERTY(qreal x READ x WRITE setX NOTIFY changed)
- Q_PROPERTY(qreal y READ y WRITE setY NOTIFY changed)
+ Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged)
+ Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged)
public:
QDeclarativeCurve(QObject *parent=0) : QDeclarativePathElement(parent), _x(0), _y(0) {}
@@ -104,6 +105,10 @@ public:
virtual void addToPath(QPainterPath &) {}
+Q_SIGNALS:
+ void xChanged();
+ void yChanged();
+
private:
qreal _x;
qreal _y;
@@ -122,8 +127,8 @@ class Q_AUTOTEST_EXPORT QDeclarativePathQuad : public QDeclarativeCurve
{
Q_OBJECT
- Q_PROPERTY(qreal controlX READ controlX WRITE setControlX NOTIFY changed)
- Q_PROPERTY(qreal controlY READ controlY WRITE setControlY NOTIFY changed)
+ Q_PROPERTY(qreal controlX READ controlX WRITE setControlX NOTIFY controlXChanged)
+ Q_PROPERTY(qreal controlY READ controlY WRITE setControlY NOTIFY controlYChanged)
public:
QDeclarativePathQuad(QObject *parent=0) : QDeclarativeCurve(parent), _controlX(0), _controlY(0) {}
@@ -135,6 +140,10 @@ public:
void addToPath(QPainterPath &path);
+Q_SIGNALS:
+ void controlXChanged();
+ void controlYChanged();
+
private:
qreal _controlX;
qreal _controlY;
@@ -144,10 +153,10 @@ class Q_AUTOTEST_EXPORT QDeclarativePathCubic : public QDeclarativeCurve
{
Q_OBJECT
- Q_PROPERTY(qreal control1X READ control1X WRITE setControl1X NOTIFY changed)
- Q_PROPERTY(qreal control1Y READ control1Y WRITE setControl1Y NOTIFY changed)
- Q_PROPERTY(qreal control2X READ control2X WRITE setControl2X NOTIFY changed)
- Q_PROPERTY(qreal control2Y READ control2Y WRITE setControl2Y NOTIFY changed)
+ Q_PROPERTY(qreal control1X READ control1X WRITE setControl1X NOTIFY control1XChanged)
+ Q_PROPERTY(qreal control1Y READ control1Y WRITE setControl1Y NOTIFY control1YChanged)
+ Q_PROPERTY(qreal control2X READ control2X WRITE setControl2X NOTIFY control2XChanged)
+ Q_PROPERTY(qreal control2Y READ control2Y WRITE setControl2Y NOTIFY control2YChanged)
public:
QDeclarativePathCubic(QObject *parent=0) : QDeclarativeCurve(parent), _control1X(0), _control1Y(0), _control2X(0), _control2Y(0) {}
@@ -165,11 +174,17 @@ public:
void addToPath(QPainterPath &path);
+Q_SIGNALS:
+ void control1XChanged();
+ void control1YChanged();
+ void control2XChanged();
+ void control2YChanged();
+
private:
- int _control1X;
- int _control1Y;
- int _control2X;
- int _control2Y;
+ qreal _control1X;
+ qreal _control1Y;
+ qreal _control2X;
+ qreal _control2Y;
};
class Q_AUTOTEST_EXPORT QDeclarativePathPercent : public QDeclarativePathElement
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index f4ebd136f8..06ac275cd8 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -90,6 +90,26 @@ void QDeclarativePathViewAttached::setValue(const QByteArray &name, const QVaria
m_metaobject->setValue(name, val);
}
+
+void QDeclarativePathViewPrivate::init()
+{
+ Q_Q(QDeclarativePathView);
+ offset = 0;
+ q->setAcceptedMouseButtons(Qt::LeftButton);
+ q->setFlag(QGraphicsItem::ItemIsFocusScope);
+ q->setFiltersChildEvents(true);
+ q->connect(&tl, SIGNAL(updated()), q, SLOT(ticked()));
+ lastPosTime.invalidate();
+ static int timelineCompletedIdx = -1;
+ static int movementEndingIdx = -1;
+ if (timelineCompletedIdx == -1) {
+ timelineCompletedIdx = QDeclarativeTimeLine::staticMetaObject.indexOfSignal("completed()");
+ movementEndingIdx = QDeclarativePathView::staticMetaObject.indexOfSlot("movementEnding()");
+ }
+ QMetaObject::connect(&tl, timelineCompletedIdx,
+ q, movementEndingIdx, Qt::DirectConnection);
+}
+
QDeclarativeItem *QDeclarativePathViewPrivate::getItem(int modelIndex)
{
Q_Q(QDeclarativePathView);
@@ -284,8 +304,8 @@ void QDeclarativePathViewPrivate::updateItem(QDeclarativeItem *item, qreal perce
att->setValue(attr.toUtf8(), path->attributeAt(attr, percent));
}
QPointF pf = path->pointAt(percent);
- item->setX(qRound(pf.x() - item->width()*item->scale()/2));
- item->setY(qRound(pf.y() - item->height()*item->scale()/2));
+ item->setX(qRound(pf.x() - item->width()/2));
+ item->setY(qRound(pf.y() - item->height()/2));
}
void QDeclarativePathViewPrivate::regenerate()
@@ -314,7 +334,7 @@ void QDeclarativePathViewPrivate::regenerate()
and XmlListModel, or custom model classes defined in C++ that inherit from
QAbstractListModel.
- A ListView has a \l model, which defines the data to be displayed, and
+ The view has a \l model, which defines the data to be displayed, and
a \l delegate, which defines how the data should be displayed.
The \l delegate is instantiated for each item on the \l path.
The items may be flicked to move them along the path.
@@ -333,6 +353,9 @@ void QDeclarativePathViewPrivate::regenerate()
opacity of the items as they rotate. This additional code can be seen in the
PathAttribute documentation.)
+ The \c focus can be set to \c true to enable keyboard navigation.
+ The path view itself is a focus scope (see \l{qmlfocus#Acquiring Focus and Focus Scopes}{the focus documentation page} for more details).
+
Delegates are instantiated as needed and may be destroyed at any time.
State should \e never be stored in a delegate.
@@ -341,7 +364,7 @@ void QDeclarativePathViewPrivate::regenerate()
to set \e {clip: true} in order to have the out of view items clipped
nicely.
- \sa Path
+ \sa Path, {declarative/modelviews/pathview}{PathView example}
*/
QDeclarativePathView::QDeclarativePathView(QDeclarativeItem *parent)
@@ -848,6 +871,61 @@ void QDeclarativePathView::setInteractive(bool interactive)
}
/*!
+ \qmlproperty bool PathView::moving
+
+ This property holds whether the view is currently moving
+ due to the user either dragging or flicking the view.
+*/
+bool QDeclarativePathView::isMoving() const
+{
+ Q_D(const QDeclarativePathView);
+ return d->moving;
+}
+
+/*!
+ \qmlproperty bool PathView::flicking
+
+ This property holds whether the view is currently moving
+ due to the user flicking the view.
+*/
+bool QDeclarativePathView::isFlicking() const
+{
+ Q_D(const QDeclarativePathView);
+ return d->flicking;
+}
+
+/*!
+ \qmlsignal PathView::onMovementStarted()
+
+ This handler is called when the view begins moving due to user
+ interaction.
+*/
+
+/*!
+ \qmlsignal PathView::onMovementEnded()
+
+ This handler is called when the view stops moving due to user
+ interaction. If a flick was generated, this handler will
+ be triggered once the flick stops. If a flick was not
+ generated, the handler will be triggered when the
+ user stops dragging - i.e. a mouse or touch release.
+*/
+
+/*!
+ \qmlsignal PathView::onFlickStarted()
+
+ This handler is called when the view is flicked. A flick
+ starts from the point that the mouse or touch is released,
+ while still in motion.
+*/
+
+/*!
+ \qmlsignal PathView::onFlickEnded()
+
+ This handler is called when the view stops moving due to a flick.
+*/
+
+/*!
\qmlproperty Component PathView::delegate
The delegate provides a template defining each item instantiated by the view.
@@ -964,7 +1042,11 @@ void QDeclarativePathView::mousePressEvent(QGraphicsSceneMouseEvent *event)
return;
}
- d->stealMouse = false;
+ if (d->tl.isActive() && d->flicking)
+ d->stealMouse = true; // If we've been flicked then steal the click.
+ else
+ d->stealMouse = false;
+
d->lastElapsed = 0;
d->lastDist = 0;
QDeclarativeItemPrivate::start(d->lastPosTime);
@@ -1000,6 +1082,11 @@ void QDeclarativePathView::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
d->lastDist = diff;
d->startPc = newPc;
}
+ if (!d->moving) {
+ d->moving = true;
+ emit movingChanged();
+ emit movementStarted();
+ }
}
}
@@ -1039,12 +1126,19 @@ void QDeclarativePathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *)
d->moveOffset.setValue(d->offset);
d->tl.accel(d->moveOffset, velocity, accel, dist);
d->tl.callback(QDeclarativeTimeLineCallback(&d->moveOffset, d->fixOffsetCallback, d));
+ if (!d->flicking) {
+ d->flicking = true;
+ emit flickingChanged();
+ emit flickStarted();
+ }
} else {
d->fixOffset();
}
d->lastPosTime.invalidate();
ungrabMouse();
+ if (!d->tl.isActive())
+ movementEnding();
}
bool QDeclarativePathView::sendMouseEvent(QGraphicsSceneMouseEvent *event)
@@ -1372,6 +1466,21 @@ void QDeclarativePathView::ticked()
d->updateCurrent();
}
+void QDeclarativePathView::movementEnding()
+{
+ Q_D(QDeclarativePathView);
+ if (d->flicking) {
+ d->flicking = false;
+ emit flickingChanged();
+ emit flickEnded();
+ }
+ if (d->moving && !d->stealMouse) {
+ d->moving = false;
+ emit movingChanged();
+ emit movementEnded();
+ }
+}
+
// find the item closest to the snap position
int QDeclarativePathViewPrivate::calcCurrentIndex()
{
diff --git a/src/declarative/graphicsitems/qdeclarativepathview_p.h b/src/declarative/graphicsitems/qdeclarativepathview_p.h
index d2980c6fcd..035a64b762 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepathview_p.h
@@ -74,6 +74,9 @@ class Q_AUTOTEST_EXPORT QDeclarativePathView : public QDeclarativeItem
Q_PROPERTY(qreal flickDeceleration READ flickDeceleration WRITE setFlickDeceleration NOTIFY flickDecelerationChanged)
Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged)
+ Q_PROPERTY(bool moving READ isMoving NOTIFY movingChanged)
+ Q_PROPERTY(bool flicking READ isFlicking NOTIFY flickingChanged)
+
Q_PROPERTY(int count READ count NOTIFY countChanged)
Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
Q_PROPERTY(int pathItemCount READ pathItemCount WRITE setPathItemCount NOTIFY pathItemCountChanged)
@@ -122,6 +125,9 @@ public:
bool isInteractive() const;
void setInteractive(bool);
+ bool isMoving() const;
+ bool isFlicking() const;
+
int count() const;
QDeclarativeComponent *delegate() const;
@@ -151,9 +157,15 @@ Q_SIGNALS:
void pathItemCountChanged();
void flickDecelerationChanged();
void interactiveChanged();
+ void movingChanged();
+ void flickingChanged();
void highlightChanged();
void highlightItemChanged();
void highlightMoveDurationChanged();
+ void movementStarted();
+ void movementEnded();
+ void flickStarted();
+ void flickEnded();
protected:
void mousePressEvent(QGraphicsSceneMouseEvent *event);
@@ -167,6 +179,7 @@ protected:
private Q_SLOTS:
void refill();
void ticked();
+ void movementEnding();
void itemsInserted(int index, int count);
void itemsRemoved(int index, int count);
void itemsMoved(int,int,int);
diff --git a/src/declarative/graphicsitems/qdeclarativepathview_p_p.h b/src/declarative/graphicsitems/qdeclarativepathview_p_p.h
index a0d2610712..9abec2eb4f 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepathview_p_p.h
@@ -78,6 +78,7 @@ public:
, lastElapsed(0), mappedRange(1.0)
, stealMouse(false), ownModel(false), interactive(true), haveHighlightRange(true)
, autoHighlight(true), highlightUp(false), layoutScheduled(false)
+ , moving(false), flicking(false)
, dragMargin(0), deceleration(100)
, moveOffset(this, &QDeclarativePathViewPrivate::setOffset)
, firstIndex(-1), pathItems(-1), requestedIndex(-1)
@@ -90,15 +91,7 @@ public:
{
}
- void init() {
- Q_Q(QDeclarativePathView);
- offset = 0;
- q->setAcceptedMouseButtons(Qt::LeftButton);
- q->setFlag(QGraphicsItem::ItemIsFocusScope);
- q->setFiltersChildEvents(true);
- q->connect(&tl, SIGNAL(updated()), q, SLOT(ticked()));
- lastPosTime.invalidate();
- }
+ void init();
void itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry) {
if ((newGeometry.size() != oldGeometry.size())
@@ -155,6 +148,8 @@ public:
bool autoHighlight : 1;
bool highlightUp : 1;
bool layoutScheduled : 1;
+ bool moving : 1;
+ bool flicking : 1;
QElapsedTimer lastPosTime;
QPointF lastPos;
qreal dragMargin;
diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
index 3be4014154..2b268fbe7b 100644
--- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
@@ -148,7 +148,6 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate()
/*!
\internal
\class QDeclarativeRepeater
- \qmlclass Repeater
*/
/*!
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
index 9a281e59b7..ab2be9c5f0 100644
--- a/src/declarative/graphicsitems/qdeclarativetext.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
@@ -57,6 +57,8 @@
QT_BEGIN_NAMESPACE
+extern Q_GUI_EXPORT bool qt_applefontsmoothing_enabled;
+
class QTextDocumentWithImageResources : public QTextDocument {
Q_OBJECT
@@ -301,8 +303,7 @@ QDeclarativeTextPrivate::~QDeclarativeTextPrivate()
Sets the letter spacing for the font.
Letter spacing changes the default spacing between individual letters in the font.
- A value of 100 will keep the spacing unchanged; a value of 200 will enlarge the spacing after a character by
- the width of the character itself.
+ A positive value increases the letter spacing by the corresponding pixels; a negative value decreases the spacing.
*/
/*!
@@ -711,61 +712,37 @@ QRectF QDeclarativeText::boundingRect() const
int x = 0;
int y = 0;
- // Could include font max left/right bearings to either side of rectangle.
-
- if (d->cache || d->style != Normal) {
- switch (d->hAlign) {
- case AlignLeft:
- x = 0;
- break;
- case AlignRight:
- x = w - d->imgCache.width();
- break;
- case AlignHCenter:
- x = (w - d->imgCache.width()) / 2;
- break;
- }
-
- switch (d->vAlign) {
- case AlignTop:
- y = 0;
- break;
- case AlignBottom:
- y = h - d->imgCache.height();
- break;
- case AlignVCenter:
- y = (h - d->imgCache.height()) / 2;
- break;
- }
+ QSize size = d->cachedLayoutSize;
+ if (d->style != Normal)
+ size += QSize(2,2);
- return QRectF(x,y,d->imgCache.width(),d->imgCache.height());
- } else {
- switch (d->hAlign) {
- case AlignLeft:
- x = 0;
- break;
- case AlignRight:
- x = w - d->cachedLayoutSize.width();
- break;
- case AlignHCenter:
- x = (w - d->cachedLayoutSize.width()) / 2;
- break;
- }
+ // Could include font max left/right bearings to either side of rectangle.
- switch (d->vAlign) {
- case AlignTop:
- y = 0;
- break;
- case AlignBottom:
- y = h - d->cachedLayoutSize.height();
- break;
- case AlignVCenter:
- y = (h - d->cachedLayoutSize.height()) / 2;
- break;
- }
+ switch (d->hAlign) {
+ case AlignLeft:
+ x = 0;
+ break;
+ case AlignRight:
+ x = w - size.width();
+ break;
+ case AlignHCenter:
+ x = (w - size.width()) / 2;
+ break;
+ }
- return QRectF(x,y,d->cachedLayoutSize.width(),d->cachedLayoutSize.height());
+ switch (d->vAlign) {
+ case AlignTop:
+ y = 0;
+ break;
+ case AlignBottom:
+ y = h - size.height();
+ break;
+ case AlignVCenter:
+ y = (h - size.height()) / 2;
+ break;
}
+
+ return QRectF(x,y,size.width(),size.height());
}
void QDeclarativeText::geometryChanged(const QRectF &newGeometry,
@@ -1028,7 +1005,14 @@ QPixmap QDeclarativeTextPrivate::wrappedTextImage(bool drawStyle)
QPixmap img(size);
if (!size.isEmpty()) {
img.fill(Qt::transparent);
+#ifdef Q_WS_MAC
+ bool oldSmooth = qt_applefontsmoothing_enabled;
+ qt_applefontsmoothing_enabled = false;
+#endif
QPainter p(&img);
+#ifdef Q_WS_MAC
+ qt_applefontsmoothing_enabled = oldSmooth;
+#endif
drawWrappedText(&p, QPointF(0,0), drawStyle);
}
return img;
@@ -1051,7 +1035,14 @@ QPixmap QDeclarativeTextPrivate::richTextImage(bool drawStyle)
//paint text
QPixmap img(size);
img.fill(Qt::transparent);
+#ifdef Q_WS_MAC
+ bool oldSmooth = qt_applefontsmoothing_enabled;
+ qt_applefontsmoothing_enabled = false;
+#endif
QPainter p(&img);
+#ifdef Q_WS_MAC
+ qt_applefontsmoothing_enabled = oldSmooth;
+#endif
QAbstractTextDocumentLayout::PaintContext context;
@@ -1127,6 +1118,15 @@ int QDeclarativeText::resourcesLoading() const
return d->doc ? d->doc->resourcesLoading() : 0;
}
+/*!
+ \qmlproperty bool Text::clip
+ This property holds whether the text is clipped.
+
+ Note that if the text does not fit in the bounding rectangle it will be abruptly chopped.
+
+ If you want to display potentially long text in a limited space, you probably want to use \c elide instead.
+*/
+
void QDeclarativeText::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
{
Q_D(QDeclarativeText);
@@ -1146,13 +1146,10 @@ void QDeclarativeText::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWid
bool needClip = clip() && (d->imgCache.width() > width() ||
d->imgCache.height() > height());
- if (needClip) {
- p->save();
- p->setClipRect(boundingRect(), Qt::IntersectClip);
- }
- p->drawPixmap(br.x(), br.y(), d->imgCache);
if (needClip)
- p->restore();
+ p->drawPixmap(0, 0, width(), height(), d->imgCache, -br.x(), -br.y(), width(), height());
+ else
+ p->drawPixmap(br.x(), br.y(), d->imgCache);
if (d->smooth) {
p->setRenderHint(QPainter::Antialiasing, oldAA);
@@ -1166,7 +1163,7 @@ void QDeclarativeText::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWid
if (needClip) {
p->save();
- p->setClipRect(boundingRect(), Qt::IntersectClip);
+ p->setClipRect(0, 0, width(), height(), Qt::IntersectClip);
}
if (d->richText) {
QAbstractTextDocumentLayout::PaintContext context;
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index f3eef23755..8117676524 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -202,8 +202,9 @@ QString QDeclarativeTextEdit::text() const
Sets the font size in pixels.
- Using this function makes the font device dependent.
- Use \l font.pointSize to set the size of the font in a device independent manner.
+ Using this function makes the font device dependent. Use
+ \l{TextEdit::font.pointSize} to set the size of the font in a
+ device independent manner.
*/
/*!
@@ -212,8 +213,7 @@ QString QDeclarativeTextEdit::text() const
Sets the letter spacing for the font.
Letter spacing changes the default spacing between individual letters in the font.
- A value of 100 will keep the spacing unchanged; a value of 200 will enlarge the spacing after a character by
- the width of the character itself.
+ A positive value increases the letter spacing by the corresponding pixels; a negative value decreases the spacing.
*/
/*!
@@ -256,7 +256,6 @@ void QDeclarativeTextEdit::setText(const QString &text)
Q_D(QDeclarativeTextEdit);
if (QDeclarativeTextEdit::text() == text)
return;
- d->text = text;
d->richText = d->format == RichText || (d->format == AutoText && Qt::mightBeRichText(text));
if (d->richText) {
#ifndef QT_NO_TEXTHTMLPARSER
@@ -624,7 +623,7 @@ void QDeclarativeTextEdit::moveCursorSelection(int pos)
\qmlproperty bool TextEdit::cursorVisible
If true the text edit shows a cursor.
- This property is set and unset when the text edit gets focus, but it can also
+ This property is set and unset when the text edit gets active focus, but it can also
be set directly (useful, for example, if a KeyProxy might forward keys to it).
*/
bool QDeclarativeTextEdit::isCursorVisible() const
@@ -783,9 +782,9 @@ QString QDeclarativeTextEdit::selectedText() const
}
/*!
- \qmlproperty bool TextEdit::focusOnPress
+ \qmlproperty bool TextEdit::activeFocusOnPress
- Whether the TextEdit should gain focus on a mouse press. By default this is
+ Whether the TextEdit should gain active focus on a mouse press. By default this is
set to true.
*/
bool QDeclarativeTextEdit::focusOnPress() const
@@ -800,13 +799,13 @@ void QDeclarativeTextEdit::setFocusOnPress(bool on)
if (d->focusOnPress == on)
return;
d->focusOnPress = on;
- emit focusOnPressChanged(d->focusOnPress);
+ emit activeFocusOnPressChanged(d->focusOnPress);
}
/*!
\qmlproperty bool TextEdit::persistentSelection
- Whether the TextEdit should keep the selection visible when it loses focus to another
+ Whether the TextEdit should keep the selection visible when it loses active focus to another
item in the scene. By default this is set to true;
*/
bool QDeclarativeTextEdit::persistentSelection() const
@@ -1106,15 +1105,15 @@ void QDeclarativeTextEdit::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(QDeclarativeTextEdit);
if (d->focusOnPress){
- bool hadFocus = hasFocus();
- forceFocus();
+ bool hadActiveFocus = hasActiveFocus();
+ forceActiveFocus();
if (d->showInputPanelOnFocus) {
- if (hasFocus() && hadFocus && !isReadOnly()) {
+ if (hasActiveFocus() && hadActiveFocus && !isReadOnly()) {
// re-open input panel on press if already focused
openSoftwareInputPanel();
}
} else { // show input panel on click
- if (hasFocus() && !hadFocus) {
+ if (hasActiveFocus() && !hadActiveFocus) {
d->clickCausedFocus = true;
}
}
@@ -1291,9 +1290,11 @@ void QDeclarativeTextEditPrivate::init()
void QDeclarativeTextEdit::q_textChanged()
{
+ Q_D(QDeclarativeTextEdit);
+ d->text = text();
updateSize();
updateMicroFocus();
- emit textChanged(text());
+ emit textChanged(d->text);
}
void QDeclarativeTextEdit::moveCursorDelegate()
@@ -1427,10 +1428,10 @@ void QDeclarativeTextEditPrivate::updateDefaultTextOption()
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. On other platforms
- the panels are automatically opened when TextEdit element gains focus. Input panels are
- always closed if no editor owns focus.
+ the panels are automatically opened when TextEdit element gains active focus. Input panels are
+ always closed if no editor has active 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 activeFocusOnPress to false
and use functions openSoftwareInputPanel() and closeSoftwareInputPanel() to implement
the behavior you want.
@@ -1441,12 +1442,12 @@ void QDeclarativeTextEditPrivate::updateDefaultTextOption()
TextEdit {
id: textEdit
text: "Hello world!"
- focusOnPress: false
+ activeFocusOnPress: false
MouseArea {
anchors.fill: parent
onClicked: {
- if (!textEdit.focus) {
- textEdit.focus = true;
+ if (!textEdit.activeFocus) {
+ textEdit.forceActiveFocus();
textEdit.openSoftwareInputPanel();
} else {
textEdit.focus = false;
@@ -1478,10 +1479,10 @@ void QDeclarativeTextEdit::openSoftwareInputPanel()
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. On other platforms
- the panels are automatically opened when TextEdit element gains focus. Input panels are
- always closed if no editor owns focus.
+ the panels are automatically opened when TextEdit element gains active focus. Input panels are
+ always closed if no editor has active 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 activeFocusOnPress to false
and use functions openSoftwareInputPanel() and closeSoftwareInputPanel() to implement
the behavior you want.
@@ -1492,12 +1493,12 @@ void QDeclarativeTextEdit::openSoftwareInputPanel()
TextEdit {
id: textEdit
text: "Hello world!"
- focusOnPress: false
+ activeFocusOnPress: false
MouseArea {
anchors.fill: parent
onClicked: {
- if (!textEdit.focus) {
- textEdit.focus = true;
+ if (!textEdit.activeFocus) {
+ textEdit.forceActiveFocus();
textEdit.openSoftwareInputPanel();
} else {
textEdit.focus = false;
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h
index 279af78a3b..68fde3d9e7 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h
@@ -85,7 +85,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeTextEdit : public QDeclarativePaintedItem
Q_PROPERTY(int selectionStart READ selectionStart NOTIFY selectionStartChanged)
Q_PROPERTY(int selectionEnd READ selectionEnd NOTIFY selectionEndChanged)
Q_PROPERTY(QString selectedText READ selectedText NOTIFY selectionChanged)
- Q_PROPERTY(bool focusOnPress READ focusOnPress WRITE setFocusOnPress NOTIFY focusOnPressChanged)
+ Q_PROPERTY(bool activeFocusOnPress READ focusOnPress WRITE setFocusOnPress NOTIFY activeFocusOnPressChanged)
Q_PROPERTY(bool persistentSelection READ persistentSelection WRITE setPersistentSelection NOTIFY persistentSelectionChanged)
Q_PROPERTY(qreal textMargin READ textMargin WRITE setTextMargin NOTIFY textMarginChanged)
Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints)
@@ -216,7 +216,7 @@ Q_SIGNALS:
void readOnlyChanged(bool isReadOnly);
void cursorVisibleChanged(bool isCursorVisible);
void cursorDelegateChanged();
- void focusOnPressChanged(bool focusIsPressed);
+ void activeFocusOnPressChanged(bool activeFocusOnPressed);
void persistentSelectionChanged(bool isPersistentSelection);
void textMarginChanged(qreal textMargin);
void selectByMouseChanged(bool selectByMouse);
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index 2a5d73d97a..90f5a701dc 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -51,6 +51,8 @@
#include <QFontMetrics>
#include <QPainter>
+#ifndef QT_NO_LINEEDIT
+
QT_BEGIN_NAMESPACE
/*!
@@ -176,8 +178,7 @@ void QDeclarativeTextInput::setText(const QString &s)
Sets the letter spacing for the font.
Letter spacing changes the default spacing between individual letters in the font.
- A value of 100 will keep the spacing unchanged; a value of 200 will enlarge the spacing after a character by
- the width of the character itself.
+ A positive value increases the letter spacing by the corresponding pixels; a negative value decreases the spacing.
*/
/*!
@@ -376,14 +377,14 @@ void QDeclarativeTextInput::setMaxLength(int ml)
\qmlproperty bool TextInput::cursorVisible
Set to true when the TextInput shows a cursor.
- This property is set and unset when the TextInput gets focus, so that other
+ This property is set and unset when the TextInput gets active focus, so that other
properties can be bound to whether the cursor is currently showing. As it
gets set and unset automatically, when you set the value yourself you must
keep in mind that your value may be overwritten.
It can be set directly in script, for example if a KeyProxy might
forward keys to it and you desire it to look active when this happens
- (but without actually giving it the focus).
+ (but without actually giving it active focus).
It should not be set directly on the element, like in the below QML,
as the specified value will be overridden an lost on focus changes.
@@ -396,7 +397,7 @@ void QDeclarativeTextInput::setMaxLength(int ml)
\endcode
In the above snippet the cursor will still become visible when the
- TextInput gains focus.
+ TextInput gains active focus.
*/
bool QDeclarativeTextInput::isCursorVisible() const
{
@@ -511,9 +512,9 @@ QString QDeclarativeTextInput::selectedText() const
}
/*!
- \qmlproperty bool TextInput::focusOnPress
+ \qmlproperty bool TextInput::activeFocusOnPress
- Whether the TextInput should gain focus on a mouse press. By default this is
+ Whether the TextInput should gain active focus on a mouse press. By default this is
set to true.
*/
bool QDeclarativeTextInput::focusOnPress() const
@@ -530,7 +531,7 @@ void QDeclarativeTextInput::setFocusOnPress(bool b)
d->focusOnPress = b;
- emit focusOnPressChanged(d->focusOnPress);
+ emit activeFocusOnPressChanged(d->focusOnPress);
}
/*!
@@ -946,15 +947,15 @@ void QDeclarativeTextInput::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(QDeclarativeTextInput);
if(d->focusOnPress){
- bool hadFocus = hasFocus();
- forceFocus();
+ bool hadActiveFocus = hasActiveFocus();
+ forceActiveFocus();
if (d->showInputPanelOnFocus) {
- if (hasFocus() && hadFocus && !isReadOnly()) {
+ if (hasActiveFocus() && hadActiveFocus && !isReadOnly()) {
// re-open input panel on press if already focused
openSoftwareInputPanel();
}
} else { // show input panel on click
- if (hasFocus() && !hadFocus) {
+ if (hasActiveFocus() && !hadActiveFocus) {
d->clickCausedFocus = true;
}
}
@@ -1313,10 +1314,10 @@ void QDeclarativeTextInput::moveCursorSelection(int position)
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. On other platforms
- the panels are automatically opened when TextInput element gains focus. Input panels are
- always closed if no editor owns focus.
+ the panels are automatically opened when TextInput element gains active focus. Input panels are
+ always closed if no editor has active 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 activeFocusOnPress to false
and use functions openSoftwareInputPanel() and closeSoftwareInputPanel() to implement
the behavior you want.
@@ -1327,12 +1328,12 @@ void QDeclarativeTextInput::moveCursorSelection(int position)
TextInput {
id: textInput
text: "Hello world!"
- focusOnPress: false
+ activeFocusOnPress: false
MouseArea {
anchors.fill: parent
onClicked: {
- if (!textInput.focus) {
- textInput.focus = true;
+ if (!textInput.activeFocus) {
+ textInput.forceActiveFocus()
textInput.openSoftwareInputPanel();
} else {
textInput.focus = false;
@@ -1364,10 +1365,10 @@ void QDeclarativeTextInput::openSoftwareInputPanel()
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. On other platforms
- the panels are automatically opened when TextInput element gains focus. Input panels are
- always closed if no editor owns focus.
+ the panels are automatically opened when TextInput element gains active focus. Input panels are
+ always closed if no editor has active 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 activeFocusOnPress to false
and use functions openSoftwareInputPanel() and closeSoftwareInputPanel() to implement
the behavior you want.
@@ -1378,12 +1379,12 @@ void QDeclarativeTextInput::openSoftwareInputPanel()
TextInput {
id: textInput
text: "Hello world!"
- focusOnPress: false
+ activeFocusOnPress: false
MouseArea {
anchors.fill: parent
onClicked: {
- if (!textInput.focus) {
- textInput.focus = true;
+ if (!textInput.activeFocus) {
+ textInput.forceActiveFocus();
textInput.openSoftwareInputPanel();
} else {
textInput.focus = false;
@@ -1538,3 +1539,5 @@ void QDeclarativeTextInput::updateSize(bool needsRedraw)
QT_END_NAMESPACE
+#endif // QT_NO_LINEEDIT
+
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h
index b1862c68aa..06f77e5d8d 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h
@@ -48,6 +48,8 @@
#include <QGraphicsSceneMouseEvent>
#include <QIntValidator>
+#ifndef QT_NO_LINEEDIT
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -87,7 +89,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeTextInput : public QDeclarativePaintedItem
Q_PROPERTY(bool acceptableInput READ hasAcceptableInput NOTIFY acceptableInputChanged)
Q_PROPERTY(EchoMode echoMode READ echoMode WRITE setEchoMode NOTIFY echoModeChanged)
- Q_PROPERTY(bool focusOnPress READ focusOnPress WRITE setFocusOnPress NOTIFY focusOnPressChanged)
+ Q_PROPERTY(bool activeFocusOnPress READ focusOnPress WRITE setFocusOnPress NOTIFY activeFocusOnPressChanged)
Q_PROPERTY(QString passwordCharacter READ passwordCharacter WRITE setPasswordCharacter NOTIFY passwordCharacterChanged)
Q_PROPERTY(QString displayText READ displayText NOTIFY displayTextChanged)
Q_PROPERTY(bool autoScroll READ autoScroll WRITE setAutoScroll NOTIFY autoScrollChanged)
@@ -211,7 +213,7 @@ Q_SIGNALS:
void echoModeChanged(EchoMode echoMode);
void passwordCharacterChanged();
void displayTextChanged();
- void focusOnPressChanged(bool focusOnPress);
+ void activeFocusOnPressChanged(bool activeFocusOnPress);
void autoScrollChanged(bool autoScroll);
void selectByMouseChanged(bool selectByMouse);
@@ -263,4 +265,6 @@ QML_DECLARE_TYPE(QRegExpValidator)
QT_END_HEADER
+#endif // QT_NO_LINEEDIT
+
#endif // QDECLARATIVETEXTINPUT_H
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
index 4ac5134f20..5ad6a3b8b2 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
@@ -62,6 +62,8 @@
//
// We mean it.
+#ifndef QT_NO_LINEEDIT
+
QT_BEGIN_NAMESPACE
class QDeclarativeTextInputPrivate : public QDeclarativePaintedItemPrivate
@@ -132,5 +134,7 @@ public:
QT_END_NAMESPACE
+#endif // QT_NO_LINEEDIT
+
#endif
diff --git a/src/declarative/graphicsitems/qdeclarativetranslate.cpp b/src/declarative/graphicsitems/qdeclarativetranslate.cpp
index 17daac7c40..be9b3f3c22 100644
--- a/src/declarative/graphicsitems/qdeclarativetranslate.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetranslate.cpp
@@ -90,7 +90,7 @@ void QDeclarativeTranslate::setX(qreal x)
return;
d->x = x;
update();
- emit positionChanged();
+ emit xChanged();
}
/*!
@@ -113,11 +113,11 @@ void QDeclarativeTranslate::setY(qreal y)
return;
d->y = y;
update();
- emit positionChanged();
+ emit yChanged();
}
/*!
- \reimp
+ \internal
*/
void QDeclarativeTranslate::applyTo(QMatrix4x4 *matrix) const
{
diff --git a/src/declarative/graphicsitems/qdeclarativetranslate_p.h b/src/declarative/graphicsitems/qdeclarativetranslate_p.h
index 0207dce7ec..b87151881b 100644
--- a/src/declarative/graphicsitems/qdeclarativetranslate_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetranslate_p.h
@@ -56,8 +56,8 @@ class Q_AUTOTEST_EXPORT QDeclarativeTranslate : public QGraphicsTransform
{
Q_OBJECT
- Q_PROPERTY(qreal x READ x WRITE setX NOTIFY positionChanged)
- Q_PROPERTY(qreal y READ y WRITE setY NOTIFY positionChanged)
+ Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged)
+ Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged)
public:
QDeclarativeTranslate(QObject *parent = 0);
@@ -72,7 +72,8 @@ public:
void applyTo(QMatrix4x4 *matrix) const;
Q_SIGNALS:
- void positionChanged();
+ void xChanged();
+ void yChanged();
private:
Q_DECLARE_PRIVATE(QDeclarativeTranslate)
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index 786d6f95ac..ceb1961467 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -77,8 +77,8 @@ public:
QDeclarativeVisualItemModelPrivate() : QObjectPrivate() {}
static void children_append(QDeclarativeListProperty<QDeclarativeItem> *prop, QDeclarativeItem *item) {
- item->QObject::setParent(prop->object);
- static_cast<QDeclarativeVisualItemModelPrivate *>(prop->data)->children.append(item);
+ QDeclarative_setParent_noEvent(item, prop->object);
+ static_cast<QDeclarativeVisualItemModelPrivate *>(prop->data)->children.append(Item(item));
static_cast<QDeclarativeVisualItemModelPrivate *>(prop->data)->itemAppended();
static_cast<QDeclarativeVisualItemModelPrivate *>(prop->data)->emitChildrenChanged();
}
@@ -88,12 +88,12 @@ public:
}
static QDeclarativeItem *children_at(QDeclarativeListProperty<QDeclarativeItem> *prop, int index) {
- return static_cast<QDeclarativeVisualItemModelPrivate *>(prop->data)->children.at(index);
+ return static_cast<QDeclarativeVisualItemModelPrivate *>(prop->data)->children.at(index).item;
}
void itemAppended() {
Q_Q(QDeclarativeVisualItemModel);
- QDeclarativeVisualItemModelAttached *attached = QDeclarativeVisualItemModelAttached::properties(children.last());
+ QDeclarativeVisualItemModelAttached *attached = QDeclarativeVisualItemModelAttached::properties(children.last().item);
attached->setIndex(children.count()-1);
emit q->itemsInserted(children.count()-1, 1);
emit q->countChanged();
@@ -104,7 +104,25 @@ public:
emit q->childrenChanged();
}
- QList<QDeclarativeItem *> children;
+ int indexOf(QDeclarativeItem *item) const {
+ for (int i = 0; i < children.count(); ++i)
+ if (children.at(i).item == item)
+ return i;
+ return -1;
+ }
+
+ class Item {
+ public:
+ Item(QDeclarativeItem *i) : item(i), ref(0) {}
+
+ void addRef() { ++ref; }
+ bool deref() { return --ref == 0; }
+
+ QDeclarativeItem *item;
+ int ref;
+ };
+
+ QList<Item> children;
};
@@ -182,12 +200,22 @@ bool QDeclarativeVisualItemModel::isValid() const
QDeclarativeItem *QDeclarativeVisualItemModel::item(int index, bool)
{
Q_D(QDeclarativeVisualItemModel);
- return d->children.at(index);
+ QDeclarativeVisualItemModelPrivate::Item &item = d->children[index];
+ item.addRef();
+ return item.item;
}
-QDeclarativeVisualModel::ReleaseFlags QDeclarativeVisualItemModel::release(QDeclarativeItem *)
+QDeclarativeVisualModel::ReleaseFlags QDeclarativeVisualItemModel::release(QDeclarativeItem *item)
{
- // Nothing to do
+ Q_D(QDeclarativeVisualItemModel);
+ int idx = d->indexOf(item);
+ if (idx >= 0) {
+ if (d->children[idx].deref()) {
+ if (item->scene())
+ item->scene()->removeItem(item);
+ QDeclarative_setParent_noEvent(item, this);
+ }
+ }
return 0;
}
@@ -206,7 +234,7 @@ QString QDeclarativeVisualItemModel::stringValue(int index, const QString &name)
Q_D(QDeclarativeVisualItemModel);
if (index < 0 || index >= d->children.count())
return QString();
- return QDeclarativeEngine::contextForObject(d->children.at(index))->contextProperty(name).toString();
+ return QDeclarativeEngine::contextForObject(d->children.at(index).item)->contextProperty(name).toString();
}
QVariant QDeclarativeVisualItemModel::evaluate(int index, const QString &expression, QObject *objectContext)
@@ -216,7 +244,7 @@ QVariant QDeclarativeVisualItemModel::evaluate(int index, const QString &express
return QVariant();
QDeclarativeContext *ccontext = qmlContext(this);
QDeclarativeContext *ctxt = new QDeclarativeContext(ccontext);
- ctxt->setContextObject(d->children.at(index));
+ ctxt->setContextObject(d->children.at(index).item);
QDeclarativeExpression e(ctxt, objectContext, expression);
QVariant value = e.evaluate();
delete ctxt;
@@ -226,7 +254,7 @@ QVariant QDeclarativeVisualItemModel::evaluate(int index, const QString &express
int QDeclarativeVisualItemModel::indexOf(QDeclarativeItem *item, QObject *) const
{
Q_D(const QDeclarativeVisualItemModel);
- return d->children.indexOf(item);
+ return d->indexOf(item);
}
QDeclarativeVisualItemModelAttached *QDeclarativeVisualItemModel::qmlAttachedProperties(QObject *obj)
@@ -416,6 +444,9 @@ public:
int propForRole(int) const;
void setValue(int, const QVariant &);
+ bool hasValue(int id) const {
+ return m_meta->hasValue(id);
+ }
void ensureProperties();
@@ -1089,6 +1120,11 @@ QString QDeclarativeVisualDataModel::stringValue(int index, const QString &name)
if (d->m_visualItemModel)
return d->m_visualItemModel->stringValue(index, name);
+ if ((!d->m_listModelInterface || !d->m_abstractItemModel) && d->m_listAccessor) {
+ if (QObject *object = d->m_listAccessor->at(index).value<QObject*>())
+ return object->property(name.toUtf8()).toString();
+ }
+
if ((!d->m_listModelInterface && !d->m_abstractItemModel) || !d->m_delegate)
return QString();
@@ -1183,11 +1219,13 @@ void QDeclarativeVisualDataModel::_q_itemsChanged(int index, int count,
int role = roles.at(roleIdx);
int propId = data->propForRole(role);
if (propId != -1) {
- if (d->m_listModelInterface) {
- data->setValue(propId, d->m_listModelInterface->data(idx, QList<int>() << role).value(role));
- } else if (d->m_abstractItemModel) {
- QModelIndex index = d->m_abstractItemModel->index(idx, 0, d->m_root);
- data->setValue(propId, d->m_abstractItemModel->data(index, role));
+ if (data->hasValue(propId)) {
+ if (d->m_listModelInterface) {
+ data->setValue(propId, d->m_listModelInterface->data(idx, QList<int>() << role).value(role));
+ } else if (d->m_abstractItemModel) {
+ QModelIndex index = d->m_abstractItemModel->index(idx, 0, d->m_root);
+ data->setValue(propId, d->m_abstractItemModel->data(index, role));
+ }
}
} else {
QString roleName;
diff --git a/src/declarative/qml/parser/qdeclarativejslexer.cpp b/src/declarative/qml/parser/qdeclarativejslexer.cpp
index fcaaece43c..65a6af24d7 100644
--- a/src/declarative/qml/parser/qdeclarativejslexer.cpp
+++ b/src/declarative/qml/parser/qdeclarativejslexer.cpp
@@ -103,7 +103,7 @@ Lexer::Lexer(Engine *eng, bool tokenizeComments)
prohibitAutomaticSemicolon(false),
tokenizeComments(tokenizeComments)
{
- driver->setLexer(this);
+ if (driver) driver->setLexer(this);
// allocate space for read buffers
buffer8 = new char[size8];
buffer16 = new QChar[size16];
@@ -677,9 +677,9 @@ int Lexer::lex()
setDone(Other);
} else
state = Start;
- driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
+ if (driver) driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
} else if (current == 0) {
- driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
+ if (driver) driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
setDone(Eof);
}
@@ -689,14 +689,14 @@ int Lexer::lex()
setDone(Bad);
err = UnclosedComment;
errmsg = QCoreApplication::translate("QDeclarativeParser", "Unclosed comment at end of file");
- driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
+ if (driver) driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
} else if (isLineTerminator()) {
shiftWindowsLineBreak();
yylineno++;
} else if (current == '*' && next1 == '/') {
state = Start;
shift(1);
- driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
+ if (driver) driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
}
break;
diff --git a/src/declarative/qml/qdeclarative.h b/src/declarative/qml/qdeclarative.h
index 53ff51ca3b..c6b64ae863 100644
--- a/src/declarative/qml/qdeclarative.h
+++ b/src/declarative/qml/qdeclarative.h
@@ -116,7 +116,7 @@ int qmlRegisterType()
0
};
- return QDeclarativePrivate::registerType(type);
+ return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type);
}
int qmlRegisterTypeNotAvailable(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& message);
@@ -151,7 +151,7 @@ int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMin
0
};
- return QDeclarativePrivate::registerType(type);
+ return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type);
}
template<typename T>
@@ -184,7 +184,7 @@ int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const c
0
};
- return QDeclarativePrivate::registerType(type);
+ return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type);
}
template<typename T, typename E>
@@ -217,7 +217,7 @@ int qmlRegisterExtendedType()
0
};
- return QDeclarativePrivate::registerType(type);
+ return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type);
}
template<typename T, typename E>
@@ -258,7 +258,7 @@ int qmlRegisterExtendedType(const char *uri, int versionMajor, int versionMinor,
0
};
- return QDeclarativePrivate::registerType(type);
+ return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type);
}
template<typename T>
@@ -278,7 +278,7 @@ int qmlRegisterInterface(const char *typeName)
qobject_interface_iid<T *>()
};
- return QDeclarativePrivate::registerType(interface);
+ return QDeclarativePrivate::qmlregister(QDeclarativePrivate::InterfaceRegistration, &interface);
}
template<typename T>
@@ -312,7 +312,7 @@ int qmlRegisterCustomType(const char *uri, int versionMajor, int versionMinor,
parser
};
- return QDeclarativePrivate::registerType(type);
+ return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type);
}
class QDeclarativeContext;
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index 23307c9744..ba757fc785 100644
--- a/src/declarative/qml/qdeclarativecompiler.cpp
+++ b/src/declarative/qml/qdeclarativecompiler.cpp
@@ -240,7 +240,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(const QMetaProperty &prop,
if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: color expected"));
}
break;
-#ifndef QT_NO_TEXTDATE
+#ifndef QT_NO_DATESTRING
case QVariant::Date:
{
bool ok;
@@ -262,7 +262,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(const QMetaProperty &prop,
if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: datetime expected"));
}
break;
-#endif // QT_NO_TEXTDATE
+#endif // QT_NO_DATESTRING
case QVariant::Point:
case QVariant::PointF:
{
@@ -416,7 +416,7 @@ void QDeclarativeCompiler::genLiteralAssignment(const QMetaProperty &prop,
instr.storeColor.value = c.rgba();
}
break;
-#ifndef QT_NO_TEXTDATE
+#ifndef QT_NO_DATESTRING
case QVariant::Date:
{
QDate d = QDeclarativeStringConverters::dateFromString(string);
@@ -450,7 +450,7 @@ void QDeclarativeCompiler::genLiteralAssignment(const QMetaProperty &prop,
instr.storeDateTime.valueIndex = index;
}
break;
-#endif // QT_NO_TEXTDATE
+#endif // QT_NO_DATESTRING
case QVariant::Point:
case QVariant::PointF:
{
@@ -1070,6 +1070,7 @@ void QDeclarativeCompiler::genObjectBody(QDeclarativeParser::Object *obj)
store.storeSignal.value =
output->indexForString(v->value.asScript().trimmed());
store.storeSignal.context = ctxt.stack;
+ store.storeSignal.name = output->indexForByteArray(prop->name);
output->bytecode << store;
}
@@ -2765,6 +2766,7 @@ bool QDeclarativeCompiler::completeComponentBuild()
bool isSharable = sharableTest.isSharable(expression);
QDeclarativeRewrite::RewriteBinding rewriteBinding;
+ rewriteBinding.setName('$'+binding.property->name);
expression = rewriteBinding(expression);
quint32 length = expression.length();
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
index 36c4b49157..1d48b1ab2a 100644
--- a/src/declarative/qml/qdeclarativecomponent.cpp
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -115,24 +115,10 @@ class QByteArray;
a small component within a QML file, or for defining a component that logically
belongs with other QML components within a file.
- For example, here is a component that is used by multiple \l Loader objects:
+ For example, here is a component that is used by multiple \l Loader objects.
+ It contains a top level \l Rectangle item:
- \qml
- Item {
- Component {
- id: redSquare
-
- Rectangle {
- color: "red"
- width: 10
- height: 10
- }
- }
-
- Loader { sourceComponent: redSquare }
- Loader { sourceComponent: redSquare; x: 20 }
- }
- \endqml
+ \snippet doc/src/snippets/declarative/component.qml 0
Notice that while a \l Rectangle by itself would be automatically
rendered and displayed, this is not the case for the above rectangle
@@ -141,12 +127,16 @@ class QByteArray;
file, and is not loaded until requested (in this case, by the
two \l Loader objects).
+ A Component cannot contain anything other
+ than an \c id and a single top level item. While the \c id is optional,
+ the top level item is not; you cannot define an empty component.
+
The Component element is commonly used to provide graphical components
for views. For example, the ListView::delegate property requires a Component
to specify how each list item is to be displayed.
- Component objects can also be dynamically generated using
- \l{Qt::createComponent}{Qt.createComponent()}.
+ Component objects can also be dynamically created using
+ \l{QML:Qt::createComponent()}{Qt.createComponent()}.
*/
/*!
@@ -607,6 +597,9 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeComponentPrivate &dd, Q
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.
+
+ Dynamically created instances can be deleted with the \c destroy() method.
+ See \l {Dynamic Object Management} for more information.
*/
/*!
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 97ef99c1cf..e8cb36e4bf 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -115,22 +115,55 @@ QT_BEGIN_NAMESPACE
/*!
\qmlclass QtObject QObject
\since 4.7
- \brief The QtObject element is the most basic element in QML
+ \brief The QtObject element is the most basic element in QML.
The QtObject element is a non-visual element which contains only the
- objectName property. It is useful for when you need an extremely
- lightweight element to place your own custom properties in.
+ objectName property.
+
+ It can be useful to create a QtObject if you need an extremely
+ lightweight element to enclose a set of custom properties:
+
+ \snippet doc/src/snippets/declarative/qtobject.qml 0
It can also be useful for C++ integration, as it is just a plain
QObject. See the QObject documentation for further details.
*/
/*!
- \qmlproperty string QtObject::objectName
- This property allows you to give a name to this specific object instance.
+ \qmlproperty string QML:QtObject::objectName
+ This property holds the QObject::objectName for this specific object instance.
+
+ This allows a C++ application to locate an item within a QML component
+ using the QObject::findChild() method. For example, the following C++
+ application locates the child \l Rectangle item and dynamically changes its
+ \c color value:
+
+ \qml
+ // MyRect.qml
+
+ import Qt 4.7
+
+ Item {
+ width: 200; height: 200
+
+ Rectangle {
+ anchors.fill: parent
+ color: "red"
+ objectName: "myRect"
+ }
+ }
+ \endqml
+
+ \code
+ // main.cpp
+
+ QDeclarativeView view;
+ view.setSource(QUrl::fromLocalFile("MyRect.qml"));
+ view.show();
- See \l{scripting.html#accessing-child-qobjects}{Accessing Child QObjects}
- in the scripting documentation for details how objectName can be used from
- scripts.
+ QDeclarativeItem *item = view.rootObject()->findChild<QDeclarativeItem*>("myRect");
+ if (item)
+ item->setProperty("color", QColor(Qt::yellow));
+ \endcode
*/
struct StaticQtMetaObject : public QObject
@@ -195,7 +228,7 @@ There are also string based constructors for these types. See \l{qdeclarativebas
\section1 Date/Time Formatters
-The Qt object contains several functions for formatting dates and times.
+The Qt object contains several functions for formatting QDateTime, QDate and QTime values.
\list
\o \l{QML:Qt::formatDateTime}{string Qt.formatDateTime(datetime date, variant format)}
@@ -237,8 +270,8 @@ QDeclarativeEnginePrivate::QDeclarativeEnginePrivate(QDeclarativeEngine *e)
}
/*!
-\qmlmethod url Qt::resolvedUrl(url)
-Returns \c url resolved relative to the URL of the caller.
+ \qmlmethod url Qt::resolvedUrl(url)
+ Returns \c url resolved relative to the URL of the caller.
*/
QUrl QDeclarativeScriptEngine::resolvedUrl(QScriptContext *context, const QUrl& url)
{
@@ -268,7 +301,9 @@ QDeclarativeScriptEngine::QDeclarativeScriptEngine(QDeclarativeEnginePrivate *pr
+ QDir::separator() + QLatin1String("OfflineStorage");
#endif
+#ifndef QT_NO_XMLSTREAMREADER
qt_add_qmlxmlhttprequest(this);
+#endif
qt_add_qmlsqldatabase(this);
// XXX A Multimedia "Qt.Sound" class also needs to be made available,
// XXX but we don't want a dependency in that cirection.
@@ -296,7 +331,7 @@ QDeclarativeScriptEngine::QDeclarativeScriptEngine(QDeclarativeEnginePrivate *pr
qtObject.setProperty(QLatin1String("tint"), newFunction(QDeclarativeEnginePrivate::tint, 2));
}
-#ifndef QT_NO_TEXTDATE
+#ifndef QT_NO_DATESTRING
//date/time formatting
qtObject.setProperty(QLatin1String("formatDate"),newFunction(QDeclarativeEnginePrivate::formatDate, 2));
qtObject.setProperty(QLatin1String("formatTime"),newFunction(QDeclarativeEnginePrivate::formatTime, 2));
@@ -545,9 +580,9 @@ void QDeclarativeEngine::clearComponentCache()
component instances should be added to sub-contexts parented to the
root context.
*/
-QDeclarativeContext *QDeclarativeEngine::rootContext()
+QDeclarativeContext *QDeclarativeEngine::rootContext() const
{
- Q_D(QDeclarativeEngine);
+ Q_D(const QDeclarativeEngine);
return d->rootContext;
}
@@ -1071,27 +1106,23 @@ QString QDeclarativeEnginePrivate::urlToLocalFileOrQrc(const QUrl& url)
\qmlmethod object Qt::createComponent(url)
Returns a \l Component object created using the QML file at the specified \a url,
-or \c null if there was an error in creating the component.
+or \c null if an empty string was given.
+
+The returned component's \l Component::status property indicates whether the
+component was successfully created. If the status is \c Component.Error,
+see \l Component::errorString() for an error description.
Call \l {Component::createObject()}{Component.createObject()} on the returned
component to create an object instance of the component.
-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
-\snippet doc/src/snippets/declarative/componentCreation.js 1
+For example:
-If you are certain the files will be local, you could simplify to:
+\snippet doc/src/snippets/declarative/createComponent-simple.qml 0
-\snippet doc/src/snippets/declarative/componentCreation.js 2
+See \l {Dynamic Object Management} for more information on using this function.
To create a QML object from an arbitrary string of QML (instead of a file),
use \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()}.
-
-\sa {Dynamic Object Management}
*/
QScriptValue QDeclarativeEnginePrivate::createComponent(QScriptContext *ctxt, QScriptEngine *engine)
@@ -1140,7 +1171,7 @@ Note that this function returns immediately, and therefore may not work if
the \a qml string loads new components (that is, external QML files that have not yet been loaded).
If this is the case, consider using \l{QML:Qt::createComponent()}{Qt.createComponent()} instead.
-\sa {Dynamic Object Management}
+See \l {Dynamic Object Management} for more information on using this function.
*/
QScriptValue QDeclarativeEnginePrivate::createQmlObject(QScriptContext *ctxt, QScriptEngine *engine)
@@ -1265,7 +1296,7 @@ QScriptValue QDeclarativeEnginePrivate::vector3d(QScriptContext *ctxt, QScriptEn
\qmlmethod string Qt::formatDate(datetime date, variant format)
Returns the string representation of \c date, formatted according to \c format.
*/
-#ifndef QT_NO_TEXTDATE
+#ifndef QT_NO_DATESTRING
QScriptValue QDeclarativeEnginePrivate::formatDate(QScriptContext*ctxt, QScriptEngine*engine)
{
int argCount = ctxt->argumentCount();
@@ -1406,7 +1437,7 @@ QScriptValue QDeclarativeEnginePrivate::formatDateTime(QScriptContext*ctxt, QScr
}
return engine->newVariant(qVariantFromValue(date.toString(enumFormat)));
}
-#endif // QT_NO_TEXTDATE
+#endif // QT_NO_DATESTRING
/*!
\qmlmethod color Qt::rgba(real red, real green, real blue, real alpha)
diff --git a/src/declarative/qml/qdeclarativeengine.h b/src/declarative/qml/qdeclarativeengine.h
index 01487f5ae4..d971d8052b 100644
--- a/src/declarative/qml/qdeclarativeengine.h
+++ b/src/declarative/qml/qdeclarativeengine.h
@@ -74,7 +74,7 @@ public:
QDeclarativeEngine(QObject *p = 0);
virtual ~QDeclarativeEngine();
- QDeclarativeContext *rootContext();
+ QDeclarativeContext *rootContext() const;
void clearComponentCache();
diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/declarative/qml/qdeclarativeengine_p.h
index a5c8c388d1..3b5dd5a3f9 100644
--- a/src/declarative/qml/qdeclarativeengine_p.h
+++ b/src/declarative/qml/qdeclarativeengine_p.h
@@ -304,7 +304,7 @@ public:
static QScriptValue consoleLog(QScriptContext*, QScriptEngine*);
static QScriptValue quit(QScriptContext*, QScriptEngine*);
-#ifndef QT_NO_TEXTDATE
+#ifndef QT_NO_DATESTRING
static QScriptValue formatDate(QScriptContext*, QScriptEngine*);
static QScriptValue formatTime(QScriptContext*, QScriptEngine*);
static QScriptValue formatDateTime(QScriptContext*, QScriptEngine*);
diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp
index 001da4612d..18373663b8 100644
--- a/src/declarative/qml/qdeclarativeenginedebug.cpp
+++ b/src/declarative/qml/qdeclarativeenginedebug.cpp
@@ -485,24 +485,22 @@ void QDeclarativeEngineDebugServer::setBinding(int objectId,
if (object && context) {
+ QDeclarativeProperty property(object, propertyName, context);
if (isLiteralValue) {
- QDeclarativeProperty literalProperty(object, propertyName, context);
- literalProperty.write(expression);
+ property.write(expression);
+ } else if (hasValidSignal(object, propertyName)) {
+ QDeclarativeExpression *declarativeExpression = new QDeclarativeExpression(context, object, expression.toString());
+ QDeclarativePropertyPrivate::setSignalExpression(property, declarativeExpression);
+ } else if (property.isProperty()) {
+ QDeclarativeBinding *binding = new QDeclarativeBinding(expression.toString(), object, context);
+ binding->setTarget(property);
+ binding->setNotifyOnValueChanged(true);
+ QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(property, binding);
+ if (oldBinding)
+ oldBinding->destroy();
+ binding->update();
} else {
- if (hasValidSignal(object, propertyName)) {
- QDeclarativeProperty property(object, propertyName);
- QDeclarativeExpression *declarativeExpression = new QDeclarativeExpression(context, object, expression.toString());
- QDeclarativePropertyPrivate::setSignalExpression(property, declarativeExpression);
- } else {
- QDeclarativeBinding *binding = new QDeclarativeBinding(expression.toString(), object, context);
- QDeclarativeProperty property(object, propertyName);
- binding->setTarget(property);
- binding->setNotifyOnValueChanged(true);
- QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(property, binding);
- if (oldBinding)
- oldBinding->destroy();
- binding->update();
- }
+ qWarning() << "QDeclarativeEngineDebugServer::setBinding: unable to set property" << propertyName << "on object" << object;
}
}
}
diff --git a/src/declarative/qml/qdeclarativeerror.cpp b/src/declarative/qml/qdeclarativeerror.cpp
index 8717f568ef..0ab5cd9b5f 100644
--- a/src/declarative/qml/qdeclarativeerror.cpp
+++ b/src/declarative/qml/qdeclarativeerror.cpp
@@ -250,7 +250,9 @@ QDebug operator<<(QDebug debug, const QDeclarativeError &error)
if (f.open(QIODevice::ReadOnly)) {
QByteArray data = f.readAll();
QTextStream stream(data, QIODevice::ReadOnly);
+#ifndef QT_NO_TEXTCODEC
stream.setCodec("UTF-8");
+#endif
const QString code = stream.readAll();
const QStringList lines = code.split(QLatin1Char('\n'));
diff --git a/src/declarative/qml/qdeclarativeexpression.cpp b/src/declarative/qml/qdeclarativeexpression.cpp
index 9935e384a7..585fb69728 100644
--- a/src/declarative/qml/qdeclarativeexpression.cpp
+++ b/src/declarative/qml/qdeclarativeexpression.cpp
@@ -604,6 +604,7 @@ QScriptValue QDeclarativeExpressionPrivate::scriptValue(QObject *secondaryScope,
scriptContext->pushScope(ep->globalClass->staticGlobalObject());
QDeclarativeRewrite::RewriteBinding rewriteBinding;
+ rewriteBinding.setName(name);
bool ok = true;
const QString code = rewriteBinding(expression, &ok);
if (ok)
diff --git a/src/declarative/qml/qdeclarativeexpression_p.h b/src/declarative/qml/qdeclarativeexpression_p.h
index b629e204f1..1700335be9 100644
--- a/src/declarative/qml/qdeclarativeexpression_p.h
+++ b/src/declarative/qml/qdeclarativeexpression_p.h
@@ -194,6 +194,7 @@ public:
QString url; // This is a QString for a reason. QUrls are slooooooow...
int line;
+ QByteArray name; //function name, hint for the debugger
};
QDeclarativeQtScriptExpression::DeleteWatcher::DeleteWatcher(QDeclarativeQtScriptExpression *data)
diff --git a/src/declarative/qml/qdeclarativeextensionplugin.cpp b/src/declarative/qml/qdeclarativeextensionplugin.cpp
index 0660599ff7..9b5eb613f1 100644
--- a/src/declarative/qml/qdeclarativeextensionplugin.cpp
+++ b/src/declarative/qml/qdeclarativeextensionplugin.cpp
@@ -50,23 +50,76 @@ QT_BEGIN_NAMESPACE
\ingroup plugins
- QDeclarativeExtensionPlugin is a plugin interface that makes it
- possible to offer extensions that can be loaded dynamically into
- applications using the QDeclarativeEngine class.
-
- Writing a QML extension plugin is achieved by subclassing this
- base class, reimplementing the pure virtual registerTypes()
- function, and exporting the class using the Q_EXPORT_PLUGIN2()
- macro.
+ QDeclarativeExtensionPlugin is a plugin interface that makes it possible to
+ create QML extensions that can be loaded dynamically into QML applications.
+ These extensions allow custom QML types to be made available to the QML engine.
+
+ To write a QML extension plugin:
+
+ \list
+ \o Subclass QDeclarativeExtensionPlugin, implement registerTypes() method
+ to register types using qmlRegisterType(), and export the class using the Q_EXPORT_PLUGIN2() macro
+ \o Write an appropriate project file for the plugin
+ \o Create a \l{Writing a qmldir file}{qmldir file} to describe the plugin
+ \endlist
QML extension plugins can be used to provide either application-specific or
library-like plugins. Library plugins should limit themselves to registering types,
as any manipulation of the engine's root context may cause conflicts
or other issues in the library user's code.
- See \l {Tutorial: Writing QML extensions with C++} for details on creating
- QML extensions, including how to build a plugin with with QDeclarativeExtensionPlugin.
- For a simple overview, see the \l{declarative/cppextensions/plugins}{plugins} example.
+
+ \section1 An example
+
+ Suppose there is a new \c TimeModel C++ class that should be made available
+ as a new QML element. It provides the current time through \c hour and \c minute
+ properties, like this:
+
+ \snippet examples/declarative/cppextensions/plugins/plugin.cpp 0
+ \dots
+
+ To make this class available as a QML type, create a plugin that registers
+ this type with a specific \l {QML Modules}{module} using qmlRegisterType(). For this example the plugin
+ module will be named \c com.nokia.TimeExample (as defined in the project
+ file further below).
+
+ \snippet examples/declarative/cppextensions/plugins/plugin.cpp plugin
+ \codeline
+ \snippet examples/declarative/cppextensions/plugins/plugin.cpp export
+
+ This registers the \c TimeModel class with the 1.0 version of this
+ plugin library, as a QML type called \c Time. The Q_ASSERT statement
+ ensures the module is imported correctly by any QML components that use this plugin.
+
+ The project file defines the project as a plugin library and specifies
+ it should be built into the \c com/nokia/TimeExample directory:
+
+ \code
+ TEMPLATE = lib
+ CONFIG += qt plugin
+ QT += declarative
+
+ DESTDIR = com/nokia/TimeExample
+ TARGET = qmlqtimeexampleplugin
+ ...
+ \endcode
+
+ Finally, a \l{Writing a qmldir file}{qmldir file} is required in the \c com/nokia/TimeExample directory
+ that describes the plugin. This directory includes a \c Clock.qml file that
+ should be bundled with the plugin, so it needs to be specified in the \c qmldir
+ file:
+
+ \quotefile examples/declarative/cppextensions/plugins/com/nokia/TimeExample/qmldir
+
+ Once the project is built and installed, the new \c Time element can be
+ used by any QML component that imports the \c com.nokia.TimeExample module:
+
+ \snippet examples/declarative/cppextensions/plugins/plugins.qml 0
+
+ The full source code is available in the \l {declarative/cppextensions/plugins}{plugins example}.
+
+ The \l {Tutorial: Writing QML extensions with C++} also contains a chapter
+ on creating QML plugins.
\sa QDeclarativeEngine::importPlugin(), {How to Create Qt Plugins}
*/
@@ -95,7 +148,7 @@ QDeclarativeExtensionPlugin::QDeclarativeExtensionPlugin(QObject *parent)
}
/*!
- Destroys the plugin.
+ \internal
*/
QDeclarativeExtensionPlugin::~QDeclarativeExtensionPlugin()
{
diff --git a/src/declarative/qml/qdeclarativeimageprovider.cpp b/src/declarative/qml/qdeclarativeimageprovider.cpp
index a294c386cb..241df875ee 100644
--- a/src/declarative/qml/qdeclarativeimageprovider.cpp
+++ b/src/declarative/qml/qdeclarativeimageprovider.cpp
@@ -212,9 +212,6 @@ QImage QDeclarativeImageProvider::requestImage(const QString &id, QSize *size, c
In all cases, \a size must be set to the original size of the image. This
is used to set the \l {Item::}{width} and \l {Item::}{height} of image
elements that should be automatically sized to the loaded image.
-
- \note this method may be called by multiple threads, so ensure the
- implementation of this method is reentrant.
*/
QPixmap QDeclarativeImageProvider::requestPixmap(const QString &id, QSize *size, const QSize& requestedSize)
{
diff --git a/src/declarative/qml/qdeclarativeinstruction_p.h b/src/declarative/qml/qdeclarativeinstruction_p.h
index d1a0a0a15f..f0b032c7dc 100644
--- a/src/declarative/qml/qdeclarativeinstruction_p.h
+++ b/src/declarative/qml/qdeclarativeinstruction_p.h
@@ -292,7 +292,8 @@ public:
struct StoreSignalInstruction {
int signalIndex;
int value;
- int context;
+ short context;
+ int name;
};
struct AssignSignalObjectInstruction {
int signal;
diff --git a/src/declarative/qml/qdeclarativelist.cpp b/src/declarative/qml/qdeclarativelist.cpp
index 7c89672da5..9598d98292 100644
--- a/src/declarative/qml/qdeclarativelist.cpp
+++ b/src/declarative/qml/qdeclarativelist.cpp
@@ -306,7 +306,7 @@ int QDeclarativeListReference::count() const
/*!
\class QDeclarativeListProperty
\since 4.7
-\brief The QDeclarativeListProperty class allows applications to explose list-like
+\brief The QDeclarativeListProperty class allows applications to expose list-like
properties to QML.
QML has many list properties, where more than one object value can be assigned.
diff --git a/src/declarative/qml/qdeclarativemetatype.cpp b/src/declarative/qml/qdeclarativemetatype.cpp
index 153e2be4a6..a5c878f411 100644
--- a/src/declarative/qml/qdeclarativemetatype.cpp
+++ b/src/declarative/qml/qdeclarativemetatype.cpp
@@ -39,6 +39,7 @@
**
****************************************************************************/
+#include <QtDeclarative/qdeclarativeprivate.h>
#include "private/qdeclarativemetatype_p.h"
#include "private/qdeclarativeproxymetaobject_p.h"
@@ -485,17 +486,17 @@ int QDeclarativeType::index() const
return d->m_index;
}
-int QDeclarativePrivate::registerAutoParentFunction(AutoParentFunction function)
+int registerAutoParentFunction(QDeclarativePrivate::RegisterAutoParent &autoparent)
{
QWriteLocker lock(metaTypeDataLock());
QDeclarativeMetaTypeData *data = metaTypeData();
- data->parentFunctions.append(function);
+ data->parentFunctions.append(autoparent.function);
return data->parentFunctions.count() - 1;
}
-int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterInterface &interface)
+int registerInterface(const QDeclarativePrivate::RegisterInterface &interface)
{
if (interface.version > 0)
qFatal("qmlRegisterType(): Cannot mix incompatible QML versions.");
@@ -524,7 +525,7 @@ int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterInterfa
return index;
}
-int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterType &type)
+int registerType(const QDeclarativePrivate::RegisterType &type)
{
if (type.elementName) {
for (int ii = 0; type.elementName[ii]; ++ii) {
@@ -576,6 +577,22 @@ int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterType &t
}
/*
+This method is "over generalized" to allow us to (potentially) register more types of things in
+the future without adding exported symbols.
+*/
+int QDeclarativePrivate::qmlregister(RegistrationType type, void *data)
+{
+ if (type == TypeRegistration) {
+ return registerType(*reinterpret_cast<RegisterType *>(data));
+ } else if (type == InterfaceRegistration) {
+ return registerInterface(*reinterpret_cast<RegisterInterface *>(data));
+ } else if (type == AutoParentRegistration) {
+ return registerAutoParentFunction(*reinterpret_cast<RegisterAutoParent *>(data));
+ }
+ return -1;
+}
+
+/*
Have any types been registered for \a module with at least versionMajor.versionMinor, and types
for \a module with at most versionMajor.versionMinor.
diff --git a/src/declarative/qml/qdeclarativemetatype_p.h b/src/declarative/qml/qdeclarativemetatype_p.h
index 4c98b6f330..f41054774c 100644
--- a/src/declarative/qml/qdeclarativemetatype_p.h
+++ b/src/declarative/qml/qdeclarativemetatype_p.h
@@ -63,6 +63,8 @@ QT_BEGIN_NAMESPACE
class QDeclarativeType;
class QDeclarativeCustomParser;
+class QDeclarativeTypePrivate;
+
class Q_DECLARATIVE_EXPORT QDeclarativeMetaType
{
public:
@@ -103,7 +105,6 @@ public:
static QList<QDeclarativePrivate::AutoParentFunction> parentFunctions();
};
-class QDeclarativeTypePrivate;
class Q_DECLARATIVE_EXPORT QDeclarativeType
{
public:
@@ -144,11 +145,12 @@ public:
int propertyValueInterceptorCast() const;
int index() const;
+
private:
friend class QDeclarativeTypePrivate;
friend struct QDeclarativeMetaTypeData;
- friend int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterInterface &);
- friend int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterType &);
+ friend int registerType(const QDeclarativePrivate::RegisterType &);
+ friend int registerInterface(const QDeclarativePrivate::RegisterInterface &);
QDeclarativeType(int, const QDeclarativePrivate::RegisterInterface &);
QDeclarativeType(int, const QDeclarativePrivate::RegisterType &);
~QDeclarativeType();
diff --git a/src/declarative/qml/qdeclarativeprivate.h b/src/declarative/qml/qdeclarativeprivate.h
index cd859fe88d..b2d74517c1 100644
--- a/src/declarative/qml/qdeclarativeprivate.h
+++ b/src/declarative/qml/qdeclarativeprivate.h
@@ -42,6 +42,17 @@
#ifndef QDECLARATIVEPRIVATE_H
#define QDECLARATIVEPRIVATE_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qglobal.h>
#include <QtCore/qvariant.h>
#ifndef Q_OS_WIN
@@ -177,6 +188,9 @@ namespace QDeclarativePrivate
return AttachedPropertySelector<T, has_attachedPropertiesMethod<T, has_attachedPropertiesMember<T>::value>::value>::metaObject();
}
+ enum AutoParentResult { Parented, IncompatibleObject, IncompatibleParent };
+ typedef AutoParentResult (*AutoParentFunction)(QObject *object, QObject *parent);
+
struct RegisterType {
int version;
@@ -214,13 +228,19 @@ namespace QDeclarativePrivate
const char *iid;
};
- enum AutoParentResult { Parented, IncompatibleObject, IncompatibleParent };
- typedef AutoParentResult (*AutoParentFunction)(QObject *object, QObject *parent);
+ struct RegisterAutoParent {
+ int version;
- int Q_DECLARATIVE_EXPORT registerAutoParentFunction(AutoParentFunction);
- int Q_DECLARATIVE_EXPORT registerType(const RegisterType &);
- int Q_DECLARATIVE_EXPORT registerType(const RegisterInterface &);
+ AutoParentFunction function;
+ };
+
+ enum RegistrationType {
+ TypeRegistration = 0,
+ InterfaceRegistration = 1,
+ AutoParentRegistration = 2
+ };
+ int Q_DECLARATIVE_EXPORT qmlregister(RegistrationType, void *);
}
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativerewrite.cpp b/src/declarative/qml/qdeclarativerewrite.cpp
index 3d40e77653..bc9a114353 100644
--- a/src/declarative/qml/qdeclarativerewrite.cpp
+++ b/src/declarative/qml/qdeclarativerewrite.cpp
@@ -102,7 +102,7 @@ QString RewriteBinding::rewrite(QString code, unsigned position,
unsigned startOfStatement = node->firstSourceLocation().begin() - _position;
unsigned endOfStatement = node->lastSourceLocation().end() - _position;
- _writer->replace(startOfStatement, 0, QLatin1String("(function() { "));
+ _writer->replace(startOfStatement, 0, QLatin1String("(function ") + QString::fromUtf8(_name) + QLatin1String("() { "));
_writer->replace(endOfStatement, 0, QLatin1String(" })"));
if (rewriteDump()) {
diff --git a/src/declarative/qml/qdeclarativerewrite_p.h b/src/declarative/qml/qdeclarativerewrite_p.h
index 33b168c69e..6f3c46e5f5 100644
--- a/src/declarative/qml/qdeclarativerewrite_p.h
+++ b/src/declarative/qml/qdeclarativerewrite_p.h
@@ -78,10 +78,14 @@ class RewriteBinding: protected AST::Visitor
{
unsigned _position;
TextWriter *_writer;
+ QByteArray _name;
public:
QString operator()(const QString &code, bool *ok = 0);
+ //name of the function: used for the debugger
+ void setName(const QByteArray &name) { _name = name; }
+
protected:
using AST::Visitor::visit;
diff --git a/src/declarative/qml/qdeclarativescriptparser.cpp b/src/declarative/qml/qdeclarativescriptparser.cpp
index 219d7593a1..f703cf5edd 100644
--- a/src/declarative/qml/qdeclarativescriptparser.cpp
+++ b/src/declarative/qml/qdeclarativescriptparser.cpp
@@ -831,7 +831,9 @@ bool QDeclarativeScriptParser::parse(const QByteArray &qmldata, const QUrl &url)
_scriptFile = fileName;
QTextStream stream(qmldata, QIODevice::ReadOnly);
+#ifndef QT_NO_TEXTCODEC
stream.setCodec("UTF-8");
+#endif
const QString code = stream.readAll();
data = new QDeclarativeScriptParserJsASTData(fileName);
@@ -896,6 +898,14 @@ QList<QDeclarativeError> QDeclarativeScriptParser::errors() const
return _errors;
}
+static void replaceWithSpace(QString &str, int idx, int n)
+{
+ QChar *data = str.data() + idx;
+ QChar space(' ');
+ for (int ii = 0; ii < n; ++ii)
+ *data++ = space;
+}
+
/*
Searches for ".pragma <value>" declarations within \a script. Currently supported pragmas
are:
@@ -905,83 +915,48 @@ QDeclarativeParser::Object::ScriptBlock::Pragmas QDeclarativeScriptParser::extra
{
QDeclarativeParser::Object::ScriptBlock::Pragmas rv = QDeclarativeParser::Object::ScriptBlock::None;
- const QChar forwardSlash(QLatin1Char('/'));
- const QChar star(QLatin1Char('*'));
- const QChar newline(QLatin1Char('\n'));
- const QChar dot(QLatin1Char('.'));
- const QChar semicolon(QLatin1Char(';'));
- const QChar space(QLatin1Char(' '));
- const QString pragma(QLatin1String(".pragma "));
-
- const QChar *pragmaData = pragma.constData();
-
- const QChar *data = script.constData();
- const int length = script.count();
- for (int ii = 0; ii < length; ++ii) {
- const QChar &c = data[ii];
-
- if (c.isSpace())
- continue;
-
- if (c == forwardSlash) {
- ++ii;
- if (ii >= length)
- return rv;
-
- const QChar &c = data[ii];
- if (c == forwardSlash) {
- // Find next newline
- while (ii < length && data[++ii] != newline) {};
- } else if (c == star) {
- // Find next star
- while (true) {
- while (ii < length && data[++ii] != star) {};
- if (ii + 1 >= length)
- return rv;
-
- if (data[ii + 1] == forwardSlash) {
- ++ii;
- break;
- }
- }
- } else {
- return rv;
- }
- } else if (c == dot) {
- // Could be a pragma!
- if (ii + pragma.length() >= length ||
- 0 != ::memcmp(data + ii, pragmaData, sizeof(QChar) * pragma.length()))
- return rv;
+ const QString pragma(QLatin1String("pragma"));
+ const QString library(QLatin1String("library"));
- int pragmaStatementIdx = ii;
+ QDeclarativeJS::Lexer l(0);
+ l.setCode(script, 0);
- ii += pragma.length();
+ int token = l.lex();
- while (ii < length && data[ii].isSpace()) { ++ii; }
+ while (true) {
+ if (token != QDeclarativeJSGrammar::T_DOT)
+ return rv;
- int startIdx = ii;
+ int startOffset = l.tokenOffset();
+ int startLine = l.currentLineNo();
- while (ii < length && data[ii].isLetter()) { ++ii; }
+ token = l.lex();
- int endIdx = ii;
+ if (token != QDeclarativeJSGrammar::T_IDENTIFIER ||
+ l.currentLineNo() != startLine ||
+ script.mid(l.tokenOffset(), l.tokenLength()) != pragma)
+ return rv;
- if (ii != length && data[ii] != forwardSlash && !data[ii].isSpace() && data[ii] != semicolon)
- return rv;
+ token = l.lex();
- QString p(data + startIdx, endIdx - startIdx);
+ if (token != QDeclarativeJSGrammar::T_IDENTIFIER ||
+ l.currentLineNo() != startLine)
+ return rv;
- if (p == QLatin1String("library"))
- rv |= QDeclarativeParser::Object::ScriptBlock::Shared;
- else
- return rv;
+ QString pragmaValue = script.mid(l.tokenOffset(), l.tokenLength());
+ int endOffset = l.tokenLength() + l.tokenOffset();
- for (int jj = pragmaStatementIdx; jj < endIdx; ++jj) script[jj] = space;
+ token = l.lex();
+ if (l.currentLineNo() == startLine)
+ return rv;
+ if (pragmaValue == QLatin1String("library")) {
+ rv |= QDeclarativeParser::Object::ScriptBlock::Shared;
+ replaceWithSpace(script, startOffset, endOffset - startOffset);
} else {
return rv;
}
}
-
return rv;
}
diff --git a/src/declarative/qml/qdeclarativestringconverters.cpp b/src/declarative/qml/qdeclarativestringconverters.cpp
index 8bd2cf1c2c..7534a2c0c5 100644
--- a/src/declarative/qml/qdeclarativestringconverters.cpp
+++ b/src/declarative/qml/qdeclarativestringconverters.cpp
@@ -106,14 +106,14 @@ QVariant QDeclarativeStringConverters::variantFromString(const QString &s, int p
return QVariant(uint(qRound(s.toDouble(ok))));
case QMetaType::QColor:
return QVariant::fromValue(colorFromString(s, ok));
-#ifndef QT_NO_TEXTDATE
+#ifndef QT_NO_DATESTRING
case QMetaType::QDate:
return QVariant::fromValue(dateFromString(s, ok));
case QMetaType::QTime:
return QVariant::fromValue(timeFromString(s, ok));
case QMetaType::QDateTime:
return QVariant::fromValue(dateTimeFromString(s, ok));
-#endif // QT_NO_TEXTDATE
+#endif // QT_NO_DATESTRING
case QMetaType::QPointF:
return QVariant::fromValue(pointFFromString(s, ok));
case QMetaType::QPoint:
@@ -152,7 +152,7 @@ QColor QDeclarativeStringConverters::colorFromString(const QString &s, bool *ok)
}
}
-#ifndef QT_NO_TEXTDATE
+#ifndef QT_NO_DATESTRING
QDate QDeclarativeStringConverters::dateFromString(const QString &s, bool *ok)
{
QDate d = QDate::fromString(s, Qt::ISODate);
@@ -173,7 +173,7 @@ QDateTime QDeclarativeStringConverters::dateTimeFromString(const QString &s, boo
if (ok) *ok = d.isValid();
return d;
}
-#endif // QT_NO_TEXTDATE
+#endif // QT_NO_DATESTRING
//expects input of "x,y"
QPointF QDeclarativeStringConverters::pointFFromString(const QString &s, bool *ok)
diff --git a/src/declarative/qml/qdeclarativestringconverters_p.h b/src/declarative/qml/qdeclarativestringconverters_p.h
index 842d1b3aa6..e6b0abeda4 100644
--- a/src/declarative/qml/qdeclarativestringconverters_p.h
+++ b/src/declarative/qml/qdeclarativestringconverters_p.h
@@ -73,7 +73,7 @@ namespace QDeclarativeStringConverters
QVariant Q_DECLARATIVE_EXPORT variantFromString(const QString &, int preferredType, bool *ok = 0);
QColor Q_DECLARATIVE_EXPORT colorFromString(const QString &, bool *ok = 0);
-#ifndef QT_NO_TEXTDATE
+#ifndef QT_NO_DATESTRING
QDate Q_DECLARATIVE_EXPORT dateFromString(const QString &, bool *ok = 0);
QTime Q_DECLARATIVE_EXPORT timeFromString(const QString &, bool *ok = 0);
QDateTime Q_DECLARATIVE_EXPORT dateTimeFromString(const QString &, bool *ok = 0);
diff --git a/src/declarative/qml/qdeclarativevaluetype.cpp b/src/declarative/qml/qdeclarativevaluetype.cpp
index c17ec950cc..98e9a585fb 100644
--- a/src/declarative/qml/qdeclarativevaluetype.cpp
+++ b/src/declarative/qml/qdeclarativevaluetype.cpp
@@ -74,7 +74,7 @@ int qmlRegisterValueTypeEnums(const char *qmlName)
0
};
- return QDeclarativePrivate::registerType(type);
+ return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type);
}
QDeclarativeValueTypeFactory::QDeclarativeValueTypeFactory()
@@ -973,7 +973,7 @@ qreal QDeclarativeFontValueType::letterSpacing() const
void QDeclarativeFontValueType::setLetterSpacing(qreal size)
{
- font.setLetterSpacing(QFont::PercentageSpacing, size);
+ font.setLetterSpacing(QFont::AbsoluteSpacing, size);
}
qreal QDeclarativeFontValueType::wordSpacing() const
diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp
index 3247f854f2..4e41c22c7c 100644
--- a/src/declarative/qml/qdeclarativevme.cpp
+++ b/src/declarative/qml/qdeclarativevme.cpp
@@ -621,14 +621,15 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack<QObject *> &stack,
case QDeclarativeInstruction::StoreSignal:
{
QObject *target = stack.top();
- QObject *context = stack.at(stack.count() - 1 - instr.assignBinding.context);
-
+ QObject *context = stack.at(stack.count() - 1 - instr.storeSignal.context);
+
QMetaMethod signal = target->metaObject()->method(instr.storeSignal.signalIndex);
QDeclarativeBoundSignal *bs = new QDeclarativeBoundSignal(target, signal, target);
QDeclarativeExpression *expr =
new QDeclarativeExpression(ctxt, context, primitives.at(instr.storeSignal.value));
expr->setSourceLocation(comp->name, instr.line);
+ static_cast<QDeclarativeExpressionPrivate *>(QObjectPrivate::get(expr))->name = datas.at(instr.storeSignal.name);
bs->setExpression(expr);
}
break;
diff --git a/src/declarative/qml/qdeclarativexmlhttprequest.cpp b/src/declarative/qml/qdeclarativexmlhttprequest.cpp
index acd1f511eb..ff1a0e98ae 100644
--- a/src/declarative/qml/qdeclarativexmlhttprequest.cpp
+++ b/src/declarative/qml/qdeclarativexmlhttprequest.cpp
@@ -58,6 +58,8 @@
#include <QtCore/qstack.h>
#include <QtCore/qdebug.h>
+#ifndef QT_NO_XMLSTREAMREADER
+
// From DOM-Level-3-Core spec
// http://www.w3.org/TR/DOM-Level-3-Core/core.html
#define INDEX_SIZE_ERR 1
@@ -1304,10 +1306,11 @@ QString QDeclarativeXMLHttpRequest::responseBody() const
{
QXmlStreamReader reader(m_responseEntityBody);
reader.readNext();
+#ifndef QT_NO_TEXTCODEC
QTextCodec *codec = QTextCodec::codecForName(reader.documentEncoding().toString().toUtf8());
if (codec)
return codec->toUnicode(m_responseEntityBody);
-
+#endif
return QString::fromUtf8(m_responseEntityBody);
}
@@ -1662,4 +1665,6 @@ void qt_add_qmlxmlhttprequest(QScriptEngine *engine)
QT_END_NAMESPACE
+#endif // QT_NO_XMLSTREAMREADER
+
#include <qdeclarativexmlhttprequest.moc>
diff --git a/src/declarative/qml/qdeclarativexmlhttprequest_p.h b/src/declarative/qml/qdeclarativexmlhttprequest_p.h
index 068cd0fb3e..f340c1c4e6 100644
--- a/src/declarative/qml/qdeclarativexmlhttprequest_p.h
+++ b/src/declarative/qml/qdeclarativexmlhttprequest_p.h
@@ -56,6 +56,8 @@
#include <QtCore/qglobal.h>
+#ifndef QT_NO_XMLSTREAMREADER
+
QT_BEGIN_NAMESPACE
class QScriptEngine;
@@ -63,5 +65,7 @@ void qt_add_qmlxmlhttprequest(QScriptEngine *engine);
QT_END_NAMESPACE
+#endif // QT_NO_XMLSTREAMREADER
+
#endif // QDECLARATIVEXMLHTTPREQUEST_P_H
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index bdb9510549..6a9cf95834 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -632,15 +632,26 @@ QAbstractAnimation *QDeclarativePauseAnimation::qtAnimation()
\qmlclass ColorAnimation QDeclarativeColorAnimation
\since 4.7
\inherits PropertyAnimation
- \brief The ColorAnimation element allows you to animate color changes.
+ \brief The ColorAnimation element animates changes in color values.
- \code
- ColorAnimation { from: "white"; to: "#c0c0c0"; duration: 100 }
- \endcode
+ ColorAnimation is a specialized PropertyAnimation that defines an
+ animation to be applied when a color value changes.
+
+ Here is a ColorAnimation applied to the \c color property of a \l Rectangle
+ as a property value source. It animates the \c color property's value from
+ its current value to a value of "red", over 1000 milliseconds:
+
+ \snippet doc/src/snippets/declarative/coloranimation.qml 0
+
+ Like any other animation element, a ColorAnimation can be applied in a
+ number of ways, including transitions, behaviors and property value
+ sources. The \l PropertyAnimation documentation shows a variety of methods
+ for creating animations.
When used in a transition, ColorAnimation will by default animate
- all properties of type color that are changing. If a property or properties
- are explicitly set for the animation, then those will be used instead.
+ all properties of type color that have changed. If a \l{PropertyAnimation::}{property}
+ or \l{PropertyAnimation::}{properties} are explicitly set for the animation,
+ then those are used instead.
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
@@ -664,7 +675,24 @@ QDeclarativeColorAnimation::~QDeclarativeColorAnimation()
/*!
\qmlproperty color ColorAnimation::from
- This property holds the starting color.
+ This property holds the color value at which the animation should begin.
+
+ For example, the following animation is not applied until a color value
+ has reached "#c0c0c0":
+
+ \qml
+ Item {
+ states: [ ... ]
+
+ transition: Transition {
+ NumberAnimation { from: "#c0c0c0"; duration: 2000 }
+ }
+ }
+ \endqml
+
+ If this value is not set and the ColorAnimation is defined within
+ a \l Transition, it defaults to the value defined in the starting
+ state of the \l Transition.
*/
QColor QDeclarativeColorAnimation::from() const
{
@@ -679,7 +707,12 @@ void QDeclarativeColorAnimation::setFrom(const QColor &f)
/*!
\qmlproperty color ColorAnimation::to
- This property holds the ending color.
+
+ This property holds the color value at which the animation should end.
+
+ If this value is not set and the ColorAnimation is defined within
+ a \l Transition or \l Behavior, it defaults to the value defined in the end
+ state of the \l Transition or \l Behavior.
*/
QColor QDeclarativeColorAnimation::to() const
{
@@ -848,18 +881,27 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation()
\inherits Animation
\brief The PropertyAction element allows immediate property changes during animation.
- Explicitly set \c theimage.smooth=true during a transition:
+ PropertyAction is used to specify an immediate property change
+ during an animation. The property change is not animated.
+
+ For example, to explicitly set \c {theImage.smooth = true} during a \l Transition:
\code
- PropertyAction { target: theimage; property: "smooth"; value: true }
+ transitions: Transition {
+ ...
+ PropertyAction { target: theImage; property: "smooth"; value: true }
+ ...
+ }
\endcode
- Set \c thewebview.url to the value set for the destination state:
+ Or, to set \c theWebView.url to the value set for the destination state:
\code
- PropertyAction { target: thewebview; property: "url" }
+ transitions: Transition {
+ ...
+ PropertyAction { target: theWebView; property: "url" }
+ ...
+ }
\endcode
- The PropertyAction is immediate -
- the target property is not animated to the selected value in any way.
\sa QtDeclarative
*/
@@ -885,14 +927,6 @@ void QDeclarativePropertyActionPrivate::init()
QDeclarative_setParent_noEvent(spa, q);
}
-/*!
- \qmlproperty Object PropertyAction::target
- This property holds an explicit target object to animate.
-
- The exact effect of the \c target property depends on how the animation
- is being used. Refer to the \l {QML Animation} documentation for details.
-*/
-
QObject *QDeclarativePropertyAction::target() const
{
Q_D(const QDeclarativePropertyAction);
@@ -905,7 +939,7 @@ void QDeclarativePropertyAction::setTarget(QObject *o)
if (d->target == o)
return;
d->target = o;
- emit targetChanged(d->target, d->propertyName);
+ emit targetChanged();
}
QString QDeclarativePropertyAction::property() const
@@ -920,16 +954,16 @@ void QDeclarativePropertyAction::setProperty(const QString &n)
if (d->propertyName == n)
return;
d->propertyName = n;
- emit targetChanged(d->target, d->propertyName);
+ emit propertyChanged();
}
/*!
+ \qmlproperty Object PropertyAction::target
\qmlproperty list<Object> PropertyAction::targets
\qmlproperty string PropertyAction::property
\qmlproperty string PropertyAction::properties
- \qmlproperty Object PropertyAction::target
- These properties are used as a set to determine which properties should be
+ These properties determine the items and their properties that are
affected by this action.
The details of how these properties are interpreted in different situations
@@ -961,7 +995,7 @@ QDeclarativeListProperty<QObject> QDeclarativePropertyAction::targets()
/*!
\qmlproperty list<Object> PropertyAction::exclude
- This property holds the objects not to be affected by this animation.
+ This property holds the objects that should not be affected by this action.
\sa targets
*/
@@ -1096,13 +1130,25 @@ void QDeclarativePropertyAction::transition(QDeclarativeStateActions &actions,
\qmlclass NumberAnimation QDeclarativeNumberAnimation
\since 4.7
\inherits PropertyAnimation
- \brief The NumberAnimation element allows you to animate changes in properties of type qreal.
+ \brief The NumberAnimation element animates changes in qreal-type values.
- For example, to animate a set of properties over 200ms, from their values in the start state to
- their values in the end state of the transition:
- \code
- NumberAnimation { properties: "x,y,scale"; duration: 200 }
- \endcode
+ NumberAnimation is a specialized PropertyAnimation that defines an
+ animation to be applied when a numerical value changes.
+
+ Here is a NumberAnimation applied to the \c x property of a \l Rectangle
+ as a property value source. It animates the \c x value from its current
+ value to a value of 50, over 1000 milliseconds:
+
+ \snippet doc/src/snippets/declarative/numberanimation.qml 0
+
+ Like any other animation element, a NumberAnimation can be applied in a
+ number of ways, including transitions, behaviors and property value
+ sources. The \l PropertyAnimation documentation shows a variety of methods
+ for creating animations.
+
+ Note that NumberAnimation may not animate smoothly if there are irregular
+ changes in the number value that it is tracking. If this is the case, use
+ SmoothedAnimation instead.
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
@@ -1137,9 +1183,26 @@ void QDeclarativeNumberAnimation::init()
/*!
\qmlproperty real NumberAnimation::from
- This property holds the starting value.
- If not set, then the value defined in the start state of the transition.
+ This property holds the starting number value.
+
+ For example, the following animation is not applied until the \c x value
+ has reached 100:
+
+ \qml
+ Item {
+ states: [ ... ]
+
+ transition: Transition {
+ NumberAnimation { properties: "x"; from: 100; duration: 200 }
+ }
+ }
+ \endqml
+
+ If this value is not set and the NumberAnimation is defined within
+ a \l Transition, it defaults to the value defined in the start
+ state of the \l Transition.
*/
+
qreal QDeclarativeNumberAnimation::from() const
{
Q_D(const QDeclarativePropertyAnimation);
@@ -1153,8 +1216,11 @@ void QDeclarativeNumberAnimation::setFrom(qreal f)
/*!
\qmlproperty real NumberAnimation::to
- This property holds the ending value.
- If not set, then the value defined in the end state of the transition or Behavior.
+ This property holds the ending number value.
+
+ If this value is not set and the NumberAnimation is defined within
+ a \l Transition or \l Behavior, it defaults to the value defined in the end
+ state of the \l Transition or \l Behavior.
*/
qreal QDeclarativeNumberAnimation::to() const
{
@@ -1173,7 +1239,10 @@ void QDeclarativeNumberAnimation::setTo(qreal t)
\qmlclass Vector3dAnimation QDeclarativeVector3dAnimation
\since 4.7
\inherits PropertyAnimation
- \brief The Vector3dAnimation element allows you to animate changes in properties of type QVector3d.
+ \brief The Vector3dAnimation element animates changes in QVector3d values.
+
+ Vector3dAnimation is a specialized PropertyAnimation that defines an
+ animation to be applied when a Vector3d value changes.
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
@@ -1199,7 +1268,9 @@ QDeclarativeVector3dAnimation::~QDeclarativeVector3dAnimation()
/*!
\qmlproperty real Vector3dAnimation::from
This property holds the starting value.
- If not set, then the value defined in the start state of the transition.
+
+ If this value is not set, it defaults to the value defined in the start
+ state of the \l Transition.
*/
QVector3D QDeclarativeVector3dAnimation::from() const
{
@@ -1215,7 +1286,9 @@ void QDeclarativeVector3dAnimation::setFrom(QVector3D f)
/*!
\qmlproperty real Vector3dAnimation::to
This property holds the ending value.
- If not set, then the value defined in the end state of the transition or Behavior.
+
+ If this value is not set, it defaults to the value defined in the end
+ state of the \l Transition or \l Behavior.
*/
QVector3D QDeclarativeVector3dAnimation::to() const
{
@@ -1234,31 +1307,32 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
\qmlclass RotationAnimation QDeclarativeRotationAnimation
\since 4.7
\inherits PropertyAnimation
- \brief The RotationAnimation element allows you to animate rotations.
+ \brief The RotationAnimation element animates changes in rotation values.
RotationAnimation is a specialized PropertyAnimation that gives control
- over the direction of rotation. By default, it will rotate in the direction
+ over the direction of rotation during an animation.
+
+ By default, it rotates in the direction
of the numerical change; a rotation from 0 to 240 will rotate 220 degrees
clockwise, while a rotation from 240 to 0 will rotate 220 degrees
- counterclockwise.
+ counterclockwise. The \l direction property can be set to specify the
+ direction in which the rotation should occur.
- When used in a transition RotationAnimation will rotate all
+ In the following example we use RotationAnimation to animate the rotation
+ between states via the shortest path:
+
+ \snippet doc/src/snippets/declarative/rotationanimation.qml 0
+
+ Notice the RotationAnimation did not need to set a \l {RotationAnimation::}{target}
+ value. As a convenience, when used in a transition, RotationAnimation will rotate all
properties named "rotation" or "angle". You can override this by providing
your own properties via \l {PropertyAnimation::properties}{properties} or
\l {PropertyAnimation::property}{property}.
- In the following example we use RotationAnimation to animate the rotation
- between states via the shortest path.
- \qml
- states: {
- State { name: "180"; PropertyChanges { target: myItem; rotation: 180 } }
- State { name: "90"; PropertyChanges { target: myItem; rotation: 90 } }
- State { name: "-90"; PropertyChanges { target: myItem; rotation: -90 } }
- }
- transition: Transition {
- RotationAnimation { direction: RotationAnimation.Shortest }
- }
- \endqml
+ Like any other animation element, a RotationAnimation can be applied in a
+ number of ways, including transitions, behaviors and property value
+ sources. The \l PropertyAnimation documentation shows a variety of methods
+ for creating animations.
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
@@ -1320,8 +1394,23 @@ QDeclarativeRotationAnimation::~QDeclarativeRotationAnimation()
/*!
\qmlproperty real RotationAnimation::from
- This property holds the starting value.
- If not set, then the value defined in the start state of the transition.
+ This property holds the starting number value.
+
+ For example, the following animation is not applied until the \c angle value
+ has reached 100:
+
+ \qml
+ Item {
+ states: [ ... ]
+
+ transition: Transition {
+ RotationAnimation { properties: "angle"; from: 100; duration: 2000 }
+ }
+ }
+ \endqml
+
+ If this value is not set, it defaults to the value defined in the start
+ state of the \l Transition.
*/
qreal QDeclarativeRotationAnimation::from() const
{
@@ -1337,7 +1426,9 @@ void QDeclarativeRotationAnimation::setFrom(qreal f)
/*!
\qmlproperty real RotationAnimation::to
This property holds the ending value.
- If not set, then the value defined in the end state of the transition or Behavior.
+
+ If this value is not set, it defaults to the value defined in the end
+ state of the \l Transition or \l Behavior.
*/
qreal QDeclarativeRotationAnimation::to() const
{
@@ -1352,7 +1443,7 @@ void QDeclarativeRotationAnimation::setTo(qreal t)
/*!
\qmlproperty enumeration RotationAnimation::direction
- The direction in which to rotate.
+ This property holds the direction of the rotation.
Possible values are:
@@ -1445,20 +1536,31 @@ QDeclarativeListProperty<QDeclarativeAbstractAnimation> QDeclarativeAnimationGro
\qmlclass SequentialAnimation QDeclarativeSequentialAnimation
\since 4.7
\inherits Animation
- \brief The SequentialAnimation element allows you to run animations sequentially.
+ \brief The SequentialAnimation element allows animations to be run sequentially.
- Animations controlled in SequentialAnimation will be run one after the other.
+ The SequentialAnimation and ParallelAnimation elements allow multiple
+ animations to be run together. Animations defined in a SequentialAnimation
+ are run one after the other, while animations defined in a ParallelAnimation
+ are run at the same time.
- The following example chains two numeric animations together. The \c MyItem
- object will animate from its current x position to 100, and then back to 0.
+ The following example runs two number animations in a sequence. The \l Rectangle
+ animates to a \c x position of 50, then to a \c y position of 50.
- \code
- SequentialAnimation {
- NumberAnimation { target: MyItem; property: "x"; to: 100 }
- NumberAnimation { target: MyItem; property: "x"; to: 0 }
- }
- \endcode
+ \snippet doc/src/snippets/declarative/sequentialanimation.qml 0
+
+ Animations defined within a \l Transition are automatically run in parallel,
+ so SequentialAnimation can be used to enclose the animations in a \l Transition
+ if this is the preferred behavior.
+ Like any other animation element, a SequentialAnimation can be applied in a
+ number of ways, including transitions, behaviors and property value
+ sources. The \l PropertyAnimation documentation shows a variety of methods
+ for creating animations.
+
+ \note Once an animation has been grouped into a SequentialAnimation or
+ ParallelAnimation, it cannot be individually started and stopped; the
+ SequentialAnimation or ParallelAnimation must be started and stopped as a group.
+
\sa ParallelAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
@@ -1507,19 +1609,26 @@ void QDeclarativeSequentialAnimation::transition(QDeclarativeStateActions &actio
\qmlclass ParallelAnimation QDeclarativeParallelAnimation
\since 4.7
\inherits Animation
- \brief The ParallelAnimation element allows you to run animations in parallel.
+ \brief The ParallelAnimation element allows animations to be run in parallel.
- Animations contained in ParallelAnimation will be run at the same time.
+ The SequentialAnimation and ParallelAnimation elements allow multiple
+ animations to be run together. Animations defined in a SequentialAnimation
+ are run one after the other, while animations defined in a ParallelAnimation
+ are run at the same time.
- The following animation demonstrates animating the \c MyItem item
- to (100,100) by animating the x and y properties in parallel.
+ The following animation runs two number animations in parallel. The \l Rectangle
+ moves to (50,50) by animating its \c x and \c y properties at the same time.
- \code
- ParallelAnimation {
- NumberAnimation { target: MyItem; property: "x"; to: 100 }
- NumberAnimation { target: MyItem; property: "y"; to: 100 }
- }
- \endcode
+ \snippet doc/src/snippets/declarative/parallelanimation.qml 0
+
+ Like any other animation element, a ParallelAnimation can be applied in a
+ number of ways, including transitions, behaviors and property value
+ sources. The \l PropertyAnimation documentation shows a variety of methods
+ for creating animations.
+
+ \note Once an animation has been grouped into a SequentialAnimation or
+ ParallelAnimation, it cannot be individually started and stopped; the
+ SequentialAnimation or ParallelAnimation must be started and stopped as a group.
\sa SequentialAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
@@ -1618,59 +1727,60 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int
\qmlclass PropertyAnimation QDeclarativePropertyAnimation
\since 4.7
\inherits Animation
- \brief The PropertyAnimation element allows you to animate property changes.
+ \brief The PropertyAnimation element animates changes in property values.
+
+ PropertyAnimation provides a way to animate changes to a property's value.
- PropertyAnimation provides a way to animate changes to a property's value. It can
- be used in many different situations:
+ It can be used to define animations in a number of ways:
+
\list
- \o In a Transition
+ \o In a \l Transition
+
+ For example, to animate any objects that have changed their \c x or \c y properties
+ as a result of a state change, using an \c InOutQuad easing curve:
+
+ \snippet doc/src/snippets/declarative/propertyanimation.qml transition
+
+
+ \o In a \l Behavior
+
+ For example, to animate all changes to a rectangle's \c x property:
+
+ \snippet doc/src/snippets/declarative/propertyanimation.qml behavior
- Animate any objects that have changed their x or y properties in the target state using
- an InOutQuad easing curve:
- \qml
- Transition { PropertyAnimation { properties: "x,y"; easing.type: Easing.InOutQuad } }
- \endqml
- \o In a Behavior
- Animate all changes to a rectangle's x property.
- \qml
- Rectangle {
- Behavior on x { PropertyAnimation {} }
- }
- \endqml
\o As a property value source
- Repeatedly animate the rectangle's x property.
- \qml
- Rectangle {
- SequentialAnimation on x {
- loops: Animation.Infinite
- PropertyAnimation { to: 50 }
- PropertyAnimation { to: 0 }
- }
- }
- \endqml
+ For example, to repeatedly animate the rectangle's \c x property:
+
+ \snippet doc/src/snippets/declarative/propertyanimation.qml propertyvaluesource
+
+
\o In a signal handler
- Fade out \c theObject when clicked:
+ For example, to fade out \c theObject when clicked:
\qml
MouseArea {
anchors.fill: theObject
onClicked: PropertyAnimation { target: theObject; property: "opacity"; to: 0 }
}
\endqml
+
\o Standalone
- Animate \c theObject's size property over 200ms, from its current size to 20-by-20:
- \qml
- PropertyAnimation { target: theObject; property: "size"; to: "20x20"; duration: 200 }
- \endqml
+ For example, to animate \c rect's \c width property over 500ms, from its current width to 30:
+
+ \snippet doc/src/snippets/declarative/propertyanimation.qml standalone
+
\endlist
Depending on how the animation is used, the set of properties normally used will be
different. For more information see the individual property documentation, as well
as the \l{QML Animation} introduction.
+ Note that PropertyAnimation inherits the abstract \l Animation element.
+ This includes additional properties and methods for controlling the animation.
+
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
@@ -1827,15 +1937,15 @@ void QDeclarativePropertyAnimation::setTo(const QVariant &t)
\o \inlineimage qeasingcurve-inquart.png
\row
\o \c Easing.OutQuart
- \o Easing curve for a cubic (t^4) function: decelerating from zero velocity.
+ \o Easing curve for a quartic (t^4) function: decelerating from zero velocity.
\o \inlineimage qeasingcurve-outquart.png
\row
\o \c Easing.InOutQuart
- \o Easing curve for a cubic (t^4) function: acceleration until halfway, then deceleration.
+ \o Easing curve for a quartic (t^4) function: acceleration until halfway, then deceleration.
\o \inlineimage qeasingcurve-inoutquart.png
\row
\o \c Easing.OutInQuart
- \o Easing curve for a cubic (t^4) function: deceleration until halfway, then acceleration.
+ \o Easing curve for a quartic (t^4) function: deceleration until halfway, then acceleration.
\o \inlineimage qeasingcurve-outinquart.png
\row
\o \c Easing.InQuint
@@ -1843,15 +1953,15 @@ void QDeclarativePropertyAnimation::setTo(const QVariant &t)
\o \inlineimage qeasingcurve-inquint.png
\row
\o \c Easing.OutQuint
- \o Easing curve for a cubic (t^5) function: decelerating from zero velocity.
+ \o Easing curve for a quintic (t^5) function: decelerating from zero velocity.
\o \inlineimage qeasingcurve-outquint.png
\row
\o \c Easing.InOutQuint
- \o Easing curve for a cubic (t^5) function: acceleration until halfway, then deceleration.
+ \o Easing curve for a quintic (t^5) function: acceleration until halfway, then deceleration.
\o \inlineimage qeasingcurve-inoutquint.png
\row
\o \c Easing.OutInQuint
- \o Easing curve for a cubic (t^5) function: deceleration until halfway, then acceleration.
+ \o Easing curve for a quintic (t^5) function: deceleration until halfway, then acceleration.
\o \inlineimage qeasingcurve-outinquint.png
\row
\o \c Easing.InSine
@@ -1969,17 +2079,16 @@ void QDeclarativePropertyAnimation::setTo(const QVariant &t)
QEasingCurve QDeclarativePropertyAnimation::easing() const
{
Q_D(const QDeclarativePropertyAnimation);
- return d->easing;
+ return d->va->easingCurve();
}
void QDeclarativePropertyAnimation::setEasing(const QEasingCurve &e)
{
Q_D(QDeclarativePropertyAnimation);
- if (d->easing == e)
+ if (d->va->easingCurve() == e)
return;
- d->easing = e;
- d->va->setEasingCurve(d->easing);
+ d->va->setEasingCurve(e);
emit easingChanged(e);
}
@@ -1995,7 +2104,7 @@ void QDeclarativePropertyAnimation::setTarget(QObject *o)
if (d->target == o)
return;
d->target = o;
- emit targetChanged(d->target, d->propertyName);
+ emit targetChanged();
}
QString QDeclarativePropertyAnimation::property() const
@@ -2010,7 +2119,7 @@ void QDeclarativePropertyAnimation::setProperty(const QString &n)
if (d->propertyName == n)
return;
d->propertyName = n;
- emit targetChanged(d->target, d->propertyName);
+ emit propertyChanged();
}
QString QDeclarativePropertyAnimation::properties() const
@@ -2285,43 +2394,30 @@ void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions
\qmlclass ParentAnimation QDeclarativeParentAnimation
\since 4.7
\inherits Animation
- \brief The ParentAnimation element allows you to animate parent changes.
+ \brief The ParentAnimation element animates changes in parent values.
- ParentAnimation is used in conjunction with NumberAnimation to smoothly
- animate changing an item's parent. In the following example,
- ParentAnimation wraps a NumberAnimation which animates from the
- current position in the old parent to the new position in the new
- parent.
+ ParentAnimation defines an animation to applied when a ParentChange
+ occurs. This allows parent changes to be smoothly animated.
- \qml
- ...
- State {
- //reparent myItem to newParent. myItem's final location
- //should be 10,10 in newParent.
- ParentChange {
- target: myItem
- parent: newParent
- x: 10; y: 10
- }
- }
- ...
- Transition {
- //smoothly reparent myItem and move into new position
- ParentAnimation {
- target: theItem
- NumberAnimation { properties: "x,y" }
- }
- }
- \endqml
+ For example, the following ParentChange changes \c blueRect to become
+ a child of \c redRect when it is clicked. The inclusion of the
+ ParentAnimation, which defines a NumberAnimation to be applied during
+ the transition, ensures the item animates smoothly as it moves to
+ its new parent:
- ParentAnimation can wrap any number of animations -- those animations will
- be run in parallel (like those in a ParallelAnimation group).
+ \snippet doc/src/snippets/declarative/parentanimation.qml 0
- In some cases, such as reparenting between items with clipping, it's useful
- to animate the parent change via another item with no clipping.
+ A ParentAnimation can contain any number of animations. These animations will
+ be run in parallel; to run them sequentially, define them within a
+ SequentialAnimation.
- When used in a transition, ParentAnimation will by default animate
- all ParentChanges.
+ In some cases, such as when reparenting between items with clipping enabled, it is useful
+ to animate the parent change via another item that does not have clipping
+ enabled. Such an item can be set using the \l via property.
+
+ By default, when used in a transition, ParentAnimation animates all parent
+ changes. This can be overridden by setting a specific target item using the
+ \l target property.
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
@@ -2358,8 +2454,8 @@ QDeclarativeParentAnimation::~QDeclarativeParentAnimation()
\qmlproperty Item ParentAnimation::target
The item to reparent.
- When used in a transition, if no target is specified all
- ParentChanges will be animated by the ParentAnimation.
+ When used in a transition, if no target is specified, all
+ ParentChange occurrences are animated by the ParentAnimation.
*/
QDeclarativeItem *QDeclarativeParentAnimation::target() const
{
@@ -2402,7 +2498,7 @@ void QDeclarativeParentAnimation::setNewParent(QDeclarativeItem *newParent)
/*!
\qmlproperty Item ParentAnimation::via
The item to reparent via. This provides a way to do an unclipped animation
- when both the old parent and new parent are clipped
+ when both the old parent and new parent are clipped.
\qml
ParentAnimation {
@@ -2652,28 +2748,14 @@ QAbstractAnimation *QDeclarativeParentAnimation::qtAnimation()
\qmlclass AnchorAnimation QDeclarativeAnchorAnimation
\since 4.7
\inherits Animation
- \brief The AnchorAnimation element allows you to animate anchor changes.
+ \brief The AnchorAnimation element animates changes in anchor values.
- AnchorAnimation will animated any changes specified by a state's AnchorChanges.
- In the following snippet we animate the addition of a right anchor to our item.
- \qml
- Item {
- id: myItem
- width: 100
- }
- ...
- State {
- AnchorChanges {
- target: myItem
- anchors.right: container.right
- }
- }
- ...
- Transition {
- //smoothly reanchor myItem and move into new position
- AnchorAnimation {}
- }
- \endqml
+ AnchorAnimation is used to animate an AnchorChange. It will anchor all
+ anchor changes specified in a \l State.
+
+ In the following snippet we animate the addition of a right anchor to a \l Rectangle:
+
+ \snippet doc/src/snippets/declarative/anchoranimation.qml 0
\sa AnchorChanges
*/
diff --git a/src/declarative/util/qdeclarativeanimation_p.h b/src/declarative/util/qdeclarativeanimation_p.h
index 59bd465f0f..481c36c224 100644
--- a/src/declarative/util/qdeclarativeanimation_p.h
+++ b/src/declarative/util/qdeclarativeanimation_p.h
@@ -197,7 +197,7 @@ class QDeclarativePropertyAction : public QDeclarativeAbstractAnimation
Q_DECLARE_PRIVATE(QDeclarativePropertyAction)
Q_PROPERTY(QObject *target READ target WRITE setTarget NOTIFY targetChanged)
- Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY targetChanged)
+ Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY propertyChanged)
Q_PROPERTY(QString properties READ properties WRITE setProperties NOTIFY propertiesChanged)
Q_PROPERTY(QDeclarativeListProperty<QObject> targets READ targets)
Q_PROPERTY(QDeclarativeListProperty<QObject> exclude READ exclude)
@@ -225,7 +225,8 @@ public:
Q_SIGNALS:
void valueChanged(const QVariant &);
void propertiesChanged(const QString &);
- void targetChanged(QObject *, const QString &);
+ void targetChanged();
+ void propertyChanged();
protected:
virtual void transition(QDeclarativeStateActions &actions,
@@ -246,7 +247,7 @@ class Q_AUTOTEST_EXPORT QDeclarativePropertyAnimation : public QDeclarativeAbstr
Q_PROPERTY(QVariant to READ to WRITE setTo NOTIFY toChanged)
Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing NOTIFY easingChanged)
Q_PROPERTY(QObject *target READ target WRITE setTarget NOTIFY targetChanged)
- Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY targetChanged)
+ Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY propertyChanged)
Q_PROPERTY(QString properties READ properties WRITE setProperties NOTIFY propertiesChanged)
Q_PROPERTY(QDeclarativeListProperty<QObject> targets READ targets)
Q_PROPERTY(QDeclarativeListProperty<QObject> exclude READ exclude)
@@ -292,7 +293,8 @@ Q_SIGNALS:
void toChanged(QVariant);
void easingChanged(const QEasingCurve &);
void propertiesChanged(const QString &);
- void targetChanged(QObject *, const QString &);
+ void targetChanged();
+ void propertyChanged();
};
class Q_AUTOTEST_EXPORT QDeclarativeColorAnimation : public QDeclarativePropertyAnimation
diff --git a/src/declarative/util/qdeclarativeanimation_p_p.h b/src/declarative/util/qdeclarativeanimation_p_p.h
index b6d6bbb795..e38580cc1f 100644
--- a/src/declarative/util/qdeclarativeanimation_p_p.h
+++ b/src/declarative/util/qdeclarativeanimation_p_p.h
@@ -311,8 +311,6 @@ public:
QVariant from;
QVariant to;
- QEasingCurve easing;
-
QObject *target;
QString propertyName;
QString properties;
diff --git a/src/declarative/util/qdeclarativebehavior.cpp b/src/declarative/util/qdeclarativebehavior.cpp
index 2bb28c31bb..fadb2ae1ab 100644
--- a/src/declarative/util/qdeclarativebehavior.cpp
+++ b/src/declarative/util/qdeclarativebehavior.cpp
@@ -75,28 +75,21 @@ public:
\since 4.7
\brief The Behavior element allows you to specify a default animation for a property change.
- Behaviors provide one way to specify \l{qdeclarativeanimation.html}{animations} in QML.
-
- In the example below, the rectangle will use a bounce easing curve over 200 millisecond for any changes to its y property:
- \code
- Rectangle {
- width: 20; height: 20
- color: "#00ff00"
- y: 200 // initial value
- Behavior on y {
- NumberAnimation {
- easing.type: Easing.OutBounce
- easing.amplitude: 100
- duration: 200
- }
- }
- }
- \endcode
+ A Behavior defines the default animation to be applied whenever a
+ particular property value changes.
+
+ For example, the following Behavior defines a NumberAnimation to be run
+ whenever the \l Rectangle's \c width value changes. When the MouseArea
+ is clicked, the \c width is changed, triggering the behavior's animation:
+
+ \snippet doc/src/snippets/declarative/behavior.qml 0
- Currently only a single Behavior may be specified for a property;
- this Behavior can be enabled and disabled via the \l{enabled} property.
+ To run multiple animations within a Behavior, use ParallelAnimation or
+ SequentialAnimation.
- \sa {declarative/animation/behaviors}{Behavior example}, QtDeclarative
+ Note that a property cannot have more than one assigned Behavior.
+
+ \sa {Property Behaviors}, {declarative/animation/behaviors}{Behavior example}, QtDeclarative
*/
@@ -113,7 +106,7 @@ QDeclarativeBehavior::~QDeclarativeBehavior()
\qmlproperty Animation Behavior::animation
\default
- The animation to use when the behavior is triggered.
+ This property holds the animation to run when the behavior is triggered.
*/
QDeclarativeAbstractAnimation *QDeclarativeBehavior::animation()
@@ -152,7 +145,9 @@ void QDeclarativeBehavior::qtAnimationStateChanged(QAbstractAnimation::State new
/*!
\qmlproperty bool Behavior::enabled
- Whether the Behavior will be triggered when the property it is tracking changes.
+
+ This property holds whether the behavior will be triggered when the tracked
+ property changes value.
By default a Behavior is enabled.
*/
@@ -182,7 +177,7 @@ void QDeclarativeBehavior::write(const QVariant &value)
return;
}
- if (value == d->targetValue)
+ if (d->animation->isRunning() && value == d->targetValue)
return;
d->currentValue = d->property.read();
diff --git a/src/declarative/util/qdeclarativeopenmetaobject.cpp b/src/declarative/util/qdeclarativeopenmetaobject.cpp
index ba5d5340ec..40485bd503 100644
--- a/src/declarative/util/qdeclarativeopenmetaobject.cpp
+++ b/src/declarative/util/qdeclarativeopenmetaobject.cpp
@@ -161,6 +161,12 @@ public:
prop.second = true;
}
+ inline bool hasData(int idx) const {
+ if (idx >= data.count())
+ return false;
+ return data[idx].second;
+ }
+
bool autoCreate;
QDeclarativeOpenMetaObject *q;
QAbstractDynamicMetaObject *parent;
@@ -295,6 +301,12 @@ void QDeclarativeOpenMetaObject::setValue(const QByteArray &name, const QVariant
activate(d->object, id + d->type->d->signalOffset, 0);
}
+// returns true if this value has been initialized by a call to either value() or setValue()
+bool QDeclarativeOpenMetaObject::hasValue(int id) const
+{
+ return d->hasData(id);
+}
+
void QDeclarativeOpenMetaObject::setCached(bool c)
{
if (c == d->cacheProperties || !d->type->d->engine)
diff --git a/src/declarative/util/qdeclarativeopenmetaobject_p.h b/src/declarative/util/qdeclarativeopenmetaobject_p.h
index 9bb4c34529..c18fa3d036 100644
--- a/src/declarative/util/qdeclarativeopenmetaobject_p.h
+++ b/src/declarative/util/qdeclarativeopenmetaobject_p.h
@@ -91,6 +91,7 @@ public:
void setValue(int, const QVariant &);
QVariant &operator[](const QByteArray &);
QVariant &operator[](int);
+ bool hasValue(int) const;
int count() const;
QByteArray name(int) const;
diff --git a/src/declarative/util/qdeclarativepixmapcache.cpp b/src/declarative/util/qdeclarativepixmapcache.cpp
index 00dd922c88..9ced14f5c7 100644
--- a/src/declarative/util/qdeclarativepixmapcache.cpp
+++ b/src/declarative/util/qdeclarativepixmapcache.cpp
@@ -70,6 +70,16 @@
QT_BEGIN_NAMESPACE
+// The cache limit describes the maximum "junk" in the cache.
+// These are the same defaults as QPixmapCache
+#if defined(Q_OS_SYMBIAN)
+static int cache_limit = 1024 * 1024; // 1048 KB cache limit for symbian
+#elif defined(Q_WS_QWS) || defined(Q_WS_WINCE)
+static int cache_limit = 2048 * 1024; // 2048 KB cache limit for embedded
+#else
+static int cache_limit = 10240 * 1024; // 10 MB cache limit for desktop
+#endif
+
class QDeclarativePixmapReader;
class QDeclarativePixmapData;
class QDeclarativePixmapReply : public QObject
@@ -114,6 +124,18 @@ public:
static int downloadProgressIndex;
};
+class QDeclarativePixmapReaderThreadObject : public QObject {
+ Q_OBJECT
+public:
+ QDeclarativePixmapReaderThreadObject(QDeclarativePixmapReader *);
+ void processJobs();
+ virtual bool event(QEvent *e);
+private slots:
+ void networkRequestDone();
+private:
+ QDeclarativePixmapReader *reader;
+};
+
class QDeclarativePixmapData;
class QDeclarativePixmapReader : public QThread
{
@@ -130,12 +152,11 @@ public:
protected:
void run();
-private slots:
- void networkRequestDone();
-
private:
+ friend class QDeclarativePixmapReaderThreadObject;
void processJobs();
void processJob(QDeclarativePixmapReply *);
+ void networkRequestDone(QNetworkReply *);
QList<QDeclarativePixmapReply*> jobs;
QList<QDeclarativePixmapReply*> cancelled;
@@ -143,14 +164,7 @@ private:
QObject *eventLoopQuitHack;
QMutex mutex;
- class ThreadObject : public QObject {
- public:
- ThreadObject(QDeclarativePixmapReader *);
- void processJobs();
- virtual bool event(QEvent *e);
- private:
- QDeclarativePixmapReader *reader;
- } *threadObject;
+ QDeclarativePixmapReaderThreadObject *threadObject;
QWaitCondition waitCondition;
QNetworkAccessManager *networkAccessManager();
@@ -161,7 +175,7 @@ private:
static int replyDownloadProgress;
static int replyFinished;
static int downloadProgress;
- static int thisNetworkRequestDone;
+ static int threadNetworkRequestDone;
static QHash<QDeclarativeEngine *,QDeclarativePixmapReader*> readers;
static QMutex readerMutex;
};
@@ -232,7 +246,7 @@ QMutex QDeclarativePixmapReader::readerMutex;
int QDeclarativePixmapReader::replyDownloadProgress = -1;
int QDeclarativePixmapReader::replyFinished = -1;
int QDeclarativePixmapReader::downloadProgress = -1;
-int QDeclarativePixmapReader::thisNetworkRequestDone = -1;
+int QDeclarativePixmapReader::threadNetworkRequestDone = -1;
void QDeclarativePixmapReply::postReply(ReadError error, const QString &errorString,
@@ -317,9 +331,8 @@ QDeclarativePixmapReader::~QDeclarativePixmapReader()
wait();
}
-void QDeclarativePixmapReader::networkRequestDone()
+void QDeclarativePixmapReader::networkRequestDone(QNetworkReply *reply)
{
- QNetworkReply *reply = static_cast<QNetworkReply *>(sender());
QDeclarativePixmapReply *job = replies.take(reply);
if (job) {
@@ -335,7 +348,7 @@ void QDeclarativePixmapReader::networkRequestDone()
reply = networkAccessManager()->get(req);
QMetaObject::connect(reply, replyDownloadProgress, job, downloadProgress);
- QMetaObject::connect(reply, replyFinished, this, thisNetworkRequestDone);
+ QMetaObject::connect(reply, replyFinished, threadObject, threadNetworkRequestDone);
replies.insert(reply, job);
return;
@@ -368,17 +381,17 @@ void QDeclarativePixmapReader::networkRequestDone()
threadObject->processJobs();
}
-QDeclarativePixmapReader::ThreadObject::ThreadObject(QDeclarativePixmapReader *i)
+QDeclarativePixmapReaderThreadObject::QDeclarativePixmapReaderThreadObject(QDeclarativePixmapReader *i)
: reader(i)
{
}
-void QDeclarativePixmapReader::ThreadObject::processJobs()
+void QDeclarativePixmapReaderThreadObject::processJobs()
{
QCoreApplication::postEvent(this, new QEvent(QEvent::User));
}
-bool QDeclarativePixmapReader::ThreadObject::event(QEvent *e)
+bool QDeclarativePixmapReaderThreadObject::event(QEvent *e)
{
if (e->type() == QEvent::User) {
reader->processJobs();
@@ -388,6 +401,12 @@ bool QDeclarativePixmapReader::ThreadObject::event(QEvent *e)
}
}
+void QDeclarativePixmapReaderThreadObject::networkRequestDone()
+{
+ QNetworkReply *reply = static_cast<QNetworkReply *>(sender());
+ reader->networkRequestDone(reply);
+}
+
void QDeclarativePixmapReader::processJobs()
{
QMutexLocker locker(&mutex);
@@ -469,7 +488,7 @@ void QDeclarativePixmapReader::processJob(QDeclarativePixmapReply *runningJob)
QNetworkReply *reply = networkAccessManager()->get(req);
QMetaObject::connect(reply, replyDownloadProgress, runningJob, downloadProgress);
- QMetaObject::connect(reply, replyFinished, this, thisNetworkRequestDone);
+ QMetaObject::connect(reply, replyFinished, threadObject, threadNetworkRequestDone);
replies.insert(reply, runningJob);
}
@@ -520,15 +539,15 @@ void QDeclarativePixmapReader::run()
if (replyDownloadProgress == -1) {
const QMetaObject *nr = &QNetworkReply::staticMetaObject;
const QMetaObject *pr = &QDeclarativePixmapReply::staticMetaObject;
- const QMetaObject *ir = &QDeclarativePixmapReader::staticMetaObject;
+ const QMetaObject *ir = &QDeclarativePixmapReaderThreadObject::staticMetaObject;
replyDownloadProgress = nr->indexOfSignal("downloadProgress(qint64,qint64)");
replyFinished = nr->indexOfSignal("finished()");
downloadProgress = pr->indexOfSignal("downloadProgress(qint64,qint64)");
- thisNetworkRequestDone = ir->indexOfSlot("networkRequestDone()");
+ threadNetworkRequestDone = ir->indexOfSlot("networkRequestDone()");
}
mutex.lock();
- threadObject = new ThreadObject(this);
+ threadObject = new QDeclarativePixmapReaderThreadObject(this);
mutex.unlock();
processJobs();
@@ -571,6 +590,8 @@ public:
QHash<QDeclarativePixmapKey, QDeclarativePixmapData *> m_cache;
private:
+ void shrinkCache(int remove);
+
QDeclarativePixmapData *m_unreferencedPixmaps;
QDeclarativePixmapData *m_lastUnreferencedPixmap;
@@ -604,8 +625,10 @@ void QDeclarativePixmapStore::unreferencePixmap(QDeclarativePixmapData *data)
m_unreferencedCost += data->cost();
- if (m_timerId == -1)
- startTimer(CACHE_EXPIRE_TIME * 1000);
+ shrinkCache(-1); // Shrink the cache incase it has become larger than cache_limit
+
+ if (m_timerId == -1 && m_unreferencedPixmaps)
+ m_timerId = startTimer(CACHE_EXPIRE_TIME * 1000);
}
void QDeclarativePixmapStore::referencePixmap(QDeclarativePixmapData *data)
@@ -627,11 +650,9 @@ void QDeclarativePixmapStore::referencePixmap(QDeclarativePixmapData *data)
m_unreferencedCost -= data->cost();
}
-void QDeclarativePixmapStore::timerEvent(QTimerEvent *)
+void QDeclarativePixmapStore::shrinkCache(int remove)
{
- int removalCost = m_unreferencedCost / CACHE_REMOVAL_FRACTION;
-
- while (removalCost > 0 && m_lastUnreferencedPixmap) {
+ while ((remove > 0 || m_unreferencedCost > cache_limit) && m_lastUnreferencedPixmap) {
QDeclarativePixmapData *data = m_lastUnreferencedPixmap;
Q_ASSERT(data->nextUnreferenced == 0);
@@ -640,10 +661,17 @@ void QDeclarativePixmapStore::timerEvent(QTimerEvent *)
data->prevUnreferencedPtr = 0;
data->prevUnreferenced = 0;
- removalCost -= data->cost();
+ remove -= data->cost();
data->removeFromCache();
delete data;
}
+}
+
+void QDeclarativePixmapStore::timerEvent(QTimerEvent *)
+{
+ int removalCost = m_unreferencedCost / CACHE_REMOVAL_FRACTION;
+
+ shrinkCache(removalCost);
if (m_unreferencedPixmaps == 0) {
killTimer(m_timerId);
@@ -693,7 +721,7 @@ bool QDeclarativePixmapReply::event(QEvent *event)
int QDeclarativePixmapData::cost() const
{
- return pixmap.width() * pixmap.height() * pixmap.depth();
+ return (pixmap.width() * pixmap.height() * pixmap.depth()) / 8;
}
void QDeclarativePixmapData::addref()
diff --git a/src/declarative/util/qdeclarativesmoothedanimation.cpp b/src/declarative/util/qdeclarativesmoothedanimation.cpp
index 5d47c308aa..727f4278c2 100644
--- a/src/declarative/util/qdeclarativesmoothedanimation.cpp
+++ b/src/declarative/util/qdeclarativesmoothedanimation.cpp
@@ -253,15 +253,22 @@ void QSmoothedAnimation::init()
\inherits NumberAnimation
\brief The SmoothedAnimation element allows a property to smoothly track a value.
- The SmoothedAnimation animates a property's value to a set target value
- using an ease in/out quad easing curve. If the animation is restarted
- with a different target value, the easing curves used to animate to the old
- and the new target values are smoothly spliced together to avoid any obvious
- visual glitches by maintaining the current velocity.
-
- The property animation is configured by setting the velocity at which the
- animation should occur, or the duration that the animation should take.
- If both a velocity and a duration are specified, the one that results in
+ A SmoothedAnimation animates a property's value to a set target value
+ using an ease in/out quad easing curve. When the target value changes,
+ the easing curves used to animate between the old and new target values
+ are smoothly spliced together to create a smooth movement to the new
+ target value that maintains the current velocity.
+
+ The follow example shows one \l Rectangle tracking the position of another
+ using SmoothedAnimation. The green rectangle's \c x and \c y values are
+ bound to those of the red rectangle. Whenever these values change, the
+ green rectangle smoothly animates to its new position:
+
+ \snippet doc/src/snippets/declarative/smoothedanimation.qml 0
+
+ A SmoothedAnimation can be configured by setting the \l velocity at which the
+ animation should occur, or the \l duration that the animation should take.
+ If both the \l velocity and \l duration are specified, the one that results in
the quickest animation is chosen for each change in the target value.
For example, animating from 0 to 800 will take 4 seconds if a velocity
@@ -271,35 +278,6 @@ void QSmoothedAnimation::init()
will take 8 seconds with a duration of 8000 set, and will take 8 seconds
with both a velocity of 200 and a duration of 8000 set.
- The follow example shows one rectangle tracking the position of another.
-\code
-import Qt 4.7
-
-Rectangle {
- width: 800; height: 600; color: "blue"
-
- Rectangle {
- color: "green"
- width: 60; height: 60;
- x: rect1.x - 5; y: rect1.y - 5;
- Behavior on x { SmoothedAnimation { velocity: 200 } }
- Behavior on y { SmoothedAnimation { velocity: 200 } }
- }
-
- Rectangle {
- id: rect1
- color: "red"
- width: 50; height: 50;
- }
-
- focus: true
- Keys.onRightPressed: rect1.x = rect1.x + 100
- Keys.onLeftPressed: rect1.x = rect1.x - 100
- Keys.onUpPressed: rect1.y = rect1.y - 100
- Keys.onDownPressed: rect1.y = rect1.y + 100
-}
-\endcode
-
The default velocity of SmoothedAnimation is 200 units/second. Note that if the range of the
value being animated is small, then the velocity will need to be adjusted
appropriately. For example, the opacity of an item ranges from 0 - 1.0.
@@ -307,7 +285,12 @@ Rectangle {
set to a value such as 0.5 units/second. Animating from 0 to 1.0 with a velocity
of 0.5 will take 2000 ms to complete.
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ Like any other animation element, a SmoothedAnimation can be applied in a
+ number of ways, including transitions, behaviors and property value
+ sources. The \l PropertyAnimation documentation shows a variety of methods
+ for creating animations.
+
+ \sa SpringAnimation, NumberAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeSmoothedAnimation::QDeclarativeSmoothedAnimation(QObject *parent)
@@ -388,11 +371,13 @@ void QDeclarativeSmoothedAnimation::transition(QDeclarativeStateActions &actions
Sets how the SmoothedAnimation behaves if an animation direction is reversed.
- If reversing mode is \c SmoothedAnimation.Eased, the animation will smoothly decelerate, and
- then reverse direction. If the reversing mode is \c SmoothedAnimation.Immediate, the
- animation will immediately begin accelerating in the reverse direction,
- begining with a velocity of 0. If the reversing mode is \c SmoothedAnimation.Sync, the
- property is immediately set to the target value.
+ Possible values are:
+
+ \list
+ \o SmoothedAnimation.Eased (default) - the animation will smoothly decelerate, and then reverse direction
+ \o SmoothedAnimation.Immediate - the animation will immediately begin accelerating in the reverse direction, beginning with a velocity of 0
+ \o SmoothedAnimation.Sync - the property is immediately set to the target value
+ \endlist
*/
QDeclarativeSmoothedAnimation::ReversingMode QDeclarativeSmoothedAnimation::reversingMode() const
{
diff --git a/src/declarative/util/qdeclarativespringanimation.cpp b/src/declarative/util/qdeclarativespringanimation.cpp
index 4cf2fc0db1..8ce4832556 100644
--- a/src/declarative/util/qdeclarativespringanimation.cpp
+++ b/src/declarative/util/qdeclarativespringanimation.cpp
@@ -207,14 +207,26 @@ void QDeclarativeSpringAnimationPrivate::updateMode()
\qmlclass SpringAnimation QDeclarativeSpringAnimation
\since 4.7
- \brief The SpringAnimation element allows a property to track a value in a spring-like motion
+ \brief The SpringAnimation element allows a property to track a value in a spring-like motion.
SpringAnimation mimics the oscillatory behavior of a spring, with the appropriate \l spring constant to
control the acceleration and the \l damping to control how quickly the effect dies away.
You can also limit the maximum \l velocity of the animation.
+ The following \l Rectangle moves to the position of the mouse using a
+ SpringAnimation when the mouse is clicked. The use of the \l Behavior
+ on the \c x and \c y values indicates that whenever these values are
+ changed, a SpringAnimation should be applied.
+ \snippet doc/src/snippets/declarative/springanimation.qml 0
+
+ Like any other animation element, a SpringAnimation can be applied in a
+ number of ways, including transitions, behaviors and property value
+ sources. The \l PropertyAnimation documentation shows a variety of methods
+ for creating animations.
+
+ \sa SmoothedAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}, {declarative/toys/clocks}{Clocks example}
*/
QDeclarativeSpringAnimation::QDeclarativeSpringAnimation(QObject *parent)
@@ -244,6 +256,11 @@ qreal QDeclarativeSpringAnimation::to() const
/*!
\qmlproperty real SpringAnimation::to
+
+ This property holds the value at which the animation will end.
+
+ If not set, the animation will continue until it reaches the
+ value that is being tracked.
*/
void QDeclarativeSpringAnimation::setTo(qreal value)
@@ -266,6 +283,11 @@ qreal QDeclarativeSpringAnimation::from() const
/*!
\qmlproperty real SpringAnimation::from
+
+ This property holds the value from which the animation will begin.
+
+ If not set, the animation will start whenever the tracked value has
+ changed, regardless of its value.
*/
void QDeclarativeSpringAnimation::setFrom(qreal value)
@@ -283,7 +305,10 @@ void QDeclarativeSpringAnimation::setFrom(qreal value)
/*!
\qmlproperty real SpringAnimation::velocity
+
This property holds the maximum velocity allowed when tracking the source.
+
+ The default value is 0 (no maximum velocity).
*/
qreal QDeclarativeSpringAnimation::velocity() const
@@ -302,13 +327,14 @@ void QDeclarativeSpringAnimation::setVelocity(qreal velocity)
/*!
\qmlproperty real SpringAnimation::spring
- This property holds the spring constant
- The spring constant describes how strongly the target is pulled towards the
- source. Setting spring to 0 turns off spring tracking. Useful values 0 - 5.0
+ This property describes how strongly the target is pulled towards the
+ source. The default value is 0 (that is, the spring-like motion is disabled).
+
+ The useful value range is 0 - 5.0.
- When a spring constant is set and the velocity property is greater than 0,
- velocity limits the maximum speed.
+ When this property is set and the \l velocity value is greater than 0,
+ the \l velocity limits the maximum speed.
*/
qreal QDeclarativeSpringAnimation::spring() const
{
@@ -325,10 +351,13 @@ void QDeclarativeSpringAnimation::setSpring(qreal spring)
/*!
\qmlproperty real SpringAnimation::damping
- This property holds the spring damping constant
+ This property holds the spring damping value.
+
+ This value describes how quickly the spring-like motion comes to rest.
+ The default value is 0.
- The damping constant describes how quickly a sprung follower comes to rest.
- Useful range is 0 - 1.0
+ The useful value range is 0 - 1.0. The lower the value, the faster it
+ comes to rest.
*/
qreal QDeclarativeSpringAnimation::damping() const
{
@@ -348,7 +377,7 @@ void QDeclarativeSpringAnimation::setDamping(qreal damping)
/*!
\qmlproperty real SpringAnimation::epsilon
- This property holds the spring epsilon
+ This property holds the spring epsilon.
The epsilon is the rate and amount of change in the value which is close enough
to 0 to be considered equal to zero. This will depend on the usage of the value.
@@ -370,7 +399,7 @@ void QDeclarativeSpringAnimation::setEpsilon(qreal epsilon)
/*!
\qmlproperty real SpringAnimation::modulus
- This property holds the modulus value.
+ This property holds the modulus value. The default value is 0.
Setting a \a modulus forces the target value to "wrap around" at the modulus.
For example, setting the modulus to 360 will cause a value of 370 to wrap around to 10.
@@ -395,8 +424,10 @@ void QDeclarativeSpringAnimation::setModulus(qreal modulus)
\qmlproperty real SpringAnimation::mass
This property holds the "mass" of the property being moved.
- mass is 1.0 by default. Setting a different mass changes the dynamics of
- a \l spring follow.
+ The value is 1.0 by default.
+
+ A greater mass causes slower movement and a greater spring-like
+ motion when an item comes to rest.
*/
qreal QDeclarativeSpringAnimation::mass() const
{
diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp
index ae19a9ce15..0d43d21433 100644
--- a/src/declarative/util/qdeclarativestate.cpp
+++ b/src/declarative/util/qdeclarativestate.cpp
@@ -144,7 +144,7 @@ QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObje
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
+ The following example displays a single \l 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
@@ -157,7 +157,7 @@ QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObje
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
+ \note Setting the state of an object from within another state of the same object is
not allowed.
\sa {declarative/animation/states}{states example}, {qmlstates}{States}, {state-transitions}{Transitions}, QtDeclarative
@@ -194,7 +194,7 @@ QDeclarativeState::~QDeclarativeState()
\qmlproperty string State::name
This property holds the name of the state.
- Each state should have a unique name.
+ Each state should have a unique name within its item.
*/
QString QDeclarativeState::name() const
{
@@ -226,7 +226,10 @@ bool QDeclarativeState::isWhenKnown() const
This property holds when the state should be applied.
This should be set to an expression that evaluates to \c true when you want the state to
- be applied.
+ be applied. For example, the following \l Rectangle changes in and out of the "hidden"
+ state when the \l MouseArea is pressed:
+
+ \snippet doc/src/snippets/declarative/state-when.qml 0
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
@@ -342,8 +345,10 @@ QDeclarativeStatePrivate::generateActionList(QDeclarativeStateGroup *group) cons
if (!extends.isEmpty()) {
QList<QDeclarativeState *> states = group->states();
for (int ii = 0; ii < states.count(); ++ii)
- if (states.at(ii)->name() == extends)
+ if (states.at(ii)->name() == extends) {
+ qmlExecuteDeferred(states.at(ii));
applyList = static_cast<QDeclarativeStatePrivate*>(states.at(ii)->d_func())->generateActionList(group);
+ }
}
foreach(QDeclarativeStateOperation *op, operations)
diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp
index 55904495b6..2291c16f6d 100644
--- a/src/declarative/util/qdeclarativestateoperations.cpp
+++ b/src/declarative/util/qdeclarativestateoperations.cpp
@@ -1501,8 +1501,12 @@ void QDeclarativeAnchorChanges::rewind()
d->target->setX(d->rewindX);
d->target->setY(d->rewindY);
- d->target->setWidth(d->rewindWidth);
- d->target->setHeight(d->rewindHeight);
+ if (targetPrivate->widthValid) {
+ d->target->setWidth(d->rewindWidth);
+ }
+ if (targetPrivate->heightValid) {
+ d->target->setHeight(d->rewindHeight);
+ }
}
void QDeclarativeAnchorChanges::saveCurrentValues()
diff --git a/src/declarative/util/qdeclarativetimeline.cpp b/src/declarative/util/qdeclarativetimeline.cpp
index 0258b3ce63..378c539e57 100644
--- a/src/declarative/util/qdeclarativetimeline.cpp
+++ b/src/declarative/util/qdeclarativetimeline.cpp
@@ -524,7 +524,7 @@ int QDeclarativeTimeLine::duration() const
Following operations on \a timeLineValue in this timeline will be scheduled after
all the currently scheduled actions on \a syncTo are complete. In
- psuedo-code this is equivalent to:
+ pseudo-code this is equivalent to:
\code
QDeclarativeTimeLine::pause(timeLineValue, min(0, length_of(syncTo) - length_of(timeLineValue)))
\endcode
@@ -549,7 +549,7 @@ void QDeclarativeTimeLine::sync(QDeclarativeTimeLineValue &timeLineValue, QDecla
Synchronize the end point of \a timeLineValue to the endpoint of the longest
action cursrently scheduled in the timeline.
- In psuedo-code, this is equivalent to:
+ In pseudo-code, this is equivalent to:
\code
QDeclarativeTimeLine::pause(timeLineValue, length_of(timeline) - length_of(timeLineValue))
\endcode
diff --git a/src/declarative/util/qdeclarativetimer.cpp b/src/declarative/util/qdeclarativetimer.cpp
index 576995f4d7..838a8f3677 100644
--- a/src/declarative/util/qdeclarativetimer.cpp
+++ b/src/declarative/util/qdeclarativetimer.cpp
@@ -73,11 +73,12 @@ public:
\since 4.7
\brief The Timer item triggers a handler at a specified interval.
- A timer can be used to trigger an action either once, or repeatedly
+ A Timer can be used to trigger an action either once, or repeatedly
at a given interval.
- Here is a timer that shows the current date and time, and updates
- the text every 500 milliseconds:
+ Here is a Timer that shows the current date and time, and updates
+ the text every 500 milliseconds. It uses the JavaScript \c Date
+ object to access the current time.
\qml
import Qt 4.7
@@ -88,9 +89,7 @@ public:
onTriggered: time.text = Date().toString()
}
- Text {
- id: time
- }
+ Text { id: time }
}
\endqml
diff --git a/src/declarative/util/qdeclarativetransition.cpp b/src/declarative/util/qdeclarativetransition.cpp
index 38ed97ecbd..582191bc71 100644
--- a/src/declarative/util/qdeclarativetransition.cpp
+++ b/src/declarative/util/qdeclarativetransition.cpp
@@ -56,6 +56,28 @@ QT_BEGIN_NAMESPACE
\since 4.7
\brief The Transition element defines animated transitions that occur on state changes.
+ A Transition defines the animations to be applied when a \l State change occurs.
+
+ For example, the following \l Rectangle has two states: the default state, and
+ an added "moved" state. In the "moved state, the rectangle's position changes
+ to (50, 50). The added \l Transition specifies that when the rectangle
+ changes between the default and the "moved" state, any changes
+ to the \c x and \c y properties should be animated, using an \c Easing.InOutQuad.
+
+ \snippet doc/src/snippets/declarative/transition.qml 0
+
+ To define multiple transitions, specify \l Item::transitions as a list:
+
+ \qml
+ Item {
+ ...
+ transitions: [
+ Transition { ... },
+ Transition { ... }
+ ]
+ }
+ \endqml
+
\sa {declarative/animation/states}{states example}, {qmlstates}{States}, {state-transitions}{Transitions}, {QtDeclarative}
*/
@@ -171,18 +193,31 @@ void QDeclarativeTransition::prepare(QDeclarativeStateOperation::ActionList &act
/*!
\qmlproperty string Transition::from
\qmlproperty string Transition::to
- These properties are selectors indicating which state changes should trigger the transition.
- from is used in conjunction with to to determine when a transition should
- be applied. By default from and to are both "*" (any state). In the following example,
- the transition is applied when changing from state1 to state2.
- \code
- Transition {
- from: "state1"
- to: "state2"
- ...
+ These properties indicate the state changes that trigger the transition.
+
+ The default values for these properties is "*" (that is, any state).
+
+ For example, the following transition has not set the \c to and \c from
+ properties, so the animation is always applied when changing between
+ the two states (i.e. when the mouse is pressed and released).
+
+ \snippet doc/src/snippets/declarative/transition-from-to.qml 0
+
+ If the transition was changed to this:
+
+ \qml
+ transitions: Transition {
+ to: "brighter"
+ ColorAnimation { duration: 1000 }
+ }
}
- \endcode
+ \endqml
+
+ The animation would only be applied when changing from the default state to
+ the "brighter" state (i.e. when the mouse is pressed, but not on release).
+
+ \sa reversible
*/
QString QDeclarativeTransition::fromState() const
{
@@ -205,6 +240,24 @@ void QDeclarativeTransition::setFromState(const QString &f)
This property holds whether the transition should be automatically reversed when the conditions that triggered this transition are reversed.
The default value is false.
+
+ By default, transitions run in parallel and are applied to all state
+ changes if the \l from and \l to states have not been set. In this
+ situation, the transition is automatically applied when a state change
+ is reversed, and it is not necessary to set this property to reverse
+ the transition.
+
+ However, if a SequentialAnimation is used, or if the \l from or \l to
+ properties have been set, this property will need to be set to reverse
+ a transition when a state change is reverted. For example, the following
+ transition applies a sequential animation when the mouse is pressed,
+ and reverses the sequence of the animation when the mouse is released:
+
+ \snippet doc/src/snippets/declarative/transition-reversible.qml 0
+
+ If the transition did not set the \c to and \c reversible values, then
+ on the mouse release, the transition would play the PropertyAnimation
+ before the ColorAnimation instead of reversing the sequence.
*/
bool QDeclarativeTransition::reversible() const
{
@@ -241,12 +294,27 @@ void QDeclarativeTransition::setToState(const QString &t)
/*!
\qmlproperty list<Animation> Transition::animations
\default
+
This property holds a list of the animations to be run for this transition.
+ \qml
+ Transition {
+ PropertyAnimation { ... }
+ NumberAnimation { ... }
+ }
+ \endqml
+
The top-level animations are run in parallel. To run them sequentially,
- you can create a single SequentialAnimation which contains all the animations,
- and assign that to animations the animations property.
- \default
+ define them within a SequentialAnimation:
+
+ \qml
+ Transition {
+ SequentialAnimation {
+ PropertyAnimation { ... }
+ NumberAnimation { ... }
+ }
+ }
+ \endqml
*/
QDeclarativeListProperty<QDeclarativeAbstractAnimation> QDeclarativeTransition::animations()
{
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp
index 496f2ad502..8f06858c5d 100644
--- a/src/declarative/util/qdeclarativeview.cpp
+++ b/src/declarative/util/qdeclarativeview.cpp
@@ -132,7 +132,7 @@ class QDeclarativeViewPrivate : public QGraphicsViewPrivate, public QDeclarative
public:
QDeclarativeViewPrivate()
: root(0), declarativeItemRoot(0), graphicsWidgetRoot(0), component(0), resizeMode(QDeclarativeView::SizeViewToRootObject), initialSize(0,0) {}
- ~QDeclarativeViewPrivate() { delete root; }
+ ~QDeclarativeViewPrivate() { delete root; delete engine; }
void execute();
void itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry);
void initResize();
@@ -145,7 +145,7 @@ public:
QUrl source;
- QDeclarativeEngine engine;
+ QDeclarativeEngine* engine;
QDeclarativeComponent *component;
QBasicTimer resizetimer;
@@ -170,7 +170,7 @@ void QDeclarativeViewPrivate::execute()
component = 0;
}
if (!source.isEmpty()) {
- component = new QDeclarativeComponent(&engine, source, q);
+ component = new QDeclarativeComponent(engine, source, q);
if (!component->isLoading()) {
q->continueExecute();
} else {
@@ -275,6 +275,7 @@ QDeclarativeView::QDeclarativeView(const QUrl &source, QWidget *parent)
void QDeclarativeViewPrivate::init()
{
Q_Q(QDeclarativeView);
+ engine = new QDeclarativeEngine();
q->setScene(&scene);
q->setOptimizationFlags(QGraphicsView::DontSavePainterState);
@@ -338,10 +339,10 @@ QUrl QDeclarativeView::source() const
Returns a pointer to the QDeclarativeEngine used for instantiating
QML Components.
*/
-QDeclarativeEngine* QDeclarativeView::engine()
+QDeclarativeEngine* QDeclarativeView::engine() const
{
- Q_D(QDeclarativeView);
- return &d->engine;
+ Q_D(const QDeclarativeView);
+ return d->engine;
}
/*!
@@ -351,10 +352,10 @@ QDeclarativeEngine* QDeclarativeView::engine()
arranged hierarchically and this hierarchy is managed by the
QDeclarativeEngine.
*/
-QDeclarativeContext* QDeclarativeView::rootContext()
+QDeclarativeContext* QDeclarativeView::rootContext() const
{
- Q_D(QDeclarativeView);
- return d->engine.rootContext();
+ Q_D(const QDeclarativeView);
+ return d->engine->rootContext();
}
/*!
@@ -364,7 +365,7 @@ QDeclarativeContext* QDeclarativeView::rootContext()
\value Null This QDeclarativeView has no source set.
\value Ready This QDeclarativeView has loaded and created the QML component.
\value Loading This QDeclarativeView is loading network data.
- \value Error An error has occured. Call errorDescription() to retrieve a description.
+ \value Error An error has occurred. Call errorDescription() to retrieve a description.
*/
/*! \enum QDeclarativeView::ResizeMode
@@ -390,7 +391,7 @@ QDeclarativeView::Status QDeclarativeView::status() const
}
/*!
- Return the list of errors that occured during the last compile or create
+ Return the list of errors that occurred during the last compile or create
operation. An empty list is returned if isError() is not set.
*/
QList<QDeclarativeError> QDeclarativeView::errors() const
diff --git a/src/declarative/util/qdeclarativeview.h b/src/declarative/util/qdeclarativeview.h
index cdcf134aa4..d3e49484fc 100644
--- a/src/declarative/util/qdeclarativeview.h
+++ b/src/declarative/util/qdeclarativeview.h
@@ -75,8 +75,8 @@ public:
QUrl source() const;
void setSource(const QUrl&);
- QDeclarativeEngine* engine();
- QDeclarativeContext* rootContext();
+ QDeclarativeEngine* engine() const;
+ QDeclarativeContext* rootContext() const;
QGraphicsObject *rootObject() const;
diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp
index 9895ff2b84..7c1e1fd1a3 100644
--- a/src/declarative/util/qdeclarativexmllistmodel.cpp
+++ b/src/declarative/util/qdeclarativexmllistmodel.cpp
@@ -567,7 +567,7 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla
\image qml-xmllistmodel-example.png
The XmlListModel data is loaded asynchronously, and \l status
- is set to \l XmlListModel::Ready when loading is complete.
+ is set to \c XmlListModel.Ready when loading is complete.
Note this means when XmlListModel is used for a view, the view is not
populated until the model is loaded.
@@ -596,7 +596,7 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla
with a combined value of all key roles that is not already present in
the model.
- \sa {demos/declarative/rssnews}{RSS News demo}
+ \sa {RSS News}
*/
QDeclarativeXmlListModel::QDeclarativeXmlListModel(QObject *parent)
diff --git a/src/declarative/util/qlistmodelinterface.cpp b/src/declarative/util/qlistmodelinterface.cpp
index 98d6a5b4fa..acf4dd6c0c 100644
--- a/src/declarative/util/qlistmodelinterface.cpp
+++ b/src/declarative/util/qlistmodelinterface.cpp
@@ -71,7 +71,7 @@ QT_BEGIN_NAMESPACE
*/
/*! \fn QHash<int,QVariant> QListModelInterface::data(int index, const QList<int>& roles) const
- Returns the data at the given \a index for the specifed \a roles.
+ Returns the data at the given \a index for the specified \a roles.
*/
/*! \fn bool QListModelInterface::setData(int index, const QHash<int,QVariant>& values)
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm
index f1afaa9874..64fc0ee0fa 100644
--- a/src/gui/dialogs/qfiledialog_mac.mm
+++ b/src/gui/dialogs/qfiledialog_mac.mm
@@ -782,9 +782,11 @@ void QFileDialogPrivate::qt_mac_filedialog_event_proc(const NavEventCallbackMess
const QtMacFilterName &fn = fileDialogPrivate->filterInfo.filters.at(
fileDialogPrivate->filterInfo.currentSelection);
QStringList reg = fn.regexp.split(QLatin1String(";"), QString::SkipEmptyParts);
- QString r = reg.first();
- r = r.right(r.length()-1); // Strip the *
- base += r; //"." + QString::number(s->menuType);
+ if (reg.count()) {
+ QString r = reg.first();
+ r = r.right(r.length()-1); // Strip the *
+ base += r; //"." + QString::number(s->menuType);
+ }
NavDialogSetSaveFileName(p->context, QCFString::toCFStringRef(base));
}
#ifdef DEBUG_FILEDIALOG_FILTERS
diff --git a/src/gui/dialogs/qwizard_win.cpp b/src/gui/dialogs/qwizard_win.cpp
index e406cba159..ad8801a094 100644
--- a/src/gui/dialogs/qwizard_win.cpp
+++ b/src/gui/dialogs/qwizard_win.cpp
@@ -180,7 +180,8 @@ QVistaBackButton::QVistaBackButton(QWidget *widget)
QSize QVistaBackButton::sizeHint() const
{
ensurePolished();
- int width = 32, height = 32;
+ int size = int(QStyleHelper::dpiScaled(32));
+ int width = size, height = size;
/*
HANDLE theme = pOpenThemeData(0, L"Navigation");
SIZE size;
@@ -213,8 +214,8 @@ void QVistaBackButton::paintEvent(QPaintEvent *)
HANDLE theme = pOpenThemeData(0, L"Navigation");
//RECT rect;
RECT clipRect;
- int xoffset = QWidget::mapToParent(r.topLeft()).x();
- int yoffset = QWidget::mapToParent(r.topLeft()).y();
+ int xoffset = QWidget::mapToParent(r.topLeft()).x() - 1;
+ int yoffset = QWidget::mapToParent(r.topLeft()).y() - 1;
clipRect.top = r.top() + yoffset;
clipRect.bottom = r.bottom() + yoffset;
@@ -245,6 +246,11 @@ QVistaHelper::QVistaHelper(QWizard *wizard)
is_vista = resolveSymbols();
if (is_vista)
backButton_ = new QVistaBackButton(wizard);
+
+ // Handle diff between Windows 7 and Vista
+ iconSpacing = QStyleHelper::dpiScaled(7);
+ textSpacing = QSysInfo::WindowsVersion >= QSysInfo::WV_WINDOWS7 ?
+ iconSpacing : QStyleHelper::dpiScaled(20);
}
QVistaHelper::~QVistaHelper()
@@ -308,18 +314,15 @@ bool QVistaHelper::setDWMTitleBar(TitleBarChangeType type)
void QVistaHelper::drawTitleBar(QPainter *painter)
{
- if (vistaState() == VistaAero)
- drawBlackRect(
- QRect(0, 0, wizard->width(), titleBarSize() + topOffset()),
- painter->paintEngine()->getDC());
+ HDC hdc = painter->paintEngine()->getDC();
+ if (vistaState() == VistaAero)
+ drawBlackRect(QRect(0, 0, wizard->width(),
+ titleBarSize() + topOffset()), hdc);
Q_ASSERT(backButton_);
const int btnTop = backButton_->mapToParent(QPoint()).y();
const int btnHeight = backButton_->size().height();
- const int verticalCenter = (btnTop + btnHeight / 2);
-
- wizard->windowIcon().paint(
- painter, QRect(leftMargin(), verticalCenter - iconSize() / 2, iconSize(), iconSize()));
+ const int verticalCenter = (btnTop + btnHeight / 2) - 1;
const QString text = wizard->window()->windowTitle();
const QFont font = QApplication::font("QWorkspaceTitleBar");
@@ -327,14 +330,25 @@ void QVistaHelper::drawTitleBar(QPainter *painter)
const QRect brect = fontMetrics.boundingRect(text);
int textHeight = brect.height();
int textWidth = brect.width();
+ int glowOffset = 0;
+
if (vistaState() == VistaAero) {
textHeight += 2 * glowSize();
textWidth += 2 * glowSize();
+ glowOffset = glowSize();
}
+
drawTitleText(
painter, text,
- QRect(titleOffset(), verticalCenter - textHeight / 2, textWidth, textHeight),
- painter->paintEngine()->getDC());
+ QRect(titleOffset() - glowOffset, verticalCenter - textHeight / 2, textWidth, textHeight),
+ hdc);
+
+ if (!wizard->windowIcon().isNull()) {
+ QRect rect(leftMargin(), verticalCenter - iconSize() / 2, iconSize(), iconSize());
+ HICON hIcon = wizard->windowIcon().pixmap(iconSize()).toWinHICON();
+ DrawIconEx(hdc, rect.left(), rect.top(), hIcon, 0, 0, 0, NULL, DI_NORMAL | DI_COMPAT);
+ DestroyIcon(hIcon);
+ }
}
void QVistaHelper::setTitleBarIconAndCaptionVisible(bool visible)
@@ -734,7 +748,7 @@ bool QVistaHelper::resolveSymbols()
int QVistaHelper::titleOffset()
{
- int iconOffset = wizard ->windowIcon().isNull() ? 0 : iconSize() + padding();
+ int iconOffset = wizard ->windowIcon().isNull() ? 0 : iconSize() + textSpacing;
return leftMargin() + iconOffset;
}
diff --git a/src/gui/dialogs/qwizard_win_p.h b/src/gui/dialogs/qwizard_win_p.h
index 5f3b6c2bcb..caf018d0e7 100644
--- a/src/gui/dialogs/qwizard_win_p.h
+++ b/src/gui/dialogs/qwizard_win_p.h
@@ -61,6 +61,7 @@
#include <qwidget.h>
#include <qabstractbutton.h>
#include <QtGui/private/qwidget_p.h>
+#include <QtGui/private/qstylehelper_p.h>
QT_BEGIN_NAMESPACE
@@ -100,9 +101,14 @@ public:
enum VistaState { VistaAero, VistaBasic, Classic, Dirty };
static VistaState vistaState();
static int titleBarSize() { return frameSize() + captionSize(); }
- static int topPadding() { return 8; }
- static int topOffset() { return titleBarSize() + (vistaState() == VistaAero ? 13 : 3); }
-
+ static int topPadding() { // padding under text
+ return int(QStyleHelper::dpiScaled(
+ QSysInfo::WindowsVersion >= QSysInfo::WV_WINDOWS7 ? 4 : 6));
+ }
+ static int topOffset() {
+ static int aeroOffset = QSysInfo::WindowsVersion >= QSysInfo::WV_WINDOWS7 ?
+ QStyleHelper::dpiScaled(4) : QStyleHelper::dpiScaled(13);
+ return (titleBarSize() + (vistaState() == VistaAero ? aeroOffset : 3)); }
private:
static HFONT getCaptionFont(HANDLE hTheme);
bool drawTitleText(QPainter *painter, const QString &text, const QRect &rect, HDC hdc);
@@ -111,11 +117,10 @@ private:
static int frameSize() { return GetSystemMetrics(SM_CYSIZEFRAME); }
static int captionSize() { return GetSystemMetrics(SM_CYCAPTION); }
- static int backButtonSize() { return 31; } // ### should be queried from back button itself
+ static int backButtonSize() { return int(QStyleHelper::dpiScaled(30)); }
static int iconSize() { return 16; } // Standard Aero
- static int padding() { return 7; } // Standard Aero
- static int leftMargin() { return backButtonSize() + padding(); }
static int glowSize() { return 10; }
+ int leftMargin() { return backButton_->isVisible() ? backButtonSize() + iconSpacing : 0; }
int titleOffset();
bool resolveSymbols();
@@ -139,6 +144,10 @@ private:
QRect rtTitle;
QWizard *wizard;
QVistaBackButton *backButton_;
+
+ int titleBarOffset; // Extra spacing above the text
+ int iconSpacing; // Space between button and icon
+ int textSpacing; // Space between icon and text
};
diff --git a/src/gui/graphicsview/qgraphicsgridlayout.cpp b/src/gui/graphicsview/qgraphicsgridlayout.cpp
index 83db3ec124..062b5ac5f9 100644
--- a/src/gui/graphicsview/qgraphicsgridlayout.cpp
+++ b/src/gui/graphicsview/qgraphicsgridlayout.cpp
@@ -94,14 +94,13 @@ public:
#endif
};
+Q_GLOBAL_STATIC(QWidget, globalStyleInfoWidget);
+
QLayoutStyleInfo QGraphicsGridLayoutPrivate::styleInfo() const
{
- static QWidget *wid = 0;
- if (!wid)
- wid = new QWidget;
QGraphicsItem *item = parentItem();
QStyle *style = (item && item->isWidget()) ? static_cast<QGraphicsWidget*>(item)->style() : QApplication::style();
- return QLayoutStyleInfo(style, wid);
+ return QLayoutStyleInfo(style, globalStyleInfoWidget());
}
/*!
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index fe2a84ea4f..1626d83971 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -133,7 +133,8 @@
\img graphicsview-parentchild.png
- \section1 Transformation
+ \target Transformations
+ \section1 Transformations
QGraphicsItem supports projective transformations in addition to its base
position, pos(). There are several ways to change an item's transformation.
@@ -1149,6 +1150,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q
if (q_ptr == fsi || q_ptr->isAncestorOf(fsi)) {
parentFocusScopeItem = fsi;
p->d_ptr->focusScopeItem = 0;
+ fsi->d_ptr->focusScopeItemChange(false);
}
break;
}
@@ -1181,6 +1183,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q
while (p) {
if (p->d_ptr->flags & QGraphicsItem::ItemIsFocusScope) {
p->d_ptr->focusScopeItem = newFocusScopeItem;
+ newFocusScopeItem->d_ptr->focusScopeItemChange(true);
// Ensure the new item is no longer the subFocusItem. The
// only way to set focus on a child of a focus scope is
// by setting focus on the scope itself.
@@ -1269,8 +1272,14 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q
Returns the bounding rect of this item's children (excluding itself).
*/
-void QGraphicsItemPrivate::childrenBoundingRectHelper(QTransform *x, QRectF *rect)
+void QGraphicsItemPrivate::childrenBoundingRectHelper(QTransform *x, QRectF *rect, bool doClip)
{
+ Q_Q(QGraphicsItem);
+
+ QRectF childrenRect;
+ QRectF *result = rect;
+ rect = &childrenRect;
+
for (int i = 0; i < children.size(); ++i) {
QGraphicsItem *child = children.at(i);
QGraphicsItemPrivate *childd = child->d_ptr.data();
@@ -1292,6 +1301,15 @@ void QGraphicsItemPrivate::childrenBoundingRectHelper(QTransform *x, QRectF *rec
childd->childrenBoundingRectHelper(x, rect);
}
}
+
+ if (doClip && (flags & QGraphicsItem::ItemClipsChildrenToShape)){
+ if (x)
+ *rect &= x->mapRect(q->boundingRect());
+ else
+ *rect &= q->boundingRect();
+ }
+
+ *result |= *rect;
}
void QGraphicsItemPrivate::initStyleOption(QStyleOptionGraphicsItem *option, const QTransform &worldTransform,
@@ -1435,9 +1453,10 @@ QGraphicsItem::~QGraphicsItem()
#ifndef QT_NO_GESTURES
if (d_ptr->isObject && !d_ptr->gestureContext.isEmpty()) {
QGraphicsObject *o = static_cast<QGraphicsObject *>(this);
- QGestureManager *manager = QGestureManager::instance();
- foreach (Qt::GestureType type, d_ptr->gestureContext.keys())
- manager->cleanupCachedGestures(o, type);
+ if (QGestureManager *manager = QGestureManager::instance()) {
+ foreach (Qt::GestureType type, d_ptr->gestureContext.keys())
+ manager->cleanupCachedGestures(o, type);
+ }
}
#endif
@@ -3912,7 +3931,7 @@ void QGraphicsItem::setScale(qreal factor)
Returns a list of graphics transforms that currently apply to this item.
QGraphicsTransform is for applying and controlling a chain of individual
- transformation operations on an item. It's particularily useful in
+ transformation operations on an item. It's particularly useful in
animations, where each transform operation needs to be interpolated
independently, or differently.
@@ -3939,7 +3958,7 @@ QList<QGraphicsTransform *> QGraphicsItem::transformations() const
an item, you can call setTransform().
QGraphicsTransform is for applying and controlling a chain of individual
- transformation operations on an item. It's particularily useful in
+ transformation operations on an item. It's particularly useful in
animations, where each transform operation needs to be interpolated
independently, or differently.
@@ -5133,7 +5152,7 @@ QPainterPath QGraphicsItem::opaqueArea() const
The bounding region describes a coarse outline of the item's visual
contents. Although it's expensive to calculate, it's also more precise
than boundingRect(), and it can help to avoid unnecessary repainting when
- an item is updated. This is particularily efficient for thin items (e.g.,
+ an item is updated. This is particularly efficient for thin items (e.g.,
lines or simple polygons). You can tune the granularity for the bounding
region by calling setBoundingRegionGranularity(). The default granularity
is 0; in which the item's bounding region is the same as its bounding
@@ -5571,6 +5590,16 @@ void QGraphicsItemPrivate::subFocusItemChange()
/*!
\internal
+ Subclasses can reimplement this function to be notified when an item
+ becomes a focusScopeItem (or is no longer a focusScopeItem).
+*/
+void QGraphicsItemPrivate::focusScopeItemChange(bool isSubFocusItem)
+{
+}
+
+/*!
+ \internal
+
Subclasses can reimplement this function to be notified when its
siblingIndex order is changed.
*/
@@ -7929,6 +7958,7 @@ void QGraphicsItemPrivate::resetHeight()
/*!
\property QGraphicsObject::effect
+ \since 4.7
\brief the effect attached to this item
\sa QGraphicsItem::setGraphicsEffect(), QGraphicsItem::graphicsEffect()
@@ -11110,8 +11140,14 @@ QRectF QGraphicsItemEffectSourcePrivate::boundingRect(Qt::CoordinateSystem syste
}
QRectF rect = item->boundingRect();
- if (!item->d_ptr->children.isEmpty())
- rect |= item->childrenBoundingRect();
+ if (!item->d_ptr->children.isEmpty()) {
+ if (dirtyChildrenBoundingRect) {
+ childrenBoundingRect = QRectF();
+ item->d_ptr->childrenBoundingRectHelper(0, &childrenBoundingRect, true);
+ dirtyChildrenBoundingRect = false;
+ }
+ rect |= childrenBoundingRect;
+ }
if (deviceCoordinates) {
Q_ASSERT(info->painter);
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index f9f5d3de18..d60dffb38c 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -300,7 +300,7 @@ public:
QDeclarativeListProperty<QGraphicsObject> childrenList();
void setParentItemHelper(QGraphicsItem *parent, const QVariant *newParentVariant,
const QVariant *thisPointerVariant);
- void childrenBoundingRectHelper(QTransform *x, QRectF *rect);
+ void childrenBoundingRectHelper(QTransform *x, QRectF *rect, bool doClip = true);
void initStyleOption(QStyleOptionGraphicsItem *option, const QTransform &worldTransform,
const QRegion &exposedRegion, bool allItems = false) const;
QRectF effectiveBoundingRect() const;
@@ -482,6 +482,7 @@ public:
void clearSubFocus(QGraphicsItem *rootItem = 0);
void resetFocusProxy();
virtual void subFocusItemChange();
+ virtual void focusScopeItemChange(bool isSubFocusItem);
static void children_append(QDeclarativeListProperty<QGraphicsObject> *list, QGraphicsObject *item);
static int children_count(QDeclarativeListProperty<QGraphicsObject> *list);
@@ -659,7 +660,7 @@ class QGraphicsItemEffectSourcePrivate : public QGraphicsEffectSourcePrivate
{
public:
QGraphicsItemEffectSourcePrivate(QGraphicsItem *i)
- : QGraphicsEffectSourcePrivate(), item(i), info(0)
+ : QGraphicsEffectSourcePrivate(), dirtyChildrenBoundingRect(true), item(i), info(0)
{}
inline void detach()
@@ -710,6 +711,9 @@ public:
QGraphicsEffect::PixmapPadMode mode) const;
QRect paddedEffectRect(Qt::CoordinateSystem system, QGraphicsEffect::PixmapPadMode mode, const QRectF &sourceRect, bool *unpadded = 0) const;
+ mutable bool dirtyChildrenBoundingRect;
+ mutable QRectF childrenBoundingRect;
+
QGraphicsItem *item;
QGraphicsItemPaintInfo *info;
QTransform lastEffectTransform;
@@ -867,9 +871,12 @@ inline void QGraphicsItemPrivate::markParentDirty(bool updateBoundingRect)
#ifndef QT_NO_GRAPHICSEFFECT
if (parentp->graphicsEffect) {
if (updateBoundingRect) {
+ QGraphicsItemEffectSourcePrivate *sourcep =
+ static_cast<QGraphicsItemEffectSourcePrivate *>(parentp->graphicsEffect->d_func()
+ ->source->d_func());
+ parentp->dirtyChildrenBoundingRect = 1;
parentp->notifyInvalidated = 1;
- static_cast<QGraphicsItemEffectSourcePrivate *>(parentp->graphicsEffect->d_func()
- ->source->d_func())->invalidateCache();
+ sourcep->invalidateCache();
}
if (parentp->scene && parentp->graphicsEffect->isEnabled()) {
parentp->dirty = 1;
diff --git a/src/gui/graphicsview/qgraphicslinearlayout.cpp b/src/gui/graphicsview/qgraphicslinearlayout.cpp
index b82872240c..37408efc69 100644
--- a/src/gui/graphicsview/qgraphicslinearlayout.cpp
+++ b/src/gui/graphicsview/qgraphicslinearlayout.cpp
@@ -171,14 +171,13 @@ int QGraphicsLinearLayoutPrivate::gridColumn(int index) const
return int(qMin(uint(index), uint(engine.columnCount())));
}
+Q_GLOBAL_STATIC(QWidget, globalStyleInfoWidget)
+
QLayoutStyleInfo QGraphicsLinearLayoutPrivate::styleInfo() const
{
- static QWidget *wid = 0;
- if (!wid)
- wid = new QWidget;
QGraphicsItem *item = parentItem();
QStyle *style = (item && item->isWidget()) ? static_cast<QGraphicsWidget*>(item)->style() : QApplication::style();
- return QLayoutStyleInfo(style, wid);
+ return QLayoutStyleInfo(style, globalStyleInfoWidget());
}
/*!
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 4bc7f4c9e0..48a00937cf 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -5178,7 +5178,12 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool
// Process children.
if (itemHasChildren && item->d_ptr->dirtyChildren) {
const bool itemClipsChildrenToShape = item->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape;
- if (itemClipsChildrenToShape) {
+ // Items with no content are threated as 'dummy' items which means they are never drawn and
+ // 'processed', so the painted view bounding rect is never up-to-date. This means that whenever
+ // such an item changes geometry, its children have to take care of the update regardless
+ // of whether the item clips children to shape or not.
+ const bool bypassUpdateClip = !itemHasContents && wasDirtyParentViewBoundingRects;
+ if (itemClipsChildrenToShape && !bypassUpdateClip) {
// Make sure child updates are clipped to the item's bounding rect.
for (int i = 0; i < views.size(); ++i)
views.at(i)->d_func()->setUpdateClip(item);
diff --git a/src/gui/graphicsview/qgraphicstransform.cpp b/src/gui/graphicsview/qgraphicstransform.cpp
index 4ab69750b9..986bee6aad 100644
--- a/src/gui/graphicsview/qgraphicstransform.cpp
+++ b/src/gui/graphicsview/qgraphicstransform.cpp
@@ -267,6 +267,7 @@ void QGraphicsScale::setXScale(qreal scale)
return;
d->xScale = scale;
update();
+ emit xScaleChanged();
emit scaleChanged();
}
@@ -293,6 +294,7 @@ void QGraphicsScale::setYScale(qreal scale)
return;
d->yScale = scale;
update();
+ emit yScaleChanged();
emit scaleChanged();
}
@@ -319,6 +321,7 @@ void QGraphicsScale::setZScale(qreal scale)
return;
d->zScale = scale;
update();
+ emit zScaleChanged();
emit scaleChanged();
}
diff --git a/src/gui/graphicsview/qgraphicstransform.h b/src/gui/graphicsview/qgraphicstransform.h
index 58b201a79a..d8c9654f19 100644
--- a/src/gui/graphicsview/qgraphicstransform.h
+++ b/src/gui/graphicsview/qgraphicstransform.h
@@ -85,9 +85,9 @@ class Q_GUI_EXPORT QGraphicsScale : public QGraphicsTransform
Q_OBJECT
Q_PROPERTY(QVector3D origin READ origin WRITE setOrigin NOTIFY originChanged)
- Q_PROPERTY(qreal xScale READ xScale WRITE setXScale NOTIFY scaleChanged)
- Q_PROPERTY(qreal yScale READ yScale WRITE setYScale NOTIFY scaleChanged)
- Q_PROPERTY(qreal zScale READ zScale WRITE setZScale NOTIFY scaleChanged)
+ Q_PROPERTY(qreal xScale READ xScale WRITE setXScale NOTIFY xScaleChanged)
+ Q_PROPERTY(qreal yScale READ yScale WRITE setYScale NOTIFY yScaleChanged)
+ Q_PROPERTY(qreal zScale READ zScale WRITE setZScale NOTIFY zScaleChanged)
public:
QGraphicsScale(QObject *parent = 0);
~QGraphicsScale();
@@ -108,6 +108,9 @@ public:
Q_SIGNALS:
void originChanged();
+ void xScaleChanged();
+ void yScaleChanged();
+ void zScaleChanged();
void scaleChanged();
private:
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index e942f528bf..41de3f23d9 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -84,6 +84,11 @@ contains(QMAKE_MAC_XARCH, no) {
3dnow:DEFINES += QT_HAVE_3DNOW
sse:DEFINES += QT_HAVE_SSE QT_HAVE_MMXEXT
sse2:DEFINES += QT_HAVE_SSE2
+ sse3:DEFINES += QT_HAVE_SSE3
+ ssse3:DEFINES += QT_HAVE_SSSE3
+ sse4_1:DEFINES += QT_HAVE_SSE4_1
+ sse4_2:DEFINES += QT_HAVE_SSE4_2
+ avx:DEFINES += QT_HAVE_AVX
iwmmxt:DEFINES += QT_HAVE_IWMMXT
win32-g++*|!win32:!*-icc* {
@@ -182,6 +187,25 @@ contains(QMAKE_MAC_XARCH, no) {
silent:sse2_compiler.commands = @echo compiling[sse2] ${QMAKE_FILE_IN} && $$sse2_compiler.commands
QMAKE_EXTRA_COMPILERS += sse2_compiler
}
+ ssse3 {
+ ssse3_compiler.commands = $$QMAKE_CXX -c -Winline
+
+ mac {
+ ssse3_compiler.commands += -Xarch_i386 -mssse3
+ ssse3_compiler.commands += -Xarch_x86_64 -mssse3
+ } else {
+ ssse3_compiler.commands += -mssse3
+ }
+
+ ssse3_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
+ ssse3_compiler.dependency_type = TYPE_C
+ ssse3_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
+ ssse3_compiler.input = SSSE3_SOURCES
+ ssse3_compiler.variable_out = OBJECTS
+ ssse3_compiler.name = compiling[ssse3] ${QMAKE_FILE_IN}
+ silent:ssse3_compiler.commands = @echo compiling[ssse3] ${QMAKE_FILE_IN} && $$ssse3_compiler.commands
+ QMAKE_EXTRA_COMPILERS += ssse3_compiler
+ }
iwmmxt {
iwmmxt_compiler.commands = $$QMAKE_CXX -c -Winline
iwmmxt_compiler.commands += -mcpu=iwmmxt
@@ -200,6 +224,7 @@ contains(QMAKE_MAC_XARCH, no) {
3dnow:sse: SOURCES += $$SSE3DNOW_SOURCES
sse: SOURCES += $$SSE_SOURCES
sse2: SOURCES += $$SSE2_SOURCES
+ ssse3: SOURCES += $$SSSE3_SOURCES
iwmmxt: SOURCES += $$IWMMXT_SOURCES
}
}
diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri
index ef0c18e4f1..1d89a680e7 100644
--- a/src/gui/image/image.pri
+++ b/src/gui/image/image.pri
@@ -100,3 +100,4 @@ contains(QT_CONFIG, gif):include($$PWD/qgifhandler.pri)
# SIMD
SSE2_SOURCES += image/qimage_sse2.cpp
+SSSE3_SOURCES += image/qimage_ssse3.cpp
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index e5930acda3..30cf758036 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -2343,8 +2343,15 @@ static bool convert_indexed8_to_ARGB_PM_inplace(QImageData *data, Qt::ImageConve
data->colortable.resize(256);
for (int i = 0; i < 256; ++i)
data->colortable[i] = qRgb(i, i, i);
+ } else {
+ for (int i = 0; i < data->colortable.size(); ++i)
+ data->colortable[i] = PREMUL(data->colortable.at(i));
+
+ // Fill the rest of the table in case src_data > colortable.size()
+ const int oldSize = data->colortable.size();
+ const QRgb lastColor = data->colortable.at(oldSize - 1);
+ data->colortable.insert(oldSize, 256 - oldSize, lastColor);
}
- const int tableSize = data->colortable.size() - 1;
for (int i = 0; i < data->height; ++i) {
src_data -= src_pad;
@@ -2352,11 +2359,11 @@ static bool convert_indexed8_to_ARGB_PM_inplace(QImageData *data, Qt::ImageConve
for (int pixI = 0; pixI < width; ++pixI) {
--src_data;
--dest_data;
- const uint pixel = data->colortable[qMin<int>(tableSize, *src_data)];
- *dest_data = (quint32) PREMUL(pixel);
+ *dest_data = data->colortable.at(*src_data);
}
}
+ data->colortable = QVector<QRgb>();
data->format = QImage::Format_ARGB32_Premultiplied;
data->bytes_per_line = dst_bytes_per_line;
data->depth = depth;
@@ -2388,8 +2395,12 @@ static bool convert_indexed8_to_RGB_inplace(QImageData *data, Qt::ImageConversio
data->colortable.resize(256);
for (int i = 0; i < 256; ++i)
data->colortable[i] = qRgb(i, i, i);
+ } else {
+ // Fill the rest of the table in case src_data > colortable.size()
+ const int oldSize = data->colortable.size();
+ const QRgb lastColor = data->colortable.at(oldSize - 1);
+ data->colortable.insert(oldSize, 256 - oldSize, lastColor);
}
- const int tableSize = data->colortable.size() - 1;
for (int i = 0; i < data->height; ++i) {
src_data -= src_pad;
@@ -2397,10 +2408,11 @@ static bool convert_indexed8_to_RGB_inplace(QImageData *data, Qt::ImageConversio
for (int pixI = 0; pixI < width; ++pixI) {
--src_data;
--dest_data;
- *dest_data = (quint32) data->colortable[qMin<int>(tableSize, *src_data)];
+ *dest_data = (quint32) data->colortable.at(*src_data);
}
}
+ data->colortable = QVector<QRgb>();
data->format = QImage::Format_RGB32;
data->bytes_per_line = dst_bytes_per_line;
data->depth = depth;
@@ -2428,12 +2440,23 @@ static bool convert_indexed8_to_RGB16_inplace(QImageData *data, Qt::ImageConvers
const int width = data->width;
const int src_pad = data->bytes_per_line - width;
const int dest_pad = (dst_bytes_per_line >> 1) - width;
- if (data->colortable.size() == 0) {
- data->colortable.resize(256);
+
+ quint16 colorTableRGB16[256];
+ if (data->colortable.isEmpty()) {
for (int i = 0; i < 256; ++i)
- data->colortable[i] = qRgb(i, i, i);
+ colorTableRGB16[i] = qt_colorConvert<quint16, quint32>(qRgb(i, i, i), 0);
+ } else {
+ // 1) convert the existing colors to RGB16
+ const int tableSize = data->colortable.size();
+ for (int i = 0; i < tableSize; ++i)
+ colorTableRGB16[i] = qt_colorConvert<quint16, quint32>(data->colortable.at(i), 0);
+ data->colortable = QVector<QRgb>();
+
+ // 2) fill the rest of the table in case src_data > colortable.size()
+ const quint16 lastColor = colorTableRGB16[tableSize - 1];
+ for (int i = tableSize; i < 256; ++i)
+ colorTableRGB16[i] = lastColor;
}
- const int tableSize = data->colortable.size() - 1;
for (int i = 0; i < data->height; ++i) {
src_data -= src_pad;
@@ -2441,8 +2464,7 @@ static bool convert_indexed8_to_RGB16_inplace(QImageData *data, Qt::ImageConvers
for (int pixI = 0; pixI < width; ++pixI) {
--src_data;
--dest_data;
- const uint pixel = data->colortable[qMin<int>(tableSize, *src_data)];
- *dest_data = qt_colorConvert<quint16, quint32>(pixel, 0);
+ *dest_data = colorTableRGB16[*src_data];
}
}
@@ -3332,7 +3354,7 @@ CONVERT_DECL(qargb4444, quint32)
// first index source, second dest
-static const Image_Converter converter_map[QImage::NImageFormats][QImage::NImageFormats] =
+static Image_Converter converter_map[QImage::NImageFormats][QImage::NImageFormats] =
{
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
@@ -3739,6 +3761,14 @@ void qInitImageConversions()
inplace_converter_map[QImage::Format_ARGB32][QImage::Format_ARGB32_Premultiplied] = convert_ARGB_to_ARGB_PM_inplace_sse2;
}
#endif
+#ifdef QT_HAVE_SSSE3
+ if (features & SSSE3) {
+ extern void convert_RGB888_to_RGB32_ssse3(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags);
+ converter_map[QImage::Format_RGB888][QImage::Format_RGB32] = convert_RGB888_to_RGB32_ssse3;
+ converter_map[QImage::Format_RGB888][QImage::Format_ARGB32] = convert_RGB888_to_RGB32_ssse3;
+ converter_map[QImage::Format_RGB888][QImage::Format_ARGB32_Premultiplied] = convert_RGB888_to_RGB32_ssse3;
+ }
+#endif
}
/*!
diff --git a/src/gui/image/qimage_ssse3.cpp b/src/gui/image/qimage_ssse3.cpp
new file mode 100644
index 0000000000..1c664f236d
--- /dev/null
+++ b/src/gui/image/qimage_ssse3.cpp
@@ -0,0 +1,150 @@
+/****************************************************************************
+**
+** 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 QtGui 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 <qimage.h>
+#include <private/qimage_p.h>
+#include <private/qsimd_p.h>
+
+#ifdef QT_HAVE_SSSE3
+
+#include <stdio.h>
+QT_BEGIN_NAMESPACE
+
+// Convert a scanline of RGB888 (src) to RGB32 (dst)
+// src must be at least len * 3 bytes
+// dst must be at least len * 4 bytes
+inline void convert_rgb888_to_rgb32_ssse3(quint32 *dst, const uchar *src, int len)
+{
+ quint32 *const end = dst + len;
+
+ // Prologue, align dst to 16 bytes. The alignement is done on dst because it has 4 store()
+ // for each 3 load() of src.
+ const int offsetToAlignOn16Bytes = (4 - ((reinterpret_cast<quintptr>(dst) >> 2) & 0x3)) & 0x3;
+ const int prologLength = qMin(len, offsetToAlignOn16Bytes);
+
+ for (int i = 0; i < prologLength; ++i) {
+ *dst++ = qRgb(src[0], src[1], src[2]);
+ src += 3;
+ }
+
+ // Mask the 4 first colors of the RGB888 vector
+ const __m128i shuffleMask = _mm_set_epi8(0xff, 9, 10, 11, 0xff, 6, 7, 8, 0xff, 3, 4, 5, 0xff, 0, 1, 2);
+
+ // Mask the 4 last colors of a RGB888 vector with an offset of 1 (so the last 3 bytes are RGB)
+ const __m128i shuffleMaskEnd = _mm_set_epi8(0xff, 13, 14, 15, 0xff, 10, 11, 12, 0xff, 7, 8, 9, 0xff, 4, 5, 6);
+
+ // Mask to have alpha = 0xff
+ const __m128i alphaMask = _mm_set1_epi32(0xff000000);
+
+ __m128i *inVectorPtr = (__m128i *)src;
+ __m128i *dstVectorPtr = (__m128i *)dst;
+
+ const int simdRoundCount = (len - prologLength) / 16; // one iteration in the loop converts 16 pixels
+ for (int i = 0; i < simdRoundCount; ++i) {
+ /*
+ RGB888 has 5 pixels per vector, + 1 byte from the next pixel. The idea here is
+ to load vectors of RGB888 and use palignr to select a vector out of two vectors.
+
+ After 3 loads of RGB888 and 3 stores of RGB32, we have 4 pixels left in the last
+ vector of RGB888, we can mask it directly to get a last store or RGB32. After that,
+ the first next byte is a R, and we can loop for the next 16 pixels.
+
+ The conversion itself is done with a byte permutation (pshufb).
+ */
+ __m128i firstSrcVector = _mm_lddqu_si128(inVectorPtr);
+ __m128i outputVector = _mm_shuffle_epi8(firstSrcVector, shuffleMask);
+ _mm_store_si128(dstVectorPtr, _mm_or_si128(outputVector, alphaMask));
+ ++inVectorPtr;
+ ++dstVectorPtr;
+
+ // There are 4 unused bytes left in srcVector, we need to load the next 16 bytes
+ // and load the next input with palignr
+ __m128i secondSrcVector = _mm_lddqu_si128(inVectorPtr);
+ __m128i srcVector = _mm_alignr_epi8(secondSrcVector, firstSrcVector, 12);
+ outputVector = _mm_shuffle_epi8(srcVector, shuffleMask);
+ _mm_store_si128(dstVectorPtr, _mm_or_si128(outputVector, alphaMask));
+ ++inVectorPtr;
+ ++dstVectorPtr;
+ firstSrcVector = secondSrcVector;
+
+ // We now have 8 unused bytes left in firstSrcVector
+ secondSrcVector = _mm_lddqu_si128(inVectorPtr);
+ srcVector = _mm_alignr_epi8(secondSrcVector, firstSrcVector, 8);
+ outputVector = _mm_shuffle_epi8(srcVector, shuffleMask);
+ _mm_store_si128(dstVectorPtr, _mm_or_si128(outputVector, alphaMask));
+ ++inVectorPtr;
+ ++dstVectorPtr;
+
+ // There are now 12 unused bytes in firstSrcVector.
+ // We can mask them directly, almost there.
+ outputVector = _mm_shuffle_epi8(secondSrcVector, shuffleMaskEnd);
+ _mm_store_si128(dstVectorPtr, _mm_or_si128(outputVector, alphaMask));
+ ++dstVectorPtr;
+ }
+ src = (uchar *)inVectorPtr;
+ dst = (quint32 *)dstVectorPtr;
+
+ while (dst != end) {
+ *dst++ = qRgb(src[0], src[1], src[2]);
+ src += 3;
+ }
+}
+
+void convert_RGB888_to_RGB32_ssse3(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(src->format == QImage::Format_RGB888);
+ Q_ASSERT(dest->format == QImage::Format_RGB32 || dest->format == QImage::Format_ARGB32 || dest->format == QImage::Format_ARGB32_Premultiplied);
+ Q_ASSERT(src->width == dest->width);
+ Q_ASSERT(src->height == dest->height);
+
+ const uchar *src_data = (uchar *) src->data;
+ quint32 *dest_data = (quint32 *) dest->data;
+
+ for (int i = 0; i < src->height; ++i) {
+ convert_rgb888_to_rgb32_ssse3(dest_data, src_data, src->width);
+ src_data += src->bytes_per_line;
+ dest_data = (quint32 *)((uchar*)dest_data + dest->bytes_per_line);
+ }
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_HAVE_SSSE3
diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp
index a13c8c82e9..9d571b518d 100644
--- a/src/gui/image/qpixmap_s60.cpp
+++ b/src/gui/image/qpixmap_s60.cpp
@@ -157,10 +157,10 @@ class QSymbianBitmapDataAccess
{
public:
- bool heapWasLocked;
+ static int heapRefCount;
QSysInfo::SymbianVersion symbianVersion;
- explicit QSymbianBitmapDataAccess() : heapWasLocked(false)
+ explicit QSymbianBitmapDataAccess()
{
symbianVersion = QSysInfo::symbianVersion();
};
@@ -169,16 +169,22 @@ public:
inline void beginDataAccess(CFbsBitmap *bitmap)
{
- if (symbianVersion == QSysInfo::SV_9_2)
- heapWasLocked = qt_symbianFbsClient()->lockHeap();
- else
+ if (symbianVersion == QSysInfo::SV_9_2) {
+ if (heapRefCount == 0)
+ qt_symbianFbsClient()->lockHeap();
+ } else {
bitmap->LockHeap(ETrue);
+ }
+
+ heapRefCount++;
}
inline void endDataAccess(CFbsBitmap *bitmap)
{
+ heapRefCount--;
+
if (symbianVersion == QSysInfo::SV_9_2) {
- if (!heapWasLocked)
+ if (heapRefCount == 0)
qt_symbianFbsClient()->unlockHeap();
} else {
bitmap->UnlockHeap(ETrue);
@@ -186,6 +192,8 @@ public:
}
};
+int QSymbianBitmapDataAccess::heapRefCount = 0;
+
#define UPDATE_BUFFER() \
{ \
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index 2cf8222de5..dc5431367c 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -389,7 +389,7 @@ bool Q_INTERNAL_WIN_NO_THROW QPngHandlerPrivate::readPngHeader()
while (num_text--) {
QString key, value;
-#if defined(PNG_iTXt_SUPPORTED)
+#if defined(PNG_iTXt_SUPPORTED) && !defined(QT_NO_TEXTCODEC)
if (text_ptr->lang) {
QTextCodec *codec = QTextCodec::codecForName(text_ptr->lang);
if (codec) {
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 4cdc4adb82..394d3748f3 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -297,6 +297,10 @@ void QCoeFepInputContext::commitTemporaryPreeditString()
return;
commitCurrentString(false);
+
+ //update cursor position, now this pre-edit text has been committed.
+ //this prevents next keypress overwriting it (QTBUG-11673)
+ m_cursorPos = focusWidget()->inputMethodQuery(Qt::ImCursorPosition).toInt();
}
void QCoeFepInputContext::mouseHandler( int x, QMouseEvent *event)
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index 4fb93fc2c4..97499f3c82 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -1363,7 +1363,7 @@ bool QAbstractItemView::dragEnabled() const
Note that the model used needs to provide support for drag and drop operations.
- \sa setDragDropMode() {Using Drag and Drop with Item Views}
+ \sa setDragDropMode() {Using drag & drop with item views}
*/
/*!
diff --git a/src/gui/itemviews/qfileiconprovider.cpp b/src/gui/itemviews/qfileiconprovider.cpp
index 5dbd1f08b8..4748f89eb7 100644
--- a/src/gui/itemviews/qfileiconprovider.cpp
+++ b/src/gui/itemviews/qfileiconprovider.cpp
@@ -100,69 +100,80 @@ public:
QIcon getMacIcon(const QFileInfo &fi) const;
#endif
QFileIconProvider *q_ptr;
- QString homePath;
+ const QString homePath;
private:
- QIcon file;
- QIcon fileLink;
- QIcon directory;
- QIcon directoryLink;
- QIcon harddisk;
- QIcon floppy;
- QIcon cdrom;
- QIcon ram;
- QIcon network;
- QIcon computer;
- QIcon desktop;
- QIcon trashcan;
- QIcon generic;
- QIcon home;
+ mutable QIcon file;
+ mutable QIcon fileLink;
+ mutable QIcon directory;
+ mutable QIcon directoryLink;
+ mutable QIcon harddisk;
+ mutable QIcon floppy;
+ mutable QIcon cdrom;
+ mutable QIcon ram;
+ mutable QIcon network;
+ mutable QIcon computer;
+ mutable QIcon desktop;
+ mutable QIcon trashcan;
+ mutable QIcon generic;
+ mutable QIcon home;
};
-QFileIconProviderPrivate::QFileIconProviderPrivate()
+QFileIconProviderPrivate::QFileIconProviderPrivate() :
+ homePath(QDir::home().absolutePath())
{
- QStyle *style = QApplication::style();
- file = style->standardIcon(QStyle::SP_FileIcon);
- directory = style->standardIcon(QStyle::SP_DirIcon);
- fileLink = style->standardIcon(QStyle::SP_FileLinkIcon);
- directoryLink = style->standardIcon(QStyle::SP_DirLinkIcon);
- harddisk = style->standardIcon(QStyle::SP_DriveHDIcon);
- floppy = style->standardIcon(QStyle::SP_DriveFDIcon);
- cdrom = style->standardIcon(QStyle::SP_DriveCDIcon);
- network = style->standardIcon(QStyle::SP_DriveNetIcon);
- computer = style->standardIcon(QStyle::SP_ComputerIcon);
- desktop = style->standardIcon(QStyle::SP_DesktopIcon);
- trashcan = style->standardIcon(QStyle::SP_TrashIcon);
- home = style->standardIcon(QStyle::SP_DirHomeIcon);
- homePath = QDir::home().absolutePath();
}
QIcon QFileIconProviderPrivate::getIcon(QStyle::StandardPixmap name) const
{
switch (name) {
case QStyle::SP_FileIcon:
+ if (file.isNull())
+ file = QApplication::style()->standardIcon(name);
return file;
case QStyle::SP_FileLinkIcon:
+ if (fileLink.isNull())
+ fileLink = QApplication::style()->standardIcon(name);
return fileLink;
case QStyle::SP_DirIcon:
+ if (directory.isNull())
+ directory = QApplication::style()->standardIcon(name);
return directory;
case QStyle::SP_DirLinkIcon:
+ if (directoryLink.isNull())
+ directoryLink = QApplication::style()->standardIcon(name);
return directoryLink;
case QStyle::SP_DriveHDIcon:
+ if (harddisk.isNull())
+ harddisk = QApplication::style()->standardIcon(name);
return harddisk;
case QStyle::SP_DriveFDIcon:
+ if (floppy.isNull())
+ floppy = QApplication::style()->standardIcon(name);
return floppy;
case QStyle::SP_DriveCDIcon:
+ if (cdrom.isNull())
+ cdrom = QApplication::style()->standardIcon(name);
return cdrom;
case QStyle::SP_DriveNetIcon:
+ if (network.isNull())
+ network = QApplication::style()->standardIcon(name);
return network;
case QStyle::SP_ComputerIcon:
+ if (computer.isNull())
+ computer = QApplication::style()->standardIcon(name);
return computer;
case QStyle::SP_DesktopIcon:
+ if (desktop.isNull())
+ desktop = QApplication::style()->standardIcon(name);
return desktop;
case QStyle::SP_TrashIcon:
+ if (trashcan.isNull())
+ trashcan = QApplication::style()->standardIcon(name);
return trashcan;
case QStyle::SP_DirHomeIcon:
+ if (home.isNull())
+ home = QApplication::style()->standardIcon(name);
return home;
default:
return QIcon();
diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp
index cd9ee15168..67854a3f9e 100644
--- a/src/gui/itemviews/qheaderview.cpp
+++ b/src/gui/itemviews/qheaderview.cpp
@@ -1871,7 +1871,7 @@ void QHeaderViewPrivate::_q_layoutChanged()
for (int i = 0; i < oldSectionHidden.count(); ++i) {
if (oldSectionHidden.testBit(i))
- q->setSectionHidden(logicalIndex(i), false);
+ q->setSectionHidden(i, false);
}
// the number of sections changed; we need to reread the state of the model
diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp
index 186909377a..76d76426dd 100644
--- a/src/gui/itemviews/qlistview.cpp
+++ b/src/gui/itemviews/qlistview.cpp
@@ -2782,7 +2782,10 @@ QPoint QIconModeViewBase::initDynamicLayout(const QListViewLayoutInfo &info)
y = info.bounds.y() + info.spacing;
items.reserve(rowCount() - hiddenCount());
} else {
- const QListViewItem item = items.at(info.first - 1);
+ int idx = info.first - 1;
+ while (idx > 0 && !items.at(idx).isValid())
+ --idx;
+ const QListViewItem &item = items.at(idx);
x = item.x;
y = item.y;
if (info.flow == QListView::LeftToRight)
@@ -2913,6 +2916,8 @@ void QIconModeViewBase::doDynamicLayout(const QListViewLayoutInfo &info)
else
contentsSize.rwidth() += info.spacing;
}
+ if (rect.size().isEmpty())
+ return;
// resize tree
int insertFrom = info.first;
if (done || info.first == 0) {
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 052da6a101..08852afb23 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -5313,6 +5313,7 @@ bool QApplication::keypadNavigationEnabled()
\sa QCoreApplication::instance()
*/
+#ifndef QT_NO_IM
// ************************************************************************
// Input Method support
// ************************************************************************
@@ -5378,6 +5379,7 @@ QInputContext *QApplication::inputContext() const
#endif
return d->inputContext;
}
+#endif // QT_NO_IM
//Returns the current platform used by keyBindings
uint QApplicationPrivate::currentPlatform(){
@@ -5808,10 +5810,12 @@ Q_GUI_EXPORT void qt_translateRawTouchEvent(QWidget *window,
#ifndef QT_NO_GESTURES
QGestureManager* QGestureManager::instance()
{
- QApplicationPrivate *qAppPriv = QApplicationPrivate::instance();
- if (!qAppPriv->gestureManager)
- qAppPriv->gestureManager = new QGestureManager(qApp);
- return qAppPriv->gestureManager;
+ if (QApplicationPrivate *qAppPriv = QApplicationPrivate::instance()) {
+ if (!qAppPriv->gestureManager)
+ qAppPriv->gestureManager = new QGestureManager(qApp);
+ return qAppPriv->gestureManager;
+ }
+ return 0;
}
#endif // QT_NO_GESTURES
diff --git a/src/gui/kernel/qapplication.h b/src/gui/kernel/qapplication.h
index d31d9e518a..799d4c2935 100644
--- a/src/gui/kernel/qapplication.h
+++ b/src/gui/kernel/qapplication.h
@@ -267,8 +267,11 @@ public:
virtual void commitData(QSessionManager& sm);
virtual void saveState(QSessionManager& sm);
#endif
+
+#ifndef QT_NO_IM
void setInputContext(QInputContext *);
QInputContext *inputContext() const;
+#endif
static QLocale keyboardInputLocale();
static Qt::LayoutDirection keyboardInputDirection();
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index 933e0ab967..44aa20a2dd 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -645,7 +645,7 @@ private:
#endif
#ifdef Q_OS_SYMBIAN
- static QHash<TInt, TUint> scanCodeCache;
+ QHash<TInt, TUint> scanCodeCache;
#endif
static QApplicationPrivate *self;
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 0d65811380..f8734b2b31 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -112,6 +112,25 @@ QS60Data* qGlobalS60Data()
return qt_s60Data();
}
+#ifdef Q_WS_S60
+void QS60Data::setStatusPaneAndButtonGroupVisibility(bool statusPaneVisible, bool buttonGroupVisible)
+{
+ bool buttonGroupVisibilityChanged = false;
+ if (CEikButtonGroupContainer *const b = buttonGroupContainer()) {
+ buttonGroupVisibilityChanged = (b->IsVisible() != buttonGroupVisible);
+ b->MakeVisible(buttonGroupVisible);
+ }
+ bool statusPaneVisibilityChanged = false;
+ if (CEikStatusPane *const s = statusPane()) {
+ statusPaneVisibilityChanged = (s->IsVisible() != statusPaneVisible);
+ s->MakeVisible(statusPaneVisible);
+ }
+ if (buttonGroupVisibilityChanged && !statusPaneVisibilityChanged)
+ // Ensure that control rectangle is updated
+ static_cast<QSymbianControl *>(QApplication::activeWindow()->winId())->handleClientAreaChange();
+}
+#endif
+
bool qt_nograb() // application no-grab option
{
#if defined(QT_DEBUG)
@@ -207,8 +226,6 @@ void QS60Beep::MatoPlayComplete(TInt aError)
}
-QHash<TInt, TUint> QApplicationPrivate::scanCodeCache;
-
static Qt::KeyboardModifiers mapToQtModifiers(TUint s60Modifiers)
{
Qt::KeyboardModifiers result = Qt::NoModifier;
@@ -382,6 +399,10 @@ void QSymbianControl::ConstructL(bool isWindowOwning, bool desktop)
QSymbianControl::~QSymbianControl()
{
+ // Ensure backing store is deleted before the top-level
+ // window is destroyed
+ qt_widget_private(qwidget)->topData()->backingStore.destroy();
+
if (S60->curWin == this)
S60->curWin = 0;
if (!QApplicationPrivate::is_app_closing) {
@@ -621,251 +642,302 @@ TKeyResponse QSymbianControl::OfferKeyEventL(const TKeyEvent& keyEvent, TEventCo
TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCode type)
{
- switch (type) {
- //case EEventKeyDown: // <-- Intentionally left out. See below.
- case EEventKeyUp:
- case EEventKey:
- {
+ /*
+ S60 has a confusing way of delivering key events. There are three types of
+ events: EEventKey, EEventKeyDown and EEventKeyUp. When a key is pressed,
+ EEventKeyDown is first generated, followed by EEventKey. Then, when the key is
+ released, EEventKeyUp is generated.
+ However, it is possible that only the EEventKey is generated alone, typically
+ in relation to virtual keyboards. In that case we need to take care to
+ generate both press and release events in Qt, since applications expect that.
+ We do this by having three states for each used scan code, depending on the
+ events received. See the switch below for what happens in each state
+ transition.
+ */
+
+ if (type != EEventKeyDown)
+ if (handleVirtualMouse(keyEvent, type) == EKeyWasConsumed)
+ return EKeyWasConsumed;
+
+ TKeyResponse ret = EKeyWasNotConsumed;
+#define GET_RETURN(x) (ret = ((x) == EKeyWasConsumed) ? EKeyWasConsumed : ret)
+
+ // This top level switch corresponds to the states, and the inner switches
+ // correspond to the transitions.
+ QS60Data::ScanCodeState &scanCodeState = S60->scanCodeStates[keyEvent.iScanCode];
+ switch (scanCodeState) {
+ case QS60Data::Unpressed:
+ switch (type) {
+ case EEventKeyDown:
+ scanCodeState = QS60Data::KeyDown;
+ break;
+ case EEventKey:
+ GET_RETURN(sendSymbianKeyEvent(keyEvent, QEvent::KeyPress));
+ GET_RETURN(sendSymbianKeyEvent(keyEvent, QEvent::KeyRelease));
+ break;
+ case EEventKeyUp:
+ // No action.
+ break;
+ }
+ break;
+ case QS60Data::KeyDown:
+ switch (type) {
+ case EEventKeyDown:
+ // This should never happen, just stay in this state to be safe.
+ break;
+ case EEventKey:
+ GET_RETURN(sendSymbianKeyEvent(keyEvent, QEvent::KeyPress));
+ scanCodeState = QS60Data::KeyDownAndKey;
+ break;
+ case EEventKeyUp:
+ scanCodeState = QS60Data::Unpressed;
+ break;
+ }
+ break;
+ case QS60Data::KeyDownAndKey:
+ switch (type) {
+ case EEventKeyDown:
+ // This should never happen, just stay in this state to be safe.
+ break;
+ case EEventKey:
+ GET_RETURN(sendSymbianKeyEvent(keyEvent, QEvent::KeyRelease));
+ GET_RETURN(sendSymbianKeyEvent(keyEvent, QEvent::KeyPress));
+ break;
+ case EEventKeyUp:
+ GET_RETURN(sendSymbianKeyEvent(keyEvent, QEvent::KeyRelease));
+ scanCodeState = QS60Data::Unpressed;
+ break;
+ }
+ break;
+ }
+ return ret;
+
+#undef GET_RETURN
+}
+
+TKeyResponse QSymbianControl::sendSymbianKeyEvent(const TKeyEvent &keyEvent, QEvent::Type type)
+{
+ // Because S60 does not generate keysyms for EKeyEventDown and EKeyEventUp
+ // events, we need to cache the keysyms from the EKeyEvent events. This is what
+ // resolveS60ScanCode does.
+ TUint s60Keysym = QApplicationPrivate::resolveS60ScanCode(keyEvent.iScanCode,
+ keyEvent.iCode);
+ int keyCode;
+ if (s60Keysym == EKeyNull){ //some key events have 0 in iCode, for them iScanCode should be used
+ keyCode = qt_keymapper_private()->mapS60ScanCodesToQt(keyEvent.iScanCode);
+ } else if (s60Keysym >= 0x20 && s60Keysym < ENonCharacterKeyBase) {
+ // Normal characters keys.
+ keyCode = s60Keysym;
+ } else {
+ // Special S60 keys.
+ keyCode = qt_keymapper_private()->mapS60KeyToQt(s60Keysym);
+ }
+
+ Qt::KeyboardModifiers mods = mapToQtModifiers(keyEvent.iModifiers);
+ QKeyEventEx qKeyEvent(type, keyCode, mods, qt_keymapper_private()->translateKeyEvent(keyCode, mods),
+ (keyEvent.iRepeats != 0), 1, keyEvent.iScanCode, s60Keysym, keyEvent.iModifiers);
+ QWidget *widget;
+ widget = QWidget::keyboardGrabber();
+ if (!widget) {
+ if (QApplicationPrivate::popupWidgets != 0) {
+ widget = QApplication::activePopupWidget()->focusWidget();
+ if (!widget) {
+ widget = QApplication::activePopupWidget();
+ }
+ } else {
+ widget = QApplicationPrivate::focus_widget;
+ if (!widget) {
+ widget = qwidget;
+ }
+ }
+ }
+
+ QEventDispatcherS60 *dispatcher;
+ // It is theoretically possible for someone to install a different event dispatcher.
+ if ((dispatcher = qobject_cast<QEventDispatcherS60 *>(widget->d_func()->threadData->eventDispatcher)) != 0) {
+ if (dispatcher->excludeUserInputEvents()) {
+ dispatcher->saveInputEvent(this, widget, new QKeyEventEx(qKeyEvent));
+ return EKeyWasConsumed;
+ }
+ }
+ return sendKeyEvent(widget, &qKeyEvent);
+}
+
+TKeyResponse QSymbianControl::handleVirtualMouse(const TKeyEvent& keyEvent,TEventCode type)
+{
#ifndef QT_NO_CURSOR
- if (S60->mouseInteractionEnabled && S60->virtualMouseRequired) {
- //translate keys to pointer
- if ((keyEvent.iScanCode >= EStdKeyLeftArrow && keyEvent.iScanCode <= EStdKeyDownArrow) ||
+ if (S60->mouseInteractionEnabled && S60->virtualMouseRequired) {
+ //translate keys to pointer
+ if ((keyEvent.iScanCode >= EStdKeyLeftArrow && keyEvent.iScanCode <= EStdKeyDownArrow) ||
(keyEvent.iScanCode >= EStdKeyDevice10 && keyEvent.iScanCode <= EStdKeyDevice13) ||
keyEvent.iScanCode == EStdKeyDevice3) {
- QPoint pos = QCursor::pos();
- TPointerEvent fakeEvent;
- fakeEvent.iType = (TPointerEvent::TType)(-1);
- fakeEvent.iModifiers = keyEvent.iModifiers;
- TInt x = pos.x();
- TInt y = pos.y();
- if (type == EEventKeyUp) {
- S60->virtualMouseAccelTimeout.start();
- switch (keyEvent.iScanCode) {
- case EStdKeyLeftArrow:
- S60->virtualMousePressedKeys &= ~QS60Data::Left;
- break;
- case EStdKeyRightArrow:
- S60->virtualMousePressedKeys &= ~QS60Data::Right;
- break;
- case EStdKeyUpArrow:
- S60->virtualMousePressedKeys &= ~QS60Data::Up;
- break;
- case EStdKeyDownArrow:
- S60->virtualMousePressedKeys &= ~QS60Data::Down;
- break;
- // diagonal keys (named aliases don't exist in 3.1 SDK)
- case EStdKeyDevice10:
- S60->virtualMousePressedKeys &= ~QS60Data::LeftUp;
- break;
- case EStdKeyDevice11:
- S60->virtualMousePressedKeys &= ~QS60Data::RightUp;
- break;
- case EStdKeyDevice12:
- S60->virtualMousePressedKeys &= ~QS60Data::RightDown;
- break;
- case EStdKeyDevice13:
- S60->virtualMousePressedKeys &= ~QS60Data::LeftDown;
- break;
- case EStdKeyDevice3: //select
- if (S60->virtualMousePressedKeys & QS60Data::Select)
- fakeEvent.iType = TPointerEvent::EButton1Up;
- S60->virtualMousePressedKeys &= ~QS60Data::Select;
- break;
- }
+ QPoint pos = QCursor::pos();
+ TPointerEvent fakeEvent;
+ fakeEvent.iType = (TPointerEvent::TType)(-1);
+ fakeEvent.iModifiers = keyEvent.iModifiers;
+ TInt x = pos.x();
+ TInt y = pos.y();
+ if (type == EEventKeyUp) {
+ S60->virtualMouseAccelTimeout.start();
+ switch (keyEvent.iScanCode) {
+ case EStdKeyLeftArrow:
+ S60->virtualMousePressedKeys &= ~QS60Data::Left;
+ break;
+ case EStdKeyRightArrow:
+ S60->virtualMousePressedKeys &= ~QS60Data::Right;
+ break;
+ case EStdKeyUpArrow:
+ S60->virtualMousePressedKeys &= ~QS60Data::Up;
+ break;
+ case EStdKeyDownArrow:
+ S60->virtualMousePressedKeys &= ~QS60Data::Down;
+ break;
+ // diagonal keys (named aliases don't exist in 3.1 SDK)
+ case EStdKeyDevice10:
+ S60->virtualMousePressedKeys &= ~QS60Data::LeftUp;
+ break;
+ case EStdKeyDevice11:
+ S60->virtualMousePressedKeys &= ~QS60Data::RightUp;
+ break;
+ case EStdKeyDevice12:
+ S60->virtualMousePressedKeys &= ~QS60Data::RightDown;
+ break;
+ case EStdKeyDevice13:
+ S60->virtualMousePressedKeys &= ~QS60Data::LeftDown;
+ break;
+ case EStdKeyDevice3: //select
+ if (S60->virtualMousePressedKeys & QS60Data::Select)
+ fakeEvent.iType = TPointerEvent::EButton1Up;
+ S60->virtualMousePressedKeys &= ~QS60Data::Select;
+ break;
}
- else if (type == EEventKey) {
- int dx = 0;
- int dy = 0;
- if (keyEvent.iScanCode != EStdKeyDevice3) {
- m_doubleClickTimer.invalidate();
- //reset mouse accelleration after a short time with no moves
- const int maxTimeBetweenKeyEventsMs = 500;
- if (S60->virtualMouseAccelTimeout.isValid() &&
+ }
+ else if (type == EEventKey) {
+ int dx = 0;
+ int dy = 0;
+ if (keyEvent.iScanCode != EStdKeyDevice3) {
+ m_doubleClickTimer.invalidate();
+ //reset mouse accelleration after a short time with no moves
+ const int maxTimeBetweenKeyEventsMs = 500;
+ if (S60->virtualMouseAccelTimeout.isValid() &&
S60->virtualMouseAccelTimeout.hasExpired(maxTimeBetweenKeyEventsMs)) {
- S60->virtualMouseAccelDX = 0;
- S60->virtualMouseAccelDY = 0;
- }
- S60->virtualMouseAccelTimeout.invalidate();
+ S60->virtualMouseAccelDX = 0;
+ S60->virtualMouseAccelDY = 0;
}
- switch (keyEvent.iScanCode) {
- case EStdKeyLeftArrow:
- S60->virtualMousePressedKeys |= QS60Data::Left;
- dx = -1;
- fakeEvent.iType = TPointerEvent::EMove;
- break;
- case EStdKeyRightArrow:
- S60->virtualMousePressedKeys |= QS60Data::Right;
- dx = 1;
- fakeEvent.iType = TPointerEvent::EMove;
- break;
- case EStdKeyUpArrow:
- S60->virtualMousePressedKeys |= QS60Data::Up;
- dy = -1;
- fakeEvent.iType = TPointerEvent::EMove;
- break;
- case EStdKeyDownArrow:
- S60->virtualMousePressedKeys |= QS60Data::Down;
- dy = 1;
- fakeEvent.iType = TPointerEvent::EMove;
- break;
- case EStdKeyDevice10:
- S60->virtualMousePressedKeys |= QS60Data::LeftUp;
- dx = -1;
- dy = -1;
- fakeEvent.iType = TPointerEvent::EMove;
- break;
- case EStdKeyDevice11:
- S60->virtualMousePressedKeys |= QS60Data::RightUp;
- dx = 1;
- dy = -1;
- fakeEvent.iType = TPointerEvent::EMove;
- break;
- case EStdKeyDevice12:
- S60->virtualMousePressedKeys |= QS60Data::RightDown;
- dx = 1;
- dy = 1;
- fakeEvent.iType = TPointerEvent::EMove;
- break;
- case EStdKeyDevice13:
- S60->virtualMousePressedKeys |= QS60Data::LeftDown;
- dx = -1;
- dy = 1;
- fakeEvent.iType = TPointerEvent::EMove;
- break;
- case EStdKeyDevice3:
- // Platform bug. If you start pressing several keys simultaneously (for
- // example for drag'n'drop), Symbian starts producing spurious up and
- // down messages for some keys. Therefore, make sure we have a clean slate
- // of pressed keys before starting a new button press.
- if (S60->virtualMousePressedKeys & QS60Data::Select) {
- return EKeyWasConsumed;
- } else {
- S60->virtualMousePressedKeys |= QS60Data::Select;
- fakeEvent.iType = TPointerEvent::EButton1Down;
- if (m_doubleClickTimer.isValid()
+ S60->virtualMouseAccelTimeout.invalidate();
+ }
+ switch (keyEvent.iScanCode) {
+ case EStdKeyLeftArrow:
+ S60->virtualMousePressedKeys |= QS60Data::Left;
+ dx = -1;
+ fakeEvent.iType = TPointerEvent::EMove;
+ break;
+ case EStdKeyRightArrow:
+ S60->virtualMousePressedKeys |= QS60Data::Right;
+ dx = 1;
+ fakeEvent.iType = TPointerEvent::EMove;
+ break;
+ case EStdKeyUpArrow:
+ S60->virtualMousePressedKeys |= QS60Data::Up;
+ dy = -1;
+ fakeEvent.iType = TPointerEvent::EMove;
+ break;
+ case EStdKeyDownArrow:
+ S60->virtualMousePressedKeys |= QS60Data::Down;
+ dy = 1;
+ fakeEvent.iType = TPointerEvent::EMove;
+ break;
+ case EStdKeyDevice10:
+ S60->virtualMousePressedKeys |= QS60Data::LeftUp;
+ dx = -1;
+ dy = -1;
+ fakeEvent.iType = TPointerEvent::EMove;
+ break;
+ case EStdKeyDevice11:
+ S60->virtualMousePressedKeys |= QS60Data::RightUp;
+ dx = 1;
+ dy = -1;
+ fakeEvent.iType = TPointerEvent::EMove;
+ break;
+ case EStdKeyDevice12:
+ S60->virtualMousePressedKeys |= QS60Data::RightDown;
+ dx = 1;
+ dy = 1;
+ fakeEvent.iType = TPointerEvent::EMove;
+ break;
+ case EStdKeyDevice13:
+ S60->virtualMousePressedKeys |= QS60Data::LeftDown;
+ dx = -1;
+ dy = 1;
+ fakeEvent.iType = TPointerEvent::EMove;
+ break;
+ case EStdKeyDevice3:
+ // Platform bug. If you start pressing several keys simultaneously (for
+ // example for drag'n'drop), Symbian starts producing spurious up and
+ // down messages for some keys. Therefore, make sure we have a clean slate
+ // of pressed keys before starting a new button press.
+ if (S60->virtualMousePressedKeys & QS60Data::Select) {
+ return EKeyWasConsumed;
+ } else {
+ S60->virtualMousePressedKeys |= QS60Data::Select;
+ fakeEvent.iType = TPointerEvent::EButton1Down;
+ if (m_doubleClickTimer.isValid()
&& !m_doubleClickTimer.hasExpired(QApplication::doubleClickInterval())) {
- fakeEvent.iModifiers |= EModifierDoubleClick;
- m_doubleClickTimer.invalidate();
- } else {
- m_doubleClickTimer.start();
- }
+ fakeEvent.iModifiers |= EModifierDoubleClick;
+ m_doubleClickTimer.invalidate();
+ } else {
+ m_doubleClickTimer.start();
}
- break;
- }
- if (dx) {
- int cdx = S60->virtualMouseAccelDX;
- //reset accel on change of sign, else double accel
- if (dx * cdx <= 0)
- cdx = dx;
- else
- cdx *= 4;
- //cap accelleration
- if (dx * cdx > S60->virtualMouseMaxAccel)
- cdx = dx * S60->virtualMouseMaxAccel;
- //move mouse position
- x += cdx;
- S60->virtualMouseAccelDX = cdx;
}
-
- if (dy) {
- int cdy = S60->virtualMouseAccelDY;
- if (dy * cdy <= 0)
- cdy = dy;
- else
- cdy *= 4;
- if (dy * cdy > S60->virtualMouseMaxAccel)
- cdy = dy * S60->virtualMouseMaxAccel;
- y += cdy;
- S60->virtualMouseAccelDY = cdy;
- }
- }
- //clip to screen size (window server allows a sprite hotspot to be outside the screen)
- if (x < 0)
- x = 0;
- else if (x >= S60->screenWidthInPixels)
- x = S60->screenWidthInPixels - 1;
- if (y < 0)
- y = 0;
- else if (y >= S60->screenHeightInPixels)
- y = S60->screenHeightInPixels - 1;
- TPoint epos(x, y);
- TPoint cpos = epos - PositionRelativeToScreen();
- fakeEvent.iPosition = cpos;
- fakeEvent.iParentPosition = epos;
- if(fakeEvent.iType != -1)
- HandlePointerEvent(fakeEvent);
- return EKeyWasConsumed;
- }
- }
-#endif
- // S60 has a confusing way of delivering key events. There are three types of
- // events: EKeyEvent, EKeyEventDown and EKeyEventUp. When a key is pressed, the
- // two first events are generated. When releasing the key, the last one is
- // generated.
- // Because S60 does not generate keysyms for EKeyEventDown and EKeyEventUp events,
- // we need to do some special tricks to map it to the Qt way. First, we completely
- // discard EKeyEventDown events, since they are redundant. Second, since
- // EKeyEventUp does not give us a keysym, we need to cache the keysyms from
- // the EKeyEvent events. This is what resolveS60ScanCode does.
-
-
- // ### hackish way to send Qt application to background when pressing right softkey
- /*
- if( keyEvent.iScanCode == EStdKeyDevice1 ) {
- S60->window_group->SetOrdinalPosition(-1);
- qApp->setActiveWindow(0);
- return EKeyWasNotConsumed;
- }
- */
-
- TUint s60Keysym = QApplicationPrivate::resolveS60ScanCode(keyEvent.iScanCode,
- keyEvent.iCode);
- int keyCode;
- if (s60Keysym == EKeyNull){ //some key events have 0 in iCode, for them iScanCode should be used
- keyCode = qt_keymapper_private()->mapS60ScanCodesToQt(keyEvent.iScanCode);
- } else if (s60Keysym >= 0x20 && s60Keysym < ENonCharacterKeyBase) {
- // Normal characters keys.
- keyCode = s60Keysym;
- } else {
- // Special S60 keys.
- keyCode = qt_keymapper_private()->mapS60KeyToQt(s60Keysym);
- }
-
- Qt::KeyboardModifiers mods = mapToQtModifiers(keyEvent.iModifiers);
- QKeyEventEx qKeyEvent(type == EEventKeyUp ? QEvent::KeyRelease : QEvent::KeyPress, keyCode,
- mods, qt_keymapper_private()->translateKeyEvent(keyCode, mods),
- (keyEvent.iRepeats != 0), 1, keyEvent.iScanCode, s60Keysym, keyEvent.iModifiers);
-// WId wid = reinterpret_cast<RWindowGroup *>(keyEvent.Handle())->Child();
-// if (!wid)
-// Could happen if window isn't shown yet.
-// return EKeyWasNotConsumed;
- QWidget *widget;
- widget = QWidget::keyboardGrabber();
- if (!widget) {
- if (QApplicationPrivate::popupWidgets != 0) {
- widget = QApplication::activePopupWidget()->focusWidget();
- if (!widget) {
- widget = QApplication::activePopupWidget();
+ break;
}
- } else {
- widget = QApplicationPrivate::focus_widget;
- if (!widget) {
- widget = qwidget;
+ if (dx) {
+ int cdx = S60->virtualMouseAccelDX;
+ //reset accel on change of sign, else double accel
+ if (dx * cdx <= 0)
+ cdx = dx;
+ else
+ cdx *= 4;
+ //cap accelleration
+ if (dx * cdx > S60->virtualMouseMaxAccel)
+ cdx = dx * S60->virtualMouseMaxAccel;
+ //move mouse position
+ x += cdx;
+ S60->virtualMouseAccelDX = cdx;
}
- }
- }
- QEventDispatcherS60 *dispatcher;
- // It is theoretically possible for someone to install a different event dispatcher.
- if ((dispatcher = qobject_cast<QEventDispatcherS60 *>(widget->d_func()->threadData->eventDispatcher)) != 0) {
- if (dispatcher->excludeUserInputEvents()) {
- dispatcher->saveInputEvent(this, widget, new QKeyEventEx(qKeyEvent));
- return EKeyWasConsumed;
+ if (dy) {
+ int cdy = S60->virtualMouseAccelDY;
+ if (dy * cdy <= 0)
+ cdy = dy;
+ else
+ cdy *= 4;
+ if (dy * cdy > S60->virtualMouseMaxAccel)
+ cdy = dy * S60->virtualMouseMaxAccel;
+ y += cdy;
+ S60->virtualMouseAccelDY = cdy;
+ }
}
+ //clip to screen size (window server allows a sprite hotspot to be outside the screen)
+ if (x < 0)
+ x = 0;
+ else if (x >= S60->screenWidthInPixels)
+ x = S60->screenWidthInPixels - 1;
+ if (y < 0)
+ y = 0;
+ else if (y >= S60->screenHeightInPixels)
+ y = S60->screenHeightInPixels - 1;
+ TPoint epos(x, y);
+ TPoint cpos = epos - PositionRelativeToScreen();
+ fakeEvent.iPosition = cpos;
+ fakeEvent.iParentPosition = epos;
+ if(fakeEvent.iType != -1)
+ HandlePointerEvent(fakeEvent);
+ return EKeyWasConsumed;
}
- return sendKeyEvent(widget, &qKeyEvent);
- }
}
+#endif
+
return EKeyWasNotConsumed;
}
@@ -1096,17 +1168,12 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */)
qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle());
#ifdef Q_WS_S60
// If widget is fullscreen/minimized, hide status pane and button container otherwise show them.
- CEikStatusPane *statusPane = S60->statusPane();
- CEikButtonGroupContainer *buttonGroup = S60->buttonGroupContainer();
- TBool visible = !(qwidget->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized));
- if (statusPane)
- statusPane->MakeVisible(visible);
- if (buttonGroup) {
- // Visibility
- const TBool isFullscreen = qwidget->windowState() & Qt::WindowFullScreen;
- const TBool cbaVisibilityHint = qwidget->windowFlags() & Qt::WindowSoftkeysVisibleHint;
- buttonGroup->MakeVisible(visible || (isFullscreen && cbaVisibilityHint));
- }
+ const bool visible = !(qwidget->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized));
+ const bool statusPaneVisibility = visible;
+ const bool isFullscreen = qwidget->windowState() & Qt::WindowFullScreen;
+ const bool cbaVisibilityHint = qwidget->windowFlags() & Qt::WindowSoftkeysVisibleHint;
+ const bool buttonGroupVisibility = (visible || (isFullscreen && cbaVisibilityHint));
+ S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility);
#endif
} else if (QApplication::activeWindow() == qwidget->window()) {
if (CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog() || S60->menuBeingConstructed) {
@@ -1456,6 +1523,8 @@ void qt_cleanup()
qt_S60Beep = 0;
}
QFontCache::cleanup(); // Has to happen now, since QFontEngineS60 has FBS handles
+ QPixmapCache::clear(); // Has to happen now, since QS60PixmapData has FBS handles
+
qt_cleanup_symbianFontDatabaseExtras();
// S60 structure and window server session are freed in eventdispatcher destructor as they are needed there
@@ -2076,13 +2145,18 @@ void QApplication::setEffectEnabled(Qt::UIEffect /* effect */, bool /* enable */
TUint QApplicationPrivate::resolveS60ScanCode(TInt scanCode, TUint keysym)
{
+ if (!scanCode)
+ return keysym;
+
+ QApplicationPrivate *d = QApplicationPrivate::instance();
+
if (keysym) {
// If keysym is specified, cache it.
- scanCodeCache.insert(scanCode, keysym);
+ d->scanCodeCache.insert(scanCode, keysym);
return keysym;
} else {
// If not, retrieve the cached version.
- return scanCodeCache[scanCode];
+ return d->scanCodeCache[scanCode];
}
}
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 9e8a128676..ec26e812f4 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -2485,7 +2485,7 @@ extern "C" LRESULT QT_WIN_CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wPa
if (OkCommand)
QApplication::postEvent(widget, new QEvent(QEvent::OkRequest));
if (CancelCommand)
- QApplication::postEvent(widget, new QEvent(QEvent::Close));
+ widget->showMinimized();
else
#ifndef QT_NO_MENUBAR
QMenuBar::wceCommands(LOWORD(wParam));
diff --git a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
index 5dcf613d63..7a9dc70a78 100644
--- a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
+++ b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
@@ -196,7 +196,6 @@ static void cleanupCocoaApplicationDelegate()
qAppInstance()->quit();
startedQuit = false;
}
- return NSTerminateNow;
}
if (qtPrivate->threadData->eventLoops.size() == 0) {
diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
index 86528160eb..679514946c 100644
--- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
+++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
@@ -85,6 +85,8 @@ QT_END_NAMESPACE
- (BOOL)canBecomeKeyWindow
{
QWidget *widget = [self QT_MANGLE_NAMESPACE(qt_qwidget)];
+ if (!widget)
+ return NO; // This should happen only for qt_root_win
bool isToolTip = (widget->windowType() == Qt::ToolTip);
bool isPopup = (widget->windowType() == Qt::Popup);
@@ -94,6 +96,8 @@ QT_END_NAMESPACE
- (BOOL)canBecomeMainWindow
{
QWidget *widget = [self QT_MANGLE_NAMESPACE(qt_qwidget)];
+ if (!widget)
+ return NO; // This should happen only for qt_root_win
bool isToolTip = (widget->windowType() == Qt::ToolTip);
bool isPopup = (widget->windowType() == Qt::Popup);
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index 5c90e2ece5..a552ce7f6f 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -269,6 +269,28 @@ static int qCocoaViewCount = 0;
dropData = new QCocoaDropData(dropPasteboard);
}
+- (void)changeDraggingCursor:(NSDragOperation)newOperation
+{
+ static SEL action = nil;
+ static bool operationSupported = false;
+ if (action == nil) {
+ action = NSSelectorFromString(@"operationNotAllowedCursor");
+ if ([NSCursor respondsToSelector:action]) {
+ operationSupported = true;
+ }
+ }
+ if (operationSupported) {
+ NSCursor *notAllowedCursor = [NSCursor performSelector:action];
+ bool isNotAllowedCursor = ([NSCursor currentCursor] == notAllowedCursor);
+ if (newOperation == NSDragOperationNone && !isNotAllowedCursor) {
+ [notAllowedCursor push];
+ } else if (newOperation != NSDragOperationNone && isNotAllowedCursor) {
+ [notAllowedCursor pop];
+ }
+
+ }
+}
+
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
{
// NB: This function is called from QCoocaWindow/QCocoaPanel rather than directly
@@ -300,6 +322,7 @@ static int qCocoaViewCount = 0;
if (!qDEEvent.isAccepted()) {
// widget is not interested in this drag, so ignore this drop data.
[self removeDropData];
+ [self changeDraggingCursor:NSDragOperationNone];
return NSDragOperationNone;
} else {
// save the mouse position, used by draggingExited handler.
@@ -321,6 +344,7 @@ static int qCocoaViewCount = 0;
nsActions = QT_PREPEND_NAMESPACE(qt_mac_mapDropAction)(qDMEvent.dropAction());
}
QT_PREPEND_NAMESPACE(qt_mac_copy_answer_rect)(qDMEvent);
+ [self changeDraggingCursor:nsActions];
return nsActions;
}
}
@@ -335,16 +359,21 @@ static int qCocoaViewCount = 0;
if (dragEnterSequence != [sender draggingSequenceNumber])
[self draggingEntered:sender];
// drag enter event was rejected, so ignore the move event.
- if (dropData == 0)
+ if (dropData == 0) {
+ [self changeDraggingCursor:NSDragOperationNone];
return NSDragOperationNone;
+ }
// return last value, if we are still in the answerRect.
NSPoint globalPoint = [[sender draggingDestinationWindow] convertBaseToScreen:windowPoint];
NSPoint localPoint = [self convertPoint:windowPoint fromView:nil];
NSDragOperation nsActions = [sender draggingSourceOperationMask];
QPoint posDrag(localPoint.x, localPoint.y);
if (qt_mac_mouse_inside_answer_rect(posDrag)
- && QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastOperation) == nsActions)
- return QT_PREPEND_NAMESPACE(qt_mac_mapDropActions)(QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastAction));
+ && QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastOperation) == nsActions) {
+ NSDragOperation operation = QT_PREPEND_NAMESPACE(qt_mac_mapDropActions)(QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastAction));
+ [self changeDraggingCursor:operation];
+ return operation;
+ }
// send drag move event to the widget
QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastOperation) = nsActions;
Qt::DropActions qtAllowed = QT_PREPEND_NAMESPACE(qt_mac_mapNSDragOperations)(nsActions);
@@ -361,7 +390,10 @@ static int qCocoaViewCount = 0;
if (QDragManager::self()->source())
mimeData = QDragManager::self()->dragPrivate()->data;
QDragMoveEvent qDMEvent(posDrag, qtAllowed, mimeData, QApplication::mouseButtons(), modifiers);
- qDMEvent.setDropAction(QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec).lastAction);
+ if (QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec).lastAction != Qt::IgnoreAction
+ && QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec).buttons == qDMEvent.mouseButtons()
+ && QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec).modifiers == qDMEvent.keyboardModifiers())
+ qDMEvent.setDropAction(QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec).lastAction);
qDMEvent.accept();
QApplication::sendEvent(qwidget, &qDMEvent);
@@ -373,6 +405,7 @@ static int qCocoaViewCount = 0;
qDMEvent.setDropAction(Qt::IgnoreAction);
}
qt_mac_copy_answer_rect(qDMEvent);
+ [self changeDraggingCursor:operation];
return operation;
}
@@ -388,6 +421,8 @@ static int qCocoaViewCount = 0;
QApplication::sendEvent(qwidget, &de);
[self removeDropData];
}
+ [self changeDraggingCursor:NSDragOperationEvery];
+
}
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
diff --git a/src/gui/kernel/qcocoaview_mac_p.h b/src/gui/kernel/qcocoaview_mac_p.h
index 33aaa24f8b..b6b63ca3ca 100644
--- a/src/gui/kernel/qcocoaview_mac_p.h
+++ b/src/gui/kernel/qcocoaview_mac_p.h
@@ -106,6 +106,7 @@ Q_GUI_EXPORT
- (void) qt_clearQWidget;
- (BOOL)qt_leftButtonIsRightButton;
- (void)qt_setLeftButtonIsRightButton:(BOOL)isSwapped;
+- (void)changeDraggingCursor:(NSDragOperation)newOperation;
+ (DnDParams*)currentMouseEvent;
@end
diff --git a/src/gui/kernel/qcocoawindowdelegate_mac.mm b/src/gui/kernel/qcocoawindowdelegate_mac.mm
index 2b9cf8517b..ffba6c2569 100644
--- a/src/gui/kernel/qcocoawindowdelegate_mac.mm
+++ b/src/gui/kernel/qcocoawindowdelegate_mac.mm
@@ -394,5 +394,25 @@ static void cleanupCocoaWindowDelegate()
}
return NO;
}
+
+- (void)syncContentViewFrame: (NSNotification *)notification
+{
+ NSView *cView = [notification object];
+ if (cView) {
+ NSWindow *window = [cView window];
+ QWidget *qwidget = m_windowHash->value(window);
+ if (qwidget) {
+ QWidgetData *widgetData = qt_qwidget_data(qwidget);
+ NSRect rect = [cView frame];
+ const QSize newSize(rect.size.width, rect.size.height);
+ const QSize &oldSize = widgetData->crect.size();
+ if (newSize != oldSize) {
+ [self syncSizeForWidget:qwidget toSize:newSize fromSize:oldSize];
+ }
+ }
+
+ }
+}
+
@end
#endif// QT_MAC_USE_COCOA
diff --git a/src/gui/kernel/qcocoawindowdelegate_mac_p.h b/src/gui/kernel/qcocoawindowdelegate_mac_p.h
index de9c946169..2ca9b13e84 100644
--- a/src/gui/kernel/qcocoawindowdelegate_mac_p.h
+++ b/src/gui/kernel/qcocoawindowdelegate_mac_p.h
@@ -105,5 +105,6 @@ QT_FORWARD_DECLARE_CLASS(QWidgetData)
- (NSSize)closestAcceptableSizeForWidget:(QWidget *)qwidget
window:(NSWindow *)window withNewSize:(NSSize)proposedSize;
- (QWidget *)qt_qwidgetForWindow:(NSWindow *)window;
+- (void)syncContentViewFrame: (NSNotification *)notification;
@end
#endif
diff --git a/src/gui/kernel/qdesktopwidget_s60.cpp b/src/gui/kernel/qdesktopwidget_s60.cpp
index e4d0bf3538..a07f4a7e16 100644
--- a/src/gui/kernel/qdesktopwidget_s60.cpp
+++ b/src/gui/kernel/qdesktopwidget_s60.cpp
@@ -103,6 +103,10 @@ void QDesktopWidgetPrivate::init(QDesktopWidget *that)
rects->resize(QDesktopWidgetPrivate::screenCount);
workrects->resize(QDesktopWidgetPrivate::screenCount);
+
+ (*rects)[0].setRect(0, 0, S60->screenWidthInPixels, S60->screenHeightInPixels);
+ QRect wr = qt_TRect2QRect(static_cast<CEikAppUi*>(S60->appUi())->ClientRect());
+ (*workrects)[0].setRect(wr.x(), wr.y(), wr.width(), wr.height());
}
void QDesktopWidgetPrivate::cleanup()
@@ -146,17 +150,23 @@ QWidget *QDesktopWidget::screen(int /* screen */)
return this;
}
-const QRect QDesktopWidget::availableGeometry(int /* screen */) const
+const QRect QDesktopWidget::availableGeometry(int screen) const
{
- TRect clientRect = static_cast<CEikAppUi*>(S60->appUi())->ClientRect();
- return qt_TRect2QRect(clientRect);
+ Q_D(const QDesktopWidget);
+ if (screen < 0 || screen >= d->screenCount)
+ screen = d->primaryScreen;
+
+ return d->workrects->at(screen);
}
-const QRect QDesktopWidget::screenGeometry(int /* screen */) const
+const QRect QDesktopWidget::screenGeometry(int screen) const
{
Q_D(const QDesktopWidget);
- return QRect(0, 0, S60->screenWidthInPixels, S60->screenHeightInPixels);
- }
+ if (screen < 0 || screen >= d->screenCount)
+ screen = d->primaryScreen;
+
+ return d->rects->at(screen);
+}
int QDesktopWidget::screenNumber(const QWidget * /* widget */) const
{
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 92eed33f59..bbc9e0b067 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -3627,7 +3627,7 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar)
\brief The QTouchEvent class contains parameters that describe a touch event.
\since 4.6
\ingroup events
- \ingroup multitouch
+ \ingroup touch
\section1 Enabling Touch Events
@@ -3641,7 +3641,7 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar)
Similarly to QMouseEvent, Qt automatically grabs each touch point on the first press inside a
widget, and the widget will receive all updates for the touch point until it is released.
- Note that it is possible for a widget to receive events for multiple touch points, and that
+ Note that it is possible for a widget to receive events for numerous touch points, and that
multiple widgets may be receiving touch events at the same time.
\section1 Event Handling
@@ -3717,7 +3717,7 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar)
\i As mentioned above, enabling touch events means multiple widgets can be receiving touch
events simultaneously. Combined with the default QWidget::event() handling for QTouchEvents,
- this gives you great flexibility in designing multi-touch user interfaces. Be aware of the
+ this gives you great flexibility in designing touch user interfaces. Be aware of the
implications. For example, it is possible that the user is moving a QSlider with one finger and
pressing a QPushButton with another. The signals emitted by these widgets will be
interleaved.
@@ -3729,7 +3729,7 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar)
\i QTouchEvents are not affected by a \l{QWidget::grabMouse()}{mouse grab} or an
\l{QApplication::activePopupWidget()}{active pop-up widget}. The behavior of QTouchEvents is
- undefined when opening a pop-up or grabbing the mouse while there are multiple active touch
+ undefined when opening a pop-up or grabbing the mouse while there are more than one active touch
points.
\endlist
diff --git a/src/gui/kernel/qgesture.cpp b/src/gui/kernel/qgesture.cpp
index f5688f4f64..4a4452ab07 100644
--- a/src/gui/kernel/qgesture.cpp
+++ b/src/gui/kernel/qgesture.cpp
@@ -41,6 +41,7 @@
#include "qgesture.h"
#include "private/qgesture_p.h"
+#include "private/qstandardgestures_p.h"
#ifndef QT_NO_GESTURES
@@ -305,10 +306,10 @@ void QPanGesture::setAcceleration(qreal value)
\class QPinchGesture
\since 4.6
\brief The QPinchGesture class describes a pinch gesture made my the user.
- \ingroup multitouch
+ \ingroup touch
\ingroup gestures
- A pinch gesture is a form of multitouch user input in which the user typically
+ A pinch gesture is a form of touch user input in which the user typically
touches two points on the input device with a thumb and finger, before moving
them closer together or further apart to change the scale factor, zoom, or level
of detail of the user interface.
@@ -388,7 +389,7 @@ void QPanGesture::setAcceleration(qreal value)
\brief the current scale factor
The scale factor measures the scale factor associated with the distance
- between two of the user's inputs on a multitouch device.
+ between two of the user's inputs on a touch device.
\sa totalScaleFactor, lastScaleFactor
*/
@@ -726,6 +727,34 @@ void QTapAndHoldGesture::setPosition(const QPointF &value)
d_func()->position = value;
}
+/*!
+ Set the timeout, in milliseconds, before the gesture triggers.
+
+ The recognizer will detect a touch down and and if \a msecs
+ later the touch is still down, it will trigger the QTapAndHoldGesture.
+ The default value is 700 milliseconds.
+*/
+// static
+void QTapAndHoldGesture::setTimeout(int msecs)
+{
+ QTapAndHoldGesturePrivate::Timeout = msecs;
+}
+
+/*!
+ Gets the timeout, in milliseconds, before the gesture triggers.
+
+ The recognizer will detect a touch down and and if timeout()
+ later the touch is still down, it will trigger the QTapAndHoldGesture.
+ The default value is 700 milliseconds.
+*/
+// static
+int QTapAndHoldGesture::timeout()
+{
+ return QTapAndHoldGesturePrivate::Timeout;
+}
+
+int QTapAndHoldGesturePrivate::Timeout = 700; // in ms
+
QT_END_NAMESPACE
#endif // QT_NO_GESTURES
diff --git a/src/gui/kernel/qgesture.h b/src/gui/kernel/qgesture.h
index 8c10895140..dcb02648a1 100644
--- a/src/gui/kernel/qgesture.h
+++ b/src/gui/kernel/qgesture.h
@@ -134,6 +134,7 @@ class Q_GUI_EXPORT QPinchGesture : public QGesture
{
Q_OBJECT
Q_DECLARE_PRIVATE(QPinchGesture)
+ Q_FLAGS(ChangeFlags ChangeFlag)
public:
enum ChangeFlag {
@@ -191,6 +192,8 @@ public:
friend class QPinchGestureRecognizer;
};
+Q_DECLARE_OPERATORS_FOR_FLAGS(QPinchGesture::ChangeFlags)
+
QT_END_NAMESPACE
Q_DECLARE_METATYPE(QPinchGesture::ChangeFlags)
@@ -252,6 +255,9 @@ public:
QPointF position() const;
void setPosition(const QPointF &pos);
+ static void setTimeout(int msecs);
+ static int timeout();
+
friend class QTapAndHoldGestureRecognizer;
};
diff --git a/src/gui/kernel/qgesture_p.h b/src/gui/kernel/qgesture_p.h
index f5474c1fe4..29b923e156 100644
--- a/src/gui/kernel/qgesture_p.h
+++ b/src/gui/kernel/qgesture_p.h
@@ -177,6 +177,7 @@ public:
QPointF position;
int timerId;
+ static int Timeout;
};
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp
index e43a560503..fe9dd8af6c 100644
--- a/src/gui/kernel/qgesturemanager.cpp
+++ b/src/gui/kernel/qgesturemanager.cpp
@@ -71,7 +71,7 @@
QT_BEGIN_NAMESPACE
QGestureManager::QGestureManager(QObject *parent)
- : QObject(parent), state(NotGesture), m_lastCustomGestureId(0)
+ : QObject(parent), state(NotGesture), m_lastCustomGestureId(Qt::CustomGesture)
{
qRegisterMetaType<Qt::GestureState>();
@@ -119,7 +119,7 @@ Qt::GestureType QGestureManager::registerGestureRecognizer(QGestureRecognizer *r
if (type == Qt::CustomGesture) {
// generate a new custom gesture id
++m_lastCustomGestureId;
- type = Qt::GestureType(Qt::CustomGesture + m_lastCustomGestureId);
+ type = Qt::GestureType(m_lastCustomGestureId);
}
m_recognizers.insertMulti(type, recognizer);
delete dummy;
diff --git a/src/gui/kernel/qguifunctions_wince.cpp b/src/gui/kernel/qguifunctions_wince.cpp
index f5004b09ff..377dfe3187 100644
--- a/src/gui/kernel/qguifunctions_wince.cpp
+++ b/src/gui/kernel/qguifunctions_wince.cpp
@@ -76,6 +76,10 @@ struct AygSIPINFO
#define SHIDIF_SIZEDLGFULLSCREEN 0x0004
#endif
+#ifndef SHDB_HIDE
+#define SHDB_HIDE 0x0002
+#endif
+
#ifndef SHFS_SHOWTASKBAR
#define SHFS_SHOWTASKBAR 0x0001
#endif
@@ -112,10 +116,12 @@ struct AygSIPINFO
typedef BOOL (*AygInitDialog)(AygSHINITDLGINFO*);
typedef BOOL (*AygFullScreen)(HWND, DWORD);
typedef BOOL (*AygSHSipInfo)(UINT, UINT, PVOID, UINT);
+typedef BOOL (*AygSHDoneButton)(HWND, DWORD);
static AygInitDialog ptrAygInitDialog = 0;
static AygFullScreen ptrAygFullScreen = 0;
static AygSHSipInfo ptrAygSHSipInfo = 0;
+static AygSHDoneButton ptrAygSHDoneButton = 0;
static bool aygResolved = false;
static void resolveAygLibs()
@@ -128,18 +134,10 @@ static void resolveAygLibs()
ptrAygInitDialog = (AygInitDialog) ayglib.resolve("SHInitDialog");
ptrAygFullScreen = (AygFullScreen) ayglib.resolve("SHFullScreen");
ptrAygSHSipInfo = (AygSHSipInfo) ayglib.resolve("SHSipInfo");
+ ptrAygSHDoneButton = (AygSHDoneButton) ayglib.resolve("SHDoneButton");
}
}
-struct DIBINFO : public BITMAPINFO
-{
- RGBQUAD arColors[255];
-
- operator LPBITMAPINFO() { return (LPBITMAPINFO) this; }
- operator LPBITMAPINFOHEADER() { return &bmiHeader; }
- RGBQUAD* ColorTable() { return bmiColors; }
-};
-
int qt_wince_GetDIBits(HDC /*hdc*/ , HBITMAP hSourceBitmap, uint, uint, LPVOID lpvBits, LPBITMAPINFO, uint)
{
if (!lpvBits) {
@@ -323,6 +321,8 @@ void qt_wince_maximize(QWidget *widget)
shidi.dwFlags |= SHIDIF_CANCELBUTTON;
if (widget->windowFlags() & Qt::WindowOkButtonHint)
shidi.dwFlags |= SHIDIF_DONEBUTTON;
+ if (!(widget->windowFlags() & (Qt::WindowCancelButtonHint | Qt::WindowOkButtonHint)))
+ shidi.dwFlags |= SHIDIF_CANCELBUTTON;
resolveAygLibs();
if (ptrAygInitDialog)
ptrAygInitDialog(&shidi);
@@ -334,6 +334,16 @@ void qt_wince_maximize(QWidget *widget)
}
}
+void qt_wince_unmaximize(QWidget *widget)
+{
+ if (ptrAygSHDoneButton && qt_wince_is_mobile()
+ && !(widget->windowFlags() & (Qt::WindowCancelButtonHint | Qt::WindowOkButtonHint)))
+ {
+ // Hide the [X] button, we've added in qt_wince_maximize.
+ ptrAygSHDoneButton(widget->winId(), SHDB_HIDE);
+ }
+}
+
void qt_wince_minimize(HWND hwnd)
{
#ifdef Q_OS_WINCE_WM
diff --git a/src/gui/kernel/qpalette.cpp b/src/gui/kernel/qpalette.cpp
index 98e8f66d74..38ec806327 100644
--- a/src/gui/kernel/qpalette.cpp
+++ b/src/gui/kernel/qpalette.cpp
@@ -868,11 +868,21 @@ void QPalette::detach()
Returns true (slowly) if this palette is different from \a p;
otherwise returns false (usually quickly).
+
+ \note The current ColorGroup is not taken into account when
+ comparing palettes
+
+ \sa operator==
*/
/*!
Returns true (usually quickly) if this palette is equal to \a p;
otherwise returns false (slowly).
+
+ \note The current ColorGroup is not taken into account when
+ comparing palettes
+
+ \sa operator!=
*/
bool QPalette::operator==(const QPalette &p) const
{
diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp
index 62d8a5390d..127e150979 100644
--- a/src/gui/kernel/qstandardgestures.cpp
+++ b/src/gui/kernel/qstandardgestures.cpp
@@ -515,34 +515,39 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
const QTouchEvent *ev = static_cast<const QTouchEvent *>(event);
const QMouseEvent *me = static_cast<const QMouseEvent *>(event);
+#ifndef QT_NO_GRAPHICSVIEW
const QGraphicsSceneMouseEvent *gsme = static_cast<const QGraphicsSceneMouseEvent *>(event);
+#endif
- enum { TimerInterval = 2000 };
enum { TapRadius = 40 };
switch (event->type()) {
+#ifndef QT_NO_GRAPHICSVIEW
case QEvent::GraphicsSceneMousePress:
d->position = gsme->screenPos();
q->setHotSpot(d->position);
if (d->timerId)
q->killTimer(d->timerId);
- d->timerId = q->startTimer(TimerInterval);
+ d->timerId = q->startTimer(QTapAndHoldGesturePrivate::Timeout);
return QGestureRecognizer::MayBeGesture; // we don't show a sign of life until the timeout
+#endif
case QEvent::MouseButtonPress:
d->position = me->globalPos();
q->setHotSpot(d->position);
if (d->timerId)
q->killTimer(d->timerId);
- d->timerId = q->startTimer(TimerInterval);
+ d->timerId = q->startTimer(QTapAndHoldGesturePrivate::Timeout);
return QGestureRecognizer::MayBeGesture; // we don't show a sign of life until the timeout
case QEvent::TouchBegin:
d->position = ev->touchPoints().at(0).startScreenPos();
q->setHotSpot(d->position);
if (d->timerId)
q->killTimer(d->timerId);
- d->timerId = q->startTimer(TimerInterval);
+ d->timerId = q->startTimer(QTapAndHoldGesturePrivate::Timeout);
return QGestureRecognizer::MayBeGesture; // we don't show a sign of life until the timeout
+#ifndef QT_NO_GRAPHICSVIEW
case QEvent::GraphicsSceneMouseRelease:
+#endif
case QEvent::MouseButtonRelease:
case QEvent::TouchEnd:
return QGestureRecognizer::CancelGesture; // get out of the MayBeGesture state
@@ -560,12 +565,14 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
return QGestureRecognizer::MayBeGesture;
return QGestureRecognizer::CancelGesture;
}
+#ifndef QT_NO_GRAPHICSVIEW
case QEvent::GraphicsSceneMouseMove: {
QPoint delta = gsme->screenPos() - d->position.toPoint();
if (d->timerId && delta.manhattanLength() <= TapRadius)
return QGestureRecognizer::MayBeGesture;
return QGestureRecognizer::CancelGesture;
}
+#endif
default:
return QGestureRecognizer::Ignore;
}
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index d8ef67d387..7f0c99e4d5 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -143,6 +143,14 @@ public:
int menuBeingConstructed : 1;
int memoryLimitForHwRendering;
QApplication::QS60MainApplicationFactory s60ApplicationFactory; // typedef'ed pointer type
+
+ enum ScanCodeState {
+ Unpressed,
+ KeyDown,
+ KeyDownAndKey
+ };
+ QHash<TInt, ScanCodeState> scanCodeStates;
+
static inline void updateScreenSize();
inline RWsSession& wsSession();
static inline RWindowGroup& windowGroup();
@@ -155,6 +163,7 @@ public:
static inline CAknTitlePane* titlePane();
static inline CAknContextPane* contextPane();
static inline CEikButtonGroupContainer* buttonGroupContainer();
+ static void setStatusPaneAndButtonGroupVisibility(bool statusPaneVisible, bool buttonGroupVisible);
#endif
#ifdef Q_OS_SYMBIAN
@@ -223,7 +232,9 @@ protected:
private:
void HandlePointerEvent(const TPointerEvent& aPointerEvent);
TKeyResponse OfferKeyEvent(const TKeyEvent& aKeyEvent,TEventCode aType);
+ TKeyResponse sendSymbianKeyEvent(const TKeyEvent &keyEvent, QEvent::Type type);
TKeyResponse sendKeyEvent(QWidget *widget, QKeyEvent *keyEvent);
+ TKeyResponse handleVirtualMouse(const TKeyEvent& keyEvent,TEventCode type);
bool sendMouseEvent(QWidget *widget, QMouseEvent *mEvent);
void sendMouseEvent(
QWidget *receiver,
@@ -236,6 +247,8 @@ private:
#ifdef QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER
void translateAdvancedPointerEvent(const TAdvancedPointerEvent *event);
#endif
+
+public:
void handleClientAreaChange();
private:
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index c236c60dbd..9946d5df61 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -343,8 +343,10 @@ QInputContext *QWidgetPrivate::inputContext() const
#ifndef QT_NO_IM
if (ic)
return ic;
-#endif
return qApp->inputContext();
+#else
+ return 0;
+#endif
}
/*!
@@ -12071,8 +12073,8 @@ void QWidget::ungrabGesture(Qt::GestureType gesture)
{
Q_D(QWidget);
if (d->gestureContext.remove(gesture)) {
- QGestureManager *manager = QGestureManager::instance();
- manager->cleanupCachedGestures(this, gesture);
+ if (QGestureManager *manager = QGestureManager::instance())
+ manager->cleanupCachedGestures(this, gesture);
}
}
#endif // QT_NO_GESTURES
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index e57ec77177..8ae6a9948a 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -1599,12 +1599,14 @@ void QWidgetPrivate::toggleDrawers(bool visible)
continue;
QWidget *widget = static_cast<QWidget*>(object);
if(qt_mac_is_macdrawer(widget)) {
+ bool oldState = widget->testAttribute(Qt::WA_WState_ExplicitShowHide);
if(visible) {
if (!widget->testAttribute(Qt::WA_WState_ExplicitShowHide))
widget->show();
} else {
widget->hide();
- widget->setAttribute(Qt::WA_WState_ExplicitShowHide, false);
+ if(!oldState)
+ widget->setAttribute(Qt::WA_WState_ExplicitShowHide, false);
}
}
}
@@ -4389,6 +4391,13 @@ void QWidgetPrivate::setGeometry_sys_helper(int x, int y, int w, int h, bool isM
data.window_state = data.window_state & ~Qt::WindowMaximized;
const bool visible = q->isVisible();
+ // Apply size restrictions, applicable for Windows & Widgets.
+ if (QWExtra *extra = extraData()) {
+ w = qMin(w, extra->maxw);
+ h = qMin(h, extra->maxh);
+ w = qMax(w, extra->minw);
+ h = qMax(h, extra->minh);
+ }
data.crect = QRect(x, y, w, h);
if (realWindow) {
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 2818d8827c..56349ad6d5 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -1113,15 +1113,10 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
// The window decoration visibility has to be changed before doing actual window state
// change since in that order the availableGeometry will return directly the right size and
// we will avoid unnecessarty redraws
- CEikStatusPane *statusPane = S60->statusPane();
- CEikButtonGroupContainer *buttonGroup = S60->buttonGroupContainer();
- TBool visible = !(newstate & (Qt::WindowFullScreen | Qt::WindowMinimized));
- if (statusPane)
- statusPane->MakeVisible(visible);
- if (buttonGroup) {
- // Visibility
- buttonGroup->MakeVisible(visible || (isFullscreen && cbaRequested));
- }
+ const bool visible = !(newstate & (Qt::WindowFullScreen | Qt::WindowMinimized));
+ const bool statusPaneVisibility = visible;
+ const bool buttonGroupVisibility = (visible || (isFullscreen && cbaRequested));
+ S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility);
#endif // Q_WS_S60
// Ensure the initial size is valid, since we store it as normalGeometry below.
@@ -1133,8 +1128,10 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
const bool cbaVisibilityHint = windowFlags() & Qt::WindowSoftkeysVisibleHint;
if (newstate & Qt::WindowFullScreen && !cbaVisibilityHint) {
+ setAttribute(Qt::WA_OutsideWSRange, false);
window->SetExtentToWholeScreen();
} else if (newstate & Qt::WindowMaximized || ((newstate & Qt::WindowFullScreen) && cbaVisibilityHint)) {
+ setAttribute(Qt::WA_OutsideWSRange, false);
TRect maxExtent = qt_QRect2TRect(qApp->desktop()->availableGeometry(this));
window->SetExtent(maxExtent.iTl, maxExtent.Size());
} else {
@@ -1143,7 +1140,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
// accurate because it did not consider the status pane. This means that when returning
// normal mode after showing the status pane, the geometry would overlap so we should
// move it if it never had an explicit position.
- if (!wasMoved && statusPane && visible) {
+ if (!wasMoved && S60->statusPane() && visible) {
TPoint tl = static_cast<CEikAppUi*>(S60->appUi())->ClientRect().iTl;
normalGeometry.setTopLeft(QPoint(tl.iX, tl.iY));
}
diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp
index 0f05c6b694..23f57dad24 100644
--- a/src/gui/kernel/qwidget_win.cpp
+++ b/src/gui/kernel/qwidget_win.cpp
@@ -70,6 +70,7 @@
#include "qguifunctions_wince.h"
QT_USE_NAMESPACE
extern void qt_wince_maximize(QWidget *widget); //defined in qguifunctions_wince.cpp
+extern void qt_wince_unmaximize(QWidget *widget); //defined in qguifunctions_wince.cpp
extern void qt_wince_minimize(HWND hwnd); //defined in qguifunctions_wince.cpp
extern void qt_wince_full_screen(HWND hwnd, bool fullScreen, UINT swpf); //defined in qguifunctions_wince.cpp
extern bool qt_wince_is_mobile(); //defined in qguifunctions_wince.cpp
diff --git a/src/gui/kernel/qwidget_wince.cpp b/src/gui/kernel/qwidget_wince.cpp
index fc1e52caf9..76532ed791 100644
--- a/src/gui/kernel/qwidget_wince.cpp
+++ b/src/gui/kernel/qwidget_wince.cpp
@@ -498,6 +498,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
int style = GetWindowLong(internalWinId(), GWL_STYLE) | WS_BORDER | WS_POPUP | WS_CAPTION;
SetWindowLong(internalWinId(), GWL_STYLE, style);
SetWindowLong(internalWinId(), GWL_EXSTYLE, GetWindowLong (internalWinId(), GWL_EXSTYLE) & ~ WS_EX_NODRAG);
+ qt_wince_unmaximize(this);
}
if (isVisible() && newstate & Qt::WindowMaximized)
qt_wince_maximize(this);
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index ca9556b282..4ce2beece8 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -1314,7 +1314,7 @@ static void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint, uint
comp_func_Clear_impl(dest, length, const_alpha);
}
-static void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha)
{
comp_func_Clear_impl(dest, length, const_alpha);
}
@@ -1338,7 +1338,7 @@ static void QT_FASTCALL comp_func_solid_Source(uint *dest, int length, uint colo
}
}
-static void QT_FASTCALL comp_func_Source(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Source(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255) {
::memcpy(dest, src, length * sizeof(uint));
@@ -1356,7 +1356,7 @@ static void QT_FASTCALL comp_func_solid_Destination(uint *, int, uint, uint)
{
}
-static void QT_FASTCALL comp_func_Destination(uint *, const uint *, int, uint)
+void QT_FASTCALL comp_func_Destination(uint *, const uint *, int, uint)
{
}
@@ -1381,7 +1381,7 @@ static void QT_FASTCALL comp_func_solid_SourceOver(uint *dest, int length, uint
}
}
-static void QT_FASTCALL comp_func_SourceOver(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_SourceOver(uint *dest, const uint *src, int length, uint const_alpha)
{
PRELOAD_INIT2(dest, src)
if (const_alpha == 255) {
@@ -1419,7 +1419,7 @@ static void QT_FASTCALL comp_func_solid_DestinationOver(uint *dest, int length,
}
}
-static void QT_FASTCALL comp_func_DestinationOver(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_DestinationOver(uint *dest, const uint *src, int length, uint const_alpha)
{
PRELOAD_INIT2(dest, src)
if (const_alpha == 255) {
@@ -1461,7 +1461,7 @@ static void QT_FASTCALL comp_func_solid_SourceIn(uint *dest, int length, uint co
}
}
-static void QT_FASTCALL comp_func_SourceIn(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_SourceIn(uint *dest, const uint *src, int length, uint const_alpha)
{
PRELOAD_INIT2(dest, src)
if (const_alpha == 255) {
@@ -1498,7 +1498,7 @@ static void QT_FASTCALL comp_func_solid_DestinationIn(uint *dest, int length, ui
}
}
-static void QT_FASTCALL comp_func_DestinationIn(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_DestinationIn(uint *dest, const uint *src, int length, uint const_alpha)
{
PRELOAD_INIT2(dest, src)
if (const_alpha == 255) {
@@ -1540,7 +1540,7 @@ static void QT_FASTCALL comp_func_solid_SourceOut(uint *dest, int length, uint c
}
}
-static void QT_FASTCALL comp_func_SourceOut(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_SourceOut(uint *dest, const uint *src, int length, uint const_alpha)
{
PRELOAD_INIT2(dest, src)
if (const_alpha == 255) {
@@ -1576,7 +1576,7 @@ static void QT_FASTCALL comp_func_solid_DestinationOut(uint *dest, int length, u
}
}
-static void QT_FASTCALL comp_func_DestinationOut(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_DestinationOut(uint *dest, const uint *src, int length, uint const_alpha)
{
PRELOAD_INIT2(dest, src)
if (const_alpha == 255) {
@@ -1613,7 +1613,7 @@ static void QT_FASTCALL comp_func_solid_SourceAtop(uint *dest, int length, uint
}
}
-static void QT_FASTCALL comp_func_SourceAtop(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_SourceAtop(uint *dest, const uint *src, int length, uint const_alpha)
{
PRELOAD_INIT2(dest, src)
if (const_alpha == 255) {
@@ -1653,7 +1653,7 @@ static void QT_FASTCALL comp_func_solid_DestinationAtop(uint *dest, int length,
}
}
-static void QT_FASTCALL comp_func_DestinationAtop(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_DestinationAtop(uint *dest, const uint *src, int length, uint const_alpha)
{
PRELOAD_INIT2(dest, src)
if (const_alpha == 255) {
@@ -1695,7 +1695,7 @@ static void QT_FASTCALL comp_func_solid_XOR(uint *dest, int length, uint color,
}
}
-static void QT_FASTCALL comp_func_XOR(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_XOR(uint *dest, const uint *src, int length, uint const_alpha)
{
PRELOAD_INIT2(dest, src)
if (const_alpha == 255) {
@@ -1715,11 +1715,6 @@ static void QT_FASTCALL comp_func_XOR(uint *dest, const uint *src, int length, u
}
}
-static const uint AMASK = 0xff000000;
-static const uint RMASK = 0x00ff0000;
-static const uint GMASK = 0x0000ff00;
-static const uint BMASK = 0x000000ff;
-
struct QFullCoverage {
inline void store(uint *dest, const uint src) const
{
@@ -1794,7 +1789,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Plus_impl(uint *dest, const uin
}
}
-static void QT_FASTCALL comp_func_Plus(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Plus(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Plus_impl(dest, src, length, QFullCoverage());
@@ -1866,7 +1861,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Multiply_impl(uint *dest, const
}
}
-static void QT_FASTCALL comp_func_Multiply(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Multiply(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Multiply_impl(dest, src, length, QFullCoverage());
@@ -1934,7 +1929,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Screen_impl(uint *dest, const u
}
}
-static void QT_FASTCALL comp_func_Screen(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Screen(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Screen_impl(dest, src, length, QFullCoverage());
@@ -2013,7 +2008,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Overlay_impl(uint *dest, const
}
}
-static void QT_FASTCALL comp_func_Overlay(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Overlay(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Overlay_impl(dest, src, length, QFullCoverage());
@@ -2086,7 +2081,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Darken_impl(uint *dest, const u
}
}
-static void QT_FASTCALL comp_func_Darken(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Darken(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Darken_impl(dest, src, length, QFullCoverage());
@@ -2159,7 +2154,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Lighten_impl(uint *dest, const
}
}
-static void QT_FASTCALL comp_func_Lighten(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Lighten(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Lighten_impl(dest, src, length, QFullCoverage());
@@ -2242,7 +2237,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_ColorDodge_impl(uint *dest, con
}
}
-static void QT_FASTCALL comp_func_ColorDodge(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_ColorDodge(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_ColorDodge_impl(dest, src, length, QFullCoverage());
@@ -2325,7 +2320,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_ColorBurn_impl(uint *dest, cons
}
}
-static void QT_FASTCALL comp_func_ColorBurn(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_ColorBurn(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_ColorBurn_impl(dest, src, length, QFullCoverage());
@@ -2405,7 +2400,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_HardLight_impl(uint *dest, cons
}
}
-static void QT_FASTCALL comp_func_HardLight(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_HardLight(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_HardLight_impl(dest, src, length, QFullCoverage());
@@ -2496,7 +2491,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_SoftLight_impl(uint *dest, cons
}
}
-static void QT_FASTCALL comp_func_SoftLight(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_SoftLight(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_SoftLight_impl(dest, src, length, QFullCoverage());
@@ -2569,7 +2564,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Difference_impl(uint *dest, con
}
}
-static void QT_FASTCALL comp_func_Difference(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Difference(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Difference_impl(dest, src, length, QFullCoverage());
@@ -2636,7 +2631,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Exclusion_impl(uint *dest, cons
}
}
-static void QT_FASTCALL comp_func_Exclusion(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Exclusion(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Exclusion_impl(dest, src, length, QFullCoverage());
@@ -2659,10 +2654,10 @@ static void QT_FASTCALL rasterop_solid_SourceOrDestination(uint *dest,
*dest++ |= color;
}
-static void QT_FASTCALL rasterop_SourceOrDestination(uint *dest,
- const uint *src,
- int length,
- uint const_alpha)
+void QT_FASTCALL rasterop_SourceOrDestination(uint *dest,
+ const uint *src,
+ int length,
+ uint const_alpha)
{
Q_UNUSED(const_alpha);
while (length--)
@@ -2680,10 +2675,10 @@ static void QT_FASTCALL rasterop_solid_SourceAndDestination(uint *dest,
*dest++ &= color;
}
-static void QT_FASTCALL rasterop_SourceAndDestination(uint *dest,
- const uint *src,
- int length,
- uint const_alpha)
+void QT_FASTCALL rasterop_SourceAndDestination(uint *dest,
+ const uint *src,
+ int length,
+ uint const_alpha)
{
Q_UNUSED(const_alpha);
while (length--) {
@@ -2703,10 +2698,10 @@ static void QT_FASTCALL rasterop_solid_SourceXorDestination(uint *dest,
*dest++ ^= color;
}
-static void QT_FASTCALL rasterop_SourceXorDestination(uint *dest,
- const uint *src,
- int length,
- uint const_alpha)
+void QT_FASTCALL rasterop_SourceXorDestination(uint *dest,
+ const uint *src,
+ int length,
+ uint const_alpha)
{
Q_UNUSED(const_alpha);
while (length--) {
@@ -2728,10 +2723,10 @@ static void QT_FASTCALL rasterop_solid_NotSourceAndNotDestination(uint *dest,
}
}
-static void QT_FASTCALL rasterop_NotSourceAndNotDestination(uint *dest,
- const uint *src,
- int length,
- uint const_alpha)
+void QT_FASTCALL rasterop_NotSourceAndNotDestination(uint *dest,
+ const uint *src,
+ int length,
+ uint const_alpha)
{
Q_UNUSED(const_alpha);
while (length--) {
@@ -2753,10 +2748,10 @@ static void QT_FASTCALL rasterop_solid_NotSourceOrNotDestination(uint *dest,
}
}
-static void QT_FASTCALL rasterop_NotSourceOrNotDestination(uint *dest,
- const uint *src,
- int length,
- uint const_alpha)
+void QT_FASTCALL rasterop_NotSourceOrNotDestination(uint *dest,
+ const uint *src,
+ int length,
+ uint const_alpha)
{
Q_UNUSED(const_alpha);
while (length--) {
@@ -2778,10 +2773,10 @@ static void QT_FASTCALL rasterop_solid_NotSourceXorDestination(uint *dest,
}
}
-static void QT_FASTCALL rasterop_NotSourceXorDestination(uint *dest,
- const uint *src,
- int length,
- uint const_alpha)
+void QT_FASTCALL rasterop_NotSourceXorDestination(uint *dest,
+ const uint *src,
+ int length,
+ uint const_alpha)
{
Q_UNUSED(const_alpha);
while (length--) {
@@ -2797,8 +2792,8 @@ static void QT_FASTCALL rasterop_solid_NotSource(uint *dest, int length,
qt_memfill(dest, ~color | 0xff000000, length);
}
-static void QT_FASTCALL rasterop_NotSource(uint *dest, const uint *src,
- int length, uint const_alpha)
+void QT_FASTCALL rasterop_NotSource(uint *dest, const uint *src,
+ int length, uint const_alpha)
{
Q_UNUSED(const_alpha);
while (length--)
@@ -2818,10 +2813,10 @@ static void QT_FASTCALL rasterop_solid_NotSourceAndDestination(uint *dest,
}
}
-static void QT_FASTCALL rasterop_NotSourceAndDestination(uint *dest,
- const uint *src,
- int length,
- uint const_alpha)
+void QT_FASTCALL rasterop_NotSourceAndDestination(uint *dest,
+ const uint *src,
+ int length,
+ uint const_alpha)
{
Q_UNUSED(const_alpha);
while (length--) {
@@ -2842,10 +2837,10 @@ static void QT_FASTCALL rasterop_solid_SourceAndNotDestination(uint *dest,
}
}
-static void QT_FASTCALL rasterop_SourceAndNotDestination(uint *dest,
- const uint *src,
- int length,
- uint const_alpha)
+void QT_FASTCALL rasterop_SourceAndNotDestination(uint *dest,
+ const uint *src,
+ int length,
+ uint const_alpha)
{
Q_UNUSED(const_alpha);
while (length--) {
@@ -7775,6 +7770,7 @@ void qInitDrawhelperAsm()
#ifdef QT_HAVE_MMX
if (features & MMX) {
functionForModeAsm = qt_functionForMode_MMX;
+
functionForModeSolidAsm = qt_functionForModeSolid_MMX;
qDrawHelper[QImage::Format_ARGB32_Premultiplied].blendColor = qt_blend_color_argb_mmx;
#ifdef QT_HAVE_3DNOW
@@ -7823,8 +7819,10 @@ void qInitDrawhelperAsm()
int length,
uint const_alpha);
extern void QT_FASTCALL comp_func_solid_SourceOver_sse2(uint *destPixels, int length, uint color, uint const_alpha);
+ extern void QT_FASTCALL comp_func_Plus_sse2(uint *dst, const uint *src, int length, uint const_alpha);
functionForModeAsm[0] = comp_func_SourceOver_sse2;
+ functionForModeAsm[QPainter::CompositionMode_Plus] = comp_func_Plus_sse2;
functionForModeSolidAsm[0] = comp_func_solid_SourceOver_sse2;
extern void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl,
@@ -7919,17 +7917,8 @@ void qInitDrawhelperAsm()
functionForModeSolid = functionForModeSolidAsm;
}
- if (functionForModeAsm) {
- const int destinationMode = QPainter::CompositionMode_Destination;
- functionForModeAsm[destinationMode] = functionForMode_C[destinationMode];
-
- // use the default qdrawhelper implementation for the
- // extended composition modes
- for (int mode = 12; mode < numCompositionFunctions; ++mode)
- functionForModeAsm[mode] = functionForMode_C[mode];
-
+ if (functionForModeAsm)
functionForMode = functionForModeAsm;
- }
qt_build_pow_tables();
}
diff --git a/src/gui/painting/qdrawhelper_iwmmxt.cpp b/src/gui/painting/qdrawhelper_iwmmxt.cpp
index 80b2c04864..d99045d347 100644
--- a/src/gui/painting/qdrawhelper_iwmmxt.cpp
+++ b/src/gui/painting/qdrawhelper_iwmmxt.cpp
@@ -106,14 +106,35 @@ CompositionFunction qt_functionForMode_IWMMXT[] = {
comp_func_DestinationOver<QIWMMXTIntrinsics>,
comp_func_Clear<QIWMMXTIntrinsics>,
comp_func_Source<QIWMMXTIntrinsics>,
- 0,
+ comp_func_Destination,
comp_func_SourceIn<QIWMMXTIntrinsics>,
comp_func_DestinationIn<QIWMMXTIntrinsics>,
comp_func_SourceOut<QIWMMXTIntrinsics>,
comp_func_DestinationOut<QIWMMXTIntrinsics>,
comp_func_SourceAtop<QIWMMXTIntrinsics>,
comp_func_DestinationAtop<QIWMMXTIntrinsics>,
- comp_func_XOR<QIWMMXTIntrinsics>
+ comp_func_XOR<QIWMMXTIntrinsics>,
+ comp_func_Plus,
+ comp_func_Multiply,
+ comp_func_Screen,
+ comp_func_Overlay,
+ comp_func_Darken,
+ comp_func_Lighten,
+ comp_func_ColorDodge,
+ comp_func_ColorBurn,
+ comp_func_HardLight,
+ comp_func_SoftLight,
+ comp_func_Difference,
+ comp_func_Exclusion,
+ rasterop_SourceOrDestination,
+ rasterop_SourceAndDestination,
+ rasterop_SourceXorDestination,
+ rasterop_NotSourceAndNotDestination,
+ rasterop_NotSourceOrNotDestination,
+ rasterop_NotSourceXorDestination,
+ rasterop_NotSource,
+ rasterop_NotSourceAndDestination,
+ rasterop_SourceAndNotDestination
};
void qt_blend_color_argb_iwmmxt(int count, const QSpan *spans, void *userData)
diff --git a/src/gui/painting/qdrawhelper_mmx.cpp b/src/gui/painting/qdrawhelper_mmx.cpp
index d49c5a12d2..ba92554ef9 100644
--- a/src/gui/painting/qdrawhelper_mmx.cpp
+++ b/src/gui/painting/qdrawhelper_mmx.cpp
@@ -77,7 +77,7 @@ CompositionFunction qt_functionForMode_MMX[numCompositionFunctions] = {
comp_func_DestinationOver<QMMXIntrinsics>,
comp_func_Clear<QMMXIntrinsics>,
comp_func_Source<QMMXIntrinsics>,
- 0,
+ comp_func_Destination,
comp_func_SourceIn<QMMXIntrinsics>,
comp_func_DestinationIn<QMMXIntrinsics>,
comp_func_SourceOut<QMMXIntrinsics>,
@@ -85,6 +85,27 @@ CompositionFunction qt_functionForMode_MMX[numCompositionFunctions] = {
comp_func_SourceAtop<QMMXIntrinsics>,
comp_func_DestinationAtop<QMMXIntrinsics>,
comp_func_XOR<QMMXIntrinsics>,
+ comp_func_Plus,
+ comp_func_Multiply,
+ comp_func_Screen,
+ comp_func_Overlay,
+ comp_func_Darken,
+ comp_func_Lighten,
+ comp_func_ColorDodge,
+ comp_func_ColorBurn,
+ comp_func_HardLight,
+ comp_func_SoftLight,
+ comp_func_Difference,
+ comp_func_Exclusion,
+ rasterop_SourceOrDestination,
+ rasterop_SourceAndDestination,
+ rasterop_SourceXorDestination,
+ rasterop_NotSourceAndNotDestination,
+ rasterop_NotSourceOrNotDestination,
+ rasterop_NotSourceXorDestination,
+ rasterop_NotSource,
+ rasterop_NotSourceAndDestination,
+ rasterop_SourceAndNotDestination
};
void qt_blend_color_argb_mmx(int count, const QSpan *spans, void *userData)
diff --git a/src/gui/painting/qdrawhelper_mmx3dnow.cpp b/src/gui/painting/qdrawhelper_mmx3dnow.cpp
index 8bffaa7a45..b1e81fce4f 100644
--- a/src/gui/painting/qdrawhelper_mmx3dnow.cpp
+++ b/src/gui/painting/qdrawhelper_mmx3dnow.cpp
@@ -85,14 +85,35 @@ CompositionFunction qt_functionForMode_MMX3DNOW[numCompositionFunctions] = {
comp_func_DestinationOver<QMMX3DNOWIntrinsics>,
comp_func_Clear<QMMX3DNOWIntrinsics>,
comp_func_Source<QMMX3DNOWIntrinsics>,
- 0,
+ comp_func_Destination,
comp_func_SourceIn<QMMX3DNOWIntrinsics>,
comp_func_DestinationIn<QMMX3DNOWIntrinsics>,
comp_func_SourceOut<QMMX3DNOWIntrinsics>,
comp_func_DestinationOut<QMMX3DNOWIntrinsics>,
comp_func_SourceAtop<QMMX3DNOWIntrinsics>,
comp_func_DestinationAtop<QMMX3DNOWIntrinsics>,
- comp_func_XOR<QMMX3DNOWIntrinsics>
+ comp_func_XOR<QMMX3DNOWIntrinsics>,
+ comp_func_Plus,
+ comp_func_Multiply,
+ comp_func_Screen,
+ comp_func_Overlay,
+ comp_func_Darken,
+ comp_func_Lighten,
+ comp_func_ColorDodge,
+ comp_func_ColorBurn,
+ comp_func_HardLight,
+ comp_func_SoftLight,
+ comp_func_Difference,
+ comp_func_Exclusion,
+ rasterop_SourceOrDestination,
+ rasterop_SourceAndDestination,
+ rasterop_SourceXorDestination,
+ rasterop_NotSourceAndNotDestination,
+ rasterop_NotSourceOrNotDestination,
+ rasterop_NotSourceXorDestination,
+ rasterop_NotSource,
+ rasterop_NotSourceAndDestination,
+ rasterop_SourceAndNotDestination
};
void qt_blend_color_argb_mmx3dnow(int count, const QSpan *spans, void *userData)
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index 97c78bb0a2..1a87127f38 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -91,6 +91,11 @@ QT_BEGIN_NAMESPACE
# define Q_STATIC_INLINE_FUNCTION static inline
#endif
+static const uint AMASK = 0xff000000;
+static const uint RMASK = 0x00ff0000;
+static const uint GMASK = 0x0000ff00;
+static const uint BMASK = 0x000000ff;
+
/*******************************************************************************
* QSpan
*
@@ -1945,6 +1950,41 @@ const uint qt_bayer_matrix[16][16] = {
((((argb >> 24) * alpha) >> 8) << 24) | (argb & 0x00ffffff)
+// prototypes of all the composition functions
+void QT_FASTCALL comp_func_SourceOver(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_DestinationOver(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Source(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Destination(uint *, const uint *, int, uint);
+void QT_FASTCALL comp_func_SourceIn(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_DestinationIn(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_SourceOut(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_DestinationOut(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_SourceAtop(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_DestinationAtop(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_XOR(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Plus(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Multiply(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Screen(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Overlay(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Darken(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Lighten(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_ColorDodge(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_ColorBurn(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_HardLight(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_SoftLight(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Difference(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Exclusion(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL rasterop_SourceOrDestination(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL rasterop_SourceAndDestination(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL rasterop_SourceXorDestination(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL rasterop_NotSourceAndNotDestination(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL rasterop_NotSourceOrNotDestination(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL rasterop_NotSourceXorDestination(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL rasterop_NotSource(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL rasterop_NotSourceAndDestination(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL rasterop_SourceAndNotDestination(uint *dest, const uint *src, int length, uint const_alpha);
+
QT_END_NAMESPACE
#endif // QDRAWHELPER_P_H
diff --git a/src/gui/painting/qdrawhelper_sse.cpp b/src/gui/painting/qdrawhelper_sse.cpp
index 58a7fdd7db..8b17c29e92 100644
--- a/src/gui/painting/qdrawhelper_sse.cpp
+++ b/src/gui/painting/qdrawhelper_sse.cpp
@@ -77,14 +77,35 @@ CompositionFunction qt_functionForMode_SSE[numCompositionFunctions] = {
comp_func_DestinationOver<QSSEIntrinsics>,
comp_func_Clear<QSSEIntrinsics>,
comp_func_Source<QSSEIntrinsics>,
- 0,
+ comp_func_Destination,
comp_func_SourceIn<QSSEIntrinsics>,
comp_func_DestinationIn<QSSEIntrinsics>,
comp_func_SourceOut<QSSEIntrinsics>,
comp_func_DestinationOut<QSSEIntrinsics>,
comp_func_SourceAtop<QSSEIntrinsics>,
comp_func_DestinationAtop<QSSEIntrinsics>,
- comp_func_XOR<QSSEIntrinsics>
+ comp_func_XOR<QSSEIntrinsics>,
+ comp_func_Plus,
+ comp_func_Multiply,
+ comp_func_Screen,
+ comp_func_Overlay,
+ comp_func_Darken,
+ comp_func_Lighten,
+ comp_func_ColorDodge,
+ comp_func_ColorBurn,
+ comp_func_HardLight,
+ comp_func_SoftLight,
+ comp_func_Difference,
+ comp_func_Exclusion,
+ rasterop_SourceOrDestination,
+ rasterop_SourceAndDestination,
+ rasterop_SourceXorDestination,
+ rasterop_NotSourceAndNotDestination,
+ rasterop_NotSourceOrNotDestination,
+ rasterop_NotSourceXorDestination,
+ rasterop_NotSource,
+ rasterop_NotSourceAndDestination,
+ rasterop_SourceAndNotDestination
};
void qt_blend_color_argb_sse(int count, const QSpan *spans, void *userData)
diff --git a/src/gui/painting/qdrawhelper_sse2.cpp b/src/gui/painting/qdrawhelper_sse2.cpp
index 346e177ecc..e090ae5f8c 100644
--- a/src/gui/painting/qdrawhelper_sse2.cpp
+++ b/src/gui/painting/qdrawhelper_sse2.cpp
@@ -110,13 +110,23 @@ void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl,
const __m128i oneMinusConstAlpha = _mm_set1_epi16(one_minus_const_alpha);
for (int y = 0; y < h; ++y) {
int x = 0;
+
+ // First, align dest to 16 bytes:
+ const int offsetToAlignOn16Bytes = (4 - ((reinterpret_cast<quintptr>(dst) >> 2) & 0x3)) & 0x3;
+ const int prologLength = qMin(w, offsetToAlignOn16Bytes);
+ for (; x < prologLength; ++x) {
+ quint32 s = src[x];
+ s = BYTE_MUL(s, const_alpha);
+ dst[x] = INTERPOLATE_PIXEL_255(src[x], const_alpha, dst[x], one_minus_const_alpha);
+ }
+
for (; x < w-3; x += 4) {
__m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]);
if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVector, nullVector)) != 0xffff) {
- const __m128i dstVector = _mm_loadu_si128((__m128i *)&dst[x]);
+ const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]);
__m128i result;
INTERPOLATE_PIXEL_255_SSE2(result, srcVector, dstVector, constAlphaVector, oneMinusConstAlpha, colorMask, half);
- _mm_storeu_si128((__m128i *)&dst[x], result);
+ _mm_store_si128((__m128i *)&dst[x], result);
}
}
for (; x<w; ++x) {
@@ -135,7 +145,6 @@ void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl,
void QT_FASTCALL comp_func_SourceOver_sse2(uint *destPixels, const uint *srcPixels, int length, uint const_alpha)
{
- Q_ASSERT(const_alpha >= 0);
Q_ASSERT(const_alpha < 256);
const quint32 *src = (const quint32 *) srcPixels;
@@ -154,6 +163,72 @@ void QT_FASTCALL comp_func_SourceOver_sse2(uint *destPixels, const uint *srcPixe
}
}
+inline int comp_func_Plus_one_pixel_const_alpha(uint d, const uint s, const uint const_alpha, const uint one_minus_const_alpha)
+{
+#define MIX(mask) (qMin(((qint64(s)&mask) + (qint64(d)&mask)), qint64(mask)))
+ const int result = (MIX(AMASK) | MIX(RMASK) | MIX(GMASK) | MIX(BMASK));
+#undef MIX
+ return INTERPOLATE_PIXEL_255(result, const_alpha, d, one_minus_const_alpha);
+}
+
+inline int comp_func_Plus_one_pixel(uint d, const uint s)
+{
+#define MIX(mask) (qMin(((qint64(s)&mask) + (qint64(d)&mask)), qint64(mask)))
+ const int result = (MIX(AMASK) | MIX(RMASK) | MIX(GMASK) | MIX(BMASK));
+#undef MIX
+ return result;
+}
+
+void QT_FASTCALL comp_func_Plus_sse2(uint *dst, const uint *src, int length, uint const_alpha)
+{
+ int x = 0;
+ const int offsetToAlignOn16Bytes = (4 - ((reinterpret_cast<quintptr>(dst) >> 2) & 0x3)) & 0x3;
+ const int prologLength = qMin(length, offsetToAlignOn16Bytes);
+
+ if (const_alpha == 255) {
+ // 1) Prologue: align destination on 16 bytes
+ for (; x < prologLength; ++x)
+ dst[x] = comp_func_Plus_one_pixel(dst[x], src[x]);
+
+ // 2) composition with SSE2
+ for (; x < length - 3; x += 4) {
+ const __m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]);
+ const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]);
+
+ const __m128i result = _mm_adds_epu8(srcVector, dstVector);
+ _mm_store_si128((__m128i *)&dst[x], result);
+ }
+
+ // 3) Epilogue:
+ for (; x < length; ++x)
+ dst[x] = comp_func_Plus_one_pixel(dst[x], src[x]);
+ } else {
+ const int one_minus_const_alpha = 255 - const_alpha;
+ const __m128i constAlphaVector = _mm_set1_epi16(const_alpha);
+ const __m128i oneMinusConstAlpha = _mm_set1_epi16(one_minus_const_alpha);
+
+ // 1) Prologue: align destination on 16 bytes
+ for (; x < prologLength; ++x)
+ dst[x] = comp_func_Plus_one_pixel_const_alpha(dst[x], src[x], const_alpha, one_minus_const_alpha);
+
+ const __m128i half = _mm_set1_epi16(0x80);
+ const __m128i colorMask = _mm_set1_epi32(0x00ff00ff);
+ // 2) composition with SSE2
+ for (; x < length - 3; x += 4) {
+ const __m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]);
+ const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]);
+
+ __m128i result = _mm_adds_epu8(srcVector, dstVector);
+ INTERPOLATE_PIXEL_255_SSE2(result, result, dstVector, constAlphaVector, oneMinusConstAlpha, colorMask, half)
+ _mm_store_si128((__m128i *)&dst[x], result);
+ }
+
+ // 3) Epilogue:
+ for (; x < length; ++x)
+ dst[x] = comp_func_Plus_one_pixel_const_alpha(dst[x], src[x], const_alpha, one_minus_const_alpha);
+ }
+}
+
void qt_memfill32_sse2(quint32 *dest, quint32 value, int count)
{
if (count < 7) {
diff --git a/src/gui/painting/qdrawhelper_sse3dnow.cpp b/src/gui/painting/qdrawhelper_sse3dnow.cpp
index c58cf13c5c..9ae0e0792b 100644
--- a/src/gui/painting/qdrawhelper_sse3dnow.cpp
+++ b/src/gui/painting/qdrawhelper_sse3dnow.cpp
@@ -85,14 +85,35 @@ CompositionFunction qt_functionForMode_SSE3DNOW[numCompositionFunctions] = {
comp_func_DestinationOver<QSSE3DNOWIntrinsics>,
comp_func_Clear<QSSE3DNOWIntrinsics>,
comp_func_Source<QSSE3DNOWIntrinsics>,
- 0,
+ comp_func_Destination,
comp_func_SourceIn<QSSE3DNOWIntrinsics>,
comp_func_DestinationIn<QSSE3DNOWIntrinsics>,
comp_func_SourceOut<QSSE3DNOWIntrinsics>,
comp_func_DestinationOut<QSSE3DNOWIntrinsics>,
comp_func_SourceAtop<QSSE3DNOWIntrinsics>,
comp_func_DestinationAtop<QSSE3DNOWIntrinsics>,
- comp_func_XOR<QSSE3DNOWIntrinsics>
+ comp_func_XOR<QSSE3DNOWIntrinsics>,
+ comp_func_Plus,
+ comp_func_Multiply,
+ comp_func_Screen,
+ comp_func_Overlay,
+ comp_func_Darken,
+ comp_func_Lighten,
+ comp_func_ColorDodge,
+ comp_func_ColorBurn,
+ comp_func_HardLight,
+ comp_func_SoftLight,
+ comp_func_Difference,
+ comp_func_Exclusion,
+ rasterop_SourceOrDestination,
+ rasterop_SourceAndDestination,
+ rasterop_SourceXorDestination,
+ rasterop_NotSourceAndNotDestination,
+ rasterop_NotSourceOrNotDestination,
+ rasterop_NotSourceXorDestination,
+ rasterop_NotSource,
+ rasterop_NotSourceAndDestination,
+ rasterop_SourceAndNotDestination
};
void qt_blend_color_argb_sse3dnow(int count, const QSpan *spans, void *userData)
diff --git a/src/gui/painting/qdrawingprimitive_sse2_p.h b/src/gui/painting/qdrawingprimitive_sse2_p.h
index 3c9694644d..18355c278b 100644
--- a/src/gui/painting/qdrawingprimitive_sse2_p.h
+++ b/src/gui/painting/qdrawingprimitive_sse2_p.h
@@ -141,12 +141,24 @@ QT_BEGIN_NAMESPACE
// with shortcuts if fully opaque or fully transparent.
#define BLEND_SOURCE_OVER_ARGB32_SSE2(dst, src, length, nullVector, half, one, colorMask, alphaMask) { \
int x = 0; \
+\
+ /* First, get dst aligned. */ \
+ const int offsetToAlignOn16Bytes = (4 - ((reinterpret_cast<quintptr>(dst) >> 2) & 0x3)) & 0x3;\
+ const int prologLength = qMin(length, offsetToAlignOn16Bytes);\
+ for (; x < prologLength; ++x) { \
+ uint s = src[x]; \
+ if (s >= 0xff000000) \
+ dst[x] = s; \
+ else if (s != 0) \
+ dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s)); \
+ } \
+\
for (; x < length-3; x += 4) { \
const __m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]); \
const __m128i srcVectorAlpha = _mm_and_si128(srcVector, alphaMask); \
if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVectorAlpha, alphaMask)) == 0xffff) { \
/* all opaque */ \
- _mm_storeu_si128((__m128i *)&dst[x], srcVector); \
+ _mm_store_si128((__m128i *)&dst[x], srcVector); \
} else if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVectorAlpha, nullVector)) != 0xffff) { \
/* not fully transparent */ \
/* extract the alpha channel on 2 x 16 bits */ \
@@ -157,13 +169,13 @@ QT_BEGIN_NAMESPACE
alphaChannel = _mm_or_si128(alphaChannel, _mm_slli_epi32(alphaChannel, 16)); \
alphaChannel = _mm_sub_epi16(one, alphaChannel); \
\
- const __m128i dstVector = _mm_loadu_si128((__m128i *)&dst[x]); \
+ const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]); \
__m128i destMultipliedByOneMinusAlpha; \
BYTE_MUL_SSE2(destMultipliedByOneMinusAlpha, dstVector, alphaChannel, colorMask, half); \
\
/* result = s + d * (1-alpha) */\
const __m128i result = _mm_add_epi8(srcVector, destMultipliedByOneMinusAlpha); \
- _mm_storeu_si128((__m128i *)&dst[x], result); \
+ _mm_store_si128((__m128i *)&dst[x], result); \
} \
} \
for (; x < length; ++x) { \
@@ -189,6 +201,17 @@ QT_BEGIN_NAMESPACE
#define BLEND_SOURCE_OVER_ARGB32_WITH_CONST_ALPHA_SSE2(dst, src, length, nullVector, half, one, colorMask, constAlphaVector) \
{ \
int x = 0; \
+\
+ const int offsetToAlignOn16Bytes = (4 - ((reinterpret_cast<quintptr>(dst) >> 2) & 0x3)) & 0x3;\
+ const int prologLength = qMin(length, offsetToAlignOn16Bytes);\
+ for (; x < prologLength; ++x) { \
+ quint32 s = src[x]; \
+ if (s != 0) { \
+ s = BYTE_MUL(s, const_alpha); \
+ dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s)); \
+ } \
+ } \
+\
for (; x < length-3; x += 4) { \
__m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]); \
if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVector, nullVector)) != 0xffff) { \
@@ -198,12 +221,12 @@ QT_BEGIN_NAMESPACE
alphaChannel = _mm_or_si128(alphaChannel, _mm_slli_epi32(alphaChannel, 16)); \
alphaChannel = _mm_sub_epi16(one, alphaChannel); \
\
- const __m128i dstVector = _mm_loadu_si128((__m128i *)&dst[x]); \
+ const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]); \
__m128i destMultipliedByOneMinusAlpha; \
BYTE_MUL_SSE2(destMultipliedByOneMinusAlpha, dstVector, alphaChannel, colorMask, half); \
\
const __m128i result = _mm_add_epi8(srcVector, destMultipliedByOneMinusAlpha); \
- _mm_storeu_si128((__m128i *)&dst[x], result); \
+ _mm_store_si128((__m128i *)&dst[x], result); \
} \
} \
for (; x < length; ++x) { \
diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp
index 910b2df3d7..e521e018c3 100644
--- a/src/gui/painting/qpaintengine_x11.cpp
+++ b/src/gui/painting/qpaintengine_x11.cpp
@@ -696,11 +696,10 @@ void QX11PaintEngine::drawLines(const QLine *lines, int lineCount)
linef = d->matrix.map(QLineF(lines[i]));
}
if (clipLine(&linef, d->polygonClipper.boundingRect())) {
- int x1 = qRound(linef.x1() + aliasedCoordinateDelta);
- int y1 = qRound(linef.y1() + aliasedCoordinateDelta);
- int x2 = qRound(linef.x2() + aliasedCoordinateDelta);
- int y2 = qRound(linef.y2() + aliasedCoordinateDelta);
-
+ int x1 = qFloor(linef.x1() + aliasedCoordinateDelta);
+ int y1 = qFloor(linef.y1() + aliasedCoordinateDelta);
+ int x2 = qFloor(linef.x2() + aliasedCoordinateDelta);
+ int y2 = qFloor(linef.y2() + aliasedCoordinateDelta);
XDrawLine(d->dpy, d->hd, d->gc, x1, y1, x2, y2);
}
}
@@ -730,11 +729,10 @@ void QX11PaintEngine::drawLines(const QLineF *lines, int lineCount)
for (int i = 0; i < lineCount; ++i) {
QLineF linef = d->matrix.map(lines[i]);
if (clipLine(&linef, d->polygonClipper.boundingRect())) {
- int x1 = qRound(linef.x1() + aliasedCoordinateDelta);
- int y1 = qRound(linef.y1() + aliasedCoordinateDelta);
- int x2 = qRound(linef.x2() + aliasedCoordinateDelta);
- int y2 = qRound(linef.y2() + aliasedCoordinateDelta);
-
+ int x1 = qFloor(linef.x1() + aliasedCoordinateDelta);
+ int y1 = qFloor(linef.y1() + aliasedCoordinateDelta);
+ int x2 = qFloor(linef.x2() + aliasedCoordinateDelta);
+ int y2 = qFloor(linef.y2() + aliasedCoordinateDelta);
XDrawLine(d->dpy, d->hd, d->gc, x1, y1, x2, y2);
}
}
@@ -1690,8 +1688,8 @@ void QX11PaintEnginePrivate::strokePolygon_dev(const QPointF *polygonPoints, int
if (clippedCount > 0) {
QVarLengthArray<XPoint> xpoints(clippedCount);
for (int i = 0; i < clippedCount; ++i) {
- xpoints[i].x = qRound(clippedPoints[i].x + aliasedCoordinateDelta);
- xpoints[i].y = qRound(clippedPoints[i].y + aliasedCoordinateDelta);
+ xpoints[i].x = qFloor(clippedPoints[i].x + aliasedCoordinateDelta);
+ xpoints[i].y = qFloor(clippedPoints[i].y + aliasedCoordinateDelta);
}
uint numberPoints = qMin(clippedCount, xlibMaxLinePoints);
XPoint *pts = xpoints.data();
diff --git a/src/gui/painting/qrgb.h b/src/gui/painting/qrgb.h
index 8e635a8a51..ea5f3530df 100644
--- a/src/gui/painting/qrgb.h
+++ b/src/gui/painting/qrgb.h
@@ -64,7 +64,7 @@ Q_GUI_EXPORT_INLINE int qBlue(QRgb rgb) // get blue part of RGB
{ return (rgb & 0xff); }
Q_GUI_EXPORT_INLINE int qAlpha(QRgb rgb) // get alpha part of RGBA
-{ return ((rgb >> 24) & 0xff); }
+{ return rgb >> 24; }
Q_GUI_EXPORT_INLINE QRgb qRgb(int r, int g, int b)// set RGB value
{ return (0xffu << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); }
diff --git a/src/gui/styles/qstyle.cpp b/src/gui/styles/qstyle.cpp
index 4cfa93f88f..687e587365 100644
--- a/src/gui/styles/qstyle.cpp
+++ b/src/gui/styles/qstyle.cpp
@@ -2421,9 +2421,10 @@ QT_BEGIN_INCLUDE_NAMESPACE
#include <QDebug>
QT_END_INCLUDE_NAMESPACE
+#if !defined(QT_NO_DEBUG_STREAM)
QDebug operator<<(QDebug debug, QStyle::State state)
{
-#if !defined(QT_NO_DEBUG) && !defined(QT_NO_DEBUG_STREAM)
+#if !defined(QT_NO_DEBUG)
debug << "QStyle::State(";
QStringList states;
@@ -2458,6 +2459,7 @@ QDebug operator<<(QDebug debug, QStyle::State state)
#endif
return debug;
}
+#endif
/*!
\since 4.6
diff --git a/src/gui/styles/qstyle.h b/src/gui/styles/qstyle.h
index 439d62618a..439901a8f9 100644
--- a/src/gui/styles/qstyle.h
+++ b/src/gui/styles/qstyle.h
@@ -878,7 +878,9 @@ private:
Q_DECLARE_OPERATORS_FOR_FLAGS(QStyle::State)
Q_DECLARE_OPERATORS_FOR_FLAGS(QStyle::SubControls)
+#if !defined(QT_NO_DEBUG_STREAM)
Q_GUI_EXPORT QDebug operator<<(QDebug debug, QStyle::State state);
+#endif
QT_END_NAMESPACE
diff --git a/src/gui/styles/qstyleoption.cpp b/src/gui/styles/qstyleoption.cpp
index c057a2b2ea..4780edfbc0 100644
--- a/src/gui/styles/qstyleoption.cpp
+++ b/src/gui/styles/qstyleoption.cpp
@@ -5419,9 +5419,10 @@ QStyleHintReturnVariant::QStyleHintReturnVariant() : QStyleHintReturn(Version, T
Returns a T or 0 depending on the type of \a hint.
*/
+#if !defined(QT_NO_DEBUG_STREAM)
QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType)
{
-#if !defined(QT_NO_DEBUG) && !defined(QT_NO_DEBUG_STREAM)
+#if !defined(QT_NO_DEBUG)
switch (optionType) {
case QStyleOption::SO_Default:
debug << "SO_Default"; break;
@@ -5488,7 +5489,7 @@ QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType)
QDebug operator<<(QDebug debug, const QStyleOption &option)
{
-#if !defined(QT_NO_DEBUG) && !defined(QT_NO_DEBUG_STREAM)
+#if !defined(QT_NO_DEBUG)
debug << "QStyleOption(";
debug << QStyleOption::OptionType(option.type);
debug << ',' << (option.direction == Qt::RightToLeft ? "RightToLeft" : "LeftToRight");
@@ -5498,5 +5499,6 @@ QDebug operator<<(QDebug debug, const QStyleOption &option)
#endif
return debug;
}
+#endif
QT_END_NAMESPACE
diff --git a/src/gui/styles/qstyleoption.h b/src/gui/styles/qstyleoption.h
index 95de8d50ac..e79d9a4203 100644
--- a/src/gui/styles/qstyleoption.h
+++ b/src/gui/styles/qstyleoption.h
@@ -958,8 +958,10 @@ T qstyleoption_cast(QStyleHintReturn *hint)
return 0;
}
+#if !defined(QT_NO_DEBUG_STREAM)
Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType);
Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QStyleOption &option);
+#endif
QT_END_NAMESPACE
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index 43fa4b986c..dff525effe 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -4283,6 +4283,13 @@ void QStyleSheetStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *op
}
break;
+ case PE_FrameMenu:
+ if (rule.hasDrawable()) {
+ // Drawn by PE_PanelMenu
+ return;
+ }
+ break;
+
case PE_PanelMenuBar:
if (rule.hasDrawable()) {
// Drawn by PE_Widget
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp
index f691413da5..52a1fe70b1 100644
--- a/src/gui/text/qfontengine_s60.cpp
+++ b/src/gui/text/qfontengine_s60.cpp
@@ -94,7 +94,7 @@ bool QSymbianTypeFaceExtras::getSfntTableData(uint tag, uchar *buffer, uint *len
} else {
*length = tableByteLength;
if (buffer)
- qMemCopy(buffer, fontTable.TableContent(), tableByteLength);
+ memcpy(buffer, fontTable.TableContent(), tableByteLength);
}
fontTable.Close();
@@ -146,7 +146,7 @@ bool QSymbianTypeFaceExtras::getSfntTableData(uint tag, uchar *buffer, uint *len
} else {
*length = tableByteLength;
if (buffer)
- qMemCopy(buffer, table, tableByteLength);
+ memcpy(buffer, table, tableByteLength);
}
m_trueTypeExtension->ReleaseTrueTypeTable(table);
@@ -374,7 +374,10 @@ glyph_metrics_t QFontEngineS60::boundingBox(glyph_t glyph)
QFixed QFontEngineS60::ascent() const
{
- return m_originalFont->FontMaxAscent();
+ // Workaround for QTBUG-8013
+ // Stroke based fonts may return an incorrect FontMaxAscent of 0.
+ const QFixed ascent = m_originalFont->FontMaxAscent();
+ return (ascent > 0) ? ascent : QFixed::fromReal(m_originalFontSizeInPixels) - descent();
}
QFixed QFontEngineS60::descent() const
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index 91a6612baf..7396bcd99f 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -148,9 +148,7 @@ QStaticText::QStaticText()
}
/*!
- Constructs a QStaticText object with the given \a text and bounded by the given \a size.
-
- If an invalid size is passed for \a size the text will be unbounded.
+ Constructs a QStaticText object with the given \a text.
*/
QStaticText::QStaticText(const QString &text)
: data(new QStaticTextPrivate)
@@ -465,16 +463,21 @@ namespace {
m_chars.resize(m_chars.size() + ti.num_chars);
glyph_t *glyphsDestination = m_glyphs.data() + currentItem.glyphOffset;
- qMemCopy(glyphsDestination, glyphs.constData(), sizeof(glyph_t) * currentItem.numGlyphs);
+ memcpy(glyphsDestination, glyphs.constData(), sizeof(glyph_t) * currentItem.numGlyphs);
QFixedPoint *positionsDestination = m_positions.data() + currentItem.positionOffset;
- qMemCopy(positionsDestination, positions.constData(), sizeof(QFixedPoint) * currentItem.numGlyphs);
+ memcpy(positionsDestination, positions.constData(), sizeof(QFixedPoint) * currentItem.numGlyphs);
QChar *charsDestination = m_chars.data() + currentItem.charOffset;
- qMemCopy(charsDestination, ti.chars, sizeof(QChar) * currentItem.numChars);
+ memcpy(charsDestination, ti.chars, sizeof(QChar) * currentItem.numChars);
m_items.append(currentItem);
- }
+ }
+
+ virtual void drawPolygon(const QPointF *, int , PolygonDrawMode )
+ {
+ /* intentionally empty */
+ }
virtual bool begin(QPaintDevice *) { return true; }
virtual bool end() { return true; }
@@ -681,13 +684,13 @@ void QStaticTextPrivate::init()
items = new QStaticTextItem[itemCount];
glyphPool = new glyph_t[glyphs.size()];
- qMemCopy(glyphPool, glyphs.constData(), glyphs.size() * sizeof(glyph_t));
+ memcpy(glyphPool, glyphs.constData(), glyphs.size() * sizeof(glyph_t));
positionPool = new QFixedPoint[positions.size()];
- qMemCopy(positionPool, positions.constData(), positions.size() * sizeof(QFixedPoint));
+ memcpy(positionPool, positions.constData(), positions.size() * sizeof(QFixedPoint));
charPool = new QChar[chars.size()];
- qMemCopy(charPool, chars.constData(), chars.size() * sizeof(QChar));
+ memcpy(charPool, chars.constData(), chars.size() * sizeof(QChar));
for (int i=0; i<itemCount; ++i) {
items[i] = deviceItems.at(i);
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
index daa40a1aac..769ab2fb66 100644
--- a/src/gui/text/qtextcursor.cpp
+++ b/src/gui/text/qtextcursor.cpp
@@ -1283,7 +1283,7 @@ void QTextCursor::setVisualNavigation(bool b)
/*!
\since 4.7
- Sets the visual x position for vertical cursor movements.
+ Sets the visual x position for vertical cursor movements to \a x.
The vertical movement x position is cleared automatically when the cursor moves horizontally, and kept
unchanged when the cursor moves vertically. The mechanism allows the cursor to move up and down on a
@@ -1335,8 +1335,8 @@ bool QTextCursor::keepPositionOnInsert() const
Defines whether the cursor should keep its current position when text gets inserted at the current position of the
cursor.
- If \b is true, the cursor keeps its current position when text gets inserted at the positing of the cursor.
- If \b is false, the cursor moves along with the inserted text.
+ If \a b is true, the cursor keeps its current position when text gets inserted at the positing of the cursor.
+ If \a b is false, the cursor moves along with the inserted text.
The default is false.
diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp
index 7b3f9853c9..213db7ed9f 100644
--- a/src/gui/text/qtextdocument_p.cpp
+++ b/src/gui/text/qtextdocument_p.cpp
@@ -1649,7 +1649,7 @@ void QTextDocumentPrivate::compressPieceTable()
int newLen = 0;
for (FragmentMap::Iterator it = fragments.begin(); !it.atEnd(); ++it) {
- qMemCopy(newTextPtr, text.constData() + it->stringPosition, it->size_array[0] * sizeof(QChar));
+ memcpy(newTextPtr, text.constData() + it->stringPosition, it->size_array[0] * sizeof(QChar));
it->stringPosition = newLen;
newTextPtr += it->size_array[0];
newLen += it->size_array[0];
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index d6535ea16d..674064e5fd 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -1935,7 +1935,7 @@ void QTextLine::layout_helper(int maxGlyphs)
// We ignore the right bearing if the minimum negative bearing is too little to
// expand the text beyond the edge.
if (sb_or_ws|breakany) {
- if (lbh.calculateNewWidth(line) + lbh.minimumRightBearing > line.width)
+ if (lbh.calculateNewWidth(line) - lbh.minimumRightBearing > line.width)
lbh.adjustRightBearing();
if (lbh.checkFullOtherwiseExtend(line)) {
if (!breakany) {
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp
index f386871d5e..5fb3384d51 100644
--- a/src/gui/text/qtextobject.cpp
+++ b/src/gui/text/qtextobject.cpp
@@ -1148,7 +1148,7 @@ int QTextBlock::charFormatIndex() const
direction from the blocks content. Returns either Qt::LeftToRight
or Qt::RightToLeft.
- \sa QTextBlock::layoutDirection(), QString::isRightToLeft(), Qt::LayoutDirection
+ \sa QTextFormat::layoutDirection(), QString::isRightToLeft(), Qt::LayoutDirection
*/
Qt::LayoutDirection QTextBlock::textDirection() const
{
diff --git a/src/gui/text/qtextoption.cpp b/src/gui/text/qtextoption.cpp
index 8f31e4603a..9eeec0bfae 100644
--- a/src/gui/text/qtextoption.cpp
+++ b/src/gui/text/qtextoption.cpp
@@ -392,7 +392,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
+
+ Creates a tab with the given position, tab type, and delimiter
+ (\a pos, \a tabType, \a delim).
+
+ \note \a delim is only used when \a tabType is DelimiterTab.
+
\since 4.7
*/
diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp
index 5100176bad..c291f25ff8 100644
--- a/src/gui/text/qtexttable.cpp
+++ b/src/gui/text/qtexttable.cpp
@@ -754,19 +754,39 @@ void QTextTable::insertColumns(int pos, int num)
QTextFormatCollection *c = p->formatCollection();
p->beginEditBlock();
+ QList<int> extendedSpans;
for (int i = 0; i < d->nRows; ++i) {
int cell;
if (i == d->nRows - 1 && pos == d->nCols)
cell = d->fragment_end;
else
cell = d->grid[i*d->nCols + pos];
- QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), cell);
- QTextCharFormat fmt = c->charFormat(it->format);
if (pos > 0 && pos < d->nCols && cell == d->grid[i*d->nCols + pos - 1]) {
// cell spans the insertion place, extend it
- fmt.setTableCellColumnSpan(fmt.tableCellColumnSpan() + num);
- p->setCharFormat(it.position(), 1, fmt);
+ if (!extendedSpans.contains(cell)) {
+ QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), cell);
+ QTextCharFormat fmt = c->charFormat(it->format);
+ fmt.setTableCellColumnSpan(fmt.tableCellColumnSpan() + num);
+ p->setCharFormat(it.position(), 1, fmt);
+ d->dirty = true;
+ extendedSpans << cell;
+ }
} else {
+ /* If the next cell is spanned from the row above, we need to find the right position
+ to insert to */
+ if (i > 0 && pos < d->nCols && cell == d->grid[(i-1) * d->nCols + pos]) {
+ int gridIndex = i*d->nCols + pos;
+ const int gridEnd = d->nRows * d->nCols - 1;
+ while (gridIndex < gridEnd && cell == d->grid[gridIndex]) {
+ ++gridIndex;
+ }
+ if (gridIndex == gridEnd)
+ cell = d->fragment_end;
+ else
+ cell = d->grid[gridIndex];
+ }
+ QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), cell);
+ QTextCharFormat fmt = c->charFormat(it->format);
fmt.setTableCellRowSpan(1);
fmt.setTableCellColumnSpan(1);
Q_ASSERT(fmt.objectIndex() == objectIndex());
@@ -915,12 +935,13 @@ void QTextTable::removeColumns(int pos, int num)
for (int r = 0; r < d->nRows; ++r) {
for (int c = pos; c < pos + num; ++c) {
int cell = d->grid[r*d->nCols + c];
- if (touchedCells.contains(cell))
- continue;
- touchedCells << cell;
QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), cell);
QTextCharFormat fmt = collection->charFormat(it->format);
int span = fmt.tableCellColumnSpan();
+ if (touchedCells.contains(cell) && span <= 1)
+ continue;
+ touchedCells << cell;
+
if (span > 1) {
fmt.setTableCellColumnSpan(span - 1);
p->setCharFormat(it.position(), 1, fmt);
diff --git a/src/gui/text/text.pri b/src/gui/text/text.pri
index 04ab7df078..1040ad81a8 100644
--- a/src/gui/text/text.pri
+++ b/src/gui/text/text.pri
@@ -210,8 +210,6 @@ contains(QT_CONFIG, freetype) {
# pull in the proper freetype2 include directory
include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri)
LIBS_PRIVATE += -lfreetype
-} else {
- DEFINES *= QT_NO_FREETYPE
}
contains(QT_CONFIG, fontconfig) {
diff --git a/src/gui/util/qcompleter.cpp b/src/gui/util/qcompleter.cpp
index 1abc2d9250..04d6de937f 100644
--- a/src/gui/util/qcompleter.cpp
+++ b/src/gui/util/qcompleter.cpp
@@ -154,6 +154,7 @@
#include "QtGui/qevent.h"
#include "QtGui/qheaderview.h"
#include "QtGui/qdesktopwidget.h"
+#include "QtGui/qlineedit.h"
QT_BEGIN_NAMESPACE
@@ -920,8 +921,9 @@ void QCompleterPrivate::showPopup(const QRect& rect)
void QCompleterPrivate::_q_fileSystemModelDirectoryLoaded(const QString &path)
{
Q_Q(QCompleter);
+ QLineEdit *lineEdit = qobject_cast<QLineEdit *>(widget);
//the path given by QFileSystemModel does not end with /
- if (!q->completionPrefix().isEmpty() && q->completionPrefix() != path + QLatin1Char('/'))
+ if (lineEdit && !lineEdit->text().isEmpty() && !q->completionPrefix().isEmpty() && q->completionPrefix() != path + QLatin1Char('/'))
q->complete();
}
diff --git a/src/gui/util/qdesktopservices_x11.cpp b/src/gui/util/qdesktopservices_x11.cpp
index fe7f9a6be2..75e7209e1b 100644
--- a/src/gui/util/qdesktopservices_x11.cpp
+++ b/src/gui/util/qdesktopservices_x11.cpp
@@ -71,10 +71,12 @@ static bool openDocument(const QUrl &url)
if (launch(url, QLatin1String("xdg-open")))
return true;
- if (X11->desktopEnvironment == DE_GNOME && launch(url, QLatin1String("gnome-open"))) {
+ // Use the X11->desktopEnvironment value if X11 is non-NULL,
+ // otherwise just attempt to launch command regardless of the desktop environment
+ if ((!X11 || (X11 && X11->desktopEnvironment == DE_GNOME)) && launch(url, QLatin1String("gnome-open"))) {
return true;
} else {
- if (X11->desktopEnvironment == DE_KDE && launch(url, QLatin1String("kfmclient exec")))
+ if ((!X11 || (X11 && X11->desktopEnvironment == DE_KDE)) && launch(url, QLatin1String("kfmclient exec")))
return true;
}
@@ -104,10 +106,12 @@ static bool launchWebBrowser(const QUrl &url)
if (launch(url, QString::fromLocal8Bit(getenv("BROWSER"))))
return true;
- if (X11->desktopEnvironment == DE_GNOME && launch(url, QLatin1String("gnome-open"))) {
+ // Use the X11->desktopEnvironment value if X11 is non-NULL,
+ // otherwise just attempt to launch command regardless of the desktop environment
+ if ((!X11 || (X11 && X11->desktopEnvironment == DE_GNOME)) && launch(url, QLatin1String("gnome-open"))) {
return true;
} else {
- if (X11->desktopEnvironment == DE_KDE && launch(url, QLatin1String("kfmclient openURL")))
+ if ((!X11 || (X11 && X11->desktopEnvironment == DE_KDE)) && launch(url, QLatin1String("kfmclient openURL")))
return true;
}
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index 1bffde16f9..981e934ecf 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -1663,8 +1663,11 @@ void QLineEdit::keyPressEvent(QKeyEvent *event)
}
#endif
d->control->processKeyEvent(event);
- if (event->isAccepted())
+ if (event->isAccepted()) {
+ if (layoutDirection() != d->control->layoutDirection())
+ setLayoutDirection(d->control->layoutDirection());
d->control->setCursorBlinkPeriod(0);
+ }
}
/*!
@@ -1946,7 +1949,8 @@ void QLineEdit::paintEvent(QPaintEvent *)
if (d->control->hasSelectedText() || (d->cursorVisible && !d->control->inputMask().isEmpty() && !d->control->isReadOnly())){
flags |= QLineControl::DrawSelections;
// Palette only used for selections/mask and may not be in sync
- if(d->control->palette() != pal)
+ if (d->control->palette() != pal
+ || d->control->palette().currentColorGroup() != pal.currentColorGroup())
d->control->setPalette(pal);
}
diff --git a/src/gui/widgets/qmainwindowlayout_mac.mm b/src/gui/widgets/qmainwindowlayout_mac.mm
index b8cef93456..1bfc746089 100644
--- a/src/gui/widgets/qmainwindowlayout_mac.mm
+++ b/src/gui/widgets/qmainwindowlayout_mac.mm
@@ -48,6 +48,7 @@
#include <Carbon/Carbon.h>
#else
#include <private/qcocoatoolbardelegate_mac_p.h>
+#import <private/qcocoawindowdelegate_mac_p.h>
#endif
QT_BEGIN_NAMESPACE
@@ -337,6 +338,17 @@ void QMainWindowLayout::updateHIToolBarStatus()
#endif
layoutState.mainWindow->setUpdatesEnabled(false); // reduces a little bit of flicker, not all though
+#if defined(QT_MAC_USE_COCOA)
+ QMacCocoaAutoReleasePool pool;
+ NSView *cView = [qt_mac_window_for(layoutState.mainWindow) contentView];
+ if (useMacToolbar) {
+ [cView setPostsFrameChangedNotifications:YES];
+ [[NSNotificationCenter defaultCenter] addObserver: [QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate]
+ selector: @selector(syncContentViewFrame:)
+ name: NSViewFrameDidChangeNotification
+ object: cView];
+ }
+#endif
if (!useMacToolbar) {
macWindowToolbarShow(layoutState.mainWindow, false);
// Move everything out of the HIToolbar into the main toolbar.
@@ -356,6 +368,14 @@ void QMainWindowLayout::updateHIToolBarStatus()
}
syncUnifiedToolbarVisibility();
}
+#if defined(QT_MAC_USE_COCOA)
+ if (!useMacToolbar) {
+ [cView setPostsFrameChangedNotifications:NO];
+ [[NSNotificationCenter defaultCenter] removeObserver: [QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate]
+ name: NSViewFrameDidChangeNotification
+ object: cView];
+ }
+#endif
layoutState.mainWindow->setUpdatesEnabled(true);
}
diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp
index d692307803..bbc7e5dd67 100644
--- a/src/gui/widgets/qtabbar.cpp
+++ b/src/gui/widgets/qtabbar.cpp
@@ -1219,6 +1219,12 @@ void QTabBar::setCurrentIndex(int index)
if (oldIndex >= 0 && oldIndex < count())
d->layoutTab(oldIndex);
d->layoutTab(index);
+#ifndef QT_NO_ACCESSIBILITY
+ if (QAccessible::isActive()) {
+ QAccessible::updateAccessibility(this, index + 1, QAccessible::Focus);
+ QAccessible::updateAccessibility(this, index + 1, QAccessible::Selection);
+ }
+#endif
#ifdef QT3_SUPPORT
emit selected(index);
#endif
diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp
index 9cf81ca46f..2f4d1dfa42 100644
--- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp
+++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp
@@ -93,7 +93,7 @@ public:
};
/*!
- \qmlclass FolderListModel
+ \qmlclass FolderListModel QDeclarativeFolderListModel
\brief The FolderListModel provides a model of the contents of a folder in a filesystem.
FolderListModel provides access to the local filesystem. The \e folder property
diff --git a/src/imports/gestures/plugin.cpp b/src/imports/gestures/plugin.cpp
index 1fc23cab7c..8f85553772 100644
--- a/src/imports/gestures/plugin.cpp
+++ b/src/imports/gestures/plugin.cpp
@@ -55,6 +55,13 @@ public:
Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.labs.gestures"));
#ifndef QT_NO_GESTURES
qmlRegisterCustomType<QDeclarativeGestureArea>(uri,1,0, "GestureArea", new QDeclarativeGestureAreaParser);
+
+ qmlRegisterUncreatableType<QGesture>(uri, 1, 0, "Gesture", QLatin1String("Do not create objects of this type."));
+ qmlRegisterUncreatableType<QPanGesture>(uri, 1, 0, "PanGesture", QLatin1String("Do not create objects of this type."));
+ qmlRegisterUncreatableType<QTapGesture>(uri, 1, 0, "TapGesture", QLatin1String("Do not create objects of this type."));
+ qmlRegisterUncreatableType<QTapAndHoldGesture>(uri, 1, 0, "TapAndHoldGesture", QLatin1String("Do not create objects of this type."));
+ qmlRegisterUncreatableType<QPinchGesture>(uri, 1, 0, "PinchGesture", QLatin1String("Do not create objects of this type."));
+ qmlRegisterUncreatableType<QSwipeGesture>(uri, 1, 0, "SwipeGesture", QLatin1String("Do not create objects of this type."));
#endif
}
};
diff --git a/src/imports/gestures/qdeclarativegesturearea.cpp b/src/imports/gestures/qdeclarativegesturearea.cpp
index 243ba0f774..ed936d58ee 100644
--- a/src/imports/gestures/qdeclarativegesturearea.cpp
+++ b/src/imports/gestures/qdeclarativegesturearea.cpp
@@ -228,7 +228,7 @@ void QDeclarativeGestureArea::connectSignals()
ds >> gesturetype;
QString script;
ds >> script;
- QDeclarativeExpression *exp = new QDeclarativeExpression(qmlContext(this), 0, script);
+ QDeclarativeExpression *exp = new QDeclarativeExpression(qmlContext(this), this, script);
d->bindings.insert(Qt::GestureType(gesturetype),exp);
grabGesture(Qt::GestureType(gesturetype));
}
@@ -261,7 +261,10 @@ bool QDeclarativeGestureAreaPrivate::gestureEvent(QGestureEvent *event)
bool accept = true;
for (Bindings::Iterator it = bindings.begin(); it != bindings.end(); ++it) {
if ((gesture = event->gesture(it.key()))) {
- it.value()->evaluate();
+ QDeclarativeExpression *expr = it.value();
+ expr->evaluate();
+ if (expr->hasError())
+ qmlInfo(q_func()) << expr->error();
event->setAccepted(true); // XXX only if value returns true?
}
}
diff --git a/src/imports/particles/qdeclarativeparticles.cpp b/src/imports/particles/qdeclarativeparticles.cpp
index 8fe8a9fb25..b842109b57 100644
--- a/src/imports/particles/qdeclarativeparticles.cpp
+++ b/src/imports/particles/qdeclarativeparticles.cpp
@@ -153,7 +153,7 @@ void QDeclarativeParticleMotion::destroy(QDeclarativeParticle &particle)
}
/*!
- \qmlclass ParticleMotionLinear
+ \qmlclass ParticleMotionLinear QDeclarativeParticleMotionLinear
\since 4.7
\brief The ParticleMotionLinear object moves particles linearly.
@@ -179,7 +179,7 @@ void QDeclarativeParticleMotionLinear::advance(QDeclarativeParticle &p, int inte
}
/*!
- \qmlclass ParticleMotionGravity
+ \qmlclass ParticleMotionGravity QDeclarativeParticleMotionGravity
\since 4.7
\brief The ParticleMotionGravity object moves particles towards a point.
@@ -270,7 +270,7 @@ void QDeclarativeParticleMotionGravity::advance(QDeclarativeParticle &p, int int
}
/*!
- \qmlclass ParticleMotionWander
+ \qmlclass ParticleMotionWander QDeclarativeParticleMotionWander
\since 4.7
\brief The ParticleMotionWander object moves particles in a somewhat random fashion.
@@ -633,7 +633,7 @@ void QDeclarativeParticlesPrivate::updateOpacity(QDeclarativeParticle &p, int ag
}
/*!
- \qmlclass Particles
+ \qmlclass Particles QDeclarativeParticles
\since 4.7
\brief The Particles object generates and moves particles.
\inherits Item
diff --git a/src/multimedia/audio/qaudiodevicefactory.cpp b/src/multimedia/audio/qaudiodevicefactory.cpp
index 96545b4043..736630ed8c 100644
--- a/src/multimedia/audio/qaudiodevicefactory.cpp
+++ b/src/multimedia/audio/qaudiodevicefactory.cpp
@@ -67,7 +67,8 @@
QT_BEGIN_NAMESPACE
-#ifndef QT_NO_LIBRARY
+
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QAudioEngineFactoryInterface_iid, QLatin1String("/audio"), Qt::CaseInsensitive))
#endif
@@ -138,8 +139,7 @@ QList<QAudioDeviceInfo> QAudioDeviceFactory::availableDevices(QAudio::Mode mode)
devices << QAudioDeviceInfo(QLatin1String("builtin"), handle, mode);
#endif
#endif
-
-#ifndef QT_NO_LIBRARY
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
QFactoryLoader* l = loader();
foreach (QString const& key, l->keys()) {
@@ -152,13 +152,12 @@ QList<QAudioDeviceInfo> QAudioDeviceFactory::availableDevices(QAudio::Mode mode)
delete plugin;
}
#endif
-
return devices;
}
QAudioDeviceInfo QAudioDeviceFactory::defaultInputDevice()
{
-#ifndef QT_NO_LIBRARY
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
QAudioEngineFactoryInterface* plugin = qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(QLatin1String("default")));
if (plugin) {
@@ -178,7 +177,7 @@ QAudioDeviceInfo QAudioDeviceFactory::defaultInputDevice()
QAudioDeviceInfo QAudioDeviceFactory::defaultOutputDevice()
{
-#ifndef QT_NO_LIBRARY
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
QAudioEngineFactoryInterface* plugin = qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(QLatin1String("default")));
if (plugin) {
@@ -206,15 +205,13 @@ QAbstractAudioDeviceInfo* QAudioDeviceFactory::audioDeviceInfo(const QString &re
return new QAudioDeviceInfoInternal(handle, mode);
#endif
#endif
-
-#ifndef QT_NO_LIBRARY
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
QAudioEngineFactoryInterface* plugin =
qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(realm));
if (plugin)
rc = plugin->createDeviceInfo(handle, mode);
#endif
-
return rc == 0 ? new QNullDeviceInfo() : rc;
}
@@ -238,14 +235,13 @@ QAbstractAudioInput* QAudioDeviceFactory::createInputDevice(QAudioDeviceInfo con
return new QAudioInputPrivate(deviceInfo.handle(), format);
#endif
#endif
-#ifndef QT_NO_LIBRARY
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
QAudioEngineFactoryInterface* plugin =
qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(deviceInfo.realm()));
if (plugin)
return plugin->createInput(deviceInfo.handle(), format);
#endif
-
return new QNullInputDevice();
}
@@ -259,15 +255,13 @@ QAbstractAudioOutput* QAudioDeviceFactory::createOutputDevice(QAudioDeviceInfo c
return new QAudioOutputPrivate(deviceInfo.handle(), format);
#endif
#endif
-
-#ifndef QT_NO_LIBRARY
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
QAudioEngineFactoryInterface* plugin =
qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(deviceInfo.realm()));
if (plugin)
return plugin->createOutput(deviceInfo.handle(), format);
#endif
-
return new QNullOutputDevice();
}
diff --git a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
index 36270a7a25..f663dd2667 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
@@ -62,6 +62,8 @@ QAudioDeviceInfoInternal::QAudioDeviceInfoInternal(QByteArray dev, QAudio::Mode
device = QLatin1String(dev);
this->mode = mode;
+
+ checkSurround();
}
QAudioDeviceInfoInternal::~QAudioDeviceInfoInternal()
@@ -389,6 +391,9 @@ void QAudioDeviceInfoInternal::updateLists()
}
channelz.append(1);
channelz.append(2);
+ if (surround40) channelz.append(4);
+ if (surround51) channelz.append(6);
+ if (surround71) channelz.append(8);
sizez.append(8);
sizez.append(16);
sizez.append(32);
@@ -483,4 +488,45 @@ QByteArray QAudioDeviceInfoInternal::defaultOutputDevice()
return devices.first();
}
+void QAudioDeviceInfoInternal::checkSurround()
+{
+ QList<QByteArray> devices;
+ surround40 = false;
+ surround51 = false;
+ surround71 = false;
+
+ void **hints, **n;
+ char *name, *descr, *io;
+
+ if(snd_device_name_hint(-1, "pcm", &hints) < 0)
+ return;
+
+ n = hints;
+
+ while (*n != NULL) {
+ name = snd_device_name_get_hint(*n, "NAME");
+ descr = snd_device_name_get_hint(*n, "DESC");
+ io = snd_device_name_get_hint(*n, "IOID");
+ if((name != NULL) && (descr != NULL)) {
+ QString deviceName = QLatin1String(name);
+ if (mode == QAudio::AudioOutput) {
+ if(deviceName.contains(QLatin1String("surround40")))
+ surround40 = true;
+ if(deviceName.contains(QLatin1String("surround51")))
+ surround51 = true;
+ if(deviceName.contains(QLatin1String("surround71")))
+ surround71 = true;
+ }
+ }
+ if(name != NULL)
+ free(name);
+ if(descr != NULL)
+ free(descr);
+ if(io != NULL)
+ free(io);
+ ++n;
+ }
+ snd_device_name_free_hint(hints);
+}
+
QT_END_NAMESPACE
diff --git a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h
index 6f9a459366..8525980e05 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h
+++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h
@@ -98,6 +98,11 @@ private:
bool open();
void close();
+ void checkSurround();
+ bool surround40;
+ bool surround51;
+ bool surround71;
+
QString device;
QAudio::Mode mode;
QAudioFormat nearest;
diff --git a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
index aee0807463..9e8b1bfdf8 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
@@ -374,6 +374,11 @@ void QAudioDeviceInfoInternal::updateLists()
#endif
channelz.append(1);
channelz.append(2);
+ if (mode == QAudio::AudioOutput) {
+ channelz.append(4);
+ channelz.append(6);
+ channelz.append(8);
+ }
byteOrderz.append(QAudioFormat::LittleEndian);
diff --git a/src/multimedia/audio/qaudioinput_alsa_p.cpp b/src/multimedia/audio/qaudioinput_alsa_p.cpp
index c9a8b713f8..58669b3532 100644
--- a/src/multimedia/audio/qaudioinput_alsa_p.cpp
+++ b/src/multimedia/audio/qaudioinput_alsa_p.cpp
@@ -120,7 +120,7 @@ int QAudioInputPrivate::xrun_recovery(int err)
if(err < 0)
reset = true;
else {
- bytesAvailable = bytesReady();
+ bytesAvailable = checkBytesReady();
if (bytesAvailable <= 0)
reset = true;
}
@@ -408,7 +408,7 @@ bool QAudioInputPrivate::open()
snd_pcm_start(handle);
// Step 5: Setup timer
- bytesAvailable = bytesReady();
+ bytesAvailable = checkBytesReady();
if(pullMode)
connect(audioSource,SIGNAL(readyRead()),this,SLOT(userFeed()));
@@ -437,19 +437,29 @@ void QAudioInputPrivate::close()
}
}
-int QAudioInputPrivate::bytesReady() const
+int QAudioInputPrivate::checkBytesReady()
{
if(resuming)
- return period_size;
-
- if(deviceState != QAudio::ActiveState && deviceState != QAudio::IdleState)
- return 0;
- int frames = snd_pcm_avail_update(handle);
- if (frames < 0) return frames;
- if((int)frames > (int)buffer_frames)
- frames = buffer_frames;
+ bytesAvailable = period_size;
+ else if(deviceState != QAudio::ActiveState
+ && deviceState != QAudio::IdleState)
+ bytesAvailable = 0;
+ else {
+ int frames = snd_pcm_avail_update(handle);
+ if (frames < 0) {
+ bytesAvailable = frames;
+ } else {
+ if((int)frames > (int)buffer_frames)
+ frames = buffer_frames;
+ bytesAvailable = snd_pcm_frames_to_bytes(handle, frames);
+ }
+ }
+ return bytesAvailable;
+}
- return snd_pcm_frames_to_bytes(handle, frames);
+int QAudioInputPrivate::bytesReady() const
+{
+ return qMax(bytesAvailable, 0);
}
qint64 QAudioInputPrivate::read(char* data, qint64 len)
@@ -460,12 +470,12 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len)
if ( !handle )
return 0;
- bytesAvailable = bytesReady();
+ bytesAvailable = checkBytesReady();
if (bytesAvailable < 0) {
// bytesAvailable as negative is error code, try to recover from it.
xrun_recovery(bytesAvailable);
- bytesAvailable = bytesReady();
+ bytesAvailable = checkBytesReady();
if (bytesAvailable < 0) {
// recovery failed must stop and set error.
close();
@@ -639,11 +649,25 @@ bool QAudioInputPrivate::deviceReady()
InputPrivate* a = qobject_cast<InputPrivate*>(audioSource);
a->trigger();
}
- bytesAvailable = bytesReady();
+ bytesAvailable = checkBytesReady();
if(deviceState != QAudio::ActiveState)
return true;
+ if (bytesAvailable < 0) {
+ // bytesAvailable as negative is error code, try to recover from it.
+ xrun_recovery(bytesAvailable);
+ bytesAvailable = checkBytesReady();
+ if (bytesAvailable < 0) {
+ // recovery failed must stop and set error.
+ close();
+ errorState = QAudio::IOError;
+ deviceState = QAudio::StoppedState;
+ emit stateChanged(deviceState);
+ return 0;
+ }
+ }
+
if(intervalTime && (timeStamp.elapsed() + elapsedTimeOffset) > intervalTime) {
emit notify();
elapsedTimeOffset = timeStamp.elapsed() + elapsedTimeOffset - intervalTime;
diff --git a/src/multimedia/audio/qaudioinput_alsa_p.h b/src/multimedia/audio/qaudioinput_alsa_p.h
index c907019318..52975a647b 100644
--- a/src/multimedia/audio/qaudioinput_alsa_p.h
+++ b/src/multimedia/audio/qaudioinput_alsa_p.h
@@ -110,6 +110,7 @@ private slots:
bool deviceReady();
private:
+ int checkBytesReady();
int xrun_recovery(int err);
int setFormat();
bool open();
diff --git a/src/multimedia/audio/qaudioinput_win32_p.cpp b/src/multimedia/audio/qaudioinput_win32_p.cpp
index 14a1cf337d..ece1c26c3e 100644
--- a/src/multimedia/audio/qaudioinput_win32_p.cpp
+++ b/src/multimedia/audio/qaudioinput_win32_p.cpp
@@ -148,7 +148,7 @@ void QAudioInputPrivate::freeBlocks(WAVEHDR* blockArray)
for(int i = 0; i < count; i++) {
waveInUnprepareHeader(hWaveIn,blocks, sizeof(WAVEHDR));
- blocks+=sizeof(WAVEHDR);
+ blocks++;
}
HeapFree(GetProcessHeap(), 0, blockArray);
}
diff --git a/src/multimedia/audio/qaudiooutput_win32_p.cpp b/src/multimedia/audio/qaudiooutput_win32_p.cpp
index a8aeb4193d..99bada2a5c 100644
--- a/src/multimedia/audio/qaudiooutput_win32_p.cpp
+++ b/src/multimedia/audio/qaudiooutput_win32_p.cpp
@@ -52,6 +52,53 @@
#include "qaudiooutput_win32_p.h"
+#ifndef SPEAKER_FRONT_LEFT
+ #define SPEAKER_FRONT_LEFT 0x00000001
+ #define SPEAKER_FRONT_RIGHT 0x00000002
+ #define SPEAKER_FRONT_CENTER 0x00000004
+ #define SPEAKER_LOW_FREQUENCY 0x00000008
+ #define SPEAKER_BACK_LEFT 0x00000010
+ #define SPEAKER_BACK_RIGHT 0x00000020
+ #define SPEAKER_FRONT_LEFT_OF_CENTER 0x00000040
+ #define SPEAKER_FRONT_RIGHT_OF_CENTER 0x00000080
+ #define SPEAKER_BACK_CENTER 0x00000100
+ #define SPEAKER_SIDE_LEFT 0x00000200
+ #define SPEAKER_SIDE_RIGHT 0x00000400
+ #define SPEAKER_TOP_CENTER 0x00000800
+ #define SPEAKER_TOP_FRONT_LEFT 0x00001000
+ #define SPEAKER_TOP_FRONT_CENTER 0x00002000
+ #define SPEAKER_TOP_FRONT_RIGHT 0x00004000
+ #define SPEAKER_TOP_BACK_LEFT 0x00008000
+ #define SPEAKER_TOP_BACK_CENTER 0x00010000
+ #define SPEAKER_TOP_BACK_RIGHT 0x00020000
+ #define SPEAKER_RESERVED 0x7FFC0000
+ #define SPEAKER_ALL 0x80000000
+#endif
+
+#ifndef _WAVEFORMATEXTENSIBLE_
+
+ #define _WAVEFORMATEXTENSIBLE_
+ typedef struct
+ {
+ WAVEFORMATEX Format; // Base WAVEFORMATEX data
+ union
+ {
+ WORD wValidBitsPerSample; // Valid bits in each sample container
+ WORD wSamplesPerBlock; // Samples per block of audio data; valid
+ // if wBitsPerSample=0 (but rarely used).
+ WORD wReserved; // Zero if neither case above applies.
+ } Samples;
+ DWORD dwChannelMask; // Positions of the audio channels
+ GUID SubFormat; // Format identifier GUID
+ } WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE, *LPPWAVEFORMATEXTENSIBLE;
+ typedef const WAVEFORMATEXTENSIBLE* LPCWAVEFORMATEXTENSIBLE;
+
+#endif
+
+#if !defined(WAVE_FORMAT_EXTENSIBLE)
+#define WAVE_FORMAT_EXTENSIBLE 0xFFFE
+#endif
+
//#define DEBUG_AUDIO 1
QT_BEGIN_NAMESPACE
@@ -146,7 +193,7 @@ void QAudioOutputPrivate::freeBlocks(WAVEHDR* blockArray)
for(int i = 0; i < count; i++) {
waveOutUnprepareHeader(hWaveOut,blocks, sizeof(WAVEHDR));
- blocks+=sizeof(WAVEHDR);
+ blocks++;
}
HeapFree(GetProcessHeap(), 0, blockArray);
}
@@ -258,15 +305,49 @@ bool QAudioOutputPrivate::open()
}
}
- if(waveOutOpen(&hWaveOut, devId, &wfx,
- (DWORD_PTR)&waveOutProc,
- (DWORD_PTR) this,
- CALLBACK_FUNCTION) != MMSYSERR_NOERROR) {
- errorState = QAudio::OpenError;
- deviceState = QAudio::StoppedState;
- emit stateChanged(deviceState);
- qWarning("QAudioOutput: open error");
- return false;
+ if ( settings.channels() <= 2) {
+ if(waveOutOpen(&hWaveOut, devId, &wfx,
+ (DWORD_PTR)&waveOutProc,
+ (DWORD_PTR) this,
+ CALLBACK_FUNCTION) != MMSYSERR_NOERROR) {
+ errorState = QAudio::OpenError;
+ deviceState = QAudio::StoppedState;
+ emit stateChanged(deviceState);
+ qWarning("QAudioOutput: open error");
+ return false;
+ }
+ } else {
+ WAVEFORMATEXTENSIBLE wfex;
+ wfex.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
+ wfex.Format.nChannels = settings.channels();
+ wfex.Format.wBitsPerSample = settings.sampleSize();
+ wfex.Format.nSamplesPerSec = settings.frequency();
+ wfex.Format.nBlockAlign = wfex.Format.nChannels*wfex.Format.wBitsPerSample/8;
+ wfex.Format.nAvgBytesPerSec=wfex.Format.nSamplesPerSec*wfex.Format.nBlockAlign;
+ wfex.Samples.wValidBitsPerSample=wfex.Format.wBitsPerSample;
+ static const GUID _KSDATAFORMAT_SUBTYPE_PCM = {
+ 0x00000001, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
+ wfex.SubFormat=_KSDATAFORMAT_SUBTYPE_PCM;
+ wfex.Format.cbSize=22;
+
+ wfex.dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT;
+ if (settings.channels() >= 4)
+ wfex.dwChannelMask |= SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT;
+ if (settings.channels() >= 6)
+ wfex.dwChannelMask |= SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY;
+ if (settings.channels() == 8)
+ wfex.dwChannelMask |= SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT;
+
+ if(waveOutOpen(&hWaveOut, devId, &wfex.Format,
+ (DWORD_PTR)&waveOutProc,
+ (DWORD_PTR) this,
+ CALLBACK_FUNCTION) != MMSYSERR_NOERROR) {
+ errorState = QAudio::OpenError;
+ deviceState = QAudio::StoppedState;
+ emit stateChanged(deviceState);
+ qWarning("QAudioOutput: open error");
+ return false;
+ }
}
totalTimeValue = 0;
diff --git a/src/multimedia/video/qabstractvideobuffer.cpp b/src/multimedia/video/qabstractvideobuffer.cpp
index e9d30d0730..db05ee5911 100644
--- a/src/multimedia/video/qabstractvideobuffer.cpp
+++ b/src/multimedia/video/qabstractvideobuffer.cpp
@@ -73,6 +73,7 @@ QT_BEGIN_NAMESPACE
\value GLTextureHandle The handle of the buffer is an OpenGL texture ID.
\value XvShmImageHandle The handle contains pointer to shared memory XVideo image.
\value CoreImageHandle The handle contains pointer to Mac OS X CIImage.
+ \value QPixmapHandle The handle of the buffer is a QPixmap.
\value UserHandle Start value for user defined handle types.
\sa handleType()
diff --git a/src/multimedia/video/qabstractvideobuffer.h b/src/multimedia/video/qabstractvideobuffer.h
index a8389db126..98e12da7fe 100644
--- a/src/multimedia/video/qabstractvideobuffer.h
+++ b/src/multimedia/video/qabstractvideobuffer.h
@@ -63,6 +63,7 @@ public:
GLTextureHandle,
XvShmImageHandle,
CoreImageHandle,
+ QPixmapHandle,
UserHandle = 1000
};
diff --git a/src/multimedia/video/qvideosurfaceformat.cpp b/src/multimedia/video/qvideosurfaceformat.cpp
index 1fc13a602c..3afbdc95f9 100644
--- a/src/multimedia/video/qvideosurfaceformat.cpp
+++ b/src/multimedia/video/qvideosurfaceformat.cpp
@@ -252,7 +252,7 @@ QVideoSurfaceFormat::~QVideoSurfaceFormat()
bool QVideoSurfaceFormat::isValid() const
{
- return d->pixelFormat == QVideoFrame::Format_Invalid && d->frameSize.isValid();
+ return d->pixelFormat != QVideoFrame::Format_Invalid && d->frameSize.isValid();
}
/*!
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index 1afabecf74..9e2b85ed68 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -286,13 +286,8 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket
resend = false;
//create the response header to be used with QAuthenticatorPrivate.
- QHttpResponseHeader responseHeader;
QList<QPair<QByteArray, QByteArray> > fields = reply->header();
- QList<QPair<QByteArray, QByteArray> >::const_iterator it = fields.constBegin();
- while (it != fields.constEnd()) {
- responseHeader.addValue(QString::fromLatin1(it->first), QString::fromUtf8(it->second));
- it++;
- }
+
//find out the type of authentication protocol requested.
QAuthenticatorPrivate::Method authMethod = reply->d_func()->authenticationMethod(isProxy);
if (authMethod != QAuthenticatorPrivate::None) {
@@ -310,7 +305,7 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket
if (auth->isNull())
auth->detach();
QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(*auth);
- priv->parseHttpResponse(responseHeader, isProxy);
+ priv->parseHttpResponse(fields, isProxy);
if (priv->phase == QAuthenticatorPrivate::Done) {
if ((isProxy && pendingProxyAuthSignal) ||(!isProxy && pendingAuthSignal)) {
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index a6c5c02bfb..f617244b17 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -944,10 +944,10 @@ bool QNetworkAccessHttpBackend::sendCacheContents(const QNetworkCacheMetaData &m
checkForRedirect(status);
- emit metaDataChanged();
-
- // invoke this asynchronously, else Arora/QtDemoBrowser don't like cached downloads
- // see task 250221 / 251801
+ // This needs to be emitted in the event loop because it can be reached at
+ // the direct code path of qnam.get(...) before the user has a chance
+ // to connect any signals.
+ QMetaObject::invokeMethod(this, "metaDataChanged", Qt::QueuedConnection);
qRegisterMetaType<QIODevice*>("QIODevice*");
QMetaObject::invokeMethod(this, "writeDownstreamData", Qt::QueuedConnection, Q_ARG(QIODevice*, contents));
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index bccfec1dd8..fa592c22c0 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -230,6 +230,14 @@ QT_BEGIN_NAMESPACE
\since 4.7
+ \omitvalue MaximumDownloadBufferSizeAttribute
+ \since 4.7
+ \internal
+
+ \omitvalue DownloadBufferAttribute
+ \since 4.7
+ \internal
+
\value User
Special type. Additional information can be passed in
QVariants with types ranging from User to UserMax. The default
diff --git a/src/network/access/qnetworkrequest.h b/src/network/access/qnetworkrequest.h
index d2945c40e6..cdadf0f69c 100644
--- a/src/network/access/qnetworkrequest.h
+++ b/src/network/access/qnetworkrequest.h
@@ -82,6 +82,8 @@ public:
CookieLoadControlAttribute,
AuthenticationReuseAttribute,
CookieSaveControlAttribute,
+ MaximumDownloadBufferSizeAttribute, // internal
+ DownloadBufferAttribute, // internal
User = 1000,
UserMax = 32767
diff --git a/src/network/bearer/qnetworkconfiguration.cpp b/src/network/bearer/qnetworkconfiguration.cpp
index 4108fee361..d7fcebab92 100644
--- a/src/network/bearer/qnetworkconfiguration.cpp
+++ b/src/network/bearer/qnetworkconfiguration.cpp
@@ -343,9 +343,11 @@ bool QNetworkConfiguration::isRoamingAvailable() const
}
/*!
- Returns all sub configurations of this network configuration.
- Only network configurations of type \l ServiceNetwork can have children. Otherwise
- this function returns an empty list.
+ Returns all sub configurations of this network configuration in priority order. The first sub
+ configuration in the list has the highest priority.
+
+ Only network configurations of type \l ServiceNetwork can have children. Otherwise this
+ function returns an empty list.
*/
QList<QNetworkConfiguration> QNetworkConfiguration::children() const
{
@@ -356,16 +358,18 @@ QList<QNetworkConfiguration> QNetworkConfiguration::children() const
QMutexLocker locker(&d->mutex);
- QMutableListIterator<QNetworkConfigurationPrivatePointer> iter(d->serviceNetworkMembers);
- while (iter.hasNext()) {
- QNetworkConfigurationPrivatePointer p = iter.next();
+ QMutableMapIterator<unsigned int, QNetworkConfigurationPrivatePointer> i(d->serviceNetworkMembers);
+ while (i.hasNext()) {
+ i.next();
+
+ QNetworkConfigurationPrivatePointer p = i.value();
//if we have an invalid member get rid of it -> was deleted earlier on
{
QMutexLocker childLocker(&p->mutex);
if (!p->isValid) {
- iter.remove();
+ i.remove();
continue;
}
}
@@ -428,6 +432,5 @@ QString QNetworkConfiguration::bearerName() const
return d->bearerName();
}
-
QT_END_NAMESPACE
diff --git a/src/network/bearer/qnetworkconfiguration_p.h b/src/network/bearer/qnetworkconfiguration_p.h
index 6e146e06a6..966dfb29e6 100644
--- a/src/network/bearer/qnetworkconfiguration_p.h
+++ b/src/network/bearer/qnetworkconfiguration_p.h
@@ -57,6 +57,7 @@
#include <QtCore/qshareddata.h>
#include <QtCore/qmutex.h>
+#include <QtCore/qmap.h>
QT_BEGIN_NAMESPACE
@@ -84,7 +85,7 @@ public:
return bearer;
}
- QList<QNetworkConfigurationPrivatePointer> serviceNetworkMembers;
+ QMap<unsigned int, QNetworkConfigurationPrivatePointer> serviceNetworkMembers;
mutable QMutex mutex;
diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp
index 1ed6cbb233..65de5397a4 100644
--- a/src/network/bearer/qnetworksession.cpp
+++ b/src/network/bearer/qnetworksession.cpp
@@ -629,8 +629,10 @@ void QNetworkSession::reject()
If the session is based on a service network configuration the number of
sent bytes across all active member configurations are returned.
- This function may not always be supported on all platforms and returns
- 0. The platform capability can be detected via QNetworkConfigurationManager::DataStatistics.
+ This function may not always be supported on all platforms and returns 0.
+ The platform capability can be detected via QNetworkConfigurationManager::DataStatistics.
+
+ \note On some platforms this function may run the main event loop.
*/
quint64 QNetworkSession::bytesWritten() const
{
@@ -646,8 +648,10 @@ quint64 QNetworkSession::bytesWritten() const
If the session is based on a service network configuration the number of
sent bytes across all active member configurations are returned.
- This function may not always be supported on all platforms and returns
- 0. The platform capability can be detected via QNetworkConfigurationManager::DataStatistics.
+ This function may not always be supported on all platforms and returns 0.
+ The platform capability can be detected via QNetworkConfigurationManager::DataStatistics.
+
+ \note On some platforms this function may run the main event loop.
*/
quint64 QNetworkSession::bytesReceived() const
{
diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp
index e4023c843d..d61c6863ea 100644
--- a/src/network/kernel/qauthenticator.cpp
+++ b/src/network/kernel/qauthenticator.cpp
@@ -50,6 +50,8 @@
#include <qdatastream.h>
#include <qendian.h>
#include <qstring.h>
+#include <qdatetime.h>
+
QT_BEGIN_NAMESPACE
@@ -83,6 +85,44 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas
Note that, in particular, NTLM version 2 is not supported.
+ \section1 Options
+
+ In addition to the username and password required for authentication, a
+ QAuthenticator object can also contain additional options. The
+ options() function can be used to query incoming options sent by
+ the server; the setOption() function can
+ be used to set outgoing options, to be processed by the authenticator
+ calculation. The options accepted and provided depend on the authentication
+ type (see method()).
+
+ The following tables list known incoming options as well as accepted
+ outgoing options. The list of incoming options is not exhaustive, since
+ servers may include additional information at any time. The list of
+ outgoing options is exhaustive, however, and no unknown options will be
+ treated or sent back to the server.
+
+ \section2 Basic
+
+ \table
+ \header \o Option \o Direction \o Description
+ \row \o \tt{realm} \o Incoming \o Contains the realm of the authentication, the same as realm()
+ \endtable
+
+ The Basic authentication mechanism supports no outgoing options.
+
+ \section2 NTLM version 1
+
+ The NTLM authentication mechanism currently supports no incoming or outgoing options.
+
+ \section2 Digest-MD5
+
+ \table
+ \header \o Option \o Direction \o Description
+ \row \o \tt{realm} \o Incoming \o Contains the realm of the authentication, the same as realm()
+ \endtable
+
+ The Digest-MD5 authentication mechanism supports no outgoing options.
+
\sa QSslSocket
*/
@@ -138,7 +178,8 @@ bool QAuthenticator::operator==(const QAuthenticator &other) const
return d->user == other.d->user
&& d->password == other.d->password
&& d->realm == other.d->realm
- && d->method == other.d->method;
+ && d->method == other.d->method
+ && d->options == other.d->options;
}
/*!
@@ -162,7 +203,18 @@ QString QAuthenticator::user() const
void QAuthenticator::setUser(const QString &user)
{
detach();
- d->user = user;
+
+ int separatorPosn = 0;
+ separatorPosn = user.indexOf(QLatin1String("\\"));
+
+ if (separatorPosn == -1) {
+ //No domain name present
+ d->user = user;
+ } else {
+ //domain name is present
+ d->realm = user.left(separatorPosn);
+ d->user = user.mid(separatorPosn+1);
+ }
}
/*!
@@ -205,9 +257,49 @@ QString QAuthenticator::realm() const
return d ? d->realm : QString();
}
+/*!
+ \since 4.7
+ Returns the value related to option \a opt if it was set by the server.
+ See \l{QAuthenticator#Options} for more information on incoming options.
+ If option \a opt isn't found, an invalid QVariant will be returned.
+
+ \sa options(), QAuthenticator#Options
+*/
+QVariant QAuthenticator::option(const QString &opt) const
+{
+ return d ? d->options.value(opt) : QVariant();
+}
/*!
- returns true if the authenticator is null.
+ \since 4.7
+ Returns all incoming options set in this QAuthenticator object by parsing
+ the server reply. See \l{QAuthenticator#Options} for more information
+ on incoming options.
+
+ \sa option(), QAuthenticator#Options
+*/
+QVariantHash QAuthenticator::options() const
+{
+ return d ? d->options : QVariantHash();
+}
+
+/*!
+ \since 4.7
+
+ Sets the outgoing option \a opt to value \a value.
+ See \l{QAuthenticator#Options} for more information on outgoing options.
+
+ \sa options(), option(), QAuthenticator#Options
+*/
+void QAuthenticator::setOption(const QString &opt, const QVariant &value)
+{
+ detach();
+ d->options.insert(opt, value);
+}
+
+
+/*!
+ Returns true if the authenticator is null.
*/
bool QAuthenticator::isNull() const
{
@@ -228,7 +320,20 @@ QAuthenticatorPrivate::QAuthenticatorPrivate()
#ifndef QT_NO_HTTP
void QAuthenticatorPrivate::parseHttpResponse(const QHttpResponseHeader &header, bool isProxy)
{
- QList<QPair<QString, QString> > values = header.values();
+ const QList<QPair<QString, QString> > values = header.values();
+ QList<QPair<QByteArray, QByteArray> > rawValues;
+
+ QList<QPair<QString, QString> >::const_iterator it, end;
+ for (it = values.constBegin(), end = values.constEnd(); it != end; ++it)
+ rawValues.append(qMakePair(it->first.toLatin1(), it->second.toUtf8()));
+
+ // continue in byte array form
+ parseHttpResponse(rawValues, isProxy);
+}
+#endif
+
+void QAuthenticatorPrivate::parseHttpResponse(const QList<QPair<QByteArray, QByteArray> > &values, bool isProxy)
+{
const char *search = isProxy ? "proxy-authenticate" : "www-authenticate";
method = None;
@@ -242,38 +347,40 @@ void QAuthenticatorPrivate::parseHttpResponse(const QHttpResponseHeader &header,
authentication parameters.
*/
- QString headerVal;
+ QByteArray headerVal;
for (int i = 0; i < values.size(); ++i) {
- const QPair<QString, QString> &current = values.at(i);
- if (current.first.toLower() != QLatin1String(search))
+ const QPair<QByteArray, QByteArray> &current = values.at(i);
+ if (current.first.toLower() != search)
continue;
- QString str = current.second;
- if (method < Basic && str.startsWith(QLatin1String("Basic"), Qt::CaseInsensitive)) {
- method = Basic; headerVal = str.mid(6);
- } else if (method < Ntlm && str.startsWith(QLatin1String("NTLM"), Qt::CaseInsensitive)) {
+ QByteArray str = current.second.toLower();
+ if (method < Basic && str.startsWith("basic")) {
+ method = Basic;
+ headerVal = current.second.mid(6);
+ } else if (method < Ntlm && str.startsWith("ntlm")) {
method = Ntlm;
- headerVal = str.mid(5);
- } else if (method < DigestMd5 && str.startsWith(QLatin1String("Digest"), Qt::CaseInsensitive)) {
+ headerVal = current.second.mid(5);
+ } else if (method < DigestMd5 && str.startsWith("digest")) {
method = DigestMd5;
- headerVal = str.mid(7);
+ headerVal = current.second.mid(7);
}
}
- challenge = headerVal.trimmed().toLatin1();
+ challenge = headerVal.trimmed();
QHash<QByteArray, QByteArray> options = parseDigestAuthenticationChallenge(challenge);
switch(method) {
case Basic:
- realm = QString::fromLatin1(options.value("realm"));
+ if(realm.isEmpty())
+ this->options[QLatin1String("realm")] = realm = QString::fromLatin1(options.value("realm"));
if (user.isEmpty())
phase = Done;
break;
case Ntlm:
// #### extract from header
- realm.clear();
break;
case DigestMd5: {
- realm = QString::fromLatin1(options.value("realm"));
+ if(realm.isEmpty())
+ this->options[QLatin1String("realm")] = realm = QString::fromLatin1(options.value("realm"));
if (options.value("stale").toLower() == "true")
phase = Start;
if (user.isEmpty())
@@ -286,7 +393,6 @@ void QAuthenticatorPrivate::parseHttpResponse(const QHttpResponseHeader &header,
phase = Invalid;
}
}
-#endif
QByteArray QAuthenticatorPrivate::calculateResponse(const QByteArray &requestMethod, const QByteArray &path)
{
@@ -661,6 +767,20 @@ QByteArray QAuthenticatorPrivate::digestMd5Response(const QByteArray &challenge,
*/
#define NTLMSSP_NEGOTIATE_56 0x80000000
+/*
+ * AvId values
+ */
+#define AVTIMESTAMP 7
+
+//#define NTLMV1_CLIENT
+
+
+//************************Global variables***************************
+
+const int blockSize = 64; //As per RFC2104 Block-size is 512 bits
+const int nDigestLen = 16; //Trunctaion Length of the Hmac-Md5 digest
+const quint8 respversion = 1;
+const quint8 hirespversion = 1;
/* usage:
// fill up ctx with what we know.
@@ -803,6 +923,7 @@ public:
// extracted
QString targetNameStr, targetInfoStr;
+ QByteArray targetInfoBuff;
};
@@ -818,6 +939,7 @@ public:
// extracted
QByteArray lmResponseBuf, ntlmResponseBuf;
QString domainStr, userStr, workstationStr, sessionKeyStr;
+ QByteArray v2Hash;
};
@@ -899,7 +1021,7 @@ static QString qStringFromUcs2Le(const QByteArray& src)
return QString((const QChar *)src.data(), src.size()/2);
}
-
+#ifdef NTLMV1_CLIENT
static QByteArray qEncodeNtlmResponse(const QAuthenticatorPrivate *ctx, const QNtlmPhase2Block& ch)
{
QCryptographicHash md4(QCryptographicHash::Md4);
@@ -941,7 +1063,232 @@ static QByteArray qEncodeLmResponse(const QAuthenticatorPrivate *ctx, const QNtl
hash.fill(0);
return rc;
}
+#endif
+
+/*********************************************************************
+* Function Name: qEncodeHmacMd5
+* Params:
+* key: Type - QByteArray
+* - It is the Authentication key
+* message: Type - QByteArray
+* - This is the actual message which will be encoded
+* using HMacMd5 hash algorithm
+*
+* Return Value:
+* hmacDigest: Type - QByteArray
+*
+* Description:
+* This function will be used to encode the input message using
+* HMacMd5 hash algorithm.
+*
+* As per the RFC2104 the HMacMd5 algorithm can be specified
+* ---------------------------------------
+* MD5(K XOR opad, MD5(K XOR ipad, text))
+* ---------------------------------------
+*
+*********************************************************************/
+QByteArray qEncodeHmacMd5(QByteArray &key, const QByteArray &message)
+{
+ Q_ASSERT_X(!(message.isEmpty()),"qEncodeHmacMd5", "Empty message check");
+ Q_ASSERT_X(!(key.isEmpty()),"qEncodeHmacMd5", "Empty key check");
+
+ QCryptographicHash hash(QCryptographicHash::Md5);
+ QByteArray hMsg;
+
+ QByteArray iKeyPad(blockSize, 0x36);
+ QByteArray oKeyPad(blockSize, 0x5c);
+
+ hash.reset();
+ // Adjust the key length to blockSize
+
+ if(blockSize < key.length()) {
+ hash.addData(key);
+ key = hash.result(); //MD5 will always return 16 bytes length output
+ }
+
+ //Key will be <= 16 or 20 bytes as hash function (MD5 or SHA hash algorithms)
+ //key size can be max of Block size only
+ key = key.leftJustified(blockSize,0,true);
+
+ //iKeyPad, oKeyPad and key are all of same size "blockSize"
+
+ //xor of iKeyPad with Key and store the result into iKeyPad
+ for(int i = 0; i<key.size();i++) {
+ iKeyPad[i] = key[i]^iKeyPad[i];
+ }
+
+ //xor of oKeyPad with Key and store the result into oKeyPad
+ for(int i = 0; i<key.size();i++) {
+ oKeyPad[i] = key[i]^oKeyPad[i];
+ }
+
+ iKeyPad.append(message); // (K0 xor ipad) || text
+
+ hash.reset();
+ hash.addData(iKeyPad);
+ hMsg = hash.result();
+ //Digest gen after pass-1: H((K0 xor ipad)||text)
+
+ QByteArray hmacDigest;
+ oKeyPad.append(hMsg);
+ hash.reset();
+ hash.addData(oKeyPad);
+ hmacDigest = hash.result();
+ // H((K0 xor opad )|| H((K0 xor ipad) || text))
+
+ /*hmacDigest should not be less than half the length of the HMAC output
+ (to match the birthday attack bound) and not less than 80 bits
+ (a suitable lower bound on the number of bits that need to be
+ predicted by an attacker).
+ Refer RFC 2104 for more details on truncation part */
+
+ /*MD5 hash always returns 16 byte digest only and HMAC-MD5 spec
+ (RFC 2104) also says digest length should be 16 bytes*/
+ return hmacDigest;
+}
+
+static QByteArray qCreatev2Hash(const QAuthenticatorPrivate *ctx,
+ QNtlmPhase3Block *phase3)
+{
+ Q_ASSERT(phase3 != 0);
+ // since v2 Hash is need for both NTLMv2 and LMv2 it is calculated
+ // only once and stored and reused
+ if(phase3->v2Hash.size() == 0) {
+ QCryptographicHash md4(QCryptographicHash::Md4);
+ QByteArray passUnicode = qStringAsUcs2Le(ctx->password);
+ md4.addData(passUnicode.data(), passUnicode.size());
+
+ QByteArray hashKey = md4.result();
+ Q_ASSERT(hashKey.size() == 16);
+ // Assuming the user and domain is always unicode in challenge
+ QByteArray message =
+ qStringAsUcs2Le(ctx->user.toUpper()) +
+ qStringAsUcs2Le(ctx->realm);
+
+ phase3->v2Hash = qEncodeHmacMd5(hashKey, message);
+ }
+ return phase3->v2Hash;
+}
+
+static QByteArray clientChallenge(const QAuthenticatorPrivate *ctx)
+{
+ Q_ASSERT(ctx->cnonce.size() >= 8);
+ QByteArray clientCh = ctx->cnonce.right(8);
+ return clientCh;
+}
+
+// caller has to ensure a valid targetInfoBuff
+static bool qExtractServerTime(const QByteArray& targetInfoBuff,
+ quint64 *serverTime)
+{
+ Q_ASSERT(serverTime != 0);
+ bool retValue = false;
+ QDataStream ds(targetInfoBuff);
+ ds.setByteOrder(QDataStream::LittleEndian);
+
+ quint16 avId;
+ quint16 avLen;
+
+ ds >> avId;
+ ds >> avLen;
+ while(avId != 0) {
+ if(avId == AVTIMESTAMP) {
+ QByteArray timeArray(avLen, 0);
+ //avLen size of QByteArray is allocated
+ ds.readRawData(timeArray.data(), avLen);
+ bool ok;
+ *serverTime = timeArray.toHex().toLongLong(&ok, 16);
+ retValue = true;
+ break;
+ }
+ ds.skipRawData(avLen);
+ ds >> avId;
+ ds >> avLen;
+ }
+ return retValue;
+}
+
+static QByteArray qEncodeNtlmv2Response(const QAuthenticatorPrivate *ctx,
+ const QNtlmPhase2Block& ch,
+ QNtlmPhase3Block *phase3)
+{
+ Q_ASSERT(phase3 != 0);
+ // return value stored in phase3
+ qCreatev2Hash(ctx, phase3);
+
+ QByteArray temp;
+ QDataStream ds(&temp, QIODevice::WriteOnly);
+ ds.setByteOrder(QDataStream::LittleEndian);
+
+ ds << respversion;
+ ds << hirespversion;
+ //Reserved
+ QByteArray reserved1(6, 0);
+ ds.writeRawData(reserved1.constData(), reserved1.size());
+
+ quint64 time = 0;
+
+ //if server sends time, use it instead of current time
+ if(!(ch.targetInfo.len && qExtractServerTime(ch.targetInfoBuff, &time))) {
+ QDateTime currentTime(QDate::currentDate(),
+ QTime::currentTime(), Qt::UTC);
+
+ // number of seconds between 1601 and epoc(1970)
+ // 369 years, 89 leap years
+ // ((369 * 365) + 89) * 24 * 3600 = 11644473600
+
+ time = Q_UINT64_C(currentTime.toTime_t() + 11644473600);
+
+ // represented as 100 nano seconds
+ time = Q_UINT64_C(time * 10000000);
+ }
+ ds << time;
+
+ //8 byte client challenge
+ QByteArray clientCh = clientChallenge(ctx);
+ ds.writeRawData(clientCh.constData(), clientCh.size());
+
+ //Reserved
+ QByteArray reserved2(4, 0);
+ ds.writeRawData(reserved2.constData(), reserved2.size());
+
+ if (ch.targetInfo.len > 0) {
+ ds.writeRawData(ch.targetInfoBuff.constData(),
+ ch.targetInfoBuff.size());
+ }
+
+ //Reserved
+ QByteArray reserved3(4, 0);
+ ds.writeRawData(reserved3.constData(), reserved3.size());
+
+ QByteArray message((const char*)ch.challenge, sizeof(ch.challenge));
+ message.append(temp);
+
+ QByteArray ntChallengeResp = qEncodeHmacMd5(phase3->v2Hash, message);
+ ntChallengeResp.append(temp);
+
+ return ntChallengeResp;
+}
+
+static QByteArray qEncodeLmv2Response(const QAuthenticatorPrivate *ctx,
+ const QNtlmPhase2Block& ch,
+ QNtlmPhase3Block *phase3)
+{
+ Q_ASSERT(phase3 != 0);
+ // return value stored in phase3
+ qCreatev2Hash(ctx, phase3);
+
+ QByteArray message((const char*)ch.challenge, sizeof(ch.challenge));
+ QByteArray clientCh = clientChallenge(ctx);
+
+ message.append(clientCh);
+
+ QByteArray lmChallengeResp = qEncodeHmacMd5(phase3->v2Hash, message);
+ lmChallengeResp.append(clientCh);
+
+ return lmChallengeResp;
+}
static bool qNtlmDecodePhase2(const QByteArray& data, QNtlmPhase2Block& ch)
{
@@ -976,7 +1323,10 @@ static bool qNtlmDecodePhase2(const QByteArray& data, QNtlmPhase2Block& ch)
}
if (ch.targetInfo.len > 0) {
- // UNUSED right now
+ if (ch.targetInfo.len + ch.targetInfo.offset > (unsigned)data.size())
+ return false;
+
+ ch.targetInfoBuff = data.mid(ch.targetInfo.offset, ch.targetInfo.len);
}
return true;
@@ -996,7 +1346,8 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas
bool unicode = ch.flags & NTLMSSP_NEGOTIATE_UNICODE;
- ctx->realm = ch.targetNameStr;
+ if(ctx->realm.isEmpty())
+ ctx->realm = ch.targetNameStr;
pb.flags = NTLMSSP_NEGOTIATE_NTLM;
if (unicode)
@@ -1010,6 +1361,7 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas
offset = qEncodeNtlmString(pb.domain, offset, ctx->realm, unicode);
pb.domainStr = ctx->realm;
+
offset = qEncodeNtlmString(pb.user, offset, ctx->user, unicode);
pb.userStr = ctx->user;
@@ -1017,11 +1369,23 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas
pb.workstationStr = ctx->workstation;
// Get LM response
+#ifdef NTLMV1_CLIENT
pb.lmResponseBuf = qEncodeLmResponse(ctx, ch);
+#else
+ if (ch.targetInfo.len > 0) {
+ pb.lmResponseBuf = QByteArray();
+ } else {
+ pb.lmResponseBuf = qEncodeLmv2Response(ctx, ch, &pb);
+ }
+#endif
offset = qEncodeNtlmBuffer(pb.lmResponse, offset, pb.lmResponseBuf);
// Get NTLM response
+#ifdef NTLMV1_CLIENT
pb.ntlmResponseBuf = qEncodeNtlmResponse(ctx, ch);
+#else
+ pb.ntlmResponseBuf = qEncodeNtlmv2Response(ctx, ch, &pb);
+#endif
offset = qEncodeNtlmBuffer(pb.ntlmResponse, offset, pb.ntlmResponseBuf);
diff --git a/src/network/kernel/qauthenticator.h b/src/network/kernel/qauthenticator.h
index 13ce593496..983b7c0214 100644
--- a/src/network/kernel/qauthenticator.h
+++ b/src/network/kernel/qauthenticator.h
@@ -43,6 +43,7 @@
#define QAUTHENTICATOR_H
#include <QtCore/qstring.h>
+#include <QtCore/qvariant.h>
QT_BEGIN_HEADER
@@ -73,6 +74,10 @@ public:
QString realm() const;
+ QVariant option(const QString &opt) const;
+ QVariantHash options() const;
+ void setOption(const QString &opt, const QVariant &value);
+
bool isNull() const;
void detach();
private:
diff --git a/src/network/kernel/qauthenticator_p.h b/src/network/kernel/qauthenticator_p.h
index e9ce9ac161..10966014b9 100644
--- a/src/network/kernel/qauthenticator_p.h
+++ b/src/network/kernel/qauthenticator_p.h
@@ -57,12 +57,13 @@
#include <qbytearray.h>
#include <qstring.h>
#include <qauthenticator.h>
+#include <qvariant.h>
QT_BEGIN_NAMESPACE
class QHttpResponseHeader;
-class QAuthenticatorPrivate
+class Q_AUTOTEST_EXPORT QAuthenticatorPrivate
{
public:
enum Method { None, Basic, Plain, Login, Ntlm, CramMd5, DigestMd5 };
@@ -71,7 +72,7 @@ public:
QAtomicInt ref;
QString user;
QString password;
- QHash<QByteArray, QByteArray> options;
+ QVariantHash options;
Method method;
QString realm;
QByteArray challenge;
@@ -102,6 +103,7 @@ public:
#ifndef QT_NO_HTTP
void parseHttpResponse(const QHttpResponseHeader &, bool isProxy);
#endif
+ void parseHttpResponse(const QList<QPair<QByteArray, QByteArray> >&, bool isProxy);
};
diff --git a/src/network/kernel/qnetworkproxy_mac.cpp b/src/network/kernel/qnetworkproxy_mac.cpp
index 1e22212d5b..4139a7e281 100644
--- a/src/network/kernel/qnetworkproxy_mac.cpp
+++ b/src/network/kernel/qnetworkproxy_mac.cpp
@@ -157,8 +157,10 @@ QList<QNetworkProxy> macQueryInternal(const QNetworkProxyQuery &query)
return result; // failed
}
- if (isHostExcluded(dict, query.peerHostName()))
+ if (isHostExcluded(dict, query.peerHostName())) {
+ CFRelease(dict);
return result; // no proxy for this host
+ }
// is there a PAC enabled? If so, use it first.
CFNumberRef pacEnabled;
@@ -222,6 +224,7 @@ QList<QNetworkProxy> macQueryInternal(const QNetworkProxyQuery &query)
result << https;
}
+ CFRelease(dict);
return result;
}
diff --git a/src/network/socket/qtcpserver.cpp b/src/network/socket/qtcpserver.cpp
index 55f926d3f9..0640c7cccd 100644
--- a/src/network/socket/qtcpserver.cpp
+++ b/src/network/socket/qtcpserver.cpp
@@ -577,7 +577,7 @@ void QTcpServer::incomingConnection(int socketDescriptor)
/*!
This function is called by QTcpServer::incomingConnection()
- to add a socket to the list of pending incoming connections.
+ to add the \a socket to the list of pending incoming connections.
\note Don't forget to call this member from reimplemented
incomingConnection() if you do not want to break the
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index f85fa8449b..f73068eb8b 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -574,7 +574,7 @@ void QSslSocket::setProtocol(QSsl::SslProtocol protocol)
certificate is valid.
The default mode is AutoVerifyPeer, which tells QSslSocket to use
- VerifyPeer for clients, QueryPeer for clients.
+ VerifyPeer for clients and QueryPeer for servers.
\sa setPeerVerifyMode(), peerVerifyDepth(), mode()
*/
@@ -594,7 +594,7 @@ QSslSocket::PeerVerifyMode QSslSocket::peerVerifyMode() const
certificate is valid.
The default mode is AutoVerifyPeer, which tells QSslSocket to use
- VerifyPeer for clients, QueryPeer for clients.
+ VerifyPeer for clients and QueryPeer for servers.
Setting this mode after encryption has started has no effect on the
current connection.
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 1d794ae624..b4d030c806 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -59,6 +59,8 @@
#include <QtCore/qvarlengtharray.h>
#include <QLibrary> // for loading the security lib for the CA store
+QT_BEGIN_NAMESPACE
+
#if defined(Q_OS_MAC)
#define kSecTrustSettingsDomainSystem 2 // so we do not need to include the header file
PtrSecCertificateGetData QSslSocketPrivate::ptrSecCertificateGetData = 0;
@@ -72,8 +74,6 @@
#include <QtCore/private/qcore_symbian_p.h>
#endif
-QT_BEGIN_NAMESPACE
-
bool QSslSocketPrivate::s_libraryLoaded = false;
bool QSslSocketPrivate::s_loadedCiphersAndCerts = false;
@@ -475,27 +475,12 @@ bool QSslSocketPrivate::ensureLibraryLoaded()
void QSslSocketPrivate::ensureCiphersAndCertsLoaded()
{
+ QMutexLocker locker(openssl_locks()->initLock());
if (s_loadedCiphersAndCerts)
return;
s_loadedCiphersAndCerts = true;
resetDefaultCiphers();
- setDefaultCaCertificates(systemCaCertificates());
-}
-
-/*!
- \internal
-
- Declared static in QSslSocketPrivate, makes sure the SSL libraries have
- been initialized.
-*/
-
-void QSslSocketPrivate::ensureInitialized()
-{
- if (!supportsSsl())
- return;
-
- ensureCiphersAndCertsLoaded();
//load symbols needed to receive certificates from system store
#if defined(Q_OS_MAC)
@@ -532,6 +517,22 @@ void QSslSocketPrivate::ensureInitialized()
qWarning("could not load crypt32 library"); // should never happen
}
#endif
+ setDefaultCaCertificates(systemCaCertificates());
+}
+
+/*!
+ \internal
+
+ Declared static in QSslSocketPrivate, makes sure the SSL libraries have
+ been initialized.
+*/
+
+void QSslSocketPrivate::ensureInitialized()
+{
+ if (!supportsSsl())
+ return;
+
+ ensureCiphersAndCertsLoaded();
}
/*!
@@ -970,8 +971,20 @@ void QSslSocketBackendPrivate::transmit()
#endif
plainSocket->disconnectFromHost();
break;
+ case SSL_ERROR_SYSCALL: // some IO error
+ case SSL_ERROR_SSL: // error in the SSL library
+ // we do not know exactly what the error is, nor whether we can recover from it,
+ // so just return to prevent an endless loop in the outer "while" statement
+ q->setErrorString(QSslSocket::tr("Error while reading: %1").arg(SSL_ERRORSTR()));
+ q->setSocketError(QAbstractSocket::UnknownSocketError);
+ emit q->error(QAbstractSocket::UnknownSocketError);
+ return;
default:
- // ### Handle errors better.
+ // SSL_ERROR_WANT_CONNECT, SSL_ERROR_WANT_ACCEPT: can only happen with a
+ // BIO_s_connect() or BIO_s_accept(), which we do not call.
+ // SSL_ERROR_WANT_X509_LOOKUP: can only happen with a
+ // SSL_CTX_set_client_cert_cb(), which we do not call.
+ // So this default case should never be triggered.
q->setErrorString(QSslSocket::tr("Error while reading: %1").arg(SSL_ERRORSTR()));
q->setSocketError(QAbstractSocket::UnknownSocketError);
emit q->error(QAbstractSocket::UnknownSocketError);
@@ -1105,17 +1118,16 @@ bool QSslSocketBackendPrivate::startHandshake()
QString peerName = (verificationPeerName.isEmpty () ? q->peerName() : verificationPeerName);
QString commonName = configuration.peerCertificate.subjectInfo(QSslCertificate::CommonName);
- QRegExp regexp(commonName, Qt::CaseInsensitive, QRegExp::Wildcard);
- if (!regexp.exactMatch(peerName)) {
+ if (!isMatchingHostname(commonName.toLower(), peerName.toLower())) {
bool matched = false;
foreach (const QString &altName, configuration.peerCertificate
.alternateSubjectNames().values(QSsl::DnsEntry)) {
- regexp.setPattern(altName);
- if (regexp.exactMatch(peerName)) {
+ if (isMatchingHostname(altName.toLower(), peerName.toLower())) {
matched = true;
break;
}
}
+
if (!matched) {
// No matches in common names or alternate names.
QSslError error(QSslError::HostNameMismatch, configuration.peerCertificate);
@@ -1245,4 +1257,39 @@ QList<QSslCertificate> QSslSocketBackendPrivate::STACKOFX509_to_QSslCertificates
return certificates;
}
+bool QSslSocketBackendPrivate::isMatchingHostname(const QString &cn, const QString &hostname)
+{
+ int wildcard = cn.indexOf(QLatin1Char('*'));
+
+ // Check this is a wildcard cert, if not then just compare the strings
+ if (wildcard < 0)
+ return cn == hostname;
+
+ int firstCnDot = cn.indexOf(QLatin1Char('.'));
+ int secondCnDot = cn.indexOf(QLatin1Char('.'), firstCnDot+1);
+
+ // Check at least 3 components
+ if ((-1 == secondCnDot) || (secondCnDot+1 >= cn.length()))
+ return false;
+
+ // Check * is last character of 1st component (ie. there's a following .)
+ if (wildcard+1 != firstCnDot)
+ return false;
+
+ // Check only one star
+ if (cn.lastIndexOf(QLatin1Char('*')) != wildcard)
+ return false;
+
+ // Check characters preceding * (if any) match
+ if (wildcard && (hostname.leftRef(wildcard) != cn.leftRef(wildcard)))
+ return false;
+
+ // Check characters following first . match
+ if (hostname.midRef(hostname.indexOf(QLatin1Char('.'))) != cn.midRef(firstCnDot))
+ return false;
+
+ // Ok, I guess this was a wildcard CN and the hostname matches.
+ return true;
+}
+
QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslsocket_openssl_p.h b/src/network/ssl/qsslsocket_openssl_p.h
index 987dfae6f6..7a4e6b6e04 100644
--- a/src/network/ssl/qsslsocket_openssl_p.h
+++ b/src/network/ssl/qsslsocket_openssl_p.h
@@ -116,6 +116,7 @@ public:
static QSslCipher QSslCipher_from_SSL_CIPHER(SSL_CIPHER *cipher);
static QList<QSslCertificate> STACKOFX509_to_QSslCertificates(STACK_OF(X509) *x509);
+ Q_AUTOTEST_EXPORT static bool isMatchingHostname(const QString &cn, const QString &hostname);
};
#if defined(Q_OS_SYMBIAN)
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index ee49a3d00c..d3f6a295e4 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -1128,7 +1128,7 @@ void QGL2PaintEngineEx::fill(const QVectorPath &path, const QBrush &brush)
d->fill(path);
}
-extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp
+extern Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp
void QGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 2f16b9928d..0f171e407b 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -1334,6 +1334,10 @@ QGLFormat::OpenGLVersionFlags Q_AUTOTEST_EXPORT qOpenGLVersionFlagsFromString(co
\value OpenGL_Version_3_2 OpenGL version 3.2 or higher is present.
+ \value OpenGL_Version_3_3 OpenGL version 3.3 or higher is present.
+
+ \value OpenGL_Version_4_0 OpenGL version 4.0 or higher is present.
+
\value OpenGL_ES_CommonLite_Version_1_0 OpenGL ES version 1.0 Common Lite or higher is present.
\value OpenGL_ES_Common_Version_1_0 OpenGL ES version 1.0 Common or higher is present.
@@ -3725,7 +3729,7 @@ QGLWidget::~QGLWidget()
#endif
delete d->glcx;
d->glcx = 0;
-#if defined(Q_WGL)
+#if defined(Q_WS_WIN)
delete d->olcx;
d->olcx = 0;
#endif
@@ -5044,8 +5048,9 @@ void QGLWidget::deleteTexture(QMacCompatGLuint id)
/*!
\since 4.4
- Calls the corresponding QGLContext::drawTexture() on
- this widget's context.
+ Calls the corresponding QGLContext::drawTexture() with
+ \a target, \a textureId, and \a textureTarget for this
+ widget's context.
*/
void QGLWidget::drawTexture(const QRectF &target, GLuint textureId, GLenum textureTarget)
{
@@ -5065,8 +5070,9 @@ void QGLWidget::drawTexture(const QRectF &target, QMacCompatGLuint textureId, QM
/*!
\since 4.4
- Calls the corresponding QGLContext::drawTexture() on
- this widget's context.
+ Calls the corresponding QGLContext::drawTexture() with
+ \a point, \a textureId, and \a textureTarget for this
+ widget's context.
*/
void QGLWidget::drawTexture(const QPointF &point, GLuint textureId, GLenum textureTarget)
{
diff --git a/src/opengl/qglbuffer.cpp b/src/opengl/qglbuffer.cpp
index d6e0109e3e..5f0aed4422 100644
--- a/src/opengl/qglbuffer.cpp
+++ b/src/opengl/qglbuffer.cpp
@@ -416,7 +416,7 @@ void QGLBuffer::allocate(const void *data, int count)
\sa release(), create()
*/
-bool QGLBuffer::bind() const
+bool QGLBuffer::bind()
{
#ifndef QT_NO_DEBUG
if (!isCreated())
@@ -448,7 +448,7 @@ bool QGLBuffer::bind() const
\sa bind()
*/
-void QGLBuffer::release() const
+void QGLBuffer::release()
{
#ifndef QT_NO_DEBUG
if (!isCreated())
diff --git a/src/opengl/qglbuffer.h b/src/opengl/qglbuffer.h
index a1b45ffb87..9867f319d1 100644
--- a/src/opengl/qglbuffer.h
+++ b/src/opengl/qglbuffer.h
@@ -101,8 +101,8 @@ public:
void destroy();
- bool bind() const;
- void release() const;
+ bool bind();
+ void release();
static void release(QGLBuffer::Type type);
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index 6571a76b3d..ef115bd37e 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -499,10 +499,9 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint &
}
}
#endif
- if (d_ptr->paintedRegion.boundingRect() != geometry()) {
- // Emits warning if not supported. Should never happen unless
- // setPartialUpdateSupport(true) has been called.
- context()->d_func()->swapRegion(&d_ptr->paintedRegion);
+ if (d_ptr->paintedRegion.boundingRect() != geometry() &&
+ hasPartialUpdateSupport()) {
+ context()->d_func()->swapRegion(&d_ptr->paintedRegion);
} else
context()->swapBuffers();
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index 4992ef5a71..1d633ed662 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -55,6 +55,7 @@
#include <QtGui/private/qfontengine_p.h>
#include <QtGui/private/qpainterpath_p.h>
#include <QtGui/private/qstatictext_p.h>
+#include <QtCore/qmath.h>
#include <QDebug>
#include <QSet>
@@ -1610,7 +1611,10 @@ void QVGPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op)
// Try converting the path into a QRegion that tightly follows
// the outline of the path we want to clip with.
- QRegion region(path.convertToPainterPath().toFillPolygon(QTransform()).toPolygon());
+ QRegion region;
+ if (!path.isEmpty())
+ region = QRegion(path.convertToPainterPath().toFillPolygon(QTransform()).toPolygon());
+
switch (op) {
case Qt::NoClip:
{
@@ -3427,7 +3431,13 @@ void QVGPaintEngine::drawStaticTextItem(QStaticTextItem *textItem)
// Set the transformation to use for drawing the current glyphs.
QTransform glyphTransform(d->pathTransform);
- glyphTransform.translate(p.x(), p.y());
+ if (d->transform.type() <= QTransform::TxTranslate) {
+ // Prevent blurriness of unscaled, unrotated text by using integer coordinates.
+ // Using ceil(x-0.5) instead of qRound() or int-cast, behave like other paint engines.
+ glyphTransform.translate(ceil(p.x() - 0.5), ceil(p.y() - 0.5));
+ } else {
+ glyphTransform.translate(p.x(), p.y());
+ }
#if defined(QVG_NO_IMAGE_GLYPHS)
glyphTransform.scale(glyphCache->scaleX, glyphCache->scaleY);
#endif
diff --git a/src/plugins/accessible/widgets/complexwidgets.cpp b/src/plugins/accessible/widgets/complexwidgets.cpp
index 8be156024c..803786fa01 100644
--- a/src/plugins/accessible/widgets/complexwidgets.cpp
+++ b/src/plugins/accessible/widgets/complexwidgets.cpp
@@ -1512,10 +1512,14 @@ QString QAccessibleTabBar::text(Text t, int child) const
default:
break;
}
- } else if (child > 0) {
+ } else {
switch (t) {
case Name:
- return qt_accStripAmp(tabBar()->tabText(child - 1));
+ if (child > 0)
+ return qt_accStripAmp(tabBar()->tabText(child - 1));
+ else if (tabBar()->currentIndex() != -1)
+ return qt_accStripAmp(tabBar()->tabText(tabBar()->currentIndex()));
+ break;
default:
break;
}
diff --git a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
index 499eb1dd7f..662663d912 100644
--- a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
+++ b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
@@ -984,7 +984,7 @@ int QAccessibleDockWidget::childCount() const
int QAccessibleDockWidget::indexOfChild(const QAccessibleInterface *child) const
{
if (child) {
- if (qobject_cast<QDockWidget *>(child->object()) == dockWidget() && child->role(0) == TitleBar) {
+ if (child->role(0) == TitleBar) {
return 1;
} else {
return 2; //###
@@ -1214,7 +1214,7 @@ int QAccessibleTitleBar::childAt(int x, int y) const
QObject *QAccessibleTitleBar::object() const
{
- return m_dockWidget;
+ return 0;
}
QDockWidgetLayout *QAccessibleTitleBar::dockWidgetLayout() const
diff --git a/src/plugins/bearer/bearer.pro b/src/plugins/bearer/bearer.pro
index f95e8af94d..6d8f7f2572 100644
--- a/src/plugins/bearer/bearer.pro
+++ b/src/plugins/bearer/bearer.pro
@@ -4,7 +4,8 @@ contains(QT_CONFIG, dbus) {
contains(QT_CONFIG, icd) {
SUBDIRS += icd
} else {
- SUBDIRS += networkmanager generic
+ SUBDIRS += generic
+ !mac:SUBDIRS += connman networkmanager
}
}
diff --git a/src/plugins/bearer/connman/connman.pro b/src/plugins/bearer/connman/connman.pro
new file mode 100644
index 0000000000..4be752bcca
--- /dev/null
+++ b/src/plugins/bearer/connman/connman.pro
@@ -0,0 +1,19 @@
+TARGET = qconnmanbearer
+include(../../qpluginbase.pri)
+
+QT = core network dbus
+
+HEADERS += qconnmanservice_linux_p.h \
+ qconnmanengine.h \
+ ../qnetworksession_impl.h \
+ ../qbearerengine_impl.h
+
+SOURCES += main.cpp \
+ qconnmanservice_linux.cpp \
+ qconnmanengine.cpp \
+ ../qnetworksession_impl.cpp
+
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer
+target.path += $$[QT_INSTALL_PLUGINS]/bearer
+INSTALLS += target
+
diff --git a/tools/qtestlib/chart/database.h b/src/plugins/bearer/connman/main.cpp
index 9a67490fd8..d483cf070b 100644
--- a/tools/qtestlib/chart/database.h
+++ b/src/plugins/bearer/connman/main.cpp
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the tools applications of the Qt Toolkit.
+** This file is part of the plugins of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -38,68 +38,56 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef DATABASE_H
-#define DATABASE_H
+#include "qconnmanengine.h"
-#include <QtCore>
-#include <QtSql>
-#include <QtCore/qglobal.h>
+#include <QtNetwork/private/qbearerplugin_p.h>
-QT_BEGIN_NAMESPACE
-
-extern QString resultsTable;
-QSqlDatabase openDataBase(const QString &databaseFile = "database");
-QSqlDatabase createDataBase(const QString &databaseFile = "database");
-
-void loadXml(const QStringList &fileNames);
-void loadXml(const QString &fileName, const QString &context=QString::null);
-void loadXml(const QByteArray &xml, const QString &context=QString::null);
+#include <QtCore/qdebug.h>
-void execQuery(QSqlQuery query, bool warnOnFail = true);
-void execQuery(const QString &spec, bool warnOnFail = true);
-void printDataBase();
-void displayTable(const QString &table);
+#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_DBUS
+QT_BEGIN_NAMESPACE
-class TempTable
+class QConnmanEnginePlugin : public QBearerEnginePlugin
{
public:
- TempTable(const QString &spec);
- ~TempTable();
- QString name();
-private:
- QString m_name;
+ QConnmanEnginePlugin();
+ ~QConnmanEnginePlugin();
+
+ QStringList keys() const;
+ QBearerEngine *create(const QString &key) const;
};
-enum ChartType { BarChart, LineChart };
-class DataBaseWriter
+QConnmanEnginePlugin::QConnmanEnginePlugin()
{
-public:
- DataBaseWriter();
- QString databaseFileName;
- QString testTitle;
- QString testName;
- QString testCaseName;
- ChartType chartType;
- QSize chartSize;
- QString chartTitle;
- QString qtVersion;
- bool disable;
-
- void openDatabase();
- void createDatabase();
+}
- void beginTransaction();
- void commitTransaction();
- void rollbackTransaction();
+QConnmanEnginePlugin::~QConnmanEnginePlugin()
+{
+}
- void addResult(const QString &result);
- void addResult(const QString &series , const QString &index, const QString &result, const QString &iterations = QLatin1String("1"));
+QStringList QConnmanEnginePlugin::keys() const
+{
+ return QStringList() << QLatin1String("connman");
+}
- QSqlDatabase db;
-};
+QBearerEngine *QConnmanEnginePlugin::create(const QString &key) const
+{
+ if (key == QLatin1String("connman")) {
+ QConnmanEngine *engine = new QConnmanEngine;
+ if (engine->connmanAvailable())
+ return engine;
+ else
+ delete engine;
+ }
+ return 0;
+}
+
+Q_EXPORT_STATIC_PLUGIN(QConnmanEnginePlugin)
+Q_EXPORT_PLUGIN2(qconnmanbearer, QConnmanEnginePlugin)
QT_END_NAMESPACE
#endif
-
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/connman/qconnmanengine.cpp b/src/plugins/bearer/connman/qconnmanengine.cpp
new file mode 100644
index 0000000000..87756233f4
--- /dev/null
+++ b/src/plugins/bearer/connman/qconnmanengine.cpp
@@ -0,0 +1,787 @@
+/****************************************************************************
+**
+** 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 plugins 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 "qconnmanengine.h"
+#include "qconnmanservice_linux_p.h"
+#include "../qnetworksession_impl.h"
+
+#include <QtNetwork/private/qnetworkconfiguration_p.h>
+
+#include <QtNetwork/qnetworksession.h>
+
+#include <QtCore/qdebug.h>
+
+#include <QtDBus/QtDBus>
+#include <QtDBus/QDBusConnection>
+#include <QtDBus/QDBusInterface>
+#include <QtDBus/QDBusMessage>
+#include <QtDBus/QDBusReply>
+
+#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_DBUS
+
+QT_BEGIN_NAMESPACE
+
+QConnmanEngine::QConnmanEngine(QObject *parent)
+: QBearerEngineImpl(parent),
+ connmanManager(new QConnmanManagerInterface(this))
+{
+}
+
+QConnmanEngine::~QConnmanEngine()
+{
+}
+
+bool QConnmanEngine::connmanAvailable() const
+{
+ QMutexLocker locker(&mutex);
+ return connmanManager->isValid();
+}
+
+void QConnmanEngine::initialize()
+{
+ connect(connmanManager,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(propertyChangedContext(QString,QString,QDBusVariant)));
+
+ foreach(const QString techPath, connmanManager->getTechnologies()) {
+ QConnmanTechnologyInterface *tech;
+ tech = new QConnmanTechnologyInterface(techPath, this);
+
+ connect(tech,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(technologyPropertyChangedContext(QString,QString,QDBusVariant)));
+
+ foreach(const QString devicePath,tech->getDevices()) {
+ QConnmanDeviceInterface *dev;
+ dev = new QConnmanDeviceInterface(devicePath);
+ if(!deviceMap.value(techPath).contains(devicePath)) {
+ connect(dev,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(devicePropertyChangedContext(QString,QString,QDBusVariant)));
+ deviceMap.insert(techPath,QStringList() << devicePath);
+ foreach(const QString network,dev->getNetworks()) {
+ serviceNetworks.insert(getServiceForNetwork(network),network);
+ }
+ }
+ }
+ }
+
+ // Get current list of access points.
+ getConfigurations();
+}
+
+QList<QNetworkConfigurationPrivate *> QConnmanEngine::getConfigurations()
+{
+ QMutexLocker locker(&mutex);
+ // foundConfigurations.clear();
+ getNetworkListing();
+ QList<QNetworkConfigurationPrivate *> fetchedConfigurations;
+ QNetworkConfigurationPrivate* cpPriv = 0;
+
+ for (int i = 0; i < foundConfigurations.count(); ++i) {
+ QNetworkConfigurationPrivate *config = new QNetworkConfigurationPrivate;
+ cpPriv = foundConfigurations.at(i);
+
+ config->name = cpPriv->name;
+ config->isValid = cpPriv->isValid;
+ config->id = cpPriv->id;
+ config->state = cpPriv->state;
+ config->type = cpPriv->type;
+ config->roamingSupported = cpPriv->roamingSupported;
+ config->purpose = cpPriv->purpose;
+ config->bearer = cpPriv->bearer;
+
+ fetchedConfigurations.append(config);
+ }
+ return fetchedConfigurations;
+// return foundConfigurations;
+}
+
+void QConnmanEngine::getNetworkListing()
+{
+ QMutexLocker locker(&mutex);
+ QMapIterator<QString,QStringList> i(deviceMap);
+ while(i.hasNext()) {
+ i.next();
+ QConnmanDeviceInterface dev(i.value().at(0));
+ if(dev.isValid()) {
+ foreach(const QString network,dev.getNetworks()) {
+ addNetworkConfiguration(network);
+ }
+ }
+ }
+}
+
+
+
+void QConnmanEngine::doRequestUpdate()
+{
+ connmanManager->requestScan("");
+ getConfigurations();
+ emit updateCompleted();
+}
+
+QString QConnmanEngine::getInterfaceFromId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+ return configInterfaces.value(id);
+}
+
+bool QConnmanEngine::hasIdentifier(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+ return accessPointConfigurations.contains(id);
+}
+
+QString QConnmanEngine::bearerName(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+ QConnmanServiceInterface serv(serviceFromId(id));
+ QString connectionType = serv.getType();
+
+ if (connectionType == "ethernet")
+ return QLatin1String("Ethernet");
+ else if (connectionType == "wifi")
+ return QLatin1String("WLAN");
+ else if (connectionType == "cellular") {
+ QString mode = serv.getMode();
+ if(mode == "gprs" || mode == "edge") {
+ return QLatin1String("2G");
+ } else if(mode == "umts") {
+ return QLatin1String("WCDMA");
+ }
+ }
+ else if (connectionType == "wimax")
+ return QLatin1String("WIMAX");
+
+ return QString();
+}
+
+void QConnmanEngine::connectToId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+ QConnmanConnectThread *thread;
+ thread = new QConnmanConnectThread(this);
+ thread->setServicePath(serviceFromId(id));
+ thread->setIdentifier(id);
+ connect(thread,SIGNAL(connectionError(QString,QBearerEngineImpl::ConnectionError)),
+ this,SIGNAL(connectionError(QString,QBearerEngineImpl::ConnectionError)));
+ thread->start();
+}
+
+void QConnmanEngine::disconnectFromId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+ QConnmanServiceInterface serv(serviceFromId(id));
+ if(!serv.isValid()) {
+ emit connectionError(id, DisconnectionError);
+ } else {
+ serv.disconnect();
+ }
+}
+
+void QConnmanEngine::requestUpdate()
+{
+ QMutexLocker locker(&mutex);
+ QTimer::singleShot(0, this, SLOT(doRequestUpdate()));
+}
+
+QString QConnmanEngine::serviceFromId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+ foreach(const QString service, serviceNetworks.keys()) {
+ if (id == QString::number(qHash(service)))
+ return service;
+ }
+
+ return QString();
+}
+
+QNetworkSession::State QConnmanEngine::sessionStateForId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
+
+ if (!ptr)
+ return QNetworkSession::Invalid;
+
+ if (!ptr->isValid) {
+ return QNetworkSession::Invalid;
+
+ }
+ QString service = serviceFromId(id);
+ QConnmanServiceInterface serv(service);
+ QString servState = serv.getState();
+
+ if(serv.isFavorite() && (servState == "idle" || servState == "failure")) {
+ return QNetworkSession::Disconnected;
+ }
+
+ if(servState == "association" || servState == "configuration" || servState == "login") {
+ return QNetworkSession::Connecting;
+ }
+ if(servState == "ready" || servState == "online") {
+ return QNetworkSession::Connected;
+ }
+
+ if ((ptr->state & QNetworkConfiguration::Discovered) ==
+ QNetworkConfiguration::Discovered) {
+ return QNetworkSession::Disconnected;
+ } else if ((ptr->state & QNetworkConfiguration::Defined) == QNetworkConfiguration::Defined) {
+ return QNetworkSession::NotAvailable;
+ } else if ((ptr->state & QNetworkConfiguration::Undefined) ==
+ QNetworkConfiguration::Undefined) {
+ return QNetworkSession::NotAvailable;
+ }
+
+ return QNetworkSession::Invalid;
+}
+
+quint64 QConnmanEngine::bytesWritten(const QString &id)
+{//TODO use connman counter API
+ QMutexLocker locker(&mutex);
+ quint64 result = 0;
+ QString devFile = getInterfaceFromId(id);
+ QFile tx("/sys/class/net/"+devFile+"/statistics/tx_bytes");
+ if(tx.exists() && tx.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ QTextStream in(&tx);
+ in >> result;
+ tx.close();
+ }
+
+ return result;
+}
+
+quint64 QConnmanEngine::bytesReceived(const QString &id)
+{//TODO use connman counter API
+ QMutexLocker locker(&mutex);
+ quint64 result = 0;
+ QString devFile = getInterfaceFromId(id);
+ QFile rx("/sys/class/net/"+devFile+"/statistics/rx_bytes");
+ if(rx.exists() && rx.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ QTextStream in(&rx);
+ in >> result;
+ rx.close();
+ }
+ return result;
+}
+
+quint64 QConnmanEngine::startTime(const QString &/*id*/)
+{
+ // TODO
+ QMutexLocker locker(&mutex);
+ if (activeTime.isNull()) {
+ return 0;
+ }
+ return activeTime.secsTo(QDateTime::currentDateTime());
+}
+
+QNetworkConfigurationManager::Capabilities QConnmanEngine::capabilities() const
+{
+ return QNetworkConfigurationManager::ForcedRoaming |
+ QNetworkConfigurationManager::DataStatistics |
+ QNetworkConfigurationManager::CanStartAndStopInterfaces;
+}
+
+QNetworkSessionPrivate *QConnmanEngine::createSessionBackend()
+{
+ return new QNetworkSessionPrivateImpl;
+}
+
+QNetworkConfigurationPrivatePointer QConnmanEngine::defaultConfiguration()
+{
+ return QNetworkConfigurationPrivatePointer();
+}
+
+
+QString QConnmanEngine::getServiceForNetwork(const QString &netPath)
+{
+ QMutexLocker locker(&mutex);
+ QConnmanNetworkInterface network(netPath, this);
+ foreach(QString service,connmanManager->getServices()) {
+ QConnmanServiceInterface serv(service,this);
+ if(serv.getName() == network.getName()
+ && network.getSignalStrength() == serv.getSignalStrength()) {
+ return service;
+ }
+ }
+ return QString();
+}
+
+
+void QConnmanEngine::propertyChangedContext(const QString &path,const QString &item, const QDBusVariant &value)
+{
+ Q_UNUSED(path);
+// qDebug() << __FUNCTION__ << path << item << value.variant();
+
+ QMutexLocker locker(&mutex);
+ if(item == "Services") {
+ QDBusArgument arg = qvariant_cast<QDBusArgument>(value.variant());
+ QStringList list = qdbus_cast<QStringList>(arg);
+
+ if(list.count() > accessPointConfigurations.count()) {
+ foreach(const QString service, list) {
+ addServiceConfiguration(service);
+ }
+ }
+ }
+
+ if(item == "Technologies") {
+ QDBusArgument arg = qvariant_cast<QDBusArgument>(value.variant());
+ QStringList newlist = qdbus_cast<QStringList>(arg);
+ if(newlist.count() > 0) {
+ QMap<QString,QConnmanTechnologyInterface *> oldtech = technologies;
+
+ foreach(const QString listPath, newlist) {
+ if(!oldtech.contains(listPath)) {
+ QConnmanTechnologyInterface *tech;
+ tech = new QConnmanTechnologyInterface(listPath,this);
+ connect(tech,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(technologyPropertyChangedContext(QString,QString,QDBusVariant)));
+ technologies.insert(listPath, tech);
+ }
+ }
+
+ foreach(const QString old, oldtech.keys()) {
+ if(!newlist.contains(old)) {
+ QConnmanTechnologyInterface *tech = oldtech.value(old);
+ disconnect(tech,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(technologyPropertyChangedContext(QString,QString,QDBusVariant)));
+
+ technologies.remove(old);
+ getNetworkListing();
+ }
+ }
+ }
+ }
+ if(item == "State") {
+// qDebug() << value.variant();
+ }
+}
+
+void QConnmanEngine::servicePropertyChangedContext(const QString &path,const QString &item, const QDBusVariant &value)
+{
+ QMutexLocker locker(&mutex);
+ if(item == "State") {
+ configurationChange(QString::number(qHash(path)));
+
+ if(value.variant().toString() == "failure") {
+ QConnmanServiceInterface serv(path);
+ emit connectionError(QString::number(qHash(path)), ConnectError);
+ }
+ }
+}
+
+void QConnmanEngine::networkPropertyChangedContext(const QString &/*path*/,const QString &/*item*/, const QDBusVariant &/*value*/)
+{
+ QMutexLocker locker(&mutex);
+}
+
+void QConnmanEngine::devicePropertyChangedContext(const QString &devpath,const QString &item,const QDBusVariant &value)
+{
+ QMutexLocker locker(&mutex);
+ if(item == "Networks") {
+ QDBusArgument arg = qvariant_cast<QDBusArgument>(value.variant());
+ QStringList remainingNetworks = qdbus_cast<QStringList>(arg);
+ QString devicetype;
+ QMapIterator<QString,QStringList> i(deviceMap);
+ while(i.hasNext()) {
+ i.next();
+ if(i.value().contains(devpath)) {
+ devicetype = i.key().section("/",-1);
+ }
+ }
+
+ QStringList oldnetworks = knownNetworks[devicetype];
+
+ if(remainingNetworks.count() > oldnetworks.count()) {
+ foreach(const QString netPath, remainingNetworks) {
+ if(!oldnetworks.contains(netPath)) {
+ addNetworkConfiguration(netPath);
+ }
+ }
+ } else {
+ foreach(const QString netPath, oldnetworks) {
+ QString servicePath = serviceNetworks.key(netPath);
+ if(!remainingNetworks.contains(netPath)) {
+ if(servicePath.isEmpty()) {
+ removeConfiguration(QString::number(qHash(netPath)));
+ } else {
+ removeConfiguration(QString::number(qHash(servicePath)));
+ }
+ knownNetworks[devicetype].removeAll(netPath);
+ }
+ }
+ }
+ }
+}
+
+void QConnmanEngine::technologyPropertyChangedContext(const QString & path, const QString &item, const QDBusVariant &value)
+{
+ if(item == "Devices") {
+ QDBusArgument arg = qvariant_cast<QDBusArgument>(value.variant());
+ QStringList list = qdbus_cast<QStringList>(arg);
+ }
+ if(item == "State") {
+
+ if(value.variant().toString() == "available") {
+ QConnmanTechnologyInterface tech(connmanManager->getPathForTechnology(path));
+ foreach(const QString devPath, tech.getDevices()) {
+
+ if(!deviceMap.value(path).contains(devPath)) {
+ QConnmanDeviceInterface *dev;
+ dev = new QConnmanDeviceInterface(devPath,this);
+ connect(dev,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(devicePropertyChangedContext(QString,QString,QDBusVariant)));
+ deviceMap.insert(path,QStringList() << devPath);
+ }
+ }
+ }
+ if(value.variant().toString() == "offline") {
+ deviceMap.remove(path);
+ }
+ }
+}
+
+void QConnmanEngine::configurationChange(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ if (accessPointConfigurations.contains(id)) {
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
+
+ QString servicePath = serviceFromId(id);
+ QConnmanServiceInterface *serv;
+ serv = new QConnmanServiceInterface(servicePath);
+ QString networkName = serv->getName();
+
+ QNetworkConfiguration::StateFlags curState = getStateForService(servicePath);
+
+ ptr->mutex.lock();
+
+ if (!ptr->isValid) {
+ ptr->isValid = true;
+ }
+
+ if (ptr->name != networkName) {
+ ptr->name = networkName;
+ }
+
+ if (ptr->state != curState) {
+ ptr->state = curState;
+ }
+
+ ptr->mutex.unlock();
+
+ locker.unlock();
+ emit configurationChanged(ptr);
+ locker.relock();
+
+ }
+ locker.unlock();
+ emit updateCompleted();
+}
+
+QNetworkConfiguration::StateFlags QConnmanEngine::getStateForService(const QString &service)
+{
+ QMutexLocker locker(&mutex);
+ QConnmanServiceInterface serv(service);
+ QNetworkConfiguration::StateFlags flag = QNetworkConfiguration::Defined;
+ if(serv.isFavorite()) {
+ flag = ( flag | QNetworkConfiguration::Discovered);
+ } else {
+ flag = QNetworkConfiguration::Undefined;
+ }
+
+ if(serv.getState() == "ready" || serv.getState() == "online") {
+ flag = ( flag | QNetworkConfiguration::Active);
+ }
+
+ return flag;
+}
+
+QString QConnmanEngine::typeToBearer(const QString &type)
+{
+ QMutexLocker locker(&mutex);
+ if(type == "wifi")
+ return "WLAN";
+ if(type == "ethernet")
+ return "Ethernet";
+ if(type == "bluetooth")
+ return "Bluetooth";
+ if(type == "cellular") {
+ return "Cellular";
+ // not handled: CDMA2000 HSPA
+ }
+ if(type == "wimax")
+ return "WiMax";
+// if(type == "gps")
+// if(type == "vpn")
+
+ return "Unknown";
+}
+
+void QConnmanEngine::removeConfiguration(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ if (accessPointConfigurations.contains(id)) {
+
+ QString service = serviceFromId(id);
+ QConnmanServiceInterface serv(service);
+
+ disconnect(&serv,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(servicePropertyChangedContext(QString,QString, QDBusVariant)));
+
+ QString netPath = serviceNetworks.value(service);
+ serviceNetworks.remove(service);
+
+ QConnmanServiceInterface network(netPath);
+ disconnect(&network,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(networkPropertyChangedContext(QString,QString, QDBusVariant)));
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.take(id);
+ locker.unlock();
+ emit configurationRemoved(ptr);
+ locker.relock();
+ }
+}
+
+void QConnmanEngine::addServiceConfiguration(const QString &servicePath)
+{
+
+ QMutexLocker locker(&mutex);
+ QConnmanServiceInterface *serv;
+ serv = new QConnmanServiceInterface(servicePath);
+ const QString netPath = serviceNetworks.value(servicePath);
+
+ QConnmanNetworkInterface *network;
+ network = new QConnmanNetworkInterface(netPath, this);
+
+
+ const QString id = QString::number(qHash(servicePath));
+
+ if (!accessPointConfigurations.contains(id)) {
+ QConnmanDeviceInterface device(netPath.section("/",0,5),this);
+
+ serviceNetworks.insert(servicePath,netPath);
+
+ knownNetworks[device.getType()].append(netPath);
+
+ connect(serv,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(servicePropertyChangedContext(QString,QString, QDBusVariant)));
+ QNetworkConfigurationPrivate* cpPriv = new QNetworkConfigurationPrivate();
+
+ QString networkName = serv->getName();
+
+ if(serv->getType() == "Cellular") {
+ networkName = serv->getAPN();
+ }
+
+ cpPriv->name = networkName;
+ cpPriv->isValid = true;
+ cpPriv->id = id;
+ cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
+ cpPriv->bearer = bearerName(id);
+
+ if(serv->getSecurity() == "none") {
+ cpPriv->purpose = QNetworkConfiguration::PublicPurpose;
+ } else {
+ cpPriv->purpose = QNetworkConfiguration::PrivatePurpose;
+ }
+
+ connect(network,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(networkPropertyChangedContext(QString,QString, QDBusVariant)));
+
+ cpPriv->state = getStateForService(servicePath);
+
+ QNetworkConfigurationPrivatePointer ptr(cpPriv);
+ accessPointConfigurations.insert(ptr->id, ptr);
+ foundConfigurations.append(cpPriv);
+ configInterfaces[cpPriv->id] = device.getInterface();
+
+
+ locker.unlock();
+ emit configurationAdded(ptr);
+ locker.relock();
+ emit updateCompleted();
+ }
+}
+
+void QConnmanEngine::addNetworkConfiguration(const QString &networkPath)
+{
+ QMutexLocker locker(&mutex);
+
+ QConnmanNetworkInterface *network;
+ network = new QConnmanNetworkInterface(networkPath, this);
+ QString servicePath = getServiceForNetwork(networkPath);
+ QConnmanServiceInterface *serv;
+
+ QString id;
+ QConnmanDeviceInterface device(networkPath.section("/",0,5),this);
+
+ if(servicePath.isEmpty()) {
+ id = QString::number(qHash(networkPath));
+ } else {
+ id = QString::number(qHash(servicePath));
+ serv = new QConnmanServiceInterface(servicePath,this);
+ connect(serv,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(servicePropertyChangedContext(QString,QString, QDBusVariant)));
+ }
+
+ if (!accessPointConfigurations.contains(id)) {
+
+ knownNetworks[device.getType()].append(networkPath);
+
+ serviceNetworks.insert(servicePath,networkPath);
+
+ connect(network,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(networkPropertyChangedContext(QString,QString, QDBusVariant)));
+
+ QNetworkConfigurationPrivate* cpPriv = new QNetworkConfigurationPrivate();
+
+ QString networkName = network->getName();
+
+ if(networkName.isEmpty())
+ networkName = "Hidden Network";
+
+ QString bearerName;
+
+ if(servicePath.isEmpty()) {
+ QString devicePath = networkPath.section("/",0,5);
+ QConnmanDeviceInterface device(devicePath,this);
+ bearerName = typeToBearer(device.getType());
+ } else {
+ bearerName = typeToBearer(serv->getType());
+ }
+
+ if(bearerName == "Cellular") {
+ QString mode = serv->getMode();
+ if(mode == "gprs" || mode == "edge") {
+ bearerName = "2G";
+ } else if(mode == "umts") {
+ bearerName = "WCDMA";
+ }
+ networkName = serv->getAPN();
+ }
+
+ cpPriv->name = networkName;
+ cpPriv->isValid = true;
+ cpPriv->id = id;
+ cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
+ cpPriv->bearer = bearerName;
+
+ if(network->getWifiSecurity() == "none") {
+ cpPriv->purpose = QNetworkConfiguration::PublicPurpose;
+ } else {
+ cpPriv->purpose = QNetworkConfiguration::PrivatePurpose;
+ }
+
+ if(servicePath.isEmpty())
+ cpPriv->state = QNetworkConfiguration::Undefined;
+ else
+ cpPriv->state = getStateForService(servicePath);
+
+ QNetworkConfigurationPrivatePointer ptr(cpPriv);
+ accessPointConfigurations.insert(ptr->id, ptr);
+ foundConfigurations.append(cpPriv);
+ configInterfaces[cpPriv->id] = device.getInterface();
+
+ locker.unlock();
+ emit configurationAdded(ptr);
+ locker.relock();
+ emit updateCompleted();
+ }
+}
+
+bool QConnmanEngine::requiresPolling() const
+{
+ return false;
+}
+
+
+QConnmanConnectThread::QConnmanConnectThread(QObject *parent)
+ :QThread(parent),
+ servicePath(), identifier()
+{
+}
+
+QConnmanConnectThread::~QConnmanConnectThread()
+{
+}
+
+void QConnmanConnectThread::stop()
+{
+ if(currentThread() != this) {
+ QMetaObject::invokeMethod(this, "quit",
+ Qt::QueuedConnection);
+ } else {
+ quit();
+ }
+ wait();
+}
+
+void QConnmanConnectThread::run()
+{
+ QConnmanServiceInterface serv(servicePath);
+ if(!serv.isValid()) {
+ emit connectionError(identifier, QBearerEngineImpl::InterfaceLookupError);
+ } else {
+ serv.connect();
+ }
+}
+
+void QConnmanConnectThread::setServicePath(const QString &path)
+{
+ QMutexLocker locker(&mutex);
+ servicePath = path;
+}
+
+void QConnmanConnectThread::setIdentifier(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+ identifier = id;
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/connman/qconnmanengine.h b/src/plugins/bearer/connman/qconnmanengine.h
new file mode 100644
index 0000000000..0f6dc1c715
--- /dev/null
+++ b/src/plugins/bearer/connman/qconnmanengine.h
@@ -0,0 +1,179 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QCONNMANENGINE_P_H
+#define QCONNMANENGINE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of the QLibrary class. This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "../qbearerengine_impl.h"
+
+#include "qconnmanservice_linux_p.h"
+
+#include <QMap>
+#include <QVariant>
+#include <QtCore/qthread.h>
+
+#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_DBUS
+
+QT_BEGIN_NAMESPACE
+
+class QConnmanConnectThread;
+class QConnmanEngine : public QBearerEngineImpl
+{
+ Q_OBJECT
+
+public:
+ QConnmanEngine(QObject *parent = 0);
+ ~QConnmanEngine();
+
+ bool connmanAvailable() const;
+
+ virtual QString getInterfaceFromId(const QString &id);
+ bool hasIdentifier(const QString &id);
+
+ virtual QString bearerName(const QString &id);
+
+ virtual void connectToId(const QString &id);
+ virtual void disconnectFromId(const QString &id);
+
+ Q_INVOKABLE void initialize();
+ Q_INVOKABLE void requestUpdate();
+
+ QNetworkSession::State sessionStateForId(const QString &id);
+ QNetworkSessionPrivate *createSessionBackend();
+
+ virtual quint64 bytesWritten(const QString &id);
+ virtual quint64 bytesReceived(const QString &id);
+ virtual quint64 startTime(const QString &id);
+
+
+ virtual QNetworkConfigurationManager::Capabilities capabilities() const;
+ virtual QNetworkConfigurationPrivatePointer defaultConfiguration();
+
+ void configurationChange(const QString &id);
+ QList<QNetworkConfigurationPrivate *> getConfigurations();
+
+
+private Q_SLOTS:
+
+ void doRequestUpdate();
+ void servicePropertyChangedContext(const QString &,const QString &,const QDBusVariant &);
+ void networkPropertyChangedContext(const QString &,const QString &,const QDBusVariant &);
+ void devicePropertyChangedContext(const QString &,const QString &,const QDBusVariant &);
+ void propertyChangedContext(const QString &,const QString &,const QDBusVariant &);
+ void technologyPropertyChangedContext(const QString &,const QString &, const QDBusVariant &);
+
+private:
+ QConnmanManagerInterface *connmanManager;
+
+ QList<QNetworkConfigurationPrivate *> foundConfigurations;
+
+ void getNetworkListing();
+
+ QString getServiceForNetwork(const QString &network);
+
+ QString serviceFromId(const QString &id);
+ QString networkFromId(const QString &id);
+
+ QNetworkConfiguration::StateFlags getStateForService(const QString &service);
+ QString typeToBearer(const QString &type);
+
+ void removeConfiguration(const QString &servicePath);
+ void addServiceConfiguration(const QString &servicePath);
+ void addNetworkConfiguration(const QString &worknetPath);
+ QDateTime activeTime;
+
+
+ QMap<QString,QConnmanTechnologyInterface *> technologies; // techpath, tech interface
+ QMap<QString,QString> configInterfaces; // id, interface name
+ QMap<QString,QStringList> knownNetworks; //device path, net paths list
+ QMap<QString,QStringList> deviceMap; //tech path, device path
+ QMap<QString, QString> serviceNetworks; //service, network
+
+
+protected:
+ bool requiresPolling() const;
+ QConnmanConnectThread *connThread;
+};
+
+class QConnmanConnectThread : public QThread
+{
+ Q_OBJECT
+
+public:
+ QConnmanConnectThread(QObject *parent = 0);
+ ~QConnmanConnectThread();
+ bool keepRunning;
+ void stop();
+ void setServicePath(const QString &path);
+ void setIdentifier(const QString &id);
+
+Q_SIGNALS:
+ void connectionError(const QString &id, QBearerEngineImpl::ConnectionError error);
+
+protected:
+ void run();
+ QString servicePath;
+ QString identifier;
+
+private:
+ QMutex mutex;
+
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
+#endif // QT_NO_BEARERMANAGEMENT
+
+#endif
+
diff --git a/src/plugins/bearer/connman/qconnmanservice_linux.cpp b/src/plugins/bearer/connman/qconnmanservice_linux.cpp
new file mode 100644
index 0000000000..b20e7c1335
--- /dev/null
+++ b/src/plugins/bearer/connman/qconnmanservice_linux.cpp
@@ -0,0 +1,1072 @@
+/****************************************************************************
+**
+** 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 plugins 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 <QObject>
+#include <QList>
+#include <QtDBus/QtDBus>
+#include <QtDBus/QDBusConnection>
+#include <QtDBus/QDBusError>
+#include <QtDBus/QDBusInterface>
+#include <QtDBus/QDBusMessage>
+#include <QtDBus/QDBusReply>
+#include <QtDBus/QDBusPendingCallWatcher>
+#include <QtDBus/QDBusObjectPath>
+#include <QtDBus/QDBusPendingCall>
+
+#include "qconnmanservice_linux_p.h"
+
+
+QT_BEGIN_NAMESPACE
+static QDBusConnection dbusConnection = QDBusConnection::systemBus();
+
+
+QConnmanManagerInterface::QConnmanManagerInterface( QObject *parent)
+ : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE),
+ QLatin1String(CONNMAN_MANAGER_PATH),
+ CONNMAN_MANAGER_INTERFACE,
+ QDBusConnection::systemBus(), parent)
+{
+}
+
+QConnmanManagerInterface::~QConnmanManagerInterface()
+{
+}
+
+void QConnmanManagerInterface::connectNotify(const char *signal)
+{
+if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+ if(!connection().connect(QLatin1String(CONNMAN_SERVICE),
+ QLatin1String(CONNMAN_MANAGER_PATH),
+ QLatin1String(CONNMAN_MANAGER_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ this,SIGNAL(propertyChanged(const QString &, const QDBusVariant & )))) {
+ qWarning() << "PropertyCHanged not connected";
+ }
+ }
+
+ if (QLatin1String(signal) == SIGNAL(stateChanged(QString))) {
+ if (!connection().connect(QLatin1String(CONNMAN_SERVICE),
+ QLatin1String(CONNMAN_MANAGER_PATH),
+ QLatin1String(CONNMAN_MANAGER_INTERFACE),
+ QLatin1String("StateChanged"),
+ this,SIGNAL(stateChanged(const QString&)))) {
+ qWarning() << "StateChanged not connected";
+
+ }
+ }
+ if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) {
+ QConnmanDBusHelper *helper;
+ helper = new QConnmanDBusHelper(this);
+
+ dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
+ QLatin1String(CONNMAN_MANAGER_PATH),
+ QLatin1String(CONNMAN_MANAGER_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ helper,SLOT(propertyChanged(QString,QDBusVariant)));
+
+
+ QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)),
+ this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)));
+ }
+}
+
+void QConnmanManagerInterface::disconnectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) {
+
+ }
+}
+
+QVariant QConnmanManagerInterface::getProperty(const QString &property)
+{
+ QVariant var;
+ QVariantMap map = getProperties();
+ if (map.contains(property)) {
+ var = map.value(property);
+ } else {
+ qDebug() << "does not contain" << property;
+ }
+ return var;
+}
+
+QVariantMap QConnmanManagerInterface::getProperties()
+{
+ QDBusReply<QVariantMap > reply = this->call(QLatin1String("GetProperties"));
+ return reply.value();
+}
+
+QString QConnmanManagerInterface::getState()
+{
+ QDBusReply<QString > reply = this->call("GetState");
+ return reply.value();
+}
+
+bool QConnmanManagerInterface::setProperty(const QString &name, const QDBusVariant &value)
+{
+ Q_UNUSED(name);
+ Q_UNUSED(value);
+ return false;
+}
+
+QDBusObjectPath QConnmanManagerInterface::createProfile(const QString &/*name*/)
+{
+ return QDBusObjectPath();
+}
+
+bool QConnmanManagerInterface::removeProfile(QDBusObjectPath /*path*/)
+{
+ return false;
+}
+
+bool QConnmanManagerInterface::requestScan(const QString &type)
+{
+ QDBusReply<QString> reply = this->call(QLatin1String("RequestScan"), QVariant::fromValue(type));
+
+ bool ok = true;
+ if(reply.error().type() == QDBusError::InvalidArgs) {
+ qWarning() << reply.error().message();
+ ok = false;
+ }
+ return ok;
+}
+
+bool QConnmanManagerInterface::enableTechnology(const QString &type)
+{
+ QDBusReply<QList<QDBusObjectPath> > reply = this->call(QLatin1String("EnableTechnology"), QVariant::fromValue(type));
+ bool ok = true;
+ if(reply.error().type() == QDBusError::InvalidArgs) {
+ qWarning() << reply.error().message();
+ ok = false;
+ }
+ return ok;
+}
+
+bool QConnmanManagerInterface::disableTechnology(const QString &type)
+{
+ QDBusReply<QList<QDBusObjectPath> > reply = this->call(QLatin1String("DisableTechnology"), QVariant::fromValue(type));
+ bool ok = true;
+ if(reply.error().type() == QDBusError::InvalidArgs) {
+ qWarning() << reply.error().message();
+ ok = false;
+ }
+ return ok;
+}
+
+QDBusObjectPath QConnmanManagerInterface::connectService(QVariantMap &map)
+{
+ QDBusReply<QDBusObjectPath > reply = this->call(QLatin1String("ConnectService"), QVariant::fromValue(map));
+ if(!reply.isValid()) {
+ qDebug() << reply.error().message();
+
+ }
+ return reply;
+}
+
+void QConnmanManagerInterface::registerAgent(QDBusObjectPath &/*path*/)
+{
+}
+
+void QConnmanManagerInterface::unregisterAgent(QDBusObjectPath /*path*/)
+{
+}
+
+void QConnmanManagerInterface::registerCounter(const QString &path, quint32 interval)
+{ QDBusReply<QList<QDBusObjectPath> > reply = this->call(QLatin1String("RegisterCounter"),
+ QVariant::fromValue(path),
+ QVariant::fromValue(interval));
+ bool ok = true;
+ if(reply.error().type() == QDBusError::InvalidArgs) {
+ qWarning() << reply.error().message();
+ }
+}
+
+void QConnmanManagerInterface::unregisterCounter(const QString &path)
+{ QDBusReply<QList<QDBusObjectPath> > reply = this->call(QLatin1String("UnregisterCounter"),
+ QVariant::fromValue(path));
+ bool ok = true;
+ if(reply.error().type() == QDBusError::InvalidArgs) {
+ qWarning() << reply.error().message();
+ }
+}
+
+QString QConnmanManagerInterface::requestSession(const QString &bearerName)
+{
+ QDBusReply<QList<QDBusObjectPath> > reply = this->call(QLatin1String("RequestSession"),
+ QVariant::fromValue(bearerName));
+ return QString();
+}
+
+void QConnmanManagerInterface::releaseSession()
+{
+ QDBusReply<QList<QDBusObjectPath> > reply = this->call(QLatin1String("ReleaseSession"));
+}
+
+
+QDBusObjectPath QConnmanManagerInterface::lookupService(const QString &service)
+{
+ QDBusReply<QDBusObjectPath > reply = this->call(QLatin1String("LookupService"), QVariant::fromValue(service));
+ if(!reply.isValid()) {
+ qDebug() << reply.error().message();
+ }
+ return reply;
+}
+
+// properties
+
+QStringList QConnmanManagerInterface::getAvailableTechnologies()
+{
+ QVariant var = getProperty("AvailableTechnologies");
+ return qdbus_cast<QStringList>(var);
+}
+
+QStringList QConnmanManagerInterface::getEnabledTechnologies()
+{
+ QVariant var = getProperty("EnabledTechnologies");
+ return qdbus_cast<QStringList>(var);
+}
+
+QStringList QConnmanManagerInterface::getConnectedTechnologies()
+{
+ QVariant var = getProperty("ConnectedTechnologies");
+ return qdbus_cast<QStringList>(var);
+}
+
+QString QConnmanManagerInterface::getDefaultTechnology()
+{
+ QVariant var = getProperty("DefaultTechnology");
+ return qdbus_cast<QString>(var);
+}
+
+bool QConnmanManagerInterface::getOfflineMode()
+{
+ QVariant var = getProperty("OfflineMode");
+ return qdbus_cast<bool>(var);
+}
+
+QString QConnmanManagerInterface::getActiveProfile()
+{
+ QVariant var = getProperty("ActiveProfile");
+ return qdbus_cast<QString>(var);
+}
+
+QStringList QConnmanManagerInterface::getProfiles()
+{
+ QVariant var = getProperty("Profiles");
+ return qdbus_cast<QStringList>(var);
+}
+
+QStringList QConnmanManagerInterface::getTechnologies()
+{
+ QVariant var = getProperty("Technologies");
+ return qdbus_cast<QStringList >(var);
+}
+
+QStringList QConnmanManagerInterface::getServices()
+{
+ QVariant var = getProperty("Services");
+ return qdbus_cast<QStringList >(var);
+}
+
+QString QConnmanManagerInterface::getPathForTechnology(const QString &name)
+{
+ foreach(const QString path, getTechnologies()) {
+ if(path.contains(name)) {
+ return path;
+ }
+ }
+ return "";
+}
+
+QConnmanNetworkInterface::QConnmanNetworkInterface(const QString &dbusPathName, QObject *parent)
+ : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE),
+ dbusPathName,
+ CONNMAN_NETWORK_INTERFACE,
+ QDBusConnection::systemBus(), parent)
+{
+}
+
+QConnmanNetworkInterface::~QConnmanNetworkInterface()
+{
+}
+
+void QConnmanNetworkInterface::connectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+ if(!connection().connect(QLatin1String(CONNMAN_SERVICE),
+ this->path(),
+ QLatin1String(CONNMAN_NETWORK_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ this,SIGNAL(propertyChanged(QString,QDBusVariant))) ) {
+ qWarning() << "network properties not connected";
+ }
+ }
+ if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) {
+ QConnmanDBusHelper *helper;
+ helper = new QConnmanDBusHelper(this);
+
+ dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
+ this->path(),
+ QLatin1String(CONNMAN_NETWORK_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ helper,SLOT(propertyChanged(QString,QDBusVariant)));
+
+ QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)),
+ this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)));
+ }
+}
+
+void QConnmanNetworkInterface::disconnectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+
+ }
+}
+
+QVariantMap QConnmanNetworkInterface::getProperties()
+{
+ QDBusReply<QVariantMap > reply = this->call(QLatin1String("GetProperties"));
+ return reply.value();
+}
+
+QVariant QConnmanNetworkInterface::getProperty(const QString &property)
+{
+ QVariant var;
+ QVariantMap map = getProperties();
+ if (map.contains(property)) {
+ var = map.value(property);
+ }
+ return var;
+}
+
+//properties
+
+QString QConnmanNetworkInterface::getAddress()
+{
+ QVariant var = getProperty("Address");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanNetworkInterface::getName()
+{
+ QVariant var = getProperty("Name");
+ return qdbus_cast<QString>(var);
+}
+
+bool QConnmanNetworkInterface::isConnected()
+{
+ QVariant var = getProperty("Connected");
+ return qdbus_cast<bool>(var);
+}
+
+quint8 QConnmanNetworkInterface::getSignalStrength()
+{
+ QVariant var = getProperty("Strength");
+ return qdbus_cast<quint8>(var);
+}
+
+QString QConnmanNetworkInterface::getDevice()
+{
+ QVariant var = getProperty("Device");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanNetworkInterface::getWifiSsid()
+{
+ QVariant var = getProperty("WiFi.SSID");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanNetworkInterface::getWifiMode()
+{
+ QVariant var = getProperty("WiFi.Mode");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanNetworkInterface::getWifiSecurity()
+{
+ QVariant var = getProperty("WiFi.Security");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanNetworkInterface::getWifiPassphrase()
+{
+ QVariant var = getProperty("WiFi.Passphrase");
+ return qdbus_cast<QString>(var);
+}
+
+
+//////////////////////////
+
+QConnmanProfileInterface::QConnmanProfileInterface(const QString &dbusPathName,QObject *parent)
+ : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE),
+ dbusPathName,
+ CONNMAN_PROFILE_INTERFACE,
+ QDBusConnection::systemBus(), parent)
+{
+}
+
+QConnmanProfileInterface::~QConnmanProfileInterface()
+{
+}
+
+void QConnmanProfileInterface::connectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+ dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
+ this->path(),
+ QLatin1String(CONNMAN_PROFILE_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ this,SIGNAL(propertyChanged(QString,QDBusVariant)));
+ }
+}
+
+void QConnmanProfileInterface::disconnectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString, QVariant))) {
+
+ }
+}
+
+QVariantMap QConnmanProfileInterface::getProperties()
+{
+ QDBusReply<QVariantMap > reply = this->call(QLatin1String("GetProperties"));
+ return reply.value();
+}
+
+QVariant QConnmanProfileInterface::getProperty(const QString &property)
+{
+ QVariant var;
+ QVariantMap map = getProperties();
+ if (map.contains(property)) {
+ var = map.value(property);
+ } else {
+ qDebug() <<__FUNCTION__<< "Could not find" << property;
+ }
+ return var;
+}
+
+// properties
+QString QConnmanProfileInterface::getName()
+{
+
+ QVariant var = getProperty("Name");
+ return qdbus_cast<QString>(var);
+}
+
+bool QConnmanProfileInterface::isOfflineMode()
+{
+ QVariant var = getProperty("OfflineMode");
+ return qdbus_cast<bool>(var);
+}
+
+QStringList QConnmanProfileInterface::getServices()
+{
+ QVariant var = getProperty("Services");
+ return qdbus_cast<QStringList>(var);
+}
+
+///////////////////////////
+QConnmanServiceInterface::QConnmanServiceInterface(const QString &dbusPathName,QObject *parent)
+ : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE),
+ dbusPathName,
+ CONNMAN_SERVICE_INTERFACE,
+ QDBusConnection::systemBus(), parent)
+{
+}
+
+QConnmanServiceInterface::~QConnmanServiceInterface()
+{
+}
+
+void QConnmanServiceInterface::connectNotify(const char *signal)
+{
+// qWarning() << __FUNCTION__ << signal << this->path();
+
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+ dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
+ this->path(),
+ QLatin1String(CONNMAN_SERVICE_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ this,SIGNAL(propertyChanged(QString,QDBusVariant)));
+ }
+ if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) {
+ QConnmanDBusHelper *helper;
+ helper = new QConnmanDBusHelper(this);
+
+ dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
+ this->path(),
+ QLatin1String(CONNMAN_SERVICE_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ helper,SLOT(propertyChanged(QString,QDBusVariant)));
+
+ QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)),
+ this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)));
+ }
+}
+
+void QConnmanServiceInterface::disconnectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) {
+
+ }
+}
+
+QVariantMap QConnmanServiceInterface::getProperties()
+{
+ QDBusReply<QVariantMap> reply = this->call(QLatin1String("GetProperties"));
+ return reply.value();
+}
+
+QVariant QConnmanServiceInterface::getProperty(const QString &property)
+{
+ QVariant var;
+ QVariantMap map = getProperties();
+ if (map.contains(property)) {
+ var = map.value(property);
+ } else {
+// qDebug() <<__FUNCTION__<< "Could not find" << property;
+ }
+ return var;
+}
+
+// clearProperty
+void QConnmanServiceInterface::connect()
+{
+ QDBusReply<QVariantMap> reply = this->call(QLatin1String("Connect"));
+}
+
+void QConnmanServiceInterface::disconnect()
+{
+ QDBusReply<QVariantMap> reply = this->call(QLatin1String("Disconnect"));
+}
+
+void QConnmanServiceInterface::remove()
+{
+ QDBusReply<QVariantMap> reply = this->call(QLatin1String("Remove"));
+}
+
+// void moveBefore(QDBusObjectPath &service);
+// void moveAfter(QDBusObjectPath &service);
+
+// properties
+QString QConnmanServiceInterface::getState()
+{
+ QVariant var = getProperty("State");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanServiceInterface::getError()
+{
+ QVariant var = getProperty("Error");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanServiceInterface::getName()
+{
+ QVariant var = getProperty("Name");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanServiceInterface::getType()
+{
+ QVariant var = getProperty("Type");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanServiceInterface::getMode()
+{
+ QVariant var = getProperty("Mode");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanServiceInterface::getSecurity()
+{
+ QVariant var = getProperty("Security");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanServiceInterface::getPassphrase()
+{
+ QVariant var = getProperty("Passphrase");
+ return qdbus_cast<QString>(var);
+}
+
+bool QConnmanServiceInterface::isPassphraseRequired()
+{
+ QVariant var = getProperty("PassphraseRequired");
+ return qdbus_cast<bool>(var);
+}
+
+quint8 QConnmanServiceInterface::getSignalStrength()
+{
+ QVariant var = getProperty("Strength");
+ return qdbus_cast<quint8>(var);
+}
+
+bool QConnmanServiceInterface::isFavorite()
+{
+ QVariant var = getProperty("Favorite");
+ return qdbus_cast<bool>(var);
+}
+
+bool QConnmanServiceInterface::isImmutable()
+{
+ QVariant var = getProperty("Immutable");
+ return qdbus_cast<bool>(var);
+}
+
+bool QConnmanServiceInterface::isAutoConnect()
+{
+ QVariant var = getProperty("AutoConnect");
+ return qdbus_cast<bool>(var);
+}
+
+bool QConnmanServiceInterface::isSetupRequired()
+{
+ QVariant var = getProperty("SetupRequired");
+ return qdbus_cast<bool>(var);
+}
+
+QString QConnmanServiceInterface::getAPN()
+{
+ QVariant var = getProperty("APN");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanServiceInterface::getMCC()
+{
+ QVariant var = getProperty("MCC");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanServiceInterface::getMNC()
+{
+ QVariant var = getProperty("MNC");
+ return qdbus_cast<QString>(var);
+}
+
+bool QConnmanServiceInterface::isRoaming()
+{
+ QVariant var = getProperty("Roaming");
+ return qdbus_cast<bool>(var);
+}
+
+QStringList QConnmanServiceInterface::getNameservers()
+{
+ QVariant var = getProperty("NameServers");
+ return qdbus_cast<QStringList>(var);
+}
+
+QStringList QConnmanServiceInterface::getDomains()
+{
+ QVariant var = getProperty("Domains");
+ return qdbus_cast<QStringList>(var);
+}
+
+QVariantMap QConnmanServiceInterface::getIPv4()
+{
+ QVariant var = getProperty("IPv4");
+ return qdbus_cast<QVariantMap >(var);
+}
+
+QVariantMap QConnmanServiceInterface::getIPv4Configuration()
+{
+ QVariant var = getProperty("IPv4.Configuration");
+ return qdbus_cast<QVariantMap >(var);
+}
+
+QVariantMap QConnmanServiceInterface::getProxy()
+{
+ QVariant var = getProperty("Proxy");
+ return qdbus_cast<QVariantMap >(var);
+}
+
+QVariantMap QConnmanServiceInterface::getEthernet()
+{
+ QVariant var = getProperty("Ethernet");
+ return qdbus_cast<QVariantMap >(var);
+}
+
+bool QConnmanServiceInterface::isOfflineMode()
+{
+ QVariant var = getProperty("OfflineMode");
+ return qdbus_cast<bool>(var);
+}
+
+QStringList QConnmanServiceInterface::getServices()
+{
+ QVariant var = getProperty("Services");
+ return qdbus_cast<QStringList>(var);
+}
+
+
+//////////////////////////
+QConnmanTechnologyInterface::QConnmanTechnologyInterface(const QString &dbusPathName,QObject *parent)
+ : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE),
+ dbusPathName,
+ CONNMAN_TECHNOLOGY_INTERFACE,
+ QDBusConnection::systemBus(), parent)
+{
+}
+
+QConnmanTechnologyInterface::~QConnmanTechnologyInterface()
+{
+}
+
+void QConnmanTechnologyInterface::connectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+ dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
+ this->path(),
+ QLatin1String(CONNMAN_TECHNOLOGY_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ this,SIGNAL(propertyChanged(QString,QDBusVariant)));
+ }
+ if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) {
+ QConnmanDBusHelper *helper;
+ helper = new QConnmanDBusHelper(this);
+
+ dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
+ this->path(),
+ QLatin1String(CONNMAN_TECHNOLOGY_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ helper,SLOT(propertyChanged(QString,QDBusVariant)));
+
+ QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)),
+ this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)));
+ }
+}
+
+void QConnmanTechnologyInterface::disconnectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) {
+
+ }
+}
+
+QVariantMap QConnmanTechnologyInterface::getProperties()
+{
+ QDBusReply<QVariantMap> reply = this->call(QLatin1String("GetProperties"));
+ return reply.value();
+}
+
+QVariant QConnmanTechnologyInterface::getProperty(const QString &property)
+{
+ QVariant var;
+ QVariantMap map = getProperties();
+ if (map.contains(property)) {
+ var = map.value(property);
+ }
+ return var;
+}
+
+// properties
+QString QConnmanTechnologyInterface::getState()
+{
+ QVariant var = getProperty("State");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanTechnologyInterface::getName()
+{
+ QVariant var = getProperty("Name");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanTechnologyInterface::getType()
+{
+ QVariant var = getProperty("Type");
+ return qdbus_cast<QString>(var);
+}
+
+
+QStringList QConnmanTechnologyInterface::getDevices()
+{
+ QVariant var = getProperty("Devices");
+ return qdbus_cast<QStringList>(var);
+}
+
+
+//////////////////////////////////
+QConnmanAgentInterface::QConnmanAgentInterface(const QString &dbusPathName, QObject *parent)
+ : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE),
+ dbusPathName,
+ CONNMAN_AGENT_INTERFACE,
+ QDBusConnection::systemBus(), parent)
+{
+}
+
+QConnmanAgentInterface::~QConnmanAgentInterface()
+{
+}
+
+void QConnmanAgentInterface::connectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+// dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
+// this->path(),
+// QLatin1String(CONNMAN_NETWORK_INTERFACE),
+// QLatin1String("PropertyChanged"),
+// this,SIGNAL(propertyChanged(const QString &, QVariant &)));
+ }
+}
+
+void QConnmanAgentInterface::disconnectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString, QDBusVariant))) {
+
+ }
+}
+
+
+void QConnmanAgentInterface::release()
+{
+}
+
+void QConnmanAgentInterface::reportError(QDBusObjectPath &/*path*/, const QString &/*error*/)
+{
+}
+
+//dict QConnmanAgentInterface::requestInput(QDBusObjectPath &path, dict fields)
+//{
+//}
+
+void QConnmanAgentInterface::cancel()
+{
+}
+
+
+/////////////////////////////////////////
+QConnmanCounterInterface::QConnmanCounterInterface(const QString &dbusPathName,QObject *parent)
+ : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE),
+ dbusPathName,
+ CONNMAN_COUNTER_INTERFACE,
+ QDBusConnection::systemBus(), parent)
+{
+}
+
+QConnmanCounterInterface::~QConnmanCounterInterface()
+{
+}
+
+quint32 QConnmanCounterInterface::getReceivedByteCount()
+{
+return 0;
+}
+
+quint32 QConnmanCounterInterface::getTransmittedByteCount()
+{
+return 0;
+}
+
+/////////////////////////////////////////
+QConnmanDeviceInterface::QConnmanDeviceInterface(const QString &dbusPathName,QObject *parent)
+ : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE),
+ dbusPathName,
+ CONNMAN_DEVICE_INTERFACE,
+ QDBusConnection::systemBus(), parent)
+{
+}
+
+QConnmanDeviceInterface::~QConnmanDeviceInterface()
+{
+}
+
+void QConnmanDeviceInterface::connectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+ dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
+ this->path(),
+ QLatin1String(CONNMAN_DEVICE_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ this,SIGNAL(propertyChanged(QString,QDBusVariant)));
+
+ }
+ if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) {
+ QConnmanDBusHelper *helper;
+ helper = new QConnmanDBusHelper(this);
+
+ dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
+ this->path(),
+ QLatin1String(CONNMAN_DEVICE_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ helper,SLOT(propertyChanged(QString,QDBusVariant)));
+
+ QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)),
+ this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)));
+ }
+}
+
+void QConnmanDeviceInterface::disconnectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) {
+
+ }
+}
+
+QVariantMap QConnmanDeviceInterface::getProperties()
+{
+ QDBusReply<QVariantMap> reply = this->call(QLatin1String("GetProperties"));
+ return reply.value();
+}
+
+bool QConnmanDeviceInterface::setProperty(const QString &name, const QDBusVariant &value)
+{
+
+// QList<QVariant> args;
+ qWarning() << __FUNCTION__ << name << value.variant();
+// args << qVariantFromValue(name);
+// args << qVariantFromValue(value);
+
+ QDBusMessage reply = this->call(QLatin1String("SetProperty"),name, qVariantFromValue(value));
+qWarning() << reply.errorMessage();
+
+ return true;
+}
+
+void QConnmanDeviceInterface::scan()
+{
+ QDBusReply<QVariantMap> reply = this->call(QLatin1String("ProposeScan"));
+ if(!reply.isValid()) {
+ qDebug() << reply.error().message();
+ }
+}
+
+QVariant QConnmanDeviceInterface::getProperty(const QString &property)
+{
+ QVariant var;
+ QVariantMap map = getProperties();
+ if (map.contains(property)) {
+ var = map.value(property);
+ }
+ return var;
+}
+
+//properties
+QString QConnmanDeviceInterface::getAddress()
+{
+ QVariant var = getProperty("Address");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanDeviceInterface::getName()
+{
+ QVariant var = getProperty("Name");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanDeviceInterface::getType()
+{
+ QVariant var = getProperty("Type");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanDeviceInterface::getInterface()
+{
+ QVariant var = getProperty("Interface");
+ return qdbus_cast<QString>(var);
+}
+
+bool QConnmanDeviceInterface::isPowered()
+{
+ QVariant var = getProperty("Powered");
+ return qdbus_cast<bool>(var);
+}
+
+quint16 QConnmanDeviceInterface::getScanInterval()
+{
+ QVariant var = getProperty("ScanInterval");
+ return qdbus_cast<quint16>(var);
+}
+
+bool QConnmanDeviceInterface::setScanInterval(const QString & interval)
+{
+// QList<QVariant> args;
+// args << qVariantFromValue(name)
+// << value.variant();
+
+// QDBusMessage reply = this->callWithArgumentList(QDBus::AutoDetect,QLatin1String("SetProperty"),args);
+
+ return setProperty("ScanInterval", QDBusVariant(interval));
+}
+
+bool QConnmanDeviceInterface::isScanning()
+{
+ QVariant var = getProperty("Scanning");
+ return qdbus_cast<bool>(var);
+}
+
+QStringList QConnmanDeviceInterface::getNetworks()
+{
+ QVariant var = getProperty("Networks");
+ return qdbus_cast<QStringList>(var);
+}
+
+bool QConnmanDeviceInterface::setEnabled(bool powered)
+{
+ QList<QVariant> args;
+ args << qVariantFromValue(QString("Powered"))
+ << qVariantFromValue(QDBusVariant(powered));
+
+ QDBusMessage reply = this->callWithArgumentList(QDBus::AutoDetect,QLatin1String("SetProperty"),args);
+ qWarning() << reply.errorMessage() << reply.errorName();
+ return true;
+}
+
+QConnmanDBusHelper::QConnmanDBusHelper(QObject * parent)
+ : QObject(parent)
+{
+}
+
+QConnmanDBusHelper::~QConnmanDBusHelper()
+{
+}
+
+void QConnmanDBusHelper::propertyChanged(const QString &item, const QDBusVariant &var)
+{
+ QDBusMessage msg = this->message();
+// qWarning() << sender();
+ // qWarning() << msg.interface() << msg.path() << item << var.variant() <<"\n";
+ Q_EMIT propertyChangedContext(msg.path() ,item, var);
+}
+
+/////////////////
+QT_END_NAMESPACE
diff --git a/src/plugins/bearer/connman/qconnmanservice_linux_p.h b/src/plugins/bearer/connman/qconnmanservice_linux_p.h
new file mode 100644
index 0000000000..35e3f3d481
--- /dev/null
+++ b/src/plugins/bearer/connman/qconnmanservice_linux_p.h
@@ -0,0 +1,381 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QCONNMANSERVICE_H
+#define QCONNMANSERVICE_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtDBus/QtDBus>
+#include <QtDBus/QDBusConnection>
+#include <QtDBus/QDBusError>
+#include <QtDBus/QDBusInterface>
+#include <QtDBus/QDBusMessage>
+#include <QtDBus/QDBusReply>
+
+#include <QtDBus/QDBusPendingCallWatcher>
+#include <QtDBus/QDBusObjectPath>
+#include <QtDBus/QDBusContext>
+#include <QMap>
+
+#ifndef __CONNMAN_DBUS_H
+
+#define CONNMAN_SERVICE "org.moblin.connman"
+#define CONNMAN_PATH "/org/moblin/connman"
+
+#define CONNMAN_DEBUG_INTERFACE CONNMAN_SERVICE ".Debug"
+#define CONNMAN_ERROR_INTERFACE CONNMAN_SERVICE ".Error"
+#define CONNMAN_AGENT_INTERFACE CONNMAN_SERVICE ".Agent"
+#define CONNMAN_COUNTER_INTERFACE CONNMAN_SERVICE ".Counter"
+
+#define CONNMAN_MANAGER_INTERFACE CONNMAN_SERVICE ".Manager"
+#define CONNMAN_MANAGER_PATH "/"
+
+#define CONNMAN_TASK_INTERFACE CONNMAN_SERVICE ".Task"
+#define CONNMAN_PROFILE_INTERFACE CONNMAN_SERVICE ".Profile"
+#define CONNMAN_SERVICE_INTERFACE CONNMAN_SERVICE ".Service"
+#define CONNMAN_DEVICE_INTERFACE CONNMAN_SERVICE ".Device"
+#define CONNMAN_NETWORK_INTERFACE CONNMAN_SERVICE ".Network"
+#define CONNMAN_PROVIDER_INTERFACE CONNMAN_SERVICE ".Provider"
+#define CONNMAN_TECHNOLOGY_INTERFACE CONNMAN_SERVICE ".Technology"
+#endif
+
+QT_BEGIN_NAMESPACE
+
+QT_END_NAMESPACE
+
+
+QT_BEGIN_NAMESPACE
+
+class QConnmanManagerInterface : public QDBusAbstractInterface
+{
+ Q_OBJECT
+
+public:
+
+ QConnmanManagerInterface( QObject *parent = 0);
+ ~QConnmanManagerInterface();
+
+ QDBusObjectPath path() const;
+
+ QVariantMap getProperties();
+ bool setProperty(const QString &name, const QDBusVariant &value);
+ QDBusObjectPath createProfile(const QString &name);
+ bool removeProfile(QDBusObjectPath path);
+ bool requestScan(const QString &type);
+ bool enableTechnology(const QString &type);
+ bool disableTechnology(const QString &type);
+ QDBusObjectPath connectService(QVariantMap &map);
+ void registerAgent(QDBusObjectPath &path);
+ void unregisterAgent(QDBusObjectPath path);
+ void registerCounter(const QString &path, quint32 interval);
+ void unregisterCounter(const QString &path);
+
+ QString requestSession(const QString &bearerName);
+ void releaseSession();
+
+ // properties
+ QString getState();
+ QStringList getAvailableTechnologies();
+ QStringList getEnabledTechnologies();
+ QStringList getConnectedTechnologies();
+ QString getDefaultTechnology();
+ bool getOfflineMode();
+ QString getActiveProfile();
+ QStringList getProfiles();
+ QStringList getTechnologies();
+ QStringList getServices();
+ QDBusObjectPath lookupService(const QString &);
+
+ QString getPathForTechnology(const QString &tech);
+
+
+Q_SIGNALS:
+ void propertyChanged(const QString &, const QDBusVariant &value);
+ void stateChanged(const QString &);
+ void propertyChangedContext(const QString &,const QString &,const QDBusVariant &);
+
+protected:
+ void connectNotify(const char *signal);
+ void disconnectNotify(const char *signal);
+ QVariant getProperty(const QString &);
+};
+
+
+class QConnmanNetworkInterface : public QDBusAbstractInterface
+{
+ Q_OBJECT
+
+public:
+
+ QConnmanNetworkInterface(const QString &dbusPathName, QObject *parent = 0);
+ ~QConnmanNetworkInterface();
+
+ QVariantMap getProperties();
+
+ //properties
+ QString getAddress();
+ QString getName();
+ bool isConnected();
+ quint8 getSignalStrength();
+ QString getDevice();
+ QString getWifiSsid();
+ QString getWifiMode();
+ QString getWifiSecurity();
+ QString getWifiPassphrase();
+
+Q_SIGNALS:
+ void propertyChanged(const QString &, const QDBusVariant &value);
+ void propertyChangedContext(const QString &,const QString &,const QDBusVariant &);
+protected:
+ void connectNotify(const char *signal);
+ void disconnectNotify(const char *signal);
+ QVariant getProperty(const QString &);
+};
+
+class QConnmanProfileInterfacePrivate;
+class QConnmanProfileInterface : public QDBusAbstractInterface
+{
+ Q_OBJECT
+
+public:
+
+ QConnmanProfileInterface(const QString &dbusPathName,QObject *parent = 0);
+ ~QConnmanProfileInterface();
+
+ QVariantMap getProperties();
+// properties
+ QString getName();
+ bool isOfflineMode();
+ QStringList getServices();
+
+Q_SIGNALS:
+ void propertyChanged(const QString &, const QDBusVariant &value);
+private:
+ QConnmanProfileInterfacePrivate *d;
+
+protected:
+ void connectNotify(const char *signal);
+ void disconnectNotify(const char *signal);
+ QVariant getProperty(const QString &);
+};
+
+class QConnmanServiceInterface : public QDBusAbstractInterface
+{
+ Q_OBJECT
+
+public:
+
+ QConnmanServiceInterface(const QString &dbusPathName,QObject *parent = 0);
+ ~QConnmanServiceInterface();
+
+ QVariantMap getProperties();
+ // clearProperty
+ void connect();
+ void disconnect();
+ void remove();
+ // void moveBefore(QDBusObjectPath &service);
+ // void moveAfter(QDBusObjectPath &service);
+
+// properties
+ QString getState();
+ QString getError();
+ QString getName();
+ QString getType();
+ QString getMode();
+ QString getSecurity();
+ QString getPassphrase();
+ bool isPassphraseRequired();
+ quint8 getSignalStrength();
+ bool isFavorite();
+ bool isImmutable();
+ bool isAutoConnect();
+ bool isSetupRequired();
+ QString getAPN();
+ QString getMCC();
+ QString getMNC();
+ bool isRoaming();
+ QStringList getNameservers();
+ QStringList getDomains();
+ QVariantMap getIPv4();
+ QVariantMap getIPv4Configuration();
+ QVariantMap getProxy();
+ QVariantMap getEthernet();
+
+ bool isOfflineMode();
+ QStringList getServices();
+
+Q_SIGNALS:
+ void propertyChanged(const QString &, const QDBusVariant &value);
+ void propertyChangedContext(const QString &,const QString &,const QDBusVariant &);
+
+protected:
+ void connectNotify(const char *signal);
+ void disconnectNotify(const char *signal);
+ QVariant getProperty(const QString &);
+};
+
+class QConnmanTechnologyInterface : public QDBusAbstractInterface
+{
+ Q_OBJECT
+
+public:
+
+ QConnmanTechnologyInterface(const QString &dbusPathName,QObject *parent = 0);
+ ~QConnmanTechnologyInterface();
+
+ QVariantMap getProperties();
+// properties
+ QString getState();
+ QString getName();
+ QString getType();
+
+ QStringList getDevices();
+
+Q_SIGNALS:
+ void propertyChanged(const QString &, const QDBusVariant &value);
+ void propertyChangedContext(const QString &,const QString &,const QDBusVariant &);
+protected:
+ void connectNotify(const char *signal);
+ void disconnectNotify(const char *signal);
+ QVariant getProperty(const QString &);
+
+};
+
+class QConnmanAgentInterface : public QDBusAbstractInterface
+{
+ Q_OBJECT
+
+public:
+
+ QConnmanAgentInterface(const QString &dbusPathName,QObject *parent = 0);
+ ~QConnmanAgentInterface();
+
+ void release();
+ void reportError(QDBusObjectPath &path, const QString &error);
+// dict requestInput(QDBusObjectPath &path, dict fields);
+ void cancel();
+protected:
+ void connectNotify(const char *signal);
+ void disconnectNotify(const char *signal);
+};
+
+class QConnmanCounterInterfacePrivate;
+class QConnmanCounterInterface : public QDBusAbstractInterface
+{
+ Q_OBJECT
+
+public:
+
+ QConnmanCounterInterface(const QString &dbusPathName, QObject *parent = 0);
+ ~QConnmanCounterInterface();
+
+// void release();
+ QString getInterface();
+ quint32 getReceivedByteCount();
+ quint32 getTransmittedByteCount();
+
+private:
+ QConnmanCounterInterfacePrivate *d;
+};
+
+class QConnmanDeviceInterface : public QDBusAbstractInterface
+{
+ Q_OBJECT
+
+public:
+
+ QConnmanDeviceInterface(const QString &dbusPathName,QObject *parent = 0);
+ ~QConnmanDeviceInterface();
+
+ QVariantMap getProperties();
+ void scan();
+
+//properties
+ QString getAddress();
+ QString getName();
+ QString getType();
+ QString getInterface();
+ bool isPowered();
+ quint16 getScanInterval();
+ bool setScanInterval(const QString &interval);
+
+ bool isScanning();
+ QStringList getNetworks();
+ bool setEnabled(bool powered);
+ bool setProperty(const QString &name, const QDBusVariant &value);
+
+Q_SIGNALS:
+ void propertyChanged(const QString &, const QDBusVariant &value);
+ void propertyChangedContext(const QString &,const QString &,const QDBusVariant &);
+protected:
+ void connectNotify(const char *signal);
+ void disconnectNotify(const char *signal);
+ QVariant getProperty(const QString &);
+
+};
+
+class QConnmanDBusHelper: public QObject, protected QDBusContext
+ {
+ Q_OBJECT
+ public:
+ QConnmanDBusHelper(QObject *parent = 0);
+ ~QConnmanDBusHelper();
+
+ public slots:
+ void propertyChanged(const QString &, const QDBusVariant &);
+
+Q_SIGNALS:
+ void propertyChangedContext(const QString &,const QString &,const QDBusVariant &);
+};
+
+QT_END_NAMESPACE
+
+#endif //QCONNMANSERVICE_H
diff --git a/src/plugins/bearer/icd/icd.pro b/src/plugins/bearer/icd/icd.pro
index c7337f5535..b2c58e918a 100644
--- a/src/plugins/bearer/icd/icd.pro
+++ b/src/plugins/bearer/icd/icd.pro
@@ -3,8 +3,8 @@ include(../../qpluginbase.pri)
QT += network dbus
-QMAKE_CXXFLAGS += $$QT_CFLAGS_ICD
-LIBS += $$QT_LIBS_ICD
+QMAKE_CXXFLAGS *= $$QT_CFLAGS_DBUS $$QT_CFLAGS_CONNSETTINGS
+LIBS += $$QT_LIBS_CONNSETTINGS
HEADERS += qicdengine.h \
qnetworksession_impl.h
@@ -15,6 +15,9 @@ SOURCES += main.cpp \
#DEFINES += BEARER_MANAGEMENT_DEBUG
+include(../../../3rdparty/libconninet.pri)
+include(../../../3rdparty/libgq.pri)
+
QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer
target.path += $$[QT_INSTALL_PLUGINS]/bearer
INSTALLS += target
diff --git a/src/plugins/bearer/icd/qnetworksession_impl.cpp b/src/plugins/bearer/icd/qnetworksession_impl.cpp
index e375b4ffc8..e8e5183fd0 100644
--- a/src/plugins/bearer/icd/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/icd/qnetworksession_impl.cpp
@@ -235,7 +235,7 @@ void QNetworkSessionPrivateImpl::updateIdentifier(const QString &newId)
}
-quint64 QNetworkSessionPrivateImpl::getStatistics(bool sent) const
+QNetworkSessionPrivateImpl::Statistics QNetworkSessionPrivateImpl::getStatistics() const
{
/* This could be also implemented by using the Maemo::Icd::statistics()
* that gets the statistics data for a specific IAP. Change if
@@ -243,56 +243,51 @@ quint64 QNetworkSessionPrivateImpl::getStatistics(bool sent) const
*/
Maemo::Icd icd;
QList<Maemo::IcdStatisticsResult> stats_results;
- quint64 counter_rx = 0, counter_tx = 0;
+ Statistics stats = { 0, 0, 0};
- if (!icd.statistics(stats_results)) {
- return 0;
- }
+ if (!icd.statistics(stats_results))
+ return stats;
foreach (const Maemo::IcdStatisticsResult &res, stats_results) {
- if (res.params.network_attrs & ICD_NW_ATTR_IAPNAME) {
- /* network_id is the IAP UUID */
- if (QString(res.params.network_id.data()) == activeConfig.identifier()) {
- counter_tx = res.bytes_sent;
- counter_rx = res.bytes_received;
- }
- } else {
- /* We probably will never get to this branch */
- IcdNetworkConfigurationPrivate *icdConfig =
- toIcdConfig(privateConfiguration(activeConfig));
+ if (res.params.network_attrs & ICD_NW_ATTR_IAPNAME) {
+ /* network_id is the IAP UUID */
+ if (QString(res.params.network_id.data()) == activeConfig.identifier()) {
+ stats.txData = res.bytes_sent;
+ stats.rxData = res.bytes_received;
+ stats.activeTime = res.time_active;
+ }
+ } else {
+ /* We probably will never get to this branch */
+ IcdNetworkConfigurationPrivate *icdConfig =
+ toIcdConfig(privateConfiguration(activeConfig));
- icdConfig->mutex.lock();
- if (res.params.network_id == icdConfig->network_id) {
- counter_tx = res.bytes_sent;
- counter_rx = res.bytes_received;
- }
- icdConfig->mutex.unlock();
- }
+ icdConfig->mutex.lock();
+ if (res.params.network_id == icdConfig->network_id) {
+ stats.txData = res.bytes_sent;
+ stats.rxData = res.bytes_received;
+ stats.activeTime = res.time_active;
+ }
+ icdConfig->mutex.unlock();
+ }
}
- if (sent)
- return counter_tx;
- else
- return counter_rx;
+ return stats;
}
quint64 QNetworkSessionPrivateImpl::bytesWritten() const
{
- return getStatistics(true);
+ return getStatistics().txData;
}
quint64 QNetworkSessionPrivateImpl::bytesReceived() const
{
- return getStatistics(false);
+ return getStatistics().rxData;
}
quint64 QNetworkSessionPrivateImpl::activeTime() const
{
- if (startTime.isNull()) {
- return 0;
- }
- return startTime.secsTo(QDateTime::currentDateTime());
+ return getStatistics().activeTime;
}
@@ -620,6 +615,9 @@ static QString get_network_interface()
return iface;
}
+ if (addr_results.first().ip_info.isEmpty())
+ return QString();
+
const char *address = addr_results.first().ip_info.first().address.toAscii().constData();
struct in_addr addr;
if (inet_aton(address, &addr) == 0) {
diff --git a/src/plugins/bearer/icd/qnetworksession_impl.h b/src/plugins/bearer/icd/qnetworksession_impl.h
index c43b1f0a3f..390e508c80 100644
--- a/src/plugins/bearer/icd/qnetworksession_impl.h
+++ b/src/plugins/bearer/icd/qnetworksession_impl.h
@@ -170,6 +170,12 @@ private:
QNetworkConfigurationManager manager;
QIcdEngine *engine;
+ struct Statistics {
+ quint64 txData;
+ quint64 rxData;
+ quint64 activeTime;
+ };
+
// The config set on QNetworkSession.
QNetworkConfiguration config;
@@ -186,7 +192,7 @@ private:
friend class IcdListener;
void updateState(QNetworkSession::State);
void updateIdentifier(const QString &newId);
- quint64 getStatistics(bool sent) const;
+ Statistics getStatistics() const;
void cleanupSession(void);
void updateProxyInformation();
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
index f89ed0afbc..1de4c0f3ac 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
@@ -146,62 +146,65 @@ void QNetworkSessionPrivateImpl::configurationRemoved(QNetworkConfigurationPriva
}
}
+void QNetworkSessionPrivateImpl::configurationAdded(QNetworkConfigurationPrivatePointer config)
+{
+ Q_UNUSED(config);
+ // If session is based on service network, some other app may create new access points
+ // to the SNAP --> synchronize session's state with that of interface's.
+ if (!publicConfig.isValid() || publicConfig.type() != QNetworkConfiguration::ServiceNetwork)
+ return;
+
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - "
+ << "configurationAdded IAP: "
+ << toSymbianConfig(privateConfiguration(config))->numericIdentifier();
+#endif
+
+ syncStateWithInterface();
+}
+
+// Function sets the state of the session to match the state
+// of the underlying interface (the configuration this session is based on)
void QNetworkSessionPrivateImpl::syncStateWithInterface()
{
if (!publicConfig.isValid())
return;
- if (iFirstSync && publicConfig.isValid()) {
+ if (iFirstSync) {
QObject::connect(engine, SIGNAL(configurationStateChanged(TUint32, TUint32, QNetworkSession::State)),
this, SLOT(configurationStateChanged(TUint32, TUint32, QNetworkSession::State)));
// Listen to configuration removals, so that in case the configuration
// this session is based on is removed, session knows to enter Invalid -state.
QObject::connect(engine, SIGNAL(configurationRemoved(QNetworkConfigurationPrivatePointer)),
this, SLOT(configurationRemoved(QNetworkConfigurationPrivatePointer)));
+ // Connect to configuration additions, so that in case a configuration is added
+ // in a SNAP this session is based on, the session knows to synch its state with its
+ // interface.
+ QObject::connect(engine, SIGNAL(configurationAdded(QNetworkConfigurationPrivatePointer)),
+ this, SLOT(configurationAdded(QNetworkConfigurationPrivatePointer)));
}
// Start listening IAP state changes from QNetworkConfigurationManagerPrivate
iHandleStateNotificationsFromManager = true;
- // Check open connections to see if there is already
- // an open connection to selected IAP or SNAP
- TUint count;
- TRequestStatus status;
- iConnectionMonitor.GetConnectionCount(count, status);
- User::WaitForRequest(status);
- if (status.Int() != KErrNone) {
- return;
- }
-
- TUint numSubConnections;
- TUint connectionId;
- for (TUint i = 1; i <= count; i++) {
- TInt ret = iConnectionMonitor.GetConnectionInfo(i, connectionId, numSubConnections);
- if (ret == KErrNone) {
- TUint apId;
- iConnectionMonitor.GetUintAttribute(connectionId, 0, KIAPId, apId, status);
- User::WaitForRequest(status);
- if (status.Int() == KErrNone) {
- TInt connectionStatus;
- iConnectionMonitor.GetIntAttribute(connectionId, 0, KConnectionStatus, connectionStatus, status);
- User::WaitForRequest(status);
- if (connectionStatus == KLinkLayerOpen) {
- if (state != QNetworkSession::Closing) {
- if (newState(QNetworkSession::Connected, apId)) {
- return;
- }
- }
- }
- }
- }
- }
-
- if (state != QNetworkSession::Connected) {
- if ((publicConfig.state() & QNetworkConfiguration::Discovered) ==
- QNetworkConfiguration::Discovered) {
- newState(QNetworkSession::Disconnected);
- } else {
- newState(QNetworkSession::NotAvailable);
- }
+ // Check what is the state of the configuration this session is based on
+ // and set the session in appropriate state.
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - "
+ << "syncStateWithInterface() state of publicConfig is: " << publicConfig.state();
+#endif
+ switch (publicConfig.state()) {
+ case QNetworkConfiguration::Active:
+ newState(QNetworkSession::Connected);
+ break;
+ case QNetworkConfiguration::Discovered:
+ newState(QNetworkSession::Disconnected);
+ break;
+ case QNetworkConfiguration::Defined:
+ newState(QNetworkSession::NotAvailable);
+ break;
+ case QNetworkConfiguration::Undefined:
+ default:
+ newState(QNetworkSession::Invalid);
}
}
@@ -253,7 +256,8 @@ QNetworkInterface QNetworkSessionPrivateImpl::currentInterface() const
<< "currentInterface() requested, state: " << state
<< "publicConfig validity: " << publicConfig.isValid();
if (activeInterface.isValid())
- qDebug() << "interface is: " << activeInterface.humanReadableName();
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - "
+ << "interface is: " << activeInterface.humanReadableName();
#endif
if (!publicConfig.isValid() || state != QNetworkSession::Connected) {
@@ -382,7 +386,7 @@ void QNetworkSessionPrivateImpl::open()
SymbianNetworkConfigurationPrivate *symbianConfig =
toSymbianConfig(privateConfiguration(publicConfig));
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
// With One Click Connectivity (Symbian^3 onwards) it is possible
// to connect silently, without any popups.
TConnPrefList pref;
@@ -412,7 +416,7 @@ void QNetworkSessionPrivateImpl::open()
SymbianNetworkConfigurationPrivate *symbianConfig =
toSymbianConfig(privateConfiguration(publicConfig));
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
// On Symbian^3 if service network is not reachable, it triggers a UI (aka EasyWLAN) where
// user can create new IAPs. To detect this, we need to store the number of IAPs
// there was before connection was started.
@@ -906,6 +910,14 @@ QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 ia
if (iapId == 0) {
_LIT(KSetting, "IAP\\Id");
iConnection.GetIntSetting(KSetting, iapId);
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
+ // Check if this is an Easy WLAN configuration. On Symbian^3 RConnection may report
+ // the used configuration as 'EasyWLAN' IAP ID if someone has just opened the configuration
+ // from WLAN Scan dialog, _and_ that connection is still up. We need to find the
+ // real matching configuration. Function alters the Easy WLAN ID to real IAP ID (only if
+ // easy WLAN):
+ engine->easyWlanTrueIapId(iapId);
+#endif
}
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
@@ -944,7 +956,7 @@ QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 ia
}
}
} else {
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
// On Symbian^3 (only, not earlier or Symbian^4) if the SNAP was not reachable, it triggers
// user choice type of activity (EasyWLAN). As a result, a new IAP may be created, and
// hence if was not found yet. Therefore update configurations and see if there is something new.
@@ -982,7 +994,7 @@ QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 ia
qDebug() << "QNS this : " << QString::number((uint)this) << " - "
<< "configuration was not found, returning invalid.";
#endif
-#endif // OCC_FUNCTIONALITY_AVAILABLE
+#endif
// Given IAP Id was not found from known IAPs array
return QNetworkConfiguration();
}
@@ -1044,6 +1056,11 @@ void QNetworkSessionPrivateImpl::RunL()
TInt error = KErrNone;
QNetworkConfiguration newActiveConfig = activeConfiguration();
if (!newActiveConfig.isValid()) {
+ // RConnection startup was successfull but no configuration
+ // was found. That indicates that user has chosen to create a
+ // new WLAN configuration (from scan results), but that new
+ // configuration does not have access to Internet (Internet
+ // Connectivity Test, ICT, failed).
error = KErrGeneral;
} else {
// Use name of the IAP to open global 'Open C' RConnection
@@ -1053,16 +1070,24 @@ void QNetworkSessionPrivateImpl::RunL()
strcpy(ifr.ifr_name, nameAsByteArray.constData());
error = setdefaultif(&ifr);
}
-
if (error != KErrNone) {
isOpen = false;
isOpening = false;
iError = QNetworkSession::UnknownSessionError;
QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError));
- Cancel();
if (ipConnectionNotifier) {
ipConnectionNotifier->StopNotifications();
}
+ if (!newActiveConfig.isValid()) {
+ // No valid configuration, bail out.
+ // Status updates from QNCM won't be received correctly
+ // because there is no configuration to associate them with so transit here.
+ iConnection.Close();
+ newState(QNetworkSession::Closing);
+ newState(QNetworkSession::Disconnected);
+ } else {
+ Cancel();
+ }
QT_TRYCATCH_LEAVING(syncStateWithInterface());
return;
}
@@ -1117,7 +1142,9 @@ void QNetworkSessionPrivateImpl::RunL()
isOpening = false;
activeConfig = QNetworkConfiguration();
serviceConfig = QNetworkConfiguration();
- if (publicConfig.state() == QNetworkConfiguration::Undefined ||
+ if (statusCode == KErrCancel) {
+ iError = QNetworkSession::SessionAbortedError;
+ } else if (publicConfig.state() == QNetworkConfiguration::Undefined ||
publicConfig.state() == QNetworkConfiguration::Defined) {
iError = QNetworkSession::InvalidConfigurationError;
} else {
@@ -1300,7 +1327,7 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint
}
}
}
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
// If the retVal is not true here, it means that the status update may apply to an IAP outside of
// SNAP (session is based on SNAP but follows IAP outside of it), which may occur on Symbian^3 EasyWlan.
if (retVal == false && activeConfig.isValid() &&
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.h b/src/plugins/bearer/symbian/qnetworksession_impl.h
index 0754ace1b7..aac9321cae 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.h
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.h
@@ -64,7 +64,7 @@
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
#include <comms-infras/cs_mobility_apiext.h>
#endif
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
#include <extendedconnpref.h>
#endif
@@ -134,7 +134,8 @@ protected: // From CActive
private Q_SLOTS:
void configurationStateChanged(TUint32 accessPointId, TUint32 connMonId, QNetworkSession::State newState);
void configurationRemoved(QNetworkConfigurationPrivatePointer config);
-
+ void configurationAdded(QNetworkConfigurationPrivatePointer config);
+
private:
TUint iapClientCount(TUint aIAPId) const;
quint64 transferredData(TUint dataType) const;
diff --git a/src/plugins/bearer/symbian/symbian_3/symbian_3.pro b/src/plugins/bearer/symbian/symbian_3/symbian_3.pro
index 25f18f20ca..ff0f11ca8e 100644
--- a/src/plugins/bearer/symbian/symbian_3/symbian_3.pro
+++ b/src/plugins/bearer/symbian/symbian_3/symbian_3.pro
@@ -6,7 +6,7 @@ symbian {
DEFINES += SNAP_FUNCTIONALITY_AVAILABLE
LIBS += -lcmmanager
- exists($$MW_LAYER_PUBLIC_EXPORT_PATH(extendedconnpref.h)) {
+ exists($$prependEpocroot($$MW_LAYER_PUBLIC_EXPORT_PATH(extendedconnpref.h))) {
DEFINES += OCC_FUNCTIONALITY_AVAILABLE
LIBS += -lextendedconnpref
}
diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp
index ca444c1918..4bd6d2ffd5 100644
--- a/src/plugins/bearer/symbian/symbianengine.cpp
+++ b/src/plugins/bearer/symbian/symbianengine.cpp
@@ -270,7 +270,7 @@ void SymbianEngine::updateConfigurationsL()
QList<QString> knownConfigs = accessPointConfigurations.keys();
QList<QString> knownSnapConfigs = snapConfigurations.keys();
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
// S60 version is >= Series60 3rd Edition Feature Pack 2
TInt error = KErrNone;
@@ -291,14 +291,17 @@ void SymbianEngine::updateConfigurationsL()
if (error == KErrNone) {
QNetworkConfigurationPrivatePointer ptr(cpPriv);
accessPointConfigurations.insert(ptr->id, ptr);
-
- mutex.unlock();
- // Emit configuration added. Connected slots may throw execptions
- // which propagate here --> must be converted to leaves (standard
- // std::exception would cause any TRAP trapping this function to terminate
- // program).
- QT_TRYCATCH_LEAVING(emit configurationAdded(ptr));
- mutex.lock();
+ if (!iFirstUpdate) {
+ // Emit configuration added. Connected slots may throw execptions
+ // which propagate here --> must be converted to leaves (standard
+ // std::exception would cause any TRAP trapping this function to terminate
+ // program).
+ QT_TRYCATCH_LEAVING(updateActiveAccessPoints());
+ updateStatesToSnaps();
+ mutex.unlock();
+ QT_TRYCATCH_LEAVING(emit configurationAdded(ptr));
+ mutex.lock();
+ }
}
}
CleanupStack::PopAndDestroy(&connectionMethod);
@@ -311,7 +314,17 @@ void SymbianEngine::updateConfigurationsL()
iCmManager.AllDestinationsL(destinations);
for(int i = 0; i < destinations.Count(); i++) {
RCmDestination destination;
- destination = iCmManager.DestinationL(destinations[i]);
+
+ // Some destinatsions require ReadDeviceData -capability (MMS/WAP)
+ // The below function will leave in these cases. Don't. Proceed to
+ // next destination (if any).
+ TRAPD(error, destination = iCmManager.DestinationL(destinations[i]));
+ if (error == KErrPermissionDenied) {
+ continue;
+ } else {
+ User::LeaveIfError(error);
+ }
+
CleanupClosePushL(destination);
QString ident = QT_BEARERMGMT_CONFIGURATION_SNAP_PREFIX +
QString::number(qHash(destination.Id()));
@@ -319,12 +332,12 @@ void SymbianEngine::updateConfigurationsL()
knownSnapConfigs.removeOne(ident);
} else {
SymbianNetworkConfigurationPrivate *cpPriv = new SymbianNetworkConfigurationPrivate;
-
+
HBufC *pName = destination.NameLC();
QT_TRYCATCH_LEAVING(cpPriv->name = QString::fromUtf16(pName->Ptr(),pName->Length()));
CleanupStack::PopAndDestroy(pName);
pName = NULL;
-
+
cpPriv->isValid = true;
cpPriv->id = ident;
cpPriv->numericId = destination.Id();
@@ -336,64 +349,75 @@ void SymbianEngine::updateConfigurationsL()
QNetworkConfigurationPrivatePointer ptr(cpPriv);
snapConfigurations.insert(ident, ptr);
-
- mutex.unlock();
- QT_TRYCATCH_LEAVING(emit configurationAdded(ptr));
- mutex.lock();
+ if (!iFirstUpdate) {
+ QT_TRYCATCH_LEAVING(updateActiveAccessPoints());
+ updateStatesToSnaps();
+ mutex.unlock();
+ QT_TRYCATCH_LEAVING(emit configurationAdded(ptr));
+ mutex.lock();
+ }
}
- QNetworkConfigurationPrivatePointer privSNAP = snapConfigurations.value(ident);
-
+
+ // Loop through all connection methods in this SNAP
+ QMap<unsigned int, QNetworkConfigurationPrivatePointer> connections;
for (int j=0; j < destination.ConnectionMethodCount(); j++) {
RCmConnectionMethod connectionMethod = destination.ConnectionMethodL(j);
CleanupClosePushL(connectionMethod);
-
+
TUint32 iapId = connectionMethod.GetIntAttributeL(CMManager::ECmIapId);
QString iface = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(iapId));
// Check that IAP can be found from accessPointConfigurations list
- QNetworkConfigurationPrivatePointer priv = accessPointConfigurations.value(iface);
- if (!priv) {
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(iface);
+ if (!ptr) {
SymbianNetworkConfigurationPrivate *cpPriv = NULL;
TRAP(error, cpPriv = configFromConnectionMethodL(connectionMethod));
if (error == KErrNone) {
- QNetworkConfigurationPrivatePointer ptr(cpPriv);
+ ptr = QNetworkConfigurationPrivatePointer(cpPriv);
accessPointConfigurations.insert(ptr->id, ptr);
- mutex.unlock();
- QT_TRYCATCH_LEAVING(emit configurationAdded(ptr));
- mutex.lock();
-
- QMutexLocker configLocker(&privSNAP->mutex);
- privSNAP->serviceNetworkMembers.append(ptr);
+ if (!iFirstUpdate) {
+ QT_TRYCATCH_LEAVING(updateActiveAccessPoints());
+ updateStatesToSnaps();
+ mutex.unlock();
+ QT_TRYCATCH_LEAVING(emit configurationAdded(ptr));
+ mutex.lock();
+ }
}
} else {
knownConfigs.removeOne(iface);
- // Check that IAP can be found from related SNAP's configuration list
- bool iapFound = false;
- QMutexLocker snapConfigLocker(&privSNAP->mutex);
- for (int i = 0; i < privSNAP->serviceNetworkMembers.count(); i++) {
- if (toSymbianConfig(privSNAP->serviceNetworkMembers[i])->numericIdentifier() ==
- iapId) {
- iapFound = true;
- break;
- }
- }
- if (!iapFound)
- privSNAP->serviceNetworkMembers.append(priv);
}
-
+
+ if (ptr) {
+ unsigned int priority;
+ TRAPD(error, priority = destination.PriorityL(connectionMethod));
+ if (!error)
+ connections.insert(priority, ptr);
+ }
+
CleanupStack::PopAndDestroy(&connectionMethod);
}
-
+
+ QNetworkConfigurationPrivatePointer privSNAP = snapConfigurations.value(ident);
QMutexLocker snapConfigLocker(&privSNAP->mutex);
- if (privSNAP->serviceNetworkMembers.count() > 1) {
+
+ if (privSNAP->serviceNetworkMembers != connections) {
+ privSNAP->serviceNetworkMembers = connections;
+
// Roaming is supported only if SNAP contains more than one IAP
- privSNAP->roamingSupported = true;
+ privSNAP->roamingSupported = privSNAP->serviceNetworkMembers.count() > 1;
+
+ snapConfigLocker.unlock();
+
+ updateStatesToSnaps();
+
+ mutex.unlock();
+ QT_TRYCATCH_LEAVING(emit configurationChanged(privSNAP));
+ mutex.lock();
}
-
+
CleanupStack::PopAndDestroy(&destination);
}
CleanupStack::PopAndDestroy(&destinations);
-
#else
// S60 version is < Series60 3rd Edition Feature Pack 2
CCommsDbTableView* pDbTView = ipCommsDB->OpenTableLC(TPtrC(IAP));
@@ -411,10 +435,13 @@ void SymbianEngine::updateConfigurationsL()
if (readNetworkConfigurationValuesFromCommsDb(apId, cpPriv)) {
QNetworkConfigurationPrivatePointer ptr(cpPriv);
accessPointConfigurations.insert(ident, ptr);
-
- mutex.unlock();
- QT_TRYCATCH_LEAVING(emit configurationAdded(ptr));
- mutex.lock();
+ if (!iFirstUpdate) {
+ QT_TRYCATCH_LEAVING(updateActiveAccessPoints());
+ updateStatesToSnaps();
+ mutex.unlock();
+ QT_TRYCATCH_LEAVING(emit configurationAdded(ptr));
+ mutex.lock();
+ }
} else {
delete cpPriv;
}
@@ -423,8 +450,9 @@ void SymbianEngine::updateConfigurationsL()
}
CleanupStack::PopAndDestroy(pDbTView);
#endif
+
QT_TRYCATCH_LEAVING(updateActiveAccessPoints());
-
+
foreach (const QString &oldIface, knownConfigs) {
//remove non existing IAP
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.take(oldIface);
@@ -439,10 +467,13 @@ void SymbianEngine::updateConfigurationsL()
QNetworkConfigurationPrivatePointer ptr2 = snapConfigurations.value(iface);
// => Check if one of the IAPs of the SNAP is active
QMutexLocker snapConfigLocker(&ptr2->mutex);
- for (int i = 0; i < ptr2->serviceNetworkMembers.count(); ++i) {
- if (toSymbianConfig(ptr2->serviceNetworkMembers[i])->numericIdentifier() ==
+ QMutableMapIterator<unsigned int, QNetworkConfigurationPrivatePointer> i(ptr2->serviceNetworkMembers);
+ while (i.hasNext()) {
+ i.next();
+
+ if (toSymbianConfig(i.value())->numericIdentifier() ==
toSymbianConfig(ptr)->numericIdentifier()) {
- ptr2->serviceNetworkMembers.removeAt(i);
+ i.remove();
break;
}
}
@@ -463,6 +494,10 @@ void SymbianEngine::updateConfigurationsL()
stopCommsDatabaseNotifications();
TRAP_IGNORE(defaultConfig = defaultConfigurationL());
startCommsDatabaseNotifications();
+
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ updateStatesToSnaps();
+#endif
}
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
@@ -683,15 +718,21 @@ void SymbianEngine::updateActiveAccessPoints()
User::WaitForRequest(status);
QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId));
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
if (!ptr) {
// If IAP was not found, check if the update was about EasyWLAN
ptr = configurationFromEasyWlan(apId, connectionId);
+ // Change the ident correspondingly
+ if (ptr) {
+ ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX +
+ QString::number(qHash(toSymbianConfig(ptr)->numericIdentifier()));
+ }
}
#endif
if (ptr) {
iConnectionMonitor.GetIntAttribute(connectionId, subConnectionCount, KConnectionStatus, connectionStatus, status);
- User::WaitForRequest(status);
+ User::WaitForRequest(status);
+
if (connectionStatus == KLinkLayerOpen) {
online = true;
inactiveConfigs.removeOne(ident);
@@ -791,15 +832,19 @@ void SymbianEngine::updateStatesToSnaps()
// => Check if one of the IAPs of the SNAP is discovered or active
// => If one of IAPs is active, also SNAP is active
// => If one of IAPs is discovered but none of the IAPs is active, SNAP is discovered
- for (int i=0; i<ptr->serviceNetworkMembers.count(); i++) {
- QMutexLocker configLocker(&ptr->serviceNetworkMembers[i]->mutex);
+ QMapIterator<unsigned int, QNetworkConfigurationPrivatePointer> i(ptr->serviceNetworkMembers);
+ while (i.hasNext()) {
+ i.next();
+
+ const QNetworkConfigurationPrivatePointer child = i.value();
- if ((ptr->serviceNetworkMembers[i]->state & QNetworkConfiguration::Active)
- == QNetworkConfiguration::Active) {
+ QMutexLocker configLocker(&child->mutex);
+
+ if ((child->state & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
active = true;
break;
- } else if ((ptr->serviceNetworkMembers[i]->state & QNetworkConfiguration::Discovered)
- == QNetworkConfiguration::Discovered) {
+ } else if ((child->state & QNetworkConfiguration::Discovered) ==
+ QNetworkConfiguration::Discovered) {
discovered = true;
}
}
@@ -1035,7 +1080,7 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId));
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
if (!ptr) {
// Check if status was regarding EasyWLAN
ptr = configurationFromEasyWlan(apId, connectionId);
@@ -1060,7 +1105,7 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
User::WaitForRequest(status);
QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId));
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
if (!ptr) {
// Check for EasyWLAN
ptr = configurationFromEasyWlan(apId, connectionId);
@@ -1152,6 +1197,8 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
QT_TRYCATCH_LEAVING(changeConfigurationStateAtMaxTo(ptr, QNetworkConfiguration::Defined));
}
}
+ // Something has in IAPs, update states to SNAPs
+ updateStatesToSnaps();
}
break;
@@ -1168,7 +1215,7 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
User::WaitForRequest(status);
QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId));
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
if (!ptr) {
// If IAP was not found, check if the update was about EasyWLAN
ptr = configurationFromEasyWlan(apId, connectionId);
@@ -1189,7 +1236,7 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
}
}
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
// Tries to derive configuration from EasyWLAN.
// First checks if the interface brought up was EasyWLAN, then derives the real SSID,
// and looks up configuration based on that one.
@@ -1224,6 +1271,45 @@ QNetworkConfigurationPrivatePointer SymbianEngine::configurationFromEasyWlan(TUi
}
return QNetworkConfigurationPrivatePointer();
}
+
+bool SymbianEngine::easyWlanTrueIapId(TUint32& trueIapId)
+{
+ // Check if this is easy wlan id in the first place
+ if (trueIapId != iCmManager.EasyWlanIdL())
+ return false;
+
+ // Loop through all connections that connection monitor is aware
+ // and check for IAPs based on easy WLAN
+ TRequestStatus status;
+ TUint connectionCount;
+ iConnectionMonitor.GetConnectionCount(connectionCount, status);
+ User::WaitForRequest(status);
+ TUint connectionId;
+ TUint subConnectionCount;
+ TUint apId;
+ if (status.Int() == KErrNone) {
+ for (TUint i = 1; i <= connectionCount; i++) {
+ iConnectionMonitor.GetConnectionInfo(i, connectionId, subConnectionCount);
+ iConnectionMonitor.GetUintAttribute(connectionId, subConnectionCount,
+ KIAPId, apId, status);
+ User::WaitForRequest(status);
+ if (apId == trueIapId) {
+ QNetworkConfigurationPrivatePointer ptr =
+ configurationFromEasyWlan(apId, connectionId);
+ if (ptr) {
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNCM easyWlanTrueIapId(), found true IAP ID: "
+ << toSymbianConfig(ptr)->numericIdentifier();
+#endif
+ trueIapId = toSymbianConfig(ptr)->numericIdentifier();
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
#endif
// Sessions may use this function to report configuration state changes,
diff --git a/src/plugins/bearer/symbian/symbianengine.h b/src/plugins/bearer/symbian/symbianengine.h
index cfddc29c6a..ecd858d5c4 100644
--- a/src/plugins/bearer/symbian/symbianengine.h
+++ b/src/plugins/bearer/symbian/symbianengine.h
@@ -208,6 +208,7 @@ private:
QNetworkSession::State newState);
#ifdef OCC_FUNCTIONALITY_AVAILABLE
QNetworkConfigurationPrivatePointer configurationFromEasyWlan(TUint32 apId, TUint connectionId);
+ bool easyWlanTrueIapId(TUint32& trueIapId);
#endif
private: // Data
diff --git a/src/plugins/sqldrivers/db2/db2.pro b/src/plugins/sqldrivers/db2/db2.pro
index 5223beb96f..e053f3756b 100644
--- a/src/plugins/sqldrivers/db2/db2.pro
+++ b/src/plugins/sqldrivers/db2/db2.pro
@@ -1,10 +1,6 @@
-TARGET = qsqldb2
+TARGET = qsqldb2
-HEADERS = ../../../sql/drivers/db2/qsql_db2.h
-SOURCES = main.cpp \
- ../../../sql/drivers/db2/qsql_db2.cpp
-
-unix:!contains( LIBS, .*db2.* ):LIBS *= -ldb2
-win32:!contains( LIBS, .*db2.* ):LIBS *= -ldb2cli
+SOURCES = main.cpp
+include(../../../sql/drivers/db2/qsql_db2.pri)
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/ibase/ibase.pro b/src/plugins/sqldrivers/ibase/ibase.pro
index ec2bc7b987..7870ec8465 100644
--- a/src/plugins/sqldrivers/ibase/ibase.pro
+++ b/src/plugins/sqldrivers/ibase/ibase.pro
@@ -1,14 +1,6 @@
-TARGET = qsqlibase
+TARGET = qsqlibase
-HEADERS = ../../../sql/drivers/ibase/qsql_ibase.h
-SOURCES = main.cpp \
- ../../../sql/drivers/ibase/qsql_ibase.cpp
-
-unix:!contains( LIBS, .*gds.* ):!contains( LIBS, .*libfb.* ):LIBS *= -lgds
-
-win32:!contains( LIBS, .*gds.* ):!contains( LIBS, .*fbclient.* ) {
- !win32-borland:LIBS *= -lgds32_ms
- win32-borland:LIBS += gds32.lib
-}
+SOURCES = main.cpp
+include(../../../sql/drivers/ibase/qsql_ibase.pri)
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/mysql/mysql.pro b/src/plugins/sqldrivers/mysql/mysql.pro
index 9f5c619e19..b6d42fffc8 100644
--- a/src/plugins/sqldrivers/mysql/mysql.pro
+++ b/src/plugins/sqldrivers/mysql/mysql.pro
@@ -1,23 +1,6 @@
-TARGET = qsqlmysql
+TARGET = qsqlmysql
-HEADERS = ../../../sql/drivers/mysql/qsql_mysql.h
-SOURCES = main.cpp \
- ../../../sql/drivers/mysql/qsql_mysql.cpp
-
-unix: {
- isEmpty(QT_LFLAGS_MYSQL) {
- !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) {
- use_libmysqlclient_r:LIBS *= -lmysqlclient_r
- else:LIBS *= -lmysqlclient
- }
- } else {
- LIBS *= $$QT_LFLAGS_MYSQL
- QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL
- }
-}
-
-win32:!contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*) {
- LIBS *= -llibmysql
-}
+SOURCES = main.cpp
+include(../../../sql/drivers/mysql/qsql_mysql.pri)
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/oci/oci.pro b/src/plugins/sqldrivers/oci/oci.pro
index 3bf70a13f9..d7dcce9e35 100644
--- a/src/plugins/sqldrivers/oci/oci.pro
+++ b/src/plugins/sqldrivers/oci/oci.pro
@@ -1,13 +1,6 @@
-TARGET = qsqloci
+TARGET = qsqloci
-HEADERS = ../../../sql/drivers/oci/qsql_oci.h
-SOURCES = main.cpp \
- ../../../sql/drivers/oci/qsql_oci.cpp
-
-win32:LIBS *= -loci
-
-unix:!contains( LIBS, .*clnts.* ):LIBS *= -lclntsh
-
-macx:QMAKE_LFLAGS += -Wl,-flat_namespace,-U,_environ
+SOURCES = main.cpp
+include(../../../sql/drivers/oci/qsql_oci.pri)
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/odbc/odbc.pro b/src/plugins/sqldrivers/odbc/odbc.pro
index 2bf85f1f7e..677eb6eedf 100644
--- a/src/plugins/sqldrivers/odbc/odbc.pro
+++ b/src/plugins/sqldrivers/odbc/odbc.pro
@@ -1,19 +1,6 @@
-TARGET = qsqlodbc
+TARGET = qsqlodbc
-HEADERS = ../../../sql/drivers/odbc/qsql_odbc.h
-SOURCES = main.cpp \
- ../../../sql/drivers/odbc/qsql_odbc.cpp
-
-unix {
- !contains( LIBS, .*odbc.* ) {
- LIBS *= $$QT_LFLAGS_ODBC
- }
- DEFINES += UNICODE
-}
-
-win32 {
- !win32-borland:LIBS *= -lodbc32
- win32-borland:LIBS *= $(BCB)/lib/PSDK/odbc32.lib
-}
+SOURCES = main.cpp
+include(../../../sql/drivers/odbc/qsql_odbc.pri)
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/psql/psql.pro b/src/plugins/sqldrivers/psql/psql.pro
index 80a5348f5e..8276c0ae90 100644
--- a/src/plugins/sqldrivers/psql/psql.pro
+++ b/src/plugins/sqldrivers/psql/psql.pro
@@ -1,18 +1,6 @@
-TARGET = qsqlpsql
+TARGET = qsqlpsql
-HEADERS = ../../../sql/drivers/psql/qsql_psql.h
-SOURCES = main.cpp \
- ../../../sql/drivers/psql/qsql_psql.cpp
-
-unix|win32-g++*: {
- !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
+SOURCES = main.cpp
+include(../../../sql/drivers/psql/qsql_psql.pri)
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/sqlite/sqlite.pro b/src/plugins/sqldrivers/sqlite/sqlite.pro
index fb312334c1..f4c1671a4b 100644
--- a/src/plugins/sqldrivers/sqlite/sqlite.pro
+++ b/src/plugins/sqldrivers/sqlite/sqlite.pro
@@ -1,18 +1,7 @@
-TARGET = qsqlite
+TARGET = qsqlite
-HEADERS = ../../../sql/drivers/sqlite/qsql_sqlite.h
-SOURCES = smain.cpp \
- ../../../sql/drivers/sqlite/qsql_sqlite.cpp
-
-!system-sqlite:!contains( LIBS, .*sqlite.* ) {
- CONFIG(release, debug|release):DEFINES *= NDEBUG
- DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE
- INCLUDEPATH += ../../../3rdparty/sqlite
- SOURCES += ../../../3rdparty/sqlite/sqlite3.c
-} else {
- LIBS *= $$QT_LFLAGS_SQLITE
- QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE
-}
+SOURCES = smain.cpp
+include(../../../sql/drivers/sqlite/qsql_sqlite.pri)
wince*: DEFINES += HAVE_LOCALTIME_S=0
diff --git a/src/plugins/sqldrivers/sqlite2/sqlite2.pro b/src/plugins/sqldrivers/sqlite2/sqlite2.pro
index 88db22a63a..e6197b9906 100644
--- a/src/plugins/sqldrivers/sqlite2/sqlite2.pro
+++ b/src/plugins/sqldrivers/sqlite2/sqlite2.pro
@@ -1,9 +1,6 @@
-TARGET = qsqlite2
+TARGET = qsqlite2
-HEADERS = ../../../sql/drivers/sqlite2/qsql_sqlite2.h
-SOURCES = smain.cpp \
- ../../../sql/drivers/sqlite2/qsql_sqlite2.cpp
-
-!contains(LIBS, .*sqlite.*):LIBS *= -lsqlite
+SOURCES = smain.cpp
+include(../../../sql/drivers/sqlite2/qsql_sqlite2.pri)
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri
new file mode 100644
index 0000000000..494c64c55f
--- /dev/null
+++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri
@@ -0,0 +1,40 @@
+# We just want to include the sqlite3 binaries for Symbian for platforms that do not have them.
+!symbian-abld:!symbian-sbsv2 {
+ !symbian_no_export_sqlite:!exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) {
+ symbian_sqlite3_zip_file = $$PWD/SQLite3_v9.2.zip
+
+ # The QMAKE_COPY section is to update timestamp on the file.
+ symbian_sqlite3_header.input = symbian_sqlite3_zip_file
+ symbian_sqlite3_header.output = sqlite3.h
+ !isEmpty(MOC_DIR):symbian_sqlite3_header.output = $$MOC_DIR/$$symbian_sqlite3_header.output
+ symbian_sqlite3_header.CONFIG = combine no_link
+ symbian_sqlite3_header.dependency_type = TYPE_C
+ symbian_sqlite3_header.commands = $$QMAKE_UNZIP -j ${QMAKE_FILE_NAME} epoc32/include/stdapis/${QMAKE_FILE_OUT_BASE}.h \
+ && $$QMAKE_COPY ${QMAKE_FILE_OUT_BASE}.h ${QMAKE_FILE_OUT}.tmp \
+ && $$QMAKE_DEL_FILE ${QMAKE_FILE_OUT_BASE}.h \
+ && $$QMAKE_MOVE ${QMAKE_FILE_OUT}.tmp ${QMAKE_FILE_OUT}
+ silent:symbian_sqlite3_header.commands = @echo unzipping $@ && $$symbian_sqlite3_header.commands
+ QMAKE_EXTRA_COMPILERS += symbian_sqlite3_header
+
+ # The QMAKE_COPY section is to update timestamp on the file.
+ symbian_sqlite3_dso.input = symbian_sqlite3_zip_file
+ symbian_sqlite3_dso.output = sqlite3.dso
+ !isEmpty(OBJECTS_DIR):symbian_sqlite3_dso.output = $$OBJECTS_DIR/$$symbian_sqlite3_dso.output
+ symbian_sqlite3_dso.CONFIG = combine no_link target_predeps
+ symbian_sqlite3_dso.commands = $$QMAKE_UNZIP -j ${QMAKE_FILE_NAME} epoc32/release/armv5/lib/${QMAKE_FILE_OUT_BASE}.dso \
+ && $$QMAKE_COPY ${QMAKE_FILE_OUT_BASE}.dso ${QMAKE_FILE_OUT}.tmp \
+ && $$QMAKE_DEL_FILE ${QMAKE_FILE_OUT_BASE}.dso \
+ && $$QMAKE_MOVE ${QMAKE_FILE_OUT}.tmp ${QMAKE_FILE_OUT}
+ silent:symbian_sqlite3_dso.commands = @echo unzipping $@ && $$symbian_sqlite3_dso.commands
+ QMAKE_EXTRA_COMPILERS += symbian_sqlite3_dso
+
+ symbian_sqlite3_ver_dso.input = symbian_sqlite3_zip_file
+ symbian_sqlite3_ver_dso.output = sqlite3{00060003}.dso
+ !isEmpty(OBJECTS_DIR):symbian_sqlite3_ver_dso.output = $$OBJECTS_DIR/$$symbian_sqlite3_ver_dso.output
+ symbian_sqlite3_ver_dso.CONFIG = $$symbian_sqlite3_dso.CONFIG
+ symbian_sqlite3_ver_dso.commands = $$symbian_sqlite3_dso.commands
+ QMAKE_EXTRA_COMPILERS += symbian_sqlite3_ver_dso
+
+ QMAKE_LIBDIR *= $$OBJECTS_DIR
+ }
+}
diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
index 691cce1327..0d233e6d43 100644
--- a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
+++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
@@ -2,7 +2,7 @@
TEMPLATE = subdirs
# We just want to export the sqlite3 binaries for Symbian for platforms that do not have them.
-symbian {
+symbian-abld|symbian-sbsv2 {
!symbian_no_export_sqlite:!exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) {
BLD_INF_RULES.prj_exports += ":zip SQLite3_v9.2.zip"
}
diff --git a/src/plugins/sqldrivers/tds/tds.pro b/src/plugins/sqldrivers/tds/tds.pro
index 08a166baa9..b8e8ded321 100644
--- a/src/plugins/sqldrivers/tds/tds.pro
+++ b/src/plugins/sqldrivers/tds/tds.pro
@@ -1,15 +1,6 @@
-TARGET = qsqltds
+TARGET = qsqltds
-HEADERS = ../../../sql/drivers/tds/qsql_tds.h
-
-SOURCES = main.cpp \
- ../../../sql/drivers/tds/qsql_tds.cpp
-
-unix:!contains( LIBS, .*sybdb.* ):LIBS *= -lsybdb
-
-win32 {
- !win32-borland:LIBS *= -lNTWDBLIB
- win32-borland:LIBS *= $(BCB)/lib/PSDK/NTWDBLIB.LIB
-}
+SOURCES = main.cpp
+include(../../../sql/drivers/tds/qsql_tds.pri)
include(../qsqldriverbase.pri)
diff --git a/src/qbase.pri b/src/qbase.pri
index 064e67c1d3..f6af22f481 100644
--- a/src/qbase.pri
+++ b/src/qbase.pri
@@ -160,13 +160,25 @@ DEFINES *= QT_USE_FAST_OPERATOR_PLUS QT_USE_FAST_CONCATENATION
TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end
+qtPrepareTool(QMAKE_LUPDATE, lupdate)
+qtPrepareTool(QMAKE_LRELEASE, lrelease)
+
moc_dir.name = moc_location
moc_dir.variable = QMAKE_MOC
uic_dir.name = uic_location
uic_dir.variable = QMAKE_UIC
-QMAKE_PKGCONFIG_VARIABLES += moc_dir uic_dir
+rcc_dir.name = rcc_location
+rcc_dir.variable = QMAKE_RCC
+
+lupdate_dir.name = lupdate_location
+lupdate_dir.variable = QMAKE_LUPDATE
+
+lrelease_dir.name = lrelease_location
+lrelease_dir.variable = QMAKE_LRELEASE
+
+QMAKE_PKGCONFIG_VARIABLES += moc_dir uic_dir rcc_dir lupdate_dir lrelease_dir
include(qt_targets.pri)
diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def
index 94be1bba5d..1a79f6322a 100644
--- a/src/s60installs/bwins/QtCoreu.def
+++ b/src/s60installs/bwins/QtCoreu.def
@@ -3122,7 +3122,7 @@ EXPORTS
?reset@QIODevice@@UAE_NXZ @ 3121 NONAME ; bool QIODevice::reset(void)
?reset@QMetaProperty@@QBE_NPAVQObject@@@Z @ 3122 NONAME ; bool QMetaProperty::reset(class QObject *) const
?reset@QTextStream@@QAEXXZ @ 3123 NONAME ; void QTextStream::reset(void)
- ?resetCurrentSender@QObjectPrivate@@SAXPAVQObject@@PAUSender@1@1@Z @ 3124 NONAME ABSENT ; void QObjectPrivate::resetCurrentSender(class QObject *, struct QObjectPrivate::Sender *, struct QObjectPrivate::Sender *)
+ ?resetCurrentSender@QObjectPrivate@@SAXPAVQObject@@PAUSender@1@1@Z @ 3124 NONAME ; void QObjectPrivate::resetCurrentSender(class QObject *, struct QObjectPrivate::Sender *, struct QObjectPrivate::Sender *)
?resetDeleteWatch@QObjectPrivate@@SAXPAV1@PAHH@Z @ 3125 NONAME ; void QObjectPrivate::resetDeleteWatch(class QObjectPrivate *, int *, int)
?resetStatus@QDataStream@@QAEXXZ @ 3126 NONAME ; void QDataStream::resetStatus(void)
?resetStatus@QTextStream@@QAEXXZ @ 3127 NONAME ; void QTextStream::resetStatus(void)
@@ -3281,7 +3281,7 @@ EXPORTS
?setCoords@QRectF@@QAEXMMMM@Z @ 3280 NONAME ; void QRectF::setCoords(float, float, float, float)
?setCurrent@QDir@@SA_NABVQString@@@Z @ 3281 NONAME ; bool QDir::setCurrent(class QString const &)
?setCurrentPath@QFSFileEngine@@SA_NABVQString@@@Z @ 3282 NONAME ; bool QFSFileEngine::setCurrentPath(class QString const &)
- ?setCurrentSender@QObjectPrivate@@SAPAUSender@1@PAVQObject@@PAU21@@Z @ 3283 NONAME ABSENT ; struct QObjectPrivate::Sender * QObjectPrivate::setCurrentSender(class QObject *, struct QObjectPrivate::Sender *)
+ ?setCurrentSender@QObjectPrivate@@SAPAUSender@1@PAVQObject@@PAU21@@Z @ 3283 NONAME ; struct QObjectPrivate::Sender * QObjectPrivate::setCurrentSender(class QObject *, struct QObjectPrivate::Sender *)
?setCurrentTime@QAbstractAnimation@@QAEXH@Z @ 3284 NONAME ; void QAbstractAnimation::setCurrentTime(int)
?setCurrentTime@QTimeLine@@QAEXH@Z @ 3285 NONAME ; void QTimeLine::setCurrentTime(int)
?setCurveShape@QTimeLine@@QAEXW4CurveShape@1@@Z @ 3286 NONAME ; void QTimeLine::setCurveShape(enum QTimeLine::CurveShape)
@@ -4417,71 +4417,69 @@ EXPORTS
?QBasicAtomicInt_testAndSetRelease@@YA_NPCHHH@Z @ 4416 NONAME ; bool QBasicAtomicInt_testAndSetRelease(int volatile *, int, int)
?QBasicAtomicInt_fetchAndStoreAcquire@@YAHPCHH@Z @ 4417 NONAME ; int QBasicAtomicInt_fetchAndStoreAcquire(int volatile *, int)
?QBasicAtomicInt_fetchAndAddAcquire@@YAHPCHH@Z @ 4418 NONAME ; int QBasicAtomicInt_fetchAndAddAcquire(int volatile *, int)
- ??0QString@@QAE@PBVQChar@@@Z @ 4419 NONAME ; QString::QString(class QChar const *)
- ??0QTextDecoder@@QAE@PBVQTextCodec@@V?$QFlags@W4ConversionFlag@QTextCodec@@@@@Z @ 4420 NONAME ; QTextDecoder::QTextDecoder(class QTextCodec const *, class QFlags<enum QTextCodec::ConversionFlag>)
- ??0QTextEncoder@@QAE@PBVQTextCodec@@V?$QFlags@W4ConversionFlag@QTextCodec@@@@@Z @ 4421 NONAME ; QTextEncoder::QTextEncoder(class QTextCodec const *, class QFlags<enum QTextCodec::ConversionFlag>)
- ??0QVariant@@QAE@ABVQEasingCurve@@@Z @ 4422 NONAME ; QVariant::QVariant(class QEasingCurve const &)
- ??5@YAAAVQDataStream@@AAV0@AAVQEasingCurve@@@Z @ 4423 NONAME ; class QDataStream & operator>>(class QDataStream &, class QEasingCurve &)
- ??6@YAAAVQDataStream@@AAV0@ABVQEasingCurve@@@Z @ 4424 NONAME ; class QDataStream & operator<<(class QDataStream &, class QEasingCurve const &)
- ??8QElapsedTimer@@QBE_NABV0@@Z @ 4425 NONAME ; bool QElapsedTimer::operator==(class QElapsedTimer const &) const
- ??9QElapsedTimer@@QBE_NABV0@@Z @ 4426 NONAME ; bool QElapsedTimer::operator!=(class QElapsedTimer const &) const
- ??M@YA_NABVQElapsedTimer@@0@Z @ 4427 NONAME ; bool operator<(class QElapsedTimer const &, class QElapsedTimer const &)
- ?append@QListData@@QAEPAPAXH@Z @ 4428 NONAME ; void * * QListData::append(int)
- ?clearHistory@QStateMachinePrivate@@QAEXXZ @ 4429 NONAME ; void QStateMachinePrivate::clearHistory(void)
- ?clockType@QElapsedTimer@@SA?AW4ClockType@1@XZ @ 4430 NONAME ; enum QElapsedTimer::ClockType QElapsedTimer::clockType(void)
- ?currentDateTimeUtc@QDateTime@@SA?AV1@XZ @ 4431 NONAME ; class QDateTime QDateTime::currentDateTimeUtc(void)
- ?currentMSecsSinceEpoch@QDateTime@@SA_JXZ @ 4432 NONAME ; long long QDateTime::currentMSecsSinceEpoch(void)
- ?detach@QListData@@QAEPAUData@1@H@Z @ 4433 NONAME ; struct QListData::Data * QListData::detach(int)
- ?detach_grow@QListData@@QAEPAUData@1@PAHH@Z @ 4434 NONAME ; struct QListData::Data * QListData::detach_grow(int *, int)
- ?elapsed@QElapsedTimer@@QBE_JXZ @ 4435 NONAME ; long long QElapsedTimer::elapsed(void) const
- ?fromMSecsSinceEpoch@QDateTime@@SA?AV1@_J@Z @ 4436 NONAME ; class QDateTime QDateTime::fromMSecsSinceEpoch(long long)
- ?hasExpired@QElapsedTimer@@QBE_N_J@Z @ 4437 NONAME ; bool QElapsedTimer::hasExpired(long long) const
- ?invalidate@QElapsedTimer@@QAEXXZ @ 4438 NONAME ; void QElapsedTimer::invalidate(void)
- ?isMonotonic@QElapsedTimer@@SA_NXZ @ 4439 NONAME ; bool QElapsedTimer::isMonotonic(void)
- ?isSharedWith@QByteArray@@QBE_NABV1@@Z @ 4440 NONAME ; bool QByteArray::isSharedWith(class QByteArray const &) const
- ?isSharedWith@QString@@QBE_NABV1@@Z @ 4441 NONAME ; bool QString::isSharedWith(class QString const &) const
- ?isValid@QElapsedTimer@@QBE_NXZ @ 4442 NONAME ; bool QElapsedTimer::isValid(void) const
- ?makeDecoder@QTextCodec@@QBEPAVQTextDecoder@@V?$QFlags@W4ConversionFlag@QTextCodec@@@@@Z @ 4443 NONAME ; class QTextDecoder * QTextCodec::makeDecoder(class QFlags<enum QTextCodec::ConversionFlag>) const
- ?makeEncoder@QTextCodec@@QBEPAVQTextEncoder@@V?$QFlags@W4ConversionFlag@QTextCodec@@@@@Z @ 4444 NONAME ; class QTextEncoder * QTextCodec::makeEncoder(class QFlags<enum QTextCodec::ConversionFlag>) const
- ?msecsSinceReference@QElapsedTimer@@QBE_JXZ @ 4445 NONAME ; long long QElapsedTimer::msecsSinceReference(void) const
- ?msecsTo@QElapsedTimer@@QBE_JABV1@@Z @ 4446 NONAME ; long long QElapsedTimer::msecsTo(class QElapsedTimer const &) const
- ?qDecodeDataUrl@@YA?AU?$QPair@VQString@@VQByteArray@@@@ABVQUrl@@@Z @ 4447 NONAME ; struct QPair<class QString, class QByteArray> qDecodeDataUrl(class QUrl const &)
- ?qDetectCPUFeatures@@YAIXZ @ 4448 NONAME ; unsigned int qDetectCPUFeatures(void)
+ ?validCodecs@QTextCodec@@CA_NXZ @ 4419 NONAME ; bool QTextCodec::validCodecs(void)
+ ?clearHistory@QStateMachinePrivate@@QAEXXZ @ 4420 NONAME ; void QStateMachinePrivate::clearHistory(void)
+ ?nativeArguments@QProcess@@QBE?AVQString@@XZ @ 4421 NONAME ; class QString QProcess::nativeArguments(void) const
+ ?detach@QListData@@QAEPAUData@1@H@Z @ 4422 NONAME ; struct QListData::Data * QListData::detach(int)
+ ?trUtf8@QEventDispatcherSymbian@@SA?AVQString@@PBD0H@Z @ 4423 NONAME ; class QString QEventDispatcherSymbian::trUtf8(char const *, char const *, int)
+ ?destroyed@QAbstractDeclarativeData@@2P6AXPAV1@PAVQObject@@@ZA @ 4424 NONAME ; void (*QAbstractDeclarativeData::destroyed)(class QAbstractDeclarativeData *, class QObject *)
+ ??M@YA_NABVQElapsedTimer@@0@Z @ 4425 NONAME ; bool operator<(class QElapsedTimer const &, class QElapsedTimer const &)
+ ?clockType@QElapsedTimer@@SA?AW4ClockType@1@XZ @ 4426 NONAME ; enum QElapsedTimer::ClockType QElapsedTimer::clockType(void)
+ ?isHighSurrogate@QChar@@SA_NI@Z @ 4427 NONAME ; bool QChar::isHighSurrogate(unsigned int)
+ ?start@QElapsedTimer@@QAEXXZ @ 4428 NONAME ; void QElapsedTimer::start(void)
+ ??0QVariant@@QAE@ABVQEasingCurve@@@Z @ 4429 NONAME ; QVariant::QVariant(class QEasingCurve const &)
+ ?isValid@QElapsedTimer@@QBE_NXZ @ 4430 NONAME ; bool QElapsedTimer::isValid(void) const
+ ?qt_metacast@QEventDispatcherSymbian@@UAEPAXPBD@Z @ 4431 NONAME ; void * QEventDispatcherSymbian::qt_metacast(char const *)
+ ?toMSecsSinceEpoch@QDateTime@@QBE_JXZ @ 4432 NONAME ; long long QDateTime::toMSecsSinceEpoch(void) const
+ ?hasExpired@QElapsedTimer@@QBE_N_J@Z @ 4433 NONAME ; bool QElapsedTimer::hasExpired(long long) const
+ ?makeEncoder@QTextCodec@@QBEPAVQTextEncoder@@V?$QFlags@W4ConversionFlag@QTextCodec@@@@@Z @ 4434 NONAME ; class QTextEncoder * QTextCodec::makeEncoder(class QFlags<enum QTextCodec::ConversionFlag>) const
+ ??9QElapsedTimer@@QBE_NABV0@@Z @ 4435 NONAME ; bool QElapsedTimer::operator!=(class QElapsedTimer const &) const
+ ?setRawData@QString@@QAEAAV1@PBVQChar@@H@Z @ 4436 NONAME ; class QString & QString::setRawData(class QChar const *, int)
+ ?registerTypedef@QMetaType@@SAHPBDH@Z @ 4437 NONAME ; int QMetaType::registerTypedef(char const *, int)
+ ??8QElapsedTimer@@QBE_NABV0@@Z @ 4438 NONAME ; bool QElapsedTimer::operator==(class QElapsedTimer const &) const
+ ?makeDecoder@QTextCodec@@QBEPAVQTextDecoder@@V?$QFlags@W4ConversionFlag@QTextCodec@@@@@Z @ 4439 NONAME ; class QTextDecoder * QTextCodec::makeDecoder(class QFlags<enum QTextCodec::ConversionFlag>) const
+ ?metaObject@QEventDispatcherSymbian@@UBEPBUQMetaObject@@XZ @ 4440 NONAME ; struct QMetaObject const * QEventDispatcherSymbian::metaObject(void) const
+ ?transitions@QState@@QBE?AV?$QList@PAVQAbstractTransition@@@@XZ @ 4441 NONAME ; class QList<class QAbstractTransition *> QState::transitions(void) const
+ ?qDetectCPUFeatures@@YAIXZ @ 4442 NONAME ; unsigned int qDetectCPUFeatures(void)
+ ?isSharedWith@QString@@QBE_NABV1@@Z @ 4443 NONAME ; bool QString::isSharedWith(class QString const &) const
+ ?parentChanged@QAbstractDeclarativeData@@2P6AXPAV1@PAVQObject@@1@ZA @ 4444 NONAME ; void (*QAbstractDeclarativeData::parentChanged)(class QAbstractDeclarativeData *, class QObject *, class QObject *)
+ ?currentMSecsSinceEpoch@QDateTime@@SA_JXZ @ 4445 NONAME ; long long QDateTime::currentMSecsSinceEpoch(void)
+ ?staticMetaObject@QEventDispatcherSymbian@@2UQMetaObject@@B @ 4446 NONAME ; struct QMetaObject const QEventDispatcherSymbian::staticMetaObject
+ ?msecsTo@QElapsedTimer@@QBE_JABV1@@Z @ 4447 NONAME ; long long QElapsedTimer::msecsTo(class QElapsedTimer const &) const
+ ?toEasingCurve@QVariant@@QBE?AVQEasingCurve@@XZ @ 4448 NONAME ; class QEasingCurve QVariant::toEasingCurve(void) const
?registerStreamOperators@QMetaType@@SAXHP6AXAAVQDataStream@@PBX@ZP6AX0PAX@Z@Z @ 4449 NONAME ; void QMetaType::registerStreamOperators(int, void (*)(class QDataStream &, void const *), void (*)(class QDataStream &, void *))
- ?registerTypedef@QMetaType@@SAHPBDH@Z @ 4450 NONAME ; int QMetaType::registerTypedef(char const *, int)
- ?replace@QByteArray@@QAEAAV1@HHPBDH@Z @ 4451 NONAME ; class QByteArray & QByteArray::replace(int, int, char const *, int)
- ?restart@QElapsedTimer@@QAE_JXZ @ 4452 NONAME ; long long QElapsedTimer::restart(void)
- ?secsTo@QElapsedTimer@@QBE_JABV1@@Z @ 4453 NONAME ; long long QElapsedTimer::secsTo(class QElapsedTimer const &) const
- ?setMSecsSinceEpoch@QDateTime@@QAEX_J@Z @ 4454 NONAME ; void QDateTime::setMSecsSinceEpoch(long long)
- ?start@QElapsedTimer@@QAEXXZ @ 4455 NONAME ; void QElapsedTimer::start(void)
- ?toEasingCurve@QVariant@@QBE?AVQEasingCurve@@XZ @ 4456 NONAME ; class QEasingCurve QVariant::toEasingCurve(void) const
- ?toMSecsSinceEpoch@QDateTime@@QBE_JXZ @ 4457 NONAME ; long long QDateTime::toMSecsSinceEpoch(void) const
- ?transitions@QState@@QBE?AV?$QList@PAVQAbstractTransition@@@@XZ @ 4458 NONAME ; class QList<class QAbstractTransition *> QState::transitions(void) const
- ?validCodecs@QTextCodec@@CA_NXZ @ 4459 NONAME ; bool QTextCodec::validCodecs(void)
- ?destroyed@QDeclarativeData@@2P6AXPAV1@PAVQObject@@@ZA @ 4460 NONAME ABSENT ; void (*QDeclarativeData::destroyed)(class QDeclarativeData *, class QObject *)
- ?parentChanged@QDeclarativeData@@2P6AXPAV1@PAVQObject@@1@ZA @ 4461 NONAME ABSENT ; void (*QDeclarativeData::parentChanged)(class QDeclarativeData *, class QObject *, class QObject *)
- ?parentChanged@QAbstractDeclarativeData@@2P6AXPAV1@PAVQObject@@1@ZA @ 4462 NONAME ; void (*QAbstractDeclarativeData::parentChanged)(class QAbstractDeclarativeData *, class QObject *, class QObject *)
- ?destroyed@QAbstractDeclarativeData@@2P6AXPAV1@PAVQObject@@@ZA @ 4463 NONAME ; void (*QAbstractDeclarativeData::destroyed)(class QAbstractDeclarativeData *, class QObject *)
- ?selectThread@QEventDispatcherSymbian@@AAEAAVQSelectThread@@XZ @ 4464 NONAME ; class QSelectThread & QEventDispatcherSymbian::selectThread(void)
- ?setRawData@QByteArray@@QAEAAV1@PBDI@Z @ 4465 NONAME ; class QByteArray & QByteArray::setRawData(char const *, unsigned int)
- ?setRawData@QString@@QAEAAV1@PBVQChar@@H@Z @ 4466 NONAME ; class QString & QString::setRawData(class QChar const *, int)
- ?getStaticMetaObject@QEventDispatcherSymbian@@SAABUQMetaObject@@XZ @ 4467 NONAME ; struct QMetaObject const & QEventDispatcherSymbian::getStaticMetaObject(void)
- ?isHighSurrogate@QChar@@SA_NI@Z @ 4468 NONAME ; bool QChar::isHighSurrogate(unsigned int)
- ?isLowSurrogate@QChar@@SA_NI@Z @ 4469 NONAME ; bool QChar::isLowSurrogate(unsigned int)
- ?metaObject@QEventDispatcherSymbian@@UBEPBUQMetaObject@@XZ @ 4470 NONAME ; struct QMetaObject const * QEventDispatcherSymbian::metaObject(void) const
- ?msecsTo@QDateTime@@QBE_JABV1@@Z @ 4471 NONAME ; long long QDateTime::msecsTo(class QDateTime const &) const
- ?qt_metacall@QEventDispatcherSymbian@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 4472 NONAME ; int QEventDispatcherSymbian::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacast@QEventDispatcherSymbian@@UAEPAXPBD@Z @ 4473 NONAME ; void * QEventDispatcherSymbian::qt_metacast(char const *)
- ?requiresSurrogates@QChar@@SA_NI@Z @ 4474 NONAME ; bool QChar::requiresSurrogates(unsigned int)
- ?symbianInit@QCoreApplicationPrivate@@QAEXXZ @ 4475 NONAME ; void QCoreApplicationPrivate::symbianInit(void)
- ?tr@QEventDispatcherSymbian@@SA?AVQString@@PBD0@Z @ 4476 NONAME ; class QString QEventDispatcherSymbian::tr(char const *, char const *)
- ?tr@QEventDispatcherSymbian@@SA?AVQString@@PBD0H@Z @ 4477 NONAME ; class QString QEventDispatcherSymbian::tr(char const *, char const *, int)
- ?trUtf8@QEventDispatcherSymbian@@SA?AVQString@@PBD0@Z @ 4478 NONAME ; class QString QEventDispatcherSymbian::trUtf8(char const *, char const *)
- ?trUtf8@QEventDispatcherSymbian@@SA?AVQString@@PBD0H@Z @ 4479 NONAME ; class QString QEventDispatcherSymbian::trUtf8(char const *, char const *, int)
- ?staticMetaObject@QEventDispatcherSymbian@@2UQMetaObject@@B @ 4480 NONAME ; struct QMetaObject const QEventDispatcherSymbian::staticMetaObject
+ ?replace@QByteArray@@QAEAAV1@HHPBDH@Z @ 4450 NONAME ; class QByteArray & QByteArray::replace(int, int, char const *, int)
+ ?elapsed@QElapsedTimer@@QBE_JXZ @ 4451 NONAME ; long long QElapsedTimer::elapsed(void) const
+ ??0QTextEncoder@@QAE@PBVQTextCodec@@V?$QFlags@W4ConversionFlag@QTextCodec@@@@@Z @ 4452 NONAME ; QTextEncoder::QTextEncoder(class QTextCodec const *, class QFlags<enum QTextCodec::ConversionFlag>)
+ ??6@YAAAVQDataStream@@AAV0@ABVQEasingCurve@@@Z @ 4453 NONAME ; class QDataStream & operator<<(class QDataStream &, class QEasingCurve const &)
+ ?qDecodeDataUrl@@YA?AU?$QPair@VQString@@VQByteArray@@@@ABVQUrl@@@Z @ 4454 NONAME ; struct QPair<class QString, class QByteArray> qDecodeDataUrl(class QUrl const &)
+ ?trUtf8@QEventDispatcherSymbian@@SA?AVQString@@PBD0@Z @ 4455 NONAME ; class QString QEventDispatcherSymbian::trUtf8(char const *, char const *)
+ ?setNativeArguments@QProcess@@QAEXABVQString@@@Z @ 4456 NONAME ; void QProcess::setNativeArguments(class QString const &)
+ ?msecsTo@QDateTime@@QBE_JABV1@@Z @ 4457 NONAME ; long long QDateTime::msecsTo(class QDateTime const &) const
+ ?tr@QEventDispatcherSymbian@@SA?AVQString@@PBD0H@Z @ 4458 NONAME ; class QString QEventDispatcherSymbian::tr(char const *, char const *, int)
+ ?setMSecsSinceEpoch@QDateTime@@QAEX_J@Z @ 4459 NONAME ; void QDateTime::setMSecsSinceEpoch(long long)
+ ?tr@QEventDispatcherSymbian@@SA?AVQString@@PBD0@Z @ 4460 NONAME ; class QString QEventDispatcherSymbian::tr(char const *, char const *)
+ ?isSharedWith@QByteArray@@QBE_NABV1@@Z @ 4461 NONAME ; bool QByteArray::isSharedWith(class QByteArray const &) const
+ ?secsTo@QElapsedTimer@@QBE_JABV1@@Z @ 4462 NONAME ; long long QElapsedTimer::secsTo(class QElapsedTimer const &) const
+ ??5@YAAAVQDataStream@@AAV0@AAVQEasingCurve@@@Z @ 4463 NONAME ; class QDataStream & operator>>(class QDataStream &, class QEasingCurve &)
+ ??0QString@@QAE@PBVQChar@@@Z @ 4464 NONAME ; QString::QString(class QChar const *)
+ ?append@QListData@@QAEPAPAXH@Z @ 4465 NONAME ; void * * QListData::append(int)
+ ?getStaticMetaObject@QEventDispatcherSymbian@@SAABUQMetaObject@@XZ @ 4466 NONAME ; struct QMetaObject const & QEventDispatcherSymbian::getStaticMetaObject(void)
+ ?peek@QIODevicePrivate@@UAE?AVQByteArray@@_J@Z @ 4467 NONAME ; class QByteArray QIODevicePrivate::peek(long long)
+ ?detach_grow@QListData@@QAEPAUData@1@PAHH@Z @ 4468 NONAME ; struct QListData::Data * QListData::detach_grow(int *, int)
+ ?symbianInit@QCoreApplicationPrivate@@QAEXXZ @ 4469 NONAME ; void QCoreApplicationPrivate::symbianInit(void)
+ ??0QTextDecoder@@QAE@PBVQTextCodec@@V?$QFlags@W4ConversionFlag@QTextCodec@@@@@Z @ 4470 NONAME ; QTextDecoder::QTextDecoder(class QTextCodec const *, class QFlags<enum QTextCodec::ConversionFlag>)
+ ?requiresSurrogates@QChar@@SA_NI@Z @ 4471 NONAME ; bool QChar::requiresSurrogates(unsigned int)
+ ?isLowSurrogate@QChar@@SA_NI@Z @ 4472 NONAME ; bool QChar::isLowSurrogate(unsigned int)
+ ?qt_metacall@QEventDispatcherSymbian@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 4473 NONAME ; int QEventDispatcherSymbian::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?setRawData@QByteArray@@QAEAAV1@PBDI@Z @ 4474 NONAME ; class QByteArray & QByteArray::setRawData(char const *, unsigned int)
+ ?fromMSecsSinceEpoch@QDateTime@@SA?AV1@_J@Z @ 4475 NONAME ; class QDateTime QDateTime::fromMSecsSinceEpoch(long long)
+ ?invalidate@QElapsedTimer@@QAEXXZ @ 4476 NONAME ; void QElapsedTimer::invalidate(void)
+ ?restart@QElapsedTimer@@QAE_JXZ @ 4477 NONAME ; long long QElapsedTimer::restart(void)
+ ?currentDateTimeUtc@QDateTime@@SA?AV1@XZ @ 4478 NONAME ; class QDateTime QDateTime::currentDateTimeUtc(void)
+ ?isMonotonic@QElapsedTimer@@SA_NXZ @ 4479 NONAME ; bool QElapsedTimer::isMonotonic(void)
+ ?peek@QIODevicePrivate@@UAE_JPAD_J@Z @ 4480 NONAME ; long long QIODevicePrivate::peek(char *, long long)
?textDirection@QLocale@@QBE?AW4LayoutDirection@Qt@@XZ @ 4481 NONAME ; enum Qt::LayoutDirection QLocale::textDirection(void) const
- ?peek@QIODevicePrivate@@UAE_JPAD_J@Z @ 4482 NONAME ; long long QIODevicePrivate::peek(char *, long long)
- ?peek@QIODevicePrivate@@UAE?AVQByteArray@@_J@Z @ 4483 NONAME ; class QByteArray QIODevicePrivate::peek(long long)
- ?nativeArguments@QProcess@@QBE?AVQString@@XZ @ 4484 NONAME ; class QString QProcess::nativeArguments(void) const
- ?setNativeArguments@QProcess@@QAEXABVQString@@@Z @ 4485 NONAME ; void QProcess::setNativeArguments(class QString const &)
+ ?msecsSinceReference@QElapsedTimer@@QBE_JXZ @ 4482 NONAME ; long long QElapsedTimer::msecsSinceReference(void) const
+ ?selectThread@QEventDispatcherSymbian@@AAEAAVQSelectThread@@XZ @ 4483 NONAME ; class QSelectThread & QEventDispatcherSymbian::selectThread(void)
diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def
index 8fdd72c218..480d9fff3e 100644
--- a/src/s60installs/bwins/QtDeclarativeu.def
+++ b/src/s60installs/bwins/QtDeclarativeu.def
@@ -12,7 +12,7 @@ EXPORTS
??0QDeclarativeText@@QAE@PAVQDeclarativeItem@@@Z @ 11 NONAME ; QDeclarativeText::QDeclarativeText(class QDeclarativeItem *)
?trUtf8@QDeclarativePixmapReply@@SA?AVQString@@PBD0H@Z @ 12 NONAME ABSENT ; class QString QDeclarativePixmapReply::trUtf8(char const *, char const *, int)
?propertyTypeName@QDeclarativeProperty@@QBEPBDXZ @ 13 NONAME ; char const * QDeclarativeProperty::propertyTypeName(void) const
- ?wantsFocusChanged@QDeclarativeItem@@IAEX_N@Z @ 14 NONAME ; void QDeclarativeItem::wantsFocusChanged(bool)
+ ?wantsFocusChanged@QDeclarativeItem@@IAEX_N@Z @ 14 NONAME ABSENT ; void QDeclarativeItem::wantsFocusChanged(bool)
?getStaticMetaObject@QDeclarativeDebugService@@SAABUQMetaObject@@XZ @ 15 NONAME ; struct QMetaObject const & QDeclarativeDebugService::getStaticMetaObject(void)
?setLeft@QDeclarativeAnchors@@QAEXABVQDeclarativeAnchorLine@@@Z @ 16 NONAME ; void QDeclarativeAnchors::setLeft(class QDeclarativeAnchorLine const &)
?qt_metacall@QDeclarativeExpression@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 17 NONAME ; int QDeclarativeExpression::qt_metacall(enum QMetaObject::Call, int, void * *)
@@ -61,7 +61,7 @@ EXPORTS
??0QDeclarativeDomObject@@QAE@XZ @ 60 NONAME ; QDeclarativeDomObject::QDeclarativeDomObject(void)
?errors@QDeclarativeDomDocument@@QBE?AV?$QList@VQDeclarativeError@@@@XZ @ 61 NONAME ; class QList<class QDeclarativeError> QDeclarativeDomDocument::errors(void) const
?toChanged@QDeclarativeTransition@@IAEXXZ @ 62 NONAME ; void QDeclarativeTransition::toChanged(void)
- ?registerAutoParentFunction@QDeclarativePrivate@@YAHP6A?AW4AutoParentResult@1@PAVQObject@@0@Z@Z @ 63 NONAME ; int QDeclarativePrivate::registerAutoParentFunction(enum QDeclarativePrivate::AutoParentResult (*)(class QObject *, class QObject *))
+ ?registerAutoParentFunction@QDeclarativePrivate@@YAHP6A?AW4AutoParentResult@1@PAVQObject@@0@Z@Z @ 63 NONAME ABSENT ; int QDeclarativePrivate::registerAutoParentFunction(enum QDeclarativePrivate::AutoParentResult (*)(class QObject *, class QObject *))
?objectOwnership@QDeclarativeEngine@@SA?AW4ObjectOwnership@1@PAVQObject@@@Z @ 64 NONAME ; enum QDeclarativeEngine::ObjectOwnership QDeclarativeEngine::objectOwnership(class QObject *)
??0QDeclarativeDebugWatch@@QAE@PAVQObject@@@Z @ 65 NONAME ; QDeclarativeDebugWatch::QDeclarativeDebugWatch(class QObject *)
?value@QDeclarativePropertyMap@@QBE?AVQVariant@@ABVQString@@@Z @ 66 NONAME ; class QVariant QDeclarativePropertyMap::value(class QString const &) const
@@ -79,7 +79,7 @@ EXPORTS
?isInvalid@QDeclarativeDomValue@@QBE_NXZ @ 78 NONAME ; bool QDeclarativeDomValue::isInvalid(void) const
?trUtf8@QDeclarativeText@@SA?AVQString@@PBD0H@Z @ 79 NONAME ; class QString QDeclarativeText::trUtf8(char const *, char const *, int)
??0QDeclarativeListReference@@QAE@ABV0@@Z @ 80 NONAME ; QDeclarativeListReference::QDeclarativeListReference(class QDeclarativeListReference const &)
- ?registerType@QDeclarativePrivate@@YAHABURegisterInterface@1@@Z @ 81 NONAME ; int QDeclarativePrivate::registerType(struct QDeclarativePrivate::RegisterInterface const &)
+ ?registerType@QDeclarativePrivate@@YAHABURegisterInterface@1@@Z @ 81 NONAME ABSENT ; int QDeclarativePrivate::registerType(struct QDeclarativePrivate::RegisterInterface const &)
?classBegin@QDeclarativeItem@@MAEXXZ @ 82 NONAME ; void QDeclarativeItem::classBegin(void)
?setTransformOrigin@QDeclarativeItem@@QAEXW4TransformOrigin@1@@Z @ 83 NONAME ; void QDeclarativeItem::setTransformOrigin(enum QDeclarativeItem::TransformOrigin)
?request@QDeclarativePixmapCache@@SAPAVQDeclarativePixmapReply@@PAVQDeclarativeEngine@@ABVQUrl@@HH@Z @ 84 NONAME ABSENT ; class QDeclarativePixmapReply * QDeclarativePixmapCache::request(class QDeclarativeEngine *, class QUrl const &, int, int)
@@ -265,7 +265,7 @@ EXPORTS
?readyRead@QPacketProtocol@@IAEXXZ @ 264 NONAME ; void QPacketProtocol::readyRead(void)
?qt_metacall@QDeclarativeValueType@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 265 NONAME ; int QDeclarativeValueType::qt_metacall(enum QMetaObject::Call, int, void * *)
?propertyType@QDeclarativePropertyPrivate@@QBEHXZ @ 266 NONAME ; int QDeclarativePropertyPrivate::propertyType(void) const
- ?engine@QDeclarativeView@@QAEPAVQDeclarativeEngine@@XZ @ 267 NONAME ; class QDeclarativeEngine * QDeclarativeView::engine(void)
+ ?engine@QDeclarativeView@@QAEPAVQDeclarativeEngine@@XZ @ 267 NONAME ABSENT ; class QDeclarativeEngine * QDeclarativeView::engine(void)
?inputMethodQuery@QDeclarativeItem@@MBE?AVQVariant@@W4InputMethodQuery@Qt@@@Z @ 268 NONAME ; class QVariant QDeclarativeItem::inputMethodQuery(enum Qt::InputMethodQuery) const
?sizeHint@QDeclarativeView@@UBE?AVQSize@@XZ @ 269 NONAME ; class QSize QDeclarativeView::sizeHint(void) const
?flags@QDeclarativeCustomParser@@QBE?AV?$QFlags@W4Flag@QDeclarativeCustomParser@@@@XZ @ 270 NONAME ; class QFlags<enum QDeclarativeCustomParser::Flag> QDeclarativeCustomParser::flags(void) const
@@ -409,7 +409,7 @@ EXPORTS
?addRef@QDeclarativePixmapReply@@AAEXXZ @ 408 NONAME ABSENT ; void QDeclarativePixmapReply::addRef(void)
?mouseReleaseEvent@QDeclarativeText@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 409 NONAME ; void QDeclarativeText::mouseReleaseEvent(class QGraphicsSceneMouseEvent *)
?isCustomType@QDeclarativeDomObject@@QBE_NXZ @ 410 NONAME ; bool QDeclarativeDomObject::isCustomType(void) const
- ?registerType@QDeclarativePrivate@@YAHABURegisterType@1@@Z @ 411 NONAME ; int QDeclarativePrivate::registerType(struct QDeclarativePrivate::RegisterType const &)
+ ?registerType@QDeclarativePrivate@@YAHABURegisterType@1@@Z @ 411 NONAME ABSENT ; int QDeclarativePrivate::registerType(struct QDeclarativePrivate::RegisterType const &)
?radius@QDeclarativeRectangle@@QBEMXZ @ 412 NONAME ; float QDeclarativeRectangle::radius(void) const
??0QDeclarativeComponent@@AAE@PAVQDeclarativeEngine@@PAVQDeclarativeCompiledData@@HHPAVQObject@@@Z @ 413 NONAME ; QDeclarativeComponent::QDeclarativeComponent(class QDeclarativeEngine *, class QDeclarativeCompiledData *, int, int, class QObject *)
?resources_count@QDeclarativeItemPrivate@@SAHPAV?$QDeclarativeListProperty@VQObject@@@@@Z @ 414 NONAME ; int QDeclarativeItemPrivate::resources_count(class QDeclarativeListProperty<class QObject> *)
@@ -813,7 +813,7 @@ EXPORTS
??0QDeclarativeView@@QAE@ABVQUrl@@PAVQWidget@@@Z @ 812 NONAME ; QDeclarativeView::QDeclarativeView(class QUrl const &, class QWidget *)
?qt_metacall@QDeclarativePixmapReply@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 813 NONAME ABSENT ; int QDeclarativePixmapReply::qt_metacall(enum QMetaObject::Call, int, void * *)
?valueChanged@QDeclarativeExpression@@IAEXXZ @ 814 NONAME ; void QDeclarativeExpression::valueChanged(void)
- ?childrenChanged@QDeclarativeItem@@IAEXXZ @ 815 NONAME ; void QDeclarativeItem::childrenChanged(void)
+ ?childrenChanged@QDeclarativeItem@@IAEXXZ @ 815 NONAME ABSENT ; void QDeclarativeItem::childrenChanged(void)
??_EQDeclarativeView@@UAE@I@Z @ 816 NONAME ; QDeclarativeView::~QDeclarativeView(unsigned int)
?trUtf8@QDeclarativeStateGroup@@SA?AVQString@@PBD0H@Z @ 817 NONAME ; class QString QDeclarativeStateGroup::trUtf8(char const *, char const *, int)
?tag@QMetaMethodBuilder@@QBE?AVQByteArray@@XZ @ 818 NONAME ; class QByteArray QMetaMethodBuilder::tag(void) const
@@ -877,7 +877,7 @@ EXPORTS
?setWidth@QDeclarativeItemPrivate@@UAEXM@Z @ 876 NONAME ; void QDeclarativeItemPrivate::setWidth(float)
?staticMetaObject@QDeclarativeDebugWatch@@2UQMetaObject@@B @ 877 NONAME ; struct QMetaObject const QDeclarativeDebugWatch::staticMetaObject
??_EQDeclarativeContext@@UAE@I@Z @ 878 NONAME ; QDeclarativeContext::~QDeclarativeContext(unsigned int)
- ?rootContext@QDeclarativeView@@QAEPAVQDeclarativeContext@@XZ @ 879 NONAME ; class QDeclarativeContext * QDeclarativeView::rootContext(void)
+ ?rootContext@QDeclarativeView@@QAEPAVQDeclarativeContext@@XZ @ 879 NONAME ABSENT ; class QDeclarativeContext * QDeclarativeView::rootContext(void)
?staticMetaObject@QDeclarativeDebugQuery@@2UQMetaObject@@B @ 880 NONAME ; struct QMetaObject const QDeclarativeDebugQuery::staticMetaObject
??0QDeclarativeExtensionPlugin@@QAE@PAVQObject@@@Z @ 881 NONAME ; QDeclarativeExtensionPlugin::QDeclarativeExtensionPlugin(class QObject *)
??_EQDeclarativeOpenMetaObject@@UAE@I@Z @ 882 NONAME ; QDeclarativeOpenMetaObject::~QDeclarativeOpenMetaObject(unsigned int)
@@ -1077,7 +1077,7 @@ EXPORTS
??1QDeclarativeEngine@@UAE@XZ @ 1076 NONAME ; QDeclarativeEngine::~QDeclarativeEngine(void)
?debugId@QDeclarativeDebugContextReference@@QBEHXZ @ 1077 NONAME ; int QDeclarativeDebugContextReference::debugId(void) const
?propertyNameParts@QDeclarativeDomProperty@@QBE?AV?$QList@VQByteArray@@@@XZ @ 1078 NONAME ; class QList<class QByteArray> QDeclarativeDomProperty::propertyNameParts(void) const
- ?rootContext@QDeclarativeEngine@@QAEPAVQDeclarativeContext@@XZ @ 1079 NONAME ; class QDeclarativeContext * QDeclarativeEngine::rootContext(void)
+ ?rootContext@QDeclarativeEngine@@QAEPAVQDeclarativeContext@@XZ @ 1079 NONAME ABSENT ; class QDeclarativeContext * QDeclarativeEngine::rootContext(void)
?resetWidth@QDeclarativeItemPrivate@@UAEXXZ @ 1080 NONAME ; void QDeclarativeItemPrivate::resetWidth(void)
??AQDeclarativeOpenMetaObject@@QAEAAVQVariant@@ABVQByteArray@@@Z @ 1081 NONAME ; class QVariant & QDeclarativeOpenMetaObject::operator[](class QByteArray const &)
?bottom@QDeclarativeItemPrivate@@QBE?AVQDeclarativeAnchorLine@@XZ @ 1082 NONAME ; class QDeclarativeAnchorLine QDeclarativeItemPrivate::bottom(void) const
@@ -1182,7 +1182,7 @@ EXPORTS
??_EQDeclarativeEngineDebug@@UAE@I@Z @ 1181 NONAME ; QDeclarativeEngineDebug::~QDeclarativeEngineDebug(unsigned int)
?bottom@QDeclarativeScaleGrid@@QBEHXZ @ 1182 NONAME ; int QDeclarativeScaleGrid::bottom(void) const
?d_func@QDeclarativePropertyMap@@AAEPAVQDeclarativePropertyMapPrivate@@XZ @ 1183 NONAME ; class QDeclarativePropertyMapPrivate * QDeclarativePropertyMap::d_func(void)
- ?forceFocus@QDeclarativeItem@@QAEXXZ @ 1184 NONAME ; void QDeclarativeItem::forceFocus(void)
+ ?forceFocus@QDeclarativeItem@@QAEXXZ @ 1184 NONAME ABSENT ; void QDeclarativeItem::forceFocus(void)
?trUtf8@QDeclarativeView@@SA?AVQString@@PBD0@Z @ 1185 NONAME ; class QString QDeclarativeView::trUtf8(char const *, char const *)
??0QDeclarativeTransition@@QAE@PAVQObject@@@Z @ 1186 NONAME ; QDeclarativeTransition::QDeclarativeTransition(class QObject *)
?horizontalCenter@QDeclarativeAnchors@@QBE?AVQDeclarativeAnchorLine@@XZ @ 1187 NONAME ; class QDeclarativeAnchorLine QDeclarativeAnchors::horizontalCenter(void) const
@@ -1442,7 +1442,7 @@ EXPORTS
?drawRect@QDeclarativeRectangle@@AAEXAAVQPainter@@@Z @ 1441 NONAME ; void QDeclarativeRectangle::drawRect(class QPainter &)
?read@QDeclarativeProperty@@QBE?AVQVariant@@XZ @ 1442 NONAME ; class QVariant QDeclarativeProperty::read(void) const
?isEmpty@QDeclarativePropertyMap@@QBE_NXZ @ 1443 NONAME ; bool QDeclarativePropertyMap::isEmpty(void) const
- ?wantsFocus@QDeclarativeItem@@QBE_NXZ @ 1444 NONAME ; bool QDeclarativeItem::wantsFocus(void) const
+ ?wantsFocus@QDeclarativeItem@@QBE_NXZ @ 1444 NONAME ABSENT ; bool QDeclarativeItem::wantsFocus(void) const
??6@YAAAVQDataStream@@AAV0@ABUQDeclarativeObjectData@QDeclarativeEngineDebugServer@@@Z @ 1445 NONAME ; class QDataStream & operator<<(class QDataStream &, struct QDeclarativeEngineDebugServer::QDeclarativeObjectData const &)
?trUtf8@QDeclarativeDebugObjectQuery@@SA?AVQString@@PBD0H@Z @ 1446 NONAME ; class QString QDeclarativeDebugObjectQuery::trUtf8(char const *, char const *, int)
??0QDeclarativeBinding@@QAE@ABVQString@@PAVQObject@@PAVQDeclarativeContext@@1@Z @ 1447 NONAME ; QDeclarativeBinding::QDeclarativeBinding(class QString const &, class QObject *, class QDeclarativeContext *, class QObject *)
@@ -1676,4 +1676,12 @@ EXPORTS
??0QDeclarativeImageProvider@@QAE@W4ImageType@0@@Z @ 1675 NONAME ; QDeclarativeImageProvider::QDeclarativeImageProvider(enum QDeclarativeImageProvider::ImageType)
?setMethodBody@QDeclarativeEngineDebug@@QAE_NHABVQString@@0@Z @ 1676 NONAME ; bool QDeclarativeEngineDebug::setMethodBody(int, class QString const &, class QString const &)
?resetBindingForObject@QDeclarativeEngineDebug@@QAE_NHABVQString@@@Z @ 1677 NONAME ; bool QDeclarativeEngineDebug::resetBindingForObject(int, class QString const &)
+ ?forceActiveFocus@QDeclarativeItem@@QAEXXZ @ 1678 NONAME ; void QDeclarativeItem::forceActiveFocus(void)
+ ?activeFocusChanged@QDeclarativeItem@@IAEX_N@Z @ 1679 NONAME ; void QDeclarativeItem::activeFocusChanged(bool)
+ ?focusScopeItemChange@QDeclarativeItemPrivate@@UAEX_N@Z @ 1680 NONAME ; void QDeclarativeItemPrivate::focusScopeItemChange(bool)
+ ?hasActiveFocus@QDeclarativeItem@@QBE_NXZ @ 1681 NONAME ; bool QDeclarativeItem::hasActiveFocus(void) const
+ ?engine@QDeclarativeView@@QBEPAVQDeclarativeEngine@@XZ @ 1682 NONAME ; class QDeclarativeEngine * QDeclarativeView::engine(void) const
+ ?rootContext@QDeclarativeView@@QBEPAVQDeclarativeContext@@XZ @ 1683 NONAME ; class QDeclarativeContext * QDeclarativeView::rootContext(void) const
+ ?rootContext@QDeclarativeEngine@@QBEPAVQDeclarativeContext@@XZ @ 1684 NONAME ; class QDeclarativeContext * QDeclarativeEngine::rootContext(void) const
+ ?qmlregister@QDeclarativePrivate@@YAHW4RegistrationType@1@PAX@Z @ 1685 NONAME ; int QDeclarativePrivate::qmlregister(enum QDeclarativePrivate::RegistrationType, void *)
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index 296901de51..78446885c6 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -2645,7 +2645,7 @@ EXPORTS
?childItems@QGraphicsItem@@QBE?AV?$QList@PAVQGraphicsItem@@@@XZ @ 2644 NONAME ; class QList<class QGraphicsItem *> QGraphicsItem::childItems(void) const
?children@QGraphicsItem@@QBE?AV?$QList@PAVQGraphicsItem@@@@XZ @ 2645 NONAME ; class QList<class QGraphicsItem *> QGraphicsItem::children(void) const
?childrenBoundingRect@QGraphicsItem@@QBE?AVQRectF@@XZ @ 2646 NONAME ; class QRectF QGraphicsItem::childrenBoundingRect(void) const
- ?childrenBoundingRectHelper@QGraphicsItemPrivate@@QAEXPAVQTransform@@PAVQRectF@@@Z @ 2647 NONAME ; void QGraphicsItemPrivate::childrenBoundingRectHelper(class QTransform *, class QRectF *)
+ ?childrenBoundingRectHelper@QGraphicsItemPrivate@@QAEXPAVQTransform@@PAVQRectF@@@Z @ 2647 NONAME ABSENT ; void QGraphicsItemPrivate::childrenBoundingRectHelper(class QTransform *, class QRectF *)
?childrenCheckState@QTreeWidgetItem@@ABE?AVQVariant@@H@Z @ 2648 NONAME ; class QVariant QTreeWidgetItem::childrenCheckState(int) const
?childrenClippedToShape@QGraphicsItemPrivate@@QBE_NXZ @ 2649 NONAME ; bool QGraphicsItemPrivate::childrenClippedToShape(void) const
?childrenCollapsible@QSplitter@@QBE_NXZ @ 2650 NONAME ; bool QSplitter::childrenCollapsible(void) const
@@ -12372,7 +12372,7 @@ EXPORTS
?staticMetaObject@QBoxLayout@@2UQMetaObject@@B @ 12371 NONAME ; struct QMetaObject const QBoxLayout::staticMetaObject
?qt_tab_all_widgets@@3_NA @ 12372 NONAME ; bool qt_tab_all_widgets
?staticMetaObject@QSpinBox@@2UQMetaObject@@B @ 12373 NONAME ; struct QMetaObject const QSpinBox::staticMetaObject
- ?scanCodeCache@QApplicationPrivate@@0V?$QHash@HI@@A @ 12374 NONAME ; class QHash<int, unsigned int> QApplicationPrivate::scanCodeCache
+ ?scanCodeCache@QApplicationPrivate@@0V?$QHash@HI@@A @ 12374 NONAME ABSENT ; class QHash<int, unsigned int> QApplicationPrivate::scanCodeCache
?staticMetaObject@QItemSelectionModel@@2UQMetaObject@@B @ 12375 NONAME ; struct QMetaObject const QItemSelectionModel::staticMetaObject
?staticMetaObject@QItemDelegate@@2UQMetaObject@@B @ 12376 NONAME ; struct QMetaObject const QItemDelegate::staticMetaObject
?staticMetaObject@QPushButton@@2UQMetaObject@@B @ 12377 NONAME ; struct QMetaObject const QPushButton::staticMetaObject
@@ -12879,4 +12879,11 @@ EXPORTS
?PreDocConstructL@QS60MainApplication@@UAEXXZ @ 12878 NONAME ; void QS60MainApplication::PreDocConstructL(void)
?NewAppServerL@QS60MainApplication@@UAEXAAPAVCApaAppServer@@@Z @ 12879 NONAME ; void QS60MainApplication::NewAppServerL(class CApaAppServer * &)
?HandleViewDeactivation@QS60MainAppUi@@UAEXABVTVwsViewId@@0@Z @ 12880 NONAME ; void QS60MainAppUi::HandleViewDeactivation(class TVwsViewId const &, class TVwsViewId const &)
+ ?timeout@QTapAndHoldGesture@@SAHXZ @ 12881 NONAME ; int QTapAndHoldGesture::timeout(void)
+ ?focusScopeItemChange@QGraphicsItemPrivate@@UAEX_N@Z @ 12882 NONAME ; void QGraphicsItemPrivate::focusScopeItemChange(bool)
+ ?setTimeout@QTapAndHoldGesture@@SAXH@Z @ 12883 NONAME ; void QTapAndHoldGesture::setTimeout(int)
+ ?childrenBoundingRectHelper@QGraphicsItemPrivate@@QAEXPAVQTransform@@PAVQRectF@@_N@Z @ 12884 NONAME ; void QGraphicsItemPrivate::childrenBoundingRectHelper(class QTransform *, class QRectF *, bool)
+ ?zScaleChanged@QGraphicsScale@@IAEXXZ @ 12885 NONAME ; void QGraphicsScale::zScaleChanged(void)
+ ?xScaleChanged@QGraphicsScale@@IAEXXZ @ 12886 NONAME ; void QGraphicsScale::xScaleChanged(void)
+ ?yScaleChanged@QGraphicsScale@@IAEXXZ @ 12887 NONAME ; void QGraphicsScale::yScaleChanged(void)
diff --git a/src/s60installs/bwins/QtNetworku.def b/src/s60installs/bwins/QtNetworku.def
index 9d4507bc43..48af60cbfc 100644
--- a/src/s60installs/bwins/QtNetworku.def
+++ b/src/s60installs/bwins/QtNetworku.def
@@ -962,186 +962,185 @@ EXPORTS
?staticMetaObject@QTcpServer@@2UQMetaObject@@B @ 961 NONAME ; struct QMetaObject const QTcpServer::staticMetaObject
?staticMetaObject@QUdpSocket@@2UQMetaObject@@B @ 962 NONAME ; struct QMetaObject const QUdpSocket::staticMetaObject
?staticMetaObject@QAbstractSocket@@2UQMetaObject@@B @ 963 NONAME ; struct QMetaObject const QAbstractSocket::staticMetaObject
- ??0QBearerEngine@@QAE@PAVQObject@@@Z @ 964 NONAME ; QBearerEngine::QBearerEngine(class QObject *)
- ??0QBearerEnginePlugin@@QAE@PAVQObject@@@Z @ 965 NONAME ; QBearerEnginePlugin::QBearerEnginePlugin(class QObject *)
- ??0QNetworkConfiguration@@QAE@ABV0@@Z @ 966 NONAME ; QNetworkConfiguration::QNetworkConfiguration(class QNetworkConfiguration const &)
- ??0QNetworkConfiguration@@QAE@XZ @ 967 NONAME ; QNetworkConfiguration::QNetworkConfiguration(void)
- ??0QNetworkConfigurationManager@@QAE@PAVQObject@@@Z @ 968 NONAME ; QNetworkConfigurationManager::QNetworkConfigurationManager(class QObject *)
- ??0QNetworkConfigurationManagerPrivate@@QAE@XZ @ 969 NONAME ; QNetworkConfigurationManagerPrivate::QNetworkConfigurationManagerPrivate(void)
- ??0QNetworkSession@@QAE@ABVQNetworkConfiguration@@PAVQObject@@@Z @ 970 NONAME ; QNetworkSession::QNetworkSession(class QNetworkConfiguration const &, class QObject *)
- ??0QNetworkSessionPrivate@@QAE@XZ @ 971 NONAME ; QNetworkSessionPrivate::QNetworkSessionPrivate(void)
- ??1QBearerEngine@@UAE@XZ @ 972 NONAME ; QBearerEngine::~QBearerEngine(void)
- ??1QBearerEngineFactoryInterface@@UAE@XZ @ 973 NONAME ; QBearerEngineFactoryInterface::~QBearerEngineFactoryInterface(void)
- ??1QBearerEnginePlugin@@UAE@XZ @ 974 NONAME ; QBearerEnginePlugin::~QBearerEnginePlugin(void)
- ??1QNetworkConfiguration@@QAE@XZ @ 975 NONAME ; QNetworkConfiguration::~QNetworkConfiguration(void)
- ??1QNetworkConfigurationManager@@UAE@XZ @ 976 NONAME ; QNetworkConfigurationManager::~QNetworkConfigurationManager(void)
- ??1QNetworkConfigurationManagerPrivate@@UAE@XZ @ 977 NONAME ; QNetworkConfigurationManagerPrivate::~QNetworkConfigurationManagerPrivate(void)
- ??1QNetworkSession@@UAE@XZ @ 978 NONAME ; QNetworkSession::~QNetworkSession(void)
- ??1QNetworkSessionPrivate@@UAE@XZ @ 979 NONAME ; QNetworkSessionPrivate::~QNetworkSessionPrivate(void)
- ??4QNetworkConfiguration@@QAEAAV0@ABV0@@Z @ 980 NONAME ; class QNetworkConfiguration & QNetworkConfiguration::operator=(class QNetworkConfiguration const &)
- ??8QNetworkConfiguration@@QBE_NABV0@@Z @ 981 NONAME ; bool QNetworkConfiguration::operator==(class QNetworkConfiguration const &) const
- ??9QNetworkConfiguration@@QBE_NABV0@@Z @ 982 NONAME ; bool QNetworkConfiguration::operator!=(class QNetworkConfiguration const &) const
- ??_EQBearerEngine@@UAE@I@Z @ 983 NONAME ; QBearerEngine::~QBearerEngine(unsigned int)
- ??_EQBearerEngineFactoryInterface@@UAE@I@Z @ 984 NONAME ; QBearerEngineFactoryInterface::~QBearerEngineFactoryInterface(unsigned int)
- ??_EQBearerEnginePlugin@@UAE@I@Z @ 985 NONAME ; QBearerEnginePlugin::~QBearerEnginePlugin(unsigned int)
- ??_EQNetworkConfigurationManager@@UAE@I@Z @ 986 NONAME ; QNetworkConfigurationManager::~QNetworkConfigurationManager(unsigned int)
- ??_EQNetworkConfigurationManagerPrivate@@UAE@I@Z @ 987 NONAME ; QNetworkConfigurationManagerPrivate::~QNetworkConfigurationManagerPrivate(unsigned int)
- ??_EQNetworkSession@@UAE@I@Z @ 988 NONAME ; QNetworkSession::~QNetworkSession(unsigned int)
- ??_EQNetworkSessionPrivate@@UAE@I@Z @ 989 NONAME ; QNetworkSessionPrivate::~QNetworkSessionPrivate(unsigned int)
- ?abort@QNetworkConfigurationManagerPrivate@@IAEXXZ @ 990 NONAME ; void QNetworkConfigurationManagerPrivate::abort(void)
- ?accept@QNetworkSession@@QAEXXZ @ 991 NONAME ; void QNetworkSession::accept(void)
- ?activeConfiguration@QNetworkAccessManager@@QBE?AVQNetworkConfiguration@@XZ @ 992 NONAME ; class QNetworkConfiguration QNetworkAccessManager::activeConfiguration(void) const
- ?activeTime@QNetworkSession@@QBE_KXZ @ 993 NONAME ; unsigned long long QNetworkSession::activeTime(void) const
- ?allConfigurations@QNetworkConfigurationManager@@QBE?AV?$QList@VQNetworkConfiguration@@@@V?$QFlags@W4StateFlag@QNetworkConfiguration@@@@@Z @ 994 NONAME ; class QList<class QNetworkConfiguration> QNetworkConfigurationManager::allConfigurations(class QFlags<enum QNetworkConfiguration::StateFlag>) const
- ?bearerName@QNetworkConfiguration@@QBE?AVQString@@XZ @ 995 NONAME ; class QString QNetworkConfiguration::bearerName(void) const
- ?bytesReceived@QNetworkSession@@QBE_KXZ @ 996 NONAME ; unsigned long long QNetworkSession::bytesReceived(void) const
- ?bytesWritten@QNetworkSession@@QBE_KXZ @ 997 NONAME ; unsigned long long QNetworkSession::bytesWritten(void) const
- ?capabilities@QNetworkConfigurationManager@@QBE?AV?$QFlags@W4Capability@QNetworkConfigurationManager@@@@XZ @ 998 NONAME ; class QFlags<enum QNetworkConfigurationManager::Capability> QNetworkConfigurationManager::capabilities(void) const
- ?children@QNetworkConfiguration@@QBE?AV?$QList@VQNetworkConfiguration@@@@XZ @ 999 NONAME ; class QList<class QNetworkConfiguration> QNetworkConfiguration::children(void) const
- ?close@QNetworkSession@@QAEXXZ @ 1000 NONAME ; void QNetworkSession::close(void)
- ?closed@QNetworkSession@@IAEXXZ @ 1001 NONAME ; void QNetworkSession::closed(void)
- ?closed@QNetworkSessionPrivate@@IAEXXZ @ 1002 NONAME ; void QNetworkSessionPrivate::closed(void)
- ?configuration@QNetworkAccessManager@@QBE?AVQNetworkConfiguration@@XZ @ 1003 NONAME ; class QNetworkConfiguration QNetworkAccessManager::configuration(void) const
- ?configuration@QNetworkSession@@QBE?AVQNetworkConfiguration@@XZ @ 1004 NONAME ; class QNetworkConfiguration QNetworkSession::configuration(void) const
- ?configurationAdded@QBearerEngine@@IAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1005 NONAME ; void QBearerEngine::configurationAdded(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
- ?configurationAdded@QNetworkConfigurationManager@@IAEXABVQNetworkConfiguration@@@Z @ 1006 NONAME ; void QNetworkConfigurationManager::configurationAdded(class QNetworkConfiguration const &)
- ?configurationAdded@QNetworkConfigurationManagerPrivate@@AAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1007 NONAME ; void QNetworkConfigurationManagerPrivate::configurationAdded(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
- ?configurationAdded@QNetworkConfigurationManagerPrivate@@IAEXABVQNetworkConfiguration@@@Z @ 1008 NONAME ; void QNetworkConfigurationManagerPrivate::configurationAdded(class QNetworkConfiguration const &)
- ?configurationChanged@QBearerEngine@@IAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1009 NONAME ; void QBearerEngine::configurationChanged(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
- ?configurationChanged@QNetworkConfigurationManager@@IAEXABVQNetworkConfiguration@@@Z @ 1010 NONAME ; void QNetworkConfigurationManager::configurationChanged(class QNetworkConfiguration const &)
- ?configurationChanged@QNetworkConfigurationManagerPrivate@@AAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1011 NONAME ; void QNetworkConfigurationManagerPrivate::configurationChanged(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
- ?configurationChanged@QNetworkConfigurationManagerPrivate@@IAEXABVQNetworkConfiguration@@@Z @ 1012 NONAME ; void QNetworkConfigurationManagerPrivate::configurationChanged(class QNetworkConfiguration const &)
- ?configurationFromIdentifier@QNetworkConfigurationManager@@QBE?AVQNetworkConfiguration@@ABVQString@@@Z @ 1013 NONAME ; class QNetworkConfiguration QNetworkConfigurationManager::configurationFromIdentifier(class QString const &) const
- ?configurationRemoved@QBearerEngine@@IAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1014 NONAME ; void QBearerEngine::configurationRemoved(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
- ?configurationRemoved@QNetworkConfigurationManager@@IAEXABVQNetworkConfiguration@@@Z @ 1015 NONAME ; void QNetworkConfigurationManager::configurationRemoved(class QNetworkConfiguration const &)
- ?configurationRemoved@QNetworkConfigurationManagerPrivate@@AAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1016 NONAME ; void QNetworkConfigurationManagerPrivate::configurationRemoved(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
- ?configurationRemoved@QNetworkConfigurationManagerPrivate@@IAEXABVQNetworkConfiguration@@@Z @ 1017 NONAME ; void QNetworkConfigurationManagerPrivate::configurationRemoved(class QNetworkConfiguration const &)
- ?configurationUpdateComplete@QNetworkConfigurationManagerPrivate@@IAEXXZ @ 1018 NONAME ; void QNetworkConfigurationManagerPrivate::configurationUpdateComplete(void)
- ?connectNotify@QNetworkSession@@MAEXPBD@Z @ 1019 NONAME ; void QNetworkSession::connectNotify(char const *)
- ?defaultConfiguration@QNetworkConfigurationManager@@QBE?AVQNetworkConfiguration@@XZ @ 1020 NONAME ; class QNetworkConfiguration QNetworkConfigurationManager::defaultConfiguration(void) const
- ?disconnectNotify@QNetworkSession@@MAEXPBD@Z @ 1021 NONAME ; void QNetworkSession::disconnectNotify(char const *)
- ?engines@QNetworkConfigurationManagerPrivate@@QAE?AV?$QList@PAVQBearerEngine@@@@XZ @ 1022 NONAME ; class QList<class QBearerEngine *> QNetworkConfigurationManagerPrivate::engines(void)
- ?error@QNetworkSession@@IAEXW4SessionError@1@@Z @ 1023 NONAME ; void QNetworkSession::error(enum QNetworkSession::SessionError)
- ?error@QNetworkSession@@QBE?AW4SessionError@1@XZ @ 1024 NONAME ; enum QNetworkSession::SessionError QNetworkSession::error(void) const
- ?error@QNetworkSessionPrivate@@IAEXW4SessionError@QNetworkSession@@@Z @ 1025 NONAME ; void QNetworkSessionPrivate::error(enum QNetworkSession::SessionError)
- ?errorString@QNetworkSession@@QBE?AVQString@@XZ @ 1026 NONAME ; class QString QNetworkSession::errorString(void) const
- ?getStaticMetaObject@QBearerEngine@@SAABUQMetaObject@@XZ @ 1027 NONAME ; struct QMetaObject const & QBearerEngine::getStaticMetaObject(void)
- ?getStaticMetaObject@QBearerEnginePlugin@@SAABUQMetaObject@@XZ @ 1028 NONAME ; struct QMetaObject const & QBearerEnginePlugin::getStaticMetaObject(void)
- ?getStaticMetaObject@QNetworkConfigurationManager@@SAABUQMetaObject@@XZ @ 1029 NONAME ; struct QMetaObject const & QNetworkConfigurationManager::getStaticMetaObject(void)
- ?getStaticMetaObject@QNetworkConfigurationManagerPrivate@@SAABUQMetaObject@@XZ @ 1030 NONAME ; struct QMetaObject const & QNetworkConfigurationManagerPrivate::getStaticMetaObject(void)
- ?getStaticMetaObject@QNetworkSession@@SAABUQMetaObject@@XZ @ 1031 NONAME ; struct QMetaObject const & QNetworkSession::getStaticMetaObject(void)
- ?getStaticMetaObject@QNetworkSessionPrivate@@SAABUQMetaObject@@XZ @ 1032 NONAME ; struct QMetaObject const & QNetworkSessionPrivate::getStaticMetaObject(void)
- ?identifier@QNetworkConfiguration@@QBE?AVQString@@XZ @ 1033 NONAME ; class QString QNetworkConfiguration::identifier(void) const
- ?ignore@QNetworkSession@@QAEXXZ @ 1034 NONAME ; void QNetworkSession::ignore(void)
- ?interface@QNetworkSession@@QBE?AVQNetworkInterface@@XZ @ 1035 NONAME ; class QNetworkInterface QNetworkSession::interface(void) const
- ?isOnline@QNetworkConfigurationManager@@QBE_NXZ @ 1036 NONAME ; bool QNetworkConfigurationManager::isOnline(void) const
- ?isOpen@QNetworkSession@@QBE_NXZ @ 1037 NONAME ; bool QNetworkSession::isOpen(void) const
- ?isRoamingAvailable@QNetworkConfiguration@@QBE_NXZ @ 1038 NONAME ; bool QNetworkConfiguration::isRoamingAvailable(void) const
- ?isValid@QNetworkConfiguration@@QBE_NXZ @ 1039 NONAME ; bool QNetworkConfiguration::isValid(void) const
- ?metaObject@QBearerEngine@@UBEPBUQMetaObject@@XZ @ 1040 NONAME ; struct QMetaObject const * QBearerEngine::metaObject(void) const
- ?metaObject@QBearerEnginePlugin@@UBEPBUQMetaObject@@XZ @ 1041 NONAME ; struct QMetaObject const * QBearerEnginePlugin::metaObject(void) const
- ?metaObject@QNetworkConfigurationManager@@UBEPBUQMetaObject@@XZ @ 1042 NONAME ; struct QMetaObject const * QNetworkConfigurationManager::metaObject(void) const
- ?metaObject@QNetworkConfigurationManagerPrivate@@UBEPBUQMetaObject@@XZ @ 1043 NONAME ; struct QMetaObject const * QNetworkConfigurationManagerPrivate::metaObject(void) const
- ?metaObject@QNetworkSession@@UBEPBUQMetaObject@@XZ @ 1044 NONAME ; struct QMetaObject const * QNetworkSession::metaObject(void) const
- ?metaObject@QNetworkSessionPrivate@@UBEPBUQMetaObject@@XZ @ 1045 NONAME ; struct QMetaObject const * QNetworkSessionPrivate::metaObject(void) const
- ?migrate@QNetworkSession@@QAEXXZ @ 1046 NONAME ; void QNetworkSession::migrate(void)
- ?name@QNetworkConfiguration@@QBE?AVQString@@XZ @ 1047 NONAME ; class QString QNetworkConfiguration::name(void) const
- ?networkAccessChanged@QNetworkAccessManager@@IAEX_N@Z @ 1048 NONAME ABSENT ; void QNetworkAccessManager::networkAccessChanged(bool)
- ?networkAccessEnabled@QNetworkAccessManager@@QBE_NXZ @ 1049 NONAME ABSENT ; bool QNetworkAccessManager::networkAccessEnabled(void) const
- ?networkSessionOnline@QNetworkAccessManager@@IAEXXZ @ 1050 NONAME ABSENT ; void QNetworkAccessManager::networkSessionOnline(void)
- ?newConfigurationActivated@QNetworkSession@@IAEXXZ @ 1051 NONAME ; void QNetworkSession::newConfigurationActivated(void)
- ?newConfigurationActivated@QNetworkSessionPrivate@@IAEXXZ @ 1052 NONAME ; void QNetworkSessionPrivate::newConfigurationActivated(void)
- ?onlineStateChanged@QNetworkConfigurationManager@@IAEX_N@Z @ 1053 NONAME ; void QNetworkConfigurationManager::onlineStateChanged(bool)
- ?onlineStateChanged@QNetworkConfigurationManagerPrivate@@IAEX_N@Z @ 1054 NONAME ; void QNetworkConfigurationManagerPrivate::onlineStateChanged(bool)
- ?open@QNetworkSession@@QAEXXZ @ 1055 NONAME ; void QNetworkSession::open(void)
- ?opened@QNetworkSession@@IAEXXZ @ 1056 NONAME ; void QNetworkSession::opened(void)
- ?performAsyncConfigurationUpdate@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1057 NONAME ; void QNetworkConfigurationManagerPrivate::performAsyncConfigurationUpdate(void)
- ?preferredConfigurationChanged@QNetworkSession@@IAEXABVQNetworkConfiguration@@_N@Z @ 1058 NONAME ; void QNetworkSession::preferredConfigurationChanged(class QNetworkConfiguration const &, bool)
- ?preferredConfigurationChanged@QNetworkSessionPrivate@@IAEXABVQNetworkConfiguration@@_N@Z @ 1059 NONAME ; void QNetworkSessionPrivate::preferredConfigurationChanged(class QNetworkConfiguration const &, bool)
- ?priority@QNetworkRequest@@QBE?AW4Priority@1@XZ @ 1060 NONAME ; enum QNetworkRequest::Priority QNetworkRequest::priority(void) const
- ?privateConfiguration@QNetworkSessionPrivate@@IBE?AV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@ABVQNetworkConfiguration@@@Z @ 1061 NONAME ; class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate> QNetworkSessionPrivate::privateConfiguration(class QNetworkConfiguration const &) const
- ?purpose@QNetworkConfiguration@@QBE?AW4Purpose@1@XZ @ 1062 NONAME ; enum QNetworkConfiguration::Purpose QNetworkConfiguration::purpose(void) const
- ?qNetworkConfigurationManagerPrivate@@YAPAVQNetworkConfigurationManagerPrivate@@XZ @ 1063 NONAME ; class QNetworkConfigurationManagerPrivate * qNetworkConfigurationManagerPrivate(void)
- ?qt_metacall@QBearerEngine@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1064 NONAME ; int QBearerEngine::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QBearerEnginePlugin@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1065 NONAME ; int QBearerEnginePlugin::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QNetworkConfigurationManager@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1066 NONAME ; int QNetworkConfigurationManager::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QNetworkConfigurationManagerPrivate@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1067 NONAME ; int QNetworkConfigurationManagerPrivate::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QNetworkSession@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1068 NONAME ; int QNetworkSession::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QNetworkSessionPrivate@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1069 NONAME ; int QNetworkSessionPrivate::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacast@QBearerEngine@@UAEPAXPBD@Z @ 1070 NONAME ; void * QBearerEngine::qt_metacast(char const *)
- ?qt_metacast@QBearerEnginePlugin@@UAEPAXPBD@Z @ 1071 NONAME ; void * QBearerEnginePlugin::qt_metacast(char const *)
- ?qt_metacast@QNetworkConfigurationManager@@UAEPAXPBD@Z @ 1072 NONAME ; void * QNetworkConfigurationManager::qt_metacast(char const *)
- ?qt_metacast@QNetworkConfigurationManagerPrivate@@UAEPAXPBD@Z @ 1073 NONAME ; void * QNetworkConfigurationManagerPrivate::qt_metacast(char const *)
- ?qt_metacast@QNetworkSession@@UAEPAXPBD@Z @ 1074 NONAME ; void * QNetworkSession::qt_metacast(char const *)
- ?qt_metacast@QNetworkSessionPrivate@@UAEPAXPBD@Z @ 1075 NONAME ; void * QNetworkSessionPrivate::qt_metacast(char const *)
- ?quitPendingWaitsForOpened@QNetworkSessionPrivate@@IAEXXZ @ 1076 NONAME ; void QNetworkSessionPrivate::quitPendingWaitsForOpened(void)
- ?rawHeaderPairs@QNetworkReply@@QBEABV?$QList@U?$QPair@VQByteArray@@V1@@@@@XZ @ 1077 NONAME ; class QList<struct QPair<class QByteArray, class QByteArray> > const & QNetworkReply::rawHeaderPairs(void) const
- ?reject@QNetworkSession@@QAEXXZ @ 1078 NONAME ; void QNetworkSession::reject(void)
- ?sendCustomRequest@QNetworkAccessManager@@QAEPAVQNetworkReply@@ABVQNetworkRequest@@ABVQByteArray@@PAVQIODevice@@@Z @ 1079 NONAME ; class QNetworkReply * QNetworkAccessManager::sendCustomRequest(class QNetworkRequest const &, class QByteArray const &, class QIODevice *)
- ?sessionProperty@QNetworkSession@@QBE?AVQVariant@@ABVQString@@@Z @ 1080 NONAME ; class QVariant QNetworkSession::sessionProperty(class QString const &) const
- ?setALREnabled@QNetworkSessionPrivate@@UAEX_N@Z @ 1081 NONAME ; void QNetworkSessionPrivate::setALREnabled(bool)
- ?setConfiguration@QNetworkAccessManager@@QAEXABVQNetworkConfiguration@@@Z @ 1082 NONAME ; void QNetworkAccessManager::setConfiguration(class QNetworkConfiguration const &)
- ?setNetworkAccessEnabled@QNetworkAccessManager@@QAEX_N@Z @ 1083 NONAME ABSENT ; void QNetworkAccessManager::setNetworkAccessEnabled(bool)
- ?setPriority@QNetworkRequest@@QAEXW4Priority@1@@Z @ 1084 NONAME ; void QNetworkRequest::setPriority(enum QNetworkRequest::Priority)
- ?setPrivateConfiguration@QNetworkSessionPrivate@@IBEXAAVQNetworkConfiguration@@V?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1085 NONAME ; void QNetworkSessionPrivate::setPrivateConfiguration(class QNetworkConfiguration &, class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>) const
- ?setSessionProperty@QNetworkSession@@QAEXABVQString@@ABVQVariant@@@Z @ 1086 NONAME ; void QNetworkSession::setSessionProperty(class QString const &, class QVariant const &)
- ?state@QNetworkConfiguration@@QBE?AV?$QFlags@W4StateFlag@QNetworkConfiguration@@@@XZ @ 1087 NONAME ; class QFlags<enum QNetworkConfiguration::StateFlag> QNetworkConfiguration::state(void) const
- ?state@QNetworkSession@@QBE?AW4State@1@XZ @ 1088 NONAME ; enum QNetworkSession::State QNetworkSession::state(void) const
- ?stateChanged@QNetworkSession@@IAEXW4State@1@@Z @ 1089 NONAME ; void QNetworkSession::stateChanged(enum QNetworkSession::State)
- ?stateChanged@QNetworkSessionPrivate@@IAEXW4State@QNetworkSession@@@Z @ 1090 NONAME ; void QNetworkSessionPrivate::stateChanged(enum QNetworkSession::State)
- ?stop@QNetworkSession@@QAEXXZ @ 1091 NONAME ; void QNetworkSession::stop(void)
- ?tr@QBearerEngine@@SA?AVQString@@PBD0@Z @ 1092 NONAME ; class QString QBearerEngine::tr(char const *, char const *)
- ?tr@QBearerEngine@@SA?AVQString@@PBD0H@Z @ 1093 NONAME ; class QString QBearerEngine::tr(char const *, char const *, int)
- ?tr@QBearerEnginePlugin@@SA?AVQString@@PBD0@Z @ 1094 NONAME ; class QString QBearerEnginePlugin::tr(char const *, char const *)
- ?tr@QBearerEnginePlugin@@SA?AVQString@@PBD0H@Z @ 1095 NONAME ; class QString QBearerEnginePlugin::tr(char const *, char const *, int)
- ?tr@QNetworkConfigurationManager@@SA?AVQString@@PBD0@Z @ 1096 NONAME ; class QString QNetworkConfigurationManager::tr(char const *, char const *)
- ?tr@QNetworkConfigurationManager@@SA?AVQString@@PBD0H@Z @ 1097 NONAME ; class QString QNetworkConfigurationManager::tr(char const *, char const *, int)
- ?tr@QNetworkConfigurationManagerPrivate@@SA?AVQString@@PBD0@Z @ 1098 NONAME ; class QString QNetworkConfigurationManagerPrivate::tr(char const *, char const *)
- ?tr@QNetworkConfigurationManagerPrivate@@SA?AVQString@@PBD0H@Z @ 1099 NONAME ; class QString QNetworkConfigurationManagerPrivate::tr(char const *, char const *, int)
- ?tr@QNetworkSession@@SA?AVQString@@PBD0@Z @ 1100 NONAME ; class QString QNetworkSession::tr(char const *, char const *)
- ?tr@QNetworkSession@@SA?AVQString@@PBD0H@Z @ 1101 NONAME ; class QString QNetworkSession::tr(char const *, char const *, int)
- ?tr@QNetworkSessionPrivate@@SA?AVQString@@PBD0@Z @ 1102 NONAME ; class QString QNetworkSessionPrivate::tr(char const *, char const *)
- ?tr@QNetworkSessionPrivate@@SA?AVQString@@PBD0H@Z @ 1103 NONAME ; class QString QNetworkSessionPrivate::tr(char const *, char const *, int)
- ?trUtf8@QBearerEngine@@SA?AVQString@@PBD0@Z @ 1104 NONAME ; class QString QBearerEngine::trUtf8(char const *, char const *)
- ?trUtf8@QBearerEngine@@SA?AVQString@@PBD0H@Z @ 1105 NONAME ; class QString QBearerEngine::trUtf8(char const *, char const *, int)
- ?trUtf8@QBearerEnginePlugin@@SA?AVQString@@PBD0@Z @ 1106 NONAME ; class QString QBearerEnginePlugin::trUtf8(char const *, char const *)
- ?trUtf8@QBearerEnginePlugin@@SA?AVQString@@PBD0H@Z @ 1107 NONAME ; class QString QBearerEnginePlugin::trUtf8(char const *, char const *, int)
- ?trUtf8@QNetworkConfigurationManager@@SA?AVQString@@PBD0@Z @ 1108 NONAME ; class QString QNetworkConfigurationManager::trUtf8(char const *, char const *)
- ?trUtf8@QNetworkConfigurationManager@@SA?AVQString@@PBD0H@Z @ 1109 NONAME ; class QString QNetworkConfigurationManager::trUtf8(char const *, char const *, int)
- ?trUtf8@QNetworkConfigurationManagerPrivate@@SA?AVQString@@PBD0@Z @ 1110 NONAME ; class QString QNetworkConfigurationManagerPrivate::trUtf8(char const *, char const *)
- ?trUtf8@QNetworkConfigurationManagerPrivate@@SA?AVQString@@PBD0H@Z @ 1111 NONAME ; class QString QNetworkConfigurationManagerPrivate::trUtf8(char const *, char const *, int)
- ?trUtf8@QNetworkSession@@SA?AVQString@@PBD0@Z @ 1112 NONAME ; class QString QNetworkSession::trUtf8(char const *, char const *)
- ?trUtf8@QNetworkSession@@SA?AVQString@@PBD0H@Z @ 1113 NONAME ; class QString QNetworkSession::trUtf8(char const *, char const *, int)
- ?trUtf8@QNetworkSessionPrivate@@SA?AVQString@@PBD0@Z @ 1114 NONAME ; class QString QNetworkSessionPrivate::trUtf8(char const *, char const *)
- ?trUtf8@QNetworkSessionPrivate@@SA?AVQString@@PBD0H@Z @ 1115 NONAME ; class QString QNetworkSessionPrivate::trUtf8(char const *, char const *, int)
- ?type@QNetworkConfiguration@@QBE?AW4Type@1@XZ @ 1116 NONAME ; enum QNetworkConfiguration::Type QNetworkConfiguration::type(void) const
- ?updateCompleted@QBearerEngine@@IAEXXZ @ 1117 NONAME ; void QBearerEngine::updateCompleted(void)
- ?updateCompleted@QNetworkConfigurationManager@@IAEXXZ @ 1118 NONAME ; void QNetworkConfigurationManager::updateCompleted(void)
- ?updateConfigurations@QNetworkConfigurationManager@@QAEXXZ @ 1119 NONAME ; void QNetworkConfigurationManager::updateConfigurations(void)
- ?updateConfigurations@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1120 NONAME ; void QNetworkConfigurationManagerPrivate::updateConfigurations(void)
- ?waitForOpened@QNetworkSession@@QAE_NH@Z @ 1121 NONAME ; bool QNetworkSession::waitForOpened(int)
- ?staticMetaObject@QNetworkSessionPrivate@@2UQMetaObject@@B @ 1122 NONAME ; struct QMetaObject const QNetworkSessionPrivate::staticMetaObject
- ?staticMetaObject@QBearerEngine@@2UQMetaObject@@B @ 1123 NONAME ; struct QMetaObject const QBearerEngine::staticMetaObject
- ?staticMetaObject@QNetworkSession@@2UQMetaObject@@B @ 1124 NONAME ; struct QMetaObject const QNetworkSession::staticMetaObject
- ?staticMetaObject@QNetworkConfigurationManager@@2UQMetaObject@@B @ 1125 NONAME ; struct QMetaObject const QNetworkConfigurationManager::staticMetaObject
- ?staticMetaObject@QBearerEnginePlugin@@2UQMetaObject@@B @ 1126 NONAME ; struct QMetaObject const QBearerEnginePlugin::staticMetaObject
- ?staticMetaObject@QNetworkConfigurationManagerPrivate@@2UQMetaObject@@B @ 1127 NONAME ; struct QMetaObject const QNetworkConfigurationManagerPrivate::staticMetaObject
- ?allConfigurations@QNetworkConfigurationManagerPrivate@@QAE?AV?$QList@VQNetworkConfiguration@@@@V?$QFlags@W4StateFlag@QNetworkConfiguration@@@@@Z @ 1128 NONAME ; class QList<class QNetworkConfiguration> QNetworkConfigurationManagerPrivate::allConfigurations(class QFlags<enum QNetworkConfiguration::StateFlag>)
- ?configurationFromIdentifier@QNetworkConfigurationManagerPrivate@@QAE?AVQNetworkConfiguration@@ABVQString@@@Z @ 1129 NONAME ; class QNetworkConfiguration QNetworkConfigurationManagerPrivate::configurationFromIdentifier(class QString const &)
- ?configurationsInUse@QBearerEngine@@QBE_NXZ @ 1130 NONAME ; bool QBearerEngine::configurationsInUse(void) const
- ?defaultConfiguration@QNetworkConfigurationManagerPrivate@@QAE?AVQNetworkConfiguration@@XZ @ 1131 NONAME ; class QNetworkConfiguration QNetworkConfigurationManagerPrivate::defaultConfiguration(void)
- ?disablePolling@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1132 NONAME ; void QNetworkConfigurationManagerPrivate::disablePolling(void)
- ?enablePolling@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1133 NONAME ; void QNetworkConfigurationManagerPrivate::enablePolling(void)
- ?isOnline@QNetworkConfigurationManagerPrivate@@QAE_NXZ @ 1134 NONAME ; bool QNetworkConfigurationManagerPrivate::isOnline(void)
- ?networkAccessible@QNetworkAccessManager@@QBE?AW4NetworkAccessibility@1@XZ @ 1135 NONAME ; enum QNetworkAccessManager::NetworkAccessibility QNetworkAccessManager::networkAccessible(void) const
- ?networkAccessibleChanged@QNetworkAccessManager@@IAEXW4NetworkAccessibility@1@@Z @ 1136 NONAME ; void QNetworkAccessManager::networkAccessibleChanged(enum QNetworkAccessManager::NetworkAccessibility)
- ?networkSessionConnected@QNetworkAccessManager@@IAEXXZ @ 1137 NONAME ; void QNetworkAccessManager::networkSessionConnected(void)
- ?pollEngines@QNetworkConfigurationManagerPrivate@@AAEXXZ @ 1138 NONAME ; void QNetworkConfigurationManagerPrivate::pollEngines(void)
- ?qt_qhostinfo_clear_cache@@YAXXZ @ 1139 NONAME ABSENT ; void qt_qhostinfo_clear_cache(void)
- ?qt_qhostinfo_lookup@@YA?AVQHostInfo@@ABVQString@@PAVQObject@@PBDPA_NPAH@Z @ 1140 NONAME ; class QHostInfo qt_qhostinfo_lookup(class QString const &, class QObject *, char const *, bool *, int *)
- ?requiresPolling@QBearerEngine@@UBE_NXZ @ 1141 NONAME ; bool QBearerEngine::requiresPolling(void) const
+ ?qt_qhostinfo_clear_cache@@YAXXZ @ 964 NONAME ABSENT ; void qt_qhostinfo_clear_cache(void)
+ ?qt_qhostinfo_lookup@@YA?AVQHostInfo@@ABVQString@@PAVQObject@@PBDPA_NPAH@Z @ 965 NONAME ; class QHostInfo qt_qhostinfo_lookup(class QString const &, class QObject *, char const *, bool *, int *)
+ ?rawHeaderPairs@QNetworkReply@@QBEABV?$QList@U?$QPair@VQByteArray@@V1@@@@@XZ @ 966 NONAME ; class QList<struct QPair<class QByteArray, class QByteArray> > const & QNetworkReply::rawHeaderPairs(void) const
+ ?tr@QBearerEnginePlugin@@SA?AVQString@@PBD0H@Z @ 967 NONAME ; class QString QBearerEnginePlugin::tr(char const *, char const *, int)
+ ?qt_metacall@QNetworkConfigurationManager@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 968 NONAME ; int QNetworkConfigurationManager::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?configurationAdded@QNetworkConfigurationManagerPrivate@@AAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 969 NONAME ; void QNetworkConfigurationManagerPrivate::configurationAdded(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
+ ?metaObject@QNetworkConfigurationManagerPrivate@@UBEPBUQMetaObject@@XZ @ 970 NONAME ; struct QMetaObject const * QNetworkConfigurationManagerPrivate::metaObject(void) const
+ ??1QBearerEngineFactoryInterface@@UAE@XZ @ 971 NONAME ; QBearerEngineFactoryInterface::~QBearerEngineFactoryInterface(void)
+ ?setConfiguration@QNetworkAccessManager@@QAEXABVQNetworkConfiguration@@@Z @ 972 NONAME ; void QNetworkAccessManager::setConfiguration(class QNetworkConfiguration const &)
+ ?identifier@QNetworkConfiguration@@QBE?AVQString@@XZ @ 973 NONAME ; class QString QNetworkConfiguration::identifier(void) const
+ ??0QBearerEngine@@QAE@PAVQObject@@@Z @ 974 NONAME ; QBearerEngine::QBearerEngine(class QObject *)
+ ?isRoamingAvailable@QNetworkConfiguration@@QBE_NXZ @ 975 NONAME ; bool QNetworkConfiguration::isRoamingAvailable(void) const
+ ?quitPendingWaitsForOpened@QNetworkSessionPrivate@@IAEXXZ @ 976 NONAME ; void QNetworkSessionPrivate::quitPendingWaitsForOpened(void)
+ ?trUtf8@QNetworkSessionPrivate@@SA?AVQString@@PBD0H@Z @ 977 NONAME ; class QString QNetworkSessionPrivate::trUtf8(char const *, char const *, int)
+ ?setPrivateConfiguration@QNetworkSessionPrivate@@IBEXAAVQNetworkConfiguration@@V?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 978 NONAME ; void QNetworkSessionPrivate::setPrivateConfiguration(class QNetworkConfiguration &, class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>) const
+ ?trUtf8@QNetworkConfigurationManager@@SA?AVQString@@PBD0H@Z @ 979 NONAME ; class QString QNetworkConfigurationManager::trUtf8(char const *, char const *, int)
+ ?stateChanged@QNetworkSession@@IAEXW4State@1@@Z @ 980 NONAME ; void QNetworkSession::stateChanged(enum QNetworkSession::State)
+ ??1QNetworkConfigurationManagerPrivate@@UAE@XZ @ 981 NONAME ; QNetworkConfigurationManagerPrivate::~QNetworkConfigurationManagerPrivate(void)
+ ?getStaticMetaObject@QBearerEnginePlugin@@SAABUQMetaObject@@XZ @ 982 NONAME ; struct QMetaObject const & QBearerEnginePlugin::getStaticMetaObject(void)
+ ?getStaticMetaObject@QNetworkConfigurationManagerPrivate@@SAABUQMetaObject@@XZ @ 983 NONAME ; struct QMetaObject const & QNetworkConfigurationManagerPrivate::getStaticMetaObject(void)
+ ??_EQNetworkConfigurationManagerPrivate@@UAE@I@Z @ 984 NONAME ; QNetworkConfigurationManagerPrivate::~QNetworkConfigurationManagerPrivate(unsigned int)
+ ?metaObject@QBearerEnginePlugin@@UBEPBUQMetaObject@@XZ @ 985 NONAME ; struct QMetaObject const * QBearerEnginePlugin::metaObject(void) const
+ ??4QNetworkConfiguration@@QAEAAV0@ABV0@@Z @ 986 NONAME ; class QNetworkConfiguration & QNetworkConfiguration::operator=(class QNetworkConfiguration const &)
+ ?metaObject@QBearerEngine@@UBEPBUQMetaObject@@XZ @ 987 NONAME ; struct QMetaObject const * QBearerEngine::metaObject(void) const
+ ?getStaticMetaObject@QBearerEngine@@SAABUQMetaObject@@XZ @ 988 NONAME ; struct QMetaObject const & QBearerEngine::getStaticMetaObject(void)
+ ?waitForOpened@QNetworkSession@@QAE_NH@Z @ 989 NONAME ; bool QNetworkSession::waitForOpened(int)
+ ??_EQBearerEngine@@UAE@I@Z @ 990 NONAME ; QBearerEngine::~QBearerEngine(unsigned int)
+ ?error@QNetworkSession@@IAEXW4SessionError@1@@Z @ 991 NONAME ; void QNetworkSession::error(enum QNetworkSession::SessionError)
+ ?stop@QNetworkSession@@QAEXXZ @ 992 NONAME ; void QNetworkSession::stop(void)
+ ?accept@QNetworkSession@@QAEXXZ @ 993 NONAME ; void QNetworkSession::accept(void)
+ ?qNetworkConfigurationManagerPrivate@@YAPAVQNetworkConfigurationManagerPrivate@@XZ @ 994 NONAME ; class QNetworkConfigurationManagerPrivate * qNetworkConfigurationManagerPrivate(void)
+ ?open@QNetworkSession@@QAEXXZ @ 995 NONAME ; void QNetworkSession::open(void)
+ ?newConfigurationActivated@QNetworkSession@@IAEXXZ @ 996 NONAME ; void QNetworkSession::newConfigurationActivated(void)
+ ?staticMetaObject@QNetworkSessionPrivate@@2UQMetaObject@@B @ 997 NONAME ; struct QMetaObject const QNetworkSessionPrivate::staticMetaObject
+ ?error@QNetworkSession@@QBE?AW4SessionError@1@XZ @ 998 NONAME ; enum QNetworkSession::SessionError QNetworkSession::error(void) const
+ ?qt_metacast@QBearerEngine@@UAEPAXPBD@Z @ 999 NONAME ; void * QBearerEngine::qt_metacast(char const *)
+ ?staticMetaObject@QNetworkSession@@2UQMetaObject@@B @ 1000 NONAME ; struct QMetaObject const QNetworkSession::staticMetaObject
+ ?trUtf8@QBearerEngine@@SA?AVQString@@PBD0@Z @ 1001 NONAME ; class QString QBearerEngine::trUtf8(char const *, char const *)
+ ?privateConfiguration@QNetworkSessionPrivate@@IBE?AV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@ABVQNetworkConfiguration@@@Z @ 1002 NONAME ; class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate> QNetworkSessionPrivate::privateConfiguration(class QNetworkConfiguration const &) const
+ ?isOnline@QNetworkConfigurationManagerPrivate@@QAE_NXZ @ 1003 NONAME ; bool QNetworkConfigurationManagerPrivate::isOnline(void)
+ ?state@QNetworkConfiguration@@QBE?AV?$QFlags@W4StateFlag@QNetworkConfiguration@@@@XZ @ 1004 NONAME ; class QFlags<enum QNetworkConfiguration::StateFlag> QNetworkConfiguration::state(void) const
+ ?configurationAdded@QNetworkConfigurationManagerPrivate@@IAEXABVQNetworkConfiguration@@@Z @ 1005 NONAME ; void QNetworkConfigurationManagerPrivate::configurationAdded(class QNetworkConfiguration const &)
+ ?defaultConfiguration@QNetworkConfigurationManager@@QBE?AVQNetworkConfiguration@@XZ @ 1006 NONAME ; class QNetworkConfiguration QNetworkConfigurationManager::defaultConfiguration(void) const
+ ?bytesReceived@QNetworkSession@@QBE_KXZ @ 1007 NONAME ; unsigned long long QNetworkSession::bytesReceived(void) const
+ ?updateConfigurations@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1008 NONAME ; void QNetworkConfigurationManagerPrivate::updateConfigurations(void)
+ ?errorString@QNetworkSession@@QBE?AVQString@@XZ @ 1009 NONAME ; class QString QNetworkSession::errorString(void) const
+ ?tr@QNetworkSession@@SA?AVQString@@PBD0H@Z @ 1010 NONAME ; class QString QNetworkSession::tr(char const *, char const *, int)
+ ??1QNetworkConfigurationManager@@UAE@XZ @ 1011 NONAME ; QNetworkConfigurationManager::~QNetworkConfigurationManager(void)
+ ?isOpen@QNetworkSession@@QBE_NXZ @ 1012 NONAME ; bool QNetworkSession::isOpen(void) const
+ ?configurationChanged@QNetworkConfigurationManager@@IAEXABVQNetworkConfiguration@@@Z @ 1013 NONAME ; void QNetworkConfigurationManager::configurationChanged(class QNetworkConfiguration const &)
+ ?configurationChanged@QNetworkConfigurationManagerPrivate@@AAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1014 NONAME ; void QNetworkConfigurationManagerPrivate::configurationChanged(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
+ ?configurationRemoved@QBearerEngine@@IAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1015 NONAME ; void QBearerEngine::configurationRemoved(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
+ ?qt_metacall@QBearerEnginePlugin@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1016 NONAME ; int QBearerEnginePlugin::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ??0QBearerEnginePlugin@@QAE@PAVQObject@@@Z @ 1017 NONAME ; QBearerEnginePlugin::QBearerEnginePlugin(class QObject *)
+ ?trUtf8@QNetworkSession@@SA?AVQString@@PBD0@Z @ 1018 NONAME ; class QString QNetworkSession::trUtf8(char const *, char const *)
+ ?metaObject@QNetworkSessionPrivate@@UBEPBUQMetaObject@@XZ @ 1019 NONAME ; struct QMetaObject const * QNetworkSessionPrivate::metaObject(void) const
+ ??_EQNetworkConfigurationManager@@UAE@I@Z @ 1020 NONAME ; QNetworkConfigurationManager::~QNetworkConfigurationManager(unsigned int)
+ ?trUtf8@QNetworkSessionPrivate@@SA?AVQString@@PBD0@Z @ 1021 NONAME ; class QString QNetworkSessionPrivate::trUtf8(char const *, char const *)
+ ?bearerName@QNetworkConfiguration@@QBE?AVQString@@XZ @ 1022 NONAME ; class QString QNetworkConfiguration::bearerName(void) const
+ ?trUtf8@QNetworkConfigurationManagerPrivate@@SA?AVQString@@PBD0H@Z @ 1023 NONAME ; class QString QNetworkConfigurationManagerPrivate::trUtf8(char const *, char const *, int)
+ ?setSessionProperty@QNetworkSession@@QAEXABVQString@@ABVQVariant@@@Z @ 1024 NONAME ; void QNetworkSession::setSessionProperty(class QString const &, class QVariant const &)
+ ?qt_metacall@QNetworkSession@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1025 NONAME ; int QNetworkSession::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?staticMetaObject@QBearerEngine@@2UQMetaObject@@B @ 1026 NONAME ; struct QMetaObject const QBearerEngine::staticMetaObject
+ ?networkSessionConnected@QNetworkAccessManager@@IAEXXZ @ 1027 NONAME ; void QNetworkAccessManager::networkSessionConnected(void)
+ ??1QBearerEngine@@UAE@XZ @ 1028 NONAME ; QBearerEngine::~QBearerEngine(void)
+ ?capabilities@QNetworkConfigurationManagerPrivate@@QAE?AV?$QFlags@W4Capability@QNetworkConfigurationManager@@@@XZ @ 1029 NONAME ; class QFlags<enum QNetworkConfigurationManager::Capability> QNetworkConfigurationManagerPrivate::capabilities(void)
+ ??1QNetworkConfiguration@@QAE@XZ @ 1030 NONAME ; QNetworkConfiguration::~QNetworkConfiguration(void)
+ ??0QNetworkConfigurationManagerPrivate@@QAE@XZ @ 1031 NONAME ; QNetworkConfigurationManagerPrivate::QNetworkConfigurationManagerPrivate(void)
+ ?preferredConfigurationChanged@QNetworkSession@@IAEXABVQNetworkConfiguration@@_N@Z @ 1032 NONAME ; void QNetworkSession::preferredConfigurationChanged(class QNetworkConfiguration const &, bool)
+ ?isValid@QNetworkConfiguration@@QBE_NXZ @ 1033 NONAME ; bool QNetworkConfiguration::isValid(void) const
+ ?configurationAdded@QBearerEngine@@IAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1034 NONAME ; void QBearerEngine::configurationAdded(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
+ ??1QNetworkSession@@UAE@XZ @ 1035 NONAME ; QNetworkSession::~QNetworkSession(void)
+ ?qt_metacast@QBearerEnginePlugin@@UAEPAXPBD@Z @ 1036 NONAME ; void * QBearerEnginePlugin::qt_metacast(char const *)
+ ??0QNetworkSession@@QAE@ABVQNetworkConfiguration@@PAVQObject@@@Z @ 1037 NONAME ; QNetworkSession::QNetworkSession(class QNetworkConfiguration const &, class QObject *)
+ ?error@QNetworkSessionPrivate@@IAEXW4SessionError@QNetworkSession@@@Z @ 1038 NONAME ; void QNetworkSessionPrivate::error(enum QNetworkSession::SessionError)
+ ?name@QNetworkConfiguration@@QBE?AVQString@@XZ @ 1039 NONAME ; class QString QNetworkConfiguration::name(void) const
+ ?close@QNetworkSession@@QAEXXZ @ 1040 NONAME ; void QNetworkSession::close(void)
+ ?sessionProperty@QNetworkSession@@QBE?AVQVariant@@ABVQString@@@Z @ 1041 NONAME ; class QVariant QNetworkSession::sessionProperty(class QString const &) const
+ ?engines@QNetworkConfigurationManagerPrivate@@QAE?AV?$QList@PAVQBearerEngine@@@@XZ @ 1042 NONAME ; class QList<class QBearerEngine *> QNetworkConfigurationManagerPrivate::engines(void)
+ ?isOnline@QNetworkConfigurationManager@@QBE_NXZ @ 1043 NONAME ; bool QNetworkConfigurationManager::isOnline(void) const
+ ?capabilities@QNetworkConfigurationManager@@QBE?AV?$QFlags@W4Capability@QNetworkConfigurationManager@@@@XZ @ 1044 NONAME ; class QFlags<enum QNetworkConfigurationManager::Capability> QNetworkConfigurationManager::capabilities(void) const
+ ?configurationRemoved@QNetworkConfigurationManagerPrivate@@AAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1045 NONAME ; void QNetworkConfigurationManagerPrivate::configurationRemoved(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
+ ??0QNetworkConfiguration@@QAE@ABV0@@Z @ 1046 NONAME ; QNetworkConfiguration::QNetworkConfiguration(class QNetworkConfiguration const &)
+ ?setPriority@QNetworkRequest@@QAEXW4Priority@1@@Z @ 1047 NONAME ; void QNetworkRequest::setPriority(enum QNetworkRequest::Priority)
+ ?disconnectNotify@QNetworkSession@@MAEXPBD@Z @ 1048 NONAME ; void QNetworkSession::disconnectNotify(char const *)
+ ?metaObject@QNetworkSession@@UBEPBUQMetaObject@@XZ @ 1049 NONAME ; struct QMetaObject const * QNetworkSession::metaObject(void) const
+ ?trUtf8@QBearerEngine@@SA?AVQString@@PBD0H@Z @ 1050 NONAME ; class QString QBearerEngine::trUtf8(char const *, char const *, int)
+ ?configuration@QNetworkSession@@QBE?AVQNetworkConfiguration@@XZ @ 1051 NONAME ; class QNetworkConfiguration QNetworkSession::configuration(void) const
+ ?closed@QNetworkSessionPrivate@@IAEXXZ @ 1052 NONAME ; void QNetworkSessionPrivate::closed(void)
+ ??1QNetworkSessionPrivate@@UAE@XZ @ 1053 NONAME ; QNetworkSessionPrivate::~QNetworkSessionPrivate(void)
+ ?staticMetaObject@QNetworkConfigurationManager@@2UQMetaObject@@B @ 1054 NONAME ; struct QMetaObject const QNetworkConfigurationManager::staticMetaObject
+ ?tr@QNetworkConfigurationManager@@SA?AVQString@@PBD0H@Z @ 1055 NONAME ; class QString QNetworkConfigurationManager::tr(char const *, char const *, int)
+ ?tr@QNetworkConfigurationManagerPrivate@@SA?AVQString@@PBD0H@Z @ 1056 NONAME ; class QString QNetworkConfigurationManagerPrivate::tr(char const *, char const *, int)
+ ?configurationChanged@QBearerEngine@@IAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1057 NONAME ; void QBearerEngine::configurationChanged(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
+ ?tr@QBearerEngine@@SA?AVQString@@PBD0@Z @ 1058 NONAME ; class QString QBearerEngine::tr(char const *, char const *)
+ ??0QNetworkConfiguration@@QAE@XZ @ 1059 NONAME ; QNetworkConfiguration::QNetworkConfiguration(void)
+ ?configurationRemoved@QNetworkConfigurationManager@@IAEXABVQNetworkConfiguration@@@Z @ 1060 NONAME ; void QNetworkConfigurationManager::configurationRemoved(class QNetworkConfiguration const &)
+ ?preferredConfigurationChanged@QNetworkSessionPrivate@@IAEXABVQNetworkConfiguration@@_N@Z @ 1061 NONAME ; void QNetworkSessionPrivate::preferredConfigurationChanged(class QNetworkConfiguration const &, bool)
+ ??1QBearerEnginePlugin@@UAE@XZ @ 1062 NONAME ; QBearerEnginePlugin::~QBearerEnginePlugin(void)
+ ?tr@QNetworkSession@@SA?AVQString@@PBD0@Z @ 1063 NONAME ; class QString QNetworkSession::tr(char const *, char const *)
+ ??0QNetworkConfigurationManager@@QAE@PAVQObject@@@Z @ 1064 NONAME ; QNetworkConfigurationManager::QNetworkConfigurationManager(class QObject *)
+ ?qt_metacall@QNetworkConfigurationManagerPrivate@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1065 NONAME ; int QNetworkConfigurationManagerPrivate::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ??_EQNetworkSession@@UAE@I@Z @ 1066 NONAME ; QNetworkSession::~QNetworkSession(unsigned int)
+ ??9QNetworkConfiguration@@QBE_NABV0@@Z @ 1067 NONAME ; bool QNetworkConfiguration::operator!=(class QNetworkConfiguration const &) const
+ ?configurationsInUse@QBearerEngine@@QBE_NXZ @ 1068 NONAME ; bool QBearerEngine::configurationsInUse(void) const
+ ?tr@QBearerEngine@@SA?AVQString@@PBD0H@Z @ 1069 NONAME ; class QString QBearerEngine::tr(char const *, char const *, int)
+ ?configuration@QNetworkAccessManager@@QBE?AVQNetworkConfiguration@@XZ @ 1070 NONAME ; class QNetworkConfiguration QNetworkAccessManager::configuration(void) const
+ ?tr@QNetworkSessionPrivate@@SA?AVQString@@PBD0@Z @ 1071 NONAME ; class QString QNetworkSessionPrivate::tr(char const *, char const *)
+ ?activeTime@QNetworkSession@@QBE_KXZ @ 1072 NONAME ; unsigned long long QNetworkSession::activeTime(void) const
+ ?state@QNetworkSession@@QBE?AW4State@1@XZ @ 1073 NONAME ; enum QNetworkSession::State QNetworkSession::state(void) const
+ ?disablePolling@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1074 NONAME ; void QNetworkConfigurationManagerPrivate::disablePolling(void)
+ ?getStaticMetaObject@QNetworkSessionPrivate@@SAABUQMetaObject@@XZ @ 1075 NONAME ; struct QMetaObject const & QNetworkSessionPrivate::getStaticMetaObject(void)
+ ?configurationAdded@QNetworkConfigurationManager@@IAEXABVQNetworkConfiguration@@@Z @ 1076 NONAME ; void QNetworkConfigurationManager::configurationAdded(class QNetworkConfiguration const &)
+ ?tr@QNetworkSessionPrivate@@SA?AVQString@@PBD0H@Z @ 1077 NONAME ; class QString QNetworkSessionPrivate::tr(char const *, char const *, int)
+ ?performAsyncConfigurationUpdate@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1078 NONAME ; void QNetworkConfigurationManagerPrivate::performAsyncConfigurationUpdate(void)
+ ?trUtf8@QNetworkConfigurationManagerPrivate@@SA?AVQString@@PBD0@Z @ 1079 NONAME ; class QString QNetworkConfigurationManagerPrivate::trUtf8(char const *, char const *)
+ ?networkAccessible@QNetworkAccessManager@@QBE?AW4NetworkAccessibility@1@XZ @ 1080 NONAME ; enum QNetworkAccessManager::NetworkAccessibility QNetworkAccessManager::networkAccessible(void) const
+ ?setOption@QAuthenticator@@QAEXABVQString@@ABVQVariant@@@Z @ 1081 NONAME ; void QAuthenticator::setOption(class QString const &, class QVariant const &)
+ ?trUtf8@QBearerEnginePlugin@@SA?AVQString@@PBD0H@Z @ 1082 NONAME ; class QString QBearerEnginePlugin::trUtf8(char const *, char const *, int)
+ ?trUtf8@QNetworkConfigurationManager@@SA?AVQString@@PBD0@Z @ 1083 NONAME ; class QString QNetworkConfigurationManager::trUtf8(char const *, char const *)
+ ?allConfigurations@QNetworkConfigurationManager@@QBE?AV?$QList@VQNetworkConfiguration@@@@V?$QFlags@W4StateFlag@QNetworkConfiguration@@@@@Z @ 1084 NONAME ; class QList<class QNetworkConfiguration> QNetworkConfigurationManager::allConfigurations(class QFlags<enum QNetworkConfiguration::StateFlag>) const
+ ?requiresPolling@QBearerEngine@@UBE_NXZ @ 1085 NONAME ; bool QBearerEngine::requiresPolling(void) const
+ ?priority@QNetworkRequest@@QBE?AW4Priority@1@XZ @ 1086 NONAME ; enum QNetworkRequest::Priority QNetworkRequest::priority(void) const
+ ?networkAccessibleChanged@QNetworkAccessManager@@IAEXW4NetworkAccessibility@1@@Z @ 1087 NONAME ; void QNetworkAccessManager::networkAccessibleChanged(enum QNetworkAccessManager::NetworkAccessibility)
+ ??8QNetworkConfiguration@@QBE_NABV0@@Z @ 1088 NONAME ; bool QNetworkConfiguration::operator==(class QNetworkConfiguration const &) const
+ ?option@QAuthenticator@@QBE?AVQVariant@@ABVQString@@@Z @ 1089 NONAME ; class QVariant QAuthenticator::option(class QString const &) const
+ ?tr@QBearerEnginePlugin@@SA?AVQString@@PBD0@Z @ 1090 NONAME ; class QString QBearerEnginePlugin::tr(char const *, char const *)
+ ?configurationFromIdentifier@QNetworkConfigurationManager@@QBE?AVQNetworkConfiguration@@ABVQString@@@Z @ 1091 NONAME ; class QNetworkConfiguration QNetworkConfigurationManager::configurationFromIdentifier(class QString const &) const
+ ??_EQBearerEnginePlugin@@UAE@I@Z @ 1092 NONAME ; QBearerEnginePlugin::~QBearerEnginePlugin(unsigned int)
+ ?children@QNetworkConfiguration@@QBE?AV?$QList@VQNetworkConfiguration@@@@XZ @ 1093 NONAME ; class QList<class QNetworkConfiguration> QNetworkConfiguration::children(void) const
+ ?activeConfiguration@QNetworkAccessManager@@QBE?AVQNetworkConfiguration@@XZ @ 1094 NONAME ; class QNetworkConfiguration QNetworkAccessManager::activeConfiguration(void) const
+ ?defaultConfiguration@QNetworkConfigurationManagerPrivate@@QAE?AVQNetworkConfiguration@@XZ @ 1095 NONAME ; class QNetworkConfiguration QNetworkConfigurationManagerPrivate::defaultConfiguration(void)
+ ?getStaticMetaObject@QNetworkSession@@SAABUQMetaObject@@XZ @ 1096 NONAME ; struct QMetaObject const & QNetworkSession::getStaticMetaObject(void)
+ ?qt_metacast@QNetworkSession@@UAEPAXPBD@Z @ 1097 NONAME ; void * QNetworkSession::qt_metacast(char const *)
+ ?updateCompleted@QBearerEngine@@IAEXXZ @ 1098 NONAME ; void QBearerEngine::updateCompleted(void)
+ ?qt_metacall@QNetworkSessionPrivate@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1099 NONAME ; int QNetworkSessionPrivate::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?onlineStateChanged@QNetworkConfigurationManager@@IAEX_N@Z @ 1100 NONAME ; void QNetworkConfigurationManager::onlineStateChanged(bool)
+ ?getStaticMetaObject@QNetworkConfigurationManager@@SAABUQMetaObject@@XZ @ 1101 NONAME ; struct QMetaObject const & QNetworkConfigurationManager::getStaticMetaObject(void)
+ ??0QNetworkSessionPrivate@@QAE@XZ @ 1102 NONAME ; QNetworkSessionPrivate::QNetworkSessionPrivate(void)
+ ?qt_metacast@QNetworkConfigurationManager@@UAEPAXPBD@Z @ 1103 NONAME ; void * QNetworkConfigurationManager::qt_metacast(char const *)
+ ?configurationChanged@QNetworkConfigurationManagerPrivate@@IAEXABVQNetworkConfiguration@@@Z @ 1104 NONAME ; void QNetworkConfigurationManagerPrivate::configurationChanged(class QNetworkConfiguration const &)
+ ?staticMetaObject@QBearerEnginePlugin@@2UQMetaObject@@B @ 1105 NONAME ; struct QMetaObject const QBearerEnginePlugin::staticMetaObject
+ ?qt_metacast@QNetworkConfigurationManagerPrivate@@UAEPAXPBD@Z @ 1106 NONAME ; void * QNetworkConfigurationManagerPrivate::qt_metacast(char const *)
+ ?newConfigurationActivated@QNetworkSessionPrivate@@IAEXXZ @ 1107 NONAME ; void QNetworkSessionPrivate::newConfigurationActivated(void)
+ ?qt_metacast@QNetworkSessionPrivate@@UAEPAXPBD@Z @ 1108 NONAME ; void * QNetworkSessionPrivate::qt_metacast(char const *)
+ ?startPolling@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1109 NONAME ; void QNetworkConfigurationManagerPrivate::startPolling(void)
+ ?allConfigurations@QNetworkConfigurationManagerPrivate@@QAE?AV?$QList@VQNetworkConfiguration@@@@V?$QFlags@W4StateFlag@QNetworkConfiguration@@@@@Z @ 1110 NONAME ; class QList<class QNetworkConfiguration> QNetworkConfigurationManagerPrivate::allConfigurations(class QFlags<enum QNetworkConfiguration::StateFlag>)
+ ?connectNotify@QNetworkSession@@MAEXPBD@Z @ 1111 NONAME ; void QNetworkSession::connectNotify(char const *)
+ ?onlineStateChanged@QNetworkConfigurationManagerPrivate@@IAEX_N@Z @ 1112 NONAME ; void QNetworkConfigurationManagerPrivate::onlineStateChanged(bool)
+ ?bytesWritten@QNetworkSession@@QBE_KXZ @ 1113 NONAME ; unsigned long long QNetworkSession::bytesWritten(void) const
+ ?sendCustomRequest@QNetworkAccessManager@@QAEPAVQNetworkReply@@ABVQNetworkRequest@@ABVQByteArray@@PAVQIODevice@@@Z @ 1114 NONAME ; class QNetworkReply * QNetworkAccessManager::sendCustomRequest(class QNetworkRequest const &, class QByteArray const &, class QIODevice *)
+ ?addPendingConnection@QTcpServer@@IAEXPAVQTcpSocket@@@Z @ 1115 NONAME ; void QTcpServer::addPendingConnection(class QTcpSocket *)
+ ?ignore@QNetworkSession@@QAEXXZ @ 1116 NONAME ; void QNetworkSession::ignore(void)
+ ?updateConfigurations@QNetworkConfigurationManager@@QAEXXZ @ 1117 NONAME ; void QNetworkConfigurationManager::updateConfigurations(void)
+ ?stateChanged@QNetworkSessionPrivate@@IAEXW4State@QNetworkSession@@@Z @ 1118 NONAME ; void QNetworkSessionPrivate::stateChanged(enum QNetworkSession::State)
+ ?setALREnabled@QNetworkSessionPrivate@@UAEX_N@Z @ 1119 NONAME ; void QNetworkSessionPrivate::setALREnabled(bool)
+ ?configurationRemoved@QNetworkConfigurationManagerPrivate@@IAEXABVQNetworkConfiguration@@@Z @ 1120 NONAME ; void QNetworkConfigurationManagerPrivate::configurationRemoved(class QNetworkConfiguration const &)
+ ?qt_metacall@QBearerEngine@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1121 NONAME ; int QBearerEngine::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?interface@QNetworkSession@@QBE?AVQNetworkInterface@@XZ @ 1122 NONAME ; class QNetworkInterface QNetworkSession::interface(void) const
+ ?opened@QNetworkSession@@IAEXXZ @ 1123 NONAME ; void QNetworkSession::opened(void)
+ ?type@QNetworkConfiguration@@QBE?AW4Type@1@XZ @ 1124 NONAME ; enum QNetworkConfiguration::Type QNetworkConfiguration::type(void) const
+ ?migrate@QNetworkSession@@QAEXXZ @ 1125 NONAME ; void QNetworkSession::migrate(void)
+ ?closed@QNetworkSession@@IAEXXZ @ 1126 NONAME ; void QNetworkSession::closed(void)
+ ?pollEngines@QNetworkConfigurationManagerPrivate@@AAEXXZ @ 1127 NONAME ; void QNetworkConfigurationManagerPrivate::pollEngines(void)
+ ?staticMetaObject@QNetworkConfigurationManagerPrivate@@2UQMetaObject@@B @ 1128 NONAME ; struct QMetaObject const QNetworkConfigurationManagerPrivate::staticMetaObject
+ ?reject@QNetworkSession@@QAEXXZ @ 1129 NONAME ; void QNetworkSession::reject(void)
+ ?options@QAuthenticator@@QBE?AV?$QHash@VQString@@VQVariant@@@@XZ @ 1130 NONAME ; class QHash<class QString, class QVariant> QAuthenticator::options(void) const
+ ?purpose@QNetworkConfiguration@@QBE?AW4Purpose@1@XZ @ 1131 NONAME ; enum QNetworkConfiguration::Purpose QNetworkConfiguration::purpose(void) const
+ ?configurationFromIdentifier@QNetworkConfigurationManagerPrivate@@QAE?AVQNetworkConfiguration@@ABVQString@@@Z @ 1132 NONAME ; class QNetworkConfiguration QNetworkConfigurationManagerPrivate::configurationFromIdentifier(class QString const &)
+ ?abort@QNetworkConfigurationManagerPrivate@@IAEXXZ @ 1133 NONAME ; void QNetworkConfigurationManagerPrivate::abort(void)
+ ?tr@QNetworkConfigurationManager@@SA?AVQString@@PBD0@Z @ 1134 NONAME ; class QString QNetworkConfigurationManager::tr(char const *, char const *)
+ ?trUtf8@QNetworkSession@@SA?AVQString@@PBD0H@Z @ 1135 NONAME ; class QString QNetworkSession::trUtf8(char const *, char const *, int)
+ ?trUtf8@QBearerEnginePlugin@@SA?AVQString@@PBD0@Z @ 1136 NONAME ; class QString QBearerEnginePlugin::trUtf8(char const *, char const *)
+ ??_EQNetworkSessionPrivate@@UAE@I@Z @ 1137 NONAME ; QNetworkSessionPrivate::~QNetworkSessionPrivate(unsigned int)
+ ?configurationUpdateComplete@QNetworkConfigurationManagerPrivate@@IAEXXZ @ 1138 NONAME ; void QNetworkConfigurationManagerPrivate::configurationUpdateComplete(void)
+ ?metaObject@QNetworkConfigurationManager@@UBEPBUQMetaObject@@XZ @ 1139 NONAME ; struct QMetaObject const * QNetworkConfigurationManager::metaObject(void) const
+ ?tr@QNetworkConfigurationManagerPrivate@@SA?AVQString@@PBD0@Z @ 1140 NONAME ; class QString QNetworkConfigurationManagerPrivate::tr(char const *, char const *)
+ ?updateCompleted@QNetworkConfigurationManager@@IAEXXZ @ 1141 NONAME ; void QNetworkConfigurationManager::updateCompleted(void)
?setNetworkAccessible@QNetworkAccessManager@@QAEXW4NetworkAccessibility@1@@Z @ 1142 NONAME ; void QNetworkAccessManager::setNetworkAccessible(enum QNetworkAccessManager::NetworkAccessibility)
- ?startPolling@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1143 NONAME ; void QNetworkConfigurationManagerPrivate::startPolling(void)
- ?capabilities@QNetworkConfigurationManagerPrivate@@QAE?AV?$QFlags@W4Capability@QNetworkConfigurationManager@@@@XZ @ 1144 NONAME ; class QFlags<enum QNetworkConfigurationManager::Capability> QNetworkConfigurationManagerPrivate::capabilities(void)
- ?addPendingConnection@QTcpServer@@IAEXPAVQTcpSocket@@@Z @ 1145 NONAME ; void QTcpServer::addPendingConnection(class QTcpSocket *)
+ ??_EQBearerEngineFactoryInterface@@UAE@I@Z @ 1143 NONAME ; QBearerEngineFactoryInterface::~QBearerEngineFactoryInterface(unsigned int)
+ ?enablePolling@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1144 NONAME ; void QNetworkConfigurationManagerPrivate::enablePolling(void)
diff --git a/src/s60installs/bwins/QtOpenVGu.def b/src/s60installs/bwins/QtOpenVGu.def
index f398055125..14523836eb 100644
--- a/src/s60installs/bwins/QtOpenVGu.def
+++ b/src/s60installs/bwins/QtOpenVGu.def
@@ -164,12 +164,11 @@ EXPORTS
?qt_vg_create_context@@YAPAVQEglContext@@PAVQPaintDevice@@H@Z @ 163 NONAME ; class QEglContext * qt_vg_create_context(class QPaintDevice *, int)
?reclaimImages@QVGPixmapData@@UAEXXZ @ 164 NONAME ; void QVGPixmapData::reclaimImages(void)
?hibernate@QVGPixmapData@@UAEXXZ @ 165 NONAME ; void QVGPixmapData::hibernate(void)
- ?drawStaticTextItem@QVGPaintEngine@@UAEXPAVQStaticTextItem@@@Z @ 166 NONAME ; void QVGPaintEngine::drawStaticTextItem(class QStaticTextItem *)
- ?drawPixmapFragments@QVGPaintEngine@@UAEXPBVPixmapFragment@QPainter@@HABVQPixmap@@V?$QFlags@W4PixmapFragmentHint@QPainter@@@@@Z @ 167 NONAME ; void QVGPaintEngine::drawPixmapFragments(class QPainter::PixmapFragment const *, int, class QPixmap const &, class QFlags<enum QPainter::PixmapFragmentHint>)
- ?drawCachedGlyphs@QVGPaintEngine@@QAE_NHPBIABVQFont@@PAVQFontEngine@@ABVQPointF@@@Z @ 168 NONAME ABSENT ; bool QVGPaintEngine::drawCachedGlyphs(int, unsigned int const *, class QFont const &, class QFontEngine *, class QPointF const &)
- ?supportsStaticContents@QVGEGLWindowSurfaceDirect@@UBE_NXZ @ 169 NONAME ; bool QVGEGLWindowSurfaceDirect::supportsStaticContents(void) const
- ?scroll@QVGEGLWindowSurfacePrivate@@UAE_NPAVQWidget@@ABVQRegion@@HH@Z @ 170 NONAME ; bool QVGEGLWindowSurfacePrivate::scroll(class QWidget *, class QRegion const &, int, int)
- ?scroll@QVGEGLWindowSurfaceDirect@@UAE_NPAVQWidget@@ABVQRegion@@HH@Z @ 171 NONAME ; bool QVGEGLWindowSurfaceDirect::scroll(class QWidget *, class QRegion const &, int, int)
- ?supportsStaticContents@QVGEGLWindowSurfacePrivate@@UBE_NXZ @ 172 NONAME ; bool QVGEGLWindowSurfacePrivate::supportsStaticContents(void) const
- ?drawCachedGlyphs@QVGPaintEngine@@QAE_NHPBIABVQFont@@PAVQFontEngine@@ABVQPointF@@PBUQFixedPoint@@@Z @ 173 NONAME ; bool QVGPaintEngine::drawCachedGlyphs(int, unsigned int const *, class QFont const &, class QFontEngine *, class QPointF const &, struct QFixedPoint const *)
+ ?supportsStaticContents@QVGEGLWindowSurfaceDirect@@UBE_NXZ @ 166 NONAME ; bool QVGEGLWindowSurfaceDirect::supportsStaticContents(void) const
+ ?scroll@QVGEGLWindowSurfacePrivate@@UAE_NPAVQWidget@@ABVQRegion@@HH@Z @ 167 NONAME ; bool QVGEGLWindowSurfacePrivate::scroll(class QWidget *, class QRegion const &, int, int)
+ ?scroll@QVGEGLWindowSurfaceDirect@@UAE_NPAVQWidget@@ABVQRegion@@HH@Z @ 168 NONAME ; bool QVGEGLWindowSurfaceDirect::scroll(class QWidget *, class QRegion const &, int, int)
+ ?supportsStaticContents@QVGEGLWindowSurfacePrivate@@UBE_NXZ @ 169 NONAME ; bool QVGEGLWindowSurfacePrivate::supportsStaticContents(void) const
+ ?drawCachedGlyphs@QVGPaintEngine@@QAE_NHPBIABVQFont@@PAVQFontEngine@@ABVQPointF@@PBUQFixedPoint@@@Z @ 170 NONAME ; bool QVGPaintEngine::drawCachedGlyphs(int, unsigned int const *, class QFont const &, class QFontEngine *, class QPointF const &, struct QFixedPoint const *)
+ ?drawPixmapFragments@QVGPaintEngine@@UAEXPBVPixmapFragment@QPainter@@HABVQPixmap@@V?$QFlags@W4PixmapFragmentHint@QPainter@@@@@Z @ 171 NONAME ; void QVGPaintEngine::drawPixmapFragments(class QPainter::PixmapFragment const *, int, class QPixmap const &, class QFlags<enum QPainter::PixmapFragmentHint>)
+ ?drawStaticTextItem@QVGPaintEngine@@UAEXPAVQStaticTextItem@@@Z @ 172 NONAME ; void QVGPaintEngine::drawStaticTextItem(class QStaticTextItem *)
diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def
index dd5103fe3c..9a3cefa2ec 100644
--- a/src/s60installs/eabi/QtDeclarativeu.def
+++ b/src/s60installs/eabi/QtDeclarativeu.def
@@ -44,7 +44,7 @@ EXPORTS
_ZN16QDeclarativeInfoD1Ev @ 43 NONAME
_ZN16QDeclarativeInfoD2Ev @ 44 NONAME
_ZN16QDeclarativeItem10classBeginEv @ 45 NONAME
- _ZN16QDeclarativeItem10forceFocusEv @ 46 NONAME
+ _ZN16QDeclarativeItem10forceFocusEv @ 46 NONAME ABSENT
_ZN16QDeclarativeItem10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 47 NONAME
_ZN16QDeclarativeItem10resetWidthEv @ 48 NONAME
_ZN16QDeclarativeItem10sceneEventEP6QEvent @ 49 NONAME
@@ -59,7 +59,7 @@ EXPORTS
_ZN16QDeclarativeItem13parentChangedEPS_ @ 58 NONAME
_ZN16QDeclarativeItem13setParentItemEPS_ @ 59 NONAME
_ZN16QDeclarativeItem13smoothChangedEb @ 60 NONAME
- _ZN16QDeclarativeItem15childrenChangedEv @ 61 NONAME
+ _ZN16QDeclarativeItem15childrenChangedEv @ 61 NONAME ABSENT
_ZN16QDeclarativeItem15geometryChangedERK6QRectFS2_ @ 62 NONAME
_ZN16QDeclarativeItem15keyReleaseEventEP9QKeyEvent @ 63 NONAME
_ZN16QDeclarativeItem16inputMethodEventEP17QInputMethodEvent @ 64 NONAME
@@ -69,7 +69,7 @@ EXPORTS
_ZN16QDeclarativeItem17componentCompleteEv @ 68 NONAME
_ZN16QDeclarativeItem17setBaselineOffsetEf @ 69 NONAME
_ZN16QDeclarativeItem17setImplicitHeightEf @ 70 NONAME
- _ZN16QDeclarativeItem17wantsFocusChangedEb @ 71 NONAME
+ _ZN16QDeclarativeItem17wantsFocusChangedEb @ 71 NONAME ABSENT
_ZN16QDeclarativeItem18keyPressPreHandlerEP9QKeyEvent @ 72 NONAME
_ZN16QDeclarativeItem18setTransformOriginENS_15TransformOriginE @ 73 NONAME
_ZN16QDeclarativeItem19childrenRectChangedERK6QRectF @ 74 NONAME
@@ -143,7 +143,7 @@ EXPORTS
_ZN16QDeclarativeView11qt_metacallEN11QMetaObject4CallEiPPv @ 142 NONAME
_ZN16QDeclarativeView11qt_metacastEPKc @ 143 NONAME
_ZN16QDeclarativeView11resizeEventEP12QResizeEvent @ 144 NONAME
- _ZN16QDeclarativeView11rootContextEv @ 145 NONAME
+ _ZN16QDeclarativeView11rootContextEv @ 145 NONAME ABSENT
_ZN16QDeclarativeView12sceneResizedE5QSize @ 146 NONAME
_ZN16QDeclarativeView13setResizeModeENS_10ResizeModeE @ 147 NONAME
_ZN16QDeclarativeView13setRootObjectEP7QObject @ 148 NONAME
@@ -151,7 +151,7 @@ EXPORTS
_ZN16QDeclarativeView15continueExecuteEv @ 150 NONAME
_ZN16QDeclarativeView16staticMetaObjectE @ 151 NONAME DATA 16
_ZN16QDeclarativeView19getStaticMetaObjectEv @ 152 NONAME
- _ZN16QDeclarativeView6engineEv @ 153 NONAME
+ _ZN16QDeclarativeView6engineEv @ 153 NONAME ABSENT
_ZN16QDeclarativeView9setSourceERK4QUrl @ 154 NONAME
_ZN16QDeclarativeViewC1EP7QWidget @ 155 NONAME
_ZN16QDeclarativeViewC1ERK4QUrlP7QWidget @ 156 NONAME
@@ -202,7 +202,7 @@ EXPORTS
_ZN18QDeclarativeEngine10setBaseUrlERK4QUrl @ 201 NONAME
_ZN18QDeclarativeEngine11qt_metacallEN11QMetaObject4CallEiPPv @ 202 NONAME
_ZN18QDeclarativeEngine11qt_metacastEPKc @ 203 NONAME
- _ZN18QDeclarativeEngine11rootContextEv @ 204 NONAME
+ _ZN18QDeclarativeEngine11rootContextEv @ 204 NONAME ABSENT
_ZN18QDeclarativeEngine12importPluginERK7QStringS2_PS0_ @ 205 NONAME
_ZN18QDeclarativeEngine13addImportPathERK7QString @ 206 NONAME
_ZN18QDeclarativeEngine13addPluginPathERK7QString @ 207 NONAME
@@ -385,9 +385,9 @@ EXPORTS
_ZN19QDeclarativeDomListD1Ev @ 384 NONAME
_ZN19QDeclarativeDomListD2Ev @ 385 NONAME
_ZN19QDeclarativeDomListaSERKS_ @ 386 NONAME
- _ZN19QDeclarativePrivate12registerTypeERKNS_12RegisterTypeE @ 387 NONAME
- _ZN19QDeclarativePrivate12registerTypeERKNS_17RegisterInterfaceE @ 388 NONAME
- _ZN19QDeclarativePrivate26registerAutoParentFunctionEPFNS_16AutoParentResultEP7QObjectS2_E @ 389 NONAME
+ _ZN19QDeclarativePrivate12registerTypeERKNS_12RegisterTypeE @ 387 NONAME ABSENT
+ _ZN19QDeclarativePrivate12registerTypeERKNS_17RegisterInterfaceE @ 388 NONAME ABSENT
+ _ZN19QDeclarativePrivate26registerAutoParentFunctionEPFNS_16AutoParentResultEP7QObjectS2_E @ 389 NONAME ABSENT
_ZN19QDeclarativePrivate30qdeclarativeelement_destructorEP7QObject @ 390 NONAME
_ZN19QListModelInterface10itemsMovedEiii @ 391 NONAME
_ZN19QListModelInterface11qt_metacallEN11QMetaObject4CallEiPPv @ 392 NONAME
@@ -1075,7 +1075,7 @@ EXPORTS
_ZNK15QPacketProtocol17maximumPacketSizeEv @ 1074 NONAME
_ZNK16QDeclarativeItem10metaObjectEv @ 1075 NONAME
_ZNK16QDeclarativeItem10parentItemEv @ 1076 NONAME
- _ZNK16QDeclarativeItem10wantsFocusEv @ 1077 NONAME
+ _ZNK16QDeclarativeItem10wantsFocusEv @ 1077 NONAME ABSENT
_ZNK16QDeclarativeItem10widthValidEv @ 1078 NONAME
_ZNK16QDeclarativeItem11heightValidEv @ 1079 NONAME
_ZNK16QDeclarativeItem11mapFromItemERK12QScriptValueff @ 1080 NONAME
@@ -1707,4 +1707,11 @@ EXPORTS
_ZN25QDeclarativeImageProviderC2ENS_9ImageTypeE @ 1706 NONAME
_ZNK25QDeclarativeImageProvider9imageTypeEv @ 1707 NONAME
_ZN23QDeclarativeEngineDebug21resetBindingForObjectEiRK7QString @ 1708 NONAME
+ _ZN16QDeclarativeItem16forceActiveFocusEv @ 1709 NONAME
+ _ZN16QDeclarativeItem18activeFocusChangedEb @ 1710 NONAME
+ _ZNK16QDeclarativeItem14hasActiveFocusEv @ 1711 NONAME
+ _ZNK16QDeclarativeView11rootContextEv @ 1712 NONAME
+ _ZNK16QDeclarativeView6engineEv @ 1713 NONAME
+ _ZNK18QDeclarativeEngine11rootContextEv @ 1714 NONAME
+ _ZN19QDeclarativePrivate11qmlregisterENS_16RegistrationTypeEPv @ 1715 NONAME
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index 018cba25ce..a22b4d9304 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -4294,7 +4294,7 @@ EXPORTS
_ZN19QApplicationPrivate13animate_comboE @ 4293 NONAME DATA 1
_ZN19QApplicationPrivate13mouse_buttonsE @ 4294 NONAME DATA 4
_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent @ 4295 NONAME
- _ZN19QApplicationPrivate13scanCodeCacheE @ 4296 NONAME DATA 4
+ _ZN19QApplicationPrivate13scanCodeCacheE @ 4296 NONAME DATA 4 ABSENT
_ZN19QApplicationPrivate13setSystemFontERK5QFont @ 4297 NONAME
_ZN19QApplicationPrivate13styleOverrideE @ 4298 NONAME DATA 4
_ZN19QApplicationPrivate14autoSipEnabledE @ 4299 NONAME DATA 1
@@ -4675,7 +4675,7 @@ EXPORTS
_ZN20QGraphicsItemPrivate20removeExtraItemCacheEv @ 4674 NONAME
_ZN20QGraphicsItemPrivate23appendGraphicsTransformEP18QGraphicsTransform @ 4675 NONAME
_ZN20QGraphicsItemPrivate25movableAncestorIsSelectedEPK13QGraphicsItem @ 4676 NONAME
- _ZN20QGraphicsItemPrivate26childrenBoundingRectHelperEP10QTransformP6QRectF @ 4677 NONAME
+ _ZN20QGraphicsItemPrivate26childrenBoundingRectHelperEP10QTransformP6QRectF @ 4677 NONAME ABSENT
_ZN20QGraphicsItemPrivate26invalidateDepthRecursivelyEv @ 4678 NONAME
_ZN20QGraphicsItemPrivate28ensureSequentialSiblingIndexEv @ 4679 NONAME
_ZN20QGraphicsItemPrivate29ensureSceneTransformRecursiveEPP13QGraphicsItem @ 4680 NONAME
@@ -12084,4 +12084,11 @@ EXPORTS
_ZThn24_N13QS60MainAppUi15ProcessCommandLEi @ 12083 NONAME
_ZThn40_N13QS60MainAppUi15MopSupplyObjectE8TTypeUid @ 12084 NONAME
_ZThn92_N13QS60MainAppUi22HandleViewDeactivationERK10TVwsViewIdS2_ @ 12085 NONAME
+ _ZN18QTapAndHoldGesture10setTimeoutEi @ 12086 NONAME
+ _ZN18QTapAndHoldGesture7timeoutEv @ 12087 NONAME
+ _ZN20QGraphicsItemPrivate20focusScopeItemChangeEb @ 12088 NONAME
+ _ZN20QGraphicsItemPrivate26childrenBoundingRectHelperEP10QTransformP6QRectFb @ 12089 NONAME
+ _ZN14QGraphicsScale13xScaleChangedEv @ 12090 NONAME
+ _ZN14QGraphicsScale13yScaleChangedEv @ 12091 NONAME
+ _ZN14QGraphicsScale13zScaleChangedEv @ 12092 NONAME
diff --git a/src/s60installs/eabi/QtNetworku.def b/src/s60installs/eabi/QtNetworku.def
index 3cc36443a9..eb30832b11 100644
--- a/src/s60installs/eabi/QtNetworku.def
+++ b/src/s60installs/eabi/QtNetworku.def
@@ -1164,4 +1164,7 @@ EXPORTS
_ZTV35QNetworkConfigurationManagerPrivate @ 1163 NONAME
_ZThn8_N19QBearerEnginePluginD0Ev @ 1164 NONAME
_ZThn8_N19QBearerEnginePluginD1Ev @ 1165 NONAME
+ _ZN14QAuthenticator9setOptionERK7QStringRK8QVariant @ 1166 NONAME
+ _ZNK14QAuthenticator6optionERK7QString @ 1167 NONAME
+ _ZNK14QAuthenticator7optionsEv @ 1168 NONAME
diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro
index 4addb84c0e..8a8167b4eb 100644
--- a/src/s60installs/s60installs.pro
+++ b/src/s60installs/s60installs.pro
@@ -57,8 +57,8 @@ symbian: {
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"
+ "qsymbianbearer.qtplugin /$${HW_ZDIR}$${QT_PLUGINS_BASE_DIR}/bearer/qsymbianbearer$${QT_LIBINFIX}.qtplugin" \
+ "qsymbianbearer.qtplugin /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
diff --git a/src/s60main/s60main.pro b/src/s60main/s60main.pro
index 9ea308049a..a273897187 100644
--- a/src/s60main/s60main.pro
+++ b/src/s60main/s60main.pro
@@ -29,6 +29,7 @@ symbian {
# Having MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA will cause s60main.lib be unlinkable
# against GCCE apps, so remove it
MMP_RULES -= $$MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA
+ linux-armcc:QMAKE_CXXFLAGS *= --export_all_vtbl
} else {
error("$$_FILE_ is intended only for Symbian!")
}
diff --git a/src/script/api/qscriptcontext.cpp b/src/script/api/qscriptcontext.cpp
index 3f08e749df..1a111008b1 100644
--- a/src/script/api/qscriptcontext.cpp
+++ b/src/script/api/qscriptcontext.cpp
@@ -323,6 +323,9 @@ QScriptValue QScriptContext::argumentsObject() const
When a function is called as constructor, the thisObject()
contains the newly constructed object to be initialized.
+
+ \note This function is only guarenteed to work for a context
+ corresponding to native functions.
*/
bool QScriptContext::isCalledAsConstructor() const
{
@@ -413,6 +416,9 @@ void QScriptContext::setReturnValue(const QScriptValue &result)
object provides access to the local variables associated with this
context.
+ \note The activation object might not be available if there is no
+ active QScriptEngineAgent, as it might be optimized.
+
\sa argument(), argumentsObject()
*/
@@ -472,6 +478,10 @@ QScriptValue QScriptContext::activationObject() const
activation.
If \a activation is not an object, this function does nothing.
+
+ \note For a context corresponding to a JavaScript function, this is only
+ guarenteed to work if there was an QScriptEngineAgent active on the
+ engine while the function was evaluated.
*/
void QScriptContext::setActivationObject(const QScriptValue &activation)
{
diff --git a/src/script/api/qscriptcontextinfo.cpp b/src/script/api/qscriptcontextinfo.cpp
index ebb17706cc..a90e0146af 100644
--- a/src/script/api/qscriptcontextinfo.cpp
+++ b/src/script/api/qscriptcontextinfo.cpp
@@ -53,8 +53,7 @@ QT_BEGIN_NAMESPACE
current statement.
If the called function is executing Qt Script code, you can obtain
- the script location with the functions fileName(), lineNumber() and
- columnNumber().
+ the script location with the functions fileName() and lineNumber().
You can obtain the starting line number and ending line number of a
Qt Script function definition with functionStartLineNumber() and
@@ -317,13 +316,7 @@ int QScriptContextInfo::lineNumber() const
}
/*!
- Returns the column number corresponding to the statement being
- executed, or -1 if the column number is not available.
-
- The column number is only available if Qt Script code is being
- executed.
-
- \sa lineNumber(), fileName()
+ \obsolete
*/
int QScriptContextInfo::columnNumber() const
{
diff --git a/src/script/api/qscriptcontextinfo.h b/src/script/api/qscriptcontextinfo.h
index d0b3f2121d..64a1e15082 100644
--- a/src/script/api/qscriptcontextinfo.h
+++ b/src/script/api/qscriptcontextinfo.h
@@ -69,7 +69,9 @@ public:
qint64 scriptId() const;
QString fileName() const;
int lineNumber() const;
- int columnNumber() const;
+#ifdef QT_DEPRECATED
+ QT_DEPRECATED int columnNumber() const;
+#endif
QString functionName() const;
FunctionType functionType() const;
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 7bccffe014..8560214380 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -44,7 +44,6 @@
#include "CodeBlock.h"
#include "Error.h"
-#include "JSLock.h"
#include "Interpreter.h"
#include "PrototypeFunction.h"
@@ -152,8 +151,7 @@ QT_BEGIN_NAMESPACE
evaluation caused an exception by calling hasUncaughtException(). In
that case, you can call toString() on the error object to obtain an
error message. The current uncaught exception is also available
- through uncaughtException(). You can obtain a human-readable
- backtrace of the exception with uncaughtExceptionBacktrace().
+ through uncaughtException().
Calling clearExceptions() will cause any uncaught exceptions to be
cleared.
@@ -1003,7 +1001,6 @@ QScriptEnginePrivate::~QScriptEnginePrivate()
detachAllRegisteredScriptStrings();
qDeleteAll(m_qobjectData);
qDeleteAll(m_typeInfos);
- JSC::JSLock lock(false);
globalData->heap.destroy();
globalData->deref();
while (freeScriptValues) {
@@ -1292,7 +1289,6 @@ bool QScriptEnginePrivate::isCollecting() const
void QScriptEnginePrivate::collectGarbage()
{
- JSC::JSLock lock(false);
QScript::APIShim shim(this);
globalData->heap.collectAllGarbage();
}
@@ -1322,7 +1318,6 @@ JSC::JSValue QScriptEnginePrivate::evaluateHelper(JSC::ExecState *exec, intptr_t
bool &compile)
{
Q_Q(QScriptEngine);
- JSC::JSLock lock(false); // ### hmmm
QBoolBlocker inEvalBlocker(inEval, true);
q->currentContext()->activationObject(); //force the creation of a context for native function;
@@ -2800,8 +2795,7 @@ void QScriptEnginePrivate::popContext()
The exception state is cleared when evaluate() is called.
- \sa uncaughtException(), uncaughtExceptionLineNumber(),
- uncaughtExceptionBacktrace()
+ \sa uncaughtException(), uncaughtExceptionLineNumber()
*/
bool QScriptEngine::hasUncaughtException() const
{
@@ -2819,7 +2813,6 @@ bool QScriptEngine::hasUncaughtException() const
message.
\sa hasUncaughtException(), uncaughtExceptionLineNumber(),
- uncaughtExceptionBacktrace()
*/
QScriptValue QScriptEngine::uncaughtException() const
{
@@ -2839,7 +2832,7 @@ QScriptValue QScriptEngine::uncaughtException() const
Line numbers are 1-based, unless a different base was specified as
the second argument to evaluate().
- \sa hasUncaughtException(), uncaughtExceptionBacktrace()
+ \sa hasUncaughtException()
*/
int QScriptEngine::uncaughtExceptionLineNumber() const
{
@@ -2851,7 +2844,7 @@ int QScriptEngine::uncaughtExceptionLineNumber() const
/*!
Returns a human-readable backtrace of the last uncaught exception.
- Each line is of the form \c{<function-name>(<arguments>)@<file-name>:<line-number>}.
+ It is in the form \c{<function-name>()@<file-name>:<line-number>}.
\sa uncaughtException()
*/
@@ -4196,6 +4189,7 @@ void QScriptEngine::setAgent(QScriptEngineAgent *agent)
"cannot set agent belonging to different engine");
return;
}
+ QScript::APIShim shim(d);
if (d->activeAgent)
QScriptEngineAgentPrivate::get(d->activeAgent)->detach();
d->activeAgent = agent;
diff --git a/src/script/api/qscriptengineagent.cpp b/src/script/api/qscriptengineagent.cpp
index 28905e8505..b1f131ed23 100644
--- a/src/script/api/qscriptengineagent.cpp
+++ b/src/script/api/qscriptengineagent.cpp
@@ -117,6 +117,8 @@ void QScriptEngineAgentPrivate::attach()
if (engine->originalGlobalObject()->debugger())
engine->originalGlobalObject()->setDebugger(0);
JSC::Debugger::attach(engine->originalGlobalObject());
+ if (!QScriptEnginePrivate::get(engine)->isEvaluating())
+ JSC::Debugger::recompileAllJSFunctions(engine->globalData);
}
void QScriptEngineAgentPrivate::detach()
@@ -134,9 +136,12 @@ void QScriptEngineAgentPrivate::returnEvent(const JSC::DebuggerCallFrame& frame,
void QScriptEngineAgentPrivate::exceptionThrow(const JSC::DebuggerCallFrame& frame, intptr_t sourceID, bool hasHandler)
{
JSC::CallFrame *oldFrame = engine->currentFrame;
+ int oldAgentLineNumber = engine->agentLineNumber;
engine->currentFrame = frame.callFrame();
QScriptValue value(engine->scriptValueFromJSCValue(frame.exception()));
+ engine->agentLineNumber = value.property(QLatin1String("lineNumber")).toInt32();
q_ptr->exceptionThrow(sourceID, value, hasHandler);
+ engine->agentLineNumber = oldAgentLineNumber;
engine->currentFrame = oldFrame;
engine->setCurrentException(value);
};
@@ -367,9 +372,8 @@ void QScriptEngineAgent::functionExit(qint64 scriptId,
/*!
This function is called when the engine is about to execute a new
statement in the script identified by \a scriptId. The statement
- begins on the line and column specified by \a lineNumber and \a
- columnNumber. This event is not generated for native Qt Script
- functions.
+ begins on the line and column specified by \a lineNumber
+ This event is not generated for native Qt Script functions.
Reimplement this function to handle this event. For example, a
debugger implementation could reimplement this function to provide
@@ -378,6 +382,8 @@ void QScriptEngineAgent::functionExit(qint64 scriptId,
The default implementation does nothing.
+ \note \a columnNumber is undefined
+
\sa scriptLoad(), functionEntry()
*/
void QScriptEngineAgent::positionChange(qint64 scriptId,
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp
index 451d1b0eac..f6390bb0be 100644
--- a/src/script/api/qscriptvalue.cpp
+++ b/src/script/api/qscriptvalue.cpp
@@ -1268,6 +1268,7 @@ QDateTime QScriptValue::toDateTime() const
Q_D(const QScriptValue);
if (!d || !d->engine)
return QDateTime();
+ QScript::APIShim shim(d->engine);
return QScriptEnginePrivate::toDateTime(d->engine->currentFrame, d->jscValue);
}
@@ -1284,6 +1285,7 @@ QRegExp QScriptValue::toRegExp() const
Q_D(const QScriptValue);
if (!d || !d->engine)
return QRegExp();
+ QScript::APIShim shim(d->engine);
return QScriptEnginePrivate::toRegExp(d->engine->currentFrame, d->jscValue);
}
#endif // QT_NO_REGEXP
@@ -1303,6 +1305,7 @@ QObject *QScriptValue::toQObject() const
Q_D(const QScriptValue);
if (!d || !d->engine)
return 0;
+ QScript::APIShim shim(d->engine);
return QScriptEnginePrivate::toQObject(d->engine->currentFrame, d->jscValue);
}
@@ -1317,6 +1320,7 @@ const QMetaObject *QScriptValue::toQMetaObject() const
Q_D(const QScriptValue);
if (!d || !d->engine)
return 0;
+ QScript::APIShim shim(d->engine);
return QScriptEnginePrivate::toQMetaObject(d->engine->currentFrame, d->jscValue);
}
@@ -1407,6 +1411,7 @@ QScriptValue QScriptValue::property(quint32 arrayIndex,
Q_D(const QScriptValue);
if (!d || !d->isObject())
return QScriptValue();
+ QScript::APIShim shim(d->engine);
return d->engine->scriptValueFromJSCValue(d->property(arrayIndex, mode));
}
@@ -1434,6 +1439,7 @@ void QScriptValue::setProperty(quint32 arrayIndex, const QScriptValue &value,
"cannot set value created in a different engine");
return;
}
+ QScript::APIShim shim(d->engine);
JSC::JSValue jsValue = d->engine->scriptValueToJSCValue(value);
d->setProperty(arrayIndex, jsValue, flags);
}
diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h
index 853c6c81a3..8f286dbe55 100644
--- a/src/script/api/qscriptvalue_p.h
+++ b/src/script/api/qscriptvalue_p.h
@@ -103,7 +103,7 @@ public:
qint64 objectId()
{
- if ( (type == JavaScriptCore) && (engine) )
+ if ( (type == JavaScriptCore) && (engine) && jscValue.isCell() )
return (qint64)jscValue.asCell();
else
return -1;
diff --git a/src/script/bridge/qscriptdeclarativeobject.cpp b/src/script/bridge/qscriptdeclarativeobject.cpp
index 6e08b83d69..f330ac019e 100644
--- a/src/script/bridge/qscriptdeclarativeobject.cpp
+++ b/src/script/bridge/qscriptdeclarativeobject.cpp
@@ -88,6 +88,7 @@ void DeclarativeObjectDelegate::put(QScriptObject* object, JSC::ExecState *exec,
JSC::JSValue value, JSC::PutPropertySlot &slot)
{
QScriptEnginePrivate *engine = scriptEngineFromExec(exec);
+ QScript::SaveFrameHelper saveFrame(engine, exec);
QScriptDeclarativeClass::Identifier identifier = (void *)propertyName.ustring().rep();
QScriptDeclarativeClassPrivate *p = QScriptDeclarativeClassPrivate::get(m_class);
@@ -144,7 +145,7 @@ JSC::JSValue DeclarativeObjectDelegate::call(JSC::ExecState *exec, JSC::JSObject
QScriptDeclarativeClass *scriptClass = static_cast<DeclarativeObjectDelegate*>(delegate)->m_class;
QScriptEnginePrivate *eng_p = scriptEngineFromExec(exec);
- JSC::ExecState *oldFrame = eng_p->currentFrame;
+ QScript::SaveFrameHelper saveFrame(eng_p, exec);
eng_p->pushContext(exec, thisValue, args, callee);
QScriptContext *ctxt = eng_p->contextForFrame(eng_p->currentFrame);
@@ -153,7 +154,6 @@ JSC::JSValue DeclarativeObjectDelegate::call(JSC::ExecState *exec, JSC::JSObject
scriptClass->call(static_cast<DeclarativeObjectDelegate*>(delegate)->m_object, ctxt);
eng_p->popContext();
- eng_p->currentFrame = oldFrame;
return (JSC::JSValue &)(result);
}
diff --git a/src/sql/drivers/db2/qsql_db2.pri b/src/sql/drivers/db2/qsql_db2.pri
new file mode 100644
index 0000000000..16557f0e00
--- /dev/null
+++ b/src/sql/drivers/db2/qsql_db2.pri
@@ -0,0 +1,8 @@
+HEADERS += $$PWD/qsql_db2.h
+SOURCES += $$PWD/qsql_db2.cpp
+
+unix {
+ !contains(LIBS, .*db2.*):LIBS += -ldb2
+} else:!win32-borland {
+ !contains(LIBS, .*db2.*):LIBS += -ldb2cli
+}
diff --git a/src/sql/drivers/drivers.pri b/src/sql/drivers/drivers.pri
index 05e7265120..87cc0b1d9e 100644
--- a/src/sql/drivers/drivers.pri
+++ b/src/sql/drivers/drivers.pri
@@ -1,119 +1,11 @@
-contains(sql-drivers, all ) {
- sql-driver += psql mysql odbc oci tds db2 sqlite ibase
-}
-
-contains(sql-drivers, psql) {
- HEADERS += drivers/psql/qsql_psql.h
- SOURCES += drivers/psql/qsql_psql.cpp
-
- 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
- } else:win32:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32
-}
-
-contains(sql-drivers, mysql) {
- HEADERS += drivers/mysql/qsql_mysql.h
- SOURCES += drivers/mysql/qsql_mysql.cpp
-
- unix {
- isEmpty(QT_LFLAGS_MYSQL) {
- !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) {
- use_libmysqlclient_r:LIBS *= -lmysqlclient_r
- else:LIBS *= -lmysqlclient
- }
- } else {
- LIBS *= $$QT_LFLAGS_MYSQL
- QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL
- }
- }
-
- win32:!contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*) {
- !win32-g++*:LIBS *= -llibmysql
- else:LIBS *= -lmysql
- }
-}
-
-contains(sql-drivers, odbc) {
- HEADERS += drivers/odbc/qsql_odbc.h
- SOURCES += drivers/odbc/qsql_odbc.cpp
-
- mac:!contains( LIBS, .*odbc.* ):LIBS *= -liodbc
- unix:!contains( LIBS, .*odbc.* ):LIBS *= -lodbc
- unix:DEFINES += UNICODE
-
- win32 {
- !win32-borland:LIBS *= -lodbc32
- else:LIBS *= $(BCB)/lib/PSDK/odbc32.lib
- }
-}
-
-contains(sql-drivers, oci) {
- HEADERS += drivers/oci/qsql_oci.h
- SOURCES += drivers/oci/qsql_oci.cpp
-
- unix:!contains( LIBS, .*clnts.* ):LIBS += -lclntsh
-
- win32:LIBS += -loci
-}
-
-contains(sql-drivers, tds) {
- HEADERS += drivers/tds/qsql_tds.h
- SOURCES += drivers/tds/qsql_tds.cpp
-
- unix:LIBS += -L$SYBASE/lib -lsybdb
-
- win32 {
- !win32-borland:LIBS += -lNTWDBLIB
- else:LIBS += $(BCB)/lib/PSDK/NTWDBLIB.LIB
- }
-}
-
-contains(sql-drivers, db2) {
- HEADERS += drivers/db2/qsql_db2.h
- SOURCES += drivers/db2/qsql_db2.cpp
-
- unix:LIBS += -ldb2
-
- win32 {
- !win32-borland:LIBS += -ldb2cli
-# else:LIBS += $(BCB)/lib/PSDK/db2cli.lib
- }
-}
-
-contains(sql-drivers, ibase) {
- HEADERS += drivers/ibase/qsql_ibase.h
- SOURCES += drivers/ibase/qsql_ibase.cpp
-
- unix:LIBS *= -lgds
-
- win32 {
- !win32-borland:LIBS *= -lgds32_ms
- else:LIBS += gds32.lib
- }
-}
-
-contains(sql-drivers, sqlite2) {
- HEADERS += drivers/sqlite2/qsql_sqlite2.h
- SOURCES += drivers/sqlite2/qsql_sqlite2.cpp
- !contains(LIBS, .*sqlite.*):LIBS *= -lsqlite
-}
-
-contains(sql-drivers, sqlite) {
- !system-sqlite:!contains( LIBS, .*sqlite3.* ) {
- CONFIG(release, debug|release):DEFINES *= NDEBUG
- DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE
- INCLUDEPATH += ../3rdparty/sqlite
- SOURCES += ../3rdparty/sqlite/sqlite3.c
- } else {
- LIBS *= $$QT_LFLAGS_SQLITE
- QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE
- }
-
- HEADERS += drivers/sqlite/qsql_sqlite.h
- SOURCES += drivers/sqlite/qsql_sqlite.cpp
-}
+contains(sql-drivers, all):sql-driver += psql mysql odbc oci tds db2 sqlite ibase
+
+contains(sql-drivers, psql):include($$PWD/psql/qsql_psql.pri)
+contains(sql-drivers, mysql):include($$PWD/mysql/qsql_mysql.pri)
+contains(sql-drivers, odbc):include($$PWD/odbc/qsql_odbc.pri)
+contains(sql-drivers, oci):include($$PWD/oci/qsql_oci.pri)
+contains(sql-drivers, tds):include($$PWD/tds/qsql_tds.pri)
+contains(sql-drivers, db2):include($$PWD/db2/qsql_db2.pri)
+contains(sql-drivers, ibase):include($$PWD/ibase/qsql_ibase.pri)
+contains(sql-drivers, sqlite2):include($$PWD/sqlite2/qsql_sqlite2.pri)
+contains(sql-drivers, sqlite):include($$PWD/sqlite/qsql_sqlite.pri)
diff --git a/src/sql/drivers/ibase/qsql_ibase.pri b/src/sql/drivers/ibase/qsql_ibase.pri
new file mode 100644
index 0000000000..33fbb0de30
--- /dev/null
+++ b/src/sql/drivers/ibase/qsql_ibase.pri
@@ -0,0 +1,11 @@
+HEADERS += $$PWD/qsql_ibase.h
+SOURCES += $$PWD/qsql_ibase.cpp
+
+unix {
+ !contains(LIBS, .*gds.*):!contains(LIBS, .*libfb.*):LIBS += -lgds
+} else {
+ !contains(LIBS, .*gds.*):!contains(LIBS, .*fbclient.*) {
+ win32-borland:LIBS += gds32.lib
+ else:LIBS += -lgds32_ms
+ }
+}
diff --git a/src/sql/drivers/mysql/qsql_mysql.pri b/src/sql/drivers/mysql/qsql_mysql.pri
new file mode 100644
index 0000000000..1b9c3dd8ca
--- /dev/null
+++ b/src/sql/drivers/mysql/qsql_mysql.pri
@@ -0,0 +1,16 @@
+HEADERS += $$PWD/qsql_mysql.h
+SOURCES += $$PWD/qsql_mysql.cpp
+
+unix {
+ isEmpty(QT_LFLAGS_MYSQL) {
+ !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) {
+ use_libmysqlclient_r:LIBS += -lmysqlclient_r
+ else:LIBS += -lmysqlclient
+ }
+ } else {
+ LIBS *= $$QT_LFLAGS_MYSQL
+ QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL
+ }
+} else {
+ !contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*):LIBS += -llibmysql
+}
diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp
index 2f0cfdce58..e11cf75f23 100644
--- a/src/sql/drivers/oci/qsql_oci.cpp
+++ b/src/sql/drivers/oci/qsql_oci.cpp
@@ -93,8 +93,17 @@ enum { QOCIEncoding = 2002 }; // AL16UTF16LE
enum { QOCIEncoding = 2000 }; // AL16UTF16
#endif
-static const ub1 CSID_NCHAR = SQLCS_NCHAR;
+// Always set the OCI_ATTR_CHARSET_FORM to SQLCS_NCHAR is safe
+// because Oracle server will deal with the implicit Conversion
+// Between CHAR and NCHAR.
+// see: http://download.oracle.com/docs/cd/A91202_01/901_doc/appdev.901/a89857/oci05bnd.htm#422705
+static const ub1 qOraCharsetForm = SQLCS_NCHAR;
+
+#if defined (OCI_UTF16ID)
+static const ub2 qOraCharset = OCI_UTF16ID;
+#else
static const ub2 qOraCharset = OCI_UCS2ID;
+#endif
typedef QVarLengthArray<sb2, 32> IndicatorArray;
typedef QVarLengthArray<ub2, 32> SizeArray;
@@ -209,12 +218,24 @@ void QOCIResultPrivate::setCharset(OCIBind* hbnd)
OCI_HTYPE_BIND,
// this const cast is safe since OCI doesn't touch
// the charset.
+ const_cast<void *>(static_cast<const void *>(&qOraCharsetForm)),
+ 0,
+ OCI_ATTR_CHARSET_FORM,
+ err);
+ if (r != 0)
+ qOraWarning("QOCIResultPrivate::setCharset: Couldn't set OCI_ATTR_CHARSET_FORM: ", err);
+
+ r = OCIAttrSet(hbnd,
+ OCI_HTYPE_BIND,
+ // this const cast is safe since OCI doesn't touch
+ // the charset.
const_cast<void *>(static_cast<const void *>(&qOraCharset)),
0,
OCI_ATTR_CHARSET_ID,
err);
if (r != 0)
qOraWarning("QOCIResultPrivate::setCharset: Couldn't set OCI_ATTR_CHARSET_ID: ", err);
+
}
int QOCIResultPrivate::bindValue(OCIStmt *sql, OCIBind **hbnd, OCIError *err, int pos,
@@ -648,7 +669,7 @@ QByteArray qMakeOraDate(const QDateTime& dt)
QDateTime qMakeDate(const char* oraDate)
{
- int century = oraDate[0];
+ int century = uchar(oraDate[0]);
if(century >= 100){
int year = uchar(oraDate[1]);
year = ((century-100)*100) + (year-100);
@@ -939,6 +960,17 @@ void QOCICols::setCharset(OCIDefine* dfn)
OCI_HTYPE_DEFINE,
// this const cast is safe since OCI doesn't touch
// the charset.
+ const_cast<void *>(static_cast<const void *>(&qOraCharsetForm)),
+ 0,
+ OCI_ATTR_CHARSET_FORM,
+ d->err);
+ if (r != 0)
+ qOraWarning("QOCIResultPrivate::setCharset: Couldn't set OCI_ATTR_CHARSET_FORM: ", d->err);
+
+ r = OCIAttrSet(dfn,
+ OCI_HTYPE_DEFINE,
+ // this const cast is safe since OCI doesn't touch
+ // the charset.
const_cast<void *>(static_cast<const void *>(&qOraCharset)),
0,
OCI_ATTR_CHARSET_ID,
diff --git a/src/sql/drivers/oci/qsql_oci.pri b/src/sql/drivers/oci/qsql_oci.pri
new file mode 100644
index 0000000000..60ccc4c227
--- /dev/null
+++ b/src/sql/drivers/oci/qsql_oci.pri
@@ -0,0 +1,9 @@
+HEADERS += $$PWD/qsql_oci.h
+SOURCES += $$PWD/qsql_oci.cpp
+
+unix {
+ !contains(LIBS, .*clnts.*):LIBS += -lclntsh
+} else {
+ LIBS *= -loci
+}
+macx:QMAKE_LFLAGS += -Wl,-flat_namespace,-U,_environ
diff --git a/src/sql/drivers/odbc/qsql_odbc.pri b/src/sql/drivers/odbc/qsql_odbc.pri
new file mode 100644
index 0000000000..66a8d51af0
--- /dev/null
+++ b/src/sql/drivers/odbc/qsql_odbc.pri
@@ -0,0 +1,13 @@
+HEADERS += $$PWD/qsql_odbc.h
+SOURCES += $$PWD/qsql_odbc.cpp
+
+unix {
+ DEFINES += UNICODE
+ !contains(LIBS, .*odbc.*) {
+ macx:LIBS += -liodbc
+ else:LIBS += $$QT_LFLAGS_ODBC
+ }
+} else {
+ win32-borland:LIBS *= $(BCB)/lib/PSDK/odbc32.lib
+ else:LIBS *= -lodbc32
+}
diff --git a/src/sql/drivers/psql/qsql_psql.pri b/src/sql/drivers/psql/qsql_psql.pri
new file mode 100644
index 0000000000..97db4beb59
--- /dev/null
+++ b/src/sql/drivers/psql/qsql_psql.pri
@@ -0,0 +1,13 @@
+HEADERS += $$PWD/qsql_psql.h
+SOURCES += $$PWD/qsql_psql.cpp
+
+unix|win32-g++* {
+ !static:!isEmpty(QT_LFLAGS_PSQL) {
+ !contains(QT_CONFIG, system-zlib): QT_LFLAGS_PSQL -= -lz
+ LIBS *= $$QT_LFLAGS_PSQL
+ QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL
+ }
+ !contains(LIBS, .*pq.*):LIBS += -lpq
+} else {
+ !contains(LIBS, .*pq.*):LIBS += -llibpq -lws2_32 -ladvapi32
+}
diff --git a/src/sql/drivers/sqlite/qsql_sqlite.pri b/src/sql/drivers/sqlite/qsql_sqlite.pri
new file mode 100644
index 0000000000..78a4e49979
--- /dev/null
+++ b/src/sql/drivers/sqlite/qsql_sqlite.pri
@@ -0,0 +1,11 @@
+HEADERS += $$PWD/qsql_sqlite.h
+SOURCES += $$PWD/qsql_sqlite.cpp
+
+symbian:include($$QT_SOURCE_TREE/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri)
+
+!system-sqlite:!contains(LIBS, .*sqlite3.*) {
+ include($$PWD/../../../3rdparty/sqlite.pri)
+} else {
+ LIBS *= $$QT_LFLAGS_SQLITE
+ QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE
+}
diff --git a/src/sql/drivers/sqlite2/qsql_sqlite2.pri b/src/sql/drivers/sqlite2/qsql_sqlite2.pri
new file mode 100644
index 0000000000..9a9f6cdf9e
--- /dev/null
+++ b/src/sql/drivers/sqlite2/qsql_sqlite2.pri
@@ -0,0 +1,4 @@
+HEADERS += $$PWD/qsql_sqlite2.h
+SOURCES += $$PWD/qsql_sqlite2.cpp
+
+!contains(LIBS, .*sqlite.*):LIBS += -lsqlite
diff --git a/src/sql/drivers/tds/qsql_tds.h b/src/sql/drivers/tds/qsql_tds.h
index f23a672f92..3594a4d00f 100644
--- a/src/sql/drivers/tds/qsql_tds.h
+++ b/src/sql/drivers/tds/qsql_tds.h
@@ -48,7 +48,10 @@
#ifdef Q_OS_WIN32
#define WIN32_LEAN_AND_MEAN
+#ifndef Q_USE_SYBASE
#define DBNTWIN32 // indicates 32bit windows dblib
+#endif
+#include <winsock2.h>
#include <QtCore/qt_windows.h>
#include <sqlfront.h>
#include <sqldb.h>
diff --git a/src/sql/drivers/tds/qsql_tds.pri b/src/sql/drivers/tds/qsql_tds.pri
new file mode 100644
index 0000000000..c552ead1a7
--- /dev/null
+++ b/src/sql/drivers/tds/qsql_tds.pri
@@ -0,0 +1,10 @@
+HEADERS += $$PWD/qsql_tds.h
+SOURCES += $$PWD/qsql_tds.cpp
+
+unix {
+ !contains(LIBS, .*sybdb.*):LIBS += -lsybdb
+} else:win32-borland {
+ LIBS *= $(BCB)/lib/PSDK/NTWDBLIB.LIB
+} else {
+ LIBS *= -lNTWDBLIB
+}
diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp
index 76bc2b06bb..2ab37deed6 100644
--- a/src/sql/kernel/qsqldatabase.cpp
+++ b/src/sql/kernel/qsqldatabase.cpp
@@ -60,7 +60,10 @@
#include "../drivers/oci/qsql_oci.h"
#endif
#ifdef QT_SQL_TDS
+// conflicting RETCODE typedef between odbc and freetds
+#define RETCODE DBRETCODE
#include "../drivers/tds/qsql_tds.h"
+#undef RETCODE
#endif
#ifdef QT_SQL_DB2
#include "../drivers/db2/qsql_db2.h"
diff --git a/src/svg/qsvgstyle.cpp b/src/svg/qsvgstyle.cpp
index 0d1bad9cb0..f228a7799d 100644
--- a/src/svg/qsvgstyle.cpp
+++ b/src/svg/qsvgstyle.cpp
@@ -241,7 +241,7 @@ void QSvgFontStyle::apply(QPainter *p, const QSvgNode *, QSvgExtraStates &states
}
if (m_sizeSet)
- font.setPointSize(m_qfont.pointSizeF());
+ font.setPointSizeF(m_qfont.pointSizeF());
if (m_styleSet)
font.setStyle(m_qfont.style());
diff --git a/src/svg/qsvgstyle_p.h b/src/svg/qsvgstyle_p.h
index af3b4e57d0..dfea12c56d 100644
--- a/src/svg/qsvgstyle_p.h
+++ b/src/svg/qsvgstyle_p.h
@@ -338,7 +338,7 @@ public:
{
// Store the _pixel_ size in the font. Since QFont::setPixelSize() only takes an int, call
// QFont::SetPointSize() instead. Set proper font size just before rendering.
- m_qfont.setPointSize(size);
+ m_qfont.setPointSizeF(size);
m_sizeSet = 1;
}
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 63e22cccd3..17f1a6b3b0 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -54,7 +54,6 @@
#include <QtCore/qdir.h>
#include <QtCore/qprocess.h>
#include <QtCore/qdebug.h>
-#include <QtCore/qlibraryinfo.h>
#include "QtTest/private/qtestlog_p.h"
#include "QtTest/private/qtesttable_p.h"
@@ -1008,9 +1007,6 @@ static void qParseArgs(int argc, char *argv[])
" -iterations n : Sets the number of accumulation iterations.\n"
" -median n : Sets the number of median iterations.\n"
" -vb : Print out verbose benchmarking information.\n"
-#if !defined(QT_NO_PROCESS) && !defined(QT_NO_SETTINGS)
- " -chart : Create chart based on the benchmark result.\n"
-#endif
"\n"
" -help : This help\n";
@@ -1128,12 +1124,8 @@ static void qParseArgs(int argc, char *argv[])
} else if (strcmp(argv[i], "-vb") == 0) {
QBenchmarkGlobalData::current->verboseOutput = true;
-#if !defined(QT_NO_PROCESS) && !defined(QT_NO_SETTINGS)
} else if (strcmp(argv[i], "-chart") == 0) {
- QBenchmarkGlobalData::current->createChart = true;
- QTestLog::setLogMode(QTestLog::XML);
- QTestLog::redirectOutput("results.xml");
-#endif
+ fprintf(stderr, "Warning: `-chart' option is not available\n");
} else if (strcmp(argv[i], "-qws") == 0) {
// do nothing
} else if (strcmp(argv[i], "-graphicssystem") == 0) {
@@ -1743,26 +1735,6 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
}
#endif
-
-#if !defined(QT_NO_PROCESS) && !defined(QT_NO_SETTINGS)
- if (QBenchmarkGlobalData::current->createChart) {
- QString chartLocation = QLibraryInfo::location(QLibraryInfo::BinariesPath);
-#ifdef Q_OS_WIN
- chartLocation += QLatin1String("/../tools/qtestlib/chart/release/chart.exe");
-#else
- chartLocation += QLatin1String("/../tools/qtestlib/chart/chart");
-#endif
- if (QFile::exists(chartLocation)) {
- QProcess p;
- p.setProcessChannelMode(QProcess::ForwardedChannels);
- p.start(chartLocation, QStringList() << QLatin1String("results.xml"));
- p.waitForFinished(-1);
- } else {
- qDebug() << QLatin1String("Could not find the chart tool in ") + chartLocation + QLatin1String(", please make sure it is compiled.");
- }
- }
-#endif
-
#if defined(QTEST_NOEXITCODE)
return 0;
#else
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp
index 10a80f332e..84d1567254 100644
--- a/src/tools/moc/moc.cpp
+++ b/src/tools/moc/moc.cpp
@@ -1208,6 +1208,12 @@ bool Moc::until(Token target) {
default: break;
}
}
+
+ //when searching commas within the default argument, we should take care of template depth (anglecount)
+ // unfortunatelly, we do not have enough semantic information to know if '<' is the operator< or
+ // the begining of a template type. so we just use heuristics.
+ int possible = -1;
+
while (index < symbols.size()) {
Token t = symbols.at(index++).token;
switch (t) {
@@ -1226,8 +1232,16 @@ bool Moc::until(Token target) {
&& braceCount <= 0
&& brackCount <= 0
&& parenCount <= 0
- && (target != RANGLE || angleCount <= 0))
+ && (target != RANGLE || angleCount <= 0)) {
+ if (target != COMMA || angleCount <= 0)
+ return true;
+ possible = index;
+ }
+
+ if (target == COMMA && t == EQ && possible != -1) {
+ index = possible;
return true;
+ }
if (braceCount < 0 || brackCount < 0 || parenCount < 0
|| (target == RANGLE && angleCount < 0)) {
@@ -1235,6 +1249,12 @@ bool Moc::until(Token target) {
break;
}
}
+
+ if(target == COMMA && angleCount != 0 && possible != -1) {
+ index = possible;
+ return true;
+ }
+
return false;
}
diff --git a/tests/auto/compiler/tst_compiler.cpp b/tests/auto/compiler/tst_compiler.cpp
index 368620d3a4..90eb357fcb 100644
--- a/tests/auto/compiler/tst_compiler.cpp
+++ b/tests/auto/compiler/tst_compiler.cpp
@@ -640,7 +640,7 @@ static inline double qt_inf()
#endif
union { uchar c[8]; double d; } returnValue;
- qMemCopy(returnValue.c, bytes, sizeof(returnValue.c));
+ memcpy(returnValue.c, bytes, sizeof(returnValue.c));
return returnValue.d;
}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/qtbug12295.qml b/tests/auto/declarative/qdeclarativebehaviors/data/qtbug12295.qml
new file mode 100644
index 0000000000..804559c2e3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/qtbug12295.qml
@@ -0,0 +1,17 @@
+import Qt 4.7
+
+Rectangle {
+ width: 200
+ height: 200
+ color: "blue"
+
+ Rectangle {
+ id: myRect
+ objectName: "myRect"
+ width: 100
+ height: 100
+ Behavior on x {
+ NumberAnimation {}
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
index 5c2c1455cb..174967bd79 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
+++ b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
@@ -80,6 +80,7 @@ private slots:
void startup();
void groupedPropertyCrash();
void runningTrue();
+ void sameValue();
};
void tst_qdeclarativebehaviors::simpleBehavior()
@@ -384,6 +385,33 @@ void tst_qdeclarativebehaviors::runningTrue()
QTRY_VERIFY(runningSpy.count() > 0);
}
+//QTBUG-12295
+void tst_qdeclarativebehaviors::sameValue()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/qtbug12295.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeRectangle *target = rect->findChild<QDeclarativeRectangle*>("myRect");
+ QVERIFY(target);
+
+ target->setX(100);
+ QCOMPARE(target->x(), qreal(100));
+
+ target->setProperty("x", 0);
+ QTRY_VERIFY(target->x() != qreal(0) && target->x() != qreal(100));
+ QTRY_VERIFY(target->x() == qreal(0)); //make sure Behavior has finished.
+
+ target->setX(100);
+ QCOMPARE(target->x(), qreal(100));
+
+ //this is the main point of the test -- the behavior needs to be triggered again
+ //even though we set 0 twice in a row.
+ target->setProperty("x", 0);
+ QTRY_VERIFY(target->x() != qreal(0) && target->x() != qreal(100));
+}
+
QTEST_MAIN(tst_qdeclarativebehaviors)
#include "tst_qdeclarativebehaviors.moc"
diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/chain.qml b/tests/auto/declarative/qdeclarativefocusscope/data/chain.qml
index 6c39f20313..42b50cfa1f 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/data/chain.qml
+++ b/tests/auto/declarative/qdeclarativefocusscope/data/chain.qml
@@ -4,11 +4,11 @@ Rectangle {
id: root
width:300; height:400
- property bool focus1: root.wantsFocus
- property bool focus2: item1.wantsFocus
- property bool focus3: fs1.wantsFocus
- property bool focus4: fs2.wantsFocus
- property bool focus5: theItem.wantsFocus
+ property bool focus1: root.activeFocus
+ property bool focus2: item1.activeFocus
+ property bool focus3: fs1.activeFocus
+ property bool focus4: fs2.activeFocus
+ property bool focus5: theItem.activeFocus
Item {
id: item1
diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/forcefocus.qml b/tests/auto/declarative/qdeclarativefocusscope/data/forcefocus.qml
index af9c420bd6..9144854a6f 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/data/forcefocus.qml
+++ b/tests/auto/declarative/qdeclarativefocusscope/data/forcefocus.qml
@@ -15,28 +15,28 @@ Rectangle {
height: 120; width: 420
color: "transparent"
- border.width: 5; border.color: firstScope.wantsFocus?"blue":"black"
+ border.width: 5; border.color: firstScope.activeFocus?"blue":"black"
Rectangle {
id: item1; objectName: "item1"
x: 10; y: 10; width: 100; height: 100; color: "green"
- border.width: 5; border.color: wantsFocus?"blue":"black"
+ border.width: 5; border.color: activeFocus?"blue":"black"
focus: true
Rectangle {
width: 50; height: 50; anchors.centerIn: parent
- color: parent.focus?"red":"transparent"
+ color: parent.activeFocus?"red":"transparent"
}
}
Rectangle {
id: item2; objectName: "item2"
x: 310; y: 10; width: 100; height: 100; color: "green"
- border.width: 5; border.color: wantsFocus?"blue":"black"
+ border.width: 5; border.color: activeFocus?"blue":"black"
Rectangle {
width: 50; height: 50; anchors.centerIn: parent
- color: parent.focus?"red":"transparent"
+ color: parent.activeFocus?"red":"transparent"
}
}
}
@@ -50,32 +50,32 @@ Rectangle {
y: 160; height: 120; width: 420
color: "transparent"
- border.width: 5; border.color: secondScope.wantsFocus?"blue":"black"
+ border.width: 5; border.color: secondScope.activeFocus?"blue":"black"
Rectangle {
id: item4; objectName: "item4"
x: 10; y: 10; width: 100; height: 100; color: "green"
- border.width: 5; border.color: wantsFocus?"blue":"black"
+ border.width: 5; border.color: activeFocus?"blue":"black"
Rectangle {
width: 50; height: 50; anchors.centerIn: parent
- color: parent.focus?"red":"transparent"
+ color: parent.activeFocus?"red":"transparent"
}
}
Rectangle {
id: item5; objectName: "item5"
x: 310; y: 10; width: 100; height: 100; color: "green"
- border.width: 5; border.color: wantsFocus?"blue":"black"
+ border.width: 5; border.color: activeFocus?"blue":"black"
Rectangle {
width: 50; height: 50; anchors.centerIn: parent
- color: parent.focus?"red":"transparent"
+ color: parent.activeFocus?"red":"transparent"
}
}
}
}
}
Keys.onDigit4Pressed: item4.focus = true
- Keys.onDigit5Pressed: item5.forceFocus()
+ Keys.onDigit5Pressed: item5.forceActiveFocus()
}
diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test.qml
index aa43ba8e49..55be103ab8 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/data/test.qml
+++ b/tests/auto/declarative/qdeclarativefocusscope/data/test.qml
@@ -20,21 +20,21 @@ Rectangle {
color: "transparent"
border.width: 5
- border.color: myScope.wantsFocus?"blue":"black"
+ border.color: myScope.activeFocus?"blue":"black"
Rectangle {
id: item1; objectName: "item1"
x: 10; y: 10
width: 100; height: 100; color: "green"
border.width: 5
- border.color: wantsFocus?"blue":"black"
+ border.color: activeFocus?"blue":"black"
Keys.onDigit9Pressed: console.debug("Top Left");
KeyNavigation.right: item2
focus: true
Rectangle {
width: 50; height: 50; anchors.centerIn: parent
- color: parent.focus?"red":"transparent"
+ color: parent.activeFocus?"red":"transparent"
}
}
@@ -43,13 +43,13 @@ Rectangle {
x: 310; y: 10
width: 100; height: 100; color: "green"
border.width: 5
- border.color: wantsFocus?"blue":"black"
+ border.color: activeFocus?"blue":"black"
KeyNavigation.left: item1
Keys.onDigit9Pressed: console.log("Top Right");
Rectangle {
width: 50; height: 50; anchors.centerIn: parent
- color: parent.focus?"red":"transparent"
+ color: parent.activeFocus?"red":"transparent"
}
}
}
@@ -63,14 +63,14 @@ Rectangle {
x: 10; y: 300
width: 100; height: 100; color: "green"
border.width: 5
- border.color: wantsFocus?"blue":"black"
+ border.color: activeFocus?"blue":"black"
Keys.onDigit9Pressed: console.log("Bottom Left");
KeyNavigation.up: myScope
Rectangle {
width: 50; height: 50; anchors.centerIn: parent
- color: parent.focus?"red":"transparent"
+ color: parent.activeFocus?"red":"transparent"
}
}
diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test2.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test2.qml
index 216277e7ea..5ed701d055 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/data/test2.qml
+++ b/tests/auto/declarative/qdeclarativefocusscope/data/test2.qml
@@ -10,27 +10,27 @@ Rectangle {
FocusScope {
y: 100
focus: true; objectName: "item1"
- Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
+ Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
FocusScope {
y: 100
focus: true; objectName: "item2"
- Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
+ Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
FocusScope {
y: 100
focus: true; objectName: "item3"
- Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
+ Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
FocusScope {
y: 100
focus: true; objectName: "item4"
- Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
+ Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
FocusScope {
y: 100
focus: true; objectName: "item5"
- Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
+ Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
}
}
}
diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test3.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test3.qml
index 2ac0d18be9..c6d112f378 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/data/test3.qml
+++ b/tests/auto/declarative/qdeclarativefocusscope/data/test3.qml
@@ -13,7 +13,7 @@ Rectangle {
ListElement { name: "4" }
ListElement { name: "5" }
ListElement { name: "6" }
- ListElement { name: "6" }
+ ListElement { name: "7" }
ListElement { name: "8" }
ListElement { name: "9" }
}
diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test4.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test4.qml
index 8862b3947a..3c6d3bd701 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/data/test4.qml
+++ b/tests/auto/declarative/qdeclarativefocusscope/data/test4.qml
@@ -19,21 +19,21 @@ Rectangle {
color: "transparent"
border.width: 5
- border.color: myScope.wantsFocus?"blue":"black"
+ border.color: myScope.activeFocus?"blue":"black"
Rectangle {
id: item1; objectName: "item1"
x: 10; y: 10
width: 100; height: 100; color: "green"
border.width: 5
- border.color: wantsFocus?"blue":"black"
+ border.color: activeFocus?"blue":"black"
Keys.onDigit9Pressed: console.log("Error - Top Left");
KeyNavigation.right: item2
focus: true
Rectangle {
width: 50; height: 50; anchors.centerIn: parent
- color: parent.focus?"red":"transparent"
+ color: parent.activeFocus?"red":"transparent"
}
}
@@ -42,13 +42,13 @@ Rectangle {
x: 310; y: 10
width: 100; height: 100; color: "green"
border.width: 5
- border.color: wantsFocus?"blue":"black"
+ border.color: activeFocus?"blue":"black"
KeyNavigation.left: item1
Keys.onDigit9Pressed: console.log("Error - Top Right");
Rectangle {
width: 50; height: 50; anchors.centerIn: parent
- color: parent.focus?"red":"transparent"
+ color: parent.activeFocus?"red":"transparent"
}
}
}
@@ -62,14 +62,14 @@ Rectangle {
x: 10; y: 300
width: 100; height: 100; color: "green"
border.width: 5
- border.color: wantsFocus?"blue":"black"
+ border.color: activeFocus?"blue":"black"
Keys.onDigit9Pressed: console.log("Error - Bottom Left");
KeyNavigation.up: myScope
Rectangle {
width: 50; height: 50; anchors.centerIn: parent
- color: parent.focus?"red":"transparent"
+ color: parent.activeFocus?"red":"transparent"
}
}
diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test5.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test5.qml
index cdb5164850..4417d5f0fe 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/data/test5.qml
+++ b/tests/auto/declarative/qdeclarativefocusscope/data/test5.qml
@@ -20,13 +20,13 @@ Rectangle {
color: "transparent"
border.width: 5
- border.color: myScope.wantsFocus?"blue":"black"
+ border.color: myScope.activeFocus?"blue":"black"
Rectangle {
x: 10; y: 10
width: 100; height: 100; color: "green"
border.width: 5
- border.color: item1.wantsFocus?"blue":"black"
+ border.color: item1.activeFocus?"blue":"black"
}
TextEdit {
@@ -47,13 +47,13 @@ Rectangle {
x: 310; y: 10
width: 100; height: 100; color: "green"
border.width: 5
- border.color: wantsFocus?"blue":"black"
+ border.color: activeFocus?"blue":"black"
KeyNavigation.left: item1
Keys.onReturnPressed: console.log("Top Right");
Rectangle {
width: 50; height: 50; anchors.centerIn: parent
- color: parent.focus?"red":"transparent"
+ color: parent.activeFocus?"red":"transparent"
}
}
}
@@ -66,7 +66,7 @@ Rectangle {
x: 10; y: 300
width: 100; height: 100; color: "green"
border.width: 5
- border.color: item3.wantsFocus?"blue":"black"
+ border.color: item3.activeFocus?"blue":"black"
}
TextEdit {
diff --git a/tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp b/tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp
index 2559087717..b0c9c03b67 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp
+++ b/tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp
@@ -118,22 +118,22 @@ void tst_qdeclarativefocusscope::basic()
QVERIFY(view->hasFocus());
QVERIFY(view->scene()->hasFocus());
- QVERIFY(item0->wantsFocus() == true);
- QVERIFY(item1->hasFocus() == true);
- QVERIFY(item2->hasFocus() == false);
- QVERIFY(item3->hasFocus() == false);
+ QVERIFY(item0->hasActiveFocus() == true);
+ QVERIFY(item1->hasActiveFocus() == true);
+ QVERIFY(item2->hasActiveFocus() == false);
+ QVERIFY(item3->hasActiveFocus() == false);
QTest::keyClick(view, Qt::Key_Right);
- QVERIFY(item0->wantsFocus() == true);
- QVERIFY(item1->hasFocus() == false);
- QVERIFY(item2->hasFocus() == true);
- QVERIFY(item3->hasFocus() == false);
+ QVERIFY(item0->hasActiveFocus() == true);
+ QVERIFY(item1->hasActiveFocus() == false);
+ QVERIFY(item2->hasActiveFocus() == true);
+ QVERIFY(item3->hasActiveFocus() == false);
QTest::keyClick(view, Qt::Key_Down);
- QVERIFY(item0->wantsFocus() == false);
- QVERIFY(item1->hasFocus() == false);
- QVERIFY(item2->hasFocus() == false);
- QVERIFY(item3->hasFocus() == true);
+ QVERIFY(item0->hasActiveFocus() == false);
+ QVERIFY(item1->hasActiveFocus() == false);
+ QVERIFY(item2->hasActiveFocus() == false);
+ QVERIFY(item3->hasActiveFocus() == true);
delete view;
}
@@ -166,16 +166,11 @@ void tst_qdeclarativefocusscope::nested()
QVERIFY(view->hasFocus());
QVERIFY(view->scene()->hasFocus());
- QVERIFY(item1->wantsFocus() == true);
- QVERIFY(item1->hasFocus() == false);
- QVERIFY(item2->wantsFocus() == true);
- QVERIFY(item2->hasFocus() == false);
- QVERIFY(item3->wantsFocus() == true);
- QVERIFY(item3->hasFocus() == false);
- QVERIFY(item4->wantsFocus() == true);
- QVERIFY(item4->hasFocus() == false);
- QVERIFY(item5->wantsFocus() == true);
- QVERIFY(item5->hasFocus() == true);
+ QVERIFY(item1->hasActiveFocus() == true);
+ QVERIFY(item2->hasActiveFocus() == true);
+ QVERIFY(item3->hasActiveFocus() == true);
+ QVERIFY(item4->hasActiveFocus() == true);
+ QVERIFY(item5->hasActiveFocus() == true);
delete view;
}
@@ -204,22 +199,22 @@ void tst_qdeclarativefocusscope::noFocus()
QVERIFY(view->hasFocus());
QVERIFY(view->scene()->hasFocus());
- QVERIFY(item0->wantsFocus() == false);
- QVERIFY(item1->hasFocus() == false);
- QVERIFY(item2->hasFocus() == false);
- QVERIFY(item3->hasFocus() == false);
+ QVERIFY(item0->hasActiveFocus() == false);
+ QVERIFY(item1->hasActiveFocus() == false);
+ QVERIFY(item2->hasActiveFocus() == false);
+ QVERIFY(item3->hasActiveFocus() == false);
QTest::keyClick(view, Qt::Key_Right);
- QVERIFY(item0->wantsFocus() == false);
- QVERIFY(item1->hasFocus() == false);
- QVERIFY(item2->hasFocus() == false);
- QVERIFY(item3->hasFocus() == false);
+ QVERIFY(item0->hasActiveFocus() == false);
+ QVERIFY(item1->hasActiveFocus() == false);
+ QVERIFY(item2->hasActiveFocus() == false);
+ QVERIFY(item3->hasActiveFocus() == false);
QTest::keyClick(view, Qt::Key_Down);
- QVERIFY(item0->wantsFocus() == false);
- QVERIFY(item1->hasFocus() == false);
- QVERIFY(item2->hasFocus() == false);
- QVERIFY(item3->hasFocus() == false);
+ QVERIFY(item0->hasActiveFocus() == false);
+ QVERIFY(item1->hasActiveFocus() == false);
+ QVERIFY(item2->hasActiveFocus() == false);
+ QVERIFY(item3->hasActiveFocus() == false);
delete view;
}
@@ -249,32 +244,32 @@ void tst_qdeclarativefocusscope::textEdit()
QVERIFY(view->hasFocus());
QVERIFY(view->scene()->hasFocus());
- QVERIFY(item0->wantsFocus() == true);
- QVERIFY(item1->hasFocus() == true);
- QVERIFY(item2->hasFocus() == false);
- QVERIFY(item3->hasFocus() == false);
+ QVERIFY(item0->hasActiveFocus() == true);
+ QVERIFY(item1->hasActiveFocus() == true);
+ QVERIFY(item2->hasActiveFocus() == false);
+ QVERIFY(item3->hasActiveFocus() == false);
QTest::keyClick(view, Qt::Key_Right);
- QVERIFY(item0->wantsFocus() == true);
- QVERIFY(item1->hasFocus() == true);
- QVERIFY(item2->hasFocus() == false);
- QVERIFY(item3->hasFocus() == false);
+ QVERIFY(item0->hasActiveFocus() == true);
+ QVERIFY(item1->hasActiveFocus() == true);
+ QVERIFY(item2->hasActiveFocus() == false);
+ QVERIFY(item3->hasActiveFocus() == false);
QTest::keyClick(view, Qt::Key_Right);
QTest::keyClick(view, Qt::Key_Right);
QTest::keyClick(view, Qt::Key_Right);
QTest::keyClick(view, Qt::Key_Right);
QTest::keyClick(view, Qt::Key_Right);
- QVERIFY(item0->wantsFocus() == true);
- QVERIFY(item1->hasFocus() == false);
- QVERIFY(item2->hasFocus() == true);
- QVERIFY(item3->hasFocus() == false);
+ QVERIFY(item0->hasActiveFocus() == true);
+ QVERIFY(item1->hasActiveFocus() == false);
+ QVERIFY(item2->hasActiveFocus() == true);
+ QVERIFY(item3->hasActiveFocus() == false);
QTest::keyClick(view, Qt::Key_Down);
- QVERIFY(item0->wantsFocus() == false);
- QVERIFY(item1->hasFocus() == false);
- QVERIFY(item2->hasFocus() == false);
- QVERIFY(item3->hasFocus() == true);
+ QVERIFY(item0->hasActiveFocus() == false);
+ QVERIFY(item1->hasActiveFocus() == false);
+ QVERIFY(item2->hasActiveFocus() == false);
+ QVERIFY(item3->hasActiveFocus() == true);
delete view;
}
@@ -308,28 +303,28 @@ void tst_qdeclarativefocusscope::forceFocus()
QVERIFY(view->hasFocus());
QVERIFY(view->scene()->hasFocus());
- QVERIFY(item0->wantsFocus() == true);
- QVERIFY(item1->hasFocus() == true);
- QVERIFY(item2->hasFocus() == false);
- QVERIFY(item3->wantsFocus() == false);
- QVERIFY(item4->hasFocus() == false);
- QVERIFY(item5->hasFocus() == false);
+ QVERIFY(item0->hasActiveFocus() == true);
+ QVERIFY(item1->hasActiveFocus() == true);
+ QVERIFY(item2->hasActiveFocus() == false);
+ QVERIFY(item3->hasActiveFocus() == false);
+ QVERIFY(item4->hasActiveFocus() == false);
+ QVERIFY(item5->hasActiveFocus() == false);
QTest::keyClick(view, Qt::Key_4);
- QVERIFY(item0->wantsFocus() == true);
- QVERIFY(item1->hasFocus() == true);
- QVERIFY(item2->hasFocus() == false);
- QVERIFY(item3->wantsFocus() == false);
- QVERIFY(item4->hasFocus() == false);
- QVERIFY(item5->hasFocus() == false);
+ QVERIFY(item0->hasActiveFocus() == true);
+ QVERIFY(item1->hasActiveFocus() == true);
+ QVERIFY(item2->hasActiveFocus() == false);
+ QVERIFY(item3->hasActiveFocus() == false);
+ QVERIFY(item4->hasActiveFocus() == false);
+ QVERIFY(item5->hasActiveFocus() == false);
QTest::keyClick(view, Qt::Key_5);
- QVERIFY(item0->wantsFocus() == false);
- QVERIFY(item1->hasFocus() == false);
- QVERIFY(item2->hasFocus() == false);
- QVERIFY(item3->wantsFocus() == true);
- QVERIFY(item4->hasFocus() == false);
- QVERIFY(item5->hasFocus() == true);
+ QVERIFY(item0->hasActiveFocus() == false);
+ QVERIFY(item1->hasActiveFocus() == false);
+ QVERIFY(item2->hasActiveFocus() == false);
+ QVERIFY(item3->hasActiveFocus() == true);
+ QVERIFY(item4->hasActiveFocus() == false);
+ QVERIFY(item5->hasActiveFocus() == true);
delete view;
}
diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
index 38fd458d1b..b8d282845d 100644
--- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
+++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
@@ -136,6 +136,7 @@ void tst_qdeclarativeimage::imageSource_data()
QTest::newRow("local async not found") << QUrl::fromLocalFile(SRCDIR "/data/no-such-file-1.png").toString() << 0.0 << 0.0 << false
<< true << "file::2:1: QML Image: Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file-1.png").toString();
QTest::newRow("remote") << SERVER_ADDR "/colors.png" << 120.0 << 120.0 << true << false << "";
+ QTest::newRow("remote redirected") << SERVER_ADDR "/oldcolors.png" << 120.0 << 120.0 << true << false << "";
QTest::newRow("remote svg") << SERVER_ADDR "/heart.svg" << 550.0 << 500.0 << true << false << "";
QTest::newRow("remote not found") << SERVER_ADDR "/no-such-file.png" << 0.0 << 0.0 << true
<< false << "file::2:1: QML Image: Error downloading " SERVER_ADDR "/no-such-file.png - server replied: Not found";
@@ -155,6 +156,7 @@ void tst_qdeclarativeimage::imageSource()
if (remote) {
QVERIFY(server.isValid());
server.serveDirectory(SRCDIR "/data");
+ server.addRedirect("oldcolors.png", SERVER_ADDR "/colors.png");
}
if (!error.isEmpty())
diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
index ffb2105429..d76d360cbc 100644
--- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
+++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
@@ -371,7 +371,7 @@ void tst_QDeclarativeItem::keyNavigation()
QDeclarativeItem *item = findItem<QDeclarativeItem>(canvas->rootObject(), "item1");
QVERIFY(item);
- QVERIFY(item->hasFocus());
+ QVERIFY(item->hasActiveFocus());
// right
QKeyEvent key(QEvent::KeyPress, Qt::Key_Right, Qt::NoModifier, "", false, 1);
@@ -380,7 +380,7 @@ void tst_QDeclarativeItem::keyNavigation()
item = findItem<QDeclarativeItem>(canvas->rootObject(), "item2");
QVERIFY(item);
- QVERIFY(item->hasFocus());
+ QVERIFY(item->hasActiveFocus());
// down
key = QKeyEvent(QEvent::KeyPress, Qt::Key_Down, Qt::NoModifier, "", false, 1);
@@ -389,7 +389,7 @@ void tst_QDeclarativeItem::keyNavigation()
item = findItem<QDeclarativeItem>(canvas->rootObject(), "item4");
QVERIFY(item);
- QVERIFY(item->hasFocus());
+ QVERIFY(item->hasActiveFocus());
// left
key = QKeyEvent(QEvent::KeyPress, Qt::Key_Left, Qt::NoModifier, "", false, 1);
@@ -398,7 +398,7 @@ void tst_QDeclarativeItem::keyNavigation()
item = findItem<QDeclarativeItem>(canvas->rootObject(), "item3");
QVERIFY(item);
- QVERIFY(item->hasFocus());
+ QVERIFY(item->hasActiveFocus());
// up
key = QKeyEvent(QEvent::KeyPress, Qt::Key_Up, Qt::NoModifier, "", false, 1);
@@ -407,7 +407,7 @@ void tst_QDeclarativeItem::keyNavigation()
item = findItem<QDeclarativeItem>(canvas->rootObject(), "item1");
QVERIFY(item);
- QVERIFY(item->hasFocus());
+ QVERIFY(item->hasActiveFocus());
// tab
key = QKeyEvent(QEvent::KeyPress, Qt::Key_Tab, Qt::NoModifier, "", false, 1);
@@ -416,7 +416,7 @@ void tst_QDeclarativeItem::keyNavigation()
item = findItem<QDeclarativeItem>(canvas->rootObject(), "item2");
QVERIFY(item);
- QVERIFY(item->hasFocus());
+ QVERIFY(item->hasActiveFocus());
// backtab
key = QKeyEvent(QEvent::KeyPress, Qt::Key_Backtab, Qt::NoModifier, "", false, 1);
@@ -425,7 +425,7 @@ void tst_QDeclarativeItem::keyNavigation()
item = findItem<QDeclarativeItem>(canvas->rootObject(), "item1");
QVERIFY(item);
- QVERIFY(item->hasFocus());
+ QVERIFY(item->hasActiveFocus());
delete canvas;
}
@@ -618,21 +618,21 @@ void tst_QDeclarativeItem::mouseFocus()
QDeclarativeItem *item = findItem<QDeclarativeItem>(canvas->rootObject(), "declarativeItem");
QVERIFY(item);
- QSignalSpy focusSpy(item, SIGNAL(focusChanged(bool)));
+ QSignalSpy focusSpy(item, SIGNAL(activeFocusChanged(bool)));
QTest::mouseClick(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(item->scenePos()));
QApplication::processEvents();
QCOMPARE(focusSpy.count(), 1);
- QVERIFY(item->hasFocus());
+ QVERIFY(item->hasActiveFocus());
// make sure focusable graphics widget underneath does not steal focus
QTest::mouseClick(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(item->scenePos()));
QApplication::processEvents();
QCOMPARE(focusSpy.count(), 1);
- QVERIFY(item->hasFocus());
+ QVERIFY(item->hasActiveFocus());
item->setFocus(false);
- QVERIFY(!item->hasFocus());
+ QVERIFY(!item->hasActiveFocus());
QCOMPARE(focusSpy.count(), 2);
item->setFocus(true);
QCOMPARE(focusSpy.count(), 3);
@@ -664,7 +664,8 @@ void tst_QDeclarativeItem::propertyChanges()
QSignalSpy baselineOffsetSpy(item, SIGNAL(baselineOffsetChanged(qreal)));
QSignalSpy childrenRectSpy(parentItem, SIGNAL(childrenRectChanged(QRectF)));
QSignalSpy focusSpy(item, SIGNAL(focusChanged(bool)));
- QSignalSpy wantsFocusSpy(parentItem, SIGNAL(wantsFocusChanged(bool)));
+ QSignalSpy wantsFocusSpy(parentItem, SIGNAL(activeFocusChanged(bool)));
+ QSignalSpy childrenChangedSpy(parentItem, SIGNAL(childrenChanged()));
item->setParentItem(parentItem);
item->setWidth(100.0);
@@ -677,6 +678,10 @@ void tst_QDeclarativeItem::propertyChanges()
QList<QVariant> parentArguments = parentSpy.first();
QVERIFY(parentArguments.count() == 1);
QCOMPARE(item->parentItem(), qvariant_cast<QDeclarativeItem *>(parentArguments.at(0)));
+ QCOMPARE(childrenChangedSpy.count(),1);
+
+ item->setParentItem(parentItem);
+ QCOMPARE(childrenChangedSpy.count(),1);
QCOMPARE(item->width(), 100.0);
QCOMPARE(widthSpy.count(),1);
@@ -696,14 +701,14 @@ void tst_QDeclarativeItem::propertyChanges()
QVERIFY(childrenRectArguments.count() == 1);
QCOMPARE(parentItem->childrenRect(), childrenRectArguments.at(0).toRectF());
- QCOMPARE(item->hasFocus(), true);
+ QCOMPARE(item->hasActiveFocus(), true);
QCOMPARE(focusSpy.count(),1);
QList<QVariant> focusArguments = focusSpy.first();
QVERIFY(focusArguments.count() == 1);
QCOMPARE(focusArguments.at(0).toBool(), true);
+ QCOMPARE(parentItem->hasActiveFocus(), false);
QCOMPARE(parentItem->hasFocus(), false);
- QCOMPARE(parentItem->wantsFocus(), false);
QCOMPARE(wantsFocusSpy.count(),0);
delete canvas;
diff --git a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
index 5a10372c81..c9bb467fe0 100644
--- a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
+++ b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
@@ -137,6 +137,17 @@ void tst_QDeclarativeMouseArea::dragProperties()
QCOMPARE(yminSpy.count(),1);
QCOMPARE(ymaxSpy.count(),1);
+ // filterChildren
+ QSignalSpy filterChildrenSpy(drag, SIGNAL(filterChildrenChanged()));
+
+ drag->setFilterChildren(true);
+
+ QVERIFY(drag->filterChildren());
+ QCOMPARE(filterChildrenSpy.count(), 1);
+
+ drag->setFilterChildren(true);
+ QCOMPARE(filterChildrenSpy.count(), 1);
+
delete canvas;
}
diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview0.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview0.qml
index 895620524d..ff6f224f79 100644
--- a/tests/auto/declarative/qdeclarativepathview/data/pathview0.qml
+++ b/tests/auto/declarative/qdeclarativepathview/data/pathview0.qml
@@ -6,6 +6,7 @@ Rectangle {
property int currentB: -1
property real delegateWidth: 60
property real delegateHeight: 20
+ property real delegateScale: 1.0
width: 240
height: 320
color: "#ffffff"
@@ -17,6 +18,7 @@ Rectangle {
objectName: "wrapper"
height: root.delegateHeight
width: root.delegateWidth
+ scale: root.delegateScale
color: PathView.isCurrentItem ? "lightsteelblue" : "white"
border.color: "black"
Text {
diff --git a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
index bf1e13a8e8..fdbb16d9c4 100644
--- a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
+++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
@@ -451,11 +451,19 @@ void tst_QDeclarativePathView::pathMoved()
QCOMPARE(firstItem->pos() + offset, start);
// Change delegate size
+ pathview->setOffset(0.1);
+ pathview->setOffset(0.0);
canvas->rootObject()->setProperty("delegateWidth", 30);
QCOMPARE(firstItem->width(), 30.0);
offset.setX(firstItem->width()/2);
QTRY_COMPARE(firstItem->pos() + offset, start);
+ // Change delegate scale
+ pathview->setOffset(0.1);
+ pathview->setOffset(0.0);
+ canvas->rootObject()->setProperty("delegateScale", 1.2);
+ QTRY_COMPARE(firstItem->pos() + offset, start);
+
delete canvas;
}
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/data/massive.png b/tests/auto/declarative/qdeclarativepixmapcache/data/massive.png
new file mode 100644
index 0000000000..bc6cc9e6ca
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepixmapcache/data/massive.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp b/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
index 0c7780ce97..16d206345e 100644
--- a/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
+++ b/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
@@ -70,6 +70,7 @@ private slots:
void single_data();
void parallel();
void parallel_data();
+ void massive();
private:
QDeclarativeEngine engine;
@@ -276,6 +277,45 @@ void tst_qdeclarativepixmapcache::parallel()
qDeleteAll(pixmaps);
}
+void tst_qdeclarativepixmapcache::massive()
+{
+ QUrl url = thisfile.resolved(QUrl("data/massive.png"));
+
+ // Confirm that massive images remain in the cache while they are
+ // in use by the application.
+ {
+ qint64 cachekey = 0;
+ QDeclarativePixmap p(0, url);
+ QVERIFY(p.isReady());
+ QVERIFY(p.pixmap().size() == QSize(10000, 1000));
+ cachekey = p.pixmap().cacheKey();
+
+ QDeclarativePixmap p2(0, url);
+ QVERIFY(p2.isReady());
+ QVERIFY(p2.pixmap().size() == QSize(10000, 1000));
+
+ QVERIFY(p2.pixmap().cacheKey() == cachekey);
+ }
+
+ // Confirm that massive images are removed from the cache when
+ // they become unused
+ {
+ qint64 cachekey = 0;
+ {
+ QDeclarativePixmap p(0, url);
+ QVERIFY(p.isReady());
+ QVERIFY(p.pixmap().size() == QSize(10000, 1000));
+ cachekey = p.pixmap().cacheKey();
+ }
+
+ QDeclarativePixmap p2(0, url);
+ QVERIFY(p2.isReady());
+ QVERIFY(p2.pixmap().size() == QSize(10000, 1000));
+
+ QVERIFY(p2.pixmap().cacheKey() != cachekey);
+ }
+}
+
QTEST_MAIN(tst_qdeclarativepixmapcache)
#include "tst_qdeclarativepixmapcache.moc"
diff --git a/tests/auto/declarative/qdeclarativerepeater/data/itemlist.qml b/tests/auto/declarative/qdeclarativerepeater/data/itemlist.qml
index e8dd8cce18..481073680a 100644
--- a/tests/auto/declarative/qdeclarativerepeater/data/itemlist.qml
+++ b/tests/auto/declarative/qdeclarativerepeater/data/itemlist.qml
@@ -4,21 +4,27 @@
import Qt 4.7
Rectangle {
+ id: root
color: "lightgray"
width: 240
height: 320
+ property variant itemModel: itemModel1
function checkProperties() {
testObject.error = false;
- if (testObject.useModel && view.model != itemModel) {
+ if (testObject.useModel && view.model != root.itemModel) {
console.log("model property incorrect");
testObject.error = true;
}
}
+ function switchModel() {
+ root.itemModel = itemModel2
+ }
+
VisualItemModel {
- id: itemModel
- objectName: "itemModel"
+ id: itemModel1
+ objectName: "itemModel1"
Rectangle {
objectName: "item1"
height: 50; width: 100; color: "#FFFEF0"
@@ -36,12 +42,27 @@ Rectangle {
}
}
+ VisualItemModel {
+ id: itemModel2
+ objectName: "itemModel2"
+ Rectangle {
+ objectName: "item4"
+ height: 50; width: 100; color: "#FFFEF0"
+ Text { objectName: "text4"; text: "index: " + parent.VisualItemModel.index; font.bold: true; anchors.centerIn: parent }
+ }
+ Rectangle {
+ objectName: "item5"
+ height: 50; width: 100; color: "#F0FFF7"
+ Text { objectName: "text5"; text: "index: " + parent.VisualItemModel.index; font.bold: true; anchors.centerIn: parent }
+ }
+ }
+
Column {
objectName: "container"
Repeater {
id: view
objectName: "repeater"
- model: testObject.useModel ? itemModel : 0
+ model: testObject.useModel ? root.itemModel : 0
}
}
}
diff --git a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
index 7299a43565..623b3d7f41 100644
--- a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
+++ b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
@@ -361,6 +361,15 @@ void tst_QDeclarativeRepeater::itemModel()
QVERIFY(qobject_cast<QObject*>(container->childItems().at(2))->objectName() == "item3");
QVERIFY(container->childItems().at(3) == repeater);
+ QMetaObject::invokeMethod(canvas->rootObject(), "switchModel");
+ QCOMPARE(container->childItems().count(), 3);
+ QVERIFY(qobject_cast<QObject*>(container->childItems().at(0))->objectName() == "item4");
+ QVERIFY(qobject_cast<QObject*>(container->childItems().at(1))->objectName() == "item5");
+ QVERIFY(container->childItems().at(2) == repeater);
+
+ testObject->setUseModel(false);
+ QCOMPARE(container->childItems().count(), 1);
+
delete testObject;
delete canvas;
}
diff --git a/tests/auto/declarative/qdeclarativescriptdebugging/data/backtrace1.js b/tests/auto/declarative/qdeclarativescriptdebugging/data/backtrace1.js
new file mode 100644
index 0000000000..8decbf03a4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativescriptdebugging/data/backtrace1.js
@@ -0,0 +1,11 @@
+
+function function2InScript(a)
+{
+ mainRectangle.foo = a;
+}
+
+
+function functionInScript(a , b)
+{
+ function2InScript(a + b);
+}
diff --git a/tests/auto/declarative/qdeclarativescriptdebugging/data/backtrace1.qml b/tests/auto/declarative/qdeclarativescriptdebugging/data/backtrace1.qml
new file mode 100644
index 0000000000..ad627ef1af
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativescriptdebugging/data/backtrace1.qml
@@ -0,0 +1,27 @@
+import Qt 4.7
+import Qt.test 1.0
+import "backtrace1.js" as Script
+
+Rectangle {
+ id: mainRectangle
+
+ property string foo: "Default";
+ width: 200
+ height: 200
+
+
+ MyTestObject {
+
+ function append(a, b) {
+ return a + " " + b;
+ }
+
+
+ id: testObject;
+ someProperty: append("Hello", mainRectangle.foo)
+
+ onSignaled: {
+ Script.functionInScript(value , "b");
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro b/tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro
new file mode 100644
index 0000000000..c2d30a0c11
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro
@@ -0,0 +1,20 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative script
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativescriptdebugging.cpp
+INCLUDEPATH += ../shared
+
+# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
+# LIBS += -lgcov
+
+symbian: {
+ importFiles.sources = data
+ importFiles.path = .
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
+
+CONFIG += parallel_test
+
diff --git a/tests/auto/declarative/qdeclarativescriptdebugging/tst_qdeclarativescriptdebugging.cpp b/tests/auto/declarative/qdeclarativescriptdebugging/tst_qdeclarativescriptdebugging.cpp
new file mode 100644
index 0000000000..b0743c0083
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativescriptdebugging/tst_qdeclarativescriptdebugging.cpp
@@ -0,0 +1,154 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativeitem.h>
+#include <QtDeclarative/qdeclarativecontext.h>
+#include <QtCore/QDir>
+#include <QtScript/QScriptEngineAgent>
+#include <private/qdeclarativeengine_p.h>
+
+class MyTestObject : public QObject {
+ Q_OBJECT
+ Q_PROPERTY(QString someProperty READ someProperty WRITE setSomeProperty NOTIFY somePropertyChanged)
+
+public:
+ QString someProperty() { return _someProperty; }
+ void setSomeProperty(const QString &p) { _someProperty = p; }
+ QString _someProperty;
+
+ void emitSignal(const QString &value) { emit signaled(value); }
+
+signals:
+ void signaled(const QString &value);
+ void somePropertyChanged();
+};
+
+
+class BtAgent : public QScriptEngineAgent {
+public:
+ BtAgent(QScriptEngine *engine) : QScriptEngineAgent(engine)
+ { count = 0; engine->setAgent(this); }
+
+ QStringList bt;
+ int count;
+ int breakpoint;
+ void positionChange(qint64 , int lineNumber, int )
+ {
+ if(lineNumber == breakpoint) {
+ count++;
+ bt = engine()->currentContext()->backtrace();
+ }
+ }
+};
+
+
+
+/*
+This test covers evaluation of ECMAScript expressions and bindings from within
+QML. This does not include static QML language issues.
+
+Static QML language issues are covered in qmllanguage
+*/
+inline QUrl TEST_FILE(const QString &filename)
+{
+ QFileInfo fileInfo(__FILE__);
+ return QUrl::fromLocalFile(fileInfo.absoluteDir().filePath("data/" + filename));
+}
+
+inline QUrl TEST_FILE(const char *filename)
+{
+ return TEST_FILE(QLatin1String(filename));
+}
+
+class tst_qdeclarativescriptdebugging : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativescriptdebugging() {}
+
+private slots:
+ void initTestCase();
+ void backtrace1();
+};
+
+void tst_qdeclarativescriptdebugging::initTestCase()
+{
+ qmlRegisterType<MyTestObject>("Qt.test", 1,0, "MyTestObject");
+}
+
+void tst_qdeclarativescriptdebugging::backtrace1()
+{
+ {
+ QDeclarativeEngine engine;
+ QUrl file = TEST_FILE("backtrace1.qml");
+ QDeclarativeComponent component(&engine, file);
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(component.create());
+ QVERIFY(item);
+ MyTestObject *obj = item->findChild<MyTestObject *>();
+ QVERIFY(obj);
+ QCOMPARE(obj->someProperty(), QString("Hello Default"));
+
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(&engine);
+ BtAgent agent(&ep->scriptEngine);
+ agent.breakpoint = 16;
+
+ obj->emitSignal("blah");
+ QCOMPARE(obj->someProperty(), QString("Hello blahb"));
+ QCOMPARE(agent.count, 1);
+
+ QStringList expected;
+ expected << "append(a = 'Hello', b = 'blahb') at @PREFIX@/backtrace1.qml:16"
+ << "$someProperty() at @PREFIX@/backtrace1.qml:21"
+ << "function2InScript(a = 'blahb') at @PREFIX@/backtrace1.js:4"
+ << "functionInScript(a = 'blah', b = 'b') at @PREFIX@/backtrace1.js:10"
+ << "onSignaled() at @PREFIX@/backtrace1.qml:24"
+ << "<global>() at -1";
+ expected.replaceInStrings("@PREFIX@", file.toString().section('/', 0, -2));
+ QCOMPARE(agent.bt, expected);
+ }
+}
+
+
+QTEST_MAIN(tst_qdeclarativescriptdebugging)
+
+#include "tst_qdeclarativescriptdebugging.moc"
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug.qml b/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug.qml
new file mode 100644
index 0000000000..e6b602013e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug.qml
@@ -0,0 +1,37 @@
+import Qt 4.7
+Rectangle {
+ id: container
+ color: "red"
+ height: 200
+ width: 200
+ Column {
+ id: column
+ objectName: "column"
+ anchors.left: container.right
+ anchors.bottom: container.bottom
+
+ Rectangle {
+ id: rectangle
+ color: "blue"
+ height: 100
+ width: 200
+ }
+ Rectangle {
+ color: "blue"
+ height: 100
+ width: 200
+ }
+ }
+ states: State {
+ name: "reanchored"
+ AnchorChanges {
+ target: column
+ anchors.left: undefined
+ anchors.right: container.right
+ }
+ PropertyChanges {
+ target: rectangle
+ opacity: 0
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/auto/declarative/qdeclarativestates/data/extendsBug.qml b/tests/auto/declarative/qdeclarativestates/data/extendsBug.qml
new file mode 100644
index 0000000000..a3c4827828
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/extendsBug.qml
@@ -0,0 +1,26 @@
+import Qt 4.7
+
+Rectangle {
+ width: 200
+ height: 200
+
+ Rectangle {
+ id: rect
+ objectName: "greenRect"
+ width: 100
+ height: 100
+ color: "green"
+ }
+
+ states:[
+ State {
+ name: "a"
+ PropertyChanges { target: rect; x: 100 }
+ },
+ State {
+ name: "b"
+ extend:"a"
+ PropertyChanges { target: rect; y: 100 }
+ }
+ ]
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml b/tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml
index 807eec9f5a..8f9a7f2d35 100644
--- a/tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml
@@ -5,6 +5,6 @@ Rectangle {
color: "red"
states: State {
name: "blue"
- PropertyChanges { target: myRectangle; colr: "blue"; wantsFocus: true }
+ PropertyChanges { target: myRectangle; colr: "blue"; activeFocus: true }
}
}
diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
index 639b2f38c3..6ae27592b4 100644
--- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
+++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
@@ -121,6 +121,7 @@ private slots:
void anchorChanges4();
void anchorChanges5();
void anchorChangesCrash();
+ void anchorRewindBug();
void script();
void restoreEntryValues();
void explicitChanges();
@@ -138,6 +139,7 @@ private slots:
void urlResolution();
void unnamedWhen();
void returnToBase();
+ void extendsBug();
};
void tst_qdeclarativestates::initTestCase()
@@ -807,6 +809,40 @@ void tst_qdeclarativestates::anchorChangesCrash()
delete rect;
}
+// QTBUG-12273
+void tst_qdeclarativestates::anchorRewindBug()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorRewindBug.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QDeclarativeItem * column = rect->findChild<QDeclarativeItem*>("column");
+
+ QVERIFY(column != 0);
+ QVERIFY(!QDeclarativeItemPrivate::get(column)->heightValid);
+ QVERIFY(!QDeclarativeItemPrivate::get(column)->widthValid);
+ QCOMPARE(column->height(), 200.0);
+ QDeclarativeItemPrivate::get(rect)->setState("reanchored");
+
+ // column height and width should stay implicit
+ // and column's implicit resizing should still work
+ QVERIFY(!QDeclarativeItemPrivate::get(column)->heightValid);
+ QVERIFY(!QDeclarativeItemPrivate::get(column)->widthValid);
+ QCOMPARE(column->height(), 100.0);
+
+ QDeclarativeItemPrivate::get(rect)->setState("");
+
+ // column height and width should stay implicit
+ // and column's implicit resizing should still work
+ QVERIFY(!QDeclarativeItemPrivate::get(column)->heightValid);
+ QVERIFY(!QDeclarativeItemPrivate::get(column)->widthValid);
+ QCOMPARE(column->height(), 200.0);
+
+ delete rect;
+}
+
void tst_qdeclarativestates::script()
{
QDeclarativeEngine engine;
@@ -887,7 +923,7 @@ void tst_qdeclarativestates::propertyErrors()
QCOMPARE(rect->color(),QColor("red"));
QTest::ignoreMessage(QtWarningMsg, fullDataPath("/data/propertyErrors.qml") + ":8:9: QML PropertyChanges: Cannot assign to non-existent property \"colr\"");
- QTest::ignoreMessage(QtWarningMsg, fullDataPath("/data/propertyErrors.qml") + ":8:9: QML PropertyChanges: Cannot assign to read-only property \"wantsFocus\"");
+ QTest::ignoreMessage(QtWarningMsg, fullDataPath("/data/propertyErrors.qml") + ":8:9: QML PropertyChanges: Cannot assign to read-only property \"activeFocus\"");
QDeclarativeItemPrivate::get(rect)->setState("blue");
}
@@ -1151,6 +1187,21 @@ void tst_qdeclarativestates::returnToBase()
QCOMPARE(rect->property("stateString").toString(), QLatin1String("originalState"));
}
+//QTBUG-12559
+void tst_qdeclarativestates::extendsBug()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent c(&engine, SRCDIR "/data/extendsBug.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect != 0);
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ QDeclarativeRectangle *greenRect = rect->findChild<QDeclarativeRectangle*>("greenRect");
+
+ rectPrivate->setState("b");
+ QCOMPARE(greenRect->x(), qreal(100));
+ QCOMPARE(greenRect->y(), qreal(100));
+}
QTEST_MAIN(tst_qdeclarativestates)
diff --git a/tests/auto/declarative/qdeclarativetext/data/rotated.qml b/tests/auto/declarative/qdeclarativetext/data/rotated.qml
new file mode 100644
index 0000000000..01eec44cfb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetext/data/rotated.qml
@@ -0,0 +1,18 @@
+import Qt 4.7
+
+Rectangle {
+ width : 200
+ height : 100
+
+ Text {
+ objectName: "text"
+ x: 20
+ y: 20
+ height : 20
+ width : 80
+ text : "Something"
+ rotation : 30
+ transformOrigin : Item.TopLeft
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
index 80198eb576..658f381fb4 100644
--- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
+++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
@@ -97,6 +97,8 @@ private slots:
void clickLink();
+ void QTBUG_12291();
+
private:
QStringList standard;
QStringList richText;
@@ -246,6 +248,7 @@ void tst_qdeclarativetext::width()
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
QVERIFY(textObject != 0);
+ QVERIFY(textObject->boundingRect().width() > 0);
QCOMPARE(textObject->width(), qreal(metricWidth));
QVERIFY(textObject->textFormat() == QDeclarativeText::AutoText); // setting text doesn't change format
}
@@ -847,22 +850,22 @@ void tst_qdeclarativetext::letterSpacing()
QCOMPARE(textObject->font().letterSpacing(), 0.0);
}
{
- QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.letterSpacing: -50 }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.letterSpacing: -2 }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
QVERIFY(textObject != 0);
- QCOMPARE(textObject->font().letterSpacing(), -50.);
+ QCOMPARE(textObject->font().letterSpacing(), -2.);
}
{
- QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.letterSpacing: 200 }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.letterSpacing: 3 }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
QVERIFY(textObject != 0);
- QCOMPARE(textObject->font().letterSpacing(), 200.);
+ QCOMPARE(textObject->font().letterSpacing(), 3.);
}
}
@@ -897,6 +900,23 @@ void tst_qdeclarativetext::wordSpacing()
}
}
+void tst_qdeclarativetext::QTBUG_12291()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/rotated.qml");
+
+ canvas->show();
+ QApplication::setActiveWindow(canvas);
+ QTest::qWaitForWindowShown(canvas);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(canvas));
+
+ QObject *ob = canvas->rootObject();
+ QVERIFY(ob != 0);
+
+ QDeclarativeText *text = ob->findChild<QDeclarativeText*>("text");
+ QVERIFY(text);
+ QVERIFY(text->boundingRect().isValid());
+}
+
class EventSender : public QGraphicsItem
{
public:
diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
index 4783bc7b9e..57a5e29156 100644
--- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
+++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
@@ -115,6 +115,7 @@ private slots:
void navigation();
void readOnly();
void copyAndPaste();
+ void textInput();
void openInputPanelOnClick();
void openInputPanelOnFocus();
void geometrySignals();
@@ -604,7 +605,7 @@ void tst_qdeclarativetextedit::persistentSelection()
void tst_qdeclarativetextedit::focusOnPress()
{
{
- QString componentStr = "import Qt 4.7\nTextEdit { focusOnPress: true; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { activeFocusOnPress: true; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -613,7 +614,7 @@ void tst_qdeclarativetextedit::focusOnPress()
}
{
- QString componentStr = "import Qt 4.7\nTextEdit { focusOnPress: false; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { activeFocusOnPress: false; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -840,15 +841,15 @@ void tst_qdeclarativetextedit::navigation()
QDeclarativeItem *input = qobject_cast<QDeclarativeItem *>(qvariant_cast<QObject *>(canvas->rootObject()->property("myInput")));
QVERIFY(input != 0);
- QTRY_VERIFY(input->hasFocus() == true);
+ QTRY_VERIFY(input->hasActiveFocus() == true);
simulateKey(canvas, Qt::Key_Left);
- QVERIFY(input->hasFocus() == false);
+ QVERIFY(input->hasActiveFocus() == false);
simulateKey(canvas, Qt::Key_Right);
- QVERIFY(input->hasFocus() == true);
+ QVERIFY(input->hasActiveFocus() == true);
simulateKey(canvas, Qt::Key_Right);
- QVERIFY(input->hasFocus() == false);
+ QVERIFY(input->hasActiveFocus() == false);
simulateKey(canvas, Qt::Key_Left);
- QVERIFY(input->hasFocus() == true);
+ QVERIFY(input->hasActiveFocus() == true);
}
void tst_qdeclarativetextedit::copyAndPaste() {
@@ -882,6 +883,12 @@ void tst_qdeclarativetextedit::copyAndPaste() {
QCOMPARE(textEdit->text(), QString("Hello world!Hello world!"));
QCOMPARE(textEdit->text().length(), 24);
+ // QTBUG-12339
+ // test that document and internal text attribute are in sync
+ QDeclarativeItemPrivate* pri = QDeclarativeItemPrivate::get(textEdit);
+ QDeclarativeTextEditPrivate *editPrivate = static_cast<QDeclarativeTextEditPrivate*>(pri);
+ QCOMPARE(textEdit->text(), editPrivate->text);
+
// select word
textEdit->setCursorPosition(0);
textEdit->selectWord();
@@ -908,7 +915,7 @@ void tst_qdeclarativetextedit::readOnly()
QDeclarativeTextEdit *edit = qobject_cast<QDeclarativeTextEdit *>(qvariant_cast<QObject *>(canvas->rootObject()->property("myInput")));
QVERIFY(edit != 0);
- QTRY_VERIFY(edit->hasFocus() == true);
+ QTRY_VERIFY(edit->hasActiveFocus() == true);
QVERIFY(edit->isReadOnly() == true);
QString initial = edit->text();
for(int k=Qt::Key_0; k<=Qt::Key_Z; k++)
@@ -961,6 +968,33 @@ public:
bool closeInputPanelReceived;
};
+void tst_qdeclarativetextedit::textInput()
+{
+ QGraphicsScene scene;
+ QGraphicsView view(&scene);
+ QDeclarativeTextEdit edit;
+ QDeclarativeItemPrivate* pri = QDeclarativeItemPrivate::get(&edit);
+ QDeclarativeTextEditPrivate *editPrivate = static_cast<QDeclarativeTextEditPrivate*>(pri);
+ edit.setPos(0, 0);
+ scene.addItem(&edit);
+ view.show();
+ QApplication::setActiveWindow(&view);
+ QTest::qWaitForWindowShown(&view);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&view));
+ edit.setFocus(true);
+ QVERIFY(edit.hasActiveFocus() == true);
+
+ // test that input method event is committed
+ QInputMethodEvent event;
+ event.setCommitString( "Hello world!", 0, 0);
+ QApplication::sendEvent(&view, &event);
+ QCOMPARE(edit.text(), QString("Hello world!"));
+
+ // QTBUG-12339
+ // test that document and internal text attribute are in sync
+ QCOMPARE(editPrivate->text, QString("Hello world!"));
+}
+
void tst_qdeclarativetextedit::openInputPanelOnClick()
{
QGraphicsScene scene;
@@ -968,7 +1002,7 @@ void tst_qdeclarativetextedit::openInputPanelOnClick()
MyInputContext ic;
view.setInputContext(&ic);
QDeclarativeTextEdit edit;
- QSignalSpy focusOnPressSpy(&edit, SIGNAL(focusOnPressChanged(bool)));
+ QSignalSpy focusOnPressSpy(&edit, SIGNAL(activeFocusOnPressChanged(bool)));
edit.setText("Hello world");
edit.setPos(0, 0);
scene.addItem(&edit);
@@ -1016,7 +1050,7 @@ void tst_qdeclarativetextedit::openInputPanelOnFocus()
MyInputContext ic;
view.setInputContext(&ic);
QDeclarativeTextEdit edit;
- QSignalSpy focusOnPressSpy(&edit, SIGNAL(focusOnPressChanged(bool)));
+ QSignalSpy focusOnPressSpy(&edit, SIGNAL(activeFocusOnPressChanged(bool)));
edit.setText("Hello world");
edit.setPos(0, 0);
scene.addItem(&edit);
@@ -1038,7 +1072,7 @@ void tst_qdeclarativetextedit::openInputPanelOnFocus()
// focus on press, input panel on focus
QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos()));
QApplication::processEvents();
- QVERIFY(edit.hasFocus());
+ QVERIFY(edit.hasActiveFocus());
QCOMPARE(ic.openInputPanelReceived, true);
ic.openInputPanelReceived = false;
@@ -1048,7 +1082,7 @@ void tst_qdeclarativetextedit::openInputPanelOnFocus()
ic.openInputPanelReceived = false;
// if already focused, input panel can be opened on press
- QVERIFY(edit.hasFocus());
+ QVERIFY(edit.hasActiveFocus());
QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos()));
QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, true);
@@ -1076,7 +1110,7 @@ void tst_qdeclarativetextedit::openInputPanelOnFocus()
QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled));
// no automatic input panel events should
- // be sent if focusOnPress is false
+ // be sent if activeFocusOnPress is false
edit.setFocusOnPress(false);
QCOMPARE(focusOnPressSpy.count(),1);
edit.setFocusOnPress(false);
@@ -1103,7 +1137,7 @@ void tst_qdeclarativetextedit::openInputPanelOnFocus()
QCOMPARE(ic.closeInputPanelReceived, true);
ic.closeInputPanelReceived = false;
- // set focusOnPress back to true
+ // set activeFocusOnPress back to true
edit.setFocusOnPress(true);
QCOMPARE(focusOnPressSpy.count(),2);
edit.setFocusOnPress(true);
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index a48bc3971f..6e15a4a962 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -494,7 +494,7 @@ void tst_qdeclarativetextinput::maxLength()
}
textinputObject->setText("");
- QTRY_VERIFY(textinputObject->hasFocus() == true);
+ QTRY_VERIFY(textinputObject->hasActiveFocus() == true);
for(int i=0; i<20; i++){
QCOMPARE(textinputObject->text().length(), qMin(i,10));
//simulateKey(canvas, Qt::Key_A);
@@ -515,7 +515,7 @@ void tst_qdeclarativetextinput::masks()
QVERIFY(canvas->rootObject() != 0);
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput *>(canvas->rootObject());
QVERIFY(textinputObject != 0);
- QTRY_VERIFY(textinputObject->hasFocus() == true);
+ QTRY_VERIFY(textinputObject->hasActiveFocus() == true);
QVERIFY(textinputObject->text().length() == 0);
QCOMPARE(textinputObject->inputMask(), QString("HHHHhhhh; "));
for(int i=0; i<10; i++){
@@ -544,7 +544,7 @@ void tst_qdeclarativetextinput::validators()
QDeclarativeTextInput *intInput = qobject_cast<QDeclarativeTextInput *>(qvariant_cast<QObject *>(canvas->rootObject()->property("intInput")));
QVERIFY(intInput);
intInput->setFocus(true);
- QTRY_VERIFY(intInput->hasFocus());
+ QTRY_VERIFY(intInput->hasActiveFocus());
QTest::keyPress(canvas, Qt::Key_1);
QTest::keyRelease(canvas, Qt::Key_1, Qt::NoModifier ,10);
QCOMPARE(intInput->text(), QLatin1String("1"));
@@ -565,7 +565,7 @@ void tst_qdeclarativetextinput::validators()
QDeclarativeTextInput *dblInput = qobject_cast<QDeclarativeTextInput *>(qvariant_cast<QObject *>(canvas->rootObject()->property("dblInput")));
QTRY_VERIFY(dblInput);
dblInput->setFocus(true);
- QVERIFY(dblInput->hasFocus() == true);
+ QVERIFY(dblInput->hasActiveFocus() == true);
QTest::keyPress(canvas, Qt::Key_1);
QTest::keyRelease(canvas, Qt::Key_1, Qt::NoModifier ,10);
QCOMPARE(dblInput->text(), QLatin1String("1"));
@@ -594,7 +594,7 @@ void tst_qdeclarativetextinput::validators()
QDeclarativeTextInput *strInput = qobject_cast<QDeclarativeTextInput *>(qvariant_cast<QObject *>(canvas->rootObject()->property("strInput")));
QTRY_VERIFY(strInput);
strInput->setFocus(true);
- QVERIFY(strInput->hasFocus() == true);
+ QVERIFY(strInput->hasActiveFocus() == true);
QTest::keyPress(canvas, Qt::Key_1);
QTest::keyRelease(canvas, Qt::Key_1, Qt::NoModifier ,10);
QCOMPARE(strInput->text(), QLatin1String(""));
@@ -642,7 +642,7 @@ void tst_qdeclarativetextinput::inputMethods()
QVERIFY(canvas->rootObject() != 0);
input->setFocus(true);
- QVERIFY(input->hasFocus() == true);
+ QVERIFY(input->hasActiveFocus() == true);
// test that input method event is committed
QInputMethodEvent event;
event.setCommitString( "My ", -12, 0);
@@ -669,11 +669,11 @@ void tst_qdeclarativetextinput::navigation()
QVERIFY(input != 0);
input->setCursorPosition(0);
- QTRY_VERIFY(input->hasFocus() == true);
+ QTRY_VERIFY(input->hasActiveFocus() == true);
simulateKey(canvas, Qt::Key_Left);
- QVERIFY(input->hasFocus() == false);
+ QVERIFY(input->hasActiveFocus() == false);
simulateKey(canvas, Qt::Key_Right);
- QVERIFY(input->hasFocus() == true);
+ QVERIFY(input->hasActiveFocus() == true);
//QT-2944: If text is selected, ensure we deselect upon cursor motion
input->setCursorPosition(input->text().length());
input->select(0,input->text().length());
@@ -681,11 +681,11 @@ void tst_qdeclarativetextinput::navigation()
simulateKey(canvas, Qt::Key_Right);
QVERIFY(input->selectionStart() == input->selectionEnd());
QVERIFY(input->selectionStart() == input->text().length());
- QVERIFY(input->hasFocus() == true);
+ QVERIFY(input->hasActiveFocus() == true);
simulateKey(canvas, Qt::Key_Right);
- QVERIFY(input->hasFocus() == false);
+ QVERIFY(input->hasActiveFocus() == false);
simulateKey(canvas, Qt::Key_Left);
- QVERIFY(input->hasFocus() == true);
+ QVERIFY(input->hasActiveFocus() == true);
// Up and Down should NOT do Home/End, even on Mac OS X (QTBUG-10438).
input->setCursorPosition(2);
@@ -784,7 +784,7 @@ void tst_qdeclarativetextinput::readOnly()
QDeclarativeTextInput *input = qobject_cast<QDeclarativeTextInput *>(qvariant_cast<QObject *>(canvas->rootObject()->property("myInput")));
QVERIFY(input != 0);
- QTRY_VERIFY(input->hasFocus() == true);
+ QTRY_VERIFY(input->hasActiveFocus() == true);
QVERIFY(input->isReadOnly() == true);
QString initial = input->text();
for(int k=Qt::Key_0; k<=Qt::Key_Z; k++)
@@ -802,13 +802,16 @@ void tst_qdeclarativetextinput::echoMode()
QDeclarativeView *canvas = createView(SRCDIR "/data/echoMode.qml");
canvas->show();
canvas->setFocus();
+ QApplication::setActiveWindow(canvas);
+ QTest::qWaitForWindowShown(canvas);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(canvas));
QVERIFY(canvas->rootObject() != 0);
QDeclarativeTextInput *input = qobject_cast<QDeclarativeTextInput *>(qvariant_cast<QObject *>(canvas->rootObject()->property("myInput")));
QVERIFY(input != 0);
- QTRY_VERIFY(input->hasFocus() == true);
+ QTRY_VERIFY(input->hasActiveFocus() == true);
QString initial = input->text();
Qt::InputMethodHints ref;
QCOMPARE(initial, QLatin1String("ABCDefgh"));
@@ -849,6 +852,7 @@ void tst_qdeclarativetextinput::echoMode()
QCOMPARE(input->text(), QLatin1String("a"));
QCOMPARE(input->displayText(), QLatin1String("a"));
input->setFocus(false);
+ QVERIFY(input->hasActiveFocus() == false);
QCOMPARE(input->displayText(), QLatin1String("Q"));
}
@@ -901,7 +905,7 @@ void tst_qdeclarativetextinput::openInputPanelOnClick()
MyInputContext ic;
view.setInputContext(&ic);
QDeclarativeTextInput input;
- QSignalSpy focusOnPressSpy(&input, SIGNAL(focusOnPressChanged(bool)));
+ QSignalSpy focusOnPressSpy(&input, SIGNAL(activeFocusOnPressChanged(bool)));
input.setText("Hello world");
input.setPos(0, 0);
scene.addItem(&input);
@@ -948,7 +952,7 @@ void tst_qdeclarativetextinput::openInputPanelOnFocus()
MyInputContext ic;
view.setInputContext(&ic);
QDeclarativeTextInput input;
- QSignalSpy focusOnPressSpy(&input, SIGNAL(focusOnPressChanged(bool)));
+ QSignalSpy focusOnPressSpy(&input, SIGNAL(activeFocusOnPressChanged(bool)));
input.setText("Hello world");
input.setPos(0, 0);
scene.addItem(&input);
@@ -970,7 +974,7 @@ void tst_qdeclarativetextinput::openInputPanelOnFocus()
// focus on press, input panel on focus
QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos()));
QApplication::processEvents();
- QVERIFY(input.hasFocus());
+ QVERIFY(input.hasActiveFocus());
QCOMPARE(ic.openInputPanelReceived, true);
ic.openInputPanelReceived = false;
@@ -980,7 +984,7 @@ void tst_qdeclarativetextinput::openInputPanelOnFocus()
ic.openInputPanelReceived = false;
// if already focused, input panel can be opened on press
- QVERIFY(input.hasFocus());
+ QVERIFY(input.hasActiveFocus());
QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos()));
QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, true);
@@ -1008,7 +1012,7 @@ void tst_qdeclarativetextinput::openInputPanelOnFocus()
QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled));
// no automatic input panel events should
- // be sent if focusOnPress is false
+ // be sent if activeFocusOnPress is false
input.setFocusOnPress(false);
QCOMPARE(focusOnPressSpy.count(),1);
input.setFocusOnPress(false);
@@ -1035,7 +1039,7 @@ void tst_qdeclarativetextinput::openInputPanelOnFocus()
QCOMPARE(ic.closeInputPanelReceived, true);
ic.closeInputPanelReceived = false;
- // set focusOnPress back to true
+ // set activeFocusOnPress back to true
input.setFocusOnPress(true);
QCOMPARE(focusOnPressSpy.count(),2);
input.setFocusOnPress(true);
diff --git a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
index b08da0f3a4..1c1c04bf64 100644
--- a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
+++ b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
@@ -43,9 +43,11 @@
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativeview.h>
#include <QtDeclarative/qdeclarativeitem.h>
+#include <QtDeclarative/qdeclarativecontext.h>
#include <QtGui/qmenubar.h>
#include "../../../shared/util.h"
#include "qmlruntime.h"
+#include "deviceorientation.h"
#include "../../../shared/util.h"
#ifdef Q_OS_SYMBIAN
@@ -67,7 +69,7 @@ public:
tst_QDeclarativeViewer();
private slots:
- void orientation();
+ void runtimeContextProperty();
void loading();
void fileBrowser();
void resizing();
@@ -94,7 +96,7 @@ tst_QDeclarativeViewer::tst_QDeclarativeViewer()
QCOMPARE(viewer->size(), viewer->sizeHint()); \
}
-void tst_QDeclarativeViewer::orientation()
+void tst_QDeclarativeViewer::runtimeContextProperty()
{
QDeclarativeViewer *viewer = new QDeclarativeViewer();
QVERIFY(viewer);
@@ -103,17 +105,30 @@ void tst_QDeclarativeViewer::orientation()
QVERIFY(viewer->menuBar());
QDeclarativeItem* rootItem = qobject_cast<QDeclarativeItem*>(viewer->view()->rootObject());
QVERIFY(rootItem);
+ QObject *runtimeObject = qvariant_cast<QObject*>(viewer->view()->engine()->rootContext()->contextProperty("runtime"));
+ QVERIFY(runtimeObject);
+
+ // test isActiveWindow property
+ QVERIFY(!runtimeObject->property("isActiveWindow").toBool());
+
viewer->show();
-
QApplication::setActiveWindow(viewer);
QTest::qWaitForWindowShown(viewer);
QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(viewer));
+ QVERIFY(runtimeObject->property("isActiveWindow").toBool());
+
TEST_INITIAL_SIZES(viewer);
+ // test orientation property
+ QCOMPARE(runtimeObject->property("orientation").toInt(), int(DeviceOrientation::Portrait));
+
viewer->rotateOrientation();
qApp->processEvents();
+ QCOMPARE(runtimeObject->property("orientation").toInt(), int(DeviceOrientation::Landscape));
+ QCOMPARE(rootItem->width(), 300.0);
+
QCOMPARE(rootItem->width(), 300.0);
QCOMPARE(rootItem->height(), 200.0);
QTRY_COMPARE(viewer->view()->size(), QSize(300, 200));
@@ -124,6 +139,8 @@ void tst_QDeclarativeViewer::orientation()
viewer->rotateOrientation();
qApp->processEvents();
+ QCOMPARE(runtimeObject->property("orientation").toInt(), int(DeviceOrientation::PortraitInverted));
+
QCOMPARE(rootItem->width(), 200.0);
QCOMPARE(rootItem->height(), 300.0);
QTRY_COMPARE(viewer->view()->size(), QSize(200, 300));
@@ -131,6 +148,19 @@ void tst_QDeclarativeViewer::orientation()
QCOMPARE(viewer->size(), QSize(200, 300 + MENUBAR_HEIGHT(viewer)));
QCOMPARE(viewer->size(), viewer->sizeHint());
+ viewer->rotateOrientation();
+ qApp->processEvents();
+
+ QCOMPARE(runtimeObject->property("orientation").toInt(), int(DeviceOrientation::LandscapeInverted));
+
+ viewer->rotateOrientation();
+ qApp->processEvents();
+
+ QCOMPARE(runtimeObject->property("orientation").toInt(), int(DeviceOrientation::Portrait));
+
+ viewer->hide();
+ QVERIFY(!runtimeObject->property("isActiveWindow").toBool());
+
delete viewer;
}
@@ -152,16 +182,16 @@ void tst_QDeclarativeViewer::loading()
TEST_INITIAL_SIZES(viewer);
- viewer->resize(QSize(400, 500));
+ viewer->resize(QSize(250, 350));
qApp->processEvents();
// window resized
- QTRY_COMPARE(rootItem->width(), 400.0);
- QTRY_COMPARE(rootItem->height(), 500.0 - MENUBAR_HEIGHT(viewer));
- QCOMPARE(viewer->view()->size(), QSize(400, 500 - MENUBAR_HEIGHT(viewer)));
+ QTRY_COMPARE(rootItem->width(), 250.0);
+ QTRY_COMPARE(rootItem->height(), 350.0 - MENUBAR_HEIGHT(viewer));
+ QCOMPARE(viewer->view()->size(), QSize(250, 350 - MENUBAR_HEIGHT(viewer)));
QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
- QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(400, 500 - MENUBAR_HEIGHT(viewer)));
- QCOMPARE(viewer->size(), QSize(400, 500));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(250, 350 - MENUBAR_HEIGHT(viewer)));
+ QCOMPARE(viewer->size(), QSize(250, 350));
QCOMPARE(viewer->size(), viewer->sizeHint());
viewer->reload();
@@ -177,16 +207,16 @@ void tst_QDeclarativeViewer::loading()
QCOMPARE(viewer->size(), QSize(200, 300 + MENUBAR_HEIGHT(viewer)));
QCOMPARE(viewer->size(), viewer->sizeHint());
- viewer->resize(QSize(400, 500));
+ viewer->resize(QSize(250, 350));
qApp->processEvents();
// window resized again
- QTRY_COMPARE(rootItem->width(), 400.0);
- QTRY_COMPARE(rootItem->height(), 500.0 - MENUBAR_HEIGHT(viewer));
- QCOMPARE(viewer->view()->size(), QSize(400, 500 - MENUBAR_HEIGHT(viewer)));
+ QTRY_COMPARE(rootItem->width(), 250.0);
+ QTRY_COMPARE(rootItem->height(), 350.0 - MENUBAR_HEIGHT(viewer));
+ QCOMPARE(viewer->view()->size(), QSize(250, 350 - MENUBAR_HEIGHT(viewer)));
QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
- QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(400, 500 - MENUBAR_HEIGHT(viewer)));
- QCOMPARE(viewer->size(), QSize(400, 500));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(250, 350 - MENUBAR_HEIGHT(viewer)));
+ QCOMPARE(viewer->size(), QSize(250, 350));
QCOMPARE(viewer->size(), viewer->sizeHint());
viewer->open(SRCDIR "/data/orientation.qml");
diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/data/objectlist.qml b/tests/auto/declarative/qdeclarativevisualdatamodel/data/objectlist.qml
index f5198c90d2..d030222ba8 100644
--- a/tests/auto/declarative/qdeclarativevisualdatamodel/data/objectlist.qml
+++ b/tests/auto/declarative/qdeclarativevisualdatamodel/data/objectlist.qml
@@ -11,6 +11,9 @@ ListView {
width: 100
color: model.modelData.color
Text { objectName: "name"; text: name }
+ Text { objectName: "section"; text: parent.ListView.section }
}
}
+ section.property: "name"
+ section.criteria: ViewSection.FullString
}
diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
index 43d4d06e17..e0f32ea828 100644
--- a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
+++ b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
@@ -179,6 +179,9 @@ void tst_qdeclarativevisualdatamodel::objectListModel()
QDeclarativeText *name = findItem<QDeclarativeText>(contentItem, "name", 0);
QCOMPARE(name->text(), QString("Item 1"));
+ QDeclarativeText *section = findItem<QDeclarativeText>(contentItem, "section", 0);
+ QCOMPARE(section->text(), QString("Item 1"));
+
dataList[0]->setProperty("name", QLatin1String("Changed"));
QCOMPARE(name->text(), QString("Changed"));
}
diff --git a/tests/auto/declarative/qmlvisual/focusscope/test.qml b/tests/auto/declarative/qmlvisual/focusscope/test.qml
index d83bad47d3..24b4b99f57 100644
--- a/tests/auto/declarative/qmlvisual/focusscope/test.qml
+++ b/tests/auto/declarative/qmlvisual/focusscope/test.qml
@@ -19,14 +19,14 @@ Rectangle {
color: "transparent"
border.width: 5
- border.color: myScope.wantsFocus?"blue":"black"
+ border.color: myScope.activeFocus?"blue":"black"
Rectangle {
id: item1
x: 10; y: 10
width: 100; height: 100; color: "green"
border.width: 5
- border.color: wantsFocus?"blue":"black"
+ border.color: activeFocus?"blue":"black"
Keys.onDigit9Pressed: console.log("Top Left");
KeyNavigation.right: item2
focus: true
@@ -42,7 +42,7 @@ Rectangle {
x: 310; y: 10
width: 100; height: 100; color: "green"
border.width: 5
- border.color: wantsFocus?"blue":"black"
+ border.color: activeFocus?"blue":"black"
KeyNavigation.left: item1
Keys.onDigit9Pressed: console.log("Top Right");
@@ -62,7 +62,7 @@ Rectangle {
x: 10; y: 300
width: 100; height: 100; color: "green"
border.width: 5
- border.color: wantsFocus?"blue":"black"
+ border.color: activeFocus?"blue":"black"
Keys.onDigit9Pressed: console.log("Bottom Left");
KeyNavigation.up: myScope
diff --git a/tests/auto/declarative/qmlvisual/focusscope/test2.qml b/tests/auto/declarative/qmlvisual/focusscope/test2.qml
index 7a6ed839ee..19c8bed395 100644
--- a/tests/auto/declarative/qmlvisual/focusscope/test2.qml
+++ b/tests/auto/declarative/qmlvisual/focusscope/test2.qml
@@ -10,27 +10,27 @@ Rectangle {
FocusScope {
y: 100
focus: true
- Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
+ Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
FocusScope {
y: 100
focus: true
- Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
+ Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
FocusScope {
y: 100
focus: true
- Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
+ Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
FocusScope {
y: 100
focus: true
- Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
+ Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
FocusScope {
y: 100
focus: true
- Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
+ Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
}
}
}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.0.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.0.png
index 442ba9f1a9..16a7e108b7 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.1.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.1.png
index a9ff20fa4e..116ce88627 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.1.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.2.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.2.png
index 157bb991eb..13896d4e0a 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.2.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.3.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.3.png
index 8c49acb576..5d180031e2 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.3.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.3.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.4.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.4.png
index eb2bf54803..cd3387f99f 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.4.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.4.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.5.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.5.png
new file mode 100644
index 0000000000..9f31c69893
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.5.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.qml b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.qml
index 9595a5cc5b..06d32b6128 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.qml
@@ -6,409 +6,437 @@ VisualTest {
}
Frame {
msec: 16
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 32
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 48
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 64
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 80
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 96
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 112
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 128
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 144
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 160
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 176
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 192
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 208
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 224
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 240
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 256
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 272
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 288
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 304
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 320
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 336
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 352
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 368
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 384
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 400
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 416
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 432
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 448
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 464
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 480
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 496
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 512
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 528
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 544
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 560
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 576
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 592
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 608
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 624
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 640
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 656
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 672
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 688
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 704
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 720
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 736
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 752
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 768
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 784
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 800
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 816
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 832
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 848
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 864
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 880
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
}
Frame {
msec: 896
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "01b9c877f51b878ed262943aedcf89b4"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 623; y: 222
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 621; y: 222
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 912
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "1c2d4a99e7e2f5e945c05857d6a463a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 609; y: 230
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 928
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "d69c0678ce2025a8921b089311d219ea"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 583; y: 248
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 944
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "55a852b268151d660e4945da88b04022"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 559; y: 258
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 960
image: "test-pathview.0.png"
}
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 547; y: 264
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 547; y: 264
+ modifiers: 0
+ sendToViewport: true
+ }
Frame {
msec: 976
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "55ab61911405e762b39b38d1371ef845"
}
Frame {
msec: 992
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "be3de45165f2f0916f734fecf3f48c47"
}
Frame {
msec: 1008
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "0a523daec6b591a2b5030c6c0b95cb24"
}
Frame {
msec: 1024
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "22da168e523fa385cce1f2e6a05e1332"
}
Frame {
msec: 1040
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "464cb37780cf126df6dad4169445c7bc"
}
Frame {
msec: 1056
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "666b06a0fbe2d10fbf3e15883a166c60"
}
Frame {
msec: 1072
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "223732cd526e09155ca99c80780bc3fa"
}
Frame {
msec: 1088
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "c74cc48188b05c5426a6b955ed9f09a3"
}
Frame {
msec: 1104
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "8d09a95ab09f87277fcc727e9c5da0fb"
}
Frame {
msec: 1120
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "71b7d4ec45270158ba4ca96817d8f231"
}
Frame {
msec: 1136
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
- }
- Mouse {
- type: 2
- button: 1
- buttons: 1
- x: 734; y: 177
- modifiers: 0
- sendToViewport: true
+ hash: "4847a1e7d792ed58e3476112b02c6fab"
}
Frame {
msec: 1152
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ hash: "ef444a3a960bdc176e004b949e5c89ce"
}
Frame {
msec: 1168
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
- }
- Mouse {
- type: 5
- button: 0
- buttons: 1
- x: 732; y: 177
- modifiers: 0
- sendToViewport: true
+ hash: "1ebf4badb7f4ef3938868a74740fcbce"
}
Frame {
msec: 1184
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
- }
- Mouse {
- type: 5
- button: 0
- buttons: 1
- x: 726; y: 179
- modifiers: 0
- sendToViewport: true
+ hash: "022918cd4b54750b0ad28bcb00108f51"
}
Frame {
msec: 1200
- hash: "89bb697bb7b7fab38d3ff56e23e43959"
- }
- Mouse {
- type: 5
- button: 0
- buttons: 1
- x: 716; y: 183
- modifiers: 0
- sendToViewport: true
+ hash: "1ea398b2b7c52b35981c98b60d5d7a02"
}
Frame {
msec: 1216
- hash: "42c141399fda1cbb2ae117788d87092a"
- }
- Mouse {
- type: 5
- button: 0
- buttons: 1
- x: 700; y: 190
- modifiers: 0
- sendToViewport: true
+ hash: "05d7619ed0154fa414686522a7ca86c4"
}
Frame {
msec: 1232
- hash: "4d44343eb91838e3eb73e2e5326b5ac2"
+ hash: "03274e26ea57d1264f21d306533476ef"
}
Frame {
msec: 1248
- hash: "4d44343eb91838e3eb73e2e5326b5ac2"
+ hash: "5109372d6c62225aaf971aa53c708bee"
+ }
+ Frame {
+ msec: 1264
+ hash: "71f10446437963eccb87dd40c172118f"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 708; y: 240
+ modifiers: 0
+ sendToViewport: true
}
Mouse {
type: 5
button: 0
buttons: 1
- x: 677; y: 200
+ x: 707; y: 240
modifiers: 0
sendToViewport: true
}
Frame {
- msec: 1264
- hash: "15aaccb4f7961a4e3e6fe57260779d00"
+ msec: 1280
+ hash: "e47426491548162622f9a281c3d062ec"
}
Mouse {
type: 5
button: 0
buttons: 1
- x: 651; y: 209
+ x: 685; y: 252
modifiers: 0
sendToViewport: true
}
Frame {
- msec: 1280
- hash: "5628fa3ac9893f5c9690013aad4b881a"
+ msec: 1296
+ hash: "e889fba64d9f94fe18c3750dd6ad9d00"
}
Mouse {
type: 5
button: 0
buttons: 1
- x: 619; y: 219
+ x: 635; y: 264
modifiers: 0
sendToViewport: true
}
Frame {
- msec: 1296
- hash: "384db58b6de773ac39ae81e6af4d547d"
+ msec: 1312
+ hash: "7fe200757a6bf752906d195fe341be14"
}
Mouse {
type: 5
button: 0
buttons: 1
- x: 579; y: 229
+ x: 569; y: 280
modifiers: 0
sendToViewport: true
}
Frame {
- msec: 1312
- hash: "2a15a27a138b9d3d646b827d026e8843"
+ msec: 1328
+ hash: "aa1f4147dc3fd66f6d9e2605d0759951"
}
Mouse {
type: 5
button: 0
buttons: 1
- x: 535; y: 237
+ x: 533; y: 294
modifiers: 0
sendToViewport: true
}
@@ -416,157 +444,193 @@ VisualTest {
type: 3
button: 1
buttons: 0
- x: 535; y: 237
+ x: 533; y: 294
modifiers: 0
sendToViewport: true
}
Frame {
- msec: 1328
- hash: "098176f48a148eb2bc5ef67c307baa1c"
- }
- Frame {
msec: 1344
- hash: "f838ab4301bf9d3106cec529f855cecd"
+ hash: "2b7163ea45860cf81f208c2b68c418b5"
}
Frame {
msec: 1360
- hash: "9725322067a04f83717b059d4970d610"
+ hash: "a89bd1204fb17d9d8ce7b7f4279e9b1f"
}
Frame {
msec: 1376
- hash: "3605cfbebc3a9eb4460efb2d4b9b6da2"
+ hash: "683e52637fd5d96ded35f5ade9679822"
}
Frame {
msec: 1392
- hash: "4503a368d8db25d112503dbc3934541d"
+ hash: "2aa16f06e8bed201746558b1003f7d63"
}
Frame {
msec: 1408
- hash: "80894cc06c82264bf527398ea235da12"
+ hash: "f2e40e75ddb8004917ae5b8cf144a322"
}
Frame {
msec: 1424
- hash: "d4f9b90f886fc667309b33c9a296410c"
+ hash: "0f7f64373b065a454c02c32c52a5ef79"
}
Frame {
msec: 1440
- hash: "889d01025cff679b61bff182a1ac9cbc"
+ hash: "fb4fbd2b3696bfb6135797b1f0158b5c"
}
Frame {
msec: 1456
- hash: "6147bc4455e7cb5ae55cd47be8dc4ad6"
+ hash: "7a8eafad65ff191a97dcf910393ba4e4"
}
Frame {
msec: 1472
- hash: "ddd10a294eb6b19698c4e9fe4f1508fe"
+ hash: "3362deae62ba96853d85827f21cec589"
}
Frame {
msec: 1488
- hash: "748e8d9c1971f6258acee5133b7f114b"
+ hash: "0653838fa3fb5b32e561adc20becc9d2"
}
Frame {
msec: 1504
- hash: "1ef3f32ec9ef950588266bacbe3554a0"
+ hash: "482e78e6b54cabe007f7e7f4f27a07ee"
}
Frame {
msec: 1520
- hash: "57853ff47b65aba9e76f90b2efec4f8f"
+ hash: "b51f60864896808c6e41d8a0a990676d"
}
Frame {
msec: 1536
- hash: "3985fea21d89d223c1461d5e96364c76"
+ hash: "d77e59d69b7c21c82bce9a25d548358c"
}
Frame {
msec: 1552
- hash: "cb5f6a3caeeaed12e91efe43867f2c1f"
+ hash: "b3dddbb1eee0e2f222434511073c4620"
}
Frame {
msec: 1568
- hash: "cdd4176776d5969373e0fc9a117e3c87"
+ hash: "d5e0d191582291b269b9e93241d9ac03"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 637; y: 218
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 621; y: 240
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 613; y: 248
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 1584
- hash: "3bac2e7506472db2ae11734240f1c3f4"
+ hash: "8c12000da88abb70cbc370d2a2ca21d7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 551; y: 288
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 551; y: 288
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 1600
- hash: "bb572659d79ebda7134c039e40cf2633"
+ hash: "2854533fd50f5ebb8fc43cf0041883e4"
}
Frame {
msec: 1616
- hash: "e610181bfa17a85281f9c7417088f04f"
+ hash: "0b3782e842a6c54585d6a266314025d8"
}
Frame {
msec: 1632
- hash: "eb23ff021909589b6d8ce47ebff2c3ed"
+ hash: "02409885b82ebac931df18d8e23238d7"
}
Frame {
msec: 1648
- hash: "c321dda3878c4b97cc63246c47368224"
+ hash: "edcbd91ad267c125c431367be3e4a8a3"
}
Frame {
msec: 1664
- hash: "6a65cdfd50e1455356040d4cbc09905e"
+ hash: "47641fd7ec919b3c041c5acc04b0d083"
}
Frame {
msec: 1680
- hash: "f2a44b12e4e5bae8283c4d227949e4e8"
+ hash: "ea8f026fee0fba2c27a8df1e1e531acb"
}
Frame {
msec: 1696
- hash: "55418d661f3257b5b79a7dbb172b5b70"
+ hash: "e2e8a398760be380f9b2b7dbcb03c0e8"
}
Frame {
msec: 1712
- hash: "483d7111c86951918746d6ebe0dd9655"
+ hash: "a1767f2e10f9ab87050ef246a4a29bbb"
}
Frame {
msec: 1728
- hash: "85c83ac3a294a9320bb04a6721ecf7d5"
+ hash: "f60cccf793bd6d356d69b1394638a201"
}
Frame {
msec: 1744
- hash: "0d658b897b8e03397ddd8ffe475c2fc0"
+ hash: "31dc8c50a99164c19445a089223c8813"
}
Frame {
msec: 1760
- hash: "6ed9d7ea344b3c1b1d9196ee36b2f89a"
+ hash: "78ff726b7da5ba03fa74f66b39bf1006"
}
Frame {
msec: 1776
- hash: "6a1e7f6c03769c2c88e6343fb6c1a2a4"
+ hash: "6f8a540dccf7182f6aed8903a0afb109"
}
Frame {
msec: 1792
- hash: "9dc51f46e072eac4494d7318f2ecb39b"
+ hash: "c914c500507b9c7180dcf25e985135e9"
}
Frame {
msec: 1808
- hash: "59e833981c3fcd8a71f4a16d1c454b3a"
+ hash: "39702ce38bcfca46ef3a8dbb7299c725"
}
Frame {
msec: 1824
- hash: "29b953efdda00548d8cf6fb49fa60d13"
+ hash: "969b71ee88a1d244e62af1cecc105234"
}
Frame {
msec: 1840
- hash: "fd4611f703f94ebefcc64781993ca85c"
+ hash: "11c8397fb9d7b993761b08ba8c9958e5"
}
Frame {
msec: 1856
- hash: "aa4789ede618963157b40f099ce84987"
+ hash: "79ad4a90ab449e3232db993b30786d89"
}
Frame {
msec: 1872
- hash: "8a326b46ec536a67626ee2d2bc06aa9f"
+ hash: "daf979fd50e0860bf30f377a059d89dc"
}
Frame {
msec: 1888
- hash: "011ff557672d47591e4f0f5c5ee418f1"
+ hash: "5412e7524dc22e8064c8a8c684092802"
}
Frame {
msec: 1904
- hash: "d72fba857bdc128ddcb5971b86aadcb2"
+ hash: "2c3bea8bf10ecf6c19b93e94cb7ac0ea"
}
Frame {
msec: 1920
@@ -574,807 +638,919 @@ VisualTest {
}
Frame {
msec: 1936
- hash: "49182b7ae9ef5fb4b9234969abd05960"
+ hash: "bbfa2f8aaab0abaff9d771d5ec546d96"
}
Frame {
msec: 1952
- hash: "53de60f682574b7a9e6ffaee175fc9ff"
+ hash: "be2811bf369bc9dd8c5d9deec3b84788"
}
Frame {
msec: 1968
- hash: "2de74fe5b8848c5c781b796146871f45"
+ hash: "779838915f48eb917d36c3f2b65eedae"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 595; y: 236
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 565; y: 256
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 1984
- hash: "33c87146d8c24dd9c2271d16a8ff5b53"
+ hash: "d20b5fe14b47dfb1e73f8ef44802da11"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 507; y: 286
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 2000
- hash: "fdb29214e20d744d9776907061f50358"
+ hash: "5312dd1f9d309ab5134b8bb67685488e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 461; y: 288
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 461; y: 288
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 2016
- hash: "8c7c920416c9b775e790e6da24c32927"
+ hash: "8d6b6cbb74cc654bc5aff10a807dd3cb"
}
Frame {
msec: 2032
- hash: "86b456059e4701379447fffaf9e072f0"
+ hash: "dee717869177d1de4a26599b120f1c3d"
}
Frame {
msec: 2048
- hash: "f92cc485ee03ef5bce3c4cdc35e00318"
+ hash: "2b2c60f42024784ceed5c68505dfa5ca"
}
Frame {
msec: 2064
- hash: "2fad58883cb20273cfd79ebca345a66d"
+ hash: "1a6a108fd6cf607ec08dbedd804d12f7"
}
Frame {
msec: 2080
- hash: "84505ebbc6e12817f11f64aa6f61a0bf"
+ hash: "10bc4d0a1dc400fedc9a68b68c6525fd"
}
Frame {
msec: 2096
- hash: "ded83cacb89838cc0f3ba14bcc69b66b"
+ hash: "dc6a4abfbfb38e90af2308320d0f795b"
}
Frame {
msec: 2112
- hash: "5bb37e75bb45eaa6067c604b83ae13d7"
+ hash: "82c61d8461001c19af7c2b458d427e0b"
}
Frame {
msec: 2128
- hash: "4ee9e4c90c40dbc25a0ce884d9c2c37f"
+ hash: "e455d9ccffedaa708532bb69ad15871e"
}
Frame {
msec: 2144
- hash: "cb7148ff6f611038c29af36c8552b8c2"
+ hash: "b9c6169ad08724fc70df30668dfe7509"
}
Frame {
msec: 2160
- hash: "a591d8cb42570272dd264d5f1ce595ab"
+ hash: "a3fe5862be470470854d4157c1c027db"
}
Frame {
msec: 2176
- hash: "4e61657405d32dbcd39d3637f8af0958"
+ hash: "6a3804bd5f4fd5f1c424615ceb620525"
}
Frame {
msec: 2192
- hash: "9c7c1411dd5d3c1c8fb78e63e14061fe"
+ hash: "df0d72248310654a9cf47e707fe9e414"
}
Frame {
msec: 2208
- hash: "ae83a37e99b578fa0872ed6bc2776bc0"
+ hash: "beb19f2b2979ab40b5ccf8c0fbe9b72f"
}
Frame {
msec: 2224
- hash: "e8cb5a8a40c1e78c87c616f77d8de270"
+ hash: "be3449b49048b764bea68a76baa0fc75"
}
Frame {
msec: 2240
- hash: "9df093e4bcfa32be5924a0ca70bdaa3b"
+ hash: "4a615cae9c8f85e7b8aecd4c9014f1eb"
}
Frame {
msec: 2256
- hash: "40c358066d508143bee1446d12fe7b89"
+ hash: "b3c274f1a9d65684c0a55a544bf77810"
}
Frame {
msec: 2272
- hash: "a929ed6efc7fc68b38635f3c74242f52"
+ hash: "31456b01fcfb60a77d2b9662c2fff7b6"
}
Frame {
msec: 2288
- hash: "86ff721a3178b689ea47b6bc274a2b41"
+ hash: "2be5cf3f6158bf09659acc68b134846f"
}
Frame {
msec: 2304
- hash: "ed1f680f6d05f54ceb75c9bae3a0716a"
+ hash: "5f9c725a11305f3e6c48ab332faabf50"
}
Frame {
msec: 2320
- hash: "3f09a565df2beb51f366a1b3fb6adfe9"
+ hash: "277c2733c7245d045665198984b74224"
}
Frame {
msec: 2336
- hash: "13468347bd26bab60f1db826fb17631c"
+ hash: "265b8342bc747fb43a5291df0f4ce48b"
}
Frame {
msec: 2352
- hash: "9f7d085fea5788a457098973f17c36cb"
+ hash: "803b49ec31955b481009a51c64bcce65"
}
Frame {
msec: 2368
- hash: "4114b93246155b3434200831b2995330"
+ hash: "a717b30ad50746cdf0fae82212ac88f0"
}
Frame {
msec: 2384
- hash: "487171bd1430f74e3d51b5e215c34b5c"
+ hash: "65f46c8e69f24d060b5da6f866867f51"
}
Frame {
msec: 2400
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "52f9e5d1106d00a950470076a50e4239"
}
Frame {
msec: 2416
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "058a787aae2845308e68bb93f6a811e4"
}
Frame {
msec: 2432
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "621985111c25994c0c0fe3635be67c1d"
}
Frame {
msec: 2448
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "2949b8185cefbaaf587a043d805cc670"
}
Frame {
msec: 2464
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "d4a03127ae5047184c736617deeac92d"
}
Frame {
msec: 2480
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "876c6c5ac4500de6234423bf6f3511d6"
}
Frame {
msec: 2496
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "eb08aa172cfbdb696b6f672dfa7b6fff"
}
Frame {
msec: 2512
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "a60c13b8f46faa0a35dbb539010550d4"
}
Frame {
msec: 2528
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "c6f8786506e0326a5734ab8aea782f95"
}
Frame {
msec: 2544
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "a49927f2aae24e692fc379f0ab6f4ee9"
}
Frame {
msec: 2560
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "2f1a2d50e1090b34ad1ea6a36eec4fe0"
}
Frame {
msec: 2576
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "a5ee24d37be960a88684748b73dc75fe"
}
Frame {
msec: 2592
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "28682389395b47ae33ceec1ba3beef4e"
}
Frame {
msec: 2608
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "1869667b50b76d99716dd0d7849901fa"
}
Frame {
msec: 2624
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "2806ee1005193f55825aa6147583985f"
}
Frame {
msec: 2640
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "c00589dce90e3ab2f2c8890f30f80d3d"
}
Frame {
msec: 2656
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "1f1881f0a29525e380ecbcce15499fa4"
}
Frame {
msec: 2672
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "2a4c3ff764545a3899c864680f22f0a3"
}
Frame {
msec: 2688
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "2685820514ce5d5729f3761b1eaa1682"
}
Frame {
msec: 2704
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "2685820514ce5d5729f3761b1eaa1682"
}
Frame {
msec: 2720
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "2685820514ce5d5729f3761b1eaa1682"
}
Frame {
msec: 2736
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "2685820514ce5d5729f3761b1eaa1682"
}
Frame {
msec: 2752
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "2685820514ce5d5729f3761b1eaa1682"
}
Frame {
msec: 2768
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "2685820514ce5d5729f3761b1eaa1682"
}
Frame {
msec: 2784
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "2685820514ce5d5729f3761b1eaa1682"
}
Frame {
msec: 2800
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "2685820514ce5d5729f3761b1eaa1682"
}
Frame {
msec: 2816
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "2685820514ce5d5729f3761b1eaa1682"
}
Frame {
msec: 2832
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "2685820514ce5d5729f3761b1eaa1682"
}
Frame {
msec: 2848
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "2685820514ce5d5729f3761b1eaa1682"
}
Frame {
msec: 2864
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "2685820514ce5d5729f3761b1eaa1682"
}
Frame {
msec: 2880
image: "test-pathview.2.png"
}
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 310; y: 277
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 324; y: 279
+ modifiers: 0
+ sendToViewport: true
+ }
Frame {
msec: 2896
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "ce00c77e8ff1768b41f5585344af1c58"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 330; y: 281
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 2912
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "24f401275fa6ec7d26234609792fe0b8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 346; y: 283
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 2928
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "d3c74863c627a1b922a6b6c4a24f8c40"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 358; y: 285
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 358; y: 285
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 2944
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "64a3209e6adc737065e5d5c3202a7283"
}
Frame {
msec: 2960
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "cf936ffe4330edefddb31c59368491fc"
}
Frame {
msec: 2976
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "a67213db044bb876f737cd355fe54444"
}
Frame {
msec: 2992
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "0f9e97057cbbd8071e0f5f61318bdf9c"
}
Frame {
msec: 3008
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "c5f38d334df86ebb6ac4600c83eced20"
}
Frame {
msec: 3024
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "6d8e6049a36eac4136dbdb5fb18d0650"
}
Frame {
msec: 3040
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "8ee97cff4a632e6e297bd3bdac27b8d4"
}
Frame {
msec: 3056
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "aca1fcd005d211d35245e64a44002c01"
}
Frame {
msec: 3072
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "7076180bf0eb14a5e733be9320f1f009"
}
Frame {
msec: 3088
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
- }
- Mouse {
- type: 2
- button: 1
- buttons: 1
- x: 728; y: 181
- modifiers: 0
- sendToViewport: true
+ hash: "e0a0545b3a0b6a0b07d3fa987e1d58b6"
}
Frame {
msec: 3104
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "0294b098ce7f0d381542776320e52d2e"
}
Frame {
msec: 3120
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ hash: "36f8bcc42add38fe149e34a703cf8a02"
}
Frame {
msec: 3136
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
- }
- Mouse {
- type: 5
- button: 0
- buttons: 1
- x: 727; y: 181
- modifiers: 0
- sendToViewport: true
+ hash: "631426bde50fd35d1da1c30d9878253e"
}
Frame {
msec: 3152
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
- }
- Mouse {
- type: 5
- button: 0
- buttons: 1
- x: 723; y: 181
- modifiers: 0
- sendToViewport: true
+ hash: "a4d64c9d378138bedf63389e58d8f1d6"
}
Frame {
msec: 3168
- hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
- }
- Mouse {
- type: 5
- button: 0
- buttons: 1
- x: 717; y: 184
- modifiers: 0
- sendToViewport: true
+ hash: "17fdf61bffd947c2e9898f5c4517fdf8"
}
Frame {
msec: 3184
- hash: "6dcec6cdaa35eba74607ba64d6ea2ec0"
- }
- Mouse {
- type: 5
- button: 0
- buttons: 1
- x: 705; y: 188
- modifiers: 0
- sendToViewport: true
+ hash: "653b8c7a55bc4ca763238098711eafa1"
}
Frame {
msec: 3200
- hash: "16b7b4847fe86b25d8d6136106a4c400"
- }
- Mouse {
- type: 5
- button: 0
- buttons: 1
- x: 686; y: 197
- modifiers: 0
- sendToViewport: true
+ hash: "89e15b3ee1b1fc945801e08cfcdba62c"
}
Frame {
msec: 3216
- hash: "d946d55b19c99fa25bf1c04f2b71026a"
- }
- Mouse {
- type: 5
- button: 0
- buttons: 1
- x: 661; y: 207
- modifiers: 0
- sendToViewport: true
+ hash: "7ea615af67336895e6cee6d3a39ff7de"
}
Frame {
msec: 3232
- hash: "96f40f5071365cde769c733fd1ef5a24"
- }
- Mouse {
- type: 5
- button: 0
- buttons: 1
- x: 626; y: 221
- modifiers: 0
- sendToViewport: true
+ hash: "88faee45db80f04ef1120c35057a5f7d"
}
Frame {
msec: 3248
- hash: "7004058b95b7eab3ebba5c80c0923982"
- }
- Mouse {
- type: 5
- button: 0
- buttons: 1
- x: 582; y: 235
- modifiers: 0
- sendToViewport: true
+ hash: "8cfe34047b29ac85e58d55e0f6e0b195"
}
Frame {
msec: 3264
- hash: "2c78880237c414182f97f1709f1eef0f"
- }
- Mouse {
- type: 5
- button: 0
- buttons: 1
- x: 532; y: 246
- modifiers: 0
- sendToViewport: true
+ hash: "39255546502fcb882005fe4c38c21fb0"
}
Frame {
msec: 3280
- hash: "c90a15ec9f88008ca8b0ec0185444d71"
- }
- Mouse {
- type: 3
- button: 1
- buttons: 0
- x: 532; y: 246
- modifiers: 0
- sendToViewport: true
+ hash: "6bf7a959a05fc27f651b2a3ba07de30d"
}
Frame {
msec: 3296
- hash: "c90a15ec9f88008ca8b0ec0185444d71"
+ hash: "c2c61cb8dbbbd38827277ab32579c6da"
}
Frame {
msec: 3312
- hash: "36461e2a4cd860cac32223b8ee73c657"
+ hash: "ff370d4b4e44c4cbacca96107105df21"
}
Frame {
msec: 3328
- hash: "5f9b3ad9202fb02a4c6fea28c248ad22"
+ hash: "ccadd9e070d54de21c76397d18ad3de8"
}
Frame {
msec: 3344
- hash: "d0d23c4e1ddb2d9ffa0ecc38030ae15c"
+ hash: "6302c39de00070b0a23f9dc87f74dd8d"
}
Frame {
msec: 3360
- hash: "8e2e2d3eaf557c453f34016b6614e495"
+ hash: "7ab69e6d9809c78dc723609bd2761206"
}
Frame {
msec: 3376
- hash: "7402c747fa7276293a0a72d48d342782"
+ hash: "c429cc724b39891805cf4c1448de60b3"
}
Frame {
msec: 3392
- hash: "6090c30e4d722a32c083a25171fb11ff"
+ hash: "396ddf0b01e9fe7c2bfb220e64a0c7ec"
}
Frame {
msec: 3408
- hash: "f770d940cf287fec4b0803f7310292a8"
+ hash: "7a519a4efeecef5e7623a270e458fb13"
}
Frame {
msec: 3424
- hash: "558e4ce32df69357b70a8285b00fe347"
+ hash: "869d174a939e0638a1a22d5c8a010c14"
}
Frame {
msec: 3440
- hash: "8814168503c9a72ea8d3fa1e503f33d9"
+ hash: "9ecd2cf4e3b42ff93bcbf4db9829666c"
}
Frame {
msec: 3456
- hash: "6f5513d22e545096fadc6f5c4112902e"
+ hash: "b06b58b250d3df365806a3f8991d57f3"
}
Frame {
msec: 3472
- hash: "43f11d8ac16fd3e8199e555528817e14"
+ hash: "7a6fb03feb2ae0af1f143daedd22a88b"
}
Frame {
msec: 3488
- hash: "d64bafdbd26878a323dae918d5e0a36d"
+ hash: "e9fe338dbe7afb69f3870743b0a18805"
}
Frame {
msec: 3504
- hash: "1c70bdddfc3751ae3864f008170f8b06"
+ hash: "04b8def2085e9ce4065b02b938915557"
}
Frame {
msec: 3520
- hash: "bb7a18691fcd371e9d382b5bba4a0573"
+ hash: "7e6942f72012875ba83a1c9121e1f786"
}
Frame {
msec: 3536
- hash: "547e15f5dea2d9aa3ed44640b25028b9"
+ hash: "291e2d79a79959d9c8c586b6bdc31689"
}
Frame {
msec: 3552
- hash: "c11b86a256fac6be10b9a54564903d6f"
+ hash: "e490bc7fd92f486b964cca967bd33b38"
}
Frame {
msec: 3568
- hash: "0ada2dc586894d5e37de2632d2b37b15"
+ hash: "0c9858e0445e25d2b12c84801de441cb"
}
Frame {
msec: 3584
- hash: "0ae1a39ea196a0e734d80dbdea67b285"
+ hash: "72ba7a4aacb150e1e9c6de72cff82258"
}
Frame {
msec: 3600
- hash: "3cb70e64f9ab8aad841326dc2d2f1615"
+ hash: "1daca95256842545a5b77bcc46782478"
}
Frame {
msec: 3616
- hash: "a8f8b5ff19df9163ea628b589b675a5e"
+ hash: "869f3d16e203ad47f1ae7ca83e369b75"
}
Frame {
msec: 3632
- hash: "26fcc73f477db0ea731bc18b00b4c791"
+ hash: "9cc9cb20aab3369f4e3c5259d291708c"
}
Frame {
msec: 3648
- hash: "8702e49f3f26e1e21970e78c8aa4040a"
+ hash: "a507b957bab3efe2023a65f8c8b3540a"
}
Frame {
msec: 3664
- hash: "1a482a39d02779d8733e348b713f2312"
+ hash: "9fce2a6cddd8b06a80ce16599b56caa6"
}
Frame {
msec: 3680
- hash: "c728cc4a8e4d0a8d983514f86a92eae0"
+ hash: "2f85d3064968e3e7b669f733fad58459"
}
Frame {
msec: 3696
- hash: "82360ab373b08bf6a5d9e9ea9d0d18aa"
+ hash: "6dd6fad85dc5317a22a05a8486317767"
}
Frame {
msec: 3712
- hash: "6231a4bce6cfc1e26a9606cc041acdbc"
+ hash: "b0faa2ec225cd96fb6d2fd05dc66bed1"
}
Frame {
msec: 3728
- hash: "6e3b48862fc749f15aa2dec1c17d1de0"
+ hash: "3188219f095c2a9ac7c0f6034463d769"
}
Frame {
msec: 3744
- hash: "6c9e79a5692a3810b2a9058790f54cd7"
+ hash: "b269e9fe4d14537c8bef0b66effe7319"
}
Frame {
msec: 3760
- hash: "0652c67fedda0d5e55858ddefff2da9e"
+ hash: "b269e9fe4d14537c8bef0b66effe7319"
}
Frame {
msec: 3776
- hash: "3b058c0efeb3a9da54a1de72a1792a83"
+ hash: "b269e9fe4d14537c8bef0b66effe7319"
}
Frame {
msec: 3792
- hash: "96e6fb39c8dbfe4a00bf116bf80aac4d"
+ hash: "b269e9fe4d14537c8bef0b66effe7319"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 174; y: 234
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 3808
- hash: "979c0c78c41e0f337cfe1b384fbbe51a"
+ hash: "9480eb8761d4ce90971903fcfab1e09e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 176; y: 236
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 3824
- hash: "8be0d6987a6d12864f30336b249e4b16"
+ hash: "30a6ac631e1a3433f252f56ee4337cdc"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 179; y: 238
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 3840
image: "test-pathview.3.png"
}
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 184; y: 243
+ modifiers: 0
+ sendToViewport: true
+ }
Frame {
msec: 3856
- hash: "31e665f804a52a4dc88eab5dba78ae5a"
+ hash: "ed07f9eea6cd2cd78a3e2479137f843d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 185; y: 244
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 3872
- hash: "b7d4cf5a6a3ac79da3be101b50b38bc2"
+ hash: "7a5b201cc8725dbf15d89907fffd4ee3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 197; y: 250
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 3888
- hash: "559b1b8467b611cdeb7f2ae660e3bf51"
+ hash: "bc2433b9e5f03cdbd35922d145a4ce59"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 213; y: 256
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 213; y: 256
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 3904
- hash: "66abb5af85e793569382efb04744d0de"
+ hash: "d443f23aa5449d5f2b11c47feab5a0ae"
}
Frame {
msec: 3920
- hash: "b64eff8bbea5a953d146333363825724"
+ hash: "c43f00d3ae4c8abbd20fc7157363b19d"
}
Frame {
msec: 3936
- hash: "47b794c971c4d47baf15e1d63d65ac03"
+ hash: "22d6f5e9fdfe44e73020e6f504002b7c"
}
Frame {
msec: 3952
- hash: "b3882fa14f3cb7428c660737656d7ea2"
+ hash: "4a9a285834aad5795adbefbe167028e2"
}
Frame {
msec: 3968
- hash: "a6bd71c7d3a0f3f53674ea8e1334e560"
+ hash: "561a6c005950830acf2a45ab9a207346"
}
Frame {
msec: 3984
- hash: "0926d3cd53aabb789686e34d91ef23dc"
+ hash: "b0387e3cfd455e1144d0bce9b51d6767"
}
Frame {
msec: 4000
- hash: "914c4fa7264111b4a42c82a60701d652"
+ hash: "610237f67aa7e5f8d5b363b1612b4966"
}
Frame {
msec: 4016
- hash: "84c1fa22440a61126b79c38605b6f9ca"
+ hash: "8034a5a7e0558d73051ea6c5bc750866"
}
Frame {
msec: 4032
- hash: "b684fcf9f4725cfc02af0187454dfaf8"
+ hash: "0e4dc8a9c124b51c5f1225f4c6a9ec63"
}
Frame {
msec: 4048
- hash: "2e94c1ca74af4eb836a0c505d131f263"
+ hash: "dc4e94522e8c64e9f2dbbf12a1f1aa3e"
}
Frame {
msec: 4064
- hash: "5f04912674e1bcdb16176976d10ce995"
+ hash: "7466c076a95f2f6bbc2b6ce306773337"
}
Frame {
msec: 4080
- hash: "aaf0bcef4a15aa1c699eaa1ce817c8ed"
+ hash: "787e2749905b97159fd0922c6cb388e2"
}
Frame {
msec: 4096
- hash: "97fd5bdcfa367191fbd3689658ab3273"
+ hash: "1e510d01afad190ec21de253bd8b4821"
}
Frame {
msec: 4112
- hash: "d76d6c59411636a0e9ac2e0c847b3fe3"
+ hash: "d740f40eb21be71ec70c00411d2ee76b"
}
Frame {
msec: 4128
- hash: "9cb88a76c962623b1a9cf4e7093d6e54"
+ hash: "887a6f445af8fccf4932eed575a09cbb"
}
Frame {
msec: 4144
- hash: "ec3d7075680296905b1bdd6fdd9fcc40"
+ hash: "fbb7e1d8cb9dd9016df0c33c69b1451a"
}
Frame {
msec: 4160
- hash: "43c70dabc45ed059e8b876eb2ba5c66e"
+ hash: "5025e5f04a0807cb298037d6dda8c3af"
}
Frame {
msec: 4176
- hash: "8f97ca5c3092a20009c5d00139105a22"
+ hash: "b9924f24f60c24087be165e8e385ebb0"
}
Frame {
msec: 4192
- hash: "d0f225d4b03495218f7916698e254338"
+ hash: "2bab970787ac8b056401c8a73cb1a3c5"
}
Frame {
msec: 4208
- hash: "f8725467353a8f27bc5570af157c93c7"
+ hash: "bda954bfafaa2915d760cf7a602b326f"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 187; y: 242
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 4224
- hash: "749c8ca5c0a7774c81805b792e6b70e3"
+ hash: "9b109bb9e786a45a78849436ea32a484"
}
Frame {
msec: 4240
- hash: "d353c4a8a5eecb1dce30f4a5b85b1ef4"
+ hash: "9b109bb9e786a45a78849436ea32a484"
}
Frame {
msec: 4256
- hash: "a7105f3f1ddace730d0b4a12a3560208"
+ hash: "9b109bb9e786a45a78849436ea32a484"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 187; y: 243
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 4272
- hash: "918f480af8a35f6074ff1e202dae2660"
+ hash: "9b109bb9e786a45a78849436ea32a484"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 199; y: 252
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 4288
- hash: "ed98d08eb30db1b41aaf2a58f3b59398"
+ hash: "cc3c61f49a7b3c395670b86c8078a337"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 223; y: 262
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 4304
- hash: "c362cf053b3749a44d1fc33483f9952b"
+ hash: "464d09b53b78fe5474d9c1d022bee9fd"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 251; y: 272
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 251; y: 272
+ modifiers: 0
+ sendToViewport: true
}
Frame {
msec: 4320
- hash: "9b01b2c771ef86ff4a8ee3f6a4676e3c"
+ hash: "aab17f48ff506cda84543cbe0d8a1ce4"
}
Frame {
msec: 4336
- hash: "70ccec3c9db95206b5589d43dcd52b13"
+ hash: "b7ba6c107f4085822a738120a913ba0c"
}
Frame {
msec: 4352
- hash: "57e7397c6aadd0d4d5c9d9d5fcdd8fde"
+ hash: "751b79e202a70dcc9a86c3a1450172b8"
}
Frame {
msec: 4368
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "bb03f969fd6987255ff113ef98ed2bb1"
}
Frame {
msec: 4384
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "c33302b366441fa2d8753d5ce314cd37"
}
Frame {
msec: 4400
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "4cdf32004382bcaca5a68cb92761caa2"
}
Frame {
msec: 4416
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "d3fe18ea7dcbee0709a2041e50b87154"
}
Frame {
msec: 4432
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "ac58a7adb0e7a354a058d7e9a7010c06"
}
Frame {
msec: 4448
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "bdf8a8934a372ab49f4b6e9c95c7f591"
}
Frame {
msec: 4464
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "d2e8b417b74ec5f6e23f0935a4d0aa98"
}
Frame {
msec: 4480
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "0f94c6ca3ffbd730c2d813a991d21ca3"
}
Frame {
msec: 4496
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "fb7728eebb2fa8f5255dc7435d20bbb6"
}
Frame {
msec: 4512
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "c8211e8adcef525c296531a3d369f717"
}
Frame {
msec: 4528
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "f24de36c85b87953977fa8b6456209dc"
}
Frame {
msec: 4544
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "9ce7cf389af08cb1ba2534418f51857b"
}
Frame {
msec: 4560
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "17d1f3ae0dba0bde222bb2483a403fbd"
}
Frame {
msec: 4576
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "1748d75e229945012ece689b3784a02c"
}
Frame {
msec: 4592
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "6786fa9e31d6f0a71a285c790aa5b008"
}
Frame {
msec: 4608
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "f2a2ba33b41d8d522e8aab34c7da8f7b"
}
Frame {
msec: 4624
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "aa53142d1b433ae9f748aef5cb7bef46"
}
Frame {
msec: 4640
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "9c6802b2b0a419a4aaf9909c0f88c66e"
}
Frame {
msec: 4656
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "206b11f2acd742d55ddd8acf7415bbeb"
}
Frame {
msec: 4672
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "36876cf600cbf9c3b15f243617c9474e"
}
Frame {
msec: 4688
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "1f5daf97294b490546657c5d9e12022e"
}
Frame {
msec: 4704
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "637fc34fc2cf6139ba8809be54a2a0fc"
}
Frame {
msec: 4720
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "9f824bd9e156980873619b1978f226bb"
}
Frame {
msec: 4736
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "7002444129a5077ce5be44a5e2530328"
}
Frame {
msec: 4752
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "42b7a44030ad4fc50ceb6a60bc97991e"
}
Frame {
msec: 4768
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "ae986cac541033398076fb918136212e"
}
Frame {
msec: 4784
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "6bdd9f764b1675e5b0feced8c2d831a6"
}
Frame {
msec: 4800
@@ -1382,114 +1558,278 @@ VisualTest {
}
Frame {
msec: 4816
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "07dfffe85adc4b52565e9ed156fa3ed6"
}
Frame {
msec: 4832
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "c987bbe9fbf74bb6cf2686a5ee97c59a"
}
Frame {
msec: 4848
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "19568159ec2282d5f150583baa0a8a94"
}
Frame {
msec: 4864
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "5b176ef6bf70ff1a9805ca85b1b0c1a2"
}
Frame {
msec: 4880
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "de716a8c15a46bf1621878794e968c53"
}
Frame {
msec: 4896
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "241af9ab77c86cdb75f73339548604ad"
}
Frame {
msec: 4912
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "afc7168ecb7fa7e3310ca818b75f7a1c"
}
Frame {
msec: 4928
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "83bff911b502a34d139a724f686bb1f9"
}
Frame {
msec: 4944
- hash: "299b24eae7720e1711744b23335bca8c"
- }
- Key {
- type: 6
- key: 16777249
- modifiers: 0
- text: ""
- autorep: false
- count: 1
+ hash: "f4d3fb54ae5be2b13065cd4316b06837"
}
Frame {
msec: 4960
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "d29c7dfedf9dd355d60e394528b3b938"
}
Frame {
msec: 4976
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "ddf23d860ea71ab4b407de1a5f913f74"
}
Frame {
msec: 4992
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "a0dbb6ecbfd08f9ebdd641fea5dae16c"
}
Frame {
msec: 5008
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "7ed3170e55e3c3c9561959ad4c56d326"
}
Frame {
msec: 5024
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "dbde5f508aabc2d1f2ccfaf135efeca9"
}
Frame {
msec: 5040
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "72039739be41bf63b3959bdc90ce25bb"
}
Frame {
msec: 5056
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "417789daefe6bc01320db7803ae31d61"
}
Frame {
msec: 5072
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "7e57dbddaf379f4316182048fa9e2d6f"
}
Frame {
msec: 5088
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "aeca9a4df94d2b9ac2a713531a7d98f1"
}
Frame {
msec: 5104
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "98ad6694f23678819020d6ac0161651c"
}
Frame {
msec: 5120
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "b6eba3872da19ec677eee419ae9cccbc"
}
Frame {
msec: 5136
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "e824909bfe7b6d54773bb218ba93e884"
}
Frame {
msec: 5152
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "3be04f3ff6d948538f4472bc6bfadb0f"
}
Frame {
msec: 5168
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "e05ff21dda1d978a2ac2eedd3826b6f7"
}
Frame {
msec: 5184
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "8ee970b2b197c8d879a7b1703cbd4dcd"
}
Frame {
msec: 5200
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "e583845e7719d2776c6362c34f77937c"
}
Frame {
msec: 5216
- hash: "299b24eae7720e1711744b23335bca8c"
+ hash: "593fd590531ccfb59d890b8043eaab9c"
+ }
+ Frame {
+ msec: 5232
+ hash: "593fd590531ccfb59d890b8043eaab9c"
+ }
+ Frame {
+ msec: 5248
+ hash: "593fd590531ccfb59d890b8043eaab9c"
+ }
+ Frame {
+ msec: 5264
+ hash: "593fd590531ccfb59d890b8043eaab9c"
+ }
+ Frame {
+ msec: 5280
+ hash: "593fd590531ccfb59d890b8043eaab9c"
+ }
+ Frame {
+ msec: 5296
+ hash: "593fd590531ccfb59d890b8043eaab9c"
+ }
+ Frame {
+ msec: 5312
+ hash: "593fd590531ccfb59d890b8043eaab9c"
+ }
+ Frame {
+ msec: 5328
+ hash: "593fd590531ccfb59d890b8043eaab9c"
+ }
+ Frame {
+ msec: 5344
+ hash: "593fd590531ccfb59d890b8043eaab9c"
+ }
+ Frame {
+ msec: 5360
+ hash: "593fd590531ccfb59d890b8043eaab9c"
+ }
+ Frame {
+ msec: 5376
+ hash: "593fd590531ccfb59d890b8043eaab9c"
+ }
+ Frame {
+ msec: 5392
+ hash: "593fd590531ccfb59d890b8043eaab9c"
+ }
+ Frame {
+ msec: 5408
+ hash: "593fd590531ccfb59d890b8043eaab9c"
+ }
+ Frame {
+ msec: 5424
+ hash: "593fd590531ccfb59d890b8043eaab9c"
+ }
+ Frame {
+ msec: 5440
+ hash: "593fd590531ccfb59d890b8043eaab9c"
+ }
+ Frame {
+ msec: 5456
+ hash: "593fd590531ccfb59d890b8043eaab9c"
+ }
+ Frame {
+ msec: 5472
+ hash: "593fd590531ccfb59d890b8043eaab9c"
+ }
+ Frame {
+ msec: 5488
+ hash: "593fd590531ccfb59d890b8043eaab9c"
+ }
+ Frame {
+ msec: 5504
+ hash: "593fd590531ccfb59d890b8043eaab9c"
+ }
+ Frame {
+ msec: 5520
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5536
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5552
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5568
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5584
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5600
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5616
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5632
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5648
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5664
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5680
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5696
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5712
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5728
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5744
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5760
+ image: "test-pathview.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5792
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5808
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5824
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5840
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5856
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5872
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5888
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
+ }
+ Frame {
+ msec: 5904
+ hash: "c0d0f62d9078f6be493d5545a2ae78ad"
}
}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml b/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml
index 3bcab5aa2b..e6e1a70bae 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml
@@ -59,4 +59,9 @@ Rectangle {
PathAttribute { name: "angle"; value: 45 }
}
}
+
+ Column {
+ Rectangle { width: 20; height: 20; color: "red"; opacity: photoPathView.moving ? 1 : 0 }
+ Rectangle { width: 20; height: 20; color: "blue"; opacity: photoPathView.flicking ? 1 : 0 }
+ }
}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml
index 73dd4d7844..e268a60e83 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml
@@ -34,10 +34,10 @@ Rectangle {
text: s.text; font.underline: true; font.overline: true; font.strikeout: true
}
Text {
- text: s.text; font.letterSpacing: 200
+ text: s.text; font.letterSpacing: 2
}
Text {
- text: s.text; font.underline: true; font.letterSpacing: 200; font.capitalization: "AllUppercase"; color: "blue"
+ text: s.text; font.underline: true; font.letterSpacing: 2; font.capitalization: "AllUppercase"; color: "blue"
}
Text {
text: s.text; font.overline: true; font.wordSpacing: 25; font.capitalization: "Capitalize"; color: "green"
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml
index b41b93a31a..a883b9cacc 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml
@@ -34,10 +34,10 @@ Rectangle {
text: s.text; font.underline: true; font.overline: true; font.strikeout: true
}
Text {
- text: s.text; font.letterSpacing: 200
+ text: s.text; font.letterSpacing: 2
}
Text {
- text: s.text; font.underline: true; font.letterSpacing: 200; font.capitalization: "AllUppercase"; color: "blue"
+ text: s.text; font.underline: true; font.letterSpacing: 2; font.capitalization: "AllUppercase"; color: "blue"
}
Text {
text: s.text; font.overline: true; font.wordSpacing: 25; font.capitalization: "Capitalize"; color: "green"
diff --git a/tests/auto/gui.pro b/tests/auto/gui.pro
index cfaa3fa0bf..2d9ea937a2 100644
--- a/tests/auto/gui.pro
+++ b/tests/auto/gui.pro
@@ -112,6 +112,7 @@ SUBDIRS=\
qmdisubwindow \
qmessagebox \
qmetaobject \
+ qmimedata \
qmouseevent_modal \
qmovie \
qnetworkaccessmanager_and_qprogressdialog \
diff --git a/tests/auto/guiapplauncher/tst_guiapplauncher.cpp b/tests/auto/guiapplauncher/tst_guiapplauncher.cpp
index 048ea357be..4b3ce18987 100644
--- a/tests/auto/guiapplauncher/tst_guiapplauncher.cpp
+++ b/tests/auto/guiapplauncher/tst_guiapplauncher.cpp
@@ -128,10 +128,10 @@ const struct Example examples[] = {
{"mainwindows/menus Example", "mainwindows/menus", "menus", 10, -1},
{"mainwindows/recentfiles Example", "mainwindows/recentfiles", "recentfiles", 10, -1},
{"mainwindows/sdi Example", "mainwindows/sdi", "sdi", 10, -1},
- {"multitouch/dials Example", "multitouch/dials", "dials", 10, -1},
- {"multitouch/fingerpaint Example", "multitouch/fingerpaint", "fingerpaint", 10, -1},
- {"multitouch/knobs Example", "multitouch/knobs", "knobs", 10, -1},
- {"multitouch/pinchzoom Example", "multitouch/pinchzoom", "pinchzoom", 10, -1},
+ {"touch/dials Example", "touch/dials", "dials", 10, -1},
+ {"touch/fingerpaint Example", "touch/fingerpaint", "fingerpaint", 10, -1},
+ {"touch/knobs Example", "touch/knobs", "knobs", 10, -1},
+ {"touch/pinchzoom Example", "touch/pinchzoom", "pinchzoom", 10, -1},
{"opengl/2dpainting Example", "opengl/2dpainting", "2dpainting", 10, -1},
{"opengl/grabber Example", "opengl/grabber", "grabber", 10, -1},
{"opengl/hellogl Example", "opengl/hellogl", "hellogl", 10, -1},
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
index 0765bfcdfd..f58f932391 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
@@ -275,3 +275,30 @@ void bogosity()
// no spaces here. test collateral damage from ignoring equal sign
Class::member=QObject::tr("just QObject");
}
+
+
+
+namespace Internal {
+
+class Message : public QObject
+{
+ Q_OBJECT
+public:
+ Message(QObject *parent = 0);
+};
+
+} // The temporary closing of the namespace triggers the problem
+
+namespace Internal {
+
+static inline QString message1()
+{
+ return Message::tr("message1"); // Had no namespace
+}
+
+static inline QString message2()
+{
+ return Message::tr("message2"); // Already had namespace
+}
+
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
index 208191d8a8..7ac318e685 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
@@ -120,6 +120,19 @@ backslashed \ stuff.</source>
</message>
</context>
<context>
+ <name>Internal::Message</name>
+ <message>
+ <location filename="main.cpp" line="296"/>
+ <source>message1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.cpp" line="301"/>
+ <source>message2</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>Kåntekst</name>
<message utf8="true">
<location filename="finddialog.cpp" line="180"/>
diff --git a/tests/auto/mediaobject/tst_mediaobject.cpp b/tests/auto/mediaobject/tst_mediaobject.cpp
index 994057b128..322e2e4586 100644
--- a/tests/auto/mediaobject/tst_mediaobject.cpp
+++ b/tests/auto/mediaobject/tst_mediaobject.cpp
@@ -201,12 +201,8 @@ void tst_MediaObject::stateChanged(Phonon::State newstate, Phonon::State oldstat
void tst_MediaObject::testPlayFromResource()
{
-#ifdef Q_OS_SYMBIAN
- QSKIP("Not implemented yet.", SkipAll);
-#else
- QFile file(MEDIA_FILEPATH);
MediaObject media;
- media.setCurrentSource(&file);
+ media.setCurrentSource(QString(MEDIA_FILEPATH));
QVERIFY(media.state() != Phonon::ErrorState);
if (media.state() != Phonon::StoppedState)
QTest::waitForSignal(&media, SIGNAL(stateChanged(Phonon::State, Phonon::State)), 10000);
@@ -215,7 +211,6 @@ void tst_MediaObject::testPlayFromResource()
if (media.state() != Phonon::PlayingState)
QTest::waitForSignal(&media, SIGNAL(stateChanged(Phonon::State, Phonon::State)), 10000);
QCOMPARE(media.state(), Phonon::PlayingState);
-#endif
}
void tst_MediaObject::testPlayIllegalFile()
diff --git a/tests/auto/moc/tst_moc.cpp b/tests/auto/moc/tst_moc.cpp
index 19f3677008..d3a7e0355c 100644
--- a/tests/auto/moc/tst_moc.cpp
+++ b/tests/auto/moc/tst_moc.cpp
@@ -491,6 +491,7 @@ private slots:
void typenameWithUnsigned();
void warnOnVirtualSignal();
void QTBUG5590_dummyProperty();
+ void QTBUG12260_defaultTemplate();
signals:
void sigWithUnsignedArg(unsigned foo);
void sigWithSignedArg(signed foo);
@@ -1340,6 +1341,27 @@ signals:
void testSignal(TestTemplate2<const int, const short*>);
};
+class QTBUG12260_defaultTemplate_Object : public QObject
+{ Q_OBJECT
+public slots:
+#if !(defined(Q_CC_GNU) && __GNUC__ == 4 && __GNUC_MINOR__ <= 3) || defined(Q_MOC_RUN)
+ void doSomething(QHash<QString, QVariant> values = QHash<QString, QVariant>() ) { Q_UNUSED(values); }
+#else
+ // we want to test the previous function, but gcc < 4.4 seemed to have a bug similar to the one moc has.
+ typedef QHash<QString, QVariant> WorkaroundGCCBug;
+ void doSomething(QHash<QString, QVariant> values = WorkaroundGCCBug() ) { Q_UNUSED(values); }
+#endif
+
+ void doAnotherThing(bool a = (1 < 3), bool b = (1 > 4)) { Q_UNUSED(a); Q_UNUSED(b); }
+};
+
+
+void tst_Moc::QTBUG12260_defaultTemplate()
+{
+ QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("doSomething(QHash<QString,QVariant>)") != -1);
+ QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("doAnotherThing(bool,bool)") != -1);
+}
+
QTEST_APPLESS_MAIN(tst_Moc)
#include "tst_moc.moc"
diff --git a/tests/auto/network.pro b/tests/auto/network.pro
index 4f205fe049..31c754c97a 100644
--- a/tests/auto/network.pro
+++ b/tests/auto/network.pro
@@ -7,6 +7,7 @@ SUBDIRS=\
networkselftest \
qabstractnetworkcache \
qabstractsocket \
+ qauthenticator \
qeventloop \
qftp \
qhostaddress \
@@ -35,7 +36,8 @@ SUBDIRS=\
qsslkey \
qsslsocket \
-contains(QT_CONFIG, private_tests): SUBDIRS -= \
+!contains(QT_CONFIG, private_tests): SUBDIRS -= \
+ qauthenticator \
qhttpnetworkconnection \
qhttpnetworkreply \
qnativesocketengine \
diff --git a/tests/auto/qauthenticator/qauthenticator.pro b/tests/auto/qauthenticator/qauthenticator.pro
new file mode 100644
index 0000000000..05f83bc166
--- /dev/null
+++ b/tests/auto/qauthenticator/qauthenticator.pro
@@ -0,0 +1,5 @@
+load(qttest_p4)
+requires(contains(QT_CONFIG,private_tests))
+QT = core network
+SOURCES += tst_qauthenticator.cpp
+DEFINES += SRCDIR=\\\"$$PWD/\\\"
diff --git a/tests/auto/qauthenticator/tst_qauthenticator.cpp b/tests/auto/qauthenticator/tst_qauthenticator.cpp
new file mode 100644
index 0000000000..37d6774e3e
--- /dev/null
+++ b/tests/auto/qauthenticator/tst_qauthenticator.cpp
@@ -0,0 +1,155 @@
+/****************************************************************************
+**
+** 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 FOO 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 <QtCore/QString>
+#include <QtTest/QtTest>
+#include <QtCore/QCoreApplication>
+#include <QtNetwork/QAuthenticator>
+
+#include <private/qauthenticator_p.h>
+
+class tst_QAuthenticator : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_QAuthenticator();
+
+private Q_SLOTS:
+ void basicAuth();
+ void basicAuth_data();
+
+ void ntlmAuth_data();
+ void ntlmAuth();
+};
+
+tst_QAuthenticator::tst_QAuthenticator()
+{
+}
+
+void tst_QAuthenticator::basicAuth_data()
+{
+ QTest::addColumn<QString>("data");
+ QTest::addColumn<QString>("realm");
+ QTest::addColumn<QString>("user");
+ QTest::addColumn<QString>("password");
+ QTest::addColumn<QByteArray>("expectedReply");
+
+ QTest::newRow("just-user") << "" << "" << "foo" << "" << QByteArray("foo:").toBase64();
+ QTest::newRow("user-password") << "" << "" << "foo" << "bar" << QByteArray("foo:bar").toBase64();
+ QTest::newRow("user-password-realm") << "realm=\"secure area\"" << "secure area" << "foo" << "bar" << QByteArray("foo:bar").toBase64();
+}
+
+void tst_QAuthenticator::basicAuth()
+{
+ QFETCH(QString, data);
+ QFETCH(QString, realm);
+ QFETCH(QString, user);
+ QFETCH(QString, password);
+ QFETCH(QByteArray, expectedReply);
+
+ QAuthenticator auth;
+ auth.detach();
+ QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(auth);
+ QVERIFY(priv->phase == QAuthenticatorPrivate::Start);
+
+ QList<QPair<QByteArray, QByteArray> > headers;
+ headers << qMakePair(QByteArray("WWW-Authenticate"), "Basic " + data.toUtf8());
+ priv->parseHttpResponse(headers, /*isProxy = */ false);
+
+ QCOMPARE(auth.realm(), realm);
+ QCOMPARE(auth.option("realm").toString(), realm);
+
+ auth.setUser(user);
+ auth.setPassword(password);
+
+ QVERIFY(priv->phase == QAuthenticatorPrivate::Start);
+
+ QCOMPARE(priv->calculateResponse("GET", "/").constData(), ("Basic " + expectedReply).constData());
+}
+
+void tst_QAuthenticator::ntlmAuth_data()
+{
+ QTest::addColumn<QString>("data");
+ QTest::addColumn<QString>("realm");
+
+ QTest::newRow("no-realm") << "TlRMTVNTUAACAAAAHAAcADAAAAAFAoEATFZ3OLRQADIAAAAAAAAAAJYAlgBMAAAAUQBUAC0AVABFAFMAVAAtAEQATwBNAEEASQBOAAIAHABRAFQALQBUAEUAUwBUAC0ARABPAE0AQQBJAE4AAQAcAFEAVAAtAFQARQBTAFQALQBTAEUAUgBWAEUAUgAEABYAcQB0AC0AdABlAHMAdAAtAG4AZQB0AAMANABxAHQALQB0AGUAcwB0AC0AcwBlAHIAdgBlAHIALgBxAHQALQB0AGUAcwB0AC0AbgBlAHQAAAAAAA==" << "";
+ QTest::newRow("with-realm") << "TlRMTVNTUAACAAAADAAMADgAAAAFAoECWCZkccFFAzwAAAAAAAAAAL4AvgBEAAAABQLODgAAAA9NAEcARABOAE8ASwACAAwATQBHAEQATgBPAEsAAQAcAE4ATwBLAC0AQQBNAFMAUwBTAEYARQAtADAAMQAEACAAbQBnAGQAbgBvAGsALgBuAG8AawBpAGEALgBjAG8AbQADAD4AbgBvAGsALQBhAG0AcwBzAHMAZgBlAC0AMAAxAC4AbQBnAGQAbgBvAGsALgBuAG8AawBpAGEALgBjAG8AbQAFACAAbQBnAGQAbgBvAGsALgBuAG8AawBpAGEALgBjAG8AbQAAAAAA" << "NOE";
+}
+
+void tst_QAuthenticator::ntlmAuth()
+{
+ QFETCH(QString, data);
+ QFETCH(QString, realm);
+
+ QAuthenticator auth;
+ auth.detach();
+ QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(auth);
+ QVERIFY(priv->phase == QAuthenticatorPrivate::Start);
+
+ QList<QPair<QByteArray, QByteArray> > headers;
+
+ // NTLM phase 1: negotiate
+ // This phase of NTLM contains no information, other than what we're willing to negotiate
+ // Current implementation uses flags:
+ // NTLMSSP_NEGOTIATE_UNICODE | NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_REQUEST_TARGET
+ headers << qMakePair<QByteArray, QByteArray>("WWW-Authenticate", "NTLM");
+ priv->parseHttpResponse(headers, /*isProxy = */ false);
+ QCOMPARE(priv->calculateResponse("GET", "/").constData(), "NTLM TlRMTVNTUAABAAAABQIAAAAAAAAAAAAAAAAAAAAAAAA=");
+
+ // NTLM phase 2: challenge
+ headers.clear();
+ headers << qMakePair(QByteArray("WWW-Authenticate"), "NTLM " + data.toUtf8());
+ priv->parseHttpResponse(headers, /*isProxy = */ false);
+
+ QEXPECT_FAIL("with-realm", "NTLM authentication code doesn't extract the realm", Continue);
+ QCOMPARE(auth.realm(), realm);
+
+ auth.setUser("unimportant");
+ auth.setPassword("unimportant");
+
+ QVERIFY(!priv->calculateResponse("GET", "/").isEmpty());
+}
+
+QTEST_MAIN(tst_QAuthenticator);
+
+#include "tst_qauthenticator.moc"
diff --git a/tests/auto/qdatetime/tst_qdatetime.cpp b/tests/auto/qdatetime/tst_qdatetime.cpp
index 0900b35489..184148754d 100644
--- a/tests/auto/qdatetime/tst_qdatetime.cpp
+++ b/tests/auto/qdatetime/tst_qdatetime.cpp
@@ -959,16 +959,30 @@ void tst_QDateTime::currentDateTime()
#endif
QDateTime upperBound;
upperBound.setTime_t(buf2);
- upperBound = upperBound.addSecs(1);
-
- QVERIFY(lowerBound < upperBound);
-
- QVERIFY(lowerBound <= dt1);
- QVERIFY(dt1 < upperBound);
- QVERIFY(lowerBound <= dt2);
- QVERIFY(dt2 < upperBound);
- QVERIFY(lowerBound <= dt3);
- QVERIFY(dt3 < upperBound);
+ // Note we must add 2 seconds here because time() may return up to
+ // 1 second difference from the more accurate method used by QDateTime::currentDateTime()
+ upperBound = upperBound.addSecs(2);
+
+ QString details = QString("\n"
+ "lowerBound: %1\n"
+ "dt1: %2\n"
+ "dt2: %3\n"
+ "dt3: %4\n"
+ "upperBound: %5\n")
+ .arg(lowerBound.toTime_t())
+ .arg(dt1.toTime_t())
+ .arg(dt2.toTime_t())
+ .arg(dt3.toTime_t())
+ .arg(upperBound.toTime_t());
+
+ QVERIFY2(lowerBound < upperBound, qPrintable(details));
+
+ QVERIFY2(lowerBound <= dt1, qPrintable(details));
+ QVERIFY2(dt1 < upperBound, qPrintable(details));
+ QVERIFY2(lowerBound <= dt2, qPrintable(details));
+ QVERIFY2(dt2 < upperBound, qPrintable(details));
+ QVERIFY2(lowerBound <= dt3, qPrintable(details));
+ QVERIFY2(dt3 < upperBound, qPrintable(details));
QVERIFY(dt1.timeSpec() == Qt::LocalTime);
QVERIFY(dt2.timeSpec() == Qt::LocalTime);
@@ -998,16 +1012,30 @@ void tst_QDateTime::currentDateTimeUtc()
#endif
QDateTime upperBound;
upperBound.setTime_t(buf2);
- upperBound = upperBound.addSecs(1);
-
- QVERIFY(lowerBound < upperBound);
-
- QVERIFY(lowerBound <= dt1);
- QVERIFY(dt1 < upperBound);
- QVERIFY(lowerBound <= dt2);
- QVERIFY(dt2 < upperBound);
- QVERIFY(lowerBound <= dt3);
- QVERIFY(dt3 < upperBound);
+ // Note we must add 2 seconds here because time() may return up to
+ // 1 second difference from the more accurate method used by QDateTime::currentDateTime()
+ upperBound = upperBound.addSecs(2);
+
+ QString details = QString("\n"
+ "lowerBound: %1\n"
+ "dt1: %2\n"
+ "dt2: %3\n"
+ "dt3: %4\n"
+ "upperBound: %5\n")
+ .arg(lowerBound.toTime_t())
+ .arg(dt1.toTime_t())
+ .arg(dt2.toTime_t())
+ .arg(dt3.toTime_t())
+ .arg(upperBound.toTime_t());
+
+ QVERIFY2(lowerBound < upperBound, qPrintable(details));
+
+ QVERIFY2(lowerBound <= dt1, qPrintable(details));
+ QVERIFY2(dt1 < upperBound, qPrintable(details));
+ QVERIFY2(lowerBound <= dt2, qPrintable(details));
+ QVERIFY2(dt2 < upperBound, qPrintable(details));
+ QVERIFY2(lowerBound <= dt3, qPrintable(details));
+ QVERIFY2(dt3 < upperBound, qPrintable(details));
QVERIFY(dt1.timeSpec() == Qt::UTC);
QVERIFY(dt2.timeSpec() == Qt::LocalTime);
diff --git a/tests/auto/qdbusinterface/tst_qdbusinterface.cpp b/tests/auto/qdbusinterface/tst_qdbusinterface.cpp
index d8ff2d3ef0..a870e47ea5 100644
--- a/tests/auto/qdbusinterface/tst_qdbusinterface.cpp
+++ b/tests/auto/qdbusinterface/tst_qdbusinterface.cpp
@@ -70,18 +70,34 @@ class MyObject: public QObject
" <arg direction=\"in\" type=\"v\" name=\"ping\" />\n"
" <arg direction=\"out\" type=\"v\" name=\"ping\" />\n"
" </method>\n"
+" <method name=\"ping_invokable\" >\n"
+" <arg direction=\"in\" type=\"v\" name=\"ping_invokable\" />\n"
+" <arg direction=\"out\" type=\"v\" name=\"ping_invokable\" />\n"
+" </method>\n"
" <method name=\"ping\" >\n"
" <arg direction=\"in\" type=\"v\" name=\"ping1\" />\n"
" <arg direction=\"in\" type=\"v\" name=\"ping2\" />\n"
" <arg direction=\"out\" type=\"v\" name=\"pong1\" />\n"
" <arg direction=\"out\" type=\"v\" name=\"pong2\" />\n"
" </method>\n"
+" <method name=\"ping_invokable\" >\n"
+" <arg direction=\"in\" type=\"v\" name=\"ping1_invokable\" />\n"
+" <arg direction=\"in\" type=\"v\" name=\"ping2_invokable\" />\n"
+" <arg direction=\"out\" type=\"v\" name=\"pong1_invokable\" />\n"
+" <arg direction=\"out\" type=\"v\" name=\"pong2_invokable\" />\n"
+" </method>\n"
" <method name=\"ping\" >\n"
" <arg direction=\"in\" type=\"ai\" name=\"ping\" />\n"
" <arg direction=\"out\" type=\"ai\" name=\"ping\" />\n"
" <annotation name=\"com.trolltech.QtDBus.QtTypeName.In0\" value=\"QList&lt;int&gt;\"/>\n"
" <annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"QList&lt;int&gt;\"/>\n"
" </method>\n"
+" <method name=\"ping_invokable\" >\n"
+" <arg direction=\"in\" type=\"ai\" name=\"ping_invokable\" />\n"
+" <arg direction=\"out\" type=\"ai\" name=\"ping_invokable\" />\n"
+" <annotation name=\"com.trolltech.QtDBus.QtTypeName.In0\" value=\"QList&lt;int&gt;\"/>\n"
+" <annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"QList&lt;int&gt;\"/>\n"
+" </method>\n"
" </interface>\n"
"")
Q_PROPERTY(int prop1 READ prop1 WRITE setProp1)
@@ -120,6 +136,20 @@ public:
m_complexProp = value;
}
+ Q_INVOKABLE void ping_invokable(QDBusMessage msg)
+ {
+ QDBusConnection sender = QDBusConnection::sender();
+ if (!sender.isConnected())
+ exit(1);
+
+ ++callCount;
+ callArgs = msg.arguments();
+
+ msg.setDelayedReply(true);
+ if (!sender.send(msg.createReply(callArgs)))
+ exit(1);
+ }
+
public slots:
void ping(QDBusMessage msg)
@@ -220,6 +250,7 @@ void tst_QDBusInterface::initTestCase()
con.registerObject("/", &obj, QDBusConnection::ExportAllProperties
| QDBusConnection::ExportAllSlots
+ | QDBusConnection::ExportAllInvokables
| QDBusConnection::ExportChildObjects);
}
@@ -283,7 +314,7 @@ void tst_QDBusInterface::introspect()
const QMetaObject *mo = iface.metaObject();
- QCOMPARE(mo->methodCount() - mo->methodOffset(), 4);
+ QCOMPARE(mo->methodCount() - mo->methodOffset(), 7);
QVERIFY(mo->indexOfSignal(TEST_SIGNAL_NAME "(QString)") != -1);
QCOMPARE(mo->propertyCount() - mo->propertyOffset(), 2);
@@ -298,6 +329,8 @@ void tst_QDBusInterface::callMethod()
TEST_INTERFACE_NAME);
MyObject::callCount = 0;
+
+ // call a SLOT method
QDBusMessage reply = iface.call("ping", qVariantFromValue(QDBusVariant("foo")));
QCOMPARE(MyObject::callCount, 1);
QCOMPARE(reply.type(), QDBusMessage::ReplyMessage);
@@ -315,6 +348,25 @@ void tst_QDBusInterface::callMethod()
dv = qdbus_cast<QDBusVariant>(v);
QCOMPARE(dv.variant().type(), QVariant::String);
QCOMPARE(dv.variant().toString(), QString("foo"));
+
+ // call an INVOKABLE method
+ reply = iface.call("ping_invokable", qVariantFromValue(QDBusVariant("bar")));
+ QCOMPARE(MyObject::callCount, 2);
+ QCOMPARE(reply.type(), QDBusMessage::ReplyMessage);
+
+ // verify what the callee received
+ QCOMPARE(MyObject::callArgs.count(), 1);
+ v = MyObject::callArgs.at(0);
+ dv = qdbus_cast<QDBusVariant>(v);
+ QCOMPARE(dv.variant().type(), QVariant::String);
+ QCOMPARE(dv.variant().toString(), QString("bar"));
+
+ // verify reply
+ QCOMPARE(reply.arguments().count(), 1);
+ v = reply.arguments().at(0);
+ dv = qdbus_cast<QDBusVariant>(v);
+ QCOMPARE(dv.variant().type(), QVariant::String);
+ QCOMPARE(dv.variant().toString(), QString("bar"));
}
void tst_QDBusInterface::invokeMethod()
@@ -323,8 +375,9 @@ void tst_QDBusInterface::invokeMethod()
QDBusInterface iface(QDBusConnection::sessionBus().baseService(), QLatin1String("/"),
TEST_INTERFACE_NAME);
- // make the call without a return type
MyObject::callCount = 0;
+
+ // make the SLOT call without a return type
QDBusVariant arg("foo");
QVERIFY(QMetaObject::invokeMethod(&iface, "ping", Q_ARG(QDBusVariant, arg)));
QCOMPARE(MyObject::callCount, 1);
@@ -335,6 +388,18 @@ void tst_QDBusInterface::invokeMethod()
QDBusVariant dv = qdbus_cast<QDBusVariant>(v);
QCOMPARE(dv.variant().type(), QVariant::String);
QCOMPARE(dv.variant().toString(), QString("foo"));
+
+ // make the INVOKABLE call without a return type
+ QDBusVariant arg2("bar");
+ QVERIFY(QMetaObject::invokeMethod(&iface, "ping_invokable", Q_ARG(QDBusVariant, arg2)));
+ QCOMPARE(MyObject::callCount, 2);
+
+ // verify what the callee received
+ QCOMPARE(MyObject::callArgs.count(), 1);
+ v = MyObject::callArgs.at(0);
+ dv = qdbus_cast<QDBusVariant>(v);
+ QCOMPARE(dv.variant().type(), QVariant::String);
+ QCOMPARE(dv.variant().toString(), QString("bar"));
}
void tst_QDBusInterface::invokeMethodWithReturn()
@@ -343,10 +408,11 @@ void tst_QDBusInterface::invokeMethodWithReturn()
QDBusInterface iface(QDBusConnection::sessionBus().baseService(), QLatin1String("/"),
TEST_INTERFACE_NAME);
- // make the call without a return type
MyObject::callCount = 0;
- QDBusVariant arg("foo");
QDBusVariant retArg;
+
+ // make the SLOT call without a return type
+ QDBusVariant arg("foo");
QVERIFY(QMetaObject::invokeMethod(&iface, "ping", Q_RETURN_ARG(QDBusVariant, retArg), Q_ARG(QDBusVariant, arg)));
QCOMPARE(MyObject::callCount, 1);
@@ -359,6 +425,21 @@ void tst_QDBusInterface::invokeMethodWithReturn()
// verify that we got the reply as expected
QCOMPARE(retArg.variant(), arg.variant());
+
+ // make the INVOKABLE call without a return type
+ QDBusVariant arg2("bar");
+ QVERIFY(QMetaObject::invokeMethod(&iface, "ping_invokable", Q_RETURN_ARG(QDBusVariant, retArg), Q_ARG(QDBusVariant, arg2)));
+ QCOMPARE(MyObject::callCount, 2);
+
+ // verify what the callee received
+ QCOMPARE(MyObject::callArgs.count(), 1);
+ v = MyObject::callArgs.at(0);
+ dv = qdbus_cast<QDBusVariant>(v);
+ QCOMPARE(dv.variant().type(), QVariant::String);
+ QCOMPARE(dv.variant().toString(), arg2.variant().toString());
+
+ // verify that we got the reply as expected
+ QCOMPARE(retArg.variant(), arg2.variant());
}
void tst_QDBusInterface::invokeMethodWithMultiReturn()
@@ -367,10 +448,11 @@ void tst_QDBusInterface::invokeMethodWithMultiReturn()
QDBusInterface iface(QDBusConnection::sessionBus().baseService(), QLatin1String("/"),
TEST_INTERFACE_NAME);
- // make the call without a return type
MyObject::callCount = 0;
- QDBusVariant arg("foo"), arg2("bar");
QDBusVariant retArg, retArg2;
+
+ // make the SLOT call without a return type
+ QDBusVariant arg("foo"), arg2("bar");
QVERIFY(QMetaObject::invokeMethod(&iface, "ping",
Q_RETURN_ARG(QDBusVariant, retArg),
Q_ARG(QDBusVariant, arg),
@@ -393,6 +475,31 @@ void tst_QDBusInterface::invokeMethodWithMultiReturn()
// verify that we got the replies as expected
QCOMPARE(retArg.variant(), arg.variant());
QCOMPARE(retArg2.variant(), arg2.variant());
+
+ // make the INVOKABLE call without a return type
+ QDBusVariant arg3("hello"), arg4("world");
+ QVERIFY(QMetaObject::invokeMethod(&iface, "ping_invokable",
+ Q_RETURN_ARG(QDBusVariant, retArg),
+ Q_ARG(QDBusVariant, arg3),
+ Q_ARG(QDBusVariant, arg4),
+ Q_ARG(QDBusVariant&, retArg2)));
+ QCOMPARE(MyObject::callCount, 2);
+
+ // verify what the callee received
+ QCOMPARE(MyObject::callArgs.count(), 2);
+ v = MyObject::callArgs.at(0);
+ dv = qdbus_cast<QDBusVariant>(v);
+ QCOMPARE(dv.variant().type(), QVariant::String);
+ QCOMPARE(dv.variant().toString(), arg3.variant().toString());
+
+ v = MyObject::callArgs.at(1);
+ dv = qdbus_cast<QDBusVariant>(v);
+ QCOMPARE(dv.variant().type(), QVariant::String);
+ QCOMPARE(dv.variant().toString(), arg4.variant().toString());
+
+ // verify that we got the replies as expected
+ QCOMPARE(retArg.variant(), arg3.variant());
+ QCOMPARE(retArg2.variant(), arg4.variant());
}
void tst_QDBusInterface::invokeMethodWithComplexReturn()
@@ -401,10 +508,11 @@ void tst_QDBusInterface::invokeMethodWithComplexReturn()
QDBusInterface iface(QDBusConnection::sessionBus().baseService(), QLatin1String("/"),
TEST_INTERFACE_NAME);
- // make the call without a return type
MyObject::callCount = 0;
- QList<int> arg = QList<int>() << 42 << -47;
QList<int> retArg;
+
+ // make the SLOT call without a return type
+ QList<int> arg = QList<int>() << 42 << -47;
QVERIFY(QMetaObject::invokeMethod(&iface, "ping", Q_RETURN_ARG(QList<int>, retArg), Q_ARG(QList<int>, arg)));
QCOMPARE(MyObject::callCount, 1);
@@ -416,6 +524,20 @@ void tst_QDBusInterface::invokeMethodWithComplexReturn()
// verify that we got the reply as expected
QCOMPARE(retArg, arg);
+
+ // make the INVOKABLE call without a return type
+ QList<int> arg2 = QList<int>() << 24 << -74;
+ QVERIFY(QMetaObject::invokeMethod(&iface, "ping", Q_RETURN_ARG(QList<int>, retArg), Q_ARG(QList<int>, arg2)));
+ QCOMPARE(MyObject::callCount, 2);
+
+ // verify what the callee received
+ QCOMPARE(MyObject::callArgs.count(), 1);
+ v = MyObject::callArgs.at(0);
+ QCOMPARE(v.userType(), qMetaTypeId<QDBusArgument>());
+ QCOMPARE(qdbus_cast<QList<int> >(v), arg2);
+
+ // verify that we got the reply as expected
+ QCOMPARE(retArg, arg2);
}
void tst_QDBusInterface::signal()
diff --git a/tests/auto/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/qfiledialog2/tst_qfiledialog2.cpp
index eee495fc33..6299c24e9b 100644
--- a/tests/auto/qfiledialog2/tst_qfiledialog2.cpp
+++ b/tests/auto/qfiledialog2/tst_qfiledialog2.cpp
@@ -140,6 +140,7 @@ private slots:
void QTBUG4419_lineEditSelectAll();
void QTBUG6558_showDirsOnly();
void QTBUG4842_selectFilterWithHideNameFilterDetails();
+ void dontShowCompleterOnRoot();
private:
QByteArray userSettings;
@@ -1194,5 +1195,26 @@ void tst_QFileDialog2::QTBUG4842_selectFilterWithHideNameFilterDetails()
}
+void tst_QFileDialog2::dontShowCompleterOnRoot()
+{
+ QNonNativeFileDialog fd(0, "TestFileDialog");
+ fd.setAcceptMode(QFileDialog::AcceptSave);
+ fd.show();
+
+ QApplication::setActiveWindow(&fd);
+ QTest::qWaitForWindowShown(&fd);
+ QTRY_COMPARE(fd.isVisible(), true);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&fd));
+
+ fd.setDirectory("");
+ QLineEdit *lineEdit = qFindChild<QLineEdit*>(&fd, "fileNameEdit");
+ QTRY_VERIFY(lineEdit->text().isEmpty());
+
+ //The gatherer thread will then return the result
+ QApplication::processEvents();
+
+ QTRY_VERIFY(lineEdit->completer()->popup()->isHidden());
+}
+
QTEST_MAIN(tst_QFileDialog2)
#include "tst_qfiledialog2.moc"
diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp
index 4c651bf3ab..93b1891d6e 100644
--- a/tests/auto/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp
@@ -1082,7 +1082,7 @@ void tst_QFileInfo::isHidden_data()
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
QVERIFY(QDir("./hidden-directory").exists() || QDir().mkdir("./hidden-directory"));
- QVERIFY(SetFileAttributesW(QString("./hidden-directory").utf16(),FILE_ATTRIBUTE_HIDDEN));
+ QVERIFY(SetFileAttributesW(reinterpret_cast<LPCWSTR>(QString("./hidden-directory").utf16()),FILE_ATTRIBUTE_HIDDEN));
QTest::newRow("C:/path/to/hidden-directory") << QDir::currentPath() + QString::fromLatin1("/hidden-directory") << true;
QTest::newRow("C:/path/to/hidden-directory/.") << QDir::currentPath() + QString::fromLatin1("/hidden-directory/.") << true;
#endif
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp
index 8ee494f08e..7fe461cdd4 100644
--- a/tests/auto/qgl/tst_qgl.cpp
+++ b/tests/auto/qgl/tst_qgl.cpp
@@ -2252,5 +2252,30 @@ void tst_QGL::textureCleanup()
#endif
}
-QTEST_MAIN(tst_QGL)
+class tst_QGLDummy : public QObject
+{
+Q_OBJECT
+
+public:
+ tst_QGLDummy() {}
+
+private slots:
+ void qglSkipTests() {
+ QSKIP("QGL not supported on this system.", SkipAll);
+ }
+};
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ QTEST_DISABLE_KEYPAD_NAVIGATION \
+ QGLWidget glWidget;
+ if (!glWidget.isValid()) {
+ tst_QGLDummy tc;
+ return QTest::qExec(&tc, argc, argv);
+ }
+ tst_QGL tc;
+ return QTest::qExec(&tc, argc, argv);
+}
+
#include "tst_qgl.moc"
diff --git a/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp b/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
index 49f110e6e6..49a76fa4d3 100644
--- a/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
+++ b/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
@@ -161,6 +161,7 @@ private slots:
void draw();
void update();
void boundingRect();
+ void clippedBoundingRect();
void deviceRect();
void pixmap();
@@ -282,6 +283,20 @@ void tst_QGraphicsEffectSource::boundingRect()
QTRY_COMPARE(effect->source()->boundingRect(), itemBoundingRect);
}
+void tst_QGraphicsEffectSource::clippedBoundingRect()
+{
+ QRectF itemBoundingRect = item->boundingRect();
+ item->setFlag(QGraphicsItem::ItemClipsChildrenToShape);
+
+ QGraphicsRectItem *child = new QGraphicsRectItem(-1000, -1000, 2000, 2000);
+ child->setBrush(Qt::red);
+ child->setParentItem(item);
+
+ effect->storeDeviceDependentStuff = true;
+ effect->source()->update();
+ QTRY_COMPARE(effect->source()->boundingRect(Qt::LogicalCoordinates), itemBoundingRect);
+}
+
void tst_QGraphicsEffectSource::deviceRect()
{
effect->storeDeviceDependentStuff = true;
diff --git a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
index b9a5c66edd..d1d6860ba8 100644
--- a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
+++ b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
@@ -105,6 +105,7 @@ private slots:
void geometries_data();
void geometries();
void avoidRecursionInInsertItem();
+ void styleInfoLeak();
void task236367_maxSizeHint();
};
@@ -2196,6 +2197,12 @@ void tst_QGraphicsGridLayout::avoidRecursionInInsertItem()
QCOMPARE(layout->count(), 0);
}
+void tst_QGraphicsGridLayout::styleInfoLeak()
+{
+ QGraphicsGridLayout grid;
+ grid.horizontalSpacing();
+}
+
void tst_QGraphicsGridLayout::task236367_maxSizeHint()
{
QGraphicsWidget *widget = new QGraphicsWidget;
diff --git a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
index c26e5d4aec..6107fa11e7 100644
--- a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
+++ b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
@@ -102,6 +102,7 @@ private slots:
void layoutDirection();
void removeLayout();
void avoidRecursionInInsertItem();
+ void styleInfoLeak();
// Task specific tests
void task218400_insertStretchCrash();
@@ -1443,6 +1444,12 @@ void tst_QGraphicsLinearLayout::avoidRecursionInInsertItem()
QCOMPARE(layout->count(), 0);
}
+void tst_QGraphicsLinearLayout::styleInfoLeak()
+{
+ QGraphicsLinearLayout layout;
+ layout.spacing();
+}
+
void tst_QGraphicsLinearLayout::task218400_insertStretchCrash()
{
QGraphicsScene *scene = new QGraphicsScene;
diff --git a/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp b/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp
index 6396e441e4..dba8a641b0 100644
--- a/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp
+++ b/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp
@@ -224,7 +224,18 @@ void tst_QGraphicsSceneIndex::connectedToSceneRectChanged()
{
class MyScene : public QGraphicsScene
- { public: using QGraphicsScene::receivers; };
+ {
+ public:
+#ifdef Q_CC_RVCT
+ //using keyword doesn't change visibility to public in RVCT2.2 compiler
+ inline int receivers(const char* signal) const
+ {
+ return QGraphicsScene::receivers(signal);
+ }
+#else
+ using QGraphicsScene::receivers;
+#endif
+ };
MyScene scene; // Uses QGraphicsSceneBspTreeIndex by default.
QCOMPARE(scene.receivers(SIGNAL(sceneRectChanged(const QRectF&))), 1);
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
index b8df7f6b84..1cce687552 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -219,6 +219,7 @@ private slots:
void update2_data();
void update2();
void update_ancestorClipsChildrenToShape();
+ void update_ancestorClipsChildrenToShape2();
void inputMethodSensitivity();
void inputContextReset();
void indirectPainting();
@@ -3815,6 +3816,78 @@ void tst_QGraphicsView::update_ancestorClipsChildrenToShape()
#endif
}
+void tst_QGraphicsView::update_ancestorClipsChildrenToShape2()
+{
+ QGraphicsScene scene(-150, -150, 300, 300);
+
+ /*
+ Add two rects:
+
+ +------------------+
+ | child |
+ | +--------------+ |
+ | | parent | |
+ | | | |
+ | | | |
+ | | | |
+ | +--------------+ |
+ +------------------+
+
+ ... where the parent has no contents and clips the child to shape.
+ */
+ QApplication::processEvents(); // Get rid of pending update.
+
+ QGraphicsRectItem *parent = static_cast<QGraphicsRectItem *>(scene.addRect(-50, -50, 100, 100));
+ parent->setBrush(QColor(0, 0, 255, 125));
+ parent->setFlag(QGraphicsItem::ItemClipsChildrenToShape);
+ parent->setFlag(QGraphicsItem::ItemHasNoContents);
+
+ QGraphicsRectItem *child = static_cast<QGraphicsRectItem *>(scene.addRect(-100, -100, 200, 200));
+ child->setBrush(QColor(255, 0, 0, 125));
+ child->setParentItem(parent);
+
+ CustomView view(&scene);
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+ QTRY_VERIFY(view.painted);
+
+ view.lastUpdateRegions.clear();
+ view.painted = false;
+
+ // Call child->update() and make sure the updated area is within its parent's clip.
+ QRectF expected = child->deviceTransform(view.viewportTransform()).mapRect(child->boundingRect());
+ expected &= parent->deviceTransform(view.viewportTransform()).mapRect(parent->boundingRect());
+
+ child->update();
+ QTRY_VERIFY(view.painted);
+
+#ifndef QT_MAC_USE_COCOA //cocoa doesn't support drawing regions
+ QTRY_VERIFY(view.painted);
+ QCOMPARE(view.lastUpdateRegions.size(), 1);
+ QCOMPARE(view.lastUpdateRegions.at(0), QRegion(expected.toAlignedRect()));
+#endif
+
+ QTest::qWait(50);
+
+ view.lastUpdateRegions.clear();
+ view.painted = false;
+
+ // Invalidate the parent's geometry and trigger an update.
+ // The update area should be clipped to the parent's bounding rect for 'normal' items,
+ // but in this case the item has no contents (ItemHasNoContents) and its geometry
+ // is invalidated, which means we cannot clip the child update. So, the expected
+ // area is exactly the same as the child's bounding rect (adjusted for antialiasing).
+ parent->setRect(parent->rect().adjusted(-10, -10, -10, -10));
+ expected = child->deviceTransform(view.viewportTransform()).mapRect(child->boundingRect());
+ expected.adjust(-2, -2, 2, 2); // Antialiasing
+
+#ifndef QT_MAC_USE_COCOA //cocoa doesn't support drawing regions
+ QTRY_VERIFY(view.painted);
+ QCOMPARE(view.lastUpdateRegions.size(), 1);
+ QCOMPARE(view.lastUpdateRegions.at(0), QRegion(expected.toAlignedRect()));
+#endif
+}
+
class FocusItem : public QGraphicsRectItem
{
public:
diff --git a/tests/auto/qheaderview/tst_qheaderview.cpp b/tests/auto/qheaderview/tst_qheaderview.cpp
index f6cd4e3f4e..da0a0bbeed 100644
--- a/tests/auto/qheaderview/tst_qheaderview.cpp
+++ b/tests/auto/qheaderview/tst_qheaderview.cpp
@@ -193,6 +193,7 @@ private slots:
void QTBUG6058_reset();
void QTBUG7833_sectionClicked();
void QTBUG8650_crashOnInsertSections();
+ void QTBUG12268_hiddenMovedSectionSorting();
protected:
QHeaderView *view;
@@ -2071,5 +2072,25 @@ void tst_QHeaderView::QTBUG8650_crashOnInsertSections()
model.insertColumn(0, items);
}
+void tst_QHeaderView::QTBUG12268_hiddenMovedSectionSorting()
+{
+ QTableView view;
+ QStandardItemModel *model = new QStandardItemModel(4,3, &view);
+ for (int i = 0; i< model->rowCount(); ++i)
+ for (int j = 0; j< model->columnCount(); ++j)
+ model->setData(model->index(i,j), QString("item [%1,%2]").arg(i).arg(j));
+ view.setModel(model);
+ view.horizontalHeader()->setMovable(true);
+ view.setSortingEnabled(true);
+ view.sortByColumn(1, Qt::AscendingOrder);
+ view.horizontalHeader()->moveSection(0,2);
+ view.setColumnHidden(1, true);
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+ QCOMPARE(view.horizontalHeader()->hiddenSectionCount(), 1);
+ QTest::mouseClick(view.horizontalHeader()->viewport(), Qt::LeftButton);
+ QCOMPARE(view.horizontalHeader()->hiddenSectionCount(), 1);
+}
+
QTEST_MAIN(tst_QHeaderView)
#include "tst_qheaderview.moc"
diff --git a/tests/auto/qimage/tst_qimage.cpp b/tests/auto/qimage/tst_qimage.cpp
index 5052114bae..1330d962b8 100644
--- a/tests/auto/qimage/tst_qimage.cpp
+++ b/tests/auto/qimage/tst_qimage.cpp
@@ -83,6 +83,8 @@ private slots:
void convertToFormat_data();
void convertToFormat();
+ void convertToFormatRgb888ToRGB32();
+
void createAlphaMask_data();
void createAlphaMask();
#ifndef QT_NO_IMAGE_HEURISTIC_MASK
@@ -799,6 +801,26 @@ void tst_QImage::convertToFormat()
QFile::remove(QLatin1String("expected2.xpm"));
}
+void tst_QImage::convertToFormatRgb888ToRGB32()
+{
+ // 545 so width % 4 != 0. This ensure there is padding at the end of the scanlines
+ const int height = 545;
+ const int width = 545;
+ QImage source(width, height, QImage::Format_RGB888);
+ for (int y = 0; y < height; ++y) {
+ uchar *srcPixels = source.scanLine(y);
+ for (int x = 0; x < width * 3; ++x)
+ srcPixels[x] = x;
+ }
+
+ QImage rgb32Image = source.convertToFormat(QImage::Format_RGB888);
+ QCOMPARE(rgb32Image.format(), QImage::Format_RGB888);
+ for (int x = 0; x < width; ++x) {
+ for (int y = 0; y < height; ++y)
+ QCOMPARE(rgb32Image.pixel(x, y), source.pixel(x, y));
+ }
+}
+
void tst_QImage::createAlphaMask_data()
{
QTest::addColumn<int>("x");
diff --git a/tests/auto/qimagereader/images/pngwithcompressedtext.png b/tests/auto/qimagereader/images/pngwithcompressedtext.png
deleted file mode 100644
index 01b227015b..0000000000
--- a/tests/auto/qimagereader/images/pngwithcompressedtext.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/qimagereader/images/pngwithtext.png b/tests/auto/qimagereader/images/pngwithtext.png
deleted file mode 100644
index 5d93799a5e..0000000000
--- a/tests/auto/qimagereader/images/pngwithtext.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/qimagereader/qimagereader.qrc b/tests/auto/qimagereader/qimagereader.qrc
index 278427be18..1acc82f514 100644
--- a/tests/auto/qimagereader/qimagereader.qrc
+++ b/tests/auto/qimagereader/qimagereader.qrc
@@ -38,8 +38,6 @@
<file>images/noclearcode.bmp</file>
<file>images/noclearcode.gif</file>
<file>images/nontransparent.xpm</file>
- <file>images/pngwithcompressedtext.png</file>
- <file>images/pngwithtext.png</file>
<file>images/runners.ppm</file>
<file>images/teapot.ppm</file>
<file>images/test.ppm</file>
diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp
index fe2a719bb7..5b30b04352 100644
--- a/tests/auto/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/qimagereader/tst_qimagereader.cpp
@@ -123,9 +123,6 @@ private slots:
void supportsAnimation_data();
void supportsAnimation();
- void description_data();
- void description();
-
void readFromResources_data();
void readFromResources();
@@ -315,7 +312,24 @@ void tst_QImageReader::jpegRgbCmyk()
QImage image1(prefix + QLatin1String("YCbCr_cmyk.jpg"));
QImage image2(prefix + QLatin1String("YCbCr_cmyk.png"));
- QCOMPARE(image1, image2);
+ // first, do some obvious tests
+ QCOMPARE(image1.height(), image2.height());
+ QCOMPARE(image1.width(), image2.width());
+ QCOMPARE(image1.format(), image2.format());
+ QCOMPARE(image1.format(), QImage::Format_RGB32);
+
+ // compare all the pixels with a slack of 3. This ignores rounding errors in libjpeg/libpng
+ for (int h = 0; h < image1.height(); ++h) {
+ const uchar *s1 = image1.constScanLine(h);
+ const uchar *s2 = image2.constScanLine(h);
+ for (int w = 0; w < image1.width() * 4; ++w) {
+ if (*s1 != *s2) {
+ QVERIFY2(qAbs(*s1 - *s2) <= 3, qPrintable(QString("images differ in line %1, col %2 (image1: %3, image2: %4)").arg(h).arg(w).arg(*s1, 0, 16).arg(*s2, 0, 16)));
+ }
+ s1++;
+ s2++;
+ }
+ }
}
void tst_QImageReader::setScaledSize_data()
@@ -1236,53 +1250,6 @@ void tst_QImageReader::devicePosition()
}
-void tst_QImageReader::description_data()
-{
- QTest::addColumn<QString>("fileName");
- QTest::addColumn<QStringMap>("description");
-
- QMap<QString, QString> willem;
- willem["Title"] = "PngSuite";
- willem["Author"] = "Willem A.J. van Schaik (gwillem@ntuvax.ntu.ac.sg)";
- willem["Copyright"] = "Copyright Willem van Schaik, Singapore 1995";
- willem["Description"] = "A compilation of a set of images created to test the "
- "various color-types of the PNG format. Included are "
- "black&white, color, paletted, with alpha channel, with "
- "transparency formats. All bit-depths allowed according "
- "to the spec are present.";
- willem["Software"] = "Created on a NeXTstation color using \"pnmtopng\".";
- willem["Disclaimer"] = "Freeware.";
-
- QTest::newRow("PNG") << QString("pngwithtext.png") << willem;
- QTest::newRow("PNG Compressed") << QString("pngwithcompressedtext.png") << willem;
-}
-
-void tst_QImageReader::description()
-{
- QFETCH(QString, fileName);
- QFETCH(QStringMap, description);
-
- // Sanity check
- QVERIFY(!QImage(prefix + fileName).isNull());
-
- QImageReader reader(prefix + fileName);
-
- foreach (QString key, description.keys())
- QCOMPARE(reader.text(key), description.value(key));
- QCOMPARE(reader.textKeys(), QStringList(description.keys()));
-
- QImage image = reader.read();
- QVERIFY(!image.isNull());
-
- foreach (QString key, description.keys())
- QCOMPARE(image.text(key), description.value(key));
- QCOMPARE(image.textKeys(), QStringList(description.keys()));
-
- foreach (QString key, description.keys())
- QCOMPARE(reader.text(key), description.value(key));
- QCOMPARE(reader.textKeys(), QStringList(description.keys()));
-}
-
void tst_QImageReader::readFromResources_data()
{
QTest::addColumn<QString>("fileName");
@@ -1388,12 +1355,6 @@ void tst_QImageReader::readFromResources_data()
QTest::newRow("image.png") << QString("image.png")
<< QByteArray("png") << QSize(22, 22)
<< QString("");
- QTest::newRow("pngwithcompressedtext.png") << QString("pngwithcompressedtext.png")
- << QByteArray("png") << QSize(32, 32)
- << QString("");
- QTest::newRow("pngwithtext.png") << QString("pngwithtext.png")
- << QByteArray("png") << QSize(32, 32)
- << QString("");
QTest::newRow("kollada.png") << QString("kollada.png")
<< QByteArray("png") << QSize(436, 160)
<< QString("");
diff --git a/tests/auto/qimagewriter/tst_qimagewriter.cpp b/tests/auto/qimagewriter/tst_qimagewriter.cpp
index c4860c3cb6..c6ec715ca0 100644
--- a/tests/auto/qimagewriter/tst_qimagewriter.cpp
+++ b/tests/auto/qimagewriter/tst_qimagewriter.cpp
@@ -93,9 +93,6 @@ private slots:
void largeTiff();
#endif
- void setDescription_data();
- void setDescription();
-
void writeToInvalidDevice();
void supportsOption_data();
@@ -420,41 +417,6 @@ void tst_QImageWriter::readWriteNonDestructive()
QCOMPARE(image, image2);
}
-void tst_QImageWriter::setDescription_data()
-{
- QTest::addColumn<QString>("fileName");
- QTest::addColumn<QStringMap>("description");
-
- QMap<QString, QString> willem;
- willem["Title"] = "PngSuite";
- willem["Author"] = "Willem A.J. van Schaik (willem@schaik.com)";
- willem["Copyright"] = "Copyright Willem van Schaik, Singapore 1995-96";
- willem["Description"] = "A compilation of a set of images created to test the "
- "various color-types of the PNG format. Included are "
- "black&white, color, paletted, with alpha channel, with "
- "transparency formats. All bit-depths allowed according "
- "to the spec are present.";
- willem["Software"] = "Created on a NeXTstation color using \"pnmtopng\".";
- willem["Disclaimer"] = "Freeware.";
-
- QTest::newRow("PNG") << prefix + QString("gen-pngwithtext.png") << willem;
-}
-
-void tst_QImageWriter::setDescription()
-{
- QFETCH(QString, fileName);
- QFETCH(QStringMap, description);
-
- QImageWriter writer(fileName, "png");
- foreach (QString key, description.keys())
- writer.setText(key, description.value(key));
- QVERIFY(writer.write(QImage(prefix + "kollada.png")));
-
- QImageReader reader(fileName);
- foreach (QString key, description.keys())
- QCOMPARE(reader.text(key), description.value(key));
-}
-
void tst_QImageWriter::writeToInvalidDevice()
{
QLatin1String fileName("/these/directories/do/not/exist/001.png");
diff --git a/tests/auto/qiodevice/tst_qiodevice.cpp b/tests/auto/qiodevice/tst_qiodevice.cpp
index 356e2f8142..7048754f29 100644
--- a/tests/auto/qiodevice/tst_qiodevice.cpp
+++ b/tests/auto/qiodevice/tst_qiodevice.cpp
@@ -72,6 +72,7 @@ private slots:
void read_QByteArray();
void unget();
void peek();
+ void peekAndRead();
void getch();
void putch();
@@ -354,6 +355,31 @@ void tst_QIODevice::peek()
QFile::remove("peektestfile");
}
+void tst_QIODevice::peekAndRead()
+{
+ QByteArray originalData;
+ for (int i=0;i<1000;i++)
+ originalData += "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ QBuffer buffer;
+ QFile::remove("peektestfile");
+ QFile file("peektestfile");
+
+ for (int i = 0; i < 2; ++i) {
+ QByteArray readData;
+ QIODevice *device = i ? (QIODevice *)&file : (QIODevice *)&buffer;
+ device->open(QBuffer::ReadWrite);
+ device->write(originalData);
+ device->seek(0);
+ while (!device->atEnd()) {
+ char peekIn[26];
+ device->peek(peekIn, 26);
+ readData += device->read(26);
+ }
+ QCOMPARE(readData, originalData);
+ }
+ QFile::remove("peektestfile");
+}
+
void tst_QIODevice::getch()
{
#ifdef QT3_SUPPORT
diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp
index b34e559674..717b32df5a 100644
--- a/tests/auto/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/qlineedit/tst_qlineedit.cpp
@@ -66,7 +66,6 @@
#include <qspinbox.h>
#include <qdebug.h>
-
//TESTED_CLASS=
//TESTED_FILES=
@@ -275,6 +274,7 @@ private slots:
void taskQTBUG_7902_contextMenuCrash();
#endif
void taskQTBUG_7395_readOnlyShortcut();
+ void QTBUG697_paletteCurrentColorGroup();
#ifdef QT3_SUPPORT
void validateAndSet_data();
@@ -3714,5 +3714,32 @@ void tst_QLineEdit::taskQTBUG_7395_readOnlyShortcut()
QCOMPARE(spy.count(), 1);
}
+void tst_QLineEdit::QTBUG697_paletteCurrentColorGroup()
+{
+#ifndef Q_WS_X11
+ QSKIP("Only tested on X11", SkipAll);
+#endif
+ QLineEdit le;
+ le.setText(" ");
+ QPalette p = le.palette();
+ p.setBrush(QPalette::Active, QPalette::Highlight, Qt::green);
+ p.setBrush(QPalette::Inactive, QPalette::Highlight, Qt::red);
+ le.setPalette(p);
+
+ le.show();
+ QApplication::setActiveWindow(&le);
+ QTest::qWaitForWindowShown(&le);
+ le.setFocus();
+ QTRY_VERIFY(le.hasFocus());
+ le.selectAll();
+
+ QImage img(le.size(),QImage::Format_ARGB32 );
+ le.render(&img);
+ QCOMPARE(img.pixel(10, le.height()/2), QColor(Qt::green).rgb());
+ QApplication::setActiveWindow(0);
+ le.render(&img);
+ QCOMPARE(img.pixel(10, le.height()/2), QColor(Qt::red).rgb());
+}
+
QTEST_MAIN(tst_QLineEdit)
#include "tst_qlineedit.moc"
diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp
index 330f803b3b..425ac8984f 100644
--- a/tests/auto/qlistview/tst_qlistview.cpp
+++ b/tests/auto/qlistview/tst_qlistview.cpp
@@ -45,6 +45,7 @@
#include <qabstractitemmodel.h>
#include <qapplication.h>
#include <qlistview.h>
+#include <qlistwidget.h>
#include <qitemdelegate.h>
#include <qstandarditemmodel.h>
#include <qstringlistmodel.h>
@@ -125,6 +126,8 @@ private slots:
void taskQTBUG_5877_skippingItemInPageDownUp();
void taskQTBUG_9455_wrongScrollbarRanges();
void styleOptionViewItem();
+ void taskQTBUG_12308_artihmeticException();
+ void taskQTBUG_12308_wrongFlowLayout();
};
// Testing get/set functions
@@ -1653,8 +1656,8 @@ void tst_QListView::task254449_draggingItemToNegativeCoordinates()
//we'll make sure the item is repainted
delegate.numPaints = 0;
QApplication::processEvents();
+ QTRY_COMPARE(delegate.numPaints, 1);
QCOMPARE(list.visualRect(index).topLeft(), topLeft);
- QCOMPARE(delegate.numPaints, 1);
}
@@ -2002,5 +2005,53 @@ void tst_QListView::styleOptionViewItem()
QApplication::processEvents();
}
+void tst_QListView::taskQTBUG_12308_artihmeticException()
+{
+ QListWidget lw;
+ lw.setLayoutMode(QListView::Batched);
+ lw.setViewMode(QListView::IconMode);
+ for (int i = 0; i < lw.batchSize() + 1; i++) {
+ QListWidgetItem *item = new QListWidgetItem();
+ item->setText(QString("Item %L1").arg(i));
+ lw.addItem(item);
+ item->setHidden(true);
+ }
+ lw.show();
+ QTest::qWaitForWindowShown(&lw);
+ // No crash, it's all right.
+}
+
+class Delegate12308 : public QStyledItemDelegate
+{
+ Q_OBJECT
+public:
+ Delegate12308(QObject *parent = 0) : QStyledItemDelegate(parent)
+ { }
+
+ void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
+ {
+ QVERIFY(option.rect.topLeft() != QPoint(-1, -1));
+ QStyledItemDelegate::paint(painter, option, index);
+ }
+};
+
+void tst_QListView::taskQTBUG_12308_wrongFlowLayout()
+{
+ QListWidget lw;
+ Delegate12308 delegate;
+ lw.setLayoutMode(QListView::Batched);
+ lw.setViewMode(QListView::IconMode);
+ lw.setItemDelegate(&delegate);
+ for (int i = 0; i < lw.batchSize() + 1; i++) {
+ QListWidgetItem *item = new QListWidgetItem();
+ item->setText(QString("Item %L1").arg(i));
+ lw.addItem(item);
+ if (!item->text().contains(QString::fromAscii("1")))
+ item->setHidden(true);
+ }
+ lw.show();
+ QTest::qWaitForWindowShown(&lw);
+}
+
QTEST_MAIN(tst_QListView)
#include "tst_qlistview.moc"
diff --git a/tests/auto/qmake/testdata/simple_app/build/README b/tests/auto/qmake/testdata/simple_app/build/README
new file mode 100644
index 0000000000..acfd9d9226
--- /dev/null
+++ b/tests/auto/qmake/testdata/simple_app/build/README
@@ -0,0 +1 @@
+Here to ensure build/ exists, used by the simple_app_shadowbuild2 test.
diff --git a/tests/auto/qmake/testdata/simple_app/simple_app.pro b/tests/auto/qmake/testdata/simple_app/simple_app.pro
index f496d5bb8e..a8c4ad613d 100644
--- a/tests/auto/qmake/testdata/simple_app/simple_app.pro
+++ b/tests/auto/qmake/testdata/simple_app/simple_app.pro
@@ -3,6 +3,7 @@ CONFIG += qt warn_on
HEADERS = test_file.h
SOURCES = test_file.cpp \
main.cpp
+RESOURCES = test.qrc
TARGET = simple_app
DESTDIR = ./
diff --git a/tests/auto/qmake/testdata/simple_app/test.qrc b/tests/auto/qmake/testdata/simple_app/test.qrc
new file mode 100644
index 0000000000..decde3dd24
--- /dev/null
+++ b/tests/auto/qmake/testdata/simple_app/test.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file>test.qrc</file>
+ </qresource>
+</RCC>
diff --git a/tests/auto/qmake/tst_qmake.cpp b/tests/auto/qmake/tst_qmake.cpp
index 03054e709d..5efe7148db 100644
--- a/tests/auto/qmake/tst_qmake.cpp
+++ b/tests/auto/qmake/tst_qmake.cpp
@@ -65,6 +65,7 @@ public slots:
private slots:
void simple_app();
void simple_app_shadowbuild();
+ void simple_app_shadowbuild2();
void simple_lib();
void simple_dll();
void subdirs();
@@ -163,6 +164,21 @@ void tst_qmake::simple_app_shadowbuild()
QVERIFY( test_compiler.removeMakefile( buildDir ) );
}
+void tst_qmake::simple_app_shadowbuild2()
+{
+ QString workDir = base_path + "/testdata/simple_app";
+ QString buildDir = base_path + "/testdata/simple_app/build";
+
+ QVERIFY( test_compiler.qmake( workDir, "simple_app", buildDir ));
+ QVERIFY( test_compiler.make( buildDir ));
+ QVERIFY( test_compiler.exists( buildDir, "simple_app", Exe, "1.0.0" ));
+ QVERIFY( test_compiler.makeClean( buildDir ));
+ QVERIFY( test_compiler.exists( buildDir, "simple_app", Exe, "1.0.0" )); // Should still exist after a make clean
+ QVERIFY( test_compiler.makeDistClean( buildDir ));
+ QVERIFY( !test_compiler.exists( buildDir, "simple_app", Exe, "1.0.0" )); // Should not exist after a make distclean
+ QVERIFY( test_compiler.removeMakefile( buildDir ) );
+}
+
void tst_qmake::simple_dll()
{
QString workDir = base_path + "/testdata/simple_dll";
diff --git a/tests/auto/qmimedata/qmimedata.pro b/tests/auto/qmimedata/qmimedata.pro
new file mode 100644
index 0000000000..13fbe65edc
--- /dev/null
+++ b/tests/auto/qmimedata/qmimedata.pro
@@ -0,0 +1,4 @@
+load(qttest_p4)
+SOURCES += tst_qmimedata.cpp
+
+
diff --git a/tests/auto/qmimedata/tst_qmimedata.cpp b/tests/auto/qmimedata/tst_qmimedata.cpp
new file mode 100644
index 0000000000..be7a654f84
--- /dev/null
+++ b/tests/auto/qmimedata/tst_qmimedata.cpp
@@ -0,0 +1,343 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QtTest/QtTest>
+
+#include <QMimeData>
+
+class tst_QMimeData : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QMimeData()
+ {
+ }
+
+private slots:
+ void clear() const;
+ void colorData() const;
+ void data() const;
+ void formats() const;
+ void hasColor() const;
+ void hasFormat() const;
+ void hasHtml() const;
+ void hasImage() const;
+ // hasText() covered by setText()
+ // hasUrls() covered by setUrls()
+ // html() covered by setHtml()
+ void imageData() const;
+ void removeFormat() const;
+ // setColorData() covered by hasColor()
+ // setData() covered in a few different tests
+ void setHtml() const;
+ // setImageData() covered in a few tests
+ void setText() const;
+ void setUrls() const;
+ // text() covered in setText()
+ // urls() covered by setUrls()
+};
+
+void tst_QMimeData::clear() const
+{
+ QMimeData mimeData;
+
+ // set, clear, verify empty
+ mimeData.setData("text/plain", "pirates");
+ QVERIFY(mimeData.hasText());
+ mimeData.clear();
+ QVERIFY(mimeData.hasText() == false);
+
+ // repopulate, verify not empty
+ mimeData.setData("text/plain", "pirates");
+ QVERIFY(mimeData.hasText());
+}
+
+void tst_QMimeData::colorData() const
+{
+ QMimeData mimeData;
+ QColor red = Qt::red;
+ QColor blue = Qt::blue;
+
+ // set, verify
+ mimeData.setColorData(red);
+ QVERIFY(mimeData.hasColor());
+ QCOMPARE(qvariant_cast<QColor>(mimeData.colorData()), red);
+
+ // change, verify
+ mimeData.setColorData(Qt::blue);
+ QVERIFY(mimeData.hasColor());
+ QCOMPARE(qvariant_cast<QColor>(mimeData.colorData()), blue);
+}
+
+void tst_QMimeData::data() const
+{
+ QMimeData mimeData;
+
+ // set text, verify
+ mimeData.setData("text/plain", "pirates");
+ QCOMPARE(mimeData.data("text/plain"), QByteArray("pirates"));
+ QVERIFY(mimeData.data("text/html").length() == 0);
+
+ // html time
+ mimeData.setData("text/html", "ninjas");
+ QCOMPARE(mimeData.data("text/html"), QByteArray("ninjas"));
+ QCOMPARE(mimeData.data("text/plain"), QByteArray("pirates")); // make sure text not damaged
+ QCOMPARE(mimeData.data("text/html"), mimeData.html().toLatin1());
+}
+
+void tst_QMimeData::formats() const
+{
+ QMimeData mimeData;
+
+ // set text, verify
+ mimeData.setData("text/plain", "pirates");
+ QCOMPARE(mimeData.formats(), QStringList() << "text/plain");
+
+ // set html, verify
+ mimeData.setData("text/html", "ninjas");
+ QCOMPARE(mimeData.formats(), QStringList() << "text/plain" << "text/html");
+
+ // clear, verify
+ mimeData.clear();
+ QCOMPARE(mimeData.formats(), QStringList());
+
+ // set an odd format, verify
+ mimeData.setData("foo/bar", "somevalue");
+ QCOMPARE(mimeData.formats(), QStringList() << "foo/bar");
+}
+
+void tst_QMimeData::hasColor() const
+{
+ QMimeData mimeData;
+
+ // initial state
+ QVERIFY(mimeData.hasColor() == false);
+
+ // set, verify
+ mimeData.setColorData(QColor(Qt::red));
+ QVERIFY(mimeData.hasColor());
+
+ // clear, verify
+ mimeData.clear();
+ QVERIFY(mimeData.hasColor() == false);
+
+ // set something else, verify
+ mimeData.setData("text/plain", "pirates");
+ QVERIFY(mimeData.hasColor() == false);
+}
+
+void tst_QMimeData::hasFormat() const
+{
+ QMimeData mimeData;
+
+ // initial state
+ QVERIFY(mimeData.hasFormat("text/plain") == false);
+
+ // add, verify
+ mimeData.setData("text/plain", "pirates");
+ QVERIFY(mimeData.hasFormat("text/plain"));
+ QVERIFY(mimeData.hasFormat("text/html") == false);
+
+ // clear, verify
+ mimeData.clear();
+ QVERIFY(mimeData.hasFormat("text/plain") == false);
+ QVERIFY(mimeData.hasFormat("text/html") == false);
+}
+
+void tst_QMimeData::hasHtml() const
+{
+ QMimeData mimeData;
+
+ // initial state
+ QVERIFY(mimeData.hasHtml() == false);
+
+ // add plain, verify false
+ mimeData.setData("text/plain", "pirates");
+ QVERIFY(mimeData.hasHtml() == false);
+
+ // add html, verify
+ mimeData.setData("text/html", "ninjas");
+ QVERIFY(mimeData.hasHtml());
+
+ // clear, verify
+ mimeData.clear();
+ QVERIFY(mimeData.hasHtml() == false);
+
+ // readd, verify
+ mimeData.setData("text/html", "ninjas");
+ QVERIFY(mimeData.hasHtml());
+}
+
+void tst_QMimeData::hasImage() const
+{
+ QMimeData mimeData;
+
+ // initial state
+ QVERIFY(mimeData.hasImage() == false);
+
+ // add text, verify false
+ mimeData.setData("text/plain", "pirates");
+ QVERIFY(mimeData.hasImage() == false);
+
+ // add image
+ mimeData.setImageData(QImage());
+ QVERIFY(mimeData.hasImage());
+
+ // clear, verify
+ mimeData.clear();
+ QVERIFY(mimeData.hasImage() == false);
+}
+
+void tst_QMimeData::imageData() const
+{
+ QMimeData mimeData;
+
+ // initial state
+ QCOMPARE(mimeData.imageData(), QVariant());
+
+ // set, test
+ mimeData.setImageData(QImage());
+ QVERIFY(mimeData.hasImage());
+ QCOMPARE(mimeData.imageData(), QVariant(QImage()));
+
+ // clear, verify
+ mimeData.clear();
+ QCOMPARE(mimeData.imageData(), QVariant());
+}
+
+void tst_QMimeData::removeFormat() const
+{
+ QMimeData mimeData;
+
+ // add, verify
+ mimeData.setData("text/plain", "pirates");
+ QVERIFY(mimeData.hasFormat("text/plain"));
+
+ // add another, verify
+ mimeData.setData("text/html", "ninjas");
+ QVERIFY(mimeData.hasFormat("text/html"));
+
+ // remove, verify
+ mimeData.removeFormat("text/plain");
+ QVERIFY(mimeData.hasFormat("text/plain") == false);
+ QVERIFY(mimeData.hasFormat("text/html"));
+
+ // remove, verify
+ mimeData.removeFormat("text/html");
+ QVERIFY(mimeData.hasFormat("text/plain") == false);
+ QVERIFY(mimeData.hasFormat("text/html") == false);
+}
+
+void tst_QMimeData::setHtml() const
+{
+ QMimeData mimeData;
+
+ // initial state
+ QVERIFY(mimeData.hasHtml() == false);
+
+ // add html, verify
+ mimeData.setHtml("ninjas");
+ QVERIFY(mimeData.hasHtml());
+ QCOMPARE(mimeData.html(), QLatin1String("ninjas"));
+
+ // reset html
+ mimeData.setHtml("pirates");
+ QVERIFY(mimeData.hasHtml());
+ QCOMPARE(mimeData.html(), QLatin1String("pirates"));
+}
+
+void tst_QMimeData::setText() const
+{
+ QMimeData mimeData;
+
+ // verify initial state
+ QCOMPARE(mimeData.text(), QLatin1String(""));
+ QVERIFY(mimeData.hasText() == false);
+
+ // set, verify
+ mimeData.setText("pirates");
+ QVERIFY(mimeData.hasText());
+ QCOMPARE(mimeData.text(), QLatin1String("pirates"));
+ QCOMPARE(mimeData.text().toLatin1(), mimeData.data("text/plain"));
+
+ // reset, verify
+ mimeData.setText("ninjas");
+ QVERIFY(mimeData.hasText());
+ QCOMPARE(mimeData.text(), QLatin1String("ninjas"));
+ QCOMPARE(mimeData.text().toLatin1(), mimeData.data("text/plain"));
+
+ // clear, verify
+ mimeData.clear();
+ QCOMPARE(mimeData.text(), QLatin1String(""));
+ QVERIFY(mimeData.hasText() == false);
+}
+
+void tst_QMimeData::setUrls() const
+{
+ QMimeData mimeData;
+ QList<QUrl> shortUrlList;
+ QList<QUrl> longUrlList;
+
+ // set up
+ shortUrlList += QUrl("http://qt.nokia.com");
+ longUrlList = shortUrlList;
+ longUrlList += QUrl("http://www.google.com");
+
+ // verify initial state
+ QVERIFY(mimeData.hasUrls() == false);
+
+ // set a few, verify
+ mimeData.setUrls(shortUrlList);
+ QCOMPARE(mimeData.urls(), shortUrlList);
+
+ // change them, verify
+ mimeData.setUrls(longUrlList);
+ QCOMPARE(mimeData.urls(), longUrlList);
+
+ // clear, verify
+ mimeData.clear();
+ QVERIFY(mimeData.hasUrls() == false);
+}
+
+
+QTEST_MAIN(tst_QMimeData)
+#include "tst_qmimedata.moc"
diff --git a/tests/auto/qnetworkreply/test/test.pro b/tests/auto/qnetworkreply/test/test.pro
index b9ece3849c..6e1b1e3e14 100644
--- a/tests/auto/qnetworkreply/test/test.pro
+++ b/tests/auto/qnetworkreply/test/test.pro
@@ -31,7 +31,7 @@ symbian:{
DEPLOYMENT += certFiles
# Symbian toolchain does not support correct include semantics
- INCPATH+=..\\..\\..\\..\\include\\QtNetwork\\private
+ INCLUDEPATH+=..\\..\\..\\..\\include\\QtNetwork\\private
# bigfile test case requires more heap
TARGET.EPOCHEAPSIZE="0x100 0x1000000"
TARGET.CAPABILITY="ALL -TCB"
diff --git a/tests/auto/qnetworksession/test/tst_qnetworksession.cpp b/tests/auto/qnetworksession/test/tst_qnetworksession.cpp
index 24f6e52cc8..3388cd5324 100644
--- a/tests/auto/qnetworksession/test/tst_qnetworksession.cpp
+++ b/tests/auto/qnetworksession/test/tst_qnetworksession.cpp
@@ -88,7 +88,7 @@ private slots:
void sessionStop();
void roamingErrorCodes();
-
+
void sessionProperties_data();
void sessionProperties();
@@ -918,6 +918,10 @@ void tst_QNetworkSession::sessionOpenCloseStop()
session.waitForOpened();
#endif
+ // Wait until the configuration is uptodate as well, it may be signaled 'connected'
+ // bit later than the session
+ QTRY_VERIFY(configuration.state() == QNetworkConfiguration::Active);
+
if (session.isOpen())
QVERIFY(!sessionOpenedSpy.isEmpty() || !errorSpy.isEmpty());
if (!errorSpy.isEmpty()) {
@@ -1131,8 +1135,9 @@ void tst_QNetworkSession::sessionOpenCloseStop()
roamedSuccessfully = true;
} else if (state == QNetworkSession::Closing) {
QTRY_VERIFY(session2.state() == QNetworkSession::Disconnected);
- QTRY_VERIFY(session.state() == QNetworkSession::Connected);
- roamedSuccessfully = true;
+ QTRY_VERIFY(session.state() == QNetworkSession::Connected ||
+ session.state() == QNetworkSession::Disconnected);
+ roamedSuccessfully = false;
} else if (state == QNetworkSession::Disconnected) {
QTRY_VERIFY(!errorSpy.isEmpty());
QTRY_VERIFY(session2.state() == QNetworkSession::Disconnected);
diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp
index 27ee6e76f1..2cbb9b2294 100644
--- a/tests/auto/qpainter/tst_qpainter.cpp
+++ b/tests/auto/qpainter/tst_qpainter.cpp
@@ -118,10 +118,12 @@ private slots:
void drawLine_task190634();
void drawLine_task229459();
void drawLine_task234891();
+ void drawHorizontalLineF();
void drawRect_data() { fillData(); }
void drawRect();
void drawRect2();
+ void drawRectFHorizontalLine();
void fillRect();
void fillRect2();
@@ -251,6 +253,7 @@ private slots:
void setPenColorOnPixmap();
void QTBUG5939_attachPainterPrivate();
+ void drawHorizontalLine();
private:
void fillData();
@@ -1218,6 +1221,26 @@ void tst_QPainter::drawLine_task234891()
QCOMPARE(expected, img);
}
+void tst_QPainter::drawHorizontalLineF()
+{
+ QPixmap pixmap(100, 3);
+ pixmap.fill();
+
+ {
+ QPainter painter(&pixmap);
+ painter.drawLine(QLineF(1.5f, 1.5f, 98.5f, 1.5f));
+ }
+
+ QImage refImage(100, 3, QImage::Format_ARGB32);
+ refImage.fill(0xFFFFFFFF);
+ {
+ QPainter painter(&refImage);
+ painter.drawLine(QLineF(1.5f, 1.5f, 98.5f, 1.5f));
+ }
+
+ QCOMPARE(pixmap.toImage().convertToFormat(QImage::Format_ARGB32), refImage);
+}
+
void tst_QPainter::drawLine_task216948()
{
QImage img(1, 10, QImage::Format_ARGB32_Premultiplied);
@@ -1302,6 +1325,26 @@ void tst_QPainter::drawRect2()
}
}
+void tst_QPainter::drawRectFHorizontalLine()
+{
+ QPixmap pixmap(100, 3);
+ pixmap.fill();
+
+ {
+ QPainter painter(&pixmap);
+ painter.drawRect(QRectF(1.5f, 1.5f, 98.5f, 1.5f));
+ }
+
+ QImage refImage(100, 3, QImage::Format_ARGB32);
+ refImage.fill(0xFFFFFFFF);
+ {
+ QPainter painter(&refImage);
+ painter.drawRect(QRectF(1.5f, 1.5f, 98.5f, 1.5f));
+ }
+
+ QCOMPARE(pixmap.toImage().convertToFormat(QImage::Format_ARGB32), refImage);
+}
+
void tst_QPainter::fillRect()
{
QImage image(100, 100, QImage::Format_ARGB32_Premultiplied);
@@ -4176,14 +4219,18 @@ void tst_QPainter::inactivePainter()
p.setWorldTransform(QTransform().scale(0.5, 0.5), true);
}
-bool testCompositionMode(int src, int dst, int expected, QPainter::CompositionMode op)
+bool testCompositionMode(int src, int dst, int expected, QPainter::CompositionMode op, qreal opacity = 1.0)
{
- QImage actual(1, 1, QImage::Format_ARGB32_Premultiplied);
+ // The test image needs to be large enough to test SIMD code
+ const QSize imageSize(100, 100);
+
+ QImage actual(imageSize, QImage::Format_ARGB32_Premultiplied);
actual.fill(QColor(dst, dst, dst).rgb());
QPainter p(&actual);
p.setCompositionMode(op);
- p.fillRect(0, 0, 1, 1, QColor(src, src, src));
+ p.setOpacity(opacity);
+ p.fillRect(QRect(QPoint(), imageSize), QColor(src, src, src));
p.end();
if (qRed(actual.pixel(0, 0)) != expected) {
@@ -4191,7 +4238,9 @@ bool testCompositionMode(int src, int dst, int expected, QPainter::CompositionMo
src, dst, qRed(actual.pixel(0, 0)), expected);
return false;
} else {
- return true;
+ QImage refImage(imageSize, QImage::Format_ARGB32_Premultiplied);
+ refImage.fill(QColor(expected, expected, expected).rgb());
+ return actual == refImage;
}
}
@@ -4206,6 +4255,16 @@ void tst_QPainter::extendedBlendModes()
QVERIFY(testCompositionMode( 0, 255, 255, QPainter::CompositionMode_Plus));
QVERIFY(testCompositionMode(128, 128, 255, QPainter::CompositionMode_Plus));
+ QVERIFY(testCompositionMode(255, 255, 255, QPainter::CompositionMode_Plus, 0.3));
+ QVERIFY(testCompositionMode( 0, 0, 0, QPainter::CompositionMode_Plus, 0.3));
+ QVERIFY(testCompositionMode(127, 128, 165, QPainter::CompositionMode_Plus, 0.3));
+ QVERIFY(testCompositionMode(127, 0, 37, QPainter::CompositionMode_Plus, 0.3));
+ QVERIFY(testCompositionMode( 0, 127, 127, QPainter::CompositionMode_Plus, 0.3));
+ QVERIFY(testCompositionMode(255, 0, 75, QPainter::CompositionMode_Plus, 0.3));
+ QVERIFY(testCompositionMode( 0, 255, 255, QPainter::CompositionMode_Plus, 0.3));
+ QVERIFY(testCompositionMode(128, 128, 166, QPainter::CompositionMode_Plus, 0.3));
+ QVERIFY(testCompositionMode(186, 200, 255, QPainter::CompositionMode_Plus, 0.3));
+
QVERIFY(testCompositionMode(255, 255, 255, QPainter::CompositionMode_Multiply));
QVERIFY(testCompositionMode( 0, 0, 0, QPainter::CompositionMode_Multiply));
QVERIFY(testCompositionMode(127, 255, 127, QPainter::CompositionMode_Multiply));
@@ -4506,6 +4565,28 @@ void tst_QPainter::QTBUG5939_attachPainterPrivate()
QCOMPARE(widget->deviceTransform, proxy->deviceTransform);
}
+void tst_QPainter::drawHorizontalLine()
+{
+ QPixmap pixmap(100, 3);
+ pixmap.fill();
+
+ {
+ QPainter painter(&pixmap);
+ painter.translate(0.3, 0.3);
+ painter.drawLine(QLine(1, 1, 99, 1));
+ }
+
+ QImage refImage(100, 3, QImage::Format_ARGB32);
+ refImage.fill(0xFFFFFFFF);
+ {
+ QPainter painter(&refImage);
+ painter.translate(0.3, 0.3);
+ painter.drawLine(QLine(1, 1, 99, 1));
+ }
+
+ QCOMPARE(pixmap.toImage().convertToFormat(QImage::Format_ARGB32), refImage);
+}
+
QTEST_MAIN(tst_QPainter)
#include "tst_qpainter.moc"
diff --git a/tests/auto/qpixmap/qpixmap.pro b/tests/auto/qpixmap/qpixmap.pro
index c3ee192668..ff8258f983 100644
--- a/tests/auto/qpixmap/qpixmap.pro
+++ b/tests/auto/qpixmap/qpixmap.pro
@@ -12,14 +12,16 @@ wince*|symbian: {
icons.sources = convertFromToHICON/*
icons.path = convertFromToHICON
- DEPLOYMENT += task31722_0 task31722_1 icons
- DEPLOYMENT_PLUGIN += qico
+ loadFromData.sources = loadFromData/*
+ loadFromData.path = loadFromData
+
+ DEPLOYMENT += task31722_0 task31722_1 icons loadFromData
}
wince*: {
DEFINES += SRCDIR=\\\".\\\"
+ DEPLOYMENT_PLUGIN += qico
} else:symbian {
- DEPLOYMENT_PLUGIN += qmng
LIBS += -lfbscli.dll -lbitgdi.dll -lgdi.dll
contains(QT_CONFIG, openvg) {
LIBS += $$QMAKE_LIBS_OPENVG
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp
index 6885adf3ad..7a732ccc58 100644
--- a/tests/auto/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp
@@ -4265,6 +4265,35 @@ void tst_QScriptEngine::reentrancy()
QScriptEngine eng;
QCOMPARE(eng.evaluate("Array()").toString(), QString());
}
+
+ {
+ QScriptEngine eng1;
+ QScriptEngine eng2;
+ {
+ QScriptValue d1 = eng1.newDate(0);
+ QScriptValue d2 = eng2.newDate(0);
+ QCOMPARE(d1.toDateTime(), d2.toDateTime());
+ QCOMPARE(d2.toDateTime(), d1.toDateTime());
+ }
+ {
+ QScriptValue r1 = eng1.newRegExp("foo", "gim");
+ QScriptValue r2 = eng2.newRegExp("foo", "gim");
+ QCOMPARE(r1.toRegExp(), r2.toRegExp());
+ QCOMPARE(r2.toRegExp(), r1.toRegExp());
+ }
+ {
+ QScriptValue o1 = eng1.newQObject(this);
+ QScriptValue o2 = eng2.newQObject(this);
+ QCOMPARE(o1.toQObject(), o2.toQObject());
+ QCOMPARE(o2.toQObject(), o1.toQObject());
+ }
+ {
+ QScriptValue mo1 = eng1.newQMetaObject(&staticMetaObject);
+ QScriptValue mo2 = eng2.newQMetaObject(&staticMetaObject);
+ QCOMPARE(mo1.toQMetaObject(), mo2.toQMetaObject());
+ QCOMPARE(mo2.toQMetaObject(), mo1.toQMetaObject());
+ }
+ }
}
void tst_QScriptEngine:: incDecNonObjectProperty()
diff --git a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
index a0f10ddd7d..c30a636f6b 100644
--- a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
+++ b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
@@ -97,6 +97,7 @@ private slots:
void functionEntryAndExit_objectCall();
void positionChange_1();
void positionChange_2();
+ void positionChange_3();
void exceptionThrowAndCatch();
void eventOrder_assigment();
void eventOrder_functionDefinition();
@@ -116,6 +117,8 @@ private slots:
void evaluateProgram_SyntaxError();
void evaluateNullProgram();
void QTBUG6108();
+ void backtraces_data();
+ void backtraces();
private:
double m_testProperty;
@@ -1623,6 +1626,56 @@ void tst_QScriptEngineAgent::positionChange_2()
delete spy;
}
+void tst_QScriptEngineAgent::positionChange_3()
+{
+ QScriptEngine eng;
+ eng.evaluate("function some_function1(a) {\n a++; \n return a + 12; } \n some_function1(42);", "function1.qs", 12);
+ QScriptValue some_function2 = eng.evaluate("(function (b) {\n b--; \n return b + 11; })", "function2.qs", 21);
+ some_function2.call(QScriptValue(), QScriptValueList() << 2 );
+
+ // Test that the agent work, even if installed after the function has been evaluated.
+ ScriptEngineSpy *spy = new ScriptEngineSpy(&eng, ~(ScriptEngineSpy::IgnorePositionChange));
+ {
+ spy->clear();
+ QScriptValue v = eng.evaluate("some_function1(15)");
+ QCOMPARE(v.toInt32(), (15+1+12));
+ QCOMPARE(spy->count(), 3);
+
+ // some_function1()
+ QCOMPARE(spy->at(0).type, ScriptEngineEvent::PositionChange);
+ QVERIFY(spy->at(0).scriptId != -1);
+ QCOMPARE(spy->at(0).lineNumber, 1);
+
+ // a++
+ QCOMPARE(spy->at(1).type, ScriptEngineEvent::PositionChange);
+ QVERIFY(spy->at(1).scriptId != spy->at(0).scriptId);
+ QCOMPARE(spy->at(1).lineNumber, 13);
+ // return a + 12
+ QCOMPARE(spy->at(2).type, ScriptEngineEvent::PositionChange);
+ QVERIFY(spy->at(2).scriptId == spy->at(1).scriptId);
+ QCOMPARE(spy->at(2).lineNumber, 14);
+ }
+
+ {
+ spy->clear();
+ QScriptValue v = some_function2.call(QScriptValue(), QScriptValueList() << 89 );
+ QCOMPARE(v.toInt32(), (89-1+11));
+ QCOMPARE(spy->count(), 2);
+
+ // b--
+ QCOMPARE(spy->at(0).type, ScriptEngineEvent::PositionChange);
+ QVERIFY(spy->at(0).scriptId != -1);
+ QCOMPARE(spy->at(0).lineNumber, 22);
+ // return b + 11
+ QCOMPARE(spy->at(1).type, ScriptEngineEvent::PositionChange);
+ QVERIFY(spy->at(1).scriptId == spy->at(0).scriptId);
+ QCOMPARE(spy->at(1).lineNumber, 23);
+ }
+
+ QVERIFY(!eng.hasUncaughtException());
+}
+
+
void tst_QScriptEngineAgent::exceptionThrowAndCatch()
{
QScriptEngine eng;
@@ -2379,5 +2432,86 @@ void tst_QScriptEngineAgent::QTBUG6108()
QCOMPARE(spy->at(4).scriptId, spy->at(0).scriptId);
}
+class BacktraceSpy : public QScriptEngineAgent
+{
+public:
+ BacktraceSpy(QScriptEngine *engine, const QStringList &expectedbacktrace, int breakpoint)
+ : QScriptEngineAgent(engine), expectedbacktrace(expectedbacktrace), breakpoint(breakpoint), ok(false) {}
+
+ QStringList expectedbacktrace;
+ int breakpoint;
+ bool ok;
+
+protected:
+
+ void exceptionThrow(qint64 , const QScriptValue &, bool)
+ { check(); }
+
+ void positionChange(qint64 , int lineNumber, int )
+ {
+ if (lineNumber == breakpoint)
+ check();
+ }
+
+private:
+ void check()
+ {
+ QCOMPARE(engine()->currentContext()->backtrace(), expectedbacktrace);
+ ok = true;
+ }
+};
+
+
+void tst_QScriptEngineAgent::backtraces_data()
+{
+ QTest::addColumn<QString>("code");
+ QTest::addColumn<int>("breakpoint");
+ QTest::addColumn<QStringList>("expectedbacktrace");
+
+ {
+ QString source(
+ "function foo() {\n"
+ " var a = 5\n"
+ "}\n"
+ "foo('hello', { })\n"
+ "var r = 0;");
+
+ QStringList expected;
+ expected
+ << "foo('hello', [object Object]) at filename.js:2"
+ << "<global>() at filename.js:4";
+ QTest::newRow("simple breakpoint") << source << 2 << expected;
+ }
+
+ {
+ QString source(
+ "function foo() {\n"
+ " error = err\n" //this must throw
+ "}\n"
+ "foo('hello', { })\n"
+ "var r = 0;");
+
+ QStringList expected;
+ expected
+ << "foo('hello', [object Object]) at filename.js:2"
+ << "<global>() at filename.js:4";
+ QTest::newRow("throw because of error") << source << -100 << expected;
+ }
+}
+
+void tst_QScriptEngineAgent::backtraces()
+{
+ QFETCH(QString, code);
+ QFETCH(int, breakpoint);
+ QFETCH(QStringList, expectedbacktrace);
+
+ QScriptEngine eng;
+ BacktraceSpy *spy = new BacktraceSpy(&eng, expectedbacktrace, breakpoint);
+ eng.setAgent(spy);
+ QLatin1String filename("filename.js");
+ eng.evaluate(code, filename);
+ QVERIFY(spy->ok);
+}
+
QTEST_MAIN(tst_QScriptEngineAgent)
#include "tst_qscriptengineagent.moc"
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
index 8aa4e711de..83a3388fd6 100644
--- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
@@ -2123,6 +2123,10 @@ void tst_QScriptValue::getSetProperty()
QVERIFY(object.property(foo).strictlyEquals(num));
QVERIFY(object.property("foo").strictlyEquals(num));
QVERIFY(object.propertyFlags(foo) == 0);
+
+ // Setting index property on non-Array
+ object.setProperty(13, num);
+ QVERIFY(object.property(13).equals(num));
}
void tst_QScriptValue::arrayElementGetterSetter()
diff --git a/tests/auto/qscrollbar/tst_qscrollbar.cpp b/tests/auto/qscrollbar/tst_qscrollbar.cpp
index 735b2dd2d4..16d5b4242e 100644
--- a/tests/auto/qscrollbar/tst_qscrollbar.cpp
+++ b/tests/auto/qscrollbar/tst_qscrollbar.cpp
@@ -130,7 +130,7 @@ void tst_QScrollBar::task_209492()
QMouseEvent mousePressEvent(QEvent::MouseButtonPress, pressPoint, globalPressPoint,
Qt::LeftButton, Qt::LeftButton, 0);
QApplication::sendEvent(verticalScrollBar, &mousePressEvent);
- QTest::qWait(50);
+ QTest::qWait(1);
QMouseEvent mouseReleaseEvent(QEvent::MouseButtonRelease, pressPoint, globalPressPoint,
Qt::LeftButton, Qt::LeftButton, 0);
QApplication::sendEvent(verticalScrollBar, &mouseReleaseEvent);
diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
index 4e23cb1d50..6b4904f964 100644
--- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
@@ -95,6 +95,8 @@ private slots:
void creating();
void creatingQObject();
void mixTrackingPointerCode();
+ void reentrancyWhileDestructing();
+
void threadStressTest_data();
void threadStressTest();
void map();
@@ -1870,6 +1872,60 @@ void tst_QSharedPointer::invalidConstructs()
}
}
+namespace QTBUG11730 {
+ struct IB
+ {
+ virtual ~IB() {}
+ };
+
+ struct IA
+ {
+ virtual QSharedPointer<IB> getB() = 0;
+ };
+
+ struct B: public IB
+ {
+ IA *m_a;
+ B(IA *a_a) :m_a(a_a)
+ { }
+ ~B()
+ {
+ QSharedPointer<IB> b = m_a->getB();
+ }
+ };
+
+ struct A: public IA
+ {
+ QSharedPointer<IB> b;
+
+ virtual QSharedPointer<IB> getB()
+ {
+ return b;
+ }
+
+ A()
+ {
+ b = QSharedPointer<IB>(new B(this));
+ }
+
+ ~A()
+ {
+ b.clear();
+ }
+ };
+}
+
+void tst_QSharedPointer::reentrancyWhileDestructing()
+{
+ // this bug is about recursing back into QSharedPointer::clear()
+ // from inside it
+ // that is, the destructor of the object being deleted recurses
+ // into the same QSharedPointer object.
+ // First reported as QTBUG-11730
+ QTBUG11730::A obj;
+}
+
+
QTEST_MAIN(tst_QSharedPointer)
#include "tst_qsharedpointer.moc"
diff --git a/tests/auto/qsocks5socketengine/qsocks5socketengine.pro b/tests/auto/qsocks5socketengine/qsocks5socketengine.pro
index 62c0c875a2..171d428e15 100644
--- a/tests/auto/qsocks5socketengine/qsocks5socketengine.pro
+++ b/tests/auto/qsocks5socketengine/qsocks5socketengine.pro
@@ -10,7 +10,7 @@ MOC_DIR=tmp
QT = core network
# Symbian toolchain does not support correct include semantics
-symbian:INCPATH+=..\\..\\..\\include\\QtNetwork\\private
+symbian:INCLUDEPATH+=..\\..\\..\\include\\QtNetwork\\private
symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp
index 0cf638b56c..0c12974455 100644
--- a/tests/auto/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp
@@ -55,6 +55,7 @@
#include <QAuthenticator>
#include "private/qhostinfo_p.h"
+#include "private/qsslsocket_openssl_p.h"
#include "../network-settings.h"
@@ -163,6 +164,7 @@ private slots:
void setDefaultCiphers();
void supportedCiphers();
void systemCaCertificates();
+ void wildcardCertificateNames();
void wildcard();
void setEmptyKey();
void spontaneousWrite();
@@ -1063,6 +1065,28 @@ void tst_QSslSocket::systemCaCertificates()
QCOMPARE(certs, QSslSocket::defaultCaCertificates());
}
+void tst_QSslSocket::wildcardCertificateNames()
+{
+ // Passing CN matches
+ QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("www.example.com"), QString("www.example.com")), true );
+ QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*.example.com"), QString("www.example.com")), true );
+ QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("xxx*.example.com"), QString("xxxwww.example.com")), true );
+ QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("f*.example.com"), QString("foo.example.com")), true );
+
+ // Failing CN matches
+ QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("xxx.example.com"), QString("www.example.com")), false );
+ QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*"), QString("www.example.com")), false );
+ QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*.*.com"), QString("www.example.com")), false );
+ QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*.example.com"), QString("baa.foo.example.com")), false );
+ QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("f*.example.com"), QString("baa.example.com")), false );
+ QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*.com"), QString("example.com")), false );
+ QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*fail.com"), QString("example.com")), false );
+ QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*.example."), QString("www.example.")), false );
+ QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*.example."), QString("www.example")), false );
+ QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString(""), QString("www")), false );
+ QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*"), QString("www")), false );
+}
+
void tst_QSslSocket::wildcard()
{
QSKIP("TODO: solve wildcard problem", SkipAll);
diff --git a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp
index 106fd8c8c0..02e29213ea 100644
--- a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp
+++ b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp
@@ -85,6 +85,7 @@ private slots:
void testFillInheritance();
void testStopOffsetOpacity();
void testUseElement();
+ void smallFont();
#ifndef QT_NO_COMPRESS
void testGzLoading();
@@ -1342,5 +1343,28 @@ void tst_QSvgRenderer::testUseElement()
}
}
+void tst_QSvgRenderer::smallFont()
+{
+ static const char *svgs[] = { "<svg width=\"50px\" height=\"50px\"><text x=\"10\" y=\"10\" font-size=\"0\">Hello world</text></svg>",
+ "<svg width=\"50px\" height=\"50px\"><text x=\"10\" y=\"10\" font-size=\"0.5\">Hello world</text></svg>"
+ };
+ const int COUNT = sizeof(svgs) / sizeof(svgs[0]);
+ QImage images[COUNT];
+ QPainter p;
+
+ for (int i = 0; i < COUNT; ++i) {
+ QByteArray data(svgs[i]);
+ if (i == 0)
+ QTest::ignoreMessage(QtWarningMsg, "QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0");
+ QSvgRenderer renderer(data);
+ images[i] = QImage(50, 50, QImage::Format_ARGB32_Premultiplied);
+ images[i].fill(-1);
+ p.begin(&images[i]);
+ renderer.render(&p);
+ p.end();
+ }
+ QVERIFY(images[0] != images[1]);
+}
+
QTEST_MAIN(tst_QSvgRenderer)
#include "tst_qsvgrenderer.moc"
diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
index 31cae403dd..e3b2ca53a6 100644
--- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
@@ -275,7 +275,7 @@ void tst_QTcpSocket::initTestCase_data()
QTest::newRow("WithHttpProxy") << true << int(HttpProxy) << false;
QTest::newRow("WithHttpProxyBasicAuth") << true << int(HttpProxy | AuthBasic) << false;
-// QTest::newRow("WithHttpProxyNtlmAuth") << true << int(HttpProxy | AuthNtlm) << false;
+ QTest::newRow("WithHttpProxyNtlmAuth") << true << int(HttpProxy | AuthNtlm) << false;
#ifndef QT_NO_OPENSSL
QTest::newRow("WithoutProxy SSL") << false << 0 << true;
@@ -284,7 +284,7 @@ void tst_QTcpSocket::initTestCase_data()
QTest::newRow("WithHttpProxy SSL") << true << int(HttpProxy) << true;
QTest::newRow("WithHttpProxyBasicAuth SSL") << true << int(HttpProxy | AuthBasic) << true;
-// QTest::newRow("WithHttpProxyNtlmAuth SSL") << true << int(HttpProxy | AuthNtlm) << true;
+ QTest::newRow("WithHttpProxyNtlmAuth SSL") << true << int(HttpProxy | AuthNtlm) << true;
#endif
}
diff --git a/tests/auto/qtexttable/tst_qtexttable.cpp b/tests/auto/qtexttable/tst_qtexttable.cpp
index 2e6007e2f6..a811b85521 100644
--- a/tests/auto/qtexttable/tst_qtexttable.cpp
+++ b/tests/auto/qtexttable/tst_qtexttable.cpp
@@ -48,9 +48,14 @@
#include <qtexttable.h>
#include <qdebug.h>
#include <qtextcursor.h>
+#include <qtextdocument.h>
+#include <qtextedit.h>
//TESTED_FILES=
+typedef QList<int> IntList;
+Q_DECLARE_METATYPE(IntList)
+
QT_FORWARD_DECLARE_CLASS(QTextDocument)
class tst_QTextTable : public QObject
@@ -78,6 +83,7 @@ private slots:
void insertRows();
void deleteInTable();
void mergeCells();
+ void mergeAndInsert();
void splitCells();
void blocksForTableShouldHaveEmptyFormat();
void removeTableByRemoveRows();
@@ -93,6 +99,9 @@ private slots:
void removeColumns3();
void removeColumns4();
void removeColumns5();
+ void removeColumnsInTableWithMergedRows();
+ void QTBUG11282_insertBeforeMergedEnding_data();
+ void QTBUG11282_insertBeforeMergedEnding();
private:
QTextTable *create2x2Table();
@@ -586,6 +595,16 @@ void tst_QTextTable::mergeCells()
QVERIFY(table->cellAt(0, 1) == table->cellAt(1, 1));
}
+void tst_QTextTable::mergeAndInsert()
+{
+ QTextTable *table = cursor.insertTable(4,3);
+ table->mergeCells(0,1,3,2);
+ table->mergeCells(3,0,1,3);
+ //Don't crash !
+ table->insertColumns(1,2);
+ QCOMPARE(table->columns(), 5);
+}
+
void tst_QTextTable::splitCells()
{
QTextTable *table = create4x4Table();
@@ -931,5 +950,55 @@ void tst_QTextTable::removeColumns5()
QCOMPARE(table->cellAt(3, 2).firstPosition(), 11);
}
+void tst_QTextTable::removeColumnsInTableWithMergedRows()
+{
+ QTextTable *table = cursor.insertTable(3, 4);
+ table->mergeCells(0, 0, 1, 4);
+ QCOMPARE(table->rows(), 3);
+ QCOMPARE(table->columns(), 4);
+
+ table->removeColumns(0, table->columns() - 1);
+
+ QCOMPARE(table->rows(), 3);
+ QCOMPARE(table->columns(), 1);
+}
+
+void tst_QTextTable::QTBUG11282_insertBeforeMergedEnding_data()
+{
+ QTest::addColumn<int>("rows");
+ QTest::addColumn<int>("columns");
+ QTest::addColumn<QList<int> >("merge");
+ QTest::addColumn<QList<int> >("insert");
+
+ QTest::newRow("2x3, merge two, insert one") << 2 << 3 << (QList<int>() << 1 << 2 << 2)
+ << (QList<int>() << 1 << 1) ;
+ QTest::newRow("3x4, merge three, insert one") << 3 << 4 << (QList<int>() << 1 << 3 << 3)
+ << (QList<int>() << 1 << 1) ;
+ QTest::newRow("4x3, merge two, insert two") << 4 << 3 << (QList<int>() << 1 << 4 << 2)
+ << (QList<int>() << 1 << 2) ;
+ QTest::newRow("4x4, merge middle two, insert one") << 4 << 4 << (QList<int>() << 1 << 4 << 2)
+ << (QList<int>() << 1 << 1) ;
+}
+
+void tst_QTextTable::QTBUG11282_insertBeforeMergedEnding()
+{
+ QFETCH(int, rows);
+ QFETCH(int, columns);
+ QFETCH(QList<int>, merge);
+ QFETCH(QList<int>, insert);
+ QTextTable *table = cursor.insertTable(rows, columns);
+ QTextEdit *textEdit = new QTextEdit;
+ textEdit->setDocument(doc);
+ textEdit->show();
+ QTest::qWaitForWindowShown(textEdit);
+ table->mergeCells(0,merge.at(0), merge.at(1), merge.at(2));
+ //Don't crash !
+ table->insertColumns(insert.at(0), insert.at(1));
+ //Check that the final size is what we expected
+ QCOMPARE(table->rows(), rows);
+ QCOMPARE(table->columns(), columns + insert.at(1));
+ delete textEdit;
+}
+
QTEST_MAIN(tst_QTextTable)
#include "tst_qtexttable.moc"
diff --git a/tests/auto/quuid/quuid.pro b/tests/auto/quuid/quuid.pro
index f7608fa377..25e24561ae 100644
--- a/tests/auto/quuid/quuid.pro
+++ b/tests/auto/quuid/quuid.pro
@@ -1,3 +1,6 @@
-load(qttest_p4)
-QT = core
-SOURCES += tst_quuid.cpp
+TEMPLATE = subdirs
+
+SUBDIRS = testProcessUniqueness
+
+SUBDIRS += test
+
diff --git a/tests/auto/quuid/test/test.pro b/tests/auto/quuid/test/test.pro
new file mode 100644
index 0000000000..123aa50e4e
--- /dev/null
+++ b/tests/auto/quuid/test/test.pro
@@ -0,0 +1,29 @@
+load(qttest_p4)
+
+QT = core
+SOURCES += ../tst_quuid.cpp
+TARGET = tst_quuid
+
+CONFIG(debug_and_release_target) {
+ CONFIG(debug, debug|release) {
+ DESTDIR = ../debug
+ } else {
+ DESTDIR = ../release
+ }
+} else {
+ DESTDIR = ..
+}
+
+wince* {
+ addFile_processUniqueness.sources = $$OUT_PWD/../testProcessUniqueness/testProcessUniqueness.exe
+ addFile_processUniqueness.path = testProcessUniqueness
+
+ DEPLOYMENT += addFile_processUniqueness
+}
+
+symbian {
+ binDep.sources = testProcessUniqueness.exe
+ binDep.path = \\sys\\bin
+
+ DEPLOYMENT += binDep
+}
diff --git a/tools/qtestlib/chart/main.cpp b/tests/auto/quuid/testProcessUniqueness/main.cpp
index 14734d983f..4d33c84abb 100644
--- a/tools/qtestlib/chart/main.cpp
+++ b/tests/auto/quuid/testProcessUniqueness/main.cpp
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the tools applications of the Qt Toolkit.
+** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -38,45 +38,25 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <QtCore>
-#include <QtSql>
-#include <database.h>
-#include <reportgenerator.h>
-
-int main(int argc, char **argv)
-{
- QCoreApplication app(argc, argv);
-
- QSqlDatabase db = createDataBase(":memory:");
-
- if (argc < 2) {
-
- // Try stdin
- QFile in;
- in.open(stdin, QIODevice::ReadOnly);
- QByteArray xml = in.readAll();
- if (xml.isEmpty()) {
- qDebug() << "Usage: chart xml-file [xml-file2 xml-file3 ...]";
- qDebug() << "See also QTestLib's \"-chart\" option";
- return 0;
- } else {
- loadXml(xml, QString());
- }
- }
+#include <stdio.h>
+#include <QUuid>
- QStringList files;
- for (int i = 1; i < argc; i++) {
- QString file = QString::fromLocal8Bit(argv[i]);
- files += file;
- }
-
- if (files.isEmpty() == false)
- loadXml(files);
-
- ReportGenerator reportGenerator;
- reportGenerator.writeReports();
-
- db.close();
+// This is a testcase for QTBUG-11213
+int main(int argc, char **argv)
+{
+ Q_UNUSED(argc)
+ Q_UNUSED(argv)
+
+ // First, break QUuid.
+ qrand();
+
+ // Now print a few uuids.
+ printf("%s", qPrintable(QUuid::createUuid().toString()));
+ printf("%s", qPrintable(QUuid::createUuid().toString()));
+ printf("%s", qPrintable(QUuid::createUuid().toString()));
+
+ // Done
+ return 0;
}
diff --git a/tests/auto/quuid/testProcessUniqueness/testProcessUniqueness.pro b/tests/auto/quuid/testProcessUniqueness/testProcessUniqueness.pro
new file mode 100644
index 0000000000..88df1a25d7
--- /dev/null
+++ b/tests/auto/quuid/testProcessUniqueness/testProcessUniqueness.pro
@@ -0,0 +1,8 @@
+SOURCES = main.cpp
+CONFIG += console
+
+DESTDIR = ./
+
+# no install rule for application used by test
+INSTALLS =
+
diff --git a/tests/auto/quuid/tst_quuid.cpp b/tests/auto/quuid/tst_quuid.cpp
index 47f356a8b7..409d8cf2c0 100644
--- a/tests/auto/quuid/tst_quuid.cpp
+++ b/tests/auto/quuid/tst_quuid.cpp
@@ -73,6 +73,7 @@ private slots:
void versions();
void threadUniqueness();
+ void processUniqueness();
public:
// Variables
@@ -196,5 +197,33 @@ void tst_QUuid::threadUniqueness()
qDeleteAll(threads);
}
+void tst_QUuid::processUniqueness()
+{
+ QProcess process;
+ QString processOneOutput;
+ QString processTwoOutput;
+
+ // Start it once
+#ifdef Q_OS_MAC
+ process.start("testProcessUniqueness/testProcessUniqueness.app");
+#else
+ process.start("testProcessUniqueness/testProcessUniqueness");
+#endif
+ QVERIFY(process.waitForFinished());
+ processOneOutput = process.readAllStandardOutput();
+
+ // Start it twice
+#ifdef Q_OS_MAC
+ process.start("testProcessUniqueness/testProcessUniqueness.app");
+#else
+ process.start("testProcessUniqueness/testProcessUniqueness");
+#endif
+ QVERIFY(process.waitForFinished());
+ processTwoOutput = process.readAllStandardOutput();
+
+ // They should be *different*!
+ QVERIFY(processOneOutput != processTwoOutput);
+}
+
QTEST_MAIN(tst_QUuid)
#include "tst_quuid.moc"
diff --git a/tests/auto/qvideosurfaceformat/tst_qvideosurfaceformat.cpp b/tests/auto/qvideosurfaceformat/tst_qvideosurfaceformat.cpp
index 8a4307eb28..a4bfb8999c 100644
--- a/tests/auto/qvideosurfaceformat/tst_qvideosurfaceformat.cpp
+++ b/tests/auto/qvideosurfaceformat/tst_qvideosurfaceformat.cpp
@@ -127,16 +127,37 @@ void tst_QVideoSurfaceFormat::construct_data()
QTest::addColumn<QSize>("frameSize");
QTest::addColumn<QVideoFrame::PixelFormat>("pixelFormat");
QTest::addColumn<QAbstractVideoBuffer::HandleType>("handleType");
+ QTest::addColumn<bool>("valid");
QTest::newRow("32x32 rgb32 no handle")
<< QSize(32, 32)
<< QVideoFrame::Format_RGB32
- << QAbstractVideoBuffer::NoHandle;
+ << QAbstractVideoBuffer::NoHandle
+ << true;
QTest::newRow("1024x768 YUV444 GL texture")
<< QSize(32, 32)
<< QVideoFrame::Format_YUV444
- << QAbstractVideoBuffer::GLTextureHandle;
+ << QAbstractVideoBuffer::GLTextureHandle
+ << true;
+
+ QTest::newRow("32x32 invalid no handle")
+ << QSize(32, 32)
+ << QVideoFrame::Format_Invalid
+ << QAbstractVideoBuffer::NoHandle
+ << false;
+
+ QTest::newRow("invalid size, rgb32 no handle")
+ << QSize()
+ << QVideoFrame::Format_RGB32
+ << QAbstractVideoBuffer::NoHandle
+ << false;
+
+ QTest::newRow("0x0 rgb32 no handle")
+ << QSize(0,0)
+ << QVideoFrame::Format_RGB32
+ << QAbstractVideoBuffer::NoHandle
+ << true;
}
void tst_QVideoSurfaceFormat::construct()
@@ -144,6 +165,7 @@ void tst_QVideoSurfaceFormat::construct()
QFETCH(QSize, frameSize);
QFETCH(QVideoFrame::PixelFormat, pixelFormat);
QFETCH(QAbstractVideoBuffer::HandleType, handleType);
+ QFETCH(bool, valid);
QRect viewport(QPoint(0, 0), frameSize);
@@ -154,6 +176,7 @@ void tst_QVideoSurfaceFormat::construct()
QCOMPARE(format.frameSize(), frameSize);
QCOMPARE(format.frameWidth(), frameSize.width());
QCOMPARE(format.frameHeight(), frameSize.height());
+ QCOMPARE(format.isValid(), valid);
QCOMPARE(format.viewport(), viewport);
QCOMPARE(format.scanLineDirection(), QVideoSurfaceFormat::TopToBottom);
QCOMPARE(format.frameRate(), 0.0);
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index f91ad6bd4d..57b01f1cc0 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -397,6 +397,9 @@ private slots:
void childAt();
#ifdef Q_WS_MAC
void childAt_unifiedToolBar();
+#ifdef QT_MAC_USE_COCOA
+ void taskQTBUG_11373();
+#endif // QT_MAC_USE_COCOA
#endif
private:
@@ -9694,7 +9697,6 @@ void tst_QWidget::destroyBackingStoreWhenHidden()
// Native child widget should once again share parent's backing store
QVERIFY(0 != backingStore(parent));
- QEXPECT_FAIL("", "QTBUG-10643", Continue);
QVERIFY(0 == backingStore(child));
}
@@ -9743,7 +9745,7 @@ void tst_QWidget::destroyBackingStoreWhenHidden()
QVERIFY(0 != backingStore(child));
// Parent is obscured, therefore its backing store should be destroyed
- QEXPECT_FAIL("", "QTBUG-10643", Continue);
+ QEXPECT_FAIL("", "QTBUG-12406", Continue);
QVERIFY(0 == backingStore(parent));
// Disable full screen
@@ -9757,7 +9759,6 @@ void tst_QWidget::destroyBackingStoreWhenHidden()
// Native child widget should once again share parent's backing store
QVERIFY(0 != backingStore(parent));
- QEXPECT_FAIL("", "QTBUG-10643", Continue);
QVERIFY(0 == backingStore(child));
}
}
@@ -10438,6 +10439,26 @@ void tst_QWidget::childAt_unifiedToolBar()
QCOMPARE(mainWindow.childAt(toolBarTopLeft), static_cast<QWidget *>(toolBar));
QCOMPARE(mainWindow.childAt(labelTopLeft), static_cast<QWidget *>(label));
}
+
+#ifdef QT_MAC_USE_COCOA
+void tst_QWidget::taskQTBUG_11373()
+{
+ QMainWindow * myWindow = new QMainWindow();
+ QWidget * center = new QWidget();
+ myWindow -> setCentralWidget(center);
+ QWidget * drawer = new QWidget(myWindow, Qt::Drawer);
+ drawer -> hide();
+ QCOMPARE(drawer->isVisible(), false);
+ myWindow -> show();
+ myWindow -> raise();
+ // The drawer shouldn't be visible now.
+ QCOMPARE(drawer->isVisible(), false);
+ myWindow -> setWindowState(Qt::WindowFullScreen);
+ myWindow -> setWindowState(Qt::WindowNoState);
+ // The drawer should still not be visible, since we haven't shown it.
+ QCOMPARE(drawer->isVisible(), false);
+}
+#endif // QT_MAC_USE_COCOA
#endif
QTEST_MAIN(tst_QWidget)
diff --git a/tests/auto/qxmlquery/qxmlquery.pro b/tests/auto/qxmlquery/qxmlquery.pro
index ae73488f11..044b7cec19 100644
--- a/tests/auto/qxmlquery/qxmlquery.pro
+++ b/tests/auto/qxmlquery/qxmlquery.pro
@@ -23,7 +23,12 @@ wince*|symbian: {
addFiles.path = .
patternistFiles.sources = ../xmlpatterns/queries
- patternistFiles.path = ../xmlpatterns
+ symbian: {
+ #../xmlpatterns resolves to an illegal path for deployment
+ patternistFiles.path = xmlpatterns
+ } else {
+ patternistFiles.path = ../xmlpatterns
+ }
DEPLOYMENT += addFiles patternistFiles
}
diff --git a/tests/auto/qxmlquery/tst_qxmlquery.cpp b/tests/auto/qxmlquery/tst_qxmlquery.cpp
index 6fd9b931da..2187aeb3a4 100644
--- a/tests/auto/qxmlquery/tst_qxmlquery.cpp
+++ b/tests/auto/qxmlquery/tst_qxmlquery.cpp
@@ -67,6 +67,9 @@
#if defined(Q_OS_SYMBIAN)
#define SRCDIR ""
+#define XMLPATTERNSDIR "xmlpatterns"
+#else
+#define XMLPATTERNSDIR SRCDIR "../xmlpatterns"
#endif
/*!
@@ -264,7 +267,7 @@ void tst_QXmlQuery::checkBaseURI(const QUrl &baseURI, const QString &candidate)
QVERIFY(QDir(baseURI.toLocalFile()).relativeFilePath(QFileInfo(candidate).canonicalFilePath()).startsWith("../"));
}
-const char *const tst_QXmlQuery::queriesDirectory = SRCDIR "../xmlpatterns/queries/";
+const char *const tst_QXmlQuery::queriesDirectory = XMLPATTERNSDIR "/queries/";
QStringList tst_QXmlQuery::queries()
{
@@ -857,7 +860,7 @@ void tst_QXmlQuery::bindVariableXSLTSuccess() const
stylesheet.bindVariable(QLatin1String("paramSelectWithTypeIntBoundWithBindVariableRequired"),
QVariant(QLatin1String("param5")));
- stylesheet.setQuery(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/parameters.xsl"))));
+ stylesheet.setQuery(QUrl(inputFileAsURI(QLatin1String(XMLPATTERNSDIR "/stylesheets/parameters.xsl"))));
QVERIFY(stylesheet.isValid());
@@ -1798,11 +1801,11 @@ void tst_QXmlQuery::setFocusQUrl() const
{
QXmlQuery query(QXmlQuery::XSLT20);
- const TestURIResolver resolver(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/documentElement.xml"))));
+ const TestURIResolver resolver(QUrl(inputFileAsURI(QLatin1String(XMLPATTERNSDIR "/stylesheets/documentElement.xml"))));
query.setUriResolver(&resolver);
QVERIFY(query.setFocus(QUrl(QLatin1String("arbitraryURI"))));
- query.setQuery(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/copyWholeDocument.xsl"))));
+ query.setQuery(QUrl(inputFileAsURI(QLatin1String(XMLPATTERNSDIR "/stylesheets/copyWholeDocument.xsl"))));
QVERIFY(query.isValid());
QBuffer result;
@@ -2997,7 +3000,7 @@ void tst_QXmlQuery::setInitialTemplateNameQXmlName() const
QCOMPARE(query.initialTemplateName(), name);
- query.setQuery(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/namedTemplate.xsl"))));
+ query.setQuery(QUrl(inputFileAsURI(QLatin1String(XMLPATTERNSDIR "/stylesheets/namedTemplate.xsl"))));
QVERIFY(query.isValid());
QBuffer result;
@@ -3059,7 +3062,7 @@ void tst_QXmlQuery::setNetworkAccessManager() const
/* Ensure fn:doc() picks up the right QNetworkAccessManager. */
{
NetworkOverrider networkOverrider(QUrl(QLatin1String("tag:example.com:DOESNOTEXIST")),
- QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/queries/simpleDocument.xml"))));
+ QUrl(inputFileAsURI(QLatin1String(XMLPATTERNSDIR "/queries/simpleDocument.xml"))));
QXmlQuery query;
query.setNetworkAccessManager(&networkOverrider);
@@ -3075,7 +3078,7 @@ void tst_QXmlQuery::setNetworkAccessManager() const
/* Ensure setQuery() is using the right network manager. */
{
NetworkOverrider networkOverrider(QUrl(QLatin1String("tag:example.com:DOESNOTEXIST")),
- QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/queries/concat.xq"))));
+ QUrl(inputFileAsURI(QLatin1String(XMLPATTERNSDIR "/queries/concat.xq"))));
QXmlQuery query;
query.setNetworkAccessManager(&networkOverrider);
@@ -3133,9 +3136,9 @@ void tst_QXmlQuery::multipleDocsAndFocus() const
/* We use string concatenation, since variable bindings might disturb what
* we're testing. */
query.setQuery(QLatin1String("string(doc('") +
- inputFile(QLatin1String(SRCDIR "../xmlpatterns/queries/simpleDocument.xml")) +
+ inputFile(QLatin1String(XMLPATTERNSDIR "/queries/simpleDocument.xml")) +
QLatin1String("'))"));
- query.setFocus(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/documentElement.xml"))));
+ query.setFocus(QUrl(inputFileAsURI(QLatin1String(XMLPATTERNSDIR "/stylesheets/documentElement.xml"))));
query.setQuery(QLatin1String("string(.)"));
QStringList result;
@@ -3159,11 +3162,11 @@ void tst_QXmlQuery::multipleEvaluationsWithDifferentFocus() const
QXmlQuery query;
QStringList result;
- query.setFocus(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/documentElement.xml"))));
+ query.setFocus(QUrl(inputFileAsURI(QLatin1String(XMLPATTERNSDIR "/stylesheets/documentElement.xml"))));
query.setQuery(QLatin1String("string(.)"));
QVERIFY(query.evaluateTo(&result));
- query.setFocus(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/documentElement.xml"))));
+ query.setFocus(QUrl(inputFileAsURI(QLatin1String(XMLPATTERNSDIR "/stylesheets/documentElement.xml"))));
QVERIFY(query.evaluateTo(&result));
}
diff --git a/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp
index 82dc7ddddf..58cec4f408 100644
--- a/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -66,6 +66,11 @@ private slots:
void floatVariantAssignment();
void rectVariantAssignment();
void stringVariantAssignment();
+
+ void doubleVariantValue();
+ void floatVariantValue();
+ void rectVariantValue();
+ void stringVariantValue();
};
void tst_qvariant::testBound()
@@ -175,6 +180,46 @@ void tst_qvariant::stringVariantAssignment()
variantAssignment<QString>(QString());
}
+void tst_qvariant::doubleVariantValue()
+{
+ QVariant v(0.0);
+ QBENCHMARK {
+ for(int i = 0; i < ITERATION_COUNT; ++i) {
+ v.toDouble();
+ }
+ }
+}
+
+void tst_qvariant::floatVariantValue()
+{
+ QVariant v(0.0f);
+ QBENCHMARK {
+ for(int i = 0; i < ITERATION_COUNT; ++i) {
+ v.toFloat();
+ }
+ }
+}
+
+void tst_qvariant::rectVariantValue()
+{
+ QVariant v(QRect(1,2,3,4));
+ QBENCHMARK {
+ for(int i = 0; i < ITERATION_COUNT; ++i) {
+ v.toRect();
+ }
+ }
+}
+
+void tst_qvariant::stringVariantValue()
+{
+ QVariant v = QString();
+ QBENCHMARK {
+ for(int i = 0; i < ITERATION_COUNT; ++i) {
+ v.toString();
+ }
+ }
+}
+
QTEST_MAIN(tst_qvariant)
#include "tst_qvariant.moc"
diff --git a/tests/benchmarks/gui/image/image.pro b/tests/benchmarks/gui/image/image.pro
index 3094e7273a..a8c6732413 100644
--- a/tests/benchmarks/gui/image/image.pro
+++ b/tests/benchmarks/gui/image/image.pro
@@ -1,6 +1,7 @@
TEMPLATE = subdirs
SUBDIRS = \
blendbench \
+ qimageconversion \
qimagereader \
qpixmap \
qpixmapcache
diff --git a/tests/benchmarks/gui/image/qimageconversion/qimageconversion.pro b/tests/benchmarks/gui/image/qimageconversion/qimageconversion.pro
new file mode 100644
index 0000000000..ec50d98c54
--- /dev/null
+++ b/tests/benchmarks/gui/image/qimageconversion/qimageconversion.pro
@@ -0,0 +1,10 @@
+load(qttest_p4)
+TEMPLATE = app
+TARGET = tst_bench_imageConversion
+
+SOURCES += tst_qimageconversion.cpp
+
+!contains(QT_CONFIG, no-gif):DEFINES += QTEST_HAVE_GIF
+!contains(QT_CONFIG, no-jpeg):DEFINES += QTEST_HAVE_JPEG
+!contains(QT_CONFIG, no-mng):DEFINES += QTEST_HAVE_MNG
+!contains(QT_CONFIG, no-tiff):DEFINES += QTEST_HAVE_TIFF
diff --git a/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp b/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp
new file mode 100644
index 0000000000..1c76d46e16
--- /dev/null
+++ b/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QImage>
+
+Q_DECLARE_METATYPE(QImage)
+
+class tst_QImageConversion : public QObject
+{
+ Q_OBJECT
+private slots:
+ void convertRgb888ToRGB32_data();
+ void convertRgb888ToRGB32();
+
+private:
+ QImage generateImageRgb888(int width, int height);
+};
+
+void tst_QImageConversion::convertRgb888ToRGB32_data()
+{
+ QTest::addColumn<QImage>("inputImage");
+ // height = 5000 to get interesting timing.
+
+ // 3 pixels wide -> smaller than regular vector of 128bits
+ QTest::newRow("width: 3px; height: 5000px;") << generateImageRgb888(3, 5000);
+
+ // 8 pixels wide -> potential for 2 vectors
+ QTest::newRow("width: 8px; height: 5000px;") << generateImageRgb888(3, 5000);
+
+ // 16 pixels, minimum for the SSSE3 implementation
+ QTest::newRow("width: 16px; height: 5000px;") << generateImageRgb888(16, 5000);
+
+ // 50 pixels, more realistic use case
+ QTest::newRow("width: 50px; height: 5000px;") << generateImageRgb888(50, 5000);
+
+ // 2000 pixels -> typical values for pictures
+ QTest::newRow("width: 2000px; height: 5000px;") << generateImageRgb888(2000, 5000);
+}
+
+void tst_QImageConversion::convertRgb888ToRGB32()
+{
+ QFETCH(QImage, inputImage);
+
+ QBENCHMARK {
+ volatile QImage output = inputImage.convertToFormat(QImage::Format_RGB32);
+ // we need the volatile and the following to make sure the compiler does not do
+ // anything stupid :)
+ (void)output;
+ }
+}
+
+/*
+ Fill a RGB888 image with "random" pixel values.
+ */
+QImage tst_QImageConversion::generateImageRgb888(int width, int height)
+{
+ QImage image(width, height, QImage::Format_RGB888);
+ const int byteWidth = width * 3;
+
+ for (int y = 0; y < image.height(); ++y) {
+ uchar *scanline = image.scanLine(y);
+ for (int x = 0; x < byteWidth; ++x)
+ scanline[x] = x ^ y;
+ }
+ return image;
+}
+
+QTEST_MAIN(tst_QImageConversion)
+#include "tst_qimageconversion.moc"
diff --git a/tests/benchmarks/gui/image/qimagereader/images/pngwithcompressedtext.png b/tests/benchmarks/gui/image/qimagereader/images/pngwithcompressedtext.png
deleted file mode 100644
index 01b227015b..0000000000
--- a/tests/benchmarks/gui/image/qimagereader/images/pngwithcompressedtext.png
+++ /dev/null
Binary files differ
diff --git a/tests/benchmarks/gui/image/qimagereader/images/pngwithtext.png b/tests/benchmarks/gui/image/qimagereader/images/pngwithtext.png
deleted file mode 100644
index 5d93799a5e..0000000000
--- a/tests/benchmarks/gui/image/qimagereader/images/pngwithtext.png
+++ /dev/null
Binary files differ
diff --git a/tests/benchmarks/network/network.pro b/tests/benchmarks/network/network.pro
index 4e83db27f1..ea0f821d5c 100644
--- a/tests/benchmarks/network/network.pro
+++ b/tests/benchmarks/network/network.pro
@@ -1,5 +1,5 @@
TEMPLATE = subdirs
-SUBDIRS = \
+SUBDIRS = \
access \
kernel \
socket
diff --git a/tests/manual/bearerex/bearerex.cpp b/tests/manual/bearerex/bearerex.cpp
index 6f280dbfbf..2f90837ba8 100644
--- a/tests/manual/bearerex/bearerex.cpp
+++ b/tests/manual/bearerex/bearerex.cpp
@@ -433,6 +433,7 @@ void SessionTab::opened()
iapLineEdit->setText(config.name()+" ("+config.identifier()+")");
}
}
+ newState(m_NetworkSession->state()); // Update the "(open)"
if (m_NetworkSession->configuration().type() == QNetworkConfiguration::UserChoice) {
QVariant identifier = m_NetworkSession->sessionProperty("UserChoiceConfiguration");
@@ -523,7 +524,7 @@ void SessionTab::newState(QNetworkSession::State state)
QString active;
if (m_NetworkSession->isOpen()) {
- active = " (O)";
+ active = " (open)";
}
stateLineEdit->setText(stateString(state)+active);
}
diff --git a/tests/manual/bearerex/bearerex.pro b/tests/manual/bearerex/bearerex.pro
index df39c8510e..397261d0c6 100644
--- a/tests/manual/bearerex/bearerex.pro
+++ b/tests/manual/bearerex/bearerex.pro
@@ -25,4 +25,4 @@ SOURCES += bearerex.cpp \
xqlistwidget.cpp \
datatransferer.cpp
-symbian:TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData
+symbian:TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData WriteDeviceData ReadDeviceData
diff --git a/tools/assistant/lib/qhelpprojectdata.cpp b/tools/assistant/lib/qhelpprojectdata.cpp
index b0faf0caa4..52478478a4 100644
--- a/tools/assistant/lib/qhelpprojectdata.cpp
+++ b/tools/assistant/lib/qhelpprojectdata.cpp
@@ -327,10 +327,12 @@ bool QHelpProjectDataPrivate::hasValidSyntax(const QString &nameSpace,
QUrl url;
const QLatin1String scheme("qthelp");
url.setScheme(scheme);
- url.setHost(nameSpace);
+ const QString canonicalNamespace = nameSpace.toLower();
+ url.setHost(canonicalNamespace);
url.setPath(vFolder);
- const QString expectedUrl(scheme + QLatin1String("://") + nameSpace + slash + vFolder);
+ const QString expectedUrl(scheme + QLatin1String("://")
+ + canonicalNamespace + slash + vFolder);
return url.isValid() && url.toString() == expectedUrl;
}
diff --git a/tools/assistant/lib/qhelpsearchengine.cpp b/tools/assistant/lib/qhelpsearchengine.cpp
index 9914efa1fd..164163a9ef 100644
--- a/tools/assistant/lib/qhelpsearchengine.cpp
+++ b/tools/assistant/lib/qhelpsearchengine.cpp
@@ -263,17 +263,17 @@ private:
engines setupFinished() signal to know when it can start to index documentation.
After starting the indexing process the signal indexingStarted() is emitted and
- on the end of the indexing process the indexingFinished() is emited. To stop
+ on the end of the indexing process the indexingFinished() is emitted. To stop
the indexing one can call cancelIndexing().
While the indexing process has finished, the search engine can now be used to search
thru its index for a given term. To do this one may use the possibility of creating the
QHelpSearchQuery list by self or reuse the QHelpSearchQueryWidget which has the inbuild
- functionality to set up a proper search querys list that get's passed to the search engines
+ functionality to set up a proper search queries list that get's passed to the search engines
search() function.
After the list of querys has been passed to the search engine, the signal searchingStarted()
- is emited and after the search has finished the searchingFinished() signal is emited. The
+ is emitted and after the search has finished the searchingFinished() signal is emitted. The
search process can be stopped by calling cancelSearching().
If the search succeeds, the searchingFinished() will be called with the search hits count,
@@ -318,7 +318,7 @@ private:
uses the given \a helpEngine to access the documentation that needs to be indexed.
The QHelpEngine's setupFinished() signal is automatically connected to the
QHelpSearchEngine's indexing function, so that new documentation will be indexed
- after the signal is emited.
+ after the signal is emitted.
*/
QHelpSearchEngine::QHelpSearchEngine(QHelpEngineCore *helpEngine, QObject *parent)
: QObject(parent)
@@ -434,7 +434,7 @@ void QHelpSearchEngine::cancelSearching()
}
/*!
- Starts the search process using the given list of querys \a queryList
+ Starts the search process using the given list of queries \a queryList
build by the search field name and the values to search for.
*/
void QHelpSearchEngine::search(const QList<QHelpSearchQuery> &queryList)
diff --git a/tools/assistant/tools/assistant/assistant.pro b/tools/assistant/tools/assistant/assistant.pro
index eb8cc51d90..d9aff7a4da 100644
--- a/tools/assistant/tools/assistant/assistant.pro
+++ b/tools/assistant/tools/assistant/assistant.pro
@@ -1,4 +1,4 @@
-include($$QT_SOURCE_TREE/tools/shared/fontpanel/fontpanel.pri)
+include(../../../shared/fontpanel/fontpanel.pri)
TEMPLATE = app
LANGUAGE = C++
TARGET = assistant
diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.cpp b/tools/assistant/tools/assistant/helpviewer_qwv.cpp
index dcbbf2ce96..221e1b89d7 100644
--- a/tools/assistant/tools/assistant/helpviewer_qwv.cpp
+++ b/tools/assistant/tools/assistant/helpviewer_qwv.cpp
@@ -101,7 +101,7 @@ qint64 HelpNetworkReply::readData(char *buffer, qint64 maxlen)
TRACE_OBJ
qint64 len = qMin(qint64(data.length()), maxlen);
if (len) {
- qMemCopy(buffer, data.constData(), len);
+ memcpy(buffer, data.constData(), len);
data.remove(0, len);
}
if (!data.length())
diff --git a/tools/assistant/translations/qt_help.pro b/tools/assistant/translations/qt_help.pro
deleted file mode 100644
index 6f66876325..0000000000
--- a/tools/assistant/translations/qt_help.pro
+++ /dev/null
@@ -1,53 +0,0 @@
-# Include those manually as they do not contain any directory specification
-
-SOURCES += ../lib/qhelpcollectionhandler.cpp \
- ../lib/qhelpcontentwidget.cpp \
- ../lib/qhelpdatainterface.cpp \
- ../lib/qhelpdbreader.cpp \
- ../lib/qhelpengine.cpp \
- ../lib/qhelpenginecore.cpp \
- ../lib/qhelpgenerator.cpp \
- ../lib/qhelpindexwidget.cpp \
- ../lib/qhelpprojectdata.cpp \
- ../lib/qhelpsearchengine.cpp \
- ../lib/qhelpsearchindexreader_clucene.cpp \
- ../lib/qhelpsearchindexreader_default.cpp \
- ../lib/qhelpsearchindexwriter_clucene.cpp \
- ../lib/qhelpsearchindexwriter_default.cpp \
- ../lib/qhelpsearchindex_default.cpp \
- ../lib/qhelpsearchquerywidget.cpp \
- ../lib/qhelpsearchresultwidget.cpp
-
-HEADERS += ../lib/qhelpcollectionhandler_p.h \
- ../lib/qhelpcontentwidget.h \
- ../lib/qhelpdatainterface_p.h \
- ../lib/qhelpdbreader_p.h \
- ../lib/qhelpengine.h \
- ../lib/qhelpenginecore.h \
- ../lib/qhelpengine_p.h \
- ../lib/qhelpgenerator_p.h \
- ../lib/qhelpindexwidget.h \
- ../lib/qhelpprojectdata_p.h \
- ../lib/qhelpsearchengine.h \
- ../lib/qhelpsearchindexreader_clucene_p.h \
- ../lib/qhelpsearchindexreader_default_p.h \
- ../lib/qhelpsearchindexwriter_clucene_p.h \
- ../lib/qhelpsearchindexwriter_default_p.h \
- ../lib/qhelpsearchindex_default_p.h \
- ../lib/qhelpsearchquerywidget.h \
- ../lib/qhelpsearchresultwidget.h \
- ../lib/qhelp_global.h
-
-
-TR_DIR = $$PWD/../../../translations
-TRANSLATIONS = \
- $$TR_DIR/qt_help_cs.ts \
- $$TR_DIR/qt_help_da.ts \
- $$TR_DIR/qt_help_de.ts \
- $$TR_DIR/qt_help_hu.ts \
- $$TR_DIR/qt_help_ja.ts \
- $$TR_DIR/qt_help_pl.ts \
- $$TR_DIR/qt_help_ru.ts \
- $$TR_DIR/qt_help_zh_CN.ts \
- $$TR_DIR/qt_help_zh_TW.ts \
- $$TR_DIR/qt_help_fr.ts
diff --git a/tools/assistant/translations/translations.pro b/tools/assistant/translations/translations.pro
deleted file mode 100644
index c692262fea..0000000000
--- a/tools/assistant/translations/translations.pro
+++ /dev/null
@@ -1,54 +0,0 @@
-# Include those manually as they do not contain any directory specification
-
-FORMS += ../tools/assistant/filternamedialog.ui \
- ../tools/assistant/installdialog.ui \
- ../tools/assistant/preferencesdialog.ui \
- ../tools/assistant/topicchooser.ui \
- ../tools/assistant/bookmarkdialog.ui
-
-SOURCES += ../tools/assistant/aboutdialog.cpp \
- ../tools/assistant/bookmarkmanager.cpp \
- ../tools/assistant/centralwidget.cpp \
- ../tools/assistant/cmdlineparser.cpp \
- ../tools/assistant/contentwindow.cpp \
- ../tools/assistant/filternamedialog.cpp \
- ../tools/assistant/helpviewer.cpp \
- ../tools/assistant/indexwindow.cpp \
- ../tools/assistant/installdialog.cpp \
- ../tools/assistant/main.cpp \
- ../tools/assistant/mainwindow.cpp \
- ../tools/assistant/preferencesdialog.cpp \
- ../tools/assistant/remotecontrol.cpp \
- ../tools/assistant/searchwidget.cpp \
- ../tools/assistant/topicchooser.cpp \
-
-SOURCES += ../../shared/fontpanel/fontpanel.cpp
-
-HEADERS += ../tools/assistant/aboutdialog.h \
- ../tools/assistant/bookmarkmanager.h \
- ../tools/assistant/centralwidget.h \
- ../tools/assistant/cmdlineparser.h \
- ../tools/assistant/contentwindow.h \
- ../tools/assistant/filternamedialog.h \
- ../tools/assistant/helpviewer.h \
- ../tools/assistant/indexwindow.h \
- ../tools/assistant/installdialog.h \
- ../tools/assistant/mainwindow.h \
- ../tools/assistant/preferencesdialog.h \
- ../tools/assistant/remotecontrol.h \
- ../tools/assistant/remotecontrol_win.h \
- ../tools/assistant/searchwidget.h \
- ../tools/assistant/topicchooser.h \
-
-TR_DIR = $$PWD/../../../translations
-TRANSLATIONS = \
- $$TR_DIR/assistant_cs.ts \
- $$TR_DIR/assistant_da.ts \
- $$TR_DIR/assistant_de.ts \
- $$TR_DIR/assistant_fr.ts \
- $$TR_DIR/assistant_hu.ts \
- $$TR_DIR/assistant_ja.ts \
- $$TR_DIR/assistant_pl.ts \
- $$TR_DIR/assistant_ru.ts \
- $$TR_DIR/assistant_zh_CN.ts \
- $$TR_DIR/assistant_zh_TW.ts
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 952d4e0ac7..b7de052ee7 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -581,6 +581,8 @@ void Configure::parseCmdLine()
// Image formats --------------------------------------------
else if (configCmdLine.at(i) == "-no-gif")
dictionary[ "GIF" ] = "no";
+ else if (configCmdLine.at(i) == "-qt-gif")
+ dictionary[ "GIF" ] = "plugin";
else if (configCmdLine.at(i) == "-no-libtiff") {
dictionary[ "TIFF"] = "no";
@@ -1741,7 +1743,7 @@ bool Configure::displayHelp()
desc("ZLIB", "system", "-system-zlib", "Use zlib from the operating system.\nSee http://www.gzip.org/zlib\n");
desc("GIF", "no", "-no-gif", "Do not compile GIF reading support.");
- desc("GIF", "auto", "-qt-gif", "Compile GIF reading support.\nSee also src/gui/image/qgifhandler.h\n");
+ desc("GIF", "auto", "-qt-gif", "Compile GIF reading support.\nSee also src/gui/image/qgifhandler_p.h\n");
desc("LIBPNG", "no", "-no-libpng", "Do not compile PNG support.");
desc("LIBPNG", "qt", "-qt-libpng", "Use the libpng bundled with Qt.");
@@ -2439,7 +2441,9 @@ void Configure::generateOutputVars()
qmakeFormatPlugins += "gif";
if (dictionary[ "TIFF" ] == "no")
- qtConfig += "no-tiff";
+ qtConfig += "no-tiff";
+ else if (dictionary[ "TIFF" ] == "yes")
+ qtConfig += "tiff";
else if (dictionary[ "TIFF" ] == "plugin")
qmakeFormatPlugins += "tiff";
if (dictionary[ "LIBTIFF" ] == "system")
@@ -2447,6 +2451,8 @@ void Configure::generateOutputVars()
if (dictionary[ "JPEG" ] == "no")
qtConfig += "no-jpeg";
+ else if (dictionary[ "JPEG" ] == "yes")
+ qtConfig += "jpeg";
else if (dictionary[ "JPEG" ] == "plugin")
qmakeFormatPlugins += "jpeg";
if (dictionary[ "LIBJPEG" ] == "system")
@@ -2919,6 +2925,8 @@ void Configure::generateCachefile()
configStream << "#namespaces" << endl << "QT_NAMESPACE = " << dictionary["QT_NAMESPACE"] << endl;
}
+ configStream << "#modules" << endl << "for(mod,$$list($$files($$[QMAKE_MKSPECS]/modules/qt_*.pri))):include($$mod)" << endl;
+
configStream.flush();
configFile.close();
}
@@ -3160,16 +3168,6 @@ void Configure::generateConfigfiles()
QFile::remove(outName);
tmpFile.copy(outName);
tmpFile.close();
-
- if (!QFile::exists(buildPath + "/include/QtCore/qconfig.h")) {
- if (!writeToFile("#include \"../../src/corelib/global/qconfig.h\"\n",
- buildPath + "/include/QtCore/qconfig.h")
- || !writeToFile("#include \"../../src/corelib/global/qconfig.h\"\n",
- buildPath + "/include/Qt/qconfig.h")) {
- dictionary["DONE"] = "error";
- return;
- }
- }
}
// Copy configured mkspec to default directory, but remove the old one first, if there is any
diff --git a/tools/designer/src/components/lib/lib.pro b/tools/designer/src/components/lib/lib.pro
index 8d0e69266a..0ada845f83 100644
--- a/tools/designer/src/components/lib/lib.pro
+++ b/tools/designer/src/components/lib/lib.pro
@@ -44,11 +44,11 @@ SOURCES += qdesigner_components.cpp
}
INCLUDEPATH += . .. \
- $$QT_SOURCE_TREE/tools/designer/src/lib/components \
- $$QT_SOURCE_TREE/tools/designer/src/lib/sdk \
- $$QT_SOURCE_TREE/tools/designer/src/lib/extension \
- $$QT_SOURCE_TREE/tools/designer/src/lib/uilib \
- $$QT_SOURCE_TREE/tools/designer/src/lib/shared
+ $$PWD/../../lib/components \
+ $$PWD/../../lib/sdk \
+ $$PWD/../../lib/extension \
+ $$PWD/../../lib/uilib \
+ $$PWD/../../lib/shared
include(../propertyeditor/propertyeditor.pri)
include(../objectinspector/objectinspector.pri)
diff --git a/tools/designer/src/components/objectinspector/objectinspector.pri b/tools/designer/src/components/objectinspector/objectinspector.pri
index 733c4b37ae..565f78bdcb 100644
--- a/tools/designer/src/components/objectinspector/objectinspector.pri
+++ b/tools/designer/src/components/objectinspector/objectinspector.pri
@@ -3,7 +3,7 @@
contains(CONFIG, static) {
INCLUDEPATH *= $$QT_SOURCE_TREE/tools/shared/findwidget
} else {
- include($$QT_SOURCE_TREE/tools/shared/findwidget/findwidget.pri)
+ include(../../../../shared/findwidget/findwidget.pri)
}
INCLUDEPATH += $$PWD
diff --git a/tools/designer/src/components/propertyeditor/propertyeditor.pri b/tools/designer/src/components/propertyeditor/propertyeditor.pri
index a8ed37e81d..7d2e7cba6c 100644
--- a/tools/designer/src/components/propertyeditor/propertyeditor.pri
+++ b/tools/designer/src/components/propertyeditor/propertyeditor.pri
@@ -10,8 +10,8 @@ contains(CONFIG, static) {
INCLUDEPATH *= $$QT_SOURCE_TREE/tools/shared/qtpropertybrowser
INCLUDEPATH *= $$QT_SOURCE_TREE/tools/shared/qtgradienteditor
} else {
- include($$QT_SOURCE_TREE/tools/shared/qtpropertybrowser/qtpropertybrowser.pri)
- include($$QT_SOURCE_TREE/tools/shared/qtgradienteditor/qtcolorbutton.pri)
+ include(../../../../shared/qtpropertybrowser/qtpropertybrowser.pri)
+ include(../../../../shared/qtgradienteditor/qtcolorbutton.pri)
}
FORMS += $$PWD/paletteeditor.ui \
diff --git a/tools/designer/src/designer/designer.pro b/tools/designer/src/designer/designer.pro
index 8590c7b2c7..8564e96cb7 100644
--- a/tools/designer/src/designer/designer.pro
+++ b/tools/designer/src/designer/designer.pro
@@ -25,8 +25,8 @@ contains(CONFIG, static) {
TARGET = designer
-include($$QT_SOURCE_TREE/tools/shared/fontpanel/fontpanel.pri)
-include($$QT_SOURCE_TREE/tools/shared/qttoolbardialog/qttoolbardialog.pri)
+include(../../../shared/fontpanel/fontpanel.pri)
+include(../../../shared/qttoolbardialog/qttoolbardialog.pri)
HEADERS += \
qdesigner.h \
@@ -88,4 +88,3 @@ INSTALLS += target
include(../sharedcomponents.pri)
unix:!mac:LIBS += -lm
-TRANSLATIONS = designer_de.ts
diff --git a/tools/designer/src/lib/shared/shared.pri b/tools/designer/src/lib/shared/shared.pri
index 570b2080a0..828636082c 100644
--- a/tools/designer/src/lib/shared/shared.pri
+++ b/tools/designer/src/lib/shared/shared.pri
@@ -2,11 +2,11 @@
INCLUDEPATH += $$PWD
contains(QT_CONFIG, script): QT += script
-include($$QT_SOURCE_TREE/tools/shared/qtpropertybrowser/qtpropertybrowser.pri)
-include($$QT_SOURCE_TREE/tools/shared/deviceskin/deviceskin.pri)
-include($$QT_SOURCE_TREE/src/tools/rcc/rcc.pri)
-include($$QT_SOURCE_TREE/tools/shared/findwidget/findwidget.pri)
-include($$QT_SOURCE_TREE/tools/shared/qtgradienteditor/qtgradienteditor.pri)
+include(../../../../shared/qtpropertybrowser/qtpropertybrowser.pri)
+include(../../../../shared/deviceskin/deviceskin.pri)
+include(../../../../../src/tools/rcc/rcc.pri)
+include(../../../../shared/findwidget/findwidget.pri)
+include(../../../../shared/qtgradienteditor/qtgradienteditor.pri)
# Input
FORMS += $$PWD/addlinkdialog.ui \
diff --git a/tools/designer/translations/translations.pro b/tools/designer/translations/translations.pro
deleted file mode 100644
index 103c1fe6c0..0000000000
--- a/tools/designer/translations/translations.pro
+++ /dev/null
@@ -1,141 +0,0 @@
-include(../src/components/buddyeditor/buddyeditor.pri)
-include(../src/components/component.pri)
-include(../src/components/formeditor/formeditor.pri)
-include(../src/components/objectinspector/objectinspector.pri)
-include(../src/components/propertyeditor/propertyeditor.pri)
-include(../src/components/signalsloteditor/signalsloteditor.pri)
-include(../src/components/tabordereditor/tabordereditor.pri)
-include(../src/components/taskmenu/taskmenu.pri)
-include(../src/components/widgetbox/widgetbox.pri)
-include(../src/lib/extension/extension.pri)
-include(../src/lib/sdk/sdk.pri)
-include(../src/lib/shared/shared.pri)
-include(../src/lib/uilib/uilib.pri)
-include(../../shared/qttoolbardialog/qttoolbardialog.pri)
-include(../../shared/qtpropertybrowser/qtpropertybrowser.pri)
-include(../../shared/qtgradienteditor/qtgradienteditor.pri)
-
-# Include ActiveQt plugin
-SOURCES += ../src/plugins/activeqt/qaxwidgetextrainfo.cpp \
- ../src/plugins/activeqt/qaxwidgetplugin.cpp \
- ../src/plugins/activeqt/qaxwidgetpropertysheet.cpp \
- ../src/plugins/activeqt/qaxwidgettaskmenu.cpp \
- ../src/plugins/activeqt/qdesigneraxwidget.cpp
-
-HEADERS += ../src/plugins/activeqt/qaxwidgetextrainfo.h \
- ../src/plugins/activeqt/qaxwidgetplugin.h \
- ../src/plugins/activeqt/qaxwidgetpropertysheet.h \
- ../src/plugins/activeqt/qaxwidgettaskmenu.h \
- ../src/plugins/activeqt/qdesigneraxwidget.h \
- ../../../src/activeqt/shared/qaxtypes.h
-
-
-# Include Qt3Support plugin
-
-SOURCES += ../src/plugins/widgets/qt3supportwidgets.cpp
-HEADERS += ../src/plugins/widgets/q3iconview/q3iconview_extrainfo.h \
- ../src/plugins/widgets/q3iconview/q3iconview_plugin.h \
- ../src/plugins/widgets/q3listview/q3listview_extrainfo.h \
- ../src/plugins/widgets/q3listview/q3listview_plugin.h \
- ../src/plugins/widgets/q3mainwindow/q3mainwindow_container.h \
- ../src/plugins/widgets/q3mainwindow/q3mainwindow_plugin.h \
- ../src/plugins/widgets/q3toolbar/q3toolbar_extrainfo.h \
- ../src/plugins/widgets/q3toolbar/q3toolbar_plugin.h \
- ../src/plugins/widgets/q3widgetstack/q3widgetstack_container.h \
- ../src/plugins/widgets/q3widgetstack/q3widgetstack_plugin.h \
- ../src/plugins/widgets/q3widgetstack/qdesigner_q3widgetstack_p.h \
- ../src/plugins/widgets/q3wizard/q3wizard_container.h \
- ../src/plugins/widgets/q3wizard/q3wizard_plugin.h \
- ../src/plugins/widgets/q3listbox/q3listbox_extrainfo.h \
- ../src/plugins/widgets/q3listbox/q3listbox_plugin.h \
- ../src/plugins/widgets/q3table/q3table_extrainfo.h \
- ../src/plugins/widgets/q3table/q3table_plugin.h \
- ../src/plugins/widgets/q3textedit/q3textedit_extrainfo.h \
- ../src/plugins/widgets/q3textedit/q3textedit_plugin.h \
- ../src/plugins/widgets/q3widgets/q3widget_plugins.h
-
-SOURCES += ../src/plugins/widgets/q3iconview/q3iconview_extrainfo.cpp \
- ../src/plugins/widgets/q3iconview/q3iconview_plugin.cpp \
- ../src/plugins/widgets/q3listview/q3listview_extrainfo.cpp \
- ../src/plugins/widgets/q3listview/q3listview_plugin.cpp \
- ../src/plugins/widgets/q3mainwindow/q3mainwindow_container.cpp \
- ../src/plugins/widgets/q3mainwindow/q3mainwindow_plugin.cpp \
- ../src/plugins/widgets/q3toolbar/q3toolbar_extrainfo.cpp \
- ../src/plugins/widgets/q3toolbar/q3toolbar_plugin.cpp \
- ../src/plugins/widgets/q3widgetstack/q3widgetstack_container.cpp \
- ../src/plugins/widgets/q3widgetstack/q3widgetstack_plugin.cpp \
- ../src/plugins/widgets/q3widgetstack/qdesigner_q3widgetstack.cpp \
- ../src/plugins/widgets/q3wizard/q3wizard_container.cpp \
- ../src/plugins/widgets/q3wizard/q3wizard_plugin.cpp \
- ../src/plugins/widgets/q3listbox/q3listbox_extrainfo.cpp \
- ../src/plugins/widgets/q3listbox/q3listbox_plugin.cpp \
- ../src/plugins/widgets/q3table/q3table_extrainfo.cpp \
- ../src/plugins/widgets/q3table/q3table_plugin.cpp \
- ../src/plugins/widgets/q3textedit/q3textedit_extrainfo.cpp \
- ../src/plugins/widgets/q3textedit/q3textedit_plugin.cpp \
- ../src/plugins/widgets/q3widgets/q3widget_plugins.cpp
-
-# Include those manually as they do not contain any directory specification
-APP_DIR=../src/designer
-SOURCES += $$APP_DIR/appfontdialog.cpp \
- $$APP_DIR/assistantclient.cpp \
- $$APP_DIR/main.cpp \
- $$APP_DIR/mainwindow.cpp \
- $$APP_DIR/newform.cpp \
- $$APP_DIR/preferencesdialog.cpp \
- $$APP_DIR/qdesigner_actions.cpp \
- $$APP_DIR/qdesigner_appearanceoptions.cpp \
- $$APP_DIR/qdesigner.cpp \
- $$APP_DIR/qdesigner_formwindow.cpp \
- $$APP_DIR/qdesigner_server.cpp \
- $$APP_DIR/qdesigner_settings.cpp \
- $$APP_DIR/qdesigner_toolwindow.cpp \
- $$APP_DIR/qdesigner_workbench.cpp \
- $$APP_DIR/saveformastemplate.cpp \
- $$APP_DIR/versiondialog.cpp
-
-HEADERS+= $$APP_DIR/appfontdialog.h \
- $$APP_DIR/assistantclient.h \
- $$APP_DIR/designer_enums.h \
- $$APP_DIR/mainwindow.h \
- $$APP_DIR/newform.h \
- $$APP_DIR/preferencesdialog.h \
- $$APP_DIR/qdesigner_actions.h \
- $$APP_DIR/qdesigner_appearanceoptions.h \
- $$APP_DIR/qdesigner_formwindow.h \
- $$APP_DIR/qdesigner.h \
- $$APP_DIR/qdesigner_pch.h \
- $$APP_DIR/qdesigner_server.h \
- $$APP_DIR/qdesigner_settings.h \
- $$APP_DIR/qdesigner_toolwindow.h \
- $$APP_DIR/qdesigner_workbench.h \
- $$APP_DIR/saveformastemplate.h \
- $$APP_DIR/versiondialog.h
-
-FORMS += $$APP_DIR/preferencesdialog.ui \
- $$APP_DIR/qdesigner_appearanceoptions.ui \
- $$APP_DIR/saveformastemplate.ui
-
-# Shared solutions
-SOURCES += ../../shared/fontpanel/fontpanel.cpp \
- ../../shared/deviceskin/deviceskin.cpp \
- ../../shared/findwidget/abstractfindwidget.cpp \
- ../../shared/findwidget/itemviewfindwidget.cpp \
- ../../shared/findwidget/texteditfindwidget.cpp \
-
-HEADERS += ../../shared/findwidget/abstractfindwidget.h \
- ../../shared/findwidget/itemviewfindwidget.h \
- ../../shared/findwidget/texteditfindwidget.h
-
-TR_DIR = $$PWD/../../../translations
-TRANSLATIONS = \
- $$TR_DIR/designer_cs.ts \
- $$TR_DIR/designer_de.ts \
- $$TR_DIR/designer_fr.ts \
- $$TR_DIR/designer_hu.ts \
- $$TR_DIR/designer_ja.ts \
- $$TR_DIR/designer_pl.ts \
- $$TR_DIR/designer_ru.ts \
- $$TR_DIR/designer_sl.ts \
- $$TR_DIR/designer_zh_CN.ts \
- $$TR_DIR/designer_zh_TW.ts
diff --git a/tools/linguist/linguist/linguist.pro b/tools/linguist/linguist/linguist.pro
index 4f7ed8a77e..ce8d5854f1 100644
--- a/tools/linguist/linguist/linguist.pro
+++ b/tools/linguist/linguist/linguist.pro
@@ -94,15 +94,3 @@ FORMS += statistics.ui \
translationsettings.ui \
finddialog.ui
RESOURCES += linguist.qrc
-
-TR_DIR = $$PWD/../../../translations
-TRANSLATIONS = \
- $$TR_DIR/linguist_cs.ts \
- $$TR_DIR/linguist_de.ts \
- $$TR_DIR/linguist_fr.ts \
- $$TR_DIR/linguist_hu.ts \
- $$TR_DIR/linguist_ja.ts \
- $$TR_DIR/linguist_pl.ts \
- $$TR_DIR/linguist_ru.ts \
- $$TR_DIR/linguist_zh_CN.ts \
- $$TR_DIR/linguist_zh_TW.ts
diff --git a/tools/linguist/lupdate/cpp.cpp b/tools/linguist/lupdate/cpp.cpp
index 609bd3dff9..bc9bb261ce 100644
--- a/tools/linguist/lupdate/cpp.cpp
+++ b/tools/linguist/lupdate/cpp.cpp
@@ -1686,9 +1686,14 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
HashString ns = HashString(text);
yyTok = getToken();
if (yyTok == Tok_LeftBrace) {
+ yyTok = getToken();
namespaceDepths.push(namespaces.count());
enterNamespace(&namespaces, ns);
- yyTok = getToken();
+
+ functionContext = namespaces;
+ functionContextUnresolved.clear();
+ prospectiveContext.clear();
+ pendingContext.clear();
} else if (yyTok == Tok_Equals) {
// e.g. namespace Is = OuterSpace::InnerSpace;
QList<HashString> fullName;
diff --git a/tools/makeqpf/qpf2.cpp b/tools/makeqpf/qpf2.cpp
index ab57cea5bc..cafdb796b3 100644
--- a/tools/makeqpf/qpf2.cpp
+++ b/tools/makeqpf/qpf2.cpp
@@ -543,7 +543,7 @@ void QPF::addGlyphs(QFontEngine *fe, const QList<CharacterRange> &ranges)
;
}
- qMemCopy(data, img.bits(), img.byteCount());
+ memcpy(data, img.bits(), img.byteCount());
}
}
}
diff --git a/tools/porting/src/semantic.cpp b/tools/porting/src/semantic.cpp
index 268e037e39..cf0b1414ca 100644
--- a/tools/porting/src/semantic.cpp
+++ b/tools/porting/src/semantic.cpp
@@ -768,7 +768,7 @@ void Semantic::parseTypedef(TypedefAST *ast)
void Semantic::parseTypeSpecifier(TypeSpecifierAST *ast)
{
// If this is a classSpecifier or a EnumSpecifier we skip the name lookup,
- // becuase looking up the name "E" in a class definition like
+ // because looking up the name "E" in a class definition like
// "class E { ..." makes no sense. (There might be a variable named E
// already declared, but that variable is now shadowed by the class type.)
if( ast->nodeType() != NodeType_EnumSpecifier
@@ -807,7 +807,7 @@ void Semantic::parseNameUse(NameAST* name)
/*
looks up name used in basescope. If name->isGlobal() is true or if classOrNamespaceList()
- returns a non-emty list, the C++ qualified name lookup rules are used. Otherwise the
+ returns a non-empty list, the C++ qualified name lookup rules are used. Otherwise the
unquialified name lookup rules are used. Returns the a list of members that was found,
In most cases this list will contain zero or one element, exept in the case of overloaded functions.
TODO: Argument-dependent name lookup
@@ -975,7 +975,7 @@ FunctionMember *Semantic::functionLookup(CodeModel::Scope *baseScope,
*/
FunctionMember *Semantic::selectFunction(QList<CodeModel::Member*> candidatateList, const DeclaratorAST *functionDeclarator)
{
- // get arguments for funciton we are looking for
+ // get arguments for function we are looking for
FunctionMember testFunction;
parseFunctionArguments(functionDeclarator, &testFunction);
const ArgumentCollection testArgumentCollection = testFunction.arguments();
diff --git a/tools/qdbus/qdbuscpp2xml/qdbuscpp2xml.cpp b/tools/qdbus/qdbuscpp2xml/qdbuscpp2xml.cpp
index 3a80019d01..ba2bdd8b30 100644
--- a/tools/qdbus/qdbuscpp2xml/qdbuscpp2xml.cpp
+++ b/tools/qdbus/qdbuscpp2xml/qdbuscpp2xml.cpp
@@ -64,7 +64,7 @@ static const char docTypeHeader[] =
// in qdbusxmlgenerator.cpp
QT_BEGIN_NAMESPACE
-extern QDBUS_EXPORT QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo,
+extern Q_DBUS_EXPORT QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo,
const QMetaObject *base, int flags);
QT_END_NAMESPACE
diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp
index 33ceaf5108..7130d61679 100644
--- a/tools/qdoc3/codemarker.cpp
+++ b/tools/qdoc3/codemarker.cpp
@@ -630,4 +630,12 @@ QList<Section> CodeMarker::qmlSections(const QmlClassNode* , SynopsisStyle )
}
#endif
+const Node* CodeMarker::resolveTarget(const QString& ,
+ const Tree* ,
+ const Node* ,
+ const Node* )
+{
+ return 0;
+}
+
QT_END_NAMESPACE
diff --git a/tools/qdoc3/codemarker.h b/tools/qdoc3/codemarker.h
index aab8a9cee8..53ad4a8eed 100644
--- a/tools/qdoc3/codemarker.h
+++ b/tools/qdoc3/codemarker.h
@@ -155,10 +155,11 @@ class CodeMarker
virtual QList<Section> qmlSections(const QmlClassNode* qmlClassNode,
SynopsisStyle style);
#endif
- virtual const Node *resolveTarget(const QString& target,
- const Tree *tree,
- const Node *relative) = 0;
- virtual QStringList macRefsForNode(const Node *node);
+ virtual const Node* resolveTarget(const QString& target,
+ const Tree* tree,
+ const Node* relative,
+ const Node* self = 0);
+ virtual QStringList macRefsForNode(const Node* node);
static void initialize(const Config& config);
static void terminate();
diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h
index c29becca8a..b087b1cd2b 100644
--- a/tools/qdoc3/config.h
+++ b/tools/qdoc3/config.h
@@ -143,6 +143,8 @@ class Config
#define CONFIG_NATURALLANGUAGE "naturallanguage"
#define CONFIG_OBSOLETELINKS "obsoletelinks"
#define CONFIG_ONLINE "online"
+#define CONFIG_OFFLINE "offline"
+#define CONFIG_CREATOR "creator"
#define CONFIG_OUTPUTDIR "outputdir"
#define CONFIG_OUTPUTENCODING "outputencoding"
#define CONFIG_OUTPUTLANGUAGE "outputlanguage"
diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp
index c4ee054af6..562e92bea0 100644
--- a/tools/qdoc3/cppcodemarker.cpp
+++ b/tools/qdoc3/cppcodemarker.cpp
@@ -825,9 +825,10 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
return sections;
}
-const Node *CppCodeMarker::resolveTarget(const QString &target,
- const Tree *tree,
- const Node *relative)
+const Node *CppCodeMarker::resolveTarget(const QString& target,
+ const Tree* tree,
+ const Node* relative,
+ const Node* self)
{
if (target.endsWith("()")) {
const FunctionNode *func;
@@ -869,11 +870,13 @@ const Node *CppCodeMarker::resolveTarget(const QString &target,
else {
QStringList path = target.split("::");
const Node *node;
+ int flags = Tree::SearchBaseClasses |
+ Tree::SearchEnumValues |
+ Tree::NonFunction;
if ((node = tree->findNode(path,
relative,
- Tree::SearchBaseClasses |
- Tree::SearchEnumValues |
- Tree::NonFunction)))
+ flags,
+ self)))
return node;
}
return 0;
diff --git a/tools/qdoc3/cppcodemarker.h b/tools/qdoc3/cppcodemarker.h
index 2dcf400acd..eca3936b5c 100644
--- a/tools/qdoc3/cppcodemarker.h
+++ b/tools/qdoc3/cppcodemarker.h
@@ -81,9 +81,10 @@ class CppCodeMarker : public CodeMarker
Status status);
QList<Section> qmlSections(const QmlClassNode* qmlClassNode,
SynopsisStyle style);
- const Node *resolveTarget(const QString& target,
- const Tree *tree,
- const Node *relative);
+ const Node* resolveTarget(const QString& target,
+ const Tree* tree,
+ const Node* relative,
+ const Node* self = 0);
private:
QString addMarkUp(const QString& protectedCode,
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index e4870e3f6d..a120e4566b 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -728,23 +728,12 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
if (n)
classNode = static_cast<const ClassNode*>(n);
}
- if (names[0].startsWith("Q"))
+ if (names[0].startsWith("Qt"))
return new QmlClassNode(tre->root(), QLatin1String("QML:")+names[0], classNode);
else
return new QmlClassNode(tre->root(), names[0], classNode);
}
else if (command == COMMAND_QMLBASICTYPE) {
-#if 0
- QStringList parts = arg.split(" ");
- qDebug() << command << parts;
- if (parts.size() > 1) {
- FakeNode* pageNode = static_cast<FakeNode*>(tre->root()->findNode(parts[1], Node::Fake));
- if (pageNode) {
- qDebug() << "FOUND";
- return new QmlBasicTypeNode(pageNode, parts[0]);
- }
- }
-#endif
return new QmlBasicTypeNode(tre->root(), arg);
}
else if ((command == COMMAND_QMLSIGNAL) ||
@@ -755,7 +744,7 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
QString type;
QmlClassNode* qmlClass = 0;
if (splitQmlMethodArg(doc,arg,type,element)) {
- if (element.startsWith(QLatin1String("Q")))
+ if (element.startsWith(QLatin1String("Qt")))
element = QLatin1String("QML:") + element;
Node* n = tre->findNode(QStringList(element),Node::Fake);
if (n && n->subType() == Node::QmlClass) {
@@ -1131,6 +1120,17 @@ bool CppCodeParser::match(int target)
}
/*!
+ Skip to \a target. If \a target is found before the end
+ of input, return true. Otherwise return false.
+ */
+bool CppCodeParser::skipTo(int target)
+{
+ while ((tok != Tok_Eoi) && (tok != target))
+ readToken();
+ return (tok == target ? true : false);
+}
+
+/*!
If the current token is one of the keyword thingees that
are used in Qt, skip over it to the next token and return
true. Otherwise just return false without reading the
@@ -1373,7 +1373,9 @@ bool CppCodeParser::matchFunctionDecl(InnerNode *parent,
if (!matchDataType(&returnType)) {
if (tokenizer->parsingFnOrMacro()
- && (match(Tok_Q_DECLARE_FLAGS) || match(Tok_Q_PROPERTY)))
+ && (match(Tok_Q_DECLARE_FLAGS) ||
+ match(Tok_Q_PROPERTY) ||
+ match(Tok_Q_PRIVATE_PROPERTY)))
returnType = CodeChunk(previousLexeme());
else {
return false;
@@ -1807,11 +1809,19 @@ bool CppCodeParser::matchTypedefDecl(InnerNode *parent)
bool CppCodeParser::matchProperty(InnerNode *parent)
{
- if (!match(Tok_Q_PROPERTY) &&
- !match(Tok_Q_OVERRIDE) &&
- !match(Tok_QDOC_PROPERTY))
+ int expected_tok = Tok_LeftParen;
+ if (match(Tok_Q_PRIVATE_PROPERTY)) {
+ expected_tok = Tok_Comma;
+ if (!skipTo(Tok_Comma))
+ return false;
+ }
+ else if (!match(Tok_Q_PROPERTY) &&
+ !match(Tok_Q_OVERRIDE) &&
+ !match(Tok_QDOC_PROPERTY)) {
return false;
- if (!match(Tok_LeftParen))
+ }
+
+ if (!match(expected_tok))
return false;
QString name;
@@ -1960,6 +1970,7 @@ bool CppCodeParser::matchDeclList(InnerNode *parent)
break;
case Tok_Q_OVERRIDE:
case Tok_Q_PROPERTY:
+ case Tok_Q_PRIVATE_PROPERTY:
case Tok_QDOC_PROPERTY:
matchProperty(parent);
break;
diff --git a/tools/qdoc3/cppcodeparser.h b/tools/qdoc3/cppcodeparser.h
index 3c53f72ddb..55d9ddf552 100644
--- a/tools/qdoc3/cppcodeparser.h
+++ b/tools/qdoc3/cppcodeparser.h
@@ -119,6 +119,7 @@ class CppCodeParser : public CodeParser
QString previousLexeme();
QString lexeme();
bool match(int target);
+ bool skipTo(int target);
bool matchCompat();
bool matchTemplateAngles(CodeChunk *type = 0);
bool matchTemplateHeader();
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp
index d7a9c9e8cc..4789c671f9 100644
--- a/tools/qdoc3/ditaxmlgenerator.cpp
+++ b/tools/qdoc3/ditaxmlgenerator.cpp
@@ -4210,7 +4210,7 @@ void DitaXmlGenerator::generateDetailedQmlMember(const Node *node,
out() << "<td><p>";
//out() << "<tr><td>"; // old
out() << "<a name=\"" + refForNode(qpn) + "\"></a>";
- if (!qpn->isWritable())
+ if (!qpn->isWritable(myTree))
out() << "<span class=\"qmlreadonly\">read-only</span>";
if (qpgn->isDefault())
out() << "<span class=\"qmldefault\">default</span>";
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 89b1e9853c..76d8c0d898 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -63,6 +63,12 @@ QT_BEGIN_NAMESPACE
int HtmlGenerator::id = 0;
bool HtmlGenerator::debugging_on = false;
+#if 0
+QString HtmlGenerator::divNavTop = "<div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>";
+#endif
+
+QString HtmlGenerator::divNavTop = "";
+
QString HtmlGenerator::sinceTitles[] =
{
" New Namespaces",
@@ -213,7 +219,9 @@ HtmlGenerator::HtmlGenerator()
inTableHeader(false),
numTableRows(0),
threeColumnEnumValueTable(true),
- offlineDocs(true),
+ offlineDocs(false),
+ onlineDocs(false),
+ creatorDocs(true),
funcLeftParen("\\S(\\()"),
myTree(0),
slow(false),
@@ -264,6 +272,12 @@ void HtmlGenerator::initializeGenerator(const Config &config)
postPostHeader = config.getString(HtmlGenerator::format() +
Config::dot +
HTMLGENERATOR_POSTPOSTHEADER);
+ creatorPostHeader = config.getString(HtmlGenerator::format() +
+ Config::dot +
+ HTMLGENERATOR_CREATORPOSTHEADER);
+ creatorPostPostHeader = config.getString(HtmlGenerator::format() +
+ Config::dot +
+ HTMLGENERATOR_CREATORPOSTPOSTHEADER);
footer = config.getString(HtmlGenerator::format() +
Config::dot +
HTMLGENERATOR_FOOTER);
@@ -275,7 +289,13 @@ void HtmlGenerator::initializeGenerator(const Config &config)
HTMLGENERATOR_GENERATEMACREFS);
project = config.getString(CONFIG_PROJECT);
- offlineDocs = !config.getBool(CONFIG_ONLINE);
+
+ onlineDocs = config.getBool(CONFIG_ONLINE);
+
+ offlineDocs = config.getBool(CONFIG_OFFLINE);
+
+ creatorDocs = config.getBool(CONFIG_CREATOR);
+
projectDescription = config.getString(CONFIG_DESCRIPTION);
if (projectDescription.isEmpty() && !project.isEmpty())
projectDescription = project + " Reference Documentation";
@@ -346,17 +366,6 @@ QString HtmlGenerator::format()
*/
void HtmlGenerator::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();
@@ -371,9 +380,6 @@ void HtmlGenerator::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);
@@ -923,13 +929,13 @@ int HtmlGenerator::generateAtom(const Atom *atom,
else
out() << "<tr class=\"even\">";
- out() << "<tr><th>Constant</th>"
- << "<th>Value</th>"
- << "<th>Description</th></tr>\n";
+ out() << "<tr><th class=\"tblConst\">Constant</th>"
+ << "<th class=\"tblval\">Value</th>"
+ << "<th class=\"tbldscr\">Description</th></tr>\n";
}
else {
out() << "<table class=\"valuelist\">"
- << "<tr><th>Constant</th><th>Value</th></tr>\n";
+ << "<tr><th class=\"tblConst\">Constant</th><th class=\"tblVal\">Value</th></tr>\n";
}
}
else {
@@ -1067,11 +1073,11 @@ int HtmlGenerator::generateAtom(const Atom *atom,
}
sectionNumber.last() = QString::number(sectionNumber.last().toInt() + 1);
}
- out() << "<a name=\"sec-" << sectionNumber.join("-") << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n";
+ out() << "<a name=\"sec-" << sectionNumber.join("-") << "\"></a>" << divNavTop << "\n";
}
#else
out() << "<a name=\"" << Doc::canonicalTitle(Text::sectionHeading(atom).toString())
- << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n";
+ << "\"></a>" << divNavTop << "\n";
#endif
break;
case Atom::SectionRight:
@@ -1143,9 +1149,9 @@ int HtmlGenerator::generateAtom(const Atom *atom,
case Atom::TableItemLeft:
{
if (inTableHeader)
- out() << "<th";
+ out() << "<th ";
else
- out() << "<td";
+ out() << "<td ";
QStringList spans = atom->string().split(",");
if (spans.size() == 2) {
@@ -1259,47 +1265,21 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
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 << "]";
- }
- }
-#endif
-
generateHeader(title, inner, marker);
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);
- }
-#endif
-
+ generateTitle(title, subtitleText, SmallSubTitle, inner, marker);
generateBrief(inner, marker);
generateIncludes(inner, marker);
generateStatus(inner, marker);
if (classe) {
generateInherits(classe, marker);
generateInheritedBy(classe, marker);
+#ifdef QDOC_QML
+ if (!classe->qmlElement().isEmpty()) {
+ generateInstantiatedBy(classe,marker);
+ }
+#endif
}
generateThreadSafeness(inner, marker);
generateSince(inner, marker);
@@ -1343,7 +1323,7 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
// out() << "<hr />\n";
out() << "<a name=\""
<< registerRef((*s).name.toLower())
- << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n";
+ << "\"></a>" << divNavTop << "\n";
out() << "<h2>" << protectEnc((*s).name) << "</h2>\n";
generateSection(s->members, inner, marker, CodeMarker::Summary);
}
@@ -1352,7 +1332,7 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
// out() << "<hr />\n";
out() << "<a name=\""
<< registerRef(name.toLower())
- << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n";
+ << "\"></a>" << divNavTop << "\n";
out() << "<h2>" << protectEnc(name) << "</h2>\n";
generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary);
}
@@ -1379,15 +1359,17 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
out() << "</ul>\n";
}
- out() << "<a name=\"" << registerRef("details") << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n";
+ out() << "<a name=\"" << registerRef("details") << "\"></a>" << divNavTop << "\n";
if (!inner->doc().isEmpty()) {
+ generateExtractionMark(inner, DetailedDescriptionMark);
//out() << "<hr />\n"
- out() << "<div class=\"descr\"/>\n" // QTBUG-9504
+ out() << "<div class=\"descr\">\n" // QTBUG-9504
<< "<h2>" << "Detailed Description" << "</h2>\n";
generateBody(inner, marker);
out() << "</div>\n"; // QTBUG-9504
generateAlsoList(inner, marker);
+ generateExtractionMark(inner, EndMark);
}
sections = marker->sections(inner, CodeMarker::Detailed, CodeMarker::Okay);
@@ -1395,7 +1377,7 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
while (s != sections.end()) {
//out() << "<hr />\n";
if (!(*s).divClass.isEmpty())
- out() << "<div class=\"" << (*s).divClass << "\"/>\n"; // QTBUG-9504
+ out() << "<div class=\"" << (*s).divClass << "\">\n"; // QTBUG-9504
out() << "<h2>" << protectEnc((*s).name) << "</h2>\n";
NodeList::ConstIterator m = (*s).members.begin();
@@ -1504,7 +1486,13 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
Generate the TOC for the new doc format.
Don't generate a TOC for the home page.
*/
- if (fake->name() != QString("index.html"))
+ const QmlClassNode* qml_cn = 0;
+ if (fake->subType() == Node::QmlClass) {
+ qml_cn = static_cast<const QmlClassNode*>(fake);
+ sections = marker->qmlSections(qml_cn,CodeMarker::Summary);
+ generateTableOfContents(fake,marker,&sections);
+ }
+ else if (fake->name() != QString("index.html"))
generateTableOfContents(fake,marker,0);
generateTitle(fullTitle,
@@ -1519,12 +1507,12 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
generateStatus(fake, marker);
if (moduleNamespaceMap.contains(fake->name())) {
- out() << "<a name=\"" << registerRef("namespaces") << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n";
+ out() << "<a name=\"" << registerRef("namespaces") << "\"></a>" << divNavTop << "\n";
out() << "<h2>Namespaces</h2>\n";
generateAnnotatedList(fake, marker, moduleNamespaceMap[fake->name()]);
}
if (moduleClassMap.contains(fake->name())) {
- out() << "<a name=\"" << registerRef("classes") << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n";
+ out() << "<a name=\"" << registerRef("classes") << "\"></a>" << divNavTop << "\n";
out() << "<h2>Classes</h2>\n";
generateAnnotatedList(fake, marker, moduleClassMap[fake->name()]);
}
@@ -1578,27 +1566,28 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
}
#ifdef QDOC_QML
else if (fake->subType() == Node::QmlClass) {
- const QmlClassNode* qml_cn = static_cast<const QmlClassNode*>(fake);
const ClassNode* cn = qml_cn->classNode();
- generateQmlInherits(qml_cn, marker);
- generateQmlInstantiates(qml_cn, marker);
generateBrief(qml_cn, marker);
+ generateQmlInherits(qml_cn, marker);
generateQmlInheritedBy(qml_cn, marker);
- sections = marker->qmlSections(qml_cn,CodeMarker::Summary);
+ generateQmlInstantiates(qml_cn, marker);
s = sections.begin();
while (s != sections.end()) {
- out() << "<a name=\"" << registerRef((*s).name) << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n";
+ out() << "<a name=\"" << registerRef((*s).name.toLower())
+ << "\"></a>" << divNavTop << "\n";
out() << "<h2>" << protectEnc((*s).name) << "</h2>\n";
generateQmlSummary(*s,fake,marker);
++s;
}
- out() << "<a name=\"" << registerRef("details") << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n";
+ generateExtractionMark(fake, DetailedDescriptionMark);
+ out() << "<a name=\"" << registerRef("details") << "\"></a>" << divNavTop << "\n";
out() << "<h2>" << "Detailed Description" << "</h2>\n";
generateBody(fake, marker);
if (cn)
generateQmlText(cn->doc().body(), cn, marker, fake->name());
generateAlsoList(fake, marker);
+ generateExtractionMark(fake, EndMark);
//out() << "<hr />\n";
sections = marker->qmlSections(qml_cn,CodeMarker::Detailed);
@@ -1623,7 +1612,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
sections = marker->sections(fake, CodeMarker::Summary, CodeMarker::Okay);
s = sections.begin();
while (s != sections.end()) {
- out() << "<a name=\"" << registerRef((*s).name) << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n";
+ out() << "<a name=\"" << registerRef((*s).name) << "\"></a>" << divNavTop << "\n";
out() << "<h2>" << protectEnc((*s).name) << "</h2>\n";
generateSectionList(*s, fake, marker, CodeMarker::Summary);
++s;
@@ -1631,16 +1620,20 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
Text brief = fake->doc().briefText();
if (fake->subType() == Node::Module && !brief.isEmpty()) {
- out() << "<a name=\"" << registerRef("details") << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n";
- out() << "<div class=\"descr\"/>\n"; // QTBUG-9504
+ generateExtractionMark(fake, DetailedDescriptionMark);
+ out() << "<a name=\"" << registerRef("details") << "\"></a>" << divNavTop << "\n";
+ out() << "<div class=\"descr\">\n"; // QTBUG-9504
out() << "<h2>" << "Detailed Description" << "</h2>\n";
}
- else
- out() << "<div class=\"descr\"/>\n"; // QTBUG-9504
+ else {
+ generateExtractionMark(fake, DetailedDescriptionMark);
+ out() << "<div class=\"descr\"> <a name=\"" << registerRef("details") << "\"></a>\n"; // QTBUG-9504
+ }
generateBody(fake, marker);
out() << "</div>\n"; // QTBUG-9504
generateAlsoList(fake, marker);
+ generateExtractionMark(fake, EndMark);
if (!fake->groupMembers().isEmpty()) {
NodeMap groupMembersMap;
@@ -1738,8 +1731,9 @@ void HtmlGenerator::generateBreadCrumbs(const QString& title,
}
}
else if (node->subType() == Node::Page) {
- if (fn->name() == QString("examples.html")) {
- out() << " <li>Examples</li>";
+ if (fn->name() == QString("qdeclarativeexamples.html")) {
+ out() << " <li><a href=\"all-examples.html\">Examples</a></li>";
+ out() << " <li>QML Examples & Demos</li>";
}
else if (fn->name().startsWith("examples-")) {
out() << " <li><a href=\"all-examples.html\">Examples</a></li>";
@@ -1759,10 +1753,14 @@ void HtmlGenerator::generateBreadCrumbs(const QString& title,
else if (node->subType() == Node::Example) {
out() << " <li><a href=\"all-examples.html\">Examples</a></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>";
+ if (sl.contains("declarative"))
+ out() << " <li><a href=\"qdeclarativeexamples.html\">QML Examples & Demos</a></li>";
+ else {
+ QString name = "examples-" + sl.at(0) + ".html";
+ QString t = CodeParser::titleFromName(name);
+ out() << " <li><a href=\"" << name << "\">"
+ << t << "</a></li>";
+ }
out() << " <li>" << title << "</li>";
}
}
@@ -1796,64 +1794,95 @@ void HtmlGenerator::generateHeader(const QString& title,
shortVersion = "Qt " + shortVersion + ": ";
}
+ // Generating page title
out() << " <title>" << shortVersion << protectEnc(title) << "</title>\n";
+ // Adding style sheet
+ out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />\n";
+ // Adding jquery and functions - providing online tools and search features
+ out() << " <script src=\"scripts/jquery.js\" type=\"text/javascript\"></script>\n";
+ out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n";
+ // Adding style and js for small windows
+ out() << " <script src=\"./scripts/superfish.js\" type=\"text/javascript\"></script>\n";
+ out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/superfish.css\" />";
+ out() << " <script src=\"./scripts/narrow.js\" type=\"text/javascript\"></script>\n";
+ out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/narrow.css\" />\n";
+
+ // Adding syntax highlighter // future release
+
+ // Setting some additional style sheet related details depending on configuration (e.g. online/offline)
- //out() << " <title>Qt Reference Documentation</title>";
-
- if (offlineDocs)
- {
- out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />";
- out() << "</head>\n";
- out() << "<body class=\"offline narrow\" >\n"; // narrow mainly for Creator
- out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n";
- }
- else
- {
- out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\"\n />";
- out() << " <!--[if IE]>\n";
- out() << "<meta name=\"MSSmartTagsPreventParsing\" content=\"true\">\n";
- out() << "<meta http-equiv=\"imagetoolbar\" content=\"no\">\n";
- out() << "<![endif]-->\n";
- out() << "<!--[if lt IE 7]>\n";
- out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie6.css\">\n";
- out() << "<![endif]-->\n";
- out() << "<!--[if IE 7]>\n";
- out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie7.css\">\n";
- out() << "<![endif]-->\n";
- out() << "<!--[if IE 8]>\n";
- out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie8.css\">\n";
- out() << "<![endif]-->\n";
- // jquery functions
- out() << " <script src=\"scripts/jquery.js\" type=\"text/javascript\"></script>\n";
- out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n";
- // menus and small docs js and css
- out() << " <script src=\"./scripts/superfish.js\" type=\"text/javascript\"></script>\n";
- out() << " <script src=\"./scripts/narrow.js\" type=\"text/javascript\"></script>\n";
- out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/superfish.css\" />";
- out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/narrow.css\" />";
-
- // syntax highlighter js and css
- // out() << " <link type=\"text/css\" rel=\"stylesheet\" href=\"style/shCore.css\"/>\n";
- // out() << " <link type=\"text/css\" rel=\"stylesheet\" href=\"style/shThemeDefault.css\"/>\n";
- // out() << " <script type=\"text/javascript\" src=\"scripts/shCore.js\"></script>\n";
- // out() << " <script type=\"text/javascript\" src=\"scripts/shBrushCpp.js\"></script>\n";
- // out() << " <script type=\"text/javascript\">\n";
- // out() << " SyntaxHighlighter.all();\n";
- // out() << " </script>\n";
+
+ if(onlineDocs==true) // onlineDocs is for the web
+ {
+ // Browser spec styles
+ out() << " <!--[if IE]>\n";
+ out() << "<meta name=\"MSSmartTagsPreventParsing\" content=\"true\">\n";
+ out() << "<meta http-equiv=\"imagetoolbar\" content=\"no\">\n";
+ out() << "<![endif]-->\n";
+ out() << "<!--[if lt IE 7]>\n";
+ out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie6.css\">\n";
+ out() << "<![endif]-->\n";
+ out() << "<!--[if IE 7]>\n";
+ out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie7.css\">\n";
+ out() << "<![endif]-->\n";
+ out() << "<!--[if IE 8]>\n";
+ out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie8.css\">\n";
+ out() << "<![endif]-->\n";
- out() << "</head>\n";
- out() << "<body class=\"\" onload=\"CheckEmptyAndLoadList();\">\n";
- }
+ out() << "</head>\n";
+ // CheckEmptyAndLoadList activating search
+ out() << "<body class=\"\" onload=\"CheckEmptyAndLoadList();\">\n";
+ }
+ else if (offlineDocs == true) // offlineDocs is for ???
+ {
+ out() << "</head>\n";
+ out() << "<body class=\"offline \">\n"; // offline
+ }
+ else if (creatorDocs == true) // creatorDocs is for Assistant/Creator
+ {
+ out() << "</head>\n";
+ out() << "<body class=\"offline narrow creator\">\n"; // offline narrow
+ }
+ // default -- not used except if one forgets to set any of the above settings to true
+ else
+ {
+ out() << "</head>\n";
+ out() << "<body>\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());
+#endif
+
-#if 0 // Removed for new docf format. MWS
+ if(onlineDocs==true) // onlineDocs is for the web
+ {
+ out() << QString(postHeader).replace("\\" + COMMAND_VERSION, myTree->version());
+ generateBreadCrumbs(title,node,marker);
+ out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
+ }
+ else if (offlineDocs == true) // offlineDocs is for ???
+ {
+ out() << QString(creatorPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
+ generateBreadCrumbs(title,node,marker);
+ out() << QString(creatorPostPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
+ }
+ else if (creatorDocs == true) // creatorDocs is for Assistant/Creator
+ {
+ out() << QString(creatorPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
+ generateBreadCrumbs(title,node,marker);
+ out() << QString(creatorPostPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
+ }
+ // default -- not used except if one forgets to set any of the above settings to true
+ else
+ {
+ out() << QString(creatorPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
+ generateBreadCrumbs(title,node,marker);
+ out() << QString(creatorPostPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
+ }
+
+#if 0 // Removed for new doc format. MWS
if (node && !node->links().empty())
out() << "<p>\n" << navigationLinks << "</p>\n";
#endif
@@ -1886,25 +1915,33 @@ void HtmlGenerator::generateFooter(const Node *node)
out() << QString(footer).replace("\\" + COMMAND_VERSION, myTree->version())
<< QString(address).replace("\\" + COMMAND_VERSION, myTree->version());
- if (offlineDocs)
- {
- out() << "</body>\n";
- }
- else
- {
- out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n";
- out() << " <!-- <script type=\"text/javascript\">\n";
- out() << " var _gaq = _gaq || [];\n";
- out() << " _gaq.push(['_setAccount', 'UA-4457116-5']);\n";
- out() << " _gaq.push(['_trackPageview']);\n";
- out() << " (function() {\n";
- out() << " var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n";
- out() << " ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n";
- out() << " var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n";
- out() << " })();\n";
- out() << " </script> -->\n";
- out() << "</body>\n";
- }
+ if (onlineDocs == true)
+ {
+ out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n";
+ out() << " <!-- <script type=\"text/javascript\">\n";
+ out() << " var _gaq = _gaq || [];\n";
+ out() << " _gaq.push(['_setAccount', 'UA-4457116-5']);\n";
+ out() << " _gaq.push(['_trackPageview']);\n";
+ out() << " (function() {\n";
+ out() << " var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n";
+ out() << " ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n";
+ out() << " var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n";
+ out() << " })();\n";
+ out() << " </script> -->\n";
+ out() << "</body>\n";
+ }
+ else if (offlineDocs == true)
+ {
+ out() << "</body>\n";
+ }
+ else if (creatorDocs == true)
+ {
+ out() << "</body>\n";
+ }
+ else
+ {
+ out() << "</body>\n";
+ }
out() << "</html>\n";
}
@@ -1913,13 +1950,18 @@ void HtmlGenerator::generateBrief(const Node *node, CodeMarker *marker,
{
Text brief = node->doc().briefText();
if (!brief.isEmpty()) {
+ generateExtractionMark(node, BriefMark);
out() << "<p>";
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";
+
+
+ generateExtractionMark(node, EndMark);
}
}
@@ -2072,7 +2114,9 @@ void HtmlGenerator::generateTableOfContents(const Node *node,
}
}
}
- else if (sections && (node->type() == Node::Class)) {
+ else if (sections && ((node->type() == Node::Class) ||
+ (node->type() == Node::Namespace) ||
+ (node->subType() == Node::QmlClass))) {
QList<Section>::ConstIterator s = sections->begin();
while (s != sections->end()) {
if (!s->members.isEmpty() || !s->reimpMembers.isEmpty()) {
@@ -2333,20 +2377,20 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative,
out() << "<tr class=\"odd topAlign\">";
else
out() << "<tr class=\"even topAlign\">";
- out() << "<td><p>";
+ out() << "<td class=\"tblName\"><p>";
generateFullName(node, relative, marker);
out() << "</p></td>";
if (!(node->type() == Node::Fake)) {
Text brief = node->doc().trimmedBriefText(name);
if (!brief.isEmpty()) {
- out() << "<td><p>";
+ out() << "<td class=\"tblDescr\"><p>";
generateText(brief, node, marker);
out() << "</p></td>";
}
}
else {
- out() << "<td><p>";
+ out() << "<td class=\"tblDescr\"><p>";
out() << protectEnc(node->doc().briefText().toString());
out() << "</p></td>";
}
@@ -2665,19 +2709,7 @@ void HtmlGenerator::generateQmlItem(const Node *node,
marked.replace("<@type>", "");
marked.replace("</@type>", "");
}
- if (node->type() == Node::QmlProperty) {
- const QmlPropertyNode* qpn = static_cast<const QmlPropertyNode*>(node);
- if (!summary && qpn->name() == "color" && qpn->dataType() == "color") {
- if (relative && relative->name() == "GradientStop") {
- qDebug() << "color : color";
- debugging_on = true;
- qDebug() << " " << relative->name() << relative->type() << relative->subType();
- qDebug() << marked;
- }
- }
- }
- out() << highlightedCode(marked, marker, relative);
- debugging_on = false;
+ out() << highlightedCode(marked, marker, relative, false, node);
}
#endif
@@ -2988,7 +3020,8 @@ void HtmlGenerator::generateSynopsis(const Node *node,
QString HtmlGenerator::highlightedCode(const QString& markedCode,
CodeMarker* marker,
const Node* relative,
- bool alignNames)
+ bool alignNames,
+ const Node* self)
{
QString src = markedCode;
QString html;
@@ -3002,7 +3035,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
static const QString headerTag("headerfile");
static const QString funcTag("func");
static const QString linkTag("link");
-
+
// replace all <@link> tags: "(<@link node=\"([^\"]+)\">).*(</@link>)"
bool done = false;
for (int i = 0, srcSize = src.size(); i < srcSize;) {
@@ -3067,13 +3100,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
bool handled = false;
if (parseArg(src, typeTag, &i, srcSize, &arg, &par1)) {
par1 = QStringRef();
- const Node* n = marker->resolveTarget(arg.toString(), myTree, relative);
- if (HtmlGenerator::debugging_on) {
- if (n) {
- qDebug() << " " << n->name() << n->type() << n->subType();
- qDebug() << " " << relative->name() << relative->type() << relative->subType();
- }
- }
+ const Node* n = marker->resolveTarget(arg.toString(), myTree, relative, self);
addLink(linkForNode(n,relative), arg, &html);
handled = true;
}
@@ -3504,6 +3531,7 @@ void HtmlGenerator::generateDetailedMember(const Node *node,
#ifdef GENERATE_MAC_REFS
generateMacRef(node, marker);
#endif
+ generateExtractionMark(node, MemberMark);
if (node->type() == Node::Enum
&& (enume = static_cast<const EnumNode *>(node))->flagsType()) {
#ifdef GENERATE_MAC_REFS
@@ -3523,7 +3551,7 @@ void HtmlGenerator::generateDetailedMember(const Node *node,
out() << "<h3 class=\"fn\">";
out() << "<a name=\"" + refForNode(node) + "\"></a>";
generateSynopsis(node, relative, marker, CodeMarker::Detailed);
- out() << "</h3><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n";
+ out() << "</h3>" << divNavTop << "\n";
}
generateStatus(node, marker);
@@ -3566,6 +3594,7 @@ void HtmlGenerator::generateDetailedMember(const Node *node,
}
}
generateAlsoList(node, marker);
+ generateExtractionMark(node, EndMark);
}
void HtmlGenerator::findAllClasses(const InnerNode *node)
@@ -3679,13 +3708,6 @@ void HtmlGenerator::findAllSince(const InnerNode *node)
}
}
-#if 0
- const QRegExp versionSeparator("[\\-\\.]");
- const int minorIndex = version.indexOf(versionSeparator);
- const int patchIndex = version.indexOf(versionSeparator, minorIndex+1);
- version = version.left(patchIndex);
-#endif
-
void HtmlGenerator::findAllFunctions(const InnerNode *node)
{
NodeList::ConstIterator c = node->childNodes().begin();
@@ -3749,29 +3771,6 @@ void HtmlGenerator::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 HtmlGenerator::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 HtmlGenerator::hOffset(const Node *node)
{
switch (node->type()) {
@@ -3780,12 +3779,6 @@ int HtmlGenerator::hOffset(const Node *node)
return 2;
case Node::Fake:
return 1;
-#if 0
- if (node->doc().briefText().isEmpty())
- return 1;
- else
- return 2;
-#endif
case Node::Enum:
case Node::Typedef:
case Node::Function:
@@ -4148,6 +4141,7 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
#ifdef GENERATE_MAC_REFS
generateMacRef(node, marker);
#endif
+ generateExtractionMark(node, MemberMark);
out() << "<div class=\"qmlitem\">";
if (node->subType() == Node::QmlPropertyGroup) {
const QmlPropGroupNode* qpgn = static_cast<const QmlPropGroupNode*>(node);
@@ -4163,11 +4157,13 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
else
out() << "<tr class=\"even\">";
- out() << "<td><p>";
+ out() << "<td class=\"tblQmlPropNode\"><p>";
out() << "<a name=\"" + refForNode(qpn) + "\"></a>";
- if (!qpn->isWritable())
+
+ if (!qpn->isWritable(myTree)) {
out() << "<span class=\"qmlreadonly\">read-only</span>";
+ }
if (qpgn->isDefault())
out() << "<span class=\"qmldefault\">default</span>";
generateQmlItem(qpn, relative, marker, false);
@@ -4183,11 +4179,11 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
out() << "<div class=\"qmlproto\">";
out() << "<table class=\"qmlname\">";
//out() << "<tr>";
- if (++numTableRows % 2 == 1)
- out() << "<tr class=\"odd\">";
- else
- out() << "<tr class=\"even\">";
- out() << "<td><p>";
+ if (++numTableRows % 2 == 1)
+ out() << "<tr class=\"odd\">";
+ else
+ out() << "<tr class=\"even\">";
+ out() << "<td class=\"tblQmlFuncNode\"><p>";
out() << "<a name=\"" + refForNode(qsn) + "\"></a>";
generateSynopsis(qsn,relative,marker,CodeMarker::Detailed,false);
//generateQmlItem(qsn,relative,marker,false);
@@ -4204,7 +4200,7 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
out() << "<tr class=\"odd\">";
else
out() << "<tr class=\"even\">";
- out() << "<td><p>";
+ out() << "<td class=\"tblQmlFuncNode\"><p>";
out() << "<a name=\"" + refForNode(qmn) + "\"></a>";
generateSynopsis(qmn,relative,marker,CodeMarker::Detailed,false);
out() << "</p></td></tr>";
@@ -4219,6 +4215,7 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
generateAlsoList(node, marker);
out() << "</div>";
out() << "</div>";
+ generateExtractionMark(node, EndMark);
}
/*!
@@ -4236,16 +4233,14 @@ void HtmlGenerator::generateQmlInherits(const QmlClassNode* cn,
const Node* n = myTree->findNode(strList,Node::Fake);
if (n && n->subType() == Node::QmlClass) {
const QmlClassNode* qcn = static_cast<const QmlClassNode*>(n);
- out() << "<p class=\"centerAlign\">";
Text text;
- text << "[Inherits ";
+ text << Atom::ParaLeft << "Inherits ";
text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn));
text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK);
text << Atom(Atom::String, linkPair.second);
text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK);
- text << "]";
+ text << Atom::ParaRight;
generateText(text, cn, marker);
- out() << "</p>";
}
}
}
@@ -4283,21 +4278,22 @@ void HtmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn,
{
const ClassNode* cn = qcn->classNode();
if (cn && (cn->status() != Node::Internal)) {
- out() << "<p class=\"centerAlign\">";
Text text;
- text << "[";
+ text << Atom::ParaLeft;
text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn));
text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK);
- text << Atom(Atom::String, qcn->name());
+ QString name = qcn->name();
+ if (name.startsWith(QLatin1String("QML:")))
+ name = name.mid(4); // remove the "QML:" prefix
+ text << Atom(Atom::String, name);
text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK);
text << " instantiates the C++ class ";
text << Atom(Atom::LinkNode,CodeMarker::stringForNode(cn));
text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK);
text << Atom(Atom::String, cn->name());
text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK);
- text << "]";
+ text << Atom::ParaRight;
generateText(text, qcn, marker);
- out() << "</p>";
}
}
@@ -4314,9 +4310,8 @@ void HtmlGenerator::generateInstantiatedBy(const ClassNode* cn,
if (cn && cn->status() != Node::Internal && !cn->qmlElement().isEmpty()) {
const Node* n = myTree->root()->findNode(cn->qmlElement(),Node::Fake);
if (n && n->subType() == Node::QmlClass) {
- out() << "<p class=\"centerAlign\">";
Text text;
- text << "[";
+ text << Atom::ParaLeft;
text << Atom(Atom::LinkNode,CodeMarker::stringForNode(cn));
text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK);
text << Atom(Atom::String, cn->name());
@@ -4326,9 +4321,8 @@ void HtmlGenerator::generateInstantiatedBy(const ClassNode* cn,
text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK);
text << Atom(Atom::String, n->name());
text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK);
- text << "]";
+ text << Atom::ParaRight;
generateText(text, cn, marker);
- out() << "</p>";
}
}
}
@@ -4457,140 +4451,44 @@ void HtmlGenerator::generatePageIndex(const QString& fileName, CodeMarker* marke
file.close();
}
-#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 + ": ";
- 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";
- }
- }
-
- navigationLinks.clear();
-
- if (node && !node->links().empty()) {
- QPair<QString,QString> linkPair;
- QPair<QString,QString> anchorPair;
- const Node *linkNode;
-
- 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);
-
- out() << " <link rel=\"prev\" href=\""
- << anchorPair.first << "\" />\n";
-
- 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;
- else
- anchorPair = anchorForNode(linkNode);
-
- out() << " <link rel=\"contents\" href=\""
- << anchorPair.first << "\" />\n";
-
- 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);
-
- out() << " <link rel=\"next\" href=\""
- << anchorPair.first << "\" />\n";
-
- 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";
+void HtmlGenerator::generateExtractionMark(const Node *node, ExtractionMarkType markType)
+{
+ if (markType != EndMark) {
+ out() << "<!-- $$$" + node->name();
+ if (markType == MemberMark) {
+ if (node->type() == Node::Function) {
+ const FunctionNode *func = static_cast<const FunctionNode *>(node);
+ if (!func->associatedProperty()) {
+ if (func->overloadNumber() == 1)
+ out() << "[overload1]";
+ out() << "$$$" + func->name() + func->rawParameters().remove(' ');
+ }
+ } else if (node->type() == Node::Property) {
+ out() << "-prop";
+ const PropertyNode *prop = static_cast<const PropertyNode *>(node);
+ const NodeList &list = prop->functions();
+ foreach (const Node *propFuncNode, list) {
+ if (propFuncNode->type() == Node::Function) {
+ const FunctionNode *func = static_cast<const FunctionNode *>(propFuncNode);
+ out() << "$$$" + func->name() + func->rawParameters().remove(' ');
+ }
+ }
+ } else if (node->type() == Node::Enum) {
+ const EnumNode *enumNode = static_cast<const EnumNode *>(node);
+ foreach (const EnumItem &item, enumNode->items())
+ out() << "$$$" + item.name();
+ }
+ } else if (markType == BriefMark) {
+ out() << "-brief";
+ } else if (markType == DetailedDescriptionMark) {
+ out() << "-description";
}
+ out() << " -->\n";
+ } else {
+ out() << "<!-- @@@" + node->name() + " -->\n";
}
+}
- foreach (const QString &stylesheet, stylesheets) {
- out() << " <link href=\"" << stylesheet << "\" rel=\"stylesheet\" "
- << "type=\"text/css\" />\n";
- }
-
- foreach (const QString &customHeadElement, customHeadElements) {
- out() << " " << customHeadElement << "\n";
- }
-
- out() << "</head>\n"
- #endif
+#endif
QT_END_NAMESPACE
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index 80341def61..d92c34916f 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -123,6 +123,12 @@ class HtmlGenerator : public PageGenerator
private:
enum SubTitleSize { SmallSubTitle, LargeSubTitle };
+ enum ExtractionMarkType {
+ BriefMark,
+ DetailedDescriptionMark,
+ MemberMark,
+ EndMark
+ };
const QPair<QString,QString> anchorForNode(const Node *node);
const Node *findNodeForTarget(const QString &target,
@@ -210,9 +216,10 @@ class HtmlGenerator : public PageGenerator
const Node *relative,
CodeMarker *marker);
QString highlightedCode(const QString& markedCode,
- CodeMarker *marker,
- const Node *relative,
- bool alignNames = false);
+ CodeMarker* marker,
+ const Node* relative,
+ bool alignNames = false,
+ const Node* self = 0);
void generateFullName(const Node *apparentNode,
const Node *relative,
@@ -236,9 +243,6 @@ class HtmlGenerator : 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);
@@ -268,6 +272,7 @@ class HtmlGenerator : public PageGenerator
CodeMarker* marker) const;
void generatePageIndex(const QString& fileName,
CodeMarker* marker) const;
+ void generateExtractionMark(const Node *node, ExtractionMarkType markType);
#if 0
NavigationBar currentNavigationBar;
@@ -289,13 +294,17 @@ class HtmlGenerator : public PageGenerator
bool inTableHeader;
int numTableRows;
bool threeColumnEnumValueTable;
+ bool onlineDocs;
bool offlineDocs;
+ bool creatorDocs;
QString link;
QStringList sectionNumber;
QRegExp funcLeftParen;
QString style;
QString postHeader;
QString postPostHeader;
+ QString creatorPostHeader;
+ QString creatorPostPostHeader;
QString footer;
QString address;
bool pleaseGenerateMacRef;
@@ -316,9 +325,6 @@ class HtmlGenerator : public PageGenerator
NodeMap obsoleteClasses;
NodeMap namespaceIndex;
NodeMap serviceClasses;
-#ifdef QDOC_QML
- NodeMap qmlClasses;
-#endif
QMap<QString, NodeMap > funcIndex;
QMap<Text, const Node *> legaleseTexts;
NewSinceMaps newSinceMaps;
@@ -328,6 +334,7 @@ class HtmlGenerator : public PageGenerator
static int id;
public:
static bool debugging_on;
+ static QString divNavTop;
};
#define HTMLGENERATOR_ADDRESS "address"
@@ -335,6 +342,8 @@ class HtmlGenerator : public PageGenerator
#define HTMLGENERATOR_GENERATEMACREFS "generatemacrefs" // ### document me
#define HTMLGENERATOR_POSTHEADER "postheader"
#define HTMLGENERATOR_POSTPOSTHEADER "postpostheader"
+#define HTMLGENERATOR_CREATORPOSTHEADER "postheader"
+#define HTMLGENERATOR_CREATORPOSTPOSTHEADER "postpostheader"
#define HTMLGENERATOR_STYLE "style"
#define HTMLGENERATOR_STYLESHEETS "stylesheets"
#define HTMLGENERATOR_CUSTOMHEADELEMENTS "customheadelements"
diff --git a/tools/qdoc3/javacodemarker.cpp b/tools/qdoc3/javacodemarker.cpp
index 1918cd8ead..c9a8f60929 100644
--- a/tools/qdoc3/javacodemarker.cpp
+++ b/tools/qdoc3/javacodemarker.cpp
@@ -155,8 +155,10 @@ QList<Section> JavaCodeMarker::sections(const InnerNode * /* inner */, SynopsisS
return QList<Section>();
}
-const Node *JavaCodeMarker::resolveTarget(const QString &target, const Tree *tree,
- const Node *relative)
+const Node *JavaCodeMarker::resolveTarget(const QString &target,
+ const Tree *tree,
+ const Node *relative,
+ const Node* /* self */)
{
if (target.endsWith("()")) {
const FunctionNode *func;
diff --git a/tools/qdoc3/javacodemarker.h b/tools/qdoc3/javacodemarker.h
index a2d04dd1b7..c2aabc018a 100644
--- a/tools/qdoc3/javacodemarker.h
+++ b/tools/qdoc3/javacodemarker.h
@@ -72,7 +72,10 @@ public:
QList<Section> sections(const InnerNode *innerNode, SynopsisStyle style, Status status);
QString functionBeginRegExp( const QString& funcName );
QString functionEndRegExp( const QString& funcName );
- const Node *resolveTarget( const QString& target, const Tree *tree, const Node *relative );
+ const Node* resolveTarget( const QString& target,
+ const Tree* tree,
+ const Node* relative,
+ const Node* self = 0 );
};
QT_END_NAMESPACE
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index b0770740ac..259641e807 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -44,6 +44,8 @@
*/
#include "node.h"
+#include "tree.h"
+#include "codemarker.h"
#include <qdebug.h>
QT_BEGIN_NAMESPACE
@@ -171,6 +173,32 @@ QString Node::accessString() const
return "public";
}
+/*!
+ Extract a class name from the type \a string and return it.
+ */
+QString Node::extractClassName(const QString &string) const
+{
+ QString result;
+ for (int i=0; i<=string.size(); ++i) {
+ QChar ch;
+ if (i != string.size())
+ ch = string.at(i);
+
+ QChar lower = ch.toLower();
+ if ((lower >= QLatin1Char('a') && lower <= QLatin1Char('z')) ||
+ ch.digitValue() >= 0 ||
+ ch == QLatin1Char('_') ||
+ ch == QLatin1Char(':')) {
+ result += ch;
+ }
+ else if (!result.isEmpty()) {
+ if (result != QLatin1String("const"))
+ return result;
+ result.clear();
+ }
+ }
+ return result;
+}
/*!
Returns a string representing the access specifier.
@@ -299,7 +327,7 @@ InnerNode::~InnerNode()
Node *InnerNode::findNode(const QString& name)
{
Node *node = childMap.value(name);
- if (node)
+ if (node && node->subType() != QmlPropertyGroup)
return node;
if ((type() == Fake) && (subType() == QmlClass)) {
for (int i=0; i<children.size(); ++i) {
@@ -426,6 +454,9 @@ void InnerNode::setOverload(const FunctionNode *func, bool overlode)
}
/*!
+ Mark all child nodes that have no documentation as having
+ private access and internal status. qdoc will then ignore
+ them for documentation purposes.
*/
void InnerNode::makeUndocumentedChildrenInternal()
{
@@ -831,6 +862,7 @@ NamespaceNode::NamespaceNode(InnerNode *parent, const QString& name)
/*!
\class ClassNode
+ \brief This class represents a C++ class.
*/
/*!
@@ -850,8 +882,8 @@ void ClassNode::addBaseClass(Access access,
ClassNode *node,
const QString &dataTypeWithTemplateArgs)
{
- bas.append(RelatedClass(access, node, dataTypeWithTemplateArgs));
- node->der.append(RelatedClass(access, this));
+ bases.append(RelatedClass(access, node, dataTypeWithTemplateArgs));
+ node->derived.append(RelatedClass(access, this));
}
/*!
@@ -859,16 +891,16 @@ void ClassNode::addBaseClass(Access access,
void ClassNode::fixBaseClasses()
{
int i;
-
i = 0;
- while (i < bas.size()) {
- ClassNode *baseClass = bas.at(i).node;
- if (baseClass->access() == Node::Private) {
- bas.removeAt(i);
-
- const QList<RelatedClass> &basesBases = baseClass->baseClasses();
- for (int j = basesBases.size() - 1; j >= 0; --j)
- bas.insert(i, basesBases.at(j));
+ while (i < bases.size()) {
+ ClassNode* bc = bases.at(i).node;
+ if (bc->access() == Node::Private) {
+ RelatedClass rc = bases.at(i);
+ bases.removeAt(i);
+ ignoredBases.append(rc);
+ const QList<RelatedClass> &bb = bc->baseClasses();
+ for (int j = bb.size() - 1; j >= 0; --j)
+ bases.insert(i, bb.at(j));
}
else {
++i;
@@ -876,15 +908,13 @@ void ClassNode::fixBaseClasses()
}
i = 0;
- while (i < der.size()) {
- ClassNode *derivedClass = der.at(i).node;
- if (derivedClass->access() == Node::Private) {
- der.removeAt(i);
-
- const QList<RelatedClass> &dersDers =
- derivedClass->derivedClasses();
- for (int j = dersDers.size() - 1; j >= 0; --j)
- der.insert(i, dersDers.at(j));
+ while (i < derived.size()) {
+ ClassNode* dc = derived.at(i).node;
+ if (dc->access() == Node::Private) {
+ derived.removeAt(i);
+ const QList<RelatedClass> &dd = dc->derivedClasses();
+ for (int j = dd.size() - 1; j >= 0; --j)
+ derived.insert(i, dd.at(j));
}
else {
++i;
@@ -893,6 +923,16 @@ void ClassNode::fixBaseClasses()
}
/*!
+ Search the child list to find the property node with the
+ specified \a name.
+ */
+const PropertyNode* ClassNode::findPropertyNode(const QString& name) const
+{
+ const Node* n = findNode(name,Node::Property);
+ return (n ? static_cast<const PropertyNode*>(n) : 0);
+}
+
+/*!
\class FakeNode
*/
@@ -1246,6 +1286,24 @@ QStringList FunctionNode::parameterNames() const
}
/*!
+ Returns a raw list of parameters. If \a names is true, the
+ names are included. If \a values is true, the default values
+ are included, if any are present.
+ */
+QString FunctionNode::rawParameters(bool names, bool values) const
+{
+ QString raw;
+ foreach (const Parameter &parameter, parameters()) {
+ raw += parameter.leftType() + parameter.rightType();
+ if (names)
+ raw += parameter.name();
+ if (values)
+ raw += parameter.defaultValue();
+ }
+ return raw;
+}
+
+/*!
Returns the list of reconstructed parameters. If \a values
is true, the default values are included, if any are present.
*/
@@ -1567,6 +1625,144 @@ bool QmlPropertyNode::fromTrool(Trool troolean, bool defaultValue)
return defaultValue;
}
}
+
+static QString valueType(const QString& n)
+{
+ if (n == "QPoint")
+ return "QDeclarativePointValueType";
+ if (n == "QPointF")
+ return "QDeclarativePointFValueType";
+ if (n == "QSize")
+ return "QDeclarativeSizeValueType";
+ if (n == "QSizeF")
+ return "QDeclarativeSizeFValueType";
+ if (n == "QRect")
+ return "QDeclarativeRectValueType";
+ if (n == "QRectF")
+ return "QDeclarativeRectFValueType";
+ if (n == "QVector2D")
+ return "QDeclarativeVector2DValueType";
+ if (n == "QVector3D")
+ return "QDeclarativeVector3DValueType";
+ if (n == "QVector4D")
+ return "QDeclarativeVector4DValueType";
+ if (n == "QQuaternion")
+ return "QDeclarativeQuaternionValueType";
+ if (n == "QMatrix4x4")
+ return "QDeclarativeMatrix4x4ValueType";
+ if (n == "QEasingCurve")
+ return "QDeclarativeEasingValueType";
+ if (n == "QFont")
+ return "QDeclarativeFontValueType";
+ return QString();
+}
+
+/*!
+ Returns true if a QML property or attached property is
+ read-only. The algorithm for figuring this out is long
+ amd tedious and almost certainly will break. It currently
+ doesn't work for qmlproperty bool PropertyChanges::explicit,
+ because the tokenized gets confused on "explicit" .
+ */
+bool QmlPropertyNode::isWritable(const Tree* tree) const
+{
+ Node* n = parent();
+ while (n && n->subType() != Node::QmlClass)
+ n = n->parent();
+ if (n) {
+ const QmlClassNode* qcn = static_cast<const QmlClassNode*>(n);
+ const ClassNode* cn = qcn->classNode();
+ if (cn) {
+ QStringList dotSplit = name().split(QChar('.'));
+ const PropertyNode* pn = cn->findPropertyNode(dotSplit[0]);
+ if (pn) {
+ if (dotSplit.size() > 1) {
+ QStringList path(extractClassName(pn->qualifiedDataType()));
+ const Node* nn = tree->findNode(path,Class);
+ if (nn) {
+ const ClassNode* cn = static_cast<const ClassNode*>(nn);
+ pn = cn->findPropertyNode(dotSplit[1]);
+ if (pn) {
+ return pn->isWritable();
+ }
+ else {
+ const QList<RelatedClass>& bases = cn->baseClasses();
+ if (!bases.isEmpty()) {
+ for (int i=0; i<bases.size(); ++i) {
+ const ClassNode* cn = bases[i].node;
+ pn = cn->findPropertyNode(dotSplit[1]);
+ if (pn) {
+ return pn->isWritable();
+ }
+ }
+ }
+ const QList<RelatedClass>& ignoredBases = cn->ignoredBaseClasses();
+ if (!ignoredBases.isEmpty()) {
+ for (int i=0; i<ignoredBases.size(); ++i) {
+ const ClassNode* cn = ignoredBases[i].node;
+ pn = cn->findPropertyNode(dotSplit[1]);
+ if (pn) {
+ return pn->isWritable();
+ }
+ }
+ }
+ QString vt = valueType(cn->name());
+ if (!vt.isEmpty()) {
+ QStringList path(vt);
+ const Node* vtn = tree->findNode(path,Class);
+ if (vtn) {
+ const ClassNode* cn = static_cast<const ClassNode*>(vtn);
+ pn = cn->findPropertyNode(dotSplit[1]);
+ if (pn) {
+ return pn->isWritable();
+ }
+ }
+ }
+ }
+ }
+ }
+ else {
+ return pn->isWritable();
+ }
+ }
+ else {
+ const QList<RelatedClass>& bases = cn->baseClasses();
+ if (!bases.isEmpty()) {
+ for (int i=0; i<bases.size(); ++i) {
+ const ClassNode* cn = bases[i].node;
+ pn = cn->findPropertyNode(dotSplit[0]);
+ if (pn) {
+ return pn->isWritable();
+ }
+ }
+ }
+ const QList<RelatedClass>& ignoredBases = cn->ignoredBaseClasses();
+ if (!ignoredBases.isEmpty()) {
+ for (int i=0; i<ignoredBases.size(); ++i) {
+ const ClassNode* cn = ignoredBases[i].node;
+ pn = cn->findPropertyNode(dotSplit[0]);
+ if (pn) {
+ return pn->isWritable();
+ }
+ }
+ }
+ if (isAttached()) {
+ QString classNameAttached = cn->name() + "Attached";
+ QStringList path(classNameAttached);
+ const Node* nn = tree->findNode(path,Class);
+ const ClassNode* acn = static_cast<const ClassNode*>(nn);
+ pn = acn->findPropertyNode(dotSplit[0]);
+ if (pn) {
+ return pn->isWritable();
+ }
+ }
+ }
+ }
+ }
+ location().warning(tr("Can't determine read-only status of QML property %1; writable assumed.").arg(name()));
+ return true;
+}
+
#endif
QT_END_NAMESPACE
diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h
index e9f2d74605..40b78ef8aa 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -193,6 +193,7 @@ class Node
virtual QString fileBase() const;
QUuid guid() const;
QString ditaXmlHref();
+ QString extractClassName(const QString &string) const;
protected:
Node(Type type, InnerNode* parent, const QString& name);
@@ -326,6 +327,8 @@ struct RelatedClass
QString dataTypeWithTemplateArgs;
};
+class PropertyNode;
+
class ClassNode : public InnerNode
{
public:
@@ -337,8 +340,9 @@ class ClassNode : public InnerNode
const QString &dataTypeWithTemplateArgs = "");
void fixBaseClasses();
- const QList<RelatedClass> &baseClasses() const { return bas; }
- const QList<RelatedClass> &derivedClasses() const { return der; }
+ const QList<RelatedClass> &baseClasses() const { return bases; }
+ const QList<RelatedClass> &derivedClasses() const { return derived; }
+ const QList<RelatedClass> &ignoredBaseClasses() const { return ignoredBases; }
bool hideFromMainList() const { return hidden; }
void setHideFromMainList(bool value) { hidden = value; }
@@ -349,10 +353,12 @@ class ClassNode : public InnerNode
void setQmlElement(const QString& value) { qmlelement = value; }
virtual bool isAbstract() const { return abstract; }
virtual void setAbstract(bool b) { abstract = b; }
+ const PropertyNode* findPropertyNode(const QString& name) const;
private:
- QList<RelatedClass> bas;
- QList<RelatedClass> der;
+ QList<RelatedClass> bases;
+ QList<RelatedClass> derived;
+ QList<RelatedClass> ignoredBases;
bool hidden;
bool abstract;
QString sname;
@@ -436,6 +442,8 @@ class QmlPropGroupNode : public FakeNode
bool att;
};
+class Tree;
+
class QmlPropertyNode : public LeafNode
{
public:
@@ -454,7 +462,7 @@ class QmlPropertyNode : public LeafNode
QString qualifiedDataType() const { return dt; }
bool isStored() const { return fromTrool(sto,true); }
bool isDesignable() const { return fromTrool(des,false); }
- bool isWritable() const { return fromTrool(wri,true); }
+ bool isWritable(const Tree* tree) const;
bool isAttached() const { return att; }
virtual bool isQmlNode() const { return true; }
@@ -616,6 +624,7 @@ class FunctionNode : public LeafNode
int numOverloads() const;
const QList<Parameter>& parameters() const { return params; }
QStringList parameterNames() const;
+ QString rawParameters(bool names = false, bool values = false) const;
const FunctionNode* reimplementedFrom() const { return rf; }
const QList<FunctionNode*> &reimplementedBy() const { return rb; }
const PropertyNode* associatedProperty() const { return ap; }
diff --git a/tools/qdoc3/plaincodemarker.cpp b/tools/qdoc3/plaincodemarker.cpp
index 4abfd2b9f7..d825c13f0f 100644
--- a/tools/qdoc3/plaincodemarker.cpp
+++ b/tools/qdoc3/plaincodemarker.cpp
@@ -129,11 +129,4 @@ QList<Section> PlainCodeMarker::sections(const InnerNode * /* innerNode */,
return QList<Section>();
}
-const Node *PlainCodeMarker::resolveTarget( const QString& /* target */,
- const Tree * /* tree */,
- const Node * /* relative */ )
-{
- return 0;
-}
-
QT_END_NAMESPACE
diff --git a/tools/qdoc3/plaincodemarker.h b/tools/qdoc3/plaincodemarker.h
index e9cc40d0e5..7afb88e2ae 100644
--- a/tools/qdoc3/plaincodemarker.h
+++ b/tools/qdoc3/plaincodemarker.h
@@ -71,7 +71,6 @@ public:
QString functionBeginRegExp( const QString& funcName );
QString functionEndRegExp( const QString& funcName );
QList<Section> sections(const InnerNode *innerNode, SynopsisStyle style, Status status);
- const Node *resolveTarget(const QString &target, const Tree *tree, const Node *relative);
};
QT_END_NAMESPACE
diff --git a/tools/qdoc3/qscodemarker.cpp b/tools/qdoc3/qscodemarker.cpp
index d4b8e80f05..2ee5d99340 100644
--- a/tools/qdoc3/qscodemarker.cpp
+++ b/tools/qdoc3/qscodemarker.cpp
@@ -375,11 +375,4 @@ QList<Section> QsCodeMarker::sections( const InnerNode *inner, SynopsisStyle sty
return sections;
}
-const Node *QsCodeMarker::resolveTarget( const QString& /* target */,
- const Tree * /* tree */,
- const Node * /* relative */ )
-{
- return 0;
-}
-
QT_END_NAMESPACE
diff --git a/tools/qdoc3/qscodemarker.h b/tools/qdoc3/qscodemarker.h
index 1590009dad..c6a177f4e4 100644
--- a/tools/qdoc3/qscodemarker.h
+++ b/tools/qdoc3/qscodemarker.h
@@ -72,7 +72,6 @@ public:
QList<Section> sections(const InnerNode *innerNode, SynopsisStyle style, Status status);
QString functionBeginRegExp( const QString& funcName );
QString functionEndRegExp( const QString& funcName );
- const Node *resolveTarget( const QString& target, const Tree *tree, const Node *relative );
};
QT_END_NAMESPACE
diff --git a/tools/qdoc3/test/assistant.qdocconf b/tools/qdoc3/test/assistant.qdocconf
index 4b52992cc1..efe3b3bb34 100644
--- a/tools/qdoc3/test/assistant.qdocconf
+++ b/tools/qdoc3/test/assistant.qdocconf
@@ -7,6 +7,9 @@ include(qt-defines.qdocconf)
project = Qt Assistant
description = Qt Assistant Manual
url = http://qt.nokia.com/doc/4.7
+online = false
+offline = false
+creator = true
indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
@@ -17,7 +20,10 @@ qhp.Assistant.namespace = com.trolltech.assistant.470
qhp.Assistant.virtualFolder = qdoc
qhp.Assistant.indexTitle = Qt Assistant Manual
qhp.Assistant.extraFiles = images/bg_l.png \
- images/bg_l_blank.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 \
@@ -25,24 +31,27 @@ qhp.Assistant.extraFiles = images/bg_l.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/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
+ scripts/functions.js \
+ scripts/jquery.js \
+ scripts/narrow.js \
+ scripts/superfish.js \
+ style/narrow.css \
+ style/superfish.css \
+ style/style_ie6.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/style.css
qhp.Assistant.filterAttributes = qt 4.7.0 tools assistant
qhp.Assistant.customFilters.Assistant.name = Qt Assistant Manual
diff --git a/tools/qdoc3/test/designer.qdocconf b/tools/qdoc3/test/designer.qdocconf
index b1f37dc5ed..059541735d 100644
--- a/tools/qdoc3/test/designer.qdocconf
+++ b/tools/qdoc3/test/designer.qdocconf
@@ -7,6 +7,9 @@ include(qt-defines.qdocconf)
project = Qt Designer
description = Qt Designer Manual
url = http://qt.nokia.com/doc/4.7
+online = false
+offline = false
+creator = true
indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
diff --git a/tools/qdoc3/test/linguist.qdocconf b/tools/qdoc3/test/linguist.qdocconf
index 26fb55c9b6..7dd57fb5de 100644
--- a/tools/qdoc3/test/linguist.qdocconf
+++ b/tools/qdoc3/test/linguist.qdocconf
@@ -7,6 +7,9 @@ include(qt-defines.qdocconf)
project = Qt Linguist
description = Qt Linguist Manual
url = http://qt.nokia.com/doc/4.7
+online = false
+offline = false
+creator = true
indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
diff --git a/tools/qdoc3/test/qdeclarative.qdocconf b/tools/qdoc3/test/qdeclarative.qdocconf
index facec5c91c..0cff98ebb6 100644
--- a/tools/qdoc3/test/qdeclarative.qdocconf
+++ b/tools/qdoc3/test/qdeclarative.qdocconf
@@ -8,6 +8,9 @@ project = Qml
description = Qml Reference Documentation
url = http://qt.nokia.com/doc/4.7/
qmlonly = true
+online = false
+offline = false
+creator = true
edition.Console.modules = QtCore QtDBus QtNetwork QtScript QtSql QtXml \
QtXmlPatterns QtTest
diff --git a/tools/qdoc3/test/qmake.qdocconf b/tools/qdoc3/test/qmake.qdocconf
index f06912962d..c66628862c 100644
--- a/tools/qdoc3/test/qmake.qdocconf
+++ b/tools/qdoc3/test/qmake.qdocconf
@@ -7,6 +7,9 @@ include(qt-defines.qdocconf)
project = QMake
description = QMake Manual
url = http://qt.nokia.com/doc/4.7
+online = false
+offline = false
+creator = true
indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
diff --git a/tools/qdoc3/test/qt-api-only.qdocconf b/tools/qdoc3/test/qt-api-only.qdocconf
index 10b7be507a..1ec0c6b45d 100644
--- a/tools/qdoc3/test/qt-api-only.qdocconf
+++ b/tools/qdoc3/test/qt-api-only.qdocconf
@@ -5,6 +5,9 @@ include(qt-build-docs.qdocconf)
# qmake.qdocconf).
url = ./
+online = false
+offline = false
+creator = true
# Ensures that the documentation for the tools is not included in the generated
# .qhp file.
@@ -25,6 +28,13 @@ qhp.Qt.excluded += $QT_SOURCE_TREE/doc/src/development/assistant-manual.qdoc \
$QT_SOURCE_TREE/doc/src/examples/trollprint.qdoc \
$QT_SOURCE_TREE/doc/src/development/qmake-manual.qdoc
+# Remove the QML documentation from the Qt-only documentation.
+
+excludedirs += $QT_SOURCE_TREE/src/declarative \
+ $QT_SOURCE_TREE/src/imports \
+ $QT_SOURCE_TREE/src/3rdparty/webkit/WebKit/qt/declarative \
+ $QT_SOURCE_TREE/doc/src/declarative
+
outputdir = $QT_BUILD_TREE/doc-build/html-qt
tagfile = $QT_BUILD_TREE/doc-build/html-qt/qt.tags
base = file:$QT_BUILD_TREE/doc-build/html-qt
diff --git a/tools/qdoc3/test/qt-api-only_ja_JP.qdocconf b/tools/qdoc3/test/qt-api-only_ja_JP.qdocconf
index aa3ab0177b..70e0235ffc 100644
--- a/tools/qdoc3/test/qt-api-only_ja_JP.qdocconf
+++ b/tools/qdoc3/test/qt-api-only_ja_JP.qdocconf
@@ -25,6 +25,13 @@ qhp.Qt.excluded += $QT_SOURCE_TREE/doc/src/development/assistant-manual.qdoc \
$QT_SOURCE_TREE/doc/src/examples/trollprint.qdoc \
$QT_SOURCE_TREE/doc/src/development/qmake-manual.qdoc
+# Remove the QML documentation from the Qt-only documentation.
+
+excludedirs += $QT_SOURCE_TREE/src/declarative \
+ $QT_SOURCE_TREE/src/imports \
+ $QT_SOURCE_TREE/src/3rdparty/webkit/WebKit/qt/declarative \
+ $QT_SOURCE_TREE/doc/src/declarative
+
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-api-only_zh_CN.qdocconf b/tools/qdoc3/test/qt-api-only_zh_CN.qdocconf
index c722ee8874..d6bf4106bf 100644
--- a/tools/qdoc3/test/qt-api-only_zh_CN.qdocconf
+++ b/tools/qdoc3/test/qt-api-only_zh_CN.qdocconf
@@ -25,6 +25,13 @@ qhp.Qt.excluded += $QT_SOURCE_TREE/doc/src/development/assistant-manual.qdoc \
$QT_SOURCE_TREE/doc/src/examples/trollprint.qdoc \
$QT_SOURCE_TREE/doc/src/development/qmake-manual.qdoc
+# Remove the QML documentation from the Qt-only documentation.
+
+excludedirs += $QT_SOURCE_TREE/src/declarative \
+ $QT_SOURCE_TREE/src/imports \
+ $QT_SOURCE_TREE/src/3rdparty/webkit/WebKit/qt/declarative \
+ $QT_SOURCE_TREE/doc/src/declarative
+
outputdir = $QT_BUILD_TREE/doc-build/html-qt_zh_CN
tagfile = $QT_BUILD_TREE/doc-build/html-qt_zh_CN/qt.tags
base = file:$QT_BUILD_TREE/doc-build/html-qt_zh_CN
diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf
index 140b81fb29..f66301621d 100644
--- a/tools/qdoc3/test/qt-build-docs.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs.qdocconf
@@ -7,6 +7,9 @@ include(qt-defines.qdocconf)
project = Qt
description = Qt Reference Documentation
url = http://qt.nokia.com/doc/4.7
+online = false
+offline = false
+creator = true
sourceencoding = UTF-8
outputencoding = UTF-8
@@ -24,6 +27,9 @@ qhp.Qt.indexTitle = Qt Reference Documentation
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 \
@@ -31,12 +37,12 @@ qhp.Qt.extraFiles = index.html \
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/arrow-down.png \
images/spinner.gif \
images/stylesheet-coffee-plastique.png \
images/taskmenuextension-example.png \
@@ -44,17 +50,10 @@ qhp.Qt.extraFiles = index.html \
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 \
diff --git a/tools/qdoc3/test/qt-cpp-ignore.qdocconf b/tools/qdoc3/test/qt-cpp-ignore.qdocconf
index dcf33dcd4a..4963b96e33 100644
--- a/tools/qdoc3/test/qt-cpp-ignore.qdocconf
+++ b/tools/qdoc3/test/qt-cpp-ignore.qdocconf
@@ -90,4 +90,7 @@ Cpp.ignoredirectives = Q_DECLARE_HANDLE \
__attribute__ \
K_DECLARE_PRIVATE \
PHONON_OBJECT \
- PHONON_HEIR
+ PHONON_HEIR \
+ Q_PRIVATE_PROPERTY \
+ Q_DECLARE_PRIVATE_D \
+ Q_CLASSINFO
diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf
index 31c9d5ae01..e4397083bf 100644
--- a/tools/qdoc3/test/qt-html-templates.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates.qdocconf
@@ -3,6 +3,9 @@ HTML.stylesheets = style/style.css \
style/style_ie7.css \
style/style_ie8.css \
style/style_ie6.css
+
+HTML.creatorpostheader = "**\n"
+HTML.creatorpostpostheader = "***\n"
HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
" <div class=\"content\"> \n" \
@@ -17,12 +20,11 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\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-dev\"><a href=\"http://developer.qt.nokia.com/\">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" \
@@ -113,7 +115,6 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
" <li class=\"defaultLink\"><a href=\"tutorials.html\">Tutorials</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" \
@@ -160,8 +161,8 @@ HTML.footer = " <!-- /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 id=\"noteHead\">Thank you for giving your feedback. <div class=\"note\">Make sure it is related the page. For more general bugs and \n" \
- " requests, please use the <a href=\"http://bugreports.qt.nokia.com/secure/Dashboard.jspa\">Qt Bug Tracker</a></div></p>\n" \
+ " <p id=\"noteHead\">Thank you for giving your feedback. <div class=\"note\">Make sure it is related to this specific page. For more general bugs and \n" \
+ " requests, please use the <a href=\"http://bugreports.qt.nokia.com/secure/Dashboard.jspa\">Qt Bug Tracker</a>.</div></p>\n" \
" <p><textarea id=\"feedbox\" name=\"feedText\" rows=\"5\" cols=\"40\"></textarea></p>\n" \
" <p><input id=\"feedsubmit\" class=\"feedclose\" type=\"submit\" name=\"feedback\" /></p>\n" \
" </form>\n" \
diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf
index d13277173a..08492e31e7 100644
--- a/tools/qdoc3/test/qt.qdocconf
+++ b/tools/qdoc3/test/qt.qdocconf
@@ -9,7 +9,9 @@ versionsym =
version = %VERSION%
description = Qt Reference Documentation
url = http://qt.nokia.com/doc/4.7
-online = true
+online = false
+offline = false
+creator = true
sourceencoding = UTF-8
outputencoding = UTF-8
@@ -26,46 +28,46 @@ qhp.Qt.indexRoot =
# 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_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
+ 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
qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc
qhp.Qt.customFilters.Qt.name = Qt 4.7.0
@@ -146,7 +148,7 @@ exampledirs = $QTDIR/doc/src \
imagedirs = $QTDIR/doc/src/images \
$QTDIR/examples \
$QTDIR/doc/src/declarative/pics \
- $QTDIR/doc/src/template/images
+ $QTDIR/doc/src/template/images
outputdir = $QTDIR/doc/html
tagfile = $QTDIR/doc/html/qt.tags
base = file:$QTDIR/doc/html
diff --git a/tools/qdoc3/tokenizer.cpp b/tools/qdoc3/tokenizer.cpp
index 7c10de65a6..05ad5ee57d 100644
--- a/tools/qdoc3/tokenizer.cpp
+++ b/tools/qdoc3/tokenizer.cpp
@@ -67,7 +67,11 @@ static const char *kwords[] = {
"private", "protected", "public", "short", "signals", "signed",
"slots", "static", "struct", "template", "typedef", "typename",
"union", "unsigned", "using", "virtual", "void", "volatile",
- "__int64", "Q_OBJECT", "Q_OVERRIDE", "Q_PROPERTY",
+ "__int64",
+ "Q_OBJECT",
+ "Q_OVERRIDE",
+ "Q_PROPERTY",
+ "Q_PRIVATE_PROPERTY",
"Q_DECLARE_SEQUENTIAL_ITERATOR",
"Q_DECLARE_MUTABLE_SEQUENTIAL_ITERATOR",
"Q_DECLARE_ASSOCIATIVE_ITERATOR",
diff --git a/tools/qdoc3/tokenizer.h b/tools/qdoc3/tokenizer.h
index f55d2ef048..bd359659bc 100644
--- a/tools/qdoc3/tokenizer.h
+++ b/tools/qdoc3/tokenizer.h
@@ -75,7 +75,7 @@ enum { Tok_Eoi, Tok_Ampersand, Tok_Aster, Tok_Caret, Tok_LeftParen,
Tok_static, Tok_struct, Tok_template, Tok_typedef,
Tok_typename, Tok_union, Tok_unsigned, Tok_using, Tok_virtual,
Tok_void, Tok_volatile, Tok_int64, Tok_Q_OBJECT, Tok_Q_OVERRIDE,
- Tok_Q_PROPERTY, Tok_Q_DECLARE_SEQUENTIAL_ITERATOR,
+ Tok_Q_PROPERTY, Tok_Q_PRIVATE_PROPERTY, Tok_Q_DECLARE_SEQUENTIAL_ITERATOR,
Tok_Q_DECLARE_MUTABLE_SEQUENTIAL_ITERATOR,
Tok_Q_DECLARE_ASSOCIATIVE_ITERATOR,
Tok_Q_DECLARE_MUTABLE_ASSOCIATIVE_ITERATOR,
diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp
index 70b998f041..56e3484b06 100644
--- a/tools/qdoc3/tree.cpp
+++ b/tools/qdoc3/tree.cpp
@@ -125,18 +125,20 @@ Tree::~Tree()
/*!
*/
-Node *Tree::findNode(const QStringList &path, Node *relative, int findFlags)
+Node *Tree::findNode(const QStringList &path, Node *relative, int findFlags, const Node* self)
{
return const_cast<Node*>(const_cast<const Tree*>(this)->findNode(path,
relative,
- findFlags));
+ findFlags,
+ self));
}
/*!
*/
const Node* Tree::findNode(const QStringList &path,
const Node* start,
- int findFlags) const
+ int findFlags,
+ const Node* self) const
{
const Node* current = start;
if (!current)
@@ -171,9 +173,11 @@ const Node* Tree::findNode(const QStringList &path,
}
if (node && i == path.size()
&& (!(findFlags & NonFunction) || node->type() != Node::Function
- || ((FunctionNode *)node)->metaness() == FunctionNode::MacroWithoutParams))
- if ((node != start) && (node->subType() != Node::QmlPropertyGroup))
+ || ((FunctionNode *)node)->metaness() == FunctionNode::MacroWithoutParams)) {
+ if ((node != self) && (node->subType() != Node::QmlPropertyGroup)) {
return node;
+ }
+ }
current = current->parent();
} while (current);
@@ -465,8 +469,9 @@ void Tree::resolveInheritance(NamespaceNode *rootNode)
for (int pass = 0; pass < 2; pass++) {
NodeList::ConstIterator c = rootNode->childNodes().begin();
while (c != rootNode->childNodes().end()) {
- if ((*c)->type() == Node::Class)
+ if ((*c)->type() == Node::Class) {
resolveInheritance(pass, (ClassNode *) *c);
+ }
else if ((*c)->type() == Node::Namespace) {
NamespaceNode *ns = static_cast<NamespaceNode*>(*c);
resolveInheritance(ns);
@@ -538,14 +543,16 @@ void Tree::resolveInheritance(int pass, ClassNode *classe)
while (b != bounds.end()) {
ClassNode *baseClass = (ClassNode*)findNode((*b).basePath,
Node::Class);
- if (!baseClass && (*b).parent)
+ if (!baseClass && (*b).parent) {
baseClass = (ClassNode*)findNode((*b).basePath,
Node::Class,
(*b).parent);
- if (baseClass)
+ }
+ if (baseClass) {
classe->addBaseClass((*b).access,
baseClass,
(*b).dataTypeWithTemplateArgs);
+ }
++b;
}
}
diff --git a/tools/qdoc3/tree.h b/tools/qdoc3/tree.h
index 0865847b3e..b34c3a8d05 100644
--- a/tools/qdoc3/tree.h
+++ b/tools/qdoc3/tree.h
@@ -65,10 +65,13 @@ class Tree
Tree();
~Tree();
- Node *findNode(const QStringList &path, Node *relative=0, int findFlags=0);
- Node *findNode(const QStringList &path,
+ Node* findNode(const QStringList &path,
+ Node* relative=0,
+ int findFlags=0,
+ const Node* self=0);
+ Node* findNode(const QStringList &path,
Node::Type type,
- Node *relative = 0,
+ Node* relative = 0,
int findFlags = 0);
FunctionNode *findFunctionNode(const QStringList &path,
Node *relative = 0,
@@ -98,12 +101,13 @@ class Tree
NamespaceNode *root() { return &roo; }
QString version() const { return vers; }
- const Node *findNode(const QStringList &path,
- const Node *relative = 0,
- int findFlags = 0) const;
- const Node *findNode(const QStringList &path,
+ const Node* findNode(const QStringList &path,
+ const Node* relative = 0,
+ int findFlags = 0,
+ const Node* self=0) const;
+ const Node* findNode(const QStringList &path,
Node::Type type, const
- Node *relative = 0,
+ Node* relative = 0,
int findFlags = 0) const;
const FunctionNode *findFunctionNode(const QStringList &path,
const Node *relative = 0,
diff --git a/tools/qml/Info_mac.plist b/tools/qml/Info_mac.plist
index 80ca6a3526..08775479ba 100644
--- a/tools/qml/Info_mac.plist
+++ b/tools/qml/Info_mac.plist
@@ -14,5 +14,36 @@
<string>@TYPEINFO@</string>
<key>CFBundleExecutable</key>
<string>@EXECUTABLE@</string>
+ <key>UTExportedTypeDeclarations</key>
+ <array>
+ <dict>
+ <key>UTTypeIdentifier</key>
+ <string>com.nokia.qt.qml</string>
+ <key>UTTypeDescription</key>
+ <string>Qt Markup Language</string>
+ <key>UTTypeConformsTo</key>
+ <array>
+ <string>public.plain-text</string>
+ </array>
+ <key>UTTypeTagSpecification</key>
+ <dict>
+ <key>public.filename-extension</key>
+ <array>
+ <string>qml</string>
+ </array>
+ </dict>
+ </dict>
+ </array>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>LSItemContentTypes</key>
+ <array>
+ <string>com.nokia.qt.qml</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ </dict>
+ </array>
</dict>
</plist>
diff --git a/tools/qml/content/Browser.qml b/tools/qml/browser/Browser.qml
index ff2bb47647..ff2bb47647 100644
--- a/tools/qml/content/Browser.qml
+++ b/tools/qml/browser/Browser.qml
diff --git a/tools/qml/browser/browser.qrc b/tools/qml/browser/browser.qrc
new file mode 100644
index 0000000000..9c688e7521
--- /dev/null
+++ b/tools/qml/browser/browser.qrc
@@ -0,0 +1,9 @@
+<RCC>
+ <qresource prefix="/browser">
+ <file>Browser.qml</file>
+ <file>images/up.png</file>
+ <file>images/folder.png</file>
+ <file>images/titlebar.sci</file>
+ <file>images/titlebar.png</file>
+ </qresource>
+</RCC>
diff --git a/tools/qml/content/images/folder.png b/tools/qml/browser/images/folder.png
index e53e2ad464..e53e2ad464 100644
--- a/tools/qml/content/images/folder.png
+++ b/tools/qml/browser/images/folder.png
Binary files differ
diff --git a/tools/qml/content/images/titlebar.png b/tools/qml/browser/images/titlebar.png
index 51c90082d0..51c90082d0 100644
--- a/tools/qml/content/images/titlebar.png
+++ b/tools/qml/browser/images/titlebar.png
Binary files differ
diff --git a/tools/qml/content/images/titlebar.sci b/tools/qml/browser/images/titlebar.sci
index 0418d94cd6..0418d94cd6 100644
--- a/tools/qml/content/images/titlebar.sci
+++ b/tools/qml/browser/images/titlebar.sci
diff --git a/tools/qml/content/images/up.png b/tools/qml/browser/images/up.png
index b05f8025d0..b05f8025d0 100644
--- a/tools/qml/content/images/up.png
+++ b/tools/qml/browser/images/up.png
Binary files differ
diff --git a/tools/qml/deviceorientation_symbian.cpp b/tools/qml/deviceorientation_symbian.cpp
index c305f942d5..307c4174af 100644
--- a/tools/qml/deviceorientation_symbian.cpp
+++ b/tools/qml/deviceorientation_symbian.cpp
@@ -110,22 +110,27 @@ private:
void DataReceived(CSensrvChannel &channel, TInt count, TInt dataLost)
{
+ Q_UNUSED(dataLost)
if (channel.GetChannelInfo().iChannelType == KSensrvChannelTypeIdOrientationData) {
TSensrvOrientationData data;
for (int i = 0; i < count; ++i) {
TPckgBuf<TSensrvOrientationData> dataBuf;
channel.GetData(dataBuf);
data = dataBuf();
- Orientation o = UnknownOrientation;
+ Orientation orientation = UnknownOrientation;
switch (data.iDeviceOrientation) {
case TSensrvOrientationData::EOrientationDisplayUp:
- o = Portrait;
+ orientation = Portrait;
break;
case TSensrvOrientationData::EOrientationDisplayRightUp:
- o = Landscape;
+ orientation = Landscape;
break;
case TSensrvOrientationData::EOrientationDisplayLeftUp:
+ orientation = LandscapeInverted;
+ break;
case TSensrvOrientationData::EOrientationDisplayDown:
+ orientation = PortraitInverted;
+ break;
case TSensrvOrientationData::EOrientationUndefined:
case TSensrvOrientationData::EOrientationDisplayUpwards:
case TSensrvOrientationData::EOrientationDisplayDownwards:
@@ -133,8 +138,8 @@ private:
break;
}
- if (m_current != o && o != UnknownOrientation) {
- m_current = o;
+ if (m_current != orientation && orientation != UnknownOrientation) {
+ m_current = orientation;
emit orientationChanged();
}
}
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 4b1162e22d..7421b5e320 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -56,7 +56,8 @@ QT_USE_NAMESPACE
QtMsgHandler systemMsgOutput = 0;
-
+static QDeclarativeViewer *openFile(const QString &fileName);
+static void showViewer(QDeclarativeViewer *viewer);
#if defined (Q_OS_SYMBIAN)
#include <unistd.h>
@@ -117,6 +118,11 @@ void myMessageOutput(QtMsgType type, const char *msg)
#endif
+static QDeclarativeViewer* globalViewer = 0;
+
+// The qml file that is shown if the user didn't specify a QML file
+QString initialFile = "qrc:/startup/startup.qml";
+
void usage()
{
qWarning("Usage: qmlviewer [options] <filename>");
@@ -175,135 +181,200 @@ void scriptOptsUsage()
enum WarningsConfig { ShowWarnings, HideWarnings, DefaultWarnings };
-int main(int argc, char ** argv)
+struct ViewerOptions
{
-#if defined (Q_OS_SYMBIAN)
- qInstallMsgHandler(myMessageOutput);
-#else
- systemMsgOutput = qInstallMsgHandler(myMessageOutput);
+ ViewerOptions()
+ : frameless(false),
+ fps(0.0),
+ autorecord_from(0),
+ autorecord_to(0),
+ dither("none"),
+ runScript(false),
+ devkeys(false),
+ cache(0),
+ useGL(false),
+ fullScreen(false),
+ stayOnTop(false),
+ maximized(false),
+ useNativeFileBrowser(true),
+ experimentalGestures(false),
+ warningsConfig(DefaultWarnings),
+ sizeToView(true)
+ {
+#if defined(Q_OS_SYMBIAN)
+ maximized = true;
+ useNativeFileBrowser = false;
#endif
-#if defined (Q_OS_WIN)
- // Debugging output is not visible by default on Windows -
- // therefore show modal dialog with errors instad.
- atexit(showWarnings);
+#if defined(Q_WS_MAC)
+ useGL = true;
#endif
-
-#if defined (Q_WS_X11) || defined (Q_WS_MAC)
- //### default to using raster graphics backend for now
- bool gsSpecified = false;
- for (int i = 0; i < argc; ++i) {
- QString arg = argv[i];
- if (arg == "-graphicssystem") {
- gsSpecified = true;
- break;
- }
}
- if (!gsSpecified)
- QApplication::setGraphicsSystem("raster");
-#endif
-
- QApplication app(argc, argv);
- app.setApplicationName("QtQmlViewer");
- app.setOrganizationName("Nokia");
- app.setOrganizationDomain("nokia.com");
-
-
-
- QDeclarativeViewer::registerTypes();
- QDeclarativeTester::registerTypes();
-
- bool frameless = false;
- QString fileName;
- double fps = 0;
- int autorecord_from = 0;
- int autorecord_to = 0;
- QString dither = "none";
+ bool frameless;
+ double fps;
+ int autorecord_from;
+ int autorecord_to;
+ QString dither;
QString recordfile;
QStringList recordargs;
QStringList imports;
QStringList plugins;
QString script;
QString scriptopts;
- bool runScript = false;
- bool devkeys = false;
- int cache = 0;
+ bool runScript;
+ bool devkeys;
+ int cache;
QString translationFile;
- bool useGL = false;
- bool fullScreen = false;
- bool stayOnTop = false;
- bool maximized = false;
- bool useNativeFileBrowser = true;
- bool experimentalGestures = false;
+ bool useGL;
+ bool fullScreen;
+ bool stayOnTop;
+ bool maximized;
+ bool useNativeFileBrowser;
+ bool experimentalGestures;
- WarningsConfig warningsConfig = DefaultWarnings;
- bool sizeToView = true;
+ WarningsConfig warningsConfig;
+ bool sizeToView;
-#if defined(Q_OS_SYMBIAN)
- maximized = true;
- useNativeFileBrowser = false;
-#endif
+ QDeclarativeViewer::ScriptOptions scriptOptions;
+};
-#if defined(Q_WS_MAC)
- useGL = true;
-#endif
+static ViewerOptions opts;
+static QStringList fileNames;
- for (int i = 1; i < argc; ++i) {
- bool lastArg = (i == argc - 1);
- QString arg = argv[i];
+class Application : public QApplication
+{
+ Q_OBJECT
+public:
+ Application(int &argc, char **&argv)
+ : QApplication(argc, argv)
+ {}
+
+protected:
+ bool event(QEvent *ev)
+ {
+ if (ev->type() != QEvent::FileOpen)
+ return QApplication::event(ev);
+
+ QFileOpenEvent *fev = static_cast<QFileOpenEvent *>(ev);
+
+ globalViewer->open(fev->file());
+ if (!globalViewer->isVisible())
+ showViewer(globalViewer);
+
+ return true;
+ }
+
+private Q_SLOTS:
+ void showInitialViewer()
+ {
+ QApplication::processEvents();
+
+ QDeclarativeViewer *viewer = globalViewer;
+ if (!viewer)
+ return;
+ if (viewer->currentFile().isEmpty()) {
+ if(opts.useNativeFileBrowser)
+ viewer->open(initialFile);
+ else
+ viewer->openFile();
+ }
+ if (!viewer->isVisible())
+ showViewer(viewer);
+ }
+};
+
+static void parseScriptOptions()
+{
+ QStringList options =
+ opts.scriptopts.split(QLatin1Char(','), QString::SkipEmptyParts);
+
+ QDeclarativeViewer::ScriptOptions scriptOptions = 0;
+ for (int i = 0; i < options.count(); ++i) {
+ const QString &option = options.at(i);
+ if (option == QLatin1String("help")) {
+ scriptOptsUsage();
+ } else if (option == QLatin1String("play")) {
+ scriptOptions |= QDeclarativeViewer::Play;
+ } else if (option == QLatin1String("record")) {
+ scriptOptions |= QDeclarativeViewer::Record;
+ } else if (option == QLatin1String("testimages")) {
+ scriptOptions |= QDeclarativeViewer::TestImages;
+ } else if (option == QLatin1String("testerror")) {
+ scriptOptions |= QDeclarativeViewer::TestErrorProperty;
+ } else if (option == QLatin1String("exitoncomplete")) {
+ scriptOptions |= QDeclarativeViewer::ExitOnComplete;
+ } else if (option == QLatin1String("exitonfailure")) {
+ scriptOptions |= QDeclarativeViewer::ExitOnFailure;
+ } else if (option == QLatin1String("saveonexit")) {
+ scriptOptions |= QDeclarativeViewer::SaveOnExit;
+ } else if (option == QLatin1String("snapshot")) {
+ scriptOptions |= QDeclarativeViewer::Snapshot;
+ } else {
+ scriptOptsUsage();
+ }
+ }
+
+ opts.scriptOptions = scriptOptions;
+}
+
+static void parseCommandLineOptions(const QStringList &arguments)
+{
+ for (int i = 1; i < arguments.count(); ++i) {
+ bool lastArg = (i == arguments.count() - 1);
+ QString arg = arguments.at(i);
if (arg == "-frameless") {
- frameless = true;
+ opts.frameless = true;
} else if (arg == "-maximized") {
- maximized = true;
+ opts.maximized = true;
} else if (arg == "-fullscreen") {
- fullScreen = true;
+ opts.fullScreen = true;
} else if (arg == "-stayontop") {
- stayOnTop = true;
+ opts.stayOnTop = true;
} else if (arg == "-netcache") {
if (lastArg) usage();
- cache = QString(argv[++i]).toInt();
+ opts.cache = arguments.at(++i).toInt();
} else if (arg == "-recordrate") {
if (lastArg) usage();
- fps = QString(argv[++i]).toDouble();
+ opts.fps = arguments.at(++i).toDouble();
} else if (arg == "-recordfile") {
if (lastArg) usage();
- recordfile = QString(argv[++i]);
+ opts.recordfile = arguments.at(++i);
} else if (arg == "-record") {
if (lastArg) usage();
- recordargs << QString(argv[++i]);
+ opts.recordargs << arguments.at(++i);
} else if (arg == "-recorddither") {
if (lastArg) usage();
- dither = QString(argv[++i]);
+ opts.dither = arguments.at(++i);
} else if (arg == "-autorecord") {
if (lastArg) usage();
- QString range = QString(argv[++i]);
+ QString range = arguments.at(++i);
int dash = range.indexOf('-');
if (dash > 0)
- autorecord_from = range.left(dash).toInt();
- autorecord_to = range.mid(dash+1).toInt();
+ opts.autorecord_from = range.left(dash).toInt();
+ opts.autorecord_to = range.mid(dash+1).toInt();
} else if (arg == "-devicekeys") {
- devkeys = true;
+ opts.devkeys = true;
} else if (arg == "-dragthreshold") {
if (lastArg) usage();
- app.setStartDragDistance(QString(argv[++i]).toInt());
+ qApp->setStartDragDistance(arguments.at(++i).toInt());
} else if (arg == QLatin1String("-v") || arg == QLatin1String("-version")) {
qWarning("Qt QML Viewer version %s", QT_VERSION_STR);
exit(0);
} else if (arg == "-translation") {
if (lastArg) usage();
- translationFile = argv[++i];
+ opts.translationFile = arguments.at(++i);
} else if (arg == "-opengl") {
- useGL = true;
+ opts.useGL = true;
} else if (arg == "-qmlbrowser") {
- useNativeFileBrowser = false;
+ opts.useNativeFileBrowser = false;
} else if (arg == "-warnings") {
if (lastArg) usage();
- QString warningsStr = QString(argv[++i]);
+ QString warningsStr = arguments.at(++i);
if (warningsStr == QLatin1String("show")) {
- warningsConfig = ShowWarnings;
+ opts.warningsConfig = ShowWarnings;
} else if (warningsStr == QLatin1String("hide")) {
- warningsConfig = HideWarnings;
+ opts.warningsConfig = HideWarnings;
} else {
usage();
}
@@ -316,152 +387,203 @@ int main(int argc, char ** argv)
qWarning("Current search path: %s", paths.toLocal8Bit().constData());
exit(0);
}
- imports << QString(argv[++i]);
+ opts.imports << arguments.at(++i);
} else if (arg == "-P") {
if (lastArg) usage();
- plugins << QString(argv[++i]);
+ opts.plugins << arguments.at(++i);
} else if (arg == "-script") {
if (lastArg) usage();
- script = QString(argv[++i]);
+ opts.script = arguments.at(++i);
} else if (arg == "-scriptopts") {
if (lastArg) usage();
- scriptopts = QString(argv[++i]);
+ opts.scriptopts = arguments.at(++i);
} else if (arg == "-savescript") {
if (lastArg) usage();
- script = QString(argv[++i]);
- runScript = false;
+ opts.script = arguments.at(++i);
+ opts.runScript = false;
} else if (arg == "-playscript") {
if (lastArg) usage();
- script = QString(argv[++i]);
- runScript = true;
+ opts.script = arguments.at(++i);
+ opts.runScript = true;
} else if (arg == "-sizeviewtorootobject") {
- sizeToView = false;
+ opts.sizeToView = false;
} else if (arg == "-sizerootobjecttoview") {
- sizeToView = true;
+ opts.sizeToView = true;
} else if (arg == "-experimentalgestures") {
- experimentalGestures = true;
- } else if (arg[0] != '-') {
- fileName = arg;
- } else if (1 || arg == "-help") {
+ opts.experimentalGestures = true;
+ } else if (!arg.startsWith('-')) {
+ fileNames.append(arg);
+ } else if (true || arg == "-help") {
usage();
}
}
- QTranslator qmlTranslator;
- if (!translationFile.isEmpty()) {
- qmlTranslator.load(translationFile);
- app.installTranslator(&qmlTranslator);
+ if (!opts.scriptopts.isEmpty()) {
+
+ parseScriptOptions();
+
+ if (opts.script.isEmpty())
+ usage();
+
+ if (!(opts.scriptOptions & QDeclarativeViewer::Record) && !(opts.scriptOptions & QDeclarativeViewer::Play))
+ scriptOptsUsage();
+ } else if (!opts.script.isEmpty()) {
+ usage();
}
- Qt::WFlags wflags = (frameless ? Qt::FramelessWindowHint : Qt::Widget);
- if (stayOnTop)
+}
+
+static QDeclarativeViewer *createViewer()
+{
+ Qt::WFlags wflags = (opts.frameless ? Qt::FramelessWindowHint : Qt::Widget);
+ if (opts.stayOnTop)
wflags |= Qt::WindowStaysOnTopHint;
QDeclarativeViewer *viewer = new QDeclarativeViewer(0, wflags);
viewer->setAttribute(Qt::WA_DeleteOnClose, true);
- if (!scriptopts.isEmpty()) {
- QStringList options =
- scriptopts.split(QLatin1Char(','), QString::SkipEmptyParts);
-
- QDeclarativeViewer::ScriptOptions scriptOptions = 0;
- for (int i = 0; i < options.count(); ++i) {
- const QString &option = options.at(i);
- if (option == QLatin1String("help")) {
- scriptOptsUsage();
- } else if (option == QLatin1String("play")) {
- scriptOptions |= QDeclarativeViewer::Play;
- } else if (option == QLatin1String("record")) {
- scriptOptions |= QDeclarativeViewer::Record;
- } else if (option == QLatin1String("testimages")) {
- scriptOptions |= QDeclarativeViewer::TestImages;
- } else if (option == QLatin1String("testerror")) {
- scriptOptions |= QDeclarativeViewer::TestErrorProperty;
- } else if (option == QLatin1String("exitoncomplete")) {
- scriptOptions |= QDeclarativeViewer::ExitOnComplete;
- } else if (option == QLatin1String("exitonfailure")) {
- scriptOptions |= QDeclarativeViewer::ExitOnFailure;
- } else if (option == QLatin1String("saveonexit")) {
- scriptOptions |= QDeclarativeViewer::SaveOnExit;
- } else if (option == QLatin1String("snapshot")) {
- scriptOptions |= QDeclarativeViewer::Snapshot;
- } else {
- scriptOptsUsage();
- }
- }
-
- if (script.isEmpty())
- usage();
- if (!(scriptOptions & QDeclarativeViewer::Record) && !(scriptOptions & QDeclarativeViewer::Play))
- scriptOptsUsage();
- viewer->setScriptOptions(scriptOptions);
- viewer->setScript(script);
- } else if (!script.isEmpty()) {
- usage();
+ if (!opts.scriptopts.isEmpty()) {
+ viewer->setScriptOptions(opts.scriptOptions);
+ viewer->setScript(opts.script);
}
#if !defined(Q_OS_SYMBIAN)
logger = viewer->warningsWidget();
- if (warningsConfig == ShowWarnings) {
+ if (opts.warningsConfig == ShowWarnings) {
logger.data()->setDefaultVisibility(LoggerWidget::ShowWarnings);
logger.data()->show();
- } else if (warningsConfig == HideWarnings){
+ } else if (opts.warningsConfig == HideWarnings){
logger.data()->setDefaultVisibility(LoggerWidget::HideWarnings);
}
#endif
- if (experimentalGestures)
+ if (opts.experimentalGestures)
viewer->enableExperimentalGestures();
- foreach (QString lib, imports)
+ foreach (QString lib, opts.imports)
viewer->addLibraryPath(lib);
- foreach (QString plugin, plugins)
+ foreach (QString plugin, opts.plugins)
viewer->addPluginPath(plugin);
- viewer->setNetworkCacheSize(cache);
- viewer->setRecordFile(recordfile);
- viewer->setSizeToView(sizeToView);
- if (fps>0)
- viewer->setRecordRate(fps);
- if (autorecord_to)
- viewer->setAutoRecord(autorecord_from,autorecord_to);
- if (devkeys)
+ viewer->setNetworkCacheSize(opts.cache);
+ viewer->setRecordFile(opts.recordfile);
+ viewer->setSizeToView(opts.sizeToView);
+ if (opts.fps > 0)
+ viewer->setRecordRate(opts.fps);
+ if (opts.autorecord_to)
+ viewer->setAutoRecord(opts.autorecord_from, opts.autorecord_to);
+ if (opts.devkeys)
viewer->setDeviceKeys(true);
- viewer->setRecordDither(dither);
- if (recordargs.count())
- viewer->setRecordArgs(recordargs);
+ viewer->setRecordDither(opts.dither);
+ if (opts.recordargs.count())
+ viewer->setRecordArgs(opts.recordargs);
+
+ viewer->setUseNativeFileBrowser(opts.useNativeFileBrowser);
- viewer->setUseNativeFileBrowser(useNativeFileBrowser);
- if (fullScreen && maximized)
+ return viewer;
+}
+
+void showViewer(QDeclarativeViewer *viewer)
+{
+ if (opts.fullScreen)
+ viewer->showFullScreen();
+ else if (opts.maximized)
+ viewer->showMaximized();
+ else
+ viewer->show();
+
+ viewer->setUseGL(opts.useGL);
+ viewer->raise();
+}
+
+QDeclarativeViewer *openFile(const QString &fileName)
+{
+ QDeclarativeViewer *viewer = globalViewer;
+
+ viewer->open(fileName);
+ showViewer(viewer);
+
+ return viewer;
+}
+
+int main(int argc, char ** argv)
+{
+#if defined (Q_OS_SYMBIAN)
+ qInstallMsgHandler(myMessageOutput);
+#else
+ systemMsgOutput = qInstallMsgHandler(myMessageOutput);
+#endif
+
+#if defined (Q_OS_WIN)
+ // Debugging output is not visible by default on Windows -
+ // therefore show modal dialog with errors instad.
+ atexit(showWarnings);
+#endif
+
+#if defined (Q_WS_X11) || defined (Q_WS_MAC)
+ //### default to using raster graphics backend for now
+ bool gsSpecified = false;
+ for (int i = 0; i < argc; ++i) {
+ QString arg = argv[i];
+ if (arg == "-graphicssystem") {
+ gsSpecified = true;
+ break;
+ }
+ }
+
+ if (!gsSpecified)
+ QApplication::setGraphicsSystem("raster");
+#endif
+
+ Application app(argc, argv);
+ app.setApplicationName("QtQmlViewer");
+ app.setOrganizationName("Nokia");
+ app.setOrganizationDomain("nokia.com");
+
+ QDeclarativeViewer::registerTypes();
+ QDeclarativeTester::registerTypes();
+
+ parseCommandLineOptions(app.arguments());
+
+ QTranslator qmlTranslator;
+ if (!opts.translationFile.isEmpty()) {
+ qmlTranslator.load(opts.translationFile);
+ app.installTranslator(&qmlTranslator);
+ }
+
+ if (opts.fullScreen && opts.maximized)
qWarning() << "Both -fullscreen and -maximized specified. Using -fullscreen.";
- if (fileName.isEmpty()) {
+ if (fileNames.isEmpty()) {
QFile qmlapp(QLatin1String("qmlapp"));
if (qmlapp.exists() && qmlapp.open(QFile::ReadOnly)) {
- QString content = QString::fromUtf8(qmlapp.readAll());
- qmlapp.close();
-
- int newline = content.indexOf(QLatin1Char('\n'));
- if (newline >= 0)
- fileName = content.left(newline);
- else
- fileName = content;
- }
+ QString content = QString::fromUtf8(qmlapp.readAll());
+ qmlapp.close();
+
+ int newline = content.indexOf(QLatin1Char('\n'));
+ if (newline >= 0)
+ fileNames += content.left(newline);
+ else
+ fileNames += content;
+ }
}
- if (!fileName.isEmpty()) {
- viewer->open(fileName);
- fullScreen ? viewer->showFullScreen() : maximized ? viewer->showMaximized() : viewer->show();
+ globalViewer = createViewer();
+
+ if (fileNames.isEmpty()) {
+ // show the initial viewer delayed.
+ // This prevents an initial viewer popping up while there
+ // are FileOpen events coming through the event queue
+ QTimer::singleShot(1, &app, SLOT(showInitialViewer()));
} else {
- if (!useNativeFileBrowser)
- viewer->openFile();
- fullScreen ? viewer->showFullScreen() : maximized ? viewer->showMaximized() : viewer->show();
- if (useNativeFileBrowser)
- viewer->openFile();
+ foreach (const QString &fileName, fileNames)
+ openFile(fileName);
}
- viewer->setUseGL(useGL);
- viewer->raise();
+
+ QObject::connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()));
return app.exec();
}
+
+#include "main.moc"
diff --git a/tools/qml/qml.pri b/tools/qml/qml.pri
index fcd0c33f88..e5b2c7fb32 100644
--- a/tools/qml/qml.pri
+++ b/tools/qml/qml.pri
@@ -16,17 +16,19 @@ SOURCES += $$PWD/qmlruntime.cpp \
$$PWD/qdeclarativetester.cpp \
$$PWD/loggerwidget.cpp
-RESOURCES = $$PWD/qmlruntime.qrc
-maemo5 {
+RESOURCES = $$PWD/browser/browser.qrc \
+ $$PWD/startup/startup.qrc
+
+symbian:!contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) {
+ SOURCES += $$PWD/deviceorientation_symbian.cpp
+ FORMS = $$PWD/recopts.ui \
+ $$PWD/proxysettings.ui
+} else:maemo5 {
QT += dbus
HEADERS += $$PWD/texteditautoresizer_maemo5.h
SOURCES += $$PWD/deviceorientation_maemo5.cpp
FORMS = $$PWD/recopts_maemo5.ui \
$$PWD/proxysettings_maemo5.ui
-} symbian:!contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) {
- SOURCES += $$PWD/deviceorientation_symbian.cpp
- FORMS = $$PWD/recopts.ui \
- $$PWD/proxysettings.ui
} else {
SOURCES += $$PWD/deviceorientation.cpp
FORMS = $$PWD/recopts.ui \
diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro
index bb69e8a63e..efb82d1db6 100644
--- a/tools/qml/qml.pro
+++ b/tools/qml/qml.pro
@@ -40,6 +40,9 @@ symbian {
!contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) {
LIBS += -lsensrvclient -lsensrvutil
}
+ contains(QT_CONFIG, s60): {
+ LIBS += -lavkon -lcone
+ }
}
mac {
QMAKE_INFO_PLIST=Info_mac.plist
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index 951b187811..b9fd570f23 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -98,10 +98,57 @@
#include <QGLWidget>
#endif
+#if defined(Q_WS_S60)
+#include <aknappui.h> // For locking app orientation
+#endif
+
#include <qdeclarativetester.h>
QT_BEGIN_NAMESPACE
+class DragAndDropView : public QDeclarativeView
+{
+ Q_OBJECT
+public:
+ DragAndDropView(QDeclarativeViewer *parent = 0)
+ : QDeclarativeView(parent)
+ {
+ setAcceptDrops(true);
+ }
+
+ void dragEnterEvent(QDragEnterEvent *event)
+ {
+ const QMimeData *mimeData = event->mimeData();
+ if (mimeData->hasUrls())
+ event->acceptProposedAction();
+ }
+
+ void dragMoveEvent(QDragMoveEvent *event)
+ {
+ event->acceptProposedAction();
+ }
+
+ void dragLeaveEvent(QDragLeaveEvent *event)
+ {
+ event->accept();
+ }
+
+ void dropEvent(QDropEvent *event)
+ {
+ const QMimeData *mimeData = event->mimeData();
+ if (!mimeData->hasUrls())
+ return;
+ const QList<QUrl> urlList = mimeData->urls();
+ foreach (const QUrl &url, urlList) {
+ if (url.scheme() == QLatin1String("file")) {
+ static_cast<QDeclarativeViewer *>(parent())->open(url.toLocalFile());
+ event->accept();
+ return;
+ }
+ }
+ }
+};
+
class Runtime : public QObject
{
Q_OBJECT
@@ -557,6 +604,7 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
: QMainWindow(parent, flags)
, loggerWindow(new LoggerWidget(this))
, frame_stream(0)
+ , rotateAction(0)
, orientation(0)
, showWarningsWindow(0)
, m_scriptOptions(0)
@@ -596,7 +644,7 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
recdlg->warning->hide();
}
- canvas = new QDeclarativeView(this);
+ canvas = new DragAndDropView(this);
canvas->setAttribute(Qt::WA_OpaquePaintEvent);
canvas->setAttribute(Qt::WA_NoSystemBackground);
@@ -605,7 +653,7 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
QObject::connect(canvas, SIGNAL(sceneResized(QSize)), this, SLOT(sceneResized(QSize)));
QObject::connect(canvas, SIGNAL(statusChanged(QDeclarativeView::Status)), this, SLOT(statusChanged()));
- QObject::connect(canvas->engine(), SIGNAL(quit()), QCoreApplication::instance (), SLOT(quit()));
+ QObject::connect(canvas->engine(), SIGNAL(quit()), this, SLOT(close()));
QObject::connect(warningsWidget(), SIGNAL(opened()), this, SLOT(warningsWidgetOpened()));
QObject::connect(warningsWidget(), SIGNAL(closed()), this, SLOT(warningsWidgetClosed()));
@@ -664,11 +712,11 @@ LoggerWidget *QDeclarativeViewer::warningsWidget() const
void QDeclarativeViewer::createMenu()
{
QAction *openAction = new QAction(tr("&Open..."), this);
- openAction->setShortcut(QKeySequence("Ctrl+O"));
+ openAction->setShortcuts(QKeySequence::Open);
connect(openAction, SIGNAL(triggered()), this, SLOT(openFile()));
QAction *reloadAction = new QAction(tr("&Reload"), this);
- reloadAction->setShortcut(QKeySequence("Ctrl+R"));
+ reloadAction->setShortcuts(QKeySequence::Refresh);
connect(reloadAction, SIGNAL(triggered()), this, SLOT(reload()));
QAction *snapshotAction = new QAction(tr("&Take Snapshot"), this);
@@ -699,28 +747,40 @@ void QDeclarativeViewer::createMenu()
fullscreenAction->setCheckable(true);
connect(fullscreenAction, SIGNAL(triggered()), this, SLOT(toggleFullScreen()));
- QAction *rotateOrientation = new QAction(tr("Rotate orientation"), this);
- rotateOrientation->setShortcut(QKeySequence("Ctrl+T"));
- connect(rotateOrientation, SIGNAL(triggered()), this, SLOT(rotateOrientation()));
+ rotateAction = new QAction(tr("Rotate orientation"), this);
+ rotateAction->setShortcut(QKeySequence("Ctrl+T"));
+ connect(rotateAction, SIGNAL(triggered()), this, SLOT(rotateOrientation()));
orientation = new QActionGroup(this);
orientation->setExclusive(true);
connect(orientation, SIGNAL(triggered(QAction*)), this, SLOT(changeOrientation(QAction*)));
+#if defined(Q_OS_SYMBIAN)
+ QAction *autoOrientationAction = new QAction(tr("Auto-orientation"), this);
+ autoOrientationAction->setCheckable(true);
+#endif
QAction *portraitAction = new QAction(tr("Portrait"), this);
portraitAction->setCheckable(true);
QAction *landscapeAction = new QAction(tr("Landscape"), this);
landscapeAction->setCheckable(true);
+#if !defined(Q_OS_SYMBIAN)
QAction *portraitInvAction = new QAction(tr("Portrait (inverted)"), this);
portraitInvAction->setCheckable(true);
QAction *landscapeInvAction = new QAction(tr("Landscape (inverted)"), this);
landscapeInvAction->setCheckable(true);
+#endif
QAction *aboutAction = new QAction(tr("&About Qt..."), this);
+ aboutAction->setMenuRole(QAction::AboutQtRole);
connect(aboutAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+ QAction *closeAction = new QAction(tr("&Close"), this);
+ closeAction->setShortcuts(QKeySequence::Close);
+ connect(closeAction, SIGNAL(triggered()), this, SLOT(close()));
+
QAction *quitAction = new QAction(tr("&Quit"), this);
- quitAction->setShortcut(QKeySequence("Ctrl+Q"));
+ quitAction->setMenuRole(QAction::QuitRole);
+ quitAction->setShortcuts(QKeySequence::Quit);
connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
QMenuBar *menu = menuBar();
@@ -751,9 +811,10 @@ void QDeclarativeViewer::createMenu()
fileMenu->addAction(openAction);
fileMenu->addAction(reloadAction);
fileMenu->addSeparator();
+ fileMenu->addAction(closeAction);
+#if !defined(Q_OS_SYMBIAN)
fileMenu->addAction(quitAction);
-#if !defined(Q_OS_SYMBIAN)
QMenu *recordMenu = menu->addMenu(tr("&Recording"));
recordMenu->addAction(snapshotAction);
recordMenu->addAction(recordAction);
@@ -763,22 +824,27 @@ void QDeclarativeViewer::createMenu()
debugMenu->addAction(showWarningsWindow);
#endif // ! Q_OS_SYMBIAN
- QMenu *settingsMenu = menu->addMenu(tr("S&ettings"));
+ QMenu *settingsMenu = menu->addMenu(tr("&Settings"));
settingsMenu->addAction(proxyAction);
-#if !defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_SYMBIAN)
+ settingsMenu->addAction(fullscreenAction);
+#else
settingsMenu->addAction(recordOptions);
settingsMenu->addMenu(loggerWindow->preferencesMenu());
-#else // ! Q_OS_SYMBIAN
- settingsMenu->addAction(fullscreenAction);
-#endif // Q_OS_SYMBIAN
- settingsMenu->addAction(rotateOrientation);
+#endif // !Q_OS_SYMBIAN
+ settingsMenu->addAction(rotateAction);
QMenu *propertiesMenu = settingsMenu->addMenu(tr("Properties"));
+#if defined(Q_OS_SYMBIAN)
+ orientation->addAction(autoOrientationAction);
+#endif
orientation->addAction(portraitAction);
orientation->addAction(landscapeAction);
+#if !defined(Q_OS_SYMBIAN)
orientation->addAction(portraitInvAction);
orientation->addAction(landscapeInvAction);
+#endif
propertiesMenu->addActions(orientation->actions());
QMenu *helpMenu = menu->addMenu(tr("&Help"));
@@ -802,6 +868,23 @@ void QDeclarativeViewer::proxySettingsChanged()
void QDeclarativeViewer::rotateOrientation()
{
+#if defined(Q_WS_S60)
+ CAknAppUi *appUi = static_cast<CAknAppUi *>(CEikonEnv::Static()->AppUi());
+ if (appUi) {
+ CAknAppUi::TAppUiOrientation oldOrientation = appUi->Orientation();
+ QString newOrientation;
+ if (oldOrientation == CAknAppUi::EAppUiOrientationPortrait) {
+ newOrientation = QLatin1String("Landscape");
+ } else {
+ newOrientation = QLatin1String("Portrait");
+ }
+ foreach (QAction *action, orientation->actions()) {
+ if (action->text() == newOrientation) {
+ changeOrientation(action);
+ }
+ }
+ }
+#else
QAction *current = orientation->checkedAction();
QList<QAction *> actions = orientation->actions();
int index = actions.indexOf(current);
@@ -810,6 +893,7 @@ void QDeclarativeViewer::rotateOrientation()
QAction *newOrientation = actions[(index + 1) % actions.count()];
changeOrientation(newOrientation);
+#endif
}
void QDeclarativeViewer::toggleFullScreen()
@@ -927,7 +1011,7 @@ void QDeclarativeViewer::openFile()
{
QString cur = canvas->source().toLocalFile();
if (useQmlFileBrowser) {
- open("qrc:/content/Browser.qml");
+ open("qrc:/browser/Browser.qml");
} else {
QString fileName = QFileDialog::getOpenFileName(this, tr("Open QML file"), cur, tr("QML Files (*.qml)"));
if (!fileName.isEmpty()) {
@@ -1319,9 +1403,24 @@ void QDeclarativeViewer::changeOrientation(QAction *action)
{
if (!action)
return;
- action->setChecked(true);
-
QString o = action->text();
+ action->setChecked(true);
+#if defined(Q_WS_S60)
+ CAknAppUi *appUi = static_cast<CAknAppUi *>(CEikonEnv::Static()->AppUi());
+ if (appUi) {
+ CAknAppUi::TAppUiOrientation orientation = appUi->Orientation();
+ if (o == QLatin1String("Auto-orientation")) {
+ appUi->SetOrientationL(CAknAppUi::EAppUiOrientationAutomatic);
+ rotateAction->setVisible(false);
+ } else if (o == QLatin1String("Portrait")) {
+ appUi->SetOrientationL(CAknAppUi::EAppUiOrientationPortrait);
+ rotateAction->setVisible(true);
+ } else if (o == QLatin1String("Landscape")) {
+ appUi->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape);
+ rotateAction->setVisible(true);
+ }
+ }
+#else
if (o == QLatin1String("Portrait"))
DeviceOrientation::instance()->setOrientation(DeviceOrientation::Portrait);
else if (o == QLatin1String("Landscape"))
@@ -1330,6 +1429,7 @@ void QDeclarativeViewer::changeOrientation(QAction *action)
DeviceOrientation::instance()->setOrientation(DeviceOrientation::PortraitInverted);
else if (o == QLatin1String("Landscape (inverted)"))
DeviceOrientation::instance()->setOrientation(DeviceOrientation::LandscapeInverted);
+#endif
}
void QDeclarativeViewer::orientationChanged()
diff --git a/tools/qml/qmlruntime.h b/tools/qml/qmlruntime.h
index 68d3452a2d..6fa7d81c55 100644
--- a/tools/qml/qmlruntime.h
+++ b/tools/qml/qmlruntime.h
@@ -105,6 +105,7 @@ public:
QDeclarativeView *view() const;
LoggerWidget *warningsWidget() const;
+ QString currentFile() const { return currentFileOrUrl; }
void enableExperimentalGestures();
@@ -169,8 +170,6 @@ private:
int record_autotime;
bool devicemode;
QAction *recordAction;
- QString currentSkin;
- bool scaleSkin;
RecordingDialog *recdlg;
void senseImageMagick();
@@ -179,6 +178,7 @@ private:
bool ffmpegAvailable;
bool convertAvailable;
+ QAction *rotateAction;
QActionGroup *orientation;
QAction *showWarningsWindow;
diff --git a/tools/qml/qmlruntime.qrc b/tools/qml/qmlruntime.qrc
deleted file mode 100644
index 3a9e6080e3..0000000000
--- a/tools/qml/qmlruntime.qrc
+++ /dev/null
@@ -1,9 +0,0 @@
-<RCC>
- <qresource prefix="/" >
- <file>content/Browser.qml</file>
- <file>content/images/up.png</file>
- <file>content/images/folder.png</file>
- <file>content/images/titlebar.sci</file>
- <file>content/images/titlebar.png</file>
- </qresource>
-</RCC>
diff --git a/tools/qml/startup/Logo.qml b/tools/qml/startup/Logo.qml
new file mode 100644
index 0000000000..8d9708d437
--- /dev/null
+++ b/tools/qml/startup/Logo.qml
@@ -0,0 +1,179 @@
+/****************************************************************************
+**
+** 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 {
+ id: myApp
+ width: 411
+ height: 411
+ color: "transparent"
+ property alias logoState : myApp.state
+ signal animationFinished
+
+ Item {
+ id: sketchBlueHolder
+ width: sketchLogo.width
+ height: sketchLogo.height
+ Image {
+ id: image1
+ x: -44
+ y: -45
+ smooth: true
+ source: "shadow.png"
+ }
+ Item {
+ clip: true
+ width: sketchLogo.width
+ height: sketchLogo.height
+ Image {
+ id: sketchLogo
+ smooth: true
+ source: "qt-sketch.jpg"
+ }
+ Image {
+ id: blueLogo
+ y: -420
+ smooth: true
+ source: "qt-blue.jpg"
+ }
+ }
+ }
+
+ states: [
+ State {
+ name: "showBlueprint"
+ PropertyChanges {
+ target: blueLogo
+ y: 0
+ }
+ PropertyChanges {
+ target: sketchLogo
+ opacity: 0
+ }
+ },
+ State {
+ extend: "showBlueprint"
+ name: "finale"
+ PropertyChanges {
+ target: fullLogo
+ opacity: 1
+ }
+ PropertyChanges {
+ target: backLogo
+ opacity: 1
+ scale: 1
+ }
+ PropertyChanges {
+ target: frontLogo
+ opacity: 1
+ scale: 1
+ }
+ PropertyChanges {
+ target: qtText
+ opacity: 1
+ scale: 1
+ }
+ PropertyChanges {
+ target: sketchBlueHolder
+ opacity: 0
+ scale: 1.4
+ }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ to: "showBlueprint"
+ SequentialAnimation {
+ NumberAnimation { property: "y"; duration: 600; easing.type: "OutBounce" }
+ PropertyAction { target: sketchLogo; property: "opacity" }
+ }
+ },
+ Transition {
+ to: "finale"
+ PropertyAction { target: fullLogo; property: "opacity" }
+ SequentialAnimation {
+ NumberAnimation { target: backLogo; properties: "scale, opacity"; duration: 300 }
+ NumberAnimation { target: frontLogo; properties: "scale, opacity"; duration: 300 }
+ ParallelAnimation {
+ NumberAnimation { target: qtText; properties: "opacity, scale"; duration: 400; easing.type: "OutQuad" }
+ NumberAnimation { target: sketchBlueHolder; property: "opacity"; duration: 300; easing.type: "OutQuad" }
+ NumberAnimation { target: sketchBlueHolder; property: "scale"; duration: 320; easing.type: "OutQuad" }
+ }
+ PauseAnimation { duration: 1000 }
+ ScriptAction { script: myApp.animationFinished() }
+ }
+ }
+ ]
+
+ Item {
+ id: fullLogo
+ opacity: 0
+ Image {
+ id: backLogo
+ x: -16
+ y: -41
+ opacity: 0
+ scale: 0.7
+ smooth: true
+ source: "qt-back.png"
+ }
+ Image {
+ id: frontLogo
+ x: -17
+ y: -41
+ opacity: 0
+ scale: 1.2
+ smooth: true
+ source: "qt-front.png"
+ }
+ Image {
+ id: qtText
+ x: -10
+ y: -41
+ opacity: 0
+ scale: 1.2
+ smooth: true
+ source: "qt-text.png"
+ }
+ }
+}
diff --git a/tools/qml/startup/qt-back.png b/tools/qml/startup/qt-back.png
new file mode 100644
index 0000000000..077215f882
--- /dev/null
+++ b/tools/qml/startup/qt-back.png
Binary files differ
diff --git a/tools/qml/startup/qt-blue.jpg b/tools/qml/startup/qt-blue.jpg
new file mode 100644
index 0000000000..b204896483
--- /dev/null
+++ b/tools/qml/startup/qt-blue.jpg
Binary files differ
diff --git a/tools/qml/startup/qt-front.png b/tools/qml/startup/qt-front.png
new file mode 100644
index 0000000000..dbfb43e374
--- /dev/null
+++ b/tools/qml/startup/qt-front.png
Binary files differ
diff --git a/tools/qml/startup/qt-sketch.jpg b/tools/qml/startup/qt-sketch.jpg
new file mode 100644
index 0000000000..1ede6f079b
--- /dev/null
+++ b/tools/qml/startup/qt-sketch.jpg
Binary files differ
diff --git a/tools/qml/startup/qt-text.png b/tools/qml/startup/qt-text.png
new file mode 100644
index 0000000000..d44995c9b3
--- /dev/null
+++ b/tools/qml/startup/qt-text.png
Binary files differ
diff --git a/tools/qml/startup/quick-blur.png b/tools/qml/startup/quick-blur.png
new file mode 100644
index 0000000000..29ec243387
--- /dev/null
+++ b/tools/qml/startup/quick-blur.png
Binary files differ
diff --git a/tools/qml/startup/quick-regular.png b/tools/qml/startup/quick-regular.png
new file mode 100644
index 0000000000..38321cbf19
--- /dev/null
+++ b/tools/qml/startup/quick-regular.png
Binary files differ
diff --git a/tools/qml/startup/shadow.png b/tools/qml/startup/shadow.png
new file mode 100644
index 0000000000..44f92fee73
--- /dev/null
+++ b/tools/qml/startup/shadow.png
Binary files differ
diff --git a/tools/qml/startup/startup.qml b/tools/qml/startup/startup.qml
new file mode 100644
index 0000000000..be675980f5
--- /dev/null
+++ b/tools/qml/startup/startup.qml
@@ -0,0 +1,167 @@
+/****************************************************************************
+**
+** 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 {
+ id: treatsApp
+ width: 800
+ height: 480
+ color: "darkgrey"
+ Component.onCompleted: treatsApp.state = "part1"
+ signal animationFinished
+
+ Logo {
+ id: logo
+ x: 165
+ y: 35
+ rotation: -15
+ scale: 0.6
+ opacity: 0
+ onAnimationFinished: treatsApp.animationFinished();
+ }
+
+ states: [
+ State {
+ name: "part1"
+ PropertyChanges {
+ target: logo
+ scale: 0.8
+ opacity: 1
+ rotation: 0
+ }
+ PropertyChanges {
+ target: treatsApp
+ color: "black"
+ }
+ PropertyChanges {
+ target: logo
+ y: 10
+ }
+ PropertyChanges {
+ target: quickblur
+ x: logo.x + 145
+ }
+ PropertyChanges {
+ target: blurText
+ opacity: 0
+ }
+ PropertyChanges {
+ target: quickregular
+ opacity: 1
+ }
+ PropertyChanges {
+ target: star
+ x: -7
+ y: -37
+ }
+ }
+ ]
+
+
+ Item {
+ id: quickblur
+ x: 800//325
+ y: 344
+ Image {
+ id: blurText
+ source: "quick-blur.png"
+ }
+ Image {
+ id: quickregular
+ x: -1
+ y: 0
+ opacity: 0
+ source: "quick-regular.png"
+ }
+ Image {
+ id: star
+ x: -1
+ y: 0
+ opacity: 0
+ source: "white-star.png"
+ smooth: true
+ NumberAnimation on rotation {
+ from: 0
+ to: 360
+ loops: NumberAnimation.Infinite
+ running: true
+ duration: 2000
+ }
+ }
+ }
+
+ transitions: [
+ Transition {
+ ParallelAnimation {
+ NumberAnimation { target: logo; property: "opacity"; duration: 500 }
+ NumberAnimation { target: logo; property: "scale"; duration: 4000; }
+ NumberAnimation { target: logo; property: "rotation"; duration: 2000; easing.type: "OutBack"}
+ ColorAnimation { duration: 3000}
+ SequentialAnimation {
+ PauseAnimation { duration: 1000 }
+ ScriptAction { script: logo.logoState = "showBlueprint" }
+ PauseAnimation { duration: 800 }
+ ScriptAction { script: logo.logoState = "finale" }
+ PauseAnimation { duration: 800 }
+ ParallelAnimation {
+ NumberAnimation { target: quickblur; property: "x"; duration: 200;}
+ SequentialAnimation {
+ PauseAnimation { duration: 200}
+ ParallelAnimation {
+ NumberAnimation { target: blurText; property: "opacity"; duration: 300;}
+ NumberAnimation { target: quickregular; property: "opacity"; duration: 300;}
+ }
+ NumberAnimation { target: star; property: "opacity"; from: 0; to: 1; duration: 500 }
+ PauseAnimation { duration: 200 }
+ NumberAnimation { target: star; property: "opacity"; from: 1; to: 0; duration: 500 }
+ }
+ SequentialAnimation {
+ PauseAnimation { duration: 150}
+ NumberAnimation { target: logo; property: "y"; duration: 300; easing.type: "OutBounce" }
+ }
+ }
+ }
+ }
+ }
+ ]
+
+} // treatsApp
diff --git a/tools/qml/startup/startup.qrc b/tools/qml/startup/startup.qrc
new file mode 100644
index 0000000000..52e67050d9
--- /dev/null
+++ b/tools/qml/startup/startup.qrc
@@ -0,0 +1,16 @@
+<RCC>
+ <qresource prefix="/startup">
+ <file>Logo.qml</file>
+ <file>qt-back.png</file>
+ <file>qt-blue.jpg</file>
+ <file>qt-front.png</file>
+ <file>qt-sketch.jpg</file>
+ <file>qt-text.png</file>
+ <file>quick-blur.png</file>
+ <file>quick-regular.png</file>
+ <file>shadow.png</file>
+ <file>startup.qml</file>
+ <file>startup.qrc</file>
+ <file>white-star.png</file>
+ </qresource>
+</RCC>
diff --git a/tools/qml/startup/white-star.png b/tools/qml/startup/white-star.png
new file mode 100644
index 0000000000..f467c9480e
--- /dev/null
+++ b/tools/qml/startup/white-star.png
Binary files differ
diff --git a/tools/qtconfig/translations/translations.pro b/tools/qtconfig/translations/translations.pro
deleted file mode 100644
index 5d35b6aac9..0000000000
--- a/tools/qtconfig/translations/translations.pro
+++ /dev/null
@@ -1,16 +0,0 @@
-# Include those manually as they do not contain any directory specification
-
-SOURCES += ../colorbutton.cpp ../main.cpp ../previewframe.cpp ../previewwidget.cpp ../mainwindow.cpp ../paletteeditoradvanced.cpp \
- ../mainwindowbase.cpp ../paletteeditoradvancedbase.cpp ../previewwidgetbase.cpp
-HEADERS += ../colorbutton.h ../previewframe.h ../previewwidget.h ../mainwindow.h ../paletteeditoradvanced.h \
- ../mainwindowbase.h ../paletteeditoradvancedbase.h ../previewwidgetbase.h
-
-FORMS = ../mainwindowbase.ui ../paletteeditoradvancedbase.ui ../previewwidgetbase.ui
-
-TR_DIR = $$PWD/../../../translations
-TRANSLATIONS = \
- $$TR_DIR/qtconfig_hu.ts \
- $$TR_DIR/qtconfig_pl.ts \
- $$TR_DIR/qtconfig_ru.ts \
- $$TR_DIR/qtconfig_zh_CN.ts \
- $$TR_DIR/qtconfig_zh_TW.ts
diff --git a/tools/qtestlib/chart/3rdparty/excanvas.js b/tools/qtestlib/chart/3rdparty/excanvas.js
deleted file mode 100644
index e77763a04a..0000000000
--- a/tools/qtestlib/chart/3rdparty/excanvas.js
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2006 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-if(!window.CanvasRenderingContext2D){(function(){var N=Math;var O=N.round;var L=N.sin;var U=N.cos;var A=10;var I=A/2;var G={init:function(W){var X=W||document;if(/MSIE/.test(navigator.userAgent)&&!window.opera){var V=this;X.attachEvent("onreadystatechange",function(){V.init_(X)})}},init_:function(Y){if(Y.readyState=="complete"){if(!Y.namespaces.g_vml_){Y.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml")}var X=Y.createStyleSheet();X.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}";var W=Y.getElementsByTagName("canvas");for(var V=0;V<W.length;V++){if(!W[V].getContext){this.initElement(W[V])}}}},fixElement_:function(X){var Z=X.outerHTML;var Y=X.ownerDocument.createElement(Z);if(Z.slice(-2)!="/>"){var V="/"+X.tagName;var W;while((W=X.nextSibling)&&W.tagName!=V){W.removeNode()}if(W){W.removeNode()}}X.parentNode.replaceChild(Y,X);return Y},initElement:function(W){W=this.fixElement_(W);W.getContext=function(){if(this.context_){return this.context_}return this.context_=new J(this)};W.attachEvent("onpropertychange",T);W.attachEvent("onresize",B);var V=W.attributes;if(V.width&&V.width.specified){W.style.width=V.width.nodeValue+"px"}else{W.width=W.clientWidth}if(V.height&&V.height.specified){W.style.height=V.height.nodeValue+"px"}else{W.height=W.clientHeight}return W}};function T(W){var V=W.srcElement;switch(W.propertyName){case"width":V.style.width=V.attributes.width.nodeValue+"px";V.getContext().clearRect();break;case"height":V.style.height=V.attributes.height.nodeValue+"px";V.getContext().clearRect();break}}function B(W){var V=W.srcElement;if(V.firstChild){V.firstChild.style.width=V.clientWidth+"px";V.firstChild.style.height=V.clientHeight+"px"}}G.init();var D=[];for(var R=0;R<16;R++){for(var Q=0;Q<16;Q++){D[R*16+Q]=R.toString(16)+Q.toString(16)}}function K(){return[[1,0,0],[0,1,0],[0,0,1]]}function E(Y,X){var W=K();for(var V=0;V<3;V++){for(var b=0;b<3;b++){var Z=0;for(var a=0;a<3;a++){Z+=Y[V][a]*X[a][b]}W[V][b]=Z}}return W}function P(W,V){V.fillStyle=W.fillStyle;V.lineCap=W.lineCap;V.lineJoin=W.lineJoin;V.lineWidth=W.lineWidth;V.miterLimit=W.miterLimit;V.shadowBlur=W.shadowBlur;V.shadowColor=W.shadowColor;V.shadowOffsetX=W.shadowOffsetX;V.shadowOffsetY=W.shadowOffsetY;V.strokeStyle=W.strokeStyle;V.arcScaleX_=W.arcScaleX_;V.arcScaleY_=W.arcScaleY_}function C(W){var Z,Y=1;W=String(W);if(W.substring(0,3)=="rgb"){var b=W.indexOf("(",3);var V=W.indexOf(")",b+1);var a=W.substring(b+1,V).split(",");Z="#";for(var X=0;X<3;X++){Z+=D[Number(a[X])]}if((a.length==4)&&(W.substr(3,1)=="a")){Y=a[3]}}else{Z=W}return[Z,Y]}function M(V){switch(V){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function J(W){this.m_=K();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=A*1;this.globalAlpha=1;this.canvas=W;var V=W.ownerDocument.createElement("div");V.style.width=W.clientWidth+"px";V.style.height=W.clientHeight+"px";V.style.overflow="hidden";V.style.position="absolute";W.appendChild(V);this.element_=V;this.arcScaleX_=1;this.arcScaleY_=1}var H=J.prototype;H.clearRect=function(){this.element_.innerHTML="";this.currentPath_=[]};H.beginPath=function(){this.currentPath_=[]};H.moveTo=function(W,V){this.currentPath_.push({type:"moveTo",x:W,y:V});this.currentX_=W;this.currentY_=V};H.lineTo=function(W,V){this.currentPath_.push({type:"lineTo",x:W,y:V});this.currentX_=W;this.currentY_=V};H.bezierCurveTo=function(X,V,a,Z,Y,W){this.currentPath_.push({type:"bezierCurveTo",cp1x:X,cp1y:V,cp2x:a,cp2y:Z,x:Y,y:W});this.currentX_=Y;this.currentY_=W};H.quadraticCurveTo=function(c,b,a,Z){var W=this.currentX_+2/3*(c-this.currentX_);var V=this.currentY_+2/3*(b-this.currentY_);var Y=W+(a-this.currentX_)/3;var X=V+(Z-this.currentY_)/3;this.bezierCurveTo(W,V,Y,X,a,Z)};H.arc=function(b,Z,a,Y,W,X){a*=A;var f=X?"at":"wa";var c=b+(U(Y)*a)-I;var e=Z+(L(Y)*a)-I;var V=b+(U(W)*a)-I;var d=Z+(L(W)*a)-I;if(c==V&&!X){c+=0.125}this.currentPath_.push({type:f,x:b,y:Z,radius:a,xStart:c,yStart:e,xEnd:V,yEnd:d})};H.rect=function(X,W,V,Y){this.moveTo(X,W);this.lineTo(X+V,W);this.lineTo(X+V,W+Y);this.lineTo(X,W+Y);this.closePath()};H.strokeRect=function(X,W,V,Y){this.beginPath();this.moveTo(X,W);this.lineTo(X+V,W);this.lineTo(X+V,W+Y);this.lineTo(X,W+Y);this.closePath();this.stroke()};H.fillRect=function(X,W,V,Y){this.beginPath();this.moveTo(X,W);this.lineTo(X+V,W);this.lineTo(X+V,W+Y);this.lineTo(X,W+Y);this.closePath();this.fill()};H.createLinearGradient=function(W,Y,V,X){var Z=new S("gradient");return Z};H.createRadialGradient=function(Y,a,X,W,Z,V){var b=new S("gradientradial");b.radius1_=X;b.radius2_=V;b.focus_.x=Y;b.focus_.y=a;return b};H.drawImage=function(n,Y){var f,c,i,u,l,j,p,x;var g=n.runtimeStyle.width;var m=n.runtimeStyle.height;n.runtimeStyle.width="auto";n.runtimeStyle.height="auto";var e=n.width;var s=n.height;n.runtimeStyle.width=g;n.runtimeStyle.height=m;if(arguments.length==3){f=arguments[1];c=arguments[2];l=j=0;p=i=e;x=u=s}else{if(arguments.length==5){f=arguments[1];c=arguments[2];i=arguments[3];u=arguments[4];l=j=0;p=e;x=s}else{if(arguments.length==9){l=arguments[1];j=arguments[2];p=arguments[3];x=arguments[4];f=arguments[5];c=arguments[6];i=arguments[7];u=arguments[8]}else{throw"Invalid number of arguments"}}}var v=this.getCoords_(f,c);var Z=p/2;var X=x/2;var t=[];var V=10;var b=10;t.push(" <g_vml_:group",' coordsize="',A*V,",",A*b,'"',' coordorigin="0,0"',' style="width:',V,";height:",b,";position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]){var a=[];a.push("M11='",this.m_[0][0],"',","M12='",this.m_[1][0],"',","M21='",this.m_[0][1],"',","M22='",this.m_[1][1],"',","Dx='",O(v.x/A),"',","Dy='",O(v.y/A),"'");var r=v;var q=this.getCoords_(f+i,c);var o=this.getCoords_(f,c+u);var k=this.getCoords_(f+i,c+u);r.x=Math.max(r.x,q.x,o.x,k.x);r.y=Math.max(r.y,q.y,o.y,k.y);t.push("padding:0 ",O(r.x/A),"px ",O(r.y/A),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",a.join(""),", sizingmethod='clip');")}else{t.push("top:",O(v.y/A),"px;left:",O(v.x/A),"px;")}t.push(' ">','<g_vml_:image src="',n.src,'"',' style="width:',A*i,";"," height:",A*u,';"',' cropleft="',l/e,'"',' croptop="',j/s,'"',' cropright="',(e-l-p)/e,'"',' cropbottom="',(s-j-x)/s,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",t.join(""))};H.stroke=function(y){var e=[];var d=false;var AB=C(y?this.fillStyle:this.strokeStyle);var u=AB[0];var Y=AB[1]*this.globalAlpha;var X=10;var j=10;e.push("<g_vml_:shape",' fillcolor="',u,'"',' filled="',Boolean(y),'"',' style="position:absolute;width:',X,";height:",j,';"',' coordorigin="0 0" coordsize="',A*X," ",A*j,'"',' stroked="',!y,'"',' strokeweight="',this.lineWidth,'"',' strokecolor="',u,'"',' path="');var h=false;var t={x:null,y:null};var v={x:null,y:null};for(var w=0;w<this.currentPath_.length;w++){var o=this.currentPath_[w];if(o.type=="moveTo"){e.push(" m ");var AA=this.getCoords_(o.x,o.y);e.push(O(AA.x),",",O(AA.y))}else{if(o.type=="lineTo"){e.push(" l ");var AA=this.getCoords_(o.x,o.y);e.push(O(AA.x),",",O(AA.y))}else{if(o.type=="close"){e.push(" x ")}else{if(o.type=="bezierCurveTo"){e.push(" c ");var AA=this.getCoords_(o.x,o.y);var s=this.getCoords_(o.cp1x,o.cp1y);var q=this.getCoords_(o.cp2x,o.cp2y);e.push(O(s.x),",",O(s.y),",",O(q.x),",",O(q.y),",",O(AA.x),",",O(AA.y))}else{if(o.type=="at"||o.type=="wa"){e.push(" ",o.type," ");var AA=this.getCoords_(o.x,o.y);var k=this.getCoords_(o.xStart,o.yStart);var b=this.getCoords_(o.xEnd,o.yEnd);e.push(O(AA.x-this.arcScaleX_*o.radius),",",O(AA.y-this.arcScaleY_*o.radius)," ",O(AA.x+this.arcScaleX_*o.radius),",",O(AA.y+this.arcScaleY_*o.radius)," ",O(k.x),",",O(k.y)," ",O(b.x),",",O(b.y))}}}}}if(AA){if(t.x==null||AA.x<t.x){t.x=AA.x}if(v.x==null||AA.x>v.x){v.x=AA.x}if(t.y==null||AA.y<t.y){t.y=AA.y}if(v.y==null||AA.y>v.y){v.y=AA.y}}}e.push(' ">');if(typeof this.fillStyle=="object"){var n={x:"50%",y:"50%"};var r=(v.x-t.x);var l=(v.y-t.y);var z=(r>l)?r:l;n.x=O((this.fillStyle.focus_.x/r)*100+50)+"%";n.y=O((this.fillStyle.focus_.y/l)*100+50)+"%";var g=[];if(this.fillStyle.type_=="gradientradial"){var x=(this.fillStyle.radius1_/z*100);var m=(this.fillStyle.radius2_/z*100)-x}else{var x=0;var m=100}var V={offset:null,color:null};var Z={offset:null,color:null};this.fillStyle.colors_.sort(function(a,W){return a.offset-W.offset});for(var w=0;w<this.fillStyle.colors_.length;w++){var f=this.fillStyle.colors_[w];g.push((f.offset*m)+x,"% ",f.color,",");if(f.offset>V.offset||V.offset==null){V.offset=f.offset;V.color=f.color}if(f.offset<Z.offset||Z.offset==null){Z.offset=f.offset;Z.color=f.color}}g.pop();e.push("<g_vml_:fill",' color="',Z.color,'"',' color2="',V.color,'"',' type="',this.fillStyle.type_,'"',' focusposition="',n.x,", ",n.y,'"',' colors="',g.join(""),'"',' opacity="',Y,'" />')}else{if(y){e.push('<g_vml_:fill color="',u,'" opacity="',Y,'" />')}else{e.push("<g_vml_:stroke",' opacity="',Y,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',M(this.lineCap),'"',' weight="',this.lineWidth,'px"',' color="',u,'" />')}}e.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",e.join(""))};H.fill=function(){this.stroke(true)};H.closePath=function(){this.currentPath_.push({type:"close"})};H.getCoords_=function(W,V){return{x:A*(W*this.m_[0][0]+V*this.m_[1][0]+this.m_[2][0])-I,y:A*(W*this.m_[0][1]+V*this.m_[1][1]+this.m_[2][1])-I}};H.save=function(){var V={};P(this,V);this.aStack_.push(V);this.mStack_.push(this.m_);this.m_=E(K(),this.m_)};H.restore=function(){P(this.aStack_.pop(),this);this.m_=this.mStack_.pop()};H.translate=function(X,W){var V=[[1,0,0],[0,1,0],[X,W,1]];this.m_=E(V,this.m_)};H.rotate=function(W){var Y=U(W);var X=L(W);var V=[[Y,X,0],[-X,Y,0],[0,0,1]];this.m_=E(V,this.m_)};H.scale=function(X,W){this.arcScaleX_*=X;this.arcScaleY_*=W;var V=[[X,0,0],[0,W,0],[0,0,1]];this.m_=E(V,this.m_)};H.clip=function(){};H.arcTo=function(){};H.createPattern=function(){return new F};function S(V){this.type_=V;this.radius1_=0;this.radius2_=0;this.colors_=[];this.focus_={x:0,y:0}}S.prototype.addColorStop=function(W,V){V=C(V);this.colors_.push({offset:1-W,color:V})};function F(){}G_vmlCanvasManager=G;CanvasRenderingContext2D=J;CanvasGradient=S;CanvasPattern=F})()}; \ No newline at end of file
diff --git a/tools/qtestlib/chart/3rdparty/flotr.js b/tools/qtestlib/chart/3rdparty/flotr.js
deleted file mode 100644
index 80bb506fd3..0000000000
--- a/tools/qtestlib/chart/3rdparty/flotr.js
+++ /dev/null
@@ -1,2 +0,0 @@
-//Flotr 0.1.0alpha Copyright (c) 2008 Bas Wenneker, <http://solutoire.com>, MIT License.
-var Flotr=(function(){var C=0;function L(M){return M.collect(function(N){return(N.data)?Object.clone(N):{data:N}})}function G(P,N){var M=N||{};for(var O in P){M[O]=(typeof (P[O])=="object"&&!(P[O].constructor==Array||P[O].constructor==RegExp))?G(P[O],N[O]):M[O]=P[O]}return M}function I(Q,P,M,N){var T=(M-P)/Q;var S=H(T);var O=T/S;var R=10;if(O<1.5){R=1}else{if(O<2.25){R=2}else{if(O<3){R=2.5}else{if(O<7.5){R=5}}}}if(R==2.5&&N==0){R=2}R*=S;return R}function E(M){return M.toString()}function F(M){return"("+M.x+", "+M.y+")"}function H(M){return Math.pow(10,Math.floor(Math.log(M)/Math.LN10))}function K(O){var M;if((M=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(O))){return new B(parseInt(M[1]),parseInt(M[2]),parseInt(M[3]))}if((M=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(O))){return new B(parseInt(M[1]),parseInt(M[2]),parseInt(M[3]),parseFloat(M[4]))}if((M=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(O))){return new B(parseFloat(M[1])*2.55,parseFloat(M[2])*2.55,parseFloat(M[3])*2.55)}if((M=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(O))){return new B(parseFloat(M[1])*2.55,parseFloat(M[2])*2.55,parseFloat(M[3])*2.55,parseFloat(M[4]))}if((M=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(O))){return new B(parseInt(M[1],16),parseInt(M[2],16),parseInt(M[3],16))}if((M=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(O))){return new B(parseInt(M[1]+M[1],16),parseInt(M[2]+M[2],16),parseInt(M[3]+M[3],16))}var N=O.strip().toLowerCase();if(N=="transparent"){return new B(255,255,255,0)}M=D[N];return new B(M[0],M[1],M[2])}function A(N){var M;do{M=N.getStyle("background-color").toLowerCase();if(M!=""&&M!="transparent"){break}N=N.up(0)}while(N.nodeName.toLowerCase()!="body");if(M=="rgba(0, 0, 0, 0)"){return"transparent"}return M}function B(S,R,N,P){var Q=["r","g","b","a"];var M=4;while(-1<--M){this[Q[M]]=arguments[M]||((M==3)?1:0)}this.toString=function(){return(this.a>=1)?"rgb("+[this.r,this.g,this.b].join(",")+")":"rgba("+[this.r,this.g,this.b,this.a].join(",")+")"};this.scale=function(V,U,W,T){M=4;while(-1<--M){if(arguments[M]!=null){this[Q[M]]*=arguments[M]}}return this.normalize()};this.adjust=function(V,U,W,T){M=4;while(-1<--M){if(arguments[M]!=null){this[Q[M]]+=arguments[M]}}return this.normalize()};this.clone=function(){return new B(this.r,this.b,this.g,this.a)};var O=function(U,T,V){return Math.max(Math.min(U,V),T)};this.normalize=function(){this.r=O(parseInt(this.r),0,255);this.g=O(parseInt(this.g),0,255);this.b=O(parseInt(this.b),0,255);this.a=O(this.a,0,1);return this};this.normalize()}var D={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]};function J(y,AO,p){var o,S,AL,h,AS;var z="flotr-"+C++;var R=L(AO);var N=y;var u={},c={};var l={left:0,right:0,top:0,bottom:0};var AA=0;var d=0;var AH=0;var U=0;var P=0;var AD=0;var AC=0;var AB=0;g(p);k();AN();q();AK(u,o.xaxis);Z();AK(c,o.yaxis);m(u,o.xaxis);m(c,o.yaxis);Y();AP();AQ();this.getCanvas=function(){return S};this.getPlotOffset=function(){return l};this.clearSelection=M;this.setSelection=AF;function g(AV){o=G(AV,{colors:["#00A8F0","#C0D800","#cb4b4b","#4da74d","#9440ed"],legend:{show:true,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:0.85},xaxis:{ticks:null,noTicks:5,tickFormatter:E,tickDecimals:null,min:null,max:null,autoscaleMargin:0},yaxis:{ticks:null,noTicks:5,tickFormatter:E,tickDecimals:null,min:null,max:null,autoscaleMargin:0},points:{show:false,radius:3,lineWidth:2,fill:true,fillColor:"#ffffff"},lines:{show:false,lineWidth:2,fill:false,fillColor:null},bars:{show:false,lineWidth:2,barWidth:1,fill:true,fillColor:null},grid:{color:"#545454",backgroundColor:null,tickColor:"#dddddd",labelMargin:3},selection:{mode:null,color:"#B6D9FF",fps:10},mouse:{track:null,position:"se",trackFormatter:F,margin:3,color:"#ff3f19",trackDecimals:1,sensibility:2,radius:3},shadowSize:4});var Ah=R.length;var AT=[];var AZ=[];for(var Ac=0;Ac<R.length;++Ac){var Ag=R[Ac].color;if(Ag!=null){--Ah;if(Object.isNumber(Ag)){AZ.push(Ag)}else{AT.push(K(R[Ac].color))}}}for(var Ab=0;Ab<AZ.length;++Ab){Ah=Math.max(Ah,AZ[Ab]+1)}var AU=[];var AY=0;var Aa=0;while(AU.length<Ah){var Af=(o.colors.length==Aa)?new B(100,100,100):K(o.colors[Aa]);var AW=AY%2==1?-1:1;var Ae=1+AW*Math.ceil(AY/2)*0.2;Af.scale(Ae,Ae,Ae);AU.push(Af);if(++Aa>=o.colors.length){Aa=0;++AY}}var Ad=0;for(var AX=0,Ai;AX<R.length;++AX){Ai=R[AX];if(Ai.color==null){Ai.color=AU[Ad].toString();++Ad}else{if(Object.isNumber(Ai.color)){Ai.color=AU[Ai.color].toString()}}Ai.lines=Object.extend(Object.clone(o.lines),Ai.lines);Ai.points=Object.extend(Object.clone(o.points),Ai.points);Ai.bars=Object.extend(Object.clone(o.bars),Ai.bars);Ai.mouse=Object.extend(Object.clone(o.mouse),Ai.mouse);if(Ai.shadowSize==null){Ai.shadowSize=o.shadowSize}}}function k(){AH=N.getWidth();U=N.getHeight();N.innerHTML="";N.setStyle({position:"relative"});if(AH<=0||U<=0){throw"Invalid dimensions for plot, width = "+AH+", height = "+U}S=$(document.createElement("canvas")).writeAttribute({width:AH,height:U});N.appendChild(S);if(Prototype.Browser.IE){S=$(window.G_vmlCanvasManager.initElement(S))}h=S.getContext("2d");AL=$(document.createElement("canvas")).writeAttribute({width:AH,height:U}).setStyle({position:"absolute",left:"0px",top:"0px"});N.setStyle({cursor:"default"}).appendChild(AL);if(Prototype.Browser.IE){AL=$(window.G_vmlCanvasManager.initElement(AL))}AS=AL.getContext("2d")}function AN(){if(o.selection.mode!=null){AL.observe("mousedown",r)}AL.observe("mousemove",e);AL.observe("click",f)}function q(){c.datamin=u.datamin=0;u.datamax=c.datamax=1;if(R.length==0){return }var AY=false;for(var AV=0;AV<R.length;++AV){if(R[AV].data.length>0){u.datamin=u.datamax=R[AV].data[0][0];c.datamin=c.datamax=R[AV].data[0][1];AY=true;break}}if(!AY){return }for(var AU=0;AU<R.length;++AU){var AX=R[AU].data;for(var AW=0;AW<AX.length;++AW){var AT=AX[AW][0];var AZ=AX[AW][1];if(AT<u.datamin){u.datamin=AT}else{if(AT>u.datamax){u.datamax=AT}}if(AZ<c.datamin){c.datamin=AZ}else{if(AZ>c.datamax){c.datamax=AZ}}}}}function AK(AW,AY){var AV=AY.min!=null?AY.min:AW.datamin;var AT=AY.max!=null?AY.max:AW.datamax;if(AT-AV==0){var AU=(AT==0)?1:0.01;AV-=AU;AT+=AU}AW.tickSize=I(AY.noTicks,AV,AT,AY.tickDecimals);var AX;if(AY.min==null){AX=AY.autoscaleMargin;if(AX!=0){AV-=AW.tickSize*AX;if(AV<0&&AW.datamin>=0){AV=0}AV=AW.tickSize*Math.floor(AV/AW.tickSize)}}if(AY.max==null){AX=AY.autoscaleMargin;if(AX!=0){AT+=AW.tickSize*AX;if(AT>0&&AW.datamax<=0){AT=0}AT=AW.tickSize*Math.ceil(AT/AW.tickSize)}}AW.min=AV;AW.max=AT}function Z(){if(o.xaxis.max==null){var AU=u.max;for(var AT=0;AT<R.length;++AT){if(R[AT].bars.show&&R[AT].bars.barWidth+u.datamax>AU){AU=u.max+R[AT].bars.barWidth}}u.max=AU}}function m(AV,AW){AV.ticks=[];if(AW.ticks){var AZ=AW.ticks;if(Object.isFunction(AZ)){AZ=AZ({min:AV.min,max:AV.max})}for(var AX=0,Aa,AY;AX<AZ.length;++AX){var Ab=AZ[AX];if(typeof (Ab)=="object"){Aa=Ab[0];AY=(Ab.length>1)?Ab[1]:AW.tickFormatter(Aa)}else{Aa=Ab;AY=AW.tickFormatter(Aa)}AV.ticks[AX]={v:Aa,label:AY}}}else{var AT=AV.tickSize*Math.ceil(AV.min/AV.tickSize);for(AX=0;AT+AX*AV.tickSize<=AV.max;++AX){Aa=AT+AX*AV.tickSize;var AU=AW.tickDecimals;if(AU==null){AU=1-Math.floor(Math.log(AV.tickSize)/Math.LN10)}if(AU<0){AU=0}Aa=Aa.toFixed(AU);AV.ticks.push({v:Aa,label:AW.tickFormatter(Aa)})}}}function Y(){var AX="";for(var AW=0;AW<c.ticks.length;++AW){var AU=c.ticks[AW].label.length;if(AU>AX.length){AX=c.ticks[AW].label}}var AT=N.insert('<div style="position:absolute;top:-10000px;font-size:smaller" class="flotr-grid-label">'+AX+"</div>").down(0).next(1);AA=AT.getWidth();d=AT.getHeight();AT.remove();var AY=2;if(o.points.show){AY=Math.max(AY,o.points.radius+o.points.lineWidth/2)}for(var AV=0;AV<R.length;++AV){if(R[AV].points.show){AY=Math.max(AY,R[AV].points.radius+R[AV].points.lineWidth/2)}}l.left=l.right=l.top=l.bottom=AY;l.left+=AA+o.grid.labelMargin;l.bottom+=d+o.grid.labelMargin;P=AH-l.left-l.right;AD=U-l.bottom-l.top;AC=P/(u.max-u.min);AB=AD/(c.max-c.min)}function AP(){V();AR();for(var AT=0;AT<R.length;AT++){AI(R[AT])}}function AE(AT){return(AT-u.min)*AC}function j(AT){return AD-(AT-c.min)*AB}function V(){h.save();h.translate(l.left,l.top);if(o.grid.backgroundColor!=null){h.fillStyle=o.grid.backgroundColor;h.fillRect(0,0,P,AD)}h.lineWidth=1;h.strokeStyle=o.grid.tickColor;h.beginPath();for(var AV=0,AT=null;AV<u.ticks.length;++AV){AT=u.ticks[AV].v;if(AT==u.min||AT==u.max){continue}h.moveTo(Math.floor(AE(AT))+h.lineWidth/2,0);h.lineTo(Math.floor(AE(AT))+h.lineWidth/2,AD)}for(var AU=0,AT=null;AU<c.ticks.length;++AU){AT=c.ticks[AU].v;if(AT==c.min||AT==c.max){continue}h.moveTo(0,Math.floor(j(AT))+h.lineWidth/2);h.lineTo(P,Math.floor(j(AT))+h.lineWidth/2)}h.stroke();h.lineWidth=2;h.strokeStyle=o.grid.color;h.lineJoin="round";h.strokeRect(0,0,P,AD);h.restore()}function AR(){var AZ=0;for(var AY=0;AY<u.ticks.length;++AY){if(u.ticks[AY].label){++AZ}}var AU=P/AZ;var AX='<div style="font-size:smaller;color:'+o.grid.color+'">';for(var AV=0,AW=null;AV<u.ticks.length;++AV){AW=u.ticks[AV];if(!AW.label){continue}AX+='<div style="position:absolute;top:'+(l.top+AD+o.grid.labelMargin)+"px;left:"+(l.left+AE(AW.v)-AU/2)+"px;width:"+AU+'px;text-align:center" class="flotr-grid-label">'+AW.label+"</div>"}for(var AT=0,AW=null;AT<c.ticks.length;++AT){AW=c.ticks[AT];if(!AW.label||AW.label.length==0){continue}AX+='<div style="position:absolute;top:'+(l.top+j(AW.v)-d/2)+"px;left:0;width:"+AA+'px;text-align:right" class="flotr-grid-label">'+AW.label+"</div>"}AX+="</div>";N.insert(AX)}function AI(AT){if(AT.lines.show||(!AT.bars.show&&!AT.points.show)){i(AT)}if(AT.bars.show){v(AT)}if(AT.points.show){w(AT)}}function i(AV){function AU(Ad,Ac){if(Ad.length<2){return }var Ab=AE(Ad[0][0]),Aa=j(Ad[0][1])+Ac;h.beginPath();h.moveTo(Ab,Aa);for(var Ae=0;Ae<Ad.length-1;++Ae){var AZ=Ad[Ae][0],Ag=Ad[Ae][1],AY=Ad[Ae+1][0],Af=Ad[Ae+1][1];if(Ag<=Af&&Ag<c.min){if(Af<c.min){continue}AZ=(c.min-Ag)/(Af-Ag)*(AY-AZ)+AZ;Ag=c.min}else{if(Af<=Ag&&Af<c.min){if(Ag<c.min){continue}AY=(c.min-Ag)/(Af-Ag)*(AY-AZ)+AZ;Af=c.min}}if(Ag>=Af&&Ag>c.max){if(Af>c.max){continue}AZ=(c.max-Ag)/(Af-Ag)*(AY-AZ)+AZ;Ag=c.max}else{if(Af>=Ag&&Af>c.max){if(Ag>c.max){continue}AY=(c.max-Ag)/(Af-Ag)*(AY-AZ)+AZ;Af=c.max}}if(AZ<=AY&&AZ<u.min){if(AY<u.min){continue}Ag=(u.min-AZ)/(AY-AZ)*(Af-Ag)+Ag;AZ=u.min}else{if(AY<=AZ&&AY<u.min){if(AZ<u.min){continue}Af=(u.min-AZ)/(AY-AZ)*(Af-Ag)+Ag;AY=u.min}}if(AZ>=AY&&AZ>u.max){if(AY>u.max){continue}Ag=(u.max-AZ)/(AY-AZ)*(Af-Ag)+Ag;AZ=u.max}else{if(AY>=AZ&&AY>u.max){if(AZ>u.max){continue}Af=(u.max-AZ)/(AY-AZ)*(Af-Ag)+Ag;AY=u.max}}if(Ab!=AE(AZ)||Aa!=j(Ag)+Ac){h.moveTo(AE(AZ),j(Ag)+Ac)}Ab=AE(AY);Aa=j(Af)+Ac;h.lineTo(Ab,Aa)}h.stroke()}function AW(Ac){if(Ac.length<2){return }var AY=Math.min(Math.max(0,c.min),c.max);var Ah,Aa=0;var Ae=true;h.beginPath();for(var Ad=0;Ad<Ac.length-1;++Ad){var Ab=Ac[Ad][0],Ai=Ac[Ad][1],AZ=Ac[Ad+1][0],Ag=Ac[Ad+1][1];if(Ab<=AZ&&Ab<u.min){if(AZ<u.min){continue}Ai=(u.min-Ab)/(AZ-Ab)*(Ag-Ai)+Ai;Ab=u.min}else{if(AZ<=Ab&&AZ<u.min){if(Ab<u.min){continue}Ag=(u.min-Ab)/(AZ-Ab)*(Ag-Ai)+Ai;AZ=u.min}}if(Ab>=AZ&&Ab>u.max){if(AZ>u.max){continue}Ai=(u.max-Ab)/(AZ-Ab)*(Ag-Ai)+Ai;Ab=u.max}else{if(AZ>=Ab&&AZ>u.max){if(Ab>u.max){continue}Ag=(u.max-Ab)/(AZ-Ab)*(Ag-Ai)+Ai;AZ=u.max}}if(Ae){h.moveTo(AE(Ab),j(AY));Ae=false}if(Ai>=c.max&&Ag>=c.max){h.lineTo(AE(Ab),j(c.max));h.lineTo(AE(AZ),j(c.max));continue}else{if(Ai<=c.min&&Ag<=c.min){h.lineTo(AE(Ab),j(c.min));h.lineTo(AE(AZ),j(c.min));continue}}var Aj=Ab,Af=AZ;if(Ai<=Ag&&Ai<c.min&&Ag>=c.min){Ab=(c.min-Ai)/(Ag-Ai)*(AZ-Ab)+Ab;Ai=c.min}else{if(Ag<=Ai&&Ag<c.min&&Ai>=c.min){AZ=(c.min-Ai)/(Ag-Ai)*(AZ-Ab)+Ab;Ag=c.min}}if(Ai>=Ag&&Ai>c.max&&Ag<=c.max){Ab=(c.max-Ai)/(Ag-Ai)*(AZ-Ab)+Ab;Ai=c.max}else{if(Ag>=Ai&&Ag>c.max&&Ai<=c.max){AZ=(c.max-Ai)/(Ag-Ai)*(AZ-Ab)+Ab;Ag=c.max}}if(Ab!=Aj){Ah=(Ai<=c.min)?Ah=c.min:c.max;h.lineTo(AE(Aj),j(Ah));h.lineTo(AE(Ab),j(Ah))}h.lineTo(AE(Ab),j(Ai));h.lineTo(AE(AZ),j(Ag));if(AZ!=Af){Ah=(Ag<=c.min)?c.min:c.max;h.lineTo(AE(Af),j(Ah));h.lineTo(AE(AZ),j(Ah))}Aa=Math.max(AZ,Af)}h.lineTo(AE(Aa),j(AY));h.closePath();h.fill()}h.save();h.translate(l.left,l.top);h.lineJoin="round";var AX=AV.lines.lineWidth;var AT=AV.shadowSize;if(AT>0){h.lineWidth=AT/2;h.strokeStyle="rgba(0,0,0,0.1)";AU(AV.data,AX/2+AT/2+h.lineWidth/2);h.lineWidth=AT/2;h.strokeStyle="rgba(0,0,0,0.2)";AU(AV.data,AX/2+h.lineWidth/2)}h.lineWidth=AX;h.strokeStyle=AV.color;if(AV.lines.fill){h.fillStyle=AV.lines.fillColor!=null?AV.lines.fillColor:K(AV.color).scale(null,null,null,0.4).toString();AW(AV.data,0)}AU(AV.data,0);h.restore()}function w(AU){function AX(Ab,AZ,Ac){for(var Aa=0;Aa<Ab.length;++Aa){var AY=Ab[Aa][0],Ad=Ab[Aa][1];if(AY<u.min||AY>u.max||Ad<c.min||Ad>c.max){continue}h.beginPath();h.arc(AE(AY),j(Ad),AZ,0,2*Math.PI,true);if(Ac){h.fill()}h.stroke()}}function AW(Ab,Ac,AZ){for(var Aa=0;Aa<Ab.length;++Aa){var AY=Ab[Aa][0],Ad=Ab[Aa][1];if(AY<u.min||AY>u.max||Ad<c.min||Ad>c.max){continue}h.beginPath();h.arc(AE(AY),j(Ad)+Ac,AZ,0,Math.PI,false);h.stroke()}}h.save();h.translate(l.left,l.top);var AV=AU.lines.lineWidth;var AT=AU.shadowSize;if(AT>0){h.lineWidth=AT/2;h.strokeStyle="rgba(0,0,0,0.1)";AW(AU.data,AT/2+h.lineWidth/2,AU.points.radius);h.lineWidth=AT/2;h.strokeStyle="rgba(0,0,0,0.2)";AW(AU.data,h.lineWidth/2,AU.points.radius)}h.lineWidth=AU.points.lineWidth;h.strokeStyle=AU.color;h.fillStyle=AU.points.fillColor!=null?AU.points.fillColor:AU.color;AX(AU.data,AU.points.radius,AU.points.fill);h.restore()}function v(AU){function AT(Ab,Ak,AZ,Aj){if(Ab.length<2){return }for(var Ac=0;Ac<Ab.length;Ac++){var Ag=Ab[Ac][0],Af=Ab[Ac][1];var Ai=true,Aa=true,Ad=true;var AY=Ag,Ah=Ag+Ak,AX=0,Ae=Af;if(Ah<u.min||AY>u.max||Ae<c.min||AX>c.max){continue}if(AY<u.min){AY=u.min;Ai=false}if(Ah>u.max){Ah=u.max;Ad=false}if(AX<c.min){AX=c.min}if(Ae>c.max){Ae=c.max;Aa=false}if(Aj){h.beginPath();h.moveTo(AE(AY),j(AX)+AZ);h.lineTo(AE(AY),j(Ae)+AZ);h.lineTo(AE(Ah),j(Ae)+AZ);h.lineTo(AE(Ah),j(AX)+AZ);h.fill()}if(Ai||Ad||Aa){h.beginPath();h.moveTo(AE(AY),j(AX)+AZ);if(Ai){h.lineTo(AE(AY),j(Ae)+AZ)}else{h.moveTo(AE(AY),j(Ae)+AZ)}if(Aa){h.lineTo(AE(Ah),j(Ae)+AZ)}else{h.moveTo(AE(Ah),j(Ae)+AZ)}if(Ad){h.lineTo(AE(Ah),j(AX)+AZ)}else{h.moveTo(AE(Ah),j(AX)+AZ)}h.stroke()}}}h.save();h.translate(l.left,l.top);h.lineJoin="round";var AW=AU.bars.barWidth;var AV=Math.min(AU.bars.lineWidth,AW);h.lineWidth=AV;h.strokeStyle=AU.color;if(AU.bars.fill){h.fillStyle=AU.bars.fillColor!=null?AU.bars.fillColor:K(AU.color).scale(null,null,null,0.4).toString()}AT(AU.data,AW,0,AU.bars.fill);h.restore()}function AQ(){if(!o.legend.show){return }var Aa=[];var AY=false;for(var AX=0;AX<R.length;++AX){if(!R[AX].label){continue}if(AX%o.legend.noColumns==0){Aa.push((AY)?"</tr><tr>":"<tr>");AY=true}var Ac=R[AX].label;if(o.legend.labelFormatter!=null){Ac=o.legend.labelFormatter(Ac)}Aa.push('<td class="flotr-legend-color-box"><div style="border:1px solid '+o.legend.labelBoxBorderColor+';padding:1px"><div style="width:14px;height:10px;background-color:'+R[AX].color+'"></div></div></td><td class="flotr-legend-label">'+Ac+"</td>")}if(AY){Aa.push("</tr>")}if(Aa.length>0){var Ad='<table style="font-size:smaller;color:'+o.grid.color+'">'+Aa.join("")+"</table>";if(o.legend.container!=null){o.legend.container.append(Ad)}else{var Ab="";var AU=o.legend.position,AV=o.legend.margin;if(AU.charAt(0)=="n"){Ab+="top:"+(AV+l.top)+"px;"}else{if(AU.charAt(0)=="s"){Ab+="bottom:"+(AV+l.bottom)+"px;"}}if(AU.charAt(1)=="e"){Ab+="right:"+(AV+l.right)+"px;"}else{if(AU.charAt(1)=="w"){Ab+="left:"+(AV+l.bottom)+"px;"}}var AT=N.insert('<div class="flotr-legend" style="position:absolute;z-index:2;'+Ab+'">'+Ad+"</div>").getElementsBySelector("div.flotr-legend").first();if(o.legend.backgroundOpacity!=0){var AZ=o.legend.backgroundColor;if(AZ==null){var AW=(o.grid.backgroundColor!=null)?o.grid.backgroundColor:A(AT);AZ=K(AW).adjust(null,null,null,1).toString()}N.insert('<div class="flotr-legend-bg" style="position:absolute;width:'+AT.getWidth()+"px;height:"+AT.getHeight()+"px;"+Ab+"background-color:"+AZ+';"> </div>').select("div.flotr-legend-bg").first().setStyle({opacity:o.legend.backgroundOpacity})}}}}var AG={pageX:null,pageY:null};var b={first:{x:-1,y:-1},second:{x:-1,y:-1}};var T=null;var x=null;var t=false;var Q=null;function f(AT){if(t){t=false;return }var AU=AL.cumulativeOffset();N.fire("flotr:click",[{x:u.min+(AT.pageX-AU.left-l.left)/AC,y:c.max-(AT.pageY-AU.top-l.top)/AB}])}function e(AU){if(AU.pageX==null&&AU.clientX!=null){var AX=document.documentElement,AT=document.body;AG.pageX=AU.clientX+(AX&&AX.scrollLeft||AT.scrollLeft||0);AG.pageY=AU.clientY+(AX&&AX.scrollTop||AT.scrollTop||0)}else{AG.pageX=AU.pageX;AG.pageY=AU.pageY}var AV=AL.cumulativeOffset();var AW={x:u.min+(AU.pageX-AV.left-l.left)/AC,y:c.max-(AU.pageY-AV.top-l.top)/AB};if(o.mouse.track&&x==null){n(AW)}N.fire("flotr:mousemove",[AU,AW])}function r(AT){if(!AT.isLeftClick()){return }AM(b.first,AT);if(x!=null){clearInterval(x)}AG.pageX=null;x=setInterval(AJ,1000/o.selection.fps);$(document).observe("mouseup",O)}function a(){var AU=(b.first.x<=b.second.x)?b.first.x:b.second.x;var AT=(b.first.x<=b.second.x)?b.second.x:b.first.x;var AW=(b.first.y>=b.second.y)?b.first.y:b.second.y;var AV=(b.first.y>=b.second.y)?b.second.y:b.first.y;AU=u.min+AU/AC;AT=u.min+AT/AC;AW=c.max-AW/AB;AV=c.max-AV/AB;N.fire("flotr:select",[{x1:AU,y1:AW,x2:AT,y2:AV}])}function O(AT){$(document).stopObserving("mouseup",O);if(x!=null){clearInterval(x);x=null}AM(b.second,AT);M();if(W()||AT.isLeftClick()){X();a();t=true}Event.stop(AT)}function AM(AV,AT){var AU=$(AL).cumulativeOffset();if(o.selection.mode=="y"){AV.x=(AV==b.first)?0:P}else{AV.x=AT.pageX-AU.left-l.left;AV.x=Math.min(Math.max(0,AV.x),P)}if(o.selection.mode=="x"){AV.y=(AV==b.first)?0:AD}else{AV.y=AT.pageY-AU.top-l.top;AV.y=Math.min(Math.max(0,AV.y),AD)}}function AJ(){if(AG.pageX==null){return }AM(b.second,AG);M();if(W()){X()}}function M(){if(T==null){return }var AT=Math.min(T.first.x,T.second.x),AW=Math.min(T.first.y,T.second.y),AU=Math.abs(T.second.x-T.first.x),AV=Math.abs(T.second.y-T.first.y);AS.clearRect(AT+l.left-AS.lineWidth,AW+l.top-AS.lineWidth,AU+AS.lineWidth*2,AV+AS.lineWidth*2);T=null}function AF(AT){M();b.first.y=(o.selection.mode=="x")?0:(c.max-AT.y1)*AB;b.second.y=(o.selection.mode=="x")?AD:(c.max-AT.y2)*AB;b.first.x=(o.selection.mode=="y")?0:(AT.x1-u.min)*AC;b.second.x=(o.selection.mode=="y")?P:(AT.x2-u.min)*AC;X();a()}function X(){if(T!=null&&b.first.x==T.first.x&&b.first.y==T.first.y&&b.second.x==T.second.x&&b.second.y==T.second.y){return }AS.strokeStyle=K(o.selection.color).scale(null,null,null,0.8).toString();AS.lineWidth=1;h.lineJoin="round";AS.fillStyle=K(o.selection.color).scale(null,null,null,0.4).toString();T={first:{x:b.first.x,y:b.first.y},second:{x:b.second.x,y:b.second.y}};var AT=Math.min(b.first.x,b.second.x),AW=Math.min(b.first.y,b.second.y),AU=Math.abs(b.second.x-b.first.x),AV=Math.abs(b.second.y-b.first.y);AS.fillRect(AT+l.left,AW+l.top,AU,AV);AS.strokeRect(AT+l.left,AW+l.top,AU,AV)}function W(){var AT=5;return Math.abs(b.second.x-b.first.x)>=AT&&Math.abs(b.second.y-b.first.y)>=AT}function s(){if(Q){AS.clearRect(AE(Q.x)+l.left-o.points.radius*2,j(Q.y)+l.top-o.points.radius*2,o.points.radius*3+o.points.lineWidth*3,o.points.radius*3+o.points.lineWidth*3);Q=null}}function n(Ae){var AX={dist:Number.MAX_VALUE,x:null,y:null,mouse:null};for(var Ad=0,Ac,AZ,AV;Ad<R.length;Ad++){if(!R[Ad].mouse.track){continue}Ac=R[Ad].data;AZ=(AC*R[Ad].mouse.sensibility);AV=(AB*R[Ad].mouse.sensibility);for(var Aa=0,Af,Ab;Aa<Ac.length;Aa++){Af=AC*Math.abs(Ac[Aa][0]-Ae.x);Ab=AB*Math.abs(Ac[Aa][1]-Ae.y);if(Af<AZ&&Ab<AV&&(Af+Ab)<AX.dist){AX.dist=(Af+Ab);AX.x=Ac[Aa][0];AX.y=Ac[Aa][1];AX.mouse=R[Ad].mouse}}}if(AX.mouse&&AX.mouse.track&&!Q||(Q&&AX.x!=Q.x&&AX.y!=Q.y)){var AU=N.select(".flotr-mouse-value").first();if(!AU){var Ag="",AT=o.mouse.position,AY=o.mouse.margin;if(AT.charAt(0)=="n"){Ag+="top:"+(AY+l.top)+"px;"}else{if(AT.charAt(0)=="s"){Ag+="bottom:"+(AY+l.bottom)+"px;"}}if(AT.charAt(1)=="e"){Ag+="right:"+(AY+l.right)+"px;"}else{if(AT.charAt(1)=="w"){Ag+="left:"+(AY+l.bottom)+"px;"}}N.insert('<div class="flotr-mouse-value" style="opacity:0.7;background-color:#000;color:#fff;display:none;position:absolute;'+Ag+'"></div>');return }if(AX.x!==null&&AX.y!==null){AU.setStyle({display:"block"});s();if(AX.mouse.lineColor!=null){AS.save();AS.translate(l.left,l.top);AS.lineWidth=o.points.lineWidth;AS.strokeStyle=AX.mouse.lineColor;AS.fillStyle="#ffffff";AS.beginPath();AS.arc(AE(AX.x),j(AX.y),o.points.radius,0,2*Math.PI,true);AS.fill();AS.stroke();AS.restore()}Q=AX;var AW=AX.mouse.trackDecimals;if(AW==null||AW<0){AW=0}AU.innerHTML=AX.mouse.trackFormatter({x:AX.x.toFixed(AW),y:AX.y.toFixed(AW)});N.fire("flotr:hit",[AX])}else{if(Q){AU.setStyle({display:"none"});s()}}}}}return{clean:function(M){M.innerHTML=""},draw:function(P,N,M){var O=new J(P,N,M);return O}}})(); \ No newline at end of file
diff --git a/tools/qtestlib/chart/3rdparty/prototype.js b/tools/qtestlib/chart/3rdparty/prototype.js
deleted file mode 100644
index e580ae5364..0000000000
--- a/tools/qtestlib/chart/3rdparty/prototype.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/* Prototype JavaScript framework, version 1.6.0.2
- * (c) 2005-2008 Sam Stephenson
- *
- * Prototype is freely distributable under the terms of an MIT-style license.
- * For details, see the Prototype web site: http://www.prototypejs.org/
- *
- *--------------------------------------------------------------------------*/
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('G 1g={9D:\'1.6.0.2\',1W:{3X:!!(1A.7b&&!1A.9e),58:!!1A.9e,4u:5e.5d.47(\'hE/\')>-1,7H:5e.5d.47(\'7H\')>-1&&5e.5d.47(\'ch\')==-1,d5:!!5e.5d.1f(/hD.*hC.*ci/)},3U:{72:!!1b.2S,6H:!!1A.6G,7x:1b.43(\'1T\').4U&&1b.43(\'1T\').4U!==1b.43(\'1x\').4U},84:\'<4S[^>]*>([\\\\S\\\\s]*?)<\\/4S>\',cM:/^\\/\\*-hB-([\\s\\S]*)\\*\\/\\s*$/,3q:q(){},K:q(x){o x}};E(1g.1W.d5)1g.3U.7x=1r;G 2b={2p:q(){G 2T=1k,3k=$A(1p);E(M.2w(3k[0]))2T=3k.5i();q 1N(){C.2I.3R(C,1p)}M.15(1N,2b.1d);1N.9Z=2T;1N.d4=[];E(2T){G a0=q(){};a0.1l=2T.1l;1N.1l=1s a0;2T.d4.1h(1N)}17(G i=0;i<3k.O;i++)1N.6a(3k[i]);E(!1N.1l.2I)1N.1l.2I=1g.3q;1N.1l.hA=1N;o 1N}};2b.1d={6a:q(22){G 3b=C.9Z&&C.9Z.1l;G 3k=M.4b(22);E(!M.4b({2H:1u}).O)3k.1h("2H","d3");17(G i=0,O=3k.O;i<O;i++){G 1y=3k[i],I=22[1y];E(3b&&M.2w(I)&&I.d1().3K()=="$4d"){G 1F=I,I=M.15((q(m){o q(){o 3b[m].3R(C,1p)}})(1y).5g(1F),{d3:q(){o 1F},2H:q(){o 1F.2H()}})}C.1l[1y]=I}o C}};G 4Y={};M.15=q(5L,22){17(G 1y 1Q 22)5L[1y]=22[1y];o 5L};M.15(M,{2C:q(Y){2s{E(M.2D(Y))o\'4z\';E(Y===1k)o\'1k\';o Y.2C?Y.2C():24(Y)}2E(e){E(e d2 hz)o\'...\';4q e}},3D:q(Y){G 1B=3Z Y;5y(1B){2r\'4z\':2r\'q\':2r\'hy\':o;2r\'hx\':o Y.2H()}E(Y===1k)o\'1k\';E(Y.3D)o Y.3D();E(M.4j(Y))o;G V=[];17(G 1y 1Q Y){G I=M.3D(Y[1y]);E(!M.2D(I))V.1h(1y.3D()+\': \'+I)}o\'{\'+V.2o(\', \')+\'}\'},4r:q(Y){o $H(Y).4r()},4i:q(Y){o Y&&Y.4i?Y.4i():24.62(Y)},4b:q(Y){G 4b=[];17(G 1y 1Q Y)4b.1h(1y);o 4b},1S:q(Y){G 1S=[];17(G 1y 1Q Y)1S.1h(Y[1y]);o 1S},2A:q(Y){o M.15({},Y)},4j:q(Y){o Y&&Y.3r==1},4x:q(Y){o Y!=1k&&3Z Y=="Y"&&\'hw\'1Q Y&&\'2o\'1Q Y},9G:q(Y){o Y d2 3V},2w:q(Y){o 3Z Y=="q"},3f:q(Y){o 3Z Y=="3h"},53:q(Y){o 3Z Y=="4M"},2D:q(Y){o 3Z Y=="4z"}});M.15(9X.1l,{d1:q(){G 3A=C.2H().1f(/^[\\s\\(]*q[^(]*\\((.*?)\\)/)[1].49(",").7k("3T");o 3A.O==1&&!3A[0]?[]:3A},1L:q(){E(1p.O<2&&M.2D(1p[0]))o C;G 3n=C,21=$A(1p),Y=21.5i();o q(){o 3n.3R(Y,21.20($A(1p)))}},hv:q(){G 3n=C,21=$A(1p),Y=21.5i();o q(1c){o 3n.3R(Y,[1c||1A.1c].20(21))}},7T:q(){E(!1p.O)o C;G 3n=C,21=$A(1p);o q(){o 3n.3R(C,21.20($A(1p)))}},9l:q(){G 3n=C,21=$A(1p),d0=21.5i()*cY;o 1A.hu(q(){o 3n.3R(3n,21)},d0)},5g:q(1K){G 3n=C;o q(){o 1K.3R(C,[3n.1L(C)].20($A(1p)))}},4v:q(){E(C.9Y)o C.9Y;G 3n=C;o C.9Y=q(){o 3n.3R(1k,[C].20($A(1p)))}}});9X.1l.4s=9X.1l.9l.7T(0.ht);hs.1l.3D=q(){o\'"\'+C.hr()+\'-\'+(C.hq()+1).4L(2)+\'-\'+C.hp().4L(2)+\'T\'+C.ho().4L(2)+\':\'+C.hn().4L(2)+\':\'+C.hm().4L(2)+\'Z"\'};G cp={co:q(){G 7d;17(G i=0,O=1p.O;i<O;i++){G cZ=1p[i];2s{7d=cZ();2d}2E(e){}}o 7d}};4k.1l.1f=4k.1l.2L;4k.c3=q(68){o 24(68).1Y(/([.*+?^=!:${}()|[\\]\\/\\\\])/g,\'\\\\$1\')};G aB=2b.2p({2I:q(2X,4c){C.2X=2X;C.4c=4c;C.85=1r;C.6s()},6s:q(){C.3W=ae(C.6N.1L(C),C.4c*cY)},8t:q(){C.2X(C)},8p:q(){E(!C.3W)o;af(C.3W);C.3W=1k},6N:q(){E(!C.85){2s{C.85=1u;C.8t()}hl{C.85=1r}}}});M.15(24,{62:q(I){o I==1k?\'\':24(I)},cQ:{\'\\b\':\'\\\\b\',\'\\t\':\'\\\\t\',\'\\n\':\'\\\\n\',\'\\f\':\'\\\\f\',\'\\r\':\'\\\\r\',\'\\\\\':\'\\\\\\\\\'}});M.15(24.1l,{3m:q(28,3F){G 1q=\'\',22=C,1f;3F=1p.5v.9S(3F);1P(22.O>0){E(1f=22.1f(28)){1q+=22.3B(0,1f.1i);1q+=24.62(3F(1f));22=22.3B(1f.1i+1f[0].O)}1m{1q+=22,22=\'\'}}o 1q},cN:q(28,3F,3x){3F=C.3m.9S(3F);3x=M.2D(3x)?1:3x;o C.3m(28,q(1f){E(--3x<0)o 1f[0];o 3F(1f)})},aN:q(28,W){C.3m(28,W);o 24(C)},hk:q(O,69){O=O||30;69=M.2D(69)?\'...\':69;o C.O>O?C.3B(0,O-69.O)+69:24(C)},3T:q(){o C.1Y(/^\\s+/,\'\').1Y(/\\s+$/,\'\')},cS:q(){o C.1Y(/<\\/?[^>]+>/gi,\'\')},4h:q(){o C.1Y(1s 4k(1g.84,\'cX\'),\'\')},cT:q(){G cW=1s 4k(1g.84,\'cX\');G cU=1s 4k(1g.84,\'hj\');o(C.1f(cW)||[]).2M(q(cV){o(cV.1f(cU)||[\'\',\'\'])[1]})},59:q(){o C.cT().2M(q(4S){o 7u(4S)})},82:q(){G 5J=1p.5v;5J.3Y.7n=C;o 5J.1T.4C},cJ:q(){G 1T=1s J(\'1T\');1T.4C=C.cS();o 1T.3g[0]?(1T.3g.O>1?$A(1T.3g).3H(\'\',q(2O,L){o 2O+L.4f}):1T.3g[0].4f):\'\'},7g:q(cR){G 1f=C.3T().1f(/([^?#]*)(#.*)?$/);E(!1f)o{};o 1f[1].49(cR||\'&\').3H({},q(3w,1H){E((1H=1H.49(\'=\'))[0]){G 1w=9p(1H.5i());G I=1H.O>1?1H.2o(\'=\'):1H[0];E(I!=4z)I=9p(I);E(1w 1Q 3w){E(!M.4x(3w[1w]))3w[1w]=[3w[1w]];3w[1w].1h(I)}1m 3w[1w]=I}o 3w})},3E:q(){o C.49(\'\')},9I:q(){o C.3B(0,C.O-1)+24.hi(C.cP(C.O-1)+1)},7E:q(3x){o 3x<1?\'\':1s 2m(3x+1).2o(C)},95:q(){G 4N=C.49(\'-\'),9W=4N.O;E(9W==1)o 4N[0];G 9V=C.83(0)==\'-\'?4N[0].83(0).2R()+4N[0].5H(1):4N[0];17(G i=1;i<9W;i++)9V+=4N[i].83(0).2R()+4N[i].5H(1);o 9V},6F:q(){o C.83(0).2R()+C.5H(1).2e()},hh:q(){o C.3m(/::/,\'/\').3m(/([A-Z]+)([A-Z][a-z])/,\'#{1}6T#{2}\').3m(/([a-z\\d])([A-Z])/,\'#{1}6T#{2}\').3m(/-/,\'6T\').2e()},hg:q(){o C.3m(/6T/,\'-\')},2C:q(cO){G 9T=C.3m(/[\\hf-\\he\\\\]/,q(1f){G 9U=24.cQ[1f[0]];o 9U?9U:\'\\\\hd\'+1f[0].cP().4L(2,16)});E(cO)o\'"\'+9T.1Y(/"/g,\'\\\\"\')+\'"\';o"\'"+9T.1Y(/\'/g,\'\\\\\\\'\')+"\'"},3D:q(){o C.2C(1u)},9w:q(2h){o C.cN(2h||1g.cM,\'#{1}\')},cK:q(){G 68=C;E(68.4O())o 1r;68=C.1Y(/\\\\./g,\'@\').1Y(/"[^"\\\\\\n\\r]*"/g,\'\');o(/^[,:{}\\[\\]0-9.\\-+hc-u \\n\\r\\t]*$/).2L(68)},60:q(cL){G 3l=C.9w();2s{E(!cL||3l.cK())o 7u(\'(\'+3l+\')\')}2E(e){}4q 1s hb(\'ha h9 c4 3h: \'+C.2C())},1J:q(28){o C.47(28)>-1},8F:q(28){o C.47(28)===0},aO:q(28){G d=C.O-28.O;o d>=0&&C.9L(28)===d},5E:q(){o C==\'\'},4O:q(){o/^\\s*$/.2L(C)},cb:q(Y,28){o 1s 32(C,28).2S(Y)}});E(1g.1W.4u||1g.1W.3X)M.15(24.1l,{82:q(){o C.1Y(/&/g,\'&cI;\').1Y(/</g,\'&cH;\').1Y(/>/g,\'&gt;\')},cJ:q(){o C.1Y(/&cI;/g,\'&\').1Y(/&cH;/g,\'<\').1Y(/&gt;/g,\'>\')}});24.1l.3m.9S=q(3F){E(M.2w(3F))o 3F;G 67=1s 32(3F);o q(1f){o 67.2S(1f)}};24.1l.h8=24.1l.7g;M.15(24.1l.82,{1T:1b.43(\'1T\'),3Y:1b.bm(\'\')});b0(24.1l.82)1T.5O(3Y);G 32=2b.2p({2I:q(67,28){C.67=67.2H();C.28=28||32.cE},2S:q(Y){E(M.2w(Y.9J))Y=Y.9J();o C.67.3m(C.28,q(1f){E(Y==1k)o\'\';G 4R=1f[1]||\'\';E(4R==\'\\\\\')o 1f[2];G 6X=Y,6Y=1f[3];G 28=/^([^.[]+|\\[((?:.*?[^\\\\])?)\\])(\\.|\\[|$)/;1f=28.cF(6Y);E(1f==1k)o 4R;1P(1f!=1k){G cG=1f[1].8F(\'[\')?1f[2].3m(\'\\\\\\\\]\',\']\'):1f[1];6X=6X[cG];E(1k==6X||\'\'==1f[3])2d;6Y=6Y.5H(\'[\'==1f[3]?1f[1].O:1f[0].O);1f=28.cF(6Y)}o 4R+24.62(6X)})}});32.cE=/(^|.|\\r|\\n)(#\\{(.*?)\\})/;G $2d={};G 2G={1E:q(W,1M){G 1i=0;W=W.1L(1M);2s{C.48(q(I){W(I,1i++)})}2E(e){E(e!=$2d)4q e}o C},cD:q(4M,W,1M){W=W?W.1L(1M):1g.K;G 1i=-4M,9R=[],2F=C.3E();1P((1i+=4M)<2F.O)9R.1h(2F.3B(1i,1i+4M));o 9R.9N(W,1M)},88:q(W,1M){W=W?W.1L(1M):1g.K;G 1q=1u;C.1E(q(I,1i){1q=1q&&!!W(I,1i);E(!1q)4q $2d});o 1q},cB:q(W,1M){W=W?W.1L(1M):1g.K;G 1q=1r;C.1E(q(I,1i){E(1q=!!W(I,1i))4q $2d});o 1q},9N:q(W,1M){W=W?W.1L(1M):1g.K;G V=[];C.1E(q(I,1i){V.1h(W(I,1i))});o V},81:q(W,1M){W=W.1L(1M);G 1q;C.1E(q(I,1i){E(W(I,1i)){1q=I;4q $2d}});o 1q},5C:q(W,1M){W=W.1L(1M);G V=[];C.1E(q(I,1i){E(W(I,1i))V.1h(I)});o V},h7:q(2h,W,1M){W=W?W.1L(1M):1g.K;G V=[];E(M.3f(2h))2h=1s 4k(2h);C.1E(q(I,1i){E(2h.1f(I))V.1h(W(I,1i))});o V},1J:q(Y){E(M.2w(C.47))E(C.47(Y)!=-1)o 1u;G 9Q=1r;C.1E(q(I){E(I==Y){9Q=1u;4q $2d}});o 9Q},h6:q(4M,6W){6W=M.2D(6W)?1k:6W;o C.cD(4M,q(3B){1P(3B.O<4M)3B.1h(6W);o 3B})},3H:q(2O,W,1M){W=W.1L(1M);C.1E(q(I,1i){2O=W(2O,I,1i)});o 2O},7k:q(1F){G 21=$A(1p).3B(1);o C.2M(q(I){o I[1F].3R(I,21)})},h5:q(W,1M){W=W?W.1L(1M):1g.K;G 1q;C.1E(q(I,1i){I=W(I,1i);E(1q==1k||I>=1q)1q=I});o 1q},h4:q(W,1M){W=W?W.1L(1M):1g.K;G 1q;C.1E(q(I,1i){I=W(I,1i);E(1q==1k||I<1q)1q=I});o 1q},h3:q(W,1M){W=W?W.1L(1M):1g.K;G 9P=[],9O=[];C.1E(q(I,1i){(W(I,1i)?9P:9O).1h(I)});o[9P,9O]},5u:q(1y){G V=[];C.1E(q(I){V.1h(I[1y])});o V},h2:q(W,1M){W=W.1L(1M);G V=[];C.1E(q(I,1i){E(!W(I,1i))V.1h(I)});o V},aK:q(W,1M){W=W.1L(1M);o C.2M(q(I,1i){o{I:I,6D:W(I,1i)}}).h1(q(2x,5U){G a=2x.6D,b=5U.6D;o a<b?-1:a>b?1:0}).5u(\'I\')},3E:q(){o C.2M()},h0:q(){G W=1g.K,21=$A(1p);E(M.2w(21.2u()))W=21.gZ();G cC=[C].20(21).2M($A);o C.2M(q(I,1i){o W(cC.5u(1i))})},cw:q(){o C.3E().O},2C:q(){o\'#<2G:\'+C.3E().2C()+\'>\'}};M.15(2G,{2M:2G.9N,8l:2G.81,2z:2G.5C,2h:2G.5C,gY:2G.1J,gX:2G.3E,gW:2G.88,gV:2G.cB});q $A(3d){E(!3d)o[];E(3d.3E)o 3d.3E();G O=3d.O||0,V=1s 2m(O);1P(O--)V[O]=3d[O];o V}E(1g.1W.4u){$A=q(3d){E(!3d)o[];E(!(M.2w(3d)&&3d==\'[Y gU]\')&&3d.3E)o 3d.3E();G O=3d.O||0,V=1s 2m(O);1P(O--)V[O]=3d[O];o V}}2m.cr=$A;M.15(2m.1l,2G);E(!2m.1l.9M)2m.1l.9M=2m.1l.4e;M.15(2m.1l,{48:q(W){17(G i=0,O=C.O;i<O;i++)W(C[i])},aH:q(){C.O=0;o C},3K:q(){o C[0]},2u:q(){o C[C.O-1]},gT:q(){o C.2z(q(I){o I!=1k})},cA:q(){o C.3H([],q(2F,I){o 2F.20(M.4x(I)?I.cA():[I])})},6b:q(){G 1S=$A(1p);o C.2z(q(I){o!1S.1J(I)})},4e:q(cz){o(cz!==1r?C:C.3E()).9M()},gS:q(){o C.O>1?C:C[0]},cx:q(cy){o C.3H([],q(2F,I,1i){E(0==1i||(cy?2F.2u()!=I:!2F.1J(I)))2F.1h(I);o 2F})},gR:q(2F){o C.cx().5C(q(66){o 2F.81(q(I){o 66===I})})},2A:q(){o[].20(C)},cw:q(){o C.O},2C:q(){o\'[\'+C.2M(M.2C).2o(\', \')+\']\'},3D:q(){G V=[];C.1E(q(Y){G I=M.3D(Y);E(!M.2D(I))V.1h(I)});o\'[\'+V.2o(\', \')+\']\'}});E(M.2w(2m.1l.cv))2m.1l.48=2m.1l.cv;E(!2m.1l.47)2m.1l.47=q(66,i){i||(i=0);G O=C.O;E(i<0)i=O+i;17(;i<O;i++)E(C[i]===66)o i;o-1};E(!2m.1l.9L)2m.1l.9L=q(66,i){i=gQ(i)?C.O:(i<0?C.O+i:i)+1;G n=C.3B(0,i).4e().47(66);o(n<0)?n:i-n-1};2m.1l.3E=2m.1l.2A;q $w(3h){E(!M.3f(3h))o[];3h=3h.3T();o 3h?3h.49(/\\s+/):[]}E(1g.1W.58){2m.1l.20=q(){G 2F=[];17(G i=0,O=C.O;i<O;i++)2F.1h(C[i]);17(G i=0,O=1p.O;i<O;i++){E(M.4x(1p[i])){17(G j=0,cu=1p[i].O;j<cu;j++)2F.1h(1p[i][j])}1m{2F.1h(1p[i])}}o 2F}}M.15(54.1l,{gP:q(){o C.4L(2,16)},9I:q(){o C+1},7E:q(W){$R(0,C,1u).1E(W);o C},4L:q(O,ct){G 3h=C.2H(ct||10);o\'0\'.7E(O-3h.O)+3h},3D:q(){o gO(C)?C.2H():\'1k\'}});$w(\'gN gM gL gK\').1E(q(1F){54.1l[1F]=gJ[1F].4v()});q $H(Y){o 1s 3V(Y)};G 3V=2b.2p(2G,(q(){q 9K(1w,I){E(M.2D(I))o 1w;o 1w+\'=\'+cs(24.62(I))}o{2I:q(Y){C.4K=M.9G(Y)?Y.6U():M.2A(Y)},48:q(W){17(G 1w 1Q C.4K){G I=C.4K[1w],1H=[1w,I];1H.1w=1w;1H.I=I;W(1H)}},6c:q(1w,I){o C.4K[1w]=I},9F:q(1w){o C.4K[1w]},gI:q(1w){G I=C.4K[1w];8R C.4K[1w];o I},6U:q(){o M.2A(C.4K)},4b:q(){o C.5u(\'1w\')},1S:q(){o C.5u(\'I\')},1i:q(I){G 1f=C.81(q(1H){o 1H.I===I});o 1f&&1f.1w},gH:q(Y){o C.2A().5a(Y)},5a:q(Y){o 1s 3V(Y).3H(C,q(1q,1H){1q.6c(1H.1w,1H.I);o 1q})},4r:q(){o C.2M(q(1H){G 1w=cs(1H.1w),1S=1H.I;E(1S&&3Z 1S==\'Y\'){E(M.4x(1S))o 1S.2M(9K.7T(1w)).2o(\'&\')}o 9K(1w,1S)}).2o(\'&\')},2C:q(){o\'#<3V:{\'+C.2M(q(1H){o 1H.2M(M.2C).2o(\': \')}).2o(\', \')+\'}>\'},3D:q(){o M.3D(C.6U())},2A:q(){o 1s 3V(C)}}})());3V.1l.9J=3V.1l.6U;3V.cr=$H;G cq=2b.2p(2G,{2I:q(4l,5o,65){C.4l=4l;C.5o=5o;C.65=65},48:q(W){G I=C.4l;1P(C.1J(I)){W(I);I=I.9I()}},1J:q(I){E(I<C.4l)o 1r;E(C.65)o I<C.5o;o I<=C.5o}});G $R=q(4l,5o,65){o 1s cq(4l,5o,65)};G 1R={cj:q(){o cp.co(q(){o 1s cf()},q(){o 1s cm(\'gG.cl\')},q(){o 1s cm(\'gF.cl\')})||1r},9H:0};1R.63={6V:[],48:q(W){C.6V.48(W)},ck:q(4m){E(!C.1J(4m))C.6V.1h(4m)},gE:q(4m){C.6V=C.6V.6b(4m)},7X:q(2X,2Q,1Z,3l){C.1E(q(4m){E(M.2w(4m[2X])){2s{4m[2X].3R(4m,[2Q,1Z,3l])}2E(e){}}})}};M.15(1R.63,2G);1R.63.ck({80:q(){1R.9H++},3S:q(){1R.9H--}});1R.9m=2b.2p({2I:q(U){C.U={1F:\'6S\',7Z:1u,6R:\'7V/x-gD-1x-gC\',9C:\'gB-8\',3v:\'\',60:1u,9z:1u};M.15(C.U,U||{});C.U.1F=C.U.1F.2e();E(M.3f(C.U.3v))C.U.3v=C.U.3v.7g();1m E(M.9G(C.U.3v))C.U.3v=C.U.3v.6U()}});1R.50=2b.2p(1R.9m,{9A:1r,2I:q($4d,2U,U){$4d(U);C.1Z=1R.cj();C.2Q(2U)},2Q:q(2U){C.2U=2U;C.1F=C.U.1F;G 2Y=M.2A(C.U.3v);E(![\'9F\',\'6S\'].1J(C.1F)){2Y[\'gA\']=C.1F;C.1F=\'6S\'}C.3v=2Y;E(2Y=M.4r(2Y)){E(C.1F==\'9F\')C.2U+=(C.2U.1J(\'?\')?\'&\':\'?\')+2Y;1m E(/gz|ci|ch/.2L(5e.5d))2Y+=\'&6T=\'}2s{G 2y=1s 1R.9t(C);E(C.U.80)C.U.80(2y);1R.63.7X(\'80\',C,2y);C.1Z.gy(C.1F.2R(),C.2U,C.U.7Z);E(C.U.7Z)C.9B.1L(C).4s(1);C.1Z.77=C.9E.1L(C);C.cg();C.2q=C.1F==\'6S\'?(C.U.gx||2Y):1k;C.1Z.gw(C.2q);E(!C.U.7Z&&C.1Z.ce)C.9E()}2E(e){C.5m(e)}},9E:q(){G 2N=C.1Z.2N;E(2N>1&&!((2N==4)&&C.9A))C.9B(C.1Z.2N)},cg:q(){G 5n={\'X-gv-gu\':\'cf\',\'X-1g-9D\':1g.9D,\'gs\':\'3Y/gr, 3Y/7D, 7V/6P, 3Y/6P, */*\'};E(C.1F==\'6S\'){5n[\'9o-1B\']=C.U.6R+(C.U.9C?\'; gq=\'+C.U.9C:\'\');E(C.1Z.ce&&(5e.5d.1f(/7H\\/(\\d{4})/)||[0,cd])[1]<cd)5n[\'gp\']=\'go\'}E(3Z C.U.cc==\'Y\'){G 64=C.U.cc;E(M.2w(64.1h))17(G i=0,O=64.O;i<O;i+=2)5n[64[i]]=64[i+1];1m $H(64).1E(q(1H){5n[1H.1w]=1H.I})}17(G 1e 1Q 5n)C.1Z.gn(1e,5n[1e])},5l:q(){G 4J=C.6O();o!4J||(4J>=gm&&4J<gl)},6O:q(){2s{o C.1Z.4J||0}2E(e){o 0}},9B:q(2N){G 6Q=1R.50.c8[2N],2y=1s 1R.9t(C);E(6Q==\'9u\'){2s{C.9A=1u;(C.U[\'5t\'+2y.4J]||C.U[\'5t\'+(C.5l()?\'gk\':\'gj\')]||1g.3q)(2y,2y.7W)}2E(e){C.5m(e)}G 6R=2y.61(\'9o-1B\');E(C.U.9z==\'c1\'||(C.U.9z&&C.7U()&&6R&&6R.1f(/^\\s*(3Y|7V)\\/(x-)?(gh|gg)4S(;.*)?\\s*$/i)))C.ca()}2s{(C.U[\'5t\'+6Q]||1g.3q)(2y,2y.7W);1R.63.7X(\'5t\'+6Q,C,2y,2y.7W)}2E(e){C.5m(e)}E(6Q==\'9u\'){C.1Z.77=1g.3q}},7U:q(){G m=C.2U.1f(/^\\s*gf?:\\/\\/[^\\/]*/);o!m||(m[0]==\'#{9y}//#{9x}#{7Y}\'.cb({9y:7h.9y,9x:1b.9x,7Y:7h.7Y?\':\'+7h.7Y:\'\'}))},61:q(1e){2s{o C.1Z.9r(1e)||1k}2E(e){o 1k}},ca:q(){2s{o 7u((C.1Z.3c||\'\').9w())}2E(e){C.5m(e)}},5m:q(9v){(C.U.c9||1g.3q)(C,9v);1R.63.7X(\'c9\',C,9v)}});1R.50.c8=[\'ge\',\'gd\',\'gc\',\'gb\',\'9u\'];1R.9t=2b.2p({2I:q(2Q){C.2Q=2Q;G 1Z=C.1Z=2Q.1Z,2N=C.2N=1Z.2N;E((2N>2&&!1g.1W.3X)||2N==4){C.4J=C.6O();C.9s=C.c6();C.3c=24.62(1Z.3c);C.7W=C.c5()}E(2N==4){G 6P=1Z.c7;C.c7=M.2D(6P)?1k:6P;C.ga=C.c2()}},4J:0,9s:\'\',6O:1R.50.1l.6O,c6:q(){2s{o C.1Z.9s||\'\'}2E(e){o\'\'}},61:1R.50.1l.61,g9:q(){2s{o C.9q()}2E(e){o 1k}},9r:q(1e){o C.1Z.9r(1e)},9q:q(){o C.1Z.9q()},c5:q(){G 3l=C.61(\'X-c4\');E(!3l)o 1k;3l=9p(c3(3l));2s{o 3l.60(C.2Q.U.c0||!C.2Q.7U())}2E(e){C.2Q.5m(e)}},c2:q(){G U=C.2Q.U;E(!U.60||(U.60!=\'c1\'&&!(C.61(\'9o-1B\')||\'\').1J(\'7V/3l\'))||C.3c.4O())o 1k;2s{o C.3c.60(U.c0||!C.2Q.7U())}2E(e){C.2Q.5m(e)}}});1R.bW=2b.2p(1R.50,{2I:q($4d,3C,2U,U){C.3C={5l:(3C.5l||3C),9n:(3C.9n||(3C.5l?1k:3C))};U=M.2A(U);G 3S=U.3S;U.3S=(q(2y,3l){C.bZ(2y.3c);E(M.2w(3S))3S(2y,3l)}).1L(C);$4d(2U,U)},bZ:q(3c){G 5Z=C.3C[C.5l()?\'5l\':\'9n\'],U=C.U;E(!U.59)3c=3c.4h();E(5Z=$(5Z)){E(U.5k){E(M.3f(U.5k)){G 5k={};5k[U.5k]=3c;5Z.3o(5k)}1m U.5k(5Z,3c)}1m 5Z.5a(3c)}}});1R.g8=2b.2p(1R.9m,{2I:q($4d,3C,2U,U){$4d(U);C.3S=C.U.3S;C.4c=(C.U.4c||2);C.5j=(C.U.5j||1);C.9k={};C.3C=3C;C.2U=2U;C.4l()},4l:q(){C.U.3S=C.bY.1L(C);C.6N()},8p:q(){C.9k.U.3S=4z;g7(C.3W);(C.3S||1g.3q).3R(C,1p)},bY:q(2y){E(C.U.5j){C.5j=(2y.3c==C.bX?C.5j*C.U.5j:1);C.bX=2y.3c}C.3W=C.6N.1L(C).9l(C.5j*C.4c)},6N:q(){C.9k=1s 1R.bW(C.3C,C.2U,C.U)}});q $(k){E(1p.O>1){17(G i=0,1V=[],O=1p.O;i<O;i++)1V.1h($(1p[i]));o 1V}E(M.3f(k))k=1b.g6(k);o J.15(k)}E(1g.3U.72){1b.8a=q(1t,71){G V=[];G 9j=1b.2S(1t,$(71)||1b,1k,g5.g4,1k);17(G i=0,O=9j.g3;i<O;i++)V.1h(J.15(9j.g2(i)));o V}}E(!1A.6o)G 6o={};E(!6o.bV){M.15(6o,{bV:1,g1:2,au:3,g0:4,fZ:5,fY:6,fX:7,fW:8,fV:9,fU:10,fT:11,fS:12})}(q(){G k=C.J;C.J=q(1a,2l){2l=2l||{};1a=1a.2e();G 2P=J.2P;E(1g.1W.3X&&2l.1e){1a=\'<\'+1a+\' 1e="\'+2l.1e+\'">\';8R 2l.1e;o J.6M(1b.43(1a),2l)}E(!2P[1a])2P[1a]=J.15(1b.43(1a));o J.6M(2P[1a].fR(1r),2l)};M.15(C.J,k||{})}).8m(1A);J.2P={};J.1d={99:q(k){o $(k).14.3p!=\'7L\'},aa:q(k){k=$(k);J[J.99(k)?\'bU\':\'bT\'](k);o k},bU:q(k){$(k).14.3p=\'7L\';o k},bT:q(k){$(k).14.3p=\'\';o k},a1:q(k){k=$(k);k.1O.6I(k);o k},5a:q(k,18){k=$(k);E(18&&18.3s)18=18.3s();E(M.4j(18))o k.5a().3o(18);18=M.4i(18);k.4C=18.4h();18.59.1L(18).4s();o k},1Y:q(k,18){k=$(k);E(18&&18.3s)18=18.3s();1m E(!M.4j(18)){18=M.4i(18);G 9i=k.fQ.fP();9i.fO(k);18.59.1L(18).4s();18=9i.fN(18.4h())}k.1O.8Z(18,k);o k},3o:q(k,3Q){k=$(k);E(M.3f(3Q)||M.53(3Q)||M.4j(3Q)||(3Q&&(3Q.3s||3Q.4i)))3Q={4Q:3Q};G 18,3o,1a,3g;17(G 1v 1Q 3Q){18=3Q[1v];1v=1v.2e();3o=J.5M[1v];E(18&&18.3s)18=18.3s();E(M.4j(18)){3o(k,18);3G}18=M.4i(18);1a=((1v==\'4R\'||1v==\'75\')?k.1O:k).1a.2R();3g=J.7F(1a,18.4h());E(1v==\'2i\'||1v==\'75\')3g.4e();3g.1E(3o.7T(k));18.59.1L(18).4s()}o k},5g:q(k,1K,2l){k=$(k);E(M.4j(1K))$(1K).6M(2l||{});1m E(M.3f(1K))1K=1s J(1K,2l);1m 1K=1s J(\'1T\',1K);E(k.1O)k.1O.8Z(1K,k);1K.5O(k);o 1K},2C:q(k){k=$(k);G 1q=\'<\'+k.1a.2e();$H({\'1o\':\'1o\',\'1j\':\'6e\'}).1E(q(1H){G 1y=1H.3K(),1U=1H.2u();G I=(k[1y]||\'\').2H();E(I)1q+=\' \'+1U+\'=\'+I.2C(1u)});o 1q+\'>\'},7S:q(k,1y){k=$(k);G 1V=[];1P(k=k[1y])E(k.3r==1)1V.1h(J.15(k));o 1V},5x:q(k){o $(k).7S(\'1O\')},bR:q(k){o $(k).2z("*")},bS:q(k){k=$(k).5D;1P(k&&k.3r!=1)k=k.3M;o $(k)},br:q(k){E(!(k=$(k).5D))o[];1P(k&&k.3r!=1)k=k.3M;E(k)o[k].20($(k).4E());o[]},5Y:q(k){o $(k).7S(\'aY\')},4E:q(k){o $(k).7S(\'3M\')},fM:q(k){k=$(k);o k.5Y().4e().20(k.4E())},1f:q(k,41){E(M.3f(41))41=1s 19(41);o 41.1f($(k))},fL:q(k,1t,1i){k=$(k);E(1p.O==1)o $(k.1O);G 5x=k.5x();o M.53(1t)?5x[1t]:19.5w(5x,1t,1i)},fK:q(k,1t,1i){k=$(k);E(1p.O==1)o k.bS();o M.53(1t)?k.bR()[1t]:k.2z(1t)[1i||0]},fJ:q(k,1t,1i){k=$(k);E(1p.O==1)o $(19.25.6x(k));G 5Y=k.5Y();o M.53(1t)?5Y[1t]:19.5w(5Y,1t,1i)},6B:q(k,1t,1i){k=$(k);E(1p.O==1)o $(19.25.6w(k));G 4E=k.4E();o M.53(1t)?4E[1t]:19.5w(4E,1t,1i)},2z:q(){G 21=$A(1p),k=$(21.5i());o 19.7o(k,21)},55:q(){G 21=$A(1p),k=$(21.5i());o 19.7o(k.1O,21).6b(k)},bt:q(k){k=$(k);G 1o=k.51(\'1o\'),5J=1p.5v;E(1o)o 1o;do{1o=\'fI\'+5J.bs++}1P($(1o));k.6M(\'1o\',1o);o 1o},51:q(k,1e){k=$(k);E(1g.1W.3X){G t=J.3O.7I;E(t.1S[1e])o t.1S[1e](k,1e);E(t.3A[1e])1e=t.3A[1e];E(1e.1J(\':\')){o(!k.2l||!k.2l[1e])?1k:k.2l[1e].I}}o k.91(1e)},6M:q(k,1e,I){k=$(k);G 2l={},t=J.3O.6l;E(3Z 1e==\'Y\')2l=1e;1m 2l[1e]=M.2D(I)?1u:I;17(G 29 1Q 2l){1e=t.3A[29]||29;I=2l[29];E(t.1S[29])1e=t.1S[29](k,I);E(I===1r||I===1k)k.8D(1e);1m E(I===1u)k.bQ(1e,1e);1m k.bQ(1e,I)}o k},b5:q(k){o $(k).5I().3a},b6:q(k){o $(k).5I().2g},6d:q(k){o 1s J.6Z(k)},7s:q(k,1j){E(!(k=$(k)))o;G 7R=k.1j;o(7R.O>0&&(7R==1j||1s 4k("(^|\\\\s)"+1j+"(\\\\s|$)").2L(7R)))},bO:q(k,1j){E(!(k=$(k)))o;E(!k.7s(1j))k.1j+=(k.1j?\' \':\'\')+1j;o k},bP:q(k,1j){E(!(k=$(k)))o;k.1j=k.1j.1Y(1s 4k("(^|\\\\s+)"+1j+"(\\\\s+|$)"),\' \').3T();o k},fH:q(k,1j){E(!(k=$(k)))o;o k[k.7s(1j)?\'bP\':\'bO\'](1j)},fG:q(k){k=$(k);G L=k.5D;1P(L){G bN=L.3M;E(L.3r==3&&!/\\S/.2L(L.4f))k.6I(L);L=bN}o k},5E:q(k){o $(k).4C.4O()},76:q(k,3b){k=$(k),3b=$(3b);G bL=3b;E(k.bM)o(k.bM(3b)&8)===8;E(k.6L&&!1g.1W.58){G e=k.6L,a=3b.6L,5X=3b.3M;E(!5X){do{3b=3b.1O}1P(!(5X=3b.3M)&&3b.1O)}E(5X&&5X.6L)o(e>a&&e<5X.6L)}1P(k=k.1O)E(k==bL)o 1u;o 1r},bK:q(k){k=$(k);G 5W=k.4P();1A.bK(5W[0],5W[1]);o k},2a:q(k,14){k=$(k);14=14==\'97\'?\'7N\':14.95();G I=k.14[14];E(!I){G 9h=1b.fF.fE(k,1k);I=9h?9h[14]:1k}E(14==\'3P\')o I?5R(I):1.0;o I==\'7M\'?1k:I},fD:q(k){o $(k).2a(\'3P\')},5S:q(k,4I){k=$(k);G 9g=k.14,1f;E(M.3f(4I)){k.14.90+=\';\'+4I;o 4I.1J(\'3P\')?k.5Q(4I.1f(/3P:\\s*(\\d?\\.?\\d*)/)[1]):k}17(G 1y 1Q 4I)E(1y==\'3P\')k.5Q(4I[1y]);1m 9g[(1y==\'97\'||1y==\'7N\')?(M.2D(9g.96)?\'7N\':\'96\'):1y]=4I[1y];o k},5Q:q(k,I){k=$(k);k.14.3P=(I==1||I===\'\')?\'\':(I<0.7G)?0:I;o k},5I:q(k){k=$(k);G 3p=$(k).2a(\'3p\');E(3p!=\'7L\'&&3p!=1k)o{2g:k.5q,3a:k.5r};G 44=k.14;G bH=44.9f;G bI=44.1v;G bJ=44.3p;44.9f=\'7j\';44.1v=\'5P\';44.3p=\'fC\';G bG=k.bE;G bF=k.bD;44.3p=bJ;44.1v=bI;44.9f=bH;o{2g:bG,3a:bF}},fB:q(k){k=$(k);G 5W=J.2a(k,\'1v\');E(5W==\'5T\'||!5W){k.9d=1u;k.14.1v=\'6K\';E(1A.9e){k.14.2i=0;k.14.2x=0}}o k},fA:q(k){k=$(k);E(k.9d){k.9d=4z;k.14.1v=k.14.2i=k.14.2x=k.14.4Q=k.14.5U=\'\'}o k},fz:q(k){k=$(k);E(k.5h)o k;k.5h=J.2a(k,\'9c\')||\'7M\';E(k.5h!==\'7j\')k.14.9c=\'7j\';o k},fy:q(k){k=$(k);E(!k.5h)o k;k.14.9c=k.5h==\'7M\'?\'\':k.5h;k.5h=1k;o k},4P:q(k){G 2J=0,2K=0;do{2J+=k.5c||0;2K+=k.5b||0;k=k.3e}1P(k);o J.57(2K,2J)},6h:q(k){G 2J=0,2K=0;do{2J+=k.5c||0;2K+=k.5b||0;k=k.3e;E(k){E(k.1a==\'by\')2d;G p=J.2a(k,\'1v\');E(p!==\'5T\')2d}}1P(k);o J.57(2K,2J)},8g:q(k){k=$(k);E(k.2a(\'1v\')==\'5P\')o;G 9b=k.6h();G 2i=9b[1];G 2x=9b[0];G 2g=k.bE;G 3a=k.bD;k.bB=2x-5R(k.14.2x||0);k.bC=2i-5R(k.14.2i||0);k.bz=k.14.2g;k.bA=k.14.3a;k.14.1v=\'5P\';k.14.2i=2i+\'3i\';k.14.2x=2x+\'3i\';k.14.2g=2g+\'3i\';k.14.3a=3a+\'3i\';o k},8d:q(k){k=$(k);E(k.2a(\'1v\')==\'6K\')o;k.14.1v=\'6K\';G 2i=5R(k.14.2i||0)-(k.bC||0);G 2x=5R(k.14.2x||0)-(k.bB||0);k.14.2i=2i+\'3i\';k.14.2x=2x+\'3i\';k.14.3a=k.bA;k.14.2g=k.bz;o k},8c:q(k){G 2J=0,2K=0;do{2J+=k.4n||0;2K+=k.4p||0;k=k.1O}1P(k);o J.57(2K,2J)},5p:q(k){E(k.3e)o $(k.3e);E(k==1b.2q)o $(k);1P((k=k.1O)&&k!=1b.2q)E(J.2a(k,\'1v\')!=\'5T\')o $(k);o $(1b.2q)},6g:q(9a){G 2J=0,2K=0;G k=9a;do{2J+=k.5c||0;2K+=k.5b||0;E(k.3e==1b.2q&&J.2a(k,\'1v\')==\'5P\')2d}1P(k=k.3e);k=9a;do{E(!1g.1W.58||k.1a==\'by\'){2J-=k.4n||0;2K-=k.4p||0}}1P(k=k.1O);o J.57(2K,2J)},a3:q(k,22){G U=M.15({bx:1u,bw:1u,bv:1u,bu:1u,5c:0,5b:0},1p[2]||{});22=$(22);G p=22.6g();k=$(k);G 5V=[0,0];G 2T=1k;E(J.2a(k,\'1v\')==\'5P\'){2T=k.5p();5V=2T.6g()}E(2T==1b.2q){5V[0]-=1b.2q.5b;5V[1]-=1b.2q.5c}E(U.bx)k.14.2x=(p[0]-5V[0]+U.5b)+\'3i\';E(U.bw)k.14.2i=(p[1]-5V[1]+U.5c)+\'3i\';E(U.bv)k.14.2g=22.5q+\'3i\';E(U.bu)k.14.3a=22.5r+\'3i\';o k}};J.1d.bt.bs=1;M.15(J.1d,{fx:J.1d.2z,fw:J.1d.br});J.3O={6l:{3A:{1j:\'6e\',bo:\'17\'},1S:{}}};E(1g.1W.58){J.1d.2a=J.1d.2a.5g(q(3j,k,14){5y(14){2r\'2x\':2r\'2i\':2r\'5U\':2r\'4Q\':E(3j(k,\'1v\')===\'5T\')o 1k;2r\'3a\':2r\'2g\':E(!J.99(k))o 1k;G 7O=bq(3j(k,14),10);E(7O!==k[\'2V\'+14.6F()])o 7O+\'3i\';G 3k;E(14===\'3a\'){3k=[\'7P-2i-2g\',\'7Q-2i\',\'7Q-4Q\',\'7P-4Q-2g\']}1m{3k=[\'7P-2x-2g\',\'7Q-2x\',\'7Q-5U\',\'7P-5U-2g\']}o 3k.3H(7O,q(2O,1y){G 98=3j(k,1y);o 98===1k?2O:2O-bq(98,10)})+\'3i\';6p:o 3j(k,14)}});J.1d.51=J.1d.51.5g(q(3j,k,1U){E(1U===\'7K\')o k.7K;o 3j(k,1U)})}1m E(1g.1W.3X){J.1d.5p=J.1d.5p.5g(q(3j,k){k=$(k);G 1v=k.2a(\'1v\');E(1v!==\'5T\')o 3j(k);k.5S({1v:\'6K\'});G I=3j(k);k.5S({1v:1v});o I});$w(\'6h 6g\').1E(q(1F){J.1d[1F]=J.1d[1F].5g(q(3j,k){k=$(k);G 1v=k.2a(\'1v\');E(1v!==\'5T\')o 3j(k);G 3e=k.5p();E(3e&&3e.2a(\'1v\')===\'fv\')3e.5S({94:1});k.5S({1v:\'6K\'});G I=3j(k);k.5S({1v:1v});o I})});J.1d.2a=q(k,14){k=$(k);14=(14==\'97\'||14==\'7N\')?\'96\':14.95();G I=k.14[14];E(!I&&k.5f)I=k.5f[14];E(14==\'3P\'){E(I=(k.2a(\'2h\')||\'\').1f(/92\\(3P=(.*)\\)/))E(I[1])o 5R(I[1])/bp;o 1.0}E(I==\'7M\'){E((14==\'2g\'||14==\'3a\')&&(k.2a(\'3p\')!=\'7L\'))o k[\'2V\'+14.6F()]+\'3i\';o 1k}o I};J.1d.5Q=q(k,I){q 93(2h){o 2h.1Y(/92\\([^\\)]*\\)/gi,\'\')}k=$(k);G 5f=k.5f;E((5f&&!5f.fu)||(!5f&&k.14.94==\'ft\'))k.14.94=1;G 2h=k.2a(\'2h\'),14=k.14;E(I==1||I===\'\'){(2h=93(2h))?14.2h=2h:14.8D(\'2h\');o k}1m E(I<0.7G)I=0;14.2h=93(2h)+\'92(3P=\'+(I*bp)+\')\';o k};J.3O={7I:{3A:{\'6e\':\'1j\',\'17\':\'bo\'},1S:{7J:q(k,1U){o k.91(1U,2)},bn:q(k,1U){G L=k.bj(1U);o L?L.I:""},2k:q(k,1U){1U=k.91(1U);o 1U?1U.2H().3B(23,-2):1k},6J:q(k,1U){o $(k).3I(1U)?1U:1k},14:q(k){o k.14.90.2e()},7K:q(k){o k.7K}}}};J.3O.6l={3A:M.15({fs:\'fr\',fq:\'fp\'},J.3O.7I.3A),1S:{3J:q(k,I){k.3J=!!I},14:q(k,I){k.14.90=I?I:\'\'}}};J.3O.8X={};$w(\'fo fn fm fl fk 7i \'+\'fj fi fh fg\').1E(q(29){J.3O.6l.3A[29.2e()]=29;J.3O.8X[29.2e()]=29});(q(v){M.15(v,{aI:v.7J,ad:v.7J,1B:v.7J,5B:v.bn,3u:v.6J,3J:v.6J,ff:v.6J,fe:v.6J,fd:v.2k,ao:v.2k,fc:v.2k,fb:v.2k,fa:v.2k,f9:v.2k,f8:v.2k,f7:v.2k,f6:v.2k,f5:v.2k,f4:v.2k,f3:v.2k,f2:v.2k,f1:v.2k,f0:v.2k,eZ:v.2k,eY:v.2k,eX:v.2k})})(J.3O.7I.1S)}1m E(1g.1W.7H&&/eW:1\\.8\\.0/.2L(5e.5d)){J.1d.5Q=q(k,I){k=$(k);k.14.3P=(I==1)?0.eV:(I===\'\')?\'\':(I<0.7G)?0:I;o k}}1m E(1g.1W.4u){J.1d.5Q=q(k,I){k=$(k);k.14.3P=(I==1||I===\'\')?\'\':(I<0.7G)?0:I;E(I==1)E(k.1a==\'bf\'&&k.2g){k.2g++;k.2g--}1m 2s{G n=1b.bm(\' \');k.5O(n);k.6I(n)}2E(e){}o k};J.1d.4P=q(k){G 2J=0,2K=0;do{2J+=k.5c||0;2K+=k.5b||0;E(k.3e==1b.2q)E(J.2a(k,\'1v\')==\'5P\')2d;k=k.3e}1P(k);o J.57(2K,2J)}}E(1g.1W.3X||1g.1W.58){J.1d.5a=q(k,18){k=$(k);E(18&&18.3s)18=18.3s();E(M.4j(18))o k.5a().3o(18);18=M.4i(18);G 1a=k.1a.2R();E(1a 1Q J.5M.4G){$A(k.3g).1E(q(L){k.6I(L)});J.7F(1a,18.4h()).1E(q(L){k.5O(L)})}1m k.4C=18.4h();18.59.1L(18).4s();o k}}E(\'bl\'1Q 1b.43(\'1T\')){J.1d.1Y=q(k,18){k=$(k);E(18&&18.3s)18=18.3s();E(M.4j(18)){k.1O.8Z(18,k);o k}18=M.4i(18);G 2T=k.1O,1a=2T.1a.2R();E(J.5M.4G[1a]){G 3M=k.6B();G 8Y=J.7F(1a,18.4h());2T.6I(k);E(3M)8Y.1E(q(L){2T.7C(L,3M)});1m 8Y.1E(q(L){2T.5O(L)})}1m k.bl=18.4h();18.59.1L(18).4s();o k}}J.57=q(l,t){G 1q=[l,t];1q.2x=l;1q.2i=t;o 1q};J.7F=q(1a,7D){G 1T=1s J(\'1T\'),t=J.5M.4G[1a];E(t){1T.4C=t[0]+7D+t[1];t[2].7E(q(){1T=1T.5D})}1m 1T.4C=7D;o $A(1T.3g)};J.5M={4R:q(k,L){k.1O.7C(L,k)},2i:q(k,L){k.7C(L,k.5D)},4Q:q(k,L){k.5O(L)},75:q(k,L){k.1O.7C(L,k.3M)},4G:{eU:[\'<4H>\',\'</4H>\',1],7z:[\'<4H><5N>\',\'</5N></4H>\',2],bb:[\'<4H><5N><7B>\',\'</7B></5N></4H>\',3],8V:[\'<4H><5N><7B><bk>\',\'</bk></7B></5N></4H>\',4],bi:[\'<2z>\',\'</2z>\',1]}};(q(){M.15(C.4G,{bd:C.4G.7z,bc:C.4G.7z,ba:C.4G.8V})}).8m(J.5M);J.1d.7y={3I:q(k,1U){1U=J.3O.8X[1U]||1U;G L=$(k).bj(1U);o L&&L.eT}};J.1d.3z={};M.15(J,J.1d);E(!1g.3U.6H&&1b.43(\'1T\').4U){1A.6G={};1A.6G.1l=1b.43(\'1T\').4U;1g.3U.6H=1u}J.15=(q(){E(1g.3U.7x)o 1g.K;G 1d={},3z=J.1d.3z;G 15=M.15(q(k){E(!k||k.7c||k.3r!=1||k==1A)o k;G 2B=M.2A(1d),1a=k.1a,1y,I;E(3z[1a])M.15(2B,3z[1a]);17(1y 1Q 2B){I=2B[1y];E(M.2w(I)&&!(1y 1Q k))k[1y]=I.4v()}k.7c=1g.3q;o k},{7v:q(){E(!1g.3U.6H){M.15(1d,J.1d);M.15(1d,J.1d.7y)}}});15.7v();o 15})();J.3I=q(k,1U){E(k.3I)o k.3I(1U);o J.1d.7y.3I(k,1U)};J.6a=q(2B){G F=1g.3U,T=J.1d.3z;E(!2B){M.15(1C,1C.1d);M.15(1C.J,1C.J.1d);M.15(J.1d.3z,{"eS":M.2A(1C.1d),"eR":M.2A(1C.J.1d),"bi":M.2A(1C.J.1d),"bh":M.2A(1C.J.1d)})}E(1p.O==2){G 1a=2B;2B=1p[1]}E(!1a)M.15(J.1d,2B||{});1m{E(M.4x(1a))1a.1E(15);1m 15(1a)}q 15(1a){1a=1a.2R();E(!J.1d.3z[1a])J.1d.3z[1a]={};M.15(J.1d.3z[1a],2B)}q 7w(2B,5L,7A){7A=7A||1r;17(G 1y 1Q 2B){G I=2B[1y];E(!M.2w(I))3G;E(!7A||!(1y 1Q 5L))5L[1y]=I.4v()}}q b8(1a){G 1N;G 8U={"eQ":"eP","bh":"eO","P":"eN","eM":"eL","eK":"eJ","eI":"eH","eG":"eF","eE":"eD","eC":"5K","eB":"5K","eA":"5K","ez":"5K","ey":"5K","ex":"5K","Q":"ew","ev":"bg","eu":"bg","A":"et","bf":"es","er":"eq","ep":"be","eo":"be","bd":"8W","bc":"8W","7z":"8W","bb":"em","ba":"b9","8V":"b9","el":"ek","ej":"ei"};E(8U[1a])1N=\'8T\'+8U[1a]+\'J\';E(1A[1N])o 1A[1N];1N=\'8T\'+1a+\'J\';E(1A[1N])o 1A[1N];1N=\'8T\'+1a.6F()+\'J\';E(1A[1N])o 1A[1N];1A[1N]={};1A[1N].1l=1b.43(1a).4U;o 1A[1N]}E(F.6H){7w(J.1d,6G.1l);7w(J.1d.7y,6G.1l,1u)}E(F.7x){17(G 8S 1Q J.1d.3z){G 1N=b8(8S);E(M.2D(1N))3G;7w(T[8S],1N.1l)}}M.15(J,J.1d);8R J.3z;E(J.15.7v)J.15.7v();J.2P={}};1b.eh={5I:q(){G 8Q={};G B=1g.1W;$w(\'2g 3a\').1E(q(d){G D=d.6F();8Q[d]=(B.4u&&!1b.2S)?5J[\'eg\'+D]:(B.58)?1b.2q[\'b7\'+D]:1b.4o[\'b7\'+D]});o 8Q},b6:q(){o C.5I().2g},b5:q(){o C.5I().3a},ef:q(){o J.57(1A.a9||1b.4o.4p||1b.2q.4p,1A.a8||1b.4o.4n||1b.2q.4n)}};G 19=2b.2p({2I:q(1t){C.1t=1t.3T();C.b4()},b3:q(){E(!1g.3U.72)o 1r;G e=C.1t;E(1g.1W.4u&&(e.1J("-2t-1B")||e.1J(":5E")))o 1r;E((/(\\[[\\w-]*?:|:3J)/).2L(C.1t))o 1r;o 1u},b4:q(){E(C.b3())o C.b2();G e=C.1t,4g=19.6C,h=19.25,c=19.6D,3y,p,m;E(19.56[e]){C.3N=19.56[e];o}C.3N=["C.3N = q(1n) {","G r = 1n, h = 19.25, c = 1r, n;"];1P(e&&3y!=e&&(/\\S/).2L(e)){3y=e;17(G i 1Q 4g){p=4g[i];E(m=e.1f(p)){C.3N.1h(M.2w(c[i])?c[i](m):1s 32(c[i]).2S(m));e=e.1Y(m[0],\'\');2d}}}C.3N.1h("o h.8E(n);\\n}");7u(C.3N.2o(\'\\n\'));19.56[C.1t]=C.3N},b2:q(){G e=C.1t,4g=19.6C,x=19.2v,3y,m;E(19.56[e]){C.2v=19.56[e];o}C.3N=[\'.//*\'];1P(e&&3y!=e&&(/\\S/).2L(e)){3y=e;17(G i 1Q 4g){E(m=e.1f(4g[i])){C.3N.1h(M.2w(x[i])?x[i](m):1s 32(x[i]).2S(m));e=e.1Y(m[0],\'\');2d}}}C.2v=C.3N.2o(\'\');19.56[C.1t]=C.2v},7p:q(1n){1n=1n||1b;E(C.2v)o 1b.8a(C.2v,1n);o C.3N(1n)},1f:q(k){C.8P=[];G e=C.1t,4g=19.6C,as=19.8J;G 3y,p,m;1P(e&&3y!==e&&(/\\S/).2L(e)){3y=e;17(G i 1Q 4g){p=4g[i];E(m=e.1f(p)){E(as[i]){C.8P.1h([i,M.2A(m)]);e=e.1Y(m[0],\'\')}1m{o C.7p(1b).1J(k)}}}}G 1f=1u,1e,2j;17(G i=0,7t;7t=C.8P[i];i++){1e=7t[0],2j=7t[1];E(!19.8J[1e](k,2j)){1f=1r;2d}}o 1f},2H:q(){o C.1t},2C:q(){o"#<19:"+C.1t.2C()+">"}});M.15(19,{56:{},2v:{4D:"//*",1G:"/*",55:"/6E-4F::*[1]",6A:\'/6E-4F::*\',1a:q(m){E(m[1]==\'*\')o\'\';o"[b1-1e()=\'"+m[1].2e()+"\' 8O b1-1e()=\'"+m[1].2R()+"\']"},1j:"[6f(20(\' \', @6e, \' \'), \' #{1} \')]",1o:"[@1o=\'#{1}\']",5F:q(m){m[1]=m[1].2e();o 1s 32("[@#{1}]").2S(m)},29:q(m){m[1]=m[1].2e();m[3]=m[5]||m[6];o 1s 32(19.2v.6t[m[2]]).2S(m)},6y:q(m){G h=19.2v.2f[m[1]];E(!h)o\'\';E(M.2w(h))o h(m);o 1s 32(19.2v.2f[m[1]]).2S(m)},6t:{\'=\':"[@#{1}=\'#{3}\']",\'!=\':"[@#{1}!=\'#{3}\']",\'^=\':"[ee-b0(@#{1}, \'#{3}\')]",\'$=\':"[5H(@#{1}, (3h-O(@#{1}) - 3h-O(\'#{3}\') + 1))=\'#{3}\']",\'*=\':"[6f(@#{1}, \'#{3}\')]",\'~=\':"[6f(20(\' \', @#{1}, \' \'), \' #{3} \')]",\'|=\':"[6f(20(\'-\', @#{1}, \'-\'), \'-#{3}-\')]"},2f:{\'3K-1G\':\'[4B(8M-4F::*)]\',\'2u-1G\':\'[4B(6E-4F::*)]\',\'6v-1G\':\'[4B(8M-4F::* 8O 6E-4F::*)]\',\'5E\':"[3x(*) = 0 8L (3x(3Y()) = 0 8O ed(3Y(), \' \\t\\r\\n\', \'\') = \'\')]",\'3J\':"[@3J]",\'3u\':"[@3u]",\'aP\':"[4B(@3u)]",\'4B\':q(m){G e=m[6],p=19.6C,x=19.2v,3y,v;G 8N=[];1P(e&&3y!=e&&(/\\S/).2L(e)){3y=e;17(G i 1Q p){E(m=e.1f(p[i])){v=M.2w(x[i])?x[i](m):1s 32(x[i]).2S(m);8N.1h("("+v.5H(1,v.O-1)+")");e=e.1Y(m[0],\'\');2d}}}o"[4B("+8N.2o(" 8L ")+")]"},\'1X-1G\':q(m){o 19.2v.2f.1X("(3x(./8M-4F::*) + 1) ",m)},\'1X-2u-1G\':q(m){o 19.2v.2f.1X("(3x(./6E-4F::*) + 1) ",m)},\'1X-2t-1B\':q(m){o 19.2v.2f.1X("1v() ",m)},\'1X-2u-2t-1B\':q(m){o 19.2v.2f.1X("(2u() + 1 - 1v()) ",m)},\'3K-2t-1B\':q(m){m[6]="1";o 19.2v.2f[\'1X-2t-1B\'](m)},\'2u-2t-1B\':q(m){m[6]="1";o 19.2v.2f[\'1X-2u-2t-1B\'](m)},\'6v-2t-1B\':q(m){G p=19.2v.2f;o p[\'3K-2t-1B\'](m)+p[\'2u-2t-1B\'](m)},1X:q(5G,m){G 42,1I=m[6],8K;E(1I==\'aS\')1I=\'2n+0\';E(1I==\'aR\')1I=\'2n+1\';E(42=1I.1f(/^(\\d+)$/))o\'[\'+5G+"= "+42[1]+\']\';E(42=1I.1f(/^(-?\\d*)?n(([+-])(\\d+))?/)){E(42[1]=="-")42[1]=-1;G a=42[1]?54(42[1]):1;G b=42[2]?54(42[2]):0;8K="[((#{5G} - #{b}) ec #{a} = 0) 8L "+"((#{5G} - #{b}) 1T #{a} >= 0)]";o 1s 32(8K).2S({5G:5G,a:a,b:b})}}}},6D:{1a:\'n = h.1a(n, r, "#{1}", c); c = 1r;\',1j:\'n = h.1j(n, r, "#{1}", c); c = 1r;\',1o:\'n = h.1o(n, r, "#{1}", c); c = 1r;\',5F:\'n = h.5F(n, r, "#{1}", c); c = 1r;\',29:q(m){m[3]=(m[5]||m[6]);o 1s 32(\'n = h.29(n, r, "#{1}", "#{3}", "#{2}", c); c = 1r;\').2S(m)},6y:q(m){E(m[6])m[6]=m[6].1Y(/"/g,\'\\\\"\');o 1s 32(\'n = h.6y(n, "#{1}", "#{6}", r, c); c = 1r;\').2S(m)},4D:\'c = "4D";\',1G:\'c = "1G";\',55:\'c = "55";\',6A:\'c = "6A";\'},6C:{6A:/^\\s*~\\s*/,1G:/^\\s*>\\s*/,55:/^\\s*\\+\\s*/,4D:/^\\s/,1a:/^\\s*(\\*|[\\w\\-]+)(\\b|$)?/,1o:/^#([\\w\\-\\*]+)(\\b|$)/,1j:/^\\.([\\w\\-\\*]+)(\\b|$)/,6y:/^:((3K|2u|1X|1X-2u|6v)(-1G|-2t-1B)|5E|3J|(en|eb)ea|4B)(\\((.*?)\\))?(\\b|$|(?=\\s|[:+~>]))/,5F:/^\\[([\\w]+)\\]/,29:/\\[((?:[\\w-]*:)?[\\w-]+)\\s*(?:([!^$*~|]?=)\\s*(([\'"])([^\\4]*?)\\4|([^\'"][^\\]]*?)))?\\]/},8J:{1a:q(k,2j){o 2j[1].2R()==k.1a.2R()},1j:q(k,2j){o J.7s(k,2j[1])},1o:q(k,2j){o k.1o===2j[1]},5F:q(k,2j){o J.3I(k,2j[1])},29:q(k,2j){G 4f=J.51(k,2j[1]);o 4f&&19.6t[2j[2]](4f,2j[5]||2j[6])}},25:{20:q(a,b){17(G i=0,L;L=b[i];i++)a.1h(L);o a},7q:q(N){G aZ=1g.3q;17(G i=0,L;L=N[i];i++)L.3L=aZ;o N},52:q(N){17(G i=0,L;L=N[i];i++)L.3L=4z;o N},1i:q(1O,4e,6u){1O.3L=1g.3q;E(4e){17(G N=1O.3g,i=N.O-1,j=1;i>=0;i--){G L=N[i];E(L.3r==1&&(!6u||L.3L))L.7r=j++}}1m{17(G i=0,j=1,N=1O.3g;L=N[i];i++)E(L.3r==1&&(!6u||L.3L))L.7r=j++}},8E:q(N){E(N.O==0)o N;G V=[],n;17(G i=0,l=N.O;i<l;i++)E(!(n=N[i]).3L){n.3L=1g.3q;V.1h(J.15(n))}o 19.25.52(V)},4D:q(N){G h=19.25;17(G i=0,V=[],L;L=N[i];i++)h.20(V,L.4a(\'*\'));o V},1G:q(N){G h=19.25;17(G i=0,V=[],L;L=N[i];i++){17(G j=0,1G;1G=L.3g[j];j++)E(1G.3r==1&&1G.1a!=\'!\')V.1h(1G)}o V},55:q(N){17(G i=0,V=[],L;L=N[i];i++){G 6B=C.6w(L);E(6B)V.1h(6B)}o V},6A:q(N){G h=19.25;17(G i=0,V=[],L;L=N[i];i++)h.20(V,J.4E(L));o V},6w:q(L){1P(L=L.3M)E(L.3r==1)o L;o 1k},6x:q(L){1P(L=L.aY)E(L.3r==1)o L;o 1k},1a:q(N,1n,1a,26){G aX=1a.2R();G V=[],h=19.25;E(N){E(26){E(26=="4D"){17(G i=0,L;L=N[i];i++)h.20(V,L.4a(1a));o V}1m N=C[26](N);E(1a=="*")o N}17(G i=0,L;L=N[i];i++)E(L.1a.2R()===aX)V.1h(L);o V}1m o 1n.4a(1a)},1o:q(N,1n,1o,26){G 31=$(1o),h=19.25;E(!31)o[];E(!N&&1n==1b)o[31];E(N){E(26){E(26==\'1G\'){17(G i=0,L;L=N[i];i++)E(31.1O==L)o[31]}1m E(26==\'4D\'){17(G i=0,L;L=N[i];i++)E(J.76(31,L))o[31]}1m E(26==\'55\'){17(G i=0,L;L=N[i];i++)E(19.25.6x(31)==L)o[31]}1m N=h[26](N)}17(G i=0,L;L=N[i];i++)E(L==31)o[31];o[]}o(31&&J.76(31,1n))?[31]:[]},1j:q(N,1n,1j,26){E(N&&26)N=C[26](N);o 19.25.aW(N,1n,1j)},aW:q(N,1n,1j){E(!N)N=19.25.4D([1n]);G aV=\' \'+1j+\' \';17(G i=0,V=[],L,6z;L=N[i];i++){6z=L.1j;E(6z.O==0)3G;E(6z==1j||(\' \'+6z+\' \').1J(aV))V.1h(L)}o V},5F:q(N,1n,29,26){E(!N)N=1n.4a("*");E(N&&26)N=C[26](N);G V=[];17(G i=0,L;L=N[i];i++)E(J.3I(L,29))V.1h(L);o V},29:q(N,1n,29,I,aU,26){E(!N)N=1n.4a("*");E(N&&26)N=C[26](N);G 2c=19.6t[aU],V=[];17(G i=0,L;L=N[i];i++){G 4f=J.51(L,29);E(4f===1k)3G;E(2c(4f,I))V.1h(L)}o V},6y:q(N,1e,I,1n,26){E(N&&26)N=C[26](N);E(!N)N=1n.4a("*");o 19.2f[1e](N,I,1n)}},2f:{\'3K-1G\':q(N,I,1n){17(G i=0,V=[],L;L=N[i];i++){E(19.25.6x(L))3G;V.1h(L)}o V},\'2u-1G\':q(N,I,1n){17(G i=0,V=[],L;L=N[i];i++){E(19.25.6w(L))3G;V.1h(L)}o V},\'6v-1G\':q(N,I,1n){G h=19.25;17(G i=0,V=[],L;L=N[i];i++)E(!h.6x(L)&&!h.6w(L))V.1h(L);o V},\'1X-1G\':q(N,1I,1n){o 19.2f.1X(N,1I,1n)},\'1X-2u-1G\':q(N,1I,1n){o 19.2f.1X(N,1I,1n,1u)},\'1X-2t-1B\':q(N,1I,1n){o 19.2f.1X(N,1I,1n,1r,1u)},\'1X-2u-2t-1B\':q(N,1I,1n){o 19.2f.1X(N,1I,1n,1u,1u)},\'3K-2t-1B\':q(N,1I,1n){o 19.2f.1X(N,"1",1n,1r,1u)},\'2u-2t-1B\':q(N,1I,1n){o 19.2f.1X(N,"1",1n,1u,1u)},\'6v-2t-1B\':q(N,1I,1n){G p=19.2f;o p[\'2u-2t-1B\'](p[\'3K-2t-1B\'](N,1I,1n),1I,1n)},aQ:q(a,b,aT){E(a==0)o b>0?[b]:[];o $R(1,aT).3H([],q(2O,i){E(0==(i-b)%a&&(i-b)/a>=0)2O.1h(i);o 2O})},1X:q(N,1I,1n,4e,6u){E(N.O==0)o[];E(1I==\'aS\')1I=\'2n+0\';E(1I==\'aR\')1I=\'2n+1\';G h=19.25,V=[],8H=[],m;h.7q(N);17(G i=0,L;L=N[i];i++){E(!L.1O.3L){h.1i(L.1O,4e,6u);8H.1h(L.1O)}}E(1I.1f(/^\\d+$/)){1I=54(1I);17(G i=0,L;L=N[i];i++)E(L.7r==1I)V.1h(L)}1m E(m=1I.1f(/^(-?\\d*)?n(([+-])(\\d+))?/)){E(m[1]=="-")m[1]=-1;G a=m[1]?54(m[1]):1;G b=m[2]?54(m[2]):0;G 8I=19.2f.aQ(a,b,N.O);17(G i=0,L,l=8I.O;L=N[i];i++){17(G j=0;j<l;j++)E(L.7r==8I[j])V.1h(L)}}h.52(N);h.52(8H);o V},\'5E\':q(N,I,1n){17(G i=0,V=[],L;L=N[i];i++){E(L.1a==\'!\'||(L.5D&&!L.4C.1f(/^\\s*$/)))3G;V.1h(L)}o V},\'4B\':q(N,41,1n){G h=19.25,e9,m;G 8G=1s 19(41).7p(1n);h.7q(8G);17(G i=0,V=[],L;L=N[i];i++)E(!L.3L)V.1h(L);h.52(8G);o V},\'aP\':q(N,I,1n){17(G i=0,V=[],L;L=N[i];i++)E(!L.3u)V.1h(L);o V},\'3u\':q(N,I,1n){17(G i=0,V=[],L;L=N[i];i++)E(L.3u)V.1h(L);o V},\'3J\':q(N,I,1n){17(G i=0,V=[],L;L=N[i];i++)E(L.3J)V.1h(L);o V}},6t:{\'=\':q(2Z,v){o 2Z==v},\'!=\':q(2Z,v){o 2Z!=v},\'^=\':q(2Z,v){o 2Z.8F(v)},\'$=\':q(2Z,v){o 2Z.aO(v)},\'*=\':q(2Z,v){o 2Z.1J(v)},\'~=\':q(2Z,v){o(\' \'+2Z+\' \').1J(\' \'+v+\' \')},\'|=\':q(2Z,v){o(\'-\'+2Z.2R()+\'-\').1J(\'-\'+v.2R()+\'-\')}},49:q(1t){G 4A=[];1t.aN(/(([\\w#:.~>+()\\s-]+|\\*|\\[.*?\\])+)\\s*(,|$)/,q(m){4A.1h(m[1].3T())});o 4A},aM:q(1V,1t){G 2j=$$(1t),h=19.25;h.7q(2j);17(G i=0,V=[],k;k=1V[i];i++)E(k.3L)V.1h(k);h.52(2j);o V},5w:q(1V,1t,1i){E(M.53(1t)){1i=1t;1t=1r}o 19.aM(1V,1t||\'*\')[1i||0]},7o:q(k,4A){4A=19.49(4A.2o(\',\'));G V=[],h=19.25;17(G i=0,l=4A.O,41;i<l;i++){41=1s 19(4A[i].3T());h.20(V,41.7p(k))}o(l>1)?h.8E(V):V}});E(1g.1W.3X){M.15(19.25,{20:q(a,b){17(G i=0,L;L=b[i];i++)E(L.1a!=="!")a.1h(L);o a},52:q(N){17(G i=0,L;L=N[i];i++)L.8D(\'3L\');o N}})}q $$(){o 19.7o(1b,$A(1p))}G 1C={8y:q(1x){$(1x).8y();o 1x},aL:q(1V,U){E(3Z U!=\'Y\')U={3w:!!U};1m E(M.2D(U.3w))U.3w=1u;G 1w,I,8C=1r,4Z=U.4Z;G 7n=1V.3H({},q(1q,k){E(!k.3u&&k.1e){1w=k.1e;I=$(k).2W();E(I!=1k&&(k.1B!=\'4Z\'||(!8C&&4Z!==1r&&(!4Z||1w==4Z)&&(8C=1u)))){E(1w 1Q 1q){E(!M.4x(1q[1w]))1q[1w]=[1q[1w]];1q[1w].1h(I)}1m 1q[1w]=I}}o 1q});o U.3w?7n:M.4r(7n)}};1C.1d={6q:q(1x,U){o 1C.aL(1C.5z(1x),U)},5z:q(1x){o $A($(1x).4a(\'*\')).3H([],q(1V,1G){E(1C.J.5A[1G.1a.2e()])1V.1h(J.15(1G));o 1V})},e8:q(1x,7l,1e){1x=$(1x);G 7m=1x.4a(\'4y\');E(!7l&&!1e)o $A(7m).2M(J.15);17(G i=0,8B=[],O=7m.O;i<O;i++){G 4y=7m[i];E((7l&&4y.1B!=7l)||(1e&&4y.1e!=1e))3G;8B.1h(J.15(4y))}o 8B},8x:q(1x){1x=$(1x);1C.5z(1x).7k(\'8x\');o 1x},8w:q(1x){1x=$(1x);1C.5z(1x).7k(\'8w\');o 1x},aJ:q(1x){G 1V=$(1x).5z().5C(q(k){o\'7j\'!=k.1B&&!k.3u});G 8A=1V.5C(q(k){o k.3I(\'7i\')&&k.7i>=0}).aK(q(k){o k.7i}).3K();o 8A?8A:1V.8l(q(k){o[\'4y\',\'2z\',\'8v\'].1J(k.1a.2e())})},e7:q(1x){1x=$(1x);1x.aJ().aG();o 1x},2Q:q(1x,U){1x=$(1x),U=M.2A(U||{});G 2Y=U.3v,5B=1x.51(\'5B\')||\'\';E(5B.4O())5B=1A.7h.aI;U.3v=1x.6q(1u);E(2Y){E(M.3f(2Y))2Y=2Y.7g();M.15(U.3v,2Y)}E(1x.3I(\'1F\')&&!U.1F)U.1F=1x.1F;o 1s 1R.50(5B,U)}};1C.J={8z:q(k){$(k).8z();o k},2z:q(k){$(k).2z();o k}};1C.J.1d={6q:q(k){k=$(k);E(!k.3u&&k.1e){G I=k.2W();E(I!=4z){G 1H={};1H[k.1e]=I;o M.4r(1H)}}o\'\'},2W:q(k){k=$(k);G 1F=k.1a.2e();o 1C.J.5A[1F](k)},e6:q(k,I){k=$(k);G 1F=k.1a.2e();1C.J.5A[1F](k,I);o k},aH:q(k){$(k).I=\'\';o k},e5:q(k){o $(k).I!=\'\'},aG:q(k){k=$(k);2s{k.8z();E(k.2z&&(k.1a.2e()!=\'4y\'||![\'8q\',\'8y\',\'4Z\'].1J(k.1B)))k.2z()}2E(e){}o k},8x:q(k){k=$(k);k.e4();k.3u=1u;o k},8w:q(k){k=$(k);k.3u=1r;o k}};G e3=1C.J;G $F=1C.J.1d.2W;1C.J.5A={4y:q(k,I){5y(k.1B.2e()){2r\'ay\':2r\'ax\':o 1C.J.5A.aF(k,I);6p:o 1C.J.5A.8v(k,I)}},aF:q(k,I){E(M.2D(I))o k.3J?k.I:1k;1m k.3J=!!I},8v:q(k,I){E(M.2D(I))o k.I;1m k.I=I},2z:q(k,1i){E(M.2D(1i))o C[k.1B==\'2z-e2\'?\'aD\':\'aC\'](k);1m{G 3t,I,aE=!M.4x(1i);17(G i=0,O=k.O;i<O;i++){3t=k.U[i];I=C.7f(3t);E(aE){E(I==1i){3t.8u=1u;o}}1m 3t.8u=1i.1J(I)}}},aD:q(k){G 1i=k.e1;o 1i>=0?C.7f(k.U[1i]):1k},aC:q(k){G 1S,O=k.O;E(!O)o 1k;17(G i=0,1S=[];i<O;i++){G 3t=k.U[i];E(3t.8u)1S.1h(C.7f(3t))}o 1S},7f:q(3t){o J.15(3t).3I(\'I\')?3t.I:3t.3Y}};4Y.8s=2b.2p(aB,{2I:q($4d,k,4c,2X){$4d(2X,4c);C.k=$(k);C.4w=C.2W()},8t:q(){G I=C.2W();E(M.3f(C.4w)&&M.3f(I)?C.4w!=I:24(C.4w)!=24(I)){C.2X(C.k,I);C.4w=I}}});1C.J.aA=2b.2p(4Y.8s,{2W:q(){o 1C.J.2W(C.k)}});1C.aA=2b.2p(4Y.8s,{2W:q(){o 1C.6q(C.k)}});4Y.6r=2b.2p({2I:q(k,2X){C.k=$(k);C.2X=2X;C.4w=C.2W();E(C.k.1a.2e()==\'1x\')C.az();1m C.6s(C.k)},8r:q(){G I=C.2W();E(C.4w!=I){C.2X(C.k,I);C.4w=I}},az:q(){1C.5z(C.k).1E(C.6s,C)},6s:q(k){E(k.1B){5y(k.1B.2e()){2r\'ay\':2r\'ax\':1D.4t(k,\'e0\',C.8r.1L(C));2d;6p:1D.4t(k,\'dZ\',C.8r.1L(C));2d}}}});1C.J.6r=2b.2p(4Y.6r,{2W:q(){o 1C.J.2W(C.k)}});1C.6r=2b.2p(4Y.6r,{2W:q(){o 1C.6q(C.k)}});E(!1A.1D)G 1D={};M.15(1D,{dY:8,dX:9,dW:13,dV:27,dU:37,dT:38,dS:39,dR:40,dQ:46,dP:36,dO:35,dN:33,dM:34,dL:45,2P:{},8o:q(1c){G k;5y(1c.1B){2r\'dK\':k=1c.dJ;2d;2r\'dI\':k=1c.3s;2d;6p:o 1k}o J.15(k)}});1D.1d=(q(){G 4W;E(1g.1W.3X){G aw={0:1,1:4,2:2};4W=q(1c,4X){o 1c.8q==aw[4X]}}1m E(1g.1W.4u){4W=q(1c,4X){5y(4X){2r 0:o 1c.7e==1&&!1c.av;2r 1:o 1c.7e==1&&1c.av;6p:o 1r}}}1m{4W=q(1c,4X){o 1c.7e?(1c.7e===4X+1):(1c.8q===4X)}}o{dH:q(1c){o 4W(1c,0)},dG:q(1c){o 4W(1c,1)},dF:q(1c){o 4W(1c,2)},k:q(1c){G L=1D.15(1c).73;o J.15(L.3r==6o.au?L.1O:L)},5w:q(1c,1t){G k=1D.k(1c);E(!1t)o k;G 1V=[k].20(k.5x());o 19.5w(1V,1t,0)},4V:q(1c){o{x:1c.aq||(1c.dE+(1b.4o.4p||1b.2q.4p)),y:1c.ap||(1c.dD+(1b.4o.4n||1b.2q.4n))}},dC:q(1c){o 1D.4V(1c).x},dB:q(1c){o 1D.4V(1c).y},8p:q(1c){1D.15(1c);1c.ar();1c.at();1c.dA=1u}}})();1D.15=(q(){G 2B=M.4b(1D.1d).3H({},q(m,1e){m[1e]=1D.1d[1e].4v();o m});E(1g.1W.3X){M.15(2B,{at:q(){C.dz=1u},ar:q(){C.7d=1r},2C:q(){o"[Y 1D]"}});o q(1c){E(!1c)o 1r;E(1c.7c)o 1c;1c.7c=1g.3q;G 4V=1D.4V(1c);M.15(1c,{73:1c.dy,8o:1D.8o(1c),aq:4V.x,ap:4V.y});o M.15(1c,2B)}}1m{1D.1l=1D.1l||1b.6n("aj").4U;M.15(1D.1l,2B);o 1g.K}})();M.15(1D,(q(){G 2P=1D.2P;q 8k(k){E(k.8n)o k.8n[0];1p.5v.1o=1p.5v.1o||1;o k.8n=[++1p.5v.1o]}q 8j(1z){E(1z&&1z.1J(\':\'))o"ai";o 1z}q 79(1o){o 2P[1o]=2P[1o]||{}}q 7a(1o,1z){G c=79(1o);o c[1z]=c[1z]||[]}q am(k,1z,2c){G 1o=8k(k);G c=7a(1o,1z);E(c.5u("2c").1J(2c))o 1r;G 1K=q(1c){E(!1D||!1D.15||(1c.1z&&1c.1z!=1z))o 1r;1D.15(1c);2c.8m(k,1c)};1K.2c=2c;c.1h(1K);o 1K}q 8i(1o,1z,2c){G c=7a(1o,1z);o c.8l(q(1K){o 1K.2c==2c})}q ak(1o,1z,2c){G c=79(1o);E(!c[1z])o 1r;c[1z]=c[1z].6b(8i(1o,1z,2c))}q an(){17(G 1o 1Q 2P)17(G 1z 1Q 2P[1o])2P[1o][1z]=1k}E(1A.7b){1A.7b("ao",an)}o{4t:q(k,1z,2c){k=$(k);G 1e=8j(1z);G 1K=am(k,1z,2c);E(!1K)o k;E(k.78){k.78(1e,1K,1r)}1m{k.7b("5t"+1e,1K)}o k},4T:q(k,1z,2c){k=$(k);G 1o=8k(k),1e=8j(1z);E(!2c&&1z){7a(1o,1z).1E(q(1K){k.4T(1z,1K.2c)});o k}1m E(!1z){M.4b(79(1o)).1E(q(1z){k.4T(1z)});o k}G 1K=8i(1o,1z,2c);E(!1K)o k;E(k.al){k.al(1e,1K,1r)}1m{k.dx("5t"+1e,1K)}ak(1o,1z,2c);o k},5s:q(k,1z,2O){k=$(k);E(k==1b&&1b.6n&&!k.ah)k=1b.4o;G 1c;E(1b.6n){1c=1b.6n("aj");1c.dw("ai",1u,1u)}1m{1c=1b.dv();1c.ag="du"}1c.1z=1z;1c.2O=2O||{};E(1b.6n){k.ah(1c)}1m{k.dt(1c.ag,1c)}o 1D.15(1c)}}})());M.15(1D,1D.1d);J.6a({5s:1D.5s,4t:1D.4t,4T:1D.4T});M.15(1b,{5s:J.1d.5s.4v(),4t:J.1d.4t.4v(),4T:J.1d.4T.4v(),6m:1r});(q(){G 3W;q 6k(){E(1b.6m)o;E(3W)1A.af(3W);1b.5s("ds:6m");1b.6m=1u}E(1b.78){E(1g.1W.4u){3W=1A.ae(q(){E(/6m|ab/.2L(1b.2N))6k()},0);1D.4t(1A,"dr",6k)}1m{1b.78("dq",6k,1r)}}1m{1b.6l("<4S 1o=ac 4s ad=//:><\\/4S>");$("ac").77=q(){E(C.2N=="ab"){C.77=1k;6k()}}}})();3V.4r=M.4r;G dp={3p:J.aa};J.1d.dn=J.1d.76;G dm={dl:q(k,18){o J.3o(k,{4R:18})},dk:q(k,18){o J.3o(k,{2i:18})},dj:q(k,18){o J.3o(k,{4Q:18})},di:q(k,18){o J.3o(k,{75:18})}};G $3G=1s dh(\'"4q $3G" dg df, de "o" dd\');G 8f={a7:1r,8e:q(){C.a5=1A.a9||1b.4o.4p||1b.2q.4p||0;C.a4=1A.a8||1b.4o.4n||1b.2q.4n||0},dc:q(k,x,y){E(C.a7)o C.a6(k,x,y);C.6i=x;C.6j=y;C.2V=J.4P(k);o(y>=C.2V[1]&&y<C.2V[1]+k.5r&&x>=C.2V[0]&&x<C.2V[0]+k.5q)},a6:q(k,x,y){G 8h=J.8c(k);C.6i=x+8h[0]-C.a5;C.6j=y+8h[1]-C.a4;C.2V=J.4P(k);o(C.6j>=C.2V[1]&&C.6j<C.2V[1]+k.5r&&C.6i>=C.2V[0]&&C.6i<C.2V[0]+k.5q)},db:q(74,k){E(!74)o 0;E(74==\'da\')o((C.2V[1]+k.5r)-C.6j)/k.5r;E(74==\'d9\')o((C.2V[0]+k.5q)-C.6i)/k.5q},4P:J.1d.4P,6h:J.1d.6h,8g:q(k){8f.8e();o J.8g(k)},8d:q(k){8f.8e();o J.8d(k)},d8:J.1d.8c,3e:J.1d.5p,d7:J.1d.6g,2A:q(22,73,U){U=U||{};o J.a3(73,22,U)}};E(!1b.70)1b.70=q(a2){q 8b(1e){o 1e.4O()?1k:"[6f(20(\' \', @6e, \' \'), \' "+1e+" \')]"}a2.70=1g.3U.72?q(k,1j){1j=1j.2H().3T();G 89=/\\s/.2L(1j)?$w(1j).2M(8b).2o(\'\'):8b(1j);o 89?1b.8a(\'.//*\'+89,k):[]}:q(k,1j){1j=1j.2H().3T();G 1V=[],6d=(/\\s/.2L(1j)?$w(1j):1k);E(!6d&&!1j)o 1V;G N=$(k).4a(\'*\');1j=\' \'+1j+\' \';17(G i=0,1G,cn;1G=N[i];i++){E(1G.1j&&(cn=\' \'+1G.1j+\' \')&&(cn.1J(1j)||(6d&&6d.88(q(1e){o!1e.2H().4O()&&cn.1J(\' \'+1e+\' \')}))))1V.1h(J.15(1G))}o 1V};o q(1j,71){o $(71||1b.2q).70(1j)}}(J.1d);J.6Z=2b.2p();J.6Z.1l={2I:q(k){C.k=$(k)},48:q(W){C.k.1j.49(/\\s+/).2z(q(1e){o 1e.O>0}).48(W)},6c:q(1j){C.k.1j=1j},d6:q(87){E(C.1J(87))o;C.6c($A(C).20(87).2o(\' \'))},a1:q(86){E(!C.1J(86))o;C.6c($A(C).6b(86).2o(\' \'))},2H:q(){o $A(C).2o(\' \')}};M.15(J.6Z.1l,2G);J.6a();',62,1095,'||||||||||||||||||||element||||return||function||||||||||||this||if||var||value|Element||node|Object|nodes|length||||||options|results|iterator||object||||||style|extend||for|content|Selector|tagName|document|event|Methods|name|match|Prototype|push|index|className|null|prototype|else|root|id|arguments|result|false|new|expression|true|position|key|form|property|eventName|window|type|Form|Event|each|method|child|pair|formula|include|wrapper|bind|context|klass|parentNode|while|in|Ajax|values|div|attribute|elements|Browser|nth|replace|transport|concat|args|source||String|handlers|combinator||pattern|attr|getStyle|Class|handler|break|toLowerCase|pseudos|width|filter|top|matches|_getEv|attributes|Array||join|create|body|case|try|of|last|xpath|isFunction|left|response|select|clone|methods|inspect|isUndefined|catch|array|Enumerable|toString|initialize|valueT|valueL|test|map|readyState|memo|cache|request|toUpperCase|evaluate|parent|url|offset|getValue|callback|params|nv||targetNode|Template||||||||height|ancestor|responseText|iterable|offsetParent|isString|childNodes|string|px|proceed|properties|json|gsub|__method|insert|display|emptyFunction|nodeType|toElement|opt|disabled|parameters|hash|count|le|ByTag|names|slice|container|toJSON|toArray|replacement|continue|inject|hasAttribute|checked|first|_countedByPrototype|nextSibling|matcher|_attributeTranslations|opacity|insertions|apply|onComplete|strip|BrowserFeatures|Hash|timer|IE|text|typeof||selector|mm|createElement|els|||indexOf|_each|split|getElementsByTagName|keys|frequency|super|reverse|nodeValue|ps|stripScripts|toHTML|isElement|RegExp|start|responder|scrollTop|documentElement|scrollLeft|throw|toQueryString|defer|observe|WebKit|methodize|lastValue|isArray|input|undefined|expressions|not|innerHTML|descendant|nextSiblings|sibling|tags|table|styles|status|_object|toPaddedString|number|parts|blank|cumulativeOffset|bottom|before|script|stopObserving|__proto__|pointer|isButton|code|Abstract|submit|Request|readAttribute|unmark|isNumber|Number|adjacent|_cache|_returnOffset|Opera|evalScripts|update|offsetLeft|offsetTop|userAgent|navigator|currentStyle|wrap|_overflow|shift|decay|insertion|success|dispatchException|headers|end|getOffsetParent|offsetWidth|offsetHeight|fire|on|pluck|callee|findElement|ancestors|switch|getElements|Serializers|action|findAll|firstChild|empty|attrPresence|fragment|substring|getDimensions|self|Heading|destination|_insertionTranslations|tbody|appendChild|absolute|setOpacity|parseFloat|setStyle|static|right|delta|pos|nextAncestor|previousSiblings|receiver|evalJSON|getHeader|interpret|Responders|extras|exclusive|item|template|str|truncation|addMethods|without|set|classNames|class|contains|viewportOffset|positionedOffset|xcomp|ycomp|fireContentLoadedEvent|write|loaded|createEvent|Node|default|serialize|EventObserver|registerCallback|operators|ofType|only|nextElementSibling|previousElementSibling|pseudo|nodeClassName|laterSibling|next|patterns|criteria|following|capitalize|HTMLElement|ElementExtensions|removeChild|_flag|relative|sourceIndex|writeAttribute|onTimerEvent|getStatus|xml|state|contentType|post|_|toObject|responders|fillWith|ctx|expr|ClassNames|getElementsByClassName|parentElement|XPath|target|mode|after|descendantOf|onreadystatechange|addEventListener|getCacheForID|getWrappersForEventName|attachEvent|_extendedByPrototype|returnValue|which|optionValue|toQueryParams|location|tabIndex|hidden|invoke|typeName|inputs|data|findChildElements|findElements|mark|nodeIndex|hasClassName|token|eval|refresh|copy|SpecificElementExtensions|Simulated|TBODY|onlyIfAbsent|tr|insertBefore|html|times|_getContentFromAnonymousElement|00001|Gecko|read|_getAttr|title|none|auto|cssFloat|dim|border|padding|elementClassName|recursivelyCollect|curry|isSameOrigin|application|headerJSON|dispatch|port|asynchronous|onCreate|detect|escapeHTML|charAt|ScriptFragment|currentlyExecuting|classNameToRemove|classNameToAdd|all|cond|_getElementsByXPath|iter|cumulativeScrollOffset|relativize|prepare|Position|absolutize|offsetcache|findWrapper|getDOMEventName|getEventID|find|call|_prototypeEventID|relatedTarget|stop|button|onElementEvent|TimedObserver|execute|selected|textarea|enable|disable|reset|focus|firstByIndex|matchingInputs|submitted|removeAttribute|unique|startsWith|exclusions|indexed|indices|assertions|predicate|and|preceding|exclusion|or|tokens|dimensions|delete|tag|HTML|trans|TD|TableSection|has|fragments|replaceChild|cssText|getAttribute|alpha|stripAlpha|zoom|camelize|styleFloat|float|val|visible|forElement|offsets|overflow|_madePositioned|opera|visibility|elementStyle|css|range|query|updater|delay|Base|failure|Content|decodeURIComponent|getAllResponseHeaders|getResponseHeader|statusText|Response|Complete|exception|unfilterJSON|domain|protocol|evalJS|_complete|respondToReadyState|encoding|Version|onStateChange|get|isHash|activeRequestCount|succ|toTemplateReplacements|toQueryPair|lastIndexOf|_reverse|collect|falses|trues|found|slices|prepareReplacement|escapedString|character|camelized|len|Function|_methodized|superclass|subclass|remove|instanceMethods|clonePosition|deltaY|deltaX|withinIncludingScrolloffsets|includeScrollOffsets|pageYOffset|pageXOffset|toggle|complete|__onDOMContentLoaded|src|setInterval|clearInterval|eventType|dispatchEvent|dataavailable|HTMLEvents|destroyWrapper|removeEventListener|createWrapper|destroyCache|onunload|pageY|pageX|preventDefault||stopPropagation|TEXT_NODE|metaKey|buttonMap|radio|checkbox|registerFormCallbacks|Observer|PeriodicalExecuter|selectMany|selectOne|single|inputSelector|activate|clear|href|findFirstElement|sortBy|serializeElements|matchElements|scan|endsWith|enabled|getIndices|odd|even|total|operator|needle|byClassName|uTagName|previousSibling|_true|with|local|compileXPathMatcher|shouldUseXPath|compileMatcher|getHeight|getWidth|client|findDOMClass|TableCell|TH|TR|TFOOT|THEAD|TableCol|IMG|Mod|TEXTAREA|SELECT|getAttributeNode|td|outerHTML|createTextNode|_getAttrNode|htmlFor|100|parseInt|immediateDescendants|counter|identify|setHeight|setWidth|setTop|setLeft|BODY|_originalWidth|_originalHeight|_originalLeft|_originalTop|clientHeight|clientWidth|originalHeight|originalWidth|originalVisibility|originalPosition|originalDisplay|scrollTo|originalAncestor|compareDocumentPosition|nextNode|addClassName|removeClassName|setAttribute|descendants|firstDescendant|show|hide|ELEMENT_NODE|Updater|lastText|updateComplete|updateContent|sanitizeJSON|force|_getResponseJSON|escape|JSON|_getHeaderJSON|getStatusText|responseXML|Events|onException|evalResponse|interpolate|requestHeaders|2005|overrideMimeType|XMLHttpRequest|setRequestHeaders|KHTML|Safari|getTransport|register|XMLHTTP|ActiveXObject||these|Try|ObjectRange|from|encodeURIComponent|radix|arrayLength|forEach|size|uniq|sorted|inline|flatten|any|collections|eachSlice|Pattern|exec|comp|lt|amp|unescapeHTML|isJSON|sanitize|JSONFilter|sub|useDoubleQuotes|charCodeAt|specialChar|separator|stripTags|extractScripts|matchOne|scriptTag|matchAll|img|1000|lambda|timeout|argumentNames|instanceof|valueOf|subclasses|MobileSafari|add|page|realOffset|horizontal|vertical|overlap|within|instead|use|deprecated|is|Error|After|Bottom|Top|Before|Insertion|childOf||Toggle|DOMContentLoaded|load|dom|fireEvent|ondataavailable|createEventObject|initEvent|detachEvent|srcElement|cancelBubble|stopped|pointerY|pointerX|clientY|clientX|isRightClick|isMiddleClick|isLeftClick|mouseout|fromElement|mouseover|KEY_INSERT|KEY_PAGEDOWN|KEY_PAGEUP|KEY_END|KEY_HOME|KEY_DELETE|KEY_DOWN|KEY_RIGHT|KEY_UP|KEY_LEFT|KEY_ESC|KEY_RETURN|KEY_TAB|KEY_BACKSPACE|change|click|selectedIndex|one|Field|blur|present|setValue|focusFirstElement|getInputs|selectorType|abled|dis|mod|translate|starts|getScrollOffsets|inner|viewport|IFrame|IFRAME|FrameSet|FRAMESET|TableRow||COLGROUP|COL|TableCaption|CAPTION|Image|Anchor|DEL|INS|Quote|H6|H5|H4|H3|H2|H1|Directory|DIR|DList|DL|OList|OL|UList|UL|FieldSet|FIELDSET|Paragraph|TextArea|OptGroup|OPTGROUP|INPUT|FORM|specified|TABLE|999999|rv|onchange|onselect|onreset|onsubmit|onkeyup|onkeydown|onkeypress|onblur|onfocus|onmouseout|onmousemove|onmouseover|onmouseup|onmousedown|ondblclick|onclick|onload|multiple|readonly|longDesc|readOnly|maxLength|encType|accessKey|dateTime|vAlign|rowSpan|colSpan|cellSpacing|cellspacing|cellPadding|cellpadding|normal|hasLayout|fixed|childElements|getElementsBySelector|undoClipping|makeClipping|undoPositioned|makePositioned|block|getOpacity|getComputedStyle|defaultView|cleanWhitespace|toggleClassName|anonymous_element_|previous|down|up|siblings|createContextualFragment|selectNode|createRange|ownerDocument|cloneNode|NOTATION_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_TYPE_NODE|DOCUMENT_NODE|COMMENT_NODE|PROCESSING_INSTRUCTION_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|CDATA_SECTION_NODE|ATTRIBUTE_NODE|snapshotItem|snapshotLength|ORDERED_NODE_SNAPSHOT_TYPE|XPathResult|getElementById|clearTimeout|PeriodicalUpdater|getAllHeaders|responseJSON|Interactive|Loaded|Loading|Uninitialized|https|ecma|java||Failure|Success|300|200|setRequestHeader|close|Connection|charset|javascript|Accept||With|Requested|send|postBody|open|Konqueror|_method|UTF|urlencoded|www|unregister|Microsoft|Msxml2|merge|unset|Math|floor|ceil|round|abs|isFinite|toColorPart|isNaN|intersect|reduce|compact|NodeList|some|every|entries|member|pop|zip|sort|reject|partition|min|max|inGroupsOf|grep|parseQuery|formed|Badly|SyntaxError|Eaeflnr|u00|x1f|x00|dasherize|underscore|fromCharCode|im|truncate|finally|getUTCSeconds|getUTCMinutes|getUTCHours|getUTCDate|getUTCMonth|getUTCFullYear|Date|01|setTimeout|bindAsEventListener|splice|boolean|unknown|RangeError|constructor|secure|Mobile|Apple|AppleWebKit'.split('|'),0,{})) \ No newline at end of file
diff --git a/tools/qtestlib/chart/benchmark_template.html b/tools/qtestlib/chart/benchmark_template.html
deleted file mode 100644
index a7e48becad..0000000000
--- a/tools/qtestlib/chart/benchmark_template.html
+++ /dev/null
@@ -1,202 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <title>Title</title>
- <! Javascript Here>
-
- <script type="text/javascript">
-
-function offsetLabels(labels, offset)
-{
- var copy = new Array();
- for (key in labels) {
- copy[key] = new Array(labels[key][0] + 0.25, labels[key][1]);
- }
- return copy;
-}
-
-function createLogDataSet(inDataSet)
-{
- var logDataSet = {};
- logDataSet.label = inDataSet.label;
- logDataSet.data = [];
-
- if (!inDataSet.data)
- return logDataSet;
-
- var length = inDataSet.data.length;
-
- for (var i = 0; i < length; i++) {
- logDataSet.data[i] = [];
- logDataSet.data[i][0] = inDataSet.data[i][0];
- logDataSet.data[i][1] = Math.log(inDataSet.data[i][1]);
- }
- return logDataSet;
-}
-
-
-function createLogData(inData)
-{
- var logData = [];
-
- // foreach data set;
- var length = inData.length;
- for (var i = 0; i < length; ++i) {
- logData[i] = createLogDataSet(inData[i]);
- }
- return logData;
-}
-
-function createChart() {
-// alert("create chart" + this.chartId)
-
- var dataSet;
-
- if (this.useLinearScale)
- dataSet = this.selectedDataset;
- else
- dataSet = createLogData(this.selectedDataset);
-
- if (this.useLineChart) {
- var f = Flotr.draw($(this.chartId),
- dataSet,
- { legend:{ backgroundColor: '#D2E8FF' }
- , xaxis: { ticks: this.labels, noTicks : 10 }
- , mouse: {
- track: true,
- lineColor: 'purple',
- sensibility: 1,
- trackDecimals: 2,
- trackFormatter: function(obj){ return 'x = ' + obj.x +', y = ' + obj.y; }
- }
- });
-
- } else {
- var f = Flotr.draw($(this.chartId),
- dataSet,
- { legend:{ backgroundColor: '#D2E8FF'}
- , bars: { show: true, lineWidth: 1, barWidth: this.barWidth }
- , xaxis: { ticks: offsetLabels(this.labels, chartOptions.tickOffset), noTicks : 10 }
- });
- }
-}
-
-function checkform()
-{
-// alert("check form " + this.form.id + " " + this.chartId);
- var field = this.form.list
-
- // Apparently list of lenght one is not a list...
- // Display the entire chart if there is only one data series.
- if (!field.length) {
- this.createChart();
- return;
- }
-
- this.selectedDataset = [];
- var data = [];
- var index = 0;
-
- for (i = 0; i < field.length; i++) {
- if (field[i].checked == true) {
- this.selectedDataset[index++] = this.dataset[i];
- } else {
- this.selectedDataset[index++] = [];
- }
- }
- this.createChart();
-}
-
-function createElement(nodeName, name) {
- var node;
- try {
- node = document.createElement("<"+nodeName+" name="+name+">");
- } catch (e) {
- node = document.createElement(nodeName);
- node.name = name;
- }
- return node;
-}
-
-function createFormSelector(form, value, text, type)
-{
- var selector = createElement('input', 'list');
- selector.type = type;
- selector.defaultChecked = true;
- selector.value = value;
-
- form.appendChild(selector);
- form.appendChild(document.createTextNode(text));
- form.appendChild(document.createElement("BR"));
-}
-
-function createCheckBox(form, value, text)
-{
- createFormSelector(form, value, text, "checkbox");
-}
-
-function createRadioButton(form, value, text)
-{
- createFormSelector(form, value, text, "radio");
-}
-
-function buildSeriesSelector(form, chartOptions)
-{
-// alert("form" + form.id + " " + chartOptions.chartId);
- var series = chartOptions.seriesLabels;
- form.onclick = function() { /*alert("fn " + chartOptions.chartId);*/ chartOptions.checkform() };
- for (s = 0; s < series.length; ++s) {
- createCheckBox(form, s, series[s]);
- }
-}
-
-function buildChartTypeSelector()
-{
- createRadioButton(this.chartTypeForm, 0, "Bar Chart");
- createRadioButton(this.chartTypeForm, 1, "Line Chart");
-
- var field = this.chartTypeForm.list;
- if (this.useLineChart)
- field[1].checked = true;
- else
- field[0].checked = true;
-
- var chartOptions = this;
- this.chartTypeForm.onclick = function() {
- var field = chartOptions.chartTypeForm.list;
-
- chartOptions.useLineChart = (field[1].checked == true);
- chartOptions.checkform();
- };
-}
-
-function buildScaleSelector()
-{
- createRadioButton(this.scaleForm, 0, "Linear Scale");
- createRadioButton(this.scaleForm, 1, "Logarithmic Scale");
-
- var field = this.scaleForm.list;
- field[0].checked = true;
- field[1].checked = false;
-
- var chartOptions = this;
- this.scaleForm.onclick = function() {
- var field = chartOptions.scaleForm.list;
-
- chartOptions.useLinearScale = (field[0].checked == true);
- chartOptions.checkform();
- };
-}
-
-
- </script>
- </head>
- <body>
- <h2>
- <! Title Here>
- </h2>
- <! Description Here>
- <! Chart Here>
- </body>
-</html>
diff --git a/tools/qtestlib/chart/chart.pro b/tools/qtestlib/chart/chart.pro
deleted file mode 100644
index 7328e5d473..0000000000
--- a/tools/qtestlib/chart/chart.pro
+++ /dev/null
@@ -1,16 +0,0 @@
-HEADERS += $$PWD/database.h $$PWD/reportgenerator.h
-SOURCES += $$PWD/database.cpp $$PWD/reportgenerator.cpp
-SOURCES += main.cpp
-RESOURCES = $$PWD/chart.qrc
-
-QT += sql xml
-CONFIG += console
-CONFIG -= app_bundle
-
-
-TEMPLATE = app
-DEPENDPATH += .
-INCLUDEPATH += .
-TARGET = chart
-
-
diff --git a/tools/qtestlib/chart/chart.qrc b/tools/qtestlib/chart/chart.qrc
deleted file mode 100644
index 90f782e50c..0000000000
--- a/tools/qtestlib/chart/chart.qrc
+++ /dev/null
@@ -1,9 +0,0 @@
- <!DOCTYPE RCC><RCC version="1.0">
- <qresource>
- <file>chart_template.html</file>
- <file>benchmark_template.html</file>
- <file>3rdparty/excanvas.js</file>
- <file>3rdparty/flotr.js</file>
- <file>3rdparty/prototype.js</file>
- </qresource>
- </RCC> \ No newline at end of file
diff --git a/tools/qtestlib/chart/chart_template.html b/tools/qtestlib/chart/chart_template.html
deleted file mode 100644
index 0a4b81a166..0000000000
--- a/tools/qtestlib/chart/chart_template.html
+++ /dev/null
@@ -1,110 +0,0 @@
- <div>
- <h3>
- <! Test Name Here>
- </h3>
- <div id=
- <! Chart ID Here>
- style="width:900px;height:350px;"></div>
-
- <table cellspacing = "10"><tr>
-
- <td valign = "top">
- <form id=
- <! Form ID Here>
- <b> Data series </b><br>
- </form>
- </td>
-
- <td valign = "top">
- <form id=
- <! ChartTypeForm ID Here>
- <b> Chart Type </b><br>
- </form>
- </td>
-
- <td valign = "top">
- <form id=
- <! ScaleForm ID Here>
- <b> Scale </b><br>
- </form>
- </td>
-
- </tr></table>
-
- </div>
- <script type="text/javascript">
- var chartId =
- <! Chart ID Here>
- ;
-
- var chartType =
- <! Chart Type Here>
- ;
-
- var seriesLabels =
- <! Series Labels Here>
-
- var dataset = [];
- <! Data Goes Here>
-
- var labels = [
- <! Labels Go Here>
- ];
-
- var colors = new Hash({
- <! ColorScheme Here>
- });
-
- var shouldFill =
- <! Fill Setting Here>
- ;
-
- var form = document.getElementById(
- <! Form ID Here>
- );
-
- var chartTypeForm = document.getElementById(
- <! ChartTypeForm ID Here>
- );
-
- var scaleForm = document.getElementById(
- <! ScaleForm ID Here>
- );
-
-
-
- var chartOptions = new Object();
- chartOptions.chartId = chartId;
- chartOptions.chartType = chartType;
- chartOptions.dataset = dataset;
- chartOptions.colors = colors;
- chartOptions.shouldFill = shouldFill;
- chartOptions.labels = labels;
- chartOptions.seriesLabels = seriesLabels;
- chartOptions.useLineChart = true;
- chartOptions.useLinearScale = true;
- chartOptions.createChart = createChart;
-
- chartOptions.ticks = labels;
- chartOptions.barWidth = 0.5;
- chartOptions.tickOffset = 0.25;
-
- chartOptions.useLineChart =
- <! Use Line Chart Here>
-
- chartOptions.chartTypeForm = chartTypeForm;
- chartOptions.buildChartTypeSelector = buildChartTypeSelector;
- chartOptions.buildChartTypeSelector();
-
- chartOptions.scaleForm = scaleForm;
- chartOptions.buildScaleSelector = buildScaleSelector;
- chartOptions.buildScaleSelector();
-
- chartOptions.selectedDataset = dataset;
- chartOptions.checkform = checkform;
- chartOptions.form = form;
- chartOptions.buildSeriesSelector = buildSeriesSelector;
- chartOptions.buildSeriesSelector(form, chartOptions);
- chartOptions.checkform();
- </script>
-
diff --git a/tools/qtestlib/chart/database.cpp b/tools/qtestlib/chart/database.cpp
deleted file mode 100644
index 1f1f7da800..0000000000
--- a/tools/qtestlib/chart/database.cpp
+++ /dev/null
@@ -1,324 +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 tools applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "database.h"
-#include <QtGui>
-#include <QtXml>
-
-QT_BEGIN_NAMESPACE
-// Database schema definition and open/create functions
-
-QString resultsTable = QString("(TestName varchar, TestCaseName varchar, Series varchar, Idx varchar, ") +
- QString("Result varchar, ChartType varchar, Title varchar, ChartWidth varchar, ") +
- QString("ChartHeight varchar, TestTitle varchar, QtVersion varchar, Iterations varchar") +
- QString(")");
-
-void execQuery(QSqlQuery query, bool warnOnFail)
-{
- bool ok = query.exec();
- if (!ok && warnOnFail) {
- qDebug() << "FAIL:" << query.lastQuery() << query.lastError().text();
- }
-}
-
-void execQuery(const QString &spec, bool warnOnFail)
-{
- QSqlQuery query;
- query.prepare(spec);
- execQuery(query, warnOnFail);
-}
-
-QSqlDatabase openDataBase(const QString &databaseFile)
-{
-// qDebug() << "open data base";
- QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
- db.setDatabaseName(databaseFile);
- bool ok = db.open();
- if (!ok)
- qDebug() << "FAIL: could not open database";
- return db;
-}
-
-QSqlDatabase createDataBase(const QString &databaseFile)
-{
-// qDebug() << "create data base";
- QSqlDatabase db = openDataBase(databaseFile);
-
- execQuery("DROP TABLE Results", false);
- execQuery("CREATE TABLE Results " + resultsTable);
-
- return db;
-}
-
-struct Tag
-{
- Tag(QString key, QString value)
- : key(key.trimmed()), value(value.trimmed())
- {
-
- }
-
- QString key;
- QString value;
-};
-
-QList<Tag> parseTag(const QString &tag)
-{
- // Format: key1=value ; key2=value
- // key1=value key2=value
- // value--value
-
- QList<Tag> keyValues;
-
- QString keyValuePairSeparator("");
- if (tag.contains(";"))
- keyValuePairSeparator = ';';
- if (tag.contains("--"))
- keyValuePairSeparator = "--";
-
- foreach (QString keyValue, tag.split(keyValuePairSeparator)) {
- if (keyValue.contains("=")) {
- QStringList parts = keyValue.split("=");
- keyValues.append(Tag(parts.at(0), parts.at(1)));
- } else {
- keyValues.append(Tag(QString(), keyValue)); // no key, just a value.
- }
- }
-
- return keyValues;
-}
-
-void loadXml(const QStringList &fileNames)
-{
- foreach(const QString &fileName, fileNames) {
- QFileInfo fi( fileName );
- loadXml(fileName, fi.fileName());
- }
-}
-
-void loadXml(const QString &fileName, const QString &context)
-{
- QFile f(fileName);
- f.open(QIODevice::ReadOnly);
- loadXml(f.readAll(), context);
-}
-
-void loadXml(const QByteArray &xml, const QString& context)
-{
- QDomDocument doc;
-
- int line;
- int col;
- QString errorMsg;
- if (doc.setContent(xml, &errorMsg, &line, &col) == false) {
- qDebug() << "dom setContent failed" << line << col << errorMsg;
- }
-
- // Grab "Value" from <Environment><QtVersion>Value</QtVersion></Environment>
- QString qtVersion = doc.elementsByTagName("Environment").at(0).toElement().elementsByTagName("QtVersion")
- .at(0).toElement().childNodes().at(0).nodeValue();
- QString testCase = doc.elementsByTagName("TestCase").at(0).toElement().attributeNode("name").value();
-
-// qDebug() << "qt version" << qtVersion;
-// qDebug() << "test case" << testCase;
-
- DataBaseWriter writer;
- writer.testName = testCase; // testCaseName and testName is mixed up in the database writer class
- writer.qtVersion = qtVersion;
-
- QDomNodeList testFunctions = doc.elementsByTagName("TestFunction");
- for (int i = 0; i < testFunctions.count(); ++i) {
- QDomElement function = testFunctions.at(i).toElement();
- QString functionName = function.attributeNode("name").value();
- writer.testCaseName = functionName; // testCaseName and testName is mixed up in the database writer class
-
-// qDebug() << "fn" << functionName;
-
- QDomNodeList results = function.elementsByTagName("BenchmarkResult");
- for (int j = 0; j < results.count(); ++j) {
- QDomElement result = results.at(j).toElement();
- QString tag = result.attributeNode("tag").value();
-
- Q_UNUSED(context);
-// if (!context.isEmpty())
-// tag += QString(" (%1)").arg(context);
-
- QString series;
- QString index;
-
- // By convention, "--" separates series and indexes in tags.
- if (tag.contains("--")) {
- QStringList parts = tag.split("--");
- series = parts.at(0);
- index = parts.at(1);
- } else {
- series = tag;
- }
-
- QString resultString = result.attributeNode("value").value();
- QString iterationCount = result.attributeNode("iterations").value();
- double resultNumber = resultString.toDouble() / iterationCount.toDouble();
- writer.addResult(series, index, QString::number(resultNumber), iterationCount);
-// qDebug() << "result" << series << index << tag << resultString << iterationCount;
- }
- }
-}
-
-void displayTable(const QString &table)
-{
- QSqlTableModel *model = new QSqlTableModel();
- model->setTable(table);
- model->select();
- QTableView *view = new QTableView();
- view->setModel(model);
- view->show();
-}
-
-void printDataBase()
-{
- QSqlQuery query;
- query.prepare("SELECT TestName, TestCaseName, Result FROM Results;");
- bool ok = query.exec();
- qDebug() << "printDataBase ok?" << ok;
-
- query.next();
- qDebug() << "";
- qDebug() << "Benchmark" << query.value(0).toString();
- query.previous();
-
- while (query.next()) {
- // QString country = query.value(fieldNo).toString();
- // doSomething(country);
- qDebug() << "result for" << query.value(1).toString() << query.value(2).toString();
- }
-}
-
-// TempTable implementation
-
-static int tempTableIdentifier = 0;
-TempTable::TempTable(const QString &spec)
-{
- m_name = "TempTable" + QString::number(tempTableIdentifier++);
- execQuery("CREATE TEMP TABLE " + m_name + " " + spec);
-}
-
-TempTable::~TempTable()
-{
- // ref count and drop it?
-}
-
-QString TempTable::name()
-{
- return m_name;
-}
-
-// DataBaseWriter implementation
-
-DataBaseWriter::DataBaseWriter()
-{
- disable = false;
- chartSize = QSize(800, 400);
- databaseFileName = ":memory:";
- qtVersion = QT_VERSION_STR;
-}
-
-void DataBaseWriter::openDatabase()
-{
- db = openDataBase(databaseFileName);
-}
-
-void DataBaseWriter::createDatabase()
-{
- db = createDataBase(databaseFileName);
-}
-
-void DataBaseWriter::beginTransaction()
-{
- if (db.transaction() == false) {
- qDebug() << db.lastError();
- qFatal("no transaction support");
- }
-}
-
-void DataBaseWriter::commitTransaction()
-{
- db.commit();
-}
-
-void DataBaseWriter::rollbackTransaction()
-{
- db.rollback();
-}
-
-void DataBaseWriter::addResult(const QString &result)
-{
- return addResult(QString(), QString(), result);
-}
-
-void DataBaseWriter::addResult(const QString &series, const QString &index, const QString &result, const QString &iterations)
-{
- if (disable)
- return;
-
- QSqlQuery query;
-
- query.prepare("INSERT INTO Results (TestName, TestCaseName, Series, Idx, Result, ChartWidth, ChartHeight, Title, TestTitle, ChartType, QtVersion, Iterations) "
- "VALUES (:TestName, :TestCaseName, :Series, :Idx, :Result, :ChartWidth, :ChartHeight, :Title, :TestTitle, :ChartType, :QtVersion, :Iterations)");
- query.bindValue(":TestName", testName);
- query.bindValue(":TestCaseName", testCaseName);
- query.bindValue(":Series", series);
- query.bindValue(":Idx", index);
- query.bindValue(":Result", result);
- query.bindValue(":ChartWidth", chartSize.width());
- query.bindValue(":ChartHeight", chartSize.height());
- query.bindValue(":Title", chartTitle);
- query.bindValue(":TestTitle", testTitle);
- query.bindValue(":QtVersion", qtVersion);
- query.bindValue(":Iterations", iterations);
-
-
- if (chartType == LineChart)
- query.bindValue(":ChartType", "LineChart");
- else
- query.bindValue(":ChartType", "BarChart");
- execQuery(query);
-}
-
-QT_END_NAMESPACE
diff --git a/tools/qtestlib/chart/reportgenerator.cpp b/tools/qtestlib/chart/reportgenerator.cpp
deleted file mode 100644
index c3b42a0123..0000000000
--- a/tools/qtestlib/chart/reportgenerator.cpp
+++ /dev/null
@@ -1,563 +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 tools applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "reportgenerator.h"
-
-// Report generator file utility functions
-QT_BEGIN_NAMESPACE
-
-QList<QByteArray> readLines(const QString &fileName)
-{
- QList<QByteArray> lines;
- QFile f(fileName);
- f.open(QIODevice::ReadOnly | QIODevice::Text);
- while(!f.atEnd())
- lines.append(f.readLine());
- return lines;
-}
-
-void writeLines(const QString &fileName, const QList<QByteArray> &lines)
-{
- QFile f(fileName);
- f.open(QIODevice::WriteOnly | QIODevice::Text);
- foreach(const QByteArray line, lines)
- f.write(line);
-}
-
-void writeFile(const QString &fileName, const QByteArray &contents)
-{
- QFile f(fileName);
- f.open(QIODevice::WriteOnly | QIODevice::Append);
- f.write(contents);
-}
-
-// Report generator database utility functions
-
-QStringList select(const QString &field, const QString &tableName)
-{
- QSqlQuery query;
- query.prepare("SELECT DISTINCT " + field +" FROM " + tableName);
- bool ok = query.exec();
- Q_UNUSED(ok);
-// if (!ok)
-// qDebug() << "select unique ok" << ok;
-
- QStringList values;
- while (query.next()) {
- values += query.value(0).toString();
- }
- return values;
-}
-
-QStringList selectUnique(const QString &field, const QString &tableName)
-{
- QSqlQuery query;
- query.prepare("SELECT DISTINCT " + field +" FROM " + tableName);
- bool ok = query.exec();
- Q_UNUSED(ok);
-// if (!ok)
-// qDebug() << "select unique ok" << ok;
-
- QStringList values;
- while (query.next()) {
- values += query.value(0).toString();
- }
- return values;
-}
-
-QSqlQuery selectFromSeries(const QString &serie, const QString &column, const QString &tableName, const QString &seriesName)
-{
- QSqlQuery query;
- if (serie == QString())
- query.prepare("SELECT " + column + " FROM " + tableName);
- else
- query.prepare("SELECT " + column + " FROM " + tableName + " WHERE " + seriesName + "='" + serie + "'");
- /*bool ok =*/ query.exec();
-
-
-// qDebug() << "selectDataFromSeries ok?" << ok << query.size();
- return query;
-}
-
-int countDataFromSeries(const QString &serie, const QString &tableName, const QString &seriesName)
-{
-// qDebug() << "count" << serie << "in" << tableName;
- QSqlQuery query;
- query.prepare("SELECT COUNT(Result) FROM " + tableName + " WHERE" + seriesName + "='" + serie + "'");
- bool ok = query.exec();
- if (!ok) {
- qDebug() << "query fail" << query.lastError();
- }
-
- qDebug() << "countDataFromSeries ok?" << ok << query.size();
- query.next();
- return query.value(0).toInt();
-}
-
-// Report generator output utility functions
-
-QList<QByteArray> printData(const QString &tableName, const QString &seriesName, const QString &indexName)
-{
- QList<QByteArray> output;
- QStringList series = selectUnique(seriesName, tableName);
-// qDebug() << "series" << series;
- if (series.isEmpty())
- series+=QString();
-
- foreach (QString serie, series) {
- QSqlQuery data = selectFromSeries(serie, "Result", tableName, seriesName);
- QSqlQuery labels = selectFromSeries(serie, indexName, tableName, seriesName);
-
- QByteArray dataLine = "dataset.push({ data: [";
- int i = 0;
- while (data.next() && labels.next()) {
- QString label = labels.value(0).toString();
-
- QString labelString;
- bool ok;
- label.toInt(&ok);
- if (ok)
- labelString = label;
- // else
- labelString = QString::number(i);
-
- dataLine += ("[" + labelString + ", " + data.value(0).toString() + "]");
-
- ++i;
- if (data.next()) {
- dataLine += ", ";
- data.previous();
- }
- }
- dataLine += "], label : \"" + serie + "\" });\n";
- output.append(dataLine);
- }
- return output;
-}
-
-// Determines if a line chart should be used. Returns true if the first label is numerical.
-bool useLineChart(const QString &tableName, const QString &seriesName, const QString &indexName)
-{
- QList<QByteArray> output;
- QStringList series = selectUnique(seriesName, tableName);
- if (series.isEmpty())
- return false;
-
- QSqlQuery data = selectFromSeries(series[0], indexName, tableName, seriesName);
-
- if (data.next()) {
- QString label = data.value(0).toString();
- bool ok;
- label.toDouble(&ok);
- return ok;
- }
-
- return false;
-}
-
-int countLabels(const QString &tableName, const QString &seriesName, const QString &indexName)
-{
- QStringList series = selectUnique(seriesName, tableName);
- if (series.isEmpty())
- return 0;
- QSqlQuery data = selectFromSeries(series[0], indexName, tableName, seriesName);
- int count = 0;
- while (data.next())
- count++;
-
- return count;
-}
-
-
-QList<QByteArray> printLabels(const QString &tableName, const QString &seriesName, const QString &indexName)
-{
- QList<QByteArray> output;
- QStringList series = selectUnique(seriesName, tableName);
- if (series.isEmpty())
- return QList<QByteArray>();
-
- QSqlQuery data = selectFromSeries(series[0], indexName, tableName, seriesName);
-
- int count = 0;
- while (data.next())
- count++;
-
- data.first(); data.previous();
-
- const int labelCount = 10;
- int skip = count / labelCount;
-
- QByteArray dataLine;
- int i = 0;
- while (data.next()) {
- dataLine += ("[" + QByteArray::number(i) + ",\"" + data.value(0).toString() + "\"]");
- ++i;
- if (data.next()) {
- dataLine += ", ";
- data.previous();
- }
-
- // skip labels.
- i += skip;
- for (int j = 0; j < skip; ++j)
- data.next();
- }
- dataLine += "\n";
- output.append(dataLine);
- return output;
-}
-
-QByteArray printSeriesLabels(const QString &tableName, const QString &seriesColumnName)
-{
- QByteArray output;
- QStringList series = selectUnique(seriesColumnName, tableName);
- if (series.isEmpty())
- return "[];\n";
-
- output += "[";
-
- foreach(const QString &serie, series) {
- output += "\"" + serie.toLocal8Bit() + "\",";
- }
- output.chop(1); //remove last comma
- output += "]\n";
- return output;
-}
-
-void addJavascript(QList<QByteArray> *output, const QString &fileName)
-{
- output->append("<script type=\"text/javascript\">\n");
- (*output) += readLines(fileName);
- output->append("</script>\n");
-}
-
-void addJavascript(QList<QByteArray> *output)
-{
- addJavascript(output, ":3rdparty/prototype.js");
- addJavascript(output, ":3rdparty/excanvas.js");
- addJavascript(output, ":3rdparty/flotr.js");
-}
-
-TempTable selectRows(const QString &sourceTable, const QString &column, const QString &value)
-{
- TempTable tempTable(resultsTable);
-
- QSqlQuery query;
- query.prepare("INSERT INTO " + tempTable.name() + " SELECT * FROM " + sourceTable +
- " WHERE " + column + "='" + value + "'");
- execQuery(query);
-
-// displayTable(tempTable.name());
-
- return tempTable;
-}
-
-TempTable mergeVersions(const QString &)
-{
-
-// QtVersion - As series
-// Result - (free)
-// Idx - match
-// TestName - match
-// CaseName - match
-
-// (Series - average)
-/*
- TempTable tempTable(resultsTable);
- QStringlist versions = selectUnique("QtVersions", sourceTable);
-
- QSqlQuery oneVersion = select(WHERE QtVersions = versions.at(0))
- while (oneVersion.next) {
- QSqlQuery otherversions = selectMatches(QStringList() << "TestName" << "TestCaseName" << "Idx")
- while (otherversions.next) {
- insert(temptable
- }
- }
-*/
- return TempTable("");
-}
-
-QStringList fieldPriorityList = QStringList() << "Idx" << "Series" << "QtVersion";
-
-struct IndexSeriesFields
-{
- QString index;
- QString series;
-};
-
-IndexSeriesFields selectFields(const QString &table)
-{
- IndexSeriesFields fields;
- foreach (QString field, fieldPriorityList) {
-// qDebug() << "unique" << field << selectUnique(field, table).count();
- QStringList rows = selectUnique(field, table);
-
- if (rows.count() <= 1 && rows.join("") == QString(""))
- continue;
-
- if (fields.index.isEmpty()) {
- fields.index = field;
- continue;
- }
-
- if (fields.series.isEmpty()) {
- fields.series = field;
- break;
- }
- }
- return fields;
-}
-
-TempTable selectTestCase(const QString &testCase, const QString &sourceTable)
-{
- return selectRows(sourceTable, QLatin1String("TestCaseName"), testCase);
-}
-
-QString field(const QSqlQuery &query, const QString &name)
-{
- return query.value(query.record().indexOf(name)).toString();
-}
-
-QSqlQuery selectAllResults(const QString &tableName)
-{
- QSqlQuery query;
- query.prepare("SELECT * FROM " + tableName);
- execQuery(query);
- return query;
-}
-
-void printTestCaseResults(const QString &testCaseName)
-{
-// QStringList testCases = selectUnique("TestCaseName", "Results");
- qDebug() << "";
- qDebug() << "Results for benchmark" << testCaseName;
- TempTable temptable = selectTestCase(testCaseName, "Results");
- QSqlQuery query = selectAllResults(temptable.name());
- if (query.isActive() == false) {
- qDebug() << "No results";
- return;
- }
-
- query.next();
-
- if (field(query, "Idx") == QString()) {
- do {
- qDebug() << "Result:" << field(query, "result");
- } while (query.next());
- } else if (field(query, "Series") == QString()) {
- do {
- qDebug() << field(query, "Idx") << " : " << field(query, "result");
- } while (query.next());
- } else {
- do {
- qDebug() << field(query, "Series") << " - " << field(query, "Idx") << " : " << field(query, "result");
- } while (query.next());
- }
-
- qDebug() << "";
-}
-
-
-// ReportGenerator implementation
-
-ReportGenerator::ReportGenerator()
-{
- m_colorScheme = QList<QByteArray>() << "#a03b3c" << "#3ba03a" << "#3a3ba0" << "#3aa09f" << "#39a06b" << "#a09f39";
-}
-
-
-void ReportGenerator::writeReport(const QString &tableName, const QString &fileName, bool combineQtVersions)
-{
- QStringList testCases = selectUnique("TestCaseName", tableName);
- QList<QByteArray> lines = readLines(":benchmark_template.html");
- QList<QByteArray> output;
-
- foreach(QByteArray line, lines) {
- if (line.contains("<! Chart Here>")) {
- foreach (const QString testCase, testCases) {
- TempTable testCaseTable = selectTestCase(testCase, tableName);
- output += writeChart(testCaseTable.name(), combineQtVersions);
- }
- } else if (line.contains("<! Title Here>")) {
- QStringList name = selectUnique("TestName", tableName);
- output += "Test: " + name.join("").toLocal8Bit();
- } else if (line.contains("<! Description Here>")) {
- output += selectUnique("TestTitle", tableName).join("").toLocal8Bit();
- } else if (line.contains("<! Javascript Here>")){
- addJavascript(&output);
- } else {
- output.append(line);
- }
- }
-
- m_fileName = fileName;
-
- writeLines(m_fileName, output);
- qDebug() << "Wrote report to" << m_fileName;
-}
-
-void ReportGenerator::writeReports()
-{
-/*
- QStringList versions = selectUnique("QtVersion", "Results");
-
- // qDebug() << "versions" << versions;
-
- foreach (QString version, versions) {
- QString fileName = "results-" + version + ".html";
- TempTable versionTable = selectRows("Results", "QtVersion", version);
- writeReport(versionTable.name(), fileName, false);
- }
-*/
- writeReport("Results", "results.html", false);
-}
-
-QString ReportGenerator::fileName()
-{
- return m_fileName;
-}
-
-QList<QByteArray> ReportGenerator::writeChart(const QString &tableName, bool combineQtVersions)
-{
- QSqlQuery query;
- query.prepare("SELECT TestName, Series, Idx, Result, ChartWidth, ChartHeight, Title, TestCaseName, ChartType, QtVersion FROM " + tableName);
- execQuery(query);
-
- QString seriesName;
- QString indexName;
-
- if (combineQtVersions) {
- IndexSeriesFields fields = selectFields(tableName);
- seriesName = fields.series;
- indexName = fields.index;
- } else {
- seriesName = "Series";
- indexName = "Idx";
- }
-
- QList<QByteArray> data = printData(tableName, seriesName, indexName);
- QList<QByteArray> labels = printLabels(tableName, seriesName, indexName);
- QByteArray seriesLabels = printSeriesLabels(tableName, seriesName);
- QByteArray useLineChartString = useLineChart(tableName, seriesName, indexName) ? "true" : "false" ;
-
- query.next();
- QString testName = query.value(0).toString();
- QSize size(query.value(4).toInt(), query.value(5).toInt());
-// QString title = "Test Function: " + query.value(7).toString() + " - " + query.value(6).toString();
- QString title = "Test Function: " + query.value(7).toString();
- QString chartId = "\"" + query.value(7).toString() + "\"";
- QString formId = "\"" + query.value(7).toString() + "form\"";
- QString chartTypeFormId = "\"" + query.value(7).toString() + "chartTypeform\"";
- QString scaleFormId = "\"" + query.value(7).toString() + "scaleform\"";
- QString type = query.value(8).toString();
-
- // Skip chart generation if there isn't enough data.
- if (countLabels(tableName, seriesName, indexName) < 2) {
- qDebug() << title.toAscii() << "No chartable data. (See the \"series\" test function"
- << "in examples/qtestlib/tutorial5 for an example.) ";
- return QList<QByteArray>() << title.toAscii() << " (no chartable data)"; // TODO: genrate text table here.
- }
-
-// QString qtVersion = query.value(9).toString();
- query.previous();
-
- QString sizeString = "height=\"" + QString::number(size.height()) + "\" width=\"" + QString::number(size.width()) + "\"";
-
- QString fillString;
- if (type == "LineChart")
- fillString = "false";
- else
- fillString = "true";
-
- QByteArray colors = printColors(tableName, seriesName);
-
- QList<QByteArray> lines = readLines(":chart_template.html");
- QList<QByteArray> output;
-
- foreach(QByteArray line, lines) {
- if (line.contains("<! Test Name Here>")) {
- output.append(title.toLocal8Bit());
- } else if (line.contains("<! Chart ID Here>")) {
- output += chartId.toLocal8Bit();
- } else if (line.contains("<! Form ID Here>")) {
- output += formId.toLocal8Bit();
- } else if (line.contains("<! ChartTypeForm ID Here>")) {
- output += chartTypeFormId.toLocal8Bit();
- } else if (line.contains("<! ScaleForm ID Here>")) {
- output += scaleFormId.toLocal8Bit();
- } else if (line.contains("<! Size>")) {
- output += sizeString.toLocal8Bit();
- } else if (line.contains("<! ColorScheme Here>")) {
- output += colors;
- } else if (line.contains("<! Data Goes Here>")) {
- output += data;
- } else if (line.contains("<! Labels Go Here>")) {
- output += labels;
- } else if (line.contains("<! Use Line Chart Here>")) {
- output += useLineChartString + ";";
- } else if (line.contains("<! Chart Type Here>")) {
- output += "\"" + type.toLocal8Bit() + "\"";
- } else if (line.contains("<! Fill Setting Here>")) {
- output += fillString.toLocal8Bit();
- } else if (line.contains("<! Series Labels Here>")) {
- output += seriesLabels;
- } else {
- output.append(line);
- }
- }
-
- return output;
-}
-
-QByteArray ReportGenerator::printColors(const QString &tableName, const QString &seriesName)
-{
- QByteArray colors;
- int i = 0;
- QStringList series = selectUnique(seriesName, tableName);
- foreach (const QString &serie, series) {
- colors.append("'" + serie.toLocal8Bit() + "': '" + m_colorScheme.at(i % m_colorScheme.count()) + "',\n");
- ++ i;
- }
- colors.chop(2); // remove last comma
- colors.append("\n");
- return colors;
-}
-
-QT_END_NAMESPACE
diff --git a/tools/qtestlib/qtestlib.pro b/tools/qtestlib/qtestlib.pro
index 9ff7360ab0..da94e81ec1 100644
--- a/tools/qtestlib/qtestlib.pro
+++ b/tools/qtestlib/qtestlib.pro
@@ -1,4 +1,4 @@
TEMPLATE = subdirs
-!wince*: SUBDIRS += updater chart
+!wince*: SUBDIRS += updater
wince*: contains(QT_CONFIG, cetest): SUBDIRS += wince
CONFIG += ordered
diff --git a/tools/qvfb/qvfb.pro b/tools/qvfb/qvfb.pro
index dde7e8dc6a..c101d00a50 100644
--- a/tools/qvfb/qvfb.pro
+++ b/tools/qvfb/qvfb.pro
@@ -35,7 +35,7 @@ SOURCES = qvfb.cpp \
../../src/gui/embedded/qlock.cpp \
../../src/gui/embedded/qwssignalhandler.cpp
-include($$QT_SOURCE_TREE/tools/shared/deviceskin/deviceskin.pri)
+include(../shared/deviceskin/deviceskin.pri)
contains(QT_CONFIG, opengl) {
QT += opengl
diff --git a/tools/qvfb/translations/translations.pro b/tools/qvfb/translations/translations.pro
deleted file mode 100644
index b0b1af4f43..0000000000
--- a/tools/qvfb/translations/translations.pro
+++ /dev/null
@@ -1,35 +0,0 @@
-# Include those manually as they do not contain any directory specification
-
-FORMS = ../config.ui
-HEADERS = ../qvfb.h \
- ../qvfbview.h \
- ../qvfbratedlg.h \
- ../qanimationwriter.h \
- ../gammaview.h \
- ../qvfbprotocol.h \
- ../qvfbshmem.h \
- ../qvfbmmap.h \
- ../../../src/gui/embedded/qvfbhdr.h \
- ../../../src/gui/embedded/qlock_p.h \
- ../../../src/gui/embedded/qwssignalhandler_p.h \
- ../../shared/deviceskin/deviceskin.h
-
-SOURCES = ../qvfb.cpp \
- ../qvfbview.cpp \
- ../qvfbratedlg.cpp \
- ../main.cpp \
- ../qanimationwriter.cpp \
- ../qvfbprotocol.cpp \
- ../qvfbshmem.cpp \
- ../qvfbmmap.cpp \
- ../../../src/gui/embedded/qlock.cpp \
- ../../../src/gui/embedded/qwssignalhandler.cpp \
- ../../shared/deviceskin/deviceskin.cpp
-
-TR_DIR = $$PWD/../../../translations
-TRANSLATIONS = \
- $$TR_DIR/qvfb_hu.ts \
- $$TR_DIR/qvfb_pl.ts \
- $$TR_DIR/qvfb_ru.ts \
- $$TR_DIR/qvfb_zh_CN.ts \
- $$TR_DIR/qvfb_zh_TW.ts
diff --git a/translations/assistant_pl.ts b/translations/assistant_pl.ts
index c8c4e5ff80..8d3c8a3bb2 100644
--- a/translations/assistant_pl.ts
+++ b/translations/assistant_pl.ts
@@ -124,6 +124,11 @@ Powód:
<source>New Folder</source>
<translation>Nowy katalog</translation>
</message>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/bookmarkdialog.cpp" line="+227"/>
+ <source>Rename Folder</source>
+ <translation>Zmień nazwę katalogu</translation>
+ </message>
</context>
<context>
<name>BookmarkManager</name>
@@ -143,7 +148,7 @@ Powód:
<translation>Zamierzasz usunąć katalog co spowoduje również usunięcie jego zawartości. Czy chcesz kontynuować?</translation>
</message>
<message>
- <location line="+147"/>
+ <location line="+148"/>
<source>Manage Bookmarks...</source>
<translation>Zarządzanie zakładkami...</translation>
</message>
@@ -189,6 +194,148 @@ Powód:
</message>
</context>
<context>
+ <name>BookmarkManagerWidget</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/bookmarkmanagerwidget.ui"/>
+ <source>Manage Bookmarks</source>
+ <translation>Zarządzanie zakładkami</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Search:</source>
+ <translation>Wyszukaj:</translation>
+ </message>
+ <message>
+ <location/>
+ <location filename="../tools/assistant/tools/assistant/bookmarkmanagerwidget.cpp" line="+258"/>
+ <source>Remove</source>
+ <translation>Usuń</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Import and Backup</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location/>
+ <location filename="../tools/assistant/tools/assistant/bookmarkmanagerwidget.cpp" line="-30"/>
+ <source>OK</source>
+ <translation>OK</translation>
+ </message>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/bookmarkmanagerwidget.cpp" line="-142"/>
+ <source>Import...</source>
+ <translation>Importuj...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Export...</source>
+ <translation>Exportuj...</translation>
+ </message>
+ <message>
+ <location line="+112"/>
+ <source>Open File</source>
+ <translation>Otwórz plik</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <location line="+16"/>
+ <source>Files (*.xbel)</source>
+ <translation>Pliki (*.xbel)</translation>
+ </message>
+ <message>
+ <location line="-1"/>
+ <source>Save File</source>
+ <translation>Zachowaj plik</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Qt Assistant</source>
+ <translation>Qt Assistant</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Unable to save bookmarks.</source>
+ <translation>Nie można zachować zakładek.</translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <source>You are goingto delete a Folder, this will also&lt;br&gt; remove it&apos;s content. Are you sure to continue?</source>
+ <translation>Zamierzasz usunąć katalog co spowoduje również&lt;br&gt;usunięcie jego zawartości. Czy chcesz kontynuować?</translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <source>Delete Folder</source>
+ <translation>Usuń katalog</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Rename Folder</source>
+ <translation>Zmień nazwę katalogu</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Show Bookmark</source>
+ <translation>Pokaż zakładkę</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Show Bookmark in New Tab</source>
+ <translation>Pokaż zakładkę w nowej karcie</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Delete Bookmark</source>
+ <translation>Usuń zakładkę</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Rename Bookmark</source>
+ <translation>Zmień nazwę zakładki</translation>
+ </message>
+</context>
+<context>
+ <name>BookmarkModel</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/bookmarkmodel.cpp" line="+88"/>
+ <source>Name</source>
+ <translation>Nazwa</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Address</source>
+ <translation>Adres</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Bookmarks Menu</source>
+ <translation>Menu zakładek</translation>
+ </message>
+</context>
+<context>
+ <name>BookmarkWidget</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/bookmarkwidget.ui"/>
+ <source>Bookmarks</source>
+ <translation>Zakładki</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Filter:</source>
+ <translation>Filtr:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Add</source>
+ <translation>Dodaj</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Remove</source>
+ <translation>Usuń</translation>
+ </message>
+</context>
+<context>
<name>CentralWidget</name>
<message>
<location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="+121"/>
@@ -327,6 +474,29 @@ Powód:
</message>
</context>
<context>
+ <name>FindWidget</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/findwidget.cpp" line="+85"/>
+ <source>Previous</source>
+ <translation>Poprzedni</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Next</source>
+ <translation>Następny</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Case Sensitive</source>
+ <translation>Uwzględniaj wielkość liter</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>FontPanel</name>
<message>
<location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+63"/>
@@ -366,6 +536,21 @@ Powód:
<source>&lt;title&gt;Error 404...&lt;/title&gt;&lt;div align=&quot;center&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;h1&gt;The page could not be found&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</source>
<translation>&lt;title&gt;Błąd 404...&lt;/title&gt;&lt;div align=&quot;center&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;h1&gt;Strona nie może być znaleziona&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</translation>
</message>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/helpviewer_qtb.cpp" line="+230"/>
+ <source>Copy &amp;Link Location</source>
+ <translation>Skopiuj &amp;odsyłacz</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Open Link in New Tab Ctrl+LMB</source>
+ <translation>Otwórz odsyłacz w nowej karcie Ctrl+LMB</translation>
+ </message>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/helpviewer_qwv.cpp" line="+260"/>
+ <source>Open Link in New Tab</source>
+ <translation>Otwórz odsyłacz w nowej karcie</translation>
+ </message>
</context>
<context>
<name>IndexWindow</name>
diff --git a/translations/check-ts.pl b/translations/check-ts.pl
index 5f38703fe0..067cad87af 100755
--- a/translations/check-ts.pl
+++ b/translations/check-ts.pl
@@ -43,19 +43,18 @@
use strict;
-# "qt" must come last to avoid prefix matching.
-my @groups = ("assistant", "designer", "linguist", "qt_help", "qtconfig", "qvfb", "qt");
+my @groups = ("qt", "assistant", "designer", "linguist", "qt_help", "qtconfig", "qvfb");
my %scores = ();
my %langs = ();
-my $files = join("\n", <*.ts>);
+my $files = join("\n", <*_??.ts>);
my $res = `xmlpatterns -param files=\"$files\" check-ts.xq`;
for my $i (split(/ /, $res)) {
- $i =~ /^([^.]+).ts:(.*)$/;
+ $i =~ /^([^.]+)\.ts:(.*)$/;
my ($fn, $pc) = ($1, $2);
for my $g (@groups) {
- if ($fn =~ /^${g}_(.*)$/) {
+ if ($fn =~ /^${g}_((.._)?..)$/) {
my $lang = $1;
$scores{$g}{$lang} = $pc;
$langs{$lang} = 1;
@@ -64,10 +63,6 @@ for my $i (split(/ /, $res)) {
}
}
-# now we move "qt" to the front, as it should be the first column.
-pop @groups;
-unshift @groups, "qt";
-
my $code = "";
print "L10n ";
diff --git a/translations/designer_pl.ts b/translations/designer_pl.ts
index 0298a272b7..cadcc2b271 100644
--- a/translations/designer_pl.ts
+++ b/translations/designer_pl.ts
@@ -506,7 +506,7 @@
<translation>Usuń pasek narzędzi</translation>
</message>
<message>
- <location filename="../tools/designer/src/lib/shared/qdesigner_menu.cpp" line="+1194"/>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_menu.cpp" line="+1196"/>
<source>Set action text</source>
<translation>Ustaw tekst akcji</translation>
</message>
@@ -587,14 +587,14 @@
<translation>Dodaj przyciski do grupy</translation>
</message>
<message>
- <location line="+8"/>
<location filename="../tools/designer/src/lib/shared/formlayoutmenu.cpp" line="+458"/>
+ <location filename="../tools/designer/src/components/taskmenu/button_taskmenu.cpp" line="+8"/>
<source>Add &apos;%1&apos; to &apos;%2&apos;</source>
<extracomment>Command description for adding buttons to a QButtonGroup</extracomment>
<translation>Dodaj &apos;%1&apos; do &apos;%2&apos;</translation>
</message>
<message>
- <location line="+14"/>
+ <location filename="../tools/designer/src/components/taskmenu/button_taskmenu.cpp" line="+14"/>
<source>Remove buttons from group</source>
<translation>Usuń przyciski z grupy</translation>
</message>
@@ -703,7 +703,7 @@
<context>
<name>ConnectionDelegate</name>
<message>
- <location filename="../tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp" line="+644"/>
+ <location filename="../tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp" line="+645"/>
<source>&lt;object&gt;</source>
<translation>&lt;obiekt&gt;</translation>
</message>
@@ -1030,13 +1030,21 @@
<message>
<location filename="../tools/designer/src/lib/uilib/formbuilderextra.cpp" line="+375"/>
<source>Invalid stretch value for &apos;%1&apos;: &apos;%2&apos;</source>
- <extracomment>Parsing layout stretch values</extracomment>
+ <extracomment>Parsing layout stretch values
+----------
+Parsing layout stretch values
+----------
+Parsing layout stretch values</extracomment>
<translation>Niepoprawna wartość rozciągniecia dla &apos;%1&apos;: &apos;%2&apos;</translation>
</message>
<message>
<location line="+62"/>
<source>Invalid minimum size for &apos;%1&apos;: &apos;%2&apos;</source>
- <extracomment>Parsing grid layout minimum size values</extracomment>
+ <extracomment>Parsing grid layout minimum size values
+----------
+Parsing grid layout minimum size values
+----------
+Parsing grid layout minimum size values</extracomment>
<translation>Niepoprawna wartość minimalna dla &apos;%1&apos;: &apos;%2&apos;</translation>
</message>
</context>
@@ -1445,7 +1453,7 @@ To wskazuje na niespójność w pliku ui.</translation>
<translation>Podczas przypisywania kolejności tabulacji: widżet &apos;%1&apos; nie został znaleziony.</translation>
</message>
<message>
- <location line="+908"/>
+ <location line="+923"/>
<source>Invalid QButtonGroup reference &apos;%1&apos; referenced by &apos;%2&apos;.</source>
<translation>Niepoprawny odnośnik QButtonGroup &apos;%1&apos;, użyty w &apos;%2&apos;.</translation>
</message>
@@ -1988,7 +1996,7 @@ Czy chcesz spróbować ponownie?</translation>
<context>
<name>QDesignerMenu</name>
<message>
- <location filename="../tools/designer/src/lib/shared/qdesigner_menu.cpp" line="-1179"/>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_menu.cpp" line="-1180"/>
<source>Type Here</source>
<translation>Wpisz tutaj</translation>
</message>
@@ -2009,12 +2017,12 @@ Czy chcesz spróbować ponownie?</translation>
</message>
<message>
<location line="-300"/>
- <location line="+648"/>
+ <location line="+649"/>
<source>Add separator</source>
<translation>Dodaj separator</translation>
</message>
<message>
- <location line="-680"/>
+ <location line="-681"/>
<source>Insert separator</source>
<translation>Wstaw separator</translation>
</message>
@@ -2088,7 +2096,7 @@ Czy chcesz spróbować ponownie?</translation>
<context>
<name>QDesignerPropertySheet</name>
<message>
- <location filename="../tools/designer/src/lib/shared/qdesigner_propertysheet.cpp" line="+758"/>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_propertysheet.cpp" line="+762"/>
<source>Dynamic Properties</source>
<translation>Dynamiczne właściwości</translation>
</message>
@@ -2279,7 +2287,11 @@ Strony pojemników powinny być dodawane jedynie poprzez wyspecyfikowanie ich w
<message>
<location filename="../tools/designer/src/lib/uilib/formbuilder.cpp" line="+168"/>
<source>An empty class name was passed on to %1 (object name: &apos;%2&apos;).</source>
- <extracomment>Empty class name passed to widget factory method</extracomment>
+ <extracomment>Empty class name passed to widget factory method
+----------
+Empty class name passed to widget factory method
+----------
+Empty class name passed to widget factory method</extracomment>
<translation>Pusta nazwa klasy została przekazana do %1 (nazwa obiektu: &apos;%2&apos;).</translation>
</message>
<message>
@@ -3960,6 +3972,54 @@ Czy chcesz nadpisać szablon?</translation>
</message>
</context>
<context>
+ <name>VideoPlayerTaskMenu</name>
+ <message>
+ <location filename="../tools/designer/src/plugins/phononwidgets/videoplayertaskmenu.cpp" line="+79"/>
+ <source>Available Mime Types</source>
+ <translation>Dostępne typy mime</translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <source>Display supported mime types...</source>
+ <translation>Pokaż dostępne typy mime...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Load...</source>
+ <translation>Załaduj...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Play</source>
+ <translation>Odtwórz</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Pause</source>
+ <translation>Pauza</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Stop</source>
+ <translation>Zatrzymaj</translation>
+ </message>
+ <message>
+ <location line="+32"/>
+ <source>Choose Video Player Media Source</source>
+ <translation>Wybierz źródło odtwarzacza wideo</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>An error has occurred in &apos;%1&apos;: %2</source>
+ <translation>Wystąpił błąd w &quot;%1&quot;: %2</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Video Player Error</source>
+ <translation>Błąd odtwarzacza wideo</translation>
+ </message>
+</context>
+<context>
<name>WidgetDataBase</name>
<message>
<location filename="../tools/designer/src/lib/shared/widgetdatabase.cpp" line="+814"/>
@@ -4147,7 +4207,7 @@ Czy chcesz nadpisać szablon?</translation>
</translation>
</message>
<message>
- <location line="+47"/>
+ <location line="+48"/>
<source>Set automatically</source>
<translation>Ustaw automatycznie</translation>
</message>
diff --git a/translations/linguist_pl.ts b/translations/linguist_pl.ts
index a2cf4c980e..037ffb944d 100644
--- a/translations/linguist_pl.ts
+++ b/translations/linguist_pl.ts
@@ -337,9 +337,26 @@ Przyjmie on uniwersalną formę liczby pojedynczej.</translation>
</message>
<message numerus="yes">
<location line="+8"/>
+ <source> Generated %n translation(s) (%1 finished and %2 unfinished)</source>
+ <translation>
+ <numerusform> Wygenerowano %n tłumaczenie (przetłumaczonych %1, nieprzetłumaczonych %2)</numerusform>
+ <numerusform> Wygenerowano %n tłumaczenia (przetłumaczonych %1, nieprzetłumaczonych %2)</numerusform>
+ <numerusform> Wygenerowano %n tłumaczeń (przetłumaczonych %1, nieprzetłumaczonych %2)</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <location line="+4"/>
+ <source> Ignored %n untranslated source text(s)</source>
+ <translation>
+ <numerusform> Pominięto %n nieprzetłumaczony tekst źródłowy</numerusform>
+ <numerusform> Pominięto %n nieprzetłumaczone teksty źródłowe</numerusform>
+ <numerusform> Pominięto %n nieprzetłumaczonych tekstów źródłowych</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
<source> Generated %n translation(s) (%1 finished and %2 unfinished)
</source>
- <translation>
+ <translation type="obsolete">
<numerusform>Wygenerowano %n tłumaczenie (przetłumaczonych %1, nieprzetłumaczonych %2)
</numerusform>
<numerusform>Wygenerowano %n tłumaczenia (przetłumaczonych %1, nieprzetłumaczonych %2)
@@ -349,10 +366,9 @@ Przyjmie on uniwersalną formę liczby pojedynczej.</translation>
</translation>
</message>
<message numerus="yes">
- <location line="+4"/>
<source> Ignored %n untranslated source text(s)
</source>
- <translation>
+ <translation type="obsolete">
<numerusform>Pominięto %n nieprzetłumaczony tekst źródłowy
</numerusform>
<numerusform>Pominięto %n nieprzetłumaczone teksty źródłowe
@@ -1828,7 +1844,7 @@ Linia: %2</translation>
<translation>Qt Linguist</translation>
</message>
<message>
- <location filename="../tools/linguist/shared/po.cpp" line="+817"/>
+ <location filename="../tools/linguist/shared/po.cpp" line="+870"/>
<source>GNU Gettext localization files</source>
<translation>Pliki GNU Gettext</translation>
</message>
diff --git a/translations/qt_de.ts b/translations/qt_de.ts
index 7d32ead8c0..74bd048539 100644
--- a/translations/qt_de.ts
+++ b/translations/qt_de.ts
@@ -2024,6 +2024,11 @@ nach
<translation>Signalnamen dürfen nicht mit einem Großbuchstaben beginnen</translation>
</message>
<message>
+ <location line="+2"/>
+ <source>Illegal signal name</source>
+ <translation>Ungültiger Name für Signal</translation>
+ </message>
+ <message>
<location line="+6"/>
<source>Duplicate method name</source>
<translation>Mehrfaches Auftreten eines Methodennamens</translation>
@@ -2034,6 +2039,11 @@ nach
<translation>Methodennamen dürfen nicht mit einem Großbuchstaben beginnen</translation>
</message>
<message>
+ <location line="+2"/>
+ <source>Illegal method name</source>
+ <translation>Ungültiger Name für Methode</translation>
+ </message>
+ <message>
<location line="+21"/>
<source>Property value set multiple times</source>
<translation>Mehrfache Zuweisung eines Wertes an eine Eigenschaft</translation>
@@ -7713,21 +7723,53 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<translation>Kontext4</translation>
</message>
<message>
- <location line="+1"/>
+ <location line="+2"/>
<source>Call</source>
+ <extracomment>Button to start a call (note: a separate button is used to end the call)</extracomment>
<translation>Anruf</translation>
</message>
<message>
- <location line="+1"/>
+ <location line="+2"/>
<source>Hangup</source>
+ <extracomment>Button to end a call (note: a separate button is used to start the call)</extracomment>
<translation>Auflegen</translation>
</message>
<message>
+ <location line="+2"/>
+ <source>Toggle Call/Hangup</source>
+ <extracomment>Button that will hang up if we&apos;re in call, or make a call if we&apos;re not.</extracomment>
+ <translation>Anrufen/Aufhängen</translation>
+ </message>
+ <message>
<location line="+1"/>
<source>Flip</source>
<translation>Umdrehen</translation>
</message>
<message>
+ <location line="+2"/>
+ <source>Voice Dial</source>
+ <extracomment>Button to trigger voice dialling</extracomment>
+ <translation>Sprachwahl</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Last Number Redial</source>
+ <extracomment>Button to redial the last number called</extracomment>
+ <translation>Wahlwiederholung</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Camera Shutter</source>
+ <extracomment>Button to trigger the camera shutter (take a picture)</extracomment>
+ <translation>Auslöser</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Camera Focus</source>
+ <extracomment>Button to focus the camera</extracomment>
+ <translation>Scharfstellen</translation>
+ </message>
+ <message>
<location line="+4"/>
<source>Kanji</source>
<translation>Kanji</translation>
diff --git a/translations/qt_help_pl.ts b/translations/qt_help_pl.ts
index 74555cc4fc..de3cce08ed 100644
--- a/translations/qt_help_pl.ts
+++ b/translations/qt_help_pl.ts
@@ -30,6 +30,14 @@
</message>
</context>
<context>
+ <name>QHelp</name>
+ <message>
+ <location filename="../tools/assistant/lib/qhelp_global.cpp" line="+64"/>
+ <source>Untitled</source>
+ <translation>Nienazwany</translation>
+ </message>
+</context>
+<context>
<name>QHelpCollectionHandler</name>
<message>
<location filename="../tools/assistant/lib/qhelpcollectionhandler.cpp" line="+79"/>
@@ -306,7 +314,7 @@
<translation>Brak atrybutu w słowie kluczowym w linii %1.</translation>
</message>
<message>
- <location line="+141"/>
+ <location line="+143"/>
<source>The input file %1 could not be opened!</source>
<translation>Nie można otworzyć pliku wejściowego %1!</translation>
</message>
diff --git a/translations/qt_hu.ts b/translations/qt_hu.ts
index 9ee3b32e50..d9b05d1469 100644
--- a/translations/qt_hu.ts
+++ b/translations/qt_hu.ts
@@ -4970,30 +4970,6 @@ Biztosan törölni akarja?</translation>
<translation>&lt;h3&gt;Qt névjegye&lt;/h3&gt;&lt;p&gt;Ez a program a Qt %1 verzióját használja.&lt;/p&gt;</translation>
</message>
<message>
- <location line="+5"/>
- <source>&lt;p&gt;Qt is a C++ toolkit for cross-platform application development.&lt;/p&gt;&lt;p&gt;Qt provides single-source portability across MS&amp;nbsp;Windows, Mac&amp;nbsp;OS&amp;nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.&lt;/p&gt;&lt;p&gt;Qt is available under three different licensing options designed to accommodate the needs of our various users.&lt;/p&gt;&lt;p&gt;Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.&lt;/p&gt;&lt;p&gt;Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.&lt;/p&gt;&lt;p&gt;Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.&lt;/p&gt;&lt;p&gt;Please see &lt;a href=&quot;http://qt.nokia.com/products/licensing&quot;&gt;qt.nokia.com/products/licensing&lt;/a&gt; for an overview of Qt licensing.&lt;/p&gt;&lt;p&gt;Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).&lt;/p&gt;&lt;p&gt;Qt is a Nokia product. See &lt;a href=&quot;http://qt.nokia.com/&quot;&gt;qt.nokia.com&lt;/a&gt; for more information.&lt;/p&gt;</source>
- <translation>&lt;p&gt;A Qt egy C++ eszközkészlet keresztplatformos alkalmazások fejlesztéséhez, mely egyetlen, MS&amp;nbsp;Windows, Mac&amp;nbsp;OS&amp;nbsp;X, Linux, és minden főbb kereskedelmi Unix változat között hordozható forrást ad; valamint elérhető még beágyazott eszközökhöz is, mint Qt beágyazott Linuxhoz és Qt Windows CE-hez.&lt;/p&gt;
-&lt;p&gt;A Qt három különböző licensz alatt érhető el, hogy illeszkedjen a különbőző felhasználói igényekhez:
-&lt;p&gt;A kereskedelmi licenszünk alkalmas saját/kereskedelmi szoftver fejlesztéséhez, ha nem akarja megosztani a forráskódot harmadik partnerrel vagy nem kívánja teljesíteni GNU LGPL v2.1 vagy GNU GPL v3.0 feltételeit.&lt;/p&gt;
-&lt;p&gt;A GNU LGPL v2.1 alá tartozó Qt licensz alkalmas Qt-n alapuló programok fejlesztéséhez (zárt vagy nyílt forrású), amennyiben betartja a GNU LGPL v2.1 kikötéseit és feltételeit.&lt;/p&gt;
-&lt;p&gt;A GNU General Public License v3.0 alá tartozó Qt licensz pedig alkalmas Qt-n alapuló programok fejlesztésére, ahol olyan programok kombinációját kívánja használni, melyek megfelelnek a GNU GPL version 3.0 feltételeinek vagy ahol hajlandó teljesíteni a GNU GPL v3.0 feltételeit.&lt;/p&gt;
-&lt;p&gt;Tekintse át a &lt;a href=&quot;http://qt.nokia.com/products/licensing&quot;&gt;qt.nokia.com/products/licensing&lt;/a&gt; oldalon a Qt licenszeit.&lt;/p&gt;
-&lt;p&gt;Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).&lt;/p&gt;
-&lt;p&gt;A Qt a Nokia terméke. További információért látogassa meg a &lt;a href=&quot;http://qt.nokia.com/&quot;&gt;qt.nokia.com&lt;/a&gt; honlapot.&lt;/p&gt;</translation>
- </message>
- <message>
- <source>&lt;p&gt;Qt is a C++ toolkit for cross-platform application development.&lt;/p&gt;&lt;p&gt;Qt provides single-source portability across MS&amp;nbsp;Windows, Mac&amp;nbsp;OS&amp;nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.&lt;/p&gt;&lt;p&gt;Qt is available under three different licensing options designed to accommodate the needs of our various users.&lt;/p&gt;&lt;p&gt;Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.&lt;/p&gt;&lt;p&gt;Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.&lt;/p&gt;&lt;p&gt;Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.&lt;/p&gt;&lt;p&gt;Please see &lt;a href=&quot;http://www.qtsoftware.com/products/licensing&quot;&gt;www.qtsoftware.com/products/licensing&lt;/a&gt; for an overview of Qt licensing.&lt;/p&gt;&lt;p&gt;Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).&lt;/p&gt;&lt;p&gt;Qt is a Nokia product. See &lt;a href=&quot;http://www.qtsoftware.com/qt/&quot;&gt;www.qtsoftware.com/qt&lt;/a&gt; for more information.&lt;/p&gt;</source>
- <translatorcomment>Needing review, but basically accepted string.</translatorcomment>
- <translation type="obsolete">&lt;p&gt;A Qt egy C++ eszközkészlet keresztplatformos alkalmazások fejlesztéséhez, mely egyetlen, MS&amp;nbsp;Windows, Mac&amp;nbsp;OS&amp;nbsp;X, Linux, és minden főbb kereskedelmi Unix változat között hordozható forrást ad; valamint elérhető még beágyazott eszközökhöz is, mint Qt beágyazott Linuxhoz és Qt Windows CE-hez.&lt;/p&gt;
-&lt;p&gt;A Qt három különböző licensz alatt érhető el, hogy illeszkedjen a különbőző felhasználói igényekhez:
-&lt;p&gt;A kereskedelmi licenszünk alkalmas saját/kereskedelmi szoftver fejlesztéséhez, ha nem akarja megosztani a forráskódot harmadik partnerrel vagy nem kívánja teljesíteni GNU LGPL v2.1 vagy GNU GPL v3.0 feltételeit.&lt;/p&gt;
-&lt;p&gt;A GNU LGPL v2.1 alá tartozó Qt licensz alkalmas Qt-n alapuló programok fejlesztéséhez (zárt vagy nyílt forrású), amennyiben betartja a GNU LGPL v2.1 kikötéseit és feltételeit.&lt;/p&gt;
-&lt;p&gt;A GNU General Public License v3.0 alá tartozó Qt licensz pedig alkalmas Qt-n alapuló programok fejlesztésére, ahol olyan programok kombinációját kívánja használni, melyek megfelelnek a GNU GPL version 3.0 feltételeinek vagy ahol hajlandó teljesíteni a GNU GPL v3.0 feltételeit.&lt;/p&gt;
-&lt;p&gt;Tekintse át a &lt;a href=&quot;http://www.qtsoftware.com/products/licensing&quot;&gt;www.qtsoftware.com/products/licensing&lt;/a&gt; oldalon a Qt licenszeit.&lt;/p&gt;
-&lt;p&gt;Copyright (C) 2009 Nokia Corporation és/vagy annak leányvállalat(-ai).&lt;/p&gt;
-&lt;p&gt;A Qt a Nokia terméke. További információért látogassa meg a &lt;a href=&quot;http://www.qtsoftware.com/qt/&quot;&gt;www.qtsoftware.com/qt&lt;/a&gt; honlapot.&lt;/p&gt;</translation>
- </message>
- <message>
<source>&lt;p&gt;This program uses Qt Open Source Edition version %1.&lt;/p&gt;&lt;p&gt;Qt Open Source Edition is intended for the development of Open Source applications. You need a commercial Qt license for development of proprietary (closed source) applications.&lt;/p&gt;&lt;p&gt;Please see &lt;a href=&quot;http://www.trolltech.com/company/model/&quot;&gt;www.trolltech.com/company/model/&lt;/a&gt; for an overview of Qt licensing.&lt;/p&gt;</source>
<translation type="obsolete">&lt;p&gt;A programa Qt Open Source Edition %1 verziót használja.&lt;/p&gt;&lt;p&gt;A Qt Open Source Edition az Open Source (nyílt forrású) alkalmazások fejlesztéséhez készült. Zárt forrású alkalmazások fejlesztéséhez a kereskedelmi Qt licenszre van szükség.&lt;/p&gt;&lt;p&gt;A Qt licenszeléséről további információ a &lt;a href=&quot;http://www.trolltech.com/company/model/&quot;&gt;www.trolltech.com/company/model/&lt;/a&gt; oldalon található.&lt;/p&gt;</translation>
</message>
diff --git a/translations/qt_pl.ts b/translations/qt_pl.ts
index b366a72301..53549da3b8 100644
--- a/translations/qt_pl.ts
+++ b/translations/qt_pl.ts
@@ -4,7 +4,7 @@
<context>
<name>CloseButton</name>
<message>
- <location filename="../src/gui/widgets/qtabbar.cpp" line="+2313"/>
+ <location filename="../src/gui/widgets/qtabbar.cpp" line="+2319"/>
<source>Close Tab</source>
<translation>Zamknij kartę</translation>
</message>
@@ -12,7 +12,7 @@
<context>
<name>FakeReply</name>
<message>
- <location filename="../src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp" line="+2273"/>
+ <location filename="../src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp" line="+2278"/>
<source>Fake error !</source>
<translation>Fałszywy błąd!</translation>
</message>
@@ -25,7 +25,7 @@
<context>
<name>MAC_APPLICATION_MENU</name>
<message>
- <location filename="../src/gui/kernel/qapplication.cpp" line="+2320"/>
+ <location filename="../src/gui/kernel/qapplication.cpp" line="+2351"/>
<source>Services</source>
<translation>Usługi</translation>
</message>
@@ -199,7 +199,7 @@ zainstalowałeś libgstreamer-plugins-base.</translation>
<context>
<name>Phonon::MMF</name>
<message>
- <location filename="../src/3rdparty/phonon/mmf/audiooutput.cpp" line="+103"/>
+ <location filename="../src/3rdparty/phonon/mmf/audiooutput.cpp" line="+106"/>
<source>Audio Output</source>
<translation>Wyjście dźwięku</translation>
</message>
@@ -396,7 +396,7 @@ zainstalowałeś libgstreamer-plugins-base.</translation>
<context>
<name>Phonon::MMF::AbstractVideoPlayer</name>
<message>
- <location filename="../src/3rdparty/phonon/mmf/abstractvideoplayer.cpp" line="+108"/>
+ <location filename="../src/3rdparty/phonon/mmf/abstractvideoplayer.cpp" line="+110"/>
<source>Pause failed</source>
<translation>Zatrzymanie zakończone błędem</translation>
</message>
@@ -411,7 +411,7 @@ zainstalowałeś libgstreamer-plugins-base.</translation>
<translation>Ustalanie pozycji zakończone błędem</translation>
</message>
<message>
- <location line="+66"/>
+ <location line="+68"/>
<source>Opening clip failed</source>
<translation>Otwieranie klipu zakończone błędem</translation>
</message>
@@ -435,7 +435,7 @@ zainstalowałeś libgstreamer-plugins-base.</translation>
<context>
<name>Phonon::MMF::DsaVideoPlayer</name>
<message>
- <location filename="../src/3rdparty/phonon/mmf/videoplayer_dsa.cpp" line="+238"/>
+ <location filename="../src/3rdparty/phonon/mmf/videoplayer_dsa.cpp" line="+241"/>
<location line="+15"/>
<location line="+8"/>
<location line="+22"/>
@@ -523,7 +523,7 @@ zainstalowałeś libgstreamer-plugins-base.</translation>
<translation>Błąd otwierania źródła: typ źródła nie jest obsługiwany</translation>
</message>
<message>
- <location line="+18"/>
+ <location line="+21"/>
<source>Error opening source: media type could not be determined</source>
<translation>Błąd otwierania źródła: nie można określić typu multimediów</translation>
</message>
@@ -539,8 +539,8 @@ zainstalowałeś libgstreamer-plugins-base.</translation>
<context>
<name>Phonon::MMF::SurfaceVideoPlayer</name>
<message>
- <location filename="../src/3rdparty/phonon/mmf/videoplayer_surface.cpp" line="+126"/>
- <location line="+16"/>
+ <location filename="../src/3rdparty/phonon/mmf/videoplayer_surface.cpp" line="+139"/>
+ <location line="+26"/>
<source>Video display error</source>
<translation>Błąd wyświetlacza wideo</translation>
</message>
@@ -1281,7 +1281,7 @@ na
<translation>Gniazdo nie jest podłączone</translation>
</message>
<message>
- <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+625"/>
+ <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+620"/>
<location filename="../src/network/socket/qabstractsocket.cpp" line="-380"/>
<source>Socket operation timed out</source>
<translation>Przekroczony czas operacji gniazda</translation>
@@ -1449,7 +1449,7 @@ na
<context>
<name>QComboBox</name>
<message>
- <location filename="../src/plugins/accessible/widgets/complexwidgets.cpp" line="+1772"/>
+ <location filename="../src/plugins/accessible/widgets/complexwidgets.cpp" line="+1776"/>
<location line="+65"/>
<source>Open</source>
<translation>Otwórz</translation>
@@ -1598,7 +1598,7 @@ na
<context>
<name>QDeclarativeAbstractAnimation</name>
<message>
- <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="+166"/>
+ <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="+176"/>
<source>Cannot animate non-existent property &quot;%1&quot;</source>
<translation>Nie można animować nieistniejącej właściwości &quot;%1&quot;</translation>
</message>
@@ -1608,7 +1608,7 @@ na
<translation>Nie można animować właściwości (tylko do odczytu): &quot;%1&quot;</translation>
</message>
<message>
- <location filename="../src/declarative/util/qdeclarativeutilmodule.cpp" line="+122"/>
+ <location filename="../src/declarative/util/qdeclarativeutilmodule.cpp" line="+120"/>
<source>Animation is an abstract class</source>
<translation>&quot;Animation&quot; jest klasą abstrakcyjną</translation>
</message>
@@ -1616,7 +1616,7 @@ na
<context>
<name>QDeclarativeAnchorAnimation</name>
<message>
- <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="+2551"/>
+ <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="+2616"/>
<source>Cannot set a duration of &lt; 0</source>
<translation>Nie można ustawić ujemnego czasu trwania</translation>
</message>
@@ -1624,12 +1624,12 @@ na
<context>
<name>QDeclarativeAnchors</name>
<message>
- <location filename="../src/declarative/graphicsitems/qdeclarativeanchors.cpp" line="+180"/>
+ <location filename="../src/declarative/graphicsitems/qdeclarativeanchors.cpp" line="+204"/>
<source>Possible anchor loop detected on fill.</source>
<translation>Wykryto możliwe zapętlenie dla kotwicy &quot;fill&quot;.</translation>
</message>
<message>
- <location line="+29"/>
+ <location line="+26"/>
<source>Possible anchor loop detected on centerIn.</source>
<translation>Wykryto możliwe zapętlenie dla kotwicy &quot;centerIn&quot;.</translation>
</message>
@@ -1692,7 +1692,7 @@ na
<context>
<name>QDeclarativeAnimatedImage</name>
<message>
- <location filename="../src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp" line="+86"/>
+ <location filename="../src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp" line="+102"/>
<source>Qt was built without support for QMovie</source>
<translation>Qt zostało zbudowane bez obsługi QMovie</translation>
</message>
@@ -1700,7 +1700,7 @@ na
<context>
<name>QDeclarativeBehavior</name>
<message>
- <location filename="../src/declarative/util/qdeclarativebehavior.cpp" line="+127"/>
+ <location filename="../src/declarative/util/qdeclarativebehavior.cpp" line="+129"/>
<source>Cannot change the animation assigned to a Behavior.</source>
<translation>Nie można zmienić animacji przypisanej do &quot;Zachowania&quot;.</translation>
</message>
@@ -1708,7 +1708,7 @@ na
<context>
<name>QDeclarativeBinding</name>
<message>
- <location filename="../src/declarative/qml/qdeclarativebinding.cpp" line="+236"/>
+ <location filename="../src/declarative/qml/qdeclarativebinding.cpp" line="+241"/>
<source>Binding loop detected for property &quot;%1&quot;</source>
<translation>Zapętlenie powiązania dla właściwości &quot;%1&quot;</translation>
</message>
@@ -1716,7 +1716,7 @@ na
<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>Zapętlenie powiązania dla właściwości &quot;%1&quot;</translation>
</message>
@@ -1725,16 +1725,16 @@ na
<name>QDeclarativeCompiler</name>
<message>
<location filename="../src/declarative/qml/qdeclarativecompiler.cpp" line="+186"/>
- <location line="+1572"/>
+ <location line="+1601"/>
<location line="+186"/>
<location line="+81"/>
<location line="+75"/>
- <location line="+487"/>
+ <location line="+507"/>
<source>Invalid property assignment: &quot;%1&quot; is a read-only property</source>
<translation>Niepoprawne przypisanie wartości: &quot;%1&quot; jest właściwością tylko do odczytu</translation>
</message>
<message>
- <location line="-2392"/>
+ <location line="-2441"/>
<source>Invalid property assignment: unknown enumeration</source>
<translation>Niepoprawne przypisanie wartości: nieznana wartość wyliczeniowa</translation>
</message>
@@ -1749,32 +1749,36 @@ na
<translation>Niepoprawne przypisanie wartości: oczekiwano url</translation>
</message>
<message>
- <location line="+6"/>
+ <location line="+10"/>
<source>Invalid property assignment: unsigned int expected</source>
<translation>Niepoprawne przypisanie wartości: oczekiwano liczby naturalnej</translation>
</message>
<message>
- <location line="+7"/>
+ <location line="+11"/>
<source>Invalid property assignment: int expected</source>
<translation>Niepoprawne przypisanie wartości: oczekiwano liczby całkowitej</translation>
</message>
<message>
- <location line="+7"/>
<source>Invalid property assignment: float expected</source>
- <translation>Niepoprawne przypisanie wartości: oczekiwano liczby zmiennoprzecinkowej</translation>
+ <translation type="obsolete">Niepoprawne przypisanie wartości: oczekiwano liczby zmiennoprzecinkowej</translation>
</message>
<message>
- <location line="+7"/>
<source>Invalid property assignment: double expected</source>
- <translation>Niepoprawne przypisanie wartości: oczekiwano liczby zmiennoprzecinkowej podwójnej precyzji</translation>
+ <translation type="obsolete">Niepoprawne przypisanie wartości: oczekiwano liczby zmiennoprzecinkowej podwójnej precyzji</translation>
</message>
<message>
- <location line="+7"/>
+ <location line="+4"/>
+ <location line="+3"/>
+ <source>Invalid property assignment: number expected</source>
+ <translation>Niepoprawne przypisanie wartości: oczekiwano liczby</translation>
+ </message>
+ <message>
+ <location line="+6"/>
<source>Invalid property assignment: color expected</source>
<translation>Niepoprawne przypisanie wartości: oczekiwano koloru</translation>
</message>
<message>
- <location line="+7"/>
+ <location line="+8"/>
<source>Invalid property assignment: date expected</source>
<translation>Niepoprawne przypisanie wartości: oczekiwano daty</translation>
</message>
@@ -1789,7 +1793,7 @@ na
<translation>Niepoprawne przypisanie wartości: oczekiwano daty i czasu</translation>
</message>
<message>
- <location line="+8"/>
+ <location line="+9"/>
<source>Invalid property assignment: point expected</source>
<translation>Niepoprawne przypisanie wartości: oczekiwano punktu</translation>
</message>
@@ -1819,12 +1823,12 @@ na
<translation>Niepoprawne przypisanie wartości: nieobsługiwany typ &quot;%1&quot;</translation>
</message>
<message>
- <location line="+275"/>
+ <location line="+277"/>
<source>Element is not creatable.</source>
<translation>Nie można utworzyć elementu (&quot;creatable&quot; wyłączone).</translation>
</message>
<message>
- <location line="+601"/>
+ <location line="+623"/>
<source>Component elements may not contain properties other than id</source>
<translation>Elementy komponentu nie mogą posiadać właściwości innych niż &quot;id&quot;</translation>
</message>
@@ -1835,12 +1839,12 @@ na
</message>
<message>
<location line="+6"/>
- <location line="+475"/>
+ <location line="+478"/>
<source>id is not unique</source>
<translation>Wartość &quot;id&quot; nie jest unikatowa</translation>
</message>
<message>
- <location line="-465"/>
+ <location line="-468"/>
<source>Invalid component body specification</source>
<translation>Niepoprawna specyfikacja &quot;body&quot; komponentu</translation>
</message>
@@ -1870,7 +1874,12 @@ na
<translation>Przypisanie sygnału błędnie podane</translation>
</message>
<message>
- <location line="+13"/>
+ <location line="+12"/>
+ <source>Cannot assign a value to a signal (expecting a script to be run)</source>
+ <translation>Nie można przypisać wartości do sygnału (oczekiwano uruchomienia skryptu)</translation>
+ </message>
+ <message>
+ <location line="+4"/>
<source>Empty signal assignment</source>
<translation>Przypisanie pustego sygnału</translation>
</message>
@@ -1995,7 +2004,7 @@ na
<translation>&quot;%1&quot; nie może operować na &quot;%2&quot;</translation>
</message>
<message>
- <location line="+117"/>
+ <location line="+129"/>
<source>Duplicate default property</source>
<translation>Powielona domyślna właściwość</translation>
</message>
@@ -2010,7 +2019,12 @@ na
<translation>Nazwy właściwości nie mogą rozpoczynać się wielką literą</translation>
</message>
<message>
- <location line="+7"/>
+ <location line="+3"/>
+ <source>Illegal property name</source>
+ <translation>Niepoprawna nazwa właściwości</translation>
+ </message>
+ <message>
+ <location line="+8"/>
<source>Duplicate signal name</source>
<translation>Powielona nazwa sygnału</translation>
</message>
@@ -2020,6 +2034,11 @@ na
<translation>Nazwy sygnałów nie mogą rozpoczynać się wielką literą</translation>
</message>
<message>
+ <location line="+2"/>
+ <source>Illegal signal name</source>
+ <translation>Niepoprawna nazwa sygnału</translation>
+ </message>
+ <message>
<location line="+6"/>
<source>Duplicate method name</source>
<translation>Powielona nazwa medoty</translation>
@@ -2030,6 +2049,11 @@ na
<translation>Nazwy metod nie mogą rozpoczynać się wielką literą</translation>
</message>
<message>
+ <location line="+2"/>
+ <source>Illegal method name</source>
+ <translation>Niepoprawna nazwa metody</translation>
+ </message>
+ <message>
<location line="+21"/>
<source>Property value set multiple times</source>
<translation>Wartość właściwości ustawiona wielokrotnie</translation>
@@ -2100,7 +2124,7 @@ na
<context>
<name>QDeclarativeComponent</name>
<message>
- <location filename="../src/declarative/qml/qdeclarativecomponent.cpp" line="+458"/>
+ <location filename="../src/declarative/qml/qdeclarativecomponent.cpp" line="+507"/>
<source>Invalid empty URL</source>
<translation>Niepoprawny pusty URL</translation>
</message>
@@ -2108,7 +2132,7 @@ na
<context>
<name>QDeclarativeCompositeTypeManager</name>
<message>
- <location filename="../src/declarative/qml/qdeclarativecompositetypemanager.cpp" line="+487"/>
+ <location filename="../src/declarative/qml/qdeclarativecompositetypemanager.cpp" line="+475"/>
<location line="+266"/>
<source>Resource %1 unavailable</source>
<translation>Zasób %1 nie jest dostępny</translation>
@@ -2132,7 +2156,7 @@ na
<context>
<name>QDeclarativeConnections</name>
<message>
- <location filename="../src/declarative/util/qdeclarativeconnections.cpp" line="+209"/>
+ <location filename="../src/declarative/util/qdeclarativeconnections.cpp" line="+210"/>
<location line="+60"/>
<source>Cannot assign to non-existent property &quot;%1&quot;</source>
<translation>Nie można przypisać wartości do nieistniejącej właściwości &quot;%1&quot;</translation>
@@ -2190,7 +2214,7 @@ na
<context>
<name>QDeclarativeFlipable</name>
<message>
- <location filename="../src/declarative/graphicsitems/qdeclarativeflipable.cpp" line="+127"/>
+ <location filename="../src/declarative/graphicsitems/qdeclarativeflipable.cpp" line="+129"/>
<source>front is a write-once property</source>
<translation>&quot;front&quot; jest właściwością tylko do odczytu</translation>
</message>
@@ -2203,7 +2227,7 @@ na
<context>
<name>QDeclarativeImportDatabase</name>
<message>
- <location filename="../src/declarative/qml/qdeclarativeimport.cpp" line="+303"/>
+ <location filename="../src/declarative/qml/qdeclarativeimport.cpp" line="+294"/>
<source>module &quot;%1&quot; definition &quot;%2&quot; not readable</source>
<translation>definicja &quot;%2&quot; modułu &quot;%1&quot; nie może zostać odczytana</translation>
</message>
@@ -2219,18 +2243,18 @@ na
</message>
<message>
<location line="+79"/>
- <location line="+55"/>
+ <location line="+69"/>
<source>module &quot;%1&quot; version %2.%3 is not installed</source>
<translation>wersja %2.%3 modułu %1 nie jest zainstalowana</translation>
</message>
<message>
- <location line="-53"/>
+ <location line="-67"/>
<source>module &quot;%1&quot; is not installed</source>
<translation>moduł &quot;%1&quot; nie jest zainstalowany</translation>
</message>
<message>
- <location line="+14"/>
- <location line="+19"/>
+ <location line="+15"/>
+ <location line="+20"/>
<source>&quot;%1&quot;: no such directory</source>
<translation>&quot;%1&quot;: brak katalogu</translation>
</message>
@@ -2240,7 +2264,7 @@ na
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+46"/>
+ <location line="+58"/>
<source>- %1 is not a namespace</source>
<translation>- %1 nie jest przestrzenią nazw</translation>
</message>
@@ -2279,7 +2303,7 @@ na
<context>
<name>QDeclarativeKeyNavigationAttached</name>
<message>
- <location filename="../src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp" line="+64"/>
+ <location filename="../src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp" line="+70"/>
<source>KeyNavigation is only available via attached properties</source>
<translation>&quot;KeyNavigation&quot; jest dostępny jedynie poprzez dołączone właściwości</translation>
</message>
@@ -2295,7 +2319,7 @@ na
<context>
<name>QDeclarativeListModel</name>
<message>
- <location filename="../src/declarative/util/qdeclarativelistmodel.cpp" line="+399"/>
+ <location filename="../src/declarative/util/qdeclarativelistmodel.cpp" line="+315"/>
<source>remove: index %1 out of range</source>
<translation>remove: indeks %1 poza zakresem</translation>
</message>
@@ -2331,8 +2355,8 @@ na
<translation>set: indeks %1 poza zakresem</translation>
</message>
<message>
- <location line="+39"/>
- <location line="+15"/>
+ <location line="+41"/>
+ <location line="+17"/>
<source>ListElement: cannot contain nested elements</source>
<translation>ListElement: nie może zawierać zagnieżdżonych elementów</translation>
</message>
@@ -2342,12 +2366,12 @@ na
<translation>ListElement: nie można używać zarezerwowanej właściwości &quot;id&quot;</translation>
</message>
<message>
- <location line="+49"/>
+ <location line="+53"/>
<source>ListElement: cannot use script for property value</source>
<translation>ListElement: nie można używać skryptu jako wartości właściwości</translation>
</message>
<message>
- <location line="+29"/>
+ <location line="+31"/>
<source>ListModel: undefined property &apos;%1&apos;</source>
<translation>ListModel: niezdefiniowana właściwość &quot;%1&quot;</translation>
</message>
@@ -2355,7 +2379,7 @@ na
<context>
<name>QDeclarativeLoader</name>
<message>
- <location filename="../src/declarative/graphicsitems/qdeclarativeloader.cpp" line="+309"/>
+ <location filename="../src/declarative/graphicsitems/qdeclarativeloader.cpp" line="+340"/>
<source>Loader does not support loading non-visual elements.</source>
<translation>Ładowanie elementów niewizualnych nie jest obsługiwane.</translation>
</message>
@@ -2546,39 +2570,54 @@ na
<context>
<name>QDeclarativePauseAnimation</name>
<message>
- <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="-1975"/>
+ <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="-2036"/>
<source>Cannot set a duration of &lt; 0</source>
<translation>Nie można ustawić ujemnego czasu trwania</translation>
</message>
</context>
<context>
- <name>QDeclarativePixmapCache</name>
+ <name>QDeclarativePixmap</name>
<message>
- <location filename="../src/declarative/util/qdeclarativepixmapcache.cpp" line="+198"/>
+ <location filename="../src/declarative/util/qdeclarativepixmapcache.cpp" line="+295"/>
<source>Error decoding: %1: %2</source>
<translation>Błąd dekodowania: %1: %2</translation>
</message>
<message>
- <location line="+70"/>
+ <location line="+145"/>
+ <location line="+333"/>
<source>Failed to get image from provider: %1</source>
<translation>Pobieranie obrazka od dostawcy zakończone błędem: %1</translation>
</message>
<message>
- <location line="+19"/>
- <location line="+345"/>
+ <location line="-314"/>
+ <location line="+332"/>
<source>Cannot open: %1</source>
<translation>Nie można otworzyć: %1</translation>
</message>
+</context>
+<context>
+ <name>QDeclarativePixmapCache</name>
+ <message>
+ <source>Error decoding: %1: %2</source>
+ <translation type="obsolete">Błąd dekodowania: %1: %2</translation>
+ </message>
+ <message>
+ <source>Failed to get image from provider: %1</source>
+ <translation type="obsolete">Pobieranie obrazka od dostawcy zakończone błędem: %1</translation>
+ </message>
+ <message>
+ <source>Cannot open: %1</source>
+ <translation type="obsolete">Nie można otworzyć: %1</translation>
+ </message>
<message>
- <location line="+37"/>
<source>Unknown Error loading %1</source>
- <translation>Nieznany błąd ładowania %1</translation>
+ <translation type="obsolete">Nieznany błąd ładowania %1</translation>
</message>
</context>
<context>
<name>QDeclarativePropertyAnimation</name>
<message>
- <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="+1102"/>
+ <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="+1171"/>
<source>Cannot set a duration of &lt; 0</source>
<translation>Nie można ustawić ujemnego czasu trwania</translation>
</message>
@@ -2586,7 +2625,7 @@ na
<context>
<name>QDeclarativePropertyChanges</name>
<message>
- <location filename="../src/declarative/util/qdeclarativepropertychanges.cpp" line="+252"/>
+ <location filename="../src/declarative/util/qdeclarativepropertychanges.cpp" line="+267"/>
<source>PropertyChanges does not support creating state-specific objects.</source>
<translation>&quot;PropertyChanges&quot; nie obsługuje tworzenia obiektów charakterystycznych dla stanów.</translation>
</message>
@@ -2604,7 +2643,7 @@ na
<context>
<name>QDeclarativeTextInput</name>
<message>
- <location filename="../src/declarative/graphicsitems/qdeclarativetextinput.cpp" line="+797"/>
+ <location filename="../src/declarative/graphicsitems/qdeclarativetextinput.cpp" line="+805"/>
<location line="+8"/>
<source>Could not load cursor delegate</source>
<translation type="unfinished"></translation>
@@ -2666,7 +2705,7 @@ na
<context>
<name>QDeclarativeVisualDataModel</name>
<message>
- <location filename="../src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp" line="+1091"/>
+ <location filename="../src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp" line="+1058"/>
<source>Delegate component must be Item type.</source>
<translation type="unfinished"></translation>
</message>
@@ -2683,7 +2722,7 @@ na
<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>Zapytanie XmlRole nie może rozpoczynać się od &quot;/&quot;</translation>
</message>
@@ -2691,7 +2730,7 @@ na
<context>
<name>QDeclarativeXmlRoleList</name>
<message>
- <location filename="../src/declarative/util/qdeclarativexmllistmodel.cpp" line="+673"/>
+ <location filename="../src/declarative/util/qdeclarativexmllistmodel.cpp" line="+735"/>
<source>An XmlListModel query must start with &apos;/&apos; or &quot;//&quot;</source>
<translation>Zapytanie XmlListModel nie może rozpoczynać się od &quot;/&quot; ani od &quot;//&quot;</translation>
</message>
@@ -2717,12 +2756,12 @@ na
<context>
<name>QDialog</name>
<message>
- <location filename="../src/gui/dialogs/qdialog.cpp" line="+645"/>
+ <location filename="../src/gui/dialogs/qdialog.cpp" line="+651"/>
<source>What&apos;s This?</source>
<translation>Co to jest?</translation>
</message>
<message>
- <location line="-122"/>
+ <location line="-127"/>
<source>Done</source>
<translation>Zrobione</translation>
</message>
@@ -3059,7 +3098,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<translation>Katalog:</translation>
</message>
<message>
- <location filename="../src/gui/itemviews/qfileiconprovider.cpp" line="+464"/>
+ <location filename="../src/gui/itemviews/qfileiconprovider.cpp" line="+475"/>
<source>Drive</source>
<translation>Urządzenie</translation>
</message>
@@ -3339,52 +3378,52 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<name>QFontDatabase</name>
<message>
<location filename="../src/gui/text/qfontdatabase.cpp" line="+102"/>
- <location line="+1342"/>
+ <location line="+1347"/>
<source>Normal</source>
<translation>Normalny</translation>
</message>
<message>
- <location line="-1339"/>
+ <location line="-1344"/>
<location line="+12"/>
- <location line="+1315"/>
+ <location line="+1320"/>
<source>Bold</source>
<translation>Pogrubiony</translation>
</message>
<message>
- <location line="-1324"/>
- <location line="+1326"/>
+ <location line="-1329"/>
+ <location line="+1331"/>
<source>Demi Bold</source>
<translation>Na wpół pogrubiony</translation>
</message>
<message>
- <location line="-1323"/>
+ <location line="-1328"/>
<location line="+18"/>
- <location line="+1301"/>
+ <location line="+1306"/>
<source>Black</source>
<translatorcomment>it&apos;s about font weight</translatorcomment>
<translation>Bardzo gruby</translation>
</message>
<message>
- <location line="-1311"/>
+ <location line="-1316"/>
<source>Demi</source>
<translation>Na wpół</translation>
</message>
<message>
<location line="+6"/>
- <location line="+1311"/>
+ <location line="+1316"/>
<source>Light</source>
<translatorcomment>it&apos;s about font weight</translatorcomment>
<translation>Cienki</translation>
</message>
<message>
- <location line="-1165"/>
- <location line="+1168"/>
+ <location line="-1170"/>
+ <location line="+1173"/>
<source>Italic</source>
<translation>Kursywa</translation>
</message>
<message>
- <location line="-1165"/>
- <location line="+1167"/>
+ <location line="-1170"/>
+ <location line="+1172"/>
<source>Oblique</source>
<translation>Pochyły</translation>
</message>
@@ -3761,7 +3800,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<translation>Nieznany błąd</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>Nie podano nazwy hosta</translation>
</message>
@@ -3769,9 +3808,9 @@ Proszę o sprawdzenie podanej nazwy pliku.</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="+274"/>
<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>Host nie znaleziony</translation>
@@ -3792,7 +3831,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<translation>Nieznany błąd</translation>
</message>
<message>
- <location line="-98"/>
+ <location line="-112"/>
<location filename="../src/network/kernel/qhostinfo_win.cpp" line="-67"/>
<source>No host name given</source>
<translation>Nie podano nazwy hosta</translation>
@@ -4122,7 +4161,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<context>
<name>QIODevice</name>
<message>
- <location filename="../src/corelib/global/qglobal.cpp" line="+2129"/>
+ <location filename="../src/corelib/global/qglobal.cpp" line="+2117"/>
<source>No space left on device</source>
<translation>Brak wolnego miejsca na urządzeniu</translation>
</message>
@@ -4142,7 +4181,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<translation>Zbyt wiele otwartych plików</translation>
</message>
<message>
- <location filename="../src/corelib/io/qiodevice.cpp" line="+1598"/>
+ <location filename="../src/corelib/io/qiodevice.cpp" line="+1618"/>
<source>Unknown error</source>
<translation>Nieznany błąd</translation>
</message>
@@ -4259,7 +4298,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<context>
<name>QLineEdit</name>
<message>
- <location filename="../src/gui/widgets/qlineedit.cpp" line="+2095"/>
+ <location filename="../src/gui/widgets/qlineedit.cpp" line="+2098"/>
<source>&amp;Copy</source>
<translation>S&amp;kopiuj</translation>
</message>
@@ -4961,7 +5000,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<context>
<name>QNetworkSessionPrivateImpl</name>
<message>
- <location filename="../src/plugins/bearer/icd/qnetworksession_impl.cpp" line="+1005"/>
+ <location filename="../src/plugins/bearer/icd/qnetworksession_impl.cpp" line="+1019"/>
<source>Roaming error</source>
<translation>Błąd roamingu</translation>
</message>
@@ -4977,7 +5016,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
</message>
<message>
<location filename="../src/plugins/bearer/qnetworksession_impl.cpp" line="+272"/>
- <location filename="../src/plugins/bearer/symbian/qnetworksession_impl.cpp" line="+280"/>
+ <location filename="../src/plugins/bearer/symbian/qnetworksession_impl.cpp" line="+291"/>
<source>Unknown session error.</source>
<translation>Nieznany błąd sesji.</translation>
</message>
@@ -5009,7 +5048,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<context>
<name>QOCIDriver</name>
<message>
- <location filename="../src/sql/drivers/oci/qsql_oci.cpp" line="+1944"/>
+ <location filename="../src/sql/drivers/oci/qsql_oci.cpp" line="+1976"/>
<source>Unable to initialize</source>
<comment>QOCIDriver</comment>
<translation>Nie można dokonać inicjalizacji</translation>
@@ -5171,13 +5210,19 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<location filename="../src/3rdparty/phonon/phonon/pulsesupport.cpp" line="+162"/>
<location line="+11"/>
<source>PulseAudio Sound Server</source>
- <translation type="unfinished"></translation>
+ <translation>Serwer dźwięku PulseAudio</translation>
</message>
<message>
- <location filename="../src/declarative/util/qdeclarativexmllistmodel.cpp" line="-227"/>
+ <location filename="../src/declarative/util/qdeclarativexmllistmodel.cpp" line="-253"/>
<source>&quot;%1&quot; duplicates a previous role name and will be disabled.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <location line="+528"/>
+ <location line="+4"/>
+ <source>invalid query: &quot;%1&quot;</source>
+ <translation>Niepoprawne zapytanie: &quot;%1&quot;</translation>
+ </message>
</context>
<context>
<name>QPPDOptionsModel</name>
@@ -6090,7 +6135,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<location line="+52"/>
<location line="+74"/>
<location line="+66"/>
- <location filename="../src/corelib/io/qprocess_win.cpp" line="+406"/>
+ <location filename="../src/corelib/io/qprocess_win.cpp" line="+411"/>
<location line="+50"/>
<location line="+75"/>
<location line="+42"/>
@@ -6108,18 +6153,18 @@ Proszę wybrać inną nazwę pliku.</translation>
</message>
<message>
<location line="+47"/>
- <location line="+826"/>
+ <location line="+870"/>
<location filename="../src/corelib/io/qprocess_win.cpp" line="+140"/>
<source>Error writing to process</source>
<translation>Błąd zapisywania do procesu</translation>
</message>
<message>
- <location line="-756"/>
+ <location line="-800"/>
<source>Process crashed</source>
<translation>Wystąpił błąd w procesie - proces zakończony</translation>
</message>
<message>
- <location line="+959"/>
+ <location line="+1002"/>
<source>No program defined</source>
<translation>Nie zdefiniowano programu</translation>
</message>
@@ -6132,7 +6177,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<context>
<name>QProgressDialog</name>
<message>
- <location filename="../src/gui/dialogs/qprogressdialog.cpp" line="+196"/>
+ <location filename="../src/gui/dialogs/qprogressdialog.cpp" line="+203"/>
<source>Cancel</source>
<translation>Anuluj</translation>
</message>
@@ -6848,7 +6893,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<context>
<name>QShortcut</name>
<message>
- <location filename="../src/gui/kernel/qkeysequence.cpp" line="+1315"/>
+ <location filename="../src/gui/kernel/qkeysequence.cpp" line="+1331"/>
<source>+</source>
<translation>+</translation>
</message>
@@ -6859,7 +6904,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Alt</translation>
</message>
<message>
- <location line="-934"/>
+ <location line="-950"/>
<source>Back</source>
<translation>Back</translation>
</message>
@@ -6889,22 +6934,35 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Basy w górę</translation>
</message>
<message>
- <location line="+149"/>
+ <location line="+154"/>
<source>Call</source>
+ <extracomment>Button to start a call (note: a separate button is used to end the call)</extracomment>
<translation>Wywołaj</translation>
</message>
<message>
- <location line="-21"/>
+ <location line="-22"/>
<source>Caps Lock</source>
<translation>Caps Lock</translation>
</message>
<message>
- <location line="-145"/>
+ <location line="-149"/>
<source>CapsLock</source>
<translation>CapsLock</translation>
</message>
<message>
- <location line="+49"/>
+ <location line="+27"/>
+ <source>Media Pause</source>
+ <extracomment>Media player pause button</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Toggle Media Play/Pause</source>
+ <extracomment>Media player button to toggle between playing and paused</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+24"/>
<source>Monitor Brightness Up</source>
<translation>Zwiększ jasność monitora</translation>
</message>
@@ -7369,7 +7427,37 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Kontekst4</translation>
</message>
<message>
- <location line="+7"/>
+ <location line="+6"/>
+ <source>Toggle Call/Hangup</source>
+ <extracomment>Button that will hang up if we&apos;re in call, or make a call if we&apos;re not.</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Voice Dial</source>
+ <extracomment>Button to trigger voice dialling</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Last Number Redial</source>
+ <extracomment>Button to redial the last number called</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Camera Shutter</source>
+ <extracomment>Button to trigger the camera shutter (take a picture)</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Camera Focus</source>
+ <extracomment>Button to focus the camera</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
<source>Kanji</source>
<translation>Kanji</translation>
</message>
@@ -7525,17 +7613,17 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Ctrl</translation>
</message>
<message>
- <location line="-953"/>
+ <location line="-969"/>
<source>Del</source>
<translation>Del</translation>
</message>
<message>
- <location line="+162"/>
+ <location line="+166"/>
<source>Delete</source>
<translation>Delete</translation>
</message>
<message>
- <location line="-153"/>
+ <location line="-157"/>
<source>Down</source>
<translation>Dół</translation>
</message>
@@ -7555,37 +7643,38 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Esc</translation>
</message>
<message>
- <location line="+170"/>
+ <location line="+174"/>
<source>Escape</source>
<translation>Escape</translation>
</message>
<message>
- <location line="+809"/>
+ <location line="+821"/>
<source>F%1</source>
<translation>F%1</translation>
</message>
<message>
- <location line="-933"/>
+ <location line="-945"/>
<source>Favorites</source>
<translation>Ulubione</translation>
</message>
<message>
- <location line="+141"/>
+ <location line="+145"/>
<source>Flip</source>
<translation>Odwróć</translation>
</message>
<message>
- <location line="-158"/>
+ <location line="-166"/>
<source>Forward</source>
<translation>Do przodu</translation>
</message>
<message>
- <location line="+157"/>
+ <location line="+163"/>
<source>Hangup</source>
+ <extracomment>Button to end a call (note: a separate button is used to start the call)</extracomment>
<translation>Zawieś</translation>
</message>
<message>
- <location line="-163"/>
+ <location line="-169"/>
<source>Help</source>
<translation>Pomoc</translation>
</message>
@@ -7595,17 +7684,17 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Home</translation>
</message>
<message>
- <location line="+34"/>
+ <location line="+38"/>
<source>Home Page</source>
<translation>Strona startowa</translation>
</message>
<message>
- <location line="-39"/>
+ <location line="-43"/>
<source>Ins</source>
<translation>Ins</translation>
</message>
<message>
- <location line="+162"/>
+ <location line="+166"/>
<source>Insert</source>
<translation>Insert</translation>
</message>
@@ -7700,7 +7789,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Uruchom przeglądarkę mediów</translation>
</message>
<message>
- <location line="-38"/>
+ <location line="-42"/>
<source>Left</source>
<translation>Lewo</translation>
</message>
@@ -7735,13 +7824,13 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Menu</translation>
</message>
<message>
- <location line="+806"/>
+ <location line="+822"/>
<location line="+130"/>
<source>Meta</source>
<translation>Meta</translation>
</message>
<message>
- <location line="-781"/>
+ <location line="-793"/>
<source>No</source>
<translation>Nie</translation>
</message>
@@ -7756,12 +7845,12 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Number Lock</translation>
</message>
<message>
- <location line="-146"/>
+ <location line="-150"/>
<source>NumLock</source>
<translation>NumLock</translation>
</message>
<message>
- <location line="+29"/>
+ <location line="+33"/>
<source>Open URL</source>
<translation>Otwórz adres</translation>
</message>
@@ -7776,7 +7865,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Strona w dół</translation>
</message>
<message>
- <location line="-154"/>
+ <location line="-158"/>
<source>Pause</source>
<translation>Pauza</translation>
</message>
@@ -7796,12 +7885,12 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Wydrukuj</translation>
</message>
<message>
- <location line="+152"/>
+ <location line="+156"/>
<source>Print Screen</source>
<translation>Wydrukuj zawartość ekranu</translation>
</message>
<message>
- <location line="-130"/>
+ <location line="-134"/>
<source>Refresh</source>
<translation>Odśwież</translation>
</message>
@@ -7816,17 +7905,17 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Prawo</translation>
</message>
<message>
- <location line="+152"/>
+ <location line="+156"/>
<source>Scroll Lock</source>
<translation>Scroll Lock</translation>
</message>
<message>
- <location line="-146"/>
+ <location line="-150"/>
<source>ScrollLock</source>
<translation>ScrollLock</translation>
</message>
<message>
- <location line="+26"/>
+ <location line="+30"/>
<source>Search</source>
<translation>Szukaj</translation>
</message>
@@ -7837,24 +7926,24 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Wybierz</translation>
</message>
<message>
- <location line="+651"/>
+ <location line="+663"/>
<location line="+138"/>
<source>Shift</source>
<translation>Shift</translation>
</message>
<message>
- <location line="-965"/>
+ <location line="-981"/>
<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>Spacja</translation>
</message>
<message>
- <location line="+49"/>
+ <location line="+53"/>
<source>Standby</source>
<translation>Tryb oczekiwania</translation>
</message>
<message>
- <location line="-18"/>
+ <location line="-22"/>
<source>Stop</source>
<translation>Zatrzymaj</translation>
</message>
@@ -7864,12 +7953,12 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>SysReq</translation>
</message>
<message>
- <location line="+161"/>
+ <location line="+165"/>
<source>System Request</source>
<translation>Żądanie systemu</translation>
</message>
<message>
- <location line="-170"/>
+ <location line="-174"/>
<source>Tab</source>
<translation>Tabulator</translation>
</message>
@@ -7904,7 +7993,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Zrób głośniej</translation>
</message>
<message>
- <location line="+142"/>
+ <location line="+146"/>
<source>Yes</source>
<translation>Tak</translation>
</message>
@@ -8116,7 +8205,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<context>
<name>QSslSocket</name>
<message>
- <location filename="../src/network/ssl/qsslsocket_openssl.cpp" line="+550"/>
+ <location filename="../src/network/ssl/qsslsocket_openssl.cpp" line="+837"/>
<source>Unable to write data: %1</source>
<translation></translation>
</message>
@@ -8126,7 +8215,8 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Nie można odszyfrować danych: %1</translation>
</message>
<message>
- <location line="+76"/>
+ <location line="+78"/>
+ <location line="+10"/>
<source>Error while reading: %1</source>
<translation>Błąd podczas czytania: %1</translation>
</message>
@@ -8136,7 +8226,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Błąd podczas nawiązania sesji SSL: %1</translation>
</message>
<message>
- <location line="-524"/>
+ <location line="-812"/>
<source>Error creating SSL context (%1)</source>
<translation>Błąd tworzenia kontekstu (%1)</translation>
</message>
@@ -8146,7 +8236,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Niepoprawna lub pusta lista szyfrów (%1)</translation>
</message>
<message>
- <location line="+45"/>
+ <location line="+57"/>
<source>Private key does not certify public key, %1</source>
<translation>Prywatny klucz nie uwiarygodnia publicznego, %1</translation>
</message>
@@ -8361,7 +8451,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<context>
<name>QTabBar</name>
<message>
- <location filename="../src/plugins/accessible/widgets/complexwidgets.cpp" line="-326"/>
+ <location filename="../src/plugins/accessible/widgets/complexwidgets.cpp" line="-330"/>
<source>Scroll Left</source>
<translation>Przewiń w lewo</translation>
</message>
@@ -8382,7 +8472,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<context>
<name>QTextControl</name>
<message>
- <location filename="../src/gui/text/qtextcontrol.cpp" line="+2049"/>
+ <location filename="../src/gui/text/qtextcontrol.cpp" line="+2057"/>
<source>&amp;Copy</source>
<translation>S&amp;kopiuj</translation>
</message>
@@ -9083,12 +9173,12 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Nieznany</translation>
</message>
<message>
- <location filename="../src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp" line="+248"/>
+ <location filename="../src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp" line="+256"/>
<source>Web Inspector - %2</source>
<translation>Wizytator sieciowy - %2</translation>
</message>
<message>
- <location filename="../src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp" line="+347"/>
+ <location filename="../src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp" line="+355"/>
<source>Redirection limit reached</source>
<translation>Osiągnięto limit przekierowań</translation>
</message>
@@ -9197,7 +9287,7 @@ Proszę wybrać inną nazwę pliku.</translation>
</translation>
</message>
<message>
- <location filename="../src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp" line="+1979"/>
+ <location filename="../src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp" line="+2083"/>
<source>JavaScript Alert - %1</source>
<translation>Ostrzeżenie JavaScript - %1</translation>
</message>
@@ -9222,7 +9312,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Skrypt na tej stronie nie działa poprawnie. Czy chcesz przerwać ten skrypt?</translation>
</message>
<message>
- <location line="+376"/>
+ <location line="+395"/>
<source>Move the cursor to the next character</source>
<translation>Przesuń kursor do następnego znaku</translation>
</message>
@@ -9443,7 +9533,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<context>
<name>QWidget</name>
<message>
- <location filename="../src/gui/kernel/qwidget.cpp" line="+5793"/>
+ <location filename="../src/gui/kernel/qwidget.cpp" line="+5856"/>
<source>*</source>
<translation>*</translation>
</message>
@@ -11536,7 +11626,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>&quot;processContent&quot; dżokera w wywiedzionym elemencie jest słabszy od dżokera w podstawowym elemencie.</translation>
</message>
<message>
- <location line="+240"/>
+ <location line="+270"/>
<source>Derived particle allows content that is not allowed in the base particle.</source>
<translation>Wywiedziony element pozwala na zawartość która jest niedozwolona w podstawowym elemencie.</translation>
</message>
@@ -12277,12 +12367,4 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Atrybut &quot;%1&quot; zawiera niepoprawną zawartość QName: %2.</translation>
</message>
</context>
-<context>
- <name>S60MediaPlayerControl</name>
- <message>
- <location filename="../src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayercontrol.cpp" line="+231"/>
- <source>Media couldn&apos;t be resolved</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
</TS>
diff --git a/translations/translations.pri b/translations/translations.pri
index 9ab72fc277..fbc1596023 100644
--- a/translations/translations.pri
+++ b/translations/translations.pri
@@ -1,80 +1,80 @@
-defineReplace(prependAll) {
- prepend = $$1
- arglist = $$2
- append = $$3
- for(a,arglist) {
- result += $${prepend}$${a}$${append}
- }
- return ($$result)
-}
-
+qtPrepareTool(LCONVERT, lconvert)
qtPrepareTool(LUPDATE, lupdate)
LUPDATE += -locations relative -no-ui-lines
-###### Qt Libraries
-
-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 \
- 3rdparty/phonon \
- 3rdparty/webkit \
- activeqt \
- corelib \
- declarative \
- gui \
- multimedia \
- network \
- opengl \
- plugins \
- qt3support \
- script \
- scripttools \
- sql \
- svg \
- xml \
- xmlpatterns \
- -ts $$prependAll($$QT_SOURCE_TREE/translations/qt_,$$QT_TS,.ts))
-ts-qt.depends = sub-tools
-
-###### Designer
-
-ts-designer.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
- ../tools/designer/translations/translations.pro)
-ts-designer.depends = sub-tools
-
-###### Linguist
-
-ts-linguist.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
- ../tools/linguist/linguist/linguist.pro)
-ts-linguist.depends = sub-tools
-
-###### Assistant
-
-ts-assistant.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
- ../tools/assistant/translations/translations.pro \
- && $$LUPDATE \
- ../tools/assistant/translations/qt_help.pro)
-ts-assistant.depends = sub-tools
-
-###### Qtconfig
-
-ts-qtconfig.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
- ../tools/qtconfig/translations/translations.pro)
-ts-qtconfig.depends = sub-tools
-
-###### Qvfp
-
-ts-qvfb.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
- ../tools/qvfb/translations/translations.pro)
-ts-qvfb.depends = sub-tools
+TS_TARGETS =
+
+# meta target name, target name, lupdate base options, files
+defineTest(addTsTarget) {
+ cv = $${2}.commands
+ $$cv = cd $$QT_SOURCE_TREE/src && $$LUPDATE $$3 -ts $$4
+ export($$cv)
+ dv = $${1}.depends
+ $$dv += $$2
+ export($$dv)
+ TS_TARGETS += $$1 $$2
+ export(TS_TARGETS)
+}
-###### Overall Rules
+# target basename, lupdate base options
+defineTest(addTsTargets) {
+ files = $$files($$PWD/$${1}_??.ts) $$files($$PWD/$${1}_??_??.ts)
+ for(file, files) {
+ lang = $$replace(file, .*_((.._)?..)\\.ts$, \\1)
+ addTsTarget(ts-$$lang, ts-$$1-$$lang, $$2, $$file)
+ }
+ addTsTarget(ts-untranslated, ts-$$1-untranslated, $$2, $$PWD/$${1}_untranslated.ts)
+ addTsTarget(ts-all, ts-$$1-all, $$2, $$PWD/$${1}_untranslated.ts $$files)
+}
-ts.depends = ts-qt ts-designer ts-linguist ts-assistant ts-qtconfig ts-qvfb
+addTsTargets(qt, -I../include -I../include/Qt \
+ 3rdparty/phonon \
+ 3rdparty/webkit \
+ activeqt \
+ corelib \
+ declarative \
+ gui \
+ multimedia \
+ network \
+ opengl \
+ plugins \
+ qt3support \
+ script \
+ scripttools \
+ sql \
+ svg \
+ xml \
+ xmlpatterns \
+)
+addTsTargets(designer, ../tools/designer/designer.pro)
+addTsTargets(linguist, ../tools/linguist/linguist/linguist.pro)
+addTsTargets(assistant, ../tools/assistant/tools/assistant/assistant.pro)
+addTsTargets(qt_help, ../tools/assistant/lib/lib.pro)
+addTsTargets(qtconfig, ../tools/qtconfig/qtconfig.pro)
+addTsTargets(qvfb, ../tools/qvfb/qvfb.pro)
check-ts.commands = (cd $$PWD && perl check-ts.pl)
-check-ts.depends = ts
+check-ts.depends = ts-all
+
+isEqual(QMAKE_DIR_SEP, /) {
+ commit-ts.commands = \
+ cd $$PWD/..; \
+ for f in `git diff-files --name-only translations/*_??.ts`; do \
+ $$LCONVERT -locations none -i \$\$f -o \$\$f; \
+ done; \
+ git add translations/*_??.ts && git commit
+} else {
+ wd = $$replace(PWD, /, \\)\\..
+ commit-ts.commands = \
+ cd $$wd && \
+ for /f usebackq %%f in (`git diff-files --name-only translations/*_??.ts`) do \
+ $$LCONVERT -locations none -i %%f -o %%f $$escape_expand(\\n\\t) \
+ cd $$wd && git add translations/*_??.ts && git commit
+}
+
+ts.commands = \
+ @echo \"The \'ts\' target has been removed in favor of more fine-grained targets.\" && \
+ echo \"Use \'ts-<target>-<lang>\' or \'ts-<lang>\' instead. To add a language,\" && \
+ echo \"use \'untranslated\' for <lang>, rename the files and re-run \'qmake\'.\"
-QMAKE_EXTRA_TARGETS += ts-qt ts-designer ts-linguist ts-assistant ts-qtconfig ts-qvfb \
- ts check-ts
+QMAKE_EXTRA_TARGETS += $$unique(TS_TARGETS) ts commit-ts check-ts